HackerTrans
TopNewTrendsCommentsPastAskShowJobs

thrwyexecbrain

no profile record

comments

thrwyexecbrain
·11 gün önce·discuss
"Dot" in zig is a placeholder for types that can be unambigously inferred from the surrounding expression.

So ".unknown" is a standin for "SomeEnum.unknown" or "SomeStruct.unknown", depending on what .format is.
thrwyexecbrain
·5 ay önce·discuss
The Zig maintainers clearly think that keeping up with the undocumented native API is less headache than using the documented but notoriously inelegant win32 API.

This might very well be a good idea. Microsoft is not going to change a vital piece of their OS just on a whim. I would wager that even if they wanted to, they would not be able to do so that easily. A large organization maintaining a large software with a billion users just does not move that fast.
thrwyexecbrain
·7 ay önce·discuss
Overcommit only matters if you use the system allocator.

To me, the whole point of Zig's explicit allocator dependency injection design is to make it easy to not use the system allocator, but something more effective.

For example imagine a web server where each request handler gets 1MB, and all allocations a request handler does are just simple "bump allocations" in that 1MB space.

This design has multiple benefits: - Allocations don't have to synchronize with the global allocator. - Avoids heap fragmentation. - No need to deallocate anything, we can just reuse that space for the next request. - No need to care about ownership -- every object created in the request handler lives only until the handler returns. - Makes it easy to define an upper bound on memory use and very easy to detect and return an error when it is reached.

In a system like this, you will definitely see allocations fail.

And if overcommit bothers someone, they can allocate all the space they need at startup and call mlock() on it to keep it in memory.
thrwyexecbrain
·8 ay önce·discuss
Do the arguments have to be strong? I do not think they need to provide any justification. If the core developers decided that they would be more happy (or less miserable) with a different service, then let them.
thrwyexecbrain
·3 yıl önce·discuss
The Internet Speculative Fiction Database is a great resource for publication details of fiction stories. Here is the entry for The Star: https://www.isfdb.org/cgi-bin/title.cgi?40913
thrwyexecbrain
·3 yıl önce·discuss
I was about to comment that the correct plural form of nova is novae, but it looks like dictionaries say that both novae and novas are correct. The irregular case does seem to predominate according to google ngram viewer.