because adulthood is lonely

WallAboutListLeave

#50 — Mon 22 September 2025 by Evan Chen

So Claude Code actually outputted reasonably good Asymptote code for me today, which is a surprise to me, because usually the LLM's are really bad at Asymptote.

I was trying to convert the following into Asymptote:

\begin{circuitikz}[american]
    \node (P) at (0,0) [left] {$P$};
    \node (Q) at (13,0) [right] {$Q$};

    \draw (P) to[short] (1,0);
    \draw (1,0) to[short] (1,1)
          to[R=$x\,\Omega$] (3,1)
          to[short] (3,0);
    \draw (1,0) to[short] (1,-1)
          to[R=$\frac{1}{3}\,\Omega$] (3,-1)
          to[short] (3,0);

    \draw (3,0) to[short] (4,0);
    \draw (4,0) to[short] (4,1)
          to[R=$y\,\Omega$] (8,1)
          to[short] (8,0);
    \draw (4,0) to[short] (4,-1)
          to[R=$\frac{1}{3}\,\Omega$] (6,-1)
          to[R=$\frac{1}{3}\,\Omega$] (8,-1)
          to[short] (8,0);

    \draw (8,0) to[short] (9,0);
    \draw (9,0) to[short] (9,1)
          to[R=$z\,\Omega$] (11,1)
          to[short] (11,0);
    \draw (9,0) to[short] (9,-1)
          to[short] (9,-2)
          to[R=$\frac{1}{3}\,\Omega$] (11,-2)
          to[short] (11,0);
    \draw (9,-1) to[R=$\frac{1}{3}\,\Omega$] (11,-1);

    \draw (11,0) to[short] (13,0);
\end{circuitikz}

The output from Claude was:

import olympiad;
size(600,300);

// Helper function to draw a resistor
void drawResistor(pair A, pair B, string label) {
    pair mid = (A + B) / 2;
    pair dir = unit(B - A);
    pair perp = rotate(90) * dir;

    real len = length(B - A);
    real resWidth = 0.3;
    real zigzag = 0.15;

    // Calculate zigzag points
    pair start = A + 0.2 * dir * len;
    pair end = B - 0.2 * dir * len;
    pair[] zigpts;

    for(int i = 0; i <= 6; ++i) {
        real t = i / 6.0;
        pair pt = start + t * (end - start);
        if(i % 2 == 1) pt += zigzag * perp;
        zigpts.push(pt);
    }

    // Draw connecting lines and zigzag
    draw(A--start);
    for(int i = 0; i < zigpts.length - 1; ++i) {
        draw(zigpts[i]--zigpts[i+1], linewidth(1.2));
    }
    draw(end--B);

    // Add label
    label(label, mid + 0.4 * perp, fontsize(10));
}

// Main connection points
pair P = (0, 0);
pair Q = (13, 0);

// Section 1 junction points
pair A1 = (1, 0);
pair B1 = (3, 0);

// Section 2 junction points
pair A2 = (4, 0);
pair B2 = (8, 0);

// Section 3 junction points
pair A3 = (9, 0);
pair B3 = (11, 0);

// Draw main horizontal line segments
draw(P--A1, linewidth(1));
draw(B1--A2, linewidth(1));
draw(B2--A3, linewidth(1));
draw(B3--Q, linewidth(1));

// Section 1: x ohm parallel with 1/3 ohm
pair S1_top = A1 + (0, 1);
pair S1_bottom = A1 + (0, -1);
pair E1_top = B1 + (0, 1);
pair E1_bottom = B1 + (0, -1);

draw(A1--S1_top--E1_top--B1, linewidth(1));
draw(A1--S1_bottom--E1_bottom--B1, linewidth(1));
drawResistor(S1_top, E1_top, "$x\,\Omega$");
drawResistor(S1_bottom, E1_bottom, "$\frac{1}{3}\,\Omega$");

// Section 2: y ohm parallel with two 1/3 ohm in series
pair S2_top = A2 + (0, 1);
pair S2_bottom = A2 + (0, -1);
pair E2_top = B2 + (0, 1);
pair E2_bottom = B2 + (0, -1);
pair mid2 = (6, -1);

draw(A2--S2_top--E2_top--B2, linewidth(1));
draw(A2--S2_bottom--mid2--E2_bottom--B2, linewidth(1));
drawResistor(S2_top, E2_top, "$y\,\Omega$");
drawResistor(S2_bottom, mid2, "$\frac{1}{3}\,\Omega$");
drawResistor(mid2, E2_bottom, "$\frac{1}{3}\,\Omega$");

// Section 3: z ohm parallel with two 1/3 ohm resistors in parallel
pair S3_top = A3 + (0, 1);
pair S3_mid = A3 + (0, -1);
pair S3_bottom = A3 + (0, -2);
pair E3_top = B3 + (0, 1);
pair E3_mid = B3 + (0, -1);
pair E3_bottom = B3 + (0, -2);

draw(A3--S3_top--E3_top--B3, linewidth(1));
draw(A3--S3_mid, linewidth(1));
draw(S3_mid--S3_bottom--E3_bottom--B3, linewidth(1));
draw(S3_mid--E3_mid--B3, linewidth(1));
drawResistor(S3_top, E3_top, "$z\,\Omega$");
drawResistor(S3_mid, E3_mid, "$\frac{1}{3}\,\Omega$");
drawResistor(S3_bottom, E3_bottom, "$\frac{1}{3}\,\Omega$");

// Add terminal labels
label("$P$", P, W, fontsize(12));
label("$Q$", Q, E, fontsize(12));

// Add terminal dots
dot(P, linewidth(4));
dot(Q, linewidth(4));

The most jarring part is probably the presence of import olympiad; at the top. A lot of Asymptote users from the AoPS math contest community... it shows.

I cleaned up the output and posted it here.


#49 — Sun 21 September 2025 by Evan Chen

Some real Ace Attorney material here:

In one of nature’s most remarkable convergent evolutions, koalas have developed fingerprints that are virtually indistinguishable from human fingerprints, even under electron microscopes. ... Each koala possesses unique fingerprints, just as humans do, with distinctive whorls, loops, and arches.

Snopes says this doesn't seem to have happened yet.


#48 — Sun 21 September 2025 by Evan Chen

I kind of think "irregular conjugation" was a poor choice of name for the verb conjugations that follow one of several rules depending on the ending, because they're still mostly following a fixed rule.

To me "irregular" should be edge cases like 돕다 becoming 도와 which are actually edge cases (irregular irregulars, anyone?).


#47 — Fri 19 September 2025 by Evan Chen

Made me laugh:

One thing you have to be careful about, though, is that duct tape programmers are the software world equivalent of pretty boys… those breathtakingly good-looking young men who can roll out of bed, without shaving, without combing their hair, and without brushing their teeth, and get on the subway in yesterday’s dirty clothes and look beautiful, because that’s who they are. You, my friend, cannot go out in public without combing your hair. It will frighten the children. Because you’re just not that pretty.


#46 — Thu 18 September 2025 by Evan Chen

How much of life is lost in customer service

(in both directions)


Page 1 / 10 (next)