Posts
by n splendorr
September 27, 2020

"It is fast or it is wrong"

I'm thinking a lot about this lately. I've spent most of the last month figuring out why game code I wrote in Lua for specific hardware, which was running along just fine for months, suddenly got much slower in certain situations. The answers mostly came down to "higher-resolution stereo audio files in the wrong format take WAY more cpu time than comparable-sounding files at a lower resolution in the system-appropriate format," (though the docs said the other format was fine, they were wrong!); and, in my naivete, I hadn't been properly removing unused processes in the background. So, even though I thought things weren't running in some cases, they were, and this was a problem when several scenes wound up layering on top of each other.

These were pretty big, "oh!!!" fixes, that mostly arose out of working in an unfamiliar environment. These can be understood, and are a major relief to solve.

But there's a bunch of little optimizations you can do in Lua that are... well, honestly, ridiculous. How should you insert a new entry in a table? Well, probably

table.insert(table_name, value)

...right? That's the language's provided method. Nope! Turns out it is often way faster to call

table_name[#table_name + 1] = value

which is like saying, "For the position that comes 1 after the length of the table (aka the last position, plus one) make it this new value!" Holy shit!

This happens all over the Lua built-in methods. Do not use table.unpack(table_name) to get values out of a vector2! It's always better to manually assign values, like local x, y = table_name.x, table_name.y. You should never use ipairs() if you can help it; it's always better to get the length of the table and then do a simple for loop over the length. Like, WAY faster. I could go on, at great length! But despite having read most of the Lua Manual and its Programming in Lua companion book, I had learned a lot of bad code practices and used them all over my codebase, losing milliseconds of time per frame, and fighting some pretty bad performance hiccups.

... speaking of which! I just paused and spent over two hours configuring syntax highlighting so I could illustrate this! LOL the web is so fucked

Anyway, I read these posts by Nikita, It is fast or it is wrong and Performance first, and find myself nodding. There's definitely a phase in coding where you just literally have to make it work at all. That's fine, if you have no idea how to do it, of course you can't worry too much about whether you're also doing it "the best way". But then... in my limited experience, you aren't done with the feature unless it also runs as well as you can reasonably make it. And that's hard! It takes extra work. But... so much software is so bad. It's really driving me nuts lately. Particularly when massive-scale operations like Apple, Slack, Dropbox, et al, are just dropping the ball straight through the floor.

Particularly:

Browsers? Same story. HTML is a pretty inefficient way to put pixels on a screen. A computer that might render millions of polygons a frame could easily struggle to scroll a web page. Same as with Advent of code solutions, it doesn’t really depend on how powerful your computer is. And even a highly optimized web code based on Canvas and WebAssembly (Figma) makes my Macbook fans spin while running native Sketch in complete silence.

There’re just limits on how far this wrong solution can go. Electron text editors can’t resize their own window in real-time and drop frames while you just move your cursor around. Slack would be as slow and memory-hungry on iMac Pro as it would be on a 12” Macbook.

The whole solution, the “web stack”, is wrong. The same thing could be done faster and more efficient easily—there is just so much wasted potential. Time to admit that and start over. There are fast text editors and chat programs around, very well within capabilities of even the least powerful netbooks.

I reckon all I can do is try my best to have the things I ship be as fast as I can manage! And then somebody else can complain about me in their posts.

September 26, 2020

Software sucks

Every single day, my computers do terrible things, for no apparent reason, that waste my time. It’s a fact of life whether working or playing on a modern electronic device. Every time we connect for a work call, my friend Jada’s wireless headphones may or may not connect, maybe with or without microphone or sound, maybe requiring a full reboot of her expensive Surface laptop. The thing doesn’t have a headphone jack, so basically, fuck you.

I’m running macOS 10.14 (which, let me remind you, is only 2 years old, and most OS updates used to happen on a 2- to 4-year interval, shipped on disks, and were expected to work with constant patching). I do light web and software development, run 5 different chat apps because we live in all kinds of hell, listen to music, and browse the web. I have to restart my laptop at least once a day, because no matter which combination of these things I do, it starts getting slow. Every Apple engineer should scream when they read that, because they are exactly where Microsoft was two decades ago. Except MS had these problems while admirably maintaining compatibility with old software; most Mac software from more than a couple years ago just straight-up won’t run on modern macOS, either because 32-bit was deprecated (presumably just to make Apple’s job easier), or because APIs change and break often enough that software just can’t keep up.

There are dozens of smaller and larger examples every single day, that I complain about briefly (or don’t, because it’s not worth it), and then move on from, because there’s nothing to do about any of it. The people who make fortunes on hot software don’t seem to listen. Apple is an impenetrable shell, bent on making their platforms “new!” and worse annually. It’s all fucked.

AND, none of this is important, in the big picture, compared with, like, anything. Except in the daily stress and loss of productive time for billions of people every day. Which, who cares? Apple’s got two trillion dollars. The new watch is brighter. Go fuck yourself.

This post by Nikita (via Michael Tsai) is a great illustration and summary of the problem.

The point is, this happens all the time, every day, multiple times a day, and one person can dedicate only so much time to dealing with it. The stream of minor annoyances is so large people just got tired of dealing with it! And no, there’re no better alternatives.

To prove my point, I decided to record every broken interaction I had during one day. Here’s the full list I wrote yesterday, September 24, 2020.

It’s cathartic — and dispiriting — to read this litany of tiny assholes, some of which I encounter (Slack, get fucked), many of which I don’t. Which shows it isn’t just me. Anything you try to do on a computer is a quiet nightmare. Just now, trying to select and copy text on my iPhone that updated itself to iOS 14, I… couldn’t. The cursor was going ABOVE my thumb, presumably because they removed the useful loupe, presumably because it didn’t “look clean,” and anyway I couldn’t get the text to select even when I moved my thumb down, because it just kept hovering around. Eventually it worked. Why? I dunno. It worked fine 2 years ago.

To end on a lighter note, I’d love for you to go to Nikita’s site and click the day/night toggle in the upper right. It does something small that surprised and delighted me. That’s all we want! Work well, surprise nicely.

September 25, 2020

"When the animals get lonely" - New album from Hussalonia!!!

New album from Hussalonia!!! One of my favorite songwriters, who thankfully records and releases more music than is humanly plausible. He's had a huge impact on me, both musically and in the ways I'm able to think, especially about mental health and depression. I'm deeply grateful for his work, and it's fun as hell to sing along with. This album is packed with hits, even on a first listen.

NONDUM IN AUGE, Hussalonia’s 48th release on Bandcamp, offers a rather straight-forward album of Americana-tinged, melancholic, alternative rock about loss and hope. Unlike previous Hussalonia albums which rely heavily on the multi-tracking process necessary for a solo recording artist, the basic tracks of NONDUM IN AUGE were recorded live in The Hussalonia Founder’s basement in the summer of 2018 with Drummer-composer-visual artist Rob Lynch and bassist-composer-designer Jonathan Hughes who have played on a number of previous Hussalonia releases (see: 2010’s DEEP IN A DONUT DREAM, 2016’s MY DEAD TOOTH, and 2019’s PHIL). While overdubs were later added, there was a concentrated effort to preserve the live sound of three people making music in a low-ceilinged, hole in the ground. It’s an album that is several years in the making, interrupted by crippling bouts of depression and anxiety surrounding the state of the nation. How does one function normally in a tailspin of chaos? One doesn’t.

Nondum In Auge is a Latin phrase which can be translated to mean: not yet at its zenith. It’s a sentiment that, if one were feeling hopeful, could apply to the United States. That it’s being offered in a dead language adds a gut punch of pathos — all things, no matter how orchestrated and engineered, must pass. Loss and hope! Loss and hope! Too, I suppose, it’s a phrase that could apply to Hussalonia itself. Still toiling in willful obscurity after 23 years, Hussalonia has not yet reached the height of its popularity or, let’s hope, potential.

"Isn't living strange? We're drawn to other people's pain. So tell me wherefore does it hurt; in some vague place beneath your shirt?"

September 25, 2020

Jim Steinman Facts

After re-listening to Celine Dion's incredible full-length "It's All Coming Back to Me Now" (written by Jim Steinman), and revisiting a few tracks off of Meat Loaf's explosive Bat out of Hell (written by Jim Steinman), I had to do a little more research about Jim Steinman! Here are two great quotes!!!

From a fun essay by DB Fishman:

He may not have been of the rock & roll world, but he was definitely of its attitude. Inspired by his heroes – Wagner, Hitchcock, Spector – Steinman’s music uses elaborate and convoluted, multi-part arrangements, channelling in bombast and excess the emotional storm of teenagedom. He regarded the songs on Bat (average length: 7 minutes) as single edits, as he’d already whittled them down from 20 minutes each.

Then, from his Wikipedia entry, after describing the wild-sounding play he wrote in college that started his musical theater career:

Several motifs, lyrics, and monologues from this show appear in songs Steinman later released. For example, the lyrics "turn around bright eyes" from "Total Eclipse of the Heart" can be heard in the song called "The Formation of the Tribe". This was originally a reference to the blast flash of nuclear explosions, and the full riff of the original Dream Engine composition can be heard in the musical break of the Bonnie Tyler recording, (including symbolic musical "blasts" to punctuate each phrase.)

Not only did I not know he wrote absolute legend and karaoke showstopper "Total Eclipse of the Heart," the fact that "turn around bright eyes" is about a nuclear explosion is one of the most ridiculous and hilarious music facts I've ever heard! 😅😲🤣

Anyway, I once described Jim Steinman as "rock music for dads who would never admit to enjoying a musical," and I stand by it. I truly love his songwriting!

September 22, 2020

"We can wish that everything was easy"

the juliana theory — we make the road by walking

"there's beauty everywhere!!!"

September 22, 2020

"Every last person is needed for the mission of resisting the descent into cruelty"

Nathan J. Robinson, at Current Affairs:

All else equal, depressed people know more than people who have not been depressed. I do not mean that more intelligent people tend to be depressed. I mean simply that a person who is depressed has had an experience that a person who has not been depressed has not. They know the depths of human misery, and this is important, because it means they know that misery exists and what that means for a person. This does not automatically make a depressive more empathetic. But it does make them aware that all is not right with the world, that there is a terrible darkness in it. It helps them see through cheerful lies about how wonderful everything is and how we should all just appreciate it and be happy.

A problem is that the people who think they matter the least are unlikely to think they have the capacity to do anything vital and important. (Unlike Trump, who thinks everything he does is vital and important.) But with so great a gap between human potential and the world we have actually made, every single human mind that can be put toward the project of improving the world needs to be. The brutal Social Darwinism embodied in Donald Trump will triumph unless the modest and compassionate assert themselves and believe in their importance. Every last person is needed for the mission of resisting the descent into cruelty; all forces that can be mobilized must be mobilized.

If you've ever wondered — as I have — why we go on despite all this: I recommend reading the whole thing.

September 22, 2020

"that could only catch the ear of the desperate"

for real: this would make a fantastic anime opening theme!!! "Blood cells pixelate and eyes dilate" is an Extremely Anime Line

September 22, 2020

"I cast a spell over the west"

i tell you what, i never listened to fall out boy until a few years ago, but if you've never given them a real shake, this album stomps

(their first three albums are all very good, energetic, singalong parties)

September 20, 2020

"Time flowed without speed or mercy"

Tim's "Inverted Review Of Final Fantasy VI" is a hell of a read. Lots of bad words, because it quotes directly from dipshit 90s teens. It is heavy. Tactile. I'm glad I read it.

I sat on the edge of my bed in my cargo shorts and hiking boots after my shift mutely pushing carts, measuring the heft of Chrono Trigger‘s turgid box. I’d bought it on faith alone. I tried to guess at how many pages its manual had. A confusion found me. It didn’t leave for a while. I think now that at last, with nonchalance, my hole had finally found me.

I'm pretty sure it's gonna get taken down in the next few months, because we're rearranging the site and not bringing everything over. Not everything on the internet will wait forever for you; much less than you think. In part, reading this made me reflect on how much of our tangible world has eroded in the last three decades. Details like a plastic case clattering into a video rental dropbox slot; craning to see an arcade machine's screen over the sweaty shoulders of taller teenagers; the heft of a box bought on faith alone. The world feels more immaterial now than ever, now that the external world is forbidden, now that we've been taken away from each other by the world's grimiest morons, now that the few places left to go, you can't go there. Life wasn't better back then; that's clear and painful, too. But there are pleasures, and there are regrets, in the tangible.

It's here.

September 20, 2020

"every word is heavy"

this is one of my favorite records from the last few years