zenogais

Joined 14 years ago

Karma
615
Submissions
262
Member since
Mar 2
Software developer, armchair philosopher, and sometimes writer.
View on Hacker News

Recent submissions

Comment · 7 months ago
Yeah, I fully believe independent invention by mapping "the dark forest" onto the internet is very possible.
Comment · 7 months ago
Comment · 5 years ago
Like the author said this is completely unoptimized. The natural next step in optimization might be to profile and then SIMD optimize the slow bits in compression and decompression. This would likely produce a significant speedup and may even bridge the gap with lz4.
Comment · 5 years ago
What you're looking for exists today and is called a stable-coin (for example, USDC).
Comment · 5 years ago
Agree with this and I think it's the crucial point. Where I've had the most success with UML-like tools and diagrams is early on in a project since its much faster to rip up and rebuild a few diagrams. The diagrams also help with getting consensus among stakeholders that this direction makes sense and doesn't have any glaring holes.

Later on you can drop the diagrams entirely and perhaps keep them as some onboarding documentation if they're still useful.

Comment · 6 years ago
But it links to the Coinbase blog post in the "Inspirations" section on the front page?
Comment · 7 years ago
Cars aren't killing people though, it's the drivers of those cars. Such an odd headline.

Better title: "Why are drivers killing more pedestrians?"

Comment · 7 years ago
Comment · 7 years ago
It should work fine in the examples, but it won't work if you also attempt to use the -1 in the next slot to tell you which items are non-free.
Comment · 7 years ago
> This way you don't need to worry about keeping track of size and capacity either.

The only reason you don't have to worry about this is because std::vector handles it for you, at least in the code examples provided by the author. If you choose to go with a pure C implementation (which is what I'm trying out) then you will have to keep track of these.

> The reason I suggested -1 is because when we iterate through bd->items, we need a way to know if it's a valid value or just "holed".

Yep, I was able to get an example using -1 as a sentinel working and passing fuzz testing.

Comment · 7 years ago
Comment · 7 years ago
I wanted to like this article because I'm been thinking about this a lot in the context of game development, noticed a few things. One thing I'll say from briefly playing with this - the code leaves lots out a looks ostensibly simpler than it really is. Would very much appreciate tips / pointers on this or a more fleshed out and working implementation of the code.

For the bulk data with holes code:

First, there's an initialization step that has to happen the first time you allocate your bulk_data_t. Namely, you need to iterate through every item in the list and set its next_free item to the item following it, looping the last item back around to zero. You also need to do this for all the items between the new size and old size every time you resize your item list.

Second, safe iteration over all of the bulk data doesn't seem possible without adding some sort of flag to indicate whether or not an item is free.

Am I missing something here?

Comment · 7 years ago
Comment · 7 years ago
Comment · 8 years ago
^ This is pretty much standard at any startup in my experience.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton