From: Matt
Subject: Loading packages
Date: 
Message-ID: <7sQDf.3245$Nv2.1909@newsread1.news.atl.earthlink.net>
You guys, please help,  I'm going nuts trying to write a lexer
in Lisp and I can't take it anymore.  I downloaded a package
from, ah, the internet, Michael Parker to be exact, and I can't
figure out how to load it into CLisp.  It has three different
packages that all have to be used together apparently, and they
share file names, so I put them in three different folders:
clawk, lexer and regex.  I want to use the lexer package, but
it needs the other two.  The lexer package has these files:

    lexer.lisp
    lexer.system
    lexer.translations
    packages.lisp

The other packages have similar files.  They all have a file
called "packages.lisp".  Can anyone tell me what the deal is
with these?  What is packages.lisp and what are the .system
and .translations files for?  And what commands do I need to
issue to use them?  It keeps telling me that some package
doesn't exist when I try to load them.  I can't figure it out
and there's no documentation or anything.

Thanks!
Matt

From: justinhj
Subject: Re: Loading packages
Date: 
Message-ID: <1138745312.756911.114190@g47g2000cwa.googlegroups.com>
Matt wrote:
> You guys, please help,  I'm going nuts trying to write a lexer
> in Lisp and I can't take it anymore.  I downloaded a package
> from, ah, the internet, Michael Parker to be exact, and I can't
> figure out how to load it into CLisp.  It has three different
> packages that all have to be used together apparently, and they
> share file names, so I put them in three different folders:
> clawk, lexer and regex.  I want to use the lexer package, but
> it needs the other two.  The lexer package has these files:
>
>     lexer.lisp
>     lexer.system
>     lexer.translations
>     packages.lisp
>
> The other packages have similar files.  They all have a file
> called "packages.lisp".  Can anyone tell me what the deal is
> with these?  What is packages.lisp and what are the .system
> and .translations files for?  And what commands do I need to
> issue to use them?  It keeps telling me that some package
> doesn't exist when I try to load them.  I can't figure it out
> and there's no documentation or anything.
>
> Thanks!
> Matt

The book Practical Common Lisp has a nice introduction to packages
including what you would put in a packages.lisp file.

http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html

Personally I find the best way to understand packages is to create and
play with them on the REPL first.

You should be doing a defpackage for each package you want to use in
the packages.lisp, and then when you want to use the code use
in-package to say that this is the package you are now using.

Sounds like what you've done is put a couple of different packages.lisp
into one folder and lost one of them? You need to merge them rather
than overwrite them.

Justin
From: Matt
Subject: Re: Loading packages
Date: 
Message-ID: <Q_%Df.8925$rH5.736@newsread2.news.atl.earthlink.net>
justinhj wrote:

> Personally I find the best way to understand packages is to create and
> play with them on the REPL first.
> 
> You should be doing a defpackage for each package you want to use in
> the packages.lisp, and then when you want to use the code use
> in-package to say that this is the package you are now using.
> 
> Sounds like what you've done is put a couple of different packages.lisp
> into one folder and lost one of them? You need to merge them rather
> than overwrite them.

Thanks for the reply.  Where do the package files go?  If I have
prog.lisp in \prog\lisp, and I want to use the lexer package in
prog.lisp, where do I put the lexer files?  Right now, I have them
in \prog\lisp\lexer.  Do I just say (load "lexer/package.lisp")
and then (load "lexer/lexer.lisp")?

Thanks!
Matt
From: justinhj
Subject: Re: Loading packages
Date: 
Message-ID: <1138803841.600124.287680@f14g2000cwb.googlegroups.com>
Matt wrote:
> justinhj wrote:
>
> Thanks for the reply.  Where do the package files go?  If I have
> prog.lisp in \prog\lisp, and I want to use the lexer package in
> prog.lisp, where do I put the lexer files?  Right now, I have them
> in \prog\lisp\lexer.  Do I just say (load "lexer/package.lisp")
> and then (load "lexer/lexer.lisp")?

>From lisps point of view it doesn't matter where the files are. From
your point of view it's just important to load them in the right order
for the dependencies involved.

Probably you should change the current directory in lisp to the lexer
directory, load the package.lisp, load the other lisp files, then
change to the prog directory and load that package and other lisp
files.

