Hi There!

Welcome to my blog!

Understanding Bitcoin UTXOs and Consolidation

Recently I’ve been learning about Bitcoin and Cryptocurrencies and how they work, and there’s so much interesting things I’ve come across. One of those things is UTXOs and Consolidation, and I feel like this is one of the most important concepts to grasp for any beginner bitcoiner before it’s too late. What is a UTXO UTXO stands for “Unspent Transaction Output” and put it simply, it’s your money, the coins you haven’t spent yet (unspent)...

September 14, 2024 · 5 min

Writing a ROT13 Encoder

ROT13 short for Rotate by 13 places, is a simple substitution cipher, by shifting all letters of the alphabet 13 places forward we encode a message into something unreadable, it’s a simple form of encryption based on Caesar’s cipher that existed since 1st century BC. For example the letter A becomes an N because we went forward 13 letters, repeat this for every character in a given string and you got basic encryption....

June 9, 2024 · 6 min

Writing a Brainfuck Interpreter in Python

Brainfuck is a tiny language that includes only 8 simple commands, writing an interpreter for it is easy and is often seen as a simple programming exercise. Let’s write one in Python today. Reading files First of all I’ll write a simple base to load the file given on the command line, for this I usually like to use Python’s builtin ArgumentParser: #!/usr/bin/python3 # -*- coding: utf8 -*- import sys from argparse import ArgumentParser from pathlib import Path def run(instructions: str): # TODO pass if __name__ == "__main__": parser = ArgumentParser(description="Interpret Brainfuck code") parser....

May 12, 2024 · 8 min

Compressing Games to CHD

CHD stands for “Compressed Hunks of Data” and is developed as part of the tools for MAME. It is an awesome format for storing your game ROMs and keeping the size in control, in this post we explore this format and my success in using it across variety of emulators. Installing chdman The tool used to create and work with chd files is known as chdman and is a part of the MAME tools....

April 8, 2024 · 6 min

Learning GTK Threading

One of the libraries I would like to work with is the GTK toolkit, in order to develop some applications for Linux. One important aspect when it comes to GUI programming is multi-threading, I have rarely had to work with threads as I was mostly a JavaScript developer but this needs to change in the GUI world, as there is usually a central event loop constantly needing to process events, even if your app is doing nothing it’s actually doing a lot, it needs to keep processing window events and such, make a mistake and your app lags and maybe even the operating system will start warning that the app is not responding and may need to be force closed....

February 1, 2024 · 12 min

Writing a CHIP-8 Interpreter

I’ve always been interested in emulators and writing an emulator has been in my bucket list for a long time. I think they are a great exercise and the experience you get from them is invaluable. Introduction to CHIP-8 So I decided to write an “emulator” for CHIP-8 programs. In fact it should be called an “interpreter” because the CHIP-8 was never actually a real hardware, it was more like a small programming language for creating games that some old PCs supported running....

April 4, 2023 · 24 min

Learn Lua in 15 Minutes

Lua is a really simple programming language focused on portability and being able to be embedded, so chances are you won’t be using lua directly but as a part of a bigger program that embeds lua and allows you to use it to interface with the program. Lua is really easy to learn, especially if you already have a programming background which I assume you do in this post as I will just explain how lua does it differently....

August 24, 2022 · 11 min

Trying to Learn OpenGL

I’ve always been interested in OpenGL and I finally gave it a try. OpenGL stands for “Open Graphics Library” it is basically a specification for a bunch of methods that GPU Providers implement, so it is tied to your graphics card. Because of that, the hardware and the OpenGL version you target is important. Prior to this I’ve had very basic experience with libGDX, a Java game engine which I tried to use it on Android....

July 31, 2022 · 5 min

Using gperf for Keyword Lookup in Lexers

I’ve recently found about gperf a GNU tool said to be a “a perfect hash function generator” Well what do we use it for? Anytime you need to lookup a string from a fixed dataset. It generates a “perfect” hash function that promises to do that lookup using at most one string comparison. A good use of it is in lexers (or call it a scanner or tokenizer if you want) where we need to distinguish keywords from identifiers, this leads us to scanning an identifier and before calling it an identifier we do comparisons to see if it could actually be a reserved/builtin keyword of the language....

July 9, 2022 · 6 min

Running fbx-conv on Android

I’m a bit dedicated to getting libGDX fully usable on Android that I created the template libgdx-termux it can use libGDX and build .apk files, all using only Termux. I’m still continuing to bring more functionalities to make game development complete on Android. And for today I bring you fbx-conv which is a converter utility by the libGDX team to convert 3D models into a more runtime-friendly format optimized for libGDX....

May 28, 2022 · 5 min