Re: [racket-users] make extensions or replacements

2019-04-23 Thread William G Hatch

On Tue, Apr 16, 2019 at 04:55:49PM -0400, Hendrik Boom wrote:

On Tue, Apr 16, 2019 at 10:13:47PM +0200, Jens Axel Søgaard wrote:

Hav you tried the make library?

https://docs.racket-lang.org/make/index.html?q=make


If you like Racket's make library but want something a little more
shell-like, I made a toy rash/demo/make language that has something
closer to a traditional `make` feel.  It's definitely a toy now, but I
don't think it would be a huge project to make a version that is more
reasonably useful.

I'm not offering to do that right now, but I'm offering it as an idea
you can chase if you like.  (Someday I'm likely to do it myself.  But
not in the immediate future.)

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] make extensions or replacements

2019-04-21 Thread Robby Findler
ICFP 2018 should be available to all (and other years too). It was paid for
and I can get the PDF.

Could you send me more info?

Robby

On Sun, Apr 21, 2019 at 12:53 PM Greg Hendershott 
wrote:

> On Sat, Apr 20, 2019 at 12:02 PM Norman Gray 
> wrote:
> > On 20 Apr 2019, at 1:11, 'John Clements' via Racket Users wrote:
> >
> > > There’s a paper at the most recent ICFP from Simon Peyton Jones (et
> > > al., I’m guessing) on make languages, IIRC.
> >
> > Very interesting -- thanks!  The paper is Andrey Mokhov, Neil Mitchell,
> > and Simon Peyton Jones. 2018. Build Systems à la Carte. _Proc. ACM
> > Program. Lang._ 2, ICFP, Article 79 (September 2018), 29 pages.
> > 
>
> From a quick read of the paper:
>
> - Many silly things have happened in the last 10 years due to people
> wanting to believe they have same challenges as Google, Facebook,
> Microsoft. "But is it web scale?" :)
>
> - The Shake "dynamic" example is interesting, but I'm pretty sure I
> recently did the same thing in Make using variables. I tried to follow
> the two links to learn more details, but the RIAA sorry MPAA sorry ACM
> paywall blocked me.
>
> Having said all that, I'm not here to defend Make as a delightful surface
> DSL.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] make extensions or replacements

2019-04-21 Thread Greg Hendershott
On Sat, Apr 20, 2019 at 12:02 PM Norman Gray  wrote:
> On 20 Apr 2019, at 1:11, 'John Clements' via Racket Users wrote:
>
> > There’s a paper at the most recent ICFP from Simon Peyton Jones (et
> > al., I’m guessing) on make languages, IIRC.
>
> Very interesting -- thanks!  The paper is Andrey Mokhov, Neil Mitchell,
> and Simon Peyton Jones. 2018. Build Systems à la Carte. _Proc. ACM
> Program. Lang._ 2, ICFP, Article 79 (September 2018), 29 pages.
> 

>From a quick read of the paper:

- Many silly things have happened in the last 10 years due to people
wanting to believe they have same challenges as Google, Facebook,
Microsoft. "But is it web scale?" :)

- The Shake "dynamic" example is interesting, but I'm pretty sure I
recently did the same thing in Make using variables. I tried to follow
the two links to learn more details, but the RIAA sorry MPAA sorry ACM
paywall blocked me.

Having said all that, I'm not here to defend Make as a delightful surface DSL.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] make extensions or replacements

2019-04-20 Thread Norman Gray



On 20 Apr 2019, at 1:11, 'John Clements' via Racket Users wrote:

There’s a paper at the most recent ICFP from Simon Peyton Jones (et 
al., I’m guessing) on make languages, IIRC.


Very interesting -- thanks!  The paper is Andrey Mokhov, Neil Mitchell, 
and Simon Peyton Jones. 2018. Build Systems à la Carte. _Proc. ACM 
Program. Lang._ 2, ICFP, Article 79 (September 2018), 29 pages. 



My brain-dump notes from a fairly superficial read of that paper 
(thinking about make alternatives, rather than the functional properties 
of them, which is the authors' actual goal) are below, if anyone's 
interested.


With that in mind, it strikes me, Hendrik, that if you developed a 
(Racket) system which generated Ninja files, that might tick a few 
boxes.


Best wishes,

Norman






Build systems, various
==

I read an interesting article about build systems (Andrey Mokhov, Neil
Mitchell, and Simon Peyton Jones. 2018. Build Systems à la Carte.
_Proc. ACM Program. Lang._ 2, ICFP, Article 79 (September 2018), 29
pages. ).

It's a discussion of build systems, and a reimplementation of four of
them in Haskell.  Interesting overall, but also interesting because
investigation makes it clear that there are remarkably few build
systems which are real alternatives to Make.

The four they discuss are Make, Excel (the spreadsheet), Shake (which
is implemented in, and used for building, Haskell) and
[Bazel](https://bazel.build) (which they describe in terms which
suggests it's a cloud-based one for huge code bases, but which seems
to be usable for small ones as well; it's an open-sourced version of
an internal Google tool).

At the end of the paper they mention a few others:

  * Ninja: see below.
  * Nix: really a package management system.
  * [Pluto](http://pluto-build.github.io): seems to be focused on Java.
  * Redo: slightly weird, in that the existing implementations appear
to be the result of reverse-engineering the manual for the
never-released original ([one
version](https://redo.readthedocs.io/en/latest/) points to other
implementations).
  * [Tup](http://gittup.org/tup/) looks interesting, and conceptually
not massively far from Make in specification, but seems to detect
dependencies by instrumenting the commands it runs.
  * [Buck](https://buckbuild.com) is a Facebook tool, written in
Java.  It looks quite similar to Bazel in the syntax.

[Ninja](https://ninja-build.org) describes itself as a _low-level_
build system, where the input files are expected to be generated by a
different system.  And in fact [CMake](https://cmake.org) has a mode
where it can generate Ninja files which do the actual building (as
opposed to generating Makefiles).

Of those, I think only Tup and CMake+Ninja would repay closer study,
and possibly Bazel, though it looks pretty heavyweight.

Some of these systems (as discussed in the paper at the top) also care
about dependencies on, eg, compiler versions.  I haven't looked
specifically at that above.


--
Norman Gray  :  https://nxg.me.uk

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] make extensions or replacements

2019-04-19 Thread 'John Clements' via Racket Users
There’s a paper at the most recent ICFP from Simon Peyton Jones (et al., I’m 
guessing) on make languages, IIRC.

John

> On Apr 16, 2019, at 2:09 PM, Greg Hendershott  
> wrote:
> 
> I have a shallow understanding of GNU Make, which is only somewhat
> less-shallow as a result of recently redesigning my blog to be
> Makefile-driven.
> 
> In the process I learned to like using make variables. I learned that
> a variable can be populated from make functions like $(wildcard)
> $(patsubst) and the ultimate escape hatch $(shell).
> 
> So, if you have (say) 5 unique stanzas, it might be possible to
> arrange this as 5 variables -- each of which is a list of that kind of
> source or target files. Then you can state the build recipe once in a
> single rule for each.
> 
> If the 5 kinds of things have distinct file extensions, or are in
> distinct subdirs, this is fairly easy to do with $(wildcard) and/or
> $(patsubt).  Otherwise (if you can't or prefer not to give them
> distinct extensions or locations), then potentially you can use
> $(shell) to run something that knows how to distinguish them. Maybe a
> find or grep command. Maybe even a little .rkt program.
> 
> So my guess is that the means of abstraction you need, does exist in
> GNU Make. But even so, it sounds like you might not enjoy using it.
> 
> On Tue, Apr 16, 2019 at 4:13 PM Hendrik Boom  wrote:
>> 
>> On Tue, Apr 16, 2019 at 09:54:03PM +0200, da...@erl.nu wrote:
>>> Hendrik,
>>> 
>>> What is that you are trying to do, maybe you are misunderstanding some
>>> concept about make?
>>> 
>>> It seems to me that the whole point of make is to "run a program" whenever
>>> some of the files have changed.
>> 
>> Yes, that part of make is easy.
>> 
>> The problem comes when you have many files that have to be made
>> depending on many files and there is a repetitive nature to the
>> dependencies.  The kind of similarity that is handled by abstraction in
>> any normal programming language.
>> 
>> And make itself has rules that can be used to do things like make *.out
>> files from *.in files based on the file types, a long as the rules can
>> be expanded by filling in the rest of the file names.  These are used
>> when it provides, say, default rules to compile .c files to .o files
>> and the like.
>> 
>> This is, I guess, a kind of abstraction.  But abstraction that takes
>> only one parameter is a poor kind of abstraction.
>> 
>> There seems to be no mechanism to provide additional parameters to
>> these rules, to accomodate slight variations in the stanzas.
>> 
>> I've thought of using Racket to generate stanzas.  Or to avoid
>> generating Makefiles altogether and directly implement make-like
>> semantics in Racket using its profound flexibility and then to use
>> Racket code to Make whatever I want.
>> 
>> But maybe, just maybe, there are already better tools than GNU make.
>> 
>> -- hendrik
>> 
>> 
>>> 
>>> Regards,
>>> 
>>> David
>>> 
>>> On 2019-04-16 21:25, Hendrik Boom wrote:
 I'm sending this here, not because it's directly related to Racket,
 nor because i think you all are experts in make or GNU make, but
 because you are reasonable erudite in language appreciation.
 
 I, like many others, have been using a Makefile as a recipe to make a
 lot of files from other files.
 
 The trouble is that a lot of the stanzas are quite repetitive.  I want
 to refactor.
 
 If I were writing this in any other language then make,  i would just
 define a function with about three or four short parameters and call it
 many times, each time doing the equivalent of several of these stanzas.
 
 Roughly speaking, the abstraction tools of GNU Make are terrible.
 
 I'd like to ask you, what other tools might you actually recommend to
 used in addition to make, or instead of it, that make the build
 process more like normal programming?
 
 If I could get make to run a program to make another makefile and then
 execute that new makefile, I suppose I could write the program that
 makes all the repetitive (but not quite the same) stanzas.  But that
 would likely make the build process somewhat obscure.
 
 Sure, I could invent something.  But chances are, someone else already
 has invented something better than I'd improvise.
 
 -- hendrik
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Racket Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to racket-users+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 

Re: [racket-users] make extensions or replacements

2019-04-16 Thread Greg Hendershott
I have a shallow understanding of GNU Make, which is only somewhat
less-shallow as a result of recently redesigning my blog to be
Makefile-driven.

In the process I learned to like using make variables. I learned that
a variable can be populated from make functions like $(wildcard)
$(patsubst) and the ultimate escape hatch $(shell).

So, if you have (say) 5 unique stanzas, it might be possible to
arrange this as 5 variables -- each of which is a list of that kind of
source or target files. Then you can state the build recipe once in a
single rule for each.

If the 5 kinds of things have distinct file extensions, or are in
distinct subdirs, this is fairly easy to do with $(wildcard) and/or
$(patsubt).  Otherwise (if you can't or prefer not to give them
distinct extensions or locations), then potentially you can use
$(shell) to run something that knows how to distinguish them. Maybe a
find or grep command. Maybe even a little .rkt program.

So my guess is that the means of abstraction you need, does exist in
GNU Make. But even so, it sounds like you might not enjoy using it.

On Tue, Apr 16, 2019 at 4:13 PM Hendrik Boom  wrote:
>
> On Tue, Apr 16, 2019 at 09:54:03PM +0200, da...@erl.nu wrote:
> > Hendrik,
> >
> > What is that you are trying to do, maybe you are misunderstanding some
> > concept about make?
> >
> > It seems to me that the whole point of make is to "run a program" whenever
> > some of the files have changed.
>
> Yes, that part of make is easy.
>
> The problem comes when you have many files that have to be made
> depending on many files and there is a repetitive nature to the
> dependencies.  The kind of similarity that is handled by abstraction in
> any normal programming language.
>
> And make itself has rules that can be used to do things like make *.out
> files from *.in files based on the file types, a long as the rules can
> be expanded by filling in the rest of the file names.  These are used
> when it provides, say, default rules to compile .c files to .o files
> and the like.
>
> This is, I guess, a kind of abstraction.  But abstraction that takes
> only one parameter is a poor kind of abstraction.
>
> There seems to be no mechanism to provide additional parameters to
> these rules, to accomodate slight variations in the stanzas.
>
> I've thought of using Racket to generate stanzas.  Or to avoid
> generating Makefiles altogether and directly implement make-like
> semantics in Racket using its profound flexibility and then to use
> Racket code to Make whatever I want.
>
> But maybe, just maybe, there are already better tools than GNU make.
>
> -- hendrik
>
>
> >
> > Regards,
> >
> > David
> >
> > On 2019-04-16 21:25, Hendrik Boom wrote:
> > > I'm sending this here, not because it's directly related to Racket,
> > > nor because i think you all are experts in make or GNU make, but
> > > because you are reasonable erudite in language appreciation.
> > >
> > > I, like many others, have been using a Makefile as a recipe to make a
> > > lot of files from other files.
> > >
> > > The trouble is that a lot of the stanzas are quite repetitive.  I want
> > > to refactor.
> > >
> > > If I were writing this in any other language then make,  i would just
> > > define a function with about three or four short parameters and call it
> > > many times, each time doing the equivalent of several of these stanzas.
> > >
> > > Roughly speaking, the abstraction tools of GNU Make are terrible.
> > >
> > > I'd like to ask you, what other tools might you actually recommend to
> > > used in addition to make, or instead of it, that make the build
> > > process more like normal programming?
> > >
> > > If I could get make to run a program to make another makefile and then
> > > execute that new makefile, I suppose I could write the program that
> > > makes all the repetitive (but not quite the same) stanzas.  But that
> > > would likely make the build process somewhat obscure.
> > >
> > > Sure, I could invent something.  But chances are, someone else already
> > > has invented something better than I'd improvise.
> > >
> > > -- hendrik
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit 

Re: [racket-users] make extensions or replacements

2019-04-16 Thread Hendrik Boom
On Tue, Apr 16, 2019 at 10:13:47PM +0200, Jens Axel Søgaard wrote:
> Hav you tried the make library?
> 
> https://docs.racket-lang.org/make/index.html?q=make

Yes.  That would work.  And that's the kind of answer I was hoping 
for.  I'd use the make/proc form after using some function calls (with 
as many arguments as I like) to build the lists it takes as arguments.

-- hendrik

> 
> Den tir. 16. apr. 2019 kl. 21.54 skrev :
> 
> > Hendrik,
> >
> > What is that you are trying to do, maybe you are misunderstanding some
> > concept about make?
> >
> > It seems to me that the whole point of make is to "run a program"
> > whenever
> > some of the files have changed.
> >
> > Regards,
> >
> > David
> >
> > On 2019-04-16 21:25, Hendrik Boom wrote:
> > > I'm sending this here, not because it's directly related to Racket,
> > > nor because i think you all are experts in make or GNU make, but
> > > because you are reasonable erudite in language appreciation.
> > >
> > > I, like many others, have been using a Makefile as a recipe to make a
> > > lot of files from other files.
> > >
> > > The trouble is that a lot of the stanzas are quite repetitive.  I want
> > > to refactor.
> > >
> > > If I were writing this in any other language then make,  i would just
> > > define a function with about three or four short parameters and call it
> > > many times, each time doing the equivalent of several of these stanzas.
> > >
> > > Roughly speaking, the abstraction tools of GNU Make are terrible.
> > >
> > > I'd like to ask you, what other tools might you actually recommend to
> > > used in addition to make, or instead of it, that make the build
> > > process more like normal programming?
> > >
> > > If I could get make to run a program to make another makefile and then
> > > execute that new makefile, I suppose I could write the program that
> > > makes all the repetitive (but not quite the same) stanzas.  But that
> > > would likely make the build process somewhat obscure.
> > >
> > > Sure, I could invent something.  But chances are, someone else already
> > > has invented something better than I'd improvise.
> > >
> > > -- hendrik
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> 
> 
> -- 
> -- 
> Jens Axel Søgaard
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] make extensions or replacements

2019-04-16 Thread david

I think the tool to use depends on what you want to achieve =)

Do you have an example of what you think is missing?

I like the idea that maybe you want to make use racket to
generate some Makefile's to your liking.
Maybe using #lang scribble/text

Best Regards,

David

On 2019-04-16 22:13, Hendrik Boom wrote:

On Tue, Apr 16, 2019 at 09:54:03PM +0200, da...@erl.nu wrote:

Hendrik,

What is that you are trying to do, maybe you are misunderstanding some
concept about make?

It seems to me that the whole point of make is to "run a program" 
whenever

some of the files have changed.


Yes, that part of make is easy.

The problem comes when you have many files that have to be made
depending on many files and there is a repetitive nature to the
dependencies.  The kind of similarity that is handled by abstraction in
any normal programming language.

And make itself has rules that can be used to do things like make *.out
files from *.in files based on the file types, a long as the rules can
be expanded by filling in the rest of the file names.  These are used
when it provides, say, default rules to compile .c files to .o files
and the like.

This is, I guess, a kind of abstraction.  But abstraction that takes
only one parameter is a poor kind of abstraction.

There seems to be no mechanism to provide additional parameters to
these rules, to accomodate slight variations in the stanzas.

I've thought of using Racket to generate stanzas.  Or to avoid
generating Makefiles altogether and directly implement make-like
semantics in Racket using its profound flexibility and then to use
Racket code to Make whatever I want.

But maybe, just maybe, there are already better tools than GNU make.

-- hendrik




Regards,

David

On 2019-04-16 21:25, Hendrik Boom wrote:
> I'm sending this here, not because it's directly related to Racket,
> nor because i think you all are experts in make or GNU make, but
> because you are reasonable erudite in language appreciation.
>
> I, like many others, have been using a Makefile as a recipe to make a
> lot of files from other files.
>
> The trouble is that a lot of the stanzas are quite repetitive.  I want
> to refactor.
>
> If I were writing this in any other language then make,  i would just
> define a function with about three or four short parameters and call it
> many times, each time doing the equivalent of several of these stanzas.
>
> Roughly speaking, the abstraction tools of GNU Make are terrible.
>
> I'd like to ask you, what other tools might you actually recommend to
> used in addition to make, or instead of it, that make the build
> process more like normal programming?
>
> If I could get make to run a program to make another makefile and then
> execute that new makefile, I suppose I could write the program that
> makes all the repetitive (but not quite the same) stanzas.  But that
> would likely make the build process somewhat obscure.
>
> Sure, I could invent something.  But chances are, someone else already
> has invented something better than I'd improvise.
>
> -- hendrik

--
You received this message because you are subscribed to the Google 
Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to racket-users+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] make extensions or replacements

2019-04-16 Thread Jens Axel Søgaard
Hav you tried the make library?

https://docs.racket-lang.org/make/index.html?q=make

Den tir. 16. apr. 2019 kl. 21.54 skrev :

> Hendrik,
>
> What is that you are trying to do, maybe you are misunderstanding some
> concept about make?
>
> It seems to me that the whole point of make is to "run a program"
> whenever
> some of the files have changed.
>
> Regards,
>
> David
>
> On 2019-04-16 21:25, Hendrik Boom wrote:
> > I'm sending this here, not because it's directly related to Racket,
> > nor because i think you all are experts in make or GNU make, but
> > because you are reasonable erudite in language appreciation.
> >
> > I, like many others, have been using a Makefile as a recipe to make a
> > lot of files from other files.
> >
> > The trouble is that a lot of the stanzas are quite repetitive.  I want
> > to refactor.
> >
> > If I were writing this in any other language then make,  i would just
> > define a function with about three or four short parameters and call it
> > many times, each time doing the equivalent of several of these stanzas.
> >
> > Roughly speaking, the abstraction tools of GNU Make are terrible.
> >
> > I'd like to ask you, what other tools might you actually recommend to
> > used in addition to make, or instead of it, that make the build
> > process more like normal programming?
> >
> > If I could get make to run a program to make another makefile and then
> > execute that new makefile, I suppose I could write the program that
> > makes all the repetitive (but not quite the same) stanzas.  But that
> > would likely make the build process somewhat obscure.
> >
> > Sure, I could invent something.  But chances are, someone else already
> > has invented something better than I'd improvise.
> >
> > -- hendrik
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
-- 
Jens Axel Søgaard

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] make extensions or replacements

2019-04-16 Thread Hendrik Boom
On Tue, Apr 16, 2019 at 09:54:03PM +0200, da...@erl.nu wrote:
> Hendrik,
> 
> What is that you are trying to do, maybe you are misunderstanding some
> concept about make?
> 
> It seems to me that the whole point of make is to "run a program" whenever
> some of the files have changed.

Yes, that part of make is easy.

The problem comes when you have many files that have to be made 
depending on many files and there is a repetitive nature to the 
dependencies.  The kind of similarity that is handled by abstraction in 
any normal programming language.

And make itself has rules that can be used to do things like make *.out 
files from *.in files based on the file types, a long as the rules can 
be expanded by filling in the rest of the file names.  These are used 
when it provides, say, default rules to compile .c files to .o files 
and the like.

This is, I guess, a kind of abstraction.  But abstraction that takes 
only one parameter is a poor kind of abstraction.

There seems to be no mechanism to provide additional parameters to 
these rules, to accomodate slight variations in the stanzas.

I've thought of using Racket to generate stanzas.  Or to avoid 
generating Makefiles altogether and directly implement make-like 
semantics in Racket using its profound flexibility and then to use 
Racket code to Make whatever I want.

But maybe, just maybe, there are already better tools than GNU make.

-- hendrik

 
> 
> Regards,
> 
> David
> 
> On 2019-04-16 21:25, Hendrik Boom wrote:
> > I'm sending this here, not because it's directly related to Racket,
> > nor because i think you all are experts in make or GNU make, but
> > because you are reasonable erudite in language appreciation.
> > 
> > I, like many others, have been using a Makefile as a recipe to make a
> > lot of files from other files.
> > 
> > The trouble is that a lot of the stanzas are quite repetitive.  I want
> > to refactor.
> > 
> > If I were writing this in any other language then make,  i would just
> > define a function with about three or four short parameters and call it
> > many times, each time doing the equivalent of several of these stanzas.
> > 
> > Roughly speaking, the abstraction tools of GNU Make are terrible.
> > 
> > I'd like to ask you, what other tools might you actually recommend to
> > used in addition to make, or instead of it, that make the build
> > process more like normal programming?
> > 
> > If I could get make to run a program to make another makefile and then
> > execute that new makefile, I suppose I could write the program that
> > makes all the repetitive (but not quite the same) stanzas.  But that
> > would likely make the build process somewhat obscure.
> > 
> > Sure, I could invent something.  But chances are, someone else already
> > has invented something better than I'd improvise.
> > 
> > -- hendrik
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] make extensions or replacements

2019-04-16 Thread david

Hendrik,

What is that you are trying to do, maybe you are misunderstanding some
concept about make?

It seems to me that the whole point of make is to "run a program" 
whenever

some of the files have changed.

Regards,

David

On 2019-04-16 21:25, Hendrik Boom wrote:

I'm sending this here, not because it's directly related to Racket,
nor because i think you all are experts in make or GNU make, but
because you are reasonable erudite in language appreciation.

I, like many others, have been using a Makefile as a recipe to make a
lot of files from other files.

The trouble is that a lot of the stanzas are quite repetitive.  I want
to refactor.

If I were writing this in any other language then make,  i would just
define a function with about three or four short parameters and call it
many times, each time doing the equivalent of several of these stanzas.

Roughly speaking, the abstraction tools of GNU Make are terrible.

I'd like to ask you, what other tools might you actually recommend to
used in addition to make, or instead of it, that make the build
process more like normal programming?

If I could get make to run a program to make another makefile and then
execute that new makefile, I suppose I could write the program that
makes all the repetitive (but not quite the same) stanzas.  But that
would likely make the build process somewhat obscure.

Sure, I could invent something.  But chances are, someone else already
has invented something better than I'd improvise.

-- hendrik


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.