473,385 Members | 1,384 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Python on Javascript VMs (such as V8)

[folks, my apologies for the double-post via comp.lang.python whilst
my tiny brain works backwards and notices - eventually - that
comp.lang.python 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 interoperability 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 1136

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

Similar topics

16
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...
36
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...
40
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...
47
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...
3
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...
13
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...
37
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...
4
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.