Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Simplicity does not precede complexity, but follows it.


devel / comp.lang.misc / Algol68 and GC

SubjectAuthor
* Algol68 and GCBakul Shah
+- Re: Algol68 and GCCharles Lindsey
`* Re: Algol68 and GCAndy Walker
 `* Re: Algol68 and GCBakul Shah
  +* Re: Algol68 and GCBart
  |`* Re: Algol68 and GCBakul Shah
  | `- Re: Algol68 and GCBart
  +- Re: Algol68 and GCAndy Walker
  `- Re: Algol68 and GCCharles Lindsey

1
Algol68 and GC

<sptmpo$pjc$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1635&group=comp.lang.misc#1635

  copy link   Newsgroups: comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bakul@iitbombay.org (Bakul Shah)
Newsgroups: comp.lang.misc
Subject: Algol68 and GC
Date: Tue, 21 Dec 2021 15:08:40 -0800
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <sptmpo$pjc$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 21 Dec 2021 23:08:40 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2db08d44eff907fb1b8e096617477b57";
logging-data="26220"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bLZIZKp3dPPgnmqxiHNrT"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:68.0)
Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.10.1
Cancel-Lock: sha1:cBj9wSB6jrkPYXjj5Trc/sbF8UA=
X-Mozilla-News-Host: snews://news.eternal-september.org/
 by: Bakul Shah - Tue, 21 Dec 2021 23:08 UTC

Another question for Algol68 experts in this group:
A long time ago[1] in this newsgroup Piet Von Oostrum said this:
One example: dynamic arrays are easy: Algol 60 had it, see also
the discussion on alloca in this newsgroup. Unions are easy: C
has them. The combination of dynamic arrays and union however
forces you to use the heap, and hence garbage collection.

Not sure I quite understand this. Wouldn't unions or sum types
by themselves require GC?

Second, would any restriction have helped avoid GC? For instance,
what if the mode of a union variable can not be changed once
assigned a particular type value?

[1] https://groups.google.com/g/comp.lang.misc/c/qkmB_3zuC7Y/m/erN_TfDF38IJ

Re: Algol68 and GC

<j2guarFai4mU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1637&group=comp.lang.misc#1637

  copy link   Newsgroups: comp.lang.misc
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: chl@clerew.man.ac.uk (Charles Lindsey)
Newsgroups: comp.lang.misc
Subject: Re: Algol68 and GC
Date: Wed, 22 Dec 2021 15:25:14 +0000
Lines: 28
Message-ID: <j2guarFai4mU1@mid.individual.net>
References: <sptmpo$pjc$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net nal4EAILDRJIBwsvV8ailwdbASBLypnEJkOtQQRDy3MP97+cM=
Cancel-Lock: sha1:+yu7oeMBS71F+9fiw02i3sx6bcw=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
In-Reply-To: <sptmpo$pjc$2@dont-email.me>
Content-Language: en-US
 by: Charles Lindsey - Wed, 22 Dec 2021 15:25 UTC

On 21/12/2021 23:08, Bakul Shah wrote:
> Another question for Algol68 experts in this group:
> A long time ago[1] in this newsgroup Piet Von Oostrum said this:
>   One example: dynamic arrays are easy: Algol 60 had it, see also
>   the discussion on alloca in this newsgroup. Unions are easy: C
>   has them. The combination of dynamic arrays and union however
>   forces you to use the heap, and hence garbage collection.
>
> Not sure I quite understand this. Wouldn't unions or sum types
> by themselves require GC?
>
> Second, would any restriction have helped avoid GC? For instance,
> what if the mode of a union variable can not be changed once
> assigned a particular type value?
>
> [1] https://groups.google.com/g/comp.lang.misc/c/qkmB_3zuC7Y/m/erN_TfDF38IJ
>
I think this raises the same issues as the modals thread.
However, C++ has exactly this same problem, but I don't know how it handles it.

But if your union contains no dynamic arrays, it is easily implemented as an
object whose size is the size of the largest object in the union.

--
Charles H. Lindsey ---------At my New Home, still doing my own thing------
Tel: +44 161 488 1845 Web: https://www.clerew.man.ac.uk
Email: chl@clerew.man.ac.uk Snail-mail: Apt 40, SK8 5BF, U.K.
PGP: 2C15F1A9 Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5

Re: Algol68 and GC

<sq012j$lhv$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1639&group=comp.lang.misc#1639

  copy link   Newsgroups: comp.lang.misc
Path: i2pn2.org!rocksolid2!i2pn.org!aioe.org!7y76kKd3l4miSXwPE6o/0A.user.46.165.242.75.POSTED!not-for-mail
From: anw@cuboid.co.uk (Andy Walker)
Newsgroups: comp.lang.misc
Subject: Re: Algol68 and GC
Date: Wed, 22 Dec 2021 20:16:19 +0000
Organization: Not very much
Message-ID: <sq012j$lhv$1@gioia.aioe.org>
References: <sptmpo$pjc$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="22079"; posting-host="7y76kKd3l4miSXwPE6o/0A.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Walker - Wed, 22 Dec 2021 20:16 UTC

On 21/12/2021 23:08, Bakul Shah wrote:
> Another question for Algol68 experts in this group:
> A long time ago[1] in this newsgroup

Wow! A thread from more than a third of a century ago that
we both contributed to!

> Piet Von Oostrum said this:
>   One example: dynamic arrays are easy: Algol 60 had it, see also
>   the discussion on alloca in this newsgroup. Unions are easy: C
>   has them. The combination of dynamic arrays and union however
>   forces you to use the heap, and hence garbage collection.

I note Charles's reply, but I don't think it's directly to
do with /dynamic/ arrays, assuming that by that you mean arrays
whose size is not known at compile time. "Simply" allocating space
for the largest possible member of the union is not quite so simple,
in general, ISTM. Consider, eg:

[65536] REAL a; # 2^16, so "only" something like 256K bytes #
[65536] UNION (INT, [] REAL) b;

Now we don't know what size of array will be assigned to any one of
the elements of "b", but it could be "a", so if we allocate the amount
of storage that /could/ be used by any element of "b", then we have to
allow space for 2^16 reals for each, or space for 2^32 reals in total.
That will certainly overflow in a 32-bit computer, even if in reality
only tiny arrays are used in "b". So the choice for the compiler is
to put artificial constraints on the sizes of "a" and "b", or else to
arrange to allocate only the space that is actually used. But that
is not known at compile time, even if, as above, we know the sizes of
all the arrays that occur. So, as a matter of practicality, we have
to use the heap so that elements of "b" can be re-sized as needed.
Or, of course, we could change the union to include a "REF [] INT".

Note that in the comparable case with "STRUCT" types, the
type includes the bounds [eg "MODE STRUCT S = (REAL a, [10] INT b);"]
so the actual sizes are known when objects are declared.

IOW, whereas in C a union is an overlaid structure, in A68
it is simply a name for a collection of types. There are no actual
objects whose type is "UNION ...".

Meanwhile, I note that in your reply to Charles, you say
that you "never had a chance to use A68". Well, now you do! A68G
is freely available, and works "everywhere". As Bart is fond of
pointing out, it's not the fastest kid on the block; but it's
absurdly fast compared with the mainframes of the '70s, so it's
plenty fast enough for everything I need to do.

--
Andy Walker, Nottingham.
Andy's music pages: www.cuboid.me.uk/andy/Music
Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Nevin

Re: Algol68 and GC

<sq05ga$d48$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1640&group=comp.lang.misc#1640

  copy link   Newsgroups: comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bakul@iitbombay.org (Bakul Shah)
Newsgroups: comp.lang.misc
Subject: Re: Algol68 and GC
Date: Wed, 22 Dec 2021 13:31:52 -0800
Organization: A noiseless patient Spider
Lines: 83
Message-ID: <sq05ga$d48$1@dont-email.me>
References: <sptmpo$pjc$2@dont-email.me> <sq012j$lhv$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 22 Dec 2021 21:31:54 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2db08d44eff907fb1b8e096617477b57";
logging-data="13448"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/35knnGXDWXesSDjthLnc7"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:68.0)
Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.10.1
Cancel-Lock: sha1:eMNY88t57bHo656fDp+ZmThxbyA=
In-Reply-To: <sq012j$lhv$1@gioia.aioe.org>
 by: Bakul Shah - Wed, 22 Dec 2021 21:31 UTC

On 12/22/21 12:16 PM, Andy Walker wrote:
> On 21/12/2021 23:08, Bakul Shah wrote:
>> Another question for Algol68 experts in this group:
>> A long time ago[1] in this newsgroup
>
>     Wow!  A thread from more than a third of a century ago that
> we both contributed to!

Some people never grow up :-)

BTW, I have to thank you & D.F.Brailsford for your introductory
book that opened my eyes about Algol68 in the late '70s! Later
I bought a copy back I still refer to now and then.

>>                        Piet Von Oostrum said this:
>>    One example: dynamic arrays are easy: Algol 60 had it, see also
>>    the discussion on alloca in this newsgroup. Unions are easy: C
>>    has them. The combination of dynamic arrays and union however
>>    forces you to use the heap, and hence garbage collection.
>
>     I note Charles's reply, but I don't think it's directly to
> do with /dynamic/ arrays, assuming that by that you mean arrays
> whose size is not known at compile time.  "Simply" allocating space
> for the largest possible member of the union is not quite so simple,
> in general, ISTM.  Consider, eg:
>
>   [65536] REAL a;  # 2^16, so "only" something like 256K bytes #
>   [65536] UNION (INT, [] REAL) b;
>
> Now we don't know what size of array will be assigned to any one of
> the elements of "b", but it could be "a", so if we allocate the amount
> of storage that /could/ be used by any element of "b", then we have to
> allow space for 2^16 reals for each, or space for 2^32 reals in total.
> That will certainly overflow in a 32-bit computer, even if in reality
> only tiny arrays are used in "b".  So the choice for the compiler is
> to put artificial constraints on the sizes of "a" and "b", or else to
> arrange to allocate only the space that is actually used.  But that
> is not known at compile time, even if, as above, we know the sizes of
> all the arrays that occur.  So, as a matter of practicality, we have
> to use the heap so that elements of "b" can be re-sized as needed.
> Or, of course, we could change the union to include a "REF [] INT".

Thanks! This helps quite a bit!

Actually I don't see how the compiler can do anything but
pretend this is "[65536] UNION (INT, REF [] REAL) b;" as
even at *runtime* it can't know how large any individual
UNION element may be.

>
>     Note that in the comparable case with "STRUCT" types, the
> type includes the bounds [eg "MODE STRUCT S = (REAL a, [10] INT b);"]
> so the actual sizes are known when objects are declared.
>
>     IOW, whereas in C a union is an overlaid structure, in A68
> it is simply a name for a collection of types.  There are no actual
> objects whose type is "UNION ...".
>
>     Meanwhile, I note that in your reply to Charles, you say
> that you "never had a chance to use A68".  Well, now you do!  A68G
> is freely available, and works "everywhere".  As Bart is fond of
> pointing out, it's not the fastest kid on the block;  but it's
> absurdly fast compared with the mainframes of the '70s, so it's
> plenty fast enough for everything I need to do.

I have had it for a while! In fact I tried this just now:

[10] UNION(INT, []REAL) b;

b[1] := 12;
b[2] := []REAL(1.1, 2.2, 3.3);

print((b[1],b[2],newline));
b[2] := 1;
print((b[1],b[2],newline))

Doing such a thing in C++ would cause a memory leak as the
user is entirely responsible for memory management. Still,
I can't help wondering if the compiler can just do malloc/free
behind the scenes rather than a proper GC.

At the moment I don't feel motivated enough to write more than
toy programs in A68. I look at it mainly for inspiration.

Re: Algol68 and GC

<sq080q$utk$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1641&group=comp.lang.misc#1641

  copy link   Newsgroups: comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc@freeuk.com (Bart)
Newsgroups: comp.lang.misc
Subject: Re: Algol68 and GC
Date: Wed, 22 Dec 2021 22:14:49 +0000
Organization: A noiseless patient Spider
Lines: 110
Message-ID: <sq080q$utk$1@dont-email.me>
References: <sptmpo$pjc$2@dont-email.me> <sq012j$lhv$1@gioia.aioe.org>
<sq05ga$d48$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 22 Dec 2021 22:14:50 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a9e4dfb7b1096005669a778dbe5310b1";
logging-data="31668"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/1jn6vPHZ0VmuhyDl7S6ssOmCy51Un7o="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:hqVs86+JFJ66v9a02KMgi24+umw=
In-Reply-To: <sq05ga$d48$1@dont-email.me>
 by: Bart - Wed, 22 Dec 2021 22:14 UTC

On 22/12/2021 21:31, Bakul Shah wrote:
> On 12/22/21 12:16 PM, Andy Walker wrote:
>> On 21/12/2021 23:08, Bakul Shah wrote:
>>> Another question for Algol68 experts in this group:
>>> A long time ago[1] in this newsgroup
>>
>>      Wow!  A thread from more than a third of a century ago that
>> we both contributed to!
>
> Some people never grow up :-)
>
> BTW, I have to thank you & D.F.Brailsford for your introductory
> book that opened my eyes about Algol68 in the late '70s! Later
> I bought a copy back I still refer to now and then.
>
>>>                        Piet Von Oostrum said this:
>>>    One example: dynamic arrays are easy: Algol 60 had it, see also
>>>    the discussion on alloca in this newsgroup. Unions are easy: C
>>>    has them. The combination of dynamic arrays and union however
>>>    forces you to use the heap, and hence garbage collection.
>>
>>      I note Charles's reply, but I don't think it's directly to
>> do with /dynamic/ arrays, assuming that by that you mean arrays
>> whose size is not known at compile time.  "Simply" allocating space
>> for the largest possible member of the union is not quite so simple,
>> in general, ISTM.  Consider, eg:
>>
>>    [65536] REAL a;  # 2^16, so "only" something like 256K bytes #
>>    [65536] UNION (INT, [] REAL) b;
>>
>> Now we don't know what size of array will be assigned to any one of
>> the elements of "b", but it could be "a", so if we allocate the amount
>> of storage that /could/ be used by any element of "b", then we have to
>> allow space for 2^16 reals for each, or space for 2^32 reals in total.
>> That will certainly overflow in a 32-bit computer, even if in reality
>> only tiny arrays are used in "b".  So the choice for the compiler is
>> to put artificial constraints on the sizes of "a" and "b", or else to
>> arrange to allocate only the space that is actually used.  But that
>> is not known at compile time, even if, as above, we know the sizes of
>> all the arrays that occur.  So, as a matter of practicality, we have
>> to use the heap so that elements of "b" can be re-sized as needed.
>> Or, of course, we could change the union to include a "REF [] INT".
>
> Thanks! This helps quite a bit!
>
> Actually I don't see how the compiler can do anything but
> pretend this is "[65536] UNION (INT, REF [] REAL) b;" as
> even at *runtime* it can't know how large any individual
> UNION element may be.
>
>>
>>      Note that in the comparable case with "STRUCT" types, the
>> type includes the bounds [eg "MODE STRUCT S = (REAL a, [10] INT b);"]
>> so the actual sizes are known when objects are declared.
>>
>>      IOW, whereas in C a union is an overlaid structure, in A68
>> it is simply a name for a collection of types.  There are no actual
>> objects whose type is "UNION ...".
>>
>>      Meanwhile, I note that in your reply to Charles, you say
>> that you "never had a chance to use A68".  Well, now you do!  A68G
>> is freely available, and works "everywhere".  As Bart is fond of
>> pointing out, it's not the fastest kid on the block;  but it's
>> absurdly fast compared with the mainframes of the '70s, so it's
>> plenty fast enough for everything I need to do.
>
> I have had it for a while! In fact I tried this just now:
>
> [10] UNION(INT, []REAL) b;
>
> b[1] := 12;
> b[2] := []REAL(1.1, 2.2, 3.3);
>
> print((b[1],b[2],newline));
> b[2] := 1;
> print((b[1],b[2],newline))
>
> Doing such a thing in C++ would cause a memory leak as the
> user is entirely responsible for memory management. Still,
> I can't help wondering if the compiler can just do malloc/free
> behind the scenes rather than a proper GC.

This stuff is routine in any dynamic language, where everything is a
union. This is mine in action:

b := new(list, 5)

b[1] := 12
b[2] := (1.1, 2.2, 3.3)
println b

b[2] := 1
println b

Output is this:

(12, (1.100000, 2.200000, 3.300000), <Void>, <Void>, <Void>)
(12, 1, <Void>, <Void>, <Void>)

Here it uses reference counting; the memory used by b[2] is recovered
when something else is assigned to it.

It's harder in a static language, even though all types are known which
is supposed to make things easier. The problem is that here:

b[2] := 1

it doesn't know /at compile time/ what is currently stored in b[2].
(Obviously these simple examples can be be analysed; in general it is
not known.)

Re: Algol68 and GC

<sq0919$66t$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1642&group=comp.lang.misc#1642

  copy link   Newsgroups: comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bakul@iitbombay.org (Bakul Shah)
Newsgroups: comp.lang.misc
Subject: Re: Algol68 and GC
Date: Wed, 22 Dec 2021 14:32:07 -0800
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <sq0919$66t$1@dont-email.me>
References: <sptmpo$pjc$2@dont-email.me> <sq012j$lhv$1@gioia.aioe.org>
<sq05ga$d48$1@dont-email.me> <sq080q$utk$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 22 Dec 2021 22:32:09 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="2db08d44eff907fb1b8e096617477b57";
logging-data="6365"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kzh90mvjUFYIAumaHK8/h"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:68.0)
Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.10.1
Cancel-Lock: sha1:jOvheU87ZfTjlL28fZ8jvzcKDEs=
In-Reply-To: <sq080q$utk$1@dont-email.me>
 by: Bakul Shah - Wed, 22 Dec 2021 22:32 UTC

On 12/22/21 2:14 PM, Bart wrote:
> This stuff is routine in any dynamic language, where everything is a
> union. This is mine in action:

My question was really only about Algol68.

Re: Algol68 and GC

<sq0ctf$oh$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1643&group=comp.lang.misc#1643

  copy link   Newsgroups: comp.lang.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bc@freeuk.com (Bart)
Newsgroups: comp.lang.misc
Subject: Re: Algol68 and GC
Date: Wed, 22 Dec 2021 23:38:24 +0000
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <sq0ctf$oh$1@dont-email.me>
References: <sptmpo$pjc$2@dont-email.me> <sq012j$lhv$1@gioia.aioe.org>
<sq05ga$d48$1@dont-email.me> <sq080q$utk$1@dont-email.me>
<sq0919$66t$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 22 Dec 2021 23:38:24 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b7f38224f55e2a8bed4c811dffae6b69";
logging-data="785"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UgiS4mJArEkqj0BkzR1IkzjrSP4imyd8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.4.0
Cancel-Lock: sha1:QG9T42egLqBpoozguxEgusjIKaA=
In-Reply-To: <sq0919$66t$1@dont-email.me>
 by: Bart - Wed, 22 Dec 2021 23:38 UTC

On 22/12/2021 22:32, Bakul Shah wrote:
> On 12/22/21 2:14 PM, Bart wrote:
>> This stuff is routine in any dynamic language, where everything is a
>> union. This is mine in action:
>
> My question was really only about Algol68.

That told me ...

Re: Algol68 and GC

<sq0dj5$1pfd$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1644&group=comp.lang.misc#1644

  copy link   Newsgroups: comp.lang.misc
Path: i2pn2.org!i2pn.org!aioe.org!7y76kKd3l4miSXwPE6o/0A.user.46.165.242.75.POSTED!not-for-mail
From: anw@cuboid.co.uk (Andy Walker)
Newsgroups: comp.lang.misc
Subject: Re: Algol68 and GC
Date: Wed, 22 Dec 2021 23:49:57 +0000
Organization: Not very much
Message-ID: <sq0dj5$1pfd$1@gioia.aioe.org>
References: <sptmpo$pjc$2@dont-email.me> <sq012j$lhv$1@gioia.aioe.org>
<sq05ga$d48$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="58861"; posting-host="7y76kKd3l4miSXwPE6o/0A.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: Andy Walker - Wed, 22 Dec 2021 23:49 UTC

On 22/12/2021 21:31, Bakul Shah wrote:
> BTW, I have to thank you & D.F.Brailsford for your introductory
> book that opened my eyes about Algol68 in the late '70s! Later
> I bought a copy back I still refer to now and then.

That's very kind, but sadly it was published at the wrong
time; we wrote it several years before publication, intending it
as a course text for the A68R we were then teaching [and for which
Woodward and Bond was not ideal]. It should have been first to
market, and have made us wealthy beyond the dreams of avarice. Or
something. But the representatives of [well-known major publisher]
went rogue on us, messed us around for over a year, and were caught
at it by W-KMP, who promptly dropped the project. By the time we
were rescued by Ellis Horwood, it was too late. There were already
several texts on the market, the RR had come out, A68R was being
replaced by A68RS, and the following year my department switched
to Pascal [grr!] and then to Basic [grr, tho' better for teaching
than Pascal]. We did our best, but the whole book is a bit of a
compromise, and we couldn't even sell it to our own students.

I can't honestly recommend it, except as nostalgia. But
I quite like the style ...! The amusing thing, to DFB and me, is
the number of people who know us both and say "Oh, I know which
chapters you wrote", and get it entirely wrong. FTAOD, the good
jokes are all mine, the rubbish ones Dave's.

--
Andy Walker, Nottingham.
Andy's music pages: www.cuboid.me.uk/andy/Music
Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Nevin

Re: Algol68 and GC

<j2j83nFnv8iU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1645&group=comp.lang.misc#1645

  copy link   Newsgroups: comp.lang.misc
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: chl@clerew.man.ac.uk (Charles Lindsey)
Newsgroups: comp.lang.misc
Subject: Re: Algol68 and GC
Date: Thu, 23 Dec 2021 12:24:23 +0000
Lines: 19
Message-ID: <j2j83nFnv8iU1@mid.individual.net>
References: <sptmpo$pjc$2@dont-email.me> <sq012j$lhv$1@gioia.aioe.org>
<sq05ga$d48$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net kBlvJrPdsvLqOuM49jkdfAGaD8sDB57Ls9t+lgvElsktrI99s=
Cancel-Lock: sha1:mjWE6/gDTySef/EXK/Dc5AKxaH4=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.14.0
In-Reply-To: <sq05ga$d48$1@dont-email.me>
Content-Language: en-US
 by: Charles Lindsey - Thu, 23 Dec 2021 12:24 UTC

On 22/12/2021 21:31, Bakul Shah wrote:
> [10] UNION(INT, []REAL) b;
>
> b[1] := 12;
> b[2] := []REAL(1.1, 2.2, 3.3);
>
> print((b[1],b[2],newline));
> b[2] := 1;
> print((b[1],b[2],newline)

changing that first [10] to [max int} results in:

a68g: exiting: source/genie.c: 5898: object of invalid size

--
Charles H. Lindsey ---------At my New Home, still doing my own thing------
Tel: +44 161 488 1845 Web: https://www.clerew.man.ac.uk
Email: chl@clerew.man.ac.uk Snail-mail: Apt 40, SK8 5BF, U.K.
PGP: 2C15F1A9 Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor