HNHacker News
TopNewBestAskShowJobs

buybackoff

777 karma · joined September 23, 2014

submissionscomments
buybackoff··on Safe zero-copy operations in C#
For working with arrays elements without bound checks, this is the modern alternative to pointers, without object pinning for GC and "unsafe" keyword: MemoryMarshal. GetArrayDataReference<T>(T[]). This is still totally unsafe, but is "modern safer unsafe" that works with `ref`s and makes friends with System.Runtime.CompileServices.Unfafe.

Funny point: the verbosity of this method and SRCS.Unsafe ones make them look slower vs pointers at subconscious level for me, but they are as fast if not faster to juggle with knifes in C#.

The `fixed` keyword is mostly for fast transient pinning of data. Raw pointers from `fixed` remain handy in some cases, e.g. for alignment when working with AVX, but even this can be done with `ref`s, which can reference an already pinned array from Pinned Object Heap or native memory. Most APIs accept `ref`s and GC continues tracking underlying objects.

See the subtle difference here for common misuse of fixed to get array data pointer: https://sharplab.io/#v2:C4LghgzgtgPgAgJgIwFgBQcDMACR2DC2A3ut...

Spans are great, but sometimes raw `ref`s are a better fit for a task, to get the last bits of performance.

buybackoff··on What's New in C# 14: Null-Conditional Assignments
> is this actually needed

Yes, actually. I did write it multiple times naturally only to realize it was not supported yet. The pattern is very intuitive.

buybackoff··on Toothpaste made with keratin may protect and repair damaged teeth: study
Inetersting, the paper explain how remineralisation works and the role of F and fluoroapatite. This reminds me the recent Veritasium video about why Teflon is so strong - F chemical bonds are the strongest.

For Novamin alone, I've seen and understood the claims of sensitivity protection with hydroxyl-carbonate apatite (HCA). The paper explains it in 4.3. The layer is temporary and protects from acids, conserving the teeth tissue below.

But F is essential and my paste has it together with Novamin. It seems they may work well together. But the paper also explains that F works with saliva rich in minerals to repair the enamel. So if Novamin creates a strong layer, it may block access of F + saliva to enamel (my speculation, as in 4.2 they say "A clean tooth surface is required to access the mineral-deficient spot.").

So maybe a classical Ca+F paste is better overnight when no acid exposure is expected, but Novamin is nice in the morning before breakfast.

buybackoff··on Toothpaste made with keratin may protect and repair damaged teeth: study
I had an impression that Novamin creates an artificial layer as strong as natural enamel, and fills tiny holes that are responsible for high sensitivity with this material that crystallizes with water contact. Then normal Ca+F mineralisation is orthogonal. Novamin itself contains Ca, can it really migrate from the crystals into the tooth tissue?
buybackoff··on Toothpaste made with keratin may protect and repair damaged teeth: study
I feel it on the spot that was sensitive to cold, and that was the reason I looked for something new. The paste is of room temperature, so that feeling must be not a fluke. No idea if it actually works, F+Ca used to be enough.
buybackoff··on Toothpaste made with keratin may protect and repair damaged teeth: study
The picture says "enamel-mimicking" and the text says "protective coating that mimics the structure and function of natural enamel", so it looks like a protective layer, not true repair. I've been using a paste with novamin lately, it also creates a protective layer and is also marketed as "repair". I like it and feel some heat when it contacts with teeth, so the chemical reaction must be working. But the marketing leaves a bad taste in the mouth.
buybackoff··on lsr: ls with io_uring
A little offtop, but do you know a number in usecs that io_uring can save on enterprise grade servers, with 10G NICs, for socket latency overheads vs LD_PRELOAD when hardware supports that? Let's say it's Mellanox 4 or 5. My understanding is that each gives around 10us savings, maybe less. Based on some benchmarking, which was not focused on any of those explicitly but had some imprecise experiments. It also looks like they do not add up. Do you have a number based on real experience?
buybackoff··on Aeron: Efficient reliable UDP unicast, UDP multicast, and IPC message transport
It does have great tail latency. But it's not a silver bullet, but careful engineering. And you pay for the latency with spinning threads. It's the architecture that makes it to stand out. In the end, it's just the same old UDP sockets, not even io_uring at least in the free public version. But one can use LD_PRELOAD if hardware has this trick - but again, it's not specific to Aeron.
buybackoff··on Aeron: Efficient reliable UDP unicast, UDP multicast, and IPC message transport
I would not recommend using Aeron on long fat pipes with a chance of packet loss for hight throughput. It was several years since I stress tested this, maybe there have been improvements. I saw some work on that in release notes after. But that was the worst case as recovery was slow.

