
Moe Hamann
218 posts

Moe Hamann
@moritzhamann
Engineering Manager at Bloomberg LP. Opinions are my own.
شامل ہوئے Şubat 2015
128 فالونگ37 فالوورز

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 hboehm.info/gc/gcinterface… as a custom allocator 😅
English

@TheGingerBill Is there a way in Odin to make this work with cases which have the same type but mean something different? I.e. type aliasas or similar?
English

There are also different families of tagged unions too:
C (manual, a struct with all zero offsets)
Pascal (field name based)
ALGOL (type based)
ML (merges enumerations with named types, usually tuples)
What annoys me is when people go the ML-style is the only "true" one.
Jonathan Blow@Jonathan_Blow
Usually when kids say “sum type” they mean “automatic syntactic sugar that unwraps a union based on a tag,” but note that this has very little to do with the actual type or how it is represented! (And ML had this feature since the 1980s, and was not the first to do it.)
English

@mitchellh The fix. Just updated to 1.1.1 and my Neovim stopped working for CTRL keys. I don't think I've ever changed my keyboard layout
English

@moritzhamann The fix or the original issue? The original issue yes maybe. The fix… I haven’t heard.
English

Ghostty 1.1.1 is out. Mostly focused on critical issues from 1.1.0, but a few highlights: SSD for X11, huge improvements for Metal rendering on Intel GPUs specifically, continued improvement for various keyboard layouts.
ghostty.org/docs/install/r…

English

@teej_dv Did you push this already? I'm trying implement my first derive ppx arm and would love to get some pointers
English

So I've been working on an OCaml library that lets you generate CRUD operations type safely, and made a lot of good progress (with a new backend) today.
If you start with a record with a primary key, and a few fields like this:
You then get all of these functions generated for free!
Notice that to insert, the labelled arguments are created for exactly the fields that are in the record.
You can also update with newer versions of the record.
Reading, deleting are also supported of course :)


English

Moe Hamann ری ٹویٹ کیا

@0omari0 Since React was released, .NET has seen 4 different UI frameworks, 2 of which (Xamarin and WinUI) have been discontinued.
English

@ChShersh What would be better in that case? Array? The thing I'm wondering is if the implementation of the merge sort would still look that elegant though.
English

@moritzhamann True but you don’t want to use linked lists for huge data anyway
English

I don't know what's the big deal.
Implementing a simple Merge Sort algorithm just takes 5 minutes of writing this trivial code.

Dmitrii Kovanikov@ChShersh
If you believe things like, “Why learn the sorting algorithm if there’s Array.sort()??” You told me everything I needed to know about you.
English

@rustylass102008 @Abhishekcur ok rust was build in ocaml but what was ocaml build in
(couldn't find anything concrete)
English

>Linux is C
>Git is C
>Python interpreter (CPython) is C
>Ruby interpreter (MRI) is C
>PostgreSQL is C
>SQLite is C
>Redis is C
>MySQL is C++
>MongoDB is C++
>Unreal Engine is C++
>Chrome is C++
>Firefox is C++
>Windows kernel is C
>macOS kernel (XNU) is C
>Photoshop is C++
>VMware is C++
>TensorFlow (Core) is C++
-still, you are not convinced to learn C and C++
English

New blog post - "Neovim: Tips and tricks for OCaml's LSP server" moritzhamann.com/blog/2024-12-1…
English
Moe Hamann ری ٹویٹ کیا

Nvim 0.11 supports LSP-driven text folding ("textDocument/foldingRange" in LSP spec).
:set foldmethod=expr
:set foldexpr=v:lua.vim.lsp.foldexpr()
github.com/neovim/neovim/…
English

@stochasticchasm Although both are (iirc) formatted with JS's preset for ocamlformat. It's very dense and personally not my favourite. If your looking for something more readable (imo) checkout @ChShersh 's github TUI and aatron's Dream framework github.com/aantron/dream
github.com/chshersh/githu…
English

@moritzhamann I quite like this idea, probably has a ton of parsing and such
English
Moe Hamann ری ٹویٹ کیا

This was my tenth(!) year building 25 days of puzzles for #AdventOfCode. You can solve them all for free and in whatever programming language you like. I hope they help people become better programmers. 🌟
The first puzzle comes out in two hours: adventofcode.com
English
Moe Hamann ری ٹویٹ کیا

📽️ The Faster TypeScript Compilation talk by @acutmore is now published ⚡️
This talk from the recent London TypeScript meetup explains how the `ts-blank-space` type-stripping compiler works.
⚠️ Contains opinions on semi-colons
Blog Post: bloomberg.github.io/ts-blank-space/
Ashley Claymore@acutmore
My talk on ts-blank-space is now online (35min) youtube.com/watch?v=ZiD5zW…
English
Moe Hamann ری ٹویٹ کیا
