Tree @master (Download .tar.gz)
Robin is an excessively principled and thoroughly specified functional programming language with eager evaluation, latent typing, and a homoiconic syntax, based on a radically simple core semantics in which the so-called "fexpr" is the fundamental abstraction and both functions and macros are defined in terms of it.
For more information, see the extended description below.
The Robin reference interpreter is written in about 1300 lines of Haskell.
To use it, you'll need an implementation of Haskell installed (typically either
ghc or Hugs).
If you have shelf installed, you can just run
If not, you can clone this repository,
cd into the repo directory, and run
to build the reference interpreter. (If you don't have
ghc, no executable will
be built, but the
bin/robin script will use
You can then run it on one of the example Robin sources in
eg like so:
bin/robin pkg/stdlib.robin eg/hello-world.robin
You should see
To continue learning to program in Robin you can follow The Robin Tutorial.
If you have a few minutes to spare, and you have Falderal installed, you can run the test suite (consisting of more than 400 unit tests) by running
The tests that use only Robin's core semantics (with no help from implementation "builtins") are quite slow, so you may want to skip them, by running
The test suite will also run some property tests (using QuickCheck). Notably, for every operator that is defined multiple times (which includes much of stdlib, where the core definitions are written in Robin but also implemented in Haskell as "builtins" in the reference interpreter), QuickCheck will attempt to falsify the assertion that the definitions define the same operator. These attempts are currently rather crude; there is lots of room for improvement for them in some future release.
For experienced programmers, Robin might be best described by listing the languages that have had the strongest influences on it:
Like Scheme, Robin is eagerly evaluated, latently typed, and homoiconic, as well as properly tail-recursive and lexically scoped (at least by default), and tries hard to be well-defined and system-agnostic, but (as you can read below) diverges significantly from Scheme in other ways.
Like Forth, Robin has a radically simple core semantics. There are 15 intrinsic operations; every symbol in the standard library is defined in terms of these intrinsics, while an implementation is free to provide its own (perhaps more efficient) implementation of any such symbol. (See also Pixley).
In most languages, the arguments to a function are evaluated before the function is applied, but PicoLisp allows defining functions with unevaluated arguments. In historical Lisp, such operators were called fexprs. Robin adopts fexprs as the fundamental abstraction — both functions and macros are defined in terms of fexprs.
The Kernel programming language also takes fexprs as its fundamental abstraction; however, Robin was developed oblivious of Kernel — it adapted the idea directly from PicoLisp.
Like Haskell, Robin is referentially transparent (often described as "purely functional") — mutation of values is forbidden. (Robin intentionally does not, however, adopt lazy evaluation or a static type system.)
Interactive programs in Robin are built by composing transducers which are driven by events and produce effects (which are modelled as further events), in a manner very similar to The Elm Architecture.
Arbitrary text can by embedded in a Robin program using a syntax very much like a "heredoc", except it is an S-expression.
Deserves at least a passing mention here, as one thing that Robin
discards from Scheme is its jargony terminology: no
lambda. (A notable exception is
fexpr simply because there is no
satisfying short, non-jargony word that connotes how these operators work.)
For a full description of the Robin language, see the Robin specification document.
appliances/— test appliances for the literate test suite.
bin/— driver script, destination for executable when built.
demo/— contains HTML5 document demonstrating build to JS by Haste.
doc/— Tutorial, specification, rationale, etc.
eg/— example programs written in Robin
src/— Haskell source for reference interpreter.
stdlib/— normative definitions of standard library symbols.
HISTORY.md— history of this distribution.
git clone https://git.catseye.tc/Robin/
- Add "see also bar" to top of README. Chris Pressey (commit: GitHub) 7 months ago
- Merge pull request #7 from cpressey/develop-0.8 Chris Pressey (commit: GitHub) 8 months ago
- Add "Detecting Errors in Robin" document. Chris Pressey 8 months ago
- Updates to TODO and HISTORY. Chris Pressey 8 months ago
- Update "macro" to "fexpr" in tutorial and rationale document too. Chris Pressey 8 months ago
- Fix indentation and version number. Chris Pressey 8 months ago
- Rewrite `itoa` and `not` as functions. Chris Pressey 8 months ago
- Define arithmetic functions with functions. Chris Pressey 8 months ago
- Rewrite definitions of comparators as functions. Chris Pressey 8 months ago
- Rewrite boolean operators as functions. Chris Pressey 8 months ago