Sign in

Patrik Svensson

@patriksvensson.se
1.4K followers 494 following 2.3K posts

Father. Husband. Programmer. Likes OSS, compilers, programming. Spectre.Console, Cake. Ally ✊🏾🏳️‍🌈🏳️‍⚧️♀️(He/Him) @patriksvensson@mstdn.social Stockholm, Sweden

PostsRepliesMedia
Patrik Svensson @patriksvensson.se · 21h
And it of course supports debugging.
A code editor paused in the debugger on a Mew build script. Execution is stopped at a breakpoint inside a "compile" task, and the side panel shows the task's local variables, such as the release configuration, the matched source files, and the path to the compiler output. The debug console below shows the previous restore step has finished and compile is starting.
011
Patrik Svensson @patriksvensson.se · 22h
Mew's build system "Purr" is coming along nicely. It's still an early prototype, but everything finally works the way I envisioned! Naturally, it's written in Mew and included in the stdlib.
Terminal output from the Mew build system. The first run executes three steps (setup, restore, compile) and finishes in 2.4 seconds. Running the same "mew run build.mew compile" command again skips restore and compile because they're already up to date, and the build finishes in 0.0 seconds.A Mew build script:

```
task restore 
    in sources = glob(
        "src/compiler/**/*.{csproj,props}",
        "global.json") 
    out assets = glob("src/compiler/**/obj/project.assets.json") {
    dotnet("restore", "src/compiler/Mew.slnx")?;
}

task compile(ctx: Mew) : restore 
    in sources = glob(
        "src/compiler/**/*.{cs,csproj,props,targets}",
        "src/stdlib/lib/**/*.mew",
        "global.json",
        "!**/{obj,bin}/**")
    out compiler = file($"src/compiler/Mew/bin/{ctx.configuration()}/net10.0/Mew.dll")
{
    dotnet("build", "src/compiler/Mew.slnx", "--no-restore", "-c", ctx.configuration())?;
}
```
171
Patrik Svensson @patriksvensson.se · 03/10/2026
Amen
010
Patrik Svensson @patriksvensson.se · 02/10/2026
I love it!
000
Reposted by Patrik Svensson
Guy Buss @eluciusftw.bsky.social · 02/10/2026
For all you living in the terminal - need a quick break, some distraction? Why not try [tuisweeper](github.com/EluciusFTW/t...) :P? Wanted to test [SpectreTuff] (github.com/EluciusFTW/S...) in conjunction with Elmish on a fun use-case. Worked like a charm! #fsharp #tui #elmish #dotnet
github.com
GitHub - EluciusFTW/tuisweeper: This is an implementation of the classic MineSweeper in the terminal written in F# using SpectreTuff
This is an implementation of the classic MineSweeper in the terminal written in F# using SpectreTuff - EluciusFTW/tuisweeper
321
Reposted by Patrik Svensson
Mattias Karlsson @devlead.se · 01/10/2026
I wrote this for me; now you can read it too. It’s been in draft for years. I was recently a guest on the .NET Rocks podcast on the topic, that episode landed today, which made me revisit and finally get the post out of drafts: Taking control of your digital legacy www.devlead.se/posts/2026/2...
devlead.se
@devlead - Mattias Karlsson's Blog - Taking control of your digital legacy
A practical inventory, five categories, and the platform features that decide what happens to your domains, repositories, and accounts when you're not around
2149
Patrik Svensson @patriksvensson.se · 30/09/2026
Completely unrelated: I saw on YouTube that you recently started playing the new Control game. I'm not planning on playing it myself right now, but is it any good? When do you plan your next stream?
100
Patrik Svensson @patriksvensson.se · 30/09/2026
Rereading this post, I realize there's no way I'm neurotypical. Three years without any big, tangible results...
040
Patrik Svensson @patriksvensson.se · 30/09/2026
I have good news for you. I made some pushes the last couple of days to stabilize things for a 1.0, so soon things will be easier for you and SpectreCoff!
110
Reposted by Patrik Svensson
Guy Buss @eluciusftw.bsky.social · 18/09/2026
We released a new version of SpectreCoff today (0.57.7), catching up with Spectre.Console again, including the newest features and api changes. #fsharp #dotnet Here's the changelog: github.com/EluciusFTW/S...
github.com
SpectreCoff/CHANGELOG.md at main · EluciusFTW/SpectreCoff
A thin, opinionated wrapper around Spectre.Console in F#. - EluciusFTW/SpectreCoff
183
Patrik Svensson @patriksvensson.se · 30/09/2026
Made some real progress tonight, and I suddenly feel like three years of work is finally starting to pay off. I doubt anyone will use this, but it feels really good to realize a vision and see it through.
150
Reposted by Patrik Svensson
Nikaaaaaaaah! 👻🎃 @mxnectarine.polycule-slut.cloud · 30/09/2026
As a swede, it’s a bit weird to buy land for “recreational use” as the right to roam makes most land available to anyone. If he has some idea that this will be his private property, it’s going to be funny to see what happens when people hike, camp, pick berries and mushrooms on “his” land
fortune.com
Palantir CEO Alex Karl quietly purchased 37,000 acres of forests in Sweden—and locals found out when hunters lost leases to use the property | Fortune
Cladonia Skog AB, a newly registered company owned by Karp, said it would use the land for “forestry and other related activities.”
27718
Reposted by Patrik Svensson
Mitch Denny @mitchdenny.dev · 28/09/2026
One thing that I wish macOS did better was multi-monitor support. I have two fairly recent Dell monitors on my desk daisy chained via thunderbolt (to mac) and DP (to second monitor). And when I plug in the mac its hit and miss as to whether its going to work or not.
111
Patrik Svensson @patriksvensson.se · 28/09/2026
Yes. This is something that I really hate with macOS/macs.
000
Patrik Svensson @patriksvensson.se · 25/09/2026
Sure! How does it work 😅
100
Patrik Svensson @patriksvensson.se · 25/09/2026
That I could do!
010
Patrik Svensson @patriksvensson.se · 25/09/2026
If I would extrapolate from carpentry, I would probably kill them by accident.
100
Patrik Svensson @patriksvensson.se · 25/09/2026
Looks like Claude can do other things than code...
120
Patrik Svensson @patriksvensson.se · 25/09/2026
Maybe. I probably passed my prime, but I'm open to anything as long as I can pay my mortage.
100
Patrik Svensson @patriksvensson.se · 25/09/2026
Plan adjusted. Since I have no talent I'll focus on either being a bank robber or a politician. Wait, bank robbing probably requires some skill when I think of it.
110
Patrik Svensson @patriksvensson.se · 25/09/2026
I've always said that if I weren't a programmer, I'd be a carpenter. Well, I'm remodeling my garage, and it turns out I SUCK at carpentry. So I need a new backup plan.
3140
Patrik Svensson @patriksvensson.se · 25/09/2026
Kör bara kör!
010
Patrik Svensson @patriksvensson.se · 25/09/2026
Ironiskt att han snackar om att tala dålig svenska, när han skriver sämre än min dotter som är elva.
050
Patrik Svensson @patriksvensson.se · 24/09/2026
Yes. The file is here if you want to take a look: opencli.org/descriptions...
opencli.org
000
Patrik Svensson @patriksvensson.se · 24/09/2026
Btw, this is what was generated: opencli.org/explorer?exa...
opencli.org
Explorer | OpenCLI
Browse an OpenCLI Description interactively.
110
Patrik Svensson @patriksvensson.se · 24/09/2026
Yeah, ffmpeg is fantastic!
000
Patrik Svensson @patriksvensson.se · 24/09/2026
Indeed!
110
Patrik Svensson @patriksvensson.se · 24/09/2026
Viewing the result in the explorer is a single command with 1130 options..
Documentation page for ffmpeg 8.1.2 (LGPL-2.1-or-later, OpenCLI 0.1), "Universal media converter." A sidebar with a "Filter commands…" box lists a single command, ffmpeg. The main area shows option tables for Smooth Streaming, SPDIF, and Tee muxers, with the WAV muxer section starting below.
000
Patrik Svensson @patriksvensson.se · 24/09/2026
I generated a OpenCLI (opencli.org) description for ffmpeg via "ffmpeg -h full", and the file is 2Mb big...
Finder listing: dotnet.json (52 KB) and the selected ffmpeg.json (2 MB).
220
Patrik Svensson @patriksvensson.se · 22/09/2026
Listening to "Story of an Artist" by M. Ward (originally by the late great Daniel Johnston) on repeat tonight. This song is deeply associated with moving to Stockholm for me.
010
Reposted by Patrik Svensson
Gianmarco Soresi @gianmarcosoresi.bsky.social · 21/09/2026
If you’re moved by this guy crying boy oh boy are there some other images and videos you should check out
395209523492
Patrik Svensson @patriksvensson.se · 21/09/2026
020
Patrik Svensson @patriksvensson.se · 21/09/2026
Yes, that's what I've been doing for the last three years or so 😄
110
Patrik Svensson @patriksvensson.se · 21/09/2026
I'm considering submitting a talk about building a compiler for the CLR to a conference in February, but I haven't decided whether I want to add yet another thing to my already busy schedule.
241
Patrik Svensson @patriksvensson.se · 20/09/2026
That I can visit an optician for and pay €5
000
Patrik Svensson @patriksvensson.se · 20/09/2026
I just discovered that ordering glasses online costs a tenth of what I pay at my closest brick-and-mortar store. I have no other word for opticians than "cartel".
121
Patrik Svensson @patriksvensson.se · 20/09/2026
I got error propagation working in Mew yesterday! One thing I love about how the compiler works is that this change didn't require any new concepts, just new lowering mechanisms, which made it pretty quick to implement.
Mew code:

```
pub fn evaluate(text: string) -> Result<i64, string> {
    if text.is_empty() {
        return .ok(0);
    }

    let tokens = tokenize(text)?;
    let expr = parse(tokens)?;

    let eval = new Evaluator { };
    return .ok(expr.accept(eval));
}
```
010
Patrik Svensson @patriksvensson.se · 18/09/2026
It's 98% for fun, 2% purpose. I have some plans but not sure how they will pan out yet. Regardless, I'm the only one who will be using it, so I don't take things too seriously 😄
020
Patrik Svensson @patriksvensson.se · 18/09/2026
Spent most of my evening on this, but finally got "if let" statements working tonight! github.com/patriksvenss...
Mew code:

```
pub fn parse(tokens: Enumerable<Token>) -> Result<Expression, string> {
    let mut stack = Stack<Expression>::new();
    for token in tokens {
        match token {   
            .LParen => { /* Ignore */ },
            .RParen => { /* Ignore */ }
            .Integer(value) => stack.push(new IntegerExpression { value: value }),
            .Operator(op) => { 
                if let .some(right) = stack.pop() {
                    if let .some(left) = stack.pop() {
                        stack.push(new ArithmeticExpression {
                            operator: op.kind,
                            left: left,
                            right: right,
                        });
                        continue;
                    }
                }

                return .err("Expected operand on stack");
            },
        }
    }

    if stack.is_empty() {
        return .err("Expected expression on stack but found none");
    }

    return .ok(stack.pop().unwrap());
}
```
140
Patrik Svensson @patriksvensson.se · 18/09/2026
I wanted to name it after my daughter, but "Ada" was already taken for some weird reason! 😉
120
Patrik Svensson @patriksvensson.se · 17/09/2026
Thanks Patricia!
010
Patrik Svensson @patriksvensson.se · 17/09/2026
So this happened yesterday. For some unknown reason (I attribute it to some kind of clerical error), I was awarded "Developer of the Year" at the Developers Day gala here in Stockholm. It was a super fun evening.
A picture of me getting an award for some unknown reason.Me and some other people who also won awards. Probably for a good reason.
6231
Patrik Svensson @patriksvensson.se · 17/09/2026
Yeah, I know. I was just joking around. I think it was a funny coincidence 😄
120
Patrik Svensson @patriksvensson.se · 17/09/2026
😅
Screenshot of a Bluesky feed. A post from Patricia Aas jokes that all programmers will create their own programming language unless reined in by "adults", and wonders what happens if LLMs start doing the same. Directly below it, posted moments earlier, is Patrik Svensson's post announcing the first real program written in Mew, his own programming language.
140
Patrik Svensson @patriksvensson.se · 17/09/2026
The first real Mew program was written tonight: a simple arithmetic calculator that takes input either from command-line arguments or from stdin. It demonstrates most of the language's current features, as well as interop with .NET. github.com/patriksvenss...
#load "parsing/mod.mew"

use std;

let expression = read_expression();
let result = parsing.evaluate(expression);
match result {    
    .ok(value) => println($"The result is: {value}"),
    .err(message) => panic(message),
}

fn read_expression() -> string {
    let args = System.Environment::GetCommandLineArgs();
    if args.count > 1 {
        // Get the first provided value
        return args[1];
    } else {
        // Get expression from stdin
        print("> ");
        return System.Console::ReadLine();
    }
}Terminal screenshot showing two runs of a Mew program in a directory named mew-demo. In the first, the command mew main.mew "1+2+3+4*7+(32/2)" prints "The result is: 50". In the second, mew main.mew is run with no arguments, the expression 1+1+2*3 is typed at a ">" prompt, and the program prints "The result is: 8".
140
Patrik Svensson @patriksvensson.se · 16/09/2026
"Inte ALLA mjukvaruutvecklare!"
020
Reposted by Patrik Svensson
Nicholas Blumhardt @nblumhardt.com · 15/09/2026
All set up for a fun day at #ndcoslo tomorrow! Drop in and say “hi” if you’re around 👋
021
Reposted by Patrik Svensson
Cake Build @cakebuild.net · 14/09/2026
Cake v6.3.0 is out 🚀🍰 NuGetLogin for GitHub Actions OIDC trusted publishing (no long-lived API keys), nullability-aware aliases, typed dotnet tool aliases, verbosity via config, and light-theme-friendly reports. cakebuild.net/blog/2026/09... #dotnet #devops #csharp
cakebuild.net
Cake - Cake v6.3.0 released
1105
Reposted by Patrik Svensson
Mattias Karlsson @devlead.se · 14/09/2026
One of my favorite .NET conferences, Swetugg, just opened its CFP for 2027! See you there? sessionize.com/swetugg-stoc... #dotnet #cfp
sessionize.com
Swetugg Stockholm 2027: Call for Speakers
Our vision is to create a good quality .NET conference with relevant content that is also affordable. We include everything from the shiny new things ...
094
Patrik Svensson @patriksvensson.se · 14/09/2026
Slightly optimistic. Hopefully the fascists (SD) and their friends (M, KD, L) won't be able to rule for the coming 4 years, but at this point it's not a fact.
110