That should work. If it does then you could put these steps into a lisp
file somewhere that does it all for you.

Justin
From: Matt
Subject: Re: Loading packages
Date: 
Message-ID: <Xr4Ef.4322$Nv2.3124@newsread1.news.atl.earthlink.net>
justinhj wrote:
> Matt wrote:
>> justinhj wrote:
>>
>> Thanks for the reply.  Where do the package files go?  If I have
>> prog.lisp in \prog\lisp, and I want to use the lexer package in
>> prog.lisp, where do I put the lexer files?  Right now, I have them
>> in \prog\lisp\lexer.  Do I just say (load "lexer/package.lisp")
>> and then (load "lexer/lexer.lisp")?
> 
>>From lisps point of view it doesn't matter where the files are. From
> your point of view it's just important to load them in the right order
> for the dependencies involved.
> 
> Probably you should change the current directory in lisp to the lexer
> directory, load the package.lisp, load the other lisp files, then
> change to the prog directory and load that package and other lisp
> files.
> 
> That should work. If it does then you could put these steps into a lisp
> file somewhere that does it all for you.

Ok, thanks Justin.  I guess I'm just expecting too much from this.
I just want to put (use-package "lexer") at the top of my source file
and let the lexer package load what it needs.  I thought there must be
a standard way of doing that but I guess that's not reasonable or
something.  It has a file called lexer.translations which has a place
for the lexer module path, but I don't know what it's for.  It says
#+:Lispworks at the top, so maybe it's just a Lispworks thing.

Anyway, thanks!  I got it all loaded up and it still doesn't work, so
I guess I give up.

Matt
From: AJ Rossini
Subject: Re: Loading packages
Date: 
Message-ID: <1138814502.107985.78510@o13g2000cwo.googlegroups.com>
Hmm...  you basically need to load all the files, i.e.  (load
"file1.lisp")
etc, and then depending on what package you are currently in, set that
package and (use "") the package you want to include.  Or reference
out-of-package, as appropriate.

(require)  isn't really useful, the way it is in Emacs Lisp, where it
loads the particular files and (provide) tells you that the file is
loaded.

To everyone else --
I also get really confused as well by "package names" vs. "file names
of packages".  The general issue is that newbies, or senile oldies like
me,
forget that package names and file names are orthogonal beasts.   Of
course, I remember after a while, but I probably should write a

(tony-require "packagename" "filename")

macro that will let me do the right thing.  Of course, it might be
better not to, so that I eventually will remember the dicotomy.

best,
-tony
From: Pascal Bourguignon
Subject: Re: Loading packages
Date: 
Message-ID: <87d5i6g78j.fsf@thalassa.informatimago.com>
"AJ Rossini" <··········@gmail.com> writes:
> [...]
> I also get really confused as well by "package names" vs. "file names
> of packages".  The general issue is that newbies, or senile oldies like
> me,
> forget that package names and file names are orthogonal beasts.   Of
> course, I remember after a while, but I probably should write a
>
> (tony-require "packagename" "filename")
>
> macro that will let me do the right thing.  Of course, it might be
> better not to, so that I eventually will remember the dicotomy.

REQUIRE doesn't requires a package, but a _module_: (REQUIRE module filename)

With logical pathnames, you can map easily package names to file names.


For example, when I want to load the package "COM.HP.ZEBU", I type:

  (load "PACKAGES:COM;HP;ZEBU")

and for "COM.INFORMATIMAGO.COMMON-LISP.STRING", I type:
  
  (load "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;STRING")


Even for ASDF, you can write a little mapping function, so now I can:

  (asdf:operate 'asdf:load-op :com.informatimago.common-lisp)

and it actually loads:

  "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;SYSTEM.ASD"


But for this, you need to put some order in the mess of packages and
systems, and do some renaming, or at least accept to live with some
inconsistencies. 

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

HANDLE WITH EXTREME CARE: This product contains minute electrically
charged particles moving at velocities in excess of five hundred
million miles per hour.
From: justinhj
Subject: Re: Loading packages
Date: 
Message-ID: <1138819781.897837.182990@z14g2000cwz.googlegroups.com>
Matt wrote:
> justinhj wrote:
> > Matt wrote:
> >> justinhj wrote:
> Ok, thanks Justin.  I guess I'm just expecting too much from this.
> I just want to put (use-package "lexer") at the top of my source file
> and let the lexer package load what it needs.  I thought there must be
> a standard way of doing that but I guess that's not reasonable or
> something.  It has a file called lexer.translations which has a place
> for the lexer module path, but I don't know what it's for.  It says
> #+:Lispworks at the top, so maybe it's just a Lispworks thing.
>
> Matt

Ah Ok.

Well there is something that does that, it's called asdf. It's not part
of common lisp, it's a useful add on.

See http://www.cliki.net/asdf

There are many asdf packages available, and once you get asdf working
you can download and install them in one line, and load and run them
with one line, which is what I think you're after. But if the code you
want to run is not packaged up as an asdf then you can't use this
system.

The package system you've been experimenting with is more like C++
namespaces if you're familiar with those.

Justin
From: Matt
Subject: Re: Loading packages
Date: 
Message-ID: <lHnEf.9377$rH5.6236@newsread2.news.atl.earthlink.net>
justinhj wrote:

> Well there is something that does that, it's called asdf. It's not part
> of common lisp, it's a useful add on.
> 
> See http://www.cliki.net/asdf
> 
> There are many asdf packages available, and once you get asdf working
> you can download and install them in one line, and load and run them
> with one line, which is what I think you're after. But if the code you
> want to run is not packaged up as an asdf then you can't use this
> system.

Ok, gotcha.  That sounds like a good thing.


> The package system you've been experimenting with is more like C++
> namespaces if you're familiar with those.

Yeah, that about all I would need (if I ever need it).

Lisp is very oriented towards the single developer working by
himself, isn't it.  That what it seems like to me.  There isn't
any way to enforce rules in Lisp (like encapsulation) is there?

Matt
From: Thomas A. Russ
Subject: Re: Loading packages
Date: 
Message-ID: <ymi4q3hpu4d.fsf@sevak.isi.edu>
Matt <·····@invalid.net> writes:

> Lisp is very oriented towards the single developer working by
> himself, isn't it.  That what it seems like to me.  There isn't
> any way to enforce rules in Lisp (like encapsulation) is there?

Well, I think the first sentence is a bit too broad.  Instead, I would
say that Lisp is oriented toward programmers who know what they are
doing.  (The "enough rope" philosophy of language design). In fact, the
Lisp package system is much older than the C++ namespace system.  That
was, in fact, part of the solution to working in larger groups.  By
partitioning the namespace, you avoided accidental name collisions.

While it is true that there is generally no enforcement of the rules,
there are a number of conventions about using lisp constructs that give
you the encapsulation you seek.  It's just that lisp, under the
assumption that programmers are competent, provides ways to circumvent
such encapsulation.  This is, IMO, a good thing, since I've often used
Java libraries where there was something I needed to get at but
couldn't, since the API wasn't present.  That then meant modifying or
writing my own.

In lisp, the primary encapsulation approach is based on symbol
visibility from packages.  External symbols are meant to be accessed
either as function, class or variable names.  Internal symbols are not
meant to be accessed and it is generally understood that if you use
them, it is at your risk as a programmer, since the author of the code
didn't anticipate your use and could change things at any time.  It is a
similar issue with slot accessors and SLOT-VALUE in CLOS.

You can do some forced encapsulation via closures and FLET or LABELS
blocks, but most developers don't really use them for purposes of
encapsulation.  It goes against the philosophy of trusting the
programmer to "do the right thing", since they are the one trying to
solve a particular problem.

-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Pascal Bourguignon
Subject: Re: Loading packages
Date: 
Message-ID: <877j8dej9r.fsf@thalassa.informatimago.com>
Matt <·····@invalid.net> writes:
> Lisp is very oriented towards the single developer working by
> himself, isn't it.  That what it seems like to me.  There isn't
> any way to enforce rules in Lisp (like encapsulation) is there?

Try to get at this value:

(defun make-protected-value (ival ipas)
  (let ((value ival) 
        (password ipas))
    (list (lambda (pass)
              (when (eql pass password)  (values value t)))
          (lambda (nval pass)
              (when (eql pass password)  (setf value nval))))))

(defparameter *protected* (make-protected-value 42 (read)))

(funcall (first  *protected*) ???)
(funcall (second *protected*) newval ???)


In C++, you can easily cast a pointer and access any protected or
private member.  Not so in lisp!
                             

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"What is this talk of "release"?  Klingons do not make software
"releases".  Our software "escapes" leaving a bloody trail of
designers and quality assurance people in its wake."
From: Ulrich Hobelmann
Subject: Re: Loading packages
Date: 
Message-ID: <44c33uF1egbkU1@individual.net>
Matt wrote:
> Ok, thanks Justin.  I guess I'm just expecting too much from this.
> I just want to put (use-package "lexer") at the top of my source file
> and let the lexer package load what it needs.  I thought there must be
> a standard way of doing that but I guess that's not reasonable or
> something.  It has a file called lexer.translations which has a place
> for the lexer module path, but I don't know what it's for.  It says
> #+:Lispworks at the top, so maybe it's just a Lispworks thing.
> 
> Anyway, thanks!  I got it all loaded up and it still doesn't work, so
> I guess I give up.

Not sure what exactly your problem is.

Package definitions are normal Lisp code.  They can be in any file, and 
in any directory, as long as you somehow load them into your running Lisp.

The definition only informs Lisp about your package's existence and 
about what symbols it imports or shadows. (The definition is the Lisp 
code that starts with DEFPACKAGE.)

The USE-PACKAGE inside a file tells Lisp to read the rest of that file 
in the context of that package - somewhat like a package; declaration in 
Java.

So basically just load all of your files; first the package definition, 
then the rest of the code.

The path- and filenames you have to use are as in Unix.  If you (and the 
running Lisp) are in the top directory that contains lexer/foo.lisp, do 
a (load "lexer/foo.lisp").

-- 
Suffering from Gates-induced brain leakage...
From: Edi Weitz
Subject: Re: Loading packages
Date: 
Message-ID: <u4q3iykno.fsf@agharta.de>
On Wed, 01 Feb 2006 16:40:45 +0100, Ulrich Hobelmann <···········@web.de> wrote:

> The USE-PACKAGE inside a file tells Lisp to read the rest of that
> file in the context of that package

Nope, that would be IN-PACKAGE.  USE-PACKAGE is something else.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Ulrich Hobelmann
Subject: Re: Loading packages
Date: 
Message-ID: <44e13nF1mlhrU2@individual.net>
Edi Weitz wrote:
> On Wed, 01 Feb 2006 16:40:45 +0100, Ulrich Hobelmann <···········@web.de> wrote:
> 
>> The USE-PACKAGE inside a file tells Lisp to read the rest of that
>> file in the context of that package
> 
> Nope, that would be IN-PACKAGE.  USE-PACKAGE is something else.

Sorry, was confused.  I didn't really find time for Lisp in a few weeks.

-- 
Suffering from Gates-induced brain leakage...
From: Edi Weitz
Subject: Re: Loading packages
Date: 
Message-ID: <uu0bi3xkg.fsf@agharta.de>
On Thu, 02 Feb 2006 10:18:47 +0100, Ulrich Hobelmann <···········@web.de> wrote:

> I didn't really find time for Lisp in a few weeks.

Must be because of all the off-topic posts... :)

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Ulrich Hobelmann
Subject: Re: Loading packages
Date: 
Message-ID: <44e7ngF1nkjtU1@individual.net>
Edi Weitz wrote:
> On Thu, 02 Feb 2006 10:18:47 +0100, Ulrich Hobelmann <···········@web.de> wrote:
> 
>> I didn't really find time for Lisp in a few weeks.
> 
> Must be because of all the off-topic posts... :)

