Sign in

Mike Samuel 🟣

@mvsamuel.bsky.social
889 followers 938 following 2.8K posts

Programming languages person focused on software systems problems. Previously, first frontend engineer on Google Calendar, and was a security engineer who worked on the industrial-strength Mad Libs undergirding Gmail. Pro-trans-rights is pro-family.

PostsRepliesMedia
Reposted by Mike Samuel 🟣
Chimney Sweepers Local 420 @bobbby.online · 7h
sometimes you just have to write a compiler that isn't a joke after you wrote a compiler as a joke
041
Mike Samuel 🟣 @mvsamuel.bsky.social · 22h
"Mayhaps" is what you get when you start down the track to saying "maybe" and end on the "perhaps" track. But has anyone ever tried "perbe?"
121
Mike Samuel 🟣 @mvsamuel.bsky.social · 28/09/2026
Getting dragged for writing `#ifndef ...` instead of `#if !defined(...)` like it's C89.
020
Mike Samuel 🟣 @mvsamuel.bsky.social · 28/09/2026
"impeachment is part of the work assigned to congress"
021
Mike Samuel 🟣 @mvsamuel.bsky.social · 28/09/2026
Type erasure is pretty cool, but it's tempting to do bad things.
[Typescript playground editor pane on the left]

function lieAbout(b: boolean): false {
  return b as false
}

export function lieMaxxing(
    a: number,
    b: number,
): number {
  return lieAbout(a > b) ? b : a;
}

