Giter Club home page Giter Club logo

Comments (6)

etosch avatar etosch commented on August 24, 2024

What's default replacement?

from taggp.

lspector avatar lspector commented on August 24, 2024

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.

etosch avatar etosch commented on August 24, 2024

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.

lspector avatar lspector commented on August 24, 2024

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.

etosch avatar etosch commented on August 24, 2024

oof ::facepalm:: Clearly I need more coffee before posting...

from taggp.

etosch avatar etosch commented on August 24, 2024

Recursion elimination implemented in my branch (refactored).

from taggp.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.