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


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

Guido sees the light: PEP 8 updated

Started bySteven D'Aprano <steve@pearwood.info>
First post2016-04-16 14:38 +1000
Last post2016-04-18 05:45 +1000
Articles 20 on this page of 142 — 36 participants

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


Contents

  Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-16 14:38 +1000
    Re: Guido sees the light: PEP 8 updated Bob Martin <bob.martin@excite.com> - 2016-04-16 08:05 +0100
      Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-16 11:06 +0300
        Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-16 18:32 +1000
          Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-16 11:51 +0300
            Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-16 19:30 +1000
            Re: Guido sees the light: PEP 8 updated Michael Selik <michael.selik@gmail.com> - 2016-04-16 09:34 +0000
            Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-16 22:03 +1000
            Re: Guido sees the light: PEP 8 updated Stephen Hansen <me+python@ixokai.io> - 2016-04-16 05:32 -0700
            Re: Guido sees the light: PEP 8 updated Larry Martell <larry.martell@gmail.com> - 2016-04-16 10:53 -0400
              Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-16 19:51 +0300
                Re: Guido sees the light: PEP 8 updated Larry Martell <larry.martell@gmail.com> - 2016-04-16 12:58 -0400
                  Re: Guido sees the light: PEP 8 updated BartC <bc@freeuk.com> - 2016-04-16 19:18 +0100
                    Re: Guido sees the light: PEP 8 updated Larry Martell <larry.martell@gmail.com> - 2016-04-16 14:53 -0400
                    Re: Guido sees the light: PEP 8 updated alex wright <wrightalexw@gmail.com> - 2016-04-16 15:21 -0400
                    Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-16 19:08 -0400
                Re: Guido sees the light: PEP 8 updated Terry Reedy <tjreedy@udel.edu> - 2016-04-16 13:25 -0400
                  Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-16 21:33 +0300
                Re: Guido sees the light: PEP 8 updated Ethan Furman <ethan@stoneleaf.us> - 2016-04-16 12:07 -0700
                Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-17 06:08 +1000
                Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-16 16:50 -0500
                Re: Guido sees the light: PEP 8 updated Tim Delaney <timothy.c.delaney@gmail.com> - 2016-04-17 08:15 +1000
                  Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-17 01:30 +0300
                    Re: Guido sees the light: PEP 8 updated Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-17 07:38 -0600
                Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-16 19:02 -0400
                  Re: Guido sees the light: PEP 8 updated Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-17 00:25 +0100
                    Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-17 09:33 +1000
                      Re: Guido sees the light: PEP 8 updated Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-04-17 01:29 +0100
                    Re: Guido sees the light: PEP 8 updated alex wright <wrightalexw@gmail.com> - 2016-04-16 19:43 -0400
                Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-17 09:11 +1000
                Re: Guido sees the light: PEP 8 updated Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-16 23:19 +0000
                Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-16 19:12 -0500
                Re: Guido sees the light: PEP 8 updated MRAB <python@mrabarnett.plus.com> - 2016-04-17 01:24 +0100
                Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-16 20:30 -0500
                  Re: Guido sees the light: PEP 8 updated Coos Haak <chforth@hccnet.nl> - 2016-04-17 16:35 +0200
                    Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-17 13:11 -0500
                Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-16 21:59 -0400
                Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-16 20:44 -0700
                  Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-17 13:49 +1000
                    Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-17 18:39 -0700
                      Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-18 13:19 +1000
                        Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-17 20:48 -0700
                        Re: Guido sees the light: PEP 8 updated David Palao <dpalao.python@gmail.com> - 2016-04-18 13:35 +0200
                  Re: Guido sees the light: PEP 8 updated BartC <bc@freeuk.com> - 2016-04-17 11:04 +0100
                    Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-17 21:06 -0700
                      Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-18 21:03 +1200
                        Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-18 04:07 -0700
                  Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-17 14:01 +0300
                    Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-17 21:14 +1000
                      Re: Guido sees the light: PEP 8 updated BartC <bc@freeuk.com> - 2016-04-17 13:04 +0100
                      Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-17 15:10 +0300
                        Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-18 08:13 +1000
                    Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-18 11:57 +1000
                      Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-18 11:02 +0300
                        Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-18 20:43 +1200
                          Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-18 12:17 +0300
                Re: Guido sees the light: PEP 8 updated eryk sun <eryksun@gmail.com> - 2016-04-17 00:01 -0500
                Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-17 01:10 -0400
                Re: Guido sees the light: PEP 8 updated eryk sun <eryksun@gmail.com> - 2016-04-17 03:14 -0500
                Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-17 12:13 -0400
                Re: Guido sees the light: PEP 8 updated eryk sun <eryksun@gmail.com> - 2016-04-17 15:24 -0500
                Re: Guido sees the light: PEP 8 updated Michael Torrie <torriem@gmail.com> - 2016-04-17 14:41 -0600
                  Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-18 11:56 +1200
                    Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-17 20:29 -0400
                Re: Guido sees the light: PEP 8 updated Sivan Greenberg <sivan@vitakka.co> - 2016-04-18 16:35 +0300
                  Re: Guido sees the light: PEP 8 updated Pete Forman <petef4+usenet@gmail.com> - 2016-04-18 22:14 +0100
                    Re: Guido sees the light: PEP 8 updated Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-18 15:29 -0600
                      Re: Guido sees the light: PEP 8 updated Pete Forman <petef4+usenet@gmail.com> - 2016-04-18 23:20 +0100
                      Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-19 17:39 +1200
                    Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-19 08:58 +1000
                    Re: Guido sees the light: PEP 8 updated sohcahtoa82@gmail.com - 2016-04-18 18:19 -0700
                      Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-18 20:04 -0700
                        Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-18 23:29 -0400
                          Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-18 20:54 -0700
                            Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 00:11 -0400
                              Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 05:55 -0700
                                Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 10:05 -0400
                                Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 00:13 +1000
                        Re: Guido sees the light: PEP 8 updated Pete Forman <petef4+usenet@gmail.com> - 2016-04-19 08:34 +0100
                          Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-19 18:04 +1000
                          Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-19 11:09 +0300
                            Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-19 18:17 +1000
                              Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 04:37 -0700
                                Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 08:17 -0500
                                  Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 07:10 -0700
                          Re: Guido sees the light: PEP 8 updated Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-19 14:15 +0000
                            Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 07:54 -0700
                              Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 01:50 +1000
                                Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 01:58 +1000
                                Re: Guido sees the light: PEP 8 updated Larry Martell <larry.martell@gmail.com> - 2016-04-19 13:06 -0400
                                Re: Guido sees the light: PEP 8 updated alister <alister.ware@ntlworld.com> - 2016-04-19 17:13 +0000
                          Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 00:24 +1000
                        Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 02:14 +1000
                          Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 09:46 -0700
                            Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 12:43 -0500
                              Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 11:05 -0700
                            Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 14:54 -0400
                              Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 10:34 +1000
                                Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 22:02 -0400
                              Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 11:38 +1000
                                Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 12:21 +1000
                                Re: Guido sees the light: PEP 8 updated Terry Reedy <tjreedy@udel.edu> - 2016-04-19 23:23 -0400
                                Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 13:41 +1000
                                Re: Guido sees the light: PEP 8 updated Terry Reedy <tjreedy@udel.edu> - 2016-04-20 02:08 -0400
                                  Re: Guido sees the light: PEP 8 updated wxjmfauth@gmail.com - 2016-04-20 00:48 -0700
                                Re: Guido sees the light: PEP 8 updated Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-04-20 10:24 +0100
                                Re: Guido sees the light: PEP 8 updated Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-04-20 10:26 +0100
                                Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-20 07:51 -0400
                              Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 21:04 -0700
                            Re: Guido sees the light: PEP 8 updated Ben Finney <ben+python@benfinney.id.au> - 2016-04-20 06:50 +1000
                            Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 06:59 +1000
                              Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-20 00:35 +0300
                                Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 11:03 +1000
                                  Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 21:13 -0700
                                    Re: Guido sees the light: PEP 8 updated Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-20 18:39 +1200
                              Re: Guido sees the light: PEP 8 updated sohcahtoa82@gmail.com - 2016-04-19 14:43 -0700
                            Re: Guido sees the light: PEP 8 updated Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-19 19:20 -0400
                            Re: Guido sees the light: PEP 8 updated Grant Edwards <grant.b.edwards@gmail.com> - 2016-04-19 23:22 +0000
                            Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-20 09:33 +1000
                            Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 19:02 -0500
                            Re: Guido sees the light: PEP 8 updated Steven D'Aprano <steve@pearwood.info> - 2016-04-20 10:32 +1000
                            Re: Guido sees the light: PEP 8 updated Random832 <random832@fastmail.com> - 2016-04-19 21:57 -0400
                    Re: Guido sees the light: PEP 8 updated wxjmfauth@gmail.com - 2016-04-19 01:49 -0700
                    Re: Guido sees the light: PEP 8 updated Paul Rudin <paul.nospam@rudin.co.uk> - 2016-04-19 11:49 +0100
                      Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-19 14:47 +0300
                        Re: Guido sees the light: PEP 8 updated Rustom Mody <rustompmody@gmail.com> - 2016-04-19 05:06 -0700
                          Re: Guido sees the light: PEP 8 updated Marko Rauhamaa <marko@pacujo.net> - 2016-04-19 15:14 +0300
                        Re: Guido sees the light: PEP 8 updated Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-04-19 15:07 +0200
                        Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 08:31 -0500
                        Re: Guido sees the light: PEP 8 updated Chris Angelico <rosuav@gmail.com> - 2016-04-19 23:41 +1000
                        Re: Guido sees the light: PEP 8 updated Tim Chase <python.list@tim.thechases.com> - 2016-04-19 08:50 -0500
                    Re: Guido sees the light: PEP 8 updated Alice Bevan–McGregor <alice@gothcandy.com> - 2016-04-19 10:45 -0400
            Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Ben Finney <ben+python@benfinney.id.au> - 2016-04-17 06:21 +1000
            Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Chris Angelico <rosuav@gmail.com> - 2016-04-17 06:31 +1000
            Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Random832 <random832@fastmail.com> - 2016-04-16 16:44 -0400
              Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Dan Sommers <dan@tombstonezero.net> - 2016-04-16 21:22 +0000
                Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Chris Angelico <rosuav@gmail.com> - 2016-04-17 07:34 +1000
                  Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Dan Sommers <dan@tombstonezero.net> - 2016-04-16 23:35 +0000
                    Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Steven D'Aprano <steve@pearwood.info> - 2016-04-17 11:48 +1000
                      Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Dan Sommers <dan@tombstonezero.net> - 2016-04-17 03:52 +0000
              Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Steven D'Aprano <steve@pearwood.info> - 2016-04-17 11:38 +1000
            Re: Falsehoods People Believe about PEP 8 (was: Guido sees the light: PEP 8 updated) Chris Angelico <rosuav@gmail.com> - 2016-04-18 05:45 +1000

Page 5 of 8 — ← Prev page 1 2 3 4 [5] 6 7 8  Next page →


#107300

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-04-19 11:09 +0300
Message-ID<87wpnuqat0.fsf@elektro.pacujo.net>
In reply to#107297
Pete Forman <petef4+usenet@gmail.com>:

> I like that Nick separates out the concept of alignment with implicit
> semantics from the n spaces v tabs arguments. My question asks why
> monospace is used for the text.

Because the so-called "plain text" is the age-old lowest common
denominator for formal syntax. Python is especially picky about
alignment, but the same de-facto assumption is critical pretty much in
any programming language from Pascal to Go.

Old computer science textbooks presenting algorithms in Algol, Pascal
or, say, process algebra, did use varying-width fonts but they were
typeset manually.

You *could* liberate programming languages from the monospace
stranglehold but then you couldn't effectively use "cat", "vi" or
"firefox" to display Python programs. You probably would need to wrap
the source code in some richer markup like XML and support it specially
in the editors.

Such enrichment would offer advantages. For example, the visual layout
wouldn't necessarily have to be rigid. No more line-length wars (no
lines would ever need to be "continued"). No more TAB wars. Comments
could be displayed as floating bubbles, or maybe you would have to
scratch the screen to see the comment text.

Why, you could even decide on local language variations. How about
braces to delineate blocks in Python? How about translating the keywords
into Japanese? How about setting the Python code right-to-left with
Hebrew keywords?