Heh. :)

I wish the context-switch time to do programming was as small as the 
context-switch time to read (and occasionally write) news.

When I have a larger time block, I usually do stuff I have to do, and 
that isn't Lisp.

-- 
Suffering from Gates-induced brain leakage...
From: Matt
Subject: Re: Loading packages
Date: 
Message-ID: <fDaEf.10097$vU2.1740@newsread3.news.atl.earthlink.net>
Ulrich Hobelmann wrote:
> Matt wrote:
> 
>> Ok, thanks Justin.  I guess I'm just expecting too much from this.
>> I just want to put (use-package "lexer") at the top of my source file
>> and let the lexer package load what it needs.  I thought there must be
>> a standard way of doing that but I guess that's not reasonable or
>> something.  It has a file called lexer.translations which has a place
>> for the lexer module path, but I don't know what it's for.  It says
>> #+:Lispworks at the top, so maybe it's just a Lispworks thing.
>>
>> Anyway, thanks!  I got it all loaded up and it still doesn't work, so
>> I guess I give up.
> 
> 
> Not sure what exactly your problem is.
> 
> Package definitions are normal Lisp code.  They can be in any file, and 
> in any directory, as long as you somehow load them into your running Lisp.
> 
> The definition only informs Lisp about your package's existence and 
> about what symbols it imports or shadows. (The definition is the Lisp 
> code that starts with DEFPACKAGE.)
> 
> The USE-PACKAGE inside a file tells Lisp to read the rest of that file 
> in the context of that package - somewhat like a package; declaration in 
> Java.
> 
> So basically just load all of your files; first the package definition, 
> then the rest of the code.
> 
> The path- and filenames you have to use are as in Unix.  If you (and the 
> running Lisp) are in the top directory that contains lexer/foo.lisp, do 
> a (load "lexer/foo.lisp").