I would think of UDP with redundant encoding / FEC, to avoid retransmits.

buybackoff··on Aeron: Efficient reliable UDP unicast, UDP multicast, and IPC message transport
I mean multicast is often disabled not only in the cloud DCs, but on-premises as well, intentionally for different reasons.
buybackoff··on Aeron: Efficient reliable UDP unicast, UDP multicast, and IPC message transport
One of the greatest things about Aeron is just the fact it exists. If one goes e.g. to StackOverflow or a place with the same patronizing attitude of "experts", they will tell you no one needs UDP, even in the same DC on reliable network, especially no one needs multicast. Any sane person should use TCP with a loop for multiple destinations, they would say, and one should measure before optimizing, they would say. But they themselves probably never had a chance to measure. Yet Aeron guys, who are real expert in low-latency systems, just delivered an ultra-fast thing that is quite simple in design.

Aeron latency histograms vs TCP are quite nice in the same DC on enterprise-grade networking hardware. But it really makes sense to use if a single-digit or low-double digit microsecond latency improvement on P50 is worth the effort. Or if the long tail with TCP is a dealbreaker, as Aeron has much nicer P99+ regardless of how well optimized a TCP setup is. Also, if one can leverage multicast that's nice, but not only clouds have it disabled, and Aeron works fine with unicast to N.

However, there are gotchas with threading and configuration overall. Cross-DC setup may surprise in a bad way if buffers are not configured to account for bandwidth-delay product. Any packet loss on high-latency network leads to a nasty NACK storm that is slow to recover under load. It's better to set the highest QoS and ensure the network is never dropping packets, e.g. calculate the real peak instant load vs hardware capacity. Relative latency savings cross-DC become less interesting the longer the distance, so there's nothing wrong with TCP there. Another note is that, e.g. ZMQ is slow not because of TCP but because of its internals, almost 2x slower for small packets than raw well-tuned TCP sockets, which are not that bad vs Aeron. Also, Aeron is not for sending big blobs around, the best is to use it with small payloads.

Aeron is designed with mechanical sympathy in mind by the guys who coined this term and have been evangelizing it for years, and it's visible. Lots to learn from the design & implementation (tons of resources on the web) even without using it in prod.

buybackoff··on Someone at YouTube needs glasses
It's not the count if thumbnails, it's the algo that either does not work at all or works only for them. Average engagement and zero control. Paid or free, they do not care.
buybackoff··on JetBrains defends removal of negative reviews for unpopular AI Assistant
Just to be clear: JB have been and still are so ahead in ergonomics that I still cannot imagine going back to VS and I will renew my personal one without any doubt. For now. I just question their priorities.
buybackoff··on JetBrains defends removal of negative reviews for unpopular AI Assistant
I'm really concerned over the last couple of years that my two paid subscriptions (work/personal) go into AI BS development I do not need, instead of fixing pain points I have daily. It may continue for so long. I hope to see they defend the removal of AI assistant completely, by moving it completely off the main channel. They are not MSFT that can waste a billion here and there. Every AI feature they make is paid by existing users.
buybackoff··on France rejects backdoor mandate
France has great engineering tradition. One of the left leaders is PhD in math. As I mentioned, multiple comments by members of National Assembly were quite educated. The problem is with key politicians having perverse incentives and misrepresenting bad things to the less educated public.
buybackoff··on France rejects backdoor mandate
It's water that floats anyone's boats. It's the physics+linguistics. The problems start when people try to substitute the meaning of things.
buybackoff··on France rejects backdoor mandate
Cela s'appelle la laïcité.

If you have problems with that there are so many 3rd world countries that care about medieval stuff more than development. I think laïcité is one of the coolest words/concept, France should only really enforce it further.

buybackoff··on France rejects backdoor mandate
I admit ambiguity, but I meant 180 opposite. I believe France is and has been the top at individual freedom. That perception is an important reason I'm there, so I acted on it.
buybackoff··on France rejects backdoor mandate
What I had in mind is that I go to a local market every Sunday to buy some nice fresh food. But e.g. for the fish/meat I still only understand 1/3 or 1/2 of the names/terms. Nevertheless, I have read some lengthy tax code sections more than once in details... I do not cook like a French, and - oh - they cook really nice! :)
buybackoff··on France rejects backdoor mandate
I beliebe you are talking about the first derivative. I want to believe the second is all right lately.

