Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thrwyexecbrain
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
thrwyexecbrain
3mo ago
"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
2.
▲
by
thrwyexecbrain
7mo ago
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
3.
▲
by
thrwyexecbrain
10mo ago
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 ima
4.
▲
by
thrwyexecbrain
10mo ago
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.
5.
▲
by
thrwyexecbrain
1y ago
I miss the mention of boost::asio in this thread. At first glance this new Io interface feels not that dissimilar to it: Both are generic interfaces over an event loop/executor supporting async or blocking operations. Both ship a threa
6.
▲
by
thrwyexecbrain
1y ago
Having a limited number of known callees is already better than a virtual function (unrestricted function pointer). A compiler in theory could devirtualize every two-possible-callee callsite into `if (function_pointer == callee1) callee1()
7.
▲
by
thrwyexecbrain
1y ago
I think you just initialize Reader and Writer with a zero-length buffer.
8.
▲
by
thrwyexecbrain
1y ago
Just to start some discussion about the actual API and not the breaking change aspect of it: I find the `Reader.stream(writer, limit)` and `Reader.streamRemaining(writer)` functions to be especially elegant to build a push-based data transf
9.
▲
by
thrwyexecbrain
1y ago
Nothing fancy, I found that one can do almost anything with std::vector, a good enough hash map and a simple hand-rolled intrusive list.
10.
▲
by
thrwyexecbrain
1y ago
The C++ code I write these days is actually pretty similar to Rust: everything is explicit, lots of strong types, very simple and clear lifetimes (arenas, pools), non-owning handles instead of pointers. The only difference in practice is th
11.
▲
by
thrwyexecbrain
2y ago
For me, someone from outside the Anglosphere, the British Empire is a distant and unfamiliar concept. I am always bothered by characters in historical fiction speaking with a British accent just to make an impression of ancientness. The ant
12.
▲
by
thrwyexecbrain
2y ago
One downside of this approach is that the tested code itself has to be modified to accomodate the testing code. I think the same could be achieved by launching two threads and single stepping them with ptrace to "randomly" interle
13.
▲
Why the USA is windier than Europe [video]
(youtube.com)
2 points
by
thrwyexecbrain
2y ago
|
0 comments
14.
▲
by
thrwyexecbrain
3y ago
I would absolutely not recommend auto-formatting a legacy codebase. In my experience large C++ projects tend to have not only code generation scripts (python/perl/whatever) but also scripts that parse the code (usually to gather d
15.
▲
by
thrwyexecbrain
3y ago
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
16.
▲
by
thrwyexecbrain
3y ago
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.
17.
▲
by
thrwyexecbrain
3y ago
Despite absolutely loving chess as a child, I never studied it professionally, and I did not even play a single game after primary school. A couple of years ago I stumbled upon a chess video recommendation here on Hacker News. It was the 27
18.
▲
by
thrwyexecbrain
3y ago
In Calibre (the ebook management software) there are two fields: "author name" and "author sort name", both free-form text. The latter serves as the sort key when the books are ordered by author. I have found this soluti
19.
▲
by
thrwyexecbrain
5y ago
The sizeof(variant) example is wrong. An extra byte is needed to store the discriminator value, which in practice results in 8 extra bytes for these particular types because of alignment. https://godbolt.org/z/vno3v9rPK
20.
▲
by
thrwyexecbrain
5y ago
In Bash (not every shell supports this) functions can be exported, which enables this nice pattern with xargs: myfunc() { printf " %s" "I got these arguments:" "$@" $'\n' } expor
21.
▲
by
thrwyexecbrain
5y ago
This wikipedia article is not very accurate. In Hungary "informatika" is usually used only for primary/secondary school subjects covering every-day IT tasks like document editing, typing, or sending email. The most commonly u
22.
▲
by
thrwyexecbrain
6y ago
Your comment reminded me of a clever and well-written short story called "Understand" by Ted Chiang. > We could fuzz it and see if we can crash a brain. Sadly, this we already know. Torture, fear, depression, regret; we have a