I thought that too, but it turns out I was confusing two Lisp dialects. At least on Chrome, as soon as you type the correct name, it continues to the next language.
It automatically advances when you get the answer right. If it's not advancing, you're probably entering the wrong language (even if you think you're right; there are a lot of similar looking, but obscure languages in there). I agree that it would be nicer if the author made it more obvious as to how it worked though.
If the input text is correct, it is automatically submitted and you move on to the next language sample. If you haven't typed the correct answer, nothing happens and you can either keep guessing or forfeit.
I feel this could do with an Easy/Medium/Hard option. I've been programming for about 30 years and I can honestly say I've never heard of Falcon or Piet.
I worked with one person who I think could probably get a pretty high score. He was always talking about crazy esoteric languages that I'd never heard of - but then again, he was working on his own programming language in his spare time. So language enthusiasts or compiler writers would probably score better.
TrID[1] has a number of definitions for various executable files, but it's designed for general-purpose file format identification. PEiD[2] is built specifically for identifying packers, compilers, etc. for PE files, and should therefore be able to identify a far wider array of them (the site claims it detects over 600 PE signatures), but I've never done any checking myself, and the project unfortunately seems to be discontinued.
Besides certain languages with special keywords, the easiest way would be to send it through syntax checkers iteratively. You could probably have generic "C-style" and "common lisp style" types of checks, then you would have to actually look at api commands. The latter method would be rather problematic.
Heh. I've never used Delphi and I got that one. Thank goodness for learning Pascal in high school, I guess. (And reading somewhere that Delphi is related.)
I missed Erlang, even though I have a copy of Programming Erlang somewhere. Guess it didn't take.
I tried guessing Pascal and Modula and a few more for Delphi. I was thinking to myself "what other languages look like Pascal" and in the end gave up. Felt really dumb then when it turned out to be Delphi.
The other one where this happened was F#. I tried OCaml and Snandard ML and was thinking "this HAS to be OCaml..." and again, felt silly for not thinking of F#.
I got Standard ML confused with F#, then when I saw F# I got it right. When I restarted the thing, hoping to get a better score, I thought it was Standard ML... gave up, and found out it was F#.
And I felt sick that I got as high as 25% of them. I think it is better to know just a few of them very well. However the ones I use everyday I got immediately ...
What is interesting is so many languages look like C or Lisp or ML or its variants.
I got it too, the same code for 5 languages I've never heard about, one after another. I felt ignorant, until it told me it's also valid racket :).
int main(){
for(int i = 99; i > 0; i--){
write(i + " bottles of beer on the wall, " + i + " bottles of beer.\n");
write("Take one down and pass it around, " + (i-1) + " bottles of beer on the wall.\n\n");
}
write("No more bottles of beer on the wall, no more bottles of beer.\n");
write("Go to the store and buy some more, 99 bottles of beer on the wall.\n");
}
So I've been doing relatively well, up to 12 and score of 75% - but then I hit TI-BASIC.
After I chose it right, the number on the left progressed, but nothing changed in the language itself. After that, kept clicking Forfeit and counter on the left increases (as score naturally goes down), but nothing was displayed where language sample should be. I am on latest Safari on Mac.
I CAN HAZ BUG FIXZ, PLZ?
But seriously, tons of crazy languages out there - I wonder if it is because we each want to have our own? I know I put together one or two myself, over the years :)
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...
Awesome work, either way! Very impressive collection of language samples.
It would make great post to tell us how you put this together, especially where these code samples were from and anything else of interest.
Kudos!
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.
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.
That is annoying. Also irritating is the fact that the quiz seems to stop accepting answers after a couple of questions for me; in both Chrome and Firefox so far. I want so desperately to get a score!
Edit: Actually, it just turns out (after reading the source) that in some cases it just won't accept the answer if it's wrong. I did the honourable thing and selected "Forfeit", allowing me to continue :)
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.
It was more the cases where I was wrong, rather than right. Some feedback indicating that the form could not be submitted, and one needed to press "forfeit", would have been appreciated, if only because it is not the way web forms work.
It's a small thing (and I did like it once I realised how it worked) but when doing things in an unusual way a little bit more guidance is required at first.
106 comments
[ 4.8 ms ] story [ 207 ms ] threadInteresting though :D
If the input text is correct, it is automatically submitted and you move on to the next language sample. If you haven't typed the correct answer, nothing happens and you can either keep guessing or forfeit.
Edit: Darn, was beat to it.
OT: Falcon is actually a pretty interesting little language.
Damn, I thought I was good at this.
edit: 46/77 I guess, after 75 it's only undefined (so my score should probably be 46/75)
;-)
Not sure how they would get around this one.
Wow, there are so many languages I still need to try.... I'm proud I got ones like Piet, Io, and Racket, though.
I like it that you can clearly see several "streams" of syntax. That does make it hard to find the correct C family.
It would be interesting to see how much code you need to be able to accurately identify the language.
[1] http://mark0.net/soft-trid-e.html [2] http://www.peid.info/
[0] http://softwaremaniacs.org/soft/highlight/en/
I missed Erlang, even though I have a copy of Programming Erlang somewhere. Guess it didn't take.
The other one where this happened was F#. I tried OCaml and Snandard ML and was thinking "this HAS to be OCaml..." and again, felt silly for not thinking of F#.
Boy am I smart.
What is interesting is so many languages look like C or Lisp or ML or its variants.
Languages never saw before :
seed7, whenever.
Happy to see my friend COBOL too.
My 5 bugged languages were : scala, groovy, Dart, they're all not too unrelated.
[1] http://rosettacode.org/wiki/99_Bottles_of_Beer
[1] http://wtpl.heroku.com/js/engine.coffee
Edit: Actually, it just turns out (after reading the source) that in some cases it just won't accept the answer if it's wrong. I did the honourable thing and selected "Forfeit", allowing me to continue :)
It's a small thing (and I did like it once I realised how it worked) but when doing things in an unusual way a little bit more guidance is required at first.
Enjoyed the quiz!
Also, I opted for Tab completion instead of arrow keys; it's much faster and far less finicky to implement robustly.
Looking at the source in a programming challenge is still winning, right?