HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
simonw
til
HTML2020–2025
simonw / til

til

Today I Learned

9Distinct people
19Mentions
0Explicit recommenders
1.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Today I Learned

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year19 dated mentions

Observed mentions: 2020-04-19 21:59:08 UTC to 2025-10-03 16:24:10 UTC.

0369122020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 11 mentions; 4 submissions, 7 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC1147
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC211

What Hacker News says

19 sources
Often you can use joins to get the data in a single complex SQL query. Number of comments for a post is relatively straight-forward, but you can also do increasingly complex associated data fetches with modern databases. In particular, JSON aggregations mean you can have a single query that does things like fetch a blog entry and the earliest 10 comments in a single go. I wrote up some patterns for doing that in SQLite and PostgreSQL here: https://github.com/simonw/til/blob/main/sqlite/related-rows-... Here's an example PostgreSQL query that does this to fetch tags for posts: https://simonwillison.net/dashboard/json-agg-example select blog_entry.id, title, slug, created, coalesce(json_agg(json_build_object(blog_tag.id, blog_tag.tag)) filter ( where blog_tag.tag is not null ), json_build_array()) as
Read the rest
tags from blog_entry left join blog_entry_tags on blog_entry.id = blog_entry_tags.entry_id left join blog_tag on blog_entry_tags.tag_id = blog_tag.id group by blog_entry.id order by blog_entry.id desc The alternative, more common path is the pattern that Django calls "prefetch_related". Effectively looks like this: select id, title, created from posts order by created desc limit 20 -- Now extract the id values from that and run: select blog_entry.id, blog_tag.tag from blog_entry join blog_entry_tags on blog_entry.id = blog_entry_tags.entry_id join blog_tag on blog_entry_tags.tag_id = blog_tag.id where blog_entry.id in (?, ?, ?, ...) -- Now you can re-assemble the list of tags for -- each entry in your application logic Once you have a list of e.g. 20 IDs you can run a bunch of cheap additional queries to fetch extra data about all 20 of those items.
In Litestream v0.5.0
I got the llama 65B model working on my M1 MacBook Pro, although not alpaca on top of it yet. The models are VERY slow unless you have enough RAM to fit them in. The 65B one is basically unusable with my 16GB of RAM (it produced about 8 words in 45 minutes). However, the 13B one works at a reasonable speed and the 7B is fast. Note that the 65B model requires around 300GB of free disk space to prepare. I followed the instructions here: https://github.com/simonw/til/blob/main/llms/llama-7b-m2.md
In Show HN: ChatLLaMA – A ChatGPT style chatbot for Facebook's LLaMA
One big advantage is in publishing data online: that as one of Datasette's key original features, and it's something I use constantly: datasette publish vercel til.db --app simon-tils It can deploy databases directly to Cloud Run, Heroku, Fly and Vercel. It can cost pennies per month depending on database size and traffic. My https://til.simonwillison.net site (and many other sites I run) is deployed like that, using GitHub Actions: https://github.com/simonw/til/blob/81fdedb8e9b047cb059ef22c6... See also the baked data pattern where I talk about this kind of deployment in a lot of detail: https://simonwillison.net/2021/Jul/28/baked-data/ For ad-hoc data analysis - assuming you already know your way around PostgreSQL - your pgAdmin in Docker solution is hard to beat. How often do you create a new database? My favourite thing about wor
Read the rest
king with SQLite is that the overhead of new database creation is equivalent to the overhead of creating a file. In a given day I might casually create dozens of new databases, then throw away most of them. I never found myself doing that with MySQL or PostgreSQL.
In Datasette is my data hammer
I suggest having both. My TILs site runs uses a GitHub repository where the notes live in markdown: https://github.com/simonw/til Plus a build script running in a GitHub actions workflow that compiles the notes into a SQLite file using my markdown-to-sqlite tool and publishes the resulting SQLite file using Datasette to https://til.simonwillison.net - which gives me search and an Atom feed and suchlike. The site has custom templates so it Durant look like regular Datasette, but you can run custom queries against it at https://til.simonwillison.net/tils
In Using sqlite3 as a notekeeping document graph
I've been using my Datasette tool, originally intended for exploring databases, to build full-blown websites and it's working surprisingly well. It supports Jinja templates and runs on SQLite databases so it's actually a good fit for semi-static sites. Here's what Datasette looks like by default: - https://latest.datasette.io And here are three websites that are actually just Datasette with some custom templates and plugins: - https://datasette.io (data: https://datasette.io/content code: https://github.com/simonw/datasette.io ) - https://til.simonwillison.net (data: https://til.simonwillison.net/tils code: https://github.com/simonw/til ) - https://www.niche-museums.com (data: https://www.niche-museums.com/browse code: https://github.com/simonw/museums ) They're all hosted on either Vercel or Google Cloud Run at the cost of no more than a
Read the rest
few dollars a month.
In Ask HN: What novel tools are you using to write web sites/apps?
I've been experimenting with SQLite FTS as a way of adding search to an otherwise static site. The big advantage of SQLite FTS is that it's really cheap to run. The index is a single static file on disk, then you add a Python process (I'm using https://github.com/simonw/datasette ) to run queries against it. Much less resource intensive than running Solr or Elasticsearch. It also works surprisingly well - I've run FTS queries against tables that are up to around 10GB on disk and performance is great. It's no way near as featureful as Lucene, but for small to medium sized projects it's easily good enough. As for deployment: if the SQLite .db index file is small enough you can bundle it up as part of a static deployment, e.g. bundled in a Docker container. I've done this using Heroku, Google Cloud Run, https://fly.io/ and Zeit Now (aka Verc
Read the rest
el). If the content lives in a git repository you can hook up CI (or a GitHub Action) to build and publish a new copy of the SQLite index on every change. I've started thinking of this pattern as a kind of static-dynamic site: there's dynamic server-side code but it's running in read-only containers, so you can scale it up by running more copies and if anything goes wrong you just restart the container. https://til.simonwillison.net/ is my most recent site to use this pattern, see https://github.com/simonw/til for how it works. I also wrote this tutorial describing the pattern a while ago: https://24ways.org/2018/fast-autocomplete-search-for-your-we...
In Static Sites with Elasticsearch

Showing the 15 most recent of 19 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.