Pour kettle and let steep the gods of tea. I built NewsBlur and Turn Touch.
1312 stories
·
875 followers

D Combinatorics

1 Comment and 2 Shares
Look, you can't complain about this after giving us so many scenarios involving N locked chests and M unlabeled keys.
Read the whole story
samuel
22 days ago
reply
Lol
Cambridge, Massachusetts
agwego
21 days ago
C&O Nerds
Share this story
Delete

Is async Django ready for prime time?

1 Comment

Is async Django ready for prime time?

Jonathan Adly reports on his experience using Django to build ColiVara, a hosted RAG API that uses ColQwen2 visual embeddings, inspired by the ColPali paper.

In a breach of Betteridge's law of headlines the answer to the question by this headline is “yes”.

We believe async Django is ready for production. In theory, there should be no performance loss when using async Django instead of FastAPI for the same tasks.

The ColiVara application is itself open source, and you can see how it makes use of Django’s relatively new asynchronous ORM features in the api/views.py module.

I also picked up a useful trick from their Dockerfile: if you want uv in a container you can install it with this one-liner:

COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv

Via Hacker News

Tags: embeddings, asynchronous, django, uv, rag, python

Read the whole story
samuel
26 days ago
reply
Good hint on getting `uv` into a Dockerfile
Cambridge, Massachusetts
Share this story
Delete

★ How It Went

2 Comments

My mom died at the end of June this year.

I know, and I’m sorry — that’s a hell of a way to open a piece ostensibly about a depressing, worrisome, frightening election result. But here’s the thing I want to emphasize right up front: my mom’s death was OK. It really was. She was 78, which isn’t that old, but her health had not been great. She was hospitalized for several days in May, just a month prior, after she had collapsed at home, too weak to stand, and for days it wasn’t clear what was wrong. Then some more test results came back and we had the answer. She had ovarian cancer, bad. It had already metastasized. The prognosis was grim: months to live, at best. And those months, toward the end, would inexorably grow ever more painful and profoundly sad.

Her mental acuity had begun to slip in recent years, too. Not a lot, but if you knew her you’d notice. But she faced this prognosis with remarkable dignity, courage, and clarity. She knew the score. It was what it was, and she’d make the best of the time she had left. She was tired but still felt pretty good most days. There were flashes of her younger self, the Mom I remember growing up with. It was wonderful to see those flashes. The bad times were coming, but they lay ahead. On the last Monday night in June she and my dad went out to eat at their favorite restaurant. They had a good meal and a good time. It was a great day. Tuesday morning she played Wordle and reported her score to our family group chat. Then around noon, she just fell over, dead. My dad found her unresponsive, called 911, and they arrived in minutes, but she was gone. No suffering. The whole dreadful grind of battling cancer never came. It’s such a cliché but clichés are often true: given what she faced, it was a blessing she died how and when she did. She never wanted to suffer and she didn’t. I loved her and I miss her.

Like I said, it was all OK, in the end — the way and how and when my mom died.

But my dad. My dad is 86, in exceptional good health, and he remains sharp. Until recently he not only played golf but walked the course, carrying his own clubs. He stopped playing golf last year, because — and I realized this only after my mom was hospitalized in May — he’d more and more been shouldering all of the responsibilities of daily life for the both of them. Even just nine holes of golf takes a few hours, and he didn’t want to leave her alone for that long a stretch of time, so he stopped playing. He still walks a mile or more a day, weather permitting. They were married 52 years and spent only a handful of nights apart in that entire span. They were in some ways an opposites-attract couple, but they were inseparable. They were good together. After accepting her cancer diagnosis, my mom was ready, I think, even for something as sudden as what happened to her at the end. My dad was not.