The scariest thing in France I've seen is ~20yo voting for Mel-the-leftist-egocentric-schmuck so that they could keep doing nothing but taxing productive people. Other that that the "direction of travel" is dual: either drown in the mire of ever increasing taxes or kick ass. My feeling is that France has everything for the later, but for some weird reason prefers the former. Yet, in the meantime, it's OK. And the very latest geopolitics headlines are nice, if they ever come true.

My original point was about individual rights. I'm glad the country stands firm on that.

buybackoff··on France rejects backdoor mandate
I hoped that was a part of this EU debate. It's sad if not.
buybackoff··on France rejects backdoor mandate
I live in France for the last 5 years. Been to many places in the world. France is OK overall.
buybackoff··on France rejects backdoor mandate
I've found the original debates video on the National Assembly website. My French is good enough for that (not enough for cooking et al. though), so I believe I understood. I'm positively surprised by some deputies remarks. But Bruno (interior minister) Retailleau is either totally incompetent technically, with his advisors as well, or is a liar. "We will apply the math selectively, only for those that are a threat and when the big brother approves"... In every country it's the same narrative. This time it was not about children, but "Freeing France from the drug trafficking trap" ("Sortir la France du piège du narcotrafic"). And it looks like it was not the main point and they tried to pass it as a minor subnote or something. ... They will find dozens of other issues to cancel the math.

https://videos.assemblee-nationale.fr/video.16453163_67dc786...

buybackoff··on IronRDP: a Rust implementation of Microsoft's RDP protocol
Is it feature-complete with RDP and then some? As someone who has spent, over the last ~15 years, probably equal amount of screen time on RDP vs local (even in the office it's usually RDP to a blade, and at home a laptop to a powerful workstation; with remote work recently it's so much more and often nested), and someone who tried Linux on Desktop regularly and gave up because of inferior RDP alternatives (even GNONE 47 is a joke for RDP, but getting closer), - I learned to appreciate all the tiny details that make the RDP proper great.
buybackoff··on OpenAI Audio Models
I was experimenting recently with voiceover TTS generation. Did run Kokoro TTS locally and it's magical for how few resources it takes (runs fine in a browser), but only the default female voices (Heart/Bella) are usable, and very good. Then I found that Clipchamp has it built-in and several voices from a big selection there are very good, and free. I've listened to this OpenAI TTS and I could not like them at all even compared to Kokoro.
buybackoff··on Tailscale is pretty useful
I used to expose my workstation RDP directly but with a non-standard port. Then I became a "homelabber", and paranoid, and added a mix of nginx with basic auth in front of Guacamole. The UX in browser is so abysmal that I used it to configure direct RDP when I really needed to work remotely when traveling. Then I learned Tailscale and it is really liberating. Just direct RDP with negligible (for me) risks. I run OneDrive, JetBrains Toolbox, Podman just visible in the tray and what else as services, such as OpenVPN, etc. I keep Tailscale running only when I travel. I think paranoia should stop at some point, yet I still read the top comment about security/trust very attentively.
buybackoff··on There Was a Texas Lottery Arbitrage
It's not only a column but a daily email. Of 20 unread emails in my inbox 17 are these ones. It's too good to archive without at least skimming through. But it's a longish read and accumulates fast.
buybackoff··on Every line is a potential bug (2009)
For code, lines of code are not written, but spent, and often wasted.
buybackoff··on Ugandan runner Jacob Kiplimo completes first ever sub-57 minute half marathon
When I was running marathons and in good shape, I tried to reach Kipchoge's marathon pace on 100m. I did not reach it by a tiny margin. I disliked and never trained for short distanced and that was a single attempt for fun after 5K jogging, which was more a warm-up than a load. My shape was definitely above "the average human" at that time. Their speed is incomprehensible.
buybackoff··on Add "fucking" to your Google searches to neutralize AI summaries
Just use this https://www.google.com/search?q=%s&udm=14 as the default browser engine. See also https://udm14.com/.

I was late to this, but G's default search had been becoming worse and worse. The trick is equivalent to clicking the "Web" tab when you do default search. In 99.9% cases the "Web" tab is what I need, it's pure and no noise. I do not mind clicking the "All" tab e.g. for a tennis player last name during AO to get all details I need. Actually, for sport events the default G's functionality is insanely useful, such as live score updates.

← PreviousPage 2 of 7Next →