unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Nala Ginrut <nalaginrut@gmail.com>
To: Keith Wright <kwright@keithdiane.us>
Cc: hakancandar@protonmail.com, guile-user@gnu.org
Subject: Re: Running Compiled Guile Objects
Date: Sat, 14 Dec 2024 11:43:18 +0900	[thread overview]
Message-ID: <CAPjoZodnFL-gjtJ02g8mLGMhgUo_YJ2hJM9KwQFN5hxMOM=uCg@mail.gmail.com> (raw)
In-Reply-To: <CAPjoZoc92PiQxwY=S_7-Y18WenfXTT4A2XnNm111FawWN7xYFw@mail.gmail.com>

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 <nalaginrut@gmail.com> 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 <kwright@keithdiane.us> wrote:
>
>> Nala Ginrut <nalaginrut@gmail.com> 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 <guile-user@gnu.org> 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
>>
>


  reply	other threads:[~2024-12-14  2:43 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-13 20:34 Running Compiled Guile Objects Hakan Candar via General Guile related discussions
2024-12-14  0:15 ` Nala Ginrut
2024-12-14  1:14   ` Keith Wright
2024-12-14  2:33     ` Nala Ginrut
2024-12-14  2:43       ` Nala Ginrut [this message]
2024-12-14 13:01         ` Maxime Devos via General Guile related discussions
2024-12-14 14:37           ` Nala Ginrut
2024-12-14 14:53             ` Maxime Devos via General Guile related discussions
2024-12-14 15:20               ` Nala Ginrut
2024-12-14 16:10                 ` Maxime Devos via General Guile related discussions
2024-12-14 16:20                   ` Nala Ginrut
2024-12-14 16:26                     ` Nala Ginrut
2024-12-14 16:31                       ` Nala Ginrut
2024-12-14 16:50                       ` Maxime Devos via General Guile related discussions
2024-12-14 17:03                         ` Nala Ginrut
2024-12-14 17:48                           ` Maxime Devos via General Guile related discussions
2024-12-14 18:17                             ` Nala Ginrut
     [not found]   ` <CAPjoZofH2QuH_ekSk2L=-sUtVTAfEBpsJS0HkXwA_J9y+Wmg0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2024-12-14 17:11     ` Basile Starynkevitch
2024-12-14 17:21       ` AOT compiler (was: Running Compiled Guile Objects) Nala Ginrut
     [not found]         ` <49d9827f4455076cc066add3e51f0e882b59e9b7.camel@starynkevitch.net>
     [not found]           ` <CAPjoZoeu++mC+Syd35LjvLJVu6FEcZ=tb5jWdYgS0fZP-OHQiQ@mail.gmail.com>
     [not found]             ` <CAPjoZoeu++mC+Syd35LjvLJVu6FEcZ=tb5jWdYgS0fZP-OHQiQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2024-12-15  1:59               ` Nala Ginrut
     [not found]                 ` <CAPjoZodoBRcw28E5Zjnxb-f_aWG49LjOEDjKQptEH5RnxXsdvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2024-12-15  2:08                   ` Nala Ginrut
     [not found]                     ` <CAPjoZof2pmNCQH1EQvJjFmUf+Fwt+qMd8y4daxkZMbCY9Bez+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2024-12-15  7:39                       ` Eli Zaretskii
     [not found]                         ` <86msgxs8d0.fsf-mXXj517/zsQ@public.gmane.org>
2024-12-15  8:07                           ` Nala Ginrut
     [not found]                             ` <CAPjoZoeBSvJrCDkDXgJX27Hr3Y3yAC4-mmMzKsuPnQvGwEjatQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2024-12-15 10:41                               ` Eli Zaretskii
     [not found]                                 ` <86ed29rzy1.fsf-mXXj517/zsQ@public.gmane.org>
2024-12-15 10:49                                   ` Nala Ginrut
     [not found]                                     ` <CAPjoZoc-8THB4BAPUFR2OayrvnSKhFtyOLWR64-jOfYxaJme2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2024-12-15 10:58                                       ` tomas-2s+jgvIlYZ2ELgA04lAiVw
2024-12-15 11:01                                       ` Eli Zaretskii
     [not found]                                         ` <86bjxdryzg.fsf-mXXj517/zsQ@public.gmane.org>
2024-12-15 11:09                                           ` Nala Ginrut
     [not found]                                             ` <CAPjoZodWGB+QMYABLr5cM_jN2Lpk3Ex-47snPnLBa3-TMZxQYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2024-12-15 11:32                                               ` Eli Zaretskii
     [not found]       ` <769073d434c2ed5fb7937c85da240aa5df4d854a.camel-VdE74OAlGqnvXjIo7pOF+l6hYfS7NtTn@public.gmane.org>
2024-12-14 23:02         ` Running Compiled Guile Objects David Malcolm
     [not found]           ` <fd04850b1d1b2b5e0c909b5b05d1d6a29a5cbd10.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2024-12-14 23:43             ` Maxime Devos
     [not found]               ` <20241215004310.onj82D0091dDhme01nj9u5-Pw8LEBfqDLYI1J5xXzd7/dsHW6RRjAQv@public.gmane.org>
2024-12-15  1:43                 ` David Malcolm
2024-12-14 19:21   ` Dr. Arne Babenhauserheide
2024-12-14 20:12 ` Matt Wette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPjoZodnFL-gjtJ02g8mLGMhgUo_YJ2hJM9KwQFN5hxMOM=uCg@mail.gmail.com' \
    --to=nalaginrut@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=hakancandar@protonmail.com \
    --cc=kwright@keithdiane.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).