Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
View PrinssiFiestas's full-sized avatar
  • Finland

Highlights

  • Pro

Block or report PrinssiFiestas

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this userโ€™s behavior. Learn more about reporting abuse.

Report abuse
PrinssiFiestas/README.md


Heyy, you found me!๐Ÿ˜ƒ

So welcome! I'm a creative programmer with passion for arts and music. When I'm not drumming, you probably find me coding (usually in C) or building something out of electronics.

Some notable projects:

  • libGPC: General purpose C library with polymorphic allocators that can be encapsulated to dynamic data structures like UTF8 strings and stuff
  • MicroELFLinker: Static ELF linker for x86_64 Linux
  • minirt: Real-time interactive ray tracer
  • DSP: Audio processing filters
  • Shaders: including the gifs you see here
  • ft_transcendence: Ray marched 3D Pong game, also implemented as a shader

Sometimes, I get sucked into rabbit holes and end up doing weird things for fun. For example, here's C callable factorial() written by hand in raw x86-64 Linux machine code:

#include <stdint.h>
__attribute__((section(".text")))
static const uint8_t factorial_code[] = {
    // factorial:
    [ 0x00 ] = 0x48, 0x83, 0xFF, 0x00,                   // cmp  rdi, 0
    [ 0x04 ] = 0x74, 0x0F,                               // je .base_case
    [ 0x06 ] = 0x57,                                     // push rdi
    [ 0x07 ] = 0x48, 0xFF, 0xCF,                         // dec  rdi
    [ 0x0A ] = 0xE8, 0xF1, 0xFF, 0xFF, 0xFF,             // call factorial
    [ 0x0F ] = 0x5F,                                     // pop  rdi
    [ 0x10 ] = 0x48, 0x0F, 0xAF, 0xC7,                   // imul rax, rdi
    [ 0x14 ] = 0xC3,                                     // ret
    // .base_case:
    [ 0x15 ] = 0x48, 0xC7, 0xC0, 0x01, 0x00, 0x00, 0x00, // mov  rax, 1
    [ 0x1C ] = 0xC3                                      // ret
};
uint64_t(*const factorial)(uint64_t) = (uint64_t(*)(uint64_t))factorial_code;

Note

You are better off just using an assembler. ๐Ÿ™ƒ

I'm avaliable for work! ๐Ÿ”จ Feel free to contact me via email or LinkedIn.

Ray tracing!

Popular repositories Loading

  1. libGPC libGPC Public

    General Purpose C

    C 4

  2. AngelScript_extended_String AngelScript_extended_String Public

    AngelScript 1

  3. HybridPiSynth HybridPiSynth Public

    C 1

  4. Linux_simple_char_driver_example Linux_simple_char_driver_example Public

    Ohjeet ajurimoduulien ja char devicen luontiin

    C

  5. FlexCUT FlexCUT Public

    Flexible C/C++ Unit Testing framework

    C

  6. WinCodingHotkeys WinCodingHotkeys Public

    Vim-like keybinds and mouse control via keyboard anywhere on Windows

    AutoHotkey