Daniel

@webcloud.se

Software Engineer from Sweden working at carla.se with things like TypeScript, ReScript, React, Next.js, GraphQL, Relay, Node.js, Go & PostgreSQL. Currently experimenting with OCaml! Personal website & blog: webcloud.se GitHub: github.com/danielstocks

I’ve been trying to stick with Safari as my main daily browser, with multiple profiles for work and personal browsing, but so many apps like Slack and Linear just keeps breaking in random ways 💩

A colleague of mine noticed something strange: date-fns (date-fns.org ) which is a fairly popular Open Source JavaScript library has an unusual amount of, dare I say "shady" sponsors on their website. My first thought was that the website/project had been exploited somehow?

Bild

Just gave the OCaml VSCode plugin a try (I've been using NeoVim + LSP integration previously) and one cool detail I haven't seen elsewhere is making the inferred types visible w/o having to hover or place your cursor to reveal the type. Pretty neat!

OCaml vscode plugin

Best #hackernews comment from #GCP outage yesterday (also affecting various AI services)! It's kind of scary to think how quickly we become dependent on these tools... although one could argue it's been a very long time since anyone was truly self-sufficient in this day and age.

Getting a lot of errors for Claude Sonnet 4 (Cursor) and Gemini Pro.
Nooooo I'm going to have to use my brain again and write 100% of my code like a caveman from December 2024.

I don't know if I dreamt this or if it's actually a thing but I cant find any references to it now: I saw a proposal for a new DOM API that can set innerHTML but do diffing like virtual DOM so that I can naively update an entire document but only re-painting the stuff that actually changed?

I've been a bit silent here recently mostly due to being on parental leave! But now I'm back, and with a brand new 2025 profile pic! yeah!

Coming from a TypeScript background, I think this will take a while to get used to: In OCaml, the compiler type error "bubbles" up to the top of the call stack. TypeScript does the opposite. My feeling is the latter helps me find problems faster Any thoughts or feelings on this? #OCaml #TypeScript

Bild

Recently settled for WezTerm, and happy with it, but now everything is talking about Ghostty. Must... resist.. new.. shiny tool!

I know x-mas is over, but here I am, finishing AoC in a leisurely pace :) Just completed day 8! My goal was to reach day 10 before EOY, let's see if i make it. ...I think I'm starting to get the hang of this OCaml thingie.

Finally got some free time to continue my OCaml AoC adventure 😅 At this rate I'll be happy to reach day 10 before x-mas! Day 4, Part 1 done. github.com/danielstocks... Had to reach out for Arrays instead of Lists for this one. I guess mutability has its merits sometimes.

advent-of-code/2024/ocaml/lib/day04_1.ml at main · danielstocks/advent-of-code

:santa:🎄Yeehaaaaaa. Contribute to danielstocks/advent-of-code development by creating an account on GitHub.

github.com

Unpopular opinion alert: Having worked a bit with Go and OCaml lately I've come to appreciate the std library in.... JavaScript. Array, Set, Map, String etc. It used to be the case of loading underscore/lodash (even jQuery had a map function 🥲) for basic util, but nowadays you don't need to.

People already posting solutions for OCaml AoC day 3.... I just finished day 2 part 2.. omg the pressure!!! 😂 My partner: "Are you sure this is good for you?" She has a point.

OCaml, AoC Day 2, Part 1 done. A little harder, challenged me to use some new concepts like variants & list head/tail recursion. My first solution was twice as long but thanks to pattern matching I was able to refactor it only with the help of compiler and it ran. Joy! github.com/danielstocks...

advent-of-code/2024/ocaml/lib/day02_1.ml at main · danielstocks/advent-of-code

:santa:🎄Yeehaaaaaa. Contribute to danielstocks/advent-of-code development by creating an account on GitHub.

github.com