
Welcome to the next devlog!
This one is both a dev log and a Hardware Sniffers entry to tell you a bit more about the MISC platform.
A few years ago I started designing a programming language that I thought I wanted for systems programming. I still did and even now do most work in C99 (specifically C99), but the more I do, I increasingly realize that I have many things that I would change to make myself feel like I'm telling the CPU exactly what I want to do without any ambiguity. Last year and early this year I finalized the design of the first revision of this language, which is called DANGC. It is inspired (clearly, based on the name) by C, but it takes a lot from Ada, which blew my mind the first time I saw it (especially SPARKS).
The main concept is that there are no types. I am tired of pretending that that are these various forms of data that we're exchanging between the CPU and memory. It's worse in C, because you could use int and have it mean different things on different platforms.
Saying 8 one_byte_wide_num; is far more expressive than int i_dont_know_how_wide_this_actually_is_guess_it_depends;. If the digit prior to the variable name is confusing, then remember that it's just the width in bits. You interpret those bits however you want. An 8-bit value could be interpreted as an integer, but also as a float. The standard library will provide some utilities to give users common things like IEEE 754 floating-points, but the standard library will itself be a DANGC program. The language doesn't have types.
From the head of DANGC's documentation file:
Neo: #define CHECKED_SK_CMP_FUNC(type, p) ((int (*)(const void *, const void *)) ((1 ? p : (int (*)(const type * const *, const type * const *))0))) DANGC: Do not try and bend the type. That's impossible. Instead, only try to realize the truth. Neo: What truth? DANGC: There is no type. Neo: There is no type? DANGC: Then you'll see that it is not the type that bends, it is only yourself. Neo: sort(64 *sk, 32 n) rets 1 where out == 1'0x0 => sorted(sk, n) == 1'0x1;
It has a built-in profiler and context management, where the main TU has a construct called world (which exists in .bss) and all other TUs have one called subsystem. All work happens in work units called "spins." There is also a built-in concurrency manager called "executor coordinator." An "executor unit" is something like a thread but more generic since MISC doesn't call these "threads." "Execution units" are individual units of work to be run within executor units. Inline assembly can be used for maximum human-readable control.
Here is an example:
example.dngs, a.k.a. a specification file (like a header file):
!INTERROGATE(CYCLES)
dim(32 color, 8 shift [8'0, 8'8)) rets 32 where out[8'31:8'24] == color[8'31:8'24], out[8'23:8'16] <= color[8'23:8'16], out[8'15:8'8] <= color[8'15:8'8], out[8'7:8'0] <= color[8'7:8'0]; _start(64 *args) rets 64;
spin(64 dt, 64 abst, 64 idxt) rets 1;
example.dngb, a.k.a. a behavior file:
"example.dngs"