Everything is a file (descriptor)

Everything is a file (descriptor) Im sure that most of you who use (or have studied) unix like operating systems like linux or the BSDs know about their philosophy. But when you really think about it, what is that file descriptor thingy? And why would everything be a file? Lets find out! The origin… unix! As always, everything old about computer things has to be related to unix. You dont trust me? [Read More]
posix  api  unix 

Non exceptional error handling and C++

For the longest time, error handling while programming has been a pain in the ass. Weird and inconsistent ways to detect errors on APIs, global variables to see what actually happened (looking at you, errno), treating errors as exceptional code paths that make it difficult to handle… you name it. What do you get with this? Confusion, a lot of confusion. Error handling should be a very important part of software development, as many can expect, everything (trust me, absolutely everything) can go wrong. [Read More]

Data or object oriented? That is the question

Let me tell you the story of how object oriented programming is not always the way to go. Unless you studied computer science on the 90s, every school, university or bootcamp tries to convince students that object oriented programming is THE BEST and how functional or procedural programming is for old people (I certainly felt that at university). Well oh well, data oriented programming is the new kid in town, so what gives? [Read More]

How not to write performant code

Don’t you feel like malloc is really slow? Most probably not, as the malloc implementation shipped on most standard libraries are probably older than me. Still, a fool past of myself thought that I could in 3 moths achieve what glibc achieved in most certainly triple the time. This is the story of how I ended up writing a memory allocator for my end of degree project for university. For the last 5 moths I have been writing a hybrid memory allocator using the SLAB allocator used on most operating system kernels and what the operating system provides in order to accelerate memory allocations. [Read More]

Thoughts on the linux desktop

Thoughts on the linux desktop Due to some hardware changes on my setup I’ve realized some issues regarding the current situation with the linux desktop (and distributions in general). So with this article I’ll try to explain my thoughts and propose some changes. Normal desktop usage Let’s start analyzing the whole windowing stack… xorg or wayland? Wayland, being new in the neighborhood has a more modern and secure approach, but stability is lost due to new “untested” code being written. [Read More]
linux  rant 

Rendering adventures

Rendering adventures I’ve always been amazed with computer graphics, and looking at recent advancements with ray tracing, and the great upgrade that Unreal Engine 4 supposed over Unreal Engine 3 with the physically based rendering (PBR from now on) work flow made me more curious. I had tried before GPU accelerated rendering with OpenGL, but I had never advanced more than a textured quad, so 2021’s summer was the time to finally tackle this curiosity with a own built PBR renderer written in C++ and vulkan. [Read More]

Journey to first completed project

Journey to first completed project With this article I will describe the journey of creating an application to create other applications… kinda crazy right! It really isn’t. What LMake is resembles more to what GNU Make is than to what a compiler is. The project started with another project, an operating system! Not many people have tried to build operating systems but those who did try know that the building and linking process differs a bit from standard applications. [Read More]