4 ms·
Hi, this is my personal programming language project, Mlatu. Mlatu is a statically typed concatenative programming language. It is purely functional with algeb
by brightly-salty 5y ago
Hi, this is my personal programming language project, Mlatu.
Mlatu is a statically typed concatenative programming language. It is purely functional with algebraic effects. It currently compiles to Rust but I may switch to Erlang.
I’d love any feedback or constructive criticism you guys have!
- grzm 5y agoGood on ya for scratching an itch! > "It currently compiles to Rust but I may switch to Erlang." Why one or the other? Why not both? :)
- brightly-salty 5y agoThanks. To answer your question, the current Rust codegen is pretty terrible performance wise, and all stack manipulations happen to a global mutable Vec. I’m hoping by switching to Erlang, I can take advantage of some of its list and pattern matching optimization, as well as TCO. It would also mean a new focus for the language, as I could add concurrency features as a goal rather easily.
- mamcx 5y agoThis sound weird. Erlang is "slower" than Rust, like a lot and specially in this kind of stuff.
- brightly-salty 5y agoIt’s not that Erlang is faster than Rust, but that the way I would translate Mlatu to Erlang would be more natural and Erlang-like than the current translation to Rust is, which would probably entail performance improvements.
- mamcx 5y agoI understand that clashing semantics could lead to this, but also think maybe you need a different data structure/patter on Rust? Anyway if you also will leverage more stuff from the Erlang ecosystem is certainly the way to go.
- brightly-salty 5y agoI was/am using a `Vec<Rep>` where `Rep` is an enum containing the different primitive types of Mlatu, which worked fine semantically but was just very slow for the amount of pushing and popping off I had to do. Thanks for your response, I do think I want to leverage more stuff from the Erlang.
- c54 5y agoCould this be invoked directly from the bash CLI as a sort of fully featured pipe based syntax layer? Curious for your thoughts here
- brightly-salty 5y agoI’m not really sure what you’re saying here, but that’s probably on me. Are you saying executing Mlatu scripts from its CLI?
- olodus 5y agoAwesome to see. Has always thought there were too few concat langs out there. And also really nice that you connect it really well it seems to func prog. I've even felt this niche so underrepresented that I have been thinking about creating a language for it myself. So maybe you beat me to it, or rather I can look to you for some inspiration :p Question: What made you chose to compile to Rust instead of to LLVM or something like that? Do you make use of the memory safety you gain this way in some interesting ways?
- brightly-salty 5y agoThanks. I would like to see more concatenative pauses as well, so don’t be discouraged from creating your own. To be honest, I chose Rust because it was the most performant imperative language I know, not so much for its memory safety. I chose to transpile instead of generating LLVM because I wanted to focus on the frontend and type system more than the backend, and LLVM felt like it would get in the way more than enable it.
- myWindoonn 5y agocoi lo finti .i ki'e .i pe'u ko se purdi lo bangu