The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* Re: [TUHS] bas(1) and bs(1) videos including features and use
@ 2021-01-20 16:56 M Douglas McIlroy
  2021-01-20 22:17 ` Dave Horsfall
  0 siblings, 1 reply; 7+ messages in thread
From: M Douglas McIlroy @ 2021-01-20 16:56 UTC (permalink / raw)
  To: dave, tuhs

[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

Nice archaeology. Blinded by my distaste for Basic , I never bothered to
try bs--and should have. Dave has highlighted features that deserve respect.
One telling example suggests this should be legalized in C:
        printf("%s\n", {"true", "false"}[1]);

Doug

[-- Attachment #2: Type: text/html, Size: 362 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TUHS] bas(1) and bs(1) videos including features and use
  2021-01-20 16:56 [TUHS] bas(1) and bs(1) videos including features and use M Douglas McIlroy
@ 2021-01-20 22:17 ` Dave Horsfall
  2021-01-20 23:11   ` Hellwig Geisse
  0 siblings, 1 reply; 7+ messages in thread
From: Dave Horsfall @ 2021-01-20 22:17 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

On Wed, 20 Jan 2021, M Douglas McIlroy wrote:

> Nice archaeology. Blinded by my distaste for Basic , I never bothered to try
> bs--and should have. Dave has highlighted features that deserve respect.One
> telling example suggests this should be legalized in C:
>         printf("%s\n", {"true", "false"}[1]);

That would evaluate to a constant being printed (it's a direct array 
reference).  Did you mean something like "...[i]" instead?  That would 
indeed be neat...

-- Dave

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TUHS] bas(1) and bs(1) videos including features and use
  2021-01-20 22:17 ` Dave Horsfall
@ 2021-01-20 23:11   ` Hellwig Geisse
  2021-01-21  7:30     ` Sudipto Mallick
  2021-01-28 21:15     ` Dave Horsfall
  0 siblings, 2 replies; 7+ messages in thread
From: Hellwig Geisse @ 2021-01-20 23:11 UTC (permalink / raw)
  To: Dave Horsfall, The Eunuchs Hysterical Society

On Do, 2021-01-21 at 09:17 +1100, Dave Horsfall wrote:
>         printf("%s\n", {"true", "false"}[1]);
> That would evaluate to a constant being printed (it's a direct array 
> reference).  Did you mean something like "...[i]" instead?  That would 
> indeed be neat...
> 

I think it doesn't matter if the index expression is
a constant expression or not. The point here, as I
understood, is the definition of an unnamed (and not
explicitly typed) array "on the fly".

Hellwig

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TUHS] bas(1) and bs(1) videos including features and use
  2021-01-20 23:11   ` Hellwig Geisse
@ 2021-01-21  7:30     ` Sudipto Mallick
  2021-01-28 21:15     ` Dave Horsfall
  1 sibling, 0 replies; 7+ messages in thread
From: Sudipto Mallick @ 2021-01-21  7:30 UTC (permalink / raw)
  To: Hellwig Geisse; +Cc: The Eunuchs Hysterical Society

Then what about the following? :D

    union huh { uint64_t l; double d; };
    uint64_t a = ((union huh){ .d = foo }).l;

--Sudipto Mallick

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TUHS] bas(1) and bs(1) videos including features and use
  2021-01-20 23:11   ` Hellwig Geisse
  2021-01-21  7:30     ` Sudipto Mallick
@ 2021-01-28 21:15     ` Dave Horsfall
  1 sibling, 0 replies; 7+ messages in thread
From: Dave Horsfall @ 2021-01-28 21:15 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

On Thu, 21 Jan 2021, Hellwig Geisse wrote:

>> That would evaluate to a constant being printed (it's a direct array  
>> reference).  Did you mean something like "...[i]" instead?  That would  
>> indeed be neat...
>
> I think it doesn't matter if the index expression is a constant 
> expression or not. The point here, as I understood, is the definition of 
> an unnamed (and not explicitly typed) array "on the fly".

Ah, I see; thanks.  Sometimes I'm too pedantic for my own good :-)

-- Dave

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TUHS] bas(1) and bs(1) videos including features and use
  2021-01-20 14:05 Dave Plonka
@ 2021-01-20 14:17 ` Andy Kosela
  0 siblings, 0 replies; 7+ messages in thread
From: Andy Kosela @ 2021-01-20 14:17 UTC (permalink / raw)
  To: Dave Plonka; +Cc: tuhs

On Wednesday, January 20, 2021, Dave Plonka <dave@plonka.us> wrote:
>
> Hi folks,
>
> In case you're interested:
>
> I've published a couple videos on these ancient Unix tools, sharing
> including some language details and showing them in action on v7 and
> System III, respectively:
>
> Ken Thompson's bas(1): https://youtu.be/LZUMNZTUJos
>
> Dick Haight's bs(1): https://youtu.be/ELICIa3L22o
>
> Thanks much for the help from TUHS, Mashey, Kernighan, McIlroy, and
> others cited therein.


Great content!  I love YouTube channels about retrocomputing.  You've
just earned a new subscriber.

Thanks!

--Andy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] bas(1) and bs(1) videos including features and use
@ 2021-01-20 14:05 Dave Plonka
  2021-01-20 14:17 ` Andy Kosela
  0 siblings, 1 reply; 7+ messages in thread
From: Dave Plonka @ 2021-01-20 14:05 UTC (permalink / raw)
  To: tuhs

Hi folks,

In case you're interested:

I've published a couple videos on these ancient Unix tools, sharing
including some language details and showing them in action on v7 and
System III, respectively:

Ken Thompson's bas(1): https://youtu.be/LZUMNZTUJos

Dick Haight's bs(1): https://youtu.be/ELICIa3L22o

Thanks much for the help from TUHS, Mashey, Kernighan, McIlroy, and
others cited therein.

Peace,
Dave

-- 
dave@plonka.us  http://www.cs.wisc.edu/~plonka/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-28 21:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 16:56 [TUHS] bas(1) and bs(1) videos including features and use M Douglas McIlroy
2021-01-20 22:17 ` Dave Horsfall
2021-01-20 23:11   ` Hellwig Geisse
2021-01-21  7:30     ` Sudipto Mallick
2021-01-28 21:15     ` Dave Horsfall
  -- strict thread matches above, loose matches on Subject: below --
2021-01-20 14:05 Dave Plonka
2021-01-20 14:17 ` Andy Kosela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).