Resources for learning and using #recursion schemes:
Resources for learning and using #recursion schemes:
Here’s a crazy puzzle. Enjoy solving it and reply with your answer!
Imagine being in a large box with your box lying on the floor beside you. Your box contains a smaller copy of you and a smaller box inside and so on ad infinitum. You reach your hand into your box and pull out the smaller box. As you do this, you see a bigger hand coming from above and taking your box. Note that all the infinite copies of you have done the same. The boxes and the hands can pass through each other. So, there are no collisions.
Then, you put the box in your hand on the floor where your old box was. Where is your box now?
If you just want to read, I wrote my solution in a blog. What do you think?
That feeling when even your yaks are shaving yaks.
What is this kind of recursion called?
Where the recursive function can call itself from more than one of its branches?
---
(defun my-set-minus (a b)
(cond
( (null a) nil)
( (member (first a) b) (my-set-minus (cdr a) b))
( t (cons (first a) (my-set-minus (cdr a) b)) )
)
)
OK, so here's a little idea for OBS: A check box that says "drop the first 2 seconds of the recording".
And I guess also for any other screen recording tool. But, you know
when programming and you need "old" and "new" versions of a thing, how do you name them?
Al Sweigart @AlSweigart, of Automate the Boring Stuff with Python fame, also wrote The Recursive Book of Recursion. The examples are in Python but are easy to adapt to other languages.
https://inventwithpython.com/recursion
In a way it's the modern equivalent of the 1984 book Recursion via Pascal:
https://journal.paoloamoroso.com/reading-recursion-via-pascal
“Yo dawg, I heard you like the Fediverse, so I put the Fediverse in the Fediverse so you can federate while you federate”
A handful of mini-revolutions have already occurred.
One came in the mid-2000s,
when Ruth #Britto, Freddy #Cachazo, Bo #Feng and Edward #Witten discovered the “#recursion #relations,”
equations that let physicists condense hundreds of pages of Feynman diagrams to mere lines.
Around the same time, Arkani-Hamed joined the hunt for a new conceptual perspective on particle physics,
after a couple of thought experiments led him to doubt that space and time are truly well-founded physical concepts.
Several years later, he and Trnka discovered the amplituhedron.
The amplituhedron is a curvy shape whose contours encode the number and orientation of particles involved in an interaction.
Its volume gives the amplitude for that interaction to occur.
This volume equals the sum of amplitudes of all the Feynman diagrams depicting the various alternative ways the interaction could play out,
but in this case you calculate the answer without reference to those spatiotemporal dynamics;
all you need is the list of momentums of the particles that exist before and after the interaction.
“However the scattering happens, it’s controlled by this real structure,”
said Vijay Balasubramanian, a physicist at the University of Pennsylvania who studies quantum gravity.
“You don’t have to talk about space-time.”
The surprising discovery brought new people into the search.
But the amplituhedron worked only for a theory of particles that came hand in hand with exotic partner particles,
a simplifying balance called supersymmetry.
(Generally speaking, one quantum “theory” describes one specific set of rules for one specific set of particles.
As such, there are many quantum theories, some for real particles and others for fictitious ones.)
“You’re a little bit suspicious that maybe the amazing things you’re seeing have nothing to do with the real world,” said Giulio Salvatori,
a physicist who would later join the group.
In the following years, Arkani-Hamed’s team identified a second type of shape,
the “#associahedron,” that worked in a similar way.
It had flat sides, and its volume gave scattering amplitudes for the particles of a simplified quantum theory,
one that’s easier to study.
The particles in this theory carry a type of charge called “color” that is also carried by the quarks and gluons in real-world atomic nuclei.
(This charge has nothing to do with actual colors, but the mathematics of how charges combine to make color-neutral composite particles resembles how red, green and blue light together make white.)
The particles of this theory also lack supersymmetric partners.
The associahedron therefore represented a major step toward the real world.
But the shape gave only partial answers, producing amplitudes for only the shortest sequences of subatomic events.
Sensing a breakthrough was close, Arkani-Hamed recruited Salvatori and Hadleigh Frost at the University of Oxford,
young physicists who had been independently advancing the understanding of the associahedron’s strange shapes,
along with the mathematicians Pierre-Guy Plamondon and Hugh Thomas.
In 2019, the gang started looking for a geometrical route to all of these amplitudes.
Then the pandemic hit,
and the team left our space-time to work in the digital ether of Zoom.
They would emerge two years later with a second revolutionary way of doing quantum physics.
The asymmetry between "take" and "drop" #functionalProgramming operations on lists is weird. "drop" is just applying "cdr" N times, which is just a couple of function calls in #LambdaCalculus. While "take" requires full-blown #recursion and conditional testing. Or am I doing it wrong?
Going to dabble in #genuary this year, time permitting.
Day 1: Vertical or horizontal lines only.
I tried to make something that both uses only vertical lines *and* only horizontal lines. Or at least something that's ambiguous about which I used (recursion ftw!)
Also, my first foray into working directly with #svg in #python.
@pkw Scheme has had 'do' since R0RS, but it's recursive not assignment like LISP's. 90% of loops are either for-each, map, named let:
(let loop ((i 10)) (when (positive? i) (display i) (newline) (loop (sub1 i)) ))
or you make your own macro or HOF that does named let inside. Recursion first, then recursion.
#scheme
#recursion see https://appdot.net/@mdhughes/113671844537218462
Recursion is most often useful when the problem you're solving involves traversing or constructing a tree-like structure.
Read more https://trey.io/vIw7Up
One more vintage software development book added to the collection!
I believe it was @amoroso who mentioned this book on his blog as being one of his favourites.
EDIT: Here's Paolo's review: https://journal.paoloamoroso.com/reading-recursion-via-pascal
From a recent thread:
"Time is a Construct."
Most folks could agree that this is a plausible notion. But then, what is a construct? Does it imply a constructor, perceiver, or measurer? Can #Time or anything else exist without being a #Construct? Is a construct itself a construct (a #recursion)?
3 basic reads:
• Time exists outside of anyone's perception.
• Without a perceiver or observer, Time collapses.
• Time doesn't exist.
Or, something else.
Lace-like polygon fractals, created via recursive inward projection/folding of a seed shape (from 2011)...