Geeks wanted (neat job application puzzle)(telogis.co.nz)
telogis.co.nz
Geeks wanted (neat job application puzzle)
http://www.telogis.co.nz/
12 comments
Looks pretty close to Ruby:
1) remove semi-colons
2) replace a = b - - with a = b followed by b -= 1
3) while (z) { .. } with while (z) ... end
However the if modifier (if it works as in Ruby) doesn't work out very well. I haven't touched Perl in 9 years, so I don't know how different the operator precedence is if at all.
What's the deal with the if? Is it a regular modifier?
However the if modifier (if it works as in Ruby) doesn't work out very well. I haven't touched Perl in 9 years, so I don't know how different the operator precedence is if at all.
What's the deal with the if? Is it a regular modifier?
Think "Forth", "RPN", that sort of thing. It got me for a while too.
I did a quick direct translation into Perl and got 'b', 'e', 'o', 'k', 'j', undef, 'b'.
But neither of these exist:
http://www.telogis.co.nz/beokjb.html
http://www.telogis.co.nz/beokjob.html
And I give up really fast on these, so ...
But neither of these exist:
http://www.telogis.co.nz/beokjb.html
http://www.telogis.co.nz/beokjob.html
And I give up really fast on these, so ...
x = a&x ? a&b : c+x is a lot like the C++ shorthand if-then-else thingamabob: x = ( 1 < 0 ) ? 10 : -10; which translates to: x = 10 if 1 < 0 else x = -10.
Not sure what they mean with their thingamabob though.