HNHacker News
TopNewBestAskShowJobs

msarnoff

735 karma · joined November 24, 2010

f"{firstname[0:4]}{lastname}@proton.me"

@msarnoff@mastodon.social @msarnoff.bsky.social

Old twitter: http://twitter.com/txsector (Inactive since 2022)

http://youtube.com/user/74hc595

http://github.com/74hc595

submissionscomments
msarnoff··on Logo Programming
LCSI LogoWriter for 68k Macs[0] was my shit. It was my first[1] introduction to programming in elementary school and I spent hours trying to make games with it. There were 4 turtles and you could treat them like sprites; you give them custom shapes and colours, and there were basic collision detection primitives. You could also check for collisions with the background by querying the colour under a turtle. You could play and record your own sounds... spent so much time with that little round Apple microphone[2] recording goofy sound effects.

[0] https://www.macintoshrepository.org/6717-logo-writer-2-0

[1] technically I had used the Apple II version a couple times first

[2] https://applerescueofdenver.com/products-page/macintosh-to-p...

msarnoff··on A U.S. Strategy to Prevent the Creation of Mirror Life
See also “Your DietBet Destroyed the World” https://laprade.blog/your-dietbet-destroyed-the-world

One of my favourite short stories, it’s always stuck with me since it was posted to HN a few years ago.

msarnoff··on Single-pixel width legible LCD font – Subpixel Text Encoding
Every time I see my article reposted, I get nostalgic for the 30” Apple Cinema Display I used in the photos. Maybe the best monitor of all time… the thing was MASSIVE and was peak Apple design perfection. I kept it until 2016-ish, and by then the backlight was giving out, and the ecosystem had moved on from DVI and Mini DisplayPort. Your subpixels are sadly missed. ;-(
msarnoff··on Panel meter calculator with floating point
You’re not wrong. They work very similar to binary arithmetic: basically the only operations they can do is increment, decrement, and shift left/right (but by 10)

But multiplication is just repeated addition, and division is just repeated subtraction. Some of the highest-end units could do square roots! Check out CuriousMarc’s videos.

msarnoff··on Panel meter calculator with floating point
I didn’t actually know about the Casio 14-A until now. I almost thought the picture was AI-generated. Four functions squeezed into that compact desktop unit in 1957? Impossible with the technology of the time…

The Casio 14-A was indeed the world’s first all-electric desk calculator. But by “desk calculator,” they literally mean “a desk that is a calculator.” The display/keyboard pictured was literally attached to a desk filled with hundreds of relays and weighed 140 kg. [0]

The “all-electric” claim is interesting. There had been scores of electric calculators for decades (Friden, Marchant, etc.) but were merely driven by an electric motor. The calculations were still performed by gears and cams and linkages.

https://www.casioeducation.com/primary-calculators/14-a

msarnoff··on Bournegol??? (2014)
I met Steve Bourne a while back and asked him why he chose to write sh with all those ALGOL-like macros. His answer was terse—he just wanted to use the syntax he was most familiar with.
msarnoff··on What Is BusyBox?
Busybox is where I learned the multi-call technique of using argv[0] to simulate multiple commands in a single binary.

It works great for Rust binaries, which can get quite large. I had to rewrite some Python utilities (software updater, Wi-Fi network config, etc.) for a very constrained embedded system (64MB RAM) that couldn’t handle Python. So I built them all in a single multi-call binary. I believe `clap` has built-in support for it.

Also, Busybox has a lot of stuff built in that you’d never think of. It has a little vi built in. It has the full suite of ‘runit’ process supervisor utilities. And plenty more. It has a Kconfig system (like the kernel) where you can tune exactly which utilities you need and what features you need. Don’t need full output in ps? Turn it off. Don’t need tab completion? Pretty sure you can turn that off too. Always typing ‘dc’ instead of ‘cd’? Just don’t include dc.

msarnoff··on Building a Memory Allocator from Scratch in C
This was a class assignment in the 15-213 class at Carnegie Mellon. The staff had set up a test suite and an online leaderboard to rank the speed of each student's malloc implementation.

I figured out that the test cases allocated a disproportionate amount of X-byte blocks. I was able to get to the top by hardcoding a specific freelist just for X-byte blocks.

Learned a lesson about easily it is to game a benchmark :)

msarnoff··on Brain scans reveal 3 ADHD subtypes
I think this is me. I was diagnosed with “regular” ADHD a few years ago, but I’ve had issues with rejection sensitive dysphoria my whole life. As a kid I would have a lot of meltdowns when I couldn’t get something right on the first try or made any kind of mistake.

The meltdowns stopped, but I still have issues spiralling into thoughts of failure and being a horrible person when I feel like I’ve disappointed family or friends.

Guanfacine has helped though. Tried a bunch of medications and this is the only one that seems to have made an impact.

msarnoff··on Death to Scroll Fade
Originally read the URL as “D-Bus Hell dot com” and was like… yup.
msarnoff··on Four Column ASCII (2017)
On early bit-paired keyboards with parallel 7-bit outputs, possibly going back to mechanical teletypes, I think holding Control literally tied the upper two bits to zero. (citation needed)

Also explains why there is no difference between Ctrl-x and Ctrl-Shift-x.

msarnoff··on Unseen Footage of Atari Battlezone Arcade Cabinet Production
Retro Game Mechanics Explained has a video about how the Asteroids vector generator worked and was coded for:

https://youtu.be/smStEPSRKBs?si=k_0u3NKCxCqZBc6w

Battlezone and later 3D games used different circuitry that generated vectors with analog circuitry and used a “math box” coprocessor based on Am2901 bit slice ALUs to help with the 3D math.

msarnoff··on Going for Gold: The Story of the Golden Lego RCX and NXT
The ancestor of the RCX was the "programmable brick" project out of the MIT Media Lab in the mid-1990s

http://archive.pbrick.info/The%20MIT%20Programmable%20Brick%...

https://web.archive.org/web/20011212030110/http://fredm.www....

Growing up in New England at the time, I was very lucky that they ran a pilot project at my elementary school. We programmed our "sketches" (though we didn't use this term) in LogoWriter on Mac LC IIs and flashed them using a weird dongle that connected to the brick via RJ11 cable.

I owe a lot to my teachers and Fred Martin's group. I don't think I'd be a developer today without that experience.

msarnoff··on You can't fool the optimizer
I was very surprised that GCC could optimize NEON SIMD intrinsics. After spending hours trying to optimize my vector code, trying to get the spacing between register dependencies right to reduce stalls, breaking long reduction operations into intermediate results, messing with LLVM-MCA, etc., I realized that I just couldn’t beat the compiler. It was doing its best to allocate registers and reorder instructions to keep the pipeline filled.

I don’t think it always did the best job and saw a bunch of register spills I thought were unnecessary, but I couldn’t justify the time and effort to do it in assembly…

msarnoff··on A vector graphics workstation from the 70s
Storage tubes are amazing. I once had a Tektronix 464 scope. Unlike the ubiquitous 465, the 464 was an analog storage oscilloscope! The persistence of the storage tube let you capture pulses, visualize signal jitter, etc. And there was a very satisfying erase button that cleared the tube with the characteristic green flash.

You could also just mess with the horizontal/vertical position knobs and use it as a very expensive Etch-a-Sketch.

msarnoff··on Fran Sans – font inspired by San Francisco light rail displays
When I was last at Penn Station in the 2010s their departure board was a mosaic LCD like the article, not a split-flap display:

https://upload.wikimedia.org/wikipedia/commons/b/bd/Penn_Sta...

I do miss the split flap displays at the Boston and Providence Amtrak stations though…

msarnoff··on Fran Sans – font inspired by San Francisco light rail displays
I have seen these throughout the US and Europe and been fascinated by them. Penn Station has (had? been a while) a big one with more segments per character. I’ve been trying forever to find the name of this particular style of segmented displays and get more info on them. The closest I could find is “mosaic display.”

Love this article!

Signed, someone who has an obsession with segmented displays

msarnoff··on Runit Linux: Complete Guide to Unix Init Scheme with Service Supervision
I've done small embedded Linux systems and it makes me so happy that there is a (mostly) compatible implementation built into busybox. svlogd's rotation and size capping makes it great when using limited-lifespan nonvolatile storage like eMMC.
msarnoff··on Show HN: I built an 8-bit CPU simulator in Python from scratch
Instruction set looks very similar to the AVR, which is one of my favorites. Very cool!
msarnoff··on Electromechanical Calculating Machines from the 1960's
I acquired a nonfunctional Diehl VSR a while back, naïvely thinking I could bring it back to life.

Oh my goodness, I took the cover off and what I saw was jaw-dropping. Thousands, possibly tens of thousands, of the most densely packed metal levers and cams and gears one could ever imagine. Nearly all of which would have needed cleaning and lubrication. Getting this thing fully working could have taken a year or more, especially with no repair manuals, and all available information in German.

The respect I have for the designers of these machines, and the servicepeople who repaired them, is immeasurable.

They are also electrical death traps. Lots of exposed switch contacts carrying mains voltage.

msarnoff··on Unified Line and Paragraph Detection by Graph Convolutional Networks (2022)
I was there when we added it to Preview ;) I think Nils wrote the code to hook it up, because he also worked on the loupe and how it would automatically lock onto the bounding box of a line.
msarnoff··on Ultrathin business card runs a fluid simulation
Surprise no one's mentioned yet that the firmware is written in Rust. As someone who's struggled with getting started with embedded Rust (the landscape seems to be changing quite a lot?) it looks like a good example.

