Zero Dereference
128 subscribers
3 photos
3 files
372 links
Interesting links related to systems programming, hacking, and science.

Contact: @richiefreedom
Download Telegram
The list of people whose work inspires me has replenished with several names over the past year.

One of them is rxi. I don't know a real name hidden behind these letters, but he or she did enormous number of good things. I already wrote about lite — a very fast and beautiful text editor made in C and Lua, microui — a small footprint portable UI framework and atlas — a program for packing fonts and icons into one texture.

The next program I would like to show you is aq. This is a framework built on the top of other software made by rxi: microui, atlas and fe.

With aq you can create your own audio experiments and toys using a tiny lisp-like language. These toys can have a rich GUI and perform digital signal processing to achieve your goals.

The author provides a drum machine toy as an example.

https://github.com/rxi/aq

#dsp #c #sound #lisp #language #compilers #dsl
Over the past few years, many complete hobby operating systems have appeared. By "complete" I mean that they look like finished products. They have a modern graphical interface and a set of basic applications. Among them are wonderful ToaruOS, fast-growing SerenityOS, VanadiumOS, GhostOS and some others.

It's time to add skiftOS to this list. During quarantine, the author did a great job. Just look what he managed to achieve!

https://github.com/skiftOS/skift

#osdev #assembly #c #system #programming
What would happen if someone decided to embed a display server into a game engine? The result could be very similar to the Arcan multimedia framework.

It is difficult to define what Arcan is. It is a collection of tools and libraries to build secure applications with rich multimedia facilities, window management, VR support, etc.

There are several experimental projects built with Arcan. One of them is Durden, an incredible, revolutionary window compositor with support of own, X11, and Wayland clients. Almost every aspect can be customized in runtime, even shaders associated with any graphical element.

The authors of Arcan made it in C and provided an interface for Lua scripting.

Arcan applications can run on top of other compositors/window systems or be a first-class citizens and start without any help of other environments.

https://arcan-fe.com/about/

#c #lua #graphics #desktop #composer #ui
A friend of mine asked me how to write object-oriented code in non-OOP languages, such as C. There are many articles on this topic, but not all are good. I liked this article by Chris Wellons.

https://nullprogram.com/blog/2014/10/21/

#oop #c
ShivyC is a simple compiler for a subset of C11 written in Python. It uses an intermediate representation and allocates registers using George and Appel’s iterated register coalescing algorithm.

https://github.com/ShivamSarodia/ShivyC

#compilers #c #python
A short tutorial on writing a virtual machine that simulates the LC-3 fictional architecture.

https://justinmeiners.github.io/lc3-vm/

#tutorial #vm #fantasycomputer #lowlevel #system #programming #c #cpp
A simple and well-documented microkernel operating system released under public domain.

https://resea.org/

#osdev #system #programming #c #microkernel #cc0 #lowlevel
An article that describes the cached rendering system utilized by the Lite text editor.

https://rxi.github.io/cached_software_rendering.html

#c #graphics #programmimg #internals
On December 2, I will be speaking at the KasperskyOS Night online technical conference, where I will tell the story of finding a non-trivial bug in our hypervisor.

The entire conference is dedicated to our microkernel operating system, KasperskyOS. There will be both kinds of reports: with dry theory and stories from our daily practice.

Join if you are interested in OS development, DSL (domain specific languages) or information security. Participation is absolutely free, just register.

The conference lasts two days, December 1 — 2. The main language of the conference is Russian.

https://os.kaspersky.ru/night/

#conference #osdev #microkernel #system #programming #c #haskell #dsl #kasperskyos #infosec
A simple program that shows an example of radio transmission without utilization of any onboard wireless technology. Just start the program on MacBook Air (2015) and try to detect the signal with an SDR receiver tuned to 1580kHz on AM.

https://github.com/fulldecent/system-bus-radio

#radio #programming #c #hacking #infosec
αcτµαlly pδrταblε εxεcµταblε is a clever approach to produce x86_64 binaries able to run on most modern operating systems, including Linux, Windows, MacOS and FreeBSD.

https://justine.lol/ape.html

#c #assembly #system #programming #lowlevel
Selfie is an educational project consisting of a compiler for a subset of C that generates code for a simplified RISC-V instruction set, a small emulator for that architecture, and a tiny hypervisor.

Selfie can compile and execute itself.

There are various extensions for Selfie that include a simple garbage collector and a symbolic executor.

http://selfie.cs.uni-salzburg.at/

#c #riscv #system #programming #lowlevel #compiler #osdev #hv #virt
I have already written about Rui Ueyama and the family of small C compilers: 8cc and 9cc. I also mentioned chibicc, a project that complements Rui's book.

Last time I didn't notice how the author organized the repository of chibicc. Each commit is a single step from zero to a full-featured C11 compiler (without optimizations and proper allocation of registers).

The first commit in the repository only involves a simple compiler that reads a number and generates a program that can return this number on completion. The last commit includes all the source code of the compiler that can build real projects like Git, SQLite and libpng!

https://github.com/rui314/chibicc

#c #compiler #lowlevel #system #programming
Lagrange is a browser for Geminispace.

If you still don't know, Gemini is a new protocol that replaces Gopher. Gemini sites follow a very ascetic aesthetic, which is in stark contrast to the modern web. Most of the sites are created by interesting people with deep technical background.

I like the Lagrange browser because it goes its own road. It doesn't use any popular graphical toolkit. In opposite to most modern GUI apps it is based on its own object system and widget library. But it doesn't look like an amateur handicraft, on the contrary, this program is very convenient and beautiful.

https://gmi.skyjake.fi/lagrange/

#c #oop #gui #gemini #gopher
I read once that the best programming language is two programming languages. I don’t remember who this phrase belongs to, but it’s true.

There is always code that needs serious optimization. But there is also a code that is used as glue. This code doesn't need to be very fast. Usually, most of the code in a project is glue code.

There is a family of programming languages that are used in cases where high-performance fragments in C or C++ need to be glued together into a single program. Most often, Lua and Python are used for this. Less often, TCL appears on the scene.

Fortunately, progress does not stand still and new languages appear, made specifically for embedding into other programs.

I recently came across Wren, a simple and fast language with support for traditional class-based OOP. Unlike Lua, which uses a metatable-based approach similar to object prototypes.

Wren was created by Robert Nystrom, the author of Crafting Interpreters. Robert is currently working on the Dart language at Google.

Another great embedded language is fe. It was created by rxi, famous for their minimalist libraries and programs. fe is a small lisp-like language designed specifically to run in resource-constrained environments. One may think that such a small language is of little use. But this is not the case. fe is easily extensible with C code and supports macros. Check out what awesome fantasy console rxi has made. The binary image is only 60 kilobytes!

You may remember that I already wrote about another embeddable Lisp-like programming language called Janet.

#plt #minimalism #embedded #c #lisp
Alexander Zolotov (Night Radio) released his song as a simple C program with a single dependency on libSDL2. All synthesizers and sound effects are implemented directly in the program.

Alexander is known for his SunVox and other good programs focused on composing music and computer graphics.

#dsp #synth #c #programming