log(info) #1
Inaugural post of this new collection. The idea is not original: I’m stealing from the best (and please don’t expect this sort of quality and consistency from me):
Register Spill — Joy & Curiosity — Thorsten Ball, ~10 links a week with a sentence or two of opinion Simon Willison’s Weblog — linkblog plus “weeknotes” posts ongoing — Long Links — Tim Bray’s occasional long lists of worthwhile reads Michael Tsai — Apple/dev link blog, quotes plus commentary Daring Fireball — Linked List — John Gruber, the original link-plus-two-cents format Waxy.org — Andy Baio’s links rendezvous with cassidoo — Cassidy Williams, curated links in each issue The Weekly Thing — Jamie Thingelstad, weekly links and notes It’s a (probably) futile attempt to revive a moribund blog. I noticed my posting frequency declining to zero, but despite this evidence and in a surge of misplaced blogging optimism I even gave this new collection a Hugo index page and a place on the blog menu bar.
Knuth-Yao Optimization in DP
Knuth-Yao Optimization in DP. More or less an excuse to try out Typst.
open full screen ↗ Your browser can't display this PDF inline. Open it directly.
Tools Spruce up
Intro # Yes, dear readers (or reader if you look at my umami analytics, a singular which might very well be me): I let Gemini loose on my ~/src directory. Ok, that’s a clickbait headline. It wasn’t quite like that.
Here’s what really happened. I have a bunch of CLI scripts, mostly written in Go, that suffer from neglect and are in need of repairs and the usual “upgrade to latest and greatest”. I really don’t have time and patience for the silliness of doing that, so I thought that it is a good opportunity to try AI coding and a perfect way to let a LLM (in my case Gemini) show off its coding skills. I mentioned in my previous update that I’m using Antigravity, so there are no obstacles preventing me from actually executing on this idea.
Recipes
Intro # My cooking recipe collection has been with the Paprika Recipe Manager for quite some time. I’m a card-carrying member of the digital hoarder club, so the recipe collection has grown tremendously. The honest truth though is that I only cook a tiny subset of this collection on a regular basis and only seldom venture beyond that comfort zone. I’m definitely not a good cook.
Tooling update
Intro # A year has passed and I haven’t posted anything to this blog. How time flies. I realized that my tooling has changed quite a bit (at work and at home). I’m not allowed to describe the work tooling but I can definitely describe the new tooling I use at home. This post is just that. It will cover all use cases: Go, C++, Haskell, Python, math typesetting and blogging. As it turns out, I’m using the same (new) tooling for all use cases.
n-th root
Existence of n-th root.
open full screen ↗ Your browser can't display this PDF inline. Open it directly.
C++ setup
Intro # Some programming environments don’t need a blog post like this one. In such environments everything is standardized and works out of the box. There is a working package manager that everybody agrees on. There is only one tool chain, it is straightforward and comes built in with the language installation. Go is like that. The combination of Go and the Goland IDE functions neatly without any fuss, tweaking, querying stackoverflow for obscure error messages etc.
On tutoring
The current tutoring activity I’m doing is a redemption tour for me. My first attempt at tutoring was a mess. The victim was my daughter and I managed to alienate math material for her so much that she hates it to this day Sorry, baby, if you’re reading this. I’m very, very sorry 😊. . That’s heartbreaking because I achieved the opposite of what I wanted. She is in college now and cautiously and apprehensively approaching the material again (she did statistics last semester).
Tutoring setup
Occasionally I have to help some of my younger relatives that are still in school or college understand some of the material they learn. I can cover programming, math and physics. Since we’re geographically dispersed, the tutoring has to happen virtually. For a programming session this is easy. We have a shared editor and a video session going. I usually use Repl.it. For help on a paper we use Google Docs or Overleaf.
Sequences and Series
Select exercises on sequences and series.
open full screen ↗ Your browser can't display this PDF inline. Open it directly.
North Woods
North Woods by Daniel Mason NATIONAL BESTSELLER • A NEW YORK TIMES BOOK REVIEW TOP TEN BOOK OF THE YEAR A WASHINGTON POST TOP TEN BOOK OF THE YEAR • FINALIST FOR THE NATIONAL BOOK CRITICS CIRCLE AWARD AND THE MARK TWAIN AMERICAN VOICE IN LITERATURE AWARD A sweeping novel about a single house in the woods of New England, told ... I enjoyed this book a lot. The episodes are interesting, the writing is superb and it reminds me of David Mitchell’s Cloud Atlas. It has a little sad, nostalgic undertone coming from the long window of time spanning the episodes in the book. People come into the scope of the house and then disappear again. The permanence of the location is in sharp contrast to the transient existence of the house inhabitants. Some episodes end so abruptly they leave you yearning for more (probably and cleverly intentional).
James McBride
Deacon King Kong by James McBride A NEW YORK TIMES BESTSELLER and OPRAH'S BOOK CLUB PICK From author of NYT bestseller, THE HEAVEN & EARTH GROCERY STORE A NATIONAL BOOK AWARD winner & WINNER OF THE 2024 LIBRARY OF CONGRESS PRIZE FOR AMERICAN FICTION TOP TEN books of the year, NEW YORK TIMES & WASHINGTON POST 'Brilliantly imagined, ... The Heaven & Earth Grocery Store by James McBride THE RUNAWAY NEW YORK TIMES BESTSELLER A NEW YORK TIMES NOTABLE BOOK • A NEW YORK TIMES READERS PICK: 100 BEST BOOKS OF THE 21ST CENTURY WINNER OF THE 2024 LIBRARY OF CONGRESS PRIZE FOR AMERICAN FICTION FROM ONE OF TIME MAGAZINE'S 100 MOST INFLUENTIAL PEOPLE OF 2024 NAMED A BEST BOOK OF THE YEAR BY ... James McBride completely hooked me with Deacon King Kong and he did it again with The Heaven and Earth Grocery Store. His characters are so compelling, they stay with you long after you finish his books. Their stories feel like old family stories. His dialog is superb, and often very funny. And he rips out your heart with some devastatingly beautiful scenes in both books (Dodo and Monkey Pants in The Heaven and Earth Grocery Store, Sportcoat and Hettie in Deacon King Kong). Easily one of my favorite writers.
Knuth-Morris-Pratt Algorithm
In this Haskell cicada we will read the recently published Functional Pearl Knuth-Morris-Pratt illustrated. We will use the same strategy we used in understanding the cycle finding function, namely slowly deconstructing the functions and playing with them in the ghci repl (we use the Haskell setup described here).
The first function we dissect is scanl used in the paper in what looks like a convoluted way to get all possible suffixes of a string.
Two algebraic delights
Finding a correspondence between mathematical objects and algebraic expressions.
open full screen ↗ Your browser can't display this PDF inline. Open it directly.
File servers
Since the last Haskell cicada: Electromagnet Pulse was so much fun, let’s do another one from the same chapter from “Algorithm Design” by Jon Kleinberg and Éva Tardos.
Algorithm Design by Jon Kleinberg, Éva Tardos "Algorithm Design takes a fresh approach to the algorithms course, introducing algorithmic ideas through the real-world problems that motivate them. In a clear, direct style, Jon Kleinberg and Eva Tardos teach students to analyze and define problems for themselves, and from this to recognize which ... The exercise is Exercise 12 on page 323:
Electromagnetic Pulse
This Haskell cicada came about because sometimes, when I’m bored, I pick a random exercise from a random book and try to solve it. In this case the book was “Algorithm Design” by Jon Kleinberg and Éva Tardos.
Algorithm Design by Jon Kleinberg, Éva Tardos "Algorithm Design takes a fresh approach to the algorithms course, introducing algorithmic ideas through the real-world problems that motivate them. In a clear, direct style, Jon Kleinberg and Eva Tardos teach students to analyze and define problems for themselves, and from this to recognize which ... The exercise I randomly picked from the book is Exercise 8 on page 319:
LaTeX setup
Intro # As I mentioned in the Intro of the Haskell setup post, tooling changes often and becomes outdated quickly. So why write this post at all? Honestly, it is mostly for me, like much of this blog I don’t think I have (m)any readers 🙂. . My math notes are infrequent enough (my last one was six months ago) that I run the risk of forgetting the details of this Rube Goldberg machine of a workflow and then I won’t be able to maintain or fix it.
Haskell setup revisited
I said in Haskell setup that posts like these don’t age well. And sure enough, here I am with a revision. After dipping my toes in the Haskell testing waters I wanted a project scaffolding that is different from what cabal init generates:
I wanted a proper testing setup that allows me to also test module internals. I also wanted to solve having saved snippets of bindings loaded into the repl so I don’t have to repeatedly type the same expressions. After a bunch of trials and errors I settled on the project structure as seen in magicsquare. It breaks out internals into a separate module so it can be tested. It defines an Examples module that imports the other two modules and defines snippets useful in the repl. I invoke the repl like so:
Haskell setup
Intro # Posts like this one don’t age well. Tooling changes all the time. And the other thing is: I do Haskell just for fun, ie silly little exercises with only pure functions. So take this setup with a grain of salt. And if you stumbled on this from the future, there’s probably better options for you.
With these disclaimers out of the way, let’s see the setup.
Connected Magic Squares (Part 5)
Imagine a 6 by 6 grid of squares, that can either be black or white. It has to fulfill the following properties: 1. Each row and column needs to have 3 white and 3 black squares. 2. All black squares have to be orthogonally connected. Prove that such a grid cannot exist. part 1: naive brute force exhaustive search part 2: smarter exhaustive search part 3: inductive graphs part 4: connected magic squares part 5: experiments Note: in our digital representation black squares are ones and white squares are zeros.