Fractal Fir's Avatar

Fractal Fir

@fractalfir.bsky.social

A young Open-Source developers, with a passion for compilers, procedural generation, and Rust. Currently working on compiling Rust to C(and .NET): https://github.com/FractalFir/rustc_codegen_clr

127 Followers  |  44 Following  |  18 Posts  |  Joined: 28.12.2024  |  1.7193

Latest posts by fractalfir.bsky.social on Bluesky

A cursed C fact of the day:
there exists a C compiler out there, for which this assertion will pass:
```
assert(sizeof(float) == sizeof(double));
```
The Small Device C treats `double` as float:
"warning 93: type 'double' not supported assuming 'float'"

29.08.2025 22:39 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image Post image Post image

Is there a repo for the project? I like proc-gen stuff(mostly generating planets), and the project looks cool - maybe I could help, if/when I have the time.

Here are some things I have made in the past few years:
www.reddit.com/r/blender/co...
I also wrote my own ray-marchers and ray tracers.

28.07.2025 21:04 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Testing the GCC-based Rust compiler(backend)

I have wrote yet another article about compiling Rust with GCC.

fractalfir.github.io/generated_ht...

I go over some neat news(running the Rust compiler on M68K CPUs), important topics(eg. how we test `cg_gcc`, or ABI compatiblity), and some fun triva about cursed proc-macros.

Hope you enjoy it!

28.07.2025 20:14 β€” πŸ‘ 9    πŸ” 4    πŸ’¬ 0    πŸ“Œ 0

Continues as:

Abi Coffee emphasizes that their business is sustainable because they work directly with farmers, eliminating middlemen and ensuring they receive fair wages.

25.07.2025 00:02 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Translation:

ABI cafe is likely the name of a coffee shop that offers Ethiopian coffee sourced directly from farmers. The company in question, Abi Coffee, offers high-quality coffee sourced from four farmers in Ethiopia. The coffee is then roasted at their roastery in Kaarina, Finland.

25.07.2025 00:01 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
An AI overview, mistaking the tool "abi-cafe" for a Finnish coffee shop. 

The message is in polish, and translates to:

ABI cafe is likely the name of a coffee shop that offers Ethiopian coffee sourced directly from farmers. The company in question, Abi Coffee, offers high-quality coffee sourced from four farmers in Ethiopia. The coffee is then roasted at their roastery in Kaarina, Finland. Abi Coffee emphasizes that their business is sustainable because they work directly with farmers, eliminating middlemen and ensuring they receive fair wages.

An AI overview, mistaking the tool "abi-cafe" for a Finnish coffee shop. The message is in polish, and translates to: ABI cafe is likely the name of a coffee shop that offers Ethiopian coffee sourced directly from farmers. The company in question, Abi Coffee, offers high-quality coffee sourced from four farmers in Ethiopia. The coffee is then roasted at their roastery in Kaarina, Finland. Abi Coffee emphasizes that their business is sustainable because they work directly with farmers, eliminating middlemen and ensuring they receive fair wages.

@gankra.bsky.social Thanks to AI overview, I now know that github.com/Gankra/abi-c... sources it's coffee in a sustainable way from Ethiopia.

Good to know that my favourite tools are made in an ethical way :)

25.07.2025 00:00 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I implemented the `int_format_into` feature into the Rust `core` library.

It allows you to reuse a buffer when converting an integer into a string:

```
let mut buf = NumBuffer::new();
let string_repr = 12u32.format_into(&mut buf);

let other_string_repr = 128u32.format_into(&mut buf);
```

1/2

08.07.2025 09:35 β€” πŸ‘ 2    πŸ” 2    πŸ’¬ 1    πŸ“Œ 0

Thank you so much for your kind words!

I hope you have a great day :)

06.07.2025 23:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Building the Rust compiler with GCC

I have wrote an article about some of my work building the Rust compiler with GCC:

fractalfir.github.io/generated_ht...

I hope you enjoy :D

