all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* some code
@ 2016-06-06 15:05 Catonano
  2016-06-06 16:23 ` Thompson, David
  0 siblings, 1 reply; 3+ messages in thread
From: Catonano @ 2016-06-06 15:05 UTC (permalink / raw)
  To: help-guix

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

There's a piece of code (in the Emacs build system) I don't understand

In "guix/build-system/emacs.scm" on line 97 there's a call to a function
called "emacs-build"

Such call is inside the body of "emacs-build" itself. As it is common in
scheme, a function is calling itself (recursively)

Now, I read the SICP and the discussion about functions implementing
processes that can be iterative or recursive (in both cases the function
calls itself)

But I don't understand what is going on here

Why is "emacs-build" calling itself ? Is this an iterative or recursive
process ?

And what value is this calculating ?

I see that the result of this calculation ("  (define builder..."  ) is
passed as an argument to "build-expression->derivation" a few lines below

But I don't get what build-expression->derivation is receiving really.

Also what's with that "define*" ? Is there a manual page describing it ? I
couldn't find it

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: some code
  2016-06-06 15:05 some code Catonano
@ 2016-06-06 16:23 ` Thompson, David
  2016-06-07 17:56   ` Catonano
  0 siblings, 1 reply; 3+ messages in thread
From: Thompson, David @ 2016-06-06 16:23 UTC (permalink / raw)
  To: Catonano; +Cc: help-guix

On Mon, Jun 6, 2016 at 11:05 AM, Catonano <catonano@gmail.com> wrote:
> There's a piece of code (in the Emacs build system) I don't understand
>
> In "guix/build-system/emacs.scm" on line 97 there's a call to a function
> called "emacs-build"

That's not a procedure call, actually, because the entire form is
quoted starting on line 95.  This code is generating a Guile script
that will be used by guix-daemon to build an Emacs package.  The
"emacs-build" referenced within is actually the procedure found in
(guix build emacs-build-system).

> Also what's with that "define*" ? Is there a manual page describing it ? I
> couldn't find it

See section 6.9.4.1 of the Guile manual:

    http://www.gnu.org/software/guile/manual/html_node/lambda_002a-and-define_002a.html#lambda_002a-and-define_002a

Hope this helps,

- Dave

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: some code
  2016-06-06 16:23 ` Thompson, David
@ 2016-06-07 17:56   ` Catonano
  0 siblings, 0 replies; 3+ messages in thread
From: Catonano @ 2016-06-07 17:56 UTC (permalink / raw)
  To: Thompson, David; +Cc: help-guix

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

2016-06-06 18:23 GMT+02:00 Thompson, David <dthompson2@worcester.edu>:

> On Mon, Jun 6, 2016 at 11:05 AM, Catonano <catonano@gmail.com> wrote:
> > There's a piece of code (in the Emacs build system) I don't understand
> >
> > In "guix/build-system/emacs.scm" on line 97 there's a call to a function
> > called "emacs-build"
>
> That's not a procedure call, actually, because the entire form is
> quoted starting on line 95.


Ouch ! My bad !


> This code is generating a Guile script
> that will be used by guix-daemon to build an Emacs package.  The
> "emacs-build" referenced within is actually the procedure found in
> (guix build emacs-build-system).
>

Ah !


>
> > Also what's with that "define*" ? Is there a manual page describing it ?
> I
> > couldn't find it
>
> See section 6.9.4.1 of the Guile manual:
>
>
> http://www.gnu.org/software/guile/manual/html_node/lambda_002a-and-define_002a.html#lambda_002a-and-define_002a
>
> Hope this helps,
>
> - Dave
>

Thanks

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-07 17:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-06 15:05 some code Catonano
2016-06-06 16:23 ` Thompson, David
2016-06-07 17:56   ` Catonano

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.