Better HN
topnewbestaskshowjobs
Log inSign up

andkerosine

33 karma · joined May 13, 2012 (14y ago) · 17 submissions

Submissions

comment 13y ago · link · parent

For what it's worth, Vim handles it just fine.

comment 13y ago · link · parent

As its creator, I would certainly agree. Still, I'd feel bad if some poor soul considered it anything but an interesting demonstration of Ruby's capabilities.

comment 13y ago · link · parent

This has no business being at the top of HN.

comment 14y ago · link · parent

Having written it, I can assure you that cookies are not required for it to work, and thus no whitelisting should be necessary. I think you may've had some other problem.

comment 14y ago · link · parent

Populating the list with answers that are irrelevant almost 99% of the time would be downright cruel.

comment 14y ago · link · parent

It's definitely in there, nowhere near as short as the K and Golfscript solutions, though.

comment 14y ago · link · parent

The person on a high score list of one is in both first and last place. Zen to remember.

comment 14y ago · link · parent

The intention, ideally, is to get a system in place that allows for seamlessly adding new languages and "tasks" and open it up.

comment 14y ago · link · parent

The culprit:

    Array::shuffle = -> @sort -> 0.5 - Math.random()
was just too damned sexy to pass up, but it's apparently pretty bad at distribution. Running it ten times seems to have helped. : )

comment 14y ago · link · parent

But "undefined" is such a beautiful terminus; what lies beyond the horizon is entirely up to your imagination. : )

Also, I opted for Tab completion instead of arrow keys; it's much faster and far less finicky to implement robustly.

comment 14y ago · link · parent

I know auto-accepting only the correct answer is a pretty unorthodox way to do it, but I initially took to making this to familiarize myself with the various syntaxes, and it's the approach I tend to opt for when teaching myself things by rote (notably the Japanese kana and one to ten in all sorts of spoken languages) and it seems to work pretty well. Something about pressing Enter or a "submit" button breaks the neural flow for me; I tend to recall things much more effectively when I become a "constant input stream", for lack of a better phrase. Apologies if it doesn't quite suit you.

comment 14y ago · link · parent

Language constantly evolves, and I reckon there's certainly enough room for "transpile" somewhere in that process. CS -> JS isn't quite translation (much of it stays the same) and it's hardly compilation (but that seems to be the accepted term), so I feel "transpile" is perfectly suited.

comment 14y ago · link · parent

What with that link just sitting there out in the open, I want to clarify that it's transpiled CoffeeScript and that the original[1] is far more sane.

[1] http://wtpl.heroku.com/js/engine.coffee

comment 14y ago · link · parent

To think that Brainfuck * Befunge could be anything but a disaster.

comment 14y ago · link · parent

Which do you mean? They're scrambled randomly at the start.

comment 14y ago · link · parent

How I wish I could say I speak 70+ programming languages, but alas, they're all from Rosetta Code.[1] I would like to show a variety of "tasks", as the site calls them, but scraping seems like it would be a pain, so I went with the most interesting problem with a solid number of samples. As for the architecture, it's pretty much just a Ruby hash from language to code, and then a bit of CoffeeScript to glue everything together.

[1] http://rosettacode.org/wiki/99_Bottles_of_Beer

comment 14y ago · link · parent

Author here. Sorry for nipping your adventure short, but I caught sight of how fast the logs were scrolling, noted the HN referrer, and decided it'd probably be best to stop requesting the next code block from the server and just store everything client-side. With almost 10k uniques in ~16 hours, I imagine I've gone well over the 750 free dyno hours with this one. Oops...