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


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

Implicit initialization is EVIL!

Started byrantingrick <rantingrick@gmail.com>
First post2011-07-03 15:11 -0700
Last post2011-07-05 17:23 +0100
Articles 20 on this page of 57 — 13 participants

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


Contents

  Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-03 15:11 -0700
    Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-04 08:21 +1000
      Re: Implicit initialization is EVIL! Roy Smith <roy@panix.com> - 2011-07-03 18:32 -0400
    Re: Implicit initialization is EVIL! Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-07-04 20:33 +1200
      Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-04 18:44 +1000
        Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-04 08:29 -0700
      Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-04 08:19 -0700
        Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-05 01:40 +1000
          Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-04 08:46 -0700
            Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-05 02:01 +1000
              Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-04 10:09 -0700
                Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-05 03:41 +1000
                  Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-04 12:30 -0700
                    Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-05 07:43 +1000
        Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-04 08:45 -0700
        Re: Implicit initialization is EVIL! Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-07-05 23:11 +1200
        Re: Implicit initialization is EVIL! Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-07-05 23:14 +1200
          Re: Implicit initialization is EVIL! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-06 00:25 +1000
            Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-06 01:17 +1000
              Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-05 15:38 -0700
            Re: Implicit initialization is EVIL! Web Dreamer <webdreamer@nospam.fr> - 2011-07-05 18:00 +0200
              Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-05 15:42 -0700
                Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-06 09:20 +1000
                  Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-05 16:47 -0700
                    Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-06 09:54 +1000
                      Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-05 17:15 -0700
                        Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-06 10:34 +1000
                          Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-05 18:10 -0700
                Re: Implicit initialization is EVIL! Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-07-06 18:12 +1200
                  Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-06 06:51 -0700
                    Re: Implicit initialization is EVIL! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-07 00:32 +1000
                      Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-06 08:10 -0700
                        Re: Implicit initialization is EVIL! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-07 02:11 +1000
                          Re: Implicit initialization is EVIL! Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-06 11:28 -0500
                            Re: Implicit initialization is EVIL! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-07 03:41 +1000
                          Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-06 11:19 -0700
                            Re: Implicit initialization is EVIL! Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-06 13:36 -0500
                            Re: Implicit initialization is EVIL! Ian Kelly <ian.g.kelly@gmail.com> - 2011-07-06 13:15 -0600
                            Re: Implicit initialization is EVIL! MRAB <python@mrabarnett.plus.com> - 2011-07-06 20:34 +0100
                            Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-07 14:55 +1000
                        Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-07 02:24 +1000
                        Re: Implicit initialization is EVIL! "Waldek M." <wm@localhost.localdomain> - 2011-07-06 18:56 +0200
                        Re: Implicit initialization is EVIL! Tim Chase <python.list@tim.thechases.com> - 2011-07-06 12:37 -0500
                        Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-07 03:46 +1000
                    Re: Implicit initialization is EVIL! Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-07-07 17:34 +1200
                      Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-07 10:29 -0700
                        Re: Implicit initialization is EVIL! Chris Angelico <rosuav@gmail.com> - 2011-07-08 04:24 +1000
                        Re: Implicit initialization is EVIL! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-08 11:25 +1000
                          Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-08 10:30 -0700
                            Re: Implicit initialization is EVIL! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-09 14:41 +1000
                        Re: Implicit initialization is EVIL! Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-07-08 13:58 +1200
                        Re: Implicit initialization is EVIL! Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-07 13:42 -0500
          Re: Implicit initialization is EVIL! rantingrick <rantingrick@gmail.com> - 2011-07-05 15:47 -0700
            Re: Implicit initialization is EVIL! Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-07-06 18:29 +1200
    Re: Implicit initialization is EVIL! Robin Becker <robin@reportlab.com> - 2011-07-04 16:35 +0100
      Re: Implicit initialization is EVIL! nn <pruebauno@latinmail.com> - 2011-07-05 08:33 -0700
        Re: Implicit initialization is EVIL! Robin Becker <robin@reportlab.com> - 2011-07-05 17:23 +0100

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


#8842

FromWeb Dreamer <webdreamer@nospam.fr>
Date2011-07-05 18:00 +0200
Message-ID<4e133509$0$12858$426a74cc@news.free.fr>
In reply to#8831
Steven D'Aprano a écrit ce mardi 5 juillet 2011 16:25 dans 
<4e131ef7$0$29977$c3e8da3$5496439d@news.astraweb.com> :

> Gregory Ewing wrote:
> 
>> rantingrick wrote:
>>> Most applications consist of one main window
>>> (a Tkinter.Tk instance).
>> 
>> You've obviously never used a Macintosh. On the Mac, it's
>> perfectly normal for an application to open multiple
>> documents, each in its own window, with no one window
>> being the "main" window. Any of them can be closed (or
>> even *all* of them) and the application continues to run
>> until you explicitly quit it.
> 
> Or a Linux GUI. I have kwrite running with 15 open windows. The
> application doesn't exit until the last window is closed, and no window is
> privileged over the others.

What he means is that On Mac, if you close "all" windows, the application is 
still running.
If you have closed all windows and want to quit an app, you need to click 
it's icon (in the dock) or access it via <alt-tab> and explicitly quit it 
(in the application's menu, or <cmd-Q>).
Of coarse, for this to work, on Macs, the menu is not in the windows 
themselves. The menu is displayed in a menu-bar at the top of the screen, 
and changes to match the focussed application.

- Good point about it : If you closed all windows of a heavy application, 
you don't need to "relaunch" it to reopen a file (much faster).
- Bad point about it : Most Windows/Linux people I've seen trying a mac for 
the first time have lots of apps running, not knowing they didn't close them 
(until they ask why their dock is cluttered, or why apps usually in their 
dock stay with a "bleu dot" (meaning the app is running)).
Like for every thing else, their are pros and cons.


-- 
Web Dreamer

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


#8869

Fromrantingrick <rantingrick@gmail.com>
Date2011-07-05 15:42 -0700
Message-ID<999dd05c-cae5-4c86-8ee7-6e1d6116d2ed@gh5g2000vbb.googlegroups.com>
In reply to#8842
On Jul 5, 11:00 am, Web Dreamer <webdrea...@nospam.fr> wrote:

> What he means is that On Mac, if you close "all" windows, the application is
> still running.

Then that is NOT closing windows that is only ICONIFIYING/HIDING them.
Let's use the correct lingo people!

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


#8874

FromChris Angelico <rosuav@gmail.com>
Date2011-07-06 09:20 +1000
Message-ID<mailman.665.1309908056.1164.python-list@python.org>
In reply to#8869
On Wed, Jul 6, 2011 at 8:42 AM, rantingrick <rantingrick@gmail.com> wrote:
> Chris are you playing devils advocate (for my team). I am confused? :-)

I say whatever I choose to say. Don't pigeon-hole me into "on your
team" or "not on your team" or "devil's advocate" or whatever. And at
two in the morning, "whatever I choose to say" can be quite random. :)

> On Jul 5, 11:00 am, Web Dreamer <webdrea...@nospam.fr> wrote:
>
>> What he means is that On Mac, if you close "all" windows, the application is
>> still running.
>
> Then that is NOT closing windows that is only ICONIFIYING/HIDING them.
> Let's use the correct lingo people!

Actually, it IS closing those windows. Why wouldn't it be?

1) User presses Alt-F4, or clicks the X, or opens the system menu and
chooses 'Close Window'.
2) Windowing manager sends a message to the appropriate thread's queue
(on MS Windows, that's WM_CLOSE; not sure how on Linux as I haven't
bothered to dig that deep - interface layers like Tkinter and GTK
don't count).
2a) Toolkit passes message to application code, if applicable.
3) Application destroys this window, leaving the other windows alive.

The memory used by that window can be reclaimed. Handles to its
objects are no longer valid. The window really is closed. The
application might not have terminated, but that window has not been
minimized - the *window* is closed.

> And how do you EXPLICITY quit the application? Because the interface
> for window management(on windows box) is three buttons "minimize",
> "maximize", and "destroy". If closing the window only "hides" the
> window then you are just "managing" a window's "visibility". We are
> talking about destroying GUI processes here.

Presumably you would right-click it and choose "Exit" or something. Up
to the application. If all else fails, kill -9 it.

The interface for window management does not actually have "destroy",
it has "close". The normal handling of a close message is to destroy
the window; and in many applications, once all windows have been
destroyed, the process terminates. These are three quite separate
concepts. The separation of "close" and "destroy" is most easily seen
in "Are you sure" prompts - you send a Close signal to the window, but
the application queries you before going through with the destruction.
And even once the last window has been destroyed, that has nothing to
do with process termination.

I could conceivably write a program that sits invisibly in the
background until a network message arrives. Upon receipt of such a
message, the program initializes the GUI subsystem and opens a window.
When the user closes the window, the program flushes all GUI code out
of memory and waits for the next message. While it's waiting, is there
any "main window" that exists but has just been hidden? No. But is the
application still running? Of course! Completely separate.

ChrisA

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


#8877

Fromrantingrick <rantingrick@gmail.com>
Date2011-07-05 16:47 -0700
Message-ID<8e2cfeb0-ddbd-4cb5-ac88-91cc53394ac6@d7g2000vbv.googlegroups.com>
In reply to#8874
On Jul 5, 6:20 pm, Chris Angelico <ros...@gmail.com> wrote:
> On Wed, Jul 6, 2011 at 8:42 AM, rantingrick <rantingr...@gmail.com> wrote:
> [...]
> > On Jul 5, 11:00 am, Web Dreamer <webdrea...@nospam.fr> wrote:
> >> What he means is that On Mac, if you close "all" windows, the application is
> >> still running.
>
> > Then that is NOT closing windows that is only ICONIFIYING/HIDING them.
> > Let's use the correct lingo people!
>
> Actually, it IS closing those windows. Why wouldn't it be?
> [...]
> The memory used by that window can be reclaimed. Handles to its
> objects are no longer valid. The window really is closed. The
> application might not have terminated, but that window has not been
> minimized - the *window* is closed.

And you need the OS to that for you!?!? Are you joking?

> I could conceivably write a program that sits invisibly in the
> background until a network message arrives. Upon receipt of such a
> message, the program initializes the GUI subsystem and opens a window.
> When the user closes the window, the program flushes all GUI code out
> of memory and waits for the next message. While it's waiting, is there
> any "main window" that exists but has just been hidden? No. But is the
> application still running? Of course! Completely separate.

And so could i using Tkinter and it's "supposedly" flawed window
hierarchy. Remind me again why we are discussing this?

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


#8878

FromChris Angelico <rosuav@gmail.com>
Date2011-07-06 09:54 +1000
Message-ID<mailman.668.1309910052.1164.python-list@python.org>
In reply to#8877
On Wed, Jul 6, 2011 at 9:47 AM, rantingrick <rantingrick@gmail.com> wrote:
>> > Then that is NOT closing windows that is only ICONIFIYING/HIDING them.
>> > Let's use the correct lingo people!
>>
>> Actually, it IS closing those windows. Why wouldn't it be?
>> [...]
>> The memory used by that window can be reclaimed. Handles to its
>> objects are no longer valid. The window really is closed. The
>> application might not have terminated, but that window has not been
>> minimized - the *window* is closed.
>
> And you need the OS to that for you!?!? Are you joking?
>

To do what for me? Close windows? Reclaim memory? Terminate
applications? I don't understand your bogglement.

ChrisA

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


#8879

Fromrantingrick <rantingrick@gmail.com>
Date2011-07-05 17:15 -0700
Message-ID<48efc27f-7dc7-4980-a00a-74f42670c683@fv14g2000vbb.googlegroups.com>
In reply to#8878
On Jul 5, 6:54 pm, Chris Angelico <ros...@gmail.com> wrote:

> To do what for me? Close windows? Reclaim memory? Terminate
> applications? I don't understand your bogglement.

ClaimA: I made claim that Tkinter's window hierarchy is not only
normal, but justified in modern GUI programming.

ClaimB: You made a claim ( or supported a rebuttal claim) that Mac's
system of window management was superior and did not need such a
"window hierarchy" simply because;

1. You can create a program that twiddles it's thumbs (using very
little memory) until a message is received.
2. Upon receiving a message the program can open a GUI window.
3. When the user closes the GUI window (definition of "close" is not
nailed down yet!) the program will free the GUI memory and start
twiddling it's thumbs again until the next message arrives.
4. rinse and repeat until you are happy.

It's obvious that yours and my claims are contradicting. So with that
said, at what point does Tkinter or Windows fail in this example you
provide? Because, i can recreate the exact same functionality on a
windows box without need of the underlying window manager's help.

