Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69792 > unrolled thread

Re: threading

Started byBen Finney <ben+python@benfinney.id.au>
First post2014-04-07 13:05 +1000
Last post2014-04-08 15:19 +0000
Articles 20 on this page of 105 — 22 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: threading Ben Finney <ben+python@benfinney.id.au> - 2014-04-07 13:05 +1000
    Re: threading Roy Smith <roy@panix.com> - 2014-04-06 23:48 -0400
      Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-07 13:56 +1000
        Re: threading Roy Smith <roy@panix.com> - 2014-04-07 08:26 -0400
          Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-07 22:34 +1000
            Re: threading Roy Smith <roy@panix.com> - 2014-04-07 09:22 -0400
              Re: threading Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-07 14:41 +0100
              Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-07 16:49 +0300
                Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-08 00:27 +1000
                  Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-07 17:51 +0300
                    Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-08 01:12 +1000
              Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-08 00:24 +1000
        Re: threading Rick Johnson <rantingrickjohnson@gmail.com> - 2014-04-08 18:09 -0700
          Re: threading "Neil D. Cerutti" <neilc@norwich.edu> - 2014-04-09 09:50 -0400
            Re: threading Rick Johnson <rantingrickjohnson@gmail.com> - 2014-04-09 08:51 -0700
              Re: threading MRAB <python@mrabarnett.plus.com> - 2014-04-09 18:47 +0100
                Re: threading Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-10 11:35 +1200
                  Re: threading Roy Smith <roy@panix.com> - 2014-04-09 19:53 -0400
                    Re: threading Andrew Berg <robotsondrugs@gmail.com> - 2014-04-09 19:02 -0500
                    Re: threading Steven D'Aprano <steve@pearwood.info> - 2014-04-10 02:43 +0000
                      Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 13:08 +1000
                    Re: threading Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-10 09:23 +0100
                    Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 19:11 +1000
              Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 04:00 +1000
              Re: threading Steven D'Aprano <steve@pearwood.info> - 2014-04-10 03:44 +0000
                Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 13:54 +1000
      Re: threading Ben Finney <ben+python@benfinney.id.au> - 2014-04-07 15:22 +1000
      Re: threading Ethan Furman <ethan@stoneleaf.us> - 2014-04-08 11:09 -0700
      Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-08 21:41 +0200
        Re: threading Grant Edwards <invalid@invalid.invalid> - 2014-04-08 20:30 +0000
          Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-09 00:32 +0200
            Re: threading Rustom Mody <rustompmody@gmail.com> - 2014-04-08 19:17 -0700
    Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-07 08:10 +0300
      Re: threading Paul Rubin <no.email@nospam.invalid> - 2014-04-06 22:39 -0700
        Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-07 08:46 +0300
        Re: threading Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-04-07 19:47 -0400
          Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-08 08:19 +0300
            Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-08 10:47 +0000
              Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-08 15:10 +0300
                Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-08 16:37 +0000
                  Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-08 20:17 +0300
              Re: threading Roy Smith <roy@panix.com> - 2014-04-08 09:19 -0400
                Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-08 15:44 +0000
                  Re: threading Paul Rubin <no.email@nospam.invalid> - 2014-04-08 09:38 -0700
                    Re: threading Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-09 14:42 +0100
            Re: threading "Frank Millman" <frank@chagford.com> - 2014-04-09 15:23 +0200
              Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-09 16:55 +0300
                Re: threading "Frank Millman" <frank@chagford.com> - 2014-04-09 16:46 +0200
                  Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-09 20:31 +0300
                    Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 03:52 +1000
                      Re: threading Mark H Harris <harrismh777@gmail.com> - 2014-04-10 08:29 -0500
                    Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-09 19:20 +0000
            Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-09 23:47 +1000
              Re: threading Roy Smith <roy@panix.com> - 2014-04-09 10:44 -0400
            Re: threading "Frank Millman" <frank@chagford.com> - 2014-04-09 16:30 +0200
              Re: threading Roy Smith <roy@panix.com> - 2014-04-09 10:52 -0400
                Re: threading Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-10 11:19 +1200
              Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-09 19:48 +0300
            Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 00:44 +1000
            Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-09 15:29 +0000
            Re: threading Terry Reedy <tjreedy@udel.edu> - 2014-04-09 12:14 -0400
            Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 02:25 +1000
            Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-09 16:32 +0000
            Re: threading Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-04-09 19:44 -0400
            Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 11:05 +1000
            Re: threading "Frank Millman" <frank@chagford.com> - 2014-04-10 11:17 +0200
            Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 19:40 +1000
            Re: threading "Frank Millman" <frank@chagford.com> - 2014-04-10 13:10 +0200
              Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-10 14:43 +0300
                Re: threading Roy Smith <roy@panix.com> - 2014-04-10 08:56 -0400
                Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-10 15:24 +0000
                  Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-10 19:20 +0300
                Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-11 01:32 +1000
                  Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-10 19:25 +0300
                    Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-11 03:08 +1000
                      Re: threading Rustom Mody <rustompmody@gmail.com> - 2014-04-10 11:14 -0700
                        Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-10 22:44 +0300
                          Re: threading Rustom Mody <rustompmody@gmail.com> - 2014-04-10 13:21 -0700
                            Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-10 23:44 +0300
                              Re: threading Rustom Mody <rustompmody@gmail.com> - 2014-04-10 22:15 -0700
                                Re: threading Rustom Mody <rustompmody@gmail.com> - 2014-04-10 23:50 -0700
                                  Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-11 18:36 +0300
                                    Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-12 01:53 +1000
                                    Re: threading Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-11 16:58 +0100
                                    Re: threading Rustom Mody <rustompmody@gmail.com> - 2014-04-11 11:54 -0700
                                      Re: threading Marko Rauhamaa <marko@pacujo.net> - 2014-04-11 22:27 +0300
                          Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-11 01:51 +0200
                            Re: threading Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-11 05:35 +0000
                              Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-11 09:26 +0000
                              Re: threading Roy Smith <roy@panix.com> - 2014-04-11 08:36 -0400
                                Re: threading Grant Edwards <invalid@invalid.invalid> - 2014-04-11 16:18 +0000
                          Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-11 02:21 +0200
                          Re: threading Terry Reedy <tjreedy@udel.edu> - 2014-04-10 20:23 -0400
            Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-10 21:19 +1000
        Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-08 02:06 +0000
          Re: threading alister <alister.nospam.ware@ntlworld.com> - 2014-04-08 11:07 +0000
            Re: threading Roy Smith <roy@panix.com> - 2014-04-08 09:13 -0400
              Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-08 23:23 +1000
                Re: threading alister <alister.nospam.ware@ntlworld.com> - 2014-04-08 14:15 +0000
                  Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-08 16:06 +0000
              Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-08 15:40 +0000
                Re: threading Paul Rubin <no.email@nospam.invalid> - 2014-04-08 09:46 -0700
                  Re: threading Chris Angelico <rosuav@gmail.com> - 2014-04-09 02:46 +1000
                  Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-08 17:17 +0000
            Re: threading Sturla Molden <sturla.molden@gmail.com> - 2014-04-08 15:19 +0000

