These are chat archives for dropbox/pyston

11th
Nov 2015
Sun
@Daetalus
Nov 11 2015 21:05
Hi @kmod , I reading your PR #982 , try to learn how you solve the python-ast problem. I my understanding is correct, first you copy CPython parser files, then you wrote a cpython-ast to pyston-ast converter, convert the xxx_ty stuffs to pyston AST_xxxs?
Hi @undingen , sorry, I don't understand your latest comment about #1006 , would you mind to give more details?
Marius Wachtler
@undingen
Nov 11 2015 21:12
oh sorry yeah I was not really clear: I saw that our float.cpp copies a lot of stuff from floatobject.c. Generally I would prefer if we just directly use the implementation inside floatobject.c for new stuff if it works unmodified instead of copying it (in order to not have two implementations around where it's not easily visible if they do the same). And I was wondering if it's possible to remove the _Py_double_round implementation inside float.cpp and just remove the #if 0 inside floatobject.c and use it
Kevin Modzelewski
@kmod
Nov 11 2015 21:13
@Daetalus yep!
I wouldn't really say that it solved the AST problem (probably made it worse by having multiple implementations in the codebase)
but it was a way to get their parser in
Sun
@Daetalus
Nov 11 2015 21:22
@undingen oh, you mean the floatobject.c in from_cpython, not the file in Cpython codebase. Sorry for my misunderstanding. updated.
@kmod even you leave some comments in makeModuleInteractiveand there has the implementation. But I still could not understand why convert expr to print_expr. Would you mind to give more informations?
Marius Wachtler
@undingen
Nov 11 2015 21:47
thanks for making the change, I merged it in :-)
Sun
@Daetalus
Nov 11 2015 21:48
You are welcome. :smile:
Kevin Modzelewski
@kmod
Nov 11 2015 21:54
this is how the repl works -- it will convert something like 1+1 to print (1+1)
so this is how you get to see the output of your expressions
there's also a way you can explicitly request that behavior when you exec something
it's pretty rare though
Sun
@Daetalus
Nov 11 2015 21:55
Got it, thanks!