Is pyjd dead?

585 views
Skip to first unread message

Matt

unread,
Nov 11, 2014, 4:57:56 PM11/11/14
to pyjs-...@googlegroups.com
It doesn't look like pyjd gets installed alongside pyjs anymore. All the documentation I've found is old and references installation files that no longer exist.

Is pyjd dead?

Lex Berezhny

unread,
Nov 11, 2014, 6:41:50 PM11/11/14
to pyjs-...@googlegroups.com
Hi Matt,

I think there are people still using it and there were some updates this year. But given the size and complexity of a project like this I think it's as good as dead given the activity. I've tried to keep it going but there is just too much to do.

I've switched to using Dart. It lets you write OOP code (among a few other nice features in Dart) and will run in the browser both via Dart VM (Dartium) and compiled to JS. I don't think pyjs will ever match the type of optimizations and quality of JS produced by dart2js compiler. dart2js does tree shacking, inline optimizations, etc (the kinds of stuff 100s of the most brilliant programmers can crank out working full time). In certain cases JS generated from Dart is faster than hand written JS. I don't think there are any cases where pyjs generates JS that's faster than hand written JS.

In the end, Dart VM is also significantly faster than CPython for server side use and doesn't have GIL issues, it makes better use of multiple CPUs and has an erlang inspired isolate/message passing features.

 - lex

On Tue, Nov 11, 2014 at 4:57 PM, Matt <matthew...@gmail.com> wrote:
It doesn't look like pyjd gets installed alongside pyjs anymore. All the documentation I've found is old and references installation files that no longer exist.

Is pyjd dead?

--

---
You received this message because you are subscribed to the Google Groups "Pyjs.org Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyjs-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

wb

unread,
Nov 12, 2014, 4:42:46 PM11/12/14
to pyjs-...@googlegroups.com
I think that you tried the GitHub version. Pyjd installation was missing in the GitHub version when making pip installable. I am still waiting someone to do it because I don't know how to do.

You have to download the distributed pyjs version instead of the GitHub one, then you can install pyjd too.

2014년 11월 12일 수요일 오전 6시 57분 56초 UTC+9, Matt 님의 말:

wb

unread,
Nov 12, 2014, 6:57:43 PM11/12/14
to pyjs-...@googlegroups.com
Hi Lex,

Thanks for information about Dart. I took a look at it, and I found that it was a good and powerful language. But I don't like Dart mainly because of readability. It becomes horrible to read in Dart (and Javascript and many other languages too). The main reason I like Pyjs and Python is that it is really easy to read.

I know that readability is not the only issue in programming language, but it is the primary reason why people use Python and Pyjs. The easiness of Python comes from simplicity, so it makes difficult to write complicated jobs and slow to run. Anyway, to people who want good readability, Pyjs+Python is a nice way so far. 

I think that if Pyjs2Dart translator is built, then we can take advantage out of Dart's powerful features including optimization and speed. However, many programmers (and I) still want an easily readable language, and it is good enough to justify Pyjs. 

2014년 11월 12일 수요일 오전 8시 41분 50초 UTC+9, Lex Berezhny 님의 말:

wb

unread,
Dec 7, 2014, 5:20:02 AM12/7/14
to pyjs-...@googlegroups.com
I found a project to build Python2Dart translator called Medusa:


from the Medusa introduction page:
"The Dart VM like V8 compiles the dart code directly to machine code and ... runs at a much higher speed compared to the CPython implementation and at times upto a 1000 - 1500% faster ..."

2014년 11월 13일 목요일 오전 8시 57분 43초 UTC+9, wb 님의 말:

Phil Charlesworth

unread,
Dec 7, 2014, 7:26:12 AM12/7/14
to pyjs-...@googlegroups.com
Thanks for posting this; it looks a very interesting project which I shall probably follow up in time. It's main advantage would seem to be to speed up Python on the desktop. For running on the web, after compiling to JavaScript, although there might still be an advantage over hand-written JavaScript, the speed increase would likely be relatively small.

As a long time Python programmer who wanted to develop web applications, I went with Pyjamas for several years and even made small contributions to its development. However, I had always been worried about the large volume of code it produced and when the project was taken over to become Pyjs, I thought it was probably doomed. 

When Alexander Tsepkov came up with RapydScript, which essentially a way of writing JavaScript with pythonic syntax, I started to use that and have never gone back because I found it so productive. In a way it has some resemblance to Medusa because it creates an AST from the python-like input code and then outputs JavaScript from the AST. There is only a small increase in code volume in the process and, what's more, the JavaScript is totally readable and can be debugged just as easily as if written by hand.

My guess is that JavaScript from Medusa will not be significantly faster than JavaScript from RapydScript. Here is a link to RapydScript

wb

unread,
Dec 10, 2014, 6:34:35 AM12/10/14
to pyjs-...@googlegroups.com
One of advantages of Python2dart translator like Medusa is that we don't have to spend time on making compatible in different platforms. Dart takes care of cross-platform compatibility.So having a nice python2dart translator means that we can run Python applications everywhere without worrying about compatibility.

