Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
davepeck
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
31.
▲
by
davepeck
1y ago
Baseten serves models as a service, at scale. There’s quite a lot of interesting engineering both for inference and infrastructure perf. This is a pretty good deep dive into the tricks they employ: https://www.baseten.co/res
32.
▲
by
davepeck
1y ago
Yeah. It does feel like we're marching toward a day when "software on tap" is a practical or even mundane fact of life. But, despite the utility of today's frontier models, it also feels to me like we're very far
33.
▲
by
davepeck
1y ago
Sam Altman, in the summer update video: > "[GPT-5] can write an entire computer program from scratch, to help you with whatever you'd like. And we think this idea of software on demand is going to be one of the defining charact
34.
▲
by
davepeck
1y ago
I think Litestar is superb for building API backends. Love it; use it; only good things to say. Their Advanced Alchemy is coming along nicely, too. Litestar of course supports old-school server-template-rendered sites, too; it even has a
35.
▲
Bassoon Tracker
(stef.be)
3 points
by
davepeck
1y ago
|
0 comments
36.
▲
by
davepeck
1y ago
> What can be padded is quite inconsistent. Yes, I agree. “What works” is type dependent and Python’s builtin types don’t always behave the same way. I know you know this, but for those who may not have run across it before and are curio
37.
▲
by
davepeck
1y ago
Hah! T-strings use the exact same syntax as f‑strings, but their “format spec” (the part after the optional :, like .2f) can effectively be anything. That might make creating a quiz tricky? With f‑strings, Python immediately calls format()
38.
▲
by
davepeck
1y ago
> But in a real production environment, for real applications, you still want to avoid it because it isn't particularly easy to create robust systems for industrial use. This is silly and seems to discount the massive Python codebas
39.
▲
Adventures in Data Corruption
(oxide-and-friends.transistor.fm)
2 points
by
davepeck
1y ago
|
0 comments
40.
▲
Happy 20th Birthday, Django
(djangoproject.com)
578 points
by
davepeck
1y ago
|
185 comments
41.
▲
by
davepeck
1y ago
yes, although it's sort of the same as Context-Free-Typing-sitter
42.
▲
by
davepeck
1y ago
No, I didn't know about it -- thank you! (EDIT: and the landscape page has lots of libraries I hadn't run across before. Neat.)
43.
▲
by
davepeck
1y ago
In theory, I love the local-first mode of building. It aligns well with “small tech” philosophy where privacy and data ownership are fundamental. In practice, it’s hard! You’re effectively responsible for building a sync engine, handling co
44.
▲
by
davepeck
1y ago
We're at 14+ hours now (06:17 UTC start; 20:52 UTC most recent update as of this writing). The post-mortem for this is going to be quite a read. Hugops to all involved.
45.
▲
The Gap Through Which We Praise the Machine
(ferd.ca)
7 points
by
davepeck
1y ago
|
0 comments
46.
▲
by
davepeck
1y ago
I wrote and then quickly deleted that comment; I never want to speak negatively publicly about open source projects — projects that people work incredibly hard to build and maintain. I felt my original comment crossed that line. In any case
47.
▲
by
davepeck
1y ago
Do you use compilers? Linker loaders? Web bundlers? Linters and formatters? Code gen for or from schema? Image editors? Memory safe or garbage collected languages? Then you already use levers to build code. LLMs are a new kind of tool. They
48.
▲
by
davepeck
1y ago
Have you ever visited a Boda Borg? They’re not quite escape rooms; generally, the experiences are fast-paced. Some are puzzles; some physical challenges; some, an interesting mix. Lots of computer automation to make it all work.
49.
▲
by
davepeck
1y ago
My point was that library authors will need to consider this carefully. If you're writing a library where injection attacks matter, then -- long term -- you almost certainly do not want a single method that accepts `Union[str, Templa
50.
▲
by
davepeck
1y ago
> If you can use a string anywhere you can use a t-string You can't; they're different types. t-strings are not `str` It's up to good framework/API design to take advantage of this.
51.
▲
by
davepeck
1y ago
> Caching parameterized prepared statements, etc. I didn’t explicitly mention this in my post but, yes, the Template type is designed with caching in mind. In particular, the .strings tuple is likely to be useful as a cache key in many c
52.
▲
by
davepeck
1y ago
> This is such a strange take on t-strings I understand why this seems strange at first! As Paul mentioned, we spent quite a lot of time considering these issues as PEP 750 came together. In the end, we concluded (a) the PEP leaves open
53.
▲
by
davepeck
1y ago
And $-strings (PEP 292) as well. :-) I see each of these as distinct but overlapping; I'm (slowly) writing a guide to string formatting with all of these in mind, trying to emphasize when I'd choose one over the other. (fwiw I per
54.
▲
by
davepeck
1y ago
We pushed these questions out of the PEP to keep its scope constrained. (See https://peps.python.org/pep-0750/#mechanism-to-describe-the-... ) But yes, the PEP leaves open an important question: how will tools decide to
55.
▲
by
davepeck
1y ago
The PEP originally started with a similar-to-javascript syntax but over time we decided it wasn't the right way to expose these ideas in Python. There's more detail about why this approach was rejected in the PEP: https:/&#x
56.
▲
by
davepeck
1y ago
PEP 292's `string.Template` will remain; there are no plans to deprecate it. PEP 750's `string.templatelib.Template` is a separate and unrelated type. Amongst many differences, unlike PEP 292, `Template` has a literal form too. I&
57.
▲
by
davepeck
1y ago
With f-strings, you cannot write code to determine which portions of the resulting `str` were static and which were dynamic; with t-strings, you can. * (As to your initial example: it's worth considering what will happen as you compo
58.
▲
by
davepeck
1y ago
For the reasons discussed above, I'm not sure that it will be the case for t-strings. I think it'll take a little while for frameworks/libraries to adapt (while still maintaining backward compatibility) and a while for best
59.
▲
by
davepeck
1y ago
Hi! I wrote this. :-) I'm a little late to the conversation (and a bit surprised to see this trending on HN) but am happy to answer any questions; I'll try to pop in throughout the day.
60.
▲
by
davepeck
1y ago
> I can easily end up unsafely processed I’m curious how?
More ›