Honey Web

about all things sweet and web-ish

Posts Tagged ‘exam

Starting, sort of

leave a comment »

Sadly, exams have proven to take up more time than expected. Today’s exam was ok, easier than I expected. Also easier than previous exams from this lecturer. At least my last exam is on Wednesday, so after that I’m free.

I have however managed to do some investigative work.

I looked at pynie, to determine whether there’s anything worth reusing. As it happens, pynie hasn’t been working for quite a while now. I tried to bring it out of bitrot, but I didn’t have enough knowledge of NQP/PCT and didn’t bother to do more than make it build. Furthermore, PCT isn’t particularly friendly towards python developers.

Allison suggested that I might reuse the tests, but the rest is of little use. The bootstrap tests can’t easily use a python testing tool, since it during boostrap Python code can’t run yet. Py.test might help with that, but I’m not sure I should bother using it (as opposed to unittest).

I had planned to decide this week between using 6model or building my own object model over Parrot’s existing objects. While 6model appears to be able to fully support Python, I’m reluctant to jump in and use it while it’s still an external dependency. I don’t particularly want to pioneer in the usage of 6model on parrot, I’d much rather someone with more 6model experience did that instead.

Whiteknight and NotFound have worked on supporting a JavaScript-like object model on top of parrot’s objects, written in Winxed. This is now a part of Rosella and appears workable. The significant advantage is that it works on parrot now, not later. Also, from what I’ve heard,┬árohit_nsit08 wants to use it for his JS implementation, so I wouldn’t be the only user. Although Python’s object model is more complex than JavaScript’s, it’s conceptually similar.

I’ve started playing with the ‘ast’ module in Python3. I’ve figured out how to walk the AST, now I have to decide what to do with it. One option might be trying to transform it to PAST and letting parrot generate the code, but afaik PAST doesn’t have a textual form that I could target. The other option is linearising the AST and generating PIR, which is likely the one I’ll take unless things change or someone tells me it’s a stupid idea.

Written by Lucian

May 26, 2011 at 8:09 pm

Posted in parrot

Tagged with , , , , , , , , , ,

Follow

Get every new post delivered to your Inbox.