06.07.2025 20:46 β€” πŸ‘ 17    πŸ” 5    πŸ’¬ 1    πŸ“Œ 0

Ah, computers never cease to amaze me.

For some reason, my "g" key is not working... but it does if I *also* press shift. Meaning I can only type upper-case "G".

Thankfully, if i press both caps-lock and shift, they cancel each other out. So, I can still type "g" using 3 keys.

I guess it works..

24.06.2025 22:17 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Healthy Data, Rusty Code: Epidemiology Meets Modern Systems Programming  - Caroline Morton
Epidemiology relies on codelists for health data, but managing them can be error-prone. This talk introduces codelist-tools: open-source Rust libraries with ... Healthy Data, Rusty Code: Epidemiology Meets Modern Systems Programming - Caroline Morton

Healthy Data, Rusty Code: Epidemiology Meets Modern Systems Programming
by Caroline Morton at RustWeek 2025!
www.youtube.com/watch?v=gV55...

#rustlang #RustWeek

12.06.2025 09:30 β€” πŸ‘ 4    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

My talk is in here: www.youtube.com/watch?v=_sv8...

Enjoy!

10.06.2025 13:15 β€” πŸ‘ 16    πŸ” 3    πŸ’¬ 0    πŸ“Œ 0
Corrosive C - Compiling Rust to C to target new platforms  - MichaΕ‚ β€œFractalFir” Kostrubiec
YouTube video by RustNL Corrosive C - Compiling Rust to C to target new platforms - MichaΕ‚ β€œFractalFir” Kostrubiec

My 2 Rust week talks are out now:

youtu.be/4yTZ1PRJ6do?...

youtu.be/T-ZUkwNsK-8?...

Hope you enjoy them - if you have any questions / comments, feel free to ask!

Link to the project the talks are about:

github.com/FractalFir/r...

10.06.2025 11:03 β€” πŸ‘ 11    πŸ” 3    πŸ’¬ 0    πŸ“Œ 0
A screenshot, showing the output of an `readelf` and `diff` command. The readelf command conforms that the Rust compiler was build with the GCC  compiler backend. The diff command shows that the stage 2 and 3 builds are identical, which proves the resulting compiler is working as expected.

A screenshot, showing the output of an `readelf` and `diff` command. The readelf command conforms that the Rust compiler was build with the GCC compiler backend. The diff command shows that the stage 2 and 3 builds are identical, which proves the resulting compiler is working as expected.

The [GCC compiler backend](github.com/rust-lang/ru...) can now fully bootstrap(build) the Rust compiler!

This is my Rust GSoC 2025 project, and you can learn more about my progress here: rust-lang.zulipchat.com#narrow/chann...

If you have any questions, feel free to ask me!

23.05.2025 19:15 β€” πŸ‘ 26    πŸ” 6    πŸ’¬ 0    πŸ“Œ 2
Preview
Introducing Roto: A Compiled Scripting Language for Rust By Terts Diepraam We are working on an embedded scripting language for Rust. This language, called Roto, aims to be a simple yet fast and reliable scripting language for Rust applications. The nee...

Hey look! I've been working on a thing!

It's a statically typed, JIT compiled, hot-reloadable, embedded scripting language.

blog.nlnetlabs.nl/introducing-...

21.05.2025 10:44 β€” πŸ‘ 32    πŸ” 9    πŸ’¬ 0    πŸ“Œ 1
Evolution of Rust compiler errors Blog about programming stuff.

See how Rust compiler error messages have evolved over time :) kobzol.github.io/rust/rustc/2...

16.05.2025 21:14 β€” πŸ‘ 9    πŸ” 4    πŸ’¬ 0    πŸ“Œ 0
Two ways of interpreting visibility in Rust Last year, while I was browsing through Rust compiler pull requests, I noticed #126013, which added the unreachable_pub lint to several crates of the compiler. This piqued my interest, because I did n...

Wrote down some thoughts on how to interpret and use visibility in Rust.

kobzol.github.io/rust/2025/04...

