Readit News logoReadit News
davidatbu commented on Fun with uv and PEP 723   cottongeeks.com/articles/... · Posted by u/deepakjois
puika · 2 months ago
Like the author, I find myself going more for cross-platform Python one-offs and personal scripts for both work and home and ditching Go. I just wish Python typechecking weren't the shitshow it is. Looking forward to ty, pyrefly, etc. to improve the situation a bit
davidatbu · 2 months ago
I wouldn't describe Python type checking as a shit-show. pyright is pretty much perfect. One nit against it perhaps is that it doesn't support non-standard typing constructs like mypy does (for Django etc). That's an intentional decision on the maintainer's part. And I'm glad he made that decision because that spurned efforts to make the standard typing constructs more expressive.

I'm also looking forward to the maturity of Rust-based type checkers, but solely because one can almost always benefit from an order of magnitude improvement in speed of type checking, not because Python type-checking is a "shit show".

I do grant you that for outsiders, the fact that the type checker from the Python organization itself is actually a second rate type checker (except for when one uses Django, etc, and then it becomes first-rate) is confusing.

davidatbu commented on Advanced Python Features   blog.edward-li.com/tech/a... · Posted by u/BerislavLopac
quotemstr · 4 months ago
It still has a special case for dataclass-like things. I don't see how Python type checking (I haven't tried Red Knot) could let you do semi-magical things like Zod schema validation from TypeScript.
davidatbu · 4 months ago
100%. Python typing is nowhere near as powerful as TS, and the example you gave demonstrates that.

I mentioned pyright because (some of) the specific concerns by OP are addressed by it.

davidatbu commented on Advanced Python Features   blog.edward-li.com/tech/a... · Posted by u/BerislavLopac
hk__2 · 4 months ago
Same experience here, Python’s typing experience is awful compared to TypeScript, even post-3.12. Mypy’s type inference is so dumb you have to write arguments like `i: int = 0`; `TypedDict`s seems promisable at first and then end up as a nightmare where you have to `cast` everything. I miss TypeScript’s `unknown` as well.
davidatbu · 4 months ago
You really should check out pyright/pylance/basedpyright. Just an all around better type checker. Even has the "unknown" from typescript (kinda).
davidatbu commented on BlenderGPT   blendergpt.org/... · Posted by u/handfuloflight
brailsafe · 9 months ago
Do you believe this was the nature of the thread? Seems appropriate to say you agree with me that Show HN is ideal for those who'd like to engage in some curious discussion about whatever it is they're posting, but without regard to whether or not that's a requirement.
davidatbu · 9 months ago
The reason I engaged in the thread is I didn't want OP to feel like their posting/their work was unappreciated. Putting myself in their shoes, I especially guessed that the "go to Reddit" comment would have felt dismissive.

I do agree that I (and most HNers) find explanations of inner workings interesting in Show HN (or anything on HN).

davidatbu commented on BlenderGPT   blendergpt.org/... · Posted by u/handfuloflight
brailsafe · 9 months ago
> But you specifically said that without such an explanation, products should "go to Reddit" (which presumably means, they don't belong on HN)

I didn't imply anything about BlenderGPT at all, I just responded to a comment. Reddit is both an advertising platform for products of all kinds, and a conversation platform for broader categories of audiences, whereas SHOW HN is like a "here's my project/product, I hope you find it interesting, and here's a chance to ask me about it". If someone posts a Show HN, it's fair assume that if people find it interesting, they'll ask how it works, because we're going to be curious, and if a person is hypothetically not prepared for that, Show HN might not be the best place to post it. I didn't say any of that was true or false regarding BlenderGPT, it was just a general remark.

davidatbu · 9 months ago
Gotcha. It sounds like you and I agree that tech products whose underlying workings might not be elaborated are still ok to be on Show HN!
davidatbu commented on BlenderGPT   blendergpt.org/... · Posted by u/handfuloflight
brailsafe · 9 months ago
I didn't dismiss anyone's work, and I do find the upvote system to, at least in some cases, adequately represent the level interest on hn.

The question was: > why does it matter how it works?

and that's all my comment was intended to answer. Many people here are interested both in the idea of doing something enough to upvote AND are curious how something works. We're not necessarily just consoomers, we're often interested in details, but if I was buying something and wanted to know why I should, the maker should probably be able to answer why their thing is special; in this case, I'm just saying that people on HN are generally interested in how things work.

davidatbu · 9 months ago
Sure, HNers are interested in explanations of how things work (I am too!).

But you specifically said that without such an explanation, products should "go to Reddit" (which presumably means, they don't belong on HN). I'll leave whether that's a "dismissal of someone's work" or not up to you, but all I'm saying is: it's evident via voting that many HNers find BlenderGPT, a tech product, interesting, even with the lack of that explanation. And so BlenderGPT does not need to "go to Reddit".

davidatbu commented on BlenderGPT   blendergpt.org/... · Posted by u/handfuloflight
brailsafe · 9 months ago
Well, because we're curious and this is a place where curious critical technology enthusiasts gravitate. If it doesn't do anything novel _at_all_ or if there's no story to elaborate on, go to Reddit.

Plus, many are probably tired of seeing the same thing being made repeatedly that just proxys requests to chatgpt and makes them look pretty.

davidatbu · 9 months ago
I'm curious: don't you think the aggregate interest of the HN crowd is adequately measured via the voting mechanism? You seem not to find BlenderGPT as presented in its current form uninteresting, but if you accept that (voting up)=interest, many other people did. Why dismiss("go to Reddit" comment) someone else's work, that, evidently, many other HNers find interesting?
davidatbu commented on Dioxus 0.6 – Crossplatform apps with Rust   dioxuslabs.com/blog/relea... · Posted by u/jkelleyrtp
obsoleszenz · 9 months ago
> I _think_ Rust is unnecessarily recompiling dependencies on incremental builds? (I don't understand how incremental compilation times can be so bad otherwise). But I'm clueless about how to go about debugging that.

Make sure that your ide/vscode is using the exact same rust toolchain as you to build/check/run. Otherwise you don't get incremental compiling but recompilation a lot. I think there's an environment variable to force it.

davidatbu · 9 months ago
It turns out this wasn't my issue (more on this on other threads here), but I genuinely appreciate your time and help.
davidatbu commented on Dioxus 0.6 – Crossplatform apps with Rust   dioxuslabs.com/blog/relea... · Posted by u/jkelleyrtp
marcyb5st · 9 months ago
Just skimmed through it.

One thing that popped out is that you might want to try to define dependencies at the workspace level and then in the sub-crates point to those instead.

Otherwise you are correct, your setup is already very granular. Furthermore, I have no clue about why it takes so long on your end :/ . I am running on Linux, so I wonder if there's something in the MacOs stack that messes things up and so you end up recompiling dependencies over and over.

Another thing I noticed in my setup is that one of the biggest offenders was sqlx if the macro feature was enabled since the queries were ran at each incremental compilation.

davidatbu · 9 months ago
I so deeply appreciate your time, thank you!

I figured out the issue: I transplanted the bit about setting optimization levels from the blogpost into my setup (which sets opt-level = 3 for all dependencies), and when I removed that, my compile times went down by a factor of 5-10!

u/davidatbu

KarmaCake day593September 8, 2021View Original