shawwn/pymen
View on GitHub ↗ ★ 12 JavaScript
6 mentions on Hacker News by 1 person: 0 stories, 6 comments · first 2020-08-02 · latest 2022-10-15
20082026
-
Neat! Nicely done. fwiw, I wrote a Lisp in Python whose sexprs ended up looking similar: https://github.com/shawwn/pymen That’s the runtime for it, which is self hosted, so it supports that dot syntax but doesn’t actually use it in its own…
comment by sillysaurusx · 2022-10-15 · in Pyffi – Use Python from Racket -
Close! git clone https://github.com/shawwn/pymen -b ml cd pymen touch foo.l bin/pymen (import foo) It's a bit of a WIP (notice this is on the `ml` branch, not mainline), but it does work. >:) You need nodejs to be installed too, ha.
comment by sillysaurusx · 2021-07-24 · in How the Python import system works -
…by Scott Bell for several years till I took it all for myself. Nom nom. It starts with reader.l: https://github.com/shawwn/pymen/blob/ml/reader.l where the raw character stream is turned into a bunch of nested arrays. E.g. (+ 1 2) becomes…
comment by sillysaurusx · 2021-07-24 · in How the Python import system works -
…import system to work with other languages that you create . I use this for my Python-based Lisp: https://github.com/shawwn/pymen/blob/ml/importer.py import foo checks for "foo.l", and if found, compiles it to foo.py on the fly and imports…
comment by sillysaurusx · 2021-07-24 · in How the Python import system works -
Glad you asked. Like this: https://github.com/shawwn/pymen/blob/68b66dccc96910869ab370d... (=defun choose-bind-test () (choose-bind x '(0 1 2 3 4 5 6 7 8 9) (write (str x)) (if (= x 6) x (fail)))) If it's confusing why it looks like Lisp,…
comment by sillysaurusx · 2021-04-14 · in Can continuation passing style code perform well? -
…x for x in foo if x not in y) I've implemented this into my fork of Lumen that runs on Python. https://github.com/shawwn/pymen It feels very nice to use: > (list x for x in (range 10) if (= (% x 2) 0)) """ Built-in mutable sequence. If no…
comment by sillysaurusx · 2020-08-02 · in A philosophical difference between Haskell and Lisp (2015)