unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
@ 2021-03-13 22:42 Michael Schierl
  2021-03-14 13:57 ` [bootstrappable] " Jan Nieuwenhuizen
  2021-03-15 17:09 ` Ludovic Courtès
  0 siblings, 2 replies; 12+ messages in thread
From: Michael Schierl @ 2021-03-13 22:42 UTC (permalink / raw)
  To: guile-user, guix-devel, bootstrappable


Hello,


Jan Nieuwenhuizen wrote to guile-user@gnu.org[1] on 07 Jul 2017:
> Mark H Weaver writes:
>
>>> Does this mean Guile is not bootstrappable from source only?
>>
>> That's correct.  psyntax-pp.scm is not source code, and it is needed to
>> bootstrap Guile.
>
> I'm facing the same problem with Mes.  I have an implemenation of
> syntax-rules that is just about 200 lines of define-macro source code,
> but not syntax case.

>> Having said this, I agree that it would be better if psyntax.scm were
>> written in such a way that it could be bootstrapped without the use of
>> itself.  Maybe some day we'll rewrite it to make it so.
>
> That could be essential to our full source bootstrapping efforts so I'm
> very much interested!


For the record, I have written a psyntax implementation that can be used
by Guile (3.0.2) and does not require an expanded version of itself. It
is not ideal (not fully hygienic and does not support with-ellipsis),
but it works well enough to bootstrap a slightly patched version of
psyntax.scm, which then can be used to bootstrap "the real thing" and
then regenerate psyntax-pp.scm (resulting in a bit-for-bit identical
version if you run the bootstrap on 64-bit Linux).

The project is at
<https://github.com/schierlm/guile-psyntax-bootstrapping/>.

It may still contain some unnecessary code, and the patch for the
patched vesion is definitely not minimal, but for now I'm glad that it
works.

I may improve it later. Contributions are welcome as well.


Regards,


Michael


[1]: https://mail.gnu.org/archive/html/guile-user/2017-07/msg00011.html



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

* Re: [bootstrappable] Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2021-03-13 22:42 Can Guile be bootstrapped from source without psyntax-pp.scm? Michael Schierl
@ 2021-03-14 13:57 ` Jan Nieuwenhuizen
  2021-03-14 14:18   ` Michael Schierl
  2021-03-15 17:09 ` Ludovic Courtès
  1 sibling, 1 reply; 12+ messages in thread
From: Jan Nieuwenhuizen @ 2021-03-14 13:57 UTC (permalink / raw)
  To: Michael Schierl; +Cc: guix-devel, guile-user, bootstrappable

Michael Schierl writes:

Hello,

> Jan Nieuwenhuizen wrote to guile-user@gnu.org[1] on 07 Jul 2017:
>> Mark H Weaver writes:
>>
>>>> Does this mean Guile is not bootstrappable from source only?
>>>
>>> That's correct.  psyntax-pp.scm is not source code, and it is needed to
>>> bootstrap Guile.
>>
>> I'm facing the same problem with Mes.  I have an implemenation of
>> syntax-rules that is just about 200 lines of define-macro source code,
>> but not syntax case.
>
>>> Having said this, I agree that it would be better if psyntax.scm were
>>> written in such a way that it could be bootstrapped without the use of
>>> itself.  Maybe some day we'll rewrite it to make it so.
>>
>> That could be essential to our full source bootstrapping efforts so I'm
>> very much interested!
>
> For the record, I have written a psyntax implementation that can be used
> by Guile (3.0.2) and does not require an expanded version of itself.

Oh, that's amazing!  I see that you are using make-syntax-transformer
(and others) which GNU Mes does not support yet; it only has
define-macro.  This may be a good reason/opportunity to work towards
better Guile support in Mes.

Greetings,
Janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com



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

* Re: [bootstrappable] Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2021-03-14 13:57 ` [bootstrappable] " Jan Nieuwenhuizen
@ 2021-03-14 14:18   ` Michael Schierl
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Schierl @ 2021-03-14 14:18 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel, guile-user, bootstrappable


Hello Jan,


Am 14.03.2021 um 14:57 schrieb Jan Nieuwenhuizen:
> Michael Schierl writes:
>
> Hello,
>
>> For the record, I have written a psyntax implementation that can be used
>> by Guile (3.0.2) and does not require an expanded version of itself.
>
> Oh, that's amazing!  I see that you are using make-syntax-transformer
> (and others) which GNU Mes does not support yet; it only has
> define-macro.  This may be a good reason/opportunity to work towards
> better Guile support in Mes.

In fact, I use make-syntax-transformer only because Guile does not have
native define-macro support (it uses psyntax to emulate it).

When there is native define-macro support, you can replace step1.scm by

(define s1*-define-macro define-macro)

(define-macro (s1*-expand-with-side-effects seff1 body seff2)
   (list '(lambda (a b . c) (apply values b))
         seff1
         (list 'call-with-values (list 'lambda '() body)
               '(lambda rest rest))
         seff2))

which will make the bootstrap even shorter.

Probably you should validate whether the evaluation order is right so
that s1*-expand-with-side-effects will really expand the side effect 1
before the body and side effect 2 after the body (there is an example in
psyntax-bootstrapping.scm line 76 which should display 1 2 3 and return 42).

You can skip step 2 as well, as you already have a quasiquote expander
that does not rely on psyntex.

The further steps up to step 7 will not use make-syntax-transformer, it
will come back in step 8 (patched psyntax.scm). But probably for step 8
you would have to patch your own psyntax.scm instead of patching guile's
version anyway.


Regards,


Michael



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

* Re: [bootstrappable] Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2021-03-13 22:42 Can Guile be bootstrapped from source without psyntax-pp.scm? Michael Schierl
  2021-03-14 13:57 ` [bootstrappable] " Jan Nieuwenhuizen
@ 2021-03-15 17:09 ` Ludovic Courtès
  2021-03-15 19:50   ` Michael Schierl
  1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Courtès @ 2021-03-15 17:09 UTC (permalink / raw)
  To: Michael Schierl; +Cc: guix-devel, guile-user, bootstrappable

Hi Michael,

Michael Schierl <schierlm@gmx.de> skribis:

> For the record, I have written a psyntax implementation that can be used
> by Guile (3.0.2) and does not require an expanded version of itself. It
> is not ideal (not fully hygienic and does not support with-ellipsis),
> but it works well enough to bootstrap a slightly patched version of
> psyntax.scm, which then can be used to bootstrap "the real thing" and
> then regenerate psyntax-pp.scm (resulting in a bit-for-bit identical
> version if you run the bootstrap on 64-bit Linux).
>
> The project is at
> <https://github.com/schierlm/guile-psyntax-bootstrapping/>.
>
> It may still contain some unnecessary code, and the patch for the
> patched vesion is definitely not minimal, but for now I'm glad that it
> works.

Woow, this is great news!  I think it would be great towards importing
it in Guile proper.

To do that, I think we should first get Andy’s opinion on the approach.
Then you could try to integrate the files into the Guile repo and adjust
the makefile machinery so that it uses this code to generate the initial
psyntax-pp.scm.

There may be additional things to look at, such as performance when
building from scratch.  We could still include the generated
psyntax-pp.scm in the tarball, like we do for some .go files, for those
who want a faster Guile build and are willing to make this tradeoff.

Thanks!

Ludo’.



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

* Re: [bootstrappable] Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2021-03-15 17:09 ` Ludovic Courtès
@ 2021-03-15 19:50   ` Michael Schierl
  2021-03-16  8:59     ` Andy Wingo
  2021-03-17 17:25     ` Ludovic Courtès
  0 siblings, 2 replies; 12+ messages in thread
From: Michael Schierl @ 2021-03-15 19:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, guile-user, bootstrappable


Hello Ludo’,


Am 15.03.2021 um 18:09 schrieb Ludovic Courtès:
> Woow, this is great news!  I think it would be great towards importing
> it in Guile proper.
>
> To do that, I think we should first get Andy’s opinion on the approach.

I don't think upstream is very interested in having psyntax-pp.scm
bootstrappable. In Guile 3.0.3 they broke even the `make
ice-9/psyntax-pp.scm.gen` target, and did not repair it even in Guile
3.0.5, that's why I used 3.0.2 for the bootstrap. But I included a patch
to repair it in 3.0.5 in case you really want to bootstrap that version
(psyntax-pp.scm has not changed there). OTOH, from the git log it seems
like psyntax is currently being overhauled for the next release, so
probably my code would need some updates for the next version.

Also, in the last 15 years I avoided directly contributing to "GNU
projects" (with FSF as copyright holder in the license headers), reasons
below. But if anyone else takes my code and upstreams it, I won't object.

Regardless, even when not part of Guile, I believe this code is very
useful for both the live-bootstrap project and Guix to get their Guile
bootstrapped. And even if nobody ever updates it for 3.0.6+, you can
always bootstrap the later versions from an earlier Guile. And maybe a
variation of it lands in GNU Mes, too.


<rant>

And now for the reasons. It happened first to me 17 years ago, what
others would have called an honor, a private email from RMS himself if I
would consider upstreaming some of my code into GNU Emacs. I answered to
feel free to take it, since it is GPLv3+ (or was it GPLv2+ at that
point? not sure) anyway, and he replied that it is not that easy since
first they need a to have me sign "copyright assignment papers" and
asked for a postal address to send them. I was able to find an old
version of that assignment online and it included some clauses I was
unwilling to sign, so I asked if FSF could send me an electronic version
first before I give them my postal address so they can snail mail me the
dead-tree version, just to avoid work on their side assuming that I may
not be willing to sign that anyway. As FSF was unable/unwilling to do
so, it all stopped, until, years later somebody asked me to contribute
some of my code to ELPA. I guess I can spare you the details, they would
bore you.

I'm not at all against contracts, the http://developercertificate.org/
(which I agreed to before contributing a 2-line bugfix to the Linux
kernel) has recently got some traction, and also I've signed Google's
Contributor License Agreement. However, I would not sign Oracle's
Contributor License Agremment (the last version of it that I checked),
not because of the company but because of its contents.

</rant>


Regards,


Michael



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

* Re: [bootstrappable] Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2021-03-15 19:50   ` Michael Schierl
@ 2021-03-16  8:59     ` Andy Wingo
  2021-03-17 17:25     ` Ludovic Courtès
  1 sibling, 0 replies; 12+ messages in thread
From: Andy Wingo @ 2021-03-16  8:59 UTC (permalink / raw)
  To: Michael Schierl
  Cc: guix-devel, Ludovic Courtès, guile-user, bootstrappable

On Mon 15 Mar 2021 20:50, Michael Schierl <schierlm@gmx.de> writes:

> Am 15.03.2021 um 18:09 schrieb Ludovic Courtès:
>> Woow, this is great news!  I think it would be great towards importing
>> it in Guile proper.
>>
>> To do that, I think we should first get Andy’s opinion on the approach.
>
> I don't think upstream is very interested in having psyntax-pp.scm
> bootstrappable.

Why do you say that? :)

> In Guile 3.0.3 they broke even the `make ice-9/psyntax-pp.scm.gen`
> target, and did not repair it even in Guile 3.0.5, that's why I used
> 3.0.2 for the bootstrap.

Strange -- I used it many times over the past couple months without
problems.  But I see now from your patches what the issue was -- and omg
how embarrassing, I must have a stale canonicalize.go file hanging
around in the tree.  Goes to show how important bootstrapping is!

Andy



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

* Re: [bootstrappable] Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2021-03-15 19:50   ` Michael Schierl
  2021-03-16  8:59     ` Andy Wingo
@ 2021-03-17 17:25     ` Ludovic Courtès
  1 sibling, 0 replies; 12+ messages in thread
From: Ludovic Courtès @ 2021-03-17 17:25 UTC (permalink / raw)
  To: Michael Schierl; +Cc: guix-devel, guile-user, bootstrappable

Hi Michael,

Michael Schierl <schierlm@gmx.de> skribis:

> Am 15.03.2021 um 18:09 schrieb Ludovic Courtès:
>> Woow, this is great news!  I think it would be great towards importing
>> it in Guile proper.
>>
>> To do that, I think we should first get Andy’s opinion on the approach.
>
> I don't think upstream is very interested in having psyntax-pp.scm
> bootstrappable. In Guile 3.0.3 they broke even the `make
> ice-9/psyntax-pp.scm.gen` target, and did not repair it even in Guile
> 3.0.5, that's why I used 3.0.2 for the bootstrap. But I included a patch
> to repair it in 3.0.5 in case you really want to bootstrap that version
> (psyntax-pp.scm has not changed there). OTOH, from the git log it seems
> like psyntax is currently being overhauled for the next release, so
> probably my code would need some updates for the next version.

Andy made it clear that it was a bug.  There’s an interest in providing
a good bootstrapping story for Guile; that’s why there’s an interpreter
written in C, for example.  I’m sure we’d be happy to address psyntax
bootstrapping as well!

> Also, in the last 15 years I avoided directly contributing to "GNU
> projects" (with FSF as copyright holder in the license headers), reasons
> below. But if anyone else takes my code and upstreams it, I won't object.

Sure, we can discuss the details of how to integrate your code.  (Guile
incorporates code not initially written for Guile, such as sxml or
(ice-9 match), and the policy is to not require copyright assignment for
such code.)

> Regardless, even when not part of Guile, I believe this code is very
> useful for both the live-bootstrap project and Guix to get their Guile
> bootstrapped. And even if nobody ever updates it for 3.0.6+, you can
> always bootstrap the later versions from an earlier Guile. And maybe a
> variation of it lands in GNU Mes, too.

Yes, that would be great.  We’ll have to take a closer look, but I’m
under the impression that a fruitful approach for Guile would be to have
it maintained in-tree; that would immediately benefit all distros.

Thanks!

Ludo’.

PS: Not all GNU packages require copyright assignment.  Guix doesn’t,
    for instance, and we’d be happy to get your contributions.  :-)



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

* Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2017-07-07 14:00   ` Alex Vong
@ 2017-07-07 16:40     ` Mark H Weaver
  0 siblings, 0 replies; 12+ messages in thread
From: Mark H Weaver @ 2017-07-07 16:40 UTC (permalink / raw)
  To: Alex Vong; +Cc: guile-user, bootstrappable

Alex Vong <alexvong1995@gmail.com> writes:

> Mark H Weaver <mhw@netris.org> writes:
>
>> At this point, I believe it would be quite feasible for a single hacker
>> to audit our psyntax-pp.scm and compare it to psyntax.scm within a
>> reasonable time frame.  Furthermore, when we make local changes to
>> psyntax.scm, the corresponding changes to psyntax-pp.scm are localized
>> and quite easy to audit as well, so the full audit need not be repeated.
>>
> It is really good that small change in source --> small change in
> binary. A fancy way of saying it: the map between source and binary is
> in some sense "continuious".

Sorry, I should have qualified my statement above with the word
"usually".  There are some kinds of local changes that result in
non-local changes to psyntax-pp.scm, e.g. if one of the macros are
changed.

A particularly pessimal case is when the 'syntax-object' structure is
changed, since its accessors are macros that are used throughout the
code.  This case actually happened recently in these commits:

  https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=eb84c2f2da83cf04214bbacf4b33528ce09a5b1a
  https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=a42bfae65f445178d3608433356ce132d1e7369e

As far as I'm aware, this is the first time such a large non-local
change has occurred since my work to minimize psyntax-pp.scm in 2012.

      Mark



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

* Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2017-07-07  1:42 ` Mark H Weaver
  2017-07-07 14:00   ` Alex Vong
@ 2017-07-07 14:55   ` Jan Nieuwenhuizen
  1 sibling, 0 replies; 12+ messages in thread
From: Jan Nieuwenhuizen @ 2017-07-07 14:55 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guile-user, bootstrappable

Mark H Weaver writes:

>> Does this mean Guile is not bootstrappable from source only?
>
> That's correct.  psyntax-pp.scm is not source code, and it is needed to
> bootstrap Guile.

I'm facing the same problem with Mes.  I have an implemenation of
syntax-rules that is just about 200 lines of define-macro source code,
but not syntax case.

The only useful thing I found was Andre van Tonder's syntax-case.  I
tried to geth it up and running, which just might be a way (it's not
clear to me from the documentation or code and it seems to have been a
lone effort that was abandoned -- could not find any references or
follow-ups) to have syntax-case without psyntax.  I gave up for now.

> Having said this, I agree that it would be better if psyntax.scm were
> written in such a way that it could be bootstrapped without the use of
> itself.  Maybe some day we'll rewrite it to make it so.

That could be essential to our full source bootstrapping efforts so I'm
very much interested!

Greetings,
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com



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

* Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2017-07-07  1:42 ` Mark H Weaver
@ 2017-07-07 14:00   ` Alex Vong
  2017-07-07 16:40     ` Mark H Weaver
  2017-07-07 14:55   ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 12+ messages in thread
From: Alex Vong @ 2017-07-07 14:00 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guile-user, bootstrappable

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

Hi Mark,

Mark H Weaver <mhw@netris.org> writes:

> Hi Alex,
>
> Alex Vong <alexvong1995@gmail.com> writes:
>
>> Recently, I've read the chapter on Macros in Guile's manual. The manual
>> says that Guile's expander originated from that of Chez Scheme's and
>> that version was portable to other schemes as well. So I search the
>> Internet and find it[0]. The website states that the expander needs an
>> expanded version of itself for bootstrapping, i.e. psyntax.ss needs
>> psyntax.pp for bootstrapping.
>>
>> After playing for awhile, I realize the relationship of Guile's
>> psyntax.scm and psyntax-pp.scm is exactly analogus. One needs an
>> expanded version of psyntax.scm, i.e. psyntax-pp.scm for bootstrapping.
>>
>> Does this mean Guile is not bootstrappable from source only?
>
> That's correct.  psyntax-pp.scm is not source code, and it is needed to
> bootstrap Guile.  However, I made an effort some years ago to make
> psyntax-pp.scm far smaller and more readable than the corresponding file
> from upstream psyntax.  See:
>
>   https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=72ee0ef71b9a0514874976cdcf3ea9d5333db4b1
>   https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=1af6d2a717f499564fbbc297c79e00ac14b0dcf9
>
I see. So it used to be worse --- several millions LOC. Now it is only
~3000, which is shorter than Emacs's bytecomp.el

> At this point, I believe it would be quite feasible for a single hacker
> to audit our psyntax-pp.scm and compare it to psyntax.scm within a
> reasonable time frame.  Furthermore, when we make local changes to
> psyntax.scm, the corresponding changes to psyntax-pp.scm are localized
> and quite easy to audit as well, so the full audit need not be repeated.
>
It is really good that small change in source --> small change in
binary. A fancy way of saying it: the map between source and binary is
in some sense "continuious".

> Having said this, I agree that it would be better if psyntax.scm were
> written in such a way that it could be bootstrapped without the use of
> itself.  Maybe some day we'll rewrite it to make it so.
>
Agree.

For future interested readers:

I can imagine one way of doing it: First implement a low-level hygienic
macro expander without using macros and then write the syntax-case
expander using low-level macros.

To get started, you can watch the "Let's Build a Hygienic Macro Expander
— Strange Loop 2016, Matthew Flatt" video.

>       Mark

Cheers,
Alex

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: Can Guile be bootstrapped from source without psyntax-pp.scm?
  2017-07-06 15:24 Alex Vong
@ 2017-07-07  1:42 ` Mark H Weaver
  2017-07-07 14:00   ` Alex Vong
  2017-07-07 14:55   ` Jan Nieuwenhuizen
  0 siblings, 2 replies; 12+ messages in thread
From: Mark H Weaver @ 2017-07-07  1:42 UTC (permalink / raw)
  To: Alex Vong; +Cc: guile-user, bootstrappable

Hi Alex,

Alex Vong <alexvong1995@gmail.com> writes:

> Recently, I've read the chapter on Macros in Guile's manual. The manual
> says that Guile's expander originated from that of Chez Scheme's and
> that version was portable to other schemes as well. So I search the
> Internet and find it[0]. The website states that the expander needs an
> expanded version of itself for bootstrapping, i.e. psyntax.ss needs
> psyntax.pp for bootstrapping.
>
> After playing for awhile, I realize the relationship of Guile's
> psyntax.scm and psyntax-pp.scm is exactly analogus. One needs an
> expanded version of psyntax.scm, i.e. psyntax-pp.scm for bootstrapping.
>
> Does this mean Guile is not bootstrappable from source only?

That's correct.  psyntax-pp.scm is not source code, and it is needed to
bootstrap Guile.  However, I made an effort some years ago to make
psyntax-pp.scm far smaller and more readable than the corresponding file
from upstream psyntax.  See:

  https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=72ee0ef71b9a0514874976cdcf3ea9d5333db4b1
  https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=1af6d2a717f499564fbbc297c79e00ac14b0dcf9

At this point, I believe it would be quite feasible for a single hacker
to audit our psyntax-pp.scm and compare it to psyntax.scm within a
reasonable time frame.  Furthermore, when we make local changes to
psyntax.scm, the corresponding changes to psyntax-pp.scm are localized
and quite easy to audit as well, so the full audit need not be repeated.

Having said this, I agree that it would be better if psyntax.scm were
written in such a way that it could be bootstrapped without the use of
itself.  Maybe some day we'll rewrite it to make it so.

      Mark



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

* Can Guile be bootstrapped from source without psyntax-pp.scm?
@ 2017-07-06 15:24 Alex Vong
  2017-07-07  1:42 ` Mark H Weaver
  0 siblings, 1 reply; 12+ messages in thread
From: Alex Vong @ 2017-07-06 15:24 UTC (permalink / raw)
  To: guile-user, bootstrappable

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

Hello,


Recently, I've read the chapter on Macros in Guile's manual. The manual
says that Guile's expander originated from that of Chez Scheme's and
that version was portable to other schemes as well. So I search the
Internet and find it[0]. The website states that the expander needs an
expanded version of itself for bootstrapping, i.e. psyntax.ss needs
psyntax.pp for bootstrapping.

After playing for awhile, I realize the relationship of Guile's
psyntax.scm and psyntax-pp.scm is exactly analogus. One needs an
expanded version of psyntax.scm, i.e. psyntax-pp.scm for bootstrapping.

Does this mean Guile is not bootstrappable from source only? I've tried
to compile Guile 2.2.2 with psyntax-pp.scm removed and I get a
segfault[1]. It seems the interpreter relies on psyntax-pp.scm to
function properly. I don't know if I should bring this discussion to
guix-devel. Free to do so if you think it is on topic.


Cheers,
Alex


[0]: https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
[1]:

  GEN      guile-procedures.texi
Uncaught exception:
Backtrace:
/bin/bash: line 1:  4113 Broken pipe             cat alist.doc array-handle.doc array-map.doc arrays.doc async.doc atomic.doc backtrace.doc boolean.doc bitvectors.doc bytevectors.doc chars.doc control.doc continuations.doc debug.doc deprecated.doc deprecation.doc dynl.doc dynwind.doc eq.doc error.doc eval.doc evalext.doc expand.doc extensions.doc fdes-finalizers.doc feature.doc filesys.doc fluids.doc foreign.doc fports.doc gc-malloc.doc gc.doc gettext.doc generalized-arrays.doc generalized-vectors.doc goops.doc gsubr.doc guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc ioext.doc keywords.doc list.doc load.doc macros.doc mallocs.doc memoize.doc modules.doc numbers.doc objprop.doc options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc promises.doc r6rs-ports.doc random.doc rdelim.doc read.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc srfi-1.doc srfi-4.doc srfi-13.doc srfi-14.doc srfi-60.doc stackchk.doc stacks.doc stime.doc strings.doc strorder.doc strports.doc struct.doc symbols.doc syntax.doc threads.doc throw.doc trees.doc unicode.doc uniform.doc values.doc variable.doc vectors.doc version.doc vports.doc weak-set.doc weak-table.doc weak-vector.doc dynl.doc posix.doc net_db.doc socket.doc regex-posix.doc
      4114 Segmentation fault      | GUILE_AUTO_COMPILE=0 ../meta/build-env guild snarf-check-and-output-texi > guile-procedures.texi
make[3]: *** [Makefile:3909: guile-procedures.texi] Error 1
make[3]: Leaving directory '/home/alexvong1995/scm/guile-2.2.2/libguile'
make[2]: *** [Makefile:2299: all] Error 2
make[2]: Leaving directory '/home/alexvong1995/scm/guile-2.2.2/libguile'
make[1]: *** [Makefile:1857: all-recursive] Error 1
make[1]: Leaving directory '/home/alexvong1995/scm/guile-2.2.2'
make: *** [Makefile:1743: all] Error 2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

end of thread, other threads:[~2021-03-17 17:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 22:42 Can Guile be bootstrapped from source without psyntax-pp.scm? Michael Schierl
2021-03-14 13:57 ` [bootstrappable] " Jan Nieuwenhuizen
2021-03-14 14:18   ` Michael Schierl
2021-03-15 17:09 ` Ludovic Courtès
2021-03-15 19:50   ` Michael Schierl
2021-03-16  8:59     ` Andy Wingo
2021-03-17 17:25     ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2017-07-06 15:24 Alex Vong
2017-07-07  1:42 ` Mark H Weaver
2017-07-07 14:00   ` Alex Vong
2017-07-07 16:40     ` Mark H Weaver
2017-07-07 14:55   ` Jan Nieuwenhuizen

unofficial mirror of guile-user@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-user/0 guile-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-user guile-user/ https://yhetil.org/guile-user \
		guile-user@gnu.org
	public-inbox-index guile-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.user
	nntp://news.gmane.io/gmane.lisp.guile.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git