473,394 Members | 1,693 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,394 software developers and data experts.

Python un-plugging the Interpreter

Hi All,
I was thinking about the feasbility of adjusting Python as a
compiled language. Being said that I feel these are the following advantages
of doing so --
1) Using the powerful easy-to -use feature of Python programming language
constructs.
2) Making the program to run at par with the compiled version of C/C++
program- this is the main benefit which can be derived out of this.
3) Highly re-use existing Python code for High performance application.
4) Acheive true parallelism and performance by getting rid of the
middle-man Interpreter and GIL.

I know this must be appearing like a foolish idea. But I would like to know
the opinion of people who might have thought about it.

Thanks
Moin

Apr 19 '07 #1
21 1223
S.Mohideen wrote:
Hi All,
I was thinking about the feasbility of adjusting Python as a
compiled language. Being said that I feel these are the following
advantages of doing so --
1) Using the powerful easy-to -use feature of Python programming
language constructs.
2) Making the program to run at par with the compiled version of C/C++
program- this is the main benefit which can be derived out of this.
3) Highly re-use existing Python code for High performance application.
4) Acheive true parallelism and performance by getting rid of the
middle-man Interpreter and GIL.

I know this must be appearing like a foolish idea. But I would like to
know the opinion of people who might have thought about it.
It's a great idea. Look at ShedSkin, PyPy, and Jython, all of
which tried to do it, and none of which really became finished
products.

John Nagle
Apr 19 '07 #2
John Nagle wrote:
S.Mohideen wrote:
>Hi All,
I was thinking about the feasbility of adjusting Python as a
compiled language. Being said that I feel these are the following
advantages of doing so --
1) Using the powerful easy-to -use feature of Python programming
language constructs.
2) Making the program to run at par with the compiled version of C/C++
program- this is the main benefit which can be derived out of this.
3) Highly re-use existing Python code for High performance application.
4) Acheive true parallelism and performance by getting rid of the
middle-man Interpreter and GIL.

I know this must be appearing like a foolish idea. But I would like to
know the opinion of people who might have thought about it.

It's a great idea. Look at ShedSkin, PyPy, and Jython, all of
which tried to do it, and none of which really became finished
products.
That's not really fair. ShedSkin and PyPy are still works in progress.
Jython was feature-complete, and has merely suffered from delayed
maintenance - the current maintainers are getting closer to current
language standards as we speak. Even CPython is a worl in progress eben
though it's normally treated as the reference implementation.

The one compiling implementation you don't mention, of course, is
IronPython. This compiles to the .NET/Mono CLR, which in turn can use
JIT techniques to generate machine code that the runtime will cache und
er the right circumstances.

Overall, then, I think the picture's a little rosier than you paint it
even though there's always room for improvement.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings http://holdenweb.blogspot.com

Apr 19 '07 #3
S.Mohideen wrote:
I was thinking about the feasbility of adjusting Python as a
compiled language.
In addition to the Python compilers listed by Steve, there is also
Pyrex, which translates a Python-like language to C, and allows one to
interact with it from Python with very little difficulty.
--
Michael Hoffman
Apr 19 '07 #4
S.Mohideen wrote:
I was thinking about the feasbility of adjusting Python as a
compiled language.
Python is a compiled language. It's compiled from source code to byte
code. That's what the .pyc files are.

STeVe
Apr 19 '07 #5
On Thu, 19 Apr 2007 10:56:25 -0600, S.Mohideen <mo**@blackhole.labs.rootshell.wswrote:
Hi All,
I was thinking about the feasbility of adjusting Python as a
compiled language. Being said that I feel these are the following advantages
of doing so --
1) Using the powerful easy-to -use feature of Python programming language
constructs.
We already do.
2) Making the program to run at par with the compiled version of C/C++
program- this is the main benefit which can be derived out of this.
Depends on what you mean by 'at par'. In the general case, that code
would have to basically work like the Python interpreter. Too much is
happening at runtime and it cannot be determined at compile time.
3) Highly re-use existing Python code for High performance application.
A reformulation of (2).
4) Acheive true parallelism and performance by getting rid of the
middle-man Interpreter and GIL.
Is the GIL really an artifact of the interpreter?

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
Apr 19 '07 #6
Jorgen Grahn wrote:
On Thu, 19 Apr 2007 10:56:25 -0600, S.Mohideen <mo**@blackhole.labs.rootshell.wswrote:
[...]
>
> 4) Acheive true parallelism and performance by getting rid of the
middle-man Interpreter and GIL.

