Re: [Chicken-users] Understanding modules?

2016-05-23 Thread Norman Gray


John and all, hello.

On 22 May 2016, at 1:59, John Cowan wrote:


It's also worth noting that use (or
require-extension, which is the same thing) depends on the module 
having

the same name as the file.


Thanks: It did look as if that assumption was baked in somewhere; if the 
process _depends_ on the naming, then...




A module may _export_ a subset of the bindings defined in its body, 
making those bindings visible to other code which _imports_ the module, 
at compilation time.  A module must be _loaded_ into a CHICKEN 
interpreter before its bindings can be imported; this loading can happen 
explicitly, or more commonly as a side-effect of some higher level 
expression, as below; this loading happens at run-time.  In CHICKEN, the 
loadable object can be either the Scheme source code in a `.scm` file, 
or a shared object compiled with `csc -shared`.


If, as is usually the case, you compile code which depends on other 
modules, then you must use an _import library_; this is generated by 
`csc` when given the option `-emit-all-import-libraries`.  In the most 
common case, a file foo.scm will contain a single (module foo ...) form, 
and the compilation should be done with `-emit-all-import-libraries`, 
which generates a file `foo.import.scm` named after the module.  If a 
module uses this naming pattern, then the expression `(use foo)` (or 
equivalently `(require-extension foo)`) will automatically handle 
finding and loading the library, and importing its symbols.


The `(module ...)` form is documented below.  See also the discussion of 
`require-extension` and `use` on 
, 
and possibly the discussion of `require` on 





Best wishes,

Norman


--
Norman Gray  :  https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Understanding modules?

2016-05-23 Thread Norman Gray


Evan and all, hello.

On 22 May 2016, at 3:15, Evan Hanson wrote:

A quick note about units and modules: the two are different things 
used

for different purposes. The former has to do with controlling the
compilation and linking of separate application components, whereas 
the

latter is about namespace management.


I did get that impression, after it was explained on-list.  But the 
prominence of the manual's description of units in 'Basic mode of 
operation' and 'Using the compiler', the existence of a worked example 
in the latter, and the sequencing before modules, gave me the very 
strong impression that '"unit" is how Chicken spells "module"'.  In 
contrast, the first real mention of modules is hidden away inside 
'Supported language', in what looks like a reference section rather than 
anything introductory.  The first paragraph in 'Basic mode of operation' 
does mention modules, but in a way which is easily consistent with the 
'spelling' remark above.



The hunt continues for the best
way to explain either of these features in the manual (particularly
without confusing the two with one another, or with other features 
such

as deployment or the use of dynamic libraries),


I don't have a magic answer to that, but on reflection, I think a brief 
overview at the top of (hmmm...) 'Basic mode of operation' -- or 
possibly 'Using the compiler' -- would provide extremely useful context 
for the reader.  It needn't be an essay, but something terse which says 
'units, modules, deployment and dynamic libraries are orthogonal 
concepts, are used for the following purposes, A, B, C, D, and are 
further documented in W, X, Y and Z.'


I think most schemers will be used to the idea that they have to read 
things multiple times, and anyone who's enjoyed RnRS knows that the 
logical order is not necessarily the same as the friendliest tutorial 
order (and prefers the former), but this depends on clear signposts to 
what's (going to be) explained where.



This looks like a bug to me. Based on the commands you listed, that
application "main/main" should work fine, so I suggest reporting this 
on

bugs.call-cc.org, if you don't mind.


RIghto: I've asked for an account there.


managed by that egg's maintainer, so bug reports about their
documentation will ideally be grouped by extension rather than in one
big ticket so they can be correctly assigned.


Will do.

Best wishes,

Norman


--
Norman Gray  :  https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] HEADS-UP! Next CHICKEN meetup @ Nuremberg, Germany on the horizon!

2016-05-23 Thread Christian Kellermann
* Christian Kellermann  [160520 12:53]:
> It will take place in Nuremberg, Germany, Europe, Planet Earth.
> The date is to be choosen from the following three:
> * September 23-25th

That's the date with the most votes. So be it.

Hope to see you all there?

--
May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Invitation to a weekend of scheme/lisp hacking

2016-05-23 Thread Christian Kellermann
Dear picolisp readers,

As some of you know I am an active member of the CHICKEN scheme
community. For that I am organising a little "conference" / gathering
of interested scheme and lisp users in Nuremberg, Germany on September
23rd-25th.

As there's plenty of room available I broadened the invitation scope
to all interested schemers and lispers.

So if you want to be able to hack on a picolisp project and discuss
lispy stuff with other people afk you are invited to drop by.

I'd appreciate it if you add yourself to the list of attendees, so I
know how many people to expect. If you like drop me a mail so I can
reach you should there be some changes in plans.

You can read up the details here:

http://wiki.call-cc.org/event/chicken-summer-2016

Hope to see a lot of you there!

Christian


--
May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users