Comments (6)
What's default replacement?
from taggp.
The idea for recursion elimination via untagging is that when you retrieve some code via tag T and evaluate it, T is "untagged" during the evaluation of the retrieved code, so that you can't get recursion by re-retrieving the same code from within the retrieved code. The question is, what does untagging really do? By "real untagging" I mean that you remove the tag/code pair from the tag space during the evaluation of the retrieved code (and restore it afterwards -- the bug in the first implementation is that it never restores). This has the peculiar (good? bad? just too weird?) effect that a reference to the same tag in the retrieved code will then refer to what happens to be NEXT in the tag space, so you'd sort of be iterating through the tag space in order in subsequent calls. The alternative that has been proposed, which I'm calling "default replacement," is to replace (temporarily) the tag/code pair with a tag/default-value pair -- so that references to the same tag in the retrieved code will return the default value (which may be 0 or false or whatever makes sense in the given problem).
from taggp.
Ah. I had interpreted this differently, that if some tagged value in the code tagged creates a loop, then it should be removed (it being the cause of the look - i.e. the tagged call. So if we have
tag_exec_123 (some code ... tagged_120 ...)
Then I would just remove the tagged_120 call.
The more I think about it, the more I think that untagging of any sort seems wrong. I mean, endless recursion happens. Is the issue that the lookups are not counted towards the evalpush-limit? I just feel like the evalpush-limit should be what "stops" recursion...
from taggp.
This issue concerns taggp, which is TREE-BASED, not Push-based. So you can't just remove a call, because the syntax demands some value there. The suggestions here are that the value comes from evaluating what you get from a retrieval in a tag space in which the tag/code pair has been removed (that's what I called "real untagging") or from the a retrieval in which the tag/code pair has been replaced by tag/default ("default replacement").
from taggp.
oof ::facepalm:: Clearly I need more coffee before posting...
from taggp.
Recursion elimination implemented in my branch (refactored).
from taggp.
Related Issues (10)
- better ways of refactoring HOT 1
- random-seed HOT 1
- testing HOT 2
- generation data
- deep recursion issue HOT 1
- Recursion Elimination test HOT 1
- Recursion Elimination argument? HOT 1
- move argument handling to core.clj HOT 6
- update remaining examples HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taggp.