Page 1 of 6  [1] 2 3 4 5 6  Next page →


#69792 — Re: threading

FromBen Finney <ben+python@benfinney.id.au>
Date2014-04-07 13:05 +1000
SubjectRe: threading
Message-ID<mailman.8969.1396839923.18130.python-list@python.org>
Onder Hazaroglu <oxhazaroglu@ualr.edu> writes:

> I've been using threading library to run some experiments parallel.

Threading is very difficult to get right, much more so than the usual
separation into distinct processes. How did you decide against the
normal means of parallel execution and instead choose threading?

> There is no message passing between my threads but still it messes up
> somehow. The results are different than running it separated.

Yes, this is a common result of threading; problems are much harder to
reproduce and much more entangled with apparently unrelated factors.
This is one of the main reasons to avoid threading if at all feasible.

> Is there a way to make sure that there is no memory sharing between
> threads?

The *whole point* of threading (AFAIK) is to share memory and other
process-distinct resources. If you're looking to avoid that, don't use
threading! Instead, use separate processes for parallel execution.

Parallel processing is achieved much more reliably and deterministically
with separate processes. Python even makes this much easier than most
languages, with the ‘multiprocessing’ module in the standard library
<URL:https://docs.python.org/3/library/multiprocessing.html>.

I would recommend you make easier-to-understand and easier-to-debug code
with that module, and only consider threading if you determine it's
needed.

-- 
 \                “Stop — Drive sideways.” —detour sign, Kyushu, Japan |
  `\                                                                   |
_o__)                                                                  |
Ben Finney

[toc] | [next] | [standalone]


#69795

FromRoy Smith <roy@panix.com>
Date2014-04-06 23:48 -0400
Message-ID<roy-A4A3E7.23484606042014@news.panix.com>
In reply to#69792
In article <mailman.8969.1396839923.18130.python-list@python.org>,
 Ben Finney <ben+python@benfinney.id.au> wrote:

> The *whole point* of threading (AFAIK) is to share memory and other
> process-distinct resources.

There is (or at least, was) another reason.  Creating a new process used 
to be far more expensive than creating a new thread.  In modern  Unix 
kernels, however, the cost difference has become much less, so this is 
no longer a major issue.

I agree wholeheartedly with Ben when he says:

> Parallel processing is achieved much more reliably and deterministically
> with separate processes.

Threading makes it incredibly difficult to reason about program 
execution.  It's not just that things happen asynchronously, the control 
flow changes happen at arbitrary times.

[toc] | [prev] | [next] | [standalone]


#69796

FromChris Angelico <rosuav@gmail.com>
Date2014-04-07 13:56 +1000
Message-ID<mailman.8970.1396843004.18130.python-list@python.org>
In reply to#69795
On Mon, Apr 7, 2014 at 1:48 PM, Roy Smith <roy@panix.com> wrote:
> There is (or at least, was) another reason.  Creating a new process used
> to be far more expensive than creating a new thread.  In modern  Unix
> kernels, however, the cost difference has become much less, so this is
> no longer a major issue.

Unix maybe, but what about Windows? Is it efficient to create
processes under Windows?

ChrisA

[toc] | [prev] | [next] | [standalone]


#69806

FromRoy Smith <roy@panix.com>
Date2014-04-07 08:26 -0400
Message-ID<roy-647F0B.08260107042014@news.panix.com>
In reply to#69796
In article <mailman.8970.1396843004.18130.python-list@python.org>,
 Chris Angelico <rosuav@gmail.com> wrote:

> On Mon, Apr 7, 2014 at 1:48 PM, Roy Smith <roy@panix.com> wrote:
> > There is (or at least, was) another reason.  Creating a new process used
> > to be far more expensive than creating a new thread.  In modern  Unix
> > kernels, however, the cost difference has become much less, so this is
> > no longer a major issue.
> 
> Unix maybe, but what about Windows? Is it efficient to create
> processes under Windows?

Whether something works well on Windows is really not something I worry 
about a lot.

[toc] | [prev] | [next] | [standalone]


#69807

FromChris Angelico <rosuav@gmail.com>
Date2014-04-07 22:34 +1000
Message-ID<mailman.8974.1396874103.18130.python-list@python.org>
In reply to#69806
On Mon, Apr 7, 2014 at 10:26 PM, Roy Smith <roy@panix.com> wrote:
> In article <mailman.8970.1396843004.18130.python-list@python.org>,
>  Chris Angelico <rosuav@gmail.com> wrote:
>
>> On Mon, Apr 7, 2014 at 1:48 PM, Roy Smith <roy@panix.com> wrote:
>> > There is (or at least, was) another reason.  Creating a new process used
>> > to be far more expensive than creating a new thread.  In modern  Unix
>> > kernels, however, the cost difference has become much less, so this is
>> > no longer a major issue.
>>
>> Unix maybe, but what about Windows? Is it efficient to create
>> processes under Windows?
>
> Whether something works well on Windows is really not something I worry
> about a lot.

It's a concern for some of us. Maybe one day supporting Windows will
be like supporting Python 2.4 is now - something that only a few
people do, and knowingly pay the complexity price for it - but for
now, it's a fully-supported platform for a lot of Python software, so
in a generic discussion, I'd say it's important to note it. Threading
has NOT been entirely replaced with multiprocessing.

ChrisA

[toc] | [prev] | [next] | [standalone]


#69808

FromRoy Smith <roy@panix.com>
Date2014-04-07 09:22 -0400
Message-ID<roy-51DA56.09221207042014@news.panix.com>
In reply to#69807
In article <mailman.8974.1396874103.18130.python-list@python.org>,
 Chris Angelico <rosuav@gmail.com> wrote:

> On Mon, Apr 7, 2014 at 10:26 PM, Roy Smith <roy@panix.com> wrote:
> > Whether something works well on Windows is really not something I worry
> > about a lot.
> 
> It's a concern for some of us.

You have my sympathy.

> it's a fully-supported platform for a lot of Python software, so in a 
> generic discussion, I'd say it's important to note it.

In all things technology related, there is an evolutionary path.  It 
goes something like this:

* bleeding edge
* avant-garde
* what the kewl kids are using
* modern
* mainstream
* traditional
* corporate standard
* legacy
* extended support
* prehistoric

I figure Windows (at least on the desktop) is legacy at this point.  Or, 
in the case of XP (The Release That Wouldn't Die), extended support.  I 
acknowledge it exists, and is still commercially important, and even has 
certain advantages, in the same way that I acknowledge the continued 
existence of incandescent light bulbs, POTS, C++, and film photography.

I put threading in the same category.  There are two major reasons for 
using threading: as an architectural pattern for doing non-blocking I/O, 
and to allow a program to take advantage of multiple processors in a 
single machine.  Fortunately, we have figured out better ways to do both 
of those.  The idea that we should continue to use threading just 
because Windows makes process creation hideously expensive compared to 
thread creation doesn't impress me as an argument in favor of threading.  
It impresses me as an argument in favor of ditching Windows.

When I started using Python (1.4), it was somewhere around avant-garde.  
Now, I figure it's mainstream, which probably means it's time for me to 
move on to something else soon :-)

[toc] | [prev] | [next] | [standalone]


#69809

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-04-07 14:41 +0100
Message-ID<mailman.8975.1396878092.18130.python-list@python.org>
In reply to#69808
On 07/04/2014 14:22, Roy Smith wrote:
>
> When I started using Python (1.4), it was somewhere around avant-garde.
> Now, I figure it's mainstream, which probably means it's time for me to
> move on to something else soon :-)
>

Python 2.8?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

[toc] | [prev] | [next] | [standalone]


#69810

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-04-07 16:49 +0300
Message-ID<87zjjxp7uv.fsf@elektro.pacujo.net>
In reply to#69808
Roy Smith <roy@panix.com>:

> The idea that we should continue to use threading just because Windows
> makes process creation hideously expensive compared to thread creation
> doesn't impress me as an argument in favor of threading. It impresses
> me as an argument in favor of ditching Windows.

There are many reasons to start processes or threads. One of them is
performance (you have more than one CPU core). When performance is the
objective, my rough guidelines would be:

 * Start your processes during initialization.

 * Start about twice as many processes as there are CPUs.

IOW, the processes are there to exercise the CPUs and should not
represent individual connections or other dynamic entities.

I don't program for Windows, but that's the approach I would take under
linux as well.


Marko

[toc] | [prev] | [next] | [standalone]


#69813

FromChris Angelico <rosuav@gmail.com>
Date2014-04-08 00:27 +1000
Message-ID<mailman.8978.1396880827.18130.python-list@python.org>
In reply to#69810
On Mon, Apr 7, 2014 at 11:49 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Roy Smith <roy@panix.com>:
>
>> The idea that we should continue to use threading just because Windows
>> makes process creation hideously expensive compared to thread creation
>> doesn't impress me as an argument in favor of threading. It impresses
>> me as an argument in favor of ditching Windows.
>
> There are many reasons to start processes or threads. One of them is
> performance (you have more than one CPU core). When performance is the
> objective, my rough guidelines would be:
>
>  * Start your processes during initialization.
>
>  * Start about twice as many processes as there are CPUs.
>
> IOW, the processes are there to exercise the CPUs and should not
> represent individual connections or other dynamic entities.

That's potentially brutal on a shared system! I hope it's controlled
by an option, or that you do this only in something you're writing for
yourself alone.

There are other reasons for forking per connection, though, such as
state cleanup. You can guarantee that each job is done in a consistent
state if it's spawned from the exact same point in the master process
every time. That can help enormously if you're allowing any sort of
foreign code, even from a trusted programmer.

ChrisA

[toc] | [prev] | [next] | [standalone]


#69815

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-04-07 17:51 +0300
Message-ID<87vbulp50g.fsf@elektro.pacujo.net>
In reply to#69813
Chris Angelico <rosuav@gmail.com>:

> On Mon, Apr 7, 2014 at 11:49 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
>> Roy Smith <roy@panix.com>:
>> IOW, the processes are there to exercise the CPUs and should not
>> represent individual connections or other dynamic entities.
>
> That's potentially brutal on a shared system! I hope it's controlled
> by an option, or that you do this only in something you're writing for
> yourself alone.

I'm thinking of a dedicated system here and exploiting the available CPU
resources as efficiently as possible.


> There are other reasons for forking per connection, though, such as
> state cleanup.

If we are talking about a handful of connections, a single asyncio
process will be all you need (and will be gentle to other users of the
shared system). When your server has to deal with thousands of
simultaneous connections, spawning a process for each connection is
probably not the optimal approach.

It is precisely the scalability issues that caused Windows and Java go
back to event-driven processing (that was prevalent in GUI design from
the get-go). A company I used to work for was bitten badly by the
multithreaded classic Java I/O, and a NIO overhaul was required when the
connection count went to 500 and beyond.


Marko

[toc] | [prev] | [next] | [standalone]


#69816

FromChris Angelico <rosuav@gmail.com>
Date2014-04-08 01:12 +1000
Message-ID<mailman.8980.1396883576.18130.python-list@python.org>
In reply to#69815
On Tue, Apr 8, 2014 at 12:51 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Chris Angelico <rosuav@gmail.com>:
>
>> On Mon, Apr 7, 2014 at 11:49 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
>>> Roy Smith <roy@panix.com>:
>>> IOW, the processes are there to exercise the CPUs and should not
>>> represent individual connections or other dynamic entities.
>>
>> That's potentially brutal on a shared system! I hope it's controlled
>> by an option, or that you do this only in something you're writing for
>> yourself alone.
>
> I'm thinking of a dedicated system here and exploiting the available CPU
> resources as efficiently as possible.

Huh. I don't remember the last time I worked on any system that could
be dedicated to one single job. My servers are all carrying multiple
services (HTTP, SMTP, IMAP, DNS, database, maybe a MUD or two...), my
desktop computer doubles as a router and a VM host and a server for a
few internal things (the NIV 1984 translation of the Bible is hosted
there, for convenience, as is my RSS reader), etc, etc, etc. Ages
since I've had enough physical hardware that I can afford to say
"You're *just* the XYZ server and nothing else". At very least, I'll
usually want to have some spare CPU cycles so I can plop a backup
service on there (eg a PostgreSQL replicating clone, or a fail-over
HTTP server, or a secondary DNS), but mainly, I've been working for
the past however-many years under budget constraints. Oh the luxury of
a dedicated application server.

But that's why I said "writing for yourself alone", or govern it with
an option. For any sort of general server software, it should be able
to cope with a shared system. (And that should probably be the default
- anyone who's running a dedicated system will normally already be
aware that most programs need to be tweaked before you get maximum
throughput out of them.)

ChrisA

[toc] | [prev] | [next] | [standalone]


#69812

FromChris Angelico <rosuav@gmail.com>
Date2014-04-08 00:24 +1000
Message-ID<mailman.8977.1396880663.18130.python-list@python.org>
In reply to#69808
On Mon, Apr 7, 2014 at 11:22 PM, Roy Smith <roy@panix.com> wrote:
> In all things technology related, there is an evolutionary path.  It
> goes something like this:
>
> * bleeding edge
> * avant-garde
> * what the kewl kids are using
> * modern
> * mainstream
> * traditional
> * corporate standard
> * legacy
> * extended support
> * prehistoric
>
> I figure Windows (at least on the desktop) is legacy at this point.  Or,
> in the case of XP (The Release That Wouldn't Die), extended support.  I
> acknowledge it exists, and is still commercially important, and even has
> certain advantages, in the same way that I acknowledge the continued
> existence of incandescent light bulbs, POTS, C++, and film photography.

And technologies can be, at the same time, at different points
depending on where you look. To many people, OS/2 is prehistoric; to
us, it's legacy. Incandescent light bulbs are legacy in a lot of
places, but corporate standard in theatres (the modern replacement is
LEDs, but their colors are distinctly different so you can't just pull
out an incan and stick in an LED). Same goes for plenty of other
technologies.

To a lot of people, Windows is mainstream, and Linux is "what the
non-cool kids are using", which doesn't exactly fit on your scale
anywhere :) So if your audience is that sort of person, then to you
Windows has to be considered mainstream or at least traditional, with
Linux being the modern option that you're trying to push people onto.
That's how I am with my MUD client. People use Windows, Mac OS, and
Linux (plus various mobile devices, which I don't support); I'd like
to push more people to Linux, but as a second-best, I can get them
onto the same client that I'm developing on Linux, which minimizes the
cross-platform development work. That's unlikely to change any time
soon, so Windows support has to be a part of what I do.

Doesn't mean I can't look with envy at projects that have dropped
Windows support altogether and saved themselves a mess of trouble...

ChrisA

[toc] | [prev] | [next] | [standalone]


#69916

FromRick Johnson <rantingrickjohnson@gmail.com>
Date2014-04-08 18:09 -0700
Message-ID<4a24f218-158a-4a21-af36-5cc69ce1f7e1@googlegroups.com>
In reply to#69796
A overview of the Py-Venactular used in this thread: 
by Professor Rick

############################################################
#                       Finny Said:                        #
############################################################
# "Threading is very difficult to get right"               #
############################################################

Hmm, and I wonder how difficult threading would be to "get"
left? Or perhaps  the proper explanation would be:

    "Using the Python threading module *correctly* can be
    difficult to *contemplate* by mere mortals (and even
    most experts, just ask GvR!).
 
Which can be future trimmed to: 

    "If the implementation is difficult to explain (or use),
    it's probably a bad idea. -PythonZen
        
############################################################
#                        Roy Said:                         #
############################################################
# "Threading makes it incredibly difficult to reason about #
# program execution."                                      #
############################################################

Makes "what" incredibly difficult? Makes *reasoning* very
difficult?

############################################################
#                        Roy Said:                         #
############################################################
# "It's not just that things happen asynchronously, the    #
# control flow changes happen at arbitrary times."         #
############################################################

Your first four words are superfluous and could have simply
been replaced with "because" or "since". Below I've joined
both sentences into a complete thought, observe:

    "Threading renders reasoning of program execution
    difficult, because of unpredictable control flow."
        
    "Since control flow is unpredictable, use of the Python
    threading module is not advised when parallel processing
    will suffice."
    
############################################################
#                       Chris Said:                        #
############################################################
# Is it efficient to create processes under Windows?       #
############################################################

Is "what" efficient? Creating processes? You just said that!
Now I'm confused? :-(

############################################################
#                       Marko Said:                        #
############################################################
# Another way to look at it...[snip]                       #
############################################################

Look at what? There should be no visual learners here. 

############################################################
#                       Marko Said:                        #
############################################################
# I don't think it worked out all that well.               #
############################################################
        
If you want to poke a stick in someones eye then do it
explicitly, don't be a wuss by using implicit expletives.
Instead you could have post fixed this snarky remark to your
main idea: "-- Obviously the attempt was an abysmal
failure!".


############################################################
#                        Paul said:                        #
############################################################
# I keep hearing about all the perils of threading bugs    #
# and it just hasn't happened to me in Python as far as I  #
# know.                                                    #
############################################################

What has not happened to you? "threading bugs"?

============================================================
 Summary:
============================================================
I'm far too lazy to continue on --since the transcribing and
corrections for just this "relatively short" thread could
take hours--, and my intentions are not to belittle any of
our fine community members, however, sometimes we all need
to be reminded of our own weaknesses. 

I would hope that my fellow members would consider investing
more thought into the structure and coherency of their
posts. A little proof reading can go a long way you know!
But most importantly, i would hope that they might realize
the damage done not only to the coherency of this groups
message from the habitual usage of expletives, but also, to
their own logical expression of ideas.

So, next time you find yourself writing the word "it", stop
and ask yourself these questions:

    "What is "it" referring to? 
    
    "Did i unconsciously use "it" to beg the question, or
    underscore the obvious?"    
    
    "Does the removal of "it" from this sentence effect the
    interpretation of my expression?"    
    
You see, there are very few instances where an "it" is
required, and if you're communication skills are honed you
can just about never use the word "it" again.

============================================================
 "It", FINALLY EXPLAINED!!!
============================================================

    "IT" IS A CRUTCH WIELDED BY LAZY COMMUNICATORS. 

I warn you that not only will "it" impede the interpretation
of your ideas, "it" will also degrade your ability to think
clearly when expressing yourself and slow (or completely
halt) your linguistic evolution.

    HAVE YOU NOTICED THAT YOUR INNER MONOLOGUE NEVER USES "IT"? 

Indeed! 

That's because "it" is a habitual viral infestation of the
human communication interface. "It" cannot exits in the
purely logical realm of the mind. We must stop the future
propagation of "it" and work to eradicate "it" from our
vernacular if we wish to achieve logical nirvana.

[toc] | [prev] | [next] | [standalone]


#69950

From"Neil D. Cerutti" <neilc@norwich.edu>
Date2014-04-09 09:50 -0400
Message-ID<mailman.9075.1397051475.18130.python-list@python.org>
In reply to#69916
On 4/8/2014 9:09 PM, Rick Johnson wrote:
> I warn you that not only will "it" impede the interpretation
> of your ideas, "it" will also degrade your ability to think
> clearly when expressing yourself and slow (or completely
> halt) your linguistic evolution.
>
>      HAVE YOU NOTICED THAT YOUR INNER MONOLOGUE NEVER USES "IT"?
>
> Indeed!
>
> That's because "it" is a habitual viral infestation of the
> human communication interface.

It strikes me that that's not superior to it. It's ironic that that 
would be used in place of it in your rant.

Plus Rufus Xavier Sasparilla disagrees with it.

-- 
Neil Cerutti

[toc] | [prev] | [next] | [standalone]


#69961

FromRick Johnson <rantingrickjohnson@gmail.com>
Date2014-04-09 08:51 -0700
Message-ID<e8f9a639-fff7-4f82-a83f-8bf32eae4126@googlegroups.com>
In reply to#69950
On Wednesday, April 9, 2014 8:50:59 AM UTC-5, Neil D. Cerutti wrote:
> [...]
> Plus Rufus Xavier Sasparilla disagrees with it.

If you think you're going to argue in such an implicit manner
as to the benefits of pronouns, then you should expect that
an astute logician such as myself will tear you to shreds.

############################################################
#                        WARNING:                          #
############################################################
# You cannot wave shiny objects in front of MY eyes and    #
# expect me to fold like a lawn-chair!                     #
############################################################

And whist i admit your snarky comment is founded on a
*superficial* fact that cannot be denied,(that is: the fact
that pronouns remove superfluous repetition from
communications), most people will be so distracted by the
initial emotional response of laughter, that they will lose
their logical focus and fortitude, and forget to confirm the
validity of your assertion.

Your comment is a fine example of why people like Bill Mahr,
Steve Colbert, and , uh, that other guy??? can pacify
otherwise intelligent people via comedy whist their civil
liberties are robbed from them and justice is ignored. Does
"fiddling" and "Rome" ring a bell people?

############################################################
#                        Summary:                          #
############################################################
# You comment is cleaver propaganda, but (as we shall all   #
# learn soon) in no way shape or form is your assertion    #
# *logical* or *resilient* to interrogations.               #
############################################################

Now, before i utterly destroy you, we must first *ALL* take
a lesson in linguistics.

############################################################
#                       Define Noun:                       #
############################################################
# a word (other than a pronoun) used to identify any of a  #
# class of people, places, or things                       #
############################################################

############################################################
#                    Define "Pronoun":                     #
############################################################
# In linguistics and grammar, a pronoun is a word or form  #
# that substitutes for a noun or noun phrase.              #
############################################################

Pronouns are simply shorthands versions of nouns. We use
them to reduce the amount of atomic repetition in our speech
and writing, at that's a good thing! No one wants to inject
superfluous repetition into their prose. This, is the very
argument that my good friend "Mr. Cerutti" is presenting
with his *esoteric* reference to "Rufus Xavier Sasparilla"
-- of whom I will refer to from now on as "Mr.RXS"

Whist i agree with my opponent and "MR.RXS" on this one tiny
aspect of pronouns, we must dig deeper to understand why
"Mr. Cerutti's" argument is invalid to the subject matter
for which he is replying. The only way Mr Cerutti's comment
could be valid is if i argued that *ALL* pronouns are
evil, and that is NOT my argument.  MY ARGUMENT IS HIGHLY
SPECIFIC!

############################################################
#                  Inquisitive Joe asks:                   #
############################################################
# "But why do you single out "it" for excommunication      #
# Rick? What is so bad about "it"?"                        #
############################################################

My argument is simply that the pronoun "it", is a
superfluously implicit use of pronouns! Since "it" can refer
to either a "person", a "place" or even a "thing", it
therefor injects too much ambiguity EVEN when "properly"[1]
used.

But not only is the ambiguity of the "it" pronoun an
unfortunate ubiquity, the manner in which the pronoun "it"
is referenced will many times manifest itself in confusing
manners. Observe the following three sentences which use
"it" in  illogically ascending orders of incomprehensibility:

    1. I ate a burger, and it was good.
    
    The first example is not terribly difficult to grok
    since the noun "burger" is defined before the pronoun
    "it" is declared and then logically bound to "burger".
    
    2. It was a good day today.
    
    In the second example we have the "it" at the very
    beginning of the sentence, therefore, i must not only
    read and comprehend the remainder of the sentence, but, i
    must also remember that i need to find the antecedent of
    the initial unbound pronoun "it".
    

    3. It irks me that language designers pay no attention
       to consistency.
        
    And the evil incarnation of the IMPLICIT PRONOUN raises
    it's ugly head!!!

Again we have the pronoun "it" declared as the very first
word of the sentence, however, the referent is missing, and
instead must be intuited! But the fun does not stop there
people, NO-NO-NO, after you go to all the work required to
intuit the referent, you then immediately realize that the
referent is *SUPERFLUOUS* and needs garbage collection! What
sort of sick joke is this? Heck, we have not even considered
the emotional states that must be mustered to empathize
with the authors' intent!!!

This last example is the height of illogical and superfluous
prose, and a fine example of the slippery slope that is
common to the "it" pronoun.

============================================================
 REFERENCES:
============================================================
[1]: I use the term "properly" loosely here, actually more
like sarcastically!

[toc] | [prev] | [next] | [standalone]


#69970

FromMRAB <python@mrabarnett.plus.com>
Date2014-04-09 18:47 +0100
Message-ID<mailman.9087.1397065677.18130.python-list@python.org>
In reply to#69961
On 2014-04-09 16:51, Rick Johnson wrote:
[snip]
>
>      3. It irks me that language designers pay no attention
>         to consistency.
>
>      And the evil incarnation of the IMPLICIT PRONOUN raises
>      it's ugly head!!!
>
The pronoun isn't implicit, because it's actually present!

(And it's "its ugly head", BTW.)

> Again we have the pronoun "it" declared as the very first
> word of the sentence, however, the referent is missing, and
> instead must be intuited! But the fun does not stop there
> people, NO-NO-NO, after you go to all the work required to
> intuit the referent, you then immediately realize that the
> referent is *SUPERFLUOUS* and needs garbage collection! What
> sort of sick joke is this? Heck, we have not even considered
> the emotional states that must be mustered to empathize
> with the authors' intent!!!
>
The referent isn't missing. The "it" refers to the postcedent clause
"that language designers..." that's the subject of the verb "irks". (A
postcedent is like an antecendent, except that it refers forwards to
something that follows instead of backwards to something that preceded.)

[toc] | [prev] | [next] | [standalone]


#69988

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2014-04-10 11:35 +1200
Message-ID<bqm3paFk4g5U1@mid.individual.net>
In reply to#69970
> On 2014-04-09 16:51, Rick Johnson wrote:
>> Again we have the pronoun "it" declared as the very first
>> word of the sentence, however, the referent is missing, and
>> instead must be intuited!

Pronoun referents *always* need to be intuited. There are
no mechanical rules for finding the referent of a pronoun
in an English sentence; you have to figure it out from what
makes the most sense given the context.

> (A
> postcedent is like an antecendent, except that it refers forwards to
> something that follows instead of backwards to something that preceded.)

Then there are even weirder cases, such as "It is raining
today", where the referent ("the weather" in this case) is
never explicitly mentioned at all!

-- 
Greg

[toc] | [prev] | [next] | [standalone]


#69990

FromRoy Smith <roy@panix.com>
Date2014-04-09 19:53 -0400
Message-ID<roy-5FEF4E.19532609042014@news.panix.com>
In reply to#69988
In article <bqm3paFk4g5U1@mid.individual.net>,
 Gregory Ewing <greg.ewing@canterbury.ac.nz> wrote:

> > On 2014-04-09 16:51, Rick Johnson wrote:
> >> Again we have the pronoun "it" declared as the very first
> >> word of the sentence, however, the referent is missing, and
> >> instead must be intuited!
> 
> Pronoun referents *always* need to be intuited. There are
> no mechanical rules for finding the referent of a pronoun
> in an English sentence; you have to figure it out from what
> makes the most sense given the context.
> 
> > (A
> > postcedent is like an antecendent, except that it refers forwards to
> > something that follows instead of backwards to something that preceded.)
> 
> Then there are even weirder cases, such as "It is raining
> today", where the referent ("the weather" in this case) is
> never explicitly mentioned at all!

It's even more ambiguous in Spanish.  Esta lloviendo.  Not only do you 
get to intuit the referrent, you get to intuit the pronoun too :-)

Natural language is a wonderfully expressive thing.  I open the window, 
stick my head out, look up at the sky, and say, "Raining".  Forget the 
pronoun, I don't even have a verb.  And yet everybody understands 
exactly what I mean.

[toc] | [prev] | [next] | [standalone]


#69991

FromAndrew Berg <robotsondrugs@gmail.com>
Date2014-04-09 19:02 -0500
Message-ID<mailman.9100.1397088173.18130.python-list@python.org>
In reply to#69990
On 2014.04.09 18:53, Roy Smith wrote:
> It's even more ambiguous in Spanish.  Esta lloviendo.  Not only do you 
> get to intuit the referrent, you get to intuit the pronoun too :-)
And in this particular instance, you have to figure out that 'está' (verb) was meant instead of 'esta' (adjective). :)

-- 
CPython 3.4.0 | Windows NT 6.2.9200 / FreeBSD 10.0

[toc] | [prev] | [next] | [standalone]


#70000

FromSteven D'Aprano <steve@pearwood.info>
Date2014-04-10 02:43 +0000
Message-ID<53460553$0$11109$c3e8da3@news.astraweb.com>
In reply to#69990
On Wed, 09 Apr 2014 19:53:26 -0400, Roy Smith wrote:

> Natural language is a wonderfully expressive thing.  I open the window,
> stick my head out, look up at the sky, and say, "Raining".  Forget the
> pronoun, I don't even have a verb.  And yet everybody understands
> exactly what I mean.

Not everybody. There's always someone like Rick, who I'm sure will claim 
that he cannot understand a sentence like "Raining". The curious thing 
is, his claim to have less understanding of his own native tongue than a 
two-year-old is probably put on to prove how he is so much smarter than 
everyone else.

"You people are SO DUMB!!! You cannot use plane English! Your so dumb i 
can't even understand you're sentences! Wake up sheeple and learn to 
right proper English!"



-- 
Steven

[toc] | [prev] | [next] | [standalone]


Page 1 of 6  [1] 2 3 4 5 6  Next page →

Back to top | Article view | comp.lang.python


csiph-web