Julian Doherty
banner
madlep.bsky.social
Julian Doherty
@madlep.bsky.social
Staff Software Engineer. #TypeScript by day. #Elixir / #Erlang / whatever by night. If it’s turing complete I can probably program it.
New Elixir 1.19 is great, but the release notes are not clear about what is actually included with the new type checker.

The prominent example under the heading “Type inference for all constructs”, *isn’t actually handled in this release at all yet*

elixir-lang.org/blog/2025/10...

#ElixirLang
October 17, 2025 at 1:44 AM
Pro level title + photo selection. This is why funding journalism matters 😆

gizmodo.com/californias-...
February 9, 2025 at 8:27 PM
9:35am. 6 character change deployed. Heaviest database query running ~800x faster. My work here is done.

Check your indexes folks.
January 6, 2025 at 10:59 PM
#AdventOfCode Day 20 in #ElixirLang. Had recursive solution that worked for part 1, and as usual, didn't scale to part 2. Rethought it, then figured just doing a scan of all positions within manhattan distance of each track position works fine. Could be more efficient, but runs fast enough.
December 23, 2024 at 1:16 AM
And #AdventOfCode day 19 in #ElixirLang was another relatively straightforward one. Recursive solution worked fine for part 1. Part 2 did the usual trick of combinatorial explosion making naive solution infeasible - which dynamic programming with memoisation makes quick work of
December 21, 2024 at 1:38 PM
#AdventOfCode day 18 in #ElixirLang was an easier change of pace from day 17. Simple shortest path algorithm. Part 2 was able to use part 1 solution, but to run multiple times to figure out how many data elements to take - which a simple binary search did the trick for.
December 21, 2024 at 12:31 PM
#AdventOfCode day 17 in #ElixirLang was a tough one. Part 1 was a fun VM exercise. Part 2... almost had me rage quitting. Sat on it for a few days, then figured out a way through. One of those annoying ones where you need to do something custom based on the puzzle data specifics, which I don't love
December 21, 2024 at 9:54 AM
#AdventOfCode Day 16 in #ElixirLang was the expected backtracking question. Part 1 was fine. Part 2 had expected twist that messed with optimisation. Separating out iteration/accumulator/config params into separate tuples definitely helped keep track of data and logic.
December 17, 2024 at 4:28 AM
#AdventOfCode Day 15 in #ElixirLang. A fiddly one, with annoying edge cases. These are starting to take a bit longer to implement now.
December 16, 2024 at 1:00 PM
#AdventOfCode day 14 in #Elixir. Part 1 was fine. Used math solution rather than brute forcing it. Part 2 ended up being an... interesting... puzzle. Ended up faking it to find the secret picture by figuring out which step had everything bunched up based on variance. Did the trick 🤷‍♂️ #ElixirLang
December 15, 2024 at 5:04 AM
#AdventOfCode day 13 in #Elixir is easy once you figure out it's actually just a solving the intersection of two linear equations rather than trying to do some combinatorial solution. Part 2 was literally just adding a constant to the equation.
December 13, 2024 at 8:04 AM
#AdventOfCode day 12 in #Elixir had a lot of logic to pack in. Nothing too complicated, just a bunch of cases to handle. Immutability, and having to cart state around with you definitely hurt conciseness on this one.
December 12, 2024 at 9:56 AM
#AdventOfCode day 11 in #Elixir was another dynamic programming puzzle. This time with exponential explosion in the amount of data for the naive approach, rather than combinations. Brute force worked for part 1, then as expected part 2 just ramped it up to be infeasible without a smarter approach
December 12, 2024 at 1:23 AM
#AdventOfCode day 10 in #Elixir was the obligatory dynamic programming puzzle. Solved it with doubled up logic for part 1 and 2. Refactored to remove duplication, but probably overcomplicated the solution. 🤷‍♂️
December 11, 2024 at 10:16 AM
#AdventOfCode day 9 in #Elixir was a slog. Tried to be clever, but ended up brute forcing it expanding out all the data. Worked in the end, but is slow.
December 10, 2024 at 11:31 AM
#AdventOfCode Day 8 in #Elixir. Getting more interesting now. Pulled out the parsing into a helper module. The logic of the main problem wasn't too bad once you go with generating all the pair combinations of each frequency.
December 8, 2024 at 7:48 AM
#AdventOfCode day 7 in #Elixir ended up being nice and compact. Had an issue where an overeager optimisation I'd put in early on was discarding away possible valid results and giving me a bad output, but fine once I debugged that.
December 7, 2024 at 6:22 AM
#AdventOfCode Day 6 in #Elixir. Actually needed to do some optimisation for part 2. It ran in ~30s on first attempt (and passed), but got it down to ~7s after realising we only have to check the path, NOT every single position in the grid. Probably room to eek more out, but ok for now.
December 6, 2024 at 6:44 AM
#AdventOfCode day 5 in #Elixir. Part 1 was straight forward. Part 2 I was thinking would need to implement some sort of topological sorting. Slept on it, and realised brute forcing it instead is fine.
December 6, 2024 at 3:00 AM
December 4, 2024 at 10:33 PM
The #TypeScript error you get when you mess up ONE thing in some 50 field type.
December 4, 2024 at 10:04 PM
#AdventOfCode day 4 in #Elixir. `for` loop generators/filters make this pretty nice to handle the various combinations that need to be checked.

Elixir doesn't have a native 2D array type for representing the grid, but nested tuples are almost the same, and still O(1) for read access
December 4, 2024 at 11:51 AM
#AdventOfCode day 3 is in #Elixir sweet spot with pattern matching on string data. Part 2 was a headache till I figured out not to split the lines, and not reset state on each line 🤦‍♂️

github.com/madlep/adven...
December 3, 2024 at 1:06 PM
#AdventOfCode starting early with the part 2 "GOTCHA!" this year on day 2.

Anyway, was fun. #Elixir solution at github.com/madlep/adven...

Probably a better way to do part 2, but it works. 🤷‍♂️
December 2, 2024 at 7:39 AM
Squeezed out a *little* extra 3% by passing the lists as plain function arguments rather than wrapping them in a tuple. There's a bit of extra work building the tuple, and then pattern matching on it again to get the values out which can be avoided.
December 2, 2024 at 4:38 AM