HNHacker News
TopNewBestAskShowJobs

jzwinck

5,693 karma · joined December 14, 2011

submissionscomments
jzwinck··on Curl HTTP/3 Performance
What makes QUIC less efficient in CPU and memory usage?
jzwinck··on The C++20 Naughty and Nice List for Game Devs
I agree with this, and I will take it a step further: people who want the compiler to know the ranges of their variables to enable better optimizations should use the various "assume" attributes/builtins which have existed for a long time. The compiler can do way more if it knows your loop count is max 5 than if it knows it is max 2 billion.
jzwinck··on The C++20 Naughty and Nice List for Game Devs
Doesn't the same footgun apply to function call arguments which are evaluated in an unspecified order?

    f(a++, b++)
That footgun doesn't seem to have very much impact in the real world that I've seen. Largely because people do not write complex expressions like that anymore. Since we already mostly avoid such expressions, we may as well take the benefit for designated initializers.
jzwinck··on The C++20 Naughty and Nice List for Game Devs
Passing a message via a shared memory queue (twice) is not 1000x slower than a non-inlineable function call.
jzwinck··on The C++20 Naughty and Nice List for Game Devs
Instead of literally loading the plugin into the same address space as the host process, you could launch it as a separate process and use sockets or shared memory to communicate. With a slight shift in API design this might actually be better than traditional dynamically loaded plugins. It will tend to level the performance playing field across languages (e.g. no JNI penalty for plugins written in a JVM language). And it will prevent plugins crashing the host.
jzwinck··on Eurostar Amsterdam to London trains cancelled for six months
Eurostar would prefer business travellers. It may get its wish when it moves to Amsterdam Zuid station in 2036 (nearer the new business district, farther the stroopwafels).
jzwinck··on Shellcheck finds bugs in your shell scripts
You asked about:

> a script that counts the number of lines in files versioned by git

I'm saying that is not a realistic production program that most of us would need.

If you want it as a personal utility to use in your own shell, absolutely you can use bash. I'm responding to the idea that such a trivial script would have long term use in production.

jzwinck··on Shellcheck finds bugs in your shell scripts
What bash is unavoidable? The aliases and functions you define in your personal shell, sure. But what else?
jzwinck··on Shellcheck finds bugs in your shell scripts
Toy examples should not guide larger decisions. And even if that trivial script you describe is really what goes into production today, tomorrow someone will modify it and introduce a quoting bug or a poorly-done command line option facility or whatever.
jzwinck··on Building a high performance JSON parser
What is faster? According to https://github.com/kostya/benchmarks#json nothing is.
jzwinck··on A small warning about UDP based protocols
Clients could use the same certificate for every server, so there is only a one-time setup. Analogous to how clients need to be "configured" with an IP address, the certificate could be given to them by their internet gateway if desired.
jzwinck··on A small warning about UDP based protocols
One way could be to require signing with a TLS certificate whose hostname resolves to the source IP(s).
jzwinck··on NASA just sent a software update to a spacecraft 12B miles away
NASA have a history of reusing bits and pieces when they develop new vehicles and systems. If someone learns how to control Voyager there may not be much left to figure out if they want to control New Horizons etc.
jzwinck··on Making Hard Things Easy
Sometimes they are. It depends on how the capture was generated. If you look in the options of Wireshark there is one to detect bad checksums, so clearly there is a way to capture them. Here is one such way: https://stackoverflow.com/questions/22101650/how-can-i-recei...

This can be used to detect partially-bad network cables, because there is no reason you should ever receive a bad FCS.

jzwinck··on Making Hard Things Easy
Wireshark is great but it does not show you every byte the network carried. For example it never shows Ethernet preambles, only sometimes shows Ethernet frame checksums, and never shows interpacket gaps (which are a required part of the Ethernet protocol).

So yes it comes close but it just goes to show you, there is always more detail hiding somewhere!

