Memory Pool System Documentation Release 1.111.0

Total Page:16

File Type:pdf, Size:1020Kb

Memory Pool System Documentation Release 1.111.0 Memory Pool System Documentation Release 1.111.0 Ravenbrook Limited May 23, 2013 CONTENTS i ii CHAPTER ONE GUIDE 1.1 Overview of the Memory Pool System The Memory Pool System is a very general, adaptable, flexible, reliable, and efficient memory management system. It permits the flexible combination of memory management techniques, supporting manual and automatic memory management, inline allocation, finalization, weakness, and multiple concurrent co-operating incremental generational garbage collections. It also includes a library of memory pool classes implementing specialized memory management policies. The MPS has been in development since 1994 and deployed in successful commercial products since 1997. Bugs are almost unknown in production. It is under continuous development and support by Ravenbrook. The MPS is distributed under an open source license. The license is designed to make it possible for you to use the MPS in your own projects, provided that you either don’t distribute your product, or your product is open source too. If the licensing terms aren’t suitable for you (for example, you’re developing a closed-source commercial product or a compiler run-time system) you can easily license the MPS under different terms from Ravenbrook by arrangement. Please contact us at [email protected] for details. 1.1.1 Supported target platforms The MPS is currently supported for deployment on: • Windows XP or later on IA-32 and x86-64, using Microsoft Visual C/C++; • Linux (Ubuntu 11 and RHEL 6.3 known good, otherwise YMMV) on IA-32 and x86-64, using GCC; • FreeBSD 7 or later, on IA-32 and x86-64, using GCC; • OS X 10.4 or later, on IA-32 and x86-64 (single threaded only), using Clang/LLVM. The MPS will not work in a multi-threaded 32-bit application on 64-bit Windows 7. This is due to a serious fault in Microsoft’s WOW64 emulator that we are powerless to correct. It is due to be fixed in Windows 8. See WOW64 bug: GetThreadContext() may return stale contents. The MPS is highly portable and has run on many other processors and operating systems in the past (see Building the Memory Pool System). Most of the MPS is written in very pure ANSI C and compiles without warnings on anything. 1.1.2 Technical introduction The figure below gives a simplified picture of a program’s memory from the point of view of the Memory Pool System. 1 Memory Pool System Documentation, Release 1.111.0 Figure 1.1: Overview of the Memory Pool System. The arena is the top-level data structure in the MPS. An arena is responsible for requesting memory(3) from the operating system (and returning it), for making memory available to pools, and for garbage collection. Multiple arenas are supported, but it’s usually best to have only one arena in your program, because the MPS can’t collect cyclic structures that span multiple arenas. See Arenas. The MPS is designed to co-operate with other memory managers (for example malloc and free(2) in C, or operators new and delete in C++), so you need not move all your memory management to the MPS at once, and you can co-operate with libraries that use other allocation mechanisms. Within the arena you create one or more pools.A pool is responsible for requesting memory from the arena and making it available to your program. See Pools. Pools belong to pool classes that specify policies for how their memory is managed. Some pools are manually managed (you must explicitly return memory to the pool, for example by calling mps_free()) and others are automatically managed (the garbage collector reclaims unreachable blocks). See Pool reference. Formatted pools need you to tell them how to scan for references to allocated blocks. See Scanning. The arena needs you to tell it how to find your roots: references to allocated blocks that are stored in static data, in memory not managed by the MPS, or on your program’s registers or control stack. See Roots. The MPS is designed to work with multi-threaded programs. Functions in the C interface are thread safe, except in a few documented cases. See Threads. The allocation point protocol provides fast lock-free allocation on multiple threads simultaneously. See Allocation. The garbage collector is incremental: it proceeds in small steps interleaved with the execution of your program, so there are no long waits. See Garbage collection. 1.1.3 What next? For a much more detailed technical overview of the MPS, see Brooksby (2002). If you’re going to try it out, see Building the Memory Pool System. If you have a program in need of memory management, then you’ll want to learn how to integrate it with the Memory Pool System. See Garbage collecting a language with the Memory Pool System. If you want to know more technical details, they appear in the Reference. 1.2 Building the Memory Pool System 1.2.1 Introduction This document describes the various ways in which you can build the MPS, its libraries, and the tests and tools that come with it. You may be building the MPS for a number of different purposes. 1.2.2 Getting hold of the MPS Kit Download the latest MPS Kit release from http://www.ravenbrook.com/project/mps/release/. 2 Chapter 1. Guide Memory Pool System Documentation, Release 1.111.0 1.2.3 Compiling the MPS for your project It is easy to compile the MPS. You can do it separately, or include the source in your own project’s build system. This section describes compilation in terms of command lines, but you can equally add the files to a project in an IDE. The MPS also comes with Makefiles and IDE project files for building libraries, tools, and tests. See “Building the MPS for development”. Compiling for production In the simplest case, you can compile the MPS to an object file with just: cc-c mps.c (Unix/Mac OS X) cl/c mps.c (Windows) This will build a “hot” variety (for production) object file for use with mps.h. You can greatly improve performance by allowing global optimization, for example: cc-O2-c mps.c (Unix/Mac OS X) cl/O2/c mps.c (Windows) Compiling for debugging You can get a “cool” variety MPS (with more internal checking, for debugging and development) with: cc-g-DCONFIG_VAR_COOL-c mps.c (Unix/Mac OS X) cl/Zi/DCONFIG_VAR_COOL/c mps.c (Windows) Optimizing for your object format If you are using your own object format, you will also get improved performance by allowing the compiler to do global optimizations between it and the MPS. So if your format implementation is in, say, myformat.c, then you could make a file mymps.c containing: #include "mps.c" #include "myformat.c" then: cc-O2-c mymps.c (Unix/Mac OS X) cl/O2/c mymps.c (Windows) This will get your format code inlined with the MPS garbage collector. Compiling without the C library If you’re building the MPS for an environment without the standard C library, you can exclude the plinth component of the MPS with: cc-DCONFIG_PLINTH_NONE-c mps.c cl/Gs/DCONFIG_PLINTH_NONE/c mps.c 1.2. Building the Memory Pool System 3 Memory Pool System Documentation, Release 1.111.0 but you must then provide your own implementation of mpslib.h. You can base this on the ANSI plinth in mpsliban.c. If you want to do anything beyond these simple cases, use the MPS build as described in the section “Building the MPS for development” below. 1.2.4 Building the MPS for development If you’re making modifications to the MPS itself, want to build MPS libraries for linking, or want to build MPS tests and tools, you should use the MPS build. This uses makefiles or Xcode projects. [Coming soon, Microsoft Visual Studio solutions.] Prerequisites For Unix-like platforms you will need the GNU Make tool. Some platforms (such as Linux) have GNU Make as their default make tool. For others you will need to get and install it. (It’s available free from ftp://ftp.gnu.org/gnu/make/.) On FreeBSD this can be done as root with pkg_add -r gmake. On Windows platforms the NMAKE tool is used. This comes with Microsoft Visual Studio C++ or the Microsoft Windows SDK. On Mac OS X the MPS is built using Xcode, either by opening mps.xcodeproj with the Xcode app, or using the command-line “xcodebuild” tool, installed from Xcode ! Preferences ! Downloads ! Components ! Command Line Tools. Platforms The MPS uses a six-character platform code to express a combination of operating system, CPU architecture, and compiler toolchain. Each six-character code breaks down into three pairs of characters, like this: OSARCT Where OS denotes the operating system, AR the CPU architecture, and CT the compiler toolchain. Here are the platforms that we have regular access to and on which the MPS works well: Platform OS Architecture Compiler Makefile fri3gc FreeBSD IA-32 GCC fri3gc.gmk fri6gc FreeBSD x86_64 GCC fri6gc.gmk lii3gc Linux IA-32 GCC lii3gc.gmk lii6gc Linux x86_64 GCC lii6gc.gmk xci3ll Mac OS X IA-32 Clang mps.xcodeproj xci6ll Mac OS X x86_64 Clang mps.xcodeproj xci3gc Mac OS X IA-32 GCC (legacy) xci3gc.gmk w3i3mv Windows IA-32 Microsoft C w3i3mv.nmk w3i6mv Windows x86_64 Microsoft C w3i6mv.nmk Historically, the MPS worked on a much wider variety of platforms, and still could: IRIX, OSF/1 (Tru64), Solaris, SunOS, Classic Mac OS; MIPS, PowerPC, ALPHA, SPARC v8, SPARC v9; Metrowerks Codewarrior, SunPro C, Digital C, EGCS.
Recommended publications
  • Lisp Tutorial
    Gene Kim 9/9/2016 CSC 2/444 Lisp Tutorial About this Document This document was written to accompany an in-person Lisp tutorial. Therefore, the information on this document alone is not likely to be sufficient to get a good understanding of Lisp. However, the functions and operators that are listed here are a good starting point, so you may look up specifications and examples of usage for those functions in the Common Lisp HyperSpec (CLHS) to get an understanding of their usage. Getting Started Note on Common Lisp Implementations I will use Allegro Common Lisp since it is what is used by Len (and my research). However, for the purposes of this class we won’t be using many (if any) features that are specific to common lisp implementations so you may use any of the common lisp implementations available in the URCS servers. If you are using any libraries that are implementation-specific for assignments in this class, I would strongly urge you to rethink your approach if possible. If we (the TAs) deem any of these features to be solving to much of the assigned problem, you will not receive full credit for the assignment. To see if a function is in the Common Lisp specifications see the Common Lisp HyperSpec (CLHS). Simply google the function followed by “clhs” to see if an entry shows up. Available Common Lisp implementations (as far as I know): - Allegro Common Lisp (acl or alisp will start an Allegro REPL) - CMU Common Lisp (cmucl or lisp will start a CMUCL REPL) - Steel Bank Common Lisp (sbcl will start an SBCL REPL) IDE/Editor It is not important for this class to have an extensive IDE since we will be working on small coding projects.
    [Show full text]
  • Common Lisp - Viel Mehr Als Nur D¨Amliche Klammern
    Einf¨uhrung Geschichtliches Die Programmiersprache Abschluß Common Lisp - viel mehr als nur d¨amliche Klammern Alexander Schreiber <[email protected]> http://www.thangorodrim.de Chemnitzer Linux-Tage 2005 Greenspun’s Tenth Rule of Programming: “Any sufficiently-complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp.” Alexander Schreiber <[email protected]> Common Lisp - viel mehr als nur d¨amliche Klammern 1 / 30 Einf¨uhrung Geschichtliches Die Programmiersprache Abschluß Ubersicht¨ 1 Einf¨uhrung 2 Geschichtliches 3 Die Programmiersprache 4 Abschluß Alexander Schreiber <[email protected]> Common Lisp - viel mehr als nur d¨amliche Klammern 2 / 30 Einf¨uhrung Geschichtliches Die Programmiersprache Abschluß Lisp? Wof¨ur? NASA: Remote Agent (Deep Space 1), Planner (Mars Pathfinder), Viaweb, gekauft von Yahoo f¨ur50 Millionen $, ITA Software: Orbitz engine (Flugticket Planung), Square USA: Production tracking f¨ur“Final Fantasy”, Naughty Dog Software: Crash Bandicoot auf Sony Playstation, AMD & AMI: Chip-Design & Verifizierung, typischerweise komplexe Probleme: Wissensverarbeitung, Expertensysteme, Planungssysteme Alexander Schreiber <[email protected]> Common Lisp - viel mehr als nur d¨amliche Klammern 3 / 30 Einf¨uhrung Geschichtliches Die Programmiersprache Abschluß Lisp? Wof¨ur? NASA: Remote Agent (Deep Space 1), Planner (Mars Pathfinder), Viaweb, gekauft von Yahoo f¨ur50 Millionen $, ITA Software: Orbitz engine (Flugticket Planung), Square USA: Production tracking
    [Show full text]
  • Advanced Use of Lisp's FORMAT Function
    Advanced Use of Lisp’s FORMAT Function Gene Michael Stover created 22 January 2004 updated Saturday, 30 October 2004 Copyright c 2004 Gene Michael Stover. All rights reserved. Permission to copy, store, & view this document unmodified & in its entirety is granted. Contents 1 Introduction 1 2 Wanted & To Do 2 3 How to Print a Row 2 4 How to Print a Table 3 5 How to Use Format for Word Wrap 4 6 How to Print a Comma-Separated List 6 7 HowtoUseCommasinEnglishStyle 7 8 Conclusion 7 A Change Log 8 B Other File Formats 8 1 Introduction Lisp’s format function is analogous to C’s printf function, but format can do a whole lot more. format can iterate, use conditionals, process nested format strings, & recurse into format strings embedded into its arguments. The more-or-less official documentation for format is at the Common Lisp Hyperspec[X3J]. There is a complete if terse description of it in Paul Graham’s ANSI Common Lisp[Gra96], but my favorite description of format is in Franz’s Common Lisp The Reference[Inc88]. 1 Knowing the details of how something works isn’t the same as knowing how to use it well. Good applications of format aren’t obvious from its documentation. Thus this article. 2 Wanted & To Do Read the original article about format[Wat89]. Possibly incorporate ideas from it, or refer to them. Definitely refer to it in this article so people know it exists. (I didn’t know it existed at all even though I searched the web for such articles before I wrote this one.
    [Show full text]
  • Objektové Programování Poznámky K Přednášce
    Objektové programování Poznámky k přednášce Michal Krupka 18. prosince 2016 1 Obsah 1 Od Scheme k Lispu 7 1.1 Základní rozdíly mezi Schemem a Common Lispem . 8 1.2 Common Lisp: základní výbava . 14 2 Objekty a třídy 37 2.1 Základní pojmy ........................... 37 2.2 Třídy a instance v Common Lispu . 40 2.3 Inicializace slotů nových instancí . 49 ÚLOHY ................................... 52 3 Zapouzdření a polymorfismus 55 3.1 Princip zapouzdření ........................ 55 3.2 Úprava tříd point a circle ................... 61 3.3 Třída picture ........................... 64 3.4 Vlastnosti ............................... 67 3.5 Kreslení pomocí knihovny micro-graphics . 68 3.6 Kreslení grafických objektů .................... 72 3.7 Princip polymorfismu ....................... 81 3.8 Polygony ............................... 83 3.9 Geometrické transformace ..................... 87 ÚLOHY ................................... 89 4 Dědičnost 91 4.1 Princip dědičnosti a pravidlo is-a . 91 4.2 Určení předka v definici třídy ................... 98 4.3 Poznámka o běžných jazycích . 102 4.4 Přepisování metod . 102 4.5 Volání zděděné metody . 104 4.6 Inicializace instancí . 110 3 4 OBSAH 4.7 Návrh stromu dědičnosti . 111 ÚLOHY ................................... 112 5 Zpětná volání 115 5.1 Zpětná volání v knihovně micro-graphics . 115 5.2 Překreslování oken po vnější změně . 117 5.3 Překreslení při změně okna . 118 5.4 Překreslování při změnách objektů . 120 ÚLOHY ................................... 124 6 Klikání a jiné události 127 6.1 Jednoduché obsloužení vstupu z myši . 127 6.2 Zpravení grafického objektu o kliknutí . 129 6.3 Princip vlastnění, delegování, události . 133 6.4 Události ev-changing a ev-change . 136 6.5 Reakce na kliknutí: událost ev-mouse-down . 140 ÚLOHY ..................................
    [Show full text]
  • Clarification Proposal for CLHS Section 22.3 Version 1.1
    Clarification Proposal for CLHS Section 22.3 Version 1.1 Didier Verna <[email protected]> Copyright c 2011 Didier Verna Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the section entitled \Copy- ing" is included exactly as in the original. Permission is granted to copy and distribute translations of this manual into an- other language, under the above conditions for modified versions, except that this permission notice may be translated as well. Copying 1 Copying This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. This work has the LPPL maintenance status `maintained'. The Current Maintainer of this work is Didier Verna. Chapter 1: Motivation 2 1 Motivation Section 22.3 \Formatted Output" of the Common Lisp Hyperspec describes the syntax and semantics of format directives. We believe that the standard is underspecified in two related areas. 1.1 Trailing Commas The standard describes the syntax of directive parameters as follows. A directive consists of a tilde, optional prefix parameters separated by commas, [...]. ¨ It also gives the following example.
    [Show full text]
  • Automating Iterative Tasks with Programming by Demonstration
    http://waikato.researchgateway.ac.nz/ Research Commons at the University of Waikato Copyright Statement: The digital copy of this thesis is protected by the Copyright Act 1994 (New Zealand). The thesis may be consulted by you, provided you comply with the provisions of the Act and the following conditions of use: Any use you make of these documents or images must be for research or private study purposes only, and you may not make them available to any other person. Authors control the copyright of their thesis. You will recognise the author’s right to be identified as the author of the thesis, and due acknowledgement will be made to the author where appropriate. You will obtain the author’s permission before publishing any material from the thesis. Department of Computer Science Hamilton, New Zealand Automating iterative tasks with programming by demonstration Gordon W. Paynter This thesis is submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy at The University of Waikato. February 26, 2000 © 2000 Gordon W. Paynter Abstract iii Abstract Programming by demonstration is an end-user programming technique that allows people to create programs by showing the computer examples of what they want to do. Users do not need specialised programming skills. Instead, they instruct the computer by demonstrating examples, much as they might show another person how to do the task. Programming by demonstration empowers users to create programs that perform tedious and time-consuming computer chores. However, it is not in widespread use, and is instead confined to research applications that end users never see.
    [Show full text]
  • Common Lisp Reference Manual the Common Lisp Reference Manual Copyright C 2006 Robert Strandh
    Common Lisp Reference Manual The Common Lisp Reference Manual Copyright c 2006 Robert Strandh. i Table of Contents 1 Introduction............................... 1 2 Terminology and conventions ............... 2 2.1 Introduction ................................................ 2 2.2 General..................................................... 2 3 Numbers .................................. 3 3.1 Introduction ................................................ 3 4 Cons cells ................................. 4 5 Sequences ................................. 5 5.1 Introduction ................................................ 5 5.2 Lists ....................................................... 5 5.2.1 Standard functions, macros, and special operators on lists.. 5 5.3 Vectors ..................................................... 5 6 Structures ................................. 6 7 Generalized references ..................... 7 8 Standard functions, macros, and special operators................................. 8 car ........................................................ 8 cdr ........................................................ 8 9 Standard types and classes ................. 9 Index ....................................... 10 Chapter 1: Introduction 1 1 Introduction You are reading the Common Lisp Reference Manual. The purpose of this document is to be a complete discription of all of ANSI Common Lisp. It differs from the Common Lisp standard or the Common Lisp HyperSpec, in that it is completely free (though I haven’t figured out the details
    [Show full text]
  • Common Lisp: a Brief Tutorial August 2004
    Common Lisp: A Brief Tutorial August 2004 David R. Pierce Stuart C. Shapiro Copyright c 2004 David R. Pierce and Stuart C. Shapiro Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be obtained from the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. i Table of Contents 1 Basics ..................................... 1 1.1 Introduction ............................................ 1 1.2 Syntax ................................................. 1 1.3 Read-Eval-Print ......................................... 1 1.4 Evaluation .............................................. 2 1.5 Comments .............................................. 3 1.6 Running Programs ...................................... 3 2 Data Types................................ 4 2.1 Booleans ............................................... 4 2.2 Numbers ............................................... 4 2.3 Functions ............................................... 5 2.4 Characters .............................................. 6 2.5 Strings ................................................. 6 2.6 Symbols ................................................ 7 2.7 Packages................................................ 8 2.8 Lists ................................................... 9 2.9 Objects...............................................
    [Show full text]
  • A Web-Based, Pac-Man-Complete Hybrid Text and Visual Programming Language
    Politechnika Łódzka Wydział Fizyki Technicznej, Informatyki i Matematyki Stosowanej Instytut Informatyki Dariusz Jędrzejczak, 201208 Dual: a web-based, Pac-Man-complete hybrid text and visual programming language Praca magisterska napisana pod kierunkiem dr inż. Jana Stolarka Łódź 2016 ii Contents Contents iii 0 Introduction 1 0.1 Scope . .1 0.2 Choice of subject . .1 0.3 Related work . .2 0.4 Goals . .3 0.5 Structure . .3 1 Background 5 1.1 Web technologies . .5 1.1.1 Document Object Model . .5 1.1.2 JavaScript . .6 1.2 Design and implementation of Lisp . .8 1.2.1 Abstract syntax tree and program representation . 10 1.2.2 Text-based code editors . 10 1.2.3 Visual programming languages . 11 1.2.4 A note on history of VPLs . 13 1.2.5 Common criticisms of VPLs . 14 1.2.6 The problem with structure . 14 1.3 Screenshots . 16 2 Dual programming language 21 2.1 Introduction . 21 2.2 Syntax and grammar . 21 2.2.1 Basic syntax . 22 2.3 Comments . 23 2.4 Numbers . 24 2.5 Escape character . 25 2.6 Strings . 25 2.7 Basic primitives and built-ins . 25 2.7.1 Functions . 26 2.7.2 Language primitives . 27 2.7.3 Values . 30 2.8 Enhanced Syntax Tree . 31 iii CONTENTS CONTENTS 2.8.1 Structural representation of strings . 32 2.9 Syntax sugar for function invocations . 33 2.10 Pattern matching . 34 2.10.1 Destructuring . 36 2.10.2 match primitive . 36 2.11 Rest parameters and spread operator .
    [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]
  • Evolution of Emacs Lisp
    Evolution of Emacs Lisp STEFAN MONNIER, Universit´ede Montr´eal,Canada MICHAEL SPERBER, Active Group GmbH, Germany While Emacs proponents largely agree that it is the world's greatest text editor, it is almost as much a Lisp machine disguised as an editor. Indeed, one of its chief appeals is that it is programmable via its own programming language, Elisp (or Emacs Lisp), a Lisp in the classic tradition. In this article, we present the history of this language over its more than 30 years of evolution. Its core has remained remarkably stable since its inception in 1985, in large part to preserve compatibility with the many third-party packages providing a multitude of extensions. Still, Elisp has evolved and continues to do so. Despite the fact that it is closely tied to a concrete editor, Elisp has spawned multiple implementations| in Emacs itself but also in variants of Emacs, such as XEmacs, Edwin, and even the window manager Sawfish. Through competing implementations as well as changes in maintainership, it has pickedup outside influences over the years, most notably from Common Lisp. Important aspects of Elisp have been shaped by concrete requirements of the editor it supports, such as the buffer-local variables that tie bindings to editing contexts, as well as implementation constraints. These requirements led to the choice of a Lisp dialect as Emacs's language in the first place, specifically its simplicity and dynamic nature: Loading additional Emacs packages or changing the ones in place occurs frequently, and having to restart the editor in order to re-compile or re-link the code would be unacceptable.
    [Show full text]
  • Armed Bear Common Lisp User Manual
    Armed Bear Common Lisp User Manual Mark Evenson Erik Hülsmann Rudolf Schlatte Alessio Stalla Ville Voutilainen Version 1.5.0 June 11, 2017 2 Contents 0.0.1 Preface to the Sixth Edition...........................4 0.0.2 Preface to the Fifth Edition...........................4 0.0.3 Preface to the Fourth Edition..........................4 0.0.4 Preface to the Third Edition..........................4 0.0.5 Preface to the Second Edition..........................5 1 Introduction 7 1.1 Conformance.......................................7 1.1.1 ANSI Common Lisp...............................7 1.1.2 Contemporary Common Lisp..........................8 1.2 License...........................................8 1.3 Contributors.......................................8 2 Running ABCL 11 2.1 Options.......................................... 11 2.2 Initialization....................................... 12 3 Interaction with the Hosting JVM 13 3.1 Lisp to Java........................................ 13 3.1.1 Low-level Java API................................ 13 3.2 Java to Lisp........................................ 15 3.2.1 Calling Lisp from Java.............................. 15 3.3 Java Scripting API (JSR-223).............................. 17 3.3.1 Conversions.................................... 18 3.3.2 Implemented JSR-223 interfaces........................ 18 3.3.3 Start-up and configuration file......................... 18 3.3.4 Evaluation.................................... 19 3.3.5 Compilation.................................... 19 3.3.6 Invocation
    [Show full text]