c0de517e's journal
log_006

logo: back home toot
- Chrome was a miracle.
- Fwd: Genius doesn't work for superheroes.
- Simulated Annealing...
- How smart people are stupid - pt.2
- How are smart people stupid?
- Cyberpunk
- BC compression 565 dithering?
- A bit website update! Links!
- The raspberryPi circle of life.
- Games, hardmode and people.
[Previous log file]

- Chrome was a miracle. (permalink)

Remember Chrome? And how "overnight" it became the most popular browser in the world, over Internet Explorer - which came bundled with the OS everyone was (and is) using? Not by chasing a new market, not by leapfrogging, but "simply" by doing the same things, much better?
If you think about it, that almost never happens, you don't dethrone the incumbent by simply showing you're more technically competent. Yet Chrome did, pretty much entirely due to "better code".

Quite impressive. Now of course - in the end the reasons are always due to $ - it's not that Google engineers were better than Microsoft. It's that for Google, the web and web apps are its platform, a platform that it's inherently open but the growth of which is directly proportional to the growth of Google's core business.
Microsoft on the other hand owns its platform and had no interest in the web's growth. Only in controlling its access.

Thus. Internet Explorer.

It's always about $.
Thu, 29 Jan 2026 10:07:42 -0800


- Fwd: Genius doesn't work for superheroes. (permalink)

A friend of mine is on a mission to persuade me that Batman is the best superhero. Don't ask.

I doubt he will succeed. Genius in superhero stories never works, in my experience. For two reasons. First, it's hard to picture genius being consumed at fighting local evils and saving romantic interests, but a superhero story about saving nature is not as enthralling, we care deeply about things close to us.

Second, and most importantly, a true superhuman genius would be incomprehensible to us, and that again does not make for great storytelling. We can easily picture superhuman feats of strength, that's easily understandable - even plausible minus certain artistic liberties around preservation of energy and so on, usually fixable if writers are so inclined in these irrelevant minutiae.

But superhuman minds are by definition not something we'd understand, they'd seem arbitrary, or even evil, they'd probably operate on a different set of morals, or at least we would not be able to picture what these morals would be. Christianity got it right, the ways of the Lord are mysterious.

Ozymandias in watchmen is a good try. And that's why he appears as a villain.
Sun, 26 Oct 2025 17:13:05 -0700


- Simulated Annealing... (permalink)

...is a decent way to run collaborative projects.

At first, all ideas are welcome, and should be explored. In time, the cost for change must rise. Incrementally we start ignoring changes if they are not better, merely "different" (tradeoffs) but similar overall value. Near the end, only if you can prove huge benefits you might allow changes.

A good tool to implement this is... to write things down. Near the end having things clearly written, and clearly agreed upon (signed, approved etc) shields the project from people forgetting what was the consensus, or be tempted at reopening threads - once the temperature is too cool for that to be allowed.
Wed, 10 Sep 2025 10:41:54 -0700


- How smart people are stupid - pt.2 (permalink)

I guess this is still in the "category 1" described in my previous post, but with a slant.

Sometimes I see a sort of "proxy-Dunning-Kruger", for lack of a better term, where smart people do not overestimate their smarts, nor are directly dumb in other areas, but overestimate the relative importance of their area of expertise compared to others.

E.g. they tend to assume that other professionals, in areas they don't know much about, are dumb and unimportant. That their skills are the key to saving the world, and can easily transfer to any domain, if they only had the time to dedicate to them.

This literally is what happens in delusional SV people, but in lesser ways happens everywhere, even inside different departments of a single company. One embodiment of this is not taking external, surprising facts as signs they don't know enough of a given thing, and should learn - but instead that people "there" must be doing stupid things.

This even if they are aware enough at times to see how much other people / the media etc... often misunderstands the challenges of their own domain. Still they don't manage to do the logical inference step that should make clear that happens to any other domain, and any other people not experienced in the domain - including them.

Partial self awareness?
Thu, 21 Aug 2025 13:28:22 -0700


- How are smart people stupid? (permalink)

In my experience it happens because one of two causes. Roughly same probability.

First, is that most smart people are partially smart, in a given field, and we underestimate how incredibly sectorial intelligence can be. Programmers can be not just dumb at other parts of their business (like... the business part) but even at slightly different ways of being a programmer. Etc.

The second source of dumb is to (mis)rationalize emotions - you hate or love something in a way that you can't express in logical terms and so you come up with stuff - which by the virtue of being conjured out of thin air - often is a dumb argument.

Knowing the sources of dumb in ourselves and others is important, it allows in the best case to steer people back to smart, and at worst, to avoid wasting time in fruitless debates.
Mon, 18 Aug 2025 10:54:08 -0700


- Cyberpunk (permalink)

Funny how dystopian fiction - meant to extrapolate into the future to warn us of the consequences of following a given path, unchecked - becomes if not aspirational, at least an alluring aesthetic. From Neuromancer to Cyberpunk 2077 we went from a warning to something... desirable?
A world dominated by megacorporations, the addiction to the virtual - that can be replaced only by addiction to other hard drugs... It was never meant to be "cool" or inspiring.
Sat, 2 Aug 2025 14:11:40 -0700


- BC compression 565 dithering? (permalink)

I'm puzzled by 565 dithering in BC compressors. NVTT specifically has an option for it, and I think I saw something similar in STB_DXT and RG_ETC - in all cases what it seems to happen in a pre-dither of the image going from 888 to 565.

https://github.com/nvpro-samples/nvtt_samples/blob/def1127d7ce1e3558ef6dc66129cad7800acaeb8/compress/compress.cpp#L723
But in BC, even if the endpoints are 565, the block palette is always 888 - so pre-dithering does not seem ideal. In fact - it seems like it could very well happen that you have a solid colored block that would have been expressed perfectly as BC block that now gets dithered to 565 resulting in a dither pattern and less precise colors.

I wonder why. Wouldn't it be best to "post-dither", recomputing pixel indices with error diffusion? I can foresee only two problems, maybe - both related to blocks that get encoded as flat colors. There, the palette indices might be very far apart, as the encoder typically tries to find whatever endpoints that result in one of the 4 indices being closest to the source block color average.
Then, you might end up either accumulating enough error that you "snap" some indices to a different index that is quite far from the others - or even if that doesn't happen, you have situations where the dithering between blocks looks different as the distance between the palette colors is all over the place.

I wonder though if this can't be easily fixed by doing a regular encode first, then dithering the source image from 888 to 565, and finally recomputing the block indices (keeping the palette endpoints fixed) to match the dithered image - without further error diffusion. Seems like it would be the simplest option too.
Thu, 31 Jul 2025 16:57:26 -0700


- A bit website update! Links! (permalink)

Many moons ago, when I was working at Relic, our tech VP Junacho Buchanan used to send a fun mail with various interesting links he collected himself and from others, called "Friday Links".

I took over his duties and carried them forward in many companies I've worked with after. Lately though this tradition of mine died - a bit because it was still quite time-consuming to format such a newsletter (I also used to put images and in general - try to make it fun and nice looking) - a bit because my "workflows" were disrupted.

Said workflows... hinged on twitter! I used to use the "post to twitter" button that most apps I use have to send links to my account, and then harvest them back. I imagine that many people started following me because of that link dump, and that many others might have been annoyed at it.
As now I'm not using twitter much, and I uninstalled the app from my devices, this workflow is broken...

For a while I intended to replace it with "send to pocket" (the pocket app from Mozilla) and then an IFTTT workflow that siphoned the pocket links to a spreadsheet... but guess what - pocket is dead too.

So, finally, I took upon myself to write a proper replacement. Now - similar to how I manage this journal - I can post to an ad-hoc email address I have setup, and then I have scripts that fetch emails, parse, sort, and create pages for this website.

I hope you'll enjoy! I certainly will love having again a place to dump all the interesting stuff I come across - and not have the irrational fear of losing them.
Sun, 27 Jul 2025 13:41:37 -0700


- The raspberryPi circle of life. (permalink)

For me (and I bet many others) the raspberry Pi started as a cheap, nerdy, cute - but ultimately useless gadget. It was so cheap one would buy it, but then have it sit in a drawer to collect dust.

A few years ago I finally found an use - the piHole! After that I added a few other services - culminating the small and scrappy "homelab" server that... served me well... until now.

One of the main uses of this server for me was to remote in with VScode to write this blog and execute the scripts that generate the static pages.
Unfortunately the 1gb ram on my old rPi 3 began to be a limiting factor, with vscode disconnecting often as the remote service would crash.

Time for an upgrade! Now you can buy a rPi 5 with a m.2 hat for a real SSD (finally, you don't have to fear wearing out the microSD card) and a whopping 16gb of ram! Surely that should be enough! I'm sure it is, but problem is - this setup now is as expensive as fully integrated mini computers, both of Arm or Intel vintage.
There is (imho) really no point in getting the rPi anymore, unless you're doing hardware stuff for which you want to use the GPIO pins, but even there I imagine most people will go for the smaller rPi zero or the ocean of other powerful microcontroller boards on the market today.

So... Enter my new setup! It's very similar, software-wise, to the rPi (which I have journaled about in the past) - but now running on a fanless MeLe Intel N150 mini PC!
This is (a redacted version of) my /etc/motd - which reminds me of what I have done:
== c0de517e's home v2 /etc/motd ==
# RUNNING SERVICES: PUBLIC: SSH, CopyParty. USED also to run lighttpd - not currently installed - Fail2ban on SSH for some degree of security (easy on Ubuntu, was tricky with raspbian/nftables) - CopyParty -> https://github.com/9001/copyparty/blob/hovudstraum/contrib/systemd/copyparty.service - Posts dynamic IP to duckdns via a cron job ~/duckdns/duck.sh
PRIVATE (lan): Pi-Hole.
- Had to enable DHCP and disable the router's - as my router's built-in DHCP won't understand having a DNS on the LAN. This means that w/o this server nothing will connect to the wifi router. Must change the tcp/ip settings to manual on a PC (just take a random IP on the LAN) then re-enable the router's DHCP using its web interface. Lastly - because I can't use the router's DHCP to give this computer a static IP, I instead changed /etc/netplan to disable configuration over DHCP for the ethernet port! This was important, and it's easy to overlook because the router's DHCP lease is 1 day - so when disabled it's not that this device loses its address on the lan immediately...

# SCRIPTS AND CRON JOBS: - [TODO] A whole system backup -WAS- scheduled via cron/ https://github.com/lzkelley/bkup_rpimage - Performs updates automatically (unattended-upgrades), Note:enabled auto-restarts if needed!
# SYSTEM TUNING: - Dual boot with Win11 (rarely used - remember to re-enable home router DHCP in that case) -- Forced win11 to use UTC time - Disabled win11 "fast startup" can cause problems with wifi on linux! Otherwise sometimes it failed (no wlan in ip a / error -110 when looking at: dmesg | grep -i 'iwlwifi') - Ensured TRIM is enabled / scheduled. The external SSD enclosure does not seem to support it though. Note: Using ext4 for the external SSD, exfat had too many issues, gave up.
- Configured logrotate and journald to reduce the size of the logs. Did NOT setup log2ram as this computer has a proper SSD. Could also force systemd-journald to write log to memory - but log2ram would be better if needed.
- Reduced swappiness, added noatime and commit=20 to fstab / mount - Added powertop --auto-tune to make sure the system reduces consumption when possible - Set the correct timedatectl set-timezone
# INSTALLED SOFTWARE: - Console only (ubuntu-server).
-- mc, micro, tmux, tldr, fastfetch, smartmontools, glances, bsdgames + fortune, speedtest(-cli), -- yt-dlp, nnn (directory navigator), mpv (-vo=tct or =caca), elinks, weechat -- dosemu2 [TODO - would be fun to share via GoTTY or ttyd, perhaps on a different machine?] -- [TODO?] rdfind, qbittorrent, fd(-find), http(ie), (silversearcher-)ag
- Tmux commands: new, ls, a(ttach) ... Ctrl+b d = detach! - Got rid of: Cloud-init, Snap and ubuntu-advantage stuff. Disabled many unneeded services.

== end /etc/motd ==
Sun, 27 Jul 2025 12:35:57 -0700


- Games, hardmode and people. (permalink)

Hard games, especially cryptic ones, are not designed only to make you feel smart, to reward people who spend the time learning. They are speedrunning social evolution. You are catapulted into an unforgiving, strange land, and at first you try to brave it alone, but eventually you find friends, sherpas, mentors, scholars. And you start helping, communities are formed.
It's fascinating.

And I wonder how many people are stuck into 80ies ideas of what games are still today. How "mainstream" is the knowledge that games are so much more, are at the forefront of experimentation in narrative, in social connections and so on.
Sun, 20 Jul 2025 11:48:19 -0700


[Previous log file] [Home]