Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"Seed me, Seymour" -- a random number generator meets the big green mother from outer space


computers / comp.os.linux.advocacy / Tabs As Syntax

SubjectAuthor
* Tabs As SyntaxNuxxie
+* Re: Tabs As SyntaxChris Ahlstrom
|+* Re: Tabs As SyntaxDFS
||+- Re: The more spastic the code, the greater the whitespace & comments.DFS
||+- Re: Tabs As SyntaxLawrence D'Oliveiro
||`* Re: Tabs As Syntaxrbowman
|| +* Re: Tabs As SyntaxLawrence D'Oliveiro
|| |`* Re: Tabs As Syntaxrbowman
|| | `- Re: Tabs As SyntaxLawrence D'Oliveiro
|| +* Re: Tabs As SyntaxDFS
|| |`* Re: Tabs As Syntaxrbowman
|| | +- Re: Tabs As SyntaxLawrence D'Oliveiro
|| | +* Re: Tabs As Syntaxcandycanearter07
|| | |`* Re: Tabs As SyntaxChris Ahlstrom
|| | | `- Re: Tabs As Syntaxrbowman
|| | `- Re: Tabs As SyntaxDFS
|| `* Re: Tabs As SyntaxChris Ahlstrom
||  +* Re: Tabs As Syntaxrbowman
||  |+* Re: Tabs As SyntaxChris Ahlstrom
||  ||+* Re: Tabs As Syntaxcandycanearter07
||  |||`- Re: Tabs As SyntaxChris Ahlstrom
||  ||`* Re: Tabs As SyntaxLawrence D'Oliveiro
||  || `* Re: Tabs As SyntaxChris Ahlstrom
||  ||  +* Re: Tabs As SyntaxDFS
||  ||  |+- Re: Tabs As Syntaxrbowman
||  ||  |+- Re: Tabs As SyntaxLawrence D'Oliveiro
||  ||  |`* Re: Tabs As SyntaxChris Ahlstrom
||  ||  | `- Re: Tabs As SyntaxPhysfitfreak
||  ||  `- Re: Tabs As Syntaxrbowman
||  |`* Re: Tabs As SyntaxDFS
||  | `- Re: Tabs As Syntaxrbowman
||  `* Re: Tabs As SyntaxLawrence D'Oliveiro
||   `- Re: Tabs As SyntaxChris Ahlstrom
|`* Re: Tabs As SyntaxLawrence D'Oliveiro
| `* Re: Tabs As SyntaxDFS
|  `* Re: Tabs As SyntaxLawrence D'Oliveiro
|   `* Re: Tabs As SyntaxDFS
|    `* Re: Tabs As SyntaxLawrence D'Oliveiro
|     +* Re: Tabs As SyntaxDFS
|     |`* Re: Tabs As SyntaxLawrence D'Oliveiro
|     | `* Re: Tabs As SyntaxDFS
|     |  `* Re: Tabs As SyntaxLawrence D'Oliveiro
|     |   `* Re: Tabs As SyntaxDFS
|     |    `- Re: Tabs As SyntaxLawrence D'Oliveiro
|     `* Re: Tabs As SyntaxChris Ahlstrom
|      `* Re: Tabs As Syntaxcandycanearter07
|       `* Re: Tabs As SyntaxChris Ahlstrom
|        `- Re: Tabs As Syntaxcandycanearter07
+- Re: Tabs As SyntaxDFS
`- Re: Tabs As SyntaxLawrence D'Oliveiro

Pages:12
Tabs As Syntax

<17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12250&group=comp.os.linux.advocacy#12250

  copy link   Newsgroups: comp.os.linux.advocacy
From: nuxxie@linux.rocks (Nuxxie)
Subject: Tabs As Syntax
Newsgroups: comp.os.linux.advocacy
User-Agent: Pan/0.146 (Hic habitat felicitas; d7a48b4 gitlab.gnome.org/GNOME/pan.git)
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 17
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news.usenetexpress.com!not-for-mail
Date: Wed, 20 Mar 2024 11:00:16 +0000
Nntp-Posting-Date: Wed, 20 Mar 2024 11:00:16 +0000
X-Received-Bytes: 1187
Organization: UsenetExpress - www.usenetexpress.com
X-Complaints-To: abuse@usenetexpress.com
Message-Id: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
 by: Nuxxie - Wed, 20 Mar 2024 11:00 UTC

I took at the look at the Wikipedia page for GNU Make, the wonderful build
automation tool, and I found an interesting comment.

Make uses a tab character as part of its syntax. Any competent text editor
(except on Microslop) will clearly distinguish between tabs and spaces, but
some still find the practice abhorrent:

'This aspect of the syntax of makefiles is often subject to criticism; it
has been described by Eric S. Raymond as "one of the worst design botches
in the history of Unix" and The Unix-Haters Handbook said "using tabs as
part of the syntax is like one of those pungee stick traps in The Green
Berets".'

Gee. I wonder what these dudes would think of Python?

Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha!

Re: Tabs As Syntax

<utejt0$1fq95$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12255&group=comp.os.linux.advocacy#12255

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: OFeem1987@teleworm.us (Chris Ahlstrom)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Wed, 20 Mar 2024 08:13:18 -0400
Organization: None
Lines: 29
Message-ID: <utejt0$1fq95$1@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
Reply-To: OFeem1987@teleworm.us
Injection-Date: Wed, 20 Mar 2024 12:13:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6173546b442cc983a268e72c1887ec8c";
logging-data="1567013"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19YDc2zyAX2LrJ5TYafu+HB"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:xIpKZtIrsRRSGhiAlkw5sVNS3h4=
X-Mutt: The most widely-used MUA
X-Slrn: Why use anything else?
X-User-Agent: Microsoft Outl00k, Usenet K00k Editions
 by: Chris Ahlstrom - Wed, 20 Mar 2024 12:13 UTC

Nuxxie wrote this copyrighted missive and expects royalties:

> I took at the look at the Wikipedia page for GNU Make, the wonderful build
> automation tool, and I found an interesting comment.
>
> Make uses a tab character as part of its syntax. Any competent text editor
> (except on Microslop) will clearly distinguish between tabs and spaces, but
> some still find the practice abhorrent:
>
> 'This aspect of the syntax of makefiles is often subject to criticism; it
> has been described by Eric S. Raymond as "one of the worst design botches
> in the history of Unix" and The Unix-Haters Handbook said "using tabs as
> part of the syntax is like one of those pungee stick traps in The Green
> Berets".'
>
> Gee. I wonder what these dudes would think of Python?

The usage of spaces or tabs to determine statement scope is a great big
turnoff for me.

I don't subscribe to Guido's opinion on the visual ease of indentation.
It's easier to search for braces and use whatever indentation makes it
easy to read in context.

The beauty of C is that white space is not significant except in quotes.

--
Good night to spend with family, but avoid arguments with your mate's
new lover.

Re: Tabs As Syntax

<uter80$1haln$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12260&group=comp.os.linux.advocacy#12260

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@dfs.com (DFS)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Wed, 20 Mar 2024 10:18:44 -0400
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <uter80$1haln$1@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Mar 2024 14:18:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="37891cf52e1fbf2d7a6dba8b75260a75";
logging-data="1616567"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Dm6PWUPI0v/Wg+q4OZ7R+"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:Zyh7FUfJ6AlgjyScgRWxqPdnW8k=
Content-Language: en-US
In-Reply-To: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
 by: DFS - Wed, 20 Mar 2024 14:18 UTC

On 3/20/2024 7:00 AM, Lameass Larry wrote:

> Gee. I wonder what these dudes would think of Python?
>
> Ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha, ha!

Eric Raymond LOVES python.

---------------------------------------------------------------------------

"This was my first clue that, in Python, I was actually dealing with an
exceptionally good design."

---------------------------------------------------------------------------

"Even if we stipulate that I am a fairly talented hacker, this is an
amazing testament to Python's clarity and elegance of design.

There was simply no way I could have pulled off a coup like this in
Perl, even with my vastly greater experience level in that language. It
was at this point I realized I was probably leaving Perl behind."

---------------------------------------------------------------------------

"For anything larger or more complex, I have come to prefer the subtle
virtues of Python—and I think you will, too."

---------------------------------------------------------------------------

That was 24 years ago

https://www.linuxjournal.com/article/3882

And the above is a typical reaction when you discover how much time and
effort Python can save you.

Re: Tabs As Syntax

<uterkv$1haln$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12261&group=comp.os.linux.advocacy#12261

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@dfs.com (DFS)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Wed, 20 Mar 2024 10:25:39 -0400
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <uterkv$1haln$2@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 20 Mar 2024 14:25:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="37891cf52e1fbf2d7a6dba8b75260a75";
logging-data="1616567"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VPM8Bj2Je6+GHtmoMxcjG"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:a3Bqg+WugFS1rQ3pL/JcOXAL6aI=
Content-Language: en-US
In-Reply-To: <utejt0$1fq95$1@dont-email.me>
 by: DFS - Wed, 20 Mar 2024 14:25 UTC

On 3/20/2024 8:13 AM, Chris Ahlstrom wrote:
> Nuxxie wrote this copyrighted missive and expects royalties:
>
>> I took at the look at the Wikipedia page for GNU Make, the wonderful build
>> automation tool, and I found an interesting comment.
>>
>> Make uses a tab character as part of its syntax. Any competent text editor
>> (except on Microslop) will clearly distinguish between tabs and spaces, but
>> some still find the practice abhorrent:
>>
>> 'This aspect of the syntax of makefiles is often subject to criticism; it
>> has been described by Eric S. Raymond as "one of the worst design botches
>> in the history of Unix" and The Unix-Haters Handbook said "using tabs as
>> part of the syntax is like one of those pungee stick traps in The Green
>> Berets".'
>>
>> Gee. I wonder what these dudes would think of Python?
>
> The usage of spaces or tabs to determine statement scope is a great big
> turnoff for me.

Terminating lines with an arbitrary character, such as a semicolon, is
bogus to me.

> I don't subscribe to Guido's opinion on the visual ease of indentation.
> It's easier to search for braces and use whatever indentation makes it
> easy to read in context.

Contradicted yourself from one sentence to the next... shades of Feeb.

Python style (forced indents, no forced brackets) is shorter and more
readable than C style (no forced indents, forced brackets).

> The beauty of C is that white space is not significant except in quotes.

Just because you can doesn't mean you should.

Code without indentation and white space is unreadable and virtually
impossible to follow.

No professional programmer would EVER submit it as work product. No
programming book would EVER use it as an example of programming style.

Re: The more spastic the code, the greater the whitespace & comments.

<utfdad$1lnah$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12269&group=comp.os.linux.advocacy#12269

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@dfs.com (DFS)
Newsgroups: comp.os.linux.advocacy
Subject: Re: The more spastic the code, the greater the whitespace & comments.
Date: Wed, 20 Mar 2024 15:27:09 -0400
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <utfdad$1lnah$2@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<Jeff-Relf.Me@Mar.20--8.58am.Seattle.2024>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 20 Mar 2024 19:27:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="37891cf52e1fbf2d7a6dba8b75260a75";
logging-data="1760593"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19s9yYby9FDVMnD08YPcK7I"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:Z7d+X+jhQTv6uaW75SJ9PzcXjXY=
Content-Language: en-US
In-Reply-To: <Jeff-Relf.Me@Mar.20--8.58am.Seattle.2024>
 by: DFS - Wed, 20 Mar 2024 19:27 UTC

On 3/20/2024 11:58 AM, Relf wrote:
> DFS:
>> Code without indentation and white space is unreadable
>> No programming book would EVER use it as an example of programming style.
>
> The more spastic the code, the greater the whitespace & comments.

ha! I knew you'd come thru with some drooling like this.

You know your crazed code would NEVER pass muster, which is why you once
admitted:

DFS: "What are you gonna do when someone inherits your program? You're
not going to just let it die, are you?"

You: "Yes, absolutely, I'd tell the next poor fool to totally rewrite it."

Re: Tabs As Syntax

<utfpfp$1ol4n$8@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12284&group=comp.os.linux.advocacy#12284

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Wed, 20 Mar 2024 22:54:49 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <utfpfp$1ol4n$8@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Mar 2024 22:54:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a3c7bb3811b3cbef9d335e33aa837a41";
logging-data="1856663"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1802+JNCxAXHmYBfJ13rGAU"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:1ysi3MtKVKiyPywk9y4DGat4fZA=
 by: Lawrence D'Oliv - Wed, 20 Mar 2024 22:54 UTC

On Wed, 20 Mar 2024 11:00:16 +0000, Nuxxie wrote:

> Gee. I wonder what these dudes would think of Python?

Python is consistent: use tabs or spaces, don’t mix them (that’s a syntax
error in Python 3).

Make uses tabs only in particular places, not others.

Re: Tabs As Syntax

<utfstp$1pfg9$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12288&group=comp.os.linux.advocacy#12288

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Wed, 20 Mar 2024 23:53:30 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <utfstp$1pfg9$2@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Mar 2024 23:53:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="badb6633f042ee08dd03f65d8f49603e";
logging-data="1883657"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/QHCSuJiGhhQsTF0SP9HP"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:v5Mk0ANIhqgAXW5IK46unNJSpws=
 by: Lawrence D'Oliv - Wed, 20 Mar 2024 23:53 UTC

On Wed, 20 Mar 2024 08:13:18 -0400, Chris Ahlstrom wrote:

> The usage of spaces or tabs to determine statement scope is a great big
> turnoff for me.
>
> I don't subscribe to Guido's opinion on the visual ease of indentation.

There is redundancy in how most reasonable programmers write their
code; in conventional languages, where there are explicit
statement-bracketing symbols, the indentation (which the compiler
ignores) tends to follow these symbols anyway. That redundancy is a
useful check that the code means what you think it means.

Python does away with that redundancy, by making the indentation serve
as statement-bracketing as well. I think this is a mistake. However, I
restore the redundancy by adding “#end” lines (which the compiler
ignores). E.g.

def parse_headers() :
nonlocal content_type, content_type_opts
for keyword, value in scope["headers"] :
keyword = keyword.decode().lower()
if keyword == "content-type" :
content_type = value.decode()
elif keyword == "cookie" :
for item in value.decode().split(";") :
name, val = item.strip().replace(" ", "").split("=", 1)
cookies[name] = val
#end for
#end if
#end for
if content_type != None :
content_type, content_type_opts = \
multipart.multipart.parse_options_header(content_type)
content_type = content_type.decode()
content_type_opts = dict((k.decode(), v) for k, v in content_type_opts.items())
#end if
#end parse_headers

Another useful consequence is, I have custom Emacs commands defined to
jump between lines with matching indentation. This lets me navigate
quickly between the start and end of statement blocks. Without those
“#end” lines, it would not be so easy to find the ends of the blocks.

Re: Tabs As Syntax

<utfsv2$1pfg9$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12289&group=comp.os.linux.advocacy#12289

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Wed, 20 Mar 2024 23:54:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <utfsv2$1pfg9$3@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 20 Mar 2024 23:54:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="badb6633f042ee08dd03f65d8f49603e";
logging-data="1883657"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qtyPoiesqJwnl2E3Gm6o9"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:jnlhkQwi9r4eb8njyXZ/+dyc4iw=
 by: Lawrence D'Oliv - Wed, 20 Mar 2024 23:54 UTC

On Wed, 20 Mar 2024 10:25:39 -0400, DFS wrote:

> Terminating lines with an arbitrary character, such as a semicolon, is
> bogus to me.

It’s a punctuation symbol; its meaning is for that sort of purpose.

Re: Tabs As Syntax

<l624u3Fn16lU13@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12318&group=comp.os.linux.advocacy#12318

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: 21 Mar 2024 07:12:03 GMT
Lines: 18
Message-ID: <l624u3Fn16lU13@mid.individual.net>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net ObUsCbUxJw1tcSng5pscLQmkVP87wlnA+CxjMq+BiwEUBAI/iN
Cancel-Lock: sha1:PQOyxyuiawg8IXrP61nEG6Qk8vA= sha256:rdTXKIHqT2TFWqaOjFtMYzwPlT9CCHdmyC2GqeLrrVQ=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
 by: rbowman - Thu, 21 Mar 2024 07:12 UTC

On Wed, 20 Mar 2024 10:25:39 -0400, DFS wrote:

> Python style (forced indents, no forced brackets) is shorter and more
> readable than C style (no forced indents, forced brackets).

for i in range(10):
print(f"foo[{i} is {foo[i]}")

for (i=0; i<10; i++) {
printf("foo[%d] is %s\n", i, foo[i]);
}

Whoopee! Python wins by one line! Unless of course

for (i=0; i<10; i++) {printf("foo[%d] is %s\n", i, foo[i]);}

Re: Tabs As Syntax

<utgn6p$22no8$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12322&group=comp.os.linux.advocacy#12322

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Thu, 21 Mar 2024 07:22:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <utgn6p$22no8$2@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 21 Mar 2024 07:22:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="badb6633f042ee08dd03f65d8f49603e";
logging-data="2187016"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NkjZ7oZki47LIgGjy/pLj"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:cgHje/T2kp3M9i/ia8CV5dY2sVc=
 by: Lawrence D'Oliv - Thu, 21 Mar 2024 07:22 UTC

On 21 Mar 2024 07:12:03 GMT, rbowman wrote:

> Whoopee! Python wins by one line! Unless of course
>
> for (i=0; i<10; i++) {printf("foo[%d] is %s\n", i, foo[i]);}

for i in range(10): print(f"foo[{i} is {foo[i]}")

is syntactically valid Python.

Re: Tabs As Syntax

<uthc9v$27npc$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12335&group=comp.os.linux.advocacy#12335

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@dfs.com (DFS)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Thu, 21 Mar 2024 09:22:06 -0400
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <uthc9v$27npc$1@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 21 Mar 2024 13:22:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a1039f8efe77cd4dd3e555af4710f67d";
logging-data="2350892"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yrktppHNwEqhvziY7wKxY"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:wj43KothANRXzPzGMGJOb2ITpkk=
In-Reply-To: <l624u3Fn16lU13@mid.individual.net>
Content-Language: en-US
 by: DFS - Thu, 21 Mar 2024 13:22 UTC

On 3/21/2024 3:12 AM, rbowman wrote:
> On Wed, 20 Mar 2024 10:25:39 -0400, DFS wrote:
>
>> Python style (forced indents, no forced brackets) is shorter and more
>> readable than C style (no forced indents, forced brackets).
>
> for i in range(10):
> print(f"foo[{i} is {foo[i]}")
>
> for (i=0; i<10; i++) {
> printf("foo[%d] is %s\n", i, foo[i]);
> }
>
> Whoopee! Python wins by one line!

A win is a win is a win.

> Unless of course
>
> for (i=0; i<10; i++) {printf("foo[%d] is %s\n", i, foo[i]);}

for i in range(2,11): print("%d made %d look like a foo^2" % (i*i,i))

Re: Tabs As Syntax

<uthf4s$28e7g$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12337&group=comp.os.linux.advocacy#12337

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: OFeem1987@teleworm.us (Chris Ahlstrom)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Thu, 21 Mar 2024 10:10:33 -0400
Organization: None
Lines: 29
Message-ID: <uthf4s$28e7g$1@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net>
Reply-To: OFeem1987@teleworm.us
Injection-Date: Thu, 21 Mar 2024 14:10:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7a898fcdf8dbe581452a4643ee635ad7";
logging-data="2373872"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Gb1+2KDFcARod4dXLa/Xf"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:RXA1KhptX0VsFLtFIAO9leaRHS4=
X-Mutt: The most widely-used MUA
X-User-Agent: Microsoft Outl00k, Usenet K00k Editions
X-Slrn: Why use anything else?
 by: Chris Ahlstrom - Thu, 21 Mar 2024 14:10 UTC

rbowman wrote this copyrighted missive and expects royalties:

> On Wed, 20 Mar 2024 10:25:39 -0400, DFS wrote:
>
>> Python style (forced indents, no forced brackets) is shorter and more
>> readable than C style (no forced indents, forced brackets).
>
> for i in range(10):
> print(f"foo[{i} is {foo[i]}")
>
> for (i=0; i<10; i++) {
> printf("foo[%d] is %s\n", i, foo[i]);
> }
>
> Whoopee! Python wins by one line! Unless of course
>
> for (i=0; i<10; i++) {printf("foo[%d] is %s\n", i, foo[i]);}

for (int n : { 2, 4, 6, 8 })
std::cout << n << ", ";

std::cout << "who do we appreciate?" << std::endl

(std::endl is \n with a flush.

--
Q: How many Zen masters does it take to screw in a light bulb?
A: None. The Universe spins the bulb, and the Zen master stays out
of the way.

Re: Tabs As Syntax

<l64atrF2m1hU15@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12385&group=comp.os.linux.advocacy#12385

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: 22 Mar 2024 03:06:35 GMT
Lines: 25
Message-ID: <l64atrF2m1hU15@mid.individual.net>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <utgn6p$22no8$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net NQ8076x8WJiDwU5Uj50zbwZC81PY4RtIbrJONhKDhSIjUa7dfz
Cancel-Lock: sha1:MeO3SjN3Y0RXjeqxgGXG7588jqE= sha256:9dD6xpTsCGrx7HSMHiklJTxmbgx0LR7ibkzJaYa834U=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
 by: rbowman - Fri, 22 Mar 2024 03:06 UTC

On Thu, 21 Mar 2024 07:22:01 -0000 (UTC), Lawrence D'Oliveiro wrote:

> On 21 Mar 2024 07:12:03 GMT, rbowman wrote:
>
>> Whoopee! Python wins by one line! Unless of course
>>
>> for (i=0; i<10; i++) {printf("foo[%d] is %s\n", i, foo[i]);}
>
> for i in range(10): print(f"foo[{i} is {foo[i]}")
>
> is syntactically valid Python.

Yes it is. The PEP8 police will be paying you a visit shortly. Both black
and ruff would try to fix it for you.

black junk.py
reformatted junk.py

All done! ✨ 🍰 ✨
1 file reformatted.

for i in range(10):
print(f"foo[{i} is {foo[i]}")

Re: Tabs As Syntax

<l64bbaF2m1hU16@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12386&group=comp.os.linux.advocacy#12386

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: 22 Mar 2024 03:13:46 GMT
Lines: 12
Message-ID: <l64bbaF2m1hU16@mid.individual.net>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthc9v$27npc$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net W6NOIbQxR1CoJN3AaXhasAP2x4cz73RKTyC4TRmAzdoiDuL88z
Cancel-Lock: sha1:BI699PlRnsDeMhXOP3MI/Hs19TI= sha256:1jDA4ahWOp1ROFfWnQ6hk9tHVi/i94clCk3ROXqKGRw=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
 by: rbowman - Fri, 22 Mar 2024 03:13 UTC

On Thu, 21 Mar 2024 09:22:06 -0400, DFS wrote:

> for i in range(2,11): print("%d made %d look like a foo^2" % (i*i,i))

Embrace f strings. Unless you're running an obsolete version of course.

Some of the improvements leave me with a yawn but I use

$"The quick red {animal} jumped over the brain dead Windows {user}"

so I really liked that addition. Yeah, the % is sort of like C but half
the time I screw up the tuple. format was more work too.

Re: Tabs As Syntax

<l64bi6F2m1hU17@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12387&group=comp.os.linux.advocacy#12387

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bowman@montana.com (rbowman)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: 22 Mar 2024 03:17:27 GMT
Lines: 16
Message-ID: <l64bi6F2m1hU17@mid.individual.net>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthf4s$28e7g$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net nFUCxpmefxGFVmMFZ+7OXAzEZv7B9Mo3tF+OixeNJ5BpSJ1HqW
Cancel-Lock: sha1:LDmPV6s4g/p9cCGGj5wV62Dte2g= sha256:ak6KiFvgDZu3MV9Ag2VO3vFxj637uiQPG9XWzInLfaQ=
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
 by: rbowman - Fri, 22 Mar 2024 03:17 UTC

On Thu, 21 Mar 2024 10:10:33 -0400, Chris Ahlstrom wrote:

> for (int n : { 2, 4, 6, 8 })
> std::cout << n << ", ";
>
> std::cout << "who do we appreciate?" << std::endl
>
> (std::endl is \n with a flush.

cout never did much for me either. That's one of the areas that seemed
like a gratuitous departure from C.

Then there is the Python

print("Never again!", end="\r")

Re: Tabs As Syntax

<utiuje$2n0n3$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12391&group=comp.os.linux.advocacy#12391

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 03:40:30 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <utiuje$2n0n3$1@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthf4s$28e7g$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 22 Mar 2024 03:40:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1d2811be6c706a5fb413e03faa778213";
logging-data="2851555"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Q3vJjv7ZZVonE7EWcPD9s"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:PPaW02ecJ4Z39jXx1KTNNHHb4Mo=
 by: Lawrence D'Oliv - Fri, 22 Mar 2024 03:40 UTC

On Thu, 21 Mar 2024 10:10:33 -0400, Chris Ahlstrom wrote:

> std::cout << "who do we appreciate?" << std::endl

“Whom”

Re: Tabs As Syntax

<utiun9$2n0n3$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12392&group=comp.os.linux.advocacy#12392

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 03:42:34 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <utiun9$2n0n3$2@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthc9v$27npc$1@dont-email.me>
<l64bbaF2m1hU16@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 22 Mar 2024 03:42:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1d2811be6c706a5fb413e03faa778213";
logging-data="2851555"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GmGmHAYi4w6GxqvpRCEnH"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:M6I91oq2aCMFCBpY8wtM0izXEKo=
 by: Lawrence D'Oliv - Fri, 22 Mar 2024 03:42 UTC

On 22 Mar 2024 03:13:46 GMT, rbowman wrote:

> Embrace f strings.

printf-style FTW!

It’s the only style that is (approximately) supported across several
different languages: C, C++, Perl, Python, Java, POSIX shells, even PHP.

Re: Tabs As Syntax

<utiups$2n0n3$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12393&group=comp.os.linux.advocacy#12393

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 03:43:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <utiups$2n0n3$3@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <utgn6p$22no8$2@dont-email.me>
<l64atrF2m1hU15@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 22 Mar 2024 03:43:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1d2811be6c706a5fb413e03faa778213";
logging-data="2851555"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JCEHJ7248Zcs4jkN8gO0l"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:eDk2X3jxyoglCAsQnxcDOW08Vaw=
 by: Lawrence D'Oliv - Fri, 22 Mar 2024 03:43 UTC

On 22 Mar 2024 03:06:35 GMT, rbowman wrote:

> On Thu, 21 Mar 2024 07:22:01 -0000 (UTC), Lawrence D'Oliveiro wrote:
>
>> On 21 Mar 2024 07:12:03 GMT, rbowman wrote:
>>
>>> Whoopee! Python wins by one line! Unless of course
>>>
>>> for (i=0; i<10; i++) {printf("foo[%d] is %s\n", i, foo[i]);}
>>
>> for i in range(10): print(f"foo[{i} is {foo[i]}")
>>
>> is syntactically valid Python.
>
> Yes it is. The PEP8 police will be paying you a visit shortly.

They know me. They’ve seen my “#end” comments, and they have been scarred
for life. They don’t come round any more.

Re: Tabs As Syntax

<utjt1t$2tns5$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12403&group=comp.os.linux.advocacy#12403

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: OFeem1987@teleworm.us (Chris Ahlstrom)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 08:20:11 -0400
Organization: None
Lines: 34
Message-ID: <utjt1t$2tns5$1@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthf4s$28e7g$1@dont-email.me>
<l64bi6F2m1hU17@mid.individual.net>
Reply-To: OFeem1987@teleworm.us
Injection-Date: Fri, 22 Mar 2024 12:20:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7be2011231067dac7dad055ad83a661d";
logging-data="3071877"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/dDeSuskwtsIzO2MiAXiSH"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:2JUsD4ujK0AA2Sn1BbvJ4q2CB/4=
X-User-Agent: Microsoft Outl00k, Usenet K00k Editions
X-Mutt: The most widely-used MUA
X-Slrn: Why use anything else?
 by: Chris Ahlstrom - Fri, 22 Mar 2024 12:20 UTC

rbowman wrote this copyrighted missive and expects royalties:

> On Thu, 21 Mar 2024 10:10:33 -0400, Chris Ahlstrom wrote:
>
>> for (int n : { 2, 4, 6, 8 })
>> std::cout << n << ", ";
>>
>> std::cout << "who do we appreciate?" << std::endl
>>
>> (std::endl is \n with a flush.
>
> cout never did much for me either. That's one of the areas that seemed
> like a gratuitous departure from C.
>
> Then there is the Python
>
> print("Never again!", end="\r")

operator << is useful with std::ostringstream when you want to avoid having
deal with allocating enough output space. Still, I use this a lot:

char temp[32];
snprintf(temp, sizeof temp, "We have %d idiots here", idcount);

Sometime a printf specification is just easier to read.

The GNU compiler will even warn if the buffer isn't big enough to hold
the largest possible result.

--
Gratitude and treachery are merely the two extremities of the same procession.
You have seen all of it that is worth staying for when the band and the gaudy
officials have gone by.
-- Mark Twain, "Pudd'nhead Wilson's Calendar"

Re: Tabs As Syntax

<utjt3a$2tns5$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12404&group=comp.os.linux.advocacy#12404

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: OFeem1987@teleworm.us (Chris Ahlstrom)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 08:20:58 -0400
Organization: None
Lines: 16
Message-ID: <utjt3a$2tns5$2@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthf4s$28e7g$1@dont-email.me>
<utiuje$2n0n3$1@dont-email.me>
Reply-To: OFeem1987@teleworm.us
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 22 Mar 2024 12:20:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7be2011231067dac7dad055ad83a661d";
logging-data="3071877"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+I0xsjLNjvhF1qsiRsmuGV"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:NblpwKb3pYvn4ftizb7f6lOX3Jw=
X-Mutt: The most widely-used MUA
X-User-Agent: Microsoft Outl00k, Usenet K00k Editions
X-Slrn: Why use anything else?
 by: Chris Ahlstrom - Fri, 22 Mar 2024 12:20 UTC

Lawrence D'Oliveiro wrote this copyrighted missive and expects royalties:

> On Thu, 21 Mar 2024 10:10:33 -0400, Chris Ahlstrom wrote:
>
>> std::cout << "who do we appreciate?" << std::endl
>
> “Whom”

Tell that to the cheerleaders!

Winston tastes good like a cigarette should!

--
Have a place for everything and keep the thing somewhere else; this is not
advice, it is merely custom.
-- Mark Twain

Re: Tabs As Syntax

<utk70j$305bf$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12430&group=comp.os.linux.advocacy#12430

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: candycanearter07@candycanearter07.nomail.afraid (candycanearter07)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 15:10:12 -0000 (UTC)
Organization: the-candyden-of-code
Lines: 34
Message-ID: <utk70j$305bf$2@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthf4s$28e7g$1@dont-email.me>
<l64bi6F2m1hU17@mid.individual.net> <utjt1t$2tns5$1@dont-email.me>
Injection-Date: Fri, 22 Mar 2024 15:10:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c9b100889a82c125a9d06a3c9ce63ff4";
logging-data="3151215"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+y/wPnIdaU17F3/m02M+DqYpr1cKmvgd3HDW9Y9z1OaQ=="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:O7nQThG5WjuXqftLf8BCh6tLxZU=
X-Face: b{dPmN&%4|lEo,wUO\"KLEOu5N_br(N2Yuc5/qcR5i>9-!^e\.Tw9?/m0}/~:UOM:Zf]%
b+ V4R8q|QiU/R8\|G\WpC`-s?=)\fbtNc&=/a3a)r7xbRI]Vl)r<%PTriJ3pGpl_/B6!8pe\btzx
`~R! r3.0#lHRE+^Gro0[cjsban'vZ#j7,?I/tHk{s=TFJ:H?~=]`O*~3ZX`qik`b:.gVIc-[$t/e
ZrQsWJ >|l^I_[pbsIqwoz.WGA]<D
 by: candycanearter07 - Fri, 22 Mar 2024 15:10 UTC

Chris Ahlstrom <OFeem1987@teleworm.us> wrote at 12:20 this Friday (GMT):
> rbowman wrote this copyrighted missive and expects royalties:
>
>> On Thu, 21 Mar 2024 10:10:33 -0400, Chris Ahlstrom wrote:
>>
>>> for (int n : { 2, 4, 6, 8 })
>>> std::cout << n << ", ";
>>>
>>> std::cout << "who do we appreciate?" << std::endl
>>>
>>> (std::endl is \n with a flush.
>>
>> cout never did much for me either. That's one of the areas that seemed
>> like a gratuitous departure from C.
>>
>> Then there is the Python
>>
>> print("Never again!", end="\r")
>
> operator << is useful with std::ostringstream when you want to avoid having
> deal with allocating enough output space. Still, I use this a lot:
>
> char temp[32];
> snprintf(temp, sizeof temp, "We have %d idiots here", idcount);
>
> Sometime a printf specification is just easier to read.
>
> The GNU compiler will even warn if the buffer isn't big enough to hold
> the largest possible result.

Using C syntax in CPP isn't best practice though.
--
user <candycane> is generated from /dev/urandom

Re: Tabs As Syntax

<utk70k$305bf$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12431&group=comp.os.linux.advocacy#12431

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: candycanearter07@candycanearter07.nomail.afraid (candycanearter07)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 15:10:12 -0000 (UTC)
Organization: the-candyden-of-code
Lines: 19
Message-ID: <utk70k$305bf$3@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthc9v$27npc$1@dont-email.me>
<l64bbaF2m1hU16@mid.individual.net>
Injection-Date: Fri, 22 Mar 2024 15:10:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c9b100889a82c125a9d06a3c9ce63ff4";
logging-data="3151215"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qVnRJg2k0hQn9N6Al8qek8B+ND3FePmsFh23pYd33vQ=="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:EUfsD7LHJQDswzebBlXDU9uyEY0=
X-Face: b{dPmN&%4|lEo,wUO\"KLEOu5N_br(N2Yuc5/qcR5i>9-!^e\.Tw9?/m0}/~:UOM:Zf]%
b+ V4R8q|QiU/R8\|G\WpC`-s?=)\fbtNc&=/a3a)r7xbRI]Vl)r<%PTriJ3pGpl_/B6!8pe\btzx
`~R! r3.0#lHRE+^Gro0[cjsban'vZ#j7,?I/tHk{s=TFJ:H?~=]`O*~3ZX`qik`b:.gVIc-[$t/e
ZrQsWJ >|l^I_[pbsIqwoz.WGA]<D
 by: candycanearter07 - Fri, 22 Mar 2024 15:10 UTC

rbowman <bowman@montana.com> wrote at 03:13 this Friday (GMT):
> On Thu, 21 Mar 2024 09:22:06 -0400, DFS wrote:
>
>> for i in range(2,11): print("%d made %d look like a foo^2" % (i*i,i))
>
> Embrace f strings. Unless you're running an obsolete version of course.
>
> Some of the improvements leave me with a yawn but I use
>
> $"The quick red {animal} jumped over the brain dead Windows {user}"
>
> so I really liked that addition. Yeah, the % is sort of like C but half
> the time I screw up the tuple. format was more work too.

f-strings are so nice, especially since you can use it as arguments for
other functions and don't have to rely on a temporary string var.
--
user <candycane> is generated from /dev/urandom

Re: Tabs As Syntax

<utkcru$31il4$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12440&group=comp.os.linux.advocacy#12440

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nospam@dfs.com (DFS)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 12:50:04 -0400
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <utkcru$31il4$1@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthc9v$27npc$1@dont-email.me>
<l64bbaF2m1hU16@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 22 Mar 2024 16:50:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3c457cbfa977382ed51ac0811b22107f";
logging-data="3197604"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+l5owaQz5tuSzD4vOKgNEG"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:JODjVl+b+BmCZj9FPPHTFo+503s=
In-Reply-To: <l64bbaF2m1hU16@mid.individual.net>
Content-Language: en-US
 by: DFS - Fri, 22 Mar 2024 16:50 UTC

On 3/21/2024 11:13 PM, rbowman wrote:
> On Thu, 21 Mar 2024 09:22:06 -0400, DFS wrote:
>
>> for i in range(2,11): print("%d made %d look like a foo^2" % (i*i,i))
>
> Embrace f strings. Unless you're running an obsolete version of course.
>
> Some of the improvements leave me with a yawn but I use
>
> $"The quick red {animal} jumped over the brain dead Windows {user}"

heh!

> so I really liked that addition. Yeah, the % is sort of like C but half
> the time I screw up the tuple. format was more work too.

I use and prefer the modulo *because* it's like C printf. Most of my
python gets duped in C (for the practice).

lusers = ['Feeb','Joel','Ahlstrom','bowman']
for luser in lusers:
print ("Linux luser %s loves his Windows money." % (luser))
With the mod operator:
1 add the letter f to print
2 add a newline inside the quote
3 replace the mod % with a comma
4 add a semicolon at the end

and you're done migrating it to C. That's 4 tweaks, but it's as close
as you can get.

py: print ("Linux mama's boy %s loves his allowance." % (luser))
C : printf("Linux mama's boy %s loves his allowance.\n", (luser));

Re: Tabs As Syntax

<utkh57$32kac$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12448&group=comp.os.linux.advocacy#12448

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: OFeem1987@teleworm.us (Chris Ahlstrom)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 14:03:16 -0400
Organization: None
Lines: 52
Message-ID: <utkh57$32kac$1@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthf4s$28e7g$1@dont-email.me>
<l64bi6F2m1hU17@mid.individual.net> <utjt1t$2tns5$1@dont-email.me>
<utk70j$305bf$2@dont-email.me>
Reply-To: OFeem1987@teleworm.us
Injection-Date: Fri, 22 Mar 2024 18:03:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7be2011231067dac7dad055ad83a661d";
logging-data="3232076"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OUzam8G9EufGCfqr5u97P"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:/XUyuDKhEu1vDjw9L7Ln+06tG/A=
X-Slrn: Why use anything else?
X-User-Agent: Microsoft Outl00k, Usenet K00k Editions
X-Mutt: The most widely-used MUA
 by: Chris Ahlstrom - Fri, 22 Mar 2024 18:03 UTC

candycanearter07 wrote this copyrighted missive and expects royalties:

> Chris Ahlstrom <OFeem1987@teleworm.us> wrote at 12:20 this Friday (GMT):
>> rbowman wrote this copyrighted missive and expects royalties:
>>
>>> On Thu, 21 Mar 2024 10:10:33 -0400, Chris Ahlstrom wrote:
>>>
>>>> for (int n : { 2, 4, 6, 8 })
>>>> std::cout << n << ", ";
>>>>
>>>> std::cout << "who do we appreciate?" << std::endl
>>>>
>>>> (std::endl is \n with a flush.
>>>
>>> cout never did much for me either. That's one of the areas that seemed
>>> like a gratuitous departure from C.
>>>
>>> Then there is the Python
>>>
>>> print("Never again!", end="\r")
>>
>> operator << is useful with std::ostringstream when you want to avoid having
>> deal with allocating enough output space. Still, I use this a lot:
>>
>> char temp[32];
>> snprintf(temp, sizeof temp, "We have %d idiots here", idcount);
>>
>> Sometime a printf specification is just easier to read.
>>
>> The GNU compiler will even warn if the buffer isn't big enough to hold
>> the largest possible result.
>
> Using C syntax in CPP isn't best practice though.

Well, I could write it as:

#include <cstdio>
char temp[32];
(void) std::snprintf(temp, sizeof temp, "We have %d idiots here", idcount);

:-D

I will use whatever is convenient, easy-to-code and easy-to-read, and safe;
it's a judgment call.

And there are tons of C-only functions out there. Sometimes I will write
a C++ wrapper (or a member function) for some of them. So many decisions to
make!

--
Q: What's the difference betweeen USL and the Graf Zeppelin?
A: The Graf Zeppelin represented cutting edge technology for its time.

Re: Tabs As Syntax

<utkhbc$32kac$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=12450&group=comp.os.linux.advocacy#12450

  copy link   Newsgroups: comp.os.linux.advocacy
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: OFeem1987@teleworm.us (Chris Ahlstrom)
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 22 Mar 2024 14:06:36 -0400
Organization: None
Lines: 23
Message-ID: <utkhbc$32kac$2@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
<utejt0$1fq95$1@dont-email.me> <uterkv$1haln$2@dont-email.me>
<l624u3Fn16lU13@mid.individual.net> <uthc9v$27npc$1@dont-email.me>
<l64bbaF2m1hU16@mid.individual.net> <utk70k$305bf$3@dont-email.me>
Reply-To: OFeem1987@teleworm.us
Injection-Date: Fri, 22 Mar 2024 18:06:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7be2011231067dac7dad055ad83a661d";
logging-data="3232076"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18C/P5v05fULfQu2kpxPwi2"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:1MLLvg+6vEXu62D+1Hwui8SQxxk=
X-Mutt: The most widely-used MUA
X-User-Agent: Microsoft Outl00k, Usenet K00k Editions
X-Slrn: Why use anything else?
 by: Chris Ahlstrom - Fri, 22 Mar 2024 18:06 UTC

candycanearter07 wrote this copyrighted missive and expects royalties:

> rbowman <bowman@montana.com> wrote at 03:13 this Friday (GMT):
>> On Thu, 21 Mar 2024 09:22:06 -0400, DFS wrote:
>>
>>> for i in range(2,11): print("%d made %d look like a foo^2" % (i*i,i))
>>
>> Embrace f strings. Unless you're running an obsolete version of course.
>>
>> Some of the improvements leave me with a yawn but I use
>>
>> $"The quick red {animal} jumped over the brain dead Windows {user}"
>>
>> so I really liked that addition. Yeah, the % is sort of like C but half
>> the time I screw up the tuple. format was more work too.
>
> f-strings are so nice, especially since you can use it as arguments for
> other functions and don't have to rely on a temporary string var.

Those sound like the formatting available for C# String.

--
You own a dog, but you can only feed a cat.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor