HNHacker News
TopNewBestAskShowJobs

xenadu02

10,977 karma · joined May 14, 2014

all comments are my own personal opinions
submissionscomments
xenadu02··on 10Gb/s Ethernet: switching to a Broadcom SFP+ module
I don't think that's quite true. Unifi 10GbE switches are cheap enough I have a 24 port PoE+++ one in my house and my 3 main WiFi APs are 10GbE connected. My MBP uses a 5Gbps Thunderbolt adapter that runs relatively cool as well. All of this is over the existing Cat5e wiring.

I'd say 10GbE has arrived. It is relatively cheap, most of the time works over existing 1GbE cabling, and gracefully degrades to 5/2.5/1Gb based on conditions when it can't reach 10Gb.

Yes to be 100% guaranteed of getting 10Gb even in bundles of 100 cables running over noisy fluorescent ballasts to a full 100m you need Cat6A but in many environments Cat5e or Cat6 is more than sufficient. It works so well if you fail to get the full 10Gb I humbly suggest you re-do the terminations on both ends before considering replacing the cable.

xenadu02··on TIL: You can make HTTP requests without curl using Bash /dev/TCP
As a kid in the late 90s my mind was blown when I realized I could telnet to port 80, 25, or 110 and interact with the servers manually.

Simple get: GET / HTTP/1.1 Content-Type: text/html User-Agent: l33t hax0rs lol X-Funny-Monkey: farts

For sending a mail message on port 25: HELO mail-from: whoever@whatever.com mail-to: sysadmin@yaya.com <other headers> <blank line> Body of the message yay. <two blank lines to end>

POP3 was so long ago I forgot but you could list the mailboxes then get individual messages and so on.

This revelation was the beginning of "there is no magic" for me. The realization that every part of the computer was built by human beings and was at some level understandable if one undertook the effort.

Perhaps most people in the future won't bother. They'll just let agents do it all. I'm sure that will leave some interesting holes in various systems for people willing to actually learn how they work without the filter of a model (or its safety rails).

xenadu02··on Copper transport drug restores memory and clears toxic Alzheimer's proteins
Let's put all of that aside for a moment.

When the first drugs targeting HIV arrived the results were undeniable. Yes the drugs sucked for various reasons and yes HIV would evolve resistance. But the data demonstrated a very clear link that these drugs suppressed HIV and suppressing HIV made people live longer. Or consider mRNA and COVID, a great success story where the technology was put to good use and the results are obvious.

On the flip side we have certain cancers like certain breast cancers, melanoma, etc that never had a "wow" moment where some miracle turned them from highly fatal into treatable but we have seen decade after decade treatments improve and survival rates march ever upward such that what were once almost guaranteed death sentences are now often very treatable.

These are two disease treatment models worth keeping in mind. Sometimes major leaps are made. Sometimes progress is slow.

Now if we consider amyloid beta therapies: we have treatments that target amyloid beta with varying degrees of success but at least some show definite reductions in amyloid beta plaques. To the best of my knowledge that has not shown to improve outcomes in Alzheimer's patients to any meaningful degree.

That concerns me and I think justifies some skepticism of the amyloid hypothesis. The data is messy but if amyloid beta were a symptom not a cause that could certainly fit the results we are seeing. That doesn't mean the amyloid beta hypothesis is wrong but I think skepticism of the "state of the art" in the field is warranted given the pathetically ineffective progress made to date.

xenadu02··on Providers, not insurers, are responsible for excess U.S. health care cost (2024)
By definition a free market in healthcare requires forcing some people to die from a treatable injury or condition to discover the optimal price. That's part of the definition.
xenadu02··on US Consumer Price Index up 4.2%
That's by design.

If currency doesn't devalue then stuffing it under a mattress looks like a reasonable alternative to investing. If we hit deflation you can receive gains for "free" and borrowed money becomes more expensive over time. Neither of which our economic system is setup to handle.

We punish people who hoard cash by devaluing it thus encouraging them to put the money to work.

xenadu02··on Unix in East Germany (GDR) (1990)
> with the US actively sabotaging their access to information and hardware

More like they didn't see the need and didn't invest in early computing and so lagged behind. Something the US very nearly almost did as post-war a lot of people didn't see the point. Software engineers (though they weren't called that) were seen as unimportant secretaries who just typed letters into the computer. Grace Hopper's Navy computing unit famously had to raid other offices at night for resources.

> I suspect this was partly to facilitate cloned hardware, but i do also suspect they wanted their systems to be approachable by engineers from around the world, too, so diverging too much would have been detrimental.

Computing advanced so quickly it showed the Soviet-style communist system for the lumbering boondoggle it was. By the time the central committee deigned to allocate resources for computing they were a generation behind and that only got worse. They stole western design and software because they didn't have the economic leeway to do it themselves.

You need to remember: by the 60s/70s the western economies were taking off in says Warsaw countries were never able to match. They simply did less and did it less efficiently across almost all sectors of the economy. No one had to cheat them or restrict them. They shot themselves in the foot repeatedly.

There were no startups. You had to petition the central government for permission to build more computers. They would assign you a quota. You built that many computers. In the mean time 12 new startups were founded in the US and two of them came up with new chip designs and shipped them to customers. Doesn't take a genius to understand why the soviet sphere was a compete non-entity in computing.

xenadu02··on C array types are weird
> Actually pre-ANSI C technically didn't have function prototypes,

Thanks, I completely forgot they weren't called prototypes originally.

xenadu02··on Claude Code as a Daily Driver: Claude.md, Skills, Subagents, Plugins, and MCPs
The percentage of times I prompt claude "what about checking if there are any child processes running?" or "Would using a lock here greatly simplify the design?" only to have myself be correct is approaching 100%. That is it isn't just claude sycophantically agreeing with me. The code itself becomes smaller, simpler, and more reliable with fewer bugs.

The agents tend to produce working code but the larger the scope the bigger the mess they tend to make. They will happily evolve toward a local maxima but leave world-destroying bugs lurking in the implementation.

The other issue is that claude regularly ignores explicit instructions in CLAUDE.md or in prompts. It will "helpfully" decide to just start doing whatever it wants or reinterpret instructions completely differently than it did the last 100 times.

It has nothing to do with losing control or trust. LLMs are not conscious. They have no executive function. They aren't even thinking. They're just models predicting the next word in the script. They are very useful tools but that's all they are: tools.

xenadu02··on C array types are weird
Not just this it is important to remember that there was no "aha!" moment where C was created whole-cloth by writing the first compiler in B then cross-compiling.

The language B was evolved in-place by adding new features, then editing the compiler source to make use of those new features, then repeating. They simply started calling it "New B". At some point the language had evolved sufficiently that they decided to call it C.

The semantics of arrays were inherited from B and simply never changed. Part of me suspects this was also because it was seen as "clever" at the time. Look ma, we let arrays turn into pointers! Isn't that clever?

When you look at pre-ANSI C function prototypes you wonder "where are the parameter types?" because there are none. The compiler didn't bother to check. Part of that was perhaps for implementation reasons but a big part of that was the feeling or culture inherited from B: in that language you just had words of memory. You were free to interpret any word of memory as any data type you liked. So duh of course it is up to you to decide how many parameters your function received and of what type. If the caller supplied a different number or different types? Don't do that.

If you are coming from that sort of world clever tricks like arrays decaying to pointers or automatically converting between data types and sizes seems perfectly natural. Anything C offers above and beyond that is an improvement from B after all.

xenadu02··on How can Apple deal with the memory shortage?
That's fair. I had hoped GF was not entirely giving up but was going to wait until the tech for new nodes was proven and cheaper to obtain. It seems that is not really possible at the moment because anyone who is involved in that supply chain doesn't maintain the ability to stand up new processes on older nodes. Way too busy standing up new nodes.

So much for efficient free markets.

xenadu02··on Why is almost everyone right-handed? A new study connects it to bipedalism
I remember in elementary school being amused by the idea of handedness so I decided to practice writing with my left hand as well. I'm not great at it but even to this day I can write legibly with my left hand from that little bit of practice as a child.

Anyone can get much better at using their non-dominant hand (if they have one) with just a bit of practice. The effect is much much stronger when you do so as a child.

xenadu02··on Myths about /dev/urandom (2014)
Cryptographically secure random number generators are equivalent to encryption itself. If you could predict anything about the plain text by analysis of the cipher text the algorithm is compromised/broken and useless. That's the whole point! Saying that /dev/random has "exhausted entropy" is as useful as saying "the fleep didn't florp the gorpobittin!". Completely useless words strung together without any meaning.

A CSPRNG is just an algorithm that uses some entropy as a key and feeds back on itself to generate a stream of random bytes. It is a way of expanding a small bit of entropy into a much larger sequence of random values.

From that you can derive the underlying objection here: estimating entropy, blocking /dev/random, and all the other noise is equivalent to saying "cryptography doesn't work". It is both wrong and pointless.

