HNHacker News
TopNewBestAskShowJobs

ahefner

326 karma · joined June 23, 2012

submissionscomments
ahefner··on We are all living inside of an obscure sci-fi film from 1970
Interesting. I wonder if Harlan Ellison read Colossus before writing I Have No Mouth, and I Must Scream.
ahefner··on Fable 5.1 Solves the Cyphral Distich, a 370-year-old cipher
too.

(sorry)

ahefner··on Learn Programming with OCaml
Computers haven't presented an accurate model of how computers actually work for decades. Compare the surface ISA of anything mainstream since the mid 90s versus all of the superscalar and out-of-order execution happening under the hood.

Deliberate efforts to surface this deeper layer back to the programmer-facing ISA (VLIW, notably Itanium) failed spectacularly outside of niche applications. C and its contenders can't simply hop over the CPU abstraction presented to them without having to map backward from some lower-level model to the surface ISA it's forced to target then having the rug pulled every few years due to microarchitectural changes. It has managed to evolve surprisingly gracefully over decades from tiny 16 and 18-bit machines, sometimes segmented, to 32 and 64 bit machines, and even accommodating SIMD reasonably gracefully via intrinsics (which is about the best we can do at present, as CPUs continue to diverge wildly in this area, though I'm begrudgingly impressed by what modern compilers can do via autovectorization to optimize simple loops).

ahefner··on Recovering Corrupt Zip Files
Do you really need a central directory? The tar and cpio file formats basically append files serially with a small header preceeding each one, and for most use cases this is sufficient.
ahefner··on LLM Rewrite of the TerminalTextEffects Python
3 MB is still pretty big... try a rewrite in C.
ahefner··on Ron Gilbert started production on Thimbleweed Park 2
Seems to be a tradition rooted in the original Maniac Mansion. In Thimbleweed Park the multiple characters became tedious due to having to walk multiple people all over and pass items between them, though I enjoyed being able to see the world through the different lenses of how Ray and Reyes vs. Ransome vs. Delores react to things.

Day of the Tentacle (which coincidentally I've replayed in the past week) executed the multiple characters mechanic the best I've seen, since each character was confined to their own area (past/present/future) and you could instantly pass items between them.

ahefner··on Write less code, be more responsible
But how much time per week does an SWE actually spend writing code?
ahefner··on Europe's $24T Breakup with Visa and Mastercard Has Begun
Every government is an attacker.
ahefner··on The Feynman Lectures on Physics (1961-1964)
This was really frustrating me. YT started recommending this channel and I could recognize the voice as an AI impersonation but had no way to know if it was at least reading something really written by Feynman. Eventually I concluded it wasn't, but there wasn't clear criteria under which I could report the channel. I'm not sure it's even against YT's TOS.
ahefner··on IPv6 is not insecure because it lacks a NAT
I think you're not technically wrong, but you're defining NAT differently than the majority of people you're arguing with (those who assume NAT also implies a firewall blocking inbound connections), and the remaining minority (the "on the WAN subnet" crowd) are dismissing outright the idea as a reasonable attack vector that an attacker close enough to be able to send packets destined for non-internet routable addresses to your router.

Is the latter something that was/is actively exploited?

ahefner··on Bindless Oriented Graphics Programming
It's there in the name - "Rust graphics community" as opposed to simply "the graphics community". Language fetishization above the end goal - or, rather, the language fetish is the real goal.
ahefner··on Texas is suing all of the big TV makers for spying on what you watch
Apple is already sending spam notifications for stupid bullshit like that F1 movie.
ahefner··on Oracle made a $300B bet on OpenAI. It's paying the price
If gRPC overhead is critical to your system, you've probably already lost the plot on performance in your overall architecture.

You make a fair point about smart pointers, and median "modern C++" practices with STL data structures are unimpressive performance-wise compared to tuned custom data structures, but I can't imagine that idiomatic Java with GC overhead on top is any better.

ahefner··on End of an Era
He definitely made games. Chris Crawford was one of the first known names in game design, a few years ahead of contemporaries like Sid Meier whom I expect you'd still recognize. Crawford seemed to alternate between computer war games, with reliable prospects for commercial success in the 80s, and more experimental fare about managing nuclear reactors, geopolitics, and such - difference being he seemed to get bored by the whole thing and completely disembarked in pursuit of whatever it was he intended to achieve via Erasmatron, Storytron, etc. It's fascinating to read his writings over that period. It seemed a sort of tragic paradox overshadowing all of it that, if he was so bored of mechanistic, algorithmic, and predictable computer game mechanics, maybe stop pursuing computer games as your chosen medium? It may have been a blind alley in the end, but someone had to explore it.

Nevertheless, it is quite sad - however, it's difficult for me to relate to the experiences of someone who lived through that first wave of personal computing and played a notable part in it - perhaps through that lens, anything was possible.

ahefner··on Show HN: My self-written hobby OS is finally running on my vintage IBM ThinkPad
The 8x16 font from the Atari ST's hi-res mode is pretty slick if you like something bold and a little futuristic. https://github.com/ntwk/atarist-font (or rip it directly from the ROM)
ahefner··on Why Every Programming Language Sucks at Error Handling
There's still a few Common Lisp features the mainstream would benefit from ripping off. Relevant here is the condition system. Conditions and restarts are still foreign enough that it's hard to explain to people why the "debugger" was a fundamental part of the lisp machine UI, and how much sense that made, and harder still to fathom how you'd adapt that to Unix, where it would morph into some kind of weird IPC tied into the command shell.

It's not just about being able to stop your program and hot-patch code to recover from errors - this should be trivial in any dynamic language. Rather, it's about being able to composably control how to recover from exception conditions (or, really, any branching behavior) both interactively and programmatically in a unified framework.

ahefner··on An invalid 68030 instruction accidentally allowed the Mac Classic II to boot
Today by, way of your screenshot, I discover Asm-Pro. Just got into Amiga recently (by way of receiving one from my uncle's closet..) and have been meaning to backfill my shameful lack of 68k asm knowledge. Thanks!
ahefner··on iTerm2 critical security release
Probably true, but it still stings that this dubious piece of software (speaking as a former iTerm2 user still holding a grudge) had been spraying my passwords and random terminal activity all over the internet in the form of unencrypted DNS requests for who knows how long, deliberately, due to mindless opt-out featuritis on the part of the developer. In my mind this is one of the clearest violations of privacy and information security I've been directly subjected to, because the developer had some gee-whiz-neato idea of highlighting URLs in a terminal and making them clickable.

It pains me to think people are still exposing themselves to this class of risk because of whatever iTerm2's latest and greatest idea is.

ahefner··on Conscious unbossing
Oh, I don't know - in my (admittedly limited and very individual / company-specific) experience, the senior management was hard to relate to from the perspective of us rank and file, but clearly had the Sword of Damocles over their head at all times, and tended to get swept away arbitrarily every few years as the winds of corporate politics changes direction. It seemed to require some exceptional execution (or luck) to defer this cycle for even a year or two.

Depends what you mean by senior management, of course. I'm thinking mostly the "VP / SVP of Engineering" type role, and to a lesser degree, one hop down, the "Senior Director" folks, who seemed to be subject to the same phenomenon but on a slightly slower cycle.

ahefner··on In 2025, blogs will be the last bastion of the Good Internet
From my perspective (for me, personally), the closing of Google Reader killed blogs. That's when I largely stopped reading them. Other readers seemed not worth the trouble, for various reasons. Was this before or after the onslaught of SEO slop? Seems like this shouldn't have been an issue in the age of RSS readers - why would you subscribe to blogspam?

Briefly, Twitter was a useful alternative to promote blog posts (the set of people you follow on Twitter not necessarily being that different than who you'd subscribe to via RSS), but then the blog hosting platforms themselves seemed to age into irrelevance while things like Medium and Substack appeared (neither judging nor endorsing them) while Twitter degraded.

I suppose you're right about Twitter to some degree, though anything that could fit in 140 characters probably belonged better there anyway.

ahefner··on Fighting spam with Haskell at Meta (2015)
But that's like half of computing.. every new tool the world inflicts on you, configured in Jojo's Awesome Configuration Language, with some arbitrary made up grammar punctuated by Tourette outbursts of special character line-noise.

That, or YAML, then a tool to template and generate the YAML, and then a stack of tools wrapped around that, ad infinitum.

A little learning is the cost of not having to write the thing yourself. On the other hand, hell is the non-composable tower of babel that is computing. Total employment by exponentially compounding incidental complexity.

ahefner··on Boar's Head plant posed an 'imminent threat' years before listeria outbreak
Salmonella as a Service!
ahefner··on SDL3 new GPU API merged
SDL1 had no high-level graphics system - you either got a raw framebuffer, or an OpenGL context.
ahefner··on macOS Sequoia adds weekly permission promptfor screenshot, screen recording apps
There's some irony in this for me personally. My most recent major "I quit Apple" rage moment was trying to get Flameshot (which I use routinely on Linux) working on my Macbook, so I could more easily take screenshots, just to share something with a friend, because the built-in screenshot functionality in MacOS is so clunky. Between Gatekeeper and the XCode upgrade train, Mac OS's dogged insistence on not letting me run the software I wanted it to run worked me into a rage and I swear I'll never buy another Mac for casual daily computing again. They've really ruined the OS.
ahefner··on TPU transformation: A look back at 10 years of our AI-specialized chips
China, supposedly.
ahefner··on My mental model of setf was wrong
Curious writing an article about how setf works and not mentioning 'defsetf', only setf methods. I suspect the gentleman's mental model of setf remains slightly wrong.
ahefner··on Neo Geo Architecture: A practical analysis
Not Neo Geo, but I was fascinated with Galaga a while ago and alternated between using MAME on Linux and MiSTer, and it definitely felt better on MiSTer. No stutters in frame rate, felt slightly more responsive, probably a little less latency on the audio. Didn't make a huge difference given my lousy playing, but it was interesting to compare them back to back.

Also, although the above is probably not the best case scenario comparison on the software side (MAME on an underpowered laptop), having written an emulator myself (not necessarily a great one), and particularly going through a convenient portability layer like SDL, there's just a lot of code between you and the hardware, which itself isn't representative of what you're emulating - for instance, sound and video are running at different clock rates and will drift apart, whereas on real hardware there's a single oscillator driving everything, so you have to jump through hoops to adapt the sound to the video rate, and latency creeps in.

ahefner··on Fixing QuickLook (2023)
New employee ramp-up or keep-busy exercise?
ahefner··on Overbite Project: Why still use Gopher? What makes Gopher relevant?
Gopher had been irrelevant for half a decade by 2002.
ahefner··on DOS game “F-15 Strike Eagle II” reverse engineering/reconstruction war stories
On the NES (or other 6502 machines), use assembly. That CPU just isn't a good target for C - pointers are awkward, you can't really do stack frames, and the addressing modes don't even support 'structs' very well. Fun to program assembly on, though. For your purpose the NES makes it double hard because it hardly has any ram (2 KB, and typically an additional 8 KB inside each cartridge except in the oldest games), and a character-mode graphics architecture rather than a framebuffer. If you do really want to do an 8-bit flight sim, the Atari 400/800 machines are an okay target. The Atari ST would be a better target.

Speaking of those machines, I'd love to see someone deeply reverse engineer the pseudo-voxel/fractal landscape engine that Lucasfilm Games invented for Rescue on Fractalus, Koronis Rift, etc. It still seems completely magical that they could pull that off on a machine with those specs.

Starting from zero, you might start at a high level and work your way down. Do a simple polygon flight engine using OpenGL and your favorite high level language of choice. Then write your own polygon rasterizer that you can overlay versus the OpenGL rendering as a reference. Then maybe rework it in pseudo 8-bit code (C constrained to only unsigned char variables, or similar), which should translate directly to assembly language on the target of choice. On a real 8-bit machine, unless you want low single digit frame rates, you probably have to pull a lot of dirty tricks. Maybe a 16-bit platform would be a better choice. This is speculative - I learned 3D (to a novice degree..) on a 486 PC under 16-bit DOS using C and assembly for inner loops (bitblts, texture mapping).

There's something about the aesthetic of late 80s PC flight sims (F-19 Stealth Fighter, LHX Attack Chopper, etc.) and their flat shaded polygon graphics that feels in vogue right now. Check out Thunder Helix on Steam.

Anyway there's definitely a magical feeling writing graphics code when you get your first feeling of realistic movement and rotation in 3D space working. Hopefully the ubiquity of ultra-realistic doesn't diminish that sensation too much.

Page 1 of 7Next →