Sign in

Richard

@pretzelhands.com
725 followers 297 following 268 posts

🥨 Professional pretzel 🐘 PHP, .NET and JavaScript 🧑🏼‍💻 Swiss army chainsaw of problem-solving ☀️ Warm presence and hype man 🎨 Part-time con husband @ kyoti.art If you're reading this, come say hi!

PostsRepliesMedia
Richard @pretzelhands.com · 23/04/2025
First order of my wife's art business kyoti.art arrived at its destination today! It's amazing to see people be so excited about receiving their order. A whole different rush!
A reflective, shiny A5-sized package with lots of custom packaging decals lying on a doormatA 'My Neighbor Totoro' sticker sheet, a Totoro bookmark, a few Soot stickers and a thank you card laid out on a wooden table
131
Richard @pretzelhands.com · 22/04/2025
Es ist schön zu wissen, dass meine Kammerumlage zumindest an technisch kompetente Menschen geht.. 🙃
020
Richard @pretzelhands.com · 04/04/2025
Just remembered my very first programming experience. NFS: Hot Pursuit 2 stored all its car models with .ini files in a cars/ folder. This INI files had things like acceleration rate and max speed defined per vehicle. You could just edit them. I won every race 😤
150
Richard @pretzelhands.com · 29/03/2025
Today in: video games I’m horrifically late for: Shadow of the Erdtree! Fucking FINALLY.
030
Richard @pretzelhands.com · 17/03/2025
In the end we managed to generate a whopping 728 EUR from our first effort! 💵 So I'd like to take this as a story. If you have something you want to do, just go and do it. As @levelsio has said: You Can Just Do Things. 8/
Jowi in the Button Festival booth showing a peace sign and smiling extremely happily
130
Richard @pretzelhands.com · 17/03/2025
The big day came and we set up a stand at Button Festival! We were surrounded by so many other lovely artists who welcomed us with open arms ❤️ It was an absolute blast to see people react to the stickers, to chat with them, to just have a good time for two days 7/
Me and Jowi behind our fully set up and decorated booth at Button Festival
130
Richard @pretzelhands.com · 17/03/2025
A lot of long production days and nights followed. Even the day before the event we were still figuring out a prototype for our booth design at 11pm. 😁 Turns out there are great modular boxes you can buy and configure in literally whatever way you want. We were ready! 😬 6/
An undecorated store booth built out of modular panels covered in white mesh
110
Richard @pretzelhands.com · 17/03/2025
Well, luckily our city happens to have a gaming festival of its own called Button Festival! Jowi immediately applied for a table and even made a whole presentation for the application.. And she got in! Woo! 🎉 So in the beginning of March, we would go and sell things! 5/
A panoramic view of Button Festival showing people playing video games on couches and socializing
150
Richard @pretzelhands.com · 17/03/2025
Between January and the beginning of March she produced a total of 1,800 stickers, bookmarks, art prints, pins and keychains. All of them designed by Jowi and handmade from material you can buy at any stationery shop. But how to sell that stuff? 4/
A collection of Oddish stickers laid out in a 3-by-4 grid. The sticker say "Broke but free"
130
Richard @pretzelhands.com · 17/03/2025
I decided to get her an inkjet printer for Christmas and Jowi bought herself a Cricut plotter with her bonus. Along with some sticker paper, laminating foil and some other misc supplies she now had everything to start producing! And boy, did she ever produce a lot 🤭 3/
A Cricut plotter and an Epson inkjet in their packagings on a makeshift workshop table
110
Richard @pretzelhands.com · 17/03/2025
Jowi was immediately inspired! You can just sell stickers and fanart? 👀 That sounded fun to her. When we got home, she immediately started drawing. Then she decided she wants to do /everything/ by herself. Art, cutting, laminating, the whole nine yards. 2/
Jowi proudly presenting her first design. An axolotl saying "Ich will nicht mehr" (I don't want to anymore)
120
Richard @pretzelhands.com · 17/03/2025
My wife is starting an art business! 🎨 A story of how you can just do things. In November last year Jowi and I went to @ViennaComicCon on a date. We wanted to see the nerd scene of Austria in one place We also found the "Artist Alley" where people sell their arts & crafts ✨ 1/
A panoramic view of Vienna Comic Con's Artist Alley full of people
142
Richard @pretzelhands.com · 06/02/2025
For your consideration:
Maslow's hierarchy of needs, but every need is Punschkrapfen
131
Richard @pretzelhands.com · 16/01/2025
Na, bitte, gehts weg. I mag nimma wählen. Gusch.
[EN]: An invite for me to vote in the elections of my local chapter of the chamber of commerce. But since the last two elections in the previous months went really against my wishes, I'd rather not vote in this one anymore.
000
Richard @pretzelhands.com · 16/01/2025
More cute feel-good content for today: I digitally preserved the love notes my wife wrote for me 9 years ago before she flew back home to the Philippines. I've carefully kept them stored physically until now, but if anything should happen to them I would be devastated. Not anymore!
A pile of notes, most of them folded as paper planesA single paper note being held in hand, showing a close up of the paper plane shapeA little note reading:

"I love all your quirks including your weird ones *ahem* chewing sounds *ahem*

I love you Bubu!

4 Sept 2016"
020
Richard @pretzelhands.com · 16/01/2025
My wife snapped a spontaneous picture while we were clearing out parts of our bedroom yesterday. I think we're done with family pictures now. This is it. It doesn't get better. 🤭
A picture of a mirror. In the reflection you can see from back to front: Me, kneeling behind my wife in a green jacket and beige pants. My wife, sitting on the floor cross-legged wearing a white t-shirt and blue pyjama pants. On my wife's lap is our pug, comfortable resting and looking at the mirror slightly confused
0290
Richard @pretzelhands.com · 31/12/2024
Happy New Year from Manila! 🎉
010
Richard @pretzelhands.com · 24/12/2024
🎄 Merry Christmas from the Philippines!
241
Richard @pretzelhands.com · 20/12/2024
Not yet, but looks interesting! I currently just carry a little folder with me and grep on it when necessary:
A macOS finder view with a folder called "Documentation" showing a list of folders called:

alpinejs.dev
laravel.com
livewire.laravel.com
sponsors.tenancyforlaravel.com
tenancyforlaravel.com
110
Richard @pretzelhands.com · 20/12/2024
Hopping onto a 18h flight to the 🇵🇭 Philippines, so here's one of my favorite productivity tips: Did you know you can just bring docs with you offline? It's one command: wget --recursive --level=1 --no-parent --convert-links --page-requisites --html-extension --domains=laravel.com laravel.com/docs
A screenshot of a bash command with a comment saying:

# Save all of the Laravel docs locally in a folder called laravel.com

wget --recursive --level=1 --no-parent --convert-links --page-requisites --html-extension --domains=laravel.com https://laravel.com/docs
271
Richard @pretzelhands.com · 19/12/2024
This is the update function, btw. Just in case I have completely nerd-sniped you at this point. (sorry! 🤭)
Update function in controller
100
Richard @pretzelhands.com · 19/12/2024
Yup. This runs perfectly. Same if I call $client->refresh(). :D
Updated test
200
Richard @pretzelhands.com · 19/12/2024
FWIW, I also have this sanity check that just verifies all clients are listed correctly. I can also fix the test for `update` by using the following: expect($client->name)->not->toBe($originalName); expect($client->name)->toBe($changedName); I'm just very confused why my view won't update
A test verifying all clients are shown correctly.
210
Richard @pretzelhands.com · 19/12/2024
Hey, Laravel friends! I'm stumped by an error. In my test if I update a user and then check that the name is correctly displayed, the test works fine. (right image) But if I first check if the old name is displayed, then update the user and then check the name again, the test fails (left image)
Non-working codeWorking code
520
Richard @pretzelhands.com · 18/12/2024
There's something very pleasing about working within a Laravel project. The choices made by the library authors guide you towards building elegant code of your own In this case I'm very pleased in being able to hook into tenant functionality with two tiny functions in beforeEach() and afterEach()
A piece of test code that reads as follows:

beforeEach(fn() => useTenant());
afterEach(fn() => disableTenant());

test('it shows all clients on overview page', function () {

    $this->actingAs($this->consultant);

    $response = $this->get(tenant_route('clients.index'));

    $response->assertStatus(200);
    $response->assertSeeInOrder(
        $this->clients
            ->pluck('name')
            ->all()
    );
});
110
Richard @pretzelhands.com · 14/12/2024
Fully assembled jam cookies! Yum!
A baking tray showing 14 pieces of assembled cookies with jam in their center
030
Richard @pretzelhands.com · 14/12/2024
Today we baked a metric fuckton of Christmas cookies. Every year I tell myself we’ll make less. Not that this amount ever survives, mind you. So I’ll spend the next 12 days in a sugar coma! 😄
a piece of parchment paper with approximately 50 Vanillekipferl lined up on itA baking tray with 28 pieces of gingerbread on it. One has already been taken off the sheet A top-down shot of a cookie box with lots of tiny little cookies in various Christmas shapes in it.

One can see trees, stars, moons and little cookie peopleA baking tray full of base cookies lined up next to a lot of cookies with cut out shapes intended to go on the base cookies
140
Richard @pretzelhands.com · 13/12/2024
Another day, another cooking adventure! Today we have 🇨🇳 yuxiang rousi! The third bucket list item on my recent obsessive excursion into Sichuan cuisine! Like all Chinese recipes it’s chopping until your fingers bleed, but once you’re done it goes quickly! Big yum!
A view into a pot containing a brown stew of pork, morels, carrots and scallion
150
Richard @pretzelhands.com · 13/12/2024
In case you haven't heard of it, text-wrap: balance is a thing, and my god does it make text more bearable to look at! Feel free to apply where sensible! developer.mozilla.org/en-US/docs/W...
A screenshot showing a customer creation form with an unbalanced text explanationA screenshot showing a customer selection form with a balanced text explanation
4285
Richard @pretzelhands.com · 10/12/2024
Today’s cooking adventure! A new recipe I’ve learned: 🇹🇭 Pad Kra Pao Comes together shockingly quickly and is incredibly delicious!
A portion of rice on the left, with some Pad Kra Pao on the right and rounded out by an over-easy egg
030
Richard @pretzelhands.com · 10/12/2024
I only recently learned that on macOS using the little Preview app you can actually sign your PDFs on your iPhone. I may never print a document again.
A macOS popup showing pre-saved signatures in the Preview app. There are 3 signatures. 2 of them are blacked out, the top one says "Pretzel"
3110
Richard @pretzelhands.com · 09/12/2024
This weekend I was at the local #analoggamejam hosted by the amazing Ludovico The goal was designing/playtesting new board games in a single day We made a game simulating making pizza with friends and trying to get on as much of your fav toppings as possible while avoiding the ones you hate
A top-down photo showing a playtest of our pizza game with 4 peopleA top-down photo showcasing the playing board (a pizza cutout), the ingredient tokens as well as your liked and disliked toppings hidden from other players (in prototyping we used Uno cards)A top down photo showing the pizza cutout topped with a bunch of ingredient tokens during the "eating" phase where everyone has to claim the best possible slice for their point countA top-down view of a bunch of sheets of paper with people writing down ideas generated from the four idea prompt sheets:

- A name: Rüdiger
- A thing someone doesn't like: Tomatoes
- A number: 3
- A game mechanic: Flipping things
2190
Richard @pretzelhands.com · 07/12/2024
Today’s cooking adventures: Making wonton and siomai for friends, along with a beautiful pork roast by my wife! (I’m really just a helping hand here)
020
Richard @pretzelhands.com · 06/12/2024
Not proud of this one.
120
Richard @pretzelhands.com · 06/12/2024
Day 3, Part 2 (woops! Thanks @treysdevshed.com!) Listen, I get that the task kinda wants me to write a little parser here to extract the `do()` and `don't()`. Buuuuuuut the pattern matching in F# is ridiculously good. So useful. So. I didn't. 🤭
My solution for Day 4, Part 2 of Advent of Code

module Day3Solution

open System.Text.RegularExpressions

let multiplierRegex = @"mul\((\d{1,3}),(\d{1,3})\)|don\'t\(\)|do\(\)"
let regexOptions = RegexOptions.Multiline

let extractMultipliers input =
    let mutable enabled = true
    let multiplierTokens = seq {
        for m in Regex.Matches(input, multiplierRegex, regexOptions) do
            match m.Value with
            | "do()" ->
                enabled <- true
                None
            | "don't()" ->
                enabled <- false
                None
            | _ when enabled ->
                Some((int m.Groups[1].Value, int m.Groups[2].Value))
            | _ -> None
    }

    Seq.choose id multiplierTokens

let calculateSum input =
    extractMultipliers input
    |> Seq.map (fun (left, right) -> left * right)
    |> Seq.sum
020
Richard @pretzelhands.com · 06/12/2024
Day 4, Part 1 of #adventofcode I felt really clever writing this, since it's a textbook extraction problem. But part 2 had other plans for me. At least I'm happy about this one!
My solution to Day 4, Part 1 of Advent of Code


let multiplierRegex = @"mul\((\d{1,3}),(\d{1,3})\)"
let regexOptions = RegexOptions.Multiline

let extractMultipliers input =
    Regex.Matches(input, multiplierRegex, regexOptions)
    |> seq
    |> Seq.map (fun m -> (int m.Groups[1].Value, int m.Groups[2].Value))

let calculateSum input =
    extractMultipliers input
    |> Seq.map (fun (left, right) -> left * right)
    |> Seq.sum
230
Richard @pretzelhands.com · 06/12/2024
Are dogs in warming sweaters allowed?
My little pug Vanya sitting in a grey hoodie outside a cafe in Munich
130
Richard @pretzelhands.com · 05/12/2024
Hi. I sat in a shopping cart today. That’s it. That’s the post.
Me, sitting in a shopping cart
2262
Richard @pretzelhands.com · 05/12/2024
Recently a friend of ours found a small Russian blue cat in a field. We don't know how he ended up there, but he has now been adopted by my parents at their rural farm house. He is the most intensely cuddly cat I've ever met. When we handed him to my mum, he immediately started purring!
A small Russian blue cat resting on my wife's arm while we drove it to my parentsMe holding a small Russian blue cat on my arms while smiling at the camera
2510
Richard @pretzelhands.com · 04/12/2024
No, but seriously I don’t know whether to be proud or disturbed.
010
Richard @pretzelhands.com · 04/12/2024
Not me unironically listening to Mary On A Cross as the only song on my playlist for 5 weeks straight. Ahem.
110
Richard @pretzelhands.com · 04/12/2024
Day 2, Part 2! Slightly refactored. I'm still getting used to the idea that I can just pass around operators as functions. It's wild!
My solution for Day 2, Part 2 of #adventofcode

module Day2Solution

open System

let lineToReport (line: string) =
    line.Split([|' '|], StringSplitOptions.RemoveEmptyEntries)
    |> Array.map int

let between low high (difference: int) =
    let difference = Math.Abs difference
    low <= difference && difference <= high

let isLinear (report: int array) predicate =
    report
    |> Array.pairwise
    |> Array.map (fun (left, right) -> predicate left right && between 1 3 (left - right))
    |> Array.filter not
    |> Array.length
    |> fun violations -> violations <= 1

let validateReport (report: int array) =
    let incrementing = isLinear report (<)
    let decrementing = isLinear report (>)

    incrementing || decrementing

let countSafeReports input =
    input
    |> Array.map lineToReport
    |> Array.map validateReport
    |> Array.filter id
    |> Array.length
020
Richard @pretzelhands.com · 04/12/2024
Day 2, Part 1 of #adventofcode This one was great fun! Feels like a beautiful fit for pipeline processing an array.
My solution for Day 2, Part 1 of Advent Of Code

module Day2Solution

open System

let lineToReport (line: string) =
    line.Split([|' '|], StringSplitOptions.RemoveEmptyEntries)
    |> Array.map int

let between low high (difference: int) =
    let difference = Math.Abs difference
    low <= difference && difference <= high

let isIncrementing (report: int array) =
    report
    |> Array.pairwise
    |> Array.map (fun (left, right) -> left < right && between 1 3 (left - right))
    |> Array.forall id

let isDecrementing (report: int array) =
    report
    |> Array.pairwise
    |> Array.map (fun (left, right) -> left > right && between 1 3 (left - right))
    |> Array.forall id

let validateReport (report: int array) =
    let incrementing = isIncrementing report
    let decrementing = isDecrementing report

    incrementing || decrementing

let countSafeReports input =
    input
    |> Array.map lineToReport
    |> Array.map validateReport
    |> Array.filter id
    |> Array.length
140
Richard @pretzelhands.com · 02/12/2024
And part 2! This one feels a lot nicer. Although the inlined functions could probably be extracted to something with a nice name.
My solution to Day 1, Part 2 of the Advent of Code

let countOccurrences list item =
    list
    |> Array.filter ((=) item)
    |> Array.length

let calculateSimilarityScore (input: string) =
    let (left, right) = separateIntoLists input

    left
        |> Array.map (fun item -> item, countOccurrences right item)
        |> Array.fold (fun acc (item, numOccurrences) -> acc + item * numOccurrences) 0
100
Richard @pretzelhands.com · 02/12/2024
Alright, here we go. Day 1, Part 1 of #adventofcode This solution does not feel 100% idiomatic, but I'm probably still holding F# very wrong. It was however surprisingly pleasant to type out!
My solution to Day 1, Part 1 of Advent of Code

let splitIntoTuple (line: string) =
    let parts = line.Split([|' '|], StringSplitOptions.RemoveEmptyEntries)

    (int parts[0], int parts[1])

let separateIntoLists (input: string) =
    input.Split('\n')
    |> Array.filter (not << String.IsNullOrWhiteSpace)
    |> Array.map splitIntoTuple
    |> Array.unzip

let calculateDistance (input: string) =
    let (left, right) = separateIntoLists input

    let leftList = Array.sort left
    let rightList = Array.sort right

    (leftList, rightList)
    ||> Array.map2 (-)
    |> Array.map Math.Abs
    |> Array.sum
120
Richard @pretzelhands.com · 25/11/2024
3 digits get! Hello everyone! I hope you enjoy my patented mix of ranting about tech and shitposting! ✨
150
Richard @pretzelhands.com · 24/11/2024
Puuh, die neue Wohnung vllt doch in Wien suchen 🙃
020
Richard @pretzelhands.com · 24/11/2024
The C version barely even registers locally, btw.
A screenshot showing code in C for running a billion iterations. The result of this benchmark is 0.00s with only 1% system usage
210
Richard @pretzelhands.com · 24/11/2024
I can't quite be bothered to set up PyPy and Node on my production VPS right now, but I did do a local run real quick and it's.. shocking, honestly. 🤭
A benchmark of running a billion iterations using Node.js version 22.9 on my local machine. Results show it running in 0.72sA screenshot showing Python code for running a billion iterations. The results show it running in 0.90s
200
Richard @pretzelhands.com · 24/11/2024
About 0.02s locally 😁
Benchmark showing three runs of array_fill for 10,000 entries!
010