LispyScript
Posted by Dion Almaer 11 months ago on language lisp

Santosh Rajan loves JavaScript and macros. He wanted to merge those two worlds and he ended up at an interesting well trodden place. The magical world of Liiiiisp!
He has created LispyScript, which allows you to write your JavaScript in a Lisp-like syntax. With the tree based structure you can write macros to change the tree before it is all serialized out as JavaScript.
This is the same old JavaScript object model. You aren’t in the world of car and cdr, this is the minimal amount of work to get to macros.
See it in action:
// All Javascript functions, objects and literals can be used in LispyScript. (Array.prototype.forEach.call [1, 2, 3] (function (elem index list) (console.log elem)))
// You can access object methods and properties using the "." notation.(console.log (.greet {greet: "hello"}))
// You can also use the 'get' expression to access a property of an object.(console.log (get "greet" {greet: "hello"}))(console.log (get 1 [1, 2, 3]))
// You can 'set' variables too.(set window.onload (function () (alert "Page Loaded")))
// Now let us create a Lisp like 'let' macro in LispyScript.(macro let (names vals rest...) ((function ~names ~rest...) ~@vals))
(let (name email tel) ("John" "john@example.org" "555-555-5555") (console.log name) (console.log email) (console.log tel))
This all comes down to: do you want to write your JavaScript in Lisp to gain the benefit of macros. It is early work (MIT licensed) and Santosh is looking for help!