Hi all,
a correspondent by the name of Olaf reported a problem he had with using the
online, browser-based version of Freecell Solver
(
http://fc-solve.shlomifish.org/js-fc-solve/text/ )
where the solver complained about "Too little input". He gave me a link to
reproduce the problem using the Bookmark feature of the page (which turned
out to be useful, as I expected) and I was able to reproduce it. I tried
copy+pasting the layout into a file and running it and it ran fine, so I
didn't know what the problem was.
Then I used Firebug to trace through the execution, and saw there that the
input had 8 stacks/columns - each in its own line, but where the last line
did not have a trailing newline character "\n". So I used the kate text
editor (
https://en.wikipedia.org/wiki/Kate_%28text_editor%29 ) to remove
the last empty line, and saw that fc-solve also complained about that.
I thanked Olaf for the find, and went on to fix the problem. The first fix was
a workaround for the JavaScript-based version where I added a trailing newline
to the input if it did not have one. This was added with a QUnit-based test in
the a1c58e13a53634830fa88ae178d85cfa59a40a1a commit.
In the course of that, I discovered a different bug where the Freecell Solver
presets were not present in the JavaScript-based solver, and fixed that as
well.
Then I fixed the C solver handling of a trailing newline in commit
48dd8858cfd9f319035153b5f714a2bbba5f326f and credited Olaf in commit per his
request - d217c962c6ef0b6e95520831cd58e45c483faf27 .
-----
It also now seems that the amateur-star preset yields different results on the
JavaScript-based solver than it does on the original C solver and I'll have to
investigate why this is the case.
So thanks to Olaf for reporting his problem.
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Chuck Norris/etc. Facts - http://www.shlomifish.org/humour/bits/facts/
Lone Starr: “Just what we need — a Druish princess.”
Barf: “Funny! She doesn’t look Druish.”
— Spaceballs, http://www.imdb.com/title/tt0094012/
Please reply to list if it's a mailing list post - http://shlom.in/reply .
Received on Tue Jan 28 2014 - 00:33:02 IST