2024

Mock

2024–2025
Thumbnail of Mock

Mock generates a runtime testify mock implementation for any Go interface without having to write any boilerplate (and in my opinion mockery counts as boilerplate too). It was one of a kind when first implemented, and possibly still is. The initial version used the goplus/reflectx package, but due to the linkname related limitations introduced in Go 1.23, I had to delve deep into the Go internals (ABI, GC, reflection) to be able to develop a standalone version. The only dependency is the testify package itself.

2023

Botkit

2023–2024
Thumbnail of Botkit

A Telegram bot library designed to handle commands and dialogs. Both of these support replying with sticker, photo, video, audio, album or file (even files not directly uploaded by the bot). Dialogs are composed of one or more queries, which can be single choice, multi choice or file queries. In theory you could run multiple instances to help balance the load, as long as they share the same Redis database.

Broadcaster

2023–2024
Thumbnail of Broadcaster

Broadcast messages from one channel to many, with timeouts, server sent events and much more. Zero external dependencies. Designed for scenarios when it’s unpractical to connect to the same event source using many parallel connections.

Commander

2023–2024
Thumbnail of Commander

Execute Go functions from CLI or from a chatbot. Register any function as a command, then supply a context variable and a string slice as input arguments. If the original function has Context parameter(s), the context variable will be passed, otherwise the arguments from the string slice will be converted using Sscanf. The function’s return values are converted into a []any slice and if any of these values is an error, it will be extracted into a separate error return value.

RazCache

2023–2024
Thumbnail of RazCache

A minimalist abstraction layer above Redis, Badger and a custom in-memory cache. As many of my self-hosted services rely on Redis for caching or data storage, I often had to fire up a local instance for manual testing. This process was too cumbersone for me, so I figured I could come up with a wrapper around Redis supporting the functionaly only I use the most, and during development it should mimic this functionality in-process. Supporting key expirations was a mandatory requirement, so the in-memory cache implements a “janitor” goroutine that cleans up these keys exactly when they expire, one at a time.

2021

Telegram PizzaBot

2021
Thumbnail of Telegram PizzaBot

Do you love pizza so much that you keep talking about it in your Telegram group chat? Now you can include this bot and with the right permissions it will respond with a pizza sticker or interesting pizza fact to any mentions of pizza.

2020

Beepboop

2020–2022
Thumbnail of Beepboop

A lightweight webapp framework that powers Razbox. Most of the original code was taken from Razlink, but it has heavily evolved since. The core mechanic consists of registering pages (which are mostly a template + handler bundle) and returning view objects from inside the handlers. There are some utilities for session handling, access management and logging too, but this library is not suitable for production use.

2019

Doboz.NET

2019
Thumbnail of Doboz.NET

I ported Attila Áfra’s Doboz compression library to C# to experiment with a custom archive format in my other projects.

The first version used unsafe pointers, but I later reworked it into safe, managed C#.

2018

RazTools

2018–2020
Thumbnail of RazTools

A collection of reusable helper classes:

  • ArchiveReader and ArchiveWriter, based on Doboz.NET
  • 2 alternative versions of CommandParser
  • FileSystem class that seamlessly integrates local OS filesystem + ArchiveReader
  • ObjectDeserializer to construct objects from a custom text format
  • PluginManager & RemoteLoader simplify interaction with plugins using remoting
  • Timeout class with Expired event
  • XmlReader static class which returns dynamic objects

2016

LibRazzie

2016–2018
Thumbnail of LibRazzie

A header-only multi-purpose library designed to help me get started with my projects. It includes helpers for logging, events, input, memory, thread and network+serialization and has some additional stuff like: a bitset class with iterators for true and false position, stream manipulators and parsers and an easy to use random number generator. Examples are provided for each of them.

2013

GGlib & GGlib2

2013–2017
Thumbnail of GGlib & GGlib2

GGlib and GGlib2 were libraries I used to develop between 2013 and 2017. They served as a sandbox to help me to learn about the new features of the C++11 standard. I also found a great use of them while working on other side projects. Due to some early design choices (including too heavy use of virtual function calls) I finally decided to send them into retirement and started working on the successor: LibRazzie.

×