* [COFF] Tail-recursion was Re: [TUHS] Lorinda Cherry
[not found] ` <20220222103948.1B0482206F@orac.inputplus.co.uk>
@ 2022-02-23 0:48 ` Will Senn
2022-02-23 0:53 ` silas poulson
2022-02-23 1:45 ` Charles H. Sauer (he/him)
0 siblings, 2 replies; 3+ messages in thread
From: Will Senn @ 2022-02-23 0:48 UTC (permalink / raw)
To: COFF
My all time favorite presentation on tail-recursion:
https://www.youtube.com/watch?v=-PX0BV9hGZY
On 2/22/22 4:39 AM, Ralph Corderoy wrote:
> Hi Otto,
>
>> MacOS uses the GNU implementation which has a long standing issue with
>> deep recursion. It even cannot handle the tail recursive calls used
>> here and will run out of its stack.
> When learning dc and seeing it relied on tail calls, the first thing
> I did was check it did tail-call elimination, and it did. That was
> GNU dc.
>
> Trying just now, I see no growth in memory usage despite heavy CPU load
> shown by TIME increasing.
>
> $ dc
> !ps u `pidof dc`
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> ralph 11489 0.0 0.0 2332 1484 pts/1 S+ 10:33 0:00 dc
> [lmx]smlmx
> ^C
> Interrupt!
> !ps u `pidof dc`
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> ralph 11489 75.5 0.0 2332 1488 pts/1 S+ 10:33 0:46 dc
>
> The memory used remained at that level during the macro execution too,
> watched from outside.
>
> Do you have more detail on what GNU dc can't handle? dc without
> tail-call elimination is a bit crippled.
>
_______________________________________________
COFF mailing list
COFF@minnie.tuhs.org
https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [COFF] Tail-recursion was Re: [TUHS] Lorinda Cherry
2022-02-23 0:48 ` [COFF] Tail-recursion was Re: [TUHS] Lorinda Cherry Will Senn
@ 2022-02-23 0:53 ` silas poulson
2022-02-23 1:45 ` Charles H. Sauer (he/him)
1 sibling, 0 replies; 3+ messages in thread
From: silas poulson @ 2022-02-23 0:53 UTC (permalink / raw)
To: Will Senn; +Cc: COFF
Yes! That’s such as fun presentation!
For those who want the fast version, skip to 6:00 mark.
Silas
> On 23 Feb 2022, at 00:48, Will Senn <will.senn@gmail.com> wrote:
>
> My all time favorite presentation on tail-recursion:
>
> https://www.youtube.com/watch?v=-PX0BV9hGZY
>
>
> On 2/22/22 4:39 AM, Ralph Corderoy wrote:
>> Hi Otto,
>>
>>> MacOS uses the GNU implementation which has a long standing issue with
>>> deep recursion. It even cannot handle the tail recursive calls used
>>> here and will run out of its stack.
>> When learning dc and seeing it relied on tail calls, the first thing
>> I did was check it did tail-call elimination, and it did. That was
>> GNU dc.
>>
>> Trying just now, I see no growth in memory usage despite heavy CPU load
>> shown by TIME increasing.
>>
>> $ dc
>> !ps u `pidof dc`
>> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
>> ralph 11489 0.0 0.0 2332 1484 pts/1 S+ 10:33 0:00 dc
>> [lmx]smlmx
>> ^C
>> Interrupt!
>> !ps u `pidof dc`
>> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
>> ralph 11489 75.5 0.0 2332 1488 pts/1 S+ 10:33 0:46 dc
>>
>> The memory used remained at that level during the macro execution too,
>> watched from outside.
>>
>> Do you have more detail on what GNU dc can't handle? dc without
>> tail-call elimination is a bit crippled.
>>
>
> _______________________________________________
> COFF mailing list
> COFF@minnie.tuhs.org
> https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
_______________________________________________
COFF mailing list
COFF@minnie.tuhs.org
https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [COFF] Tail-recursion was Re: [TUHS] Lorinda Cherry
2022-02-23 0:48 ` [COFF] Tail-recursion was Re: [TUHS] Lorinda Cherry Will Senn
2022-02-23 0:53 ` silas poulson
@ 2022-02-23 1:45 ` Charles H. Sauer (he/him)
1 sibling, 0 replies; 3+ messages in thread
From: Charles H. Sauer (he/him) @ 2022-02-23 1:45 UTC (permalink / raw)
To: coff
An opportunity for Auto-Tune??
On 2/22/2022 6:48 PM, Will Senn wrote:
> My all time favorite presentation on tail-recursion:
>
> https://www.youtube.com/watch?v=-PX0BV9hGZY
--
voice: +1.512.784.7526 e-mail: sauer@technologists.com
fax: +1.512.346.5240 Web: https://technologists.com/sauer/
Facebook/Google/Twitter: CharlesHSauer
_______________________________________________
COFF mailing list
COFF@minnie.tuhs.org
https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-24 0:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAKH6PiVi+JoxDG7ACMG5G+qnTkxTMsohGx6Wq3UNVkogO4N0Vg@mail.gmail.com>
[not found] ` <CAKr6gn2pJROQNr3M+JGU1vs3bRRh3SrTS5N-8w+vWP2oApwmsw@mail.gmail.com>
[not found] ` <alpine.BSF.2.21.9999.2202161122500.45073@aneurin.horsfall.org>
[not found] ` <202202160754.21G7sbUa011318@freefriends.org>
[not found] ` <1nKFRN-4IZ-00@marmaro.de>
[not found] ` <8735kig8vb.fsf@vuxu.org>
[not found] ` <m27d9tw9fx.fsf@thuvia.hamartun.priv.no>
[not found] ` <alpine.BSF.2.21.9999.2202180810480.45073@aneurin.horsfall.org>
[not found] ` <4E3028A1-EC08-424A-B814-CC2AEEEAEC7B@iitbombay.org>
[not found] ` <Yg9Z7Y8RK2+GQeDI@clue.drijf.net>
[not found] ` <20220222103948.1B0482206F@orac.inputplus.co.uk>
2022-02-23 0:48 ` [COFF] Tail-recursion was Re: [TUHS] Lorinda Cherry Will Senn
2022-02-23 0:53 ` silas poulson
2022-02-23 1:45 ` Charles H. Sauer (he/him)
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).