Live data from Hacker News

Show HN: XKCD-inspired StackSort

gkoberger.github.com

41–50 of 210 posts

Re: Show HN: XKCD-inspired StackSort

#41
post #33

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.

http://splasho.com/upgoer5/ as well.

I suppose wetriffs might also count.

Re: Show HN: XKCD-inspired StackSort

#42
post #5

If 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…

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…

Try this in Forth, or Factor. And be sure to read up on genetic programming.

http://en.wikipedia.org/wiki/Genetic_programming

Re: Show HN: XKCD-inspired StackSort

#43
post #42

Earlier 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…

Try this in Forth, or Factor. And be sure to read up on genetic programming. http://en.wikipedia.org/wiki/Genetic_programming

I will read more about GP for future attempts, thanks.

Re: Show HN: XKCD-inspired StackSort

#46

Great. I thought about implementing it myself after reading the XKCD, I knew it was plausible. I tried it and it found an algo that actually worked: http://stackoverflow.com/questions/14761032/infinite-recursi...

run it a few more times, that's the only one it finds.

Re: Show HN: XKCD-inspired StackSort

#47
post #5

If 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…

Aaand I just heard the death knell of H. sapiens domination of the planet.

Re: Show HN: XKCD-inspired StackSort

#48
post #37

Wow.. beautiful! I know this is only for fun, but it can start something bigger. Basically, given an input and output we could search for an algorithm that works. It reminds me a talk that PG gave in which he states people making bots to optimize code and then an intelligent compiler could be done. It sounded very futuristic, but maybe it is not that futuristic after all...

This is called TDD.

Not really the same. TDD just give you the requirements for implementation. The intention of what I said is to given those requirements find a set of solutions. PG's idea is more ambitious, since is more like a set of plugins attached to the compiler so it could perform very high level optimizations (like finding an iterative solution given a recursive process)

Re: Show HN: XKCD-inspired StackSort

#49

Quick someone write a 'sort' that steals github session cookies. ;P

I only search answers posted before the comic was released for this reason :) (Also, I block any code that uses the word "cookie") Plus, I'm assuming that since they let anyone run arbitrary code on subdomains, they've thought this through.

I think they thought it through, but there are still issues:

https://news.ycombinator.com/item?id=5347430

Post reply on HN