News for hackers. Stuff that matters.

chadaustin

God, that's the worst. Minecraft is also what led us to accidentally bind my child's account to the administrator account on my TV PC, and because he's a minor we can't actually unbind that account. I've tried for hours and have not succeeded.

"Just make a new account." It's possible but then we'd have to make sure we get every single saved game for all the various games moved over and ugh.

Re:A Grand Vision for Rust on Monday March 09, 2026 @03:42AM (#47305910)
I write Rust for embedded systems and both effects and linear types would be meaningful improvements. Effects especially: if you have multiple cores in a coherent memory domain AND you run with interrupts enabled, you have to deal with three types of mutex:

- data accessed by multiple cores and interrupt handlers must be modified under a spin lock and with interrupts disabled

- data accessed by multiple cores but not interrupt handlers only needs the spin lock

- data accessed by one core but maybe interrupt handlers only needs to pay for disabling interrupts

Depending on your core and how performance sensitive the code is, the costs of the above can vary significantly. It would be nice to encode these rules in the type system.

(Ordered types might be useful for “critical sections” — that is, areas where interrupts are disabled and the interrupt disablement guard absolutely must be dropped in order.)

Re:FEX-emu – run x86 applications on ARM64 Linux devices on Friday November 21, 2025 @04:01AM (#46002658)
https://dougallj.wordpress.com/2022/11/09/why-is-rosetta-2-f...

> Apple M1 has an undocumented extension that, when enabled, ensures instructions like ADDS, SUBS and CMP compute PF and AF and store them as bits 26 and 27 of NZCV respectively, providing accurate emulation with no performance penalty.

Re:There is no memory safety without thread safety on Thursday July 24, 2025 @01:30PM (#44673530)
Every time this conversation comes up, I'm reminded of my team at Dropbox, where it was a rite of passage for new engineers to introduce a segfault in our Go server by not synchronizing writes to a data structure.

Swift has (had?) the same issue and I had to write a program to illustrate that Swift is (was?) perfectly happy to segfault under shared access to data structures.

Go has never been memory-safe (in the Rust and Java sense) and it's wild to me that it got branded as such.

Windows 95 allowed programs to disable system interrupts. No protection on cli instruction. Careful with those rose-colored glasses.
WER existed on XP but the APIs needed to customize dumps didn’t. And IMVU’s crash reporting code dated back to 2005.

> So I think that the claim that Direct3D captures exceptions is suspect.

I would think that too - but I based my claims on a stack trace captured at the time in the overridden SetUnhandledExceptionFilter. Now, computers were the Wild West then, and who knows where those DLLs actually originated, and any further details are lost to time.

> Maybe you were expecting C++ exceptions to be caught, but these APIs are only for SEH.

The distinction was clear then. And very well-documented by Microsoft. We caught all C++ exceptions before SEH.

> Yes, I know it's a 16year old post. But I must stop myths.

Your goal is laudable but I don’t love comments that discount a concrete history that I lived (and documented!). I call this out mostly because it’s happened before in discussions of old Windows APIs. I wish it were easier to get a snapshot of MSDN circa Windows XP, etc.

Hello, author here (16 years ago). I don't think that component existed then. In hindsight, we would have either used WER or initiated crash dumps from outside of the process via a watchdog. It is quite problematic to attempt to capture your process state from within a failed process.

That said, we did have a bunch of hand-rolled state capturing (including Python thread stacks) so maybe WER wouldn't have been as useful anyway.

Re:The Dawn of Nvidia's Technology on Wednesday May 21, 2025 @01:25AM (#44048536)
It did, especially as the drives got older and shrieky. Plus the floppy and optical drives spinning up. But... funny story, when I moved to Silicon Valley, SSDs didn’t exist yet, but compile times were IO-bound. So my company bought everyone Dell workstations with two 15k RPM SAS drives in RAID 0. When I’d kick off a build, the desk would start vibrating under my fingers.

It made everything feel real!

Later, the company switched new employees to 3x 10,000 RPM SATA drives. Not quite as grindy, but still loud.

Re:The Dawn of Nvidia's Technology on Wednesday May 21, 2025 @01:11AM (#44048472)
Looks like ‘97. Unfortunately I can’t find the receipts! If I had to guess, I think I’d say somewhere around $2000 in all. That computer lasted me a LONG time. When it was done being a desktop, it became a Linux server until I sold it around 2009. Sometimes I wish I’d kept it: the Pentium 2 was such an important CPU and I smile every time I see the one on display in the Computer History Museum.
Re:The Dawn of Nvidia's Technology on Tuesday May 20, 2025 @06:59PM (#44046776)
I did a bunch of media and software development back then so RAM helped a lot. Why 640? Not sure. My particular board could have gone up to 768. I did some googling and found some boards that maxed out at 1 GB.

That was a weird time in computing. Things were getting fast and big quickly (not that many years later, I built a dual-socket Xeon at 2.8 GHz, and before that my brother had a dual socket P3 at 700 MHz.) but all the expansion boards were so special-purpose. I remember going out of my way to pick a board with something like seven expansion slots.

But I think your question about why the author said 640 is fair! Maybe they had a machine like mine around then. Or maybe it’s something NVIDIA was designing around?

Re:The Dawn of Nvidia's Technology on Tuesday May 20, 2025 @05:23PM (#44046057)
You are straight up wrong. The first computer I ever built was a Pentium 2, RivaTNT, and it had 640 MB RAM.

I can’t find the purchase receipts or specific board brand but it had four SDRAM slots, and I had it populated with 2x64 and 2x256.

Edit: Found it in some old files of mine:

I was wrong! Not four DIMM slots... three! One must have been 128 and the other two 256.

  Pentium II 400, 512k cache
  Abit BF6 motherboard
  640 MB PC100 SDRAM
  21" Sony CPD-G500 (19.8" viewable, .24 dot pitch)
  17" ViewSonic monitor (16" viewable, .27 dot pitch)
  RivaTNT PCI video card with 16 MB VRAM
  Creative SB Live!
  Creative 5x DVD, 32x CD drive
  Sony CD-RW (2, 4, 24)
  80 GB Western Digital ATA/100
  40 GB Western Digital ATA/100
  17.2 GB Maxtor UltraDMA/33 HDD
  10.0 GB Maxtor UltraDMA/33 HDD
  Cambridge SoundWorks FourPointSurround FPS2000 Digital
  3Com OfficeConnect 10/100 EtherNet card
  3 Microsoft SideWinder Gamepads
  Labtec AM-252 Microphone
  Promise IDE Controller card
  Hauppage WinTV-Theatre Tuner Card
Re:California teacher dies from suspected rabid bat bite on Tuesday December 03, 2024 @07:08PM (#42313157)
Last Christmas, we got a tree from a local farm in the mountains. We had the tree trimmed and decorated before we discovered a sleeping (hibernating?) bat on the inside.

We got it moved outside, but it took about 24 hours before I realized that I should call County Health. By that point, the bat was gone, and county health suggested I receive rabies treatment, but call my doctor. The bat could have bit or scratched without us realizing it.

The doctor concurred. Rabies treatment must be done at the ER. They strongly recommended everyone in the house receive treatment if we could not 100% rule out physical contact. (We couldn't.)

Me, my wife, my kids, EACH receiving the immunoglobulin and four rounds of vaccines at the ER. We ran the first ER out of the treatment so the kids had to go somewhere else. Also, those are big needles.

The treatment ended up billing insurance over $100,000. (Almost all of that is the immunoglobulin.) We also had to return to both ERs, three times each, with the last time being on Christmas morning.

There is research that says immunoglobulin is _likely_ not necessary if you have no visible bites, but it's current health policy in the USA, and no doctor wants to be the first to undertreat.

Most expensive Christmas tree ever.

Re:Unsafe Rust Is Harder Than C on Friday October 25, 2024 @02:10PM (#41947924)
I'm sorry, I had a whole section on amortized allocation in a draft version of the post but I deleted it, thinking it was tangential. You're not the first person to ask: https://www.reddit.com/r/rust/comments/1gbqy6c/comment/ltonq...

And my response: https://www.reddit.com/r/rust/comments/1gbqy6c/comment/ltpv0...

One typical approach is double-buffering the allocation but it doesn't work here because you need to pull out the waker list to call `wake()` outside of the mutex. You could try to put the allocation back, but you have to acquire the lock again.

I had an implementation that kept a lock-free waker pool around https://docs.rs/wakerpool/latest/wakerpool/ but now you're paying for atomics too, and it felt like this was all a workaround for a deficiency in the language.

Intrusive lists are the "correct" data structure, so I kept pushing.

Re:Condvars and atomics do not mix on Sunday March 24, 2024 @12:31PM (#39808211)
You can still put atomics outside the mutex in Rust.
Exactly correct. Loading solarized in 256-color emacs shows just how poorly the (carefully-selected) Solarized colors map onto the xterm-256color palette.
You're right: I should have included COLORTERM in this history, and a couple of the other fits and starts, like the `RGB` terminfo capability.

The issue I had with COLORTERM is that not every program respects it. In fact, I've had this in my .bashrc for a while:

  case $TERM in
    linux | screen*)
      unset COLORTERM
      ;;
    *)
      export COLORTERM=truecolor
      ;;
  esac
(Screen does support 24-bit color now, so that case probably came from Ubuntu 18.)
Re:MP3 vs. AAC vs. FLAC vs. CD on Sunday October 01, 2023 @04:15PM (#37730143)
Where does this “can’t see more than 60 fps” rumor come from?

It’s trivially refutable by placing a 60 Hz strobe (e.g. old fluorescent light or even some aftermarket headlights) at the corner of your vision.

Also, for interactive systems, 16 ms is a large chunk of our reaction time. You need close to 1 ms response times (1000 fps) to approximate pen and paper.

Re:Unix Domain Sockets vs Loopback TCP Sockets (2014) on Monday September 11, 2023 @05:23PM (#37473917)
I appreciate your reply!

My approach has been to send a header with the number of fds and bytes the next packet will contain, and the number of payload bytes is naturally never 0 in my case.

Re:Unix Domain Sockets vs Loopback TCP Sockets (2014) on Monday September 11, 2023 @02:48PM (#37471853)
How does SOCK_SEQPACKET simplify fd-passing? Writing a streaming IPC crate as we speak and wondering if there are land mines beyond https://gist.github.com/kentonv/bc7592af98c68ba2738f44369208...
I wanted to make a permanent wake-from-sleep capacitive touch button for a PC that doesn't always have a keyboard attached. I tried to use the Tomu for that. Unfortunately, I never was able to wrangle its built-in USB functionality to stay awake when the PC slept.

They're not that hard to pull out. I did find it hard to find good examples for how to program the micro's capabilities, however.

Re:AVR-GCC Compiler Makes Questionable Code on Saturday December 17, 2022 @03:41PM (#34032016)
I was also surprised by how suboptimal avr-gcc's generated code is. On the other hand, the AVR experience is reminiscent of early DOS, terrible C compilers and all, so it remains nostalgic!

Two examples: https://gcc.godbolt.org/z/M4oasdK4a

* Population count: I haven't found a way to convince AVR-GCC to use LSR's shift into carry with ADC.

* Strength reduction: AVR doesn't have a barrel shifter, so it's a huge win to incrementally shift during the loop. AVR-GCC doesn't see this.

Re: on Tuesday November 15, 2022 @04:22PM (#33615190)
EdenFS builds (and probably runs?) from GitHub, but we have done no work to make it usable and hook it up to an existing checkout. It may not be much effort, and we're hoping to demonstrate that workflow in the future.
I was voted shyest kid in my high school class. My brain would go white during any attempt at public speaking, and I was super awkward around any new people.

Much of it came from being extremely sensitive. So much worry about what other people thought, and that any esteem in which you may be held could be destroyed at any moment.

A couple things changed: I joined team sports and programming competitions, which strengthened my self-esteem and confidence. Eventually, I grew to understand my lizard brain's reactions could consciously override them. For example, several years back, I was invited to speak at a conference in China, and my first thought was "NOOO" but then I realized I'd regret that and when else do you get to see a new country on someone else's dime? So it's worth optimizing for opportunity. It's kind of like the improv rule. Always say yes, and see where it goes.

But it never completely fades. I'm a seasoned and respected engineer and I still get sweaty hands and an elevated heart rate even when giving status updates to my team of five years.

Re:Ask HN: Do You Use Logging? on Saturday December 11, 2021 @06:02PM (#29525110)
Every day. I spent most of my time since April sifting through production logs to track down a bug between FSEvents and Watchman that produced incorrect query results. Despite much effort, I was never able to reproduce locally. Logs, ring buffers, and remote event recording are invaluable.
Re:Solar is dirt-cheap and about to get even more powerful on Saturday July 10, 2021 @09:17PM (#27797749)
20 KW sounds way above average for a single home. $1 / Watt sounds about right, though.
Part of the issue is how unevenly distributed the money is. Look at slide 7/8 in https://www.cusdk8.org/cms/lib/CA02218495/Centricity/Domain/...

$8,200 per pupil in Cupertino, $24,700 in Woodside

CUSD is considering closure of three schools and eliminating librarians and art and music due to the failure of passing a parcel tax, and low per-pupil funding. Lots of folks on the street argue “it’s the administrator salaries!” but when you actually look at the budgets there’s just not enough money to keep the schools running. Teachers commute from over the mountains. Administrators are paid reasonably, but that’s the cost when their skill sets would easily apply to project management at a local tech company. Money’s not always the solution but sometimes it is.

Re:A Pixel Is Not a Little Square (1995) [pdf] on Tuesday April 27, 2021 @12:11AM (#26951921)
I dunno, I just looked closely at my OLED TV and it’s point lights (at least to the resolution of my own eyes), not tiny squares butting up to each other, so I think the lesson of treating your images as samples of a continuous function still applies.

Older »