I like technology, computers, programming, solving problems, math, science, motorsport, traveling... Jack of all trades, master of almost none.
I've been myself thinking about getting back to some C/C++ projects but not getting enough motivation when I think about tooling.
I've been myself thinking about getting back to some C/C++ projects but not getting enough motivation when I think about tooling.
However the explanations it provided about the hard concepts to grasp in Rust were spot on and definitely taught me a lot!
I think LLMs are great as teachers.
However the explanations it provided about the hard concepts to grasp in Rust were spot on and definitely taught me a lot!
I think LLMs are great as teachers.
For some time I didn't know this or would forget and need a refresher. Go is minimal and easy to keep in your head for life, but details like this weren't for me.
I would forget sometimes, finding out the hard way at runtime. Rust improved me as a go coder by being so picky at comptime.
For some time I didn't know this or would forget and need a refresher. Go is minimal and easy to keep in your head for life, but details like this weren't for me.
I would forget sometimes, finding out the hard way at runtime. Rust improved me as a go coder by being so picky at comptime.
Then I learnt Rust and it really made me think. The mut keyword is clear. Better than the implicit way in go where a reference implies mutability and a value immutability.
Then I learnt Rust and it really made me think. The mut keyword is clear. Better than the implicit way in go where a reference implies mutability and a value immutability.
const name = "John";
const age = 30;
Javascript:
const message = `My name is ${name} and I am ${age} years old.`;
Zig:
const message = std.fmt.allocPrint(alloc, "My name is {} and I am {} years old.", .{ name, age });
const name = "John";
const age = 30;
Javascript:
const message = `My name is ${name} and I am ${age} years old.`;
Zig:
const message = std.fmt.allocPrint(alloc, "My name is {} and I am {} years old.", .{ name, age });
Zig is explicit when this happens. It does not allow, hidden allocations. So if we were to use something like a + operator, it would hide the allocation.
My favourite functions:
std.fmt.allocPrint
std.mem.concat
Zig is explicit when this happens. It does not allow, hidden allocations. So if we were to use something like a + operator, it would hide the allocation.
My favourite functions:
std.fmt.allocPrint
std.mem.concat
There's no need to match individual allocs with frees each time, lowering the chances of creating a leak by forgetting to free.
There's no need to match individual allocs with frees each time, lowering the chances of creating a leak by forgetting to free.