GitHub

On this page you’ll find my projects, that I’d show to public.

I’m quite lazy, so there have been many projects that I’ve abandon and never finish, yet they are more useful and complex than all this silly stuff below. One day I will return to them…

Medium-size projects

Those projects took quite effort and I’m proud of them. But they are still probably useless.

monolog

Simple interpreted C-like imperative programming language. It was written as a school project in C. It took exactly 1 month to write such language.

monolog examples

It supports:

  • Infix notation (2 + 3 / 0)
  • Arithmetic (+, -, *, /, %)
  • Logic (!, ==, !=, <, >, <=, >=, &&, ||)
  • Basic branching statements (if, else)
  • Loops (while, for, break, continue)
  • Block statements
  • Functions
  • Builtin types:
    • 64-bit signed integers (int)
    • Mutable, resizable strings (string)
    • Option type (T?)
    • Array ([T])
  • REPL

It’s really a simple language, usable only for academic problems.

The overall runtime process looks like this:

  1. Lexing
  2. Parsing
  3. Semantic Check
  4. Interpretation

The lexer is implemented in a procedural way, i.e. without any fancy looking state machines. Just a while loop until EOF with ifs for character + related function with another while loop. It produces an array of tokens.

For parsing it uses the famous pratt parser1. I don’t have too much experience with other parsing techniques, but I can absolutely recommend this one.

The semantic check stage checks if there are no wrong combinations of types, symbol resolving, etc.

The interpreter is just a tree-walk one. Thanks to the previous stage, we are left only with runtime errors, significantly simplifying the code of the interpreter.

monolog repl

For REPL I used a really good library isocline. My only complaint is, that its API for terminal styling is available only for stdout (it could be used for diagnostics, and diagnostics should go to stderr).

nchip8

CHIP-8/SCHIP interpreter written in C++17 using SDL2 and Dear ImGui. Customizable and has debug capabilities.

screenshot 1

screenshot 2

screenshot 3

screenshot 3

I plan to rework this project - port it to Qt6, add editing and debug capabilities just like in Mesen2 emulator and some kind of library, where you can choose game to play and each can have its own defined properties like speed, quirks, etc. And also support XO-CHIP, of course. In fact, I have some local code, but the school disrupted me and I’ve abandoned it. But I will return to it.

It has a few bugs, which I fixed locally, but didn’t pushed them to Github yet.

Mini projects

These doohickeys were made because of boredom, have little/no practical use, but they’re mine and I had fun writing them.

rxpipes

2D screensaver for terminals, written in Rust. It’s basically rewrite of ncpipes, but cooler.

It has various features like setting drawing speed, RGB/palette, gradient, pipe char sets, etc.

One of interesting features it has is a depth mode - there are multiple layers of pipes, and each layer gets darker until fully disappearing (can be seen on the right screenshot).

Not tested on Windows, but should work.

screenshot 1

screenshot 2

ncpipes

2D screensaver for terminals, written in C + notcurses. Predecessor of rxpipes.

ncpipes

dshw

A dead simple CLI program to query information about system and some hardware. Written in Rust. Uses the sysinfo crate for that.

~ $ dshw memory total available usage free
16680706048
11274551296
5406154752
4898979840
~ $ dshw drive /dev/sda3 fs usage total
ext4
259652198400
474853687296
~ $ dshw network enp0s31f6 total-transmitted-data
7632128
~ $ dshw list-sensors
acpitz temp1
acpitz temp2
coretemp Core 1
coretemp Core 5
coretemp Package id 0
coretemp Core 2
coretemp Core 4
coretemp Core 7
coretemp Core 0
coretemp Core 6
coretemp Core 3
amdgpu edge
nvme Composite WD Red SN700 1000GB temp1
~ $ dshw -d ', ' list-cpus
cpu0, cpu1, cpu2, cpu3, cpu4, cpu5, cpu6, cpu7, cpu8, cpu9, cpu10, cpu11, cpu12, cpu13, cpu14, cpu15
~ $ dshw -f '%usage%/%total% bytes' memory
8163627008/16689266688 bytes
~ $ dshw -f '%frequency%, %vendor-id%' cpu cpu7
3600, GenuineIntel
~ $ dshw help memory
Usage: dshw memory [QUERIES]...

Arguments:
  [QUERIES]...
          Possible values:
          - usage:     Total memory usage
          - total:     Total memory capacity
          - available: Reusable memory. On FreeBSD, it's the same as `free`
          - free:      Unallocated memory. On Windows, it's the same as `available`

Options:
  -h, --help
          Print help (see a summary with '-h')

raypong

Clone of Ping Pong written in C and raylib. Raylib is great for old-school gamedev. For UI I used raygui.

raypong

All graphics is made by raylib renderer, except the background in the main menu is a screenshot, with some effects applied in Aseprite.

But honestly, raygui I didn’t like that much. It’s too lightweight - lacks any sane layout system, instead you have to manually specify positions and sizes, which is completely inflexible. They have an editor for it (rguilayout) that makes life easier, but still not ideal.

I like the look of raygui.

wetris

A tetris clone written in C and SDL3.

wetris

All the graphics was made by me in Aseprite and Gimp, sound effects in MilkyTracker and Audacity. Looks like some odd game from 2000s era, and sounds enough old school!

Initially I wanted to use SDL2, but it does not support tile textures, so I went for SDL3, which in that time was in pre-release state (although I didn’t make use of tiling in the end).

SDL3 also comes with its own text engine, which is pretty powerful, but I wanted to try write my own text renderer, so I reinvented the wheel.

tdl-clock

ASCII analog and digital clock for terminal written in C. It uses TDL for graphics, a curses-like library written by my old friend.

analog clock

digital clock

  1. See this, this and this