HNHacker News
TopNewBestAskShowJobs

elricmann

9 karma · joined September 3, 2024

submissionscomments
elricmann··on Esper v0.1.0-alpha: a minimal PL that targets C++
It does not directly target an IR like Cranelift/LLIR or even bytecode since the goal was to make this work in an alternative way (I used to design PL type systems before so I can understand the rigor involved in building a complete language). Additionally, many _target-C/C++_ languages clutter the workspace with source & header files and other config metadata (albeit for plausible reasons). The main highlights are *deducible types* that match corresponding semantics in C++, *non-exhaustive pattern matching* and a *limited syntax grammar*. The _expression-based_ part is still incomplete but parseable.

There are many missing features (still v0.1 pre-release). So far, output source files are heavily underoptimized and error handling is basically messed up. My aim was to design a minimal PL that is similar to ML/Python and can target C++. It is also the first time I get to use a PEG parser implementation.

elricmann··on I wrote my first Lisp in C++
Clojure is certainly a hallmark among lisps, although it's rather complete. I would've expected it be on par with Lua esp. in scripting games. On a side note, great insight.
elricmann··on I wrote my first Lisp in C++
It barely works (supports a few forms) but I wanted to familiarize myself with Lisp-flavored languages and C++ (coming from other languages). My goal was to make it a dual-mode interpreter/compiler that might target Java class files although guides out there are either Java-specific (e.g. OpenJDK rec's ASM disassembly tools) or are from a non-JNI perspective. I hope to improve this but feel like sharing my progress so far, still got a lot to learn, esp. regarding general bytecode formats.