Some #classicalmusic for you today: a recent mini-opera of mine about #capebreton #labor history, "The Widow"
classicalmusic group reshared this.
Trump's allies fear he'll blow the debate -- his best chance to regain ground against Harris (Politico)
politico.com/news/2024/09/07/t…
memeorandum.com/240907/p23#a24…
JD Vance may have passed most of his exams at Ohio State and Yale Law School, but the one he could never pass was the Turing test.
tldr: Vance is a shitty android that fucks couches.
Courtesy of
mstdn.social/@GreenFire/113097…
Heidi Li Feldman reshared this.
Bluesky finally making a play for the Mastodon crowd
bsky.app/profile/domi.zip/post…
Actually you're not going to be able to see the explanation there, so I guess I'll just have to link you the site itself
How 2001: A Space Odyssey Became “the Hardest Film Kubrick Ever Made”
openculture.com/2024/09/how-20…
Dick Cheney says he will vote for Harris
Former Vice President Dick Cheney said his decision had to do with Trump's attempts to overturn the 2020 presidential election.
#news #npr #publicradio #usa
posted by pod_feeder_v2
Whuffo likes this.
Fabio Manganiello
in reply to Fabio Manganiello • • •The current state-of-the-art of how to implement #Python-like decorators in #Java-based languages is probably through #Spring’s aspect-oriented programming (AOP) features.
Which means that the answer to the question “how do I write a simple
@LogRequest
annotation that logs a request?“ in Spring’s AOP becomes:- Add the
- Create your annotation and specify
- Create an
- Create a pointcut through an ugly annotation like
... show morespring-boot-starter-aop
dependency.@Target
and@Retention
.@Aspect
@Component
that wraps your feature.@Around("@annotation(LogRequest)")
. This is the method that actually intercepts your annotation before the underlying object is created orThe current state-of-the-art of how to implement #Python-like decorators in #Java-based languages is probably through #Spring’s aspect-oriented programming (AOP) features.
Which means that the answer to the question “how do I write a simple
@LogRequest
annotation that logs a request?“ in Spring’s AOP becomes:spring-boot-starter-aop
dependency.@Target
and@Retention
.@Aspect
@Component
that wraps your feature.@Around("@annotation(LogRequest)")
. This is the method that actually intercepts your annotation before the underlying object is created or called.Now compare it to Python (create a
def log_request(f, *, **)
that@wraps
f
and can do whatever it wants before or after calling it), and you see the price to pay when you decide that AOP should be done through objects rather than functions. Spring had to introduce three extra unneeded abstractions (aspects, pointcuts and its own string-based runtime syntax for annotations) just to make up feature-wise for the initial bad design decision.@programming