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


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

Stack Overflow moderator “animuson”

Started byMats Peterson <matsp999@aim.com>
First post2013-07-10 07:55 +0000
Last post2013-07-19 20:47 -0400
Articles 20 on this page of 67 — 24 participants

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


Contents

  Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 07:55 +0000
    Re: Stack Overflow moderator “animuson” Chris Angelico <rosuav@gmail.com> - 2013-07-10 18:26 +1000
      Re: Stack Overflow moderator “animuson” Steven D'Aprano <steve@pearwood.info> - 2013-07-10 08:37 +0000
        Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 08:33 +0000
          Re: Stack Overflow moderator “animuson” Chris Angelico <rosuav@gmail.com> - 2013-07-10 18:50 +1000
            Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 08:46 +0000
              Re: Stack Overflow moderator “animuson” Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-10 03:12 -0600
                Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 09:13 +0000
              Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-10 10:52 +0100
              Re: Stack Overflow moderator “animuson” Robert Kern <robert.kern@gmail.com> - 2013-07-10 12:08 +0100
              Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-10 12:15 +0100
              Re: Stack Overflow moderator “animuson” Skip Montanaro <skip@pobox.com> - 2013-07-10 06:52 -0500
              Re: Stack Overflow moder ator “animuson” Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-10 15:01 +0000
                Re: Stack Overflow moder ator “animuson” CM <cmpython@gmail.com> - 2013-07-11 00:36 -0700
            Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 08:50 +0000
              Re: Stack Overflow moderator “animuson” Chris Angelico <rosuav@gmail.com> - 2013-07-10 19:10 +1000
      Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 08:32 +0000
        Re: Stack Overflow moderator “animuson” Chris Angelico <rosuav@gmail.com> - 2013-07-10 18:46 +1000
          Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 08:43 +0000
            Re: Stack Overflow moderator “animuson” Michael Torrie <torriem@gmail.com> - 2013-07-10 22:20 -0600
        Re: Stack Overflow moderator “animuson” Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-10 03:00 -0600
      Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 08:42 +0000
        Re: Stack Overflow moderator “animuson” Chris Angelico <rosuav@gmail.com> - 2013-07-10 19:02 +1000
          Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 09:01 +0000
            Re: Stack Overflow moderator “animuson” Chris Angelico <rosuav@gmail.com> - 2013-07-10 19:39 +1000
              Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 12:22 +0000
                Re: Stack Overflow moderator “animuson” Michael Torrie <torriem@gmail.com> - 2013-07-10 22:26 -0600
        Re: Stack Overflow moderator “animuson” Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-10 03:06 -0600
          Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 09:03 +0000
            Re: Stack Overflow moderator “animuson” Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-07-10 13:14 +0200
              Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 12:01 +0000
                Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-10 13:13 +0100
            Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-10 12:19 +0100
            Re: StackOverflowmoderator “animuson” Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-10 16:03 +0000
    Re: Stack Overflow moderator “animuson” Steven D'Aprano <steve@pearwood.info> - 2013-07-10 09:00 +0000
      Re: Stack Overflow moderator “animuson” Steve Simmons <square.steve@gmail.com> - 2013-07-10 12:18 +0100
      Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 12:13 +0000
        Re: Stack Overflow moderator “animuson” Chris Angelico <rosuav@gmail.com> - 2013-07-10 22:22 +1000
        Re: Stack Overflow moderator “animuson” Skip Montanaro <skip@pobox.com> - 2013-07-10 07:35 -0500
        Re: Stack Overflow moderator “animuson” Paul Scott <pscott209@gmail.com> - 2013-07-10 14:27 +0200
        Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-10 13:39 +0100
        Re: Stack Overflow moderator “animuson” Skip Montanaro <skip@pobox.com> - 2013-07-10 08:12 -0500
        Re: Stack Overflow moderator “animuson” memilanuk <memilanuk@gmail.com> - 2013-07-10 07:34 -0700
        Re: Stack Overflow moderator “animuson” alex23 <wuwei23@gmail.com> - 2013-07-11 12:04 +1000
      Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-10 16:54 +0100
        Re: Stack Overflow moderator “animuson” Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-10 17:15 +0000
          Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-10 18:53 +0100
            Re: Stack Overflow moderator “animuson” Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-10 23:28 +0000
      Re: Stack Overflow moderator “animuson” Ethan Furman <ethan@stoneleaf.us> - 2013-07-10 09:18 -0700
      Re: Stack Overflow moderator “animuson” Joel Goldstick <joel.goldstick@gmail.com> - 2013-07-10 12:32 -0400
      Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-10 18:55 +0100
      Re: Stack Overflow moderator “animuson” Antoine Pitrou <solipsis@pitrou.net> - 2013-07-18 08:54 +0000
      Re: Stack Overflow moderator “animuson” wxjmfauth@gmail.com - 2013-07-19 11:54 -0700
        Re: Stack Overflow moderator “animuson” Chris Angelico <rosuav@gmail.com> - 2013-07-20 08:35 +1000
        Re: Stack Overflow moderator “animuson” Dave Angel <davea@davea.name> - 2013-07-19 19:14 -0400
        Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-20 11:27 +0100
    Re: Stack Overflow moderator “animuson” Joshua Landau <joshua@landau.ws> - 2013-07-10 12:12 +0100
      Re: Stack Overflow moderator “animuson” Mats Peterson <matsp999@aim.com> - 2013-07-10 12:06 +0000
        Re: Stack Overflow moderator “animuson” Benedict Verheyen <benedict.verheyen@gmail.com> - 2013-07-10 13:53 +0000
          Re: Stack Overflow moderator “animuson” alex23 <wuwei23@gmail.com> - 2013-07-11 12:08 +1000
        Re: Stack Overflow moderator “animuson” Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-10 10:02 -0600
        Re: Stack Overflow bans Mats Peterson (was Re: Stack Overflow moderator “animuson”) Michael Torrie <torriem@gmail.com> - 2013-07-10 22:38 -0600
    Re: Stack Overflow moderator “animuson” Benedict Verheyen <benedict.verheyen@gmail.com> - 2013-07-10 11:56 +0000
    Re: Stack Overflow  bans Mats Peterson (was Re: ....) Terry Reedy <tjreedy@udel.edu> - 2013-07-10 14:52 -0400
    Re: Stack Overflow moderator “animuson” Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-07-11 11:36 +0200
    Re: Stack Overflow moderator “animuson” Jake Angulo <jake.angulo@gmail.com> - 2013-07-19 17:33 +1000
    Re: Stack Overflow moderator “animuson” Kevin Walzer <kw@codebykevin.com> - 2013-07-19 20:47 -0400

