Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a 007 runtime in 007 #51

Open
masak opened this issue Oct 21, 2015 · 3 comments
Open

Implement a 007 runtime in 007 #51

masak opened this issue Oct 21, 2015 · 3 comments

Comments

@masak
Copy link
Owner

masak commented Oct 21, 2015

Before we do #38, we could aim for the much easier goal of having a runtime written completely in 007. Basically a port of _007::Runtime.

@masak masak mentioned this issue Oct 22, 2015
6 tasks
@masak
Copy link
Owner Author

masak commented Jun 8, 2016

The runtime now exists as of 61081a2... but it doesn't feel like scope creep to require it to have feature parity with Runtime.pm. Gonna close the ticket after that.

The natural next step is to get all the relevant tests in the test suite to run against runtime.007. Stand by for that.

@masak
Copy link
Owner Author

masak commented Jun 15, 2016

The natural next step is to get all the relevant tests in the test suite to run against runtime.007. Stand by for that.

Also done as of #142.

@masak
Copy link
Owner Author

masak commented Aug 3, 2016

A small status report, because it occurs to me that a lot of the work on this issue might be hidden away in the commits themselves. Which is a pity, because it's fascinating.

Here are the highlights:

  • Implementing something as big as runtime.007 was a stress test for 007 syntax and parsing. It led to the discovery of Really weird variable lookup failure #150 (now fixed), and it also led to us introducing the new keyword in fd70310.
  • I realized that we couldn't implement Q::Term::Object in pure 007 without having an API/MOP way to create objects from property name/value pairs. So work is ongoing to expose sometype.create() in a usable form in 007.
  • We are currently experiencing an interesting problem with built-in subs. In 10d7b08 we switched from Val::Sub::Builtin to a "hook" system. Concretely, if the runtime finds a defined &.hook attribute on the sub, instead of doing the usual enter/register-subhandler/statementlist.run/leave dance with subs, it simply runs the (Perl 6) hook. The only problem is that this cannot currently be written in 007... the proximal cause being that &.hook is hidden from 007; but more seriously it's hidden because 007 wouldn't really know what to do with a Perl 6 routine. I'm thinking the way forward here might be to declare calling as a native act on Val::Sub, hiding the implementation details and letting the daughter runtime simply use the mother runtime's implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant