Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are lightweight lisp dialects that compile to readable js?

What are lisp dialects that compile to short, readable and modifiable JS, using JS's own types?

like image 985
MaiaVictor Avatar asked Oct 27 '12 21:10

MaiaVictor


People also ask

What is a dialect of LISP?

Lisp has officially standardized dialects: R6RS Scheme, R7RS Scheme, IEEE Scheme, ANSI Common Lisp and ISO ISLISP.

Is LISP a compiled language?

Lisp is a compiled general purpose language, in its modern use. To clarify: “LISP” is nowadays understood as “Common Lisp” Common Lisp is an ANSI Standard.

Which LISP should I learn?

You have two main dialects to choose between: Scheme and Common Lisp. They each have advantages and disadvantages, but the differences between them are tiny compared to the differences between them and other languages, so if you want to start learning Lisp, it doesn't matter which you choose.


2 Answers

Here's an extensive list of compilers for programming languages that compile to JavaScript, including several Lisp/Scheme dialects. Regarding the "short, readable and modifiable" part, that's a bit subjective ... you can test a couple of the compilers listed, and decide which one works best for you.

From the "Lisp, Scheme" section of the list [with minor formatting changes to the sub-section headers]:

Lisp, Scheme

Clojure-like

  • ClojureScript Clojure to JS, the official version. Supports the majority of Clojure including persistent datastructures.
  • ClojureJS Subset of Clojure to JS.
  • Chlorinejs A fork of ClojureJS with a port of clojure.core library.
  • wisp A homoiconic JavaScript dialect with Clojure syntax, S-expressions and macros. Aims to be rich subset of Clojure(Script) that seamlessly interops with both Clojure(Script) and JavaScript.
  • Scriptjure Library for generating JavaScript from Clojure forms.
  • ki Clojure-like syntax, mori's immutable data structures in a few sweet.js macros. Can be intermixed with JavaScript.

Scheme-like

  • BiwaScheme Scheme(R6RS) in JavaScript
  • Fargo Scheme in JavaScript
  • Moby Scheme A Scheme running in JS.
  • nconc Scheme interpreter in JavaScript with stack-friendly tail calls and full call/cc
  • scheme2js Scheme to JavaScript.
  • Spock A Scheme to JavaScript compiler that uses Henry Baker's Cheney-on-the-MTA compilation strategy
  • Whalesong Racket to JS compiler

Other

  • eslisp An S-expression syntax for ECMAScript/JavaScript, with Lisp-like hygienic macros that are just JS functions. Aims to be very close to JS, and highly experimental.
  • EdgeLisp A Lisp in the tradition of Common Lisp
  • Parenscript Subset of Common Lisp to JS.
  • Ralph Lisp-1 dialect that compiles to JavaScript, inspired by Dylan
  • Oppo A JavaScripter’s lisp. Inspired by JavaScript, Clojure and CoffeeScript. Compiler built using Jison.
  • LispyScript A JavaScript with Lispy syntax and Macros.
  • Outlet A simple Lisp that supports CPS and in-browser stepping debugging, and other things. In development.
  • Hot Cocoa Lisp A Lisp-like language that compiles to JavaScript.
  • Sibilant JavaScript with a lisp.
  • jisp A JS-native and axiomatic Lisp that focuses on the core ideas of code-as-data, S-expressions, and macros, introducing as few new concepts as possible.
like image 94
Óscar López Avatar answered Sep 25 '22 15:09

Óscar López


Parenscript is pretty lightweight and readable. And you use a superior interactive environment for it with slime-proxy.

like image 30
Vsevolod Dyomkin Avatar answered Sep 25 '22 15:09

Vsevolod Dyomkin