Post A3EjkFM2eLGbFnDXQe by andinus@tilde.zone
 (DIR) More posts by andinus@tilde.zone
 (DIR) Post #A3EjkFM2eLGbFnDXQe by andinus@tilde.zone
       2021-01-14T09:48:15Z
       
       0 likes, 0 repeats
       
       Hi @Algot, I wrote a program to solve your Word-search puzzles.Octans: https://github.com/andinus/octansIt performs a Depth-First search on all possible matches from the dictionary.
       
 (DIR) Post #A3EjkFWg0nm1mmC20O by Algot@mastodon.art
       2021-01-14T14:28:28Z
       
       0 likes, 0 repeats
       
       @andinus That is impressive.Congratulations!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?
       
 (DIR) Post #A3EjkFmz2AokbLp3QG by andinus@tilde.zone
       2021-01-14T15:36:59Z
       
       0 likes, 0 repeats
       
       @Algot :flan_smile:​ Thanks! > 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/starOctans 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 WWWI 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-wwwSo, 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.
       
 (DIR) Post #A3EjkFz2JMSVCjSgD2 by Algot@mastodon.art
       2021-01-14T16:35:00Z
       
       0 likes, 0 repeats
       
       @andinus I also post the week's images on my own web site. http://runeman.org/embroidery/index.htmlIt 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.
       
 (DIR) Post #A3EjkGAjbrofn0w1RY by klaatu@mastodon.xyz
       2021-01-14T18:37:28Z
       
       0 likes, 0 repeats
       
       @Algot @andinus This is insanely cool.
       
 (DIR) Post #A3EkjrB8dQK2EBUlma by Algot@mastodon.art
       2021-01-14T18:48:41Z
       
       0 likes, 0 repeats
       
       @klaatu @andinus No doubt about it!