Readit News logoReadit News
pkulak commented on A “frozen” dictionary for Python   lwn.net/SubscriberLink/10... · Posted by u/jwilk
vlovich123 · 3 days ago
You cannot return an immutable version. You can return it owned (in which case you can assign/reassign it to a mut variable at any point) or you can take a mut reference and return an immutable reference - but whoever is the owner can almost always access it mutably.
pkulak · 3 days ago
Arg, you’re right. Not sure what I was thinking there. I still think my point stands, because you get the benefits of immutability, but yeah, I didn’t explain it well.
pkulak commented on A “frozen” dictionary for Python   lwn.net/SubscriberLink/10... · Posted by u/jwilk
pansa2 · 3 days ago
I wonder whether Raymond Hettinger has an opinion on this PEP. A long time ago, he wrote: "freezing dicts is a can of worms and not especially useful".

https://mail.python.org/pipermail/python-dev/2006-February/0...

pkulak · 3 days ago
This is why I love how Rust approached this; almost by accident to make borrow checking work. Every reference is either mutable or not, and (with safe code), you can't use an immutable reference to get a mutable reference anywhere down the chain. So you can slowly construct a map through a mutable reference, but then return it out of a function as immutable, and that's the end of it. It's no longer ever mutable, and no key or value is either. There's no need to make a whole new object called FrozenHashMap, and then FrozenList, and FrozenSet, etc. You don't need a StringBuilder because String is mutable, unless you don't want it to be. It's all just part of the language.

Kotlin _kinda_ does this as well, but if you have a reference to an immutable map in Kotlin, you are still free to mutate the values (and even keys!) as much as you like.

pkulak commented on Golang's big miss on memory arenas   avittig.medium.com/golang... · Posted by u/andr3wV
pkulak · 4 days ago
My guess is that when you measure, an arena is not worth the trouble when you run a generational GC, which essentially uses an arena for the eden space already. And if you have an arena, it's probably very short lived and would otherwise live entirely in eden.
pkulak commented on Modern Walkmans   walkman.land/modern... · Posted by u/classichasclass
jansan · 5 days ago
A question to native English speakers: Do you really say "Walkmans", not "Walkmen"?
pkulak · 5 days ago
Personally, I don’t like non-standard plurals and take the opportunity of a new word not to carry the mistake through. I prefer “mouses” as well, for the plural of a computer mouse.
pkulak commented on Bird flu viruses are resistant to fever, making them a major threat to humans   medicalxpress.com/news/20... · Posted by u/bikenaga
nikolay · 16 days ago
Well, most humans (unlike me) take Tylenol even with a "fever" of just 38°C/100.5°F, so what difference does it make?
pkulak · 16 days ago
Unlike you?
pkulak commented on Iowa City made its buses free. Traffic cleared, and so did the air   nytimes.com/2025/11/18/cl... · Posted by u/bookofjoe
cycomanic · 20 days ago
Here is an idea: Fix your homelessness problem and don't let other policies be guided by the best way to keep homeless people out of sight.
pkulak · 20 days ago
The problem is that the transit agency doesn't have a lot of agency over its city's homeless population.
pkulak commented on CBP is monitoring US drivers and detaining those with suspicious travel patterns   apnews.com/article/immigr... · Posted by u/jjwiseman
beeflet · 23 days ago
cameras can still track you regardless
pkulak · 23 days ago
Facial recognition is a LOT harder. And there aren't laws saying you're not allowed to do anything that would disrupt it. AND the laws regarding taking photos of people are a lot different than the laws around taking photos of cars.
pkulak commented on CBP is monitoring US drivers and detaining those with suspicious travel patterns   apnews.com/article/immigr... · Posted by u/jjwiseman
crazygringo · 24 days ago
I'm curious what you think the solution is?

Taking a photograph of a car with its license plate is legal. As is selling a photo you've taken, whether it has a license plate or not.

Therefore taking millions of photos in public of cars, and turning their license plate numbers into a database is legal, as is selling that information. It's all data gained in public.

Obviously it's now scary that you're being tracked. But what is the solution? We certainly don't want to outlaw taking photos in public. Is it the mass aggregation of already-public data that should be made illegal? What adverse consequences might that have, e.g. journalists compiling public data to prove governmental corruption?

pkulak · 23 days ago
Not being such a car-dependent society that every single person is forced into a dangerous, personal machine that requires licensing and tracking, to do absolutely any activity outside the house.
pkulak commented on Verifying your Matrix devices is becoming mandatory   element.io/blog/verifying... · Posted by u/LorenDB
NegativeK · 25 days ago
I obviously can't speak for you, but there's not a freaking chance I'd trust my life to the servers I run.

To go maybe too literal: when I'm working on machines that could physically eat me, I don't trust myself with just one off switch -- I want redundancy. And since computers are horrible piles of ridiculous complexity, the closest I can get (and not really get close) is trusting some of the top minds to overthink the crap out of it in a way that I can't do with the systems I manage.

But again, YMMV.

pkulak · 24 days ago
Well, when US-EAST-1 went down, my family was still chatting. Same with Cloudflare. Even if I lose internet, we can all chat so long as we’re on the network.

That said, the uptime is still probably worse than Signal. I didn’t mean trust the reliability. I meant the security.

pkulak commented on Verifying your Matrix devices is becoming mandatory   element.io/blog/verifying... · Posted by u/LorenDB
Gigachad · 25 days ago
Doesn’t verification also exchange encryption keys, letting you decrypt messages from before you logged in? I remember that being a huge issue where you would see unable to decrypt messages.

Probably just bad UX to let people skip the verification step.

pkulak · 25 days ago
Yes. If you don’t verify, every conversation is empty.

u/pkulak

KarmaCake day11920March 29, 2009
About
Engineer at Vevo

Email: red.luck2172@kulak.us Matrix: @phil:kulak.us Mastadon: @phil@urbanists.social

View Original