Page 3 of 4 — ← Prev page 1 2 [3] 4  Next page →


#50354

FromJoshua Landau <joshua@landau.ws>
Date2013-07-10 13:39 +0100
Message-ID<mailman.4519.1373460851.3114.python-list@python.org>
In reply to#50347
On 10 July 2013 13:35, Skip Montanaro <skip@pobox.com> wrote:
>> Either that or it's funny only to other Australians.
>
> Or the Dutch.

Or us Brits.

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


#50355

FromSkip Montanaro <skip@pobox.com>
Date2013-07-10 08:12 -0500
Message-ID<mailman.4520.1373461932.3114.python-list@python.org>
In reply to#50347
On Wed, Jul 10, 2013 at 7:39 AM, Joshua Landau <joshua@landau.ws> wrote:
> On 10 July 2013 13:35, Skip Montanaro <skip@pobox.com> wrote:
>>> Either that or it's funny only to other Australians.
>>
>> Or the Dutch.
>
> Or us Brits.

Hells bells...  It appears everyone found it funny except the trolls.

S

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


#50360

Frommemilanuk <memilanuk@gmail.com>
Date2013-07-10 07:34 -0700
Message-ID<mailman.4524.1373466867.3114.python-list@python.org>
In reply to#50347
On 07/10/2013 05:39 AM, Joshua Landau wrote:
> On 10 July 2013 13:35, Skip Montanaro <skip@pobox.com> wrote:
>>> Either that or it's funny only to other Australians.
>>
>> Or the Dutch.
>
> Or us Brits.
>

