Code Monkey home page Code Monkey logo

Comments (4)

kanaka avatar kanaka commented on May 14, 2024

It's a little bit tricky: if conj isn't defined in an implementation, the the mal implementation will fail to load (step4 and later) because mal/core.mal has a reference to conj. However, I don't want to just drop conj from the mal implementation because then the self-hosting tests won't completely pass even if the underlying implementation does provide conj because it's not referenced in the mal impl core namespace list. So while an implementation of conj isn't necessary for self-hosting, a stub definition of conj is necessary to run tests for steps 4-9. That could be clarified in the guide. Want to add that to the list you're making for the guide?

from mal.

wasamasa avatar wasamasa commented on May 14, 2024

I've read this like three times and still don't understand why conj is required...

But yeah, I guess I'll add that to my list.

from mal.

kanaka avatar kanaka commented on May 14, 2024

Heh, yeah that was pretty confusing. Let me try a different approach:

  1. Completely remove conj from an implementation -> using that language to self-host will fail for steps 4-A (undefined reference to "conj").
  2. Remove conj from mal/mal/core.mal: self-host for every impl will have stepA soft failures regardless of whether host language has conj.

So if the guide is changed to mention that while "conj" is optional, something trivial needs to at least be defined in the environment so that most of the self-host tests can run. The same is true of "string?" and "seq". Basically, all the symbols (list in mal/mal/core.mal) at least need stubs (even if the value is just nil) for self-host tests to be able to run from step4 onwards.

from mal.

wasamasa avatar wasamasa commented on May 14, 2024

Thanks, this is indeed much clearer.

from mal.

Related Issues (20)

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.