From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: The Quiet Center Newsgroups: gmane.emacs.help Subject: Re: How to improve the readability of (any) LISP or any highlevel functional language to the level of FORTH ? Date: Sat, 1 Jan 2011 15:56:05 -0800 (PST) Organization: http://groups.google.com Message-ID: <9e7a7683-a92a-4e88-a6f1-9e6a6bd2f057@z9g2000yqz.googlegroups.com> References: <80ceeca0-1d32-47d1-ba96-feb4d9729c3a@v17g2000yqv.googlegroups.com> <87pqsgk8v9.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1293943543 23331 80.91.229.12 (2 Jan 2011 04:45:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 2 Jan 2011 04:45:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 02 05:45:38 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZFp1-0002gM-J4 for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Jan 2011 05:45:35 +0100 Original-Received: from localhost ([127.0.0.1]:56884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZFp0-0001rl-S6 for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Jan 2011 23:45:34 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!z9g2000yqz.googlegroups.com!not-for-mail Original-Newsgroups: comp.lang.functional, comp.lang.lisp, gnu.emacs.help, comp.lang.forth, comp.lang.prolog Original-Lines: 71 Original-NNTP-Posting-Host: 76.108.76.117 Original-X-Trace: posting.google.com 1293926165 7243 127.0.0.1 (1 Jan 2011 23:56:05 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 1 Jan 2011 23:56:05 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z9g2000yqz.googlegroups.com; posting-host=76.108.76.117; posting-account=CLTRiQoAAAATysyZI2zRzNDqH657kxk9 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13,gzip(gfe) Original-Xref: usenet.stanford.edu comp.lang.functional:69061 comp.lang.lisp:297069 gnu.emacs.help:183827 comp.lang.forth:160239 comp.lang.prolog:43990 X-Mailman-Approved-At: Sat, 01 Jan 2011 23:44:59 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78043 Archived-At: On Jan 1, 11:08=A0am, Nathan wrote: > If you want a easy to read self-documenting functional language, look > into Ruby. I know personally that Ruby syntax was a big turn off to me > for several weeks (kind of like Lisp) but once you learn it, it > becomes the easiest to read of any programming language I've ever > experimented with. No contest. > Well, Python was chosen over Ruby for MIT's rework of their intro to cs course because Python is multi-paradigm, whereas Ruby claims everything is an object. How would you code this simple list compression problem in Ruby: 1.08 (**) Eliminate consecutive duplicates of list elements. If a list contains repeated elements they should be replaced with a single copy of the element. The order of the elements should not be changed. Example: ?- compress([a,a,a,a,b,c,c,a,a,d,e,e,e,e],X). X =3D [a,b,c,a,d,e] > Matz himself admitted that =93...Ruby is a bad rip-off of Lisp... But it > is nicer to ordinary people.=94 yeah I guess the LOOP macro is where I got stuck in doing Lisp. > > Though every language I've worked in, I've never been half as > productive as when I'm coding in Ruby. I've done Perl at corporate level for 10 years and I've heard seasoned Perl developers say the same thing. > > In particular, cross platform GUI application > development seemed poor. yeah, wxPython is the only thing for any scripting languages that seemed to make very professional desktop UI programs. > > If you want to develop webpages, or bang out quick one time scripts, > Ruby is hard to beat. For use at home, console applications are > probably a tolerable price to pay for the incredible development speed > and fantastic ease of maintenance Ruby will give your code. yeah sinatra.rb looks nice for web dev and ruby on rails was a runaway hit for awhile. By the way, here's the Prolog solution to the compression problem I posted earlier: % http://sites.google.com/site/prologsite/prolog-problems/1 % Problem 1.08 - compress consecutive duplicates into a single % list element compress([], []). compress([X,Y], [X,Y]) :- X \=3D Y. compress([X,Y], [X]) :- X =3D Y. % problems writing other clauses (thanks RLa) compress([X,Y|Z], [X|Z1]) :- X \=3D Y, compress([Y|Z], Z1). compress([X,Y|Z], Z1) :- X =3D Y, compress([Y|Z], Z1).