Talk:Odd word problem: Difference between revisions

→‎Explanations: Notes on Tcl version
(→‎Explanations: Notes on Tcl version)
Line 16:
:::::: I understand your frustration. I don't know enough APL or J to even begin but I do know that there is a different way of looking at things. We saw it with the Longest String Puzzle/Challenge as well. I still think the task is under (or incorrectly specified) with respect to intent. I now thing that puzzles/challenges of this type are really properly categorized as 'curiosities'. So if I were to paraphrase, the basic problem is clear but the restrictions muddy the waters (also familiar). The 'read' method is given as unbuffered and destructive hence the no peeking, putting back, etc. The curiosity/challenge is in finding a way to reverse through program control alone without intermediate buffers. This works for most languages but I confess that I very quickly hit a wall when I try and think about this in APL or J. --[[User:Dgamey|Dgamey]] 02:41, 5 November 2011 (UTC)
:::::: One thing that I think is missing in curiosities of this type is documentation about what we coded. It's one thing to have a very specific and comparable task as comparisons can be more easily made. But when there is more variation and style it becomes harder to compare and see how things work. BTW. As I was trying to read the TCL, I'd love to see a tightly prescribed task for simple co-routine transfers. --[[User:Dgamey|Dgamey]] 02:42, 5 November 2011 (UTC)
::::::: I had a version which was a bunch of coroutines yielding directly to each other, but it was longer and not nearly as elegant, whereas this one arose from a bug when trying to tidy up. (To understand the core of the Tcl code, it helps to know that <code>puts</code> has an empty result and so that <code>[foo][puts ...]</code> effectively evaluates <code>foo</code> to produce some value, prints a message and then produces that value from before; it has a lot in common with the classic K combinator.) Overall, this is an easy task to solve, but harder to solve elegantly; I'm really pleased by the outcome. I would welcome something that has interesting coroutine transfers as the best solution (in this case, putting the main loop outside a coroutine simplified the handling of the end of the input a lot, which leads to the pattern I'm using). –12:10, 5 November 2011 (UTC)
 
== Other References ==
Anonymous user