That is impressive.
Is it reading the grid from the image description?
If I knew how to code in Raku, I would examine the repository to completely understand your implementation.
I do like that it elegantly handles the asterisks, too.
It sounds like the program is designed to be downloaded to one's own computer and run from the command line (Linux required?)
Could it also be set up as a CGI script?
> Is it reading the grid from the image description?
Yes, it's reading the puzzle from the description.
> If I knew how to code in Raku, I would examine the repository to completely understand your implementation.
I added some more comments trying to explain the implementation. Reading a bit about Depth-First search would help understanding the word-search subroutine.
This program consists of 4 parts:
1. Set the puzzle in @puzzle & starting positions in @gray-squares.
2. Loop over the dictionary words & search the grid.
3. word-search subroutine: Searches the grid for given word.
4. neighbors subroutine: Returns the neighbors of given grid.
Also, do you know Perl? I could probably port it to Perl someday.
> I do like that it elegantly handles the asterisks, too.
Yeah, octans is specific to your word-search puzzles. It only starts at grids with an asterisks.
> It sounds like the program is designed to be downloaded to one's own computer and run from the command line (Linux required?)
It's a Raku script, you would need the Raku interpreter. Rakudo star bundle includes the interpreter along with zef (modules installer): https://rakudo.org/star
Octans requires the WWW module, it's not bundled with Rakudo star distribution so you would have to install it yourself with zef. It's as simple as running: zef install WWW
I just created a branch `without-www'. It's the same code but it'll work without WWW dependency: https://github.com/andinus/octans/tree/without-www
So, if you're able to get the Raku interpreter then you could try running `without-www' branch script. And if you're able to get zef running then simply install the module `WWW' and run the main script.
No, Linux is not required. It should work fine on macOS, Windows & BSDs. In fact I'm running it on OpenBSD.
> Could it also be set up as a CGI script?
Yeah, I could set it up as a CGI script.
I also post the week's images on my own web site.
It might be a "cool" option for people to launch a CGI script as a "solver" even though they can simply hover/click the answer button to get the answer.
I would like to, with your permission, add a link to your program. It is such an honor to me to have you go to all the work of developing the tool.
Mastodon.ART — Your friendly creative home on the Fediverse! Interact with friends and discover new ones, all on a platform that is community-owned and ad-free. Admin: @Curator. Moderators: @EmergencyBattle, @ScribbleAddict, @TapiocaPearl, @Otherbuttons, @katwylder