Daniel
banner
webcloud.se
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
This Swedish TV Commercial from 1997 has been stuck in my head since childhood, it even hits harder today in the age of planned obsolescence. I still occasionally think about buying a "Hästens" bed to this day :D
www.youtube.com/watch?v=UjVA...
1997 För 15 år sen SV
YouTube video by Hästens Beds
www.youtube.com
September 8, 2025 at 6:13 AM
Remember folks: Stay calm and git commit
September 1, 2025 at 10:08 AM
Nice talk on inline-styles w/ CSS Hooks by @robinweser.com and why it might someday replace the need for Tailwind et. al :)

www.youtube.com/watch?v=6dS5...
Robin Weser - Inline Styles on Steroids
YouTube video by React Karlsruhe
www.youtube.com
August 7, 2025 at 12:48 PM
@row1.ca github.com/curvenote/ed...

This is an amazing write-up (and solution) on something that has bugged me A LOT over the years 😅

Just wondering whether the same concept could be applied to bold, italic, links etc and not just inline code blocks?
editor/packages/prosemirror-codemark at main · curvenote/editor
An interactive scientific editor built with ProseMirror, React and Redux - by Curvenote. - curvenote/editor
github.com
July 26, 2025 at 8:28 PM
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!
June 23, 2025 at 7:34 AM
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.
June 13, 2025 at 7:17 AM
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?
June 5, 2025 at 6:05 AM
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!
May 11, 2025 at 6:07 PM
Are you like me? "kind of" like lots of things about Tailwind CSS: No build step, co-locating style with markup etc, but absolutely hate the idea of having to write utility class names instead of writing actual CSS, check out css-hooks.com if you haven't already. A very novel and clever idea!
CSS Hooks
Hooks add CSS features to native inline styles, with no build steps and minimal runtime.
css-hooks.com
March 20, 2025 at 7:10 PM
Me finding some time to do OCaml during the day.
January 28, 2025 at 11:28 AM
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
January 15, 2025 at 9:57 PM
I'm done with my #AdventOfCode #OCaml adventure and very pleased with it. Goal was to finish 10 days. Going to keep reading the CS3110 (Cornell University) textbook and complete the Exercism track then wrap up with an article on my learning experience and overall impression of OCaml. Stay tuned!
Day 10 - Advent of Code 2024
adventofcode.com
January 6, 2025 at 9:11 PM
Recently settled for WezTerm, and happy with it, but now everything is talking about Ghostty. Must... resist.. new.. shiny tool!
January 5, 2025 at 3:03 PM
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.
December 30, 2024 at 2:08 PM
I wish Array.filterFlatMapWithIndex was a thing in std JavaScript.. but realised there isn't even a filterMap

ReScript gets pretty close with rescript-lang.org/docs/manual/... though!
Core.Array | ReScript API
The ReScript language and ecosystem docs
rescript-lang.org
December 28, 2024 at 8:50 PM
I just completed "Bridge Repair" - Day 7 - #OCaml Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/7

Relatively easy :) Can't think of another way than brute-forcing all permutations. Part 2 takes ~10s to run (Apple M1)

Pt1: github.com/danielstocks...

Pt2: github.com/danielstocks...
Day 7 - Advent of Code 2024
adventofcode.com
December 24, 2024 at 10:53 PM
- I'm Force, Brute Force.
- Nice to meet you Mr Force.

#aoc2024 #ocaml
December 24, 2024 at 7:49 AM
Was struggling to get part 2 run faster than ~4s on an Apple m1, spent way too much time trying to optimise it, decided ot move on haha.

I've completed "Guard Gallivant" - Day 6 - Advent of Code OCaml 2024 #AdventOfCode adventofcode.com/2024/day/6
Day 6 - Advent of Code 2024
adventofcode.com
December 24, 2024 at 6:11 AM
I just completed "Print Queue" - Day 5 - OCaml Advent of Code 2024 #OCaml #AdventOfCode adventofcode.com/2024/day/5

Slow and steady. Made use of Set and Hashtbl modules from std lib to solve this one, new skills unlocked!

Pt1: github.com/danielstocks...
Pt2: github.com/danielstocks...
Day 5 - Advent of Code 2024
adventofcode.com
December 15, 2024 at 7:55 PM
Going for some functional X-mas baking this year! #ocaml
December 14, 2024 at 3:08 PM
I just completed "Ceres Search" - Day 4 - OCaml Advent of Code 2024 #AdventOfCode adventofcode.com/2024/day/4

For loops, Arrays, If/else conditionals and mutable counters, I'm feeling I'm drifting further away from FP. Anyone else want to share their solution?

github.com/danielstocks...
Day 4 - Advent of Code 2024
adventofcode.com
December 11, 2024 at 9:07 PM
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
December 9, 2024 at 10:02 PM
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.
December 9, 2024 at 9:49 PM

Lagging a little bit behind but...!

I've completed "Mull It Over" - Day 3 - Advent of Code 2024 in OCaml #AdventOfCode adventofcode.com/2024/day/3

Nice to get to some try some regular expressions parsing in OCaml, ended up using the ocaml-re package for that.

Part 2: github.com/danielstocks...
Day 3 - Advent of Code 2024
adventofcode.com
December 4, 2024 at 10:14 AM