unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Attila Lendvai <attila@lendvai.name>, Andrew Tropin <andrew@trop.in>
Cc: "guile-devel@gnu.org" <guile-devel@gnu.org>
Subject: RE: Define works different when Compile and Eval
Date: Fri, 21 Jun 2024 16:40:08 +0200	[thread overview]
Message-ID: <20240621164008.eEg72C00D1xd29F01Eg7DF@baptiste.telenet-ops.be> (raw)
In-Reply-To: <JWGBfCtR_R9VIAQomC7o9HI_pROABKhgc48qXZkTT_gJZcVmx9NSuJgNv-fW1gtnEp1K-ofrMeWwyjl0daeOwhxRdC7FQqahC1AeXB0t8LA=@lendvai.name>

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

>compile does not evaluate (aka load) the definitions, it only compiles them.

Usually, sure, but in the code ‘#:to ‘value” was set. From the manual:
>As discussed before (see Object File Format), bytecode is in ELF format, ready to be serialized to disk. But when compiling Scheme at run time, you want a Scheme value: for example, a compiled procedure. For this reason, so as not to break the abstraction, Guile defines a fake language at the bottom of the tower:
> * Value
Now, as example it compiled a lambda expression into a procedure, but it can be done for Scheme expressions that don’t evaluate to procedures as well. The definition ‘(define a whatever)’ strictly speaking isn’t an expression, but it appears the compilation stack doesn’t care.

>alternatively, you yourself can explicitly call the lambda returned by compile.

In this particular case, no lambdas are returned.

Best regards,
Maxime Devos.

[-- Attachment #2: Type: text/html, Size: 5478 bytes --]

      parent reply	other threads:[~2024-06-21 14:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19  9:04 Define works different when Compile and Eval Andrew Tropin
2024-06-19  9:53 ` Attila Lendvai
2024-06-21 12:33   ` Andrew Tropin
2024-06-22 12:57     ` Attila Lendvai
2024-06-22 16:45       ` Maxime Devos
2024-06-21 14:40   ` Maxime Devos [this message]

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=20240621164008.eEg72C00D1xd29F01Eg7DF@baptiste.telenet-ops.be \
    --to=maximedevos@telenet.be \
    --cc=andrew@trop.in \
    --cc=attila@lendvai.name \
    --cc=guile-devel@gnu.org \
    /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).