Programming Leftovers
-
Andy Wingo: finalizers, guardians, phantom references, et cetera
Consider guardians. Compared to finalizers, in which the cleanup procedures are run concurrently with the mutator, by the garbage collector, guardians allow the mutator to control concurrency. See Guile’s for more notes. Java’s PhantomReference ReferenceQueue seems to be similar in spirit, though the details differ.
questions
If we want guardians, how should we implement them in Whippet? How do they relate to ephemerons and finalizers?
It would be a shame if guardians were primitive, as they are a relatively niche language feature. Guile has them, yes, but really what Guile has is bugs: because Guile implements guardians on top of BDW-GC’s finalizers (without topological ordering), all the other things that finalizers might do in Guile (e.g. closing file ports) might run at the same time as the objects protected by guardians. For the specific object being guarded, this isn’t so much of a problem, because when you put an object in the guardian, it arranges to prepend the guardian finalizer before any existing finalizer. But when a whole clique of objects becomes unreachable, objects referred to by the guarded object may be finalized. So the object you get back from the guardian might refer to, say, already-closed file ports.
-
Medium ☛ What every developer should know about time
What time is it? It’s 9:30 in the morning.
But what does that mean? This isn’t true everywhere in the world, and who decided a day has 24 hours? What is a second? What is time?
-
Perl / Raku
-
Perl ☛ What's new on CPAN - June 2024
Welcome to “What’s new on CPAN”, a curated look at last month’s new CPAN uploads for your reading and programming pleasure. Enjoy!
-
-
R
-
Rlang ☛ Bootstrap Confidence Intervals: Exports in Japan
Japanese Finance Minister Shunichi Suzuki recently said that the volatility in USD/JPY rates negatively impacts the price competition and even damages the profit of the exporters in Japan.
-
Rlang ☛ {Shiny.Telemetry} 0.3.0: Track User Behavior In Your Shiny Applications
Understanding how users interact with your application in data analytics is crucial for continuous improvement and user satisfaction. {shiny.telemetry} is a groundbreaking tool that lets you do just that. shiny.telemetry offers a nuanced approach to user engagement, adoption, and impact assessment.
-
Rlang ☛ Forecasting uncertainty: sequential split conformal prediction + Block bootstrap (web app)
-