Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sanderjd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
37 ms
·
811.
▲
by
sanderjd
2y ago
I really think you're misunderstanding the feature. If a method has a signature like: class DB: def execute(query: Template): ... It would be weird for the implementation to just concatenate everything in t
812.
▲
by
sanderjd
2y ago
You're right, fair enough. This isn't only about generators, it's also about how they interact with recursion and memoization.
813.
▲
by
sanderjd
2y ago
But I think everyone since Socrates would agree that it's a good thing someone else wrote down a bunch of the stuff he said.
814.
▲
by
sanderjd
2y ago
There is nothing weird or "borderline standardized" about generators...
815.
▲
by
sanderjd
2y ago
This is certainly neat. This isn't a criticism, but I think more like an expansion on the author's point: The reason this all works is that generators plus memoization is "just" an implementation of the lazy sequences th
816.
▲
by
sanderjd
2y ago
You're using fancy language and fancy-seeming arguments that don't engage in the actual argument being made, but instead are designed to distract while changing the subject. This kind of argumentation is called sophistry. >>
817.
▲
by
sanderjd
2y ago
The "bloat" is that you can now put the letter "t" in front of a string, rather than "f" or "r"?
818.
▲
by
sanderjd
2y ago
Counterpoint: It's good to add well designed and useful features to programming languages.
819.
▲
by
sanderjd
2y ago
This will be trivial to implement (it is just a check against the type that t-strings return), so I'm sure it will be done, if it hasn't already.
820.
▲
by
sanderjd
2y ago
I'm truly glad that Go exists for people who like languages that are simple even to the point of frustration and I hope it never changes. But I'm glad that other languages exist for those of us for whom learning some syntax is not
821.
▲
by
sanderjd
2y ago
It's pretty common for Python libraries to deprecate and remove functionality. It makes people mad, but it's a good thing, for this reason.
822.
▲
by
sanderjd
2y ago
I think it's way more likely that existing libraries will introduce new methods that use t-strings and are type safe, rather than entirely defeat the purpose of having a t-string API.
823.
▲
by
sanderjd
2y ago
No, because they don't return a string, so good library authors will raise a type error when that happens, for exactly this reason.
824.
▲
by
sanderjd
2y ago
What do you mean by "they"? You mean the template interpolation functions? Yes, the idea is that by having this in the language, library authors will write these implementations for use cases where they are appropriate.
825.
▲
by
sanderjd
2y ago
This is just extra boilerplate though, for what purpose?. I think one thing you might be missing is that in the t-string version, `db.execute` is not taking a string; a t-string resolves to an object of a particular type. So it is doing you
826.
▲
by
sanderjd
2y ago
Network effects are a beast! But my two cents is that we're pretty lucky it's python that has taken off like a rocket. It's not my favorite language, but there are far worse that it could have been.
827.
▲
by
sanderjd
2y ago
Nations being unwilling to allow their rivals to own their domestic media has literally nothing to do with that. The UN and is state diplomacy, not media policy. One has nothing to do with the other. Also: > They weren't trying to p
828.
▲
by
sanderjd
2y ago
Um, yes?
829.
▲
by
sanderjd
2y ago
> > Allowing a rival to push propaganda onto your children is foolhardy. > I don't recall historical instances where that was a major problem. This is truly laughable. We would have never let the German government own ABC in t
830.
▲
by
sanderjd
2y ago
No, those are not the same at all. A government controlling the content is not "exposing contrarian viewpoints".
831.
▲
by
sanderjd
2y ago
This seems like a bit of a non-sequitur, but you also correctly guessed that I think TikTok is bad. But I don't relate to any of the reasons you listed. I think TikTok is bad for two reasons: 1. It is controlled by the government of Ch
832.
▲
by
sanderjd
2y ago
I think this is unfairly assuming what I want, when I didn't specify that in my comment.
833.
▲
by
sanderjd
2y ago
I get what you meant now, after reading more of the thread.
834.
▲
by
sanderjd
2y ago
As with many things, the concern is that it's bimodal. Some people learn empathy through this kind of exposure, and some people learn the opposite.
835.
▲
by
sanderjd
2y ago
I'm confused though, children getting information via unfiltered access to the internet is a subversion of "the primacy of the nuclear family and the parent/child relationship", no?
836.
▲
by
sanderjd
2y ago
Honestly curious: What does this mean? I'll expand a bit on my perspective to avoid just sealioning here: Where I've come across proposals for policies like actual age verification is in the "social media is bad for kids"
837.
▲
by
sanderjd
2y ago
This is like saying that in theory heroin is a problem but in practice people have demonstrated that they don't care because lots of people do heroin.
838.
▲
by
sanderjd
2y ago
It wasn't innovative or intended to be, it was a solution to a collective action problem. It's easy to make the case for "we have to do it this way to avoid being penalized in search rankings".
839.
▲
by
sanderjd
2y ago
I think you misunderstood my point, which was that abandoning direct file (which is good) because what the system really needs is reform, is allowing that desired reform (the "perfect") to be the enemy of that good solution. These
840.
▲
by
sanderjd
2y ago
They are all private businesses which have to make money somehow. Refusing to host a good free public system because it would be more perfect to simplify the system is literally perfect being the enemy of good.
More ›