From ruby-talk-admin@ruby-lang.org Fri Dec 16 01:10:57 2005 Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (8.12.3/8.12.3/Debian-6.6) with ESMTP id jBFGAvZk027164; Fri, 16 Dec 2005 01:10:57 +0900 Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 41F515A2C; Fri, 16 Dec 2005 01:10:58 +0900 (JST) Received: from localhost (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 2995DF04894; Fri, 16 Dec 2005 01:11:02 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id CE70EF0488C; Fri, 16 Dec 2005 01:11:00 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [210.163.138.100]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 990EA630029; Fri, 16 Dec 2005 01:11:03 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [127.0.0.1]) by beryllium.ruby-lang.org (Postfix) with ESMTP id F2E3C33B21; Fri, 16 Dec 2005 01:10:58 +0900 (JST) Received: from localhost (beryllium.ruby-lang.org [127.0.0.1]) by beryllium.ruby-lang.org (Postfix) with ESMTP id C907533F21 for ; Fri, 16 Dec 2005 01:10:48 +0900 (JST) Received: from beryllium.ruby-lang.org ([127.0.0.1]) by localhost (beryllium.ruby-lang.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30123-01 for ; Fri, 16 Dec 2005 01:10:48 +0900 (JST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.21]) by beryllium.ruby-lang.org (Postfix) with SMTP id A421A33DC0 for ; Fri, 16 Dec 2005 01:10:47 +0900 (JST) Received: (qmail 28923 invoked by uid 0); 15 Dec 2005 16:10:41 -0000 Received: from 62.225.37.69 by www12.gmx.net with HTTP; Thu, 15 Dec 2005 17:10:40 +0100 (MET) Delivered-To: ruby-talk@ruby-lang.org Date: Fri, 16 Dec 2005 01:10:49 +0900 Posted: Thu, 15 Dec 2005 17:10:40 +0100 (MET) From: "Peter Ertl" Reply-To: ruby-talk@ruby-lang.org Subject: Re: ruby beats them all To: ruby-talk@ruby-lang.org (ruby-talk ML) Message-Id: <28606.1134663040@www12.gmx.net> References: X-ML-Name: ruby-talk X-Mail-Count: 55 X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address ruby-talk-ctl@ruby-lang.org; help= X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Original-To: ruby-talk@ruby-lang.org X-Priority: 3 (Normal) X-Authenticated: #8402114 X-Flags: 0001 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ruby-lang.org X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on beryllium.ruby-lang.org X-Spam-Level: X-Spam-Status: No, score=-14.7 required=7.0 tests=AWL,BAYES_00,BLARS00, BLARS_SPAM00,CONTENT_TYPE_PRESENT,QENCPTR1,RCVDFRMLOCALIP, RCVD_IN_BLARS,RCVD_IN_BLARS_SPAM,RCVD_IN_BLARS_SPSPRT, X_MAILER_PRESENT autolearn=ham version=3.0.3 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Precedence: bulk Lines: 52 List-Id: ruby-talk.ruby-lang.org List-Software: fml [fml 4.0.3 release (20011202/4.0.3)] List-Post: List-Owner: List-Help: List-Unsubscribe: X-Virus-Scanned: by AMaViS snapshot-20020531 this is fibonacci written in Random++ f: @!$,.1,1^%#(* very elegant and short :-) > --- Ursprüngliche Nachricht --- > Von: Christian Neukirchen > An: ruby-talk@ruby-lang.org (ruby-talk ML) > Betreff: Re: ruby beats them all > Datum: Fri, 16 Dec 2005 00:51:16 +0900 > > Stephen Kellett writes: > > > In message , Christian Neukirchen > > writes > >>def fib(n) > >> (1..n-2).inject([1, 1]) { |(a, b), n| [b, a+b] }.last > >>end > > > > Thats about as readable as APL. Maintenance nightmare. > > I disagree. APL isn't about readability to outsiders (and this is IMO > not a thing every language needs to strive for, sometimes there are > things more important). Take this piece of J: > > f =: 1:`($:@<:&<:+$:@<:)@.(1:<]) > > (taken from http://cubbi.org/serious/fibonacci/j.html) > Or, in K: > > fibonacci:{x(|+\)\1 1} > > (taken from > http://www.kuro5hin.org/?op=displaystory;sid=2002/11/14/22741/791) > > Or, again in K: > > fx:{x{x,+/-2#x}/0 1} > > (taken from http://www.kx.com/listbox/k/msg05165.html) > > These all are far more unreadable to me, even though I know the basics > of APL... > > Besides, what is there to maintain about fibonacci? > > > Stephen > -- > Christian Neukirchen http://chneukirchen.org >