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 6 of 8 — ← Prev page 1 2 3 4 5 [6] 7 8  Next page →


#107387

FromChris Angelico <rosuav@gmail.com>
Date2016-04-20 12:21 +1000
Message-ID<mailman.8.1461118919.12923.python-list@python.org>
In reply to#107384
On Wed, Apr 20, 2016 at 11:38 AM, Steven D'Aprano <steve@pearwood.info> wrote:
> 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.

Scratch itself is aimed at children, but there's a very similar
language (or maybe it's actually a Scratch derivative) used by the
Unreal Engine to animate sprites - the "blueprint" system. I've seen
it used by someone who doesn't consider herself a programmer in any
way, yet she has a sufficiently logical mind to do the same kind of
work as programming requires. Effectively, flow control has been
turned into a two-dimensional graph, with nodes pointing to other
nodes, but each node is still described primarily with text (using
colour to add instant recognition).

I think there's a lot of value in depicting flow control graphically.
For anyone who's accustomed to working visually, seeing nice little
tagged blocks of "stuff", linked by little lines to show how you get
from one to another, is way easier to handle than a page of "while"
and "if" and "else" statements. But even there, each piece of flow
control is *defined* in text - there's a short message saying what the
condition is, and then two or more pieces of text defining the
potential results of the condition, from which you can link to
destinations.

https://www.twitch.tv/ellalune/v/59455498 - starts at about the 41
minute mark. Notably, around the 00:42:30 point, I say that this is
code, and she says that, well, it sort of is code, but it doesn't
*feel* like code.

Probably the least text-y form of coding that I've ever seen is turtle
graphics, where you depict something using (usually) two dimensional
movement and rotation. But even there, it's normal to use text to
define all the actual actions. Take this, for example:

https://studio.code.org/s/frozen/reset

A nice tutorial, a theme that'll appeal to a lot of people (including
young children), and primarily point-and-click (or drag) to move
components around - but you can *read* the meaning of each component,
in *text*. Once again, it uses a visual representation of flow control
to bury some of the complexity, but the basic actions (move, turn,
etc) are text - and if you want to "capture" a series of actions to
reuse, the way to do that is to give it a name, because names and
words are how people think.

ChrisA

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


#107389

FromTerry Reedy <tjreedy@udel.edu>
Date2016-04-19 23:23 -0400
Message-ID<mailman.10.1461122670.12923.python-list@python.org>
In reply to#107384
On 4/19/2016 9:38 PM, Steven D'Aprano wrote:

> 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.

I think it is at least as important that the output is pictorial or even 
aural, then having the input text (and you are right, it is text) 
colored.  By comparison, factorial functions (and most calculation 
examples) are rather boring.

> 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.

That is an interesting idea.  Perhaps I have been stuck in either/or 
thinking -- either graphical or textual. With tk Text (IDLE), it would 
be possible to tag each (4-space) indent with a color for the compound 
statememt keywork causing the indent.

> 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."

I had to enable Flash for this site.  What are they going to do when 
Flash is dead rather than just dying?  (Get with html5, perhaps?)

> Yeah, thanks guys. Really helpful.

-- 
Terry Jan Reedy

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


#107390

FromChris Angelico <rosuav@gmail.com>
Date2016-04-20 13:41 +1000
Message-ID<mailman.11.1461123722.12923.python-list@python.org>
In reply to#107384
On Wed, Apr 20, 2016 at 1:23 PM, Terry Reedy <tjreedy@udel.edu> wrote:
>> 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.
>
>
> That is an interesting idea.  Perhaps I have been stuck in either/or
> thinking -- either graphical or textual. With tk Text (IDLE), it would be
> possible to tag each (4-space) indent with a color for the compound
> statememt keywork causing the indent.
>

Interesting indeed! Tell me if I've understood you correctly. You'd
display this code:

def func(x):
    for n in range(1, x):
        while n < x:
            if n % 2:
                n = (n + 1) * 3 / 2
            else:
                n = n * 2 + 3

with stripes of colour, with the entire first column of spaces all
tied to the "def", and then the next block of four tied to the "for",
etc? That'd be pretty cool, and a neat way to help people transfer
their skills from Scratch to Python.

(Would "else" be in the same colour as "if"? What about "elif"?)

ChrisA

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


#107397

FromTerry Reedy <tjreedy@udel.edu>
Date2016-04-20 02:08 -0400
Message-ID<mailman.16.1461132551.12923.python-list@python.org>
In reply to#107384
On 4/19/2016 11:41 PM, Chris Angelico wrote:
> On Wed, Apr 20, 2016 at 1:23 PM, Terry Reedy <tjreedy@udel.edu> wrote:
>>> 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.
>>
>>
>> That is an interesting idea.  Perhaps I have been stuck in either/or
>> thinking -- either graphical or textual. With tk Text (IDLE), it would be
>> possible to tag each (4-space) indent with a color for the compound
>> statememt keywork causing the indent.
>>
>
> Interesting indeed! Tell me if I've understood you correctly. You'd
> display this code:
>
> def func(x):
>     for n in range(1, x):
>         while n < x:
>             if n % 2:
>                 n = (n + 1) * 3 / 2
>             else:
>                 n = n * 2 + 3
>
> with stripes of colour, with the entire first column of spaces all
> tied to the "def", and then the next block of four tied to the "for",
> etc?

Exactly.

 > That'd be pretty cool, and a neat way to help people transfer
> their skills from Scratch to Python.
>
> (Would "else" be in the same colour as "if"? What about "elif"?)

To be determined ;-).  Perhaps different shades.  Scratch uses one color 
for all control: while, if, else, but that would not work for python 
with so much more nesting.  Scratch needs different colors for much 
broader categories as many are not for syntax but for groups of 
functions that in Python would be in imported modules.  I would like 
nested for loops to have slightly different shades, but I would not 
necessarily start with that, unless each compound statement got a new 
tag and color.

What makes the idea not completely ridiculous is that IDLE already keeps 
track of indents for its smart indenting and code context features.

-- 
Terry Jan Reedy

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


#107400

Fromwxjmfauth@gmail.com
Date2016-04-20 00:48 -0700
Message-ID<393bd8a2-5a09-4de3-aac5-066ad08b9522@googlegroups.com>
In reply to#107397
Le mercredi 20 avril 2016 08:09:24 UTC+2, Terry Reedy a écrit :
> On 4/19/2016 11:41 PM, Chris Angelico wrote:
> > On Wed, Apr 20, 2016 at 1:23 PM, Terry Reedy <tjreedy@udel.edu> wrote:
> >>> 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.
> >>
> >>
> >> That is an interesting idea.  Perhaps I have been stuck in either/or
> >> thinking -- either graphical or textual. With tk Text (IDLE), it would be
> >> possible to tag each (4-space) indent with a color for the compound
> >> statememt keywork causing the indent.
> >>
> >
> > Interesting indeed! Tell me if I've understood you correctly. You'd
> > display this code:
> >
> > def func(x):
> >     for n in range(1, x):
> >         while n < x:
> >             if n % 2:
> >                 n = (n + 1) * 3 / 2
> >             else:
> >                 n = n * 2 + 3
> >
> > with stripes of colour, with the entire first column of spaces all
> > tied to the "def", and then the next block of four tied to the "for",
> > etc?
> 
> Exactly.
> 
>  > That'd be pretty cool, and a neat way to help people transfer
> > their skills from Scratch to Python.
> >
> > (Would "else" be in the same colour as "if"? What about "elif"?)
> 
> To be determined ;-).  Perhaps different shades.  Scratch uses one color 
> for all control: while, if, else, but that would not work for python 
> with so much more nesting.  Scratch needs different colors for much 
> broader categories as many are not for syntax but for groups of 
> functions that in Python would be in imported modules.  I would like 
> nested for loops to have slightly different shades, but I would not 
> necessarily start with that, unless each compound statement got a new 
> tag and color.
> 
> What makes the idea not completely ridiculous is that IDLE already keeps 
> track of indents for its smart indenting and code context features.
> 
> -- 
> Terry Jan Reedy

You are spending a lot of of time and energy.
Unfortunately, "your" IDLE does not work and it will
never work.
There are plenty of reasons...

Do not worry too much, it's also the case in LibreOffice,
I mean one of its scripting languages.

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


#107401

