from zak@blog.goodanser.com to programming@programming.dev on 25 May 18:39
https://blog.goodanser.com/fediverse/post/2ae3fe62-1ff6-4127-b90a-5f1630facd0b
Running Code in a Programming Language Nobody Knows
Last month, I ran code in a programming language that nobody knew.
I’m not the first to do a thing like that. Ben Olmstead created Malbolge in 1998. It’s a deliberately incomprehensible programming language that’s likely impossible for anyone to really know; it took a search algorithm to generate the first program for it. Finding examples of an old, obscure language with no surviving practitioners is another potential method I imagine has been done a few times.
Nobody had ever known Nucleus when its compiler bootstrapped. Since it’s 2026, I imagine many readers have already guessed large language models were involved. I gave a sample program and output to an LLM tool and told it to write a compiler in C. I then told the tool to add features to the language until it could rewrite the Nucleus compiler in Nucleus, resulting in a language that I did not know. LLMs do not “know” things and aren’t somebody, so at that point, nobody knew Nucleus, yet there were about 4000 lines of it running in the compiler, able to produce real binaries that run on real computers.
Someone I mentioned this to asked why I would want to design a programming language without designing a programming language. I don’t actually want to do that, but just as the compiler needed an initial implementation in another language in order to bootstrap, I found it much easier to work from a minimal working language than a blank slate. I had the idea for Nucleus for a long time and have not yet read the Dragon Book and written a compiler from scratch like I told myself I was going to.
As for the language itself, the basic idea is a language for manipulating memory at a low level like C, but with Lisp-like syntax and structural macros providing compile-time abstractions and safety-enhancing constructs with no runtime overhead. By the time it hits 1.0, Nucleus should be usable as a drop-in replacement for C anywhere C is used. I’m not the first to do a thing like that either, but other implementations I’ve seen actually compile a Lisp-like language to C. Nucleus targets LLVM directly.
#lisp #LanguageDesign #compilers
#LanguageDesign #compilers #lisp #programming
threaded - newest
@zak a tool with no documentation and no users that know it and are also abstraction-capable, is asking for something to break massively down the line.
Since LLMs are in use, I'd at least suggest asking for them to generate a documentation for it, and trying to make a documentation based on it.
...Or the intention is extinctionism by making an actual Skynet, which then hope it is unsuccessful - I'd imagine most people like being alive.
Nobody knowing the language was a temporary state. I know it now, and there are up-to-date docs. Creating a language nobody knows has never been a goal, and would be a silly thing to do at best.
@programming@programming.dev @Auster@thebrainbin.org