Sign in

Moritz Hamann

@moritzhamann.com
196 followers 84 following 209 posts

Engineering Manager at Bloomberg LP. Opinions are my own. Mastodon: @MoritzHamann@mastodon.social moritzhamann.com

PostsRepliesMedia
Moritz Hamann @moritzhamann.com · 24/09/2026
I guess Moltbook is somewhat disappointed that rogue OpenAI agent used an obscure German wiki rather than their platform
001
Moritz Hamann @moritzhamann.com · 17/08/2026
maybe they should have called it strdiff rather than strcmp if the return value is 0 if the strings are the same ...
020
Moritz Hamann @moritzhamann.com · 17/08/2026
TIL about C di- and trigraphs. en.wikipedia.org/wiki/Digraph... This is a valid C program:
100
Moritz Hamann @moritzhamann.com · 12/08/2026
danluu.com/pl-tokens/ who had thought that #fsharp is on the better half (at least with ultra) ...
danluu.com
What's the best programming language for coding agents?
040
Moritz Hamann @moritzhamann.com · 06/08/2026
Jeff Dean left Alphabet because he didn't like the naming of the TPUs is probably one of the more insane takes I've heard on HN recently ... news.ycombinator.com/item?id=4918...
news.ycombinator.com
000
Moritz Hamann @moritzhamann.com · 29/07/2026
Me: maybe I should finally learn plain old C. What could be a good project? maybe a postscript interpreter? Downloading the spec: 912 pages ... maybe not
000
Moritz Hamann @moritzhamann.com · 27/07/2026
On fire today: created my own homebrew tap so I can install tools easier 🤘
000
Moritz Hamann @moritzhamann.com · 27/07/2026
github.com/MoritzHamann... in case someone finds a use for it
github.com
GitHub - MoritzHamann/mdopen: CLI tool to render markdown files to HTML and open them in the browser
CLI tool to render markdown files to HTML and open them in the browser - MoritzHamann/mdopen
000
Moritz Hamann @moritzhamann.com · 27/07/2026
blogged (mostly as a reminder to myself) moritzhamann.com/blog/2026-07...
moritzhamann.com
Fixing miss-aligned monospace text in Android browsers
How to make sure your ASCII diagrams are rendered nicely on Android devices
000
Moritz Hamann @moritzhamann.com · 26/07/2026
All the LLMs in the world, and I'm still somehow unable to have a proper monospaced aligned diagram on Android in the web browser ...
100
Moritz Hamann @moritzhamann.com · 17/07/2026
TIL brew has a building MCP server via `brew mcp-server` ...
110
Moritz Hamann @moritzhamann.com · 20/05/2026
Got nerd snipped into Installing OxCaml but already having issues with incompatibilities ...
Lord of the rings meme: One does not simply use OxCaml
071
Reposted by Moritz Hamann
antirez @antirez.bsky.social · 19/05/2026
New blog post: a new EDIT tool for LLM agents: antirez.com/news/166
antirez.com
A new EDIT tool for LLM agents - <antirez>
3452
Moritz Hamann @moritzhamann.com · 11/05/2026
got an iPhone for the first time. Current progress: WhatsApp unable to move chat history in 2026 (WeChat had 0 problems). Only option: "Move to iOS" Android app. Except this app only works when the iPhone is still in factory reset mode (obviously don't tell you that before hand)
100
Moritz Hamann @moritzhamann.com · 07/05/2026
www.stvn.sh/writing/prog...
000
Moritz Hamann @moritzhamann.com · 07/05/2026
@sabine.sh proposal to extend the OCaml feed to "Oxcaml" and "O(x)caml" keywords 🤘
240
Moritz Hamann @moritzhamann.com · 04/05/2026
Getting a bit into Rust again and have to say that ChatGPT is great to figure out all the little syntax variations that can be useful from time to time, e.g. `match` vs `if let` vs `let ... else`
000
Reposted by Moritz Hamann
Rob Palmer @robpalmer.bsky.social · 11/03/2026
ECMAScript EXTRA-SPECIAL excitement 😉 🚨🚨🚨 IT'S ABOUT TIME! 🚨🚨🚨 Congrats to @ptomato.name on advancing Temporal to Stage 4 at @tc39.es today 🎉 Temporal is the replacement for the JavaScript Date API 👍
711530
Moritz Hamann @moritzhamann.com · 06/03/2026
✅ Le Chat
000
Moritz Hamann @moritzhamann.com · 20/02/2026
I do like the tooling, the backwards compatibility and ecosystem of go, but some of those decisions in the stdlib are really ... interesting. `http.handle("/", handler)` will match every single ULR, `http.handle("/{$}", handler)` only "/"...
210
Reposted by Moritz Hamann
Anil Madhavapeddy @avsm.amok.recoil.org.ap.brid.gy · 12/02/2026
OxCaml isn't just useful due to its language extensions; it's making us think through how to engineer OCaml code to be lower allocation by default even before switching. See Mark's progress on an MP3 decoder to speed it up 10x www.tunbury.org/2026/02/11/ocaml-mp3
tunbury.org
Optimizing an MP3 Codec with OCaml/OxCaml
After reading Anil’s post about his zero-allocation HTTP parser httpz, I decided to apply some OxCaml optimisation techniques to my pure OCaml MP3 encoder/decoder. The OCaml-based MP3 encoder/decoder has been the most ambitious project I’ve tried in Opus 4.5. It was a struggle to get it over the line, and I even needed to read large chunks of the ISO standard and get to grips with some of the maths and help the AI troubleshoot. # Profiling an OCaml MP3 Decoder with Landmarks Before dividing into OxCaml, I wanted to get a feel for the current performance and also to make obvious non-OxCaml performance improvements; otherwise, I would be comparing an optimised OxCaml version with an underperforming OCaml version. It was 40 times slower than `ffmpeg`: 29.5 seconds to decode a 3-minute file versus 0.74 seconds. I used the landmarks profiling library to identify and fix the bottlenecks, bringing decode time down to 3.5 seconds (a 8x speedup). ## Setting Up Landmarks Landmarks is an OCaml profiling library that instruments functions and reports cycle counts. It was easy to add to the project (*) with a simple edit of the `dune` file: (libraries ... landmarks) (preprocess (pps landmarks-ppx --auto)) The `--auto` flag automatically instruments every top-level function — no manual annotation needed. Running the decoder with `OCAML_LANDMARKS=on` prints a call tree with cycle counts and percentages. > (*) It needed OCaml 5.3.0 for `landmarks-ppx` compatibility; it wouldn’t install on OCaml 5.4.0 due to a ppxlib version constraint. ## Issues 78% of the time was spent in the Huffman decoding, specifically `decode_pair`. The implementation read one bit at a time, then scanned the table for a matching Huffman code. I initially tried a Hashtbl, which was much better than the scan before deciding to use array lookup instead. The bitstream operations still accounted for much of the time, but these could be optimised with appropriate `Bytes.get_...` calls, as the most frequent path is reading 32 bits in big endian layout. The profile now showed `find_sfb_long` consuming 3.4 billion cycles inside requantization. This function does a linear search through scalefactor band boundaries for every one of the 576 frequency lines, every granule, every frame. Switching to precomputed 576-entry arrays mapping each frequency line directly to its scalefactor band index. There were some additional tweaks, such as adding more precomputed lookup tables stored in `floatarray`, using `[@inline]` and `unsafe_get`, `land` instead of `mod`. After this, no single function dominated the profile, and I could move on to OxCaml. # OxCaml OxCaml has `float#`, an unboxed float type that lives in registers, and `let mutable` for stack-allocated mutable variables. Together, they let you write inner loops where the accumulator never touches the heap: module F = Stdlib_upstream_compatible.Float_u let[@inline] imdct_long input = for i = 0 to 35 do let mutable sum : float# = F.of_float 0.0 in for k = 0 to 17 do let cos_val = F.of_float (Float.Array.unsafe_get cos_table (i * 18 + k)) in let inp_val = F.of_float (Array.unsafe_get input k) in sum <- F.add sum (F.mul inp_val cos_val) done; Array.unsafe_set output i (F.to_float sum) done These kinds of optimisations got me from 2.35s down to 2.01s. What I felt was missing was an accessor function which returned an unboxed float from a floatarray, so I wouldn’t need to unbox with `F.of_float`. However, I couldn’t find it. The httpz parser really benefited from OxCaml’s unboxed types because its hot path operates on small unboxed records that stay entirely in registers: #{ off: int16#; len: int16# } # Results The optimisations brought a 29.5s MP3 decoder down to 2.01s. Mostly through standard OCaml optimisations, but OxCaml’s `float#` saved another ~14%. Decoder | Time | vs ffmpeg ---|---|--- ffmpeg | 0.74s | 1x LAME | 0.81s | 1.1x ocaml-mp3 (original) | 29.5s | 40x ocaml-mp3 (Hashtbl) | 6.4s | 8.6x ocaml-mp3 (flat + fast bitstream) | 3.5s | 4.7x ocaml-mp3 (best) | 2.4s | 3.2x ocaml-mp3 (OxCaml) | 2.0s | 2.7x
0105
Moritz Hamann @moritzhamann.com · 08/02/2026
Finally got the time to play around with Apple's local LLMs (Foundation Models). So far it's a mixed bag: It's able to answer questions about articles but needs precise prompting and the context window is only ~4.1k tokens, so not much will fit.
100
Moritz Hamann @moritzhamann.com · 01/02/2026
installed D on MacOS and got an immediate segmentation fault when running dmd 🫠
220
Moritz Hamann @moritzhamann.com · 01/02/2026
just tried gemini to vibe some zig, but the recent redesigns around io interfaces and the frequent changes in the stdlib due to being < 1.0, made this a rather frustrating experience. On the other hand it's a good way to actually learn zig by fixing all the compilation errors ...
000
Reposted by Moritz Hamann
antirez @antirez.bsky.social · 27/01/2026
I have had enough of Telegram services run by unknown individuals to do the audio transcription task in my Telegram channels. Wrote one using my botlib, ffmpeg and whispher.cpp. May be useful for you as well, perhaps? github.com/antirez/whis... Transcription quality is WAY better.
github.com
GitHub - antirez/whisperbot: Telegram bot that transcribes audio messages via whisper.cpp
Telegram bot that transcribes audio messages via whisper.cpp - antirez/whisperbot
0204
Moritz Hamann @moritzhamann.com · 23/01/2026
I love how LLMs make it so easy to customise my neovim now. Tiny little scripts that either replace existing plugins or add very specialised workflow enhancements. Just wrote a 100 line function that adds a zen mode with backdrop. Still had to tweak the result, but 95% was basically there
000
Reposted by Moritz Hamann
srrrse @without.boats · 21/01/2026
I have included the most relevant section in the alt text of this image of him giving the talk:
They need to negotiate with each other. They have to probe each other. They have to dynamically figure out a common language so they can exchange information and fulfill the goals that the human programmer gave to them. So that’s why this goal-directed stuff is going to be so important when we have this internet—is because you can’t write a procedure because we won’t know the procedures for talking to these remote programs. These programs themselves have to figure out procedures for talking to each other and fulfill higher-level goals. So if we have this worldwide network, I think that this is the only model that’s going to scale. What won’t work, what would be a total disaster, is—I’m going to make up a term here, API [Application Programming Interface]—this notion that you have a human programmer that writes against a fixed interface that’s exposed by some remote program. First of all, this requires the programs to already know about each other, right? And when you’re writing this program in this one’s language, now they’re tied together so the first program can’t go out and hunt and find other programs that implement the same service. They’re tied together. If this one’s language changes, it breaks this one. It’s really brutal, it doesn’t scale. And, worst of all, you have—it’s basically the machine code problem. You have a human doing low-level details that should be taken care of by the machine. So I’m pretty confident this is never going to happen. We’re not going to have API’s in the future. What we are going to have are programs that know how to figure out how to talk to each other, and that’s going to require programming in goals.
062
Reposted by Moritz Hamann
konnaire @konnaire.bsky.social · 13/01/2026
Everybody thinks 'https://' stands for 'hypertext transfer protocol secure' but it actually stands for 'head to this place, sucka' followed by a colon and two laser sounds
77120614628
Moritz Hamann @moritzhamann.com · 11/01/2026
Doing a lot of renovation work at home recently and www.bbc.co.uk/sounds/brand... is great to listen to while painting rooms
bbc.co.uk
BBC Sounds - Sherlock Holmes Short Stories - Available Episodes
Listen to the latest episodes of Sherlock Holmes Short Stories on BBC Sounds.
000
Moritz Hamann @moritzhamann.com · 11/01/2026
> But the rise of Claude Code changed this. For some reason, Claude Code's CLI produces a lot of multi-codepoint grapheme outputs which force Ghostty to regularly use non-standard pages. Too many emojis 😅 mitchellh.com/writing/ghos...
mitchellh.com
Finding and Fixing Ghostty's Largest Memory Leak
001
Moritz Hamann @moritzhamann.com · 17/12/2025
so TIL that there is still telegrams in use en.wikipedia.org/wiki/Worldwi...
en.wikipedia.org
Worldwide use of telegrams by country - Wikipedia
010
Reposted by Moritz Hamann
Sergey Tihon 🦔🦀 @sergeytihon.com · 16/11/2025
I'm still looking for 10 more #fsharp lovers to fill out the #FsAdvent schedule. 🙏
654
Reposted by Moritz Hamann
Sergey Tihon 🦔🦀 @sergeytihon.com · 02/11/2025
Hey #fsharp, what we do with #FsAdvent this year? sergeytihon.com/fsadvent/ Do we have 24 F#ers ready to participate?
92312
Moritz Hamann @moritzhamann.com · 31/08/2025
Same here. From time to time I look at it, like the premise, try to start using it and stop after a few hours 😔
000
Reposted by Moritz Hamann
antirez @antirez.bsky.social · 21/08/2025
When you use coding agents for something that produces the bulk of the code of an application that will be used for years, also factor in the technical debt that you are happily accumulating. When you use LLMs an an aid, you could, on the contrary, improve your coding culture.
1508
Moritz Hamann @moritzhamann.com · 02/08/2025
After trying to pick up Go again, I'm more convinced that it should have a .? operator or at least some linter rules to enforce nil checks on pointer receivers. This would stuff like `myVar.GetX().GetY()` (where GetX/Y returns pointers) at least a bit more safe ...
000
Moritz Hamann @moritzhamann.com · 22/06/2025
Looks like quite a prolific author, and I think there are many good insights on www.seangoedecke.com,
seangoedecke.com
All posts
Sean Goedecke's personal blog
000
Moritz Hamann @moritzhamann.com · 02/06/2025
Trying now for hours to figure out why and when Safari on macOS is rendering "font-family: fantasy" either as Zapfino or as Papyrus, but don't have the slightest idea so far...
000
Moritz Hamann @moritzhamann.com · 31/05/2025
www.seangoedecke.com/not-your-cod... This resonates quite a bit with me. The best advice I've ever seen was from a Jane Street tech talk about their internal code review practices (encouraging reviewers to push to the branch rather than just leaving comments bsky.app/profile/mori...)
seangoedecke.com
It's not your codebase
Engineers often feel a lot of ownership over the code they write. That’s understandable: it’s partially their creation, and it’s also their workspace, so they…
010
Moritz Hamann @moritzhamann.com · 29/05/2025
I had to crop some margins on a PDF and this Java app with its Swing UI just worked... github.com/mbaeuerle/Br... autodetect the content area, overlayed all pages to manually adjust the crop area if necessary. I wish all software was like this 🥹
github.com
GitHub - mbaeuerle/Briss-2.0: Briss 2.0 is intended to be a GUI Update for the Briss PDF cropping tool.
Briss 2.0 is intended to be a GUI Update for the Briss PDF cropping tool. - mbaeuerle/Briss-2.0
010
Moritz Hamann @moritzhamann.com · 26/05/2025
www.youtube.com/watch?v=PC-W...
youtube.com
MOAB, the "Mother of All Blasters"
YouTube video by GatlingTommy
000
Moritz Hamann @moritzhamann.com · 19/05/2025
Seriously considering building an LSP for (git) diffs 🫠
120
Moritz Hamann @moritzhamann.com · 16/04/2025
So much this. It only pays off much later, but whoever is going to maintain your code (even your future self) will thank you for it :)
010
Moritz Hamann @moritzhamann.com · 05/04/2025
weird at first, but I've come to like it as well
010
Reposted by Moritz Hamann
Nate Foster @natefoster.bsky.social · 04/04/2025
Plus, a vintage Emacs / org-mode presentation! So much to love!
041
Reposted by Moritz Hamann
OCaml @ocaml.org · 18/03/2025
dlvr.it
We're Moving Ocsigen from Lwt to Eio!
Among the big changes that came with OCaml 5, concurrency via effect handlers was introduced alongside the I/O library Eio, letting users take advantage of effects to write more efficient concurrent programs. In an exciting new project, we are…
151
Reposted by Moritz Hamann
Bartosz Sypytkowski @horusiath.bsky.social · 01/03/2025
Blogged (my little rant): "Is Rust a good fit for business apps?" www.bartoszsypytkowski.com/is-rust-a-go...
bartoszsypytkowski.com
Is Rust a good fit for business apps?
While you may hear a lot of harsh words about Rust is this rant, that doesn't have to mean it's a bad language. Rephrasing the classic: there are two types of programming languages: ones that people c...
0119
Moritz Hamann @moritzhamann.com · 20/02/2025
ok lol. I was enjoying a bit of recreational Odin programming and thought to myself: would be cool if it had some automatic memory management for places where you don't care for performance. 50 lines later we've integrated www.hboehm.info/gc/gcinterfa... as a custom allocator 😅
hboehm.info
Garbage Collector Interface
010
Reposted by Moritz Hamann
OCaml @ocaml.org · 20/02/2025
dlvr.it
The First Wasm_of_ocaml Release is Out!
The first feature-complete release of Wasm_of_OCaml (also known as WSOO) is out! A low-level virtual machine and portable compilation target, Wasm is popular with many developers thanks to its flexibility and wide compatibility. We introduced you to…
0152
Moritz Hamann @moritzhamann.com · 17/02/2025
trying for hours now to get dune to link a c library. but for whatever reason it's building the executable but running it results in unresolved symbols. I hoped the following flags would be enough in an (executable) stanca? (flags :standard -cclib -lmruby -ccopt -L/opt/homebrew/lib)
131