Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Lisp Libraries

Name: Anonymous 2012-01-28 12:49

In other languages you can do something like
import library1
import library2
...

And you'll automatically have access to those libraries. What is the equivalent in Lisp?

Name: Anonymous 2012-01-28 12:58

I have no idea but I'd guess it's something like this:
))))))))))))))))))))))))))))))))))))))))))))))

Name: Anonymous 2012-01-28 12:58

Lisp is an abstract category of languages. Each dialect does this kind of thing differently. Do you want to know about Common Lisp, Scheme, Racket, Clojure, Picolisp, or what?

Name: Anonymous 2012-01-28 13:04

>>3
CL.

Name: Anonymous 2012-01-28 13:35

>>1
ASDF to load/build them. Quicklisp if you want to automatically intall/manage them like various *nix package systems.

In SLIME, if you want to load one, all it takes is ,l<enter> then type the system(library) name:

; loading system definition from
; \home\username\sbcl\site\cl-ppcre-2.0.1\cl-ppcre.asd into
; #<PACKAGE "ASDF0">
; registering #<SYSTEM :CL-PPCRE {246E1C01}> as CL-PPCRE
; registering #<SYSTEM :CL-PPCRE-TEST {24842271}> as CL-PPCRE-TEST


Packages are something else in CL (for managing symbols), although a system tends to contain at least one package.

Name: >>5 2012-01-28 13:38

Obviously, if you want to have direct access (without typing the package name) to symbols from another package, you can just tweak your own project's defpackage form, or call user-package or import directly.

Name: Anonymous 2012-01-28 13:38

*use-package

Name: VIPPER 2012-01-28 14:33

Could someone post an explenation of how to load or build a library in with ASDF in SBCL, assuming i dont have it "installed" (i mean using the run-sbcl thing in sbcl).

Or any other kind of example.

Name: Anonymous 2012-01-28 14:44

>>3
>abstract category
fucking lispers. you ruin Lisp for the rest of us.

why you people insist in speaking as platon? abstract category. Bullshit, just call it a family of languages

fucking posers

Name: Anonymous 2012-01-28 15:09

>>9
implying

Name: Anonymous 2012-01-28 16:21

Lisp without parens = not shit.

Name: Anonymous 2012-01-28 17:11

>>8
I alrady did, although there's many ways depending on what you want to do. If you're writing an asdf library(system) yourself, consult the documentation on how to set up dependencies (it's simple enough, here's a small tutorial: http://xach.livejournal.com/130040.html), otherwise you can load it via SLIME using ,l (type those keys in the REPL), or by doing (asdf:oos 'asdf:load-op '#:system-name), then doing (use-package '#:the-package-name). Of course, if you don't have it installed, it means you have to copy or link the project files in the right path (depends on how you set up ASDF, this is very user/OS-specific and you usually have to add a line or two of code as to where/how it loads stuff; if you're too lazy to do that by yourself, you can use quicklisp or something similar which does it for you).

Don't change these.
Name: Email:
Entire Thread Thread List