Where can I find examples of engines?

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 threads (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:

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

The mentioned paper actually got cited in the 2nd paragraph of 11.6 Engines .

1 Like

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 :slight_smile:

1 Like

I was just thinking of the engine papers - they just happened to be on a larger list.

1 Like

The classic " Teach Yourself Scheme in Fixnum Days -> Chapter 15 engines" also contains a chapter on engines.

1 Like