On Wed, Apr 22, 2009 at 3:46 PM, Maciej Fijalkowski <[email protected]> wrote:
>>
>>> As far as I know pyjamas does not translate a subset of python,
>>
>>  correct. we're going for as much of python2.N as we have time for,
>> with a view to (eventually) making pyjs a JIT python accelerator
>> (using V8 as the JIT engine) - just like psyco and unladen/swallow.
>>
>>
>
> Please. It's completely not like psyco in a sense that you don't
> support full python.

 that's the plan.

> It's super easy to provide 95% of python in a reasonable speed, just
> the last 5% gets tricky.

 that's what i'm going to find out.

> It's not like you're going to support as much of python2.N as you have
> time for. You're supporting some intersection between python, js and
> something else.

 in "web mode" - yes.

 in "strict" mode, i have hopes that an implementation of e.g. int as
a python class, compiled to javascript, can be hooked into a
drastically-modified version on python intobject.c which e.g. in
intobject.c's "int_div()" function actually calls _back_ into
javascript-land.

likewise for longobject.c and all other basic http://python.org types
in the Object/ subdirectory.


> And that's exactly the reason why JS backend is abandonded. We found
> out it's impossible
> to provide a reasonable subset of python under JS, still being a
> subset and not being
> something which has a common intersection.

 such as int / float - yes, i know, and the fact that "hello" + 5
equals "hello5" not a TypeError.

 the thing is, that for web developers, that's "good enough".  we
haven't had a single complaint, on the pyjamas-dev lists, and myself
and bernd are the only ones that are grumbling about it, because we're
the ones that are experimenting in implementing "strict" mode - all
the web developers (users of pyjamas) haven't even _noticed_! :)

web developers don't care if 5 / 2 = 2.5 (not 2) because if they were
doing pure javascript they would suffer the same thing: automatic
conversion of int to float.

pyjamas allows them to avoid doing pure javascript, and that's all
that they care about.

so i urge you to reconsider dropping support for JS on the basis that
what it provides is actually _beneficial_, and very _much_ not a
failure.

plus - remember - ECMAScript / Harmony is on the way, and that _does_
support the python concept of "slots", it _does_ have a 32-bit "int"
type (i have warned them that they really need a 64-bit "int" type as
well as unsigned int32 and unsigned int64).

so - basically - don't give up hope is all i can say.  remember -
javascript is fast becoming one of the most ubiquitous and most
heavily-optimised programming languages on the planet (thanks to web
browsers) so it's a bandwagon that would be a good idea to work out
how to hitch a ride on.

l.
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to