Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pauleveritt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
pauleveritt
5mo ago
You should indeed feel vindicated. Me too, I've been a paid subscriber for months and eagerly read every word. <wink> But yes, I feel like this is the first of several vindications you have coming.
2.
▲
by
pauleveritt
10mo ago
As an FYI, I'm with the template strings folks (new feature in 3.14) and we're building an HTML system around the idea of JSX-style components as callables, but with actual strings of HTML. Check our <a href="https:/&
3.
▲
by
pauleveritt
11mo ago
Quick comment, our AI Chat now has Claude integration. Don't need the Anthropic plugin.
4.
▲
by
pauleveritt
1y ago
Thanks for the kind words, but really, I'm over-sung on this. It's been a long time since I impacted Python. I should be participating more. Hopefully t-strings is the place.
5.
▲
by
pauleveritt
1y ago
Guido said for many years (decades) that he wanted to get back to the parser.
6.
▲
by
pauleveritt
1y ago
As an example of t-strings helping SQL, Phil Jones published a package [1] that illustrates how it could work. [1] https://github.com/pgjones/sql-tstring
7.
▲
by
pauleveritt
1y ago
Do t-strings miss something that f-strings provides for format_spec etc.? FWIW, format_spec is available in the template structure, so the function writer could at least do a runtime check.
8.
▲
by
pauleveritt
1y ago
I'm one of the PEP authors and also with JetBrains. I'm talking to the PyCharm team about this.
9.
▲
by
pauleveritt
1y ago
We really should just point most of these comments at that PEP. Thanks for getting it out so fast.
10.
▲
by
pauleveritt
1y ago
Some prior art: https://pypi.org/project/tagged/ In fact, the repo of a companion project from the author has the ticket that spawned the work leading to t-strings: https://github.com/jviide/h
11.
▲
by
pauleveritt
1y ago
This is what we discussed in the first revision of the PEP (the use of `Annotated`.) But we found out: linters don't know anything about the Python type system. We hope to get a community around all of this, stuff at PyCon US, EuroPyth
12.
▲
by
pauleveritt
1y ago
The PEP originally portrayed this as "for DSLs"
13.
▲
by
pauleveritt
1y ago
Thanks Nick for this response and all the time you've spent explaining. It's funny, I looked back at the comments on f-strings before they landed. They also got similar complaints about bloat. And yet, my uneducated guess: very po
14.
▲
by
pauleveritt
1y ago
The other PEP example shows generating HTML attributes from a passed-in dictionary. HTML has a number of places where this is helpful, if you have original data.
15.
▲
by
pauleveritt
1y ago
Nearly everything you just described is being worked on. It's amazing how accurately you have described it. We hope to demo and explain at PyCon US.
16.
▲
by
pauleveritt
1y ago
It was discussed in the first revision and discussion of the PEP. The decision was made to move that to follow-on work, as we discovered more about what tooling needs. As an example, I was excited about using `Annotated` on the function to
17.
▲
by
pauleveritt
1y ago
The original PEP and the original discussion had this in scope. We removed it to let this emerge later. There are different ways to signal the language -- some more friendly to tooling, some more robust.
18.
▲
by
pauleveritt
1y ago
We've come a long way with AI Assistant in the last few months. Lots more planned.
19.
▲
by
pauleveritt
1y ago
That's cool that you're looking at those things. I hope we've made progress on "Apply" (and we're doing more.) And as heads-up, as you can imagine, we're looking at NEP.
20.
▲
by
pauleveritt
1y ago
(I'm from JetBrains.) Let's just say, watch this space.
21.
▲
by
pauleveritt
1y ago
I'd like to add, after the first publication for discussion, we got some wonderful involvement from Andrea Giammarchi who brought his deep JS libraries and tools experience into the PEP. In fact, he's deeply involved in the next s
22.
▲
by
pauleveritt
2y ago
If the string is an f-string, it is immediately evaluated and you no longer have access to the interpolation info for a resolver. If the string is not an f-string, you get no help from Python tooling. In both cases, you have to use frame ha
23.
▲
by
pauleveritt
2y ago
If I understand correctly, you'd prefer what other commenters have said for `html(i"Hello {name}")`?
24.
▲
by
pauleveritt
2y ago
(PEP co-author here.) You've described it well. As the "How to teach it section" emphasizes, we'd like consumers of tag functions to just think of it as an f-string with other stuff that happens before evaluation. From
25.
▲
by
pauleveritt
2y ago
Cool to see you jump in, Ian. I don't particularly mind the prefix thing. It came up in the PEP discussion, as did choice of backticks to indicate this is different. But JS template literals -> tagged template literals shows, you ca
26.
▲
by
pauleveritt
2y ago
Doing `html('<div>Hello {name}</div>')` would be possible. I have a system that's based on it. Two issues: - No tooling in Python will do anything with the string, so DX suffers. - Evaluating the variable req
27.
▲
by
pauleveritt
2y ago
(PEP co-author here) The htm folks did a Python implementation: https://pypi.org/project/htm/ It required a janky workaround for the absence of this PEP: https://pypi.org/project/tagged/
28.
▲
by
pauleveritt
2y ago
We originally had a long HTML tutorial in the PEP. It was extracted. It's here, if anyone is interested: https://pauleveritt.github.io/tagstr-site/htmlbuilder.html Companion repo with: JupyterLite playground, Dock
29.
▲
by
pauleveritt
2y ago
I actually have a stuff based on tagged ( https://pypi.org/project/tagged/ ) and htm.py ( https://github.com/jviide/htm.py ) So from a web development perspective, I can likely answer, if it is g
30.
▲
by
pauleveritt
2y ago
I'd be interested in chatting with you sometime on duck typing (protocols) and how it (along with this PEP) could bring component-driven development to Python.
More ›