HNHacker News
TopNewBestAskShowJobs

davidhalter

40 karma · joined September 13, 2013

Zuban/Jedi author. https://github.com/zubanls/zuban https://github.com/davidhalter/jedi
submissionscomments
davidhalter··on Global review confirms mRNA vaccines are safe, effective and full of promise 
The hospitalization of unvaccinated people vs. vaccinated people was 10.5 times higher [1]. Lethality was 7 times higher if you did not take the vaccine [2]. I think we also have to remember that hospitalizations where the reason why a lot of mandates where enacted in the first place. Politicians where afraid that the hospitals would run out of capacity.

[1] https://pmc.ncbi.nlm.nih.gov/articles/PMC9459904/ [2] https://pmc.ncbi.nlm.nih.gov/articles/PMC9786706/

davidhalter··on Student beauty and grades under in-person and remote teaching
Attractive females might also have different behavior in remote teaching. Attractiveness directly affects how people behave and feel. This might also be different for males vs. females.

I'm sure that attractiveness does play a role for grades, it's just not nearly as simple as the paper puts it.

There are a lot of potential explanations, which is why these kinds of studies are unfortunately not that helpful and often cause questionable media coverage.

davidhalter··on Announcing the Beta release of ty
Have you tried `--pretty`? That is more of a Rust style. Most type checker report the short version, but have longer versions of the issues. IMO that's a good choice, but opinions might differ.
davidhalter··on Announcing the Beta release of ty
Zuban maybe doesn't succeed in terms of the amount of users, but it's nearly finished, supports the full Python type system (I'm in the process of completing the conformance tests), has support for Django and LSP support is also pretty much complete. So in a technical way it did already succeed.

It might not be used as much, but to be honest I think that's fine. I'm not a big VC-funded company and just hope to be able to serve the users it has. There's space for multiple tools in this area and it's probably good to have multiple type checkers in the Python world to avoid the typical VC rug pull.

davidhalter··on Announcing the Beta release of ty
Feel free to use Zuban, it already supports Django models and is way ahead in typing support (and it's probably as fast as Ty).
davidhalter··on Announcing the Beta release of ty
Mypy is not trash at all. It is still the most precise type checker, supports a lot of complicated cases and has plugins that make a lot of things more type safe. I believe Mypy is severely underrated and a lot of people believe that it's not as good as Pyright because of the conformance tests.

The problem is that the conformance tests were mostly written by Eric Traut, so there's a natural bias towards specifying what Pyright does well. There's a lot of things Mypy does really well that should probably be implemented in Pyright.

davidhalter··on Ask HN: Which Open Source License to Choose for a Python Language Server
Due to AGPL's viral nature they will have to open source their code if they use it as a library. But in general I feel like companies simply don't want to deal with the potential "threat" of lawsuits so they don't want to use it that way. This means they either search for other solutions or will try to negotiate some kind of deal.
davidhalter··on Ask HN: Which Open Source License to Choose for a Python Language Server
Most people will be using it as an LSP in their editors. Some companies might be interested in creating services on top of it. They won't be hosting the LSP, but they might want to use it to index code. And at that point there's at least some way for monetization.
davidhalter··on Ask HN: Which Open Source License to Choose for a Python Language Server
Thanks a lot for this idea. I did not know about this. Do you have any experience with EUPL or with projects that use it?

But wouldn't in that case people just use it as a library and do whatever they want? EUPL feels like LGPL, doesn't it?

davidhalter··on Show HN: A Python Language Server, Mypy-compatible
Currently none, but I'm currently re-implementing the Jedi part (auto-completions/goto), which needs lots of type inference on unannotated code. There will therefore be soon be a non-compatible mode that infers unannotated code as good as possible. I hope it is going to be ready a month from now.
davidhalter··on Show HN: A Python Language Server, Mypy-compatible
I think you underestimate how hard it is to move from Mypy to Pyright in big codebases. Having something very very close to Mypy should be very interesting for some companies with 1mLoC+. Relative maturity can still be a reason for 1-2 years and I have no idea what to do at that point.

Relative maturity can be a reason for quite a while (people overestimate how far Pyrefly and Ty are).

davidhalter··on Show HN: A Python Language Server, Mypy-compatible
I'm still thinking about a good model for the future, because I know that in the future they will be fine type checkers. I think the biggest advantage I have is that I don't burn big sums of money while doing it, so I only need a modest income. I think my current proposal would be a very fair way to make money. But I also see that this might not work if the competition offers everything for free and open source.

The ORM models do not work with typing at all, you basically have to make a lot of magic work if you want to support it in a type checker (especially if you want to work with reverse foreign keys). Generally type checkers do not just support the Django ORM. For Mypy there's a plugin that works pretty well, but uses runtime information, which further slows down Mypy.

davidhalter··on Show HN: A Python Language Server, Mypy-compatible
Django compatibility could definitely be a selling point, but I haven’t built a dedicated Django plugin yet. Right now, I’m prioritizing features like auto-completion and go-to-definition, which I think are more impactful in the short term.

The thing is, both Ty and PyreFly aren’t really close to the level of Mypy or Pyright — neither in terms of features nor stability. ZubanLS already covers the important features, though there are still some bugs I’m working through. So in that sense, yes: At the moment the selling point is that it just works.

davidhalter··on Show HN: A Python Language Server, Mypy-compatible
If I'm perfectly honest, I don't know yet. I'm currently pretty open to any model that ensures long-term survival of the project. Some people might be interested because it can be used as a replacement for Mypy and I'm willing to solve the issues they have in their 1mLoC+ codebases. It is absolutely non-trivial at this point to replace Mypy with Pyright or vice-versa in a larger codebase.
davidhalter··on Show HN: A Mypy-Compatible Python Language Server Built in Rust
I haven't considered it up to this point. This sounds interesting. What commercial license would you propose?
davidhalter··on Show HN: A Mypy-Compatible Python Language Server Built in Rust
The MagicMock case is indeed interesting. I am not sure what Mypy does there, I would have to investigate. The other issues are probably bugs and should be reported to https://github.com/zubanls/zubanls/issues if you are interested in fixes.
davidhalter··on Data center emissions probably 662% higher than big tech claims
I agree that this is where it is likely going to go. I have also found my peace about that a while ago. On a personal level I also don't believe that giving up big cars, flying and other things is something that nobody is doing. There are quite a few people that avoid such things, including me.

I feel like you underestimate the energy that sacrifice releases. I also feel like you don't have children. Because if you did a sentence like "you know you're going to be dead before the end of the century, right?" would probably not be what you were thinking. Exactly when you have something to lose (the life of your children and grand children), it generates a desire to change this miserable state that the world is in. This is not a depressed or negative state. It's the opposite. It feel like diving into the issues of the world and not looking away.

And I think the injunction to "Enjoy!" is exactly what's wrong with the world and what leads you away from inner peace. This is what psycho analysts have discovered quite a while ago and what religious people are able to avoid by having higher goals than your own enjoyment. My own experience with this is that since I have given up trying to enjoy my life and I'm trying to wrestle with my own negativity, life is better.

davidhalter··on Data center emissions probably 662% higher than big tech claims
This is such a defeatist and simplistic answer. Climate warming models show big differences between 2 and 4 degrees Celcius. I know the planet is eventually going to be extinguished, but we are nowhere near that point and just giving up seems like a very bad idea for our children...
davidhalter··on Uv: Python packaging in Rust
I have been working on a faster type checker for 3.5 years now. It's coming, I promise :)
davidhalter··on Diamonds Suck
Same here. I still cherish my 5$ wooden wedding ring. There's such beautiful wooden jewelry out there.
davidhalter··on Astral
I'm currently speeding up Mypy + Jedi in Rust. I'm pretty far already and it's definitely a lot faster. Tests are currently running 500 times faster than Mypy.
davidhalter··on Astral
I'm currently speeding up Mypy + Jedi in Rust. I'm pretty far already and it's definitely a lot faster. Tests are currently running 500 times faster than Mypy.
davidhalter··on What “diversity and inclusion” means at Microsoft
This might not apply to you, but it has helped me immensely to cut back spending money for pretty much anything. This means I get to work 70% or even less and still have a kids. I know it's not always easy, but there are people living very healthy and happy lives with minimum wage.

However I'm also aware that not everybody has that luxury, but I feel like most people have at least some options. Try to convice your boss that you can work 90% or something. Even getting rid partially of unhealthy work situations is a win.

davidhalter··on Swedes were fooled by one of the biggest scientific bluffs of our time (2020)
I agree. Circular reasoning along with self-fulfilling prophecies are definitely an issue. I still like it for introspection and realizing that other people have different "mind structures", whatever they might be.

> it's not a scientific or testable prediction about the way people act in the world.

The problem is that there is probably no scientific or testable prediction about the complexity of humans. Psychology itself seems not very scientific, so people rely on their intuition (as they should) to understand other people. However that leads to the problem of "X also wants Y, because I want Y", which from my experience is just not true at all. Humans have very different interests and goals. So these models creep up to account for that.

davidhalter··on Swedes were fooled by one of the biggest scientific bluffs of our time (2020)
Hmm, I found the Enneagram tremendously helpful. Why do you dislike it? I guess people can abuse it really easily, but I feel like it helped me to realize who I am in this world.
davidhalter··on Swedes were fooled by one of the biggest scientific bluffs of our time (2020)
These models helped me to realize that people are extremely different in what they need & want. This is what most people probably should learn from these.

I personally did like the Enneagram personality types. It made me realize how I had a totally different way of looking at the world. It's probably a better model than Disc, because it does include healthy and unhealthy levels, which is always extremely important if you want to understand people in general.

I think management applying any kind of model in such a simplistic model is just setting them up for failure. The right kind of thinking would probably have been: "those two are butting heads; let's find out why". The reason for butting heads is not that they have a D in their profile, it's just a correlation.

davidhalter··on Without parental leave I might be dead
While you might be partially right (I highly doubt immigration), there is still a huge difference in how the welfare state functions. Healthcare is paid by the government. Education is almost free. If you're poor, retirement is paid. If you cannot work you will receive some benefits like housing. There is maternity and paternity leave. There is sick leave. You get five weeks of vacation per year (not including sick leave). The prison system is humane and makes more sense, etc. etc. The list is extremely long.

Taxes are in general higher, for example the VAT is 25%.

I'm not particularly an expert on Norway though, I might be off a bit and basing this more on countries like Sweden/Switzerland/Germany, etc.

I don't think it's too far fetched to say that the US does not really have a "left" party, quite a few intellectuals would be saying this as well (e.g. Chomsky or Briahna Joy Gray).

davidhalter··on Sorbet Compiler: An experimental, ahead-of-time compiler for Ruby
No, it's more like this: Mypy is to Python what Sorbet is to Ruby and mypyc is basically a Python compiler, like the Sorbet compiler.

CPython is just like Ruby MRI. It does not do type checking or use type annotations and it's basically an interpreter not a compiler.

davidhalter··on Ask HN: Who is hiring? (July 2021)
cloudscale.ch | Zürich, Switzerland | ONSITE | Full-time

We are an IaaS platform in Switzerland trying to offer a high-quality "cloud". We are working with Django/React, but knowledge in these technologies is not a must. We have also been working on a Kubernetes CSI driver and there's our own Terraform provider.

We are mostly looking for an engineer willing to learn. Ideally you have a preference for functional patterns. Currently we are however looking for someone with fluent German.

If you're interested, just email me at dave (at) cloudscale.ch and I'll tell you more about this job :).

davidhalter··on ‘YouTube recommendations are toxic,’ says dev who worked on the algorithm (2019)
Same here.

Since I am not as good with ignoring stupid stuff, I just open stuff I don't want to see in my recommendations in a private window. Works great!

Page 1 of 2Next →