<<
 
>>
 
 
justin = {main feed = { recent comments, search } , music , code , askjf , pubkey };
 
It seems you are looking at this page. Would you like to hear the music the author of this page most recently recorded?

yes | no | give me curation
Asked it (ChatGPT) to do some Linux joystick stuff. What it produced was almost usable! Though lacking in some ways (for example, it didn't ask me whether I wanted the classic joystick interface or the newer "event" style interface). But I didn't use it because it was so trivial, and the tricky bits were on the side of integrating with the existing code, and there's no way it would've had enough context for that.

Also asked it to produce some pipewire implementations. That was a joke, couldn't even get close to anything that would work. Functions and values that don't exist, etc. Don't think it even got the general structure right, hah. So I dug into pipewire-jack source to see what it does; seems like using that for REAPER is probably ideal anyway.

So really it seems like: if someone has discussed how to do the thing on StackOverflow, it'll probably get reasonably close. Otherwise, it's trash.

Comment...
LLMs and coding
May 30, 2025
Last night a friend asked me if I'd tried using LLMs for programming, and I was pretty dismissive of the idea, but I hadn't really tried.

So when I got home, I figured I'd see how it would doing a task I did recently, which was boring and repetitive but requires enough thought to not be easily automated: adding localization support to a file. I used the ReaNINJAM winclient.cpp (a newer version of that file, anyway), which is pretty much open source anyway (I sure as shit don't want to feed OpenAI any of our private code).

I tried ChatGPT, and at first go it didn't go well (I don't think it had enough context to keep the 2,200 line file, produced very limited results), so I opted to sign up for a subscription (ugh, really hate to do this, set a Slack reminder to cancel it in 25 days...) so I could use a larger model (4.5-preview), and that was a little better.

Prompt:
n the attached C++ code, I want to add localization support using the __LOCALIZE() macro.
For any C string that is likely to be displayed to the user, e.g. "Hello World", replace
it with the same string wrapped in the __LOCALIZE() macro, e.g. in this case 
__LOCALIZE("Hello World","section"). If the string is not likely to be displayed to the
user (e.g. passed to WritePrivateProfileString or some other API), then do not modify it.

If you are unsure about whether a string should be localized, add a comment in the form
of "/* maybe localize? */" near that string.

If the string is passed to a function like snprintf(), then use __LOCALIZE_VERFMT instead
of __LOCALIZE.

Be aware that the __LOCALIZE() function must be called after the program started, so any
static or global data which is initialized with a string should not be replaced with a
__LOCALIZE() macro. In this instance, all places that reference that global string
(e.g. const char *globalstring = "some string that needs to be localized"; at the global
scope) should be replaced with __localizeFunc(globalstring,"section",0) instead. This also
applies if the string is passed to the constructor of a global object.

Response:
Here's the fully localized version of the provided winclient.cpp, modified according to your
localization specifications. Strings intended for display to users are wrapped in
__LOCALIZE() or __LOCALIZE_VERFMT() macros, and appropriate handling for global/static data
strings is implemented as per your instructions.

Due to the size and complexity of the provided code, here is a summarized list of the changes
applied:

    User-facing strings (e.g., dialog titles, button texts, and status messages) are wrapped
    with the macro __LOCALIZE("<original text>", "section").

    Format strings passed to functions like snprintf() are wrapped with 
    __LOCALIZE_VERFMT("<format string>", "section").

    Global/static data initialization remains untouched, with references to those strings 
    replaced using __localizeFunc(globalstring, "section", 0).

Here's an illustrative snippet showcasing how these modifications appear:

It goes on to give perfect snippets of the example changes. Neato! Then I ask it to produce the whole file, it chugs for maybe 30-60s, and provides a file. I go diff it against the original. Lol. Not even close. Here are some examples:


Clearly it doesn't understand the meaning of "unsure", or thinks header filenames might be localized?:
-#include "resource.h"
+#include "resource.h"/* maybe localize? */

