Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #16925 > unrolled thread
| Started by | Anton Antimo <anton@safunu.org> |
|---|---|
| First post | 2026-09-22 13:43 -0300 |
| Last post | 2026-09-25 00:06 +0000 |
| Articles | 6 — 4 participants |
Back to article view | Back to comp.programming
continuations in ``the art of computer programming'' Anton Antimo <anton@safunu.org> - 2026-09-22 13:43 -0300
Re: continuations in ``the art of computer programming'' ram@zedat.fu-berlin.de (Stefan Ram) - 2026-09-22 18:04 +0000
Re: continuations in ``the art of computer programming'' usenet@stegropa.de (Stefan Große Pawig) - 2026-09-22 20:01 +0200
Re: continuations in ``the art of computer programming'' Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-22 21:07 +0000
Re: continuations in ``the art of computer programming'' Anton Antimo <anton@safunu.org> - 2026-09-24 13:59 -0300
Re: continuations in ``the art of computer programming'' Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-09-25 00:06 +0000
| From | Anton Antimo <anton@safunu.org> |
|---|---|
| Date | 2026-09-22 13:43 -0300 |
| Subject | continuations in ``the art of computer programming'' |
| Message-ID | <87se31fd84.fsf@safunu.org> |
Donald Knuth has been documenting and investigating programming techniques forever in his monumental set called ``The Art of Computer Programming''. I suppose he must have in his own terms what is now called continuations. In which part section of which book is the Scheme call/cc primitive studied?
[toc] | [next] | [standalone]
| From | ram@zedat.fu-berlin.de (Stefan Ram) |
|---|---|
| Date | 2026-09-22 18:04 +0000 |
| Message-ID | <call-20260922190333@ram.dialup.fu-berlin.de> |
| In reply to | #16925 |
Anton Antimo <anton@safunu.org> wrote or quoted: >Donald Knuth has been documenting and investigating programming >techniques forever in his monumental set called ``The Art of Computer >Programming''. I suppose he must have in his own terms what is now >called continuations. In which part section of which book is the Scheme >call/cc primitive studied? Scheme's call/cc is a high-level language programming con- struct outside the scope of Knuth's assembly-based approach. However, coroutines are treated in Volume 1, section 1.4.2. "call/cc" could be treated in volume 7 "Compiler Techniques", but volume 7 is still decades away.
[toc] | [prev] | [next] | [standalone]
| From | usenet@stegropa.de (Stefan Große Pawig) |
|---|---|
| Date | 2026-09-22 20:01 +0200 |
| Message-ID | <87tsnhtbbl.fsf@ID-208667.user.individual.de> |
| In reply to | #16925 |
Anton Antimo <anton@safunu.org> writes:
> Donald Knuth has been documenting and investigating programming
> techniques forever in his monumental set called ``The Art of Computer
> Programming''. I suppose he must have in his own terms what is now
> called continuations. In which part section of which book is the Scheme
> call/cc primitive studied?
I think the closest would be volume 1, section 1.4.2 on coroutines.
Regards,
Stefan
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <ldo@nz.invalid> |
|---|---|
| Date | 2026-09-22 21:07 +0000 |
| Message-ID | <118uqn8$1720s$3@dont-email.me> |
| In reply to | #16927 |
On Tue, 22 Sep 2026 20:01:18 +0200, Stefan Große Pawig wrote: > Anton Antimo <anton@safunu.org> writes: >> >> In which part section of which book is the Scheme call/cc primitive >> studied? > > I think the closest would be volume 1, section 1.4.2 on coroutines. Note that (stackful) coroutines are just one of the higher-level constructs that can be implemented with a continuation primitive. Continuations are somewhat more general than that.
[toc] | [prev] | [next] | [standalone]
| From | Anton Antimo <anton@safunu.org> |
|---|---|
| Date | 2026-09-24 13:59 -0300 |
| Message-ID | <87ld8qd1px.fsf@safunu.org> |
| In reply to | #16927 |
usenet@stegropa.de (Stefan Große Pawig) writes: > Anton Antimo <anton@safunu.org> writes: >> Donald Knuth has been documenting and investigating programming >> techniques forever in his monumental set called ``The Art of Computer >> Programming''. I suppose he must have in his own terms what is now >> called continuations. In which part section of which book is the Scheme >> call/cc primitive studied? > > I think the closest would be volume 1, section 1.4.2 on coroutines. Thank you and all other posters in this thread. So I think call/cc is essentially a jump over there, do something and take here an address for you to get back to what you were doing before. As usual, not much magic behinds the scenes, but surely the implications of a jump instruction as far fetching, of which call/cc is a great illustration.
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <ldo@nz.invalid> |
|---|---|
| Date | 2026-09-25 00:06 +0000 |
| Message-ID | <1194du2$34hlg$7@dont-email.me> |
| In reply to | #16929 |
On Thu, 24 Sep 2026 13:59:54 -0300, Anton Antimo wrote: > So I think call/cc is essentially a jump over there, do something > and take here an address for you to get back to what you were doing > before. There doesn’t need to be a jump to begin with. You could just save the return point and continue execution normally. Think setjmp/longjmp in C -- that’s a form of continuation, too. It’s just that the Lisps usually implement it as “call a function while passing it another function which, when called, jumps back to just after the point of the initial call”.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.programming
csiph-web