Nice! I like the goals of a "simpler Haskell" for small projects ( see https://github.com/taolson/Admiran ). Some questions that weren't answered in the blog:
is the evaluation model call-by-need (lazy, like Haskell) or call-by-value (strict, like most other languages)?
how is memory allocation handled? (I assume GC via the underlying JavaScript implementation)?
will it be open-sourced at some point?
a major benefit of immutable definitions is that they are always initialized; however, the type declaration format potentially opens things up to a use-before-def bug if the type declaration brings the variable name in scope. How is this handled in your implementation?
Good luck on the continued progress of your project; it can be deeply satisfying!
aldousd666
This is great! I love projects like this! I have a hobby of making toy programming languages. (Not arguing that's what yours is.) I once made a compiler, but lately I'm satisfied with making interpreters. Executable asts with moderate rearranging capabilities. It is an addictive thing. It started when I wrote a query language for my graph database server back in 2006. I didn't know about property graphs when I started, but that's what it ended up being, and I had to make a query language for it. (I wanted to call it AQL for "associative query language" but turns out that acronym was already taken. I can't remember by what.) I learned how to do it from the dragon book -- cuz I'm old. Anyway, you struck a chord with me. Making a syntax highlighter that's able to resume on errors is an interesting challenge that teaches you a lot about both sides, the front end and the back end.
codr7
Awesome, I've been doing the same thing for the past 15 years. It's one of the most stimulating activities I've found within software.
I recently sat down and put together the beginnings of a framework to play around with or use as a starting point.
Very cool. I think everyone should try making all of these foundational technologies themselves: A programming language, an OS, a bootloader, etc.
It's one thing to read about them in books, but you learn so much nuance by actually stepping through the inherent problems and difficulties in actually making them work.
show comments
austin-cheney
I love that you are using colon for the assignment operator. This is absolutely correct. Most languages use the equal sign as the assignment operator in most contexts and then the colon in limited contexts. This comes from Fortan and its just wrong. The equal sign should be reserved for comparisons, because that is what it means in mathematics.
show comments
tasuki
It has the best license[0] I've ever had the pleasure to read!
Nice! I like the goals of a "simpler Haskell" for small projects ( see https://github.com/taolson/Admiran ). Some questions that weren't answered in the blog:
Good luck on the continued progress of your project; it can be deeply satisfying!This is great! I love projects like this! I have a hobby of making toy programming languages. (Not arguing that's what yours is.) I once made a compiler, but lately I'm satisfied with making interpreters. Executable asts with moderate rearranging capabilities. It is an addictive thing. It started when I wrote a query language for my graph database server back in 2006. I didn't know about property graphs when I started, but that's what it ended up being, and I had to make a query language for it. (I wanted to call it AQL for "associative query language" but turns out that acronym was already taken. I can't remember by what.) I learned how to do it from the dragon book -- cuz I'm old. Anyway, you struck a chord with me. Making a syntax highlighter that's able to resume on errors is an interesting challenge that teaches you a lot about both sides, the front end and the back end.
Awesome, I've been doing the same thing for the past 15 years. It's one of the most stimulating activities I've found within software.
I recently sat down and put together the beginnings of a framework to play around with or use as a starting point.
https://github.com/codr7/shi
Rawk deserves it’s own HN post: https://eli.li/make-awk-rawk
Very cool. I think everyone should try making all of these foundational technologies themselves: A programming language, an OS, a bootloader, etc.
It's one thing to read about them in books, but you learn so much nuance by actually stepping through the inherent problems and difficulties in actually making them work.
I love that you are using colon for the assignment operator. This is absolutely correct. Most languages use the equal sign as the assignment operator in most contexts and then the colon in limited contexts. This comes from Fortan and its just wrong. The equal sign should be reserved for comparisons, because that is what it means in mathematics.
It has the best license[0] I've ever had the pleasure to read!
...where is the source code?
[0]: https://smallandnearlysilent.com/baba-yaga/LICENSE.txt
That's neat! But please kill the semicolon if you can. It's too 20th century already.
Is it generating wasm/wasi ?
looks just like Haskell
Fun, nice work. Side comment, but it feels like this would make a nice match with Jade/Pug[0] HTML syntax for a clean front end experience
[0] https://github.com/pugjs/pug?tab=readme-ov-file#syntax
Terry Davis reincarnated