public inbox for
 help / color / mirror / Atom feed
From: Per Bothner <>
Subject: Re: Kawa source tree organization
Date: Sat, 21 Nov 2020 17:29:27 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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/ 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/ would be desirable.

A first draft:
   core-utils (packages such as gnu.lists gnu.math 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)
   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

  reply	other threads:[~2020-11-22  1:29 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 [this message]
2020-11-22 23:22   ` Arvydas Silanskas

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:

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

  git send-email \ \ \ \

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