FromOscar Benjamin <oscar.j.benjamin@gmail.com>
Date2016-04-20 10:24 +0100
Message-ID<mailman.18.1461144276.12923.python-list@python.org>
In reply to#107384
On 20 April 2016 at 07:08, Terry Reedy <tjreedy@udel.edu> wrote:
> On 4/19/2016 11:41 PM, Chris Angelico wrote:
>>
>> On Wed, Apr 20, 2016 at 1:23 PM, Terry Reedy <tjreedy@udel.edu> wrote:
>>>>
>>>> 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.
>>>
>>>
>>>
>>> That is an interesting idea.  Perhaps I have been stuck in either/or
>>> thinking -- either graphical or textual. With tk Text (IDLE), it would be
>>> possible to tag each (4-space) indent with a color for the compound
>>> statememt keywork causing the indent.
>>>
>>
>> Interesting indeed! Tell me if I've understood you correctly. You'd
>> display this code:
>>
>> def func(x):
>>     for n in range(1, x):
>>         while n < x:
>>             if n % 2:
>>                 n = (n + 1) * 3 / 2
>>             else:
>>                 n = n * 2 + 3
>>
>> with stripes of colour, with the entire first column of spaces all
>> tied to the "def", and then the next block of four tied to the "for",
>> etc?
>
>
> Exactly.

Take a look at bluej which is for Java. It surrounds different
constructs with different coloured rectangles. It also provides
UML-ish views of the classes in a project. My students seemed to like
it.

--
Oscar

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


#107402

FromOscar Benjamin <oscar.j.benjamin@gmail.com>
Date2016-04-20 10:26 +0100
Message-ID<mailman.19.1461144398.12923.python-list@python.org>
In reply to#107384
On 20 April 2016 at 02:38, Steven D'Aprano <steve@pearwood.info> wrote:
>
> "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.

Having a flash-enabled browser is a lower barrier to entry for most
people in the world than having a code editor and (being able to use)
say a terminal to run your code.

--
Oscar

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


#107407

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2016-04-20 07:51 -0400
Message-ID<mailman.22.1461153109.12923.python-list@python.org>
In reply to#107384
On Wed, 20 Apr 2016 10:26:16 +0100, Oscar Benjamin
<oscar.j.benjamin@gmail.com> declaimed the following:

>On 20 April 2016 at 02:38, Steven D'Aprano <steve@pearwood.info> wrote:
>>
>> "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.
>
>Having a flash-enabled browser is a lower barrier to entry for most
>people in the world than having a code editor and (being able to use)
>say a terminal to run your code.

	mBot's programming environment is a variant of Scratch, in stand-alone
form.

http://www.mblock.cc/index.php


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


#107392

FromRustom Mody <rustompmody@gmail.com>
Date2016-04-19 21:04 -0700
Message-ID<559dcbf9-5773-48d1-9a16-229ab91a4b82@googlegroups.com>
In reply to#107357
On Wednesday, April 20, 2016 at 12:25:09 AM UTC+5:30, Random832 wrote:
> 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".

O you are so pedestrian!
Here let me show you how to enjoy beethoven9th.mp3 with emacs:

$ python -m base64 beethoven9th.mp3 > beethoven9th.txt; emacs beethoven9th.txt

Isnt it glorious?
And did you note the çhiɕ, pànacɦe and eĺan with with I demonstrated it?

[Yeah you guessed right: For me French consists of English ...um text.. with a squiggle
on every 3rd letter]

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


#107364

FromBen Finney <ben+python@benfinney.id.au>
Date2016-04-20 06:50 +1000
Message-ID<mailman.42.1461099064.30862.python-list@python.org>
In reply to#107346
Rustom Mody <rustompmody@gmail.com> writes:

> 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:

That supports a claim of “there are many programs available that
primarily manipulate something other than text”. You didn't make that
claim, so providing support for that is irrelevant.

Your actual claim is that “the rest of the world has moved on from
text”.

You haven't supported that claim at all, and I see endless text everyday
in “the rest of the world”. So your claim is false.

