Uploaded February 2024 | Updated September 2026, 1 hour ago
Today we write a program in #zig that takes this list of temperatures where some are in fahrenheit and need to be converted to celsius.
This guy youtube.com/watch?v=FbSpuZVb164&t=444s actually did this in #awk (and a great solution) but his statement that writing a program takes forever sounded as a challenge.
The video by the guy is really good, gives a quick useful overview on awk.
So I wrote it in Zig and also Rust to see how long it would take.
A very decent dynamically allocated and testable/tested solution in Zig about an hour.
In rust 15 minutes, about the same time it would cost me to read the AWK man page and refresh my memory again.
zig code:
github.com/rdoetjes/tuts/tree/main/f_to_c
rust code:
github.com/rdoetjes/tuts/tree/main/ftoc
Today we write a program in #zig that takes this list of temperatures where some are in fahrenheit and need to be converted to celsius.
This guy youtube.com/watch?v=FbSpuZVb164&t=444s actually did this in #awk (and a great solution) but his statement that writing a program takes forever sounded as a challenge.
The video by the guy is really good, gives a quick useful overview on awk.
So I wrote it in Zig and also Rust to see how long it would take.
A very decent dynamically allocated and testable/tested solution in Zig about an hour.
In rust 15 minutes, about the same time it would cost me to read the AWK man page and refresh my memory again.
zig code:
github.com/rdoetjes/tuts/tree/main/f_to_c
rust code:
github.com/rdoetjes/tuts/tree/main/ftoc