1. What is your point?
2. And how does it prove my position incorrect?

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


#8880

FromChris Angelico <rosuav@gmail.com>
Date2011-07-06 10:34 +1000
Message-ID<mailman.669.1309912450.1164.python-list@python.org>
In reply to#8879
On Wed, Jul 6, 2011 at 10:15 AM, rantingrick <rantingrick@gmail.com> wrote:
> On Jul 5, 6:54 pm, Chris Angelico <ros...@gmail.com> wrote:
>
>> To do what for me? Close windows? Reclaim memory? Terminate
>> applications? I don't understand your bogglement.
>
> ClaimA: I made claim that Tkinter's window hierarchy is not only
> normal, but justified in modern GUI programming.
>
> ClaimB: You made a claim ( or supported a rebuttal claim) that Mac's
> system of window management was superior and did not need such a
> "window hierarchy" simply because;

I never said "better". I just said that it's possible to create an
application that *to the user* has no main window, even though *to the
system* it does. And I'm also pointing out that in most good toolkits,
there's no "main window", but instead a "main thread".

> 1. You can create a program that twiddles it's thumbs (using very
> little memory) until a message is received.
> 2. Upon receiving a message the program can open a GUI window.
> 3. When the user closes the GUI window (definition of "close" is not
> nailed down yet!) the program will free the GUI memory and start
> twiddling it's thumbs again until the next message arrives.
> 4. rinse and repeat until you are happy.

Again, pointing out that it's possible, not that it's good. (Most
messenger programs will have a means of *sending* messages too, which
makes a good basis for a main window.) It's not efficient to keep
loading up GUI libraries and discarding them again. But it's possible,
and it would mean that you genuinely have multiple equal main windows.

> It's obvious that yours and my claims are contradicting. So with that
> said, at what point does Tkinter or Windows fail in this example you
> provide? Because, i can recreate the exact same functionality on a
> windows box without need of the underlying window manager's help.

Actually, everything you do requires the underlying window manager,
otherwise you're just painting your own pixels on the screen. And I
never said that this model was possible in some and not others.
(Although it's a bit harder with Windows; there's no explicit call to
finalize windowing, so most likely the application will hold GUI
memory until termination.)

ChrisA

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


#8882

Fromrantingrick <rantingrick@gmail.com>
Date2011-07-05 18:10 -0700
Message-ID<ec84fb8b-6951-4018-aec6-784f244bf884@q5g2000yqj.googlegroups.com>
In reply to#8880
On Jul 5, 7:34 pm, Chris Angelico <ros...@gmail.com> wrote:

> Actually, everything you do requires the underlying window manager,
> otherwise you're just painting your own pixels on the screen. And I
> never said that this model was possible in some and not others.
> (Although it's a bit harder with Windows; there's no explicit call to
> finalize windowing, so most likely the application will hold GUI
> memory until termination.)

Ah ha. I think we are getting somewhere now. Everything up to this
point has been mostly exposition :-)

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


#8904

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2011-07-06 18:12 +1200
Message-ID<97icm3Ft0eU1@mid.individual.net>
In reply to#8869
rantingrick wrote:

>>What he means is that On Mac, if you close "all" windows, the application is
>>still running.
> 
> Then that is NOT closing windows that is only ICONIFIYING/HIDING them.

No, the windows really are closed. They no longer exist
in any way. The application is still running, though, and
its menu bar will appear if you bring it to the front
(in MacOSX this is done by clicking on its dock icon;
in classic MacOS it was done by selecting from the menu
of running applications that was available in the top right
corner of the screen).

-- 
Greg

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


#8935

Fromrantingrick <rantingrick@gmail.com>
Date2011-07-06 06:51 -0700
Message-ID<cde10f0f-bdf1-435a-a0ed-1e02bf1dd356@a31g2000vbt.googlegroups.com>
In reply to#8904
On Jul 6, 1:12 am, Gregory Ewing <greg.ew...@canterbury.ac.nz> wrote:
> rantingrick wrote:
> >>What he means is that On Mac, if you close "all" windows, the application is
> >>still running.
>
> > Then that is NOT closing windows that is only ICONIFIYING/HIDING them.
>
> No, the windows really are closed. They no longer exist
> in any way. The application is still running, though, and
> its menu bar will appear if you bring it to the front
> (in MacOSX this is done by clicking on its dock icon;
> in classic MacOS it was done by selecting from the menu
> of running applications that was available in the top right
> corner of the screen).

