On Sunday 07 May 2006 12:31 pm, Tracy R Reed wrote: > One of the reasons I still have not learned any AJAX type stuff is that > I consider javascript a crummy language and I am annoyed that it has > become the standard for running in browsers. Rather than an actual > language it would have been nicer if they had just included a generic VM > (a la jvm) which we could target our perl/python/Jython/php/whatever > code to and write code in the language of our preference. But since that > is not the case we are stuck with javascript. > > I just ran across this paper which has a very interesting idea: Why not > compile our preferred language (python) into javascript for execution on > the client? Then we only have to deal with one language and can > integrate it cleanly into the class libraries of our web application > programming platform (zope/plone). > > If this were integrated with TAL or METAL such that certain XML tags > call python functions which are rendered into javascript for the client > to execute in the page instead of HTML to render in the page it could > all integrate fairly seamlessly and give our favorite web application > server and CMS a big boost in AJAX capabilities: > > http://groups.inf.ed.ac.uk/links/papers/links-icfp06/links-icfp06.pdf > > > > -- > Tracy R Reed > http://ultraviolet.org
Not really on topic but semi-relevant as a similar strategy could be implemented for Python ... Here is a Forth written in Javascript which then runs in most browsers. <quote> It is also the intention to implement the blocks filesystem words, using http pages as mass storage. as those can be requested over the net, loading code into ForthInJavaScript should get simple. Such as code to talk to other machines, also runnng ForthInJavaScript, by tunneling their communication through web servers. As this won't be withheld by firewalls (which are open to http traffic), an interesting potential for peer to peer communication opens up. </quote> http://www.forthfreak.net/index.cgi?ThePurposeOfForthInJavaScript You can actually run it ... see http://www.forthfreak.net/index.cgi?jsforth and http://forthfreak.net/jsforth.html So rather than writing a Python to Javascript compiler just actually write a Python interpreter in Javascript. I am sure it can be done. Probably slow as snot though. But who cares? We have GHz processors to waste. Actually forgetting Forth and Python the idea of having JavaScript to JavaScript tunneling P2P is interesting and should be pretty easy to do. As usual the problem lies in access to the local harddisk which is usually restricted to cookies. Does anyone know how big a cookie can be? Can I put an mp3 file in a cookie? BobLQ \ BobLQ -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