jzwinck··on Parsing integers quickly with AVX-512
I agree but it's Daniel not Doug.
jzwinck··on Parsing integers quickly with AVX-512
Not literally atoi() because most people don't use that anymore, but the C++ std::from_chars() uses SIMD in GCC 12+, thanks to some of the same people behind the OP: https://lemire.me/blog/2022/07/27/comparing-strtod-with-from...
jzwinck··on ‘Less than half’ fresh produce sold globally makes any profit
Bananas also serve another important function which ensures their continued success as an export product: https://www.europol.europa.eu/media-press/newsroom/news/65-t...
jzwinck··on National Motorcycle Museum Closing Its Doors
While we are recommending other motorcycle museums, I thoroughly enjoyed Museo Piaggio in Italy. It has quite a large collection, and it's free. It's easily reached by mass transit.
jzwinck··on Compile time regular expression in C++
No.
jzwinck··on Compile time regular expression in C++
Compile with -fno-math-errno. Almost nobody checks errno for math functions, and disabling it can give a huge speedup.
jzwinck··on Ask HN: In person industry tours and site visits?
Lack of a debugger should not be a problem, as we all know printf is the best debugger. Unfortunately this system's printf implementation has numerous known and unknown output bugs, so what it tells you requires many years of training to interpret with 70% accuracy.
jzwinck··on Show HN: Rapidgzip – Truly Parallel Gzip Decompression with 10 GB/s
Thank you for the thorough answer. That is all quite methodical and impressive, bringing together good ideas from disparate projects into a single solution with new benefits.

For people like me who have battled this demon before, it would help to explicitly say that you support any gzip file by way of this special magic. At least on my cursory reading of your page I did not understand this. And I never heard of gzrecover, so thanks for that too.

I like how the pugz paper starts with "Decompressing a file made by the gzip program at an arbitrary location is in principle impossible." Until today I believed the same!

jzwinck··on Show HN: Rapidgzip – Truly Parallel Gzip Decompression with 10 GB/s
Does this work with files compressed using the usual gzip command line program?

I thought you had to write "sync points" inside a gzip file to support reading from locations other than the start. If you somehow bypass that requirement, can you explain how?

jzwinck··on Ask HN: How to handle Asian-style “Family name first” when designing interfaces?
I lived in Asia for many years and worked with people from many places there.

It's common to hear "How should I address you?" This is equivalent to the people here suggesting a "nickname" field (good idea).

There are people with only one name. Don't make them double it (Ananda Ananda).

There are people with several given names. But they may only want to be called by the first, or the first two, or the last.

There are people who wish to be called by their full name. They may find it jarring to be addressed by just one piece of their name.

Finally there are people who go by a name which is not part of their legal name at all. Short forms like Bob instead of Robert, but also freeform names for various reasons, perhaps the most sensitive being that some government official may have determined their legal name contrary to their own wishes. Imagine your mother named you Sue but someone decided that must be short for Susan and put that on your government documents.

Related: when people want to show which part of their name is the family name, they either make it all uppercase or underline it. You can see this on some CVs but it happens elsewhere too when a full name is going to be read by people who don't know the addressee.

jzwinck··on STX – C++17 and C++ 20 error-handling and utility extensions
std::optional is not a pointer. And it has a safe dereference method called value() if you want the extra runtime check which operator* skips.
jzwinck··on Which is the most useless watch complication?
I was curious so I read about how that one works. It does exactly what one would need for a sailing race. It is the only mechanical watch I've seen which has a "sync" button to lock on to the race pre-start signals. That's extremely important.

There were digital watches with this feature sold by Optimum Time and Gill, but they have been unavailable since 2021 or so: https://www.tradeinn.com/bikeinn/en/gill-race-watch/1330814/...

I tried using a Garmin smart watch instead. It had a race start app, but it was way more fiddly than a non-smart race watch, to the point of not being usable for serious racing.

So while I would never buy the Yachtmaster, I appreciate its dedication to a function which is essential to racing sailors and poorly supported by other makers.

jzwinck··on Tell HN: Rust is the superglue
What do they use m4 for?
jzwinck··on JDF.jl – Julia DataFrames serialization format
There is no practical Pandas DataFrame binary format on disk. They have "tofile" which is not portable across machines. They have "to_hdf" which produces files no other library understands in an intuitive way. They mostly recommend "to_csv" with all the usual problems of CSV.

NumPy does have an official documented format which is straightforward to read and write from other languages if you write some code yourself, but still doesn't have very wide support outside of Python.

jzwinck··on Teenager ‘taken to security room and interrogated’ for throwaway ticketing
The UK's National Rail used to have a "4 for 2" offer. Four people could travel together with a 50% discount if booked in advance.

One day our friend was ill but three of us weren't going to miss the only sunny day of British summer so we went without him.

The ticket agent on the train was quite insistent that we were breaking the rules...and I guess in some sense we were, as the tickets did say four people had to travel together. We ended up with a "One time courtesy exception" so we could continue our journey.

National Rail later revised the program to a 33% discount for groups of 3 or more.

← PreviousPage 2 of 34Next →