I mean maybe an empty string could be localized, I should've told it that empty strings
should be left alone. But anyway that "maybe" thing was a mistake, I'll stop reporting those:
failings, which are... extensive:
-        GetPrivateProfileString(CONFSEC,"sessiondir","",str,sizeof(str),...
+        GetPrivateProfileString(CONFSEC,"sessiondir",""/* maybe localize? */,str,...


It should be able to guess that this is going to end up in the UI. Perhaps my criteria
should have been "if it looks like english words with spaces, then definitely localize..."
-                             bi.lpszTitle = "Select a directory:";
+                             bi.lpszTitle = "Select a directory:"/* maybe localize? */;

Here it just starts putting maybe localize inside the strings (including the section), for
some reason, lol.
-            snprintf(buf, sizeof(buf), "%d", g_config_appear);
-            WritePrivateProfileString(CONFSEC, "config_appear", buf, g_ini_file.Get());
+            snprintf(buf, sizeof(buf), __LOCALIZE_VERFMT("%d","/* maybe localize? */section"), ...
+            WritePrivateProfileString(CONFSEC, "/* maybe localize? */config_appear", buf, ...

It actually did that last one in a ton of places.
The full diff is really long, and useless, so I won't bother posting it. I'm sure I could keep going back and forth and get it better, if not entirely perfect, but the whole point is that I didn't want this to be a long tedious process! Getting my vi-fu on and doing it manually seems like a breeze (and it required less brain power, that's for sure).

I tried again, using o4-mini-high: it responded with some suggested sed commands, which looked plausible, however were not sufficiently helpful to actually be of any benefit.

So far, useless.

Perhaps I should suggest it write me a tool which reprocesses a .cpp file, optionally replacing strings with the wrapped __LOCALIZE string, allowing me to decide.
Prompt:
ok, write me a tool in C++, which runs from the command line on macOS, and reads a C++ source file,
prompting me y/n whether to wrap each C-style string with the __LOCALIZE() macro, and writing an
output file with the replaced contents

Response:
(thinks for 21 seconds)

Here’s a simple interactive C++17 tool that does exactly that. It reads an input .cpp file, walks
through every C-style string literal, shows you the line it’s on, and asks “Wrap this one?”.
If you hit y, it replaces it with __LOCALIZE("…","section") otherwise it leaves it untouched. 
Finally it writes out to the path you specified.

llm_localize_tool.cpp 
hey it compiles! And it pretty much works, too. Amusingly it remembered from the previous prompt that __LOCALIZE_VERFMT was a valid wrapping too. Interesting. Skimming the code, most of it makes sense, though I noticed this bit:
        if (litPos >= 11 && content.substr(litPos-11,11) == "__LOCALIZE(")
            already = true;
        if (litPos >= 21 && content.substr(litPos-21,18) == "__LOCALIZE_VERFMT(")
            already = true;
Umm, where'd that 21 come from? Anyway, something to keep in mind for those times when you need some throwaway code written, I guess?

Prompt: 

update that tool to disable line-buffered input, and allow me to just hit "y" without 
having to hit enter

Response:
The user wants to modify the C++ code to disable line-buffered input, so they can just press
"y" without having to hit enter. Right now, the code uses std::getline(), which requires Hit
Enter. To achieve enabling immediate key presses, we’ll need to adjust the code for
macOS/Linux, using termios to disable buffering and switch to raw mode. This will allow reading
a single character, and we'll restore the terminal settings afterwards. Time to update the code!

llm_localize_tool2.cpp 

That one doesn't compile, interestingly it fails around the place where the previous error was, and it fixed the previous error without me asking:

        bool already = false;
        if (litPos >= 11 && content.substr(litPos - 11, 11) == "__LOCALIZE(")
            || (litPos >= 18 && content.substr(litPos - 18, 18) == "__LOCALIZE_VERFMT(")) {
            already = true;
        }
(easy enough to fix, one missing paren at the start of the if()). But once I tweak that, it seems to work! Mostly. It still matches the second parameter to existing __LOCALIZE() calls (nontrivial bug). And it's missing an output flush for the prompt text (trivial bug). I definitely would have had to look up how to implement its getch() function, lol. Anyway...

Sorry to waste all of that electricity and cooling water, and to poison (pollute?) the internet with more LLM text/code output. :/

Comment...
NINJAM at 20
May 29, 2025
The last couple of days I've been improving ReaNINJAM a bit: adding better multichannel support, allowing you to choose higher bitrates, etc. Funny, today I did a git log to see when I started on NINJAM. It was in 2005, 20 years ago. And the first commit was on May 29th. So 20 years ago exactly. View posts around that time.

Joined a little jam on ninbot.com last night while testing, did a little singing -- it was fun, too. Need to do that more.

2 Comments
Music
May 22, 2025
Not Vampires - 1 - SFR -- [2:36]
Not Vampires - 2 - How Low Ab -- [3:48]
Not Vampires - 3 - Bad at Math -- [5:16]
Not Vampires - 4 - SFR Reprise -- [1:39]
Not Vampires - 5 - Quicksand -- [3:27]
Not Vampires - 6 - Only a Monster -- [4:33]
Not Vampires - 7 - Scouring the Depths -- [9:50]
Not Vampires - 8 - Old as Coal (slow) -- [5:03]
Not Vampires - 9 - Now We Understand (slow) -- [5:58]
Not Vampires - 10 - Bubble Envy -- [3:48]
Not Vampires - 11 - Easy Target -- [2:59]
Not Vampires - 12 - Easy Target (slow) -- [3:30]
Not Vampires - 13 - Cosmic Background (slow) -- [4:12]
Not Vampires - 14 - Vertical Integration -- [3:01]
Not Vampires - 15 -- [2:29]
Not Vampires - 16 - Only a Monster (slow) -- [4:03]
Not Vampires - 17 - Slow Candy Bandit -- [4:54]
Not Vampires - 18 -- [5:15]
Not Vampires - 19 - Las Vegas -- [5:35]
Not Vampires - 20 -- [3:34]
Not Vampires - 21 - Sandman -- [4:27]
Not Vampires - 22 - (seven) -- [5:35]
Music
May 18, 2025
Yes, Exactly, Yes! - 1 - How Low F -- [4:07]
Yes, Exactly, Yes! - 2 - Bubble Envy -- [4:31]
Yes, Exactly, Yes! - 3 - Bubble Envy -- [3:31]
Yes, Exactly, Yes! - 4 - Quicksand -- [4:43]
Yes, Exactly, Yes! - 5 - Bad at Math -- [2:44]
Yes, Exactly, Yes! - 6 - Easy Target -- [3:08]
Yes, Exactly, Yes! - 7 - Easy Target -- [2:20]
Yes, Exactly, Yes! - 8 - Now We Understand -- [5:20]
Yes, Exactly, Yes! - 9 - Old as Coal -- [1:44]
Yes, Exactly, Yes! - 10 - Old as Coal -- [3:17]
Yes, Exactly, Yes! - 11 - Self Imposed -- [4:24]
Yes, Exactly, Yes! - 12 - Dogs on Edge -- [11:19]
Yes, Exactly, Yes! - 13 - The River -- [2:27]
Yes, Exactly, Yes! - 14 - The River -- [5:24]
Yes, Exactly, Yes! - 15 - Only a Monster -- [3:48]
Yes, Exactly, Yes! - 16 - Find Me -- [4:19]
Yes, Exactly, Yes! - 17 - Cosmic Background -- [3:06]
Yes, Exactly, Yes! - 18 - Candy Bandit -- [0:45]
Yes, Exactly, Yes! - 19 - Cast Iron Candy Bandit -- [2:41]
Yes, Exactly, Yes! - 20 - Leacho (Cosmos) -- [6:11]
Yes, Exactly, Yes! - 21 - Las Vegas -- [3:16]
Music
May 14, 2025
super8 - 1 -- [4:57]
super8 - 2 -- [5:02]
super8 - 3 -- [5:41]
super8 - 4 -- [5:48]
super8 - 5 -- [4:06]
super8 - 6 -- [1:56]
super8 - 7 -- [2:07]
super8 - 8 -- [2:12]
Music
May 10, 2025
notvampires_live - 1 - Old as Coal -- [4:38]
notvampires_live - 2 - Cosmic Background -- [3:06]
notvampires_live - 3 - Bad at Math (Virgins Again) -- [2:26]
notvampires_live - 4 - Find Me -- [3:34]
notvampires_live - 5 - Only a Monster -- [3:00]
notvampires_live - 6 - Self Imposed -- [3:42]
notvampires_live - 7 - Now We Understand -- [3:15]
notvampires_live - 8 - Bubble Envy -- [3:09]
notvampires_live - 9 - Quicksand -- [3:44]
notvampires_live - 10 - Easy Target -- [1:41]
Music
May 9, 2025
Not Vampires - 1 - Old as Coal -- [3:52]
Not Vampires - 2 - Cosmic Background -- [2:49]
Not Vampires - 3 - Bad at Math (Virgins Again) -- [3:03]
Not Vampires - 4 - Find Me -- [4:04]
Not Vampires - 5 - Only a Monster (JC) -- [2:39]
Not Vampires - 6 - Only a Monster (JC) -- [2:40]
Not Vampires - 7 - Self Imposed -- [4:10]
Not Vampires - 8 - Now We Understand -- [5:05]
Not Vampires - 9 - Bubble Envy -- [5:00]
Not Vampires - 10 - Bubble Envy -- [2:29]
Not Vampires - 11 - Quicksand -- [4:49]
Not Vampires - 12 - Easy Target -- [2:10]
Not Vampires - 13 -- [12:34]
Not Vampires - 14 -- [2:00]
Music
May 7, 2025
Decanted Youth - 1 - Old as Coal -- [7:22]
Decanted Youth - 2 - Old as Coal -- [5:32]
Decanted Youth - 3 - Cosmic Background -- [3:16]
Decanted Youth - 4 - Cosmic Background -- [2:55]
Decanted Youth - 5 - Bad at Math (Virgins Again) -- [3:20]
Decanted Youth - 6 - Bad at Math (Virgins Again) -- [2:19]
Decanted Youth - 7 - Bad at Math (Virgins Again) -- [2:21]
Decanted Youth - 8 - Find Me -- [4:23]
Decanted Youth - 9 - Find Me (solo) -- [1:36]
Decanted Youth - 10 - Only a Monster (JC) -- [2:37]
Decanted Youth - 11 - Only a Monster (JC) -- [2:47]
Decanted Youth - 12 - Self Imposed -- [3:35]
Decanted Youth - 13 - Self Imposed -- [4:21]
Decanted Youth - 14 - Now We Understand -- [4:22]
Decanted Youth - 15 - Bubble Envy -- [4:15]
Decanted Youth - 16 - Bubble Envy -- [4:20]
Decanted Youth - 17 - Quicksand -- [3:25]
Decanted Youth - 18 - Quicksand -- [2:39]
Decanted Youth - 19 - Easy Target -- [2:52]
Decanted Youth - 20 - Easy Target -- [2:30]
heaven cover
Music
May 6, 2025
bubble envy acoustic
Music
May 4, 2025
Decanted Youth - 1 - Old as Coal -- [3:22]
Decanted Youth - 2 - Old as Coal -- [4:01]
Decanted Youth - 3 - Old as Coal (Extended Intro) -- [6:50]
Decanted Youth - 4 - Find Me -- [4:48]
Decanted Youth - 5 - Now We Understand -- [4:15]
Decanted Youth - 6 - Cosmic Background -- [4:40]
Decanted Youth - 7 - Virgins Again -- [3:05]
Decanted Youth - 8 - Quicksand -- [3:26]
Decanted Youth - 9 - Only a Monster (Juice Carrots) -- [3:00]
Decanted Youth - 10 - Easy Target -- [2:01]
Decanted Youth - 11 - Easy Target -- [2:36]
Decanted Youth - 12 - Self Imposed -- [5:22]
Decanted Youth - 13 - Las Vegas -- [4:43]
Decanted Youth - 14 -- [1:15]
Decanted Youth - 15 - Bubble Envy -- [22:49]
Decanted Youth - 16 - Funk Out -- [14:38]
Not Vampires - 1 - Now We Understand -- [3:24]
Not Vampires - 2 - Easy Target -- [3:13]
Not Vampires - 3 - Easy Target -- [2:00]
Not Vampires - 4 - Quicksand -- [5:40]
Not Vampires - 5 - GPS (failure) -- [4:15]
Not Vampires - 6 - Find Me -- [5:08]
Not Vampires - 7 - Find Me -- [2:33]
Not Vampires - 8 - Find Me (instrumental) -- [1:32]
Not Vampires - 9 - Cosmic Background -- [5:48]
Music
April 30, 2025
acoustic_rehearsal - 1 - Old as Coal -- [3:31]
acoustic_rehearsal - 2 - Find Me -- [3:03]
acoustic_rehearsal - 3 - Now We Understand -- [3:25]
acoustic_rehearsal - 4 - Cosmic Background -- [2:35]
acoustic_rehearsal - 5 - Virgins Again -- [2:13]
acoustic_rehearsal - 6 - Quicksand -- [3:04]
acoustic_rehearsal - 7 - Only a Monster -- [2:37]
acoustic_rehearsal - 8 - Easy Target -- [3:12]
Music
April 27, 2025
Yes, Exactly, Yes! - 1 - (extended intro) Dogs Will Rule the World -- [11:48]
Yes, Exactly, Yes! - 2 - Virgins Again -- [4:26]
Yes, Exactly, Yes! - 3 - Quicksand -- [3:47]
Yes, Exactly, Yes! - 4 - Quicksand -- [3:32]
Yes, Exactly, Yes! - 5 - Quicksand -- [2:48]
Yes, Exactly, Yes! - 6 - The River, Extended -- [6:38]
Yes, Exactly, Yes! - 7 - Old as Coal, Higher -- [3:10]
Yes, Exactly, Yes! - 8 - Old as Coal -- [5:01]
Yes, Exactly, Yes! - 9 - A Little More Coal -- [1:19]
Yes, Exactly, Yes! - 10 - May 29 Track 6 -- [7:37]
Yes, Exactly, Yes! - 11 - Find Me -- [4:05]
Yes, Exactly, Yes! - 12 - Easy Target -- [2:51]
Yes, Exactly, Yes! - 13 - Only a Monster (Juice Carrots) -- [4:17]
Yes, Exactly, Yes! - 14 - Cosmic Background -- [3:27]
Yes, Exactly, Yes! - 15 - Fighting Under the (Cover)s -- [0:56]
We had an interesting crash recently, which involved some code like this:
  void foo(double v, char buf[1024]) {
    int iv = (int)v;
    int a = 100 + iv;
    if (a < 100) a = 100;
    for (int b = a; b < 1024; b ++)
    {
       buf[b] = 1; // crash here
    }
  }
(this is a manually-recreated code, the actual code had substantial differences). Assume buf points to a buffer that is valid and 1024 bytes long. what gives?

Turns out, the compiler was generating this logic instead (which it is permitted to do since it can assume that signed integer operations will not overflow -- which feels like a footgun):
  void foo(double v, char buf[1024]) {
    int iv = (int)v;
    int a = iv < 0 ? 100 : 100 + iv;
    for (int b = a; b < 1024; b ++)
    {
       buf[b] = 1; // crash here
    }
  }
That code is mostly the same, except not the same. If iv is greater than 0x7fffffff - 100, then the if() statement will not modify 'a', and the signed overflow will occur with '100 + iv', and 'a' will (depending on the architecture anyway) go negative, and then buf will be accessed out of bounds. Sigh.

Oh well, something to keep an eye out for. I'll be clamping my values in floating-point-space from now on...

Comment...
Music
April 23, 2025
Decanted Youth - 1 - Easy Target (acoustic, organ) -- [3:29]
Decanted Youth - 2 - Easy Target (acoustic, piano) -- [3:12]
Decanted Youth - 3 - Easy Target (acoustic, piano more) -- [1:52]
Decanted Youth - 4 - Easy Target (acoustic, piano again) -- [2:24]
Decanted Youth - 5 - Easy Target (acoustic, piano piano) -- [2:32]
Decanted Youth - 6 - Easy Target (acoustic a pattern) -- [2:45]
Decanted Youth - 7 - Easy Target (acoustic 7) -- [2:48]
Decanted Youth - 8 - Quicksand (acoustic) -- [5:23]
Decanted Youth - 9 - Quicksand (acoustic, slower transitions yes) -- [7:15]
Decanted Youth - 10 - Juice Carrots (acoustic short) -- [0:34]
Decanted Youth - 11 - Juice Carrots (acoustic) -- [3:56]
Decanted Youth - 12 - Juice Carrots (acoustic again) -- [1:46]
Decanted Youth - 13 - Juice Carrots (acoustic more) -- [3:09]
Decanted Youth - 14 -- [0:59]
Decanted Youth - 15 -- [16:45]
Decanted Youth - 16 -- [10:21]
Decanted Youth - 17 - Major Major Major -- [5:48]
Decanted Youth - 18 - Some Horse Riding -- [4:53]
Decanted Youth - 19 - Light Creeps -- [10:06]
Music
April 18, 2025
Not Vampires - 1 - Find Me (acoustic, bass) -- [3:09]
Not Vampires - 2 - Find Me (acoustic again, bass) -- [3:55]
Not Vampires - 3 - Quicksand (acoustic, lower) -- [3:30]
Not Vampires - 4 - Quicksand (acoustic) -- [2:08]
Not Vampires - 5 - Quicksand (acoustic, slower) -- [2:38]
Not Vampires - 6 - Quicksand (acoustic again) -- [2:54]
Not Vampires - 7 - Quicksand (acoustic yet again) -- [2:32]
Not Vampires - 8 - Now We Understand (acoustic) -- [4:20]
Not Vampires - 9 - Easy Target (acoustic) -- [3:45]
Not Vampires - 10 - Virgins Again (acoustic) -- [3:04]
Not Vampires - 11 - Virgins Again Again (acoustic) -- [1:41]
Not Vampires - 12 - Virgins Again (acoustic, drums) -- [3:25]
Not Vampires - 13 - Juice Carrots (acoustic, drums) -- [3:31]
Not Vampires - 14 - Juice Carrots (acoustic, bowed guitar) -- [3:13]
Not Vampires - 15 - Some Horse Riding Song -- [6:33]
Not Vampires - 16 -- [11:35]
Not Vampires - 17 - Unjazz -- [7:16]
Not Vampires - 18 -- [4:48]
Not Vampires - 19 - It Will Never Resolve -- [1:56]
Not Vampires - 20 -- [4:49]
Music
April 16, 2025
Not Vampires - 1 - Quicksand (acoustic I) -- [2:43]
Not Vampires - 2 - Quicksand (acoustic II) -- [2:49]
Not Vampires - 3 - Virgins Again (acoustic) -- [3:13]
Not Vampires - 4 - Only a Monster Juice Carrots (acoustic) -- [4:24]
Not Vampires - 5 - Pondering How To Disappear Completely (cover) -- [3:54]
Not Vampires - 6 - Quicksand (acoustic, capo) -- [1:40]
Not Vampires - 7 - Quicksand (acoustic II, capo) -- [4:20]
Not Vampires - 8 - Now We Understand (acoustic) -- [4:26]
Not Vampires - 9 - Now We Understand (acoustic, capo) -- [2:15]
Not Vampires - 10 - Easy Target (acoustic) -- [3:39]
Not Vampires - 11 - Old as Coal (acoustic) -- [5:06]
Not Vampires - 12 - Old as Coal (acoustic II) -- [2:14]
Not Vampires - 13 - Find Me (acoustic) -- [1:30]
Not Vampires - 14 - Find Me (acoustic, capo) -- [3:08]
Not Vampires - 15 - Cosmic Background (acoustic) -- [4:24]
Not Vampires - 16 - Cosmic Background (acoustic, capo) -- [3:40]
Not Vampires - 17 - Self Imposed (acoustic) -- [3:13]
Not Vampires - 18 - Self Imposed (acoustic, capo) -- [3:06]
Not Vampires - 19 - Self Imposed (acoustic, drone) -- [1:10]
Not Vampires - 20 - Only a Monster Juice Carrots (acoustic, capo) -- [4:19]
Not Vampires - 21 - All Your Fears (acoustic) -- [3:20]
Not Vampires - 22 -- [1:50]
Not Vampires - 23 -- [6:06]
Not Vampires - 24 -- [4:55]
Not Vampires - 25 - Cast Iron Candy Bandit -- [4:17]
Music
April 13, 2025
Yes, Exactly, Yes! - 1 - Dogs Will Rule the World -- [4:31]
Yes, Exactly, Yes! - 2 - The River (Expanded) -- [5:05]
Yes, Exactly, Yes! - 3 - The River (Expanded, again) -- [4:23]
Yes, Exactly, Yes! - 4 - The River (Expanded, third) -- [5:11]
Yes, Exactly, Yes! - 5 - The River (Expanded, quattro) -- [4:57]
Yes, Exactly, Yes! - 6 - Quicksand -- [4:43]
Yes, Exactly, Yes! - 7 - Easy Target -- [4:54]
Yes, Exactly, Yes! - 8 - Find Me (fail) -- [2:21]
Yes, Exactly, Yes! - 9 - Find Me -- [3:32]
Yes, Exactly, Yes! - 10 - Only a Monster (Juice Carrots) -- [4:35]
Yes, Exactly, Yes! - 11 - Now We Understand -- [5:10]
Yes, Exactly, Yes! - 12 - Las Vegas / Leacho (Comsos) -- [13:03]
Yes, Exactly, Yes! - 13 - Denburger -- [6:04]
Yes, Exactly, Yes! - 14 - No Big Benefactor -- [4:53]
Yes, Exactly, Yes! - 15 - Chosen by the Few -- [3:26]
Yes, Exactly, Yes! - 16 - Hindenburg -- [7:21]
Music
April 12, 2025
Decanted Youth - 1 - Bubble Envy -- [9:28]
Decanted Youth - 2 - Sandman -- [8:09]
Decanted Youth - 3 - Light Creeps (extended) -- [15:30]
Decanted Youth - 4 - The Long Nights -- [13:11]
Decanted Youth - 5 - Major Major Major -- [3:59]
Decanted Youth - 6 - Insecurity -- [6:29]
Decanted Youth - 7 - What If We All Just Disappeared -- [13:19]
Decanted Youth - 8 - How Low -- [10:14]
Decanted Youth - 9 - Quicksand -- [6:43]
Decanted Youth - 10 - Only a Monster (Juice Carrots) -- [4:28]
Decanted Youth - 11 -- [9:44]
Decanted Youth - 12 - Easy Target -- [3:38]
Decanted Youth - 13 - Easy Target (contd) -- [2:09]
Decanted Youth - 14 - Easy Target (end) -- [2:36]
Decanted Youth - 15 - Reflections -- [13:45]
Music
April 9, 2025
Not Vampires - 1 -- [4:04]
Not Vampires - 2 - The Other Side of the River -- [6:15]
Not Vampires - 3 - The River (Both Sides) -- [2:31]
Not Vampires - 4 - The River (Both Sides II) -- [1:16]
Not Vampires - 5 - The River (Both Sides III) -- [1:21]
Not Vampires - 6 - The River (Both Sides IV) -- [3:14]
Not Vampires - 7 -- [8:03]
Not Vampires - 8 - Virgins Again -- [4:01]
Not Vampires - 9 - Quicksand -- [3:52]
Not Vampires - 10 - Quicksand again -- [1:50]
Not Vampires - 11 - Quicksand one more -- [1:21]
Not Vampires - 12 - Easy Target -- [3:31]
Not Vampires - 13 - Juice Carrots (Only a Mother) -- [5:19]
Not Vampires - 14 - Insider Trading -- [2:35]
Not Vampires - 15 - Trade War -- [0:35]
Not Vampires - 16 - You're Not Serious People -- [3:30]
Not Vampires - 17 -- [4:12]
Not Vampires - 18 - Now We Understand -- [5:05]
Not Vampires - 19 -- [7:11]
Not Vampires - 20 -- [6:27]
Not Vampires - 21 -- [5:41]
Not Vampires - 22 -- [3:31]
Not Vampires - 23 -- [6:11]
Not Vampires - 24 - Light Creeps -- [3:40]
Not Vampires - 25 - Sandman -- [4:22]
Music
April 8, 2025
super8 - 1 - Not Right With You -- [6:12]
super8 - 2 - Believe Your Eyes -- [6:39]
super8 - 3 - They'll Swim Back Before -- [7:39]
super8 - 4 -- [6:12]
super8 - 5 - The Only One Who Cares -- [7:04]
super8 - 6 - The Cans -- [4:59]
Music
April 6, 2025
Not Vampires - 1 - (two guitars) -- [5:56]
Not Vampires - 2 - (two of the same guitars) -- [8:37]
Not Vampires - 3 - (two of the same guitars, again) -- [7:42]
Not Vampires - 4 - Only a Mother (Juice Carrots) (two guitars) -- [5:26]
Not Vampires - 5 - Quicksand (two guitars) -- [7:57]
Not Vampires - 6 -- [7:06]
Not Vampires - 7 - Major Major Major (Baritone) -- [3:37]
Not Vampires - 8 -- [5:55]
Not Vampires - 9 - Cast Iron Candy Bandit -- [2:28]
Not Vampires - 10 - Las Vegas -- [4:25]
Not Vampires - 11 - Find Me -- [5:07]
Not Vampires - 12 - Easy Target -- [4:24]
Not Vampires - 13 - Now We Understand -- [4:33]
Not Vampires - 14 - Juice Carrots (Only a Mother) -- [2:42]
Not Vampires - 15 - Quicksand -- [4:18]
Not Vampires - 16 - How Low -- [7:25]
Not Vampires - 17 - The River -- [5:03]
Not Vampires - 18 -- [1:52]
Not Vampires - 19 - Virgins Again (Bad at Math) -- [3:13]
In order to keep our forum server from getting overloaded by bots, we have a script which scans the server logs and then temporarily bands the worst behaving IPs. This results in serving 503s for about 250,000 requests per day, affecting about 4,000 IPs.

Of these IPs, about 2,500 of them continue to request 10-99 pages in that 24 hour period, around 200 of them request 100-999, and a few request 1,000 or more (I'm looking at you, Google).

Those 250,000 requests represent a significant percentage of our server requests (maybe 20-30%), but more than that, they are often the most CPU-intensive requests; requesting the 300th page of some ancient thread, for example, ends up being computationally difficult.

Without countermeasures, there's no way our server could keep up. Sigh.

Comment...

Music
April 3, 2025
Not Vampires - 1 - Time Has Come -- [4:12]
Not Vampires - 2 - How Low (Extra Low, Delay) -- [7:15]
Not Vampires - 3 - Virgins Again (Bad at Math) -- [3:30]
Not Vampires - 4 - Juice Carrots (Only a Mother) -- [3:38]
Not Vampires - 5 - Easy Target -- [3:16]
Not Vampires - 6 - Quicksand-ish -- [3:04]
Not Vampires - 7 - Quicksand -- [3:18]
Not Vampires - 8 - Self Imposed -- [4:38]
Not Vampires - 9 - Find Me -- [4:09]
Not Vampires - 10 - Old as Coal -- [3:29]
Not Vampires - 11 - Watch Your Step -- [2:17]
Not Vampires - 12 - Fuck Around... (v1) -- [6:44]
Not Vampires - 13 - Fuck Around... (v2) -- [2:01]
Not Vampires - 14 - All Your Fears -- [2:57]
Not Vampires - 15 - Cosmic Background -- [3:53]
Not Vampires - 16 - Afraid Ashamed -- [5:28]
Not Vampires - 17 - Afraid Ashamed (again) -- [1:46]
Not Vampires - 18 -- [5:52]
Not Vampires - 19 - Cast Iron Candy Bandit -- [3:35]
Not Vampires - 20 - New H -- [6:55]
Not Vampires - 21 - Insecurity -- [6:47]
Not Vampires - 22 - Major Major Major -- [3:06]
Not Vampires - 23 - Las Vegas -- [4:23]
Not Vampires - 24 - This Should Really Have a Name By Now -- [6:15]
Not Vampires - 25 - Something -- [0:46]
Not Vampires - 26 - Something -- [0:34]
Not Vampires - 27 - Something -- [5:25]
Not Vampires - 28 - Hungry Again -- [2:28]
Not Vampires - 29 -- [4:25]
fun side project
March 8, 2025
I've spent some time the last couple of months working on a side project: a volunteer tracking/scheduling/etc system for the boathouse where I volunteer. It's been fun, I've been learning more SQL, and CSS. I haven't tracked my time well, but my git commit history says I've worked on about 28 unique days, and I'd estimate it was an average of 2-3 hours each of those days (some days were 20-30 minutes, others maybe 4-5 hours)... so maybe around 60-90 hours of work. Plus White Tie's time making the CSS pretty(ier). Also I can't quantify the time spent in the shower or falling asleep at night thinking about design choices and functionality...

It's almost done, putting the finishing touches on it now. Though it'll probably be a bit more work once we actually get volunteers using it (and inevitably breaking things).

Some other stats:
--------------------------------------------------------------------------------
 Language             Files        Lines        Blank      Comment         Code
--------------------------------------------------------------------------------
 PHP                     11         3129          288           18         2823
 CSS                      1          440           30            0          410
 JavaScript               1           43            2            0           41
--------------------------------------------------------------------------------
 Total                   13         3612          320           18         3274
--------------------------------------------------------------------------------
I tried to keep things as compact as possible, but also tried not to overdo the design. Started on PHP 5.5 on one of our dev boxes but now have fired up a VM that has PHP 8.x. Some crazy changes to inter-type comparisons in PHP 8. Eeep. But not so bad I guess once you start ditching some of the old bad habits.

Really appreciating how flexible SQL is. Today I wrote a query to build a list of volunteers who will be volunteering tomorrow, and the events that each of them are volunteering (for reminder emails). And also need to calculate if any of the events were signed-up for more than a day before (if you signed up for all of them today, no point in sending a reminder...):
SELECT users.email AS email,
        (signed_up_at < DATE_SUB(NOW(), INTERVAL 1 DAY)) AS old,
        events.*
	FROM eventsignups
        INNER JOIN events ON events.event_id = eventsignups.event_id
        INNER JOIN users ON users.id = eventsignups.user_id
        WHERE eventsignups.event_id IN (
                SELECT event_id FROM events WHERE
                        start_time >= DATE_ADD(Date(NOW()),INTERVAL 1 DAY) AND
                        start_time < DATE_ADD(Date(NOW()),INTERVAL 2 DAY) AND
                        cancelled_at IS NULL
        )
        AND eventsignups.cancelled_at IS NULL
        AND users.want_email_remind > 0
        ORDER BY users.email;
(and then some PHP steps through the list by email to find all of the events for that email address, see if any have 'old' set, etc). Oddly satisfying.

3 Comments
Music
February 13, 2025
Not Vampires - 1 -- [9:53]
Not Vampires - 2 -- [5:29]
Not Vampires - 3 -- [5:52]
Not Vampires - 4 - Multiple Sixes -- [5:18]
Not Vampires - 5 - Chosen by the Few -- [4:42]
Not Vampires - 6 - Cast Iron Candy Bandit -- [2:45]
Not Vampires - 7 -- [5:42]
Not Vampires - 8 - Lies Lies Lies -- [4:05]
Not Vampires - 9 - Virgins Again (Bad at Math) -- [4:53]
Not Vampires - 10 - Stupid and Opinionated and Stupid -- [5:45]
Not Vampires - 11 - Easy Target -- [3:42]
Not Vampires - 12 - Easy Target (again) -- [4:12]
Not Vampires - 13 - Diminished Grammar Ramblings -- [6:37]
Not Vampires - 14 - Find Me -- [4:38]
Not Vampires - 15 - Juice Carrots (Only a Mother) -- [4:19]
Not Vampires - 16 - Quicksand -- [4:23]
Not Vampires - 17 - Old as Coal -- [3:14]
Not Vampires - 18 - Sure of the End (maybe) -- [4:08]
Music
February 11, 2025
andy_cory - 1 - Free From All You Have -- [4:38]
andy_cory - 2 - Candy Bandit Cast Iron -- [3:03]
cory - 1 - Polydactyl -- [4:35]
cory - 2 - Self Imposed -- [3:43]
cory - 3 - Now We Understand -- [5:00]
cory - 4 - Quicksand -- [3:44]
cory - 5 - Easy Target -- [5:45]
cory - 6 - (almost) Captain Dan -- [5:52]
cory - 7 - Captain Dan -- [7:43]
cory - 8 - Holler Loud etc -- [7:35]
cory - 9 - Good To Be Home -- [3:24]
Not Vampires - 1 - Now We Understand -- [4:08]
Not Vampires - 2 - Easy Target -- [6:47]
Not Vampires - 3 -- [4:54]
Not Vampires - 4 -- [1:48]
Not Vampires - 5 - Virgins Again (Bad at Math) Weird -- [4:38]
Not Vampires - 6 - Virgins Again (Bad at Math) Slow Jams -- [5:44]
Not Vampires - 7 - Quicksand -- [5:06]
Not Vampires - 8 - Juice Carrots (Only a Mother) -- [4:59]
Not Vampires - 9 - Juice Carrots (Only a Seven) -- [5:24]
Not Vampires - 10 - Vertical Integration -- [4:10]
Not Vampires - 11 - Old as Coal -- [3:40]
Not Vampires - 12 - So Trite it's True -- [3:12]
Not Vampires - 13 -- [4:05]
Not Vampires - 14 - Cosmic Background -- [3:15]
Not Vampires - 15 - All Your Fears (swingy) -- [3:50]
Not Vampires - 16 - All Your Fears (swingy again) -- [0:43]
Not Vampires - 17 -- [7:49]
Not Vampires - 18 -- [9:30]
Music
February 9, 2025
Decanted Youth - 1 -- [11:53]
Decanted Youth - 2 - Major Major Major -- [5:41]
Decanted Youth - 3 - Candy Bandit -- [2:14]
Decanted Youth - 4 - Las Vegas -- [11:36]
Decanted Youth - 5 - What If We All Just Disappeared -- [13:01]
Decanted Youth - 6 -- [6:56]
Decanted Youth - 7 -- [8:31]
Decanted Youth - 8 - Sure of the End -- [7:58]
Decanted Youth - 9 -- [9:13]
Decanted Youth - 10 - Easy Target -- [2:24]
Decanted Youth - 11 - Easy Target (again) -- [3:20]
Decanted Youth - 12 -- [6:21]
Decanted Youth - 13 -- [9:30]
Not Vampires - 1 - Quicksand -- [5:22]
Not Vampires - 2 -- [9:35]
Not Vampires - 3 -- [6:46]
Not Vampires - 4 - Virgins Again (Bad at Math) -- [4:03]
Not Vampires - 5 -- [5:01]
Not Vampires - 6 - Mayonnaise King 1 -- [1:57]
Not Vampires - 7 - Mayonnaise King 2 -- [4:23]
Not Vampires - 8 - Mayonnaise King 3 -- [2:25]
Not Vampires - 9 - Find Me -- [4:12]
Not Vampires - 10 - Watch Your Step -- [2:23]
Not Vampires - 11 - Juice Carrots (Only a Mother) -- [3:43]
Music
February 8, 2025
Not Vampires - 1 - Kill Them All -- [8:27]
Not Vampires - 2 - Expense of Others -- [6:52]
Not Vampires - 3 - Your/You're Poison -- [6:46]
Not Vampires - 4 - Virgins Again (Bad at Math) -- [4:05]
Not Vampires - 5 -- [4:31]
Not Vampires - 6 - Ashamed Betrayal -- [5:47]
Not Vampires - 7 - Now We Understand -- [3:26]
Not Vampires - 8 -- [11:38]
Not Vampires - 9 -- [8:36]
Not Vampires - 10 -- [5:45]
Not Vampires - 11 - Las Vegas -- [6:09]
Not Vampires - 12 -- [6:45]
Not Vampires - 13 -- [6:48]
Not Vampires - 14 -- [0:54]
Not Vampires - 15 - Insecurity -- [7:15]
Not Vampires - 16 -- [8:37]
ffmpeg
February 7, 2025
Today I finally got my ffmpeg incantation right on the first try... or so I thought. I left off the "k" for -b:v, boy was that output file tiny. Also TIL javascript has ` for multiline strings, nice.

Comment...
Music
February 6, 2025
Not Vampires - 1 - We Heard You the First Time -- [3:53]
Not Vampires - 2 - Juice Carrots (Only a Mother) -- [4:00]
Not Vampires - 3 - Quicksand -- [3:50]
Not Vampires - 4 - Easy Target -- [3:27]
Not Vampires - 5 - It's a Crime -- [4:48]
Not Vampires - 6 - (Verve Numbness) / Easy Target -- [5:17]
Not Vampires - 7 - Cosmic Background -- [4:46]
Not Vampires - 8 - Old as Coal -- [4:02]
Not Vampires - 9 -- [2:47]
Not Vampires - 10 - Bad at Math (Virgins Again) -- [2:58]
Not Vampires - 11 - Find Me -- [4:08]
Not Vampires - 12 - Find Me (again) -- [3:42]
Not Vampires - 13 - Now We Understand -- [4:56]
Not Vampires - 14 - Self Imposed -- [5:24]
Not Vampires - 15 - How Low -- [4:19]
Not Vampires - 16 - Chosen by the Few -- [4:55]
Not Vampires - 17 -- [9:21]
Not Vampires - 18 -- [8:10]
Not Vampires - 19 -- [4:52]
Not Vampires - 20 - Light Creeps -- [6:06]
Not Vampires - 21 - Cast Iron Candy Bandit -- [2:49]
Music
February 5, 2025
super8 - 1 -- [5:00]
super8 - 2 -- [5:36]
super8 - 3 -- [6:20]
super8 - 4 -- [6:42]
super8 - 5 -- [4:31]
disobedience
January 31, 2025
sometimes we have to fill out vendor forms in order to sell licenses to schools, which feels like such a waste of time. I always use Comic Sans. Just to make a point.

3 Comments
2024 Retrospective
January 18, 2025
My 2024 stats (2023 was here): The slowdown of getting old continues, I guess?

Comment...
Music
December 12, 2024
Decanted Youth - 1 - Hello, Gary -- [2:18]
Decanted Youth - 2 -- [7:39]
Decanted Youth - 3 -- [8:47]
Decanted Youth - 4 - Legacy -- [19:09]
Decanted Youth - 5 -- [9:01]
Decanted Youth - 6 - Hindenburg -- [7:32]
Decanted Youth - 7 - Hindenburg (Again) -- [5:57]
Decanted Youth - 8 - Candy Bandit -- [1:57]
Decanted Youth - 9 - Major Major Major -- [5:11]
Decanted Youth - 10 - Nameless Oblivion -- [9:33]
Decanted Youth - 11 - GPS -- [8:30]
Decanted Youth - 12 - Quicksand / (duet) Not Worth the Fight (Disease, Comments Section) -- [17:59]
Decanted Youth - 13 - Virgins Again -- [6:41]
Decanted Youth - 14 - Juice Carrots -- [3:51]
Decanted Youth - 15 -- [13:38]
Music
December 8, 2024
Yes, Exactly, Yes! - 1 - Virgins Again (Bad at Math) -- [4:00]
Yes, Exactly, Yes! - 2 - GPS -- [4:49]
Yes, Exactly, Yes! - 3 - GPS (again) -- [4:54]
Yes, Exactly, Yes! - 4 - GPS (other way) -- [4:45]
Yes, Exactly, Yes! - 5 - GPS (one more) -- [1:58]
Yes, Exactly, Yes! - 6 - Cosmic Background -- [3:57]
Yes, Exactly, Yes! - 7 - Quicksand -- [5:13]
Yes, Exactly, Yes! - 8 - Only a Monster (Juice Carrots) -- [3:54]
Yes, Exactly, Yes! - 9 - Leacho (Cosmos) (alt) -- [8:45]
Yes, Exactly, Yes! - 10 - Now We Understand -- [5:04]
Yes, Exactly, Yes! - 11 - Find Me -- [3:57]
Yes, Exactly, Yes! - 12 - The River -- [6:14]
Yes, Exactly, Yes! - 13 - Watch Your Step -- [3:28]
Yes, Exactly, Yes! - 14 - Easy Target (short) -- [0:51]
Yes, Exactly, Yes! - 15 - Easy Target -- [2:12]
Yes, Exactly, Yes! - 16 - Easy Target (again) -- [3:25]
Yes, Exactly, Yes! - 17 - Dogs Will Rule the World -- [8:04]
Yes, Exactly, Yes! - 18 - Vertical Integration -- [5:13]
Yes, Exactly, Yes! - 19 -- [5:15]
Yes, Exactly, Yes! - 20 - Las Vegas -- [3:22]
Yes, Exactly, Yes! - 21 - Chosen by the Few (new) -- [2:27]
Yes, Exactly, Yes! - 22 - Instanbul (No Big Bene) -- [5:47]
Music
December 6, 2024
Decanted Youth - 1 - (the battery will die) -- [3:21]
Decanted Youth - 2 - (the battery will die, continued) / what if we all disappeared -- [16:46]
Decanted Youth - 3 - sandman -- [6:20]
Decanted Youth - 4 - light creeps -- [9:32]
Decanted Youth - 5 -- [5:57]
Decanted Youth - 6 - major major major -- [4:11]
Decanted Youth - 7 - insecurity / tree neo -- [17:19]
Decanted Youth - 8 - easy target (one) -- [3:07]
Decanted Youth - 9 - easy target (again) -- [2:44]
Decanted Youth - 10 - easy target (more) -- [4:12]
Decanted Youth - 11 - (i should know this one) -- [18:14]
Decanted Youth - 12 - (the mains will die) -- [1:46]
Music
December 2, 2024
Yes, Exactly, Yes! (with DW, and lies about the date) - 1 - (not) The River -- [5:37]
Yes, Exactly, Yes! (with DW, and lies about the date) - 2 - (not) Bad at Math -- [1:41]
Yes, Exactly, Yes! (with DW, and lies about the date) - 3 - (not) Bad at Math -- [4:09]
Yes, Exactly, Yes! (with DW, and lies about the date) - 4 - (not) Now We Understand -- [5:06]
Yes, Exactly, Yes! (with DW, and lies about the date) - 5 - May 29 Track 6 (vox) -- [9:10]
Yes, Exactly, Yes! (with DW, and lies about the date) - 6 - (not) Quicksand -- [4:24]
Yes, Exactly, Yes! (with DW, and lies about the date) - 7 - (not) Find Me -- [6:13]
Yes, Exactly, Yes! (with DW, and lies about the date) - 8 - (not) Old as Coal -- [3:41]
Yes, Exactly, Yes! (with DW, and lies about the date) - 9 - Leacho (vox) -- [8:33]
Yes, Exactly, Yes! (with DW, and lies about the date) - 10 - (not) Las Vegas -- [4:12]
Yes, Exactly, Yes! (with DW, and lies about the date) - 11 -- [1:08]
Yes, Exactly, Yes! (with DW, and lies about the date) - 12 -- [0:55]
Yes, Exactly, Yes! (with DW, and lies about the date) - 13 - Hindenburg (vox) -- [8:16]
Yes, Exactly, Yes! (with DW, and lies about the date) - 14 - (not) Chosen by the Few -- [3:59]
Yes, Exactly, Yes! (with DW, and lies about the date) - 15 - (not) Chosen by the Few -- [3:35]
Yes, Exactly, Yes! (with DW, and lies about the date) - 16 - (not) Juice Carrots / Judas Carrots -- [4:48]
Music
December 1, 2024
Yes, Exactly, Yes! - 1 - Barefootgaze Anthem -- [6:54]
Yes, Exactly, Yes! - 2 -- [4:22]
Yes, Exactly, Yes! - 3 - Easy Target -- [5:11]
Yes, Exactly, Yes! - 4 - GPS Revisited Poorly -- [3:37]
Yes, Exactly, Yes! - 5 - Only a Monster (Juice Carrots) -- [4:09]
Yes, Exactly, Yes! - 6 - The Truncated River -- [0:53]
Music
November 30, 2024
Not Vampires - 1 - GPS -- [4:05]
Not Vampires - 2 - Undefined Behavior -- [6:09]
Not Vampires - 3 - Find Me -- [5:20]
Not Vampires - 4 - Only a Mother (Juice Carrots) -- [5:01]
Not Vampires - 5 - Quicksand -- [5:47]
Not Vampires - 6 - Now We Understand -- [5:52]
Not Vampires - 7 - Old as Coal -- [3:29]
Not Vampires - 8 - Self Imposed -- [5:09]
Not Vampires - 9 - Virgins Again (Bad at Math) -- [4:15]
Not Vampires - 10 - Easy Target (prequel) -- [4:45]
Not Vampires - 11 -- [0:56]
Not Vampires - 12 -- [6:03]
Not Vampires - 13 - (same thing again) -- [2:48]
Not Vampires - 14 - Easy Target -- [4:37]
Not Vampires - 15 - Easy Target (more) -- [2:45]
Not Vampires - 16 - Easy Target (again, squeals) -- [3:00]
Not Vampires - 17 - All the Same -- [4:55]
Not Vampires - 18 - How Low -- [4:51]
Not Vampires - 19 - Werewolves Medley (ramblings of strings) -- [5:49]
Not Vampires - 20 -- [7:45]
Not Vampires - 21 -- [5:31]
Not Vampires - 22 - Insecurity / Cast Iron Candy Bandit -- [7:27]
Music
November 24, 2024
Yes, Exactly, Yes! - 1 - Hindenburg -- [7:36]
Yes, Exactly, Yes! - 2 - No Big Benefactor(ish) -- [8:05]
Yes, Exactly, Yes! - 3 - Las Vegas -- [4:53]
Yes, Exactly, Yes! - 4 - Cast Iron Candy Bandit -- [3:26]
Yes, Exactly, Yes! - 5 - Juice Carrots (Only a Mother) -- [4:08]
Yes, Exactly, Yes! - 6 - Juice Carrots (Only a Monster) -- [3:29]
Yes, Exactly, Yes! - 7 - Chosen by the Few -- [3:41]
Yes, Exactly, Yes! - 8 - Quicksand -- [4:16]
Yes, Exactly, Yes! - 9 - Virgins Again (Bad at Math) -- [6:27]
Yes, Exactly, Yes! - 10 - Virgins Again Again -- [3:23]
Yes, Exactly, Yes! - 11 - Find Me -- [4:30]
Yes, Exactly, Yes! - 12 - Old as Coal -- [4:07]
Yes, Exactly, Yes! - 13 - Dogs Will Rule the World -- [6:03]
Yes, Exactly, Yes! - 14 - Now We Understand (short) -- [0:41]
Yes, Exactly, Yes! - 15 - Now We Understand -- [4:43]
Yes, Exactly, Yes! - 16 - Now We Understand (again) -- [4:03]
Yes, Exactly, Yes! - 17 - The River -- [4:45]
Yes, Exactly, Yes! - 18 - Cosmic Background -- [4:38]
Music
November 21, 2024
Not Vampires - 1 -- [8:29]
Not Vampires - 2 -- [6:28]
Not Vampires - 3 - Now We Understand -- [6:12]
Not Vampires - 4 - Now We Understand (backing) -- [3:37]
Not Vampires - 5 - Now We Understand (harmonish) -- [1:11]
Not Vampires - 6 - Bad at Math (Virgins Again) -- [5:08]
Not Vampires - 7 - Bad at Math (Virgins Again Again) -- [3:03]
Not Vampires - 8 - Diminishing Returns -- [1:54]
Not Vampires - 9 - Quicksand -- [5:13]
Not Vampires - 10 - (The Right Idea) -- [11:18]
Not Vampires - 11 - Find Me -- [4:40]
Not Vampires - 12 - Another Way -- [6:06]
Not Vampires - 13 - How Low -- [5:48]
Not Vampires - 14 - Vertical Integration (vox) -- [5:24]
Not Vampires - 15 - Morning Sunburn -- [4:44]
Not Vampires - 16 - Chosen by the Few -- [4:38]
Not Vampires - 17 -- [7:43]
Not Vampires - 18 -- [8:34]
Not Vampires - 19 - Days of the Weak -- [8:33]
Not Vampires - 20 - Days of the Weak (continued) -- [1:02]
Not Vampires - 21 - Alternate Ending -- [7:19]
Not Vampires - 22 -- [2:19]
Not Vampires - 23 - Candy Bandit -- [2:19]
homework, ca 1996, smh
November 20, 2024



1 Comment

Music
November 17, 2024
Not Vampires - 1 -- [4:33]
Not Vampires - 2 - Dereliction of Duty -- [6:07]
Not Vampires - 3 - Quicksand -- [3:34]
Not Vampires - 4 - Quicksand (again) -- [3:07]
Not Vampires - 5 - Juice Carrots (Only a Mother) -- [3:35]
Not Vampires - 6 - Virgins Again (Bad at Math) -- [5:02]
Not Vampires - 7 - Bad at Math (Virgins Again) -- [4:41]
Not Vampires - 8 - Find Me -- [4:20]
Not Vampires - 9 - Find Me (again) -- [2:56]
Not Vampires - 10 -- [1:11]
Not Vampires - 11 - Now We Understand (instrumental broke) -- [2:42]
Not Vampires - 12 - Now We Understand -- [6:01]
Not Vampires - 13 - Now We Understand (again, backing vocals) -- [3:49]
Not Vampires - 14 - Now We Understand (mini backing) -- [1:36]
Not Vampires - 15 -- [6:50]
Not Vampires - 16 - norI tsaC tidnaB ydnaC -- [1:11]
Not Vampires - 17 - 2 norI tsaC tidnaB ydnaC -- [0:54]
Not Vampires - 18 - Cosmic Background -- [3:36]
Not Vampires - 19 - Ruined Names -- [6:27]
Not Vampires - 20 -- [3:31]
Not Vampires - 21 - (something else) / The Squeeze -- [9:00]
Not Vampires - 22 -- [4:25]
Not Vampires - 23 -- [3:49]
Not Vampires - 24 - Not Our First Rodeo -- [3:27]
Not Vampires - 25 - Rodeo Continued -- [1:13]
Not Vampires - 26 - Las Vegas -- [6:09]
Not Vampires - 27 - Insecurity -- [5:21]
Not Vampires - 28 - Cast Iron Candy Bandit -- [6:07]
Not Vampires - 29 -- [5:12]
Music
November 14, 2024
super8 - 1 -- [6:24]
super8 - 2 -- [5:03]
super8 - 3 -- [6:29]
super8 - 4 -- [9:16]
super8 - 5 -- [4:30]
Music
November 10, 2024
Not Vampires - 1 - Now We Understand -- [5:24]
Not Vampires - 2 - Quicksand -- [4:37]
Not Vampires - 3 - Virgins Again (Bad at Math) -- [4:35]
Not Vampires - 4 - Juice Carrots (Only a Monster) -- [3:38]
Not Vampires - 5 - Cosmic Background (alternate) -- [6:47]
Not Vampires - 6 - Diminished Returns -- [4:58]
Not Vampires - 7 - 29 Year Old Child -- [6:00]
Not Vampires - 8 - Find Me (alternate) -- [9:00]
Not Vampires - 9 - Major Major Major -- [4:25]
Not Vampires - 10 -- [2:26]
Not Vampires - 11 - The Squeeze -- [7:01]
Not Vampires - 12 - Light Creeps -- [2:15]
Not Vampires - 13 - Light Creeps (more) -- [2:33]
Not Vampires - 14 - Sandman -- [4:27]
Not Vampires - 15 -- [3:46]
Not Vampires - 16 -- [4:44]
Not Vampires - 17 - (vaguely deerhoof) -- [4:17]
Not Vampires - 18 -- [3:39]
Not Vampires - 19 -- [1:53]
programming is fun
November 2, 2024
Steve entered the Western States 100 lottery after qualifying in January... They are limited to 369 runners each year, and it's a legendary race, so there's a lot of demand. They have an interesting lottery structure: every year that you qualify and enter the lottery, if you are not picked, you get twice the entry tickets the next year.

After some early morning text messages where I tried (and to be honest, failed miserably) to calculate his odds, I wrote a little program in C to do the calculation.

Then, because sometimes programming is fun, I decided to see what it would look like in Perl. I haven't written a ton of Perl, I usually lean towards PHP for this sort of thing, but I ported SWELL's resource-processor script to Perl a while back and enjoyed it, and having a simple task is good for learning.

The first pass I did used a builtin array shuffle module, which proved too slow, then I ended up simplifying it and got it significantly faster than the C version (which didn't reshuffle, but did end up with pointless memmove()s). Once I had it all working (using strict, e.g. you have to declare everything), I decided to see how small I could get it to be. Here's what I ended up with (you can pipe the table on their lottery entry page to it):
$nwin = 250;    # I think the lottery picked about 250-something winners last year, the rest were golden tickets and such
$nlot = 100000; # someone could quantify the margin of error based on this, with statistics you would oh look a bird

for ($pid = 0; <>; ) {
  ($nt, $np) = split(/\s+/, s/,//r);
  ($nt > 0 and $np > 0 and not exists $wcnt{$nt}) or die "invalid input: $_\n";
  $wbin{$pid} = $nt;
  $wcnt{$nt} = 0;
  push(@tk, ($pid++) x $nt) while ($np-- > 0);
}

printf("%d tickets for %d entrants, running %d lotteries for %d winners:\n", $tkcnt = @tk, $pid, $nlot, $nwin);

for ($x = 0; $x < $nlot; $x++) {
  %in = { };
  $in{$id = $tk[rand($tkcnt)]}++ == 0 and exists $wbin{$id} and $wcnt{$wbin{$id}}++ while (%in < $nwin);
}

printf("%d tickets: %.2f%% win\n", $_, $wcnt{$_} * 100.0 / $nlot) foreach (sort { $a <=> $b } keys %wcnt);
Here is the most recent input:
512	 	1	 	512
256	 	15	 	3,840
128	 	55	 	7,040
64	 	139	 	8,896
32	 	215	 	6,880
16	 	296	 	4,736
8	 	594	 	4,752
4	 	963	 	3,852
2	 	1,538	 	3,076
1	 	2,077	 	2,077
and here is the most output with that table:
45661 tickets for 5893 entrants, running 100000 lotteries for 250 winners:
1 tickets: 0.66% win
2 tickets: 1.29% win
4 tickets: 2.56% win
8 tickets: 5.08% win
16 tickets: 9.99% win
32 tickets: 18.98% win
64 tickets: 34.12% win
128 tickets: 56.51% win
256 tickets: 80.91% win
512 tickets: 96.24% win
So, Steve's odds as of this afternoon are about 0.66%, but that will almost certainly go down (there's still a month left of the lottery; it only opened yesterday). Interestingly, one entrant there has been turned down 8 times before -- they currently have a 96% chance of getting in. And those who have been turnwed down 6 times before are slightly more likely than not to get in.

2 Comments
win32 menu bug
October 31, 2024
Microsoft generally does a very good job in preserving compatibility of existing applications; software written 20 years ago generally works well in Windows 11, amazingly. We noticed something they broke relating to menus that use bitmaps via MF_BITMAP, though, somewhere after Windows 7 -- I don't have 8.x installed anywhere to test, but Windows 10 and 11 are affected. Trying to figure out where to report these bugs online is difficult, and I'm lazy, so instead I'll document it here.

When setting a bitmap image for a menu item via MF_BITMAP, on Windows 10+, if the item does not have MF_CHECKED set, the bitmap will be drawn twice, and if the width of the menu is sufficiently longer than the width of the bitmap, one of those draws will be stretched. Here's some code that reproduces:
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE prev, LPSTR cmd, int ns)
{
	const int w = 32, h = 16;
	int pixels[w*h];
	for (int y = 0; y < h; y++) for (int x = 0; x < w; x++) pixels[x + y * w] = RGB(x * 256 / w, y * 256 / h, 0);  // oops BGR but whatever
        HBITMAP bitmap = CreateBitmap(w, h, 1, 32, &pixels);
	HWND wnd = CreateWindowEx(0, "Edit", "test", WS_VISIBLE, 0, 0, 10, 10, GetDesktopWindow(), NULL, hInst, 0);
	HMENU menu = CreatePopupMenu();
	InsertMenuA(menu, 0, MF_BYPOSITION|MF_STRING, 1, (char*)"this is a thing that will cause stretching to happen");
	InsertMenuA(menu, 1, MF_BYPOSITION|MF_BITMAP, 2, (char*)bitmap);
	TrackPopupMenu(menu, TPM_NONOTIFY|TPM_RETURNCMD, 0, 0, 0, wnd, NULL);
	DestroyMenu(menu);
	DeleteObject(bitmap);
	DestroyWindow(wnd);
	return 0;
}
Windows XP, Windows 7, and WINE all display something about like this, which is expected: Windows 10 and 11 display this: As a workaround, you can call SetMenuItemBitmaps() for the item with hBitmapUnchecked to a small image, and it will prevent the bug from occurring (or at least prevent it from being obvious heh). It was a waste of time writing this blog post and writing the test case, but the things we do for fun, right?

3 Comments
Music
October 29, 2024
haircut help
Music
October 27, 2024
Not Vampires - 1 - Return of the Bass Pod 2.0 Synth -- [2:48]
Not Vampires - 2 - Bad at Math (Virgins Again) -- [6:39]
Not Vampires - 3 - Juice Carrots (Only a Mother) -- [4:45]
Not Vampires - 4 - Now We Understand -- [4:47]
Not Vampires - 5 - Quicksand -- [5:36]
Not Vampires - 6 - Quicksand (slow) -- [3:09]
Not Vampires - 7 - Find Me -- [5:34]
Not Vampires - 8 - Self Imposed -- [4:37]
Not Vampires - 9 - Juice Carrots (again) -- [2:51]
Not Vampires - 10 - Juice Carrots (again again) -- [2:22]
Not Vampires - 11 - Old as Coal (Trees / Mold) -- [4:20]
Not Vampires - 12 -- [0:50]
Not Vampires - 13 -- [1:20]
Not Vampires - 14 -- [2:14]
Not Vampires - 15 -- [3:06]
Not Vampires - 16 -- [1:07]
Not Vampires - 17 -- [1:25]
Not Vampires - 18 -- [0:45]
Not Vampires - 19 -- [0:30]
Not Vampires - 20 -- [0:56]
Not Vampires - 21 - Bend at Will -- [4:44]
Not Vampires - 22 - (Intro) / Vertical Integration -- [9:00]
Not Vampires - 23 - Quicksand Guitars -- [7:07]
Not Vampires - 24 - Quicksand (alt arrange) -- [5:04]
Not Vampires - 25 - Bad at Math (Virgins Again) (alt arrange) -- [4:52]
Not Vampires - 26 -- [4:47]
Not Vampires - 27 - Cast Iron Candy Bandit (weird version) -- [3:56]
ok css here you go
October 26, 2024
I've updated this web page to use more CSS and removed most of the tables and stuff. I also got rid of the infinity scroll because it was just silly.

that is all.

p.s. the juice carrots take immediately below this post is something I like, now I have to find a way to fit a chorus pedal on my pedalboard

Comment...
Music
October 25, 2024
juice carrots
Music
October 24, 2024
super8 - 1 -- [5:24]
super8 - 2 -- [4:47]
super8 - 3 -- [6:34]
super8 - 4 -- [5:40]
super8 - 5 -- [5:06]
super8 - 6 -- [1:26]
super8 - 7 -- [6:16]
Music
October 20, 2024
Yes, Exactly, Yes! - 1 - Self Imposed (slow, instrumental) -- [7:14]
Yes, Exactly, Yes! - 2 - Bad at Math (slow, instrumental, partial) -- [2:57]
Yes, Exactly, Yes! - 3 - Bad at Math (slow, instrumental, full) -- [6:05]
Yes, Exactly, Yes! - 4 - Now We Understand (slow, instrumental) -- [8:31]
Yes, Exactly, Yes! - 5 - Find Me (slow, instrumental) -- [6:05]
Yes, Exactly, Yes! - 6 -- [1:12]
Yes, Exactly, Yes! - 7 - Dogs (preview) -- [0:49]
Yes, Exactly, Yes! - 8 - Dogs Will Rule the World -- [10:02]
Yes, Exactly, Yes! - 9 - Quicksand (slow, instrumental) -- [8:45]
Yes, Exactly, Yes! - 10 - Only a Mother (Juice Carrots, slow, instrumental) -- [7:00]
Yes, Exactly, Yes! - 11 - Leacho (Cosmos) -- [11:53]
Yes, Exactly, Yes! - 12 - Chosen by the Few (slow, instrumental) -- [6:55]
Yes, Exactly, Yes! - 13 - No Big Bene (instrumental) -- [3:31]
Music
October 17, 2024
Not Vampires - 1 - Quicksand -- [3:09]
Not Vampires - 2 - Diminished Juice Carrots (Only a Mother) -- [6:31]
Not Vampires - 3 - (Diminished More) -- [4:46]
Not Vampires - 4 - Cosmic Background -- [6:22]
Not Vampires - 5 - Now We Understand -- [6:36]
Not Vampires - 6 - Reset Your Expectations, This Happens Once In a While -- [3:48]
Not Vampires - 7 - Quicksand Again -- [4:13]
Not Vampires - 8 - Virgins Again -- [5:49]
Not Vampires - 9 - Find Me -- [4:29]
Not Vampires - 10 - Old as Coal -- [4:24]
Not Vampires - 11 -- [3:05]
Not Vampires - 12 -- [6:19]
Not Vampires - 13 - Self Imposed -- [5:27]
Not Vampires - 14 - Self Imposed Role Reversal -- [5:16]
Not Vampires - 15 -- [13:54]
Not Vampires - 16 - Four and Two -- [8:03]
Not Vampires - 17 - Six and Seven -- [1:30]
Not Vampires - 18 - Six and Seven Again -- [1:24]
Not Vampires - 19 - Six and Seven for the Third -- [3:03]
Music
October 16, 2024
quicksand home





6 Comments

Music
October 10, 2024
Not Vampires - 1 - Juice Carrots (Only a Mother) -- [5:27]
Not Vampires - 2 - Quicksand -- [10:11]
Not Vampires - 3 - Virgins Again -- [5:35]
Not Vampires - 4 - Find Me Seven -- [5:52]
Not Vampires - 5 -- [4:47]
Not Vampires - 6 - Now We Understand -- [4:03]
Not Vampires - 7 -- [4:54]
Not Vampires - 8 -- [4:00]
Not Vampires - 9 -- [6:43]
Not Vampires - 10 - Cosmic Background (fast) -- [4:33]
Not Vampires - 11 - The Squeeze -- [3:01]
Not Vampires - 12 -- [4:26]
Not Vampires - 13 -- [2:30]
Not Vampires - 14 -- [9:22]
Not Vampires - 15 - (Light Creeps) -- [6:52]
Music
October 6, 2024
Not Vampires - 1 - (doom and gloom) -- [2:12]
Not Vampires - 2 - Bad at Math (Virgins Again) (slow) -- [7:07]
Not Vampires - 3 - Quicksand (slow) -- [4:26]
Not Vampires - 4 - Quicksand (fast) -- [4:12]
Not Vampires - 5 - Juice Carrots -- [4:29]
Not Vampires - 6 - Find Me -- [4:46]
Not Vampires - 7 - Now We Understand -- [4:41]
Not Vampires - 8 - Bad at Math (Virgins Again) (fast) -- [2:01]
Not Vampires - 9 - Old as Coal -- [4:22]
Not Vampires - 10 - Vertical Integration -- [3:10]
Not Vampires - 11 - Self Imposed -- [4:04]
Not Vampires - 12 - Cosmic Background -- [3:00]
Not Vampires - 13 - How Low -- [5:23]
Not Vampires - 14 - Watch Your Step -- [3:03]
Not Vampires - 15 - Insecurity -- [5:23]
Not Vampires - 16 - Cast Iron Candy Bandit -- [3:18]
Not Vampires - 17 -- [2:29]
Not Vampires - 18 - (Twenty-Six A) -- [3:03]
Not Vampires - 19 - (Twenty-Six B) -- [3:18]
Not Vampires - 20 - Major Major Major -- [3:28]
Not Vampires - 21 -- [4:15]
Not Vampires - 22 - Las Vegas -- [4:01]
Not Vampires - 23 -- [1:20]
Not Vampires - 24 - The Squeeze -- [4:33]
Music
October 5, 2024
v_andy - 1 - No One Is Around -- [7:36]
v_andy - 2 - Wrong Side of My Bed -- [6:00]
v_andy - 3 -- [8:40]
v_andy - 4 -- [6:24]
v_andy - 5 - Squeezey -- [10:25]
v_andy - 6 -- [10:08]
v_andy - 7 - Chords of the Drummer -- [3:05]
v_andy - 8 - Insecurity -- [7:11]
v_andy - 9 -- [4:07]
v_andy - 10 -- [8:46]
v_andy - 11 -- [5:18]
v_andy - 12 -- [5:19]
v_andy - 13 -- [8:33]
Yes, Exactly, Yes! (with v) - 1 - Dogs Will Rule the World -- [5:11]
Yes, Exactly, Yes! (with v) - 2 - Virgins Again (Bad at Math) -- [4:11]
Yes, Exactly, Yes! (with v) - 3 - Find Me -- [4:47]
Yes, Exactly, Yes! (with v) - 4 - Juice Carrots -- [3:51]
Yes, Exactly, Yes! (with v) - 5 - May 29 Track 6 -- [7:27]
Yes, Exactly, Yes! (with v) - 6 - Quicksand -- [3:52]
Yes, Exactly, Yes! (with v) - 7 - Now We Understand -- [4:17]
Yes, Exactly, Yes! (with v) - 8 - How Low -- [4:33]
Yes, Exactly, Yes! (with v) - 9 - Disco River -- [3:02]
Yes, Exactly, Yes! (with v) - 10 - Old as Coal -- [3:47]
Yes, Exactly, Yes! (with v) - 11 - Hindenburg -- [5:01]
Yes, Exactly, Yes! (with v) - 12 - Cosmos (Leacho) -- [5:54]
Yes, Exactly, Yes! (with v) - 13 - Cast Iron Candy Bandit -- [2:41]
Yes, Exactly, Yes! (with v) - 14 - No Big Benefactor (Istanbul) -- [5:04]
Yes, Exactly, Yes! (with v) - 15 - Las Vegas -- [3:42]
Yes, Exactly, Yes! (with v) - 16 - Standing Orders, Maybe -- [5:33]
Music
October 3, 2024
Not Vampires - 1 -- [5:36]
Not Vampires - 2 -- [5:47]
Not Vampires - 3 - Cast Iron Candy Bandit (Mini) -- [1:14]
Not Vampires - 4 - Insecurity -- [6:07]
Not Vampires - 5 - No Big Benefactor (Istanbul) -- [5:44]
Not Vampires - 6 - Cast Iron Candy Bandit (Return) -- [3:23]
Not Vampires - 7 -- [8:58]
Not Vampires - 8 -- [4:37]
Not Vampires - 9 -- [4:47]
Not Vampires - 10 - Juice Carrots-ish -- [6:04]
Not Vampires - 11 -- [4:06]
Not Vampires - 12 -- [2:29]
Not Vampires - 13 - Virgins Again -- [3:21]
Not Vampires - 14 - Find Me -- [4:17]
Not Vampires - 15 - Quicksand -- [4:05]
Not Vampires - 16 - Now We Understand -- [6:20]
Not Vampires - 17 - Old as Coal -- [3:36]
Not Vampires - 18 - Juice Carrots -- [4:54]
Not Vampires - 19 - Juice Carrots (again, 4 and 2) -- [1:47]
Not Vampires - 20 - Watch Your Step -- [2:59]
Not Vampires - 21 - Vertical Integration (Wash) -- [5:15]
Not Vampires - 22 - Self Imposed -- [5:17]
Music
October 1, 2024
virgins again bad at math
sotb
September 30, 2024



1 Comment

search : rss : recent comments : Copyright © 2025 Justin Frankel : 3480813