The world-class script munging capabilities and rapid prototyping capabilities of C, combined with the durable performance of your favorite scripting language. A match made in heaven for operational scripts
> What's different between tcc -run and CJIT?
>The main difference is in usability.
> CJIT improves three main UX aspects for now:
> It works as a single executable file which embeds the TinyCC compiler, all its headers and its standard library. This way there is no need to install anything system wide, check paths and setup build folders.
> It supports adding multiple files into one execution: can accept wildcards to ingest anything that is a C source, a pre-compiled object or a shared library. The symbols exported by each file will be visible to all during the same execution.
> It finds automatically common system libraries for each target platform, avoiding the need to repeat these settings and look for the right paths.
It's inspired by Terry Davis who didn't believe in sandboxes and security, he wanted to just run code and write code. It's your responsibility to read the code, :-P
Looks interesting and fun, but in no instance of any C compiler I've come across is the "classic example" of "hello, world" using `fprintf(stderr, ...)`
Julia uses a model similar to this. The main advantage is that you can interact much more easily if you have a REPL running where you can do things (assign variables load data etc) and then define/try out new code on that data.
This model traces back to Lisp and how BASIC was originally designed at Dartmouth (the pure interpreter approach was a solution to fit it into 8 bit home computers).
The best tooling approach is a mix of interpreter, dynamic and ahead of time compilers, it is a pity that not all toolchains provide this.
I wonder whether CJiT can compile itself a-la GCC and LLVM.
FAQs don't mention this and maybe the next weekend I will try to boot cjit with cjit itself.
Agreed, how HolyC serves as an inspiration could be clarified. Was it an aspect of HolyC? The background/context of the author's life, meaning Terry Davis was inspirational? Impossible to tell. Other resources [0] [1] don't mention this aspect.
I’m not surprised by it, but I am confused as I do not see anything that reminds me of TempleOS, HolyC, or Davis. If anything, this is just pushing the tcc —run functionality one step further.
The source for the site is here: https://github.com/dyne/cjit/tree/main/docs. It's a VitePress site with a custom theme. Glancing through the code, I don't see any obvious signs of LLM coding. It also definitely wasn't created with Codex specifically, because according to the commit history, the first version of the site was in late 2024, months before Codex even released.
> Be welcome to the exciting world of graphical C applications using SDL (Simple DirectMedia Layer). SDL, originally developed by Sam Lantinga in 1998...
For the uninitiated who didn't watch Terry's streams, HolyC is both an AOT and JIT language, but the JIT was in some ways much more rudimentary and in some ways much more powerful than a typical JIT compiler. Like this CJIT project, it basically could dynamically link and compile source code, spit the assembly into memory and proceed to immediately execute it. In fact, the system shell was literally JIT compiled HolyC. Which also meant you can do fun things like call kernel functions directly from the command line.
Show HN: CJIT, a single-binary C compiler that can self host - https://news.ycombinator.com/item?id=47751458 - April 2026 (1 comment)
C, Just in Time - https://news.ycombinator.com/item?id=42246209 - Nov 2024 (7 comments)
(Pity the Show HN didn't get attention - we'll email the author)
reply