23.04.2025 13:21 β€” πŸ‘ 2    πŸ” 3    πŸ’¬ 0    πŸ“Œ 0
Speaker Guide - RustWeek 2025 RustWeek 2025, The Netherlands - May 13 - 17 2025

The rustweek.org/speaker-guide/ says that:

The talk will be live streamed and uploaded to YouTube after you’ve been given a chance to review the recording.

So, I guess it will be streamed?

BTW: Congrats on getting a talk in!

21.04.2025 14:49 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Glad to hear you enjoyed it :). I hope you have a lovely day!

20.04.2025 20:09 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Implementation of Rust panics in the standard library

Have you ever wondered how panicking in Rust works?

My newest article describes the ENTIRE panicking process in great detail!

I hope you enjoy it, and have a great day :)

fractalfir.github.io/generated_ht...

#rust #rustlang #programing #cs

20.04.2025 10:20 β€” πŸ‘ 10    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
Preview
Corrosive C - Compiling Rust to C to target new platforms - RustWeek 2025 RustWeek 2025, The Netherlands - May 13 - 17 2025

I am giving a talk about compiling Rust to C at Rust Week in May.
rustweek.org/talks/michal/
Excited to see all the amazing people there!

In the meantime, if you want to know more about the progress I made in the last few months, I wrote an article about that :)
fractalfir.github.io/generated_ht...

11.04.2025 20:57 β€” πŸ‘ 11    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0
A screen-shot from Temple OS, showcasing a small Rust program running. It prints "Calling fold `n` times", and n is increased tenfold on each line.

A screen-shot from Temple OS, showcasing a small Rust program running. It prints "Calling fold `n` times", and n is increased tenfold on each line.

In the spirit of April Fools, i decided to do something silly. I modified my Rust to C compiler to output Holy C.

This allowed me to run a small iterator benchmark on Temple OS - meaning Rust is now one of the 2 languages running on that obscure system.

Is this useful? No.

Is it real? Yes.

01.04.2025 23:04 β€” πŸ‘ 12    πŸ” 4    πŸ’¬ 0    πŸ“Œ 0
An image of two 4D hyperspheres in a 3D room, with an opening in the 4th dimension. 

The right hypersphere is offset in the 4th dimension, allowing the light to bounce into the 4th dimension. In the reflection, you can see a different part of the 4th dimension, with the opening in a wall, and blue tiles on the floor.

This image was rendered using ray marching, and real-world laws of phsysics, extrapolated to the 4th dimension. The image aims to be photoreal, and accurately describe what one would see if they looked at a 4d world.

An image of two 4D hyperspheres in a 3D room, with an opening in the 4th dimension. The right hypersphere is offset in the 4th dimension, allowing the light to bounce into the 4th dimension. In the reflection, you can see a different part of the 4th dimension, with the opening in a wall, and blue tiles on the floor. This image was rendered using ray marching, and real-world laws of phsysics, extrapolated to the 4th dimension. The image aims to be photoreal, and accurately describe what one would see if they looked at a 4d world.

I have been experimenting with realistic renders of 4D space, using ray marching(image attached below, read alt text for an explanation).

Usually, visualisations of 4D space use projections or cross-sections of 4D objects. My render shows how 4D light would appear to your 3D eyes.
#art #math

09.03.2025 21:33 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Rust code running on a GameBoy. The screen contains the message "Preparing to run fold *n* times", with the number of iterations starting at 1, increasing tenfold each time, and ending at 10000.

Rust code running on a GameBoy. The screen contains the message "Preparing to run fold *n* times", with the number of iterations starting at 1, increasing tenfold each time, and ending at 10000.

I got code written in #rustlang running on a Game Boy :D.

While it is not the most useful thing, it is a nice way of showing how compiling Rust to C can allow us to target some old hardware.

rustc_codegen_clr(a Rust to C compiler) is still a bit from being fully usable, but it is getting there!

05.02.2025 21:06 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@fractalfir is following 20 prominent accounts