Cleaning Windows

I cleaned some of my windows today. As a gazing-out-the-window enthusiast, I had noticed the accumulation of grime, and figured why not.

My understanding is that raindrops, snowflakes, and precipitation in general requires dust particles as nucleation sites, meaning that mouthing snow and rain involves eating sky dirt.

This dirt accumulates as the rain and snow terminates against the window. On first impressions, cleaning the window is a simple endeavour of applying soap, water, and rag followed by Windex™ and newspaper.

There was more than just dirt on the windows, and there was more than just the glass that needed cleaning.

Some of that shit was stuck on good, but it all succumbed in the end.


I recently published another video to my TouYube channel where I demonstrated some software bugs I was dealing with for my Minceraft mod.

TeamDman – SFM Bug Hunt

When I shared it with the community, multiple people were aghast at my window management

Caption: a screenshot from the video, me alt-tabbing between windows

So too were my windows dirty in real life, that I also battle with Windows in the digital realm. As above, so below.

I recently installed Omarchy on the computer in my living room whose purpose is to run Project+ after battling with Windows' unreliability on that machine.

Experiencing a tiling window manager (compositor?) for the first time was neat. Vaxry has done an awesome job with Hyprland.

Windows has virtual desktops, but there's a slow animation when switching between them (which can apparently be disabled).

Windows has not prioritized making a good experience of managing windows.


As I have iterated on my own software, I have learned many small lessons that have accumulated into a greater whole, just as motes of dirt in a rainstorm accumulate on a window.

These lessons stick around and affect my perception, but as I try to gather them all into one place, there are an uncountable amount that evade the collection process.


I remember watching a YouTube video that talks about how keeping your non-carpeted floors clean in your home helps keep the rest of your home clean.

The claim is that dirt is more attracted to a clean floor than a dirty one, therefore clean floors attract the dirt instead of that dirt coming to rest on surfaces more tedious to clean, which makes sense to me.

Goal: find the video Dataset: my latest Google Takeout export Result: inconclusive Nearest match: “Cleaning Just Got A LOT Easier” This video isn't available anymore

...

Looks like my latest Google Takeout export for my watch history only goes back as far as 2024-12-11T04:27:09.268Z, where as previous exports go back to like 2017.

reeeee


New day new me.

The eyes are a window into the soul ~ Somebody

The AutocardAnywhere browser extension detects when webpages contain the name of a Magic: The Gathering card, adding a hover-preview of the card to the text on the webpage.

I looked into how it works once, and it was a giant regular expression.

One time while I was watching Netflix, I noticed that it was even working on the subtitles, which I found hilarious.

What if we put that browser extension, Wikipedia, and Baldur's Gate's “press h on anything to get more info”, Factorio's “alt to toggle previewing machine details” features into a blender?

We'd get something like Gwern's website I suppose.

There's a lot of hyperlinks and text decorations there. Websites are archived in a way that enables Gwern to create popup windows of the content at outlinks.

...

Got distracted on the site just now, tvtropes level of attention hazard.

I was sniped by an article about cats hunting humans, then one discussing the proposition that humans getting interested in videogames means they aren't getting interested in activities that would benefit humanity more.

Gwern then links to an interesting reply to the article on Twitter from @nearcyan holding their ground that videogames are indeed detracting, maintaining opposition to Gwern's direction that people are best in their niche with very low transfer value.

@nearcyan mentions ROBLOX, which I have a history with, so I suppose it is story time.


When I was a wee lad, I played ROBLOX a lot. ROBLOX is a game engine that uses Lua scripting as a sandbox to enable user-generated places.

A notable place was Heli-Wars: Desert Attack Place Wiki where you would get guns and vehicles and fight an opposing team. A few strategically placed scripts, bricks, and tools resulting in one of the most popular places at the time, now defunct.

Jacob Geller – How Can We Bear to Throw Anything Away?

https://en.wikipedia.org/wiki/Digital_dark_age

While the places I visited are gone (or still exist but are now hard to rediscover), the memories of the experience is more readily accessible to me than the ability to re-experience the thing.

There was a genre of places called “Insert Wars”, where the place was configured by its owner to give everyone a copy of the “insert tool”, which empowers the bearer to spawn into the game any model from their collection. Adding models to your collection was a simple affair from the website; you click a big green “Get” button on models that other people have published.

This made the place a bit of a show-and-tell, where you and other players would spawn in outfits, weapons, vehicles, entire maps and just play around.

There were also “Script Builder” places, where the place listens to player chat events to let players perform remote code execution.

You could say

edit/a
workspace.Base.transparency = 1
exit/a
run/a

and make the ground under everyone's feet invisible.

The scripts being in the chat made it an interesting social experience. The character limit in the chat box was 200,000; most scripts did not cloud the chat too much.

Later, an update changed the chat input from being part of the C++ side of the client to being created using the Lua scriptable GUI elements, reducing its character length to 1,024 characters.

