From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Thompson, David" Newsgroups: gmane.lisp.guile.user Subject: Re: Is it possible to write program only in Guile? Date: Wed, 18 Oct 2023 12:11:15 -0400 Message-ID: References: <4b9b8001-ac2d-4f44-ab84-f4d3cb678926@yandex.com> 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="557"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Greg Troxel , Guile User To: CToID Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Oct 18 18:12:28 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 1qt99n-000APF-Ay for guile-user@m.gmane-mx.org; Wed, 18 Oct 2023 18:12:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt98z-0005k5-JO; Wed, 18 Oct 2023 12:11:39 -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 1qt98t-0005QI-P7 for guile-user@gnu.org; Wed, 18 Oct 2023 12:11:31 -0400 Original-Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qt98r-00025A-F1 for guile-user@gnu.org; Wed, 18 Oct 2023 12:11:31 -0400 Original-Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-41983b83e53so47109551cf.2 for ; Wed, 18 Oct 2023 09:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20230601.gappssmtp.com; s=20230601; t=1697645488; x=1698250288; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Xb0oCpAmYi+s6lSuNvqJk7wVeqW4Y35Not+RMKOSs9g=; b=tDRvMtTVJeJL7XG8Iq++W9iLOM638qT6uKN7JdNL76t/HrvDuXbmzuG641iXm3alGv jD2utbIwNZkcTpYkmnK2qgR4xzT1EwihLnSe56SvrMRSilskNG4ScXqbYpUraLgS4FK+ ia5Zepn6Z/s6Fd/IvpgKQu8CjVROuUHkhor6ZUu2ZkNKtN5MjM/UGF8ffHtUKesl76Kn DvF2RJL9U+BlOLiiC1ka3OaKlCopxOXqAtn4hw+GxzpvPNFChG6L3oIWr1yURDNezwwk 2Jlbuncx34ZvCF3P+GE8jR78zgVokB7+INx92lP1boc329YM4rQxfjGMaSoqN5hGemIu e3Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697645488; x=1698250288; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xb0oCpAmYi+s6lSuNvqJk7wVeqW4Y35Not+RMKOSs9g=; b=YkbormkGJZMzxGqLNbtd3RADQFJPHuwVzfU91OrQ9MJb+OuNlEB3yOzcfWIxEOHSdy H6gPhY2G3A2lIKtRDX9igggTeoD7r5BczMTZIXIqSQffrXVpsAoinn3rRbhvJC24erzf 59O/g8tdZuLErZ3w6pGbbqSlr5M7+4pezUXnebb6O4ex0ewIg1zKaOVo9OQk1rmCY+pu c3P8mLcw/nwe3CIKiNC/Kl4ZYDRufr4BH6/M4Up0GJcCQhT9qeGy7n+EFhgL8/cV7p+R JQDoOva+i9JUh2DhZf/mr8idL0LCuMWULZ5Shcs6+9IeIU8Snk2/VpFiQbd1zrzDe21H uL8A== X-Gm-Message-State: AOJu0YzOtqxHhuoFrKjAgSxdQoD2YHPbrufvOSZePdt5XC6WN557x+t8 KWmDL+WXsUm5Sys3sB+Byc6SMjBJOx/kZFNedRAyrx1PJpo2STkia0w= X-Google-Smtp-Source: AGHT+IGilXQrW4YS2JaKqaWhowk+c6V4Zm07PGusUA0iTPxxkjBXZ4QBt8h1MQughrHCSMJ39b1RQ3VNWjIgmCw8sp0= X-Received: by 2002:a05:622a:174a:b0:418:178d:a10f with SMTP id l10-20020a05622a174a00b00418178da10fmr6515876qtk.29.1697645487881; Wed, 18 Oct 2023 09:11:27 -0700 (PDT) In-Reply-To: <4b9b8001-ac2d-4f44-ab84-f4d3cb678926@yandex.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=dthompson2@worcester.edu; helo=mail-qt1-x832.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19281 Archived-At: I'm assuming that for whatever you're doing, traditional OS distribution isn't what you want. It's possible to bundle Guile + all necessary shared libraries + all necessary Guile modules from the standard library + a wrapper script to launch your application. Up to you to figure out how you build such a bundle. There be dragons, but it's doable. I've had decent success doing so for Lisp Game Jam submissions. For example: https://davexunit.itch.io/super-bloom Guix can also be used to create redistributable bundles. The resulting bundles are much larger than something hand-crafted but tend to work well. This was done for another Lisp Game Jam submission: https://cwebber.itch.io/fantasary If you don't want to do that, just ask users to install Guile 3 or something first. Lots of software for VM platforms has this expectation. It will be a long wait, but native compiled standalone executables is something Guile should get... eventually. We're going to have standalone WebAssembly modules first via Guile Hoot, which should hopefully solve a lot of the same problems that need to be solved for native compilation. And to answer your original question: Yes, it's very possible to write programs only in Guile. For example, Haunt, my static site generator, is written in pure Guile. Guix is almost entirely written in Guile. I will use the FFI to call C libraries from Guile, but never the other way around. It used to be that Guile was for adding a "scripting language" to C programs but it's a legacy use case, IMO. Write your programs in Scheme and reach out to C libraries only when necessary. Extend, rather than embed. Hope this helps. Best of luck, - Dave On Wed, Oct 18, 2023 at 11:07=E2=80=AFAM CToID wrote: > > Greg Troxel said: > > The same way you distribute Java programs, python programs and perl > > programs. You ask they they install the langauge environment as part o= f > > your instructions > > > Is it possible to also ship guile itself with the application? > >