This is an old blog post I sat on for years because it's ultimately incomplete... but I still think it's interesting even incomplete, so here it is.
HN user
eatnumber1
Cool! Can you submit a pull request?
Can you submit a pull request saying as much in the same form as the Java solution?
Glad to hear it :)
Can you submit a solution then?
The three people who are judging this had a long discussion over this case, and basically decided that since it is in the file, it's fine. We frown on it a little because it's basically self-modifying code, but it's better than nothing for bash.
This is a great incomplete solution. Can you submit a pull-request for it?
Definitely submit a pull-request if you figure out how to do it :)
This is awesome! Can you add a main method with an example of it working and submit a pull request?
Great! Can you submit a pull request?
Agreed. These are informal. If you want to make a formal proof that it's impossible, I'll make a new category.
Agreed! Please submit a solution!
Resetting the state isn't one of the rules ;)
I'd make a solution which resets the state linked by the table though, so please submit one!
Can you submit a pull request saying as much in the same format as the Ruby one?
For the impossible bullets, they link to informal arguments as to why it's impossible. The ruby one has code - it's a syntax error.
Languages that don't use () still have to use the same syntax. See the haskell solution.
If the min macro would have worked, it would have allowed the two lines
min(1, 2, out);
return out;
to be condensed into one line.It's SFW, no worries.