Limbo (programming language)
This article needs additional citations for verification. (October 2013) |
| Limbo | |
|---|---|
| Paradigm | Concurrent |
| Designed by | Sean Dorward, Phil Winterbottom, Rob Pike |
| Developer | Bell Labs / Vita Nuova Holdings |
| First appeared | 1995 |
| Typing discipline | Strong |
| OS | Inferno |
| License | GNU GPL v2, see NOTICE in limbo subfolder of the tarball |
| Website | web |
| Major implementations | |
| Dis virtual machine | |
| Influenced by | |
| C, Pascal, CSP, Alef, Newsqueak | |
| Influenced | |
| Stackless Python, Go, Rust | |
Limbo is a programming language for writing distributed systems and is the language used to write applications for the Inferno operating system. It was designed at Bell Labs by Sean Dorward, Phil Winterbottom, and Rob Pike.[1]
The Limbo compiler generates architecture-independent object code which is then interpreted by the Dis virtual machine or compiled just before runtime to improve performance. Therefore all Limbo applications are completely portable across all Inferno platforms.
Limbo's approach to concurrency was inspired by Hoare's communicating sequential processes (CSP), as implemented and amended in Pike's earlier Newsqueak language and Winterbottom's Alef.
Language features
[edit | edit source]Limbo supports the following features:
- modular programming
- concurrent programming
- strong type checking at compile and run-time
- interprocess communication over typed channels
- automatic garbage collection
- simple abstract data types
Virtual machine
[edit | edit source]The Dis virtual machine that executes Limbo code is a CISC-like VM, with instructions for arithmetic, control flow, data motion, process creation, synchronizing and communicating between processes, loading modules of code, and support for higher-level data-types: strings, arrays, lists, and communication channels.[2] It uses a hybrid of reference counting and a real-time garbage-collector for cyclic data.[3]
Aspects of the design of Dis were inspired by the AT&T Hobbit microprocessor, as used in the original BeBox.
Examples
[edit | edit source]Limbo uses Ada-style definitions as in:
name := type value;
name0,name1 : type = value;
name2,name3 : type;
name2 = value;
Hello world
[edit | edit source]implement Command;
include "sys.m";
sys: Sys;
include "draw.m";
include "sh.m";
init(nil: ref Draw->Context, nil: list of string)
{
sys = load Sys Sys->PATH;
sys->print("Hello World!\n");
}
Books
[edit | edit source]The 3rd edition of the Inferno operating system and Limbo programming language are described in the textbook Inferno Programming with Limbo Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). (Chichester: John Wiley & Sons, 2003), by Phillip Stanley-Marbell. Another textbook The Inferno Programming Book: An Introduction to Programming for the Inferno Distributed System, by Martin Atkins, Charles Forsyth, Rob Pike and Howard Trickey, was started, but never released.
See also
[edit | edit source]Lua error in mw.title.lua at line 392: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').
- The Inferno operating system
- Alef, the predecessor of Limbo
- Plan 9 from Bell Labs, operating system
- Go, similar language from Google
- AT&T Hobbit, a processor architecture which inspired the Dis VM
References
[edit | edit source]- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
External links
[edit | edit source]- Vita Nuova page on Limbo
- A Descent into Limbo by Brian Kernighan
- The Limbo Programming Language by Dennis M. Ritchie and Addendum by Vita Nuova.
- Inferno Programming with Limbo by Phillip Stanley-Marbell
- Threaded programming in the Bell Labs CSP style
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value)..
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value)..
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value)..
Lua error in Module:Authority_control at line 153: attempt to index field 'wikibase' (a nil value).