macro-lisp
hebigo
macro-lisp | hebigo | |
---|---|---|
10 | 21 | |
417 | 21 | |
- | - | |
3.9 | 1.9 | |
11 months ago | about 1 year ago | |
Rust | Python | |
MIT License | Mozilla Public License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
macro-lisp
-
Bare minimum atw-style K interpreter for learning purposes
Rust’s macro system is safe and hygienic, people have implemented lisps in it. I just did a google search to find an example, so I have no idea how well supported this is, https://github.com/JunSuzukiJapan/macro-lisp
-
Lust 🦞
You can already have both: https://github.com/JunSuzukiJapan/macro-lisp
- What would be your “perfect” programming language?
-
"RIIR"
Via a lisp macro?
-
In theory, is it possible to bundle a rust-to-rust transpiler with rustc in order to make "breaking" language changes, without actually breaking anything? And how would you prove the accuracy of such a system?
Rust macros can make the language look like anything, even lisp: https://github.com/JunSuzukiJapan/macro-lisp
-
Lisp as an Alternative to Java
Why not get the best (?) of both worlds with the macro-lisp crate: https://github.com/JunSuzukiJapan/macro-lisp
A small snippet from the project's examples shows minimal boilerplate between Rust and a native-looking Lisp experience:
-
Sharing Saturday #353
After that, I'm going to go back to working on adding some scripting. My attempts at making a Lisp in Rust failed spectacularly, but when trying to find a ready made replacement that's not too big (so not RustPython and not Rhai or Dyon) I found mentions of DSL, which are usually Rust macros, which led me to https://github.com/JunSuzukiJapan/macro-lisp (single file, circa 400 lines, that does basically the whole job I want, i.e. being able to call Rust functions when I need them, e.g. from an in-game console)
hebigo
-
What is the point of the if __name__ == "__main__":, i.e. why use a file as both script and module?
The Lissp transpiler incrementally compiles and executes each top-level form to Python. It needs to do this in case there's a macro definition that might affect the compilation of a subsequent form. If it's only executing definitions, this is harmless, but if you want to precompile the main module, it needs the guard, or the side effects will happen too.
-
What's the most hilarious use of operator overloading you've seen?
If you want Python to be as customizable as Lissp, check out Hissp (and Hebigo).
-
Want cleaner code? Use the rule of six
Python's lambdas can have as many lines as you want. Just wrap parens around it. Hissp uses this form as a compilation target. Its REPL shows the Python compilation. Play around with it til you get it: https://github.com/gilch/hissp
- What would be your “perfect” programming language?
- Kamby – A programming language based on Lisp that doesn't seems like Lisp
- Wisp: Whitespace to Lisp
-
Is ECMAScript really a dialect of Lisp?
The original Lisp's S-expression syntax was just supposed to be an intermediate language used by the compiler when processing the real language based on M-expressions, which kind of never took off. Numerous alternatives to S-expressions have been proposed, and some retain homoiconicity, another feature diagnostic of a Lisp (and one that ECMAScript lacks). For example, see Hebigo's readme, which shows a direct correspondence between its Python-like syntax and that of Hissp's default reader (Lissp), which uses the S-expressions. Julia can also be written in S-expressions, but this usually only used in macro definitions.
- Why Hy?
-
Land of Lisp
I think LoL is too CL-specific. If you know both languages first, you can pretty much translate, but since they'd be trying to learn Lisp in the first place, this is a bad idea.
On the other hand, [Hissp][1] has a pretty good tutorial for anyone coming from a Python background.
[1]: https://github.com/gilch/hissp
-
Interesting or distinctive lisps?
Hebigo: a whitespaceLisp isomorphic to Hissp that looks like Python.
What are some alternatives?
Carp - A statically typed lisp, without a GC, for real-time applications.
hy - A dialect of Lisp that's embedded in Python
Kind2 - A next-gen functional language [Moved to: https://github.com/Kindelia/Kind]
hy-lisp-python - examples for my book "A Lisp Programmer Living in Python-Land: The Hy Programming Language"
innit - A roguelike game where you play a micro organism inside a larger organism!
slime - The Superior Lisp Interaction Mode for Emacs
aplus - A+ Programming Language
smtfmt - An SMT-LIB formatter.
paren-face - A face dedicated to lisp parentheses
smart-imports - smart imports for Python
union - Anonymous unions in Nim
coalton - Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.