News for hackers. Stuff that matters.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by OutOfHere on Sunday August 18, 2024 @01:51PM (#41283940)
Let's invent a new programming language that tells its users that the amount of time for which they hold memory should be "reasonable", without getting into specifics. This means the language can reclaim memory whenever it deems a violation has occurred. How well do you think would that work for the program? Not very well.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by ffgjgf1 on Sunday August 18, 2024 @03:10PM (#41284602)
Presumably much better than a language which would free all memory after 46 minutes in all cases regardless if that makes sense in the given context.

Also not sure why people like coming with analogies so much, they very rarely are useful or make anything clearer.

Re:Police Cannot Seize Property Indefinitely After an Arrest... by xelamonster on Sunday August 18, 2024 @03:51PM (#41284904)
I dunno, I think it's generally quite useful to identify relations between similar concepts. Not always easy to find one that fits perfectly but usually it just needs a bit of a tweak.

Like in this case, the situation you describe is exactly what a garbage collected language does, the key is that they let you mark what memory is still in use with a reference. Similarly in this case, there should be an explicitly defined time with a rule that if police want to hold something longer, they need to actively justify why and what the expected timeline is for the return without the owner needing to take them to court over it. Not perfect, but neither is garbage collection, and to me sounds much improved from what we've got.

Re:Police Cannot Seize Property Indefinitely After an Arrest... by ffgjgf1 on Monday August 19, 2024 @03:20AM (#41288604)
I’m still not sure if GC is the police (i.e. returning the money/memory at an arbitrary undefined point in the future) or me trying to take it back.

The topic at hand is pretty straightforward and easy to understand, not sure what’s the point of trying to explain it using significantly more complex concepts besides making it more confusing and harder to understand for no reason.. (I mean I find it hard to believe that any person who understands how GC works would find the analogy in anyway useful).

> Not always easy to find one that fits perfectly but usually it just needs a bit of a tweak.

On a very superficial level sure. But then that mechanism starts coming apart at the seems if you start talking about the details.

Re:Police Cannot Seize Property Indefinitely After an Arrest... by lolinder on Sunday August 18, 2024 @01:54PM (#41283964)
As much as programmers like to draw analogies between law and code, they don't really work the same way at all.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by tocs3 on Sunday August 18, 2024 @02:08PM (#41284059)
There are times that parts of a law should be vague to allow those evolved to make intelligent decisions. They should be specific enough to come to a resolution quickly if needed.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by OutOfHere on Sunday August 18, 2024 @02:13PM (#41284094)
This opens the door to routine injustices whereby those who can afford expensive attorneys get a sweet deal, and everyone else gets stabbed in the name of justice.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by SoftTalker on Sunday August 18, 2024 @02:19PM (#41284157)
Courts tend to follow precident, indeed precident is nearly the same as law. It's not really the case that an expensive attorney can argue his way around the well-established interpretations of the meaning of the constitution and other laws. Maybe, in the case of something novel, or for a question that has never come up before. It's not at all routine.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by autoexec on Sunday August 18, 2024 @06:42PM (#41286151)
that sounds like what we have right now.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by OutOfHere on Sunday August 18, 2024 @01:58PM (#41283984)
> they don't really work the same way

Why not? It would seem that you're just used to a state of exploitation and selective application, both of which are a mockery of justice. Sometimes it helps to see things from an outsider's perspective.

Re:Police Cannot Seize Property Indefinitely After an Arrest... by lolinder on Sunday August 18, 2024 @02:09PM (#41284066)
I'm not commenting on the way things should be, I'm commenting on the way things are.

And if you're saying that this ruling is bad because it doesn't work well in an idealized model of the law as you think it should be... that's an interesting observation, but you can hardly fault the judge for crafting a ruling that works in the context of the actual legal system.

Re:Police Cannot Seize Property Indefinitely After an Arrest... by SllX on Sunday August 18, 2024 @02:09PM (#41284067)
Because laws are executed by people, not computers.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by Almondsetat on Sunday August 18, 2024 @03:00PM (#41284487)
Why yes?
Re:Police Cannot Seize Property Indefinitely After an Arrest... by SoftTalker on Sunday August 18, 2024 @02:15PM (#41284119)
Yes, the constitution itself only prohibits "unreasonable" searches and seizures, and only states that "probable cause" is required for a warrant. These terms are undefined, and left to the courts to interpret.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by giantg2 on Sunday August 18, 2024 @04:24PM (#41285176)
The definitions are well defined in theory. How they get applied to specific cases and how they have been perverted over time is the real problem.

Take warrants and probable cause. It's supposed to be that by a preponderance of the evidence that the crime has been committed. The quality of many warrants today seem to completely miss this to the point that many of the descriptions fail to even claim that the elements of the offense have been satisfied. Then we have such a lazy system that warrants foe summary offenses don't even have to be for the correct crime - all that needs to be claimed is that any crime has been committed. That's how it goes when the system is too lazy to give each issue the correct level of attention to protect your basic rights.

Re:Police Cannot Seize Property Indefinitely After an Arrest... by RiverCrochet on Sunday August 18, 2024 @02:11PM (#41284084)
Isn't that what garbage collection essentially is?
Re:Police Cannot Seize Property Indefinitely After an Arrest... by OutOfHere on Sunday August 18, 2024 @02:14PM (#41284115)
Garbage collection doesn't impose a subjective reasonable vs unreasonable time limit for holding memory. It checks if the memory is still in use or not. Garbage collection is never subjective; it is entirely objective and without ambiguity or bias with regard to the guarantees it offers.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by kbolino on Sunday August 18, 2024 @03:01PM (#41284509)
This claim is false for a lot of modern language runtimes which use tracing garbage collection, like the CLR (C#/VB), JVM (Java/Kotlin/Scala/etc), Go, BEAM (Erlang/Elixer), etc.

There are no hard promises about when or even whether GC will reclaim a particular piece of garbage, precisely to enable optimizations and necessary compromises. Application availability is often more important than immediately collecting every possible piece of garbage. The use of tagging, generations, arenas, etc. all allow the GC to use heuristics and apply different collection regimes to different pieces of garbage.

Re:Police Cannot Seize Property Indefinitely After an Arrest... by OutOfHere on Sunday August 18, 2024 @03:09PM (#41284592)
Apologies, but I meant it terms of the guarantees that a GC offers. Yes, the GC can delay, but it will never over-eagerly reclaim beyond its advertised guarantee. It will always err on the side of not reclaiming.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by ffgjgf1 on Sunday August 18, 2024 @03:12PM (#41284624)
So exactly the same as saying that you will get your money back at some undefined point in the future whenever the police agency you’re dealing it will find it convenient?
Re:Police Cannot Seize Property Indefinitely After an Arrest... by OutOfHere on Sunday August 18, 2024 @03:15PM (#41284650)
No, rather that your money (memory) will never be taken away from you (your application) by the police/system (runtime/OS) without an objective rule.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by ffgjgf1 on Sunday August 18, 2024 @03:28PM (#41284744)
So police is the VM/programming language and you’re the program? Person writing the program? Or is it the other way around?
Re:Police Cannot Seize Property Indefinitely After an Arrest... by bee_rider on Sunday August 18, 2024 @05:44PM (#41285772)
It seems like the analogy just didn’t work.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by nox101 on Sunday August 18, 2024 @02:49PM (#41284430)
I'm not sure of your definition of objective here. If you mean a specific implementation and exact version of a specific language does one objective thing that might be true.

But, different implementations of the same language and different versions of those implementations can all do different things. GC rarely says exactly when something will be collected. Only that it will eventually.

Example: https://jsfiddle.net/8cej4tpk/2/

Firefox GCs after about 8 seconds, Safari GCs immmediately, Chrome never (probably not until there's pressure). And, you'll find different behavior if you go check different versions of those browsers.

Re:Police Cannot Seize Property Indefinitely After an Arrest... by OutOfHere on Sunday August 18, 2024 @03:18PM (#41284678)
Apologies, but the point was that a GC will never unjustly take your memory from you without a well-defined rule. It may delay in taking it away, but if it does, it will be very clear why it did.
Re:Police Cannot Seize Property Indefinitely After an Arrest... by eesmith on Sunday August 18, 2024 @02:44PM (#41284380)
Earlier you wrote "Let's invent a new programming language that tells its users that the amount of time for which they hold memory should be "reasonable", without getting into specifics."

This is essentially what Python-the-language does. It does not require reference counting, or mark-sweep, or any garbage collection at all. The language specification says at https://docs.python.org/3/reference/datamodel.html#objects-v... :

"Objects are never explicitly destroyed; however, when they become unreachable they may be garbage-collected. An implementation is allowed to postpone garbage collection or omit it altogether — it is a matter of implementation quality how garbage collection is implemented, as long as no objects are collected that are still reachable."

That subjective language specification is quite different than its objective implementation in a Python implementation, which appear to be what you refer to now.

Re:Police Cannot Seize Property Indefinitely After an Arrest... by gamblor956 on Sunday August 18, 2024 @02:26PM (#41284218)
I know you think you're being facetious, but you've just described how modern operating systems work.

They give programs a reasonable amount of memory, without getting into specifics about the limits. And they reclaim memory as necessary based on the demands of the OS and other programs. See, for example, browser memory usage vs video game usage.

It turns out that in practice "reasonable" works quite well as long as you are reasonable about it.