HNHacker News
TopNewBestAskShowJobs

buybackoff

777 karma · joined September 23, 2014

submissionscomments
buybackoff··on Poor Charlie's Almanack
This is so awesome and made me smile a lot! I have the physical book (expanded 3rd edition) but it's big and heavy. I could not take it with me when I relocated to another country with just 2 suitcases. But I miss it so much. In addition to the deep wit and wisdom the print quality is superior and very enjoyable. This website is the next best thing. Pdf of this book is a miserable torture.
buybackoff··on The One Billion Row Challenge
It's all on GitHub

Multiple languages: https://github.com/gunnarmorling/1brc/discussions My repo: https://github.com/buybackoff/1brc

buybackoff··on The One Billion Row Challenge
It takes 330 seconds on a machine where the top OpenJDK version takes 5.75 secs and my .NET version takes 4.8 seconds. However it's just several lines of code and I used ChatGPT as a fun use case for how long it would take to have something working. It took around 5 mins. So if one needs to run this code only once Pandas would be a huge win considering development time. Interestingly the RAM usage was much more than 14 GB input file, probably 2-2.5x of that.

BTW asking ChatGPT to utilize all cores did not yield anything working in reasonable time.

buybackoff··on If buying isn't owning, piracy isn't stealing
Not only sales, but market share/power. Imagine if J3QQ4... did not work for Windows 98... Linux on Desktop would be already perfect 20 years ago.
buybackoff··on Classes vs. structs in .NET: how not to teach about performance
YouTube and InfoQ are free and have lots of great content.

.NET is probably lacking good content. Yet many things from Java are directly applicable.

E.g. on benchmarking & performance, there are true gems on InfoQ by Gil Tene, Martin Thompson, et al. I would pay for that content after watching it. A problem with paid courses is that payment goes first before evaluation. Maybe both sides do not care in cases such as corporate spend on continuous education...

buybackoff··on Classes vs. structs in .NET: how not to teach about performance
Another course on another platform that overpromises and underdelivers - it is just noise. I did not want to discuss this subject beyond expressing some surprise. Fraud is a too loaded word, but this fits perfectly here: https://en.wikipedia.org/wiki/Hanlon%27s_razor

Benchmarking is hard. If not an art then at least a distinct skill. It goes beyond just using Bnechmark.Net. It's a good first step but far from enough. Oftentimes one need to make sure a compiler does not optimize away some benchmark paths, e.g. by using volatile field accesses. Especially if you want to avoid overheads and measure only certain things. But here it was so obvious it could be meme-tagged #YouHadOneJob.

buybackoff··on Classes vs. structs in .NET: how not to teach about performance
It's so appalling that a paid content could be that bad. For me the first benchmark that was doing nothing in both cases is as shocking as the second.

But the thing I wanted to highlight is that the blog author is a real authority on structs vs classes at a very very low level. His series on structs performance are must read for any .NET dev who cares about performance at low level. E.g. when to use readonly structs or when to use a mutable one to avoid excessive copying. That kind of things. https://devblogs.microsoft.com/premier-developer/author/sete...

He has published two analyzers on NuGet and both are must have. One is focused on the struct usage ErrorProne.NET.Structs and, for example, highlights cases of defensive copies and could suggest when to make a struct readonly.

https://devblogs.microsoft.com/premier-developer/avoiding-st...

https://www.nuget.org/packages?q=errorprone

