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

Contact: @richiefreedom
Download Telegram
There are two well-known libraries for rasterization of TrueType fonts. The first one is FreeType which can be found in dependencies of almost any widely used free software that shows text on the screen. The second one is stb_ttf - a lightweight and portable rasterizer which is used primarily in computer games and small-footprint applications. Both libraries are examples of good software, but they are complex enough for studying by people unfamiliar with font rasterization.

The following git repository contains a tiny library for straight and dirty rasterization of TrueType fonts. It is buggy, especially the demonstration tool, but it shows how simple any rasterizer is in essence.

https://github.com/ZhUyU1997/ttf
When I started to work with Intel and AMD virtualization technologies there was only official documentation provided by the vendors. Times change: now you can read about development of hypervisors even in blogs. There are lots of good open source hypervisors and virtual machines to study.

Today I would like to share a link to a good tutorial. This shows how a simple hypervisor can be developed from scratch for the Windows kernel.

https://rayanfam.com/tutorials/
A good guide on studying logic for philosophers and mathematicians that includes recommendations of books and articles about the following topics: intro to logic, first order logic, elementary model theory, basic set theory, second order logic, intuitionist logic, modal and other logics, proof theory, computability, incompleteness, theories of arithmetic, serious set theory.

https://www.logicmatters.net/wp-content/uploads/2019/12/TeachYourselfLogic2020.pdf
LÖVE 2D is a simple and compact engine with permissive license that allows developing 2D and 3D games in Lua. LÖVE is available for all popular desktop and mobile platforms.

https://love2d.org/
I always liked TeX but I was scared by the size of its distributions like TeX Live. To create a simple document with cyrillic you need to download lots of packages (more than 600 megabytes).

I tried to find an alternative, mastered troff and used its modern incarnations like neatroff and heirloom documentation tools. Troff is minimalistic, and its capabilities are no less than TeX's. At the same time a typical distribution size is a couple of megabytes including macro packages.

But I gave up, troff is incredibly archaic. To begin with, it does not tell you when you made a mistake in control structures. If troff does not know how to interpret a command, he tries to quickly throw it away and move on. You don’t see where you made a mistake, and the layout becomes broken in an unobvious way. And the fact that all commands have two characters in length does not add convenience. The worst thing is when you use arithmetic expressions with brackets and built-in registers:

.if (\\n(nl+1v)>(\\n(.p+\\ny) \
...

The brackets in the example above are balanced! The last straw was a bunch of errors in neatroff, which I caught trying to write my macro package. Enough, back to TeX.

Recently I found a noscript to download the minimum and orthogonal set of TeX Live packages and install it in the home directory. Only 150 megabytes.

https://yihui.org/tinytex/
Looks like there are a number of bots among the subscribers of this channel. So, I'll do some cleanup, the members counter will be decreased a little. Don't be scared.
Zero Dereference pinned «Looks like there are a number of bots among the subscribers of this channel. So, I'll do some cleanup, the members counter will be decreased a little. Don't be scared.»
We know many examples of extremely simple but still Turing-complete programming languages like brainfuck or subleq. Such esoteric programming languages were made artificially to show the extremum of the Turing tar-pit.

Some computer programs also have a kind of Turing-complete langauges or machines inside. Moreover, some of them emerged accidentally. Authors thought they need a kind of a configuration language but users found that this language can be used to perform arbitrary computing tasks. Developers made a fine puzzle game, but this game consequently allowed to build virtual machines using game objects.

A list of such pleasant accidents can be found at the link below.

https://beza1e1.tuxen.de/articles/accidentally_turing_complete.html
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
A good paper on autonomous NAT traversal without any third-party server.

http://samy.pl/pwnat/pwnat.pdf

#infosec #network
An excellent site with technical info about MIDI.

http://www.somascape.org/

#doc #midi #sound
An open source project for learning low-level programming and operating system development in C#. Supported by Intel and University of Bristol.

http://www.flingos.co.uk/

#osdev #system #programming #lowlevel #csharp
I appreciate simple programming languages with almost no syntax like Scheme, Forth, Smalltalk or Red. Looks like there is one more language in this family.

http://sprylang.se/

#compilers #programming #language
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
Berry is a tiny window manager for X built with the best UNIX design principles in mind. Berry doesn't handle any input, instead it uses a separate client (berryc) which can send commands to the window manager itself. Berryc can be called from any daemon which listen for keyboard and mouse input, sxhkd for example.

Berry publishes information about its internal state as X11 atoms, thus various panels and status bars can use such info to augment the window manager: show available workspaces, list of windows, etc.

https://berrywm.org/

#desktop #x11 #wm #suckless
Janet is a small programming language with lisp-like syntax. Like Lua it can be easily embedded in system programs.

There is a good web-framework based on Janet — Joy. A small set of libraries is also available, so even GUI applications can be built with Janet.

Janet:
https://janet-lang.org/

Joy:
https://joyframework.com/

#compilers #fprog #lisp #embedded #janet
Kalyn is a functional programming language with a tiny compiler implemented in Haskell and Kalyn itself. Semantically Kalyn is very close to Haskell but syntactically it looks like a typed Lisp.

You can find an overview of the internals by the link below. The source code of the compiler is available on Github.

https://intuitiveexplanations.com/tech/kalyn

#compilers #fprog #haskell #kalyn
An interesting hobby project: its author made own fantasy computer architecture, a programming language, a virtual machine and an operating system. The author wrote the virtual machine and the toolchain for own programming language in Lua.

https://github.com/limnarch

#osdev #system #programming #vm #fantasycomputer