Or the Yanks...

Normally I kill-file threads like this pretty early on, but I have to 
admit - I'm enjoying watching y'all play with the troll this time ;)

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


#50402

Fromalex23 <wuwei23@gmail.com>
Date2013-07-11 12:04 +1000
Message-ID<krl3h4$roj$1@dont-email.me>
In reply to#50347
On 10/07/2013 10:13 PM, Mats Peterson wrote:
> You're obviously trying hard to be funny. It fails miserably.

It's obvious that you are quite familiar with miserableness.

Also obvious is that animuson did the world of StackOverflow quite the 
favour. If only e moderated this list...

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


#50369

FromJoshua Landau <joshua@landau.ws>
Date2013-07-10 16:54 +0100
Message-ID<mailman.4530.1373471684.3114.python-list@python.org>
In reply to#50321
On 10 July 2013 10:00, Steven D'Aprano <steve@pearwood.info> wrote:
> On Wed, 10 Jul 2013 07:55:05 +0000, Mats Peterson wrote:
>
>> A moderator who calls himself “animuson” on Stack Overflow doesn’t want
>> to face the truth. He has deleted all my postings regarding Python
>> regular expression matching being extremely slow compared to Perl.
>
> That's by design. We don't want to make the same mistake as Perl, where
> every problem is solved by a regular expression:
>
> http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-numbers/
>
> so we deliberately make regexes as slow as possible so that programmers
> will look for a better way to solve their problem. If you check the
> source code for the re engine, you'll find that for certain regexes, it
> busy-waits for anything up to 30 seconds at a time, deliberately wasting
> cycles.

I hate to sound like this but do you realise that this is exactly what
you're arguing for when saying that sum() shouldn't use "+="?

