SCons for ATS

45 views
Skip to first unread message

gmhwxi

unread,
Dec 7, 2014, 6:21:25 PM12/7/14
to ats-lan...@googlegroups.com

I spent some time trying out SCons (http://www.scons.org). I think Barry mentioned it at one
point on this list. Here is a minimal example:

https://github.com/githwxi/ATS-Postiats-contrib/blob/master/projects/SMALL/Socket/SConstruct

The need right now is to find a way to allow SCons to use the dependency information generated
by 'patsopt --depgen'. It should be a little task for someone familiar with Python. Any volunteers?
I will wait :)

Cheers,

--Hongwei

Barry Schwartz

unread,
Dec 7, 2014, 6:38:42 PM12/7/14
to ats-lan...@googlegroups.com
gmhwxi <gmh...@gmail.com> skribis:
> I spent some time trying out SCons (http://www.scons.org). I think Barry
> mentioned it at one
> point on this list.

Yup. It’s something about which I actually have some nice things to
say, which seen in context is a profound compliment. :)

It should be possible (if one desires) to get SCons to compile an ATS
program with thorough dependency analysis and without calling out to
the shell. With ATS it should probably work nicely using diffs rather
than timestamps, too. (I found that unreliable with OCaml, at least in
my own setup.)

Brandon Barker

unread,
Dec 7, 2014, 6:43:04 PM12/7/14
to ats-lang-users
On Sun, Dec 7, 2014 at 6:38 PM, Barry Schwartz <chemoe...@chemoelectric.org> wrote:
gmhwxi <gmh...@gmail.com> skribis:
> I spent some time trying out SCons (http://www.scons.org). I think Barry
> mentioned it at one
> point on this list.

Yup. It’s something about which I actually have some nice things to
say, which seen in context is a profound compliment. :)
Quite. I would be very tempted to use it for Java, but there is a lack in dependency handling at the moment: http://www.scons.org/wiki/JavaStrategy 

It should be possible (if one desires) to get SCons to compile an ATS
program with thorough dependency analysis and without calling out to
the shell. With ATS it should probably work nicely using diffs rather
than timestamps, too. (I found that unreliable with OCaml, at least in
my own setup.)

--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/20141207233835.GA25573%40crud.



--
Brandon Barker
brandon...@gmail.com

gmhwxi

unread,
Dec 7, 2014, 7:57:59 PM12/7/14
to ats-lan...@googlegroups.com

>>Quite. I would be very tempted to use it for Java, but there is a lack in dependency
>>handling at the moment: http://www.scons.org/wiki/JavaStrategy

He was talking about "big" pictures.

For individual projects, I don't feel that such "big" pictures matter so much. As long as
you are prepared to "get burnt", it should be fine to try whatever is out there.

In terms of dependency handling, you can always hand-code it using your own scripts.
Yes, it is ad hoc/unpleasant but a few dozens lines of Perl code can go a long way :)

Brandon Barker

unread,
Dec 7, 2014, 8:54:30 PM12/7/14
to ats-lang-users
I can't say that I disagree; I'm probably worrying too much about pleasing Java developers that I may or may not need to interact with.

--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.

gmhwxi

unread,
Dec 8, 2014, 12:02:30 AM12/8/14
to ats-lan...@googlegroups.com

Also, I think it is healthy to have more than one way to build a system.

I still remember vividly the horror I experienced when using Eclipse to do
a project in Java several years ago. Making a minor change would trigger
Eclipse to very slowly re-compile more than 80 files. I simply could not figure
out how Eclipse did dependency analysis. Instead, I switched back to emacs
plus Makefiles (plus hand-code dependency).

gmhwxi

unread,
Dec 8, 2014, 12:25:38 AM12/8/14
to ats-lan...@googlegroups.com
Speaking of dependency analysis, what would be a good tool for Java?

Barry Schwartz

unread,
Dec 8, 2014, 5:11:58 PM12/8/14
to ats-lan...@googlegroups.com
gmhwxi <gmh...@gmail.com> skribis:
> >>Quite. I would be very tempted to use it for Java, but there is a lack in
> dependency
> >>handling at the moment: http://www.scons.org/wiki/JavaStrategy
> <http://www.google.com/url?q=http%3A%2F%2Fwww.scons.org%2Fwiki%2FJavaStrategy&sa=D&sntz=1&usg=AFQjCNHHJEM5ws6l7CthpKCbh5Sk3etUdg>
>
> He was talking about "big" pictures.
>
> For individual projects, I don't feel that such "big" pictures matter so
> much. As long as
> you are prepared to "get burnt", it should be fine to try whatever is out
> there.
>
> In terms of dependency handling, you can always hand-code it using your own
> scripts.
> Yes, it is ad hoc/unpleasant but a few dozens lines of Perl code can go a
> long way :)

If using SCons one probably ought to write in Python rather than Perl
(though I find Python syntax very difficult sometimes and doubt Hy
would mesh very well with SCons; hoping I’m wrong there).

Barry Schwartz

unread,
Dec 8, 2014, 6:06:59 PM12/8/14
to ats-lan...@googlegroups.com
One thing about the essay at http://www.scons.org/wiki/JavaStrategy is
it points out exactly what are some of the most noticeable problems
with SCons. It is not afraid to point these out.

I usually describe SCons as making straightforward and easy things
that are very difficult in Make, while making incomprehensibly
difficult (for me) some things that should be, and in Make _are_,
quite simple.

Probably some of these matters could be addressed by writing one’s own
clever set of modules.

Raoul Duke

unread,
Dec 8, 2014, 6:11:00 PM12/8/14
to ats-lang-users

Brandon Barker

unread,
Dec 8, 2014, 6:21:48 PM12/8/14
to ats-lang-users
It looks like there is a new tool for this that is now standard:

Sounds reasonable, but haven't tried it.

Also, for dependency management, I believe Ant and Maven have their own solutions. Ant uses Ivy, which is also used by Gradle.

Hongwei Xi

unread,
Dec 8, 2014, 9:24:26 PM12/8/14
to ats-lan...@googlegroups.com
The author of the original email (Russel Winder) is clearly very knowledgeable in this area.
I agree with most of his observations. To me, the question we should ask is: why would
a person X use SCons to build a Java-based project?

I think the most likely scenario is that the person is already comfortable with SCons but has
had very little exposure to tools like Ant and Maven. As was suggested in the essay, SCons
should focus on C/C++/Fortran for now before moving into Java. I feel the same. Also, the
field is not stable/static. It is a good bet that more build tools for Java will be out in the near
future.

--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
Reply all
Reply to author
Forward
0 new messages