News for hackers. Stuff that matters.
Re:Nice try, kid ... by mrtron on Wednesday January 30, 2008 @12:36PM (#106919)
Should have wrote it in Python to save a few lines :)

for x in range(500): print 'I will not throw paper airplanes in class.'

Or perhaps Arc!

Re:Nice try, kid ... by dima on Wednesday January 30, 2008 @02:16PM (#106990)
Why not use Erlang and make it concurrent? :)

[spawn(fun() -> print("'I will not throw paper airplanes in class.'") end) || N <- lists:seq(1, 500)]

Re:Nice try, kid ... by jgrahamc on Wednesday January 30, 2008 @03:09PM (#107021)
Um. Because writing to stdout will serialize the processes?
Re:Nice try, kid ... by rontr on Thursday January 31, 2008 @12:14AM (#107280)
What makes you think it's written to stdout?
Re:Nice try, kid ... by mynameishere on Wednesday January 30, 2008 @03:38PM (#107046)
stdout can be redirected, as to a stream that round robins it to a matrix of printers.
Re:Nice try, kid ... by eru on Wednesday January 30, 2008 @03:48PM (#107053)
Matrix printers?
Re:Nice try, kid ... by mynameishere on Wednesday January 30, 2008 @04:04PM (#107068)
of
Re:Nice try, kid ... by Xichekolas on Wednesday January 30, 2008 @06:35PM (#107153)
I'm pretty sure the people in the Matrix will be confused when every printer in the world starts printing out "I will not throw paper airplanes in class." ... Of course, then the agents will reset the system and everyone will just experience deja vu.
Re:Nice try, kid ... by eru on Thursday January 31, 2008 @03:50AM (#107326)
Sure, of. But a Matrix of Matrix printers would be nice.
Re:Nice try, kid ... by jgrahamc on Wednesday January 30, 2008 @01:01PM (#106936)
(for i 1 500 (prn "I will not throw paper airplanes in class."))

Although, I assume the kid forgot the \n in his printf.

Re:Nice try, kid ... by davidw on Wednesday January 30, 2008 @03:09PM (#107022)
"prn"? Ick. Looks like 'porn'! Why not print, or put, or puts or out or just "p"?
Re:Nice try, kid ... by jgrahamc on Wednesday January 30, 2008 @03:23PM (#107029)
pr = print

prn = print followed by newline

Re:Nice try, kid ... by run4yourlives on Wednesday January 30, 2008 @03:21PM (#107028)
Because i and t are such a waste of time! :-)
Re:Nice try, kid ... by WilliamLP on Wednesday January 30, 2008 @05:21PM (#107118)
?"For the win."
Re:Nice try, kid ... by BrandonM on Wednesday January 30, 2008 @03:34PM (#107041)
Wouldn't it be easier to type:

(repeat 500 (prn ...))

?

Re:Nice try, kid ... by jgrahamc on Wednesday January 30, 2008 @03:40PM (#107047)
You are correct. I need to go back and reread the tutorial.
Re:Nice try, kid ... by jamiequint on Wednesday January 30, 2008 @04:37PM (#107092)
or ruby

  (0..500).each {|i| print "I will not throw paper airplanes in class\n"}
Re:Nice try, kid ... by aston on Wednesday January 30, 2008 @05:24PM (#107120)
500.times {print "I will not throw paper airplanes in class \n"}
Re:Nice try, kid ... by curi on Wednesday January 30, 2008 @05:35PM (#107124)
500.times {puts "I will not throw paper airplanes in class"}
Re:Nice try, kid ... by jamiequint on Wednesday January 30, 2008 @06:00PM (#107137)
I figured there was something in ruby for that :P