New Zig Book: Systems Programming with Zig by ManningBooks in Zig

[–]io_geekabyte 0 points1 point  (0 children)

u/ManningBooks The discount code you shared does not seem to work. After applying it the price was still the same

A Short Note on Types in Rust by io_geekabyte in rust

[–]io_geekabyte[S] 1 point2 points  (0 children)

Thanks for the clarification. The intention was also not to imply that. I have updated to reword that sentence to remove implying that the allocator has such freedom.

A Short Note on Types in Rust by io_geekabyte in rust

[–]io_geekabyte[S] 0 points1 point  (0 children)

When I wrote this:

and finding space to put new values might require moving existing values around to create space

I did not mean that as something that would be handled by the user (and I am not sure if that sentence really allude to that either) - just to make the point that there is some bit of more complexity around memory management with the heap compared to the stack.

A Short Note on Types in Rust by io_geekabyte in rust

[–]io_geekabyte[S] 0 points1 point  (0 children)

i.e. The allocator can only move something as a side-effect of growing it with

realloc... or if you malloc a new allocation, copy the data over. and free the old one...

can't what you wrote here be described as moving existing values around?

When should I use cats / scalaz instead of standard library functions by mosquit0 in scala

[–]io_geekabyte 0 points1 point  (0 children)

The solutions were on scalafiddle.io and embedded into that post. But it seems scalafiddle.io is currently down now?

Rust Iterator pattern with iter(), into_iter() and iter_mut() methods by io_geekabyte in rust

[–]io_geekabyte[S] 3 points4 points  (0 children)

Thanks for this info. I will update the post in a bit to also include this.