Features and Limitations

86 views
Skip to first unread message

Nik

unread,
Feb 18, 2012, 8:28:16 AM2/18/12
to pyjaco - The Python to Javascript compiler
Hi folks!

How mature is the current version of pyjaco?
How does it compare to other python to javascript compilers like
pyjamas and skulpt?

What are the limitations of pyjaco?

Regards
Nik

Dusty Phillips

unread,
Feb 18, 2012, 10:53:46 AM2/18/12
to pyj...@googlegroups.com
Hi Nik,

I can't compare to other implementations, but you may find my articles
on pyjaco helpful in terms of measuring maturity:

http://archlinux.me/dusty/?s=pyjaco

I don't know how much of it is me and how much is pyjaco, but I find it
a bit unwieldy to work with at this point. There is quite a lot of
change going on in the codebase, all for the better, but it may affect
short term stability a lot.

I think the biggest limitation of pyjaco is the need to flag javascript
variables (e.g. jQuery) separately whenever you manipulate them. As a
coder, this leaves a lot of state that needs to be managed. I guess the
other possible limitation is that pyjaco ships a standard library. It's
not terribly big, but it does add some weight to javascript files. There
is discussion on ways to shrink the shipped library file such that only
those functions that are used during compilation are actually accessed,
but nothing has been done yet.

Take pyjaco out for a spin and let us know what you think. :-)

Cheers,

Dusty

g

unread,
Feb 19, 2012, 10:55:56 PM2/19/12
to pyjaco - The Python to Javascript compiler
> How does it compare to other python to javascript compilers like
> pyjamas and skulpt?

Pyjamas is a python port of gwt from java. See http://code.google.com/webtoolkit/overview.html
for more information. Its goals are pretty specific. The pyjamas
project includes a python to javascript compiler. I believe that you
could potentially hack around in pyjamas and use its compiler
directly, but that is not what it is designed to do.

Skulpt is a python interpreter written in javascript that runs in the
browser. This means that the browser loads skulpt, then you give
skulpt a python file, then skulpt turns your python file into
javascript... effectively running python in the browser. You can
think of it like pyjaco, except that compilation is done on page load.

Pyjaco is a python to javascript compiler that runs in python. You
would typically only compile python files in advance, once. If you
were to use pyjaco for web development, then you would be running
native javascript in the browser. You would compile the python to
javascript ahead of time, and then load and run the javascript
directly in the browser.

g

unread,
Feb 19, 2012, 11:10:49 PM2/19/12
to pyjaco - The Python to Javascript compiler


On Feb 19, 10:55 pm, g <wgordo...@gmail.com> wrote:
> > How does it compare to other python to javascript compilers like
> > pyjamas and skulpt?
>
> Pyjamas is a python port of gwt from java. Seehttp://code.google.com/webtoolkit/overview.html
> for more information.  Its goals are pretty specific.  The pyjamas
> project includes a python to javascript compiler.  I believe that you
> could potentially hack around in pyjamas and use its compiler
> directly, but that is not what it is designed to do.
>
> Skulpt is a python interpreter written in javascript that runs in the
> browser.  This means that the browser loads skulpt, then you give
> skulpt a python file, then skulpt turns your python file into
> javascript... effectively running python in the browser.  You can
> think of it like pyjaco, except that compilation is done on page load.
>
> Pyjaco is a python to javascript compiler that runs in python.  You
> would typically only compile python files in advance, once.  If you
> were to use pyjaco for web development, then you would be running
> native javascript in the browser.  You would compile the python to
> javascript ahead of time, and then load and run the javascript
> directly in the browser.

I guess I didn't really answer the question though... sorry. The way
I see it (in terms of use in the browser) is like this: Skulpt and
Pyjaco basically solve the same problem using a different approach.
However, Pyjamas and Pyjaco is apples and oranges because "Pyjamas is
a Rich Internet Application (RIA) Development Platform for both Web
and Desktop" and Pyjaco is a "Python to JavaScript translator."
Reply all
Reply to author
Forward
0 new messages