On Saturday, May 17, 2014 7:36:19 PM UTC+5:30, Roy Smith wrote:
>
> Mark Lawrence wrote:
> > > Now translate E=mc^2 into Java.
> > >
> >
> > I can't do that as I simply don't understand it. What has the
> > Marylebone Cricket Club got to do with E?
>
> A wicket looks like an E on its side.
On 17/05/2014 15:06, Roy Smith wrote:
In article ,
Mark Lawrence wrote:
On 17/05/2014 13:52, Albert van der Horst wrote:
Now translate E=mc^2 into Java.
I can't do that as I simply don't understand it. What has the
Marylebone Cricket Club got to do with E?
A wicket looks like an E on
In article ,
Mark Lawrence wrote:
> On 17/05/2014 13:52, Albert van der Horst wrote:
> >
> > Now translate E=mc^2 into Java.
> >
>
> I can't do that as I simply don't understand it. What has the
> Marylebone Cricket Club got to do with E?
A wicket looks like an E on its side. Does that help
On 17/05/2014 13:52, Albert van der Horst wrote:
Now translate E=mc^2 into Java.
I can't do that as I simply don't understand it. What has the
Marylebone Cricket Club got to do with E?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our languag
In article ,
Chris Angelico wrote:
> On Sat, May 17, 2014 at 10:52 PM, Albert van der Horst
> wrote:
> > That may be tong-in-cheek but mathematicians do exactly that. We
> > use roman, greek and hebrew alphabets in normal italics and boldface
> > and then some special characters for element-of,
In article ,
Tim Chase wrote:
> On 2014-05-17 12:52, Albert van der Horst wrote:
> > Now translate E=mc^2 into Java.
>
> I suspect it would be something like
>
> public class Einstein {
> private double mass=0, energy=0;
> public class Relativity implements IEquation {
> Relativity(do
On 2014-05-17 12:52, Albert van der Horst wrote:
> Now translate E=mc^2 into Java.
I suspect it would be something like
public class Einstein {
private double mass=0, energy=0;
public class Relativity implements IEquation {
Relativity(double mass) {
set_mass(mass);
}
public
On Sat, May 17, 2014 at 10:52 PM, Albert van der Horst
wrote:
> That may be tong-in-cheek but mathematicians do exactly that. We
> use roman, greek and hebrew alphabets in normal italics and boldface
> and then some special characters for element-of, logical-or, integral signs,
> triangles and wha
In article ,
Chris Angelico wrote:
>On Fri, May 16, 2014 at 12:17 AM, wrote:
>> One another trick is to drop spaces around keywords
>>
> 9and 12345or 99if 'a'in'a' else or 77
>> 12345
>>
>> and pray, the tools from those who are wasting their time in
>> writing code
Chris Angelico :
> Compare these two assignment statements:
>
> area = (base*base + extension*extension
> + annex*annex + (annex-extension)*annex
> + triangle*triangle/2
> + circle*circle*math.PI + sphere*sphere*4*math.PI)
>
> area = (base*base + extension*extension + annex*annex
>
On Fri, May 16, 2014 at 7:18 PM, Marko Rauhamaa wrote:
> If every bit of your Python text conveys information, obviously, it
> can't be abstracted. I don't believe that to be the case, though. So
> this AST should contain all *actual* information worth conveying and
> strip away irrelevant stuff.
Chris Angelico :
> You still haven't answered my biggest objection from earlier. Source
> code contains more information than the AST does; even if you make a
> frAnkenSTein's monster that includes comments, there's still the point
> that whitespace carries information, and that information is
> f
On Fri, May 16, 2014 at 5:00 PM, Marko Rauhamaa wrote:
> Well, actually, any .py file *does* specify a unique AST. Nothing would
> prevent the text editor from presenting it according to your
> preferences. They all do that to a degree anyway (colors, fonts), but
> they could take even more libert
On Fri, May 16, 2014 at 4:25 PM, Steven D'Aprano
wrote:
> Containing *what*? You can't just wave your hands and say "binary". What
> sort of binary file? Perhaps a JPEG file, where red triangles of
> different sizes represent keywords. Variable names can be encoded using a
> pattern of purple dots
On Thu, 15 May 2014 17:06:13 -0700, Rustom Mody wrote:
> The claim being made is that 79/80 is a fundamental, cognitive limit and
> has no relation to technological changes.
I don't believe anyone has made that claim. You are reading a statement
about general (typical, average) behaviour, and tu
Steven D'Aprano :
> On Thu, 15 May 2014 17:12:57 +0300, Marko Rauhamaa wrote:
>
>> A definitive Python source file could be binary, XML, .py, .ast,
>> whatever,
>
> Containing *what*? You can't just wave your hands and say "binary".
I sure can and am.
> Besides, where does the information insid
Steven D'Aprano writes:
> Source code is, *by definition*, the definitive version. (It's the
> SOURCE, see?) Zipping the source code just means that the *source*
> inside the zip file is the definitive version, not the compressed
> binary data.
I find the Free Software Foundation has a good, cle
On Thu, 15 May 2014 17:12:57 +0300, Marko Rauhamaa wrote:
> A definitive Python source file could be binary, XML, .py, .ast,
> whatever,
Containing *what*? You can't just wave your hands and say "binary". What
sort of binary file? Perhaps a JPEG file, where red triangles of
different sizes rep
Rustom Mody writes:
> You said this:
>
> > The 80 character line limit is *not* driven by a limitation of
> > computer technology; it is driven by a limitation of human
> > cognition. For that reason, it remains relevant until human
> > cognition in the general reading population improves.
>
> An
On Friday, May 16, 2014 5:51:21 AM UTC+5:30, Ben Finney wrote:
>
>
> Rather, I've claimed that the conventional lime length limit is *based
> in* the real cognitive limits of human reading comprehension -- and that
> technologies have been designed with corresponding limitations.
>
>
> Nowhere
On Thu, 15 May 2014 06:58:53 -0700, Rustom Mody wrote:
> As far as I can see the votaries of the mystical 79 have yet to explain
> how/where it appeared from
You're either trolling, or haven't been reading this thread in any
detail. That's already been explained, repeatedly both in this thread a
On Thu, 15 May 2014 16:07:54 +0300, Marko Rauhamaa wrote:
> Johannes Bauer :
>
>> I don't know why anyone would force a display issue onto everyone.
>
> Well, if I have to work with your code, you are forcing your style on
> me.
+1
>> It imples the arrogant stance that every human being has t
Rustom Mody writes:
> The claim being made is that 79/80 is a fundamental, cognitive limit
> and has no relation to technological changes.
Who has made that claim, and where? You appear to be attacking a straw
man.
Rather, I've claimed that the conventional lime length limit is *based
in* the r
On Friday, May 16, 2014 3:51:27 AM UTC+5:30, Terry Reedy wrote:
> On 5/15/2014 9:58 AM, Rustom Mody wrote:
>
>
> > As far as I can see the votaries of the mystical 79 have yet to explain
> > how/where it appeared from
>
>
>
> As has been explained before, and is implied in the PEP, 79 = 80 - 1
On 2014-05-15 22:50, Terry Reedy wrote:
On 5/15/2014 10:42 AM, Chris Angelico wrote:
Impossible to say, and one of the perpetual annoyances. Here's a web
site that I host:
http://gilbertandsullivan.org.au/index.php?option=com_content&view=article&id=92:2001-patience&catid=30:patience&Itemid=10
Johannes Bauer writes:
> On 15.05.2014 04:43, Ben Finney wrote:
> > Rustom Mody writes:
> >
> >> Until then may we relegate '79' to quaint historical curiosities
> >
> > Not until the general capacity of human cognition advances to make
> > longer lines easier to read.
>
> I find it surprising
On 5/15/2014 9:58 AM, Rustom Mody wrote:
As far as I can see the votaries of the mystical 79 have yet to explain
how/where it appeared from
As has been explained before, and is implied in the PEP, 79 = 80 - 1.
80 chars - 1 character width cursor leaves 79 non-cursor characters.
When is hit,
On 5/15/2014 10:42 AM, Chris Angelico wrote:
Impossible to say, and one of the perpetual annoyances. Here's a web
site that I host:
http://gilbertandsullivan.org.au/index.php?option=com_content&view=article&id=92:2001-patience&catid=30:patience&Itemid=102
(Tiny URL: http://tinyurl.com/pphpkuk
On Thu, 15 May 2014 23:44:34 +1000, Chris Angelico wrote:
> On Thu, May 15, 2014 at 11:38 PM, alister
> wrote:
>> On Thu, 15 May 2014 23:31:44 +1000, Chris Angelico wrote:
>>> The Windows 8 / Unity / GNOME 3 model annoys me greatly. Can't get
>>> work done like that.
>>>
>>> ChrisA
>> Windows 8/
On 15/05/2014 14:58, Roy Smith wrote:
In article <[email protected]>,
Rustom Mody wrote:
And yet programmers continue to be decades behind all other users of
computers. We continue to use flat text for our programs when all others
have moved on.
It's no
Le jeudi 15 mai 2014 16:27:16 UTC+2, Chris Angelico a écrit :
> On Fri, May 16, 2014 at 12:17 AM, wrote:
>
> > One another trick is to drop spaces around keywords
>
> >
>
> 9and 12345or 99if 'a'in'a' else or 77
>
> > 12345
>
> >
>
> > and pray, the tools from th
On Fri, May 16, 2014 at 12:36 AM, Marko Rauhamaa wrote:
> You and I could have opened the same C file. Only you see:
>
>#include
>
>int ++
>main ( int argc, | My first C program |
> char *cons
On Fri, May 16, 2014 at 12:29 AM, Marko Rauhamaa wrote:
> An everyday example: a word processor displays the word "hello" with
> "hel" in boldface and "lo" in italics. You put the cursor between the
> l's and type a letter. Should it be in boldface or italics?
Impossible to say, and one of the pe
Chris Angelico :
> I believe the Python interpreter happily accepts a zip file, which in
> theory could be edited directly by a competent text editor. But that
> has nothing to do with PEP 8. Compare a classic compiled language like
> C - you have the bit you edit (the C source code) and the "defi
On Thu, May 15, 2014 at 9:29 AM, Marko Rauhamaa wrote:
> Who of you hasn't sworn at a Web editor that gets the formatting all
> messed up when you have typed a backspace in the "wrong place?"
My current pet peeve is the Gmail composition pane. What a load of
crap (especially in rich text mode).
On Fri, May 16, 2014 at 12:17 AM, wrote:
> One another trick is to drop spaces around keywords
>
9and 12345or 99if 'a'in'a' else or 77
> 12345
>
> and pray, the tools from those who are wasting their time in
> writing code analyzers or syntax colorizers or doc strings
Rustom Mody :
> And yet you routinely find people on this list recommending writing
> python to using a GUI-builder. On the one hand I am tempted to say
> "Sheesh!!" On the other, maybe the builders are still too
> half-assed... Dunno
That's like diagnosing cancer without invasive procedures, lab
On Fri, May 16, 2014 at 12:12 AM, Marko Rauhamaa wrote:
> A definitive Python source file could be binary, XML, .py, .ast,
> whatever, and that would also be the file fed to the Python
> compiler/interpreter. However, your editor could choose freely how to
> present it to you.
>
> IOW, shouldn't P
Le mardi 13 mai 2014 10:45:49 UTC+2, Peter Otten a écrit :
> Ganesh Pal wrote:
>
>
>
> > Hi Team ,
>
> >
>
> >
>
> > what would be the best way to intent the below line .
>
> >
>
> > I have few lines in my program exceeding the allowed maximum line Length
>
> > of 79./80 characters
>
On Thursday, May 15, 2014 7:28:01 PM UTC+5:30, Roy Smith wrote:
>
> Rustom Mody wrote:
>
>
>
> > And yet programmers continue to be decades behind all other users of
> > computers. We continue to use flat text for our programs when all others
> > have moved on.
>
>
>
> It's not like we h
Rustom Mody :
> We continue to use flat text for our programs when all others have
> moved on.
My more moderate and immediate point is, why should the physical
encoding of the program be also the presentation format?
A definitive Python source file could be binary, XML, .py, .ast,
whatever, and
On Thu, May 15, 2014 at 11:58 PM, Roy Smith wrote:
> There *are* some places where non-text programming has won. The biggest
> example would be GUI builders. Nobody programs screen and window
> layouts by typing textual descriptions. They push boxes around in a GUI
> builder.
Hi, I'm Nobody, a
On Thursday, May 15, 2014 6:57:26 PM UTC+5:30, Chris Angelico wrote:
> The limit of human readability is generally given to be somewhere in
> the range of 60-120. It's not a single specific value that's exactly
> the same for everyone; personally, I like my lines of code to be a bit
> longer than 8
In article <[email protected]>,
Rustom Mody wrote:
> And yet programmers continue to be decades behind all other users of
> computers. We continue to use flat text for our programs when all others
> have moved on.
It's not like we haven't tried. There hav
On Thursday, May 15, 2014 6:37:54 PM UTC+5:30, Marko Rauhamaa wrote:
> Johannes Bauer :
>
>
> > I don't know why anyone would force a display issue onto everyone.
>
>
> Well, if I have to work with your code, you are forcing your style on
> me.
>
>
> > It imples the arrogant stance that every
On Thu, May 15, 2014 at 11:38 PM, alister
wrote:
> On Thu, 15 May 2014 23:31:44 +1000, Chris Angelico wrote:
>> The Windows 8 / Unity / GNOME 3 model annoys me greatly. Can't get work
>> done like that.
>>
>> ChrisA
> Windows 8/ Unity/ Gnome 3 are great on tablets (at least they look like
> they s
On Thu, 15 May 2014 23:31:44 +1000, Chris Angelico wrote:
> The Windows 8 / Unity / GNOME 3 model annoys me greatly. Can't get work
> done like that.
>
> ChrisA
Windows 8/ Unity/ Gnome 3 are great on tablets (at least they look like
they should be the only one I can confirm is Win 8) but lousy on
On Thu, May 15, 2014 at 11:07 PM, Marko Rauhamaa wrote:
> I know the idea of "windows" is fast disappearing from modern
> ("mobile") computing; you have "apps" instead that commandeer the whole
> screen. Personally, I find that a big step backwards. I want to be able
> to subdivide the screen for
On Thu, May 15, 2014 at 10:32 PM, Johannes Bauer wrote:
> Personally I find overly narrow code (80 cols) to be much *harder* to
> read than code that is 100 cols wide. Keep in mind that even if the
> break is at 100 cols, lines will rarely exceed that limit. And if they
> do to *understand* the co
Johannes Bauer :
> I don't know why anyone would force a display issue onto everyone.
Well, if I have to work with your code, you are forcing your style on
me.
> It imples the arrogant stance that every human being has the exact way
> of reading and writing code. Everyone can configure her edito
On 15.05.2014 04:43, Ben Finney wrote:
> Rustom Mody writes:
>
>> Until then may we relegate '79' to quaint historical curiosities
>
> Not until the general capacity of human cognition advances to make
> longer lines easier to read.
I find it surprising how you can make such a claim about the w
On 05/14/2014 10:12 PM, Roy Smith wrote:
In article ,
Mark Lawrence wrote:
I still remember the cry of anguish when the guy in the computer
building at (the then) Portsmouth Polytechnic dropped his cardboard box
of punch cards that made up his end of course project.
That's why you punch se
On 15/05/2014 03:43, Ben Finney wrote:
Rustom Mody writes:
Until then may we relegate '79' to quaint historical curiosities
Not until the general capacity of human cognition advances to make
longer lines easier to read.
We humans may be historical curiosities some day; until then, let's
con
On Wed, 14 May 2014 19:36:13 -0700, Rustom Mody wrote:
> And there are (semi)hard technological limits like if you post code
> longer 65 chars out here it will fold at random unforeseen points. These
> limits get irrelevant as the technology changes.
The technological limits may become irrelevant
Rustom Mody writes:
> Until then may we relegate '79' to quaint historical curiosities
Not until the general capacity of human cognition advances to make
longer lines easier to read.
We humans may be historical curiosities some day; until then, let's
continue to write our code as though humans
On Thursday, May 15, 2014 4:23:52 AM UTC+5:30, Albert van der Horst wrote:
>
> Rustom Mody wrote:
> >80-character limit?!
> >Sheesh! A relic of the days when terminals were ASCII and 80x24
>
>
> 80 character was the hard limit.
> The soft limit for readability is 60..65 characters.
> Think abo
In article ,
Mark Lawrence wrote:
> I still remember the cry of anguish when the guy in the computer
> building at (the then) Portsmouth Polytechnic dropped his cardboard box
> of punch cards that made up his end of course project.
That's why you punch sequence numbers in columns 73-80. If t
On 15/05/2014 01:15, Gary Herron wrote:
Which is a relic of the even older punch cards which contained one line
of (up to) 80 characters.
Gary Herron
I still remember the cry of anguish when the guy in the computer
building at (the then) Portsmouth Polytechnic dropped his cardboard box
of
On 05/14/2014 03:53 PM, Albert van der Horst wrote:
In article ,
Rustom Mody wrote:
On Tuesday, May 13, 2014 12:37:24 PM UTC+5:30, Ganesh Pal wrote:
Hi Team ,
what would be the best way to intent the below line .
I have few lines in my program exceeding the allowed maximum line
Length of
In article ,
Rustom Mody wrote:
>On Tuesday, May 13, 2014 12:37:24 PM UTC+5:30, Ganesh Pal wrote:
>> Hi Team ,
>>
>>
>> what would be the best way to intent the below line .
>>
>> I have few lines in my program exceeding the allowed maximum line
>Length of 79./80 characters
>>
>>
>> Example 1 :
On 5/13/2014 6:55 PM, Ben Finney wrote:
Steven D'Aprano writes:
On Tue, 13 May 2014 04:52:26 -0700, Rustom Mody wrote:
What this goes to show is that while 80 is ridiculously low by most
displays today,
Not for people who like to has two (or three, or four) windows side-by-
side. Or multip
In article ,
Ben Finney wrote:
> Roy Smith writes:
>
> > >p = Subprocess.Popen(shlex.split(cmd),
> > > stdout=subprocess.PIPE,
> > > stderr=subprocess.PIPE)
>
> That is PEP 8 conformant, but I find it hurts maintainability: it is far
> too m
Ben Finney wrote:
The 80 character line limit is *not* driven by a limitation of computer
technology; it is driven by a limitation of human cognition. For that
reason, it remains relevant until human cognition in the general reading
population improves.
Another thing: Just because I may have 20
Steven D'Aprano writes:
> On Tue, 13 May 2014 04:52:26 -0700, Rustom Mody wrote:
>
> > What this goes to show is that while 80 is ridiculously low by most
> > displays today,
>
> Not for people who like to has two (or three, or four) windows side-by-
> side. Or multiple views of the same documen
On Tue, 13 May 2014 04:52:26 -0700, Rustom Mody wrote:
> What this goes to show is that while 80 is ridiculously low by most
> displays today,
Not for people who like to has two (or three, or four) windows side-by-
side. Or multiple views of the same document.
> it is too high for many web/mai
On Tuesday, May 13, 2014 2:15:49 PM UTC+5:30, Peter Otten wrote:
> Ganesh Pal wrote:
> > what would be the best way to intent the below line .
> >p =
> > Subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subprocess.PIPE)
> (3) Import names:
>
>
> from subprocess import PIPE
> p
On 2014-05-13 22:26, Ben Finney wrote:
> Changing the name on the first line doesn't entail changing any
> other line::
>
> proc = Subprocess.Popen(
> shlex.split(cmd),
> stdout=subprocess.PIPE,
> stderr=subprocess.PIPE)
>
> special_process_map[this_pro
Roy Smith writes:
> >p = Subprocess.Popen(shlex.split(cmd),
> > stdout=subprocess.PIPE,
> > stderr=subprocess.PIPE)
That is PEP 8 conformant, but I find it hurts maintainability: it is far
too much indentation. Horizontal space is costly, becau
Ganesh Pal writes:
> what would be the best way to intent the below line .
You'd need to define “best” in order to get an objective answer.
So my answer will be based on my preferences, and general rules I've
observed for making code readable.
> Example 1 :
>
>p =
> Subprocess.Popen(shlex.
In article ,
Ganesh Pal wrote:
> Hi Team ,
>
>
> what would be the best way to intent the below line .
>
> I have few lines in my program exceeding the allowed maximum line Length of
> 79./80 characters
>
> Example 1 :
>
>p =
> Subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,
On Tuesday, May 13, 2014 12:37:24 PM UTC+5:30, Ganesh Pal wrote:
> Hi Team ,
>
>
> what would be the best way to intent the below line .
>
> I have few lines in my program exceeding the allowed maximum line Length of
> 79./80 characters
>
>
> Example 1 :
>
>
>p =
> Subprocess.Popen(s
On Tue, 13 May 2014 10:45:49 +0200, Peter Otten wrote:
> Ganesh Pal wrote:
>
>> Hi Team ,
>>
>>
>> what would be the best way to intent the below line .
>>
>> I have few lines in my program exceeding the allowed maximum line
>> Length of 79./80 characters
>>
>> Example 1 :
>>
>>p =
>>
Ganesh Pal wrote:
> Hi Team ,
>
>
> what would be the best way to intent the below line .
>
> I have few lines in my program exceeding the allowed maximum line Length
> of 79./80 characters
>
> Example 1 :
>
>p =
>
Subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subproce
73 matches
Mail list logo