Now, descending back on earth, I don't believe the advantages of rich
source code will outweigh those of plain text in the foreseeable future.


Marko

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


#107303

FromChris Angelico <rosuav@gmail.com>
Date2016-04-19 18:17 +1000
Message-ID<mailman.4.1461053856.30862.python-list@python.org>
In reply to#107300
On Tue, Apr 19, 2016 at 6:09 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Now, descending back on earth, I don't believe the advantages of rich
> source code will outweigh those of plain text in the foreseeable future.

No, they will not, because they'll make your code proprietary.
Suddenly *nothing* else will viably work with your code. (And before
you say "but diff tools are fine with XML/JSON/YAML/whatever", it's
not that simple; as soon as the underlying structure is capable of
representing information that doesn't matter to your source code, you
open yourself up to diff noise. I've had this exact problem with
git-managing my OBS configs, which are JSON files; there's one
particular array that's effectively a set, and the file keeps
reordering itself. I had to write a pre-commit script that sorts them
into a consistent order, else I'd have had useless diffs.)

Of course, there's no such thing as "plain text". Encodings will
always bite you. But if you can depend on all files being (a) binary,
(b) UTF-8, or (c) tagged with a coding cookie, it's not too hard to
work with other people's files.

ChrisA

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


#107312

FromRustom Mody <rustompmody@gmail.com>
Date2016-04-19 04:37 -0700
Message-ID<39d27a77-fa74-4d63-b1b6-d612c3905bd4@googlegroups.com>
In reply to#107303
On Tuesday, April 19, 2016 at 1:47:48 PM UTC+5:30, Chris Angelico wrote:
> On Tue, Apr 19, 2016 at 6:09 PM, Marko Rauhamaa  wrote:
> > Now, descending back on earth, I don't believe the advantages of rich
> > source code will outweigh those of plain text in the foreseeable future.
> 
> No, they will not, because they'll make your code proprietary.

Pragmatically yes; theoretically no because its like saying
"If one dont want to get locked down to MSWord proprietary tools and formats
one should use latex"
Refuted by the fact that libreoffice and odf etc are free/open


> Suddenly *nothing* else will viably work with your code. (And before
> you say "but diff tools are fine with XML/JSON/YAML/whatever", it's
> not that simple; as soon as the underlying structure is capable of
> representing information that doesn't matter to your source code, you
> open yourself up to diff noise. 

You just nicely described how diff is ½-assed. 
In more detail
here is foo.txt foo1.txt and foo2.txt containing
-------
Now is the time
for all good men
to come to the aid of their country
-------
vi, emacs, shell (cat) show them right and having the same contents
However diff (and therefore unfortunately git) have no clue that one has
DOS line-endings and one is UTF-16

> I've had this exact problem with
> git-managing my OBS configs, which are JSON files; there's one
> particular array that's effectively a set, and the file keeps
> reordering itself. I had to write a pre-commit script that sorts them
> into a consistent order, else I'd have had useless diffs.)

If you are ok with json morphing to yaml you may find ruamel useful
http://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts
https://pypi.python.org/pypi/ruamel.yaml

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


#107326

FromTim Chase <python.list@tim.thechases.com>
Date2016-04-19 08:17 -0500
Message-ID<mailman.16.1461074402.30862.python-list@python.org>
In reply to#107312
On 2016-04-19 04:37, Rustom Mody wrote:
> > No, they will not, because they'll make your code proprietary.  
> 
> Pragmatically yes; theoretically no because its like saying
> "If one dont want to get locked down to MSWord proprietary tools
> and formats one should use latex"
> Refuted by the fact that libreoffice and odf etc are free/open

Except that I still regularly have trouble with consistent formatting
being portable between LO/OO.o/MSWord (heck, I still have trouble
with MS Word not being consistent between versions).

-tkc



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


#107329

FromRustom Mody <rustompmody@gmail.com>
Date2016-04-19 07:10 -0700
Message-ID<9165ef47-2201-4520-bcd4-881165c839bf@googlegroups.com>
In reply to#107326
On Tuesday, April 19, 2016 at 7:30:18 PM UTC+5:30, Tim Chase wrote:
> On 2016-04-19 04:37, Rustom Mody wrote:
> > > No, they will not, because they'll make your code proprietary.  
> > 
> > Pragmatically yes; theoretically no because its like saying
> > "If one dont want to get locked down to MSWord proprietary tools
> > and formats one should use latex"
> > Refuted by the fact that libreoffice and odf etc are free/open
> 
> Except that I still regularly have trouble with consistent formatting
> being portable between LO/OO.o/MSWord (heck, I still have trouble
> with MS Word not being consistent between versions).

1. That libre is in sux category compared to MS
2. That MS does legal and illegal things to lock people in
3. And other charms of civilized existence
naturally conduce us to the most rational choice - luddeiteism

Fortunately or unfortunately we dont always make rational choices :-)

text files are a luddite choice
They work in the same way that pen-n-paper keep working when the power
fails and computer is down

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


#107331

FromGrant Edwards <grant.b.edwards@gmail.com>
Date2016-04-19 14:15 +0000
Message-ID<mailman.20.1461075365.30862.python-list@python.org>
In reply to#107297
On 2016-04-19, Pete Forman <petef4+usenet@gmail.com> wrote:

> My question asks why monospace is used for the text.

Well, I always use a monospaced font for code because I find it helps
readability for things like tables of data, block comments, and lines
of code that have some sort of parallel structure that I want to be
obvious to the reader.

> And more generally that programmers sticking to text when rest of
> world has moved on is rather backward:
> http://blog.languager.org/2012/10/html-is-why-mess-in-programming-syntax.html

The same reason humans use written and spoken language rather than
just drawing pictures, pointing, and grunting?

-- 
Grant Edwards               grant.b.edwards        Yow! What a COINCIDENCE!
                                  at               I'm an authorized "SNOOTS
                              gmail.com            OF THE STARS" dealer!!

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


#107336

FromRustom Mody <rustompmody@gmail.com>
Date2016-04-19 07:54 -0700
Message-ID<f6942b3f-1281-4ae1-8779-2c1ea3368fa4@googlegroups.com>
In reply to#107331
On Tuesday, April 19, 2016 at 7:46:21 PM UTC+5:30, Grant Edwards wrote:
> On 2016-04-19, Pete Forman  wrote:
> 
> > My question asks why monospace is used for the text.
> 
> Well, I always use a monospaced font for code because I find it helps
> readability for things like tables of data, block comments, and lines
> of code that have some sort of parallel structure that I want to be
> obvious to the reader.
> 
> > And more generally that programmers sticking to text when rest of
> > world has moved on is rather backward:
> > http://blog.languager.org/2012/10/html-is-why-mess-in-programming-syntax.html
> 
> The same reason humans use written and spoken language rather than
> just drawing pictures, pointing, and grunting?

I wonder who the joke is on:

| A study comparing Canadian and Chinese students found that the latter were 
| better at complex maths

| Native English speakers rely more on additional brain regions involved in the 
| meaning of words, whereas native Chinese speakers rely more on additional 
| brain regions involved in the visual appearance and physical manipulation of 
| numbers,

from : https://www.newscientist.com/article/dn9422-mother-tongue-may-determine-maths-skills/

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


#107338

FromSteven D'Aprano <steve@pearwood.info>
Date2016-04-20 01:50 +1000
Message-ID<571653aa$0$1606$c3e8da3$5496439d@news.astraweb.com>
In reply to#107336
On Wed, 20 Apr 2016 12:54 am, Rustom Mody wrote:


> I wonder who the joke is on:
> 
> | A study comparing Canadian and Chinese students found that the latter
> | were better at complex maths

Most published studies are wrong.

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1182327/

- Has that study been replicated by others? Have people tried to 
  replicate it? Were negative findings published, or do they
  languish in some researcher's bottom drawer? (Publication bias
  is a big problem in research.)