(There is no spite in the above sentence, but it sounds like there is.
There is however no way obvious to me to remove it without changing
the sentence's meaning.)

> The same with Unicode. We hate French people,

And for good damn reason too. They're ruining our language, á mon avis.

> you see, and so in an
> effort to drive everyone back to ASCII-only text, Python 3.3 introduces
> some memory optimizations that ensures that Unicode strings work
> correctly and are up to four times smaller than they used to be. You
> should get together with jmfauth, who has discovered our dastardly plot
> and keeps posting benchmarks showing how on carefully contrived micro-
> benchmarks using a beta version of Python 3.3, non-ASCII string
> operations can be marginally slower than in 3.2.

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


#50383

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-07-10 17:15 +0000
Message-ID<51dd96a8$0$9505$c3e8da3$5496439d@news.astraweb.com>
In reply to#50369
On Wed, 10 Jul 2013 16:54:02 +0100, Joshua Landau wrote:

> On 10 July 2013 10:00, Steven D'Aprano <steve@pearwood.info> wrote:
>> On Wed, 10 Jul 2013 07:55:05 +0000, Mats Peterson wrote:
>>
>>> A moderator who calls himself “animuson” on Stack Overflow doesn’t
>>> want to face the truth. He has deleted all my postings regarding
>>> Python regular expression matching being extremely slow compared to
>>> Perl.
>>
>> That's by design. We don't want to make the same mistake as Perl, where
>> every problem is solved by a regular expression:
>>
>> http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-
numbers/
>>
>> so we deliberately make regexes as slow as possible so that programmers
>> will look for a better way to solve their problem. If you check the
>> source code for the re engine, you'll find that for certain regexes, it
>> busy-waits for anything up to 30 seconds at a time, deliberately
>> wasting cycles.
> 
> I hate to sound like this but do you realise that this is exactly what
> you're arguing for when saying that sum() shouldn't use "+="?

You're referencing an off-list conversation, which will probably confuse 
most others reading this.

I don't agree with that. Apart from one throw-away comment where I said 
that sometimes it is handy to have a trivial example of an O(N**2) 
algorithm for teaching purposes, I have never made any suggestion that 
having sum(lists) be slow was a good thing in and of itself. My argument 
has always been that there are costs as well as benefits to changing sum 
of lists to use += instead of + and I'm not convinced that the benefits 
outweigh those costs.

Quite frankly, looking at the pure-Python version of sum that Sergey has 
posted, I *really* hope he is a better C programmer than Python 
programmer, because his pure-Python version is so full of bugs it is 
ridiculous.  But now I'm also referring to posts off-list :-)



-- 
Steven

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


#50385

FromJoshua Landau <joshua@landau.ws>
Date2013-07-10 18:53 +0100
Message-ID<mailman.4542.1373478856.3114.python-list@python.org>
In reply to#50383
On 10 July 2013 18:15, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> On Wed, 10 Jul 2013 16:54:02 +0100, Joshua Landau wrote:
>
>> On 10 July 2013 10:00, Steven D'Aprano <steve@pearwood.info> wrote:
>>> On Wed, 10 Jul 2013 07:55:05 +0000, Mats Peterson wrote:
>>>
>>>> A moderator who calls himself “animuson” on Stack Overflow doesn’t
>>>> want to face the truth. He has deleted all my postings regarding
>>>> Python regular expression matching being extremely slow compared to
>>>> Perl.
>>>
>>> That's by design. We don't want to make the same mistake as Perl, where
>>> every problem is solved by a regular expression:
>>>
>>> http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-
> numbers/
>>>
>>> so we deliberately make regexes as slow as possible so that programmers
>>> will look for a better way to solve their problem. If you check the
>>> source code for the re engine, you'll find that for certain regexes, it
>>> busy-waits for anything up to 30 seconds at a time, deliberately
>>> wasting cycles.
>>
>> I hate to sound like this but do you realise that this is exactly what
>> you're arguing for when saying that sum() shouldn't use "+="?
>
> You're referencing an off-list conversation, which will probably confuse
> most others reading this.
>
> I don't agree with that. Apart from one throw-away comment where I said
> that sometimes it is handy to have a trivial example of an O(N**2)
> algorithm for teaching purposes, I have never made any suggestion that
> having sum(lists) be slow was a good thing in and of itself.

I might be misattributing posts then. Or... YOU'RE IN DENIAL!

Who wins? You decide!

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


#50398

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-07-10 23:28 +0000
Message-ID<51ddee0a$0$9505$c3e8da3$5496439d@news.astraweb.com>
In reply to#50385
On Wed, 10 Jul 2013 18:53:34 +0100, Joshua Landau wrote:

> I might be misattributing posts then. Or... YOU'RE IN DENIAL!

Ranting Rick? Is that you? 

:-)


> Who wins? You decide!

Ah, definitely not RR :-)


-- 
Steven

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


#50378

FromEthan Furman <ethan@stoneleaf.us>
Date2013-07-10 09:18 -0700
Message-ID<mailman.4536.1373473109.3114.python-list@python.org>
In reply to#50321
On 07/10/2013 08:54 AM, Joshua Landau wrote:
> On 10 July 2013 10:00, Steven D'Aprano <steve@pearwood.info> wrote:
>> On Wed, 10 Jul 2013 07:55:05 +0000, Mats Peterson wrote:
>>
>>> A moderator who calls himself “animuson” on Stack Overflow doesn’t want
>>> to face the truth. He has deleted all my postings regarding Python
>>> regular expression matching being extremely slow compared to Perl.
>>
>> That's by design. We don't want to make the same mistake as Perl, where
>> every problem is solved by a regular expression:
>>
>> http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-numbers/
>>
>> so we deliberately make regexes as slow as possible so that programmers
>> will look for a better way to solve their problem. If you check the
>> source code for the re engine, you'll find that for certain regexes, it
>> busy-waits for anything up to 30 seconds at a time, deliberately wasting
>> cycles.
>
> I hate to sound like this but do you realise that this is exactly what
> you're arguing for when saying that sum() shouldn't use "+="?

my_obj = SomeKoolClass()
my_obj.modify_in_some_kool_way()
new_result = sum([SKC1, SKC2, SKC3], my_obj)

Guess what?  You've just changed my_obj.

--
~Ethan~

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


#50379

FromJoel Goldstick <joel.goldstick@gmail.com>
Date2013-07-10 12:32 -0400
Message-ID<mailman.4537.1373473954.3114.python-list@python.org>
In reply to#50321

[Multipart message — attachments visible in raw view] — view raw

call your mom


On Wed, Jul 10, 2013 at 12:18 PM, Ethan Furman <ethan@stoneleaf.us> wrote:

> On 07/10/2013 08:54 AM, Joshua Landau wrote:
>
>> On 10 July 2013 10:00, Steven D'Aprano <steve@pearwood.info> wrote:
>>
>>> On Wed, 10 Jul 2013 07:55:05 +0000, Mats Peterson wrote:
>>>
>>>  A moderator who calls himself “animuson” on Stack Overflow doesn’t want
>>>> to face the truth. He has deleted all my postings regarding Python
>>>> regular expression matching being extremely slow compared to Perl.
>>>>
>>>
>>> That's by design. We don't want to make the same mistake as Perl, where
>>> every problem is solved by a regular expression:
>>>
>>> http://neilk.net/blog/2000/06/**01/abigails-regex-to-test-for-**
>>> prime-numbers/<http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-numbers/>
>>>
>>> so we deliberately make regexes as slow as possible so that programmers
>>> will look for a better way to solve their problem. If you check the
>>> source code for the re engine, you'll find that for certain regexes, it
>>> busy-waits for anything up to 30 seconds at a time, deliberately wasting
>>> cycles.
>>>
>>
>> I hate to sound like this but do you realise that this is exactly what
>> you're arguing for when saying that sum() shouldn't use "+="?
>>
>
> my_obj = SomeKoolClass()
> my_obj.modify_in_some_kool_**way()
> new_result = sum([SKC1, SKC2, SKC3], my_obj)
>
> Guess what?  You've just changed my_obj.
>
> --
> ~Ethan~
> --
> http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list>
>



-- 
Joel Goldstick
http://joelgoldstick.com

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


#50386

FromJoshua Landau <joshua@landau.ws>
Date2013-07-10 18:55 +0100
Message-ID<mailman.4543.1373478971.3114.python-list@python.org>
In reply to#50321
On 10 July 2013 17:18, Ethan Furman <ethan@stoneleaf.us> wrote:
> On 07/10/2013 08:54 AM, Joshua Landau wrote:
>>
>> On 10 July 2013 10:00, Steven D'Aprano <steve@pearwood.info> wrote:
>>>
>>> On Wed, 10 Jul 2013 07:55:05 +0000, Mats Peterson wrote:
>>>
>>>> A moderator who calls himself “animuson” on Stack Overflow doesn’t want
>>>> to face the truth. He has deleted all my postings regarding Python
>>>> regular expression matching being extremely slow compared to Perl.
>>>
>>>
>>> That's by design. We don't want to make the same mistake as Perl, where
>>> every problem is solved by a regular expression:
>>>
>>>
>>> http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-numbers/
>>>
>>> so we deliberately make regexes as slow as possible so that programmers
>>> will look for a better way to solve their problem. If you check the
>>> source code for the re engine, you'll find that for certain regexes, it
>>> busy-waits for anything up to 30 seconds at a time, deliberately wasting
>>> cycles.
>>
>>
>> I hate to sound like this but do you realise that this is exactly what
>> you're arguing for when saying that sum() shouldn't use "+="?
>
>
> my_obj = SomeKoolClass()
> my_obj.modify_in_some_kool_way()
> new_result = sum([SKC1, SKC2, SKC3], my_obj)
>
> Guess what?  You've just changed my_obj.

