Has anybody made a gallery of real implementations of Randall Munroe's hilarious ideas yet? I recall at least three exhibitions: this, M-x butterfly, and Hell Tetris; there are probably many others.
Never forget the "import antigravity". I can't think of another comic idea that was implemented in a mainstream language. :-)
Show HN: XKCD-inspired StackSort
101–110 of 210 posts
Re: Show HN: XKCD-inspired StackSort
#102Earlier quoted context omitted.
I tried a basic version of that 1.5 weeks ago. At first it was generating random characters, then I tried some Markov chains trained on valid code. After running it overnight (it was attempting 40+ programs per second), the very best program looked something like this: package main; func main() { i := 0 // wae64309i Next step I wanna try is to use tokens of the language instead of series of random characters. Edit: H…
If you actually want to go down this path then you want a language with as little redundancy as possible. Comments may be useful to humans but they needlessly complicate the search space. Abstractly you want to think about the how your language is parsed so you don't for example try different variable names. Though if you spend enough time your probably going to be reimplementing some type of http://en.wikipedia.org/…
Re: Show HN: XKCD-inspired StackSort
#103Earlier quoted context omitted.
I tried a basic version of that 1.5 weeks ago. At first it was generating random characters, then I tried some Markov chains trained on valid code. After running it overnight (it was attempting 40+ programs per second), the very best program looked something like this: package main; func main() { i := 0 // wae64309i Next step I wanna try is to use tokens of the language instead of series of random characters. Edit: H…
Hah, fun idea. Modified it a bit to run in parallel. I guess I'll leave it on for couple hours and see if it gets anywhere. current output: 1363637914 2013-03-18 22:18:34.118051 +0200 EET Stats: 0/53659699 (0%) good/tries, 223559.91320127275 ops/sec
You can tweak the range of the number of generated characters, the length of Markov chains, the minimum main body clauses, etc. With my original config it should give you a valid program every hour~few hours or so.
Re: Show HN: XKCD-inspired StackSort
#104Earlier quoted context omitted.
It doesn't test for two reasons: 1) I thought it would defeat the purpose 2) "Sort" is very arbitrary. Do you want to sort by key or value? Is "1000" bigger or smaller than "2"? etc
Fair; also, it's called an 'ineffective' sort, and if you tested it, it'd become effective (not efficient, of course). So, good point!
Re: Show HN: XKCD-inspired StackSort
#105Earlier quoted context omitted.
Also, geohashing I'm waiting for 1Password to implement 936. http://xkcd.com/936/ It's not that I don't trust 1Passwords generation algorithm, but when I'm on a borrowed PC (wife's laptop, inlaws desktop or even at work where I can't install 1P) this would help. It's much easier to open 1P on my iPhone, look up a password and type in "correct horse battery staple" than to constantly have to refer back to my phone.
I actually changed my way to pick password thanks to that comic. There are longer and usually with the same entropy, but so much easier to remember!
Re: Show HN: XKCD-inspired StackSort
#106Earlier quoted context omitted.
Genetic programming; type that into google scholar and look at the late-80s and early-90s papers.
Thanks!, I used to play with GP back in the university. It's really fun! However, GP is more like an oriented random search where the space of search is really big. Here the space is somehow filtered by humans, where each hypothesis had been generated by a human and not by a machine. It would be interesting if the machine could evolve those solutions that are not quite but close to be the proper one :)
Re: Show HN: XKCD-inspired StackSort
#107Earlier quoted context omitted.
I will read more about GP for future attempts, thanks.
This is an exciting exchange for me because all joking aside I had this idea in the past and believe it should be a more active area of research. Why Forth? I doubt it is possible to solve "serious" problems with this approach but there is a whole class of work that is solved by mediocre programmers with copy pasting. We strive to automate other jobs, why not these? :) We should come up with some sort of Turing like…
Re: Show HN: XKCD-inspired StackSort
#108If you give it about 30 seconds it works eventually, this is beautiful. I had a good laugh. Edit: It makes me want to do something crazy like setup a tool chain that cobbles whole programs together with trial and error like this. Throw enough resources at it maybe it will be faster and cheaper than your avg. developer. It will be an unmaintainable mess as if you used Brainfuck or Perl. But it will run, by god, it wil…
Re: Show HN: XKCD-inspired StackSort
#109Earlier quoted context omitted.
Ah, applying the Infinite monkey theorem to programming :) http://en.wikipedia.org/wiki/Infinite_monkey_theorem
Yeah, but there are a few well trained monkeys hanging out [mining for karma points] at StackOverflow. The really adventurous would direct it at 4chan.
Re: Show HN: XKCD-inspired StackSort
#110I'm sure that TempleTypeDef ( http://stackoverflow.com/users/501557/templatetypedef ) is loving this. As their answer ( http://stackoverflow.com/questions/14761032/infinite-recursi... ) went from 5 upvotes when this was originally submitted to 29 at the time of this comment. Presumably all due to the HN effect. Does the script run through the same order each time, because I keep getting that answer first, and by the…