HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
anko
eslisp
LiveScript2015–2023
anko / eslisp

eslisp

un-opinionated S-expression syntax and macro system for JavaScript

7Distinct people
12Mentions
0Explicit recommenders
540GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

un-opinionated S-expression syntax and macro system for JavaScript

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year12 dated mentions

Observed mentions: 2015-07-19 23:30:41 UTC to 2023-02-27 19:37:52 UTC.

0123452015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC514
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC514
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

12 sources
You can use "function" too. There are 2 because JavaScript has 2 different structures for making functions; function expressions (which I chose "lambda" for) and function declarations (which I chose "function" for). See https://github.com/anko/eslisp/blob/master/doc/basics-refere... for examples. Function declarations are statements, and you need to provide a name for the function. Function expressions are expressions, and the name is optional. In practice they often end up being interchangeable, but I just wanted to make sure any JavaScript is definitely representable.
In Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
See the author's comment from a previous discussion: "ClojureScript tries to be Clojure, and Parenscript tries to be Common Lisp. Eslisp tries to be JavaScript; it's intended to just be an obvious one-to-one syntax replacement. I wrote a brief comparison in the docs: https://github.com/anko/eslisp/blob/master/doc/comparison-to... " https://news.ycombinator.com/item?id=10266254 I am definitely appreciating eslisp's almost one-to-one mapping to JavaScript. Finally I can program JavaScript with macros! I've searched for something like this before but didn't find it unfortunately.
In Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
Some words on that subject from the README and a link. "I wanted JavaScript to be homoiconic and have modular macros written in the same language. I feel like this is the adjacent possible in that direction. Sweet.js exists for macros, but theyre awkward to write and aren't JavaScript. Various JavaScript lisps exist, but most have featuritis from trying too hard to be Lisp (rather than just being a JS syntax), and none have macros that are just JS functions" https://github.com/anko/eslisp/blob/master/doc/comparison-to...
In Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
This is maybe the best introductions to Lisp i have seen, especially for a js dev like me it could hardly get more approachable and convincing. I could not help but thinking at the end, this is really awesome but s-expressions are kind of hard to read and reason about for my brain, it would be cool if we could generate them from more readable syntax, maybe something like javascript :D . Unfortunately the standard js AST seems to be not a great fit but i found a S-Expression encoder for js AST https://github.com/anko/eslisp This way instead of having to write s-expressions manually we took a whole circle and are back at js but with macros, not relying on eval and having a code is data representation...
In An Intuition for Lisp Syntax
Many thanks for your thoughts. > Lisp's hierarchical list notation is by far the most natural, intuitive way to represent HTML. HTML-representation is also important to me, and it's how I got started on eslisp actually. I wrote an XML templater https://github.com/anko/whatxml for LiveScript that abused the ".." cascaded-function-call feature to create XML hierarchies. It took me a while to realise it was basically an S-expression in disguise! I'm working on an "eslisp-html"-macro that compiles to an HTML-templating function. Here's the gist of it so far https://gist.github.com/anko/f8ecc66a99a8ec656b49 No implementation yet, just an early-ideas readme with an example. What do you think? > For example, one could use "define" instead of "=" to declare bindings, or "begin" instead of "block". If you want to use different names for the bui
Read the rest
lt-in macros, you are welcome to. Aliasing them is just a matter of "(macro define =)", then "define" does the same as "=". > The "this" syntax in macros is reminiscent of the arguments to ER syntax transformers which can be used to operate on elements in macros. Is it possible to simplify it further? Something like (this/evaluate) instead of (. this evaluate)? Property access can be sugared to "this.evaluate" with the eslisp-propertify macro https://github.com/anko/eslisp-propertify It's quite convenient if you use it as a transform macro https://github.com/anko/eslisp/blob/master/doc/how-macros-wo... from the command line, like this https://github.com/anko/eslisp-fancy-function/blob/master/ma... Is that what you mean?
In Show HN: Eslisp – Minimal JavaScript S-expression syntax and macro system

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.