Open rickrich opened 9 years ago
@rickrich I should probably document that, yes :)
There are several ways, and it depends on your goal:
solve_test.go
file to fit your puzzle. Then you run it with go test
, which will then probably report that the test failed, but it will include the answer it found (which is what you want!)Solve
function from this library with appropriate parameters. In this way you'd be able to parse puzzles in your own format and then just call Solve
to get the solution returned.go test
to check that the changes work as expected.Hope that helps!
Ah, thanks! Did not know about "go test".
Basically, I either want to add "Double Cross" to your go program, or figure out the Haskell syntax error in another program which has "Double Cross" already added. Its all because of a geocache:
Go: http://herman.asia/solving-regex-crosswords-using-go Haskell: https://github.com/audreyt/regex-genex
I don't know anything about either langauge, although go seems more C-like.
-Rick
On Sun, Jan 18, 2015 at 6:58 PM, Herman Schaaf notifications@github.com wrote:
@rickrich https://github.com/rickrich I should probably document that, yes :)
There are several ways, and it depends on your goal:
- if you want to just try it out on some custom puzzles, you can modify the solve_test.go file to fit your puzzle. Then you run it with go test, which will then probably report that the test failed, but it will include the answer it found (which is what you want!)
- if you want to use it properly, you'd probably create a module of your own (outside of this library), and then call the Solve function from this library with appropriate parameters. In this way you'd be able to parse puzzles in your own format and then just call Solve to get the solution returned.
- if you're just looking to play around with this source code and learn something about Go / regex puzzles or improve the solution finder, you can make modifications, add new tests for the changes and run go test to check that the changes work as expected.
Hope that helps!
— Reply to this email directly or view it on GitHub https://github.com/hermanschaaf/regex-crossword-solver/issues/2#issuecomment-70435275 .
Rick Richardson rickrich@gmail.com http://rickrich1.home.comcast.net/ Linux printer drivers for JBIG (GDI printers): Konica Minolta magicolor, HP LaserJet, Samsung, Xerox, Lexmark, and Oki. http://foo2zjs.rkkda.com/ Linux tools for geocaching http://geo.rkkda.com/ Gnome Manual Duplex http://sourceforge.net/projects/g-manual-duplex/
@rickrich Any luck yet? Found that geocache? :smile:
Just as a note, @hermanschaaf, you will not receive a response from Rick. He passed away a few years ago.
If you've integrated the hints above into the official doc (I have no idea about this program; I was just a friend of Rick's) I think that closing this issue is probably appropriate.
Thanx and good luck.
$ ll total 20 -rw-rw-r--. 1 rick rick 553 Jan 18 10:44 LICENSE -rw-rw-r--. 1 rick rick 749 Jan 18 10:44 README.md -rw-rw-r--. 1 rick rick 3487 Jan 18 10:44 solve.go -rw-rw-r--. 1 rick rick 4357 Jan 18 10:44 solve_test.go
$ go run solve_test.go solve.go go run: cannot run *_test.go files (solve_test.go)
Rank newbie here!