Jython&#39;s not bad. I&#39;ve used it a lot, and it plays well with lots of Java APIs. Pretty slick, actually. I hear Java 1.7 has some new dynamic features at the JVM level. I always imagined Jython would run a lot faster if it took advantage of them. Tal, do you know if there&#39;s any work on that? Googling around a bit I&#39;m not seeing much.<br>
 <br><div class="gmail_quote">On Sun, Jul 24, 2011 at 4:32 PM, Joshua Herman <span dir="ltr">&lt;<a href="mailto:zitterbewegung@gmail.com">zitterbewegung@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
At least erlang works for the use cases. I wasn&#39;t aware that Jython<br>
was that powerful I will have to play with it.<br>
<div><div></div><div class="h5"><br>
On Sun, Jul 24, 2011 at 3:46 PM, Tal Liron &lt;<a href="mailto:tal.liron@threecrickets.com">tal.liron@threecrickets.com</a>&gt; wrote:<br>
&gt; There is an alternative: Jython, which is Python on the JVM, and has no GIL.<br>
&gt; It&#39;s real, it works, and has a very open community. If you want to do<br>
&gt; high-concurrency in Python, it&#39;s the way to go. (And it has other advantages<br>
&gt; and disadvantages, of course.)<br>
&gt;<br>
&gt;<br>
&gt; I am always a bit frightened by community attempts to create new virtual<br>
&gt; machines for favorite languages in order to solve problem X. This shows a<br>
&gt; huge under-estimation of what it means to create a robust, reliable,<br>
&gt; performative generic platform. Consider how many really reliable versions of<br>
&gt; the C standard library out there -- and how many decades they took to<br>
&gt; mature, even with thousands of expert eyes poring over the code and testing<br>
&gt; it. And this is without duck typing (or ANY typing), data integrity, scoping<br>
&gt; (+call/cc), tail recursion, or any other of the other huge (and exciting)<br>
&gt; challenges required to run a dynamic language like Python.<br>
&gt;<br>
&gt;<br>
&gt; So, it&#39;s almost amusing to see projects like Rubinius or Parrot come to be.<br>
&gt; Really? This is the best use of our time and effort? I&#39;m equally impressed<br>
&gt; by the ballsiness of Erlang to create a new virtual machine from scratch.<br>
&gt;<br>
&gt;<br>
&gt; But those are rather unique histories. CPython has it&#39;s own unique history.<br>
&gt; Not many people realize this, but Python is about 6 years older than Java,<br>
&gt; and the JVM would take another decade before reaching prominence. JavaScript<br>
&gt; engines (running in web browsers only) at the time were terrible, and Perl<br>
&gt; was entirely interpreted (no VM). So, in fact, CPython was written where<br>
&gt; there was no really good platform for dynamic languages. It wasn&#39;t a matter<br>
&gt; of hubris (&quot;not invented here&quot;) to build a VM from scratch; there was simply<br>
&gt; no choice.<br>
&gt;<br>
&gt;<br>
&gt; Right now, though, there are many good choices. People like Rich Hickey<br>
&gt; (Clojure) and Martin Odersky (Scala) have it right in targeting the JVM,<br>
&gt; although both projects are also exploring .NET/Mono. If Python were invented<br>
&gt; today, I imagine it also would start with &quot;Jython,&quot; instead of trying to<br>
&gt; reinvent the wheel (well, reinvent a whole damn car fleet, really, in terms<br>
&gt; of the work required).<br>
&gt;<br>
&gt;<br>
&gt; One caveat: I think there is room for &quot;meta-VM&quot; projects like PyPy and LLVM.<br>
&gt; These signify a real progress in architecture, whereas &quot;yet another dynamic<br>
&gt; VM&quot; does not.<br>
&gt;<br>
&gt;<br>
&gt; -Tal<br>
&gt;<br>
&gt;<br>
&gt; On 07/24/2011 02:56 PM, Jason Rexilius wrote:<br>
&gt;<br>
&gt;&gt; I also have to quote:<br>
&gt;&gt;<br>
&gt;&gt; &quot;rather that, for problems for which shared-memory concurrency is<br>
&gt;&gt; appropriate (read: the valid cases to complain about the GIL), message<br>
&gt;&gt; passing will not be, because of the marshal/unmarshal overhead (plus data<br>
&gt;&gt; size/locality ones).&quot;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I have to say this is some of the best discussion in quite a while. Dave&#39;s<br>
&gt;&gt; passionate response is great as well as others. I think the rudeness, or<br>
&gt;&gt; not, is kinda besides the point.<br>
&gt;&gt;<br>
&gt;&gt; There is a valid point to be made about marshal/unmarshal overhead in<br>
&gt;&gt; situations where data-manipulation-concurrency AND _user expectation_ or<br>
&gt;&gt; environmental constraints apply.  I think that&#39;s why people have some<br>
&gt;&gt; grounds to be unhappy with the GIL concept (for me its a concept) in certain<br>
&gt;&gt; circumstances. Tal is dead on in that &quot;scalability&quot; means different things.<br>
&gt;&gt;<br>
&gt;&gt; Oddly, I&#39;m more engaged in this as an abstract comp sci question than a<br>
&gt;&gt; specific python question.  The problem set applies across languages.<br>
&gt;&gt;<br>
&gt;&gt; The question I would raise is if, given that an engineer understands the<br>
&gt;&gt; problem he is facing, are there both tools in the toolbox?  Is there an<br>
&gt;&gt; alternative to GIL for the use-cases where it is not the ideal solution?<br>
&gt;&gt;<br>
&gt;&gt; BTW, I will stand up for IPC as one of the tools in the toolbox to deal<br>
&gt;&gt; with scale/volume/speed/concurrency problems.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 7/24/11 1:58 PM, Tal Liron wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I would say that there&#39;s truth in both approaches. &quot;Scalability&quot; means<br>
&gt;&gt;&gt; different things at different levels of scale. A web example: the<br>
&gt;&gt;&gt; architecture of Twitter or Facebook is nothing like the architecture of<br>
&gt;&gt;&gt; even a large Django site. It&#39;s not even the same problem field.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; A good threading model can be extremely efficient at certain scales. For<br>
&gt;&gt;&gt; data structures that are mostly read, not written, synchronization is<br>
&gt;&gt;&gt; not a performance issue, and you get the best throughput possible in<br>
&gt;&gt;&gt; multicore situations. The truly best scalability would be achieved by a<br>
&gt;&gt;&gt; combined approach: threading on a single node, message passing between<br>
&gt;&gt;&gt; nodes. Programming for that, though, is a nightmare (unless you had a<br>
&gt;&gt;&gt; programming language that makes both approaches transparent) and so<br>
&gt;&gt;&gt; usually at the large scale the latter approach is chosen. One<br>
&gt;&gt;&gt; significant challenge is to make sure that operations that MIGHT use the<br>
&gt;&gt;&gt; same data structures are actually performed on the same node, so that<br>
&gt;&gt;&gt; threading would be put to use.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; So, what Dave said applies very well to threading, too: &quot;you still need<br>
&gt;&gt;&gt; to know what you&#39;re doing and how to decompose your application to use<br>
&gt;&gt;&gt; it.&quot;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Doing concurrency right is hard. Doing message passing right is hard.<br>
&gt;&gt;&gt; Functional (persistent data structure) languages are hard, too. Good<br>
&gt;&gt;&gt; thing we&#39;re all such awesome geniuses, bursting with experience and a<br>
&gt;&gt;&gt; desire to learn.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; -Tal<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 07/23/2011 01:40 PM, David Beazley wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; &quot;high performance just create multi processes that message&quot; very<br>
&gt;&gt;&gt;&gt;&gt; rarely have<br>
&gt;&gt;&gt;&gt;&gt; I heard IPC and high performance in the same sentence.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Alex<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Your youth and inexperience is the only reason would make a statement<br>
&gt;&gt;&gt;&gt; that ignorant. Go hang out with some people doing Python and<br>
&gt;&gt;&gt;&gt; supercomputing for awhile and report back---you will find that almost<br>
&gt;&gt;&gt;&gt; significant application is based on message passing (e.g., MPI). This<br>
&gt;&gt;&gt;&gt; is because message passing has proven itself to be about the only sane<br>
&gt;&gt;&gt;&gt; way of scaling applications up to run across thousands to tens of<br>
&gt;&gt;&gt;&gt; thousands of CPU cores.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I speak from some experience as I was writing such software for large<br>
&gt;&gt;&gt;&gt; Crays, Connection Machines, and other systems when I first discovered<br>
&gt;&gt;&gt;&gt; Python back in 1996. As early as 1995, our group had done performance<br>
&gt;&gt;&gt;&gt; experiments comparing threads vs. message passing on some<br>
&gt;&gt;&gt;&gt; multiprocessor SMP systems and found that threads just didn&#39;t scale or<br>
&gt;&gt;&gt;&gt; perform as well as message passing even on machines with as few as 4<br>
&gt;&gt;&gt;&gt; CPUs. This was all highly optimized C code for numerics (i.e., no<br>
&gt;&gt;&gt;&gt; Python or GIL).<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; That said, in order to code with message passing, you still need to<br>
&gt;&gt;&gt;&gt; know what you&#39;re doing and how to decompose your application to use it.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt;&gt; Dave<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; Chicago mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:Chicago@python.org">Chicago@python.org</a><br>
&gt;&gt;&gt;&gt; <a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Chicago mailing list<br>
&gt;&gt;&gt; <a href="mailto:Chicago@python.org">Chicago@python.org</a><br>
&gt;&gt;&gt; <a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Chicago mailing list<br>
&gt;&gt; <a href="mailto:Chicago@python.org">Chicago@python.org</a><br>
&gt;&gt; <a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Chicago mailing list<br>
&gt; <a href="mailto:Chicago@python.org">Chicago@python.org</a><br>
&gt; <a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
&gt;<br>
_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org">Chicago@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/chicago" target="_blank">http://mail.python.org/mailman/listinfo/chicago</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>blogs:<br><a href="http://johnstoner.wordpress.com/" target="_blank">http://johnstoner.wordpress.com/</a><br>&#39;In knowledge is power; in  wisdom, humility.&#39; <br>