Re: Announcing 8sync: an asynchronous programming language for Guile

2015-12-09 Thread Christopher Allan Webber
William ML Leslie writes: > On 6 December 2015 at 01:58, Christopher Allan Webber > wrote: >> Amirouche Boubekki writes: >>> 8sync has two types of async-request: >>> >>> ** run-requests, which implements kind of a *coroutine* behavior. >>> >>> It pause the execution of the current procedure and

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-12-06 Thread William ML Leslie
On 6 December 2015 at 01:58, Christopher Allan Webber wrote: > Amirouche Boubekki writes: >> 8sync has two types of async-request: >> >> ** run-requests, which implements kind of a *coroutine* behavior. >> >> It pause the execution of the current procedure and schedule >> the provided lambda to be

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-12-06 Thread Amirouche Boubekki
Le 2015-12-05 15:58, Christopher Allan Webber a écrit : Amirouche Boubekki writes: * Agenda ** The canonical callback based event loop API is not visible enough It should be obvious coming from outside Guile world what/where is the event loop. As such, agenda doesn't seem like a good name.

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-12-05 Thread Amirouche Boubekki
Le 2015-12-05 15:58, Christopher Allan Webber a écrit : Amirouche Boubekki writes: *** `tdelta` is not useful. tdelta is used so the the agenda knows to put it a future time from the current execution of the agenda. I wanted to write that it's only a shorcut: ``` (define tdelta make-time-

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-12-05 Thread Amirouche Boubekki
Le 2015-12-05 15:58, Christopher Allan Webber a écrit : Amirouche Boubekki writes: * %8sync This is the main macro, here is it's definition: ``` (define-syntax-rule (%8sync async-request) (propagate-%async-exceptions (abort-to-prompt (current-agenda-prompt) async-request))) ``` I'm wo

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-12-05 Thread Christopher Allan Webber
Amirouche Boubekki writes: >> Le 2015-12-04 03:47, Amirouche Boubekki a écrit : >> >>>Le 2015-12-04 03:15, Amirouche Boubekki a écrit : >>> >>>``` >>>(define (read/ sock) >>> (abort-to-prompt 'loop (lambda (cc) >>> (loop-add-reader s

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-12-05 Thread Amirouche Boubekki
Le 2015-12-04 03:47, Amirouche Boubekki a écrit : Le 2015-12-04 03:15, Amirouche Boubekki a écrit : ``` (define (read/ sock) (abort-to-prompt 'loop (lambda (cc) (loop-add-reader sock (lambda () (cc (read sock))) ```

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-12-03 Thread Amirouche Boubekki
Le 2015-12-04 03:15, Amirouche Boubekki a écrit : ``` (define (read/ sock) (abort-to-prompt 'loop (lambda (cc) (loop-add-reader sock (lambda () (cc (read sock))) ``` This is mistake, it should be a macro, so that, I think, even if the callstack displays the `l

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-12-03 Thread Amirouche Boubekki
Héllo, I've done some exploration regarding this topic; I think it might of interest or it's very naive. It goes like this: ``` scheme (define (loop-run-forever) (while #true (call-with-prompt 'loop loop-run-once (lambda (cc callback) (callback cc) ``` `loop-run-once

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-11-29 Thread Christopher Allan Webber
Ludovic Courtès writes: > Christopher Allan Webber skribis: > >> Christopher Allan Webber writes: >> >>> ... and the complicated-number-code will launch asynchronously, but wake >>> back up the appropriate function appropriately. You can also set timed >>> events, read and write to ports asynchr

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-11-29 Thread Ludovic Courtès
Christopher Allan Webber skribis: > It makes significant use of delimited continuations. You can do things > like this: > > (define (my-number-talker) > (format #t > "Oh boy, looks like we got back ~a!\n" > (%sync (%run (+ 1 2 3 (complicated-number-code 38)) > > ... and the

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-11-29 Thread Ludovic Courtès
Christopher Allan Webber skribis: > Christopher Allan Webber writes: > >> ... and the complicated-number-code will launch asynchronously, but wake >> back up the appropriate function appropriately. You can also set timed >> events, read and write to ports asynchronously, and etc. It has a nice

Re: Announcing 8sync: an asynchronous programming language for Guile

2015-11-23 Thread Christopher Allan Webber
Christopher Allan Webber writes: > ... and the complicated-number-code will launch asynchronously, but wake > back up the appropriate function appropriately. You can also set timed > events, read and write to ports asynchronously, and etc. It has a nice > non-blocking loop, and personally I've f

Announcing 8sync: an asynchronous programming language for Guile

2015-11-23 Thread Christopher Allan Webber
Hello all, Some of you may remember the thread on this list about Guile needing an asynchronous programming library, with a writeup from a conversation David Thompson, Mark Weaver, guest star Andrew Engelbrecht, and I had at LibrePlanet: https://lists.gnu.org/archive/html/guile-devel/2015-10/ms