buybackoff··on The .ing top-level domain
Hm, last time I tried 3 years ago paper mails were their only channel (after opening an account online). They were so past century. If they do anything with this TLD before improving their basic banking platform/UX it will only prove the point of how retarded they have been.
buybackoff··on OpenZFS 2.2: Block Cloning, Linux Containers, BLAKE3
Having Proxmox-based homelab setup I was waiting for quite a while for Linux containers support so that Docker in LXC containers just works. It was quite inconvenient when even a pull for a simple image freezes. Hopefully now a docker-composed single logical set of Docker containers (or just a single Docker container) per LXC container will just work without VM overheads.
buybackoff··on (next Rich)
There are 16 "talks" mentions as of this writing, yet I want to reiterate how important, insightful, useful and fun his talks are and watching them have been. They move a listener to a (next level). Good luck, Rich! Have a nice time in a hammock :)
buybackoff··on Beautiful branchless binary search
Branchless or not in this case, it still touches memory in not so good pattern. I found that a significant speedup of a classic BS could be achieved by switching to vectorized search when the remaining range has a width of 3-4 SIMD lines (or maybe even a little more). The bounds of that range are likely already touched and in cache, then prefetching helps. It has high likelihood of finding the target on a single SIMD compare, then switch to linear search on small data that is already in L1. It gives 30-50% gain on 1K items array of integers, 10-25% on 1M items, depending on data distribution. Here is an example in C#: https://github.com/Spreads/Spreads/blob/main/src/Spreads.Cor...
buybackoff··on Show HN: Ractor – a Rust-based actor framework with clusters and supervisors
When I was looking for a name for my now-archived distributed actors system based on Redis ( https://github.com/buybackoff/Ractor), the choice for Redis+Actor was between Reactor, Redactor and Ractor. Then I found a reference to The Diamond Age book (https://en.m.wikipedia.org/wiki/The_Diamond_Age) where a ractor is a virtual actor in interactive games and movies working from a computer-provided script. I found it somewhat fitting to the actors abstraction. And the most cyberpunky.
buybackoff··on I/O is no longer the bottleneck
Having dealt with several data parsers I would like to somehow estimate how much electricity is burned globally just for lazy implementations. E.g. in .NET non-devirtualized `Stream.ReadByte` is often one of the hottest methods in a profiler. It and related methods could easily be responsible for double-digit share of CPU when processing data. I mean, it's not IO but just pure overheads that disappear with custom buffering where reading a single byte is as cheap as it should be.
buybackoff··on Ask HN: Where to buy cheap but good quality glasses in Europe?
Essilor 1.7 aspheric lenses cost me 235 euros each. An alternative is Japanese Seiko and German Zeiss. Essilor is probably the cheapest of them. Good lenses cost much more than a nice Luxottica frame and are covered by insurance in France. A frame is covered by up to 100 euros.

Good lenses are not a piece of glass (very dangerous for eyes) or just a piece of plastic, they have multiple anti-reflection and protection layers and must be very precisely done. High refractive index is also very important for a reasonable thickness at edges. So I would not go for some no-name cheap lenses. Given the math, the price of a frame becomes less important.

buybackoff··on Must be this tall to write multi-threaded code (2015)
I would change to edit MT code. It usually starts with a clear picture in mind... But even one's own code quickly becomes cryptic without lots of comments and hidden assumptions. I used to have this picture printed and put above a server in a small startup-like team. The whole thing ended not related to any lock or interlocked call though.
buybackoff··on Portugal announces immediate granting of visas for Ukrainian refugees
And Portugal should cancel Abramovich citizenship, who is one of the closest to Putin oligarchs. My guess is at the time when he applied for citizenship he knew about what was going to happen, at least in general. Now as a citizen of EU member state he is exempt from yesterday's EU sanctions and probably any future sanctions. I'm afraid EU will not be able to impose personalized sections on him while he has this citizenship.
buybackoff··on LXC vs. Docker
Even with ZFS you still have to wait for RAM to dump, haven't you? And it will freeze at least for the dump write time. Do they have CoW for container memory?

But even if they had, the RAM snapshot needs to be written, but without freezing the container. I would appreciate an option when I could ignore everything that was not fsyned, e.g. Postgres use case. In that case the normal ZFS snapshot should be enough.

buybackoff··on LXC vs. Docker
LXC via Proxmox is great for stateful deployments on baremetal servers. It's very easy to backup entire containers with the state (SQLite, Postgres dir) to e.g. NAS (and with TrueNAS then to S3/B2). Best used with ZFS raid, with quotas and lazy space allocation backups are small or capped.

Nothing stops one from running Docker inside LXC. For development I usually just make a dedicated priviledged LXC container with nesting enabled to avoid some known issues and painful config. LXC containers could be on a private network and a reverse proxy on the host could map to the only required ports, without thinking what ports Docker or oneself could have accidentally made public.

buybackoff··on KeePassXC – Cross-Platform Password Manager
It could automatically load SSH keyd to Putty Agent on DB opening. Nice convenience for e.g. GitHub keys. Learned about it accidentally after long usage. It performs great for core functions. I store the db in DropBox and the second factor key file in OneDrive personal vault.
buybackoff··on Inline Assembly in F#
The problem with methods such as GetCPUCyles or GetCPUCoreId is that .NET delegate calls are never inlined. Unmanaged calli calls are not inlined either. PInvokes could be inlined but have their own overheads for managed<->native transition. These overheads could be higher than a small method body. It would be really cool to generate function pointers with the default managed calling convention, basically what JIT does for normal methods. I mean, packing assembly into the body of a managed function, which has a chance to be inlined.
buybackoff··on Do svidaniya, Igor, and thank you for Nginx
I "scanned" the article twice, so could have missed. First time I did quit, because HN comments are often more clear and useful instead of "reading" every noise they publish out there. And I did not find what I was looking for. The second time I scanned again after I posted, just to find the paragraph if it was there at all. Even if it was in the 4th originally, it's still far too off. It should have been in the first sentence of the first paragraph.
buybackoff··on Do svidaniya, Igor, and thank you for Nginx
I would rather think machine translation and learning foreign languages should be better in general. But that is probably a C2-level subtlety, so if a non-Russian was writing that I could understand.

I imagine a situation: EN copywriter asks a RU colleague how to say "Goodbye", gets "Do svidaniya" as a transliteration without a context, and just puts it there. Which sounds like farewell.

buybackoff··on Do svidaniya, Igor, and thank you for Nginx
It's worse than that, the first thing that I scanned in the article is if he is alive. A title like that without a pre-defined context more often, in my native Russian perception, could mean much worse that just leaving a company. I'm glad he's doing well, I really enjoy NGINX as a casual user. It is a great gift to people. Удачи (good luck) or всего хорошего (best wishes) would not trigger such a reaction to scan the article for me.

I've just counted: only on the 13th paragraph I could get the answer.

buybackoff··on Switching to an N95 mask gives a 75x boost in Covid protection
It escapes during exhale since it naturally pushes the mask away and the fit becomes looser. During inhale air pushes the mask toward the face and the fit becomes tighter.

Most problems are during some, even light such as walking, physical activity when more air is needed. Inhaling is limited by the mask, but it cannot hold a strong exhale. I imagine sitting in a subway or a train should be fine. Hope to get on a train trip in 2 weeks so I would rather postpone my second covid, that's why I'm going for those inconveniences.

buybackoff··on Switching to an N95 mask gives a 75x boost in Covid protection
I've bought a pack of N95 couple of days ago. Glasses are a major first problem. When I exhale most of the air goes out above straight into the glasses. With the cold temperature outside it's problematic to see. But IMO this proves the point that N95 masks are mush better. It slightly collapses when I inhale and most of the air goes through it, the fit is good. While for ordinary masks the air goes freely through the sides. Ordinary masks protect others from large droplets, but small droplets or aerosol go freely with the air. N95s become quite wet inside quite quickly for that reason.
buybackoff··on Motorists have been stranded on a major interstate in Virginia since last night
This page made me smile almost like when I had only started to use internet. Expected to see such a subthread before wanting to post similar.
buybackoff··on If – A Poem by Rudyard Kipling
English is not my native one, English poetry in general used to sound strange to me after Pushkin et al. (could hardly get the rhymes if they are there at all). But this particular one is my "forever unread starred email to myself" (1 of 3 such emails) for 8.5 years as I've just checked. It's so strong and right and good. Happy New Year!
buybackoff··on “Zero fucks given” in other languages
The most delicate and quite popular is "It's purple to me" / Мне фиолетово.

The story goes that it came from chemistry, where a litmus paper is purple in a neutral liquid, so a person does not react in any way.

buybackoff··on Against 3x Speed
Just last Friday I had to google how to increase YouTube speed above 2x. Found quick and dirty solution: `document.getElementsByTagName("video")[0].playbackRate = 3` in a browser console. Some people are just impossible to listen to due to their slow pace. In my case, it was possible to understand at 5x and quite comfortable at 3.5x.
buybackoff··on Apache Guacamole
I've just checked before replying above, IP changes on every reconnect while being in the same room. It would be really bad usability with a whitelist. In my setup only 2FA cannot be saved in a browser, and login session is valid for a long time, so I do not have to re-login on every reconnect.
← PreviousPage 4 of 7Next →