From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Volf <~@wolfsden.cz> Newsgroups: gmane.lisp.guile.user Subject: How to gradually write a procedure using Guile? Date: Fri, 3 May 2024 02:24:24 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LfKsCC1HoFG4B07g" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28238"; 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 Fri May 03 02:25:19 2024 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 1s2gjm-00071E-8X for guile-user@m.gmane-mx.org; Fri, 03 May 2024 02:25:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2gj4-0005Sv-Db; Thu, 02 May 2024 20:24:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1s2gj3-0005SH-55 for guile-user@gnu.org; Thu, 02 May 2024 20:24:33 -0400 Original-Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1s2gj0-00088Y-R8 for guile-user@gnu.org; Thu, 02 May 2024 20:24:32 -0400 Original-Received: by wolfsden.cz (Postfix, from userid 104) id 6AC40E750; Fri, 3 May 2024 00:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1714695866; bh=jxa8G/4FX8UAP3TiUhCZpljModUMlqA2+2ojSCyjiLU=; h=Date:From:To:Subject; b=lqHPPoO9FEJLLn3+zQ3SttR53rOOQUfgYH9s5Yk7gfV6YtKBKEqgU9POe9pe8blxI Fn9si8ZXKOD0QZIudx1KNUbzoeGc7jHHT7slrEHJN8iDYUMrQEjT0lp8BoCTT5575e 6ibCNRQMmiQcnw0OlXnAcyspu5SvQnjfjJ7dWxgRaMj/ffOyRkti/QuYYnLNlPKuyX d2fxLwIShcLpdiVbqU+HYc2aD14LSG9stABuGVE0uIPx2MfP++egE9cqfMOgdGDP5j uyZB8DLvS4xIet0VJYyEmQNnHQdKjQhP0DYtb79Z/dXhtbZCpxsG+Nnl6/NOmnuwRI qS9YwcD+CMcmpRPdMawU4hi+elcu3cGdWfUbi5ROO24PVMXXORvozeWTIuwoKPLCVl oTlAq+AO5VELjlKT2yqJzsHJV3Nt95VF2ASDAhxe+jiYkd415KuToAR7X/8nAIGhX6 HmJZFWUUbTNot6dY9c5u15nTQ6qhZPk01o+VVFZUt4tVPtcS4KQGWOpR52AvrbUvV0 I+nr26N80HeMPF/ZIRUnOj4O41tDZoCLEpkFM+cBXeDKJb3mp6jKNI8SerAGdp71zk fMmJwVYfARCZn47zPLbOmFx3UMHfUMaXdt4OOEQ6Vz9MgmXXDNmke3iQBYRaCvUVFj afeQ3Z8AeSij/3hbycngsRb8= Original-Received: from localhost (unknown [193.32.127.155]) by wolfsden.cz (Postfix) with ESMTPSA id 25F85E74D for ; Fri, 3 May 2024 00:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1714695865; bh=jxa8G/4FX8UAP3TiUhCZpljModUMlqA2+2ojSCyjiLU=; h=Date:From:To:Subject; b=BEmLSjX/APVkpD4LWh9W0/DwlN4tSADTJbtpkCgjNMTFAmPBqC6aaeSiDExHq7YGk g9JoRrB8cxi+9/vXIswCevW4tC/khM0wJKio5QZShJdVQ8k2y6OMrTyhFhxRqZCE51 WowFdfSI0eVg0frY1YSubIYHi7NOhBpesF1KeRAt6QIEmO7/1d8Y3JEXuYUeFe1mDA ejoaP/iXaIUaQgSqfzpR6XfAujsBkCea1CqPbN0+Mvdx/xEEteq2D0ese+Gvzd71qj cG9OmpmwrLrz70Jd4wVMJT0YSFYc+vSUXJMUKhK1ZEdKsuH9BN8Vvkde5Vfv6KIrlA ms/Dp5niv+x9C20hlc7y+mUj7iXVX90Ntd0x5CtuZsU8qc2TYaYM5NyaGfa+P8sCAu cVAjvNI8ifa8/GZIEWUZlUqgFfTY8v0Kbsrz+V74mvHAzaJ9WOKNtnWIMOi/2VaGHR fsCvcZeqF5OGgE73XvInD6PboAidd294eQ7vogRhnvmXFJcGAEOCSg7Utg7UlWtFYY Qt0u2HZv+lt76yVu8Uw8yBwBl8pCJIQ3KvUXq4GgLQQv6751pYvQIQIriTu55iVa0E 7MTsO3Bc/D2NFxizr6i0ewIsYQ6NDyRQ37AjinRskL1tXsPf3+Rnyk43NqeX5jqhKi bVaL8Z5HW4yeZ6yXb+tAUVoE= Mail-Followup-To: guile-user@gnu.org Content-Disposition: inline Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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, SPF_HELO_PASS=-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-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19576 Archived-At: --LfKsCC1HoFG4B07g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, I am looking for a workflow advice. I am using Emacs with Geiser. I am trying to write couple of procedures that are very imperative and I am not sure how to do that nicely in REPL. For example, let us assume I have a procedure of following character: (define (foo) (let* ((x (bar-x)) (y (bar-y x))) (step1 x) (step2 y) (step3 x y) ...)) Now, each step can be a procedure call, of just few expressions. Now I would like to write the additional steps while utilizing REPL somehow, but I am not sure what is an efficient way. Can I somehow run just to the `...' and get a REPL there so that I could C-x C-e the steps within the let* (for x and y)? Should I just (temporarily) (define x (bar-x)) (define y (bar-y x)) in the REPL so that I can use C-x C-e on the steps? I expect that to get messy once the lets start nesting for example. How do you do it? Are there any resources (blog posts, toots, videos, ...) regarding guile developer's workflow? I did read few, and I (think I) know the fundamentals of Geiser and the REPL, but I am straggling a bit in this case not to fall back to the "normal" way of "write a function, run it whole against a test". Since this is Scheme, and I *can* evaluate single expressions in the procedure body, I would like to use that to my advantage. Somehow. I realize this is a very open-ended question/email. Have a nice day, Tomas Volf -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --LfKsCC1HoFG4B07g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmY0LrgACgkQL7/ufbZ/ wanelw//VlR4nA14enAFCJJ2Msn68Xy8LguedXVjHBzDupz/sF6KY3JLZPxAuKmy MLWYYGl0mzF45ZHUM7FYQ5HIy3YFFIYDjNokhhKf0RnUBYNsJjkZylvz+PeYOtIL ddOWoHYoGsJWNJFJlcHmAnB+8C9C8cH1rXJXYVj/iN6eGrMiXo/o5ucGbYUYYYRg IQMvPOut2arlDc4jE2moC4c44nqsZS8W0BG5EvT1egDbTHLAf+6dDkhEr/aVexsM K4iBD0MdWPvtgSVaVX4aeBhLpaV0xnk7ZdeRm12poNDdT66yEeYtTGlLBApcDO9P 5T/nzKcOUM73+7Gsr+qJBG6uWroB7fCF6VWktu2kEIPESxpsguB4bsjnBWB2R95W sEMsg0RzjGbv3piEX+Jkts/N4h7HZRVB3vDtwY0vGGFSWdyklkFAfexPo1cHDylf VyLCQrXqlksruwFmOo56kD+XwRqufysPcaLRcnuojX6A9C/J1bripnN/QlsaKAHd p9CVe2eH0YdZ7AxsyPRvE2+AecmgXM/Us/N0ZPzAu3sMdqrhNYPCwi3r+xjVl9Cs Jf9gqvn+XBOdKoKhPcqBqQLujEOViIF55vlX4aqdfO6ShRVSwJ2Ezy/qCPsYlER9 6pg1yhb7sw1krYkL+dxfdTaGDJHzHoBwbYTOHs0qS/CG3/GDr2g= =QGie -----END PGP SIGNATURE----- --LfKsCC1HoFG4B07g--