Ask HN: Are you writing your own programming language?
LLMs make this more tractable as a one person hobby and I have seen a lot of interesting LLM-driven languages posted here with new ideas, but not all of them in one place? Are you writing one? Are you using actually using it? What are the new ideas you are exploring? It is okay if it is mostly “slop”, I just want to see what people are doing
6 comments
[ 0.86 ms ] story [ 18.5 ms ] threadAt this point, it's mostly for fun, educational purposes and an attempt to build the smallest, but generally useful language with a good balance of dynamic performance, native code compilation, self hosting and a language that is both easy to learn and easy to understand it's design and implementation.
I call it Mu (µ) lang. You can find it at https://mu-lang.dev
Essentially µ is a language that has a dual runtime, Interpreter + Native code.
I've also experimented with building a full UNIX(ish) OS and Kernel in Mu itself. So that means, about ~2k Assembly, the rest in Mu. It's at about a 80/20 (Mu/Asm) and works fairly well!
Today, with AI and LLVM, creating a language is probably an easier task, but I still think it's smarter to do what I did. Any language you create will necessarily be mediocre and full of bugs. Don't reinvent the wheel.
Additionally, I’ve been really fascinated by the idea of a language that makes LLM observation and rewrites at runtime possible. There is an interface to get profile data and replace functions at runtime based on the analysis of an LLM.
Lastly, I’ve always wanted a language that could model more of the external environment and make those easier/safer to interact with. I think of libraries like Kysely as an example of making that easier. It’s a really cool time to be playing around with these.
I actively use it for most programming, these days (command-line only), and use it every year during Advent of Code.
Theres no need for any data-hazard checks in your code, the compiler will do it for you. If you want an analogy, where "ARC" freed programmers from having to manually manage memory, this is "ARC for algorithms", freeing you from having to care where the code runs.
It measures the computing environment at runtime not compile-time, and its opportunistic, so it will schedule work on the most-efficient worker at any given time - be that single-CPU, multiple-threads on the CPU, SIMD or similar hardware, GPU, multiple GPUs, or across a network via an installed daemon.
Here's some results for single-threaded CPU:
Or, on a Mac M3 Max, looking at GPU vs fastest CPU: The data-parallel sections are automatically detected, I've recently added a C front-end using clang to generate LLVM IR, which is then converted to our IR, which is then parallelised as usual.The language itself is fairly modern (classes, protocols for interfaces, blocks for closures, callbacks, exceptions) and each platform is a cross-compiler for each other platform, so I have a binary on my iPhone which was created, compiled, and signed with my dev-certificate all on a linux box. Works great :)