Re: Loading packages




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

.



Relevant Pages

  • Re: Loading packages
    ... Where do the package files go? ... where do I put the lexer files? ... your point of view it's just important to load them in the right order ... Probably you should change the current directory in lisp to the lexer ...
    (comp.lang.lisp)
  • Re: Loading packages
    ... I just want to put (use-package "lexer") at the top of my source file and let the lexer package load what it needs. ... Package definitions are normal Lisp code. ...
    (comp.lang.lisp)
  • Re: Loading packages
    ... I just want to put (use-package "lexer") at the top of my source file and let the lexer package load what it needs. ... Package definitions are normal Lisp code. ...
    (comp.lang.lisp)
  • Loading packages
    ... 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 ... doesn't exist when I try to load them. ...
    (comp.lang.lisp)
  • Re: use-package & name conflict: why they are not deferred?
    ... if current package is a home package for one of conflicting ... of some Lisp program. ... I don't think there is that much 'modern' to C++ and Java (the language). ... (append (required-args d-a) ...
    (comp.lang.lisp)