Also it's a bit startling to see floating-point code used so freely. Shows how rapidly the capabilities of MCUs have developed. 15 years ago, doing floating point on a microcontroller would be unspeakable /s

msarnoff··on CoCo1 composite video
Did this recently for my CoCo 2. Used a mashup of several composite mods floating around (including this one) and built it on a piece of stripboard that fit in the same footprint as the RF modulator. Sourcing the MC1372 was tricky, but NTE makes a replacement, NTE855. I used a 3.5mm TRS jack for the audio/video output so I didn’t have to drill a second hole in the case, and then all you need is a cheap 3.5mm stereo to RCA cable.

Wish I had a schematic but I kinda just wired it freehand.

msarnoff··on Congratulations on creating the one billionth repository on GitHub
#SnakesOnARadar
msarnoff··on Hacking Pinball High Scores
Assuming you have physical access to the inside of the machine…

Most all machines from the 80s and 90s (Williams/Bally/Gottlieb) store their high scores and adjustments in an SRAM like a 5101 with a battery backup. They are stored in binary-coded decimal and protected by a checksum.

If you could tap into the bus (possibly while the CPU is halted or by removing it) you could modify its contents.

A common aftermarket mod is to remove the backup battery (they like to corrode) and replace the CMOS RAM with a nonvolatile FeRAM. In that case, just pop it into a programmer like a TL866 and program a new image with your desired high scores.

I’ve considered doing this… I wish my 1.2 billion on my Getaway hadn’t been wiped out…

msarnoff··on Sleep apnea pill shows striking success in large clinical trial
This comment needs to be higher. Atomoxetine is also known as Strattera and is prescribed for ADHD.

I tried it for less than a week and had to stop because there were VERY painful side effects _down there_.

I’m also a CPAP user and I’d 100% keep using it rather than go back on atomoxetine.

msarnoff··on About Asteroids, Atari's biggest arcade hit
My favorite part of Jed's article:

"Part way through the run of Asteroids, we used up the world's supply of 7497s [binary rate multiplier chips] and Texas Instruments (the only manufacturer of 7497s) did not have them on their schedule to make more for several months"

msarnoff··on Sierpiński Triangle? In My Bitwise and?
Munching squares!
msarnoff··on How MOS 6502 Illegal Opcodes Work (2008)
Michael’s blog is one of my favorites. His “Ultimate Guide” talks are great and I rewatch them at least once a year.

Ultimate Guide to the C64: https://youtu.be/ZsRRCnque2E?si=v4qQ9mCx3MafEwAq

Ultimate Guide to the Game Boy: https://youtu.be/HyzD8pNlpwI?si=gn-F8yuRPJKoXmC7

Ultimate Guide to the Apollo Guidance Computer: https://youtu.be/xx7Lfh5SKUQ?si=3qbvMohcGo6mBLrJ

msarnoff··on The Subjective Charms of Objective-C
The language is one thing, but the Objective-C runtime is brilliant. Read about the implementations of key-value-coding, key-value-observing, and bindings to get a sense of the bonkers things that have been done with it.

And ARC (automatic reference counting) blew my mind when it was first released. Rust was a blip on the radar, so the idea of automatic memory management, handled at compile time, without GC, was amazing.

Page 1 of 5Next →