The only place it matters is at boot when there is no hardware source of randomness _which excludes pretty much all PCs which have hardware generators_. You need a true random key to start the CSPRNG but that's it. If you don't have a hardware unit you use time of arrival of the next network packet. Or the frequency of keystrokes on the keyboard.

Now you might ask: why bother seeing the entropy pool at all? The answer is Perfect Forward Secrecy. By mixing in new randomness you are effectively slowly swapping out the key used for the encrypted stream. Thus even if someone is able to compromise something based on guessing the random number sequence your CSPRNG generated their guesses will get more and more wrong as new entropy enters the pool eventually becoming useless. This is a defense-in-depth policy though, not a practical attack mechanism.

On linux it is unfortunate that /dev/urandom has the property of silently vending non-random bytes on hardware without an RNG just after boot and that /dev/random was designed to block when the magical fairies say so but of the two failure modes /dev/urandom is the least bad because practically most hardware (even embedded hardware these days) simply can't encounter its failure mode.

xenadu02··on How can Apple deal with the memory shortage?
I've made this same argument so let me make a counter-argument:

There are some ways to get this off the ground much quicker. One or more companies could buy an existing non-leading-edge fab like GlobalFoundaries. That buys a lot of expertise so you're not starting from zero.

DRAM also benefits from being very regular and relatively simple. It used to be what you bring up on a new process node to help prove things out.

It also isn't impossible to reduce reliance on ASML if you're willing to throw money at it. That's definitely a super-long-game move but it could be done.

I'm not going to argue that someone is going to do any of this but if demand is sustained it is possible.

xenadu02··on Testing UPS Output Waveforms
For some time I've been curious why none of the major UPS manufacturers offer LiFePO4 UPS units. They'd be smaller, lighter, and have a longer run time all else equal (dramatically lower shipping charges). Batteries wouldn't need replacing nearly as often.

Yet as far as I can tell none of them offer anything in this area except at the extremely high end. Even Ubiquiti's UPS offerings are garbage simulated sine wave with lead acid batteries.

Are UPSes such a niche product there's no money in it? Are they really content to just give up the whole "power station" market to upstart competitors?

Even aviation jump packs (that connect to aircraft ground power ports) offer lithium versions and that's an industry that moves like sloths toward new technology!

xenadu02··on Cloudflare to cut about 20% of its workforce
You have however many people who you seem to believe have no useful work to do in their current roles. You aren't bleeding money. Is that not the time to invest in new products? To take moonshots?

Is this not admitting that they simply can't come up with any new ideas to invest in? That their intellectual capacity has topped out?

Profitable companies laying people off like this tells me they're done innovating and now it is time to milk the cash cows for all they're worth.

xenadu02··on Why airlines are always going bankrupt
Are you sure about that number being ex-fuel?

FWIW I'm not interested in flying commercial with non-union pilots so that airlines can become cheap labor body shops.

I'm also not interested in saving money by having Boeing outsource to kick as many people out of their machinist union as they can (and screw those people out of retirement and healthcare benefits).

I got my pilot certificate last year (zero plans to go ATP/commercial). Its a lot of work. Then you've got years of getting paid pennies to earn your 1500 hour ATP. Then you've got more years of taking the crap routes and not making super dollars. Much like a doctor its after you've put in 10-15 years that it starts really paying off.

The union also protects pilots from blame culture and trying to game metrics. If it isn't based on seniority then what metrics do you use? And do you want pilots to start making flying decisions based on on-time percentage instead of safety?

If your business needs to screw over labor to survive you don't have a worthwhile business.

xenadu02··on SQLite Is a Library of Congress Recommended Storage Format
You can always route writes to a writer node with streaming WAL replication to all the reader nodes. Works for some workloads and systems, not for others.

For that matter if you write your system with the correct abstraction you can switch to Postgres _later_ if it becomes necessary. For every system that really did need to scale 10,000 are pointlessly overbuilt - worrying about scale when it just didn't matter.

xenadu02··on 10Gb/s Ethernet: what I did to get it working in my home
Yeah that's true, it doesn't require a physical implementation per-se.

It does specify cross-talk specs and frequency response. IIRC Cat-5E was 125, Cat-6 250, Cat-6A 500Mhz. But copper is copper and all else equal well-made copper of a given size is going to carry those frequencies regardless. Cat-5E can carry 500Mhz just fine. They don't mix some magic sauce into the molten copper before casting & drawing into wire that changes its frequency response. The real limiting factor (IMHO) and where the actual manufacturing really matters is cross-talk.

