A Language Design Analysis of HolyC (2019)
harrison.totty.dev
harrison.totty.dev
"U0 is essentially void but with zero size. In regular C, void is actually considered a Unit Type and thus when computing sizeof(void) in GCC, you will find that it resolves to 1."
In C, void has no size; the expression sizeof (void) is invalid. There are no values of type void.
gcc, as an extension, permits pointer arithmetic on pointers to void. An unfortunate side effect of this extension is that it treats sizeof (void) as 1. If you compile with "-pedantic-errors", it will reject that expression.
>There is no type checking what-so-ever.
> TempleOS has its own programming language, HolyC. The whole operating system is written in it, except for x64 assembly in the lower-level parts. Perhaps unexpectedly, the same language is also used for the shell. … There is no built-in calculator application, because the shell itself is one. Just enter 5+7 on the command line and you'll get the answer. You can even go further than this and use the shell as a REPL to build entire programs in.
> TempleOS's unified hypertext really shines when presented in the shell. From the command-line, you can call Uf("Foo") to disassemble a function, and each symbol printed will be hyperlinked in the shell window. Click on it to go to the source. objdump can't do that.
> The most notable feature of TempleOS is its ubiquitous hypertext system, DolDoc. This is the foundation for the both the shell and the text editor. Unlike Unix which represents everything via plain-text, everything in Temple is stored in DolDoc format … You can store images (and even 3D meshes) directly into documents. You can put macros in there: hyperlink commands that run when you click on them. So if you want to build a menu or launcher, you just make a new text document and put links in it.
And so on.
The interesting parts of HolyC is that it is moving C towards a Lisp-like, and Terry seemed to be reinventing it independently? At least, his explanation for not having #defines misses why, besides 'just not liking it': you don't need #defines (which are a very poor man's macro), when you have implemented compile-time computation, which can give you real macros (pass in an arbitrary string to an arbitrarily complicated function to interpret & compile it into some HolyC).
There is no type checking what-so-ever.
How does this work?
that statement is false though, because paging is mandatory in long mode. all memory accesses are virtual memory accesses.
the whole os is one address space