unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* guile or scheme used to implement make or meson
@ 2023-09-11 18:42 Andy Tai
       [not found] ` <2061904033.101273.1694496696500@mail.yahoo.com>
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andy Tai @ 2023-09-11 18:42 UTC (permalink / raw)
  To: guile-user

Is using Guile, or a similar Scheme implementation, to re-implement
make or meson realistic?



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

* Fw: guile or scheme used to implement make or meson
       [not found] ` <2061904033.101273.1694496696500@mail.yahoo.com>
@ 2023-09-12 12:39   ` Mike Gran
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Gran @ 2023-09-12 12:39 UTC (permalink / raw)
  To: guile-user@gnu.org

(forwarding to guile-user because I forgot to reply-all)

> Is using Guile, or a similar Scheme implementation, to re-implement
> make or meson realistic?

Andy-

I did actually try to do a make in Guile once.  As it turns out, _make_
as a language is rather harder than it looks, especially if you start
trying to add in GNU extensions or BSD extensions to POSIX make.
The language is a bit of a muddle: parsing any token depends on
neighboring tokens in a non-trivial way.  Reimplementing GNU make
might require transliterating a C make into scheme, rather than starting with
a formal grammar and filling in from there.

However, it should be possible to do a strict POSIX make relatively easily.
POSIX make largely relies on the shell for its expressive power. Starting from a
strict POSIX make and expanding upwards from there is a reasonable
strategy.

See pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
for what POSIX make does and does not do.

While I never finished writing a make, I did make a build tool in Guile
inspired by make.  But it is mostly a toy, and not actively maintained.

github.com/spk121/potato-make

Regards,
Mike Gran



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

* Re: guile or scheme used to implement make or meson
  2023-09-11 18:42 guile or scheme used to implement make or meson Andy Tai
       [not found] ` <2061904033.101273.1694496696500@mail.yahoo.com>
@ 2023-09-12 13:56 ` Olivier Dion
  2023-09-12 14:10   ` Vivien Kraus
  2023-09-12 15:20   ` Basile Starynkevitch
  2023-09-13  0:47 ` Maxime Devos
  2 siblings, 2 replies; 7+ messages in thread
From: Olivier Dion @ 2023-09-12 13:56 UTC (permalink / raw)
  To: Andy Tai, guile-user

On Mon, 11 Sep 2023, Andy Tai <atai@atai.org> wrote:
> Is using Guile, or a similar Scheme implementation, to re-implement
> make or meson realistic?

By re-implementing do you mean re-writing Make with Guile?  That ought
to be realistic, but I really do not see the point of it.

What is more realistic and useful is to make a build system in Guile
where the DSL that replaces Makefiles is Scheme.


-- 
Olivier Dion
oldiob.dev



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

* Re: guile or scheme used to implement make or meson
  2023-09-12 13:56 ` Olivier Dion
@ 2023-09-12 14:10   ` Vivien Kraus
  2023-09-12 15:20   ` Basile Starynkevitch
  1 sibling, 0 replies; 7+ messages in thread
From: Vivien Kraus @ 2023-09-12 14:10 UTC (permalink / raw)
  To: Olivier Dion, Andy Tai, guile-user

Hello!

Le mardi 12 septembre 2023 à 09:56 -0400, Olivier Dion a écrit :
> What is more realistic and useful is to make a build system in Guile
> where the DSL that replaces Makefiles is Scheme.

Since make is only a small part of a useful build system, I think it is
way easier to re-implement make in guile than do a whole new build
system.

Vivien



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

* Re: guile or scheme used to implement make or meson
  2023-09-12 13:56 ` Olivier Dion
  2023-09-12 14:10   ` Vivien Kraus
@ 2023-09-12 15:20   ` Basile Starynkevitch
  2023-09-12 16:04     ` Olivier Dion
  1 sibling, 1 reply; 7+ messages in thread
From: Basile Starynkevitch @ 2023-09-12 15:20 UTC (permalink / raw)
  To: guile-user; +Cc: Andy Tai, Olivier Dion


On 9/12/23 15:56, Olivier Dion wrote:
> On Mon, 11 Sep 2023, Andy Tai <atai@atai.org> wrote:
>> Is using Guile, or a similar Scheme implementation, to re-implement
>> make or meson realistic?
> By re-implementing do you mean re-writing Make with Guile?  That ought
> to be realistic, but I really do not see the point of it.
>
> What is more realistic and useful is to make a build system in Guile
> where the DSL that replaces Makefiles is Scheme.
>
>

I think this already exist in GNU make. Recent versions of it can be 
extended in GNU guile:

https://www.gnu.org/software/make/manual/html_node/Guile-Function.html


BTW, my pet open source project (which uses GNU make without the guile 
extension) is the RefPerSys open source inference engine project (mostly 
coded in C++, with the ambition to generate C++ code or machine code 
thru GNU lightning), see https://github.com/RefPerSys/RefPerSys/ (and 
amateurish website http://refpersys.org/ ....). Contributors are welcome.

Regards from near Paris in France.


-- 
Basile Starynkevitch                  <basile@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/




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

* Re: guile or scheme used to implement make or meson
  2023-09-12 15:20   ` Basile Starynkevitch
@ 2023-09-12 16:04     ` Olivier Dion
  0 siblings, 0 replies; 7+ messages in thread
From: Olivier Dion @ 2023-09-12 16:04 UTC (permalink / raw)
  To: Basile Starynkevitch, guile-user; +Cc: Andy Tai

On Tue, 12 Sep 2023, Basile Starynkevitch <basile@starynkevitch.net> wrote:
>
> I think this already exist in GNU make. Recent versions of it can be 
> extended in GNU guile:

This feature is disabled on most distributions AFAIK.

What I meant is a 100% Scheme build system.

Here is a project defintion of mine for Libpatch (equivalent of Makefile.am):
<https://paste.sr.ht/~old/1ccbbcb4cc8b65609b123d0b5ed18c18bd3e74dd>.

And here is its configuration (equivalent of configure.ac):
<https://paste.sr.ht/~old/e1e1d7aa9e3d3d001f4ed70bf51062ee26a893a1>.

The build system is not released to the public, but it shows that it is
possible to make an entire build system with only Guile core.
-- 
Olivier Dion
oldiob.dev



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

* Re: guile or scheme used to implement make or meson
  2023-09-11 18:42 guile or scheme used to implement make or meson Andy Tai
       [not found] ` <2061904033.101273.1694496696500@mail.yahoo.com>
  2023-09-12 13:56 ` Olivier Dion
@ 2023-09-13  0:47 ` Maxime Devos
  2 siblings, 0 replies; 7+ messages in thread
From: Maxime Devos @ 2023-09-13  0:47 UTC (permalink / raw)
  To: Andy Tai, guile-user


[-- Attachment #1.1.1: Type: text/plain, Size: 663 bytes --]

Op 11-09-2023 om 20:42 schreef Andy Tai:
> Is using Guile, or a similar Scheme implementation, to re-implement
> make or meson realistic?
> 

Meson seems to have straightforward syntax and semantics, and 
‘meson.build’ isn't actually Python code unlike what you might expect, 
so I think that a meson reimplementation using Guile is realistic.

Especially if you use python-on-guile (*), an implementation of Python 
in (Guile) Scheme, if you care more about interacting with or modifying 
Meson with Scheme than having an implementation written in Scheme.

(*) https://gitlab.com/python-on-guile/python-on-guile/

Best regards,
Maxime Devos

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

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

end of thread, other threads:[~2023-09-13  0:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 18:42 guile or scheme used to implement make or meson Andy Tai
     [not found] ` <2061904033.101273.1694496696500@mail.yahoo.com>
2023-09-12 12:39   ` Fw: " Mike Gran
2023-09-12 13:56 ` Olivier Dion
2023-09-12 14:10   ` Vivien Kraus
2023-09-12 15:20   ` Basile Starynkevitch
2023-09-12 16:04     ` Olivier Dion
2023-09-13  0:47 ` Maxime Devos

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).