Is the GIL really an artifact of the interpreter?
In so far as only the CPython interpreter has one, I'd have to say "yes"
to this. It's used to make various operations trivially thread-safe,
which allows large speed gains in the programming.

A long time ago Greg Stein produced a patch that removed the need for
the GIL, but nobody seemed to want to pay the penalty it extracted in
speed reduction, so it languished unadopted.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings http://holdenweb.blogspot.com

Apr 19 '07 #7
Michael Hoffman <ca*******@mh391.invalidwrote:
S.Mohideen wrote:
I was thinking about the feasbility of adjusting Python as a
compiled language.

In addition to the Python compilers listed by Steve, there is also
Pyrex, which translates a Python-like language to C, and allows one to
interact with it from Python with very little difficulty.
....and Boo, which is kind of a Python dialect in the same sense as Pyrex
is, but has type inference as well as declarations, and (there being
only one current implementation) compiles into good dotNet code.
Alex
Apr 20 '07 #8
Steve Holden <st***@holdenweb.comwrote:
A long time ago Greg Stein produced a patch that removed the need for
the GIL, but nobody seemed to want to pay the penalty it extracted in
speed reduction, so it languished unadopted.
Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...
Alex
Apr 20 '07 #9
Alex Martelli wrote:
Steve Holden <st***@holdenweb.comwrote:
>A long time ago Greg Stein produced a patch that removed the need for
the GIL, but nobody seemed to want to pay the penalty it extracted in
speed reduction, so it languished unadopted.

Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...
It would be nice to see the GIL banished, but the impression I get from
my (limited) acquaintance with the Python 3.0 world leads me to believe
that its banishment is *not* being treated as a priority.

I can understand that it would be a major engineering effort, but I
should have thought the returns on multi-core architectures would have
been worth considering.

It's going to be interesting to see whether perceptions in the CPython
world change as PyPy and IronPython progress.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings http://holdenweb.blogspot.com

Apr 20 '07 #10
On Thu, 19 Apr 2007 20:39:57 -0700, Alex Martelli <al***@mac.comwrote:
Steve Holden <st***@holdenweb.comwrote:
>A long time ago Greg Stein produced a patch that removed the need for
the GIL, but nobody seemed to want to pay the penalty it extracted in
speed reduction, so it languished unadopted.

Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...
Maybe it would change /perceptions/, but would normal users suddenly
start running things that are (a) performance-critical, (b) written in
Python and (c) use algorithms that are possible to parallellize?

I doubt it. (But I admit that I am a bit negative towards thread
programming in general, and I have whined about this before.)

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
Apr 24 '07 #11
Jorgen Grahn <gr********@snipabacken.dyndns.orgwrote:
...
Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...

