From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Olivier Dion Newsgroups: gmane.lisp.guile.user Subject: Re: Is it possible to write program only in Guile? Date: Wed, 18 Oct 2023 09:44:35 -0400 Message-ID: <87a5sg9ha4.fsf@laura> References: <87fs289iu6.fsf@laura> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2074"; mail-complaints-to="usenet@ciao.gmane.io" Cc: CToID , guile-user@gnu.org To: Marc Chantreux Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Oct 18 15:45:41 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 1qt6rl-0000Ja-Cu for guile-user@m.gmane-mx.org; Wed, 18 Oct 2023 15:45:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt6qq-0003E4-LJ; Wed, 18 Oct 2023 09:44:44 -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 1qt6qp-0003DQ-Gz for guile-user@gnu.org; Wed, 18 Oct 2023 09:44:43 -0400 Original-Received: from smtp.polymtl.ca ([132.207.4.11]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt6qn-0007Fc-SL for guile-user@gnu.org; Wed, 18 Oct 2023 09:44:43 -0400 Original-Received: from localhost ([209.209.32.82]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 39IDiZVX004173; Wed, 18 Oct 2023 09:44:39 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 39IDiZVX004173 In-Reply-To: X-Poly-FromMTA: ([209.209.32.82]) at Wed, 18 Oct 2023 13:44:35 +0000 Received-SPF: none client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=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:19277 Archived-At: 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. 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. > i choose the strategy 2 using the shebang described here > > https://www.gnu.org/software/guile/manual/html_node/Running-Guile-Scripts= .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? I always have this shebang now in my Guile scripts (might not work on fedora because the guile binary is guile3): #!/bin/sh #-*-Scheme-*- exec guile --no-auto-compile -e main -s "$0" "$@" !# --=20 Olivier Dion