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…
> if you used Brainfuck or Perl TMTOWTDI, dammit.
Show HN: XKCD-inspired StackSort
151–160 of 210 posts
Re: Show HN: XKCD-inspired StackSort
#152Earlier quoted context omitted.
The key last step is to have it automatically post questions to StackOverflow to fill in the last code snippets it can't complete.
I did this in my machine learning class. I started by simply coding up requirements for numerical functions (in the form of test cases), then set up a PHP script that would Google each function based on the keywords in my comments, and try to run any code on the resulting links (in a sandbox) against the requirements, seeing if it worked heuristically. Usually one of the top 5-10 pages of results results would have c…
Re: Show HN: XKCD-inspired StackSort
#153Earlier quoted context omitted.
The key last step is to have it automatically post questions to StackOverflow to fill in the last code snippets it can't complete.
I did this in my machine learning class. I started by simply coding up requirements for numerical functions (in the form of test cases), then set up a PHP script that would Google each function based on the keywords in my comments, and try to run any code on the resulting links (in a sandbox) against the requirements, seeing if it worked heuristically. Usually one of the top 5-10 pages of results results would have c…
Re: Show HN: XKCD-inspired StackSort
#154Earlier quoted context omitted.
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
#155Re: Show HN: XKCD-inspired StackSort
#156Wow.. 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...
Re: Show HN: XKCD-inspired StackSort
#157For the numbers it eventually ends up here : http://stackoverflow.com/questions/14761032/infinite-recursi... but by and large this is a great hack. I worry however if someone meta-exploits this by creating a javascript XSS in a stack exchange answer waiting patiently ...
"The site will only fetch accepted answers, and it only uses answers that were posted before the xkcd was released (meaning that if someone posted malicious code now, it wouldn't matter)."
Re: Show HN: XKCD-inspired StackSort
#158If a site like StackOverflow/Github had a more powerful search, better semantic data, etc. maybe people would be able to create things primarily by searching through it? In this example, one would type "sort array" and it would auto-find a function that sorts an array, but perhaps more advanced things can also be done? I guess it depends somewhat on how re-usable code really is, besides on the ability of a computer t…
Re: Show HN: XKCD-inspired StackSort
#159Is this really an 'alt text' what the author of this page is referring to? Isn't 'alt text' a piece of text that shows when the image is unavailable?
Hover over an image with an alt-text attribute, and a tooltip with the alt-text pops up. All of the xkcd comics have alt-text, and it's a good practice in general, for accessibility software.
Re: Show HN: XKCD-inspired StackSort
#160Has 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.
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.
See also:
https://tech.dropbox.com/2012/04/zxcvbn-realistic-password-s...