First Post!

February 8, 2020

This is my first post! I hope to write a lot more here. After messing with with Hugo and GitHub pages, I got a good WYSIWYG -loop going on so I can actually write and talk to myself and you about big fast algorithms outside of lengthy README.md files on github .

Here you’ll find a lot of low-level stuff(SIMD , Reverse Engineering , HPC ), computer graphics(I loooove Vulkan ), and maybe the occasional programming trick-or-treat or animation/art-work or two.

Until I find a good way to add a non-intrusive and non-volatile comment-system to a statically generated site, you can reach out to me through my email or though my Twitter !


Anyways, here’s a very compact and silly implementation of FizzBuzz I made while I think of something else to write

#include <cstdio>
#include <cstdint>

int main()
{
	for(size_t i = 1; i < 50; ++i) printf("%zu\n\0\0\0\0Fizz\n\0\0\0Buzz\n\0\0\0FizzBuzz\n" + (((0x1241843 >> ((i % 15) * 2)) & 0b11) * 8), i);
}
.LC0:
        .string "%zu\n"
        .string ""
        .string ""
        .string ""
        .string "Fizz\n"
        .string ""
        .string ""
        .string "Buzz\n"
        .string ""
        .string ""
        .string "FizzBuzz\n"
main:
        push    r12
        mov     r12d, 1
        push    rbx
        mov     ebx, 15
        push    rcx
.L2:
        mov     rax, r12
        xor     edx, edx
        mov     edi, 19142723
        mov     rsi, r12
        div     rbx
        inc     r12
        xor     eax, eax
        lea     rcx, [rdx+rdx]
        sar     edi, cl
        sal     rdi, 3
        and     edi, 24
        add     rdi, OFFSET FLAT:.LC0
        call    printf
        cmp     r12, 50
        jne     .L2
        pop     rdx
        xor     eax, eax
        pop     rbx
        pop     r12
        ret

Buttery Smooth "10fps"