[Typescript compiler's plain JavaScript output on the right]

function lieAbout(b) {
    return b;
}
export function lieMaxxing(a, b) {
    return lieAbout(a > b) ? b : a;
}
030
Mike Samuel 🟣 @mvsamuel.bsky.social · 25/09/2026
Perl: There's more than one way to do it. Python (myth): There should be one -- and preferably only one -- obvious way to do it. Python (reality): There are multiple competing efforts to standardize 'the one' obvious way to do it, none of which will ever reach critical mass.
060
Reposted by Mike Samuel 🟣
evacide @evacide.bsky.social · 24/09/2026
A world of always-on cameras and microphones on peoples' bodies is a very serious privacy and security problem for the people wearing them and for everyone around them.
12272100
Mike Samuel 🟣 @mvsamuel.bsky.social · 21/09/2026
> > Merged main, and now it's just the deletions.
>
> Deletions are my favorite thing.

Now I've got an EDM remix of Rodgers and Hammerstein spliced with a ranty code reviewer yelling "Garbage code!!!", "DELETE IT!!!" stuck in my head.

[transparent-background smiley face emoji picker button]
030
Mike Samuel 🟣 @mvsamuel.bsky.social · 14/09/2026
This is a legit great talk: accessible, engaging, builds intuitions. Bryan doesn't phrase it this way, but I love his counter-arg to "AI can solve that": There's intrinsic complexity in engineering when solving one problem interferes with solving others; sometimes you have to get your hands dirty.
220
Mike Samuel 🟣 @mvsamuel.bsky.social · 11/09/2026
[jeb bush voice]: please clap
Screenshot of Github PR review status.

Purple circle 377 / 377 viewed | Button "Submit Review"
110
Mike Samuel 🟣 @mvsamuel.bsky.social · 11/09/2026
Everything.
🐚$ git push
Everything up-to-date
110
Reposted by Mike Samuel 🟣
The Zena Programming Language @zena-lang.dev · 08/09/2026
We're getting ready to be more public about Zena, so if you're curious and want updates, follow me!
032
Mike Samuel 🟣 @mvsamuel.bsky.social · 04/09/2026
Path planning algorithms are not a hot research topic, they said.
000
Mike Samuel 🟣 @mvsamuel.bsky.social · 04/09/2026
Giant mondo PR is so close to coming out of draft. So close.
000
Mike Samuel 🟣 @mvsamuel.bsky.social · 03/09/2026
020
Mike Samuel 🟣 @mvsamuel.bsky.social · 21/08/2026
GATO considered armful ~ Edsger Dijkstra
030
Mike Samuel 🟣 @mvsamuel.bsky.social · 20/08/2026
@kotlinlang.org's DSLs are just unreasonably nice. I've been using one to build ASTs in a compiler. class TreeFarm uses class Planting to allow specifying AST nodes as block structures, and there's some automagic that propagates node position metadata from injected AST nodes to synthesized nodes.
[pretty printed Kotlin code with IDE overlays showing that the `this` type for block lambdas is "this: Planting" in all four nested lambdas]

        val ifStmt = macroEnv.treeFarm.grow(macroEnv.pos) {
            Block {
                If(
                    cond = {
                        Call {
                            V(vIsNullFn)
                            Rn(name)
                        }
                    },
                    thn = { Replant(freeTree(macroEnv.args.valueTree(1))) },
                    els = { Rn(name) },
                )
            }
        }
041
Reposted by Mike Samuel 🟣
Mayor Zohran Kwame Mamdani @mayor.nyc.gov · 22/07/2026
Benjamin Netanyahu is a war criminal.
20378813324826
Reposted by Mike Samuel 🟣
Alice ✨ @welltypedwit.ch · 20/07/2026
so instead of bashing fil-C because it could take away attention from rust, what i would want to see would be people starting to think about how to combine the best of both worlds.
1131
Mike Samuel 🟣 @mvsamuel.bsky.social · 13/07/2026
Going back through my slides looking for everywhere I abbreviated "mainframe developer" as "MFer." If a miss a few, I'm sure it'll be okay.
040
Reposted by Mike Samuel 🟣
Mekka Okereke @mekka.mekka-tech.com · 12/07/2026
Member of Parliament Glenda Jackson said this within 48 hrs after Margaret Thatcher died. Elizabeth Warren couldn't get away with this type of ether. For US people: Listen to the whole thing, including the attempted rebuttal afterwards, and what the Speaker of the House responded to him with.
m.youtube.com
Glenda Jackson launches tirade against Thatcher in tribute debate
YouTube video by Barnet Bugle
03712
Mike Samuel 🟣 @mvsamuel.bsky.social · 10/07/2026
Project 2025 is one more step in a RW project that's been baking since the Civil War, not a recent reaction to black people and women pushing for basic rights. There's no perfect time to push for needed change, nor an obligation to wait, and suggesting otherwise is coded language for "uppity."
052
Mike Samuel 🟣 @mvsamuel.bsky.social · 10/07/2026
Phew www.maine.gov/sos/news/sec...
7/10/2026

AUGUSTA, MAINE – The Secretary of State’s Office today confirmed that a formal notice has been received from U.S. Senate candidate Graham Platner. A public declaration is not an official withdrawal, and a candidate must formally withdraw in writing to the Elections office, including signature.

Because the candidate officially withdrew before 5 p.m. of the 2nd Monday in July (July 13, 2026), his name will not appear on the ballot, and his political party may replace him. The deadline for the party to name a replacement is the 4th Monday in July (July 27, 2026). Maine Statute does not address how a replacement candidate may be chosen by a party, only that the candidate filling the vacancy must be a “qualified person.” Announcements about how a replacement candidate will be chosen or when that candidate will be announced will come from the political party.
0124
Mike Samuel 🟣 @mvsamuel.bsky.social · 08/07/2026
I'm a fan of Sam Seder and Emma Vigeland so I've been particularly disappointed with MR on Platner. They have bad judgements to answer for and "I too was lied to by a proven liar" doesn't cut it, but at least they've started on that in this video. www.youtube.com/watch?v=duEV...
youtube.com
Graham Platner Must Drop Out
YouTube video by The Majority Report w/ Sam Seder
130
Mike Samuel 🟣 @mvsamuel.bsky.social · 05/07/2026
Reducing a man's actual mortality to a procedural loophole for gatekeeping power is what Mitch would've wanted.
020
Mike Samuel 🟣 @mvsamuel.bsky.social · 03/07/2026
Glad @bradlander.bsky.social is not soft pedaling.
Your efforts to define them, and me, outside the Jewish community, are dangerously short-sighted. Jews are not made safer by proscribing a particular vision of Israel as the price of full belonging, or by insisting on unconditional support for Israel while it commits human rights violations against Palestinians.The future you imagine presumes that the greatest danger facing Jewish life is that Jews will leave Zionism. But it seems to me the real danger is that young Jews will conclude there is no room for them inside Jewish institutions unless they silence their conscience. A community cannot thrive if the choices it offers the next generation are hypocrisy or excommunication.
020
Mike Samuel 🟣 @mvsamuel.bsky.social · 01/07/2026
The shielding weight / reliability tradeoffs have been known about for a long time. Here's a table detailing expected effects of radiation on processor's available at the time from a 1998 Robotics Institute thesis I was a research assistant for. publications.ri.cmu.edu/storage/publ...
Lunar Rover Design

and quantity selected is a function of total computing need calculated from software requirements.

Table 4-11 : Computer processors overview
Radiation Effects
Prediction watts int/tp Processor
M 68060 CPU 60145 2 68020 rad qual, tough
Pentiurn Pro CPU 292/248 23 CISC. extremely hard
R3000 CPU 28/36 4 inherently rad tolerant, flown
R 10000 CPU 428n60 6 possibly rad tolerant, %1M
PowerPC 750 CPU 496/336 5.7 possibly rad tolerant, $.5M
TI C50 DSP 4W40 3 available in 100 kRad
Sharc DSP 40140 4 rad-qual available
TI CEO. MVP DSP 2200 11 $lM lo rad qual
TI C60 DSP 1600 11 $1M lo rad qual
140
Mike Samuel 🟣 @mvsamuel.bsky.social · 01/07/2026
I want a progressive movement that is aggressively pro raising wages at the bottom and aggressively pro immigration. These are completely coherent goals. They don’t always have the same supporters, but they have the same enemies. It’s time to take the fight to them. 

To start with, we should firmly reject the framing that there is some ‘right’ level of immigration. “How many is too many?” is a favorite challenge of the nativists. It’s the wrong question. The measure of a country's success is if its citizens are happy, healthy, and prosperous, not if an arbitrary number of people cross a border.
010
Mike Samuel 🟣 @mvsamuel.bsky.social · 30/06/2026
If the US can't have sports while being respectful of trans people and not getting weird about kids and gender then the US ought to do without sports.
030
Mike Samuel 🟣 @mvsamuel.bsky.social · 26/06/2026
As a mathematician, let me just say the term should be "Christian-Judeo." The part you're subtracting out goes *after* the minus sign. ---- (Both christianity and judaism are fine topics in comparative religion but neither should be elevated above other viewpoints in state-approved curricula.)
110
Mike Samuel 🟣 @mvsamuel.bsky.social · 23/06/2026
8 years is nothing. This was reported of software tools for hiring 38 years ago. pubmed.ncbi.nlm.nih.gov/3128356/
The story begain in December 1986 when the commission was informed by Dr A Burke and Dr J Collier, both senior lecturers at St George's, that a computer program used in the initial screening of applicants for places at the school unfairly discriminated against women and people with non-European sounding names. The program had been developed by Dr Franglen, a member of staff, to reduce the work of selecting candidates for interview. It was also hoped that it would eliminate any inconsistencies in the way the admission staff carried out their duties. The program was written after careful analysis of the way in which the staff were making these choices and was modified until by 1979 it was giving a 90-95% correlation with the gradings of the selection panel. This point is important: the program was not introducing new bias but merely reflecting that already in the system. By 1982 all the initial selection was being done by computer. Details of each candidate were obtained from his or her University Central Council for Admission (UCCA) form, but since this contains no reference to race this was deduced from the surname and place of birth. The computer used this information to generate a score which was used to decide which applicants should be interviewed. Women and those from racial minorities had a reduced chance of being interviewed independent of academic considerations.
050
Mike Samuel 🟣 @mvsamuel.bsky.social · 20/06/2026
If you want to allow Wayback, their spider name is ia_archiver which you can use in robots.txt and page meta elements. Unscrupulous actors do spoof that, but they can already ignore a disallow * in robots.txt.
060
Mike Samuel 🟣 @mvsamuel.bsky.social · 19/06/2026
Cute. Not sure what to make of this. Mistral seems to think I do formal verification; important but not my lane. Deepseek seems to think I worked on V8, but I think all I contributed was answering Robert Griesemer's monotonically exasperated "do JS programmers actually do this?" questions.
[All caps old timey pixelated font showing text (below) above a series of bars for various code models]

Mike Samuel
Google software security engineer

>
590 strength · Top 7%
<
Claude Opus 4.8 says
<
3/10
>
Software engineer known for work on web security, code sanitization, and contributions to projects like Caja, Closure Templates, and JavaScript tooling at Google.

[bars]
GPT-5.5 about 80% full
GPT-5.5 mini about 95% full
Claude opus 4.8 about 80% full
Claude Haiku 4.5 about 75% full
Grok 4.20 about 75% full
Gemini 3.1 Lite about 95% full
Kiwi K2 0905 about 25% full
Deepseek v4 about 95% full
Llama 3.3 70B and 3.2 1B empty
GLM 4.7 flash about 95% full
Mistral 3.2 24B about 80% full
Owen3 8B empty
030
Mike Samuel 🟣 @mvsamuel.bsky.social · 18/06/2026
To better understand our problems, what if we built a giant problem accelerator? Then we could smash our problems together at near light speed and analyze the resulting spray of micro-problems.
130
Mike Samuel 🟣 @mvsamuel.bsky.social · 17/06/2026
Hard to overstate how naïve this is. The worst content comes from bots which happen to be anon but don't have to be. State level actors can forge IDs for their bots. Other bot network operators can rent real identities from offline users in low-wage countries. Bots are gonna bot regardless.
5. Require users to use real names. Much of the worst content is produced by anons; it
091
Mike Samuel 🟣 @mvsamuel.bsky.social · 16/06/2026
"5 Require users to use real names" is garbage for vulnerable people. www.privacyguides.org/articles/202...
[Second to last paragraph is highlighted starting with "Victims of".  First sentence of last paragraph is in bold: "Pseudonymity saves lives"]

Pseudonymity, or the use of a nickname or fictitious name online, has always been deeply valued on the internet. It grants people protections and freedoms that are often impossible to benefit from offline.

Women, and especially women who are part of male-dominated online communities, have regularly used pseudonyms to hide their gender online in order to protect themselves from sexual harassment, stalking, and physical violence even.

Transgender and gender-diverse people also regularly use pseudonyms for protection, or use new chosen names to explore their gender identity online.

Victims of domestic violence, victims of stalkers, activists, and even journalists often use pseudonyms to protect themselves from aggressors or oppressive regimes.

Pseudonymity saves lives. And yet, it is constantly under attack.
050
Mike Samuel 🟣 @mvsamuel.bsky.social · 15/06/2026
AOC > Harris > Moore (love for a Marylander) > Pritzker > ...lit. everyone else in the party... > Kelly > Newsom > Emanuel
000
Mike Samuel 🟣 @mvsamuel.bsky.social · 13/06/2026
A toy example to probe AI code review. Left: a Python to enumerate all rational numbers, and asked Claude to improve it. Right: Its code changes are fine: add types, prefer tuples, use doctest, better string formatting. It just drops all commentary; verbose but important for maintainability.
# output truncated due to character limits
# complete code: gist.github.com/mikesamuel/cb3de64fbcd5e699dfc85020de62b126

from math import gcd

def rationals():
    """
    Enumerates rational numbers as [numerator, denominator] pairs
    in simplest form but not in order.
    """

    yield [0, 1]
    # Now we have enumerated all values that have neither
    # a reciprocal nor a distinct negative.

    # From now on, we will only enumerate adjacent positive
    # negative pairs, so we will not miss a rational but
    # yield its negation.

    yield [-1, 1]
    yield [1, 1]
    # Now we have enumerated all values that lack a distinct
    # reciprocal so from now on, when we enumerate a value
    # we will also enumerate its reciprocal.
    # This means we will neither miss a value in (-1, 1)
    # but emit one in (-inf, -1) or in (1, inf); nor vice versa.
    # The convention here where numerator is signed or zero
    # and denominator is in [1, inf] is followed below, so
    # there will be no redundant outputs due to signs on the denominator.

    denominator = 1
    # We have yielded all rationals with denominator up to and including 1
    while True:
        denominator += 1
        # Python has bigint semantics so no risk of overflow
        # First time here, denominator is 2, so we're not repeating
        # anything above, and we step by one, so we will eventually
        # reach here for every denominator in a rational in (0, 1)
        for numerator in range(1, denominator):
            if gcd(numerator, denominator) == 1:
                # (numerator / denominator) is in simplest form
                # 4 yields for all combinations of negation/reciprocal
                yield [-numerator, denominator]
                yield [numerator, denominator]
                yield [-denominator, numerator]
                yield [denominator, numerator]
    # Because of the gcd check above, we will not output redundant ...
[screenshot of code with python in grey top left and a copy icon top right]

from math import gcd
from collections.abc import Generator

def rationals() -> Generator[tuple[int, int], None, None]:
    """
    Enumerates all rational numbers as (numerator, denominator) tuples
    in simplest form. Numerator is signed; denominator is always positive.
    Every rational is yielded exactly once, though not in numeric order.
    """
    yield (0, 1)
    yield (-1, 1)
    yield (1, 1)

    denominator = 1
    while True:
        denominator += 1
        for numerator in range(1, denominator):
            if gcd(numerator, denominator) == 1:
                yield (-numerator, denominator)
                yield (numerator, denominator)
                yield (-denominator, numerator)
                yield (denominator, numerator)


if __name__ == "__main__":
    from itertools import islice
    for n, d in islice(rationals(), 200):
        print(f"{n:+d}/{d}")
130
Mike Samuel 🟣 @mvsamuel.bsky.social · 11/06/2026
I started a rant on how pattern matching is separable from algebraeticity, but ended up writing about bolting pattern matching onto OO PLs, then made a toy implementation and a playground because once you're in the rabbit hole why not. mikesamuel.github.io/pl-musings/p... Bonus: TOCTOU problems.
[Screenshot of Title, subtitle, and first line of an article]

Functional patterns & API/implementation independence
Two great tastes that (could) go great together

What if we could combine chocolate and peanut butter?  That'd be amazing, right!Screenshot of a "Pattern match playground" with an editable text area "Rules" containing a match clause in a JS-esque syntax, a decision tree diagram below that, and some options and a "Run" button in between.
010
Mike Samuel 🟣 @mvsamuel.bsky.social · 10/06/2026
Complexity theorists in the 1980s: no human would ever play Towers of Hanoi, but the bounds on optimal gameplay illustrate ... Mobile game ads: "See how PROS speedrun Towers of Hanoi!!!"
030
Mike Samuel 🟣 @mvsamuel.bsky.social · 08/06/2026
Someone's getting maudlin for when he was just a young, carefree WWE barker.
020
Reposted by Mike Samuel 🟣
I Travel Like Sound Dog @chadstanton.blacksky.app · 08/06/2026
This is important because if we approach the problem as one of misinformation rather than racism, we’re going to spend a lot of time debunking things they’re not actually concerned about, rather than addressing the racism and protecting the targets of it.
4658134
Mike Samuel 🟣 @mvsamuel.bsky.social · 05/06/2026
Mentally preparing to write the part that does the thing. Mike, you can do this.
 // <floating point shit happens>

 // </floating point shit happens>
030
Reposted by Mike Samuel 🟣
Kevin Morris @kevintmorris.bsky.social · 05/06/2026
Few people are putting this so plainly. This is what is happening. Miss me with partisanship, as if partisanship isn't a vessel for achieving policy goals — including racial ones
0207
Reposted by Mike Samuel 🟣
Kashana @kashana.blacksky.app · 04/06/2026
What if they just made an entire guy out of red flags?
994520626
Mike Samuel 🟣 @mvsamuel.bsky.social · 04/06/2026
Part of me wasn't expecting get[0]() {...} to work.
Node interactive REPL session.

Welcome to Node.js v25.2.1.
Type ".help" for more information.
> class Pair/*<A, B>*/ {
|   /*readonly*/ a/*: A*/;
|   /*readonly*/ b/*: B*/;
|
|   constructor(a/*: A*/, b/*: B*/) {
|     this.a = a;
|     this.b = b;
|   }
|
|   get[0]()/*: A*/ { return this.a; }
|   get[1]()/*: B*/ { return this.b; }
|
|   [Symbol.iterator]()/*: Iterator<A | B>*/ {
|     let { a, b } = this;
|     return function* () {
|       yield a;
|       yield b;
|     }();
|   }
|
|   toJSON()/*: [A, B]*/ {
|     return [this.a, this.b];
|   }
|
|   toString()/*: string*/ {
|     return `Pair [${this.a}, ${this.b}]`;
|   }
| }
undefined
>
> let p = new Pair('a', 'b');
undefined
> let [a, b] = p;
undefined
> a
'a'
> b
'b'
> p[0]
'a'
>
100
Reposted by Mike Samuel 🟣
Hillel @hillelwayne.com · 04/06/2026
Hello from #CraftConf Budapest! As always, I'll be doing my best to liveskeet all the talks I attend (until my computer runs out of battery, which happens earlier every year) Keynote speaker: "Slow Down to Speed up", @gergely.pragmaticengineer.com
29519
Mike Samuel 🟣 @mvsamuel.bsky.social · 03/06/2026
Just try to compile it, you coward!!!
081
Reposted by Mike Samuel 🟣
Clément Canonne @ccanonne.github.io · 02/06/2026
A list of principles put forth by mathematicians, for mathematicians and other researchers, regarding the use of AI in research. "Number #9 will surprise you!" leidendeclaration.ai
leidendeclaration.ai
Leiden Declaration on Artificial Intelligence and Mathematics
This declaration calls for action to address the challenges posed by the use of artificial intelligence within mathematics research.
02711
Mike Samuel 🟣 @mvsamuel.bsky.social · 01/06/2026
Library docs are mostly text, but new devs like video. For an autodoc tool, how could I support video? Make it easy to embed a video explainer? Markdown extensions for video chaptering and referring to a time within a video: "To get started, see [explainer @ 1:23]"? What else? Accessibility?
000