473,592 Members | 2,921 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python on Javascript VMs (such as V8)

[folks, my apologies for the double-post via comp.lang.pytho n whilst
my tiny brain works backwards and notices - eventually - that
comp.lang.pytho n is mirrored from python-list duh]

On Sep 3, 10:02 pm, bearophileH...@ lycos.com wrote:
Berco Beute:
I wonder what it would take to implement Python in JavaScript so it
1200 lines of code for the compiler, and about... 800 for a basic
suite of builtin types (Dict, List, set, string).

http://pyjamas.sf.net

so it's been done.
can run on those fancy new JavaScript VM's such as Chrome's V8 or
that's been done, too.

http://advogato.org/article/985.html
Firefox' tracemonkey. Much the same as Python implementations in C#
(IronPython) and Java (Jython). It would certainly bring back the fun
in web application development.
it's great :) been using it just for fun, for about 18 months.
http://lkcl.net/site_code
and for a personal project
http://partyliveonline.com
and for a commercial project which i'm sorry i can't refer you to the
development site right now.
Is there anything done in that direction?
yup. quite a lot.
see http://groups.google.com/groups/pyjamas-dev
The mythical beast pypy is supposed able to translate Python to
Javascript too, I think. From some of my benchmarks Chrome's V8 is a
little slower than Psyco... so the matter is how much efficiently can
be Python translated in JS.
well, the llpamies pyjamas branch from sep 2007 has some definite
improvements in the _features_ provided (python-wise) but some time
after that, one too many interoperabilit y features were added (proper
support for **kwargs) and it just... blew up, got too complicated for
luiz and he abandoned the effort.

i've outlined on pyjamas-dev what work needs to be done to satisfy
both goals of remaining efficient and also providing support for
**kwargs.

one _much_ more important requirement - over-and-above
"efficiency " (which isn't that bad anyway in pyjs.py) is readability.

remember you have to _debug_ these xxxxing programs .... in
javascript, not python (which is why i did pyjamas-desktop - http://pyjd.sf.net
so you could keep on using the standard python interpreter and _then_
run the same app through pyjs.py to convert it to javascript).

l.
Oct 2 '08 #1
0 1160

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
2414
by: Paul Prescod | last post by:
I skimmed the tutorial and something alarmed me. "Strings are a powerful data type in Prothon. Unlike many languages, they can be of unlimited size (constrained only by memory size) and can hold any arbitrary data, even binary data such as photos and movies.They are of course also good for their traditional role of storing and manipulating text." This view of strings is about a decade out of date with modern programmimg practice. From...
36
6351
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining readonly attributes in classes worth the hassle ? Does duck-typing scale well in complex
40
1296
by: Shufen | last post by:
Hi all, Can someone who has use PHP before and know quite well about the language, tell me what are the stuffs that Python offers and PHP doesn't. A few examples will be nice. I know about the date format problem which PHP is having but I need more examples. Thank you for any help. Shufen
47
3460
by: Kenneth McDonald | last post by:
Is there any emerging consensus on the "best" UI for toolkit. Tk never quite made it but from what I can see, both qt and wxWin are both doing fairly well in general. I'm already aware of the licensing issues surrounding qt (fwiw, I think their license fee for commercial use is eminently reasonable), so aside from that, I was wondering if there was any feedback readers could provide on the following: 1) Which plays best with Python?...
3
1838
by: kenneth.m.mcdonald | last post by:
Of course, I'm not talking about something that would transform any Python code into semantically JavaScript code, but simply something that would analyze a "restricted" Python source file, and spit out equivalent JavaScript. The big advantage (as far as I'm concerned) is that one could make use of some of the syntactic shortcuts that JavaScript doesn't offer, that the Python syntax checker generally does a better job than the JS one, and...
13
2027
by: aum | last post by:
Hi, I'm a Python programmer, just starting to get into javascript. On reading some of the js guides, and not liking any of the OO usage patterns I saw, I've cooked up something which python folks might find to taste. Here's the code - first the 'engine', then some code demonstrating the usage patterns. For me (and maybe for some of you), it promotes readability and some
37
9039
by: Michael Palmer | last post by:
As anyone knows, the state of Python GUI programming is a little fractured at this time, with many toolkits, wrappers and meta-wrappers dead and alive, with or without documentation. I've come across two projects that have the appeal of striving for simple, pythonic APIs: PyGUI and wax. The latter is a wrapper around wxPython. It is lacking documentation but actually quite usable and concise. The other, PyGUI, has an even nicer API and...
4
2453
by: Berco Beute | last post by:
I wonder what it would take to implement Python in JavaScript so it can run on those fancy new JavaScript VM's such as Chrome's V8 or Firefox' tracemonkey. Much the same as Python implementations in C# (IronPython) and Java (Jython). It would certainly bring back the fun in web application development. Is there anything done in that direction? 2B
0
7871
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8227
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6642
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5400
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3851
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3893
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1202
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.