1+1=1: an Optimizing Caml Compiler

Total Page:16

File Type:pdf, Size:1020Kb

1+1=1: an Optimizing Caml Compiler 1+1=1 : an optimizing Caml compiler Manuel Serrano, Pierre Weis To cite this version: Manuel Serrano, Pierre Weis. 1+1=1 : an optimizing Caml compiler. [Research Report] RR-2301, INRIA. 1994. inria-00074372 HAL Id: inria-00074372 https://hal.inria.fr/inria-00074372 Submitted on 24 May 2006 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. ¢¡¤£¦¥§ ¨¥ © ¥ ¡ ¥§ ¢¡ § ¡ ¡¤ !" ¥§ ¢#© $%¥& ¤©§¥ !" ¥§ ¢#© ' ( ' ) '+*-,&. /10+2§3¦4 3653¦.$7 89,&4 :<;=/>4 0?3¦:A@CB DFE§G%HJIKI¦LNMOQP RSEQTUHJV¢W X Y[Z"\"]_^ `baQVdc¨cdHJegfJhbhji k§lmonplqorrst uwvyxwz¦v{¢|¦}S~Jvy¦z K K u}}pu¨yK w§w¦yvyKyxy6v apport de recherche 1994 ISSN 0249-6399 ¢¡£ ¥¤ §¦©¨ ¨ ! " #$©%'& DFE¤G%HJI I LNMQOP§RSEQTUHJV¢W!( k*),+.-/)1023254 t6$7§08:9<;=8?>A@B2DCE+.8GF:H.;I4.JK=),+.-.)<02320L,FG+M4NLO-QP4NMIFR4'8G+.-/F:9<FG4N8 k*),+S<4NL,>"TA9<>,8:0=J=7)AFG>,L108 lO0K=KE+.),L"UB4')A49,V=4W)19,V=4MYXJt.Z/[=\]6$^.;IFR8G8G4NL'\_/_`a6$Z.[ Kb0c-.4N> d#egfWhjikblh/monp4§K=),4N>A4WMqL'0YMI4Nrs7§0c258b9t+.25KIFR8G4N)jJr§V=F:9,V5r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<FG4NMBLQ9<+=UB4.JB9<+.23Kb0)<0C=8G4*r§FGLAV LAV=4+.MI4K=),+=UB;b9<4U#CB@L,V=4§CE4N>AL r59<+/25K=FG8G4N)A>j~mO;=) M=4Wr9<+.23K=FG8R4W)JBQFG-.8G+B+bJ/FG>|)A4W4N8G@0j{.0FG8:0CI8R4 <N~ 3B ¡A¢Y£Ei.¤*fm7§0258xJ.I9AVI4N254.JjrQJb9t+.25KIFR8:0cLAFG+.MvJW|;IMb9<LAFG+/Mb08 8:0MI-.;b0c-.4N> ¥:¦D§ § ¨©xª« ¨g¬w­G©x®x¯<° ±A²'³<´µ.¶·:¸ ¹j¶xº»º³t´½¼¾¿´º»¿ ³c¸ ÀÁºAÂ<Ã=¿Á¶ººx¶N¸ Äa¶x¿ÁÅx¾ ¿´º»¿Á³¸ À}º ´.¼<´ÇWÈ"¼<µ.ÅBÀRÉËʼt´Ì Ì ¸ ¸ ¸ ×,ØÙÂxÚ·Á¶?·Á³<´.ÛÜ<Ý,³<ȧ·ÞG·¿ Ûtß½ÉÜ1àqÝ»· ¸ á<ÝN¸ âj¸ µj´¿Á㸠ɻ³<ºA¸ äI¸ ±,±AÆ ­Á¯jÍ}ÎÁÏÐxÎGÑ<Í ÐwÒ:Ó<ÔÕ ÔNÖ Õ Ó Õ © ¦y §å x,æA xAæ ¢¡ d >Q¦xw¦zAw x z K}pu yA"å "çvyz x uzjjQ¦xw¦zAwAxw z w èwéëêNìí zîjïcêtíjðpb1§¤£ ¡§ ?ñ Q<å 1ò#ód uAxwNô ¥ v æA A õ=óðjðaêtôQðjö'÷ð'íjí êjêøp¥"vwwxw y õwóðjðaêtôðöY÷jð'íð'ðjì ¡ ¥¤ §¦ " #$©¨'Q% & £¢*¨ p & ¨ ¡ ¡ ¡ ¤¦¥zf¨§ © ¥pm §+/;=>"K=)=P4N>A4WMqL,+.M=>a;=MM=+/;={.40c;o9<+/25K=FG8:0L,4N;=)§7§0258xJBH/;=Fw0P4NL=P4 +.C=L,4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MI>Q`bJ,+IJ0MbU 'UB4NL10cFG8qL,V=4§)A4W20FGMbUz4N)*+|bL,V=4"9<+.23K=FG8G4N)~Wnp49<+/Mb9<8G;bUB4§CB@0O>,V=+.),Lg9t+.25KE0)AFG>,+.M r§FGLAV),4N8:0LA4jU5r+.),0cMbU#bMb08G8G@ -.FG{.4'>A+/254OCb4NME9AVI20),B>~ ^ -/.
Recommended publications
  • Introduction to Programming in Lisp
    Introduction to Programming in Lisp Supplementary handout for 4th Year AI lectures · D W Murray · Hilary 1991 1 Background There are two widely used languages for AI, viz. Lisp and Prolog. The latter is the language for Logic Programming, but much of the remainder of the work is programmed in Lisp. Lisp is the general language for AI because it allows us to manipulate symbols and ideas in a commonsense manner. Lisp is an acronym for List Processing, a reference to the basic syntax of the language and aim of the language. The earliest list processing language was in fact IPL developed in the mid 1950’s by Simon, Newell and Shaw. Lisp itself was conceived by John McCarthy and students in the late 1950’s for use in the newly-named field of artificial intelligence. It caught on quickly in MIT’s AI Project, was implemented on the IBM 704 and by 1962 to spread through other AI groups. AI is still the largest application area for the language, but the removal of many of the flaws of early versions of the language have resulted in its gaining somewhat wider acceptance. One snag with Lisp is that although it started out as a very pure language based on mathematic logic, practical pressures mean that it has grown. There were many dialects which threaten the unity of the language, but recently there was a concerted effort to develop a more standard Lisp, viz. Common Lisp. Other Lisps you may hear of are FranzLisp, MacLisp, InterLisp, Cambridge Lisp, Le Lisp, ... Some good things about Lisp are: • Lisp is an early example of an interpreted language (though it can be compiled).
    [Show full text]
  • The Evolution of Lisp
    1 The Evolution of Lisp Guy L. Steele Jr. Richard P. Gabriel Thinking Machines Corporation Lucid, Inc. 245 First Street 707 Laurel Street Cambridge, Massachusetts 02142 Menlo Park, California 94025 Phone: (617) 234-2860 Phone: (415) 329-8400 FAX: (617) 243-4444 FAX: (415) 329-8480 E-mail: [email protected] E-mail: [email protected] Abstract Lisp is the world’s greatest programming language—or so its proponents think. The structure of Lisp makes it easy to extend the language or even to implement entirely new dialects without starting from scratch. Overall, the evolution of Lisp has been guided more by institutional rivalry, one-upsmanship, and the glee born of technical cleverness that is characteristic of the “hacker culture” than by sober assessments of technical requirements. Nevertheless this process has eventually produced both an industrial- strength programming language, messy but powerful, and a technically pure dialect, small but powerful, that is suitable for use by programming-language theoreticians. We pick up where McCarthy’s paper in the first HOPL conference left off. We trace the development chronologically from the era of the PDP-6, through the heyday of Interlisp and MacLisp, past the ascension and decline of special purpose Lisp machines, to the present era of standardization activities. We then examine the technical evolution of a few representative language features, including both some notable successes and some notable failures, that illuminate design issues that distinguish Lisp from other programming languages. We also discuss the use of Lisp as a laboratory for designing other programming languages. We conclude with some reflections on the forces that have driven the evolution of Lisp.
    [Show full text]
  • HOWTO Débuter Sous Emacs
    HOWTO D´ebuter sous Emacs Jeremy D. Zawodny, [email protected] v1.7, 14 Octobre 1999 Ce document est une aide aux d´ebutants sous l’´editeur Emacs. Il prend pour acquis la manipula- tion de vi ou d’un ´editeur similaire. La derni`ere version de ce document est aussi disponible sur http://www.wcnet.org/jzawodn/emacs/ Contents 1 Introduction 3 1.1 Copyright ............................................... 3 1.2 Public et Dessein .......................................... 3 1.3 Qu’est ce qu’Emacs? ........................................ 3 1.3.1 Portages et Versions ..................................... 4 1.3.2 Obtenir Emacs ........................................ 4 2 Ex´ecuter Emacs 4 2.1 Lancer & quitter Emacs ....................................... 4 2.1.1 Ce que vous allez voir .................................... 5 2.2 Quelques Terminologies ....................................... 5 2.2.1 Tampons & Fichiers ..................................... 6 2.2.2 Points & Regions ....................................... 6 2.2.3 Fenˆetres ........................................... 6 2.2.4 Frames ............................................ 6 2.3 Les commandes de bases au clavier ................................. 7 2.3.1 Les touches de commandes(Meta, Esc, Control, and Alt) ................ 7 2.3.2 Se d´eplacer dans un Buffer ................................. 7 2.3.3 Commandes Principales q .................................. 8 2.3.4 La Compl´etionpar la touche Tab ............................. 9 2.4 Tutorials, Aides, & Informations .................................
    [Show full text]
  • LISP in Max: Exploratory Computer-Aided Composition in Real-Time
    LISP in Max: Exploratory Computer-Aided Composition in Real-Time Julien Vincenot Composer, PhD candidate Harvard University [email protected] ABSTRACT The author describes a strategy to implement Common Lisp applications for computer-aided composition within Max, to enrich the possibilities offered by the bach library. In parallel, a broader discussion is opened on the current state of the discipline, and some applications are presented. 1. 1. INTRODUCTION Computer-aided composition (CAC), as we know it, has been around for decades. Following the pioneers of algo- rithmic music, the emergence of the first relevant graphi- cal interfaces allowed the discipline to expand in several directions. CAC exists today under a variety of forms, languages and tools available to composers. This tendency has crystallized around visual program- ming environments such as OpenMusic (OM) and PWGL, both derived from the program PatchWork (or PW) developed by Mikael Laurson since the late 1980s [5]. A Figure 1. A Score object in PWGL and specificity of this family of programs, but also many its inner representation as a Lisp linked-list or tree. others since then1, is that they were all built on top of the same language: Common Lisp2. dedicated to traditional notation, concern a small popula- Since the early days of artificial intelligence, Lisp has tion of musicians. always been considered a special language, and its Nevertheless, we can observe today a real interest in popularity is quite uneven among professional program- renewing those paradigms. The discipline of CAC is mers. However, the interest among musicians never com- going through a phase of transition, with the emergence pletely declined.
    [Show full text]
  • Manual De Lisp
    Dpto. de Algebra,´ Computaci´on,Geometr´ıay Topolog´ıa Universidad de Sevilla Manual de Lisp Jos´eA. Alonso Jim´enez ([email protected]) Sevilla, 1991 Contenido 1 Introducci´on 1 1.1 Introducci´on. 1 1.2 Los objetos b´asicos . 1 1.2.1 Los ´atomos . 2 1.2.2 Las listas . 2 1.3 Funcionamiento b´asicodel int´erprete . 2 1.3.1 Evaluaci´onde los ´atomos. 2 1.3.2 Evaluaci´onde las listas . 3 2 Definici´onde funciones 4 2.1 Funciones an´onimas. 4 2.2 Funciones con nombres . 4 3 Predicados 5 3.1 Valores l´ogicos. 5 3.2 Predicados de tipos . 5 3.3 Predicados de igualdad . 6 3.4 Operadores l´ogicos . 7 4 Estructuras de control 8 4.1 Constantes y variables . 8 4.1.1 Referencias . 8 4.1.2 Asignaciones . 8 4.2 Invocaci´onde funciones . 9 4.3 Funciones de evaluaci´on . 9 4.4 Variables locales . 10 4.5 Condicionales . 10 4.6 Iteraci´on. 12 4.6.1 Iteraci´onindefinida . 12 4.6.2 Iteraci´ongeneral . 13 4.6.3 Iteraciones particulares . 14 4.6.4 Funciones de aplicaci´on. 15 4.6.5 Iteraciones del tipo PROG . 16 5 N´umeros 18 5.1 Operaciones num´ericas . 18 5.2 Comparaciones num´ericas . 20 5.3 Las funciones trigonom´etricasy matem´aticas. 21 ii 6 Listas 23 6.1 Las funciones de b´usquedaen las listas . 23 6.2 Las funciones de construcci´onde listas . 25 6.3 Las funciones de modificaci´onf´ısica .
    [Show full text]
  • Robot Programming with Lisp 2
    Artificial Intelligence Robot Programming with Lisp 2. Imperative Programming Gayane Kazhoyan Institute for Artificial Intelligence University of Bremen 25th October, 2018 (LISP $ Lots of Irritating Superfluous Parenthesis) Copyright: XKCD Artificial Intelligence Lisp the Language LISP $ LISt Processing language Theory Assignment Gayane Kazhoyan Robot Programming with Lisp 25th October, 2018 2 Artificial Intelligence Lisp the Language LISP $ LISt Processing language (LISP $ Lots of Irritating Superfluous Parenthesis) Copyright: XKCD Theory Assignment Gayane Kazhoyan Robot Programming with Lisp 25th October, 2018 3 • Garbage collection: first language to have an automated GC • Functions as first-class citizens (e.g. callbacks) • Anonymous functions • Side-effects are allowed, not purely functional as, e.g., Haskell • Run-time code generation • Easily-expandable through the powerful macros mechanism Artificial Intelligence Technical Characteristics • Dynamic typing: specifying the type of a variable is optional Theory Assignment Gayane Kazhoyan Robot Programming with Lisp 25th October, 2018 4 • Functions as first-class citizens (e.g. callbacks) • Anonymous functions • Side-effects are allowed, not purely functional as, e.g., Haskell • Run-time code generation • Easily-expandable through the powerful macros mechanism Artificial Intelligence Technical Characteristics • Dynamic typing: specifying the type of a variable is optional • Garbage collection: first language to have an automated GC Theory Assignment Gayane Kazhoyan Robot Programming with Lisp 25th October, 2018 5 • Anonymous functions • Side-effects are allowed, not purely functional as, e.g., Haskell • Run-time code generation • Easily-expandable through the powerful macros mechanism Artificial Intelligence Technical Characteristics • Dynamic typing: specifying the type of a variable is optional • Garbage collection: first language to have an automated GC • Functions as first-class citizens (e.g.
    [Show full text]
  • Programmation Fonctionnelle Et Symbolique
    Programmation Fonctionnelle et Symbolique Charg´ee de cours : Ir`ene Durand Charg´es de TD : Ir`ene Durand (A1, A2), Kaninda Musumbu (A1, A4), Damien Clergeaud (A3) Cours 14 s´eances de 1h20 : d´ebut semaine 36 TD 24 s´eances de 1h20 d´ebut semaine 37 1 Devoir surveill´ede 1h30 semaine 42 (9h-10h30) 1 mini Projet semaines 45-50 Travail individuel 4h par semaine http://dept-info.labri.fr/~idurand/Enseignement/PFS 1 Objectifs Maˆıtriser un certain nombre de m´ethodes et tech- niques de programmation — symbolique, fonctionnelle — imp´erative, objet, macros dans le but de Ecrire´ des applications — maintenables, r´eutilisables, — lisibles, modulaires, — g´en´erales, ´el´egantes. Aspects de la programmation non enseign´es : — Efficacit´eextrˆeme — Temps r´eel — Applications particuli`eres (jeu, image, num´erique, ...) 2 Contenu Langage support Langage Common Lisp — SBCL: Steele Bank Common Lisp http://www.sbcl. org/ Support de cours — Robert Strandh et Ir`ene Durand : Trait´ede programmation en Common Lisp — Transparents Pourquoi Common Lisp ? — Langage tr`es riche (fonctionnel, symbolique, ob- jet, imp´eratif) — Syntaxe simple et uniforme — S´emantique simple et uniforme — Langage programmable (macros, reader macros) — Repr´esentation de programmes sous la forme de donn´ees 3 — Normalis´epar ANSI (1994) — Programmation par objets plus puissante qu’avec d’autres langages Bibliographie Peter Seibel Practical Common Lisp Apress Paul Graham : ANSI Common Lisp Prentice Hall Paul Graham : On Lisp Advanced Techniques for Common Lisp Prentice Hall
    [Show full text]
  • Projet De Programmation 3
    Projet de Programmation 3 Cours : Ir`ene Durand TD : Ir`ene Durand, Richard Moussa, Kaninda Musumbu (2 groupes) Semaines Cours mercredi 9h30-10h50, 2-7 9-10 Amphi A29 TD 12 s´eances de 1h20 5-7 9 10 12 1 Devoir surveill´emercredi 9h30-11h 11 Amphi A29 1 Projet surveill´e 9 `a13 Le devoir surveill´eET le projet surveill´esont obligatoires. Support de cours : transparents et exemples disponibles sur page Web http://dept-info.labri.u-bordeaux.fr/~idurand/enseignement/PP3/ 1 Bibliographie Peter Seibel Practical Common Lisp Apress Paul Graham : ANSI Common Lisp Prentice Hall Paul Graham : On Lisp Advanced Techniques for Common Lisp Prentice Hall Robert Strandh et Ir`ene Durand Trait´ede programmation en Common Lisp M´etaModulaire Sonya Keene : Object-Oriented Programming in Common Lisp A programmer’s guide to CLOS Addison Wesley Peter Norvig : Paradigms of Artificial Intelligence Programming Case Studies in Common Lisp Morgan Kaufmann 2 Autres documents The HyperSpec (la norme ANSI compl`ete de Common Lisp, en HTML) http://www.lispworks.com/documentation/HyperSpec/Front/index.htm SBCL User Manual CLX reference manual (Common Lisp X Interface) Common Lisp Interface Manager (CLIM) http://bauhh.dyndns.org:8000/clim-spec/index.html Guy Steele : Common Lisp, the Language, second edition Digital Press, (disponible sur WWW en HTML) David Lamkins : Successful Lisp (Tutorial en-ligne) 3 Objectifs et contenu Passage `al’´echelle – Appr´ehender les probl`emes relatifs `ala r´ealisation d’un vrai projet – Installation et utilisation de biblioth`eques existantes – Biblioth`eque graphique (mcclim) – Cr´eation de biblioth`eques r´eutilisables – Modularit´e, API (Application Programming Interface) ou Interface de Programmation – Utilisation de la Programmation Objet – Entr´ees/Sorties (flots, acc`es au syst`eme de fichiers) – Gestion des exceptions 4 Paquetages (Packages) Supposons qu’on veuille utiliser un syst`eme (une biblioth`eque) (la biblioth`eque graphique McCLIM par exemple).
    [Show full text]
  • Introduction À La Programmation En Common Lisp
    Introduction à la programmation en Common Lisp Francis Leboutte Le 26 novembre 2002 Mise à jour mineure : le 1er février 2004 www.algo.be IDDN.BE.010.0093308.000.R.C.2001.035.42000 Table des matières 1. INTRODUCTION................................................................................................................3 2. ORDINATEUR ET LANGAGE DE PROGRAMMATION ...........................................3 3. PREMIER CONTACT, PREMIER PROGRAMME.......................................................4 3.1. ABSTRACTION PROCEDURALE .........................................................................................5 3.2. ACTIVITES ET EXERCICES ................................................................................................6 4. CONCEPTS DE BASE ........................................................................................................7 4.1. EXPRESSION LISP ............................................................................................................7 4.2. LA BOUCLE D'INTERACTION LECTURE-EVALUATION-ECRITURE.......................................8 4.3. L'EVALUATION D'UN APPEL DE FONCTION LISP................................................................9 4.3.1. L'évaluation d'un atome .........................................................................................9 4.3.2. L'évaluation d'un appel de fonction .......................................................................9 4.3.3. Règle de l'évaluation d'un appel de fonction........................................................10
    [Show full text]
  • Méthode D'indexation Qualitative: Application À Un Plan De Veille Relatif Aux Thérapies Émergentes Contre La Maladie D
    Méthode d’indexation qualitative : application à un plan de veille relatif aux thérapies émergentes contre la maladie d’Alzheimer Nathalie Vaugeois-Sellier To cite this version: Nathalie Vaugeois-Sellier. Méthode d’indexation qualitative : application à un plan de veille relatif aux thérapies émergentes contre la maladie d’Alzheimer. Sciences de l’information et de la communication. Université Paris-Est, 2009. Français. NNT : 2009PEST1036. tel-00534003 HAL Id: tel-00534003 https://tel.archives-ouvertes.fr/tel-00534003 Submitted on 8 Nov 2010 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. École Doctorale Information Communication Modélisation et Simulation (ED ICMS n° 431) Thèse de doctorat En Sciences de l’Information et de la Communication Nathalie VAUGEOIS SELLIER Méthode d’indexation qualitative Application à un plan de veille relatif aux thérapies émergentes contre la maladie d’Alzheimer Thèse dirigée par Serge CACALY Soutenue le 3 décembre 2009 Jury : Serge CACALY, Maître de Conférences HDR Université Paris-Est Marne La Vallée Jacky KISTER, Directeur de Recherche CNRS Université Aix-Marseille 3 Henri DOU, Professeur Emérite Université Aix-Marseille 3 Amos DAVID, Professeur Université Nancy 2 Renaud EPPSTEIN, Maître de Conférences Université Paris-Est Marne La Vallée Christian KRUMEICH, Directeur Scientifique société MAAG RESUME Dans le contexte de recherche et développement d’un nouveau traitement thérapeutique, le chercheur veut surveiller ses thématiques de recherche pour actualiser ses connaissances.
    [Show full text]
  • Curso De Lisp Con Golden Common Lisp
    Curso de Lisp con Golden Common Lisp Jos´eA. Alonso Dpto. de Algebra,´ Computaci´on,Geometr´ıay Topolog´ıa Universidad de Sevilla Sevilla, 1990 Contenido 1 El c´alculoaritm´etico 1 1.1 Los n´umerosy sus operaciones . 1 1.2 Nombrar los objetos de c´alculo. 4 1.3 Definici´onde nuevas funciones . 6 1.4 Variables globales y locales . 8 2 El c´alculosimb´olico 9 2.1 La funci´onQUOTE sobre s´ımbolos . 9 2.2 Las expresiones en Lisp . 10 2.3 La funci´onQUOTE sobre listas . 11 2.4 Funciones de b´usquedaen listas . 11 2.5 Funciones de construcci´onde listas . 16 2.6 Funciones de modificaci´onf´ısicade listas . 18 3 El control 19 3.1 Los valores l´ogicos . 19 3.2 Funciones de comparaci´onde n´umeros . 19 3.3 Funciones de comparaci´onde s´ımbolos y listas . 20 3.4 Condicionales . 22 3.4.1 La funci´onIF . 22 3.4.2 La funci´onCOND . 23 3.4.3 Las funciones AND y OR . 26 3.4.4 Las funciones WHEN y UNLESS . 27 4 La programaci´onrecursiva 28 4.1 Funciones recursivas . 28 4.2 Las funciones TRACE y UNTRACE . 29 4.3 Aritm´eticaentera positiva . 29 4.4 La aritm´eticaordinaria del lisp . 35 4.5 Simulaci´onde primitivas sobre listas . 36 4.6 Definici´onde funciones sobre listas . 39 i 4.7 Funciones sobre ´arboles . 43 4.8 Funciones sobre conjuntos . 44 5 La iteraci´onen Lisp 47 5.1 El grupo PROG, GO, RETURN . 47 5.2 Las funciones DO y DO* .
    [Show full text]
  • Lisp: Good News, Bad News, How to Win Big
    Lisp: Good News, Bad News, How to Win Big Richard P. Gabriel Lucid, Inc Abstract Lisp has done quite well over the last ten years: becoming nearly standardized, forming the basis of a commercial sector, achieving excellent performance, having good environments, able to deliver appli- cations. Yet the Lisp community has failed to do as well as it could have. In this paper I look at the successes, the failures, and what to do next. The Lisp world is in great shape: Ten years ago there was no standard Lisp; the most standard Lisp was InterLisp, which ran on PDP-10’s and Xerox Lisp machines (some said it ran on Vaxes, but I think they exaggerated); the second most standard Lisp was MacLisp, which ran only on PDP-10’s, but under the three most popular operating systems for that machine; the third most standard Lisp was Portable Standard Lisp, which ran on many machines, but very few people wanted to use it; the fourth most standard Lisp was Zetalisp, which ran on two varieties of Lisp machine; and the fifth most standard Lisp was Scheme, which ran on a few different kinds of machine, but very few people wanted to use it. By today’s standards, each of these had poor or just barely acceptable performance, nonexistent or just barely satisfactory environments, nonexistent or poor integration with other lan- guages and software, poor portability, poor acceptance, and poor commercial prospects. Today there is Common Lisp (CL), which runs on all major machines, all major operating systems, and virtually in every country.
    [Show full text]