bjornsno

joined 1 year ago
[–] bjornsno@lemm.ee 1 points 1 week ago* (last edited 1 week ago)

Definitely those used to be pain points, but they do exist now so type erasure after decorator application isn't a problem anymore, which used to be another huge one for me.

The discussion around how unpopular it was in other languages seems like such an obvious side track to me. Typing in general went out of fashion and then made a comeback when it was opt-in, why wouldn't the same apply to exceptions? Of course I'm not wanting warnings in every func call because of a potential MemoryCorruptionError, but if a library has some set of known exceptions as a de facto part of its interface then that's currently completely unknown to me and my static type checker.

One kinda bad example is playwright. Almost all playwright functions have the chance to raise a TimeoutError, but even if you know this you'll probably shoot yourself in the foot at least once because it's not the built-in TimeoutError, oh no, it's a custom implementation from the library. If you try to simply try...except TimeoutError:, the exception will blow right by you and crash your script, you've got to import the correct TimeoutError. If it was properly typed then pyright would be able to warn you that you still need to catch the other kind of TimeoutError. It's a bad example because like I said almost all playwright functions can raise this error so you'd get a lot of warnings, but it also demonstrates well the hidden interface problem we have right now, and it's the most recent one that screwed me, so it's the one I remember off the top of my head.

[–] bjornsno@lemm.ee 2 points 1 week ago (3 children)

My biggest pet peeve is the complete inability to annotate a set of known exceptions that a function raises in a machine readable way. The discussion about it is quite heated.

[–] bjornsno@lemm.ee 43 points 2 weeks ago (6 children)

I code both typescript and python professionally, and python is almost as much of a mess, just a different kind of mess. The package manager ecosystem is all over the place, nobody is agreeing on a build system, and the type system is still unable to represent fairly simple concepts when it comes to function typing. Also tons of libraries just ignore types altogether. I love it, but as a competitor to JavaScript in the messiness department it's not a good horse.

[–] bjornsno@lemm.ee 3 points 3 weeks ago

Lol Hare Apparent

[–] bjornsno@lemm.ee 2 points 1 month ago (1 children)

Pretty mid tbh, failed my driving test which is pretty shit but apparently very common around here. Made a pretty cool python script to monitor test cancellations so I can swoop in and do a new attempt, otherwise I'd have to wait like three months, so silver lining I guess.

[–] bjornsno@lemm.ee 2 points 1 month ago (1 children)

I believe https://github.com/facebook/jscodeshift is trying to be that tool for the typescript/js world. Doesn't have a mod for removing jquery but should be super doable.

[–] bjornsno@lemm.ee 3 points 2 months ago

I'm between The Black Parade (the album) by My Chemical Romance, an alt rock opera masterpiece imo, and Hamilton, the Broadway cast recording. I feel like the former might not work as well when removed from its time, but I bet it still would blow my mind.

[–] bjornsno@lemm.ee 3 points 2 months ago

This is exactly what happens. Actually the whole Wayland/xorg thing is not necessary, simply exiting a Wayland session and starting a new one will probably have the same effect, might depend on compositor. But it doesn't help knowing that it's the cause, I've known it for years, no closer to a solution. Obviously closing the tmux session and starting over is a "fix" in the same way that turning the machine off and on again is a fix. Kinda defeats the purpose of persistent tmux sessions.

[–] bjornsno@lemm.ee 10 points 2 months ago (2 children)

Have you tried kitty? It's seriously nice if you can live with the occasional "oh no I sshed to a server that doesn't have the correct terminfo files and now none of the normal terminal navigation features work"

[–] bjornsno@lemm.ee 4 points 2 months ago (1 children)

Pretty good, getting used to working from home while taking care of a newborn. It's tough but becoming manageable.

[–] bjornsno@lemm.ee 2 points 2 months ago

This doesn't really install it, though, you can't update or permanently edit and config, set up users, or anything like that. I would guess OP wants something more like booting the ISO in a VM, allocating a thumb drive to that VM, and then installing a full system to it with a boot loader.

[–] bjornsno@lemm.ee 4 points 2 months ago

My cat is starting to accept that my newborn is not going anywhere, and has returned to the land of the living room to chill with us. He's an extremely timid gentleman so he always runs outside at the first sign of a cry, but progress is still very promising!

view more: next ›