From: C A. R. <an...@xt...> - 2012-06-09 05:19:03
|
On Wed, Jun 6, 2012 at 6:40 PM, Bruce Sherwood <Bru...@nc...> wrote: > > [...] JavaScript is slower than C++ but > considerably faster than Python. To my knowledge, there is no > possibility for something like numpy, which runs at the speed of C. once numpy and co can run on pypy, will visual? pypy.org has been raising money for the numpy port ... ~45k of 60k. > Another speed issue to consider is that because GlowScript uses WebGL, > which requires the use of modern GPU-type graphics cards, many kinds > of graphics can be significantly faster than in VPython, which > currently uses GPUs only optionally, for textures. I've been dreaming > of a VPython+ that would also require the use of a modern graphics > card. so, as someone who as lurked this list for probably 4+ years now, this is something i've been wondering since the inception of glowscript and all the chatter/activity around it compared to vpython ... how does glowscript and vpython fit together in the "big picture"? has interest in the python module diminished (none? some? all?) in favor of JS? this is not really a criticism, whatever you answer; i'm mostly curious because i'm doing a short presentation next week on vpython to my company (~40-60 other developers, JS/Python/.NET/C#), and i'm writing up a demo program (visualization of message queue data! yay!) and supporting materials this weekend. i haven't actually ran glowscript successfully on my archlinux machines, in any browser, but i planned on giving it an honorable mention as i know several JS developers will be interested. primarily, i just want to give a good representation of what visual is, and what is to come. i know it's a pretty open ended question, but it's been on my mind for awhile. i wrote JS for many years before learning (and instantly embracing) python; it goes without saying that IMO ... Python > JS**10 ... alas, i'm almost assuredly biased, as i work on projects like pyjs.org translating Python-to-JS (for the goodness of all ;-) ... i was even considering implementing a pyjs wrapper to glowscript, "theoretically" allowing vpython programs to run unmodified in the browser. all-in-all, JS/ECMAscript, as implemented in browsers at least, is a wonderfully powerful language but offers no supporting infrastructure whatsoever. with the advent of pypy, any performance gaps are probably not so large (unconfirmed), should they exist at all (absolutely unfounded). what say you!?!? :-) again, while i prefer and champion the python side of things, i completely understand the benefit/opportunity/convenience of glowscript -- both are super-cool and vpython is loads of fun. thanks, -- C Anthony aside: at pyjs.org we've tried to bring python to the web via translation, but also direct bindings to the layout engine (Trident/XULRunner/WebKit), some of which are very successful. we are looking for a more universal way to achieve direct bindings, say via a plugin toolkit like Firebreath, or similar. perhaps you can better merge the two projects by doing the same -- use a browser to render vpython. if you drive the browser's WebGL engine directly you can get all the benefits (hardware accel/etc) in vpython for free. the Trident engine (Windows) is the most stable for us, accessed via COM interface, and the GObject WebKit bindings are the next promising method for other platforms. there are also mature ObjC bindings to WebKit. not sure how/if WebGL is exposed currently, but it might be worth pursuing. |