18 comments

[ 13.4 ms ] story [ 879 ms ] thread
Metropolitan Transit Authority, apparently, and not Mail Transfer Agent as I had originally thought. Although knowing this hasn't made anything clearer.

About five minutes of my life died to bring you this information.

Cheney on the MTA is a strategy for efficiently implementing continuations, TCO, and garbage collection, and allows you to create a continuation with no immediate cost. It's a pun on the song "Charlie on the MTA" because of how it's implemented, like Charlie, it "never returns." For more info, see "CONS Should Not CONS Its Arguments Part II: Cheney On The MTA" By Henry Baker.
Yes, that was where I eventually tracked down the meaning (in the footnotes where it was hard to find, although they were good enough to quote the verse).

The thing about pop culture is that firstly it dates really badly, and second is that it doesn't work across cultures. I'd never heard of the song before now..

"Charlie on the MTA" isn't really "pop" culture, it's Boston (area) culture, originating over 60 years ago. Not surprising that it ended up in technical literature around Scheme.
Boston area? I live in New England, and while not exactly the most common thing, it's fairly well known.

I've seen more than a few people who thought the Boston T charged you on your way out their first time in Boston because of this song.

This is a pretty cool project, but it doesn't have the library support of other schemes. Given CHICKEN's already Cheney based, I wonder if Felix could somehow integrate this work? Green-Threaded pre-emptive cooroutines are all well and good, but sometimes you want OS threads...
Cyclone author here. R7RS libraries and SRFI's will help to some extent, for example hashtable support was more or less plug and play. As Cyclone matures it could potentially support R7RS-large which is going to include quite a bit. But we'll have to see how much of that can handle "real" things like database, graphics, etc.

It would require major changes to the CHICKEN runtime to support native threads, but Cyclone does map out a potential solution.

There is 1000$ bounty for enhacing CHICKEN with native threads. Maybe your work will trigger now someone :) .
>R7RS libraries and SRFI's will help to some extent, for example hashtable support was more or less plug and play. As Cyclone matures it could potentially support R7RS-large which is going to include quite a bit. But we'll have to see how much of that can handle "real" things like database, graphics, etc.

Good news!

>It would require major changes to the CHICKEN runtime to support native threads, but Cyclone does map out a potential solution

Oh well. Well, at least there is hope.

Can anyone point me in the direction some call with continuation and stack and heap explainer? It would be great if it was brief and visual but I'm willing to read up. I just want to make sure that an explanation of call/cc is forthcoming.
What exactly about them do you want explained? I'll do my best to do it, or give a link, but I'm not sure if you want a general explanation of all three, or an explanation of the connection beteen them.
Here is a basic introduction to the stack and heap, with examples in C: http://gribblelab.org/CBootcamp/7_Memory_Stack_vs_Heap.html

This might help with continuations: https://en.wikipedia.org/wiki/Continuation

Here is a really simple example of simulating a C return using call/cc:

  (display
    (call/cc
      (lambda (return)
        (display "hello ")
        (return "world")
        (display "never reached"))))
For continuations, I would actually recomend "LAMBDA: The Ultimate Imperative" (http://repository.readscheme.org/ftp/papers/ai-lab-pubs/AIM-...). It's not exactly light reading, but it gives the best explanation of continuations that I've seen.

If you just want the simple explanation: A continuation is a copy of the return stack at the instant it was captured. When a continuation is invoked, that copy replaces the stack.

This is perfect! Thank you!
(comment deleted)