These are chat archives for dropbox/pyston

Jan 2016
Rudi Chen
Jan 13 2016 03:43
I was waiting mostly for code review on those.
I can try to update them so they past the tests at least.
But if there's major issues I'll have to hand it to you, I have a lot to do this school term...
Jan 13 2016 03:48
I see. Thank you! @undingen seems can review it before kmod return. maybe we can let #1027 pass first.
An Long
Jan 13 2016 04:47
@undingen got it
Dong-hee Na
Jan 13 2016 09:17
This message was deleted
@undingen I PRed #1050 If you have plenty of time, I would appreciate it if you review my codes. :-)
Marius Wachtler
Jan 13 2016 13:25
@aisk I found a much simpler way to get test_ast working: just don't call cpythonToPystonAST when in AST only mode. I think this should do what we want. I will put up a PR shortly. What do you think?
Dong-hee Na
Jan 13 2016 15:11
i am trying to use listobject.c
but i meet stuck on this code
extern "C" PyObject *
listsort(PyListObject *self, PyObject *args, PyObject *kwds) noexcept;

Box* listSortFunc(BoxedList* self, Box* cmp, Box* key, Box** _args) {
    Box* reverse = _args[0];
    Box* rtn = listsort((PyListObject*)self, NULL , NULL );
    return rtn;
just sort is worked but
this code not passed such as cmp function
but i don't know how to do
on this situation
Marius Wachtler
Jan 13 2016 15:19

mmh sorry I don't think I understood your questions but I will try:
I would register the listsort func using:

PyMethdoDef md {"sort", (PyCFunction)listsort, METH_VARARGS | METH_KEYWORDS, sort_doc};
list_cls->giveAttr("sort", new BoxedMethodDescriptor(&md, list_cls));

instead of the current

                       new BoxedFunction(FunctionMetadata::create((void*)listS:ortFunc, NONE, 4, false, false,
                                                                  ParamNames({ "", "cmp", "key", "reverse" }, "", "")),
You could also change listSortFunc to generate the arg tuples for the listsort call but I think it's better to just remove this function and directly use the capi function
Does this fix your problem?
Dong-hee Na
Jan 13 2016 15:21
i am trying it now thanks!
i should resolve sort_doc problem first.. haha
Dong-hee Na
Jan 13 2016 15:55
yes i resolve it but another error message meet
../../src/runtime/descr.cpp:298: static pyston::Box *pyston::BoxedMethodDescriptor::tppCall(pyston::Box *, pyston::CallRewriteArgs *, pyston::ArgPassSpec, pyston::Box *, pyston::Box *, pyston::Box *, pyston::Box **, const std::vector<BoxedString *> *) [S = 1]: Assertion `0' failed: 0xa57c2080
i should solve this problem tomorrow anyway thank you
Jan 13 2016 15:57
I think we should distinguish the difference exception styles.
oh, sorry, I misunderstood it.
Maybe it is METH_XXX related issue.