But he’s an optimist at heart. You’d like him. I, of course, don’t know who you are, dear reader, but I know you’d like my dad, Bob Gruber, because everyone likes Bob Gruber. He can tell a good joke and he loves to tell them. There’s a quote attributed to Abraham Lincoln, that I was reminded of, just the other day, from of all things a garbage can: “I don’t like that man. I must get to know him better.” I don’t share Lincoln’s there’s-something-to-like-about-everyone optimism about our fellow men, but my dad does.

He’s been doing good, I think, these months since her passing. I talk to him almost every day. He’s naturally outgoing and still goes out. He’s got friends — which fact alone can be rare for an 86-year-old — and he sees them regularly. He attends mass frequently and takes tremendous solace in his faith. He misses my mom, his wife, desperately, but he puts on a good face. He gets sad and he admits he gets sad. But the very last thing he wants is for anyone, especially me or my sister, to worry about or even feel sorry for him. I’m like that. I get it. You often hear about old men who just shut down and fade away, rather quickly, after their wives die. My dad’s not shutting down.

I thought of my dad this week when I watched Harrison Ford’s gravelly endorsement of Kamala Harris, which he began thus: “Look, I’ve been voting for 64 years. Never really wanted to talk about it very much.” My dad’s politics are like that. His religion is too. Strong beliefs that he doesn’t feel the need to broadcast or proselytize — and deep suspicion, bordering on contempt, regarding those who do. My dad is old and white and lives in a suburb in a red Pennsylvania county, but he is a lifelong Democrat. He can’t abide Fox News and never understood his age-group peers who succumbed to Rush Limbaugh’s daily siren call. His entire life he’s seen the Democrats as the party of and for the people. The party for working men and women. The party of equality and justice and minding your own goddamn business what people do in their private lives. He votes every election, even the odd years, when the only office on the ballot might be the borough tax collector or members of the school board. He rightly sees voting as a citizen’s civic duty. My dad is the most honest and trustworthy person I’ve ever known, or even imagined. If they ever somehow met, my dad and Joe Biden would become fast friends. They share a worldview, and grew up at the same time, in similar places, from similar means. They even both love trains. (My dad, though, thought Biden was too old to run again. “I know that walk,” he told me early this year, regarding Biden’s stiffening gait. He thought it was good and noble, but also obvious, when Biden dropped out.) He despises Donald Trump and sees right through him.

So, when my dad called me Tuesday morning, I thought it would be the election on his mind. It was all that was on my mind, that’s for sure. He had, in fact, just come back from voting, but it was something else. His voice was chipper, upbeat, but I could tell it wasn’t a good story. I know him too well.

Turns out, he had gone out to eat, by himself, Monday evening. In fact, at the very same restaurant where he and my mom ate their last meal together. He ate, drove home, and once home went to wash his hands before going to bed. That’s when he noticed his wedding band was missing from his finger.

It was lost.

He looked around to no avail, and went to bed without it. In the morning light, he retraced his steps. He felt certain he had it on while at the restaurant — not because he took any note of it while dining, but because he knows he’d have noticed its absence. If you wear a ring every day on the same finger, you know how true that is. He almost never took that ring off.

At some point when I was a little kid, my dad told me he had never once removed his ring since my mom put it on his finger at their wedding, the year before I was born. My mom, I knew, took hers on and off all the time. In fact she often wore other rings in place of her actual wedding band, because she found them more comfortable, and she placed little sentimental value on the ring from her actual ceremony. I asked my dad that day about his, and he told me he simply had never taken it off. I found that to be amazing. From my childhood perspective, he’d worn that ring nonstop for a lifetime. He broke that streak eventually, for some small reason, and it wasn’t a big deal to him, the never-having-taken-it-off thing. But I knew from that time I asked him about it as a child, that the ring itself was deeply important to him, in a way that my mom didn’t feel about hers. Some people imbue meaning and sentimental importance to certain objects. My dad saw his wedding ring like that. It was a sacred token. And now he’d lost it.

