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.
Cyclone Scheme – Cheney on the MTA with Native Threads
11–19 of 19 posts
Re: Cyclone Scheme – Cheney on the MTA with Native Threads
#12This 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...
It would require major changes to the CHICKEN runtime to support native threads, but Cyclone does map out a potential solution.
Re: Cyclone Scheme – Cheney on the MTA with Native Threads
#13Can 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.
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"))))Re: Cyclone Scheme – Cheney on the MTA with Native Threads
#14This 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…
Re: Cyclone Scheme – Cheney on the MTA with Native Threads
#15This 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…
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.
Re: Cyclone Scheme – Cheney on the MTA with Native Threads
#16Can 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.
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"))))
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.
Re: Cyclone Scheme – Cheney on the MTA with Native Threads
#17Earlier quoted context omitted.
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…
Re: Cyclone Scheme – Cheney on the MTA with Native Threads
#18Can 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.
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"))))