From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: About Emacs Modernisation Project Date: Tue, 01 Jun 2010 14:56:35 +0200 Organization: Informatimago Message-ID: References: <143c6d28-4423-4e43-9fc5-c0fb3340043b@c11g2000vbe.googlegroups.com> <0e994fe3-6dde-449f-879d-6701c7a195a9@e28g2000vbd.googlegroups.com> <8639x7x3jj.fsf@gmail.com> <87iq63wsvt.fsf@kuiper.lan.informatimago.com> <49573280-66a9-40a8-b556-be598a559cdc@l6g2000vbo.googlegroups.com> <87pr0buopy.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291825659 11948 80.91.229.12 (8 Dec 2010 16:27:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 16:27:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 17:27:32 2010 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 1PQMrb-0006Ds-LZ for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 17:27:31 +0100 Original-Received: from localhost ([127.0.0.1]:53629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQMrb-0005Gp-1v for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 11:27:31 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 55 Original-X-Trace: individual.net vjatpr/3nxh8dlX6DT2xuAKs0D9sl1Lq7UciBaXtiEJx9BJIBL Cancel-Lock: sha1:YjU0ODJjNjFlMTI5ZTk4NDEzYjNkY2Q1NmY2MTY5ODVjYjI4MWFmZQ== sha1:YNjn/JIJeirUfP6vXJYc5Ug7Ecg= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/23.1 (darwin) Original-Xref: usenet.stanford.edu gnu.emacs.help:178523 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:75606 Archived-At: LanX writes: > Hi > >> Do you realize that lisp is actually a very small core language? >> (eval fits on a single page). > > I think that I made quite clear that I want this c/js/perl-style > representation (lets call it PSILe) to be transformed to eLISP > _before_ compilation. > > Macros will still work on the plain eLISP representation. > > (of course defining macros for PLISe wouldn't be easy feasible, but > normal users won't miss macros...) > > The tricky part would be to find a representation that works without > ambiguities in both directions, such that old lisp code could be used > as a base for this "new" coding. > > I don't know if it's really feasible but it's for sure an interesting > task. > > PLISe <-> eLISP -> Macro expansion -> compilation -> execution It is effectively entirely feasible. See for example parenscript (and jwacs) in CL. http://common-lisp.net/project/parenscript/ (or Liskell for another example, but there are a lot of them). Parenscript is a set of functions and macros that allows you to write javascript code as lisp sexps. The point of course is to allow lispers (emacs users) to be able to write barbaric languages (languages with barbaric syntaxes), on one hand, and to be able to define macros for these barbaric languages on the other hand (the macros written in lisp would transform parenscript forms into parenscript forms, before being translated to Javascript). (jwacs does the reverse transformation, parsing Javascript and producing lisp objects; I used it once to revert to the parenscript form so that I could go between both syntaxes). This covers the first <-> arrow. Now to compile parenscript to Common Lisp, you would still need to implement a run-time library of javascript semantics in lisp (eg. the object system is quite different, the data types, etc). In general, the core languages are easy to translate to Lisp, since they're often much less sophisticated than Lisp. -- __Pascal Bourguignon__ http://www.informatimago.com