You're extrapolating too quickly. The first "+" is a copying "+", the
rest add in-place to the new object. Thus, no unexpected side effect.

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


#50847

FromAntoine Pitrou <solipsis@pitrou.net>
Date2013-07-18 08:54 +0000
Message-ID<mailman.4834.1374137681.3114.python-list@python.org>
In reply to#50321
Joshua Landau <joshua <at> landau.ws> writes:
> 
> > The same with Unicode. We hate French people,
> 
> And for good damn reason too. They're ruining our language, á mon avis.

We do!
<off to buy wine>

Regards

Antoine.

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


#50920

Fromwxjmfauth@gmail.com
Date2013-07-19 11:54 -0700
Message-ID<713bdf49-10ee-4694-b7c1-54beef22a922@googlegroups.com>
In reply to#50321
Le mercredi 10 juillet 2013 11:00:23 UTC+2, Steven D'Aprano a écrit :
> On Wed, 10 Jul 2013 07:55:05 +0000, Mats Peterson wrote:
> 
> 
> 
> > A moderator who calls himself “animuson” on Stack Overflow doesn’t want
> 
> > to face the truth. He has deleted all my postings regarding Python
> 
> > regular expression matching being extremely slow compared to Perl.
> 
> 
> 
> That's by design. We don't want to make the same mistake as Perl, where 
> 
> every problem is solved by a regular expression:
> 
> 
> 
> http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-numbers/
> 
> 
> 
> so we deliberately make regexes as slow as possible so that programmers 
> 
> will look for a better way to solve their problem. If you check the 
> 
> source code for the re engine, you'll find that for certain regexes, it 
> 
> busy-waits for anything up to 30 seconds at a time, deliberately wasting 
> 
> cycles.
> 
> 
> 
> The same with Unicode. We hate French people, you see, and so in an 
> 
> effort to drive everyone back to ASCII-only text, Python 3.3 introduces 
> 
> some memory optimizations that ensures that Unicode strings work 
> 
> correctly and are up to four times smaller than they used to be. You 
> 
> should get together with jmfauth, who has discovered our dastardly plot 
> 
> and keeps posting benchmarks showing how on carefully contrived micro-
> 
> benchmarks using a beta version of Python 3.3, non-ASCII string 
> 
> operations can be marginally slower than in 3.2.
> 
> 
> 
> 
> 
> > Additionally my account has been suspended for 7 days. Such a dickwad.
> 
> 
> 
> I cannot imagine why he would have done that.
> 
> 
> 
> 
> 
> -- 
> 
> Steven

This Flexible String Representation is a dream case study.
Attempting to optimize a subset of character is a non sense.

If you are a non-ascii user, such a mechanism is irrelevant,
because per definition you do not need it. Not only it useless,
it is penalizing, just by the fact of its existence. [*]

Conversely (or identically), if you are an ascii user, same situation,
it is irrelevant, useless and penalizing.

Practically, and today, all coding schemes we have
(including the endorsed Unicode utf transformers) work
with a unique set of of encoded code points. If you
wish to take the problem from the other side, it is
because one can only work properly with a unique set
of code points that so many coding schemes exist!

Question: does this FSR use internally three coding
schemes because it splits Unicode in three groups or
does it split Unicode in three subsets to have the joyce
to use three coding schemes?

About "micro benchmarks". What to say, they appear
practivally every time you use non ascii.

And do not forget memory. The €uro just become expensive.

>>> sys.getsizeof('$')
26
>>> sys.getsizeof('€')
40

I do not know. When an €uro char need 14 bytes more that
a dollar, I belong to those who thing there is a problem
somewhere.

This FSR is a royal gift for those who wish to teach Unicode
and the coding of characters.

jmf

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


#50925

FromChris Angelico <rosuav@gmail.com>
Date2013-07-20 08:35 +1000
Message-ID<mailman.4887.1374273361.3114.python-list@python.org>
In reply to#50920
On Sat, Jul 20, 2013 at 4:54 AM,  <wxjmfauth@gmail.com> wrote:
> And do not forget memory. The €uro just become expensive.
>
>>>> sys.getsizeof('
> )
> 26
>>>> sys.getsizeof('€')
> 40
>
> I do not know. When an €uro char need 14 bytes more that
> a dollar, I belong to those who thing there is a problem
> somewhere.

Oh, I totally agree. But it's not just the Euro symbol that's
expensive. Look how much I have to pay for a couple of square
brackets!

>>> sys.getsizeof((1))
14
>>> sys.getsizeof([1])
40

ChrisA

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


#50931

FromDave Angel <davea@davea.name>
Date2013-07-19 19:14 -0400
Message-ID<mailman.4892.1374275706.3114.python-list@python.org>
In reply to#50920
On 07/19/2013 06:35 PM, Chris Angelico wrote:
> On Sat, Jul 20, 2013 at 4:54 AM,  <wxjmfauth@gmail.com> wrote:
>> And do not forget memory. The €uro just become expensive.
>>
>>>>> sys.getsizeof('
>> )
>> 26
>>>>> sys.getsizeof('€')
>> 40
>>
>> I do not know. When an €uro char need 14 bytes more that
>> a dollar, I belong to those who thing there is a problem
>> somewhere.
>
> Oh, I totally agree. But it's not just the Euro symbol that's
> expensive. Look how much I have to pay for a couple of square
> brackets!
>
>>>> sys.getsizeof((1))
> 14
>>>> sys.getsizeof([1])
> 40
>

And look how much a comma costs us (on 64bit 3.3):

 >>> sys.getsizeof((1))
28
 >>> sys.getsizeof((1,))
64
 >>> sys.getsizeof([1])
80

;-)


-- 
DaveA

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


#50958

FromJoshua Landau <joshua@landau.ws>
Date2013-07-20 11:27 +0100
Message-ID<mailman.4914.1374316070.3114.python-list@python.org>
In reply to#50920
On 19 July 2013 23:35, Chris Angelico <rosuav@gmail.com> wrote:
> On Sat, Jul 20, 2013 at 4:54 AM,  <wxjmfauth@gmail.com> wrote:
>> And do not forget memory. The €uro just become expensive.
>>
>>>>> sys.getsizeof('
>> )
>> 26
>>>>> sys.getsizeof('€')
>> 40
>>
>> I do not know. When an €uro char need 14 bytes more that
>> a dollar, I belong to those who thing there is a problem
>> somewhere.
>
> Oh, I totally agree. But it's not just the Euro symbol that's
> expensive. Look how much I have to pay for a couple of square
> brackets!
>
>>>> sys.getsizeof((1))
> 14
>>>> sys.getsizeof([1])
> 40

But when you do it generically, square brackets save you space!

>>> sys.getsizeof((int))
392
>>> sys.getsizeof([int])
80

:D

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


#50338

FromJoshua Landau <joshua@landau.ws>
Date2013-07-10 12:12 +0100
Message-ID<mailman.4506.1373454772.3114.python-list@python.org>
In reply to#50304
On 10 July 2013 08:55, Mats Peterson <matsp999@aim.com> wrote:
> <Unjustified Insult>. [anumuson from Stack Overflow] has deleted all
> my postings regarding Python regular expression matching being
> extremely slow compared to Perl. Additionally my account has been
> suspended for 7 days. <Unjustified Insult>.

Whilst I don't normally respond to trolls, I'm actually curious.

Do you have any non-trivial, properly benchmarked real-world examples
that this affects, remembering to use full Unicode support in Perl (as
Python has it by default)?

Remember to try on both major CPython versions, and PyPy -- all of
which are in large-scale usage. Remember not just to use the builtin
re module, as most people also use https://pypi.python.org/pypi/regex
and https://code.google.com/p/re2/ when they are appropriate, so
pathological cases for re aren't actually a concern anyone cares
about.

If you actually can satisfy these basic standards for a comparison (as
I'm sure any competent person with so much bravo could) I'd be willing
to converse with you. I'd like to see these results where Python compares
as "extremely slow". Note that, by your own wording, a 30% drop is irrelevant.

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


#50345

FromMats Peterson <matsp999@aim.com>
Date2013-07-10 12:06 +0000
Message-ID<krjine$i2g$2@dont-email.me>
In reply to#50338
Joshua Landau <joshua@landau.ws> wrote:
> On 10 July 2013 08:55, Mats Peterson <matsp999@aim.com> wrote:
>> <Unjustified Insult>. [anumuson from Stack Overflow] has deleted all
>> my postings regarding Python regular expression matching being
>> extremely slow compared to Perl. Additionally my account has been
>> suspended for 7 days. <Unjustified Insult>.
>
> Whilst I don't normally respond to trolls, I'm actually curious.
>
> Do you have any non-trivial, properly benchmarked real-world examples
> that this affects, remembering to use full Unicode support in Perl (as
> Python has it by default)?
>
> Remember to try on both major CPython versions, and PyPy -- all of
> which are in large-scale usage. Remember not just to use the builtin
> re module, as most people also use https://pypi.python.org/pypi/regex
> and https://code.google.com/p/re2/ when they are appropriate, so
> pathological cases for re aren't actually a concern anyone cares
> about.
>
> If you actually can satisfy these basic standards for a comparison (as
> I'm sure any competent person with so much bravo could) I'd be willing
> to converse with you. I'd like to see these results where Python compares
> as "extremely slow". Note that, by your own wording, a 30% drop is irrelevant.

I haven't provided a "real-world" example, since I expect you Python
Einsteins to be able do an A/B test between Python and Perl yourselves 
(provided you know Perl, of course, which I'm afraid is not always the
case). And why would I use any "custom" version of Python, when I don't
have to do that with Perl?

Mats

-- 
Mats Peterson
http://alicja.homelinux.com/~mats/

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


#50356

FromBenedict Verheyen <benedict.verheyen@gmail.com>
Date2013-07-10 13:53 +0000
Message-ID<mailman.4521.1373464439.3114.python-list@python.org>
In reply to#50345
Op Wed, 10 Jul 2013 12:06:06 +0000, schreef Mats Peterson:

> I haven't provided a "real-world" example, since I expect you Python
> Einsteins to be able do an A/B test between Python and Perl yourselves
> (provided you know Perl, of course, which I'm afraid is not always the
> case). 

I don't know perl so I can't compare.

> And why would I use any "custom" version of Python, when I don't
> have to do that with Perl?

If you're able to do that with Perl, and Perl is faster that Python,
why would you want to bother with Python?
Seems like you already have a fast alternative you like.

-- 
Benedict Verheyen                       Debian, Python and Django user
GnuPG Public Key 0x712CBB8D

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


#50403

Fromalex23 <wuwei23@gmail.com>
Date2013-07-11 12:08 +1000
Message-ID<krl3o0$roj$2@dont-email.me>
In reply to#50356
On 10/07/2013 11:53 PM, Benedict Verheyen wrote:
> Op Wed, 10 Jul 2013 12:06:06 +0000, schreef Mats Peterson:
>> And why would I use any "custom" version of Python, when I don't
>> have to do that with Perl?
>
> If you're able to do that with Perl, and Perl is faster that Python,
> why would you want to bother with Python?

The OP has no interest in using Python, this is simply a perfect example 
of the effect of Dunbar's number.

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


Page 3 of 4 — ← Prev page 1 2 [3] 4  Next page →

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


csiph-web