<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Code on Sylvia Mirecki</title>
    <link>http://elijah.mirecki.com/categories/code/</link>
    <description>Recent content in Code on Sylvia Mirecki</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 28 Jan 2026 13:22:22 -0300</lastBuildDate>
    <atom:link href="http://elijah.mirecki.com/categories/code/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Heavy Writes, Cheap Reads</title>
      <link>http://elijah.mirecki.com/blog/heavy-writes-cheap-reads/</link>
      <pubDate>Wed, 28 Jan 2026 13:22:22 -0300</pubDate>
      <guid>http://elijah.mirecki.com/blog/heavy-writes-cheap-reads/</guid>
      <description>Background One of the things I&amp;rsquo;ve learned is challenging over the years is where to put computations or data in your data structure heirarchies, call stacks, or OOP graphs (if you&amp;rsquo;re into that, yuck).&#xA;I&amp;rsquo;m working on adding a single Option&amp;lt;f64&amp;gt; value to the result of a query for an API. Ideally, it would be returned in a single bulk query. So think of the structure like:&#xA;struct Foo { blah: String, blip: Option&amp;lt;f64&amp;gt;, // value I want to add } Right now, I can use a single query to get a Vec&amp;lt;Foo&amp;gt;.</description>
    </item>
    <item>
      <title>7 Segment Controller via EEPROM</title>
      <link>http://elijah.mirecki.com/blog/7-segment-eeprom/</link>
      <pubDate>Sat, 16 Jul 2022 15:10:15 -0400</pubDate>
      <guid>http://elijah.mirecki.com/blog/7-segment-eeprom/</guid>
      <description>What&amp;rsquo;s a 7 Segment Display? You&amp;rsquo;ve probably seen a display something like this before. They&amp;rsquo;re commonly used in alarm clocks, watches, microwaves, and other appliances. The one I found use a common anode, meaning the top left pin of the component must be connected to ground. When pulling other pins high, different segments will be given power.&#xA;As shown in the below two pictures, pin 4 is for the bottom segment, and pin 1 is for the top left segment.</description>
    </item>
    <item>
      <title>b64: B Compiler for x86_64 Linux</title>
      <link>http://elijah.mirecki.com/blog/b-compiler/</link>
      <pubDate>Sun, 06 Feb 2022 10:43:57 -0500</pubDate>
      <guid>http://elijah.mirecki.com/blog/b-compiler/</guid>
      <description>Why?! In third year of uni, we were hosting a coding competition - &amp;ldquo;DeerHunt&amp;rdquo;. The idea behind the competition was that students would write code in 15 different languages to solve coding katas. We split the languages into 3 different worlds:&#xA;Fresh world: Rust, Elm, Scala, Lua, and Clojure Corrupt world: Piet, Brainfuck, Befunge, Whitespace, and Blarb Retro world: Nasm, Cobol, Fortran, Algol, and B B was designed and implemented by Dennis Ritchie and Ken Thompson, the creators of C and UNIX.</description>
    </item>
    <item>
      <title>GLSL Mandelbrot</title>
      <link>http://elijah.mirecki.com/blog/glsl-mandelbrot/</link>
      <pubDate>Sat, 30 Oct 2021 12:53:01 -0400</pubDate>
      <guid>http://elijah.mirecki.com/blog/glsl-mandelbrot/</guid>
      <description>Intro While working on magicpixel, I wanted to try rendering the Mandelbrot Set. I guess as a \((sideproject)^2\). Magicpixel was already using OpenGL for rendering, so it was pretty simple to reuse all the boilerplate code. I pretty much just had to chop out a bunch of unnecessary code and change the fragment shader (more on that later). Here&amp;rsquo;s the Github repo for the full project source code.&#xA;The Mandelbrot Set is a fractal defined as the following:</description>
    </item>
    <item>
      <title>Monty Programming Language</title>
      <link>http://elijah.mirecki.com/blog/montylang/</link>
      <pubDate>Fri, 23 Jul 2021 23:23:46 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/montylang/</guid>
      <description>Origins You know what the world needs? Another programming language! Not really, but anyways, it&amp;rsquo;s a fun time designing them.&#xA;After messing around with parser combinators in Haskell, a friend and I had the itch to design a language. In uni we tossed around the idea of a nondeterministic esoteric language, so we started thinking about how it would work.&#xA;Something we came up with is, every branch would possibly not do what you expected it to.</description>
    </item>
    <item>
      <title>Quaternion Visualizer</title>
      <link>http://elijah.mirecki.com/blog/quaternion-visualizer/</link>
      <pubDate>Wed, 04 Dec 2019 21:28:22 -0400</pubDate>
      <guid>http://elijah.mirecki.com/blog/quaternion-visualizer/</guid>
      <description>Update: I made a video on this https://www.youtube.com/watch?v=cuZ99u7OSZE&#xA;I was reading about quaternions, so I decided to make a simple Quaternion library and visualizer in C++ to better understand them.&#xA;If you know what a complex number is, a quaternion is fairly similar. It is essentially a complex number with 3 imaginary components instead of one. I wanted to plot quaternions on a 2D graph to make visualizing quaternion equations easier to understand.</description>
    </item>
    <item>
      <title>EB Image Compression Algorithm</title>
      <link>http://elijah.mirecki.com/blog/eb-compression/</link>
      <pubDate>Sat, 25 Aug 2018 21:28:22 -0400</pubDate>
      <guid>http://elijah.mirecki.com/blog/eb-compression/</guid>
      <description>For a while, I&amp;rsquo;ve been interested in image compression algorithms. Specifically, lossless image compression algorithms. I thought of a really simple area-based lossless compression algorithm on Friday, so I wrote a small program to compress PPM files. The compressed format, Eli Bitmap (EB), stores rectangles of identical color as &amp;ldquo;regions&amp;rdquo; in the bitmap data. Any pixels that could not be reasonably compressed using into rectangles would be appended after the rectangle region definitions.</description>
    </item>
    <item>
      <title>LÖVE Platform Animations</title>
      <link>http://elijah.mirecki.com/blog/love2d-platform-animations/</link>
      <pubDate>Mon, 16 Apr 2018 09:49:08 -0400</pubDate>
      <guid>http://elijah.mirecki.com/blog/love2d-platform-animations/</guid>
      <description>My introduction to programming was game development. I started with ActionScript 2 (R.I.P. Macromedia Flash), then moved on to C++ with SFML (to this day, it&amp;rsquo;s my go-to C++ multimedia framework). I also dabbled a bit with LÖVE, a Lua game framework.&#xA;I&amp;rsquo;m currently staying in Vienna, working remotely from the Metalab pretty much every day. Many people were working on side projects, which made me want to work on a new small side project.</description>
    </item>
    <item>
      <title>Matlab nanrms</title>
      <link>http://elijah.mirecki.com/blog/matlab-nanrms/</link>
      <pubDate>Sun, 13 Aug 2017 11:22:51 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/matlab-nanrms/</guid>
      <description>I often find the Matlab nanmean function very useful. Unfortunately there is no builtin to behave similarly for RMS. So here is a snippet which may yield use!&#xA;function r = nanrms(values) % Compute the RMS of the given values, ignoring NaNs r = []; % For each row in the values vector/matrix, ignore NaNs for i = 1:size(values, 2) row = values(:, i); nonNaNs = row(~isnan(row)); r(end + 1) = rms(nonNaNs); end end </description>
    </item>
    <item>
      <title>Dabbling around with x86</title>
      <link>http://elijah.mirecki.com/blog/dabbling-with-x86/</link>
      <pubDate>Wed, 19 Apr 2017 08:15:44 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/dabbling-with-x86/</guid>
      <description>I am going to work as an embedded software developer in May, so I thought I should feel cozy with x86. The only experience I have with x86 is in a dissassembler context&amp;hellip; so be warned! This may be messy.&#xA;I wrote this little fellow which simply prints a given number in octal using recursion :]&#xA;.text .global _start # Loader # entry point _start: mov $127, %eax call shownum # exit movl $0,%ebx # first argument: exit code movl $1,%eax # system call number (sys_exit) int $0x80 # trap shownum: # eax is the input number push %eax mov $8, %ebx cmp %ebx, %eax # Base case: &amp;lt; 8, print the number jl shownumfin # Print the most significant first mov -0(%esp), %eax shr $3, %eax call shownum # Print the lowest triplet last mov -0(%esp), %eax and $7, %eax call shownum pop %eax ret shownumfin: mov $1, %edx mov -0(%esp), %ecx add $nums, %ecx movl $1, %ebx movl $4, %eax int $0x80 # trap pop %eax ret .</description>
    </item>
    <item>
      <title>Hello World, using only C syscalls</title>
      <link>http://elijah.mirecki.com/blog/hello-world-using-only-c-syscalls/</link>
      <pubDate>Mon, 29 Aug 2016 22:06:21 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/hello-world-using-only-c-syscalls/</guid>
      <description>I&amp;rsquo;m currently working on implementing system calls in BlarbVM (see my previous post on it), so I am trying to get comfortable using only syscalls.&#xA;In Linux, you can change the heap size through brk (syscall #12). To write a string to standard output, you must provide a pointer to a location on the heap.&#xA;The following code:&#xA;Get&amp;rsquo;s the end of the heap address&#xA;Increments the end of the heap address by 6 bytes</description>
    </item>
    <item>
      <title>WearHacks Toronto 2016 Project: InfraViewer</title>
      <link>http://elijah.mirecki.com/blog/wearhacks-toronto-2016-project-infraviewer/</link>
      <pubDate>Wed, 24 Aug 2016 00:34:56 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/wearhacks-toronto-2016-project-infraviewer/</guid>
      <description>At WearHacks Toronto 2016, we were trying to think of project ideas, but nothing came to mind that we all agreed on. So Adrian, Austin and I went out for coffee to take a mental break. While at the coffee shop, we were talking about all the types of light humans are blind to. Wouldn&amp;rsquo;t it be amazing if we could the whole spectrum of light, including infra red and ultra violet?</description>
    </item>
    <item>
      <title>BlarbVM/BlarbLang</title>
      <link>http://elijah.mirecki.com/blog/blarbvmblarblang/</link>
      <pubDate>Tue, 23 Aug 2016 23:23:46 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/blarbvmblarblang/</guid>
      <description>Esoteric programming languages are awesome. So I decided to create one, which I call BlarbLang.&#xA;The goal of this language is to be the simplest possible systems programming language. It uses a stack for parameters, and every function must destruct its own stack frame, and push a return value, manually. The language &amp;ldquo;doesn&amp;rsquo;t care&amp;rdquo; about performance, only simplicity. It currently supports only 5 operations:&#xA;a b ~ Store the value of a in register b</description>
    </item>
    <item>
      <title>GDB Basics: Stack Traces</title>
      <link>http://elijah.mirecki.com/blog/gdb-basics-stack-traces/</link>
      <pubDate>Wed, 16 Mar 2016 20:51:24 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/gdb-basics-stack-traces/</guid>
      <description>C beginners are often very lost when their program crashes from a segmentation fault or similar issues. Most of them know about GDB but are pretty intimidated by it.&#xA;Here is a super simple example about how to find a stack trace from a program crash.&#xA;#include &amp;lt;stdio.h&amp;gt; void bar(int *var) { printf(&amp;#34;%d\n&amp;#34;, var[100000]); } void foo(int *var) { bar(var); } int main() { int *a; foo(a); return 0; } Of course, this will result in the console simply printing &amp;ldquo;Segmentation Fault&amp;rdquo; which doesn&amp;rsquo;t help very much, especially in more complex programs.</description>
    </item>
    <item>
      <title>Dabbling Around with Scala</title>
      <link>http://elijah.mirecki.com/blog/dabbling-around-with-scala/</link>
      <pubDate>Fri, 20 Nov 2015 18:43:44 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/dabbling-around-with-scala/</guid>
      <description>Scala is a legendary language that allows both OO and functional programming. On top of that, it is compatible with Java and compiles to JVM bytecode. Hence, in theory, it could be used anywhere Java is used cough cough Android cough cough.&#xA;For a while, I have been meaning to try out Scala - and today I bit the bullet.&#xA;Closures are awesome. Here is a simple example which multiplies a list by 2 and prints the result:</description>
    </item>
    <item>
      <title>Dabbling around with Haskell</title>
      <link>http://elijah.mirecki.com/blog/dabbling-around-with-haskell/</link>
      <pubDate>Sat, 17 Oct 2015 22:43:54 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/dabbling-around-with-haskell/</guid>
      <description>So last night I went to a Haskell workshop.&#xA;One of the examples my professor gave was the factorial function:&#xA;factorial :: (Num a, Eq a) =&amp;gt; a -&amp;gt; a factorial 0 = 1 factorial n = n * factorial(n-1) The first line is the function signature, the second line is the base case, and the third line is the recursive step of the function. One thing I really like about Haskell so far is how clean recursive functions are.</description>
    </item>
    <item>
      <title>Vocabulary.com - Shell script edition!</title>
      <link>http://elijah.mirecki.com/blog/vocabulary-com-shell-script-edition/</link>
      <pubDate>Sat, 04 Jan 2014 01:56:20 +0000</pubDate>
      <guid>http://elijah.mirecki.com/blog/vocabulary-com-shell-script-edition/</guid>
      <description>I found that I often look words up on vocabulary.com. In my opinion, this is a process which could be greatly optimized.&#xA;So now I have this handy script for fetching word searches right from the comfort of my own terminal:&#xA;#!/bin/bash curl -s &amp;#34;http://www.vocabulary.com/dictionary/autocomplete?search=$@&amp;#34; | perl -pe &amp;#39; s/&amp;lt;span[^&amp;gt;]*&amp;gt;([\w\s]*)&amp;lt;\/span&amp;gt;\s*&amp;lt;span[^&amp;gt;]*&amp;gt;([\w\s\p{P}]*)&amp;lt;\/span&amp;gt;/\n\e[36m\1:\t\e[0m \2\n/g; s/^\s+$//g; # Remove blank lines &amp;#39; | perl -pe &amp;#39; # Remove all other junk. s/^&amp;lt;\/?(li)?(ol)?.*\n?//g; &amp;#39; Example use:</description>
    </item>
  </channel>
</rss>