Through my youth — his 30s and 40s and early 50s — my dad always looked how I’d describe as “of average build”. Neither thin nor heavy. Strong but not muscled. He looked like the sort of man who in his youth played third base, and batted near the top of the order, which he did. A former athlete who could still hit the living shit out of a golf ball. In his middle age, he gained a bit of a paunch. (It happens, I now know.) But in the last few years he’s lost quite a bit of weight. He’s downright bony now, in an old man way. His old pants (and nearly all his pants are old — he’s 86) need to be cinched with a belt or they’d fall right off him. His fingers too, have gotten bony. So his ring had gotten loose. He’d offhandedly mentioned that fact to me a few months ago even, telling me he needed to be careful whenever his hands might get wet.

After waking Tuesday morning, he searched everywhere he could think it might be. The kitchen. The bathroom. The shower. The sink. The other sink. He took the couch cushions off. He looked in his car. He went back in the house and searched everywhere all over again. He took a break to vote, came home, and went back out and searched the car again, this time with a flashlight. To no avail. It’s a sick feeling after you’ve lost something of value, when you start losing count of how many times you’ve looked for it in the exact same places you’ve already checked. You can’t stop looking, but can’t think of new places to search.

He called the restaurant, but they weren’t yet open, so he left a message, leaving his name and number in case anyone had found a simple well-worn gold wedding band — and if no one had, well, maybe could they keep an eye out for it. He called me after he left that message. He wasn’t forlorn. He laughed even. That’s how he is. That’s how I am. That’s how we are. I’m his boy, as he still sometimes reminds me. But I know what that ring meant to him.

And my mom had just died so recently. It has only been a few months. The seasons have only changed once since we buried her.

Fuck.

It was a bad start to a day that I began, like any keen political junkie, with a nervous feeling. I’m not superstitious but a bad omen is a bad omen. You want every little thing to break right on a high-stress big day, and Election Day, for us, had begun with a small heartbreak. I told my wife about my dad’s ring and she almost burst into tears. She loves him so much. “He just lost your mom”, she said.


You know how the rest of Election Day went. My wife and I voted. We both like the ceremony of voting in-person on Election Day. It helps that we live in a neighborhood with a vibrant civil infrastructure, with no-wait polling places no more than a block or two away from any residence. We were both feeling good.

But then what? I was reminded, once again, that I never know what to do with myself on Election Day in a presidential election. No information or results can be gleaned until polling places start closing in early states at 7pm ET. What do you do until then? It seemed pointless for me to write anything further about the election, but equally futile to think I could concentrate on anything else. Expounding upon Kottke’s treatise on the art of hypertext writing was a good distraction. I got to write about something I care about, and because the inspiration was the NYT editorial board’s receipts-packed 110-word admonition to end the Trump era, my effort felt at least tangentially related to the election that was then (and alas, remains now) front of mind for me. I could focus on that, and I didn’t finish it until just before 7:00pm. Perfect.

That’s Kornacki time. Steve Kornacki’s data-driven, map-based analysis has been the heart and soul of MSNBC’s presidential election night coverage for all three Trump elections: 2016, 2020, and now 2024. I honestly don’t remember how I watched election results before Kornacki. I know I’ve been watching election night results on TV since at least 1992. As best I can recall, before 2016, I’d flip around between CNN, MSNBC, and the broadcast networks. I basically just “watched the news on TV”, not on any particular channel. But starting in 2016, we just watch Kornacki. We put on MSNBC and we don’t flip. The desk chatter amongst commentators and panelists that consumes the time between Kornacki updates is background noise. But what Kornacki does is genius. Maybe the other networks have caught up and do something similar now. I don’t know, because I no longer flip.

The way it works is that every news operation has a “decision desk”. The decision desk staffers are off-screen analysts, not on-air talent. They call state-by-state results only with absolute certainty. That absolute certainty can and usually does come before every single vote in a state has been counted, but comes after the likely winner is ascertainable beyond a reasonable doubt. The decision desks make their calls not when the writing appears on the wall, but when the paint has started to dry.

They weren’t always so fastidious, because nerve-rackingly close results in American presidential elections used to be the exception, not the norm. But after the contentious and almost impossibly close election of 2000, when, on election night, multiple networks — including Fox News — had projected Al Gore the winner early in the evening, based on exit polls rather than tabulated votes, every such major decision desk has become quite rigorous about this, regardless of the political bent of the network or publication. Rigorous to the point of almost entirely avoiding controversy. We can see that even now, on Friday 8 November, as I write this. At the moment, none of the major decision desks have yet called Arizona or Nevada, despite it being a near-certainty Trump won both. The only exception I can recall was four years ago, when Fox News called Arizona for Biden at midnight and the AP followed a few hours later. Biden did in fact win Arizona, but when Fox and the AP called it for him, with 80 percent of the state’s ballots counted, Biden was ahead by a seemingly comfortable 9 percent. By the time all ballots had been counted, days later, the margin had closed to a whisker-thin 0.3 percent. They were correct, but by their own standards of rigor were mistaken to call it when they did. It’s an interesting sign of how independent the Fox News decision desk is, though, that when they got reckless, it was in Biden’s direction.

What Steve Kornacki does at MSNBC is make de facto calls without making actual calls. Or better put, he presents real-time data and context that allows you, the attentive viewer, to start making calls long before the decision desks reach their standards of absolute certainty. “You don’t need a weatherman to know which way the wind blows” goes the Bob Dylan line. Steve Kornacki isn’t the weatherman. He’s our finger in the air.

What he does is find telltale counties in important states. A suburb of Atlanta. A suburb of Charlotte. A suburb of Philadelphia. With, say, half the vote counted, he might show that Harris is winning 75-25 in that county. That’s a solidly blue county. A 50-point margin is, you know, good. But then comes the context. That same county, let’s say, went 80-20 for Biden in 2020, and went 75-25 for Hillary Clinton in 2016. Now that 75-25 margin for Harris doesn’t look good. It looks like 2016, not like 2020. Or go the other way. Kornacki finds small rural counties of note. Some red county Trump was certain to win, but which he was winning this year by margins that looked like those in 2016, not 2020.

It’s quite remarkable, Kornacki’s gift. He presents the story, the explanation of how the election results are going, without ever saying what exactly it is he is explaining. He shows you just the right trees to give you a sense of the entire forest. He never says “It looks like Trump is going to win North Carolina.” He simply presents facts, cold hard facts, that, if you consider them, explain why it looks like Trump is going to win North Carolina. They are conclusions left for you, the viewer, to draw. It’s incredibly disciplined. But he never ever gets ahead of the actual NBC News decision desk. He doesn’t have to. The way he does what he does, he can’t be wrong. If Kornacki paints a picture of live data and historical results that indicate that Trump is heading toward a win in, say, Georgia, hours before any official decision desk call is made, that’s because the data available up to that point just factually shows that Trump is on a path to win Georgia. And if something were to happen with the remaining votes that change that path, he’ll simply present that new data as it comes in, later in the evening.

Closely watching Kornacki didn’t mean I knew Trump was going to win early in the evening. But it meant I knew it sure looked like he was going to. I was concerned when Florida’s results came in, shortly after their polls closed at 8pm. (Say what you will about their debacle in 2000, but in the aftermath, Florida got its shit together and now tabulates the entirety of their statewide vote with remarkable alacrity and promptness.) I of course had no expectation that Harris might win Florida, but she lost by 13 points. Trump only won Florida four years ago by 3 points. That swing alone was an ominous early sign of the nationwide trend. That’s when the pit formed in my stomach. Uh-oh.

