From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10561 invoked from network); 5 Mar 2021 20:25:31 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 5 Mar 2021 20:25:31 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 4C6DF9CA71; Sat, 6 Mar 2021 06:25:25 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id B952B9CA68; Sat, 6 Mar 2021 06:25:00 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=ccil-org.20150623.gappssmtp.com header.i=@ccil-org.20150623.gappssmtp.com header.b="UW/LDUK0"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id D781A9CA68; Sat, 6 Mar 2021 06:24:56 +1000 (AEST) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by minnie.tuhs.org (Postfix) with ESMTPS id 769699C9D6 for ; Sat, 6 Mar 2021 06:24:55 +1000 (AEST) Received: by mail-qt1-f177.google.com with SMTP id 18so2807776qty.3 for ; Fri, 05 Mar 2021 12:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=OtL1or1rg0Oc9DGE4wF6VsyD69jDqpUOeilIqFfXAzg=; b=UW/LDUK0cJe3SGUZmoukrC/y9firtetr2PUBt0ccY6HDINywHPoq6/IdSiOGr4yS4o YIcGvz5i3wG64Ks2TYQKU0MeQdSmAc8uugP5TQvwlc1L3uOT8Yf1C5QcAFCPETncCWzR XEslvndlKmvb966uBF9SNNOCzO1+524GzHy7rdqUpKF28pJWUYVVQddtDNYpMVxeK3iw EsghsSe2ibiwYzlfCovtnKJGl4AHmK4JeWjN58z15kzzup2qW5G6Prw1adN0Fv59+hiz ltcVDvhinsEXJsNoCU+/4xV2iDIzpJE3NRKcRsL8of7tEmJTOQCbh6qGPB4OYGMcC3Mu Gp+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=OtL1or1rg0Oc9DGE4wF6VsyD69jDqpUOeilIqFfXAzg=; b=nlGEg9e5Wo8+T6fdNsW5Fp2jvUNhcFtOUqg8NFHyNArXKplKMA0W/TvHKEAu3hRYVT 8Urm84jxwvTsWOzuQih0Mp0j+svztxh/ilr+7LcCsW+x/VPUI9MZs10Vplu1jOK2eJe8 iuxShJhhRH9JgWbi4kIztmjns9lb7zXQATAXNU9/ACDAvMuLRd/VTHZGQ01zbRydFZv/ 0SaxWbmURlNdcRgXGCcKT+ygv1BDByU7sIya/rVjzI5R5qKhhB6ESjy5m2kR9FgqPJNP dlKxFwAMcpJhssVw5GHSwpWD0rWlraUGBDI585xFeAuVL/ITtS6DtHA5G9U9yINHrErN CiUw== X-Gm-Message-State: AOAM531qp2EzbITKDWA/p5So7OIeKqnsp+GQqbAMa4Bhs50vE3EWSQPN TbvlqiDS8WTML0JYdUbxq5/jiXzfR+XwtEw8Ms6dQjwqO49rNA== X-Google-Smtp-Source: ABdhPJzn5jAS80RjTp3ad/F3AScoBNsqlP5jJ9ZGgVbN+mTDALl6a8PZDsELU5dPGIvpVNZ7DSF7Ep82qmIfbNZzezQ= X-Received: by 2002:ac8:5182:: with SMTP id c2mr2549585qtn.362.1614975893605; Fri, 05 Mar 2021 12:24:53 -0800 (PST) MIME-Version: 1.0 References: <20210304212459.GA6303@eureka.lemis.com> <20210304212917.GB6303@eureka.lemis.com> <20210304221250.GD6303@eureka.lemis.com> <20210305141348.DIpGG%steffen@sdaoden.eu> In-Reply-To: <20210305141348.DIpGG%steffen@sdaoden.eu> From: John Cowan Date: Fri, 5 Mar 2021 15:24:40 -0500 Message-ID: To: "Greg 'groggy' Lehey" , Andy Kosela , TUHS main list Content-Type: multipart/alternative; boundary="00000000000075a42c05bccfe0b8" Subject: Re: [TUHS] tabs vs spaces - entab, detab X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --00000000000075a42c05bccfe0b8 Content-Type: text/plain; charset="UTF-8" On Fri, Mar 5, 2021 at 9:14 AM Steffen Nurpmeso wrote: > But, not important. A real change to my coding style came when > i looked around Plan9 source code, the pragmatism to simply not > use spaces in language constructs aka statements at all, for > example "if(a){" instead of "if(a) {" or "if (a) {", and let alone > "if (a)\nALIGN{\nALIGN" and whatever else. > That way lies APL madness. To exemplify, Kona is an open-source interpreter for Arthur Whitney's K version 3 language, which is closely related to APL, but crams almost all of the APL operators onto single ASCII characters with massive overloading. For example, monadic ! is APL "iota", but dyadic ! is "modulo" if both arguments are numbers and "rotate" if the right argument is a number and the left argument is a vector. What any of these has to do with the rest is beyond me: I had to create a set of flash cards to help me learn them all. Well, here's a procedure definition from the Kona source, in a file helpfully named kc.c (almost all of the source files have 1-2 character names): I wds_(K*a,FILE*f,I l) { S s=0,t=0; I b=0,c=0,m=0,n=0,v=0; K z=0; PDA p=0; I o=isatty(STDIN)&&f==stdin; if(-1==(c=getline_(&s,&n,f)))GC; appender(&t,&m,s,n); while(1==(v=complete(t,m,&p,0))) { b=parsedepth(p); if(o)prompt(b+l); if(-1==(c=getline_(&s,&n,f)))GC; appender(&t,&m,s,n); } SW(v){CS(2,show(kerr("unmatched"));GC) CS(3,show(kerr("nest")); GC)} z=newK(-3,m-1); strncpy(kC(z),t,m-1); cleanup: free(s); free(t); if(p)pdafree(p); if((v||c==-1)&&z){cd(z); *a=0;} else *a=z; R v?-v:c; } // -1 EOF, -2 unmatched, -3 nest If you want that sort of thing, you can certainly have it. Note the single-space ident and the cuddled right braces. Note also the label "cleanup:"; presumably a "goto cleanup;" is hidden somewhere in the single-letter (of course) macros. John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org The peculiar excellence of comedy is its excellent fooling, and Aristophanes's claim to immortality is based upon one title only: he was a master maker of comedy, he could fool excellently. Here Gilbert stands side by side with him. He, too, could write the most admirable nonsense. There has never been better fooling than his, and a comparison with him carries nothing derogatory to the great Athenian. --Edith Hamilton, The Greek Way --00000000000075a42c05bccfe0b8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Mar 5, 20= 21 at 9:14 AM Steffen Nurpmeso <st= effen@sdaoden.eu> wrote:=C2=A0
=C2=A0
But, not important.=C2=A0 A real change = to my coding style came when
i looked around Plan9 source code, the pragmatism to simply not
use spaces in language constructs aka statements at all, for
example "if(a){" instead of "if(a) {" or "if (a) {= ", and let alone
"if (a)\nALIGN{\nALIGN" and whatever else.=C2=A0