Yes but what benefit does that gain over say, Tkinter's design
(because that has been your argument). I see no benefit at all. I can
destroy a GUI and still have a script run, but what's the point?

If you design a GRAPHICAL user interface, then once the GRAPHICAL part
is removed (window), why do need the main code to stick around? And if
you do, that fact has nothing to do with Tkinter and window hierarchy.
I think we've gone completely off topic here.

Is this another community strawman contest?
Are we mass producing these things now?

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


#8939

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2011-07-07 00:32 +1000
Message-ID<4e147207$0$29979$c3e8da3$5496439d@news.astraweb.com>
In reply to#8935
rantingrick wrote:

> If you design a GRAPHICAL user interface, then once the GRAPHICAL part
> is removed (window), why do need the main code to stick around? 

Open your mind to ideas that go beyond your simple window-centric paradigm!
There is more to graphical user interfaces than windows!

In the Mac OS GUI, an application can have a menubar and no windows. Windows
come and go as needed, but the menubar stays until the users quits the
application.

In the Unix/Linux world, there is a graphical application called xkill which
has no menus and no windows, all it has is a mouse cursor! No, it does not
run in the background: it is a foreground app.

An extreme case, but telling. There is no absolute need for any windows at
all, let alone for one privileged window to rule all the others.


-- 
Steven

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


#8944

Fromrantingrick <rantingrick@gmail.com>
Date2011-07-06 08:10 -0700
Message-ID<b57a6e39-ef59-4236-bb5a-6d7c87516e5b@r18g2000vbs.googlegroups.com>
In reply to#8939
On Jul 6, 9:32 am, Steven D'Aprano <steve
+comp.lang.pyt...@pearwood.info> wrote:
> rantingrick wrote:
> > If you design a GRAPHICAL user interface, then once the GRAPHICAL part
> > is removed (window), why do need the main code to stick around?
>
> Open your mind to ideas that go beyond your simple window-centric paradigm!

Correction: Window-Centric GUI paradigm! BIG DIFFERENCE.

> There is more to graphical user interfaces than windows!

OMG, you mean like, widgets? Whoa! Tell me more, Tell me more!

> In the Mac OS GUI, an application can have a menubar and no windows. Windows
> come and go as needed, but the menubar stays until the users quits the
> application.

That's just window visibility (whether by hiding or destroying) under
the veil of a detached UI window manager bar and has nothing to do
with window hierarchy. Your half stuffed straw men are leaking like a
sieve Steven.

> In the Unix/Linux world, there is a graphical application called xkill which
> has no menus and no windows, all it has is a mouse cursor! No, it does not
> run in the background: it is a foreground app.

Wow nice corner case. Can you come up with at least five of them
though? You and I both know that the vast majority of GUI's require
visible windows.

But wait! What is a GUI WINDOW exactly?

I'll tell you in the simplest terms i can muster... GUI "windows" are
an abstraction and nothing more. A GUI window is nothing more than an
imaginary area of the screen that can be drawn to. This area has
borders that define it. No not visible borders but two dimensional
spacial borders. THAT'S IT! The area could be 1x1 pixels OR the entire
screen space, OR even larger!

Most time you want the user to see the boundaries of this abstraction
(window) space and so the GUI library draws borders that represent
this boundary. Your "supposedly" windowless xkill application is not
windowless at all; THE WINDOW BOUNDARIES ARE JUST NOT DRAWN! The
window is the entire screen space OR IS JUST THE DESKTOP SPACE (same
thing)

> An extreme case, but telling. There is no absolute need for any windows at
> all, let alone for one privileged window to rule all the others.

Again your fear of losing "imaginary" freedoms is acting out again.
And your veiled attempts to link root GUI windows and Sauron (the
great antagonist of LOTH) is quite entertaining. Next you'll suggest
that root windows are really just a great eye, lidless,  and wreathed
in flame and that i am Saruman building an army of Orc followers hell
bent on destroying the freedom to believe self serving fantasies.

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


#8949

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2011-07-07 02:11 +1000
Message-ID<4e148932$0$29981$c3e8da3$5496439d@news.astraweb.com>
In reply to#8944
rantingrick wrote:

