5 ms·
Cyclone Scheme – Cheney on the MTA with Native Threads
- david-given 10y agoMetropolitan 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.
- qwertyuiop924 10y agoCheney 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.
- david-given 10y agoYes, 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..
- twoodfin 10y ago"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.
- qwertyuiop924 10y agoBoston 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.
- icey 10y agoThe reasoning behind the naming is outlined here: http://www.pipeline.com/~hbaker1/CheneyMTA.html http://www.pipeline.com/~hbaker1/CheneyMTA.html. It's a fun read and once you see the lyric it's based on, it makes a lot more sense.
- qwertyuiop924 10y agoThis 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...
- justinethier 10y agoCyclone 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.
- paines 10y agoThere is 1000$ bounty for enhacing CHICKEN with native threads. Maybe your work will trigger now someone :) .
- qwertyuiop924 10y ago>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.
- jcl 10y agoI thought this might have had something to do with the Cyclone safety-oriented C dialect, but apparently the similar name is coincidental. https://en.wikipedia.org/wiki/Cyclone_(programming_language) https://en.wikipedia.org/wiki/Cyclone_(programming_language)
- gtoast 10y agoCan 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.
- qwertyuiop924 10y agoWhat 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.
- justinethier 10y agoHere is a basic introduction to the stack and heap, with examples in C: http://gribblelab.org/CBootcamp/7_Memory_Stack_vs_Heap.html http://gribblelab.org/CBootcamp/7_Memory_Stack_vs_Heap.html This might help with continuations: https://en.wikipedia.org/wiki/Continuation 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"))))
- qwertyuiop924 10y agoFor continuations, I would actually recomend "LAMBDA: The Ultimate Imperative" (http://repository.readscheme.org/ftp/papers/ai-lab-pubs/AIM-353.pdf 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.
- gtoast 10y agoThis is perfect! Thank you!
- gtoast 10y ago
- deleted 10y ago[deleted]