31 ms·
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!
by mrtron 19y ago
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!
- jgrahamc 19y ago(for i 1 500 (prn "I will not throw paper airplanes in class.")) Although, I assume the kid forgot the \n in his printf.
- davidw 19y ago"prn"? Ick. Looks like 'porn'! Why not print, or put, or puts or out or just "p"?
- run4yourlives 19y agoBecause i and t are such a waste of time! :-)
- jgrahamc 19y agopr = print prn = print followed by newline
- WilliamLP 19y ago?"For the win."
- BrandonM 19y agoWouldn't it be easier to type: (repeat 500 (prn ...)) ?
- jgrahamc 19y agoYou are correct. I need to go back and reread the tutorial.
- dima 19y agoWhy not use Erlang and make it concurrent? :) [spawn(fun() -> print("'I will not throw paper airplanes in class.'") end) || N <- lists:seq(1, 500)]
- jgrahamc 19y agoUm. Because writing to stdout will serialize the processes?
- mynameishere 19y agostdout can be redirected, as to a stream that round robins it to a matrix of printers.
- eru 19y agoMatrix printers?
- mynameishere 19y agoof
- Xichekolas 19y agoI'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.
- eru 19y agoSure, of. But a Matrix of Matrix printers would be nice.
- rontr 19y agoWhat makes you think it's written to stdout?
- jamiequint 19y agoor ruby (0..500).each {|i| print "I will not throw paper airplanes in class\n"}
- aston 19y ago500.times {print "I will not throw paper airplanes in class \n"}
- curi 19y ago500.times {puts "I will not throw paper airplanes in class"}
- jamiequint 19y agoI figured there was something in ruby for that :P