Yeah, as it turns out, I had it working the whole time, it's just
that part of the module is broken I guess. and I was trying to test
the broken part to see if it was working and I thought it wasn't
being loaded right.

Matt
From: senator
Subject: Re: Loading packages
Date: 
Message-ID: <1138871550.270956.245830@g47g2000cwa.googlegroups.com>
Ah, oh well, looks like I'm too late to reply here. But I had a hard
time with this package too. It doesn't seem to work well under
asdf-install, and I ended up untarring and copying files manually. In
the end, I gave up on the system-packaging, and just organised them
into separate folders and wrote a script. I don't really care anymore,
since it "just works" for me now. I had a suspicion that the tarfile I
had was broken (old?/wrong?/just-me? asdf packaging) in some way. Also,
this wasn't helped by my incompetence in corrupting the tarball
accidentally at first. So, my load script for this is:

(load "~/clisp/clawksys/regex/packages.lisp")
(load "~/clisp/clawksys/regex/macs.lisp")
(load "~/clisp/clawksys/regex/parser.lisp")
(load "~/clisp/clawksys/regex/optimize.lisp")
(load "~/clisp/clawksys/regex/gen.lisp")
(load "~/clisp/clawksys/regex/closure.lisp")
;;;;; ;(load "~/clisp/clawksys/regex/expand.lisp") ;; NB: This line has
been commented out.
(load "~/clisp/clawksys/regex/regex.lisp")
(load "~/clisp/clawksys/regex/regexp-test-suite.lisp")
(load "~/clisp/clawksys/regex/retest.lisp")

(load "~/clisp/clawksys/clawk/packages.lisp")
(load "~/clisp/clawksys/clawk/clawk.lisp")
(load "~/clisp/clawksys/clawk/clawktest.lisp")

(load "~/clisp/clawksys/lexer/packages.lisp")
(load "~/clisp/clawksys/lexer/lexer.lisp")

I chose to load lisp and not precompiled fas because not compiling
seems to give more debugging information in clisp (I should really try
out some other implementations too, to "see the world", but I haven't
got around to that yet).

Any comment on the lexer itself? I've had a play around, and just got
around to learning about Yacc & syntax (no wait, wrong package: this is
the next level up with cl-yacc). I'm currently having problems with
regex (the clawk one, not the builtin clisp one) choking on large files
(perhaps I need to compile it? Does clisp do tail-calls only after you
compile?). Anyway, would appreciate any discovery you might be able to
share. There doesn't seem to be much to go by other that the
documentation itself at
http://www.geocities.com/mparker762/clawk.html

It looks like I've ended asking too many questions there... well hope
the load script is useful, or whatever. Cheers.

--------
"Take this REPL, brother, and may it serve you well." -- SLIME
From: Matt
Subject: Re: Loading packages
Date: 
Message-ID: <6AnEf.9374$rH5.6566@newsread2.news.atl.earthlink.net>
senator wrote:
> Ah, oh well, looks like I'm too late to reply here. But I had a hard
> time with this package too. It doesn't seem to work well under
> asdf-install, and I ended up untarring and copying files manually. In
> the end, I gave up on the system-packaging, and just organised them
> into separate folders and wrote a script. I don't really care anymore,
> since it "just works" for me now. I had a suspicion that the tarfile I
> had was broken (old?/wrong?/just-me? asdf packaging) in some way. Also,
> this wasn't helped by my incompetence in corrupting the tarball
> accidentally at first. So, my load script for this is:
> 
> (load "~/clisp/clawksys/regex/packages.lisp")
> (load "~/clisp/clawksys/regex/macs.lisp")
> (load "~/clisp/clawksys/regex/parser.lisp")
> (load "~/clisp/clawksys/regex/optimize.lisp")
> (load "~/clisp/clawksys/regex/gen.lisp")
> (load "~/clisp/clawksys/regex/closure.lisp")
> ;;;;; ;(load "~/clisp/clawksys/regex/expand.lisp") ;; NB: This line has
> been commented out.
> (load "~/clisp/clawksys/regex/regex.lisp")
> (load "~/clisp/clawksys/regex/regexp-test-suite.lisp")
> (load "~/clisp/clawksys/regex/retest.lisp")
> 
> (load "~/clisp/clawksys/clawk/packages.lisp")
> (load "~/clisp/clawksys/clawk/clawk.lisp")
> (load "~/clisp/clawksys/clawk/clawktest.lisp")
> 
> (load "~/clisp/clawksys/lexer/packages.lisp")
> (load "~/clisp/clawksys/lexer/lexer.lisp")

Yeah, I made something similar.  Lexer doesn't use the Clawk module,
though, so you can get rid of that for Lexer.  He copied and pasted
the part of Clawk he needed into Lexer.  The tests, too, are
unnecessary.


> I chose to load lisp and not precompiled fas because not compiling
> seems to give more debugging information in clisp (I should really try
> out some other implementations too, to "see the world", but I haven't
> got around to that yet).

I haven't tried compiling it.   I just looked at it for a minute.


> Any comment on the lexer itself? I've had a play around, and just got
> around to learning about Yacc & syntax (no wait, wrong package: this is
> the next level up with cl-yacc).

Well, as it turns out, it doesn't work the way I want it to, so I
wound up writing my parser by hand.  The Lexer doesn't seem to support
start states or multiple lexers very well and I need that.


> I'm currently having problems with
> regex (the clawk one, not the builtin clisp one) choking on large files
> (perhaps I need to compile it? Does clisp do tail-calls only after you
> compile?).

I don't know.  I don't know anything about how CLisp optimizes tail
recursion.


> Anyway, would appreciate any discovery you might be able to
> share. There doesn't seem to be much to go by other that the
> documentation itself at
> http://www.geocities.com/mparker762/clawk.html

Nope, sorry, I didn't play with it long enough.  I'm not really
sure I understand the purpose of Clawk.

Good luck!
Matt
From: Thomas A. Russ
Subject: Re: Loading packages
Date: 
Message-ID: <ymiy80uq4ys.fsf@sevak.isi.edu>
Matt <·····@invalid.net> writes:
>     lexer.lisp
>     lexer.system
>     lexer.translations
>     packages.lisp

This organization suggests to me that some sort of system-building tool
like perhaps DEFSYSTEM was used by the original author.  If the code
sets are placed in a proper place and registered, then the
system-building tool will give you an interface that will conveniently
load the files in the proper order, probably also taking care of
dependencies.

The file extensions suggest some variant of DEFSYSTEM was used.  (It
doesn't use ASDF extensions).

I suppose some clues might be found in the lexer.system file.  I assume
that lexer.translations is a set of logical filename translation rules.

-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Matt
Subject: Re: Loading packages
Date: 
Message-ID: <rwaEf.10092$vU2.3941@newsread3.news.atl.earthlink.net>
Thomas A. Russ wrote:
> Matt <·····@invalid.net> writes:
>>     lexer.lisp
>>     lexer.system
>>     lexer.translations
>>     packages.lisp
> 
> This organization suggests to me that some sort of system-building tool
> like perhaps DEFSYSTEM was used by the original author.  If the code
> sets are placed in a proper place and registered, then the
> system-building tool will give you an interface that will conveniently
> load the files in the proper order, probably also taking care of
> dependencies.
> 
> The file extensions suggest some variant of DEFSYSTEM was used.  (It
> doesn't use ASDF extensions).
> 
> I suppose some clues might be found in the lexer.system file.  I assume
> that lexer.translations is a set of logical filename translation rules.

Yeah, you're right.  The .system file looks like this:

--cut--
;;; -*- Mode: Lisp; Syntax: ANSI-Common-lisp; Package: CL-USER; Base: 10 -*-

(in-package "CL-USER")

(load-logical-pathname-translations "LEXER")

(mk:defsystem "LEXER"
	      :source-extension "lisp"
	      :source-pathname (translate-logical-pathname "LEXER:SRC;")
	      :components (
                        (:file "packages")
                        (:file "lexer")))



(defun lc-lexer ()
   (mk:compile-system "LEXER"))
(defun ld-lexer ()
   (mk:load-system "LEXER"))

--cut--

and the .translations file is this:

--cut--
#+:Lispworks
(setf (logical-pathname-translations "LEXER")
       '(("LEXER:SYS;*" "d:/lisp/*")
         ("LEXER:SRC;*" "d:/lisp/lexer/*")))

--cut--

I just thought maybe that this was some standard part of Lisp and
I just didn't know how to operate it or something.  I'm still not
really sure exactly what all is standardized in the Lisp language
and what isn't.  I know about the HyperSpec, but if something's
not where I think it is, I can't really be sure if it isn't
someplace else that I haven't looked.

Matt
From: Thomas A. Russ
Subject: Re: Loading packages
Date: 
Message-ID: <ymiek2mpskx.fsf@sevak.isi.edu>
Matt <·····@invalid.net> writes:

> Thomas A. Russ wrote:
> > Matt <·····@invalid.net> writes:
> >>     lexer.lisp
> >>     lexer.system
> >>     lexer.translations
> >>     packages.lisp
> > This organization suggests to me that some sort of system-building tool
> 
> > like perhaps DEFSYSTEM was used by the original author.
...

> Yeah, you're right.  The .system file looks like this:
> 
> --cut--
> ;;; -*- Mode: Lisp; Syntax: ANSI-Common-lisp; Package: CL-USER; Base: 10 -*-
> 
> (in-package "CL-USER")
> 
> (load-logical-pathname-translations "LEXER")
> 
> (mk:defsystem "LEXER"
...

OK, so this is the MK (Mark Kantrowicz) defsystem code.
You can get more information and a link to it from

  http://www.cliki.net/mk-defsystem

Do you now have enough to go on?  Or would you like more details?
From: Matt
Subject: Re: Loading packages
Date: 
Message-ID: <pInEf.9378$rH5.5020@newsread2.news.atl.earthlink.net>
Thomas A. Russ wrote:

> OK, so this is the MK (Mark Kantrowicz) defsystem code.
> You can get more information and a link to it from
> 
>   http://www.cliki.net/mk-defsystem
> 
> Do you now have enough to go on?  Or would you like more details?

No, I'm good.  Thanks a lot!  I appreciate the explanation!

Matt
From: Robert Dodier
Subject: .system file, was: Loading packages
Date: 
Message-ID: <1138823699.616816.144850@g49g2000cwa.googlegroups.com>
Matt wrote:

> The lexer package has these files:
>
>     lexer.lisp
>     lexer.system
>     lexer.translations
>     packages.lisp

I think the key here is the lexer.system file.
Not having seen it, I'll guess that it contains information
which tells how to load the .lisp files.
Maybe someone can explain to Matt how to use the .system file.

I don't think Matt's problems have much to do with Lisp packages.
Judging by Matt's replies, it appears he's using "package" to mean
a collection of related files.

For what it's worth,
Robert Dodier
From: Matt
Subject: Re: .system file, was: Loading packages
Date: 
Message-ID: <bb9Ef.4497$Nv2.783@newsread1.news.atl.earthlink.net>
Robert Dodier wrote:

> I don't think Matt's problems have much to do with Lisp packages.
> Judging by Matt's replies, it appears he's using "package" to mean
> a collection of related files.

Yeah, I was, sorry about that.  I'm pretty sloppy with terminology.
It's a habit I have.

Matt