That way lies APL madness.=C2=A0 = To exemplify, Kona is an open-source interpreter for Arthur Whitney's K= version 3 language, which is closely related to APL, but crams almost all = of the APL operators onto single ASCII characters with massive overloading.= =C2=A0 For example, monadic ! is APL "iota", but dyadic ! is &quo= t;modulo" if both arguments are numbers and "rotate" if the = right argument is a number and the left argument is a vector.=C2=A0 What an= y of these has to do with the rest is beyond me: I had to create a set of f= lash cards to help me learn them all.

Well, here's a procedure definition from = the Kona source, in a file helpfully named kc.c (almost all of the source f= iles have 1-2 character names):

I wds_(K*a,FILE*f,I l)
{ S s=3D0,t=3D0; =C2=A0I = b=3D0,c=3D0,m=3D0,n=3D0,v=3D0; =C2=A0K z=3D0; PDA p=3D0;
=C2=A0 I o=3Dis= atty(STDIN)&&f=3D=3Dstdin;
=C2=A0 if(-1=3D=3D(c=3Dgetline_(&= s,&n,f)))GC;
=C2=A0 appender(&t,&m,s,n);
=C2=A0 while(1= =3D=3D(v=3Dcomplete(t,m,&p,0)))
=C2=A0 { b=3Dparsedepth(p);
=C2= =A0 =C2=A0 if(o)prompt(b+l);
=C2=A0 =C2=A0 if(-1=3D=3D(c=3Dgetline_(&= ;s,&n,f)))GC;
=C2=A0 =C2=A0 appender(&t,&m,s,n); }
=C2=A0= SW(v){CS(2,show(kerr("unmatched"));GC) CS(3,show(kerr("nest= ")); GC)}
=C2=A0 z=3DnewK(-3,m-1);
=C2=A0 strncpy(kC(z),t,m-1);<= br>=C2=A0cleanup:
=C2=A0 free(s); free(t);
=C2=A0 if(p)pdafree(p);=C2=A0 if((v||c=3D=3D-1)&&z){cd(z); *a=3D0;}
=C2=A0 else *a=3Dz= ;
=C2=A0 R v?-v:c; } =C2=A0 =C2=A0// -1 EOF, -2 unmatched, -3 nest
=

If you want t= hat sort of thing, you can certainly have it.=C2=A0 Note the single-space i= dent and the cuddled right braces.=C2=A0 Note also the label "cleanup:= "; presumably a "goto cleanup;" is hidden somewhere in the s= ingle-letter (of course) macros.

<= div class=3D"gmail_default" style=3D"font-family:"times new roman"= ;,serif;font-size:large">

John Cowan =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0http://vrici.lojban.org/~cowan =C2= =A0 =C2=A0 =C2=A0 =C2=A0cowan@ccil.org
The peculiar excellence of comedy is its excellent fooling, and Aristo= phanes's
claim to immortality is based upon one title only: he was a= master maker
of comedy, he could fool excellently.=C2=A0 Here Gilbert s= tands side by side
with him.=C2=A0 He, too, could write the most admirab= le nonsense.=C2=A0 There has
never been better fooling than his, and a c= omparison with him carries
nothing derogatory to the great Athenian. --E= dith Hamilton, The Greek Way
--00000000000075a42c05bccfe0b8--