chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [BRANCH] CHICKEN 5 library loading


From: Evan Hanson
Subject: Re: [Chicken-hackers] [BRANCH] CHICKEN 5 library loading
Date: Tue, 9 Feb 2016 17:22:00 +1300

Hi all,

Another update. This branch now changes the way code loading works a bit
more, so that a similar mechanism is used for both run- and compile-time
library requirement. It's wired in pretty close to the metal in order to
avoid runtime dependencies so that static programs, as well as programs
that use "-explicit-use" to omit the eval unit (or library, even) all
work similarly with respect to code loading.

A short explanation: the new ##core#provide expression registers a
library, identified by a symbol, as having been provided by the current
compilation unit. This fact, in addition to the list of used-units, is
used at compile time by ##core#require (née ##core#require-extension) to
drop load forms for things that are provided statically, and it's used
at runtime by ##sys#load-extension (née ##sys#require) to do the right
thing with dynamic libraries. Units and modules are self-providing. You
can see this in action with "-:D", a.k.a. the smiley-face flag, a.k.a.
debug level 2.

Also new in this branch since my last email:

  - The following modules from the core-libraries-reorganization page:

      (chicken bitwise)
      (chicken continuation)
      (chicken flonum)
      (chicken format)
      (chicken gc)
      (chicken io)
      (chicken keyword)
      (chicken locative)
      (chicken pretty-print)
      (chicken random)
      (chicken read-syntax)
      (chicken repl)
      (chicken time)

  - A few of the other changes listed on that page: scan-input-lines
    moved to an egg, the "setenv" procedure renamed to
    "set-environment-variable!", and so on.

  - "Proper" modules (i.e. primitive modules with accurate import
    lists) for the following SRFIs: 0, 2, 6, 8, 9, 10, 12, 15, 16, 17,
    18, 23, 26, 28, 31, 39, 55, 88, 98. These were all supported by
    CHICKEN already, so there's not really a new feature here, but
    they were mostly provided by library/expand/chicken-syntax/some
    combination thereof, and this adds some organisation.

  - Probably some other stuff I'm forgetting. There are small niceties
    arising from the new library requirement code, such as the
    ablility to call "(use scheme)" and have it work without error.

This branch is now basically backwards-incompatible (though still
boostrappable with 4.10.1 via boot-chicken), as many procedures have
gone from being implicitly available at the toplevel to being part of a
module that must be imported before use (for example, one must now
"(import (chicken random))" before using the `random` procedure). It
also meanders a bit at the beginning, but I've made an effort to clean
up the commit history and divide things into logical bits. There's a lot
there, so just let me know if you have questions and I'll do my best to
explain things in more detail.

Cheers,

Evan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]