From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: Running Compiled Guile Objects Date: Sat, 14 Dec 2024 11:43:18 +0900 Message-ID: References: <87frmroykg.fsf@free-comp-shop.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1701"; mail-complaints-to="usenet@ciao.gmane.io" Cc: hakancandar@protonmail.com, guile-user@gnu.org To: Keith Wright Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Dec 14 03:44:16 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 1tMI8d-0000HO-PK for guile-user@m.gmane-mx.org; Sat, 14 Dec 2024 03:44:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMI81-0001ld-43; Fri, 13 Dec 2024 21:43:37 -0500 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 1tMI7z-0001lQ-EW for guile-user@gnu.org; Fri, 13 Dec 2024 21:43:35 -0500 Original-Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMI7x-0002z0-IN for guile-user@gnu.org; Fri, 13 Dec 2024 21:43:35 -0500 Original-Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-21644aca3a0so27938085ad.3 for ; Fri, 13 Dec 2024 18:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734144211; x=1734749011; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rnj0G+Q43K06yQznohP2/hHpFUv6dBrG18Hnovmt+Yk=; b=iEbuAcpTDLzL8kpkJKfvHp7xJPQkPczkej23CabUmXIxX1qinU8J8EYlUivlwxEoez IbSIXvGMA63ixwBh5ld6lnWazn2bLXH0NUgFVF00j6Rfau8jFYYm4XGuunMFcKqca6Fy +XTrXLDTBNMgbrHou2BxkJ8jyA+kiJl7pMdzzwNPTmmNL+/Pa5EnLbqP8HzJ/OG7H5EO 7zxsQRdb8/q6003UhK1XvGsnnXmMycbl8c/FLLJN6G2VdrXX8Hf+UK1R9QPkDy+zwsBO TXnkot9CWVryOVkB64V6E5ZLbb+QghYAhEZTcQBZrIf2vt5vjXxzgdKZCzKFvV//38Or oVcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734144211; x=1734749011; h=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=rnj0G+Q43K06yQznohP2/hHpFUv6dBrG18Hnovmt+Yk=; b=Ql8nfW1/OVCnMgrE4FXD78R18ZsT05APPiXO0rEoG4z+aBhgu5Zn+8ZImduOHNmTaR BRs374/YcDOl7LwuokZEKp/FVtEppcSGRtHgxp5NcRm2+1SDIK2oWJdt60vpNA37Hqhv wwI+3dkq0a9ZgvahtCcFbfW9zggDd22+2Zroxvfec1vkel0Mlk78vBUQLqFGa8V6QNZn FxdB+kK7VljFIDgeXa08uOIgdbKAASNnshDeUmBrsMfbZ6h2tuwAqHuOuBXfvyK/YU6C rCeOLxXyQQVzZnb53S2qoPPzR7JScNz0zB47SXqsgzqMBrKuOBh2teDPtVGSEtTBxwTd Wvrg== X-Forwarded-Encrypted: i=1; AJvYcCXD7lKD3pdoCRtTHgR2nI/uO53Pvxyjc9sHen8Y4RhutOqsOIl8Pxv/x6mUI23C1bO1pOU9WaQ04zGA@gnu.org X-Gm-Message-State: AOJu0YywgE92vIdY2lNH4MnWDmO+3OoNY/XLfV01lyOhdgTPdXD3xeM0 jC0NWd0G7lBmRDvpJD1d6aeBhBPbxNqjpzDT5qnFiXATZ0O/QU70cPGcAP9WgS7Xa+Dp88QIMR7 HSK9wAoPvMWzL26IdZrpIBbwCVV8= X-Gm-Gg: ASbGncupQgyj020tVl5gIPwTeEVBSjHYV3SFWRaAjXZ8DEJneA/j5JMxuC4jzHoWBzn V7oLO2Y1FBAqeaQCyLPxI35wQTbBfMpEOs3/DWg== X-Google-Smtp-Source: AGHT+IEu8G0dtCqQ6/pKy4+V1WIBiYhriwC4wIoqGZRuoK1nPw9MWIMZG9YnJF+/+0ooeXnai23w1GIEwSxi3JmDyLE= X-Received: by 2002:a17:90b:3c8a:b0:2ea:a25d:3baa with SMTP id 98e67ed59e1d1-2f28fb52241mr7402410a91.5.1734144211476; Fri, 13 Dec 2024 18:43:31 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=nalaginrut@gmail.com; helo=mail-pl1-x632.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, HTML_MESSAGE=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-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:19975 Archived-At: If you just want to run the .go file, this is not a good way to go, since it's binary format inside ELF can be changed in different Guile version. And Guile compiler will handle these issues for you. So best practice is to always run from a script and let Guile do the rest for you. But if you really want to load .go without source code for some reasons, you may do it in the REPL: (load-compiled "example.scm.go") Best regards. On Sat, Dec 14, 2024, 11:33 Nala Ginrut wrote: > Hi Keith! > AOT stands for "Ahead-of-Time," and in this context, it refers to the > process of compiling source code directly into native machine code, > allowing the program to be executed as a regular binary file without > requiring a runtime interpreter. > > @Hakan > The current .go file will be generated and loaded automatically, so one > don't have to load it explicitly. > > To run a Guile source code, here's the document: > > https://www.gnu.org/software/guile/manual/html_node/Running-Guile-Scripts.html > > Basically, you run it as script, Guile will compile it to .go and load it. > > Best regards. > > On Sat, Dec 14, 2024, 10:14 Keith Wright wrote: > >> Nala Ginrut writes: >> >> > The current Guile is not AOT yet. >> >> Google says: Attack On Titan. >> >> > Although the object file is ELF, it's just bytecode wrapped ELF >> > header. So you can't run it as a regular executable file. >> >> I don't think that was the question...Hakan wants to call the >> Guile executable and pass it a *.go file. >> >> > On Sat, Dec 14, 2024, 07:35 Hakan Candar via General Guile related >> > discussions wrote: >> > >> >> Dear Guile Users, >> >> >> >> I am unable to run guile objects directly from the command line. I >> >> >> inspected the manual thoroughly, however I did not see any mention of >> >> my desired action. Is it possible to execute guile objects directly, >> >> or are they reserved for internal caching mechanism only? >> >> >> >> I tried the following commands with no luck: >> >> guile3.0 example.scm.go >> >> guile3.0 --language=bytecode example.scm.go >> >> >> >> Your help and interest is much appreciated. >> >> >> >> Thanks, >> >> Hakan >> >