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 💩
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
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?
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
youtube.com
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
youtube.com
@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
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!
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.
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!
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
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
@sabine.sh I'm causing trouble again: github.com/ocaml/ocaml....
Remove section about installing and using "tree" tool from get started tutorial by danielstocks · Pull Request #2909 · ocaml/ocaml.org
Hello! I recently ran through the get started and language guides on ocaml.org as a total beginner and they're very good, so thank you for that! I have a small suggestion for an improvement: Wh...
github.com
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
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.
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
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
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
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
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
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.
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
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