code • words • emotions

Daniel Janus’s blog

Lossy CSS compression for fun and loss (or profit)

26 January 2024


Late last year, I had an idea that’s been steadily brewing in my head. I’ve found myself with some free time recently (it coincided with vacation, go figure), and I’ve hacked together some proof-of-concept code. Whether or not it is actually proving the concept I’m not sure, but the results are somewhat interesting, and I believe the idea is novel (I haven’t found any other implementation in the wild). So it’s at least worthy of a blog post.

Continue reading

My mental model of transducers

9 September 2023


I’ve been programming in Clojure for a long time, but I haven’t been using transducers much. I learned to mechanically transform (into [] (map f coll)) to (into [] (map f) coll) for a slight performance gain, but not much beyond that. Recently, however, I’ve found myself refactoring transducers-based code at work, which prompted me to get back to speed.

Continue reading

A visual tree iterator in Rust

20 July 2023

My adventure with learning Rust continues. As a quick recap from the previous post, I’m writing a tree viewer. I have now completed another major milestone, which is to rewrite the tree-printing function to use an iterator. (Rationale: it makes the code more reusable – I can, for instance, easily implement a tree-drawing view for Cursive with it.)

Continue reading

Learning to learn Rust

6 July 2023

I’m enjoying a two-month sabbatical this summer. It’s been great so far! I’ve used almost half of the time to cycle through the entire Great Britain and let my body work physically and my mind rest (usually, the opposite is true). And now that I’m back, I’ve switched focus to a few personal projects that I have really wanted to work on for a while but never found time.

Continue reading

Dutch Clojure Days 2022

7 November 2022

It’s a tradition of this blog that I write down impressions on my way back from Amsterdam conferences (addendum a week later: unfortunately I took a flight this time, too short to complete this entry, and it had to wait until I caught up). This time, it was Dutch Clojure Days 2022, my first post-COVID full-size conference and the first DCD I’ve ever been to. And, hopefully, not last. I know I want to come back.

Continue reading

How to pay for books

24 September 2022

This post was originally published in Polish. This translation has been slightly edited to explain some details that are likely to be obscure for people outside Poland.

Fortuna imperatrix mundi

I wouldn’t make a good emperor of the universe.

Continue reading

I love my GPD Micro PC

18 August 2022

I bought two computers this year: a beefy Macbook Pro with M1 Pro and a GPD Micro PC.

The MBP is meant to be my mobile workstation, to satisfy all my needs whenever I need to work outside of my home office (at home, I’m still mostly using a two-year-old Intel-based Mac Mini). The GPD was a caprice. Perhaps I’m at the stage in life when well-off men buy themselves Ferraris to fend off a mid-life crisis; or perhaps I just have a separate heart for small computers.

Continue reading

Testing a compiler that can’t even print stuff out

25 September 2021

I’m enjoying a week-long vacation. In addition to other vacationy things (a trip to Prague, yay!), I wanted to do some off-work programming Just For Fun™ and revisit one of my dormant pet projects, to see if I can make some progress.

Continue reading

Things I wish Git had: Commit groups

1 July 2021


Everyone 1 and their dog 2 loves Git. I know I do. It works, it’s efficient, it has a brilliant data model, and it sports every feature under the sun. In 13 years of using it, I’ve never found myself needing a feature it didn’t have. Until recently.

Continue reading

I made a website to guess tomorrow’s number of COVID-19 cases, and here’s what happened

8 November 2020


It seems so obvious in hindsight. Here in Poland, people have been guessing it ever since the pandemic breakout: in private conversations, in random threads on social media, in comments under governmental information outlets. It seemed a matter of time before someone came up with something like this. In fact, on one Sunday evening in October, I found myself flabbergasted that apparently no one yet has.

Continue reading