fibers doc: fix typo

2022-10-15 Thread Dmitry Polyakov

Fiber's README tells me to send this path here, IIUC:
--8<---cut here---start->8---
Mailing List: `guile-user@gnu.org`
--8<---cut here---end--->8---

>From 0a2639457a6308e641e09eb00aaa7dcb4eed5dba Mon Sep 17 00:00:00 2001
From: Dmitry Polyakov 
Date: Sat, 15 Oct 2022 16:42:05 +0500
Subject: [PATCH] doc: fix typo

* fibers.texi (Concurrent Web Server): fix typo
---
 fibers.texi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fibers.texi b/fibers.texi
index 6c82fb9..5f48af0 100644
--- a/fibers.texi
+++ b/fibers.texi
@@ -1383,9 +1383,9 @@ be able to not only the input and output running concurrently, but
 also handlers too.
 
 For this reason, Fibers includes a simple standalone web server that
-uses Guile's Guile's HTTP facilities, but not its web server
-framework.  To run a standalone web server, use the @code{(fibers web
-server)} module:
+uses Guile's HTTP facilities, but not its web server framework.  To
+run a standalone web server, use the @code{(fibers web server)}
+module:
 
 @example
 (use-modules (fibers web server))

base-commit: 19dbc8d3e3864a5612ea5b291280ebf7b42ea644
-- 
2.38.0



Re: fibers doc: fix typo

2022-10-15 Thread Dmitry Polyakov


And in:

--8<---cut here---start->8---
@defun wait-until-port-writable-operation
Make an operation that will succeed with no values when the output
port @var{port} becomes writable.
@end defun
--8<---cut here---end--->8---

May be need add port at the end of the first line:

--8<---cut here---start->8---
@defun wait-until-port-writable-operation port
Make an operation that will succeed with no values when the output
port @var{port} becomes writable.
@end defun
--8<---cut here---end--->8---



Web development without connections to external repl (in geiser)

2022-10-15 Thread Dmitry Polyakov


Hello guilers!

As far as I can see, current method for interactive web development is
to connect to external guile-instance-with-listen-option with geiser.

Using fibers, I thought I could run the web server in seperate thread
that dont block current one where, for example, I could rebind the
handler (via ice-9 atomics or something). But it's not, after eval
(run-server handler), repl get stuck. May be I misunderstood something?
This is code:

--8<---cut here---start->8---
(use-modules (ice-9 atomic)
 (fibers)
 (fibers scheduler)
 (fibers web server))

(define v (make-atomic-box "some text sdf"))

(define (handler request body) (values '((content-type . (text/plain)))
   (atomic-box-ref v)))


(run-server handler)
--8<---cut here---end--->8---



Re: Web development without connections to external repl (in geiser)

2022-10-15 Thread Dmitry Polyakov
Dmitry Polyakov  writes:

> Hello guilers!
>
> As far as I can see, current method for interactive web development is
> to connect to external guile-instance-with-listen-option with geiser.
>
> Using fibers, I thought I could run the web server in seperate thread
> that dont block current one where, for example, I could rebind the
> handler (via ice-9 atomics or something). But it's not, after eval
> (run-server handler), repl get stuck. May be I misunderstood something?
> This is code:

May this is because of main thread is blocked by REPL?