So if I make a post on stackoverflow with the tags "javascript" and "sort", and put some dirty JS in there, could it take down people's browsers?
Show HN: XKCD-inspired StackSort
21–30 of 210 posts
Re: Show HN: XKCD-inspired StackSort
#22One could join this with unit-tests so you would fetch code until the unit tests for what you are trying to do pass
And then maybe add some genetic programming to it if the code is almost there
Re: Show HN: XKCD-inspired StackSort
#23So if I make a post on stackoverflow with the tags "javascript" and "sort", and put some dirty JS in there, could it take down people's browsers?
In theory, sure. However, I only use answers posted before the comic was released to avoid this very problem :)
Re: Show HN: XKCD-inspired StackSort
#24Earlier quoted context omitted.
Do you test the result, or just hope if it runs, it actually worked?
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
Re: Show HN: XKCD-inspired StackSort
#25I tried it and it found an algo that actually worked:
http://stackoverflow.com/questions/14761032/infinite-recursi...
Re: Show HN: XKCD-inspired StackSort
#26Quick 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.
function sortArray(a) { alert('Hello StackSort!') }
Question/Answer. =( Good foresight!
Re: Show HN: XKCD-inspired StackSort
#27Just curious about it.
Re: Show HN: XKCD-inspired StackSort
#28Earlier quoted context omitted.
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.
Dammit, just as I was about to write a function sortArray(a) { alert('Hello StackSort!') } Question/Answer. =( Good foresight!
Re: Show HN: XKCD-inspired StackSort
#29Re: Show HN: XKCD-inspired StackSort
#30Noticed that there was a lot of "Potentially bad code" answers. I read you are avoiding scripts with "cookie" or written after the comic was written, but are there other restrictions? For example, this was banned: http://stackoverflow.com/questions/14800987/javascript-sorti... Just curious about it.