Maybe it would change /perceptions/, but would normal users suddenly
start running things that are (a) performance-critical, (b) written in
Python and (c) use algorithms that are possible to parallellize?
That depends on what "normal" means. For the common definition (users
that don't _write_ programs), it would depend on what ``developers''
release to the world.
I doubt it. (But I admit that I am a bit negative towards thread
programming in general, and I have whined about this before.)
I'm no big fan of threading either, believe me. But with multi-core
CPUs onrushing, exploiting them requires either that or multiple
processes; and, with Windows still prevalent and not exactly a speed
daemon in dealing with processes (while pretty good with threads), it
would appear likely that threading's here to stay.

IronPython would appear to be coming along nicely and getting acceptance
in the Windows community, and I believe the underlying dotNet CLR does
do threads nicely; we'll see what develops on that front, I guess.
Alex
Apr 24 '07 #12
Jorgen Grahn wrote:
On Thu, 19 Apr 2007 20:39:57 -0700, Alex Martelli <al***@mac.comwrote:
>Steve Holden <st***@holdenweb.comwrote:
>>A long time ago Greg Stein produced a patch that removed the need for
the GIL, but nobody seemed to want to pay the penalty it extracted in
speed reduction, so it languished unadopted.
Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...

Maybe it would change /perceptions/, but would normal users suddenly
start running things that are (a) performance-critical, (b) written in
Python and (c) use algorithms that are possible to parallellize?

I doubt it. (But I admit that I am a bit negative towards thread
programming in general, and I have whined about this before.)
Well there seems to be little doubt that the rise in clock speeds is
reaching a plateau, so it seems like parallelization will have to be the
long-term trend. It's difficult to perform a deep enough static analysis
of programs in dynamic languages to automatically parallelize the code
(it's hard enough for languages like Fortran), but I am sure that over
the next few years languages will start to sprout features that make
programmer-directed parallelization easier.

I'd like to see Python leading that charge, not failing to track it. So,
stop being a Luddite ;-)

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings http://holdenweb.blogspot.com

Apr 24 '07 #13
Alex Martelli wrote:
Jorgen Grahn <gr********@snipabacken.dyndns.orgwrote:
...
>>>Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...
IronPython would appear to be coming along nicely and getting acceptance
in the Windows community, and I believe the underlying dotNet CLR does
do threads nicely; we'll see what develops on that front, I guess.
Thus we now have a demonstration that Python implementations need
not be as slow as CPython. And that Microsoft is beating open source
on Python.

Python as a language is in good shape. But the CPython
implementation is holding back progress. What we need are better
and faster implementations of the language we've got.

PyPy, ShedSkin, and Jython all were steps in the right
direction, but none had enough momentum to make it.
Jython hasn't had a release since 2002, ShedSkin is basically
one guy, and the EU pulled the plug on PyPy.

Now what?

John Nagle
Apr 24 '07 #14
John Nagle <na***@animats.comwrote:
...
>>Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...
IronPython would appear to be coming along nicely and getting acceptance
in the Windows community, and I believe the underlying dotNet CLR does
do threads nicely; we'll see what develops on that front, I guess.

Thus we now have a demonstration that Python implementations need
not be as slow as CPython. And that Microsoft is beating open source
on Python.
Not yet -- overall, CPython is still faster than IronPython in a vast
majority of cases. Also, according to
<http://www.codeplex.com/Project/License.aspx?ProjectName=IronPython>:
"""
You may use the Software for any commercial or noncommercial purpose,
including distributing derivative works
...
This license has not been submitted to OSI, but it allows developers to
take full advantage of a dynamic language on the CLR and to have the
freedom to distribute their works for the benefit of the community at
large. The license is half of a page long and very straight forward. We
believe it stands up to what developers demand of an "open" license.
"""
I.e., they're claiming that, while not OSI-approved, theirs _IS_ in
essence an open-source license.

Python as a language is in good shape. But the CPython
implementation is holding back progress. What we need are better
and faster implementations of the language we've got.
That's not what Guido thinks -- he thinks we first need a better version
of the language (Python 3000), simplified by removing much of the stuff
that's been hanging around forever for backwards compatibility (and with
a few other enhancements, check the Py3k PEPs). As long as the
volunteers who work on Python prefer to follow Guido's leadership rather
than yours, it's going to be difficult to force them to do what _you_
think is most important, rather than what _he_ thinks is.

PyPy, ShedSkin, and Jython all were steps in the right
direction, but none had enough momentum to make it.
Jython hasn't had a release since 2002, ShedSkin is basically
one guy, and the EU pulled the plug on PyPy.

