From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Polyakov Newsgroups: gmane.lisp.guile.user Subject: Web development without connections to external repl (in geiser) Date: Sun, 16 Oct 2022 00:23:58 +0500 Message-ID: <874jw4ki0h.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33187"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Oct 15 21:24:28 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojmln-0008Tp-F2 for guile-user@m.gmane-mx.org; Sat, 15 Oct 2022 21:24:27 +0200 Original-Received: from localhost ([::1]:47754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojmlm-0002SK-2s for guile-user@m.gmane-mx.org; Sat, 15 Oct 2022 15:24:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojmlb-0002SA-Ed for guile-user@gnu.org; Sat, 15 Oct 2022 15:24:15 -0400 Original-Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:45049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojmlW-0003pV-7M for guile-user@gnu.org; Sat, 15 Oct 2022 15:24:15 -0400 Original-Received: by mail-lj1-x22d.google.com with SMTP id h8so9622317lja.11 for ; Sat, 15 Oct 2022 12:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=9kQJXehlslMDRQn7CKCJI7N7mvAUBA6hNXd0uNkwwoc=; b=EjiSnc3npBCw1R3F3hrydw4uP0Y5x1eA1InkUfBMxfVEb5YN3ogKjt1fifk6nyS0zt POLnwGV1GWe1UYoy9hGOokKaVKz9Cw+DjaFKTT7NkJHvaEahW2lGLITqzakfDsCy1xkC qwkkrqyRQAaFJ6g3AR0JOAZv0jzTgRnGh6yhLiO1H4Q7UUHqyM0pGh76Ds/w5GTmdbgR 9KCw2taVd/jtM/MTUvOTf7WnO5x73vGAQtxRoqZEBoycRcUNPm3wAfa2v5qF7FQTpaX9 V4hbWFazJr28hyCK9Ufbfi7ExBDZrS6BMKi23YucttweWUkIz4UWluDCPqdmPwQDEKxv ZO5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9kQJXehlslMDRQn7CKCJI7N7mvAUBA6hNXd0uNkwwoc=; b=5GIDEU4+eY1ktOHKWwWQpFo9Qav3d3Fkre5wPM698sAbvPrEI5rY6xq+kQHwPZDFNr mSgShymv3UjGRLrWN526kN/Wkdx/zySiOBFpjhgaqLQDKlEepfpBRp6YGhWMNo5zc/zN fmTfBUY38a0bH9JTZChZIC4Z6YxcVt4yd5kbnA9TSlq7UMmkrgqavctvhy1Hz7ShOnIM 10Q7FWCuTnoWAArM+HfkrLDke7z8cQctGtlXdSXDv7OqpP+lJqKldS8EzOq9qOYJU1GA 7wBOKb/bELzAzIZzCK9JhnbNU/WEOaMsZzAmWU/NKjsGYmkaoftgCJyLEiO2OViejFc/ nX1g== X-Gm-Message-State: ACrzQf2usrhlhMgWHRYIRUss23OrMABB0CBjSTwYv54elPMdk4uytkqK Ct1zkm/7eLdHCd97oH39HRbCR7+4DIPDsg== X-Google-Smtp-Source: AMsMyM4X6adz+L6GsuOPohvZFup8ugtN3CpuBZkPpbvUrGf3tXYch397jDR5/HIkSd2uxAgCQjlGhg== X-Received: by 2002:a2e:a9a8:0:b0:26f:d9b4:9299 with SMTP id x40-20020a2ea9a8000000b0026fd9b49299mr1460513ljq.362.1665861847669; Sat, 15 Oct 2022 12:24:07 -0700 (PDT) Original-Received: from localhost ([109.195.103.71]) by smtp.gmail.com with ESMTPSA id s5-20020a05651c200500b0026ddaf38b0fsm886797ljo.96.2022.10.15.12.24.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 12:24:06 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=liltechdude@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18652 Archived-At: 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---