patty
macro-lisp
Our great sponsors
patty | macro-lisp | |
---|---|---|
3 | 10 | |
263 | 416 | |
- | - | |
2.1 | 3.9 | |
about 1 year ago | 10 months ago | |
Nim | Rust | |
Apache License 2.0 | MIT License |
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.
patty
-
Removing Garbage Collection from the Rust Language (2013)
This comment is misleading &| misinformed.
Sum types are built-in [1] for formal parameters. `nil` is only for `ref|ptr` types. In much code you can just use stack allocated value types and there is neither GC concern nor nil concern, but there is also a mode to help: https://nim-lang.github.io/Nim/manual_experimental_strictnot...
Nim has an easy-ish to use Lisp-like syntax macro system where you just receive & process an AST. So, to do the rest you can make libraries adding the feature without relying upon upstream compiler: such as https://github.com/beef331/sumtypes for variables with sum types or pattern matching libs like https://andreaferretti.github.io/patty/ | https://github.com/alehander92/gara.
- What would be your “perfect” programming language?
-
Patten Matching in Nim
...except that macros don't change the syntax of the language! They just offer convenience on top of it, most common example is the `=>` lambda operator from the `sugar` module. I do agree, that the pattern matching macro presented in the article is a bit hard to get used to, but you don't have to, if you don't like pattern matching. And of course there are plenty of alternatives available as well, the simplest one imo is https://github.com/andreaferretti/patty
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)
What are some alternatives?
nimble - Package manager for the Nim programming language.
Carp - A statically typed lisp, without a GC, for real-time applications.
Kind2 - A next-gen functional language [Moved to: https://github.com/Kindelia/Kind]
samsara - a reference-counting cycle collection library in rust
innit - A roguelike game where you play a micro organism inside a larger organism!
nitter - Alternative Twitter front-end
aplus - A+ Programming Language
union - Anonymous unions in Nim
paren-face - A face dedicated to lisp parentheses
nimlings - Learn the Nim programming language by fixing tiny broken programs.