From: Michael Ulm Date: 2006-08-11T18:37:36+09:00 Subject: Re: Codegolf - Pascals Triangle Kev Jackson wrote: > > On 11 Aug 2006, at 15:58, benjohn@fysh.org wrote: > >>> My take on the latest problem from http://www.codegolf.com >>> >>> a=[] >>> 34.times{k=0;puts (a.map!{|i|k+k=i}<<1).join(" ")} >> >> >> :) That's very impressive - I like the way you've implemented the filter >> like box kernel (summing adjacent array entries) - I wouldn't have >> imagined the k=i would bind tighter than the k+k. > > > how about > > a=[] > 34.times{k=0;p (a.map!{|i|k+k=i}<<1).join(" ")} > > I *never* use puts, and in this case using p saves you 3 characters - > yay for micro-tuning :) > This does not produce the same output on my system; your version gives lines like "1 2 1" instead of 1 2 1 Since the output format is fixed in codegolf.com, unfortunately this is not a solution. Best regards, Michael -- Michael Ulm R&D Team ISIS Information Systems Austria tel: +43 2236 27551-219, fax: +43 2236 21081 e-mail: michael.ulm@isis-papyrus.com Visit our Website: www.isis-papyrus.com --------------------------------------------------------------- This e-mail is only intended for the recipient and not legally binding. Unauthorised use, publication, reproduction or disclosure of the content of this e-mail is not permitted. This email has been checked for known viruses, but ISIS accepts no responsibility for malicious or inappropriate content. ---------------------------------------------------------------