xenadu02··on How do I inform Windows that I'm writing a binary file?
In more general terms "runtime" means the userspace facilities above and beyond the standard system APIs (which often translate directly into syscalls into the kernel). It is a set of agreed-upon data structures and functions for operating on them and often includes facilities and patterns for extending the system with your own data structures.

For example the C runtime has a notion of what a "string" is: it's binary layout in memory and the conventions around it (e.g. an array of utf-8 bytes terminated by a null).

A runtime can be very thin or very complex. The dotnet or Java runtimes are massive by comparison. To the point they generally JIT the intermediate language to produce executable code (whether ahead of time or on-the-fly). Go's runtime has its own notion of threading built on top of the system notion of threads.

A self-contained static binary embeds any runtime implementations it needs into its own binary so it is still using runtime facilities but needs no external libraries.

A standalone or "bare" program can mean one that is built using only syscall primitives. Of course that can be taken further: you can build a true baremetal program that is designed to be copied into memory by the bootloader so it runs without a kernel or OS underneath it. This is, after all, what an OS kernel is: just code built such that the bootloader can jump to a fixed (or designated in metadata) address, handing off a pointer to info about the hardware (such as a DeviceTree) in memory and that's it.

In the early PC days BIOS was basically a set of functions built-in to the hardware (or more often flashed onto EEPROM). More or less a minimal sort of runtime + device drivers that knew how to read keyboard input, print characters to the screen, etc.

Almost everything is built on abstractions. In modern systems EFI or equivalents is a form of runtime + device drivers for early boot and the kernel. The kernel forms that for userspace. And a userspace language runtime can be something like a mini-OS for the code it runs. Going the other direction CPUs themselves are much more like a collection of networked PCs than you might expect.

xenadu02··on Why airlines are always going bankrupt
A race to the bottom on pilot pay won't help anything. Well it may lead to less qualified pilots. You can ask Boeing how well screwing over labor has worked for them if you like.

All US airlines have the same labor costs for pilots and it isn't their highest cost anyway. That would be fuel.

If you want to divvy up costs that way: Boeing is probably the biggest problem. Both them and Airbus eat up all possible excess profit on the back end via the cost for airliners. Break up Boeing, bring back competition in airliner manufacturing. People who want to screw over labor don't usually frame things in those terms for some reason.

xenadu02··on IBM didn't want Microsoft to use the Tab key to move between dialog fields
IBM is also the reason MS-DOS doesn't support "-" for options and why it doesn't have devices in the "\DEV" directory on all drives. Support for "/" as path separator survived though!

Many MS folks used Xenix and were fans of Unix and very early DOS had SWITCHCHAR and AVAILDEV config.sys options for these things. But AFAIK IBM threw an absolute fit about it and forced their removal.

The DEV issue is specially annoying because DOS 1 didn't have directories - thus it could not have been much of a compatibility problem. But instead DOS/Windows is stuck being unable to support creating files named "CON" or "COM1" because it assumes device files exist in all directories.

xenadu02··on Let's Buy Spirit Air
Spirit has filed bankruptcy twice in the past year. Bondholders aren't going to accept any purchase plan unless the buyer is going to vastly overpay.

They probably believe they'll get more money back from selling the aircraft. If American or United want a new airplane they place an order and wait 5 or more years for delivery. No airline has excess airplanes available to take new routes. They are so expensive just a handful being idle (outside of expected maintenance winodws) would erase all profit. That means if there is a new opportunity it can take a very long time to go after it.

Airlines from around the world will line up to buy every single one of Spirit's airplanes because it means they can have one _today_. A few might even pay premium prices for them.

Airlines are a cyclical business. Boeing and Airbus gobble up every spare dollar on the back end and customer pressure eats up the front end. Then you're subject to all sorts of random shocks outside your control without much ability to adjust your fixed costs. A difficult business to be in.

xenadu02··on You can beat the binary search
Is the disconnect here that in many datasets there is some implicit distribution? For example if we are searching for english words we can assume that the number of words or sentences starting with "Q" or "Z" is very small while the ones starting with "T" are many. Or if the first three lookups in a binary search all start with "T" we are probably being asked to search just the "T" section of a dictionary.

Depending on the problem space such assumptions can prove right enough to be worth using despite sometimes being wrong. Of course if you've got the compute to throw at it (and the problem is large) take the Contact approach: why do one when you can do two in parallel for twice the price (cycles)?

