Live data from Hacker News

Show HN: XKCD-inspired StackSort

gkoberger.github.com

111–120 of 210 posts

Re: Show HN: XKCD-inspired StackSort

#111
post #51

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

[deleted]

Re: Show HN: XKCD-inspired StackSort

#113
post #51

Earlier quoted context omitted.

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…

Forth, Factor, APL or any other concatenative language provides the benefit of a "point free" style in which there are no explicitly named variables- that's one way to reduce the possibility space of programs. In the case of Factor (or Forth with an appropriate DSL) you could further use type information to ensure that your program generator only used words in sequence whose stack effects match up properly- ie a 'val…

Perhaps worth noting: java bytecode is a concatenative language. There are probably more commercially interesting java corpora than forth corpora.

If you want to get paid to play around with this thought, my contact info is in my HN profile.

Re: Show HN: XKCD-inspired StackSort

#114
post #78

Earlier quoted context omitted.

I looked for a way, but turns out it's not possible with JS. Browsers will stop infinite loops after a few seconds, though. EDIT: Ah, I missed the joke.. what I meant was that I looked for a way to stop the JS if it ran for more then a second.

I believe this is the joke: http://en.wikipedia.org/wiki/Halting_problem >In computability theory, the halting problem ... is equivalent to the problem of deciding, given a program and an input, whether the program will eventually halt when run with that input, or will run forever. Alan Turing proved in 1936 that a general algorithm to solve the halting problem for all possible program-input pairs cannot exist.

Sure. gkoberger transformed that statement into "can you detect if it has been running for an unreasonable amount of time". Not possible in advance, but certainly detectable in hindsight. Just, perhaps, not in JS.

Re: Show HN: XKCD-inspired StackSort

#116
post #94

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

Yeah, I thought about the same. The Internet is just the enormous knowledge base. And the Internet is not only WWW, it's also IRC, Usenet, FTP servers, TOR, all kinds of darknets. It's worth more than any printed encyclopedia or dictionary. Yet, there is still no a good way to find a particular information fast, especially for non-IT people. Therefore, every initiative to make simpler is worth attention.

Re: Show HN: XKCD-inspired StackSort

#118
post #45

has nobody else noticed that the default list always sorts with the same algorithm? http://stackoverflow.com/questions/14761032/infinite-recursi...

Well, yeah... it's an algorithm. Hit "keep trying" (big yellow button) to find more results. Or, fork it and play with the StackOverflow queries.

Yeah sounds like shuffling the result set before running might add a bit more spice to this.

Re: Show HN: XKCD-inspired StackSort

#119
post #88

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…

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

[Slash/A](https://github.com/arturadib/slash-a) is specially designed for genetic programming / random generation. No matter how you piece together the instructions, it is still a valid program.

Re: Show HN: XKCD-inspired StackSort

#120

For 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 ...

Would they even be able to do much damage? The site is hosted on a subdomain of Github, so I presume they wouldn't be able to do much. Right? I mean I hope sites hosted on *.github.com can't compromise my Github account...

At a very basic level, it could redirect you to some other page hosting a browser exploit and drive-by-install malware. Certainly seems like there are enough Java exploits laying around for that to be a problem.

But no, I don't think it has access to anything privileged.

Post reply on HN