Now what?
If you can get enough people to agree with you, and those people have
either technical nous and spare time, or some money and the willingness
to invest it in funding a new Python implementation (presumably building
on top of PyPy's excellent final deliverables), you can get a team
together for the purpose. Or, if you're really enthusiastic about
IronPython, you could look into supporting Mono
(<http://www.mono-project.com/Main_Page>) to make it ever better, and a
faster platform for running IronPython-compiled applications than
Microsoft's own proprietary CLR (and also modify IronPython as you
require, given the above-mentioned license).

Other possible alternative starting points include pirate (the Python
compiler for the Parrot virtual machine) -- I don't believe it's
currently under active development (no more than, say, Jython), but I
might well be wrong on this issue; and "Python dialects" ranging from
Pyrex to Boo.
Alex
Apr 25 '07 #15
"Jorgen Grahn" <gr********@snipabacken.dyndns.orgwrote:
On Thu, 19 Apr 2007 20:39:57 -0700, Alex Martelli <al***@mac.comwrote:
Steve Holden <st***@holdenweb.comwrote:
A long time ago Greg Stein produced a patch that removed the need for
the GIL, but nobody seemed to want to pay the penalty it extracted in
speed reduction, so it languished unadopted.
Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...

Maybe it would change /perceptions/, but would normal users suddenly
start running things that are (a) performance-critical, (b) written in
Python and (c) use algorithms that are possible to parallellize?

I doubt it. (But I admit that I am a bit negative towards thread
programming in general, and I have whined about this before.)
I find this last statement interesting, because it differs so much
from my own attitude - getting a thread running was one of the
first things I did when I started getting to grips with python.

Do you mind "whining" some more - maybe I can learn
something - threads seem to me to make a lot of things so
much easier and more natural, as I see them as sequences
that run "at the same time", and I find this immensely useful
for all sorts of things, as it enables me to think in a simple
linear fashion about parts of complicated things. And if you
add queues, you have something in your hand that you can
do quite fancy stuff with in a robust, simple manner...

*grin* before I discovered the queue module, I was using
named pipes to communicate between threads...

So you could say I am a threading freak if you want to, and
I won't argue.

But I would like to hear the opposite viewpoint..

- Hendrik

Apr 25 '07 #16
John Nagle wrote:
Alex Martelli wrote:
>Jorgen Grahn <gr********@snipabacken.dyndns.orgwrote:
...
>>>Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...
>IronPython would appear to be coming along nicely and getting acceptance
in the Windows community, and I believe the underlying dotNet CLR does
do threads nicely; we'll see what develops on that front, I guess.

Thus we now have a demonstration that Python implementations need
not be as slow as CPython. And that Microsoft is beating open source
on Python.
Well, let's remember that a) IronPython was originally developed
independently of Microsoft, and b) it's still open source or close to it
(I.'m not familiar with the OSI's opinion on the license Microsoft use
to distribute IronPython, but the fact it can be included in the FePy
distribution bodes well).
Python as a language is in good shape. But the CPython
implementation is holding back progress. What we need are better
and faster implementations of the language we've got.
Hear, hear!
PyPy, ShedSkin, and Jython all were steps in the right
direction, but none had enough momentum to make it.
Jython hasn't had a release since 2002, ShedSkin is basically
one guy, and the EU pulled the plug on PyPy.
Hey there, loose talk costs lives, you know. That is a complete
mischaracterization of the true position.

Progress on Jython may not have been stellar, but it has occurred and is
ongoing. Yes, Shedskin is "one guy", but so was Psyco and that was (and
remains) a useful tool.

As far as I am aware the PyPy project has come to the end of its initial
EU funding, and they chose to focus on producing deliverables close to
the end of the project phase rather that divert effort into securing
ongoing funding. So nobody has "pulled the plug", and I believe there is
every possibility of a further round of funded research and development
in the future. Certainly the results to date would justify that action
on the part of the EU. I don't know if and when the request for further
funding will be submitted.
Now what?
Work continues. Rome wasn't built in a day, you know.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings http://holdenweb.blogspot.com

Apr 25 '07 #17
On 25 Apr., 16:09, Steve Holden <s...@holdenweb.comwrote:
Python as a language is in good shape. But the CPython
implementation is holding back progress. What we need are better
and faster implementations of the language we've got.

Hear, hear!
PyPy, ShedSkin, and Jython all were steps in the right
direction, but none had enough momentum to make it.
Jython hasn't had a release since 2002, ShedSkin is basically
one guy, and the EU pulled the plug onPyPy.

Hey there, loose talk costs lives, you know. That is a complete
mischaracterization of the true position.
Indeed!
Progress on Jython may not have been stellar, but it has occurred and is
ongoing. Yes, Shedskin is "one guy", but so was Psyco and that was (and
remains) a useful tool.

As far as I am aware the PyPy project has come to the end of its initial
EU funding, and they chose to focus on producing deliverables close to
the end of the project phase rather that divert effort into securing
ongoing funding. So nobody has "pulled the plug", and I believe there is
every possibility of a further round of funded research and development
in the future. Certainly the results to date would justify that action
on the part of the EU. I don't know if and when the request for further
funding will be submitted.
Indeed here too. "pulling the plug" sounds like an extremely unfair
description. There never was the plan to get funding longer than what
we got so far (at least not with additional action from our side). And
yes, there is the possibility of getting additional funding in the
future, although we are not concretely thinking about it yet.

Apart from that, work on PyPy is definitely continuing, at least after
the much needed break most PyPy-developers are currently taking to
recover from the stress of the EU project (yes, funding has its
downsides too).

Cheers,

Carl Friedrich

Apr 27 '07 #18
On Wed, 25 Apr 2007 08:05:01 +0200, Hendrik van Rooyen <ma**@microcorp.co.zawrote:
"Jorgen Grahn" <gr********@snipabacken.dyndns.orgwrote:
....
>I doubt it. (But I admit that I am a bit negative towards thread
programming in general, and I have whined about this before.)

I find this last statement interesting, because it differs so much
from my own attitude - getting a thread running was one of the
first things I did when I started getting to grips with python.

Do you mind "whining" some more - maybe I can learn
something - threads seem to me to make a lot of things so
much easier and more natural, as I see them as sequences
that run "at the same time", and I find this immensely useful
for all sorts of things, as it enables me to think in a simple
linear fashion about parts of complicated things.
It's the other way around for me -- using a threaded design looks
superficially more linear, but all the complexity is still there, and
then some. I mean, threads are well known for causing surprising and
hard-to-track-down (and hard to trigger!) bugs and performance
problems.

(I'm comparing with the Unix select() call, and I assume the APIs I
want to use are designed to work with select(). i.e. use select()able
file descriptors.)
And if you
add queues, you have something in your hand that you can
do quite fancy stuff with in a robust, simple manner...

*grin* before I discovered the queue module, I was using
named pipes to communicate between threads...

So you could say I am a threading freak if you want to, and
I won't argue.

But I would like to hear the opposite viewpoint..
Good. My viewpoint is due to my Unix background (but I'm not
insinuating that all Unix users dislike threads).

Eric Raymond's "The Art of Unix Programming" sums up the threading
criticism, I think:

http://catb.org/~esr/writings/taoup/...amchapter.html

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
May 2 '07 #19
On Tue, 24 Apr 2007 07:49:46 -0700, Alex Martelli <al***@mac.comwrote:
Jorgen Grahn <gr********@snipabacken.dyndns.orgwrote:
...
Perhaps the current wave of dual-core and quad-core CPUs in cheap
consumer products would change people's perceptions -- I wonder...

Maybe it would change /perceptions/, but would normal users suddenly
start running things that are (a) performance-critical, (b) written in
Python and (c) use algorithms that are possible to parallellize?

