26 ms·
Humans loop, they dont recurse, there's no stack, there's no OOM.
by hobs 3y ago
Humans loop, they dont recurse, there's no stack, there's no OOM.
- schoen 3y agoIs there any kind of task where you could think of the recursive perspective as natural? (If you have a tail-call optimization, many kinds of recursive process don't require a stack and don't risk an OOM condition!)
- michaelt 3y agoThe traditional task is "doing things with tree data structures"
- gorjusborg 3y agoNot the above commenter, but I think there are so many algorithms that are easier, even beautiful, when written recursively as opposed to iteratively (e.g. tree traversal, language parsing). That doesn't mean its natural for humans to understand.
- deleted 3y ago[deleted]
- hobs 3y agoMany, but I am talking about humans, not computers.
- schoen 3y agoYep, I meant my question as whether there are any typical human tasks that are easy for humans to understand in terms of recursion. I understand that there are lots of algorithmic tasks that are best understood that way, and that those aren't what you were talking about.
- lupusreal 3y ago"The stack" can be the state of the thing you're working on. For instance when modelling something with clay, you start with crude shapes, pushing and poking the clay until the crude shape looks more like what you intend, then you reapply this same process at finer and finer levels of detail. The state of the clay from previous operations is your "stack". When you've reached the finest level of detail you care to make you unwind the stack by stepping back to view your work. Anyway, it's basically just another way of structuring the state of a loop. And if you're doing tail call recursion then the distinction essentially doesn't exist.
- dekhn 3y agoI'm not a normal human, but I recurse. Nearly every problem I have to solve is effectively a tree strucfture that requires depth-first traversal (with some realistic alterations to make it more like A* and a directed graph). I often work down in some deep part of the tree and then when I finish, have to recall my stack and work my way back up towards my original goal. For example, for "create nanotechnology" I am currently on the "stitch images collected from my self-designed microscope into panoramas" and when that's solved I can pop back up to running "collect behavioral data from tardigrades" which will eventually allow myself to pop back up to "modify tardigrades to be cellular assemblers" and then I can work on cellular assemblers that assemble nanites. This has been a 30+ year structure and I occasionally get to pop the stack a bit.
- lelanthran 3y agoIf your mind truly works like that, then ... welcome to the club? I wrote my todolist/focus/stop-procrastinating tool to work exactly like that. If you can sit through 5m of slides: https://github.com/lelanthran/frame/blob/master/docs/FrameIntroduction.odp https://github.com/lelanthran/frame/blob/master/docs/FrameIn...
- kryptiskt 3y agoHumans understand recursive structures in natural language.