[-] FizzyOrange@programming.dev 6 points 2 weeks ago

I dunno if you're being deliberately obtuse, but just in case you really did miss his point: the fact that type hints are optional (and not especially popular) means many libraries don't have them. It's much more painful to use a library without type hints because you lose all of their many benefits.

This obviously isn't a problem in languages that require static types (Go, Rust, Java, etc..) and it isn't a problem with Typescript because static types are far more popular in JavaScript/Typescript land so it's fairly rare to run into a library that doesn't have them.

And yeah you can just not use the library at all but that's just ignoring the problem.

[-] FizzyOrange@programming.dev 6 points 3 weeks ago

A sane language, you say.

Yes:

Operator '+' cannot be applied to types 'number[]' and 'number[]'.

We're talking about Typescript here. Also I did say that it has some big warts, but you can mostly avoid them with ESLint (and Typescript of course).

Let's not pretend Python doesn't have similar warts:

>>> x = -5
>>> y = -5
>>> x is y
True
>>> x = -6
>>> y = -6
>>> x is y
False
>>> x = -6; y = -6; x is y
True
>>> isinstance(False, int)
True
>>> [f() for f in [lambda: i for i in range(10)]]
[9, 9, 9, 9, 9, 9, 9, 9, 9, 9]

There's a whole very long list here. Don't get be wrong, Python does a decent job of not being crazy. But so does Typescript+ESLint.

I’ve worked professionally in python for several years and I don’t think it’s ever caused a serious problem. Everything’s in docker so you don’t even use venv.

"It's so bad I have resorted to using Docker whenever I use Python."

[-] FizzyOrange@programming.dev 6 points 1 month ago

Yeah I mean it's definitely a reference volume of last resort, rather than a tutorial you would read cover to cover. Clearly a genius but he explains things as if you already understand them, and can also read his mind.

That said, for a lot of the content the only alternative is research papers and they are even less accessible. I definitely would only use it if I couldn't find answers anywhere else though.

[-] FizzyOrange@programming.dev 6 points 1 month ago

Very cool but I hope they give it proper GUI integration, not just a webview or VNC, which is how the alternatives work.

[-] FizzyOrange@programming.dev 6 points 1 month ago* (last edited 1 month ago)

Wow look at that CUPS code and tell me with a straight face there aren't 5 more similar vulnerabilities waiting to be found...

[-] FizzyOrange@programming.dev 6 points 2 months ago

submitting a merge request with changes that don’t compile is an absolute no-go.

Right but unless the tests for all 50 filesystems are excellent (I'd be surprised; does Linux even have a CI system?) then the fact that you've broken some of them isn't going to cause a compile error. That's what the linked presentation was about! Rust encodes more semantic information into the type system so it can detect breakages at compile time. With C you're relying entirely on tests.

[-] FizzyOrange@programming.dev 6 points 3 months ago

Ah yeah that works. Very silly. Phones can zoom!

[-] FizzyOrange@programming.dev 6 points 3 months ago* (last edited 3 months ago)

I agree, too little regard for backwards compatibility. They also removed distutils which meant I had to fix a load of code that used it. It was bad code that shouldn't have used it even when written, but still... seems like they didn't learn their lesson from Python 2.

It's not like it would be difficult to avoid these issues either. Everyone else just makes you declare your "target version" and then the runtime keeps things compatible with that version - Android via SDK target version, Rust with its editions, hell even CMake got this right. CMake!!

[-] FizzyOrange@programming.dev 6 points 3 months ago

It's not a browser issue. There's some weird "responsive" thing that entirely hides the graphs. You probably just have a bigger screen.

[-] FizzyOrange@programming.dev 6 points 3 months ago

The general difficulty of setup, poor & buggy hardware support and the inevitability of dropping to the command line are bigger issues.

[-] FizzyOrange@programming.dev 6 points 6 months ago

I scrolled a lot before I gave up looking for an example. No thanks.

[-] FizzyOrange@programming.dev 6 points 7 months ago

Without static type annotations you can only make best effort guesses that are sometimes right. Better than nothing but not remotely the same as actual static types. The LSP you linked works best when you use static type annotations.

Also I would really recommend Pylance over that if you can - it's much better but is also closed source unfortunately.

view more: ‹ prev next ›

FizzyOrange

joined 1 year ago