HolyC 2005
A divine C dialect that is also its own JIT shell, written by one man for his temple.
Influenced by: C C++
HolyC is the just-in-time-compiled systems language Terry A. Davis built as the heart of his single-developer operating system, TempleOS. A self-described middle ground between C and C++, it doubles as the OS shell and REPL: source files compile to native code on the fly and top-level statements run top to bottom, so there is no required main(). Memory is entirely manual and GC-free, allocated from per-task heaps via MAlloc() and reclaimed with Free() on a ring-0 system with no memory protection.
What makes it distinctive
- Fully manual, garbage-collection-free memory management:
MAlloc()grabs memory from a per-task data heap andFree()returns it (Free on NULL is allowed);MSize()reports the real allocated size (large requests round up to a power of two). - Per-task code and data heaps - when a task dies its heaps are reclaimed automatically, and you can
MAlloc/Freeagainst other tasks' heaps or spin up an independent heap withHeapCtrlInit(). - No memory protection whatsoever: everything runs in 64-bit ring 0 in one flat address space, so a double-free or wild pointer can corrupt the entire system - errors are unforgiving by design.
- The compiler is a JIT that doubles as the shell/REPL: there is no separate build step and no required
main(); top-level statements execute sequentially as the file compiles. - Idiosyncratic fixed-width type system: U0 (a truly zero-sized void), I8/U8/I16/U16/I32/U32/I64/U64, and F64 as the only floating-point type.
- Static but essentially unchecked, weak typing with implicit conversions, plus C++-style default arguments (allowed in any position) and paren-less calls like
Foo;. - Uses TempleOS intrinsics like
Print()instead of C'sprintf, and stores documentation/source as rich-text '.DD'/'.HC' files in the OS's own format.
History
HolyC was created by Terrence Andrew Davis (1969-2018), an American electrical engineer and programmer, as the native language of his operating system. The OS was first released around 2004-2005 as J Operating System, renamed LoseThos (2006-2012), briefly SparrowOS in late 2012, and finally TempleOS in 2013. Davis, who believed God had commanded him to build the Third Temple as a computer, wrote essentially the entire system alone: the kernel, editor, 64-bit JIT compiler, and over 120,000 lines of code.
The language itself was originally called C+ (a pun, reportedly, on the Holy See) before being renamed HolyC to match the project's biblical theme. It is deliberately a hybrid: C-like in syntax and whitespace-insensitivity, with a handful of C++-ish conveniences such as default function arguments and member functions, but stripped of most of C++'s machinery. Because the compiler is a just-in-time compiler invoked by the shell, HolyC source is both the application language and the command line of TempleOS - typing an expression or a function name at the prompt compiles and runs it immediately.
TempleOS ran exclusively in 64-bit ring 0 with a single address space, no memory protection, no networking, and no multi-user support, by design - Davis intended it as a modern Commodore 64, a simple machine the hobbyist could fully understand. The final official release, version 5.03, shipped on November 20, 2017. Davis died in August 2018 after being struck by a train. His work, including HolyC, was released into the public domain and has since inspired community continuations (such as Shrine and ZealOS) and independent HolyC compilers/transpilers that target mainstream operating systems.