I don’t flip channels but I do of course watch with my phone in hand. The New York Times’s infamous “needle” lurched sickeningly rightward early. I stopped looking at it, but not because I thought it was mistaken. Because I knew it was probably correct. By 10pm or so, it seemed obvious that Harris’s only plausible path to victory was for three states — Pennsylvania, Michigan, and Wisconsin — to buck the nationwide trend of red counties getting redder, and blue counties getting slightly less blue. There was reason for hope, but not much. It was like “Tom Brady could lead the Patriots to a comeback in the Super Bowl even though they’re down 28-3 in the third quarter” hope. That happened, but that’s not how 28-3 football games tend to go. That’s not how elections tend to go. And it’s not how this one went. At 11:20pm, my friend Taegan Goddard wrote this lede in a post at Political Wire: “Donald Trump is now very likely to win re-election. He has the edge in Pennsylvania, Michigan and Wisconsin — all states Kamala Harris needs to win.” I wasn’t yet at the point where I’d have put that into such stark words, but I knew they were true. So it goes.

I watched MSNBC for another hour, but only with resignation, not hope. I watched a Harris spokesman take the podium at her stage at Howard University and tell the nation she wouldn’t be speaking until Wednesday — just like 2016. I posted one brief item here, commenting only, “Strong déjà vu as acceptance sets in.”


I woke early on Wednesday, at least by my night owl standards. A gut punch is not a sleep aid. My dad called, just after 9:30am. He seldom calls that early, knowing my sleep habits. I hadn’t stopped feeling heartsick about his ring. His voice though, was excited. He’d gone to mass that morning, driven home, and parked in front of his house. (Still hard for me not to call it their house.) Same exact spot where he’d parked the night he lost the ring. It’s a one-way street, and in front of his house, cars park on the left. He opened the car door and thought to look down, just in case. There it was. His ring. In the street, between his car and the curb, nestled amidst some dry leaves. It must have fallen off his finger as he was opening the car door that night, and the leaves perhaps deadened any clink it might have made hitting the ground. If that parking spot hadn’t been open again, he wouldn’t have found it then and there. If had rained, it would have washed away.

He said, “John, when I picked that ring up, I kissed it. 52 years I’ve had this ring on my finger. I thanked St. Anthony, and I thanked your mother. I think she found it for me.”

Given the circumstances when I went to bed Tuesday night, it was no surprise I was welling up with tears come the morning. But I’d never have expected they’d be tears of joy, with a sense of hope — however diminished — and abiding love in my heart.

Read the whole story
samuel
41 days ago
reply
Gruber at his best, save for all the subtleties of watching TV
Cambridge, Massachusetts
deezil
42 days ago
reply
Someone's cutting onions and it's dusty all the sudden.
Shelbyville, Kentucky
Share this story
Delete

Donald Trump Isn’t the Only Chaos Agent

1 Share
He’s not even the biggest one. Monumental change will instead come from tech—from AI.
Read the whole story
samuel
42 days ago
reply
Cambridge, Massachusetts
Share this story
Delete

I am *very* excited about this: Christian Marclay’s The Clock is going...

1 Comment
I am *very* excited about this: Christian Marclay’s The Clock is going back on display at MoMA. Member previews: Nov 7–9, Nov 10, 2024 through Spring 2025. “The work is both a cinematic tour-de-force and a functioning timepiece.”

💬 Join the discussion on kottke.org

Read the whole story
samuel
46 days ago
reply
Looks intense, a 24 hour viewing party that starts (and ends) at 7pm
Cambridge, Massachusetts
Share this story
Delete

Iceland embraced a shorter work week. Here’s how it turned out. “Iceland’s...

1 Comment
Iceland embraced a shorter work week. Here’s how it turned out. “Iceland’s economy is outperforming most European peers after the nationwide introduction of a shorter working week with no loss in pay, according to research released Friday.”

💬 Join the discussion on kottke.org

Read the whole story
samuel
49 days ago
reply
How was it released Friday if nobody's working that day?
Cambridge, Massachusetts
Share this story
Delete
Next Page of Stories