TempleOS, HolyC, pure madness and pure brilliance

I posted a link to my latest DZone article at Reddit, and a commenter ironically said; “TempleOS in the cloud”. I had never heard of TempleOS, so I did a search for it, and I am not really sure about what to even say to be honest with you. First of all, I am not sure I can even legally link to any of its creator’s material, without violating several laws – At the very least break at least dozens of “political correct moral codexes”. Hence, I think I’ll link to the WikiPedia article about it, and simply leave it with that.

However, if you look past the “CIA #$%%$##$ “ parts of its creator’s “condition”, it is not difficult to shimmer some of its brilliance and beauty. First of all, it’s an operating system, with dozens of games, it boots in 1 second, and it does have many highly interesting ideas incorporated into its core – And it’s apprx. 100KLOC of code. Let me repeat that, in case you missed it;

100.000 lines of code, and it’s a “complete” operating system, built from scratch, and it has **dozens of games**!

If I am to ignore some of its obvious flaws, such as a complete lack of networking – I must admit that parts of it is really fascinating. One thing that particularly intrigued me, was “HolyC”, its main programming language. HolyC is a JIT compiled¬† programming language (Just In Time Compilation), resembling C’s syntax, with some interesting additions. Its architect created it from scratch, and among some of its defining traits, is that you execute the source code files directly. In fact, the JIT compiler for HolyC is so blistering fast, it allows for faster execution of an average HolyC program, using JIT compilation, from its source code, than the startup time for an average Windows program …!!

Yup, you can “execute” a source code file, and it still executes your code BLISTERING FAST!!

Secondly, there’s no “main” function. Invocations within a “source code file” (or an “exe”), are executed in order of appearance, resulting in a much simpler model for coding, than arguably C and C++ has – Or for that matter *any* language out there has. You can include entire programs into your own code, with a simple “#include” statement, allowing you to “reuse entire suits of applications”, in your own customisations, arguably facilitating for reuse, at a level difficult to comprehend for those not acquainted to similar ideas from before. There is only one process, which according to its Biblical inspiration is referred to by its creator Terry as the “Adam process”. This allows you to invoke functions in one program, from another program.

The language contains some pretty amazing reflection capabilities, such as the ability to dynamically determine a function’s arguments and signature, during runtime. Even though it’s compiled into x86 machine code, and does not contain any notions of “byte code” at all. This of course, allows you to dynamically figure out a program’s capabilities, during runtime, from its machine code.

It allows you to “unassemble” any piece of compiled code, and inspect the assembly code for your programs. It contains its own unique filesystem, which allows you to store your files compressed, and have your load file invocations transparently “unzip” them, as you read the files. Yup, you can store your HolyC source code, natively zipped, and execute it, as if it was an executable – At which point the HolyC JIT compiler kicks in, compiles your HolyC source code down to x86 machine code, and executes your program. And …

It does this in MICRO SECONDS!!!!!!

If I were to ignore some of its “quirks”, and some of its architect’s “flaws”, I am left with a single expression on my face, and it is basically “Holy Mother of God”. Its “naive” approach, its inherit simplicity, and some of its intrinsic beauties, are simply too stunning in nature to ignore. And my conclusion is a state of complete awe and jaw-drop …

There is absolutely no way you can seriously refer to yourself as a “computer scientist” today, without having a look at Terry’s HolyC, taking it seriously, and try to squeeze out its diamonds – Because they’re there, in plenty!

Even its terminal, which BTW supports adding images into your text, is built as an immediate HolyC compiler, implying you’re expected to invoke HolyC functions from the kernel to do stuff such as listing a folder’s files, etc …

As to Terry’s fate, I am not even sure about what to say, except if you have a dollar to spare, you should definitely consider giving the man a break. He’s got a PayPal account over at the project’s main website. I’ll send him a Tweet after having published this article, and have him confirm that it actually leads to his wallet. Edit; A guy over at the Reddit group for TempleOS has just confirmed that the PayPal account indeed leads to Terry.

Terry, if you ever read this, I want you to know, that at least in my book, you are absolutely stunningly brilliant, and your work is as close to being a computer programming miracle, as it is possible to come. Here’s one for you bro ‚̧