That depends on what "normal" means.
I used your phrase "cheap consumer products" to the max -- defining
"normal users" as people who wouldn't have used an SMP machine two
years ago, and don't actively choose dual core today (or choose it
because they like HP's tandem bike ads).
For the common definition (users
that don't _write_ programs), it would depend on what ``developers''
release to the world.
>I doubt it. (But I admit that I am a bit negative towards thread
programming in general, and I have whined about this before.)

I'm no big fan of threading either, believe me. But with multi-core
CPUs onrushing, exploiting them requires either that or multiple
processes [...]
Yes. But that's where the current "concurrent programming craze" seems
so odd to me. It's as if the reasoning goes:

"New machines are multi-core; thus we have to find first a reason,
then a way to exploit them, on the process level".

Personally, I'm rarely CPU bound in my work, so I have a hard time
finding that reason. I doubt even Windows users are CPU bound, except
when a program hangs at 100% CPU.

When I get a multi-core CPU eventually, those other CPUs will mostly
do kernel-space tasks, offload things like rendering windows and doing
ssh encryption/compression, and let me type "make -j2" to compile my C
source code faster. No threading is needed for those things. (And even
if it was, I doubt anyone would rewrite either the Linux kernel, X11,
ssh or make in Python ;-)

BR,
/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
May 2 '07 #20
Jorgen Grahn wrote:
On Wed, 25 Apr 2007 08:05:01 +0200, Hendrik van Rooyen <ma**@microcorp.co.zawrote:
>>"Jorgen Grahn" <gr********@snipabacken.dyndns.orgwrote:
Eric Raymond's "The Art of Unix Programming" sums up the threading
criticism, I think:

http://catb.org/~esr/writings/taoup/...amchapter.html
What that really reflects is that threads came late to UNIX.
The locking primitives weren't standardized for years, signals took
a decade to settle down, interprocess message passing was weak and
still is, and some parts of the context, like the current directory,
are per-process while they should be per-thread. To this day,
threading remains an afterthought in the UNIX/Linux/C world.

This really isn't a Python topic, but if you want to see threading
and interprocess communication done right, look at QNX 6.
True message passing, well defined semantics for thread cancellation,
the ability to time out any system call that blocks, and defined
atomic operations are all there. All the thread machinery that has to
work right is well worked out and well documented.

John Nagle
May 2 '07 #21
"Jorgen Grahn" <gr********@snipabacken.dyndns.orgwrote:

On Wed, 25 Apr 2007 08:05:01 +0200, Hendrik van Rooyen <ma**@microcorp.co.za>
wrote:
"Jorgen Grahn" <gr********@snipabacken.dyndns.orgwrote:
...
I doubt it. (But I admit that I am a bit negative towards thread
programming in general, and I have whined about this before.)
I find this last statement interesting, because it differs so much
from my own attitude - getting a thread running was one of the
first things I did when I started getting to grips with python.

Do you mind "whining" some more - maybe I can learn
something - threads seem to me to make a lot of things so
much easier and more natural, as I see them as sequences
that run "at the same time", and I find this immensely useful
for all sorts of things, as it enables me to think in a simple
linear fashion about parts of complicated things.

It's the other way around for me -- using a threaded design looks
superficially more linear, but all the complexity is still there, and
then some. I mean, threads are well known for causing surprising and
hard-to-track-down (and hard to trigger!) bugs and performance
problems.

(I'm comparing with the Unix select() call, and I assume the APIs I
want to use are designed to work with select(). i.e. use select()able
file descriptors.)
This is a valuable insight - it is to a large extent true that threading is
used to "front end" i/o - but that is not its only use...

I tend to use it to build, via Queue glue, structures that resemble
systolic arrays - where each thread does a small part of a whole job.
>
And if you
add queues, you have something in your hand that you can
do quite fancy stuff with in a robust, simple manner...

*grin* before I discovered the queue module, I was using
named pipes to communicate between threads...

So you could say I am a threading freak if you want to, and
I won't argue.

But I would like to hear the opposite viewpoint..

Good. My viewpoint is due to my Unix background (but I'm not
insinuating that all Unix users dislike threads).

Eric Raymond's "The Art of Unix Programming" sums up the threading
criticism, I think:

http://catb.org/~esr/writings/taoup/...amchapter.html

/Jorgen
Thanks - interesting link. This guy really is not turned on by threading...

- Hendrik

May 3 '07 #22

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

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
10
by: francois lepoutre | last post by:
Hi all french speaking, Paris-based python users, Bonjour à tous les utilisateurs parisiens de python, How many are we to use python in the *Paris* Area? Enough to build some community life? ...
2
by: Roland | last post by:
Salut , Je suis un debutant pour linux. Et j'ai actuellement RedHat Fedora Core1 . Je voudrais developper une application (ie un logiciel de gestion de Bibliotheque ) avec python mais j'ai des...
0
by: PyStarbuck | last post by:
Hi All, Has anybody had an issue with compatiblity between XML files between python 2.3 and python 2.4. I have PyXML 0.8.3 installed in ClearCase and it is shared between Solaris and Windows....
0
by: Robby Dermody | last post by:
Hey guys (thus begins a book of a post :), I'm in the process of writing a commercial VoIP call monitoring and recording application suite in python and pyrex. Basically, this software sits in a...
6
by: Olaf \El Blanco\ | last post by:
Maybe there is someone that speak spanish. I need the best spanish book for learning python. Thanks! -- ***************************************************** "...Winds and storms,...
31
by: stéphane bard | last post by:
hello, my boss ask me to prefer windev to python. I have to argue - python work on multiple platform (linux, mac, windows) A good point but it didn't interest him. Because we want to choose a...
7
by: Sébastien Ramage | last post by:
I've an idea and I've made some search but I found nothing really interesting. There is somebody who have (or can help me to) try to developp a python plugin for web browser just like java ?? I...
1
by: Justin Johnson | last post by:
Hello, I'm trying to build Python 2.5.0 on AIX 5.3 using IBM's compiler (VisualAge C++ Professional / C for AIX Compiler, Version 6). I run configure and make, but makes fails with undefined...
206
by: WaterWalk | last post by:
I've just read an article "Building Robust System" by Gerald Jay Sussman. The article is here: http://swiss.csail.mit.edu/classes/symbolic/spring07/readings/robust-systems.pdf In it there is a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.