require function is lisp 
Author Message
 require function is lisp

I noticed the require function is obsolete (it does not work in my
implementation, ACL), but I have some code from a book that uses it
quite a bit. If I try "load" it tends to gives lots of warnings saying
that it is reloading the same stuff over and over. Is there a better
substitution of require than load?

--
Richard Giuly

(remove animal from email address)



Sun, 03 Aug 2003 09:59:56 GMT  
 require function is lisp

Quote:
> I noticed the require function is obsolete (it does not work in my
> implementation, ACL), but I have some code from a book that uses it
> quite a bit. If I try "load" it tends to gives lots of warnings
> saying that it is reloading the same stuff over and over. Is there a
> better substitution of require than load?

require ends up being useful for loading extra modules provided by an
implementation.  For example, in LispWorks, you might say something
like:

(require "comm")

and their implementation of Common Lisp loads the networking
extensions not specified by the ANSI CL standard.

Other implementations use symbols to name the modules.  e.g. in ACL:

(require :clx)

would load in the :xlib package, etc.  I find it to be a handy system
for implementations.  Every language environment seems to have
something of this nature, though I think if you want to do the right
thing for _your_ stuff, use defsystem.  Then, you can load systems,
compile them, etc.  Also, in case you care, there are defsystem
implementations that work on just about every ANSI CL out there, and
are platform-independent for the most part.

dave



Thu, 07 Aug 2003 01:29:12 GMT  
 require function is lisp

Quote:

> require ends up being useful for loading extra modules provided by an
> implementation.  For example, in LispWorks, you might say something
> like:

> (require "comm")

> and their implementation of Common Lisp loads the networking
> extensions not specified by the ANSI CL standard.

> Other implementations use symbols to name the modules.  e.g. in ACL:

> (require :clx)

> would load in the :xlib package, etc.  

LispWorks can use symbols too but you have to say

(require :|comm|)

How does ACL behave in its different case modes?

<g,d&r>

--

Glaer ok reifr skyli gumna hverr, unz sinn ber bana.



Thu, 07 Aug 2003 05:21:14 GMT  
 require function is lisp

Quote:


> > Other implementations use symbols to name the modules.

>   Nope.  The variable *modules*, off of which require and provide operate,
>   is defined to contain a list of strings.  require and provide accept
>   string designators.

thanks for the clarification.  I never thought to try what Lieven
said.

take care,
dave



Fri, 08 Aug 2003 03:34:31 GMT  
 require function is lisp

Quote:


> > thanks for the clarification.  I never thought to try what Lieven said.

>   I highly recommend reading the standard over "trying things out" that are
>   specified therein.  Some knowledge should just not be empirical.

But if people read the standard *before* beginning the implementation,
things might just work correctly the *first* time, and even
interoperate reliably without kludge upon kludge.  *Then* where would
be?  Millions of incompetent `programmers' would be out of work!

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



Sat, 09 Aug 2003 01:08:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Common Lisp: passing a function to a function and applying it

2. Which Lisp am I running?

3. Genetic Programming (LISP) assistance urgently required

4. Byte-compiling lisp interpreter required

5. Help required on Limitations of Lisp

6. static functions and required runtime memory

7. function prototype required

8. require a CPS calc function....

9. Do Tcl_AsyncXXX functions require a threaded build?

10. The functions provide and require are deprecated.

11. I am not deaf, but am I mute?

12. require, require-library in PLT-scheme

 

 
Powered by phpBB® Forum Software