[Haskell-cafe] Python's big challenges, Haskell's big advantages?

Bruce Eckel bruceteckel at gmail.com
Wed Sep 17 10:30:27 EDT 2008

Jython 2.5 is very close to release and its goal is to be a very
complete implementation, including such improbable things as ctypes.

You can indeed use the underlying threads of the JVM with Jython and
JRuby, but the native Python threads are prevented from running on
more than one processor by the GIL.

On Wed, Sep 17, 2008 at 10:23 AM, Jefferson Heard
<jefferson.r.heard at gmail.com> wrote:
> Both Jython and JRuby can use multicore parallelism.  Which, of
> course, you need desperately when running in Jython and JRuby, because
> they're slow as christmas for most tasks.  In addition, Jython is not
> a predictably complete version of Python and its internals are not
> well documented in the least, and the documentation for what CPython
> code will work in Jython and what won't is sadly lacking.
> In my experience, it doesn't make it an unusable tool, but the tasks
> it is suited for fall more along the lines of traditional scripting of
> a large working Java application.  I wouldn't want to see a large app
> written in Jython or JRuby.
> -- Jeff
> On Wed, Sep 17, 2008 at 9:18 AM, Arnar Birgisson <arnarbi at gmail.com> wrote:
>> Hi again,
>> On Wed, Sep 17, 2008 at 15:13, Bruce Eckel <bruceteckel at gmail.com> wrote:
>>>> Well, I'm a huge Python fan myself, but multiprocessing is not really
>>>> a solution as much as it is a workaround. Python as a language has no
>>>> problem with multithreading and multicore support and has all
>>>> primitives to do conventional shared-state parallelism. However, the
>>>> most popular /implementation/ of Python sacrifies this for
>>>> performance, it has nothing to do with the language itself.
>>> Actually, no. Neither Python nor Ruby can utilize more than a single
>>> processor using threads. The only way to use more than one processor
>>> is with processes.
>> I wanted to make a distinction between the language and its
>> implementation. I think you are conflating the two.
>> If you read the Python specification there is nothing preventing you
>> from running on two cores in parallel. The standard library does
>> indeed have semaphores, monitors, locks etc. In fact, I'm pretty sure
>> the Jython implementation can use multiple cores. It is just CPython
>> that can't, as is very well known and advertised.
>> cheers,
>> Arnar
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
> --
> I try to take things like a crow; war and chaos don't always ruin a
> picnic, they just mean you have to be careful what you swallow.
> -- Jessica Edwards

Bruce Eckel

More information about the Haskell-Cafe mailing list