Naturally, people made and shared Java swing applications that would take your large script and break it into chunks and programmatically send the messages by manipulating the clipboard and keyboard.

Caption: The dismembered character of a player who just executed a script that breaks the joint of their character.

This let players interact with the world in an immediate feedback loop while surrounded by a community of other players to whom you can ask questions and show off to.

Swords, guns, midi players, wings that grant flight, capes using cloth simulations, there was a lot of interesting stuff.

Naturally, the problems caused by the scripts were also solved with scripts. Beyond using simple base/ and clear/ commands to restore the place to a default state, sometimes people would play an audio file on loop without a stop button, so you had to learn how to programmatically find the audio instance in the workspace and stop it with your own script.

I got pretty interested in the admin commands side of things. I created multiple generations of my admin commands script, each time iterating on how I registered new commands, parsed arguments, and generally interacted with a completely open-ended 3d scriptable multiplayer environment.

heal all players with elevated privileges

\heal\rank > 1

Nowadays, I have many strategies ready in my mind that I can employ when it comes time to create another command parser.

I created a Rust template to get me off the ground quickly for new projects, including a command parser and structured logging.

For creating a quick menu that calls other PowerShell scripts, fuzzy-finders like 🌸fzf and television make it easy to find the script you need when you need it.

# Action loop
while ($true) {
  # Prompt user to select an action
  $action = Get-ChildItem -Path actions `
    | Select-Object -ExpandProperty name `
    | Sort-Object -Descending `
    | fzf --prompt "Action: " --header "Select an action to run"
  if ([string]::IsNullOrWhiteSpace($action)) {
    break
  }

  # Run the selected action
  . ".\actions\$action"
  
  # Leave the action display on the screen for a moment
  # (the action loop clears it with fzf)
  pause
}

I was enthralled when I first learned about fzf, and since then I have been bundling fuzzy finders like fzf and nucleo into many of my apps.

For example, in my most recent video I use fuzzy finding to create a quick tool for focusing a window by name when I'm in a sea of open IntelliJ workspaces.

TeamDman – SFM Fancy Cable Fix

$all_windows = teamy-windows window list -o json | ConvertFrom-Json

$selected_window = $all_windows |
    Where-Object { $_.title -ne "" } |
    ForEach-Object { "$($_.hwnd) $($_.title)" } |
    fzf
if ($selected_window) {
    $selected_hwnd = $selected_window -split " " | Select-Object -First 1
    teamy-windows window focus $selected_hwnd
}

Sometimes, command line parsing appears where I don't expect it.

I was working on teamy-mft, my utility for reading from the NTFS master file table.

I was adding the teamy-mft sync command which is responsible for snapshotting the master file table for each drive using raw disk reads (an action that requires elevation) and saving it to a {driveletter}.mft file which could later be read without requiring elevation.

To perform actions requiring elevation when starting from a non-elevated context, we can spawn a new process and request it to be elevated with the User Account Control dialog.

However, this causes a problem: we ran the teamy-mft sync command from our terminal, but now this new elevated process brings its own terminal where it does its logging when we instead want it to use the existing terminal the user executed the original command in.

To solve this problem, Windows has the FreeConsole and AttachConsole functions we can use to destroy the new console and attach to the console belonging to the process that launched the elevated worker.

This whole shindig means that, when we run the teamy-mft sync command, the program does the following:

  1. parses all the command line arguments
  2. observes the absense of the --console-pid argument
  3. matches the sync command and enters its handler method
  4. loads the preference for where the .mft files should be saved
  5. observes the current process is not elevated
  6. runs an elevated copy of this process with the same arguments followed by --console-pid 123 where 123 is the id of the current process
  7. waits for the elevated process to finish
  8. exits with the exit code of the elevated process instead of proceeding

then the elevated process will:

  1. parse all command line arguments
  2. observe the presence of the --console-pid 123 argument
  3. detach from its existing console if present
  4. attach to the console using the provided process id
  5. match the sync command and enters its handler method
  6. loads the preference for where the .mft files should be saved
  7. observes the current process is elevated
  8. continues running the handler method...

Did you know that files in an NTFS file system can have multiple data streams? When you download a file using a browser, it saves some information about where you got the file from.

❯ get-content .\copyparty-sfx.py -Stream Zone.Identifier
[ZoneTransfer]
ZoneId=3
ReferrerUrl=https://github.com/9001/copyparty
HostUrl=https://release-assets.githubusercontent.com/github-production-release-asset/188700274/blahblahblah...

If you copy files between WSL and Windows, you may see abc.Zone.Identifier files appear, which is a way of avoiding data loss when moving files with multiple data streams between file systems.


Computers are annoying sometimes, here's a YouTube channel of a dude fixing farm equipment: https://www.youtube.com/@WatchWesWork