xenadu02··on 10Gb/s Ethernet: what I did to get it working in my home
> The most important question was the structured cabling in the walls; was it CAT-5E or CAT-6, or even CAT-6A? Remember from the last post, 10GBASE-T might work over short runs of -5E (even though officially it's not meant to be able to).

This is not quite correct.

The primary problem is cross-talk. Copper wire itself will carry the relevant frequencies up to 100m without issue but even with balanced pairs the balancing is not perfect and the "dirty paper precoding" is not perfect so some cross-talk will occur. How long you can go with Cat-5e depends on how well the wire is twisted, how many wires are bundled together, are there any loops or tight bends, and other factors. Cat-6A guarantees less cross-talk with more twists, better balancing, and a plastic separator inside the cable to make the cross-talk more regular and thus easier to cancel out.

Bottom line is: for almost any normal home or apartment any quality Cat-5e cable properly terminated will carry 10GBase-T without issue. In fact if you have problems I would first re-terminate the cable before assuming you need to run new cable. Cat-6 or 6A just isn't necessary.

As a PSA: beware of "CCA". I've noticed Amazon and eBay are absolutely flooded with cheap chinese electrical and networking cable that shows nice shiny copper in the pictures but is actually "copper clad aluminum". If they mention anything at all they code it as "CCA" cable without explaining what that means.

CCA cable cannot, by definition, be ethernet cable. I won't get into the full technical details but the standard was amended to clarify that only pure copper wires are acceptable for ethernet. Personally I would not dare use CCA for anything. It has lower performance, lower current-carrying capability for the same wire diameter (inherent in aluminum), and introduces the risk of oxidation and loosening of connections as people will treat them as copper connections when aluminum needs special installation procedures and connections to avoid them coming loose over time. For electrical connections especially this not only can but absolutely will lead to a fire over time if not treated with the appropriate care. All it takes is a little bit of mechanical action scraping off the thin copper layer and you now have an effectively aluminum wire - a time bomb ticking away.

xenadu02··on Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
This comment is completely incorrect.

kqueue VNODE events are delivered so long as your process has access to the file. There is no "same-process" notification filter.

xenadu02··on Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
I have no idea why they aren't using kqueue but that works on macOS and FreeBSD. It has for years.

You want EVFILT_VNODE with NOTE_WRITE. That's hooked up to VNOP_WRITE in the kernel, the call made to the relevant filesystem to actually perform the write.

xenadu02··on Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite
If you're interested you can use kqueue on FreeBSD and Darwin to watch the inode for changes. Faster than a syscall, especially if all you need is a wakeup when it changes.
xenadu02··on What killed the Florida orange?
Most edible bananas are seedless and most cultivars (human grown) bananas are genetic mutants with triploid chromosomes (though a few are tetrapolid or diploid). Getting them to produce functional reproductive structures at all let alone viable seeds is very difficult. There are ongoing efforts to cross-breed with their wild cousins and to preserve genetic diversity.
xenadu02··on Windows 9x Subsystem for Linux
This is wildly inaccurate.

Windows 3.11 was a hypervisor running virtual machines. The 16-bit Windows virtual machine (within which everything was cooperatively multitasking), the 32-bit headless VM that ran 32-bit drivers, and any number of V86 DOS virtual machines.

Win9x was similar in the sense that it had the Windows virtual machine running 32-bit and 16-bit Windows software along with V86 DOS VMs. It did some bananas things by having KERNEL, USER, and GDI "thunk" between the environments to not just let 16-bit programs run but let them continue interacting with 32-bit programs. So no, Win9x was in fact 32-bit protected mode with pre-emptive multitasking.

What Win9x prioritized was compatibility. That meant it supported old 16-bit drivers and DOS TSRs among other things. It also did not have any of the modern notions of security or protection. Any program could read any other program's memory or inject code into it. As you might expect a combination of awful DOS drivers and constant 3rd party code injection was not a recipe for stability even absent bad intentions or incompetence.

Windows 2000/XP went further and degraded the original Windows NT design by pulling stuff into kernel mode for performance. GDI and the Window Manager were all kernel mode - see the many many security vulnerabilities resulting from that.

xenadu02··on Filing the corners off my MacBooks
I do some machining as a hobby (I get enough of computers at work and elsewhere) so here's a similar tip:

Don't treat your lathe faceplate as a precious artifact. Need to clamp an oddly shaped part to it? Drill and tap some holes. That's what it is for.

Is that reamer too long to fit? Cut it shorter.

Modify your tools to make you happier or more productive.

What if the modification doesn't turn out well? Great! You learned something. Make the next one better.

← PreviousPage 3 of 34Next →