>> In the Mac OS GUI, an application can have a menubar and no windows.
>> Windows come and go as needed, but the menubar stays until the users
>> quits the application.
> 
> That's just window visibility (whether by hiding or destroying) under
> the veil of a detached UI window manager bar and has nothing to do
> with window hierarchy.

If all the windows are destroyed, and the application still is running and
active, where is your window hierarchy?



The Dead Window Sketch
======================

(with apologies to Monty Python)

Customer enters a pet shop.
Customer:  'Ello, I wish to register a complaint.
Owner:     We're closin' for lunch.
Customer:  Never mind that, my lad. I wish to complain about this GUI 
           window what I purchased not half an hour ago from this very
           boutique.
Owner:     Oh yes, the Norwegian Blue. What's wrong with it?
Customer:  I'll tell you what's wrong with it, my lad. It's deleted, 
           that's what's wrong with it!
Owner:     No, no, it's resting!
Customer:  Look, matey, I know a deleted window when I see one, and I'm 
           looking at one right now.
Owner:     No no it's not deleted, it's restin'! Remarkable window, the
           Norwegian Blue. Beautiful widgets!
Customer:  The widgets don't enter into it. It's completely destroyed.
Owner:     Nononono, no, no! It's resting!
Customer:  All right then, if it's restin', I'll wake it up!
           (shouting at the screen) 'Ello, Mister Wally Window! I've got
           a lovely fresh icon for you if you show...
(owner hits the screen)
Owner:     There, it refreshed!
Customer:  No, it didn't, that was you hitting the screen!
Owner:     I never!!
Customer:  Yes, you did!
Owner:     I never, never did anything...
Customer:  (yelling and hitting the screen repeatedly) 'ELLO WINDOW!!!
           WAKEY WAKEY! This is your notification signal!!!
           (takes the window out of the screen and thumps its title bar 
           on the counter. Throws it up in the air and watches it plummet 
           to the floor.)
Customer:  Now that's what I call a dead window.
Owner:     No, no... No, it's stunned!
Customer:  STUNNED?!?
Owner:     Yeah! You stunned it, just as it was maximising! Norwegian 
           Blues stun easily.
Customer:  Now look, mate, I've definitely 'ad enough of this! That 
           window is definitely deleted, and when I purchased it not 
           'alf an hour ago, you assured me that its lack of an entry 
           in the task bar was due to it bein' tired and shagged out 
           following a long refresh!
Owner:     Well, it's... probably pining for the fjords.
Customer:  PININ' for the FJORDS?!?!?!? What kind of talk is that? Look,
           why did it fall flat on its back the moment I got it home?
Owner:     The Norwegian Blue prefers being minimised on its back! 
           Remarkable bird, i'nit, squire? Lovely scroll bars!
Customer:  Look, I took the liberty of examining that window when I 
           got it home, and I discovered the only reason that the 
           window was still visible in the first place was that it 
           had been NAILED there.
(pause)
Owner:     Well, o'course it was nailed there! If I hadn't nailed that 
           window down, it would have nuzzled up to those pixels, bent 
           'em apart with its cursor, and VOOM! Feeweeweewee!
Customer:  "VOOM"?!? Mate, this window wouldn't "voom" if you put four 
           million volts through it! Its bleedin' memory is reclaimed!
Owner:     No no! It's pining!
Customer:  It's not pinin'! It's purged! This window is no more! It's
           pointer has ceased to be! It's expired and gone to meet the
           memory manager! Bereft of bytes, it rests in peace! If you 
           hadn't nailed it to the screen it'd be a Flash animation in 
           a browser by now! It's callbacks are now 'istory! Its ref 
           count is zero! It's called the garbage collector, its blocks
           have been cleared, shuffled off this mortal coil, run down 
           the curtain and joined the bleedin' choir invisibile!! THIS 
           IS AN EX-WINDOW!!
(pause)
Owner:     Well, I'd better replace it, then.
(he takes a quick peek behind the counter)
Owner:     Sorry squire, I've had a look 'round the back of the shop, and 
           uh, we're right out of windows.
Customer:  I see. I see, I get the picture.
Owner:     I got a DOS batch file.
(pause)
Customer:  (sweet as sugar) Pray, does it talk?
Owner:     Yes.
Customer:  Right, I'll have that one then.




-- 
Steven

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


#8959

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2011-07-06 11:28 -0500
Message-ID<mailman.707.1309971602.1164.python-list@python.org>
In reply to#8949
On 2011.07.06 11:11 AM, Steven D'Aprano wrote:
> The Dead Window Sketch
> ======================
As much as I hate it when people feed trolls, that was pretty funny.

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


#8963

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2011-07-07 03:41 +1000
Message-ID<4e149e5a$0$29996$c3e8da3$5496439d@news.astraweb.com>
In reply to#8959
Andrew Berg wrote:

> On 2011.07.06 11:11 AM, Steven D'Aprano wrote:
>> The Dead Window Sketch
>> ======================
> As much as I hate it when people feed trolls, that was pretty funny.

Thanks.

Re the troll-feeding, every few months I get a strange seizure in my brain
that compels me to interact with rantingrick and try to treat him
seriously. It never ends well, he always ends up back in my killfile.

Call it the triumph of hope over experience.



-- 
Steven

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


#8968

Fromrantingrick <rantingrick@gmail.com>
Date2011-07-06 11:19 -0700
Message-ID<433cd778-ac93-435b-a7da-ff17ada29a64@n5g2000yqh.googlegroups.com>
In reply to#8949
On Jul 6, 11:11 am, Steven D'Aprano <steve
+comp.lang.pyt...@pearwood.info> wrote:

> The Dead Window Sketch
> ======================
>
> [snip]


##########################
 The Roman Stawman Sketch
##########################

[cmp.lang.python]:
(The trolls are gathered and a righteous man speaks.)

GRACCHUS: For your guidance TrollCaesar, the Senate has prepared a
series of protocols to address the many problems in the community,
beginning with basic understanding of USER DEFINED CONTROL STRUCTURES,
which is already propagated wildly throughout the community and people
are suffering gravely from a misunderstanding. So if TrollCaesar…

(Obviously bored, Commodus is spinning his sword on its tip on the
marble floor.  He interrupts.)

COMMODUS: Shhh.  Don’t you see Gracchus?  That’s the very problem,
isn’t it?  You've spent all your time at study, at books, learning and
programming.  All the while my self aggrandizing has been forgotten by
the people.

(He rises and brings his sword to rest across his shoulders.  He
begins to pace.)

GRACCHUS: But comp.lang.python is the people, Sire, chosen from among
the people, a place to "speak" for the people.
COMMODUS: I doubt if many people know as much as you do Gracchus, or
have such splendid code bases, Gaius. I think I understand my own
people.
GRACCHUS: Then perhaps TrollCaesar would be so kind as to teach us,
out of his own extensive experience about the nature of USER DEFINED
CONTROL STRUCTURES.

(Laughter is heard from the other group members.)

COMMODUS: I call it lies. The people are my children and I their
father. I shall hold them to my bosom and embrace them tightly with
lies and propaganda.
GRACCHUS(interrupting): Have you ever embraced someone dying of
exceptions, Sire?

(Commodus stops pacing and turns to face Gracchus bringing his sword
down from his shoulder.)

COMMODUS: No, but if you interrupt me again, I assure you, that you
shall!

[INT. PALACE – COMMODUS CHAMBERS]:
(He is struggling to clear his conscience. Lucilla assists him.)

COMMODUS: Who would deign to lecture me?
LUCILLA: Commodus, the community has its uses.
COMMODUS: What uses?  All they do is talk. It should be just you and
me, and Guido.
LUCILLA: Don’t even think it.  There has always been a community.
COMMODUS: The community has changed. It takes an emperor to rule an
empire.
LUCILLA: Of course, but leave the people their (She hesitates,
searching for the right word.)
COMMODUS: Illusions?
LUCILLA: Traditions.
COMMODUS: My war against the righteous, they said it themselves, it
achieved nothing. But the minions loved me!
LUCILLA: Minions always love victories.
COMMODUS: Why? They didn’t see all the work that went into stuffing
those straw-men.
LUCILLA: They care about the entertainment.
COMMODUS: The Entertainment?  Well what is that?
LUCILLA: It’s a way to waste time, entertainment. Entertainment is a
vision.
COMMODUS: Exactly! A vision. Do you not see, Lucilla? I will give the
people a vision, a false vision and they will love me for it. And
they’ll soon forget the tedious sermonizing of a few honest group
members.

