What happened is that they forgot to capitalise the initial character of the name of their class. Could probably also stand to grow a docstring. At least it's an improvement on the median piece of graffiti.
I still like Bristol's graffiti better. Ignoring Banksy, we get poetry on the walls around here.
Echos of the over/under TP discussion you started a few days ago. Are any of these languages NOT Turing complete? Then why are we having this discussion (again, and again, and again)? I see it all the time on HN, and you'd think they know better.
What happened is that they forgot to capitalise the initial character of the name of their class. Could probably also stand to grow a docstring. At least it's an improvement on the median piece of graffiti.
I still like Bristol's graffiti better. Ignoring Banksy, we get poetry on the walls around here.
We do don't we :)
Is it sad that I actually recognize this computer?
Heck, it's better than what a lot of new grads I've interviewed can write. He's hired!
I guess I'm happy that we've advanced from
10 PRINT "PENIS"20 GOTO 10
but I hope pop culture is not now stuck with Java the way it was stuck with Basic.
Graffiti demands a Brainfuck version.
Something like this would be more entertaining, but a much smaller set of people would "appreciate" it.
$i=5;$|=@f=map{("!"x$i++)."9$_*\x{0e}"}">>>E!)",">>>E)",">>>E",">>>",">>",">",
"";push@f,reverse@f[1..5];@f=map{join""
,map{chr(ord()-1)}split//}@f;{$f=shift@
f;print$f;push@f,$f;select undef,undef,
undef,.25;redo;last;exit;print or die;}
I think most non-JAPHs would wonder what "redo last exit, print or die" means, or why someone got a printer error in the middle of a poem.
Ironically, the BASIC version is more elegant than the Java.
That's not irony, that's progress.
I wrote a haskell version onceā¦
main = (putStr . unlines . repeat) "PENIS!"
In addition to not using a capital letter for the beginning of the class name, it's String[] args, not String args[].
Java allows the array indicator to be both used after the type and the var name. It even allows it for methods!
This is valid Java:
public int foo()[] { return null; }
If you haven't seen Gary Bernhardt's "WAT" talk: http://www.youtube.com/watch?v=kXEgk1Hdze0 you should. Brendan has a few corrections to make at 5:08 in his "JS at 17" talk: http://www.youtube.com/watch?v=Rj49rmc01Hs
Ruby's version is the best :P
10.times do
p 'Penis'
end
Precisely the solution I'd expect in ruby. Concern about how cool it looks, totally fails on meeting the spec.
print "Penis\n" for 1..10;
Ten does not in fact equal infinity, despite what you and your other ruby-programing colleage seem to believe.
I am, however, tempted to graffito the brainfuck version all over bathroom stalls now. (Anyone up for producing some malboge code?)
while "lol" do; p "Penis"; end #here is the 'infinity', one-liner Ruby version for ya :)
I'm not sure which is worse, the "do .. penis" in Ruby or the "push/reverse" in Perl!
Echos of the over/under TP discussion you started a few days ago. Are any of these languages NOT Turing complete? Then why are we having this discussion (again, and again, and again)? I see it all the time on HN, and you'd think they know better.