From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: wolf Newsgroups: gmane.lisp.guile.user Subject: Re: Is it possible to write program only in Guile? Date: Wed, 18 Oct 2023 20:49:25 +0200 Message-ID: References: <87fs289iu6.fsf@laura> <87a5sg9ha4.fsf@laura> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zAFm4jMZevXvTRBh" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24928"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Marc Chantreux , CToID , guile-user@gnu.org To: Olivier Dion Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Oct 18 20:50:03 2023 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 1qtBcI-0006G6-QP for guile-user@m.gmane-mx.org; Wed, 18 Oct 2023 20:50:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtBbt-0003sj-Ct; Wed, 18 Oct 2023 14:49:37 -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 ) id 1qtBbr-0003sS-2X for guile-user@gnu.org; Wed, 18 Oct 2023 14:49:35 -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 ) id 1qtBbo-0006nE-Lv for guile-user@gnu.org; Wed, 18 Oct 2023 14:49:34 -0400 Original-Received: by wolfsden.cz (Postfix, from userid 104) id BEF8226F722; Wed, 18 Oct 2023 18:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1697654966; bh=HcS+b4k44prL/zj+W2a8jkHlqOmOOPOWCqzOaLksaSo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=vgY646z6Zsr5JAj/9vqmYMy059x5uekEQ5ObNw1DdHs4V3riKhreKJBUrqRMrhPkC TY19QMafRY5kLMREJ8rEME67S8lVP24TXCIYlMuF6mHZu7WUNScQlmQqR/U+kb+paE +peYG3yzH0NC8gLPQDG12fQu1XesmhM1gEwE+RDMmvwW4ef0PBvCyx4ear/i4m/0zC eNVkfvUiCo6QSiW0fPrNd5RuqgXTLAD5Dd1zv1sgaO1XVDBbg2t1rXs6Nz88PIzS+U o1OoUeNfY1tPE8u7uHPxFGjN3Mops1SG5fu2WDgvvGNM7djX7b8y68q3vpsdWuSA8N cuCHQYpIJiFJ/sqq/Ldwo8cL9lRGKTJe8h36hqDAoqf1b1yfcuYwS7OEOsGQQvT+53 Fe5iiJhlFwWJyMCfiJZiSUbNtMFI0k53tl6v2KY3qbZSVrsfAWsuxoHsyes4ImRAAB qch7/1gBIVvtGznS2ukCmACWVi/Gf+YmDVbFrdlxQbcXA7d81PJUIDlI71Xv8mk7lR uLoRFzAGilONIR9HeKDHDlrJnuI3WJruD/dZ9hMxKmJ4jWaC9x8/LBx2GQyKioLi74 3L4xKh4tgXABUp/DBTM959CWtdjCP67Zu2tCS7BQRXxyxXQ7gGLBv1/xWBfVQvFc/G fArEVGI2gN4cBSkJmSt5YOBg= Original-Received: from localhost (unknown [193.32.127.157]) by wolfsden.cz (Postfix) with ESMTPSA id AE25226D27D; Wed, 18 Oct 2023 18:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1697654965; bh=HcS+b4k44prL/zj+W2a8jkHlqOmOOPOWCqzOaLksaSo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=vK4MhP7JRHbwdTx8zsgg+Nh8ukpk6BqbPCtoAD77BfY0JOA0rtZqSAa3Ax2gWGKYk r7lVXBz/sPIFgF5wEywatr6UYq7/cx9jMycEQXnl7gTPsNNj3J89vaWX8SNVYsf7ya ctP37sw4v9bMkHmLIgupqW+7MF0LwqefcEIsjD/jhVb0GOaSozqCENfn7d2LwkdrrH UaL9YaphtREbWU0wLoSvNeungusGIl63ED5BSGi/Ogwdr/iuLCZYq8Hepkx/yNR1fN 4StjjeVNtXk/C0RoCjReDB7NOijbYyVINXZEYCwCUNNcrmNCWFl6cOY2r8aE8HevbH /FPn/uEIzJ1JEcR2EBi2MzHz4ALJJD3qKi8Pzgaqh8TSrbs1MsblP5/NOlVTxA2qw2 X4y9qeQC8f9Aqw2ZEd2R7IBmppt8jw7Qf9Xp2AdEh0xYd1i3CBNdshh0hvTJboXGYu tJSlJAhuuvkfuI1BTbH77bjOiGygaF6QibNgGblmN79+CYDV40j5l2/qf6Qcc8lnmV uX9nS6buZXM1t3PzT2AmineTWbVa6F/g05Igy5rcjoBeyU/9EE7wDc9FeNLIbnhZOO my98FGkG7isz6m8qXi8/MRCdAGqNXC3zjSXyEA9kRiJZSJRPtAt2Tx0zOZtWXmF9Rg Q7xR01rgiANm22SyTlKsn7LM= Original-Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id a6a2125f; Wed, 18 Oct 2023 18:49:25 +0000 (UTC) Mail-Followup-To: Olivier Dion , Marc Chantreux , CToID , guile-user@gnu.org Content-Disposition: inline In-Reply-To: <87a5sg9ha4.fsf@laura> Received-SPF: none client-ip=37.205.8.62; envelope-from=ws@wolfsnet.cz; helo=wolfsden.cz X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001 autolearn=no 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:19282 Archived-At: --zAFm4jMZevXvTRBh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2023-10-18 09:44:35 -0400, Olivier Dion wrote: > On Wed, 18 Oct 2023, Marc Chantreux wrote: > > hi, > > > > I don't get the difference between this > > > >> 2. The program is written in Guile. It can access C routines with the > >> foreign function interface (FFI). =E2=80=A6 > > > > and this: > > > >> There is a third way that I personally use. I use the FFI to make > >> bindings of the public interface of a low-level C library I work on. >=20 > In my case, the library is written in C and I make bindings for it. So > this is closer to the first model, like Gnu Makefile. But it is not > meant for users scripting, but developers scripting. >=20 > > i choose the strategy 2 using the shebang described here > > > > https://www.gnu.org/software/guile/manual/html_node/Running-Guile-Scrip= ts.html > > > > the only annoyance I have occurs the first time a user runs the script: > > he gets this message > > > > ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 > > ;;; or pass the --no-auto-compile argument to disable. > > > > would be nice to have a flag to handle it the other way > > > > #!/usr/local/bin/guile -s --silent-auto-compilation > > !# > > > > Did I miss something? >=20 > I always have this shebang now in my Guile scripts (might not work on > fedora because the guile binary is guile3): >=20 > #!/bin/sh > #-*-Scheme-*- > exec guile --no-auto-compile -e main -s "$0" "$@" > !# The problem with --no-auto-compile is that without the compilation the error messages (and stack traces) are... less than great. But other than that I am using the same shebang. >=20 > --=20 > Olivier Dion > W. --=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --zAFm4jMZevXvTRBh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmUwKLQACgkQL7/ufbZ/ wakEEw//Y05dvNhJMja40Z/ElSAVu6fwl8oyTlQpaqZ3VD25CNNJMcfIrE//5AOk A1e9waOii22pXaettkqauvmqa+6qJ2WVRZo8vHYTh8fj/BSkd7ifqeRCmGhniBHU VhYIofpyMSKRzNlFmIykcIJkx7//Q9A4T6cvQfidapD8dCufFM3S3opsKDAbHTOX rVDiYFUe6ElRfWdYiT0sOg3dRlAXbKYIaYveu9MRTniZfiEBA5tgDlYaRJ4g30l6 rQUjSeMS/JrAz5BhMF8Zq/Yv8vxfDPmQBtCi/ZC2qcCl7bgGd4Vqxosx8OwBdlo6 OFJnjx5nWej2xYtrI80Mqfre9orKzKQWapxz+10x/wR66KKRSYq3T77Urc43b1sB atxPI2aCgtU18pWOK3w3WD3VOgo0cSbZoP4nLHtYYLpM8jOMiDLu5BDjcAlBdTAX Y30zqmPFSuhk7muUnym4znntcIa8hMqbafVVnRF7m+UehTiRMr1VJefFXrNO5lx8 KiMkjkF9HC2uCWEiB7BQV6tc8f8s5Lu2e+d4KcvAlSWWC0QztCd1vLb020Pdx6BN P9geA22TVVMek3B7w58HK3TTSy1AjD2YNvC7PI6r6A46IcdAVwzKYSm8kSLtbS1Q Hr0EKDFXo390nY5a8f9wMG3VxM4Ye78K3ku7IzsiiA/UxoNFUtw= =r3rt -----END PGP SIGNATURE----- --zAFm4jMZevXvTRBh--