Simon Willison's collection of short 'Today I Learned' notes on programming tools, SQLite, Python, and working with LLMs.
HN commenters call it an extremely useful set of small learnings, though one suggests grouping entries by topic to make browsing easier.
I see some of the same problems in Django; it's so productive at first, the ecosystem is great, DevX is delightful, and when your app is simple enough that a layered architecture feels like way too much boilerplate, you can just write amazing simple code. A great example is Simon Wilson's recent post https://til.simonwillison.net/django/building-a-blog-in-django - the views.py is :chefs-kiss:.
However when you get to multiple teams and multiple 100s of kloc, the architectural demands start to get stronger, and Django can become a bit hard to work with. If you have a shallow wide domain, then it's not really a problem; just stick to fat models with controllers, and everything is OK, you just add more models. But when your domain is deep, with layers of concepts, and lots of interaction between different subsets of models, you start to want to pull out an Application Layer to wrap your Domain Layer.
Tactically it also starts to be really hard to guarantee you're not doing O(N) queries, and I've found django-seal to be a great solution (seal a QuerySet after fetching so you can't accidentally do follow-up queries, forcing you to build everything into a single query with select_related/prefetch_related). However when you look at how complex the implementation of the *_related caching is, you start to wonder if a simpler, more flexible ORM like SQLAlchemy would serve you better.
I think "how many loc is your app" would be a helpful qualifier for these discussions, as I suspect…
It is quite unstable and frequently generates incorrect results. E.g., with the Fibonacci sequence prompt, sometimes it skips a number entirely, sometimes it produces a number that is off-by-one but then gets the following number(s) correct.
I wonder how much of this is because the model has memorized the Fibonacci sequence. It is possible to have it just return the sequence in a single call, but that isn't really the point here. Instead this is more an exploration of how to agent-ify the model in the spirit of [1][2] via prompts that generate other prompts.
This reminds me a bit of how a CPU works, i.e., as a dumb loop that fetches and executes the next instruction, whatever it may be. Well in this case our "agent" is just a dumb python loop that fetches the next prompt (which is generated by the current prompt) whatever it may be... until it arrives at a prompt that doesn't lead to another prompt.
[1] A simple Python implementation of the ReAct pattern for LLMs. Simon Willison. https://til.simonwillison.net/llms/python-react-pattern
[2] ReAct: Synergizing Reasoning and Acting in Language Models. Shunyu Yao et al. https://react-lm.github.io/
I'm following the instructions on the post from the original owner of the repository involved here. It's at https://til.simonwillison.net/llms/llama-7b-m2 and it is much simpler. (no affiliation with author)
I'm currently running the 65B model just fine. It is a rather surreal experience, a ghost in my shell indeed.
As an aside, I'm seeing an interesting behaviour on the `-t` threads flag. I originally expected that this was similar to `make -j` flag where it controls the number of parallel threads but the total computation done would be the same. What I'm seeing is that this seems to change the fidelity of the output. At `-t 8` it has the fastest output presumably since that is the number of performance cores my M2 Max has. But up to `-t 12` the output fidelity increases, even though the output drastically slows down. I have 8 perf and 4 efficiency cores, so that makes superficial sense. At `-t 13` onwards, the performance exponentially decreases to the point that I effectively no longer have output.
This is a cool idea. I also really like simonw’s TIL feed:
https://til.simonwillison.net/
Like a microblog of little learnings in day-to-day development.
One interesting thing that occurred to me recently is that my personal site (https://amontalenti.com) is more an essay archive and identity verification tool, than it is a “blog” or “microblog.” That is, the timestamps of the content on there are the least interesting thing about it. The most valuable page, for me, is https://amontalenti.com/archive.
As for something like /now, the most fascinating implementation of this is an old friend of mine from college. He and I were both early 2000s bloggers, but he came up with the idea, in 2001 or so, to keep a nearly-daily one sentence personal diary on his blog. He kept that up for the last 20+ years (he is nowadays a CS researcher and inventor in HCI). Very impressive near-daily microblogging habit over a lifetime!
https://www.chrisharrison.net/index.php/Home/Log
Link to actual TILs: https://til.simonwillison.net/
In case the author reads this, what might be useful is to group them by some topic. A framework is only interesting if I also use it, and as it is, I'm not into front-end dev so none of the frameworks are interesting to me, but I have to read the 41 categories individually because they're spread throughout. Same for Mac stuff (I have no mac, so I don't use homebrew), database engines, python: they're all over the place.
---
This one sounded interesting: "Search across all loaded resources in Firefox" but unfortunately it's just about the debugger (the debugger also gives you that help right when you open it). What I'd love to know is how to ctrl+f across all tabs' page contents, or even just a stable search field that doesn't change every time I switch tab (so I can just Ctrl+Tab,F3 across them).
Well, sometimes I'm digging through my (multiple!) lists of links when I remember a tidbit that relates to what I'm working on but most of the time those lists gather dust.
In the future I'd like to maintain a link log or something similar on my personal website like some people do:
- https://matklad.github.io/links.html
- https://dotat.at/:/
- https://til.simonwillison.net/
The weird thing about saved links in my case is that I get the most satisfaction out of them when I share them with friends and so on, a bit of "Hey! I think this might be helpful, here you go" and that ends up being the extent of that particular link's usefulness for myself most of the time. Of course I can't accurately gauge how helpful it actually is for the other person.