On Saturday, February 4, 2017 at 5:35:33 AM UTC+1, Dylan Trotter wrote:
>
> The compiler cannot yet run under Grumpy because it uses standard 
> libraries that aren't yet supported. The most substantial unsupported 
> library is the ast module. Once https://github.com/google/grumpy/pull/216 
> is merged, I think we'll be very close to hosting the compiler in Grumpy. 
> At that point, supporting go get would be feasible.
>

As someone suggested on Reddit (or Hacker News, or whatever it is called), 
you could use the ast module implementation from PyPy. I've been working on 
my own toolchain for a Python-like language, and to move gradually towards 
self-hosting, I migrated from the parser module (implemented in C for 
CPython) to the pyparser package that is also provided by PyPy. I didn't 
adopt the ast module from PyPy because I've been using the compiler package 
all along, and it was more sensible for me to adapt pyparser and my fork of 
compiler to work together.

With the pyparser stuff, you'll need to remove some PyPy-specific 
operations related to object spaces, but it wasn't difficult to get working 
at all. The PyPy people have done some nice work that, unfortunately, 
doesn't get recognised as much as it should. Since I'm aiming to release 
the source code for my toolchain fairly soon, you might be interested in 
what (little) I did in this regard.

By the way, I like what you're attempting to do with this project. I don't 
use Go myself, but I totally understand and support the idea of targeting 
it. My own toolchain targets C, which is fairly awkward but does have some 
portability arguments in its favour.

Paul

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to