apexatoll / cliptic Goto Github PK
View Code? Open in Web Editor NEWA terminal interface for fetching and playing daily cryptic crosswords
License: MIT License
A terminal interface for fetching and playing daily cryptic crosswords
License: MIT License
It's not possible to quit the program using q
, ^C
, or ^D
when being served the "screen too small" warning, and must be forcibly terminated. The program expects to receive a quit signal only in "normal" mode. This means you can become softlocked if you open it in an environment where your combination of display settings doesn't support the expected display size. (See #4)
When I try to run cliptic (installed using gem install...
) I get this error: "undefined method `[]' for nil:NilClass"
I'm using ruby 2.7.2p137 on Ubuntu 21.04. Let me know if you need other details.
When installing via gem install cliptic
resulting in the output
Fetching cliptic-0.1.0.gem
Fetching sqlite3-1.4.2.gem
Fetching curses-1.4.2.gem
Fetching curb-0.9.11.gem
WARNING: You don't have /home/<user>/.local/share/gem/ruby/3.0.0/bin in your PATH,
gem executables will not run.
Building native extensions. This could take a while...
Successfully installed sqlite3-1.4.2
Building native extensions. This could take a while...
Successfully installed curses-1.4.2
Building native extensions. This could take a while...
Successfully installed curb-0.9.11
Successfully installed cliptic-0.1.0
4 gems installed
every time I try to run it I only get the result already closed window
?
I've run it both directly from the ~/.local/share/gem/ruby/3.0.0/bin
directory and also via a symlink to a directory in my path.
I'm on Arch Linux with gem
version 3.2.21
.
Thoughts?
I don't really know ruby so I'm not too sure of what's going on. I get an error when installing from Gem.
RDoc::Parser::Ruby failure around line 31 of
lib/cliptic/terminal.rb
Game.new(date:Date.today+offset).play
Before reporting this, could you check that the file you're documenting
has proper syntax:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -c lib/cliptic/terminal.rb
RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.
The internal error was:
(RDoc::Error) Invalid class or module definition: Cliptic::Main::Player
ERROR: While executing gem ... (RDoc::Error)
Invalid class or module definition: Cliptic::Main::Player
Thanks, Aura
Sometimes, it's nice to look back and go over the parsing you did. In the current implementation, your choices are Exit and Quit. I propose a useful feature might be "view," where I could then navigate through the puzzle and double check the clue, answer and see that I parsed it correctly. Thanks!
Thanks for this tool. I don't understand how Ruby works any more. I used to just run ruby and it worked, now There seem to be so many steps and versions, I can't do anything in Ruby.
Anyway, I was wondering if this tool could support exporting the puzzles in a format compatible with other crossword tools as well?Like PUZ or PUZ(txt) or XD or JPZ? It would be neat if there was a list in the terminal of the puzzles you had cached in the database, and then you could export them in a common format.
I get several errors when I try to build, mostly in database.c:
database.c:417:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] return INT2NUM((long)sqlite3_errcode(ctx->db));
database.c:748:57: error: incompatible function pointer types passing 'int (VALUE, int, char **, char **)' (aka 'int (unsigned long, int, char **, char **)') to parameter of type 'int (*)(void *, int, char **, char **)' [-Wincompatible-function-pointer-types] status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
database.c:748:81: error: incompatible integer to pointer conversion passing 'VALUE' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion] status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
database.c:750:57: error: incompatible function pointer types passing 'int (VALUE, int, char **, char **)' (aka 'int (unsigned long, int, char **, char **)') to parameter of type 'int (*)(void *, int, char **, char **)' [-Wincompatible-function-pointer-types] status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
I have ruby 3.3.3 and think I have installed all the dependencies.
Supposedly, this is the earliest available puzzle, but when I try to select it, I get an exit code 1 with the following message:
Invalid date passed 2020-10-13
Earliest date 2020-10-13
Thanks for playing!
Looks like a little bug... Otherwise, working great!
EDIT: Thought I'd mention that 2020-10-14 and beyond are just fine.
If starting the program in a window large enough to draw the interface, but then resizing (or navigating away from the program using a tiled window/fullscreen toggle, such that the geometry changes to be smaller than cliptic's desired geometry) and returning again, the ncurses output becomes garbled during the temporary geometry change and is unable to update again. Would it be possible to allow the user to manually redraw the window via a keybinding?
This is readily apparent on a tiling window manager due to the way the windows are resized on the fly.
Note: this will not occur if you resize to a larger geometry, but once you resize to a smaller geometry such that the lines wrap, it will be permanently distorted.
Terminal emulator: urxvt
Window manager: i3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.