-- 
 \           “I do not believe in immortality of the individual, and I |
  `\        consider ethics to be an exclusively human concern with no |
_o__)  superhuman authority behind it.” —Albert Einstein, letter, 1953 |
Ben Finney

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


#107365

FromChris Angelico <rosuav@gmail.com>
Date2016-04-20 06:59 +1000
Message-ID<mailman.43.1461099573.30862.python-list@python.org>
In reply to#107346
On Wed, Apr 20, 2016 at 6:50 AM, Ben Finney <ben+python@benfinney.id.au> 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:
>
> You haven't supported that claim at all, and I see endless text everyday
> in “the rest of the world”. So your claim is false.

In this part of the world, I'm seeing a lot of emails/news posts that
consist of text. How does the rest of the world discuss important
topics? Is everything done with infographics and meme pics?

ChrisA
not that this is exactly an important topic, really...

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


#107366

FromMarko Rauhamaa <marko@pacujo.net>
Date2016-04-20 00:35 +0300
Message-ID<87potl2sfq.fsf@elektro.pacujo.net>
In reply to#107365
Chris Angelico <rosuav@gmail.com>:

> On Wed, Apr 20, 2016 at 6:50 AM, Ben Finney <ben+python@benfinney.id.au>
> 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:
>>
>> You haven't supported that claim at all, and I see endless text everyday
>> in “the rest of the world”. So your claim is false.
>
> In this part of the world, I'm seeing a lot of emails/news posts that
> consist of text. How does the rest of the world discuss important
> topics? Is everything done with infographics and meme pics?

The "plain text" content type is used less and less. Really it is
reserved mostly to programmers. Even texters routinely field animated
emojies nowadays.

Text, in general, might have started to decline. I'm foreseeing a
not-too-distant future where only a smallish group of trained scribes
masters reading and writing. The remainder of the population will
consume and interact with animated pictures, videos, music, games etc.
Back to ancient Egypt.

Just look at the US presidential primaries, where the political
discourse seems to be centered on grunts, melees and simple slogans:

   “We won the evangelicals,” Trump said. “We won with young. We won
   with old. We won with highly educated. We won with poorly educated. I
   love the poorly educated.”

   <URL: https://www.yahoo.com/news/trump-i-love-the-poorly-educated-144
   008662.html>

My point is not political; I'm only talking about the communication
media. The medieval populace regarded the Latin-spewing theologians with
awe. Maybe one day, the same superstitious respect will be afforded to
trained Python masters who can bend the machines to their will.


Marko

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


#107383

FromSteven D'Aprano <steve@pearwood.info>
Date2016-04-20 11:03 +1000
Message-ID<5716d558$0$1587$c3e8da3$5496439d@news.astraweb.com>
In reply to#107366
On Wed, 20 Apr 2016 07:35 am, Marko Rauhamaa wrote:

> The "plain text" content type is used less and less. Really it is
> reserved mostly to programmers. Even texters routinely field animated
> emojies nowadays.

Who cares about "plain text" content type? That is not the beginning or end
of what counts as text. By that ridiculously limited definition, Python
progammers have already "moved on from text", because the MIME type of .py
source code is application/x-python.


> Text, in general, might have started to decline. 

o_O

People today, especially the young, probably send more text today than in
any previous time in history. You might have heard of something
called "SMSes"? Kids today spend half their day SMSing, twitting, posting
comments on Facebook, etc. 

And the other half taking selfies. *wink*

Anyone who thinks that we're heading back to hieroglyphics simply isn't
paying attention.




-- 
Steven

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


#107393

FromRustom Mody <rustompmody@gmail.com>
Date2016-04-19 21:13 -0700
Message-ID<61c4cfb9-65e7-4056-a048-8665a57f1d35@googlegroups.com>
In reply to#107383
On Wednesday, April 20, 2016 at 6:33:33 AM UTC+5:30, Steven D'Aprano wrote:
> Anyone who thinks that we're heading back to hieroglyphics simply isn't
> paying attention.

Which are just text in the range 13000-1342F:
http://unicode.org/charts/PDF/U13000.pdf

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


#107399

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2016-04-20 18:39 +1200
Message-ID<dnomgfF824pU1@mid.individual.net>
In reply to#107393
Rustom Mody wrote:
> On Wednesday, April 20, 2016 at 6:33:33 AM UTC+5:30, Steven D'Aprano wrote:
> 
>>Anyone who thinks that we're heading back to hieroglyphics simply isn't
>>paying attention.
> 
> 
> Which are just text in the range 13000-1342F:
> http://unicode.org/charts/PDF/U13000.pdf

Moreover, the Egyptian heiroglyphs are *not* pictograms,
they're a phonetic alphabet. It's a textual form of
writing just as much as ours is.

-- 
Greg

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


#107367

Fromsohcahtoa82@gmail.com
Date2016-04-19 14:43 -0700
Message-ID<4a917863-6e92-4e30-912f-f4e4d3d31c20@googlegroups.com>
In reply to#107365
On Tuesday, April 19, 2016 at 1:59:48 PM UTC-7, Chris Angelico wrote:
> On Wed, Apr 20, 2016 at 6:50 AM, Ben Finney <ben+python@benfinney.id.au> 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:
> >
> > You haven't supported that claim at all, and I see endless text everyday
> > in "the rest of the world". So your claim is false.
> 
> In this part of the world, I'm seeing a lot of emails/news posts that
> consist of text. How does the rest of the world discuss important
> topics? Is everything done with infographics and meme pics?
> 
> ChrisA
> not that this is exactly an important topic, really...

Personally, I prefer smoke signals.  Range is decent, but the bandwidth is atrocious.

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


#107375

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2016-04-19 19:20 -0400
Message-ID<mailman.0.1461108026.12923.python-list@python.org>
In reply to#107346
On Tue, 19 Apr 2016 12:43:21 -0500, Tim Chase
<python.list@tim.thechases.com> declaimed the following:

>
>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).
>
	One of its export formats is XML... But extremely wasteful of space.

	For some latency testing I'd had to convert something like a 2GB native
capture into 20+GB export format -- just so I could later extract fields
and time-stamps to produce a 1GB SQLite database...

	Recently underwent the 3-year mandatory computer refresh at work and
decided not to tie up the WiFi copying the old capture data... (90GB at
corporate WiFi rates?) Instead I let the old machine zip the captures --
and that 90GB shrank to less than 5GB.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


#107377

FromGrant Edwards <grant.b.edwards@gmail.com>
Date2016-04-19 23:22 +0000
Message-ID<mailman.2.1461108309.12923.python-list@python.org>
In reply to#107346
On 2016-04-19, Chris Angelico <rosuav@gmail.com> wrote:
> On Wed, Apr 20, 2016 at 6:50 AM, Ben Finney <ben+python@benfinney.id.au> 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:
>>
>> You haven't supported that claim at all, and I see endless text everyday
>> in ???the rest of the world???. So your claim is false.
>
> In this part of the world, I'm seeing a lot of emails/news posts that
> consist of text. How does the rest of the world discuss important
> topics? Is everything done with infographics and meme pics?

Emojis, one would assume.

--
Grant

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


#107378

FromChris Angelico <rosuav@gmail.com>
Date2016-04-20 09:33 +1000
Message-ID<mailman.3.1461108837.12923.python-list@python.org>
In reply to#107346
On Wed, Apr 20, 2016 at 9:22 AM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> On 2016-04-19, Chris Angelico <rosuav@gmail.com> wrote:
>> On Wed, Apr 20, 2016 at 6:50 AM, Ben Finney <ben+python@benfinney.id.au> 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:
>>>
>>> You haven't supported that claim at all, and I see endless text everyday
>>> in ???the rest of the world???. So your claim is false.
>>
>> In this part of the world, I'm seeing a lot of emails/news posts that
>> consist of text. How does the rest of the world discuss important
>> topics? Is everything done with infographics and meme pics?
>
> Emojis, one would assume.
>

What, like characters in the U+1F300-U+1F64F codepoint range?

ChrisA

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


#107379

FromTim Chase <python.list@tim.thechases.com>
Date2016-04-19 19:02 -0500
Message-ID<mailman.4.1461110778.12923.python-list@python.org>
In reply to#107346
On 2016-04-19 14:54, Random832 wrote:
> 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".

Well, my preferred method of "viewing" python code is /usr/bin/python

Authoring, editing, and consuming are all distinct actions.  Yes, a
lot of tools can use libpcap to interface with wireshark dumps, but
if your tool doesn't talk pcap, you can dump to plain-text (as Dennis
mentions doing...well, XML) which is the lingua franca of tool
development.

> You could, for example, design a programming language that uses XML
> markup

[shudders at remembering using a DSL "programming language" that was
XML]

-tkc

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


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

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


csiph-web