Implementation plan

16 views
Skip to first unread message

Christian Iversen

unread,
Aug 7, 2013, 9:12:49 PM8/7/13
to pyj...@googlegroups.com
Hello again

Once more, the dear leader checking in

I wanted to introduce a checklist for missing features, and a short plan
for promoting pyjaco.

In no particular order, we need to:

1) Implement modules
2) Implement __set__ and __del__ descriptor semantics
3) Implement set() and frozenset()
4) Get the remaining 23 test cases to work
5) Implement a few more test cases I have in my notes
6) Implement <type 'instancemethod'>
7) Improve parameter checking to be on par with CPython
8) Implement a true <type 'staticmethod'>
9) Implement truer classes, with better attribute semantics
10) Implement __mro__ which (with 9) would allow multiple inheritance
11) Fixup <type 'super'> to work with 10)
12) Allow <type 'super'> to work in the non-bound version (rarely used)
13) Parse and react to __metaclass__ with the new pyjaco classes
14) Check that we have a reasonable number of __magic__ methods
We might need a few things like __name__ and __package__ in
some places.
15) Implement <type 'buffer'> and <type 'bytearray'> using the
new-ish javascript data array types.

And we could think about improving pyjaco like so:

1) Clean up the stdlib a bit so that 05-init and 06-pyjaco are
actually meaningful, instead of being a random hodge-podge of functions.
2) Think about if we want support for line number annotations
3) Implement the method-call optimization I have planned. This would
avoid a whole extra function call and js object construction per method
call.
4) Implement <type 'long'> using a js long-int library
5) Implement lazy-unboxing by having the compiler track the namespace
and use $PY.__magic__ methods to support semantics. This would give a
very significant performance boost, but requires some experience with
compilers to implement.


In terms of the necessary points, many of those are low-hanging fruit.
I'd gladly help anyone who would like to try implement some of these
things either in part of in full. In particular, if you have a strong
python background, 8), 6), 12), 15) and 3) should be fairly easy.
Particularly 3) is a good beginner project, since you can almost just
adapt the 24-type-dict.js code and simplify it.

Also an easy one would be 5), implementing more test cases. I have some
notes about things that might break pyjaco, and it would be a good
learning exercise to try and break the compiler with new tests :-)

The improvements list is a little more tricky, but I'd certainly gladly
help anyone who would want to try any of these tasks. Just let me know!

When we have the basics down (that is, most of the stuff from the first
list), I want to make pyjaco.org into a blog with news about pyjaco. In
particular, I would like to demonstrate why we are better than the
competition. I've identified several cases where they fail quite badly,
but we are not going down as easily (any more).

Finally, my plan is to make the release announcement to the CPython (and
probably PyPy) mailing lists. "A fifth python implementation" should
make some people notice us :-)

Also, I expect to give a lecture on pyjaco on next years Open Source
Days conference (earlier name: LinuxForum) in Copenhagen, Denmark. It
will be held at the start of next year, I believe.

That's it for now. Keep being awesome, and let me know if you want to
try and help with any part of this. It's really fun, I promise :-)

--
Med venlig hilsen
Christian Iversen
Reply all
Reply to author
Forward
0 new messages