(He extends his hand to her and without hesitation, she accepts it.
Commodus raises her hand to his lips and kisses it.)

COMMODUS: I will give the people the greatest false vision of their
lives... Strawmen! Legions of them!

(A hand reaches out and opens a mail reader. It is Usenet. And a
thread called the "Dead Window Sketch".  The splendor of his false
victory.)

[EXT. Rome – MARKET]:
(Gaius approaches Gracchus at an outdoor café (starbucks).  Gaius is
waving a leaflet advertising
“Comp.lang.python.Gladiators_Violante.”)

GAIUS: Straw-men. 150 days of Straw-men!
GRACCHUS: He’s cleverer than I thought.
GAIUS: Clever? The whole of cmp.lang.python would be laughing at him
if they weren't so afraid of his forked tongue.
GRACCHUS: Fear and wonder. A powerful combination.
GAIUS: You really think the people will be seduced by that?
GRACCHUS: I think he knows what comp.lang.python is. Comp.lang.python
is the mob. He will conjure comedy for them and they will be
distracted. He will take away their freedom to think with half stuffed
straw-men, and still they will roar. The beating heart of
comp.lang.python is not the halls of righteousness; it is the den of
minions.  He will give them tripe, and they will love him for it.

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


#8970

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2011-07-06 13:36 -0500
Message-ID<mailman.714.1309977392.1164.python-list@python.org>
In reply to#8968
On 2011.07.06 01:19 PM, rantingrick wrote:
> ##########################
>  The Roman Stawman Sketch
> ##########################
Nice try, but you have to use a Monty Python sketch (and you have to
spell correctly :-P ).

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


#8974

FromIan Kelly <ian.g.kelly@gmail.com>
Date2011-07-06 13:15 -0600
Message-ID<mailman.717.1309979782.1164.python-list@python.org>
In reply to#8968
On Wed, Jul 6, 2011 at 12:36 PM, Andrew Berg <bahamutzero8825@gmail.com> wrote:
> On 2011.07.06 01:19 PM, rantingrick wrote:
>> ##########################
>>  The Roman Stawman Sketch
>> ##########################
> Nice try, but you have to use a Monty Python sketch (and you have to
> spell correctly :-P ).

Seriously.  The source he borrowed from is the movie Gladiator, which
isn't even a comedy.

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


#8976

FromMRAB <python@mrabarnett.plus.com>
Date2011-07-06 20:34 +0100
Message-ID<mailman.718.1309980870.1164.python-list@python.org>
In reply to#8968
On 06/07/2011 20:15, Ian Kelly wrote:
> On Wed, Jul 6, 2011 at 12:36 PM, Andrew Berg<bahamutzero8825@gmail.com>  wrote:
>> On 2011.07.06 01:19 PM, rantingrick wrote:
>>> ##########################
>>>   The Roman Stawman Sketch
>>> ##########################
>> Nice try, but you have to use a Monty Python sketch (and you have to
>> spell correctly :-P ).
>
> Seriously.  The source he borrowed from is the movie Gladiator, which
> isn't even a comedy.

If it was from "Life of Brian", then it would be OK:

What has Guido ever done for us...? :-)

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


#9006

FromChris Angelico <rosuav@gmail.com>
Date2011-07-07 14:55 +1000
Message-ID<mailman.732.1310014549.1164.python-list@python.org>
In reply to#8968
On Thu, Jul 7, 2011 at 5:15 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> On Wed, Jul 6, 2011 at 12:36 PM, Andrew Berg <bahamutzero8825@gmail.com> wrote:
>> On 2011.07.06 01:19 PM, rantingrick wrote:
>>> ##########################
>>>  The Roman Stawman Sketch
>>> ##########################
>> Nice try, but you have to use a Monty Python sketch (and you have to
>> spell correctly :-P ).
>
> Seriously.  The source he borrowed from is the movie Gladiator, which
> isn't even a comedy.

Thanks, I was wondering where it was from. Unfortunately parodies tend
to lose a lot if the reader doesn't know the original (although there
are exceptions to that).

ChrisA

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


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

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


csiph-web