On Thu, Dec 20, 2012 at 10:29 PM, Sarvi Shanmugham <[email protected]>wrote:
> What s the difference between the pyjaco and the pyjs compilers. > I would recommend you ask the same question on the pyjaco mailing list. Pyjs has certainly been around for much longer than pyjaco and so the creator of pyjaco at one point had to make a choice: work with pyjs or create his own. His choice may explain the major difference between them. >From what I can read on the various blogs, the pyjs compiler is more full > featured but I hear has whole laundry list of problems one of the bloggers > had posted. He had also compared other alternatives as well. > Yes, there are issues with the pyjs compiler. Many of them are very annoying. But I quickly looked at the pyjaco compiler/runtime implementation and it seems like it suffers from many of the same issues. Pyjs and pyjaco implement maybe 90% of python semi-accurately. The other 10% is either completely missing or very broken. One major issue I face with pyjs is that to implement inheritance the pyjs runtime copies variables from parent classes into the child class. There is no variable lookup up the class hierarchy at runtime. For most use cases this is not a problem but if you are building a framework or doing something advanced it will bite you in the butt. I would encourage you to make a simple Python test script with all of your favorite Python features exercised and then run it through pyjs and pyjaco and see how much each support. In any case, pyjs supports enough Python to be able to accomplish a significant amount of work. > I also notice that pyjaco was listed as much better than the pyjs compiler > in these areas. > I have not used pyjaco and only looked at the runtime/compiler briefly. I think "better" is subjective. I would say that pyjs compiler and runtime is still more sophisticated. > Plus pyjaco seems to be active development. > Pyjs may not be under "active" development but it is actively used. I personally have plans (someday) to add proper runtime variable lookups in classes. I already have a prototype that can be integrated into pyjs just need to find time to do that. > I understand pyjamas is much more than just the pyjs compiler. > > Questions: > 1. Does pyjaco generate more efficient in speed and size? > You'd be better to ask that on pyjaco mailing list. > 2. Can the pyjaco compiler replace the pyjs compiler and if not what > would be missing. That would leave pyjamas to focus on the gwt widget sets > in python as well as pyjd. Does this make sense. > >From looking at the pyjaco code my initial impression is that it's not better designed nor does it implement more features than pyjs to make it worthwhile to switch. It'll take as much effort to replace pyjs compiler with pyjaco and make sure everything still works as it would to just make the necessary improvements to pyjs compiler. > 3. As of now the pyjs tool and widgets set produces very large > JavaScript code. Someone mentioned 30M for hello world program > uncompressed. What are the root causes for this bloat and is there any work > happening in this area. > I think someone is heavily exaggerating. I think 5MB for a very massive app is more likely. Which is similar to the size of a desktop app that has python bundled with it. I have no problem whatsoever with the size of pyjs generated code. And I haven't even tried compressing my apps, that would probably bring down the size significantly. Why do I ask. > 1. I plan to use pyjamas and/or pyjaco and find this approach to > development exciting. > It is exciting. Just remember that you're dealing with the standard trio web stack HTML, CSS and JavaScript. Python is just a replacement for the JavaScript portion of that. You still have to know how the DOM works and how to apply CSS to make your app usable. > 2. I have a very small budget that I plan to use for improvements to > the toolset. In my opinion on things like efficiency of the generated code > as well as gwt version upgrade. And have junior a engineer from India that > I am funding that I was thinking of assigning to this task. Don't expect > magic from him, he is know Luke or Kees Bos but I expect him to learn and > contribute in whatever way possible. That's very exciting news. Your engineer should introduce himself to the list. - lex --
