public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Arvydas Silanskas <nma.arvydas.silanskas@gmail.com>
To: Per Bothner <per@bothner.com>
Cc: kawa mailing list <kawa@sourceware.org>
Subject: Re: Kawa source tree organization
Date: Mon, 23 Nov 2020 01:22:17 +0200	[thread overview]
Message-ID: <CAPh7weCjfLY0L3qL6BbF1ALUWd2tRdaUVkEj9A4NSZhaS_9K4Q@mail.gmail.com> (raw)
In-Reply-To: <639409ed-2b09-6d8c-3444-081fe7c9eb58@bothner.com>

Hmm I agree the toolchain and grouping are orthogonal changes, and I won't
do changes to the former now.

Regarding make/autotools alternatives, specifically maven and gradle, I
think they're great if for nothing else then at least for the consequences
of their mainstream use and popularity -- great IDE support and familiarity
for java programmers (which consequently mean preexisting understanding of
structure and where to look for things if project has idiomatic layout, as
well as having necessary things already installed). Aside that, their
merits are mostly dependency installment & management (for 3rd party like
jline, but also for internal use, say like kawa-compiler would have
dependency on core-utils) and taking care of invoking javac with right
classpaths. I'm also fairly sure those tools are more friendly for
developers using windows.

That said, I'm somewhat fine with the "don't fix if it's not broke"
reasoning, because I'm not entirely sure how maven or gradle would play out
with preprocessing that's being done in kawa. While fully new source file
generation (eg vector primitives like FVector) seems solvable with
annotation processor code generation, the inline preprocessing looks
trickier.

Arvydas

2020-11-22, sk, 03:30 Per Bothner <per@bothner.com> rašė:

> On 11/21/20 4:23 PM, Arvydas Silanskas via Kawa wrote:
> > Perhaps it could be worthwhile splitting things up? For example:
> >
> > * kawa-the-compiler base project, that'd consist basically of
> > language-agnostic compiler what now are gnu.bytecode, gnu.expr, etc.
> > Ideally one could just use it to create a jvm targeting language.
> > * kawa-the-scheme project, which would be what implements the minimal
> core
> > scheme, such as the native syntax forms seen in kawa.lang package.
> Depends
> > on kawa-the-compiler project. Ideally one could just use it as a
> > self-sufficient minimal scheme library.
> > * various feature-projects, that depend on either just kawa-the-compiler,
> > or kawa-the-scheme, but not on other feature-projects.
> > * the main kawa project, which includes everything listed above,
> implements
> > the public static main, and handles command line arguments. Basically,
> the
> > module that compiles to what now is kawa.jar.
> I think that would be good, but it may be a lot of work (and hard thought)
> to split things up.  There are lots of cross-dependencies.  We do have one
> advantage, in that Kawa has always been able to bootstrap from just Java,
> without requiring an earlier version of itself (or some other version of
> Scheme).
> This has forced some separation.
>
> I have also tried to separate out compile-time-only clases, but that still
> needs a lot of work.
>
> I have generally preferred relatively shallow directory trees, with the
> source for class X.Y as file X/Y.java with no extra nesting.
> It is probably reasonable to change that, though I don't think going
> as far as Maven's src/main/java/X/Y.java would be desirable.
>
> A first draft:
>    core-utils (packages such as gnu.lists gnu.math gnu.kawa.io gnu.text.
>       These are used by both compiler and the runtime.)
>    kawa-compiler (gnu.bytecode gnu.expr)
>    scheme-language (maybe split into parts such as separate scheme-library)
>    extras (probably split this up)
>    commonlisp-language
>    xquery-language
>    jemacs-language and brl-language are probably not used by anyone
>    (gnu.ecmascript can probably be removed)
>
> A lot of gnu/kawa/functions and gnu/kawa/lis
>
> Perhaps the first step would be to create a core-utils sub-directory
> with classes that does not depend on any classes outside of it.
> That may require some re-factoring and moving classes around.
>
> Or start from the other end: classes that are definitely *not* needed
> to build or run a functional Scheme.
>
> I am not convinced that replacing make+autotools would be worthwhile.
> They're clunky, but they work without installing some other major
> subsystem, and it is not clear to me that any alternative is sufficiently
> clearly better.  Specifically, I don't see writing build/configuration
> files
> using XML syntax (as needed for Ant or Maven) is an improvement.  And I'm
> not quite ready to embrace Gradle (or the Groovy language), though I could
> be talked into it if that is the consensus and someone else does the heavy
> lifting.
> Regardless, I suggest changing build tools is a separate and orthogonal
> task:
> switching both directory layout and build tools at the same time is
> probably too much.
> --
>         --Per Bothner
> per@bothner.com   http://per.bothner.com/
>

      reply	other threads:[~2020-11-22 23:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-22  0:23 Arvydas Silanskas
2020-11-22  1:29 ` Per Bothner
2020-11-22 23:22   ` Arvydas Silanskas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPh7weCjfLY0L3qL6BbF1ALUWd2tRdaUVkEj9A4NSZhaS_9K4Q@mail.gmail.com \
    --to=nma.arvydas.silanskas@gmail.com \
    --cc=kawa@sourceware.org \
    --cc=per@bothner.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).