I was reading about Racket's 11.6 Engines concept and thought it was pretty interesting. Are there any examples of them in use? I looked in the Guide but didn't see a mention of them, and my Google-fu is turning up nothing particularly informative.
1 Like
I normally search for tests but I haven’t had any luck.
This is the best I could find: racket/control.ss at 448b77a6629c68659e1360fbe9f9e1ecea078f9c · racket/racket · GitHub
https://www.scheme.com/tspl4/examples.html#./examples:s82
The Scheme Programming Language by Dybvig has a section on engines.
See also ReadScheme (look among Friedman’s papers).
2 Likes
Brilliant. Thank you both.
1 Like
It's interesting that the Dybvig link describes engines as something upon which you could implement (among other things) lightweight threads -- for example if Racket lacked thread
.
However racket/engine
implements engines using thread
s (as well as semaphores and channels). The source is only about 100 lines , not including the logging aspect.
Smarter people than me know the history of this in Scheme and Racket. I imagine this is one of those areas where you have some flexibility which elements you pick to be "more primitive" vs. less (and in this case the most primitive probably always turns out to be delimited continuations)?
1 Like
There might be some history in the the engine papers here:
## Continuations and Continuation Passing Style
* Greg Pettyjohn, John Clements, Joe Marshall, Shriram Krishnamurthi and Matthias Felleisen. "Continuations from Generalized Stack Inspection". _International Conference on Functional Programming, ICFP 2005_. September 2005. Available online: [downloadable paper](http://www.cs.brown.edu/~sk/Publications/Papers/Published/pcmkf-cont-from-gen-stack-insp/).
* Chung-chieh Shan. "Shift to Control". _2004 Scheme Workshop_. September 2004. Available online: [ps](https://raw.githubusercontent.com/scheme-live/library.readscheme.org/master/repository.readscheme.org/ftp/papers/sw2004/shan.ps.gz) [pdf](https://raw.githubusercontent.com/scheme-live/library.readscheme.org/master/repository.readscheme.org/ftp/papers/sw2004/shan.pdf).
* Martin Gasbichler, Eric Knauel, Michael Sperber and Richard A. Kelsey. "How to Add Threads to a Sequential Language Without Getting Tangled Up". _Scheme Workshop 2003_. November 2003. Available online: [ps](https://raw.githubusercontent.com/scheme-live/library.readscheme.org/master/repository.readscheme.org/ftp/papers/sw2003/Threads.ps.gz) [pdf](https://raw.githubusercontent.com/scheme-live/library.readscheme.org/master/repository.readscheme.org/ftp/papers/sw2003/Threads.pdf).
* Dorai Sitaram. "Unwind-protect in portable Scheme". _Scheme Workshop 2003_. November 2003. Available online: [ps](https://raw.githubusercontent.com/scheme-live/library.readscheme.org/master/repository.readscheme.org/ftp/papers/sw2003/Unwind.ps.gz) [pdf](https://raw.githubusercontent.com/scheme-live/library.readscheme.org/master/repository.readscheme.org/ftp/papers/sw2003/Unwind.pdf).
* Olivier Danvy. "Three Steps for the CPS Transformation". Kansas State University. CIS-92-02. December 1991. Available online: [ps](http://www.daimi.au.dk/~danvy/Papers/3steps.ps.gz).
* Olivier Danvy. "On some Functional Aspects of Control". _Workshop on the Implementation of Lazy Functional Languages_. October 1988. Available online: [ps](http://www.daimi.au.dk/~danvy/Papers/fac.ps.gz) [pdf](http://citeseer.nj.nec.com/rd/2643588%2C295233%2C1%2C0.25%2CDownload/http://citeseer.nj.nec.com/cache/papers/cs/14165/http:zSzzSzwww.daimi.au.dkzSz%7EdanvyzSzPaperszSzfac.pdf/danvy88some.pdf).
* William D. Clinger, Anne Hartheimer and Eric M. Ost. "Implementation strategies for continuations". Vol. 12. No. 1. 1999.
* Olivier Danvy. "Formalizing Implementation Strategies for First-Class Continuations". _European Symposium on Programming (ESOP 2000)_. LNCS 1782. April 2000. Available online: [ps](http://www.brics.dk/RS/99/51/BRICS-RS-99-51.ps.gz) [pdf](http://www.brics.dk/RS/99/51/BRICS-RS-99-51.pdf).
* Olivier Danvy. "Back to Direct Style". _European Symposium on Programming (ESOP 1992)_. LNCS 582. February 1992. Available online: [ps](ftp://ftp.daimi.au.dk/pub/empl/danvy/Papers/danvy-scp94.ps.gz).
* Michael Sperber and Martin Gasbichler. "Final shift for call/cc: Direct implementation of shift and reset". _International Conference on Functional Programming (ICFP'2002)_. October 2002. Available online: [ps](http://www-pu.informatik.uni-tuebingen.de/users/gasbichl/publications/icfp02.ps).
* Martin Gasbichler, Michael Sperber. "A Direct Implementation of Shift/Reset". _IFL 2001_. 2001.
* Paul T. Graunke and Shriram Krishnamurthi. "Advanced Control Flows for Flexible Graphical User Interfaces". _International Conference on Software Engineering_. 2002. Available online: [ps](http://www.ccs.neu.edu/scheme/pubs/icse2002-gk.ps.gz) [pdf](http://www.ccs.neu.edu/scheme/pubs/icse2002-gk.pdf.gz).
* Paul T. Graunke, Robert Bruce Findler, Shriram Krishnamurthi, Matthias Felleisen. "Automatically Restructuring Programs for the Web". _IEEE International Symposium on Automated Software Engineering (ASE 2001)_. 2001. Available online: [ps](http://www.ccs.neu.edu/scheme/pubs/ase2001-gfkf.ps.gz) [pdf](http://www.ccs.neu.edu/scheme/pubs/ase2001-gfkf.pdf).
* Paul T. Graunke, Shriram Krishnamurthi, Van der Hoeven and Matthias Felleisen. "Programming the Web with High-Level Programming Languages". _European Symposium on Programming (ESOP 2001)_. 2001. Available online: [ps](http://www.ccs.neu.edu/scheme/pubs/esop2001-gkvf.ps.gz) [pdf](http://www.ccs.neu.edu/scheme/pubs/esop2001-gkvf.pdf.gz).
* Olivier Danvy. "Programming with Tighter Control". _BIGRE Bulletin_. 65. July 1989.
* Olivier Danvy. "On listing list prefixes". _Lisp Pointers_. Vol. 2. No. 3-4. January 1989.
* Mitchell Wand. "Continuation-Based Program Transformation Strategies". _Journal of the ACM_. 27. 1. January 1980. Available online: [ACM Digital Library](http://portal.acm.org/citation.cfm?id=322183&coll=portal&dl=ACM).
* Mitchell Wand and Daniel P. Friedman. "Compiling Lambda Expressions Using Continuations and Factorizations". _Journal of Computer Languages_. 3. 1978.
This file has been truncated. show original
It seems they are all from the 1980s ... and all from Indiana?
A pleasant surprise is that it's possible to see the papers in the ACM Digital Library without a login.
Are all old papers free to view now?
It seems this paper introduced the concept:
2 Likes
slbtty
April 26, 2022, 5:53am
7
The mentioned paper actually got cited in the 2nd paragraph of 11.6 Engines .
1 Like
EmEf
April 26, 2022, 9:17am
8
Even this rather incomplete list on the continuation literature includes more people who have never set academic feet on Bloomington’s campus than those that have
1 Like
I was just thinking of the engine papers - they just happened to be on a larger list.
1 Like
slbtty
April 28, 2022, 1:22pm
10
1 Like