- Was the study well-designed, and the given conclusions supported
  by the study? How well did it survive the critical attention of
  experts in that field? Did the study account for differences in
  mathematics education?

- Did the study have sufficient statistical power to support the
  claimed results? Most published studies are invalid since they
  simply lack the power to justify their conclusion.

- Is the effect due to chance? Remember, with a p-value of 0.05 (the
  so-called 95% significance level), one in twenty experiments will
  give a positive result just by chance. A p-value of 0.05 does not
  mean "these results are proven", it just means "if every single 
  thing about this experiment is perfect, then the chances that these
  results are due by chance alone is 1 in 20".

Anyone who has played (say) Dungeons and Dragons, or other role-playing
games, will know that events with a probability of 1 in 20 occur very
frequently. To be precise, they occur one time in twenty.

Even if the claimed results are correct, how strong is the effect?

(a) On average, Canadian students get 49.0% on a standard exam that Chinese
students get 89.0% for.

(b) On average, Canadian students get 49.0% on a standard exam that Chinese
students get 49.1% for.

The level of statistical significance is not related to the strength of the
effect: we can be very confident of small effects, and weakly confident of
large effects.



-- 
Steven

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


#107341

FromSteven D'Aprano <steve@pearwood.info>
Date2016-04-20 01:58 +1000
Message-ID<571655b4$0$1599$c3e8da3$5496439d@news.astraweb.com>
In reply to#107338
On Wed, 20 Apr 2016 01:50 am, Steven D'Aprano wrote:

> - Is the effect due to chance? Remember, with a p-value of 0.05 (the
>   so-called 95% significance level), one in twenty experiments will
>   give a positive result just by chance. A p-value of 0.05 does not
>   mean "these results are proven", it just means "if every single
>   thing about this experiment is perfect, then the chances that these
>   results are due by chance alone is 1 in 20".

Arggh! The above is, of course, *wrong*. This is why statistical
significance is so hard. I know the correct interpretation[1] of p-values
and I still got it wrong.

p-values give the probability of a positive result by chance if the null
hypothesis is true, that is, the chances of getting a false positive
result. "We detected a difference that actually isn't there."

It *doesn't* tell you anything about a false negative result: "We failed to
detect a difference which actually is there." And it certainly doesn't tell
you the chances that the result are true.

More here:

https://www.sciencenews.org/article/odds-are-its-wrong



[1] At least, I'm confident I understand p-values with a 95% significance
level.


-- 
Steven

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


#107348

FromLarry Martell <larry.martell@gmail.com>
Date2016-04-19 13:06 -0400
Message-ID<mailman.28.1461085632.30862.python-list@python.org>
In reply to#107338
On Tue, Apr 19, 2016 at 11:50 AM, Steven D'Aprano <steve@pearwood.info> wrote:
> On Wed, 20 Apr 2016 12:54 am, Rustom Mody wrote:
>
>
>> I wonder who the joke is on:
>>
>> | A study comparing Canadian and Chinese students found that the latter
>> | were better at complex maths
>
> Most published studies are wrong.
>
> http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1182327/
>
> - Has that study been replicated by others? Have people tried to
>   replicate it? Were negative findings published, or do they
>   languish in some researcher's bottom drawer? (Publication bias
>   is a big problem in research.)
>
> - Was the study well-designed, and the given conclusions supported
>   by the study? How well did it survive the critical attention of
>   experts in that field? Did the study account for differences in
>   mathematics education?
>
> - Did the study have sufficient statistical power to support the
>   claimed results? Most published studies are invalid since they
>   simply lack the power to justify their conclusion.
>
> - Is the effect due to chance? Remember, with a p-value of 0.05 (the
>   so-called 95% significance level), one in twenty experiments will
>   give a positive result just by chance. A p-value of 0.05 does not
>   mean "these results are proven", it just means "if every single
>   thing about this experiment is perfect, then the chances that these
>   results are due by chance alone is 1 in 20".
>
> Anyone who has played (say) Dungeons and Dragons, or other role-playing
> games, will know that events with a probability of 1 in 20 occur very
> frequently. To be precise, they occur one time in twenty.
>
> Even if the claimed results are correct, how strong is the effect?
>
> (a) On average, Canadian students get 49.0% on a standard exam that Chinese
> students get 89.0% for.
>
> (b) On average, Canadian students get 49.0% on a standard exam that Chinese
> students get 49.1% for.
>
> The level of statistical significance is not related to the strength of the
> effect: we can be very confident of small effects, and weakly confident of
> large effects.

85% of all statistics are made up.

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


#107349

Fromalister <alister.ware@ntlworld.com>
Date2016-04-19 17:13 +0000
Message-ID<QGtRy.967956$Ux.659662@fx46.am4>
In reply to#107338
On Wed, 20 Apr 2016 01:50:00 +1000, Steven D'Aprano wrote:
> Anyone who has played (say) Dungeons and Dragons, or other role-playing
> games, will know that events with a probability of 1 in 20 occur very
> frequently. To be precise, they occur one time in twenty.
> 
Million to 1 chances happen 9 time out of Ten (T prachett - Varius 
Discworld books :-) )

> Even if the claimed results are correct, how strong is the effect?
> 
> (a) On average, Canadian students get 49.0% on a standard exam that
> Chinese students get 89.0% for.
> 
> (b) On average, Canadian students get 49.0% on a standard exam that
> Chinese students get 49.1% for.
> 
> The level of statistical significance is not related to the strength of
> the effect: we can be very confident of small effects, and weakly
> confident of large effects.





-- 
If anyone has seen my dog, please contact me at x2883 as soon as possible.
We're offering a substantial reward.  He's a sable collie, with three 
legs,
blind in his left eye, is missing part of his right ear and the tip of his
tail.  He's been recently fixed.  Answers to "Lucky".

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


#107333

FromChris Angelico <rosuav@gmail.com>
Date2016-04-20 00:24 +1000
Message-ID<mailman.21.1461075873.30862.python-list@python.org>
In reply to#107297
On Wed, Apr 20, 2016 at 12:15 AM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
>> And more generally that programmers sticking to text when rest of
>> world has moved on is rather backward:
>> http://blog.languager.org/2012/10/html-is-why-mess-in-programming-syntax.html
>
> The same reason humans use written and spoken language rather than
> just drawing pictures, pointing, and grunting?

http://catb.org/esr/writings/unix-koans/gui-programmer.html

ChrisA

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


#107343

FromSteven D'Aprano <steve@pearwood.info>
Date2016-04-20 02:14 +1000
Message-ID<5716595b$0$1585$c3e8da3$5496439d@news.astraweb.com>
In reply to#107287
On Tue, 19 Apr 2016 01:04 pm, Rustom Mody wrote:

> And more generally that programmers sticking to text when rest of world
> has moved on is rather backward:

I'm pretty sure that the rest of the world has not moved on from text. Text
still makes up by far the bulk of human communication. It's compact (one
second of a Youtube video requires about the same bandwidth as about 7000
words), it can be easily searched, edited, translated, the presentation can
be changed to suit the reader, and more. When precision of meaning is
important, text is still the winner except in a few specialist areas, such
as technical drawings, and even they still make extensive use of text.



-- 
Steven

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


#107346

FromRustom Mody <rustompmody@gmail.com>
Date2016-04-19 09:46 -0700
Message-ID<3d95437c-6427-46d2-8e9f-470f121194cd@googlegroups.com>
In reply to#107343
On Tuesday, April 19, 2016 at 9:44:39 PM UTC+5:30, Steven D'Aprano wrote:
> On Tue, 19 Apr 2016 01:04 pm, Rustom Mody wrote:
> 
> > And more generally that programmers sticking to text when rest of world
> > has moved on is rather backward:
> 
> I'm pretty sure that the rest of the world has not moved on from text. 

Run your popular search engine on "popular linux apps" or some such and
you will get for example:

inkscape
gimp
blender
libreoffice writer/calc/prese
wireshark
skype
firefox
audacity
musescore
totem
vlc
dia

Do these look like text-based apps to you?

> Text
> still makes up by far the bulk of human communication. It's compact (one
> second of a Youtube video requires about the same bandwidth as about 7000
> words), it can be easily searched, edited, translated, the presentation can
> be changed to suit the reader, and more. 

Yes so you just showed that in the realm of multimedia we are somewhere 
nearabouts...  tickertape? Hollerith cards?
Doesn't change the basic structure of the human being
viz that 5 senses working in harmony make us more productive than one 
overworking rest languishing

> When precision of meaning is
> important, text is still the winner except in a few specialist areas, such
> as technical drawings, and even they still make extensive use of text.

Yes in the short to medium run our text capability remains better than others.
Those who want to keep it so forever are keeping the rest of us back....
fortunately futilely!

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


#107351

FromTim Chase <python.list@tim.thechases.com>
Date2016-04-19 12:43 -0500
Message-ID<mailman.31.1461088027.30862.python-list@python.org>
In reply to#107346
On 2016-04-19 09:46, Rustom Mody wrote:
> inkscape
> gimp
> blender
> libreoffice writer/calc/prese
> wireshark
> skype
> firefox
> audacity
> musescore
> totem
> vlc
> dia
> 
> Do these look like text-based apps to you?

Well, let's take a look at their native file formats:

Inkscape: SVG

Libreoffice: compressed XML

Firefox: HTML+CSS+JS

Musescore: compressed text

Dia: compressed XML

While I haven't used Musescore, I have used the others and
hand-edited the files in each case.  Using vi/vim, or even ed(1).
Because I can, and sometimes because I have to in order to do some
convoluted process that would be a pain to do in a GUI.

For Gimp, Blender, Audacity, Totem, and VLC, those all deal with
binary streams of their content-type.

Skype being proprietary, it doesn't interoperate with bupkis.

So wireshark is the only outlier in my mind, though since it captures
binary packets, I suspect the native format is optimized for
streaming stuff from the NIC to the disk as fast as possible (though
given CPU and disk speeds, I would have figured that a gzipped stream
of text markup would be almost as good).

-tkc






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


#107354

FromRustom Mody <rustompmody@gmail.com>
Date2016-04-19 11:05 -0700
Message-ID<0a63660e-e1b7-4478-92db-6a3d7cea5b07@googlegroups.com>
In reply to#107351
On Tuesday, April 19, 2016 at 11:17:23 PM UTC+5:30, Tim Chase wrote:
> On 2016-04-19 09:46, Rustom Mody wrote:
> > inkscape
> > gimp
> > blender
> > libreoffice writer/calc/prese
> > wireshark
> > skype
> > firefox
> > audacity
> > musescore
> > totem
> > vlc
> > dia
> > 
> > Do these look like text-based apps to you?
> 
> Well, let's take a look at their native file formats:
> 
> Inkscape: SVG
> 
> Libreoffice: compressed XML
> 
> Firefox: HTML+CSS+JS
> 
> Musescore: compressed text
> 
> Dia: compressed XML
> 
> While I haven't used Musescore, I have used the others and
> hand-edited the files in each case.  Using vi/vim, or even ed(1).
> Because I can, and sometimes because I have to in order to do some
> convoluted process that would be a pain to do in a GUI.


If you think xml/html is ok as replacement for text then we have no significant 
disagreement.
That is after all the main point of
http://blog.languager.org/2012/10/html-is-why-mess-in-programming-syntax.html
viz that program texts would be better off replacing text with hypertext.
[that html = Hyper Text Markup Language adds to the snark; but does not change
 the message]

The key difference between all the above and state of art in programming
languages is that lexing, parsing is in principle and possibly in practice
'outsourced' to generic XML tools.
With programming languages these are in silos in the innards of the language
implementation.
And so people typically studying compilers etc come to think of lexing and
parsing as important/key activities....
except for a few outliers like Marvin Minsky:
http://web.media.mit.edu/~minsky/papers/TuringLecture/TuringLecture.html

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


#107357

FromRandom832 <random832@fastmail.com>
Date2016-04-19 14:54 -0400
Message-ID<mailman.34.1461092093.30862.python-list@python.org>
In reply to#107346
On Tue, Apr 19, 2016, at 13:43, Tim Chase wrote:
> Well, let's take a look at their native file formats:
> 
> Inkscape: SVG
> 
> Libreoffice: compressed XML
> 
> Firefox: HTML+CSS+JS
> 
> Musescore: compressed text
> 
> Dia: compressed XML

None of those are "text" in the sense being discussed here, which is
"preferred method of viewing and editing is a text editor".

You could, for example, design a programming language that uses XML
markup to associate comments with specific positions in the code and the
editor displays them in little callout boxes when you hover over them
with the mouse. That's not done because of the notion that code has to
be plain text. The fact that the resulting format would still be a text
format that could theoretically be edited with a text editor isn't
relevant to this discussion.

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


#107382

FromSteven D'Aprano <steve@pearwood.info>
Date2016-04-20 10:34 +1000
Message-ID<5716ceab$0$1618$c3e8da3$5496439d@news.astraweb.com>
In reply to#107357
On Wed, 20 Apr 2016 04:54 am, Random832 wrote:

> None of those are "text" in the sense being discussed here, which is
> "preferred method of viewing and editing is a text editor".


That's not the sense of being discussed here. How absurd. Why should a
letter containing nothing but text be classified as "not text" because it
was written in Microsoft World or LibreOffice rather than vi or emacs?


-- 
Steven

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


#107386

FromRandom832 <random832@fastmail.com>
Date2016-04-19 22:02 -0400
Message-ID<mailman.7.1461117771.12923.python-list@python.org>
In reply to#107382
On Tue, Apr 19, 2016, at 20:34, Steven D'Aprano wrote:
> That's not the sense of being discussed here.

Yes it is - this started as a discussion of whether indentation and
alignment should be based on fixed spaces (as text editors support) or
dynamic tab stops (as any word processing format supports).

> How absurd. Why should a
> letter containing nothing but text be classified as "not text" because it
> was written in Microsoft World or LibreOffice rather than vi or emacs?

Because it's not _a text file_. It's not obligated to be devoid of
formatting markup or other metadata, or to have a perfectly flat
structure, or to be edited in programs whose design has not been updated
since the early 1970s, which are _exactly_ the complaints leveled
against python source code at the start of this discussion..

______ : Python :: MS Word : Plain Text

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


#107384

FromSteven D'Aprano <steve@pearwood.info>
Date2016-04-20 11:38 +1000
Message-ID<5716dda3$0$1621$c3e8da3$5496439d@news.astraweb.com>
In reply to#107357
On Wed, 20 Apr 2016 04:54 am, Random832 wrote:

> You could, for example, design a programming language that uses XML
> markup to associate comments with specific positions in the code and the
> editor displays them in little callout boxes when you hover over them
> with the mouse. That's not done because of the notion that code has to
> be plain text.

No, it's not done because the user interface of such a language would be
absolute bollocks.


The reason programmers use text for communicating with (1) other programmers
and (2) the computer is that text is still, and probably always will be, so
much better than any other media *for the purpose of programming* as to
make it no contest.

I'm sure that interpretive dance has its uses, but can you imagine the
computer infrastructure needed to make that practical for programming?

More seriously, there have been attempts to come up with "point and click"
interfaces for programming. The idea makes a sort of sense, if you think of
programming as a flow-chart (does anyone still use them?), but outside of a
handful of specialist areas, they have been a total, utter dead-end.

So-called "visual programming environments" (think: Visual Basic) are
well-suited to laying out the interface of GUI applications. They might
even be useful for extremely limited mini-languages like regexes. I'm told
that there are still people who think that UML diagrams are a good idea.
They're probably good for dataflow programming. But ultimately, to be
productive with one, you still need text.

As for "visual programming languages" (languages with an inherent visual
form which lacks any simple or obvious text equivalent), they've been a
dead-end. Even languages like Scratch cannot do without text. Look at
the "Hello World" program here:

https://en.wikipedia.org/wiki/File:Scratch_Hello_World.png

The graphical elements are pure presentation, to make it more palatable to
children and beginners.

Don't think that I'm opposed to such visual presentations. Look at the
sample code shown at the top of the page here:

https://scratch.mit.edu/

It kinda looks like Hypertalk syntax, which some of you may remember I'm
exceedingly fond of. There's no reason why a GUI editor couldn't display
Python code using such "building block" structure. E.g. indented blocks
could use colour and shape cues to reinforce the structure of the code,
just as Scratch does.

And if you want to see another reason why text rocks as the core for
programming languages?


"Oh no! We're having trouble displaying this Scratch project.

If you are on a mobile phone or tablet, try visiting this project on a
computer.

If you're on a computer, your Flash player might be disabled, missing, or
out of date."

Yeah, thanks guys. Really helpful.



-- 
Steven

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


Page 5 of 8 — ← Prev page 1 2 3 4 [5] 6 7 8  Next page →

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


csiph-web