4 ms·
Took a very quick look at Coderay. If I'm not mistaken, it looks like a Regexp-based parser/compiler, rather than any sort of parser with an actual grammar. To
by donw 15y ago
Took a very quick look at Coderay. If I'm not mistaken, it looks like a Regexp-based parser/compiler, rather than any sort of parser with an actual grammar.
To be honest, while my inner nerd shudders at this, it makes a little sense as some of the languages in that list (Ruby) have only recently had formal grammars defined.
That said, I think it would take me more than ten minutes to implement a scanner for F#, which I don't know, using Coderay, which I also don't know.
I could probably get it done in about a day, maybe two for debugging and testing.
There is no way in hell I would spend that kind of time on a job application, and as a nerd that has gone into management, I wouldn't ask an applicant to do so either.
What has worked well for me in the past is to ask for either a link to their GitHub repository, a code sample, or have them solve a quick five-minute problem over Skype or IM.
If the interviewee passes that bar, we then do something more in-depth during the interview as a pair, timeboxed to about half an hour.
This has proven effective at weeding out the untalented and unworkable, without asking potential hires to sacrifice a huge amount of their time.
- tptacek 15y agoRuby does't have a grammar? MRI Ruby, the oldest and creakiest of its implementations, is parsed with a 6000 line Yacc grammar.
- donw 15y agoIf I remember correctly, Matz didn't approve a formal grammar for the language until a few years ago, with the idea that any language that can run rubyspec is Ruby. E.g., the language was defined not by a formal specification, but by implementation. Then again, my memory is known for being incredibly unreliable; I could be wrong on this one.
- fizx 15y agoYou're both right.
- Goladus 15y agoRight, you rarely have to use the formally specified grammar to parse a language, so long as whatever parsing technique you use doesn't violate the spec. A 6000-line yacc file probably isn't an easily-read formal grammar and does more than a formal syntax specification would require.
- chc 15y agoIt offers the alternative of suggesting a better architecture for their distribution app (which frankly sounds pretty friggin easy to dream up).