Medusa is not supporting Windows and Cygwin yet, so I couldn't use it. I think that Medusa is not matured enough to be used widely.

I think that python2dart translator can be a better way than python2javascript translator. 1. we can take advantage of Dart's a cross-platform property. 2. It is significantly faster than CPython. 3. Dart provides a nice debugging tool. 

But, we still need Pyjs until this idea becomes a practical and matured solution which is not available right now.

Lex Berezhny

unread,
Dec 10, 2014, 11:25:30 AM12/10/14
to pyjs-...@googlegroups.com
I think it's cool that someone has started on a python2dart translator. It will be interesting to see how some of the paradigm mismatches are resolved between Dart and Python, the biggest one being dynamism: Dart does not allow the program structure to change after it's been loaded, this means all imports have to be loaded before the program runs... conversely just about every major Python framework uses one form or another of dynamic imports, these will be impossible to port to Dart. This restriction is why Dart is so insanely fast.

The problem with any solution where you don't support 100% of Python is that you then don't benefit from the Python ecosystem in which case why bother use Python proper. This is the niche of projects like RapydScript, Coffeescript, etc. which are just syntax sugar over JS.

I think any python2dart translator will find itself in the same boat: it won't be able to support 100% of Python and end up growing in complexity like Pyjs. In the end it might be easier to just port something like RapydScript or Coffeescript to output Dart code.

I've been doing full time Python development for over 10 years now, I've gone to Python conferences and have loved the language and still do. Unfortunately the times have changed and I don't feel that Python has kept up. There are only two things going for Python right now: syntax and ecosystem. I think you really need to have both of those to make developing in Python worthwhile. Just having familiar syntax isn't worth it.

Dart has a lot of really nice features that in my opinion make it way worth the inconvenience of semi-colons and squigglies.

1) It was designed from the ground up for Pyjs' use case: being translatable to JS.
2) Insanely fast start up (if using Dart VM).
3) Has all of the features you need for large apps: classes, interfaces, mixins, packages, etc.
4) Excellent async API, even more importantly it's consistent across the entire standard lib (client or server).

If you've ever used Python Twisted than Dart will feel right at home. Everything from file access to websockets connections to button click events are based around Futures and Streams. Server side and client side (HTML5/DOM) all use the same async API.

Another awesome thing about Dart is the optional typing, this results in wicked good IDE support. By having optional typing the IDE has a much better idea of what methods are available on an object and so auto-complete works superbly well compared to Python.

 - lex


wb

unread,
Dec 19, 2014, 5:25:52 PM12/19/14
to pyjs-...@googlegroups.com
Python is a human-oriented language, and it is one of the reasons why we need Python and Pyjs even if Dart and other machine-oriented languages are used in some places.

Dart is extension of Javascript, and it is not really different from Javascript in human-aspects: bad in readability, bad in easiness, bad in simplicity. Many programming languages are being developed to enhance machine aspects: speed, and functionality. So, they don't care much about human aspect.

Are we using Python and Pyjs because of speed, nice functions, or nice library? No. We use them because we want to read fast, debug fast, and update fast. 

Pyjs doesn't support 100% of Python, but it is not a problem. I don't expect Pydart (i.e. python2dart translator) to support 100% of Python, and it is ok as long as it provides a reasonable level of compatibility. Pydart can be a client solution like Pyjs. We don't really need Pydart server solution because Python server is good enough. So supporting 100% of Python is not really what we need in Pydart.

Another problem of a machine-oriented language is that it's life cycle is pretty short. People wrote code in Fortran decades ago. They threw away their code and rewrote in C. And they threw away again and rewrote in C++. and threw away again writing in Java. This story is happening even now and happening even faster. If we threw away current code and rewrite in Dart, will it be the end of the story? Of cause not. We will find ourself throwing away again and rewriting in a brand-new language in the future.

On the other hand, a human-oriented language like Python has a very long life cycle. Python code written in decades ago are still used widely. I am pretty sure that my python code will be reused for quite a long time later in the future. It is a benefit of high-level language of Python designed to fit well to the human brain. We need Pyjs (and Pydart) to inherits the benefits of Python no matter what machine-oriented languages are available.

aehm...@gmail.com

unread,
Dec 6, 2017, 3:13:15 AM12/6/17
to Pyjs.org Users
hi is this group still alive? i cant get enough information about Pyjs in Python and im wondering if Pyjs is gone too in Python 3.6? well tbh, my prof asks me to study it while using python3 and im afraid to tell him i dont understand it without some proof that im right about it being gone already. Thank you for your reply! xx

Janjaap Bos

unread,
Dec 6, 2017, 5:28:13 PM12/6/17
to pyjs-...@googlegroups.com
I don't think so.

--

---
You received this message because you are subscribed to the Google Groups "Pyjs.org Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyjs-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages