ArticleslgStudy

computer science

SLIME

SLIME is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand SLIME rather than just read about it. In short: SLIME, the Superior Lisp Interaction Mode for Emacs, is an Emacs mode for developing Common Lisp applications. SLIME originates in an Emacs mode called SLIM written by Eric Marsden.

SLIME — main illustration
SLIME — illustration

Key takeaways

  • SLIME belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect SLIME to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of SLIME from memory before moving on to harder problems.

Reference excerpt

SLIME, the Superior Lisp Interaction Mode for Emacs, is an Emacs mode for developing Common Lisp applications. SLIME originates in an Emacs mode called SLIM written by Eric Marsden. It is developed as an open-source public domain software project by Luke Gorrie and Helmut Eller. Over 100 Lisp developers have contributed code to SLIME since the project was started in 2003. SLIME follows a client-server architecture, using a backend called Swank that is loaded into Common Lisp. In that regard, it is similar to the Language Server Protocol, which it predates. Some Common Lisp editors use a LSP client for Common Lisp. SLIME works with the main Common Lisp implementations, such as:

Steel Bank Common Lisp (SBCL) Clozure CL (former OpenMCL) LispWorks Allegro Common Lisp CLISP Embeddable Common Lisp (ECL) Armed Bear Common Lisp (ABCL) Other programming languages can leverage SLIME with an editor plugin, or have plugins inspired by SLIME:

Clojure JavaScript Scheme Kawa, a Scheme implementation GNU R Ruby MIT Scheme

Features SLIME offers an experience of an Integrated Development Environment. Once SLIME is loaded into the editor and the Swank back-end loaded into the running Common Lisp image, all interactions are made live, interactively, effectively "talking" to the running program and adding features incrementally. SLIME provides:

code completion code compilation (compile the function at point, a region, a file, a project) compilation notes highlighted in source buffer and gathered in a dedicated buffer code evaluation documentation lookup an interactive object inspector definition finding a powerful interactive debugger, which lets the programmer inspect the call stack, fix and recompile a function while the debugger is open and execution is paused, then resume execution from any point in the stack the use of restarts in the debugger a stepper macro expansion automatic macro indentation cross references: find who calls a function or macro, who sets a symbol, who depends on a symbol, who references one, who specializes a method, who macroexpands a macro manipulating objects through "presentations" automatic export of symbols calling the function at point in the REPL shortcut commands (print the current working directory, find and install a Quicklisp package, etc.) a trace facility disassembly commands

Remote use SLIME, paired with the Swank back-end, allows to connect to a running Lisp program on another machine. This allows a programmer to inspect the running program, change parameters, or even to load and compile new code, effectively upgrading the system with no down-time.

References

External links SLIME project page Using Emacs as an IDE on the Common Lisp Cookbook. The birth of SLIME on the cmucl-imp mailing list (August 2003) SLIME presentation by Tobias Rittweiler (2008) Archived 2011-09-27 at the Wayback Machine Review of SLIME by Andy Wingo Bill Clementson's "Slime Tips and Techniques" - Part 1 (See also Part 2, Part 3, Part 4, Part 5, Part 6, and Part 7) Bill Clementson's "SLIME Refactoring" describes how to set up SLIME Bill Clementson's "Emacs Keymaps and the SLIME scratch buffer Bill Clementson's "CL, Music and SLIME Tutorials" contains a good SLIME tutorial Marco Baringer's (SLIME guru) SLIME setup Marco Baringer's "Editing Lisp Code with Emacs" The slime-devel Archives Up-to-date Swank for MIT/GNU Scheme for use with SLIME CVS

Illustrations

SLIME illustration

Worked examples

Example 1 — a first encounter with SLIME

Start with the simplest possible case. Write down what SLIME claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to SLIME before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about SLIME ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of SLIME

In research
SLIME appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses SLIME in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
SLIME is common in secondary-school and first-year university syllabi. It links to neighbouring topics Common Lisp (programming language) software, Computer programming tool stubs, Emacs, so understanding it makes those chapters shorter.
In everyday life
Look for SLIME outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “SLIME” →

How to study SLIME in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what SLIME means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain SLIME out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is SLIME in simple terms?

SLIME, the Superior Lisp Interaction Mode for Emacs, is an Emacs mode for developing Common Lisp applications. SLIME originates in an Emacs mode called SLIM written by Eric Marsden.

Why does SLIME matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study SLIME?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on SLIME.

Tags

  • Common Lisp (programming language) software
  • Computer programming tool stubs
  • Emacs
  • Free integrated development environments
  • Free software programmed in Lisp
  • Public-domain software with source code
  • Scheme (programming language)

Keep exploring