News for hackers. Stuff that matters.

averagedev

For me, the reason is simply that I like having a blog. Truth be told, I have no readers. I only post once in a blue moon, or whenever inspiration strikes, so that's to be expected.

A good blog can surely lead to all of what you're mentioning, but personally I wouldn't get into blogging with high expectations of any such benefit.

Obligatory xkcd: https://xkcd.com/927/
Re:Generics can make your Go code slower on Wednesday March 30, 2022 @01:57PM (#30858583)
I've found Go to be much simpler than Rust, especially syntax wise. However, in Rust you can use the ? operator which propagates errors. In Go you have to check err != nil.
Ok, the last one is pretty funny question. I tried it, and I got a different result:

Q: when is an appropriate time to cast your loved ones entirely in wax?

A: When you are ready to make a commitment to them.

That said, I like the product, and I think it has a lot of potential.

Re:Learning rust with entirely too many linked lists (2019) on Sunday February 13, 2022 @07:41PM (#30327182)
I've been reading Command-Line Rust[1], and I think it's nice. Each chapter has a challenge where you build a common command-line tool, like echo, cat, head, wc, etc.

Just like you, I do prefer the "learn while you build" approach. My personal experience has been that the book is a nice addition to reference-style books, such as the one you mentioned.

1: https://www.oreilly.com/library/view/command-line-rust/97810...

Re:The Factorio Mindset on Friday February 11, 2022 @05:36PM (#30307838)
My experience was similar. I tried Factorio once, and gave up because it was very tedious, and too much work to consider it fun. I would have liked to enjoy it, but it's not for everyone.
Re:Open Textbook Initiative on Wednesday February 09, 2022 @07:09AM (#30271719)
Great resource, thanks for sharing. As someone who wants to "re-learn" some college level math, this is invaluable.
Re:Creating a memory allocator for fun on Wednesday February 09, 2022 @07:06AM (#30271700)
Interesting. I don't code in C for a living, and I wasn't familiar with strict aliasing -- thanks for sharing your thoughts.

> Can't do that either I'm afraid for much the same reason, need to memcpy over the memory and trust the compiler to elide said copy

Would this apply even to mmap-ed memory? Especially for the bit you're quoting, I guess it can be fixed with a union (or even by using the same struct for both purposes). But since the TAlloc_malloc function returns a pointer to void *, to a location in memory that hasn't been used for any other purposes, perhaps this isn't a violation?

On another note, I was playing around a bit with strict aliasing rules, and oddly enough, the compiler that ships with Monterey (ARM mac) shows no warnings even for code that violates the rules blatantly. Same code threw a warning with GCC (I used an online compiler).

The memory allocator I wrote doesn't throw any warnings using GCC either, but I guess that doesn't mean much.

Re:Creating a memory allocator for fun on Sunday February 06, 2022 @02:48PM (#30236247)
Hi HN! Just a disclaimer that this is my own post. I thought you might find it interesting.