hello,
i try to execute a socket exemple from the Common Lisp Cookbook
it says that is require library port, which is a part of CLOCC
so i do this :
< lam > apt-cache search clocc port
clocc-port - The Common Lisp library 'port' from CLOCC.
i install it, and i have theses files :
< lam : port > pwd
/usr/share/common-lisp/repositories/clocc/port
< lam : port > la
ext.lisp gray.lisp net.lisp package.lisp port.system proc.lisp shell.lisp sys.lisp
in a test file i write this :
(require :port)
(ipaddr-to-dotted "128.18.65.4")
and in emacs i have this error :
* (load "test.lisp")
; Loading #p"/home/nlamirault/bin/test.lisp".
Warning: CLOCC-PORT also exports the following symbols:
(CLOCC-PORT:PROCESS-WAIT STREAM-LISTEN
CLOCC-PORT:FINALIZE
CLOCC-PORT:MKDIR
CLOCC-PORT:SYSINFO
CLOCC-PORT:CURRENT-PROCESS
CLOCC-PORT:KILL-PROCESS
CLOCC-PORT:SHOW-PROCESSES
STREAM-FORCE-OUTPUT
CLOCC-PORT:SOCKET-HOST/PORT
CLOCC-PORT:STRING->TZ
CLOCC-PORT:WITH-OPEN-PIPE
STREAM-PEEK-CHAR
CLOCC-PORT:OPEN-SOCKET
CLOCC-PORT:TZ->STRING
CLOCC-PORT:SOCKET-SERVICE-PORT
CLOCC-PORT:PROCESS-WAIT-WITH-TIMEOUT
FUNDAMENTAL-BINARY-INPUT-STREAM
CLOCC-PORT:PIPE-OUTPUT
CLOCC-PORT:GIVEUP-LOCK
CLOCC-PORT:CLASS-SLOT-LIST
CLOCC-PORT:OPEN-SOCKET-SERVER
CLOCC-PORT:RESOLVE-HOST-IPADDR
CLOCC-PORT:Y-OR-N-P-TIMEOUT
CLOCC-PORT:HOSTENT-ADDR-TYPE
STREAM-TERPRI
FUNDAMENTAL-CHARACTER-OUTPUT-STREAM
FUNDAMENTAL-CHARACTER-STREAM
CLOCC-PORT:SOCKET-ACCEPT
FUNDAMENTAL-INPUT-STREAM
CLOCC-PORT:TIMEOUT
CLOCC-PORT:DEFAULT-DIRECTORY
CLOCC-PORT:HOSTENT
CLOCC-PORT:SOCKET-STRING
CLOCC-PORT:RMDIR
CLOCC-PORT:CLOSE-PIPE
STREAM-UNREAD-CHAR
FUNDAMENTAL-STREAM
CLOCC-PORT:GET-LOCK
CLOCC-PORT:SOCKET-SERVER-CLOSE
CLOCC-PORT:SOCKET-SERVER
STREAM-FINISH-OUTPUT
FUNDAMENTAL-BINARY-STREAM
CLOCC-PORT:ALL-PROCESSES
CLOCC-PORT:PROBE-DIRECTORY
CLOCC-PORT:IPADDR-TO-DOTTED
CLOCC-PORT:+WEEK-DAYS+
STREAM-WRITE-CHAR
CLOCC-PORT:PROCESS-NAME
STREAM-FRESH-LINE
STREAM-READ-LINE
CLOCC-PORT:MAYBE-Y-OR-N-P
CLOCC-PORT:HOSTENT-ADDR-LIST
CLOCC-PORT:HOSTENT-ALIASES
CLOCC-PORT:+TIME-ZONES+
FUNDAMENTAL-CHARACTER-INPUT-STREAM
STREAM-LINE-COLUMN
CLOCC-PORT:PROCESS-ACTIVE-P
CLOCC-PORT:NETWORK
CLOCC-PORT:PROCESS-YIELD
CLOCC-PORT:SOCKET-SERVER-HOST/PORT
CLOCC-PORT:HOSTENT-NAME
CLOCC-PORT:RESTART-PROCESS
CLOCC-PORT:ARGLIST
CLOCC-PORT:CHDIR
REQUIRED-ARGUMENT
CLOCC-PORT:MAKE-LOCK
CLOCC-PORT:+THREADS-P+
CLOCC-PORT:DOTTED-TO-IPADDR
CLOCC-PORT:CURRENT-TIME
FUNDAMENTAL-OUTPUT-STREAM
STREAM-READ-BYTE
CLOCC-PORT:SERVENT-ALIASES
CLOCC-PORT:PROCESSP
STREAM-READ-CHAR
CLOCC-PORT:VARIABLE-SPECIAL-P
CLOCC-PORT:SOCKET
STREAM-WRITE-STRING
CLOCC-PORT:PATHNAME-ENSURE-NAME
STREAM-ADVANCE-TO-COLUMN
CLOCC-PORT:WITHOUT-SCHEDULING
CLOCC-PORT:SERVENT-PORT
CLOCC-PORT:PROCESS-WHOSTATE
STREAM-WRITE-BYTE
STREAM-START-LINE-P
CLOCC-PORT:WITH-LOCK
STREAM-READ-CHAR-NO-HANG
CLOCC-PORT:CLASS-SLOT-INITARGS
FUNDAMENTAL-BINARY-OUTPUT-STREAM
CLOCC-PORT:GETENV
CLOCC-PORT:INTERRUPT-PROCESS
CLOCC-PORT:RUN-PROG
CLOCC-PORT:+MONTH-NAMES+
STREAM-CLEAR-INPUT
CLOCC-PORT:WITH-TIMEOUT
CLOCC-PORT:SERVENT-PROTO
CLOCC-PORT:PATH
CLOCC-PORT:LOGIN
STREAM-CLEAR-OUTPUT
CLOCC-PORT:MAKE-PROCESS
CLOCC-PORT:PIPE-INPUT
CLOCC-PORT:SERVENT-NAME)
Error in KERNEL:%COERCE-TO-FUNCTION: the function IPADDR-TO-DOTTED is undefined.
Restarts:
0: [CONTINUE] Return NIL from load of "test.lisp".
1: [ABORT ] Return to Top-Level.
Debug (type H for help)
(KERNEL:%COERCE-TO-FUNCTION IPADDR-TO-DOTTED)
Source:
; File has been modified since compilation:
; target:code/fdefinition.lisp
; Using form offset instead of character position.
(ERROR 'UNDEFINED-FUNCTION :NAME NAME)
0]
so i don't really understand
could you help me ?
thanks
Ps : i have debian woody (GNU Emacs 21, CMUCL 3.0.9, clocc-port 0.1-20011103-1)
--
Lam
Lam <···················@nospam.org> writes:
Not using clocc, but as a guess:
> in a test file i write this :
>
> (require :port)
>
> (ipaddr-to-dotted "128.18.65.4")
>
Shouldn't the second line be
(clocc-port:ipaddr-to-dotted "128.18.65.4")
?
Regards,
Rudi
From: Peter Van Eynde
Subject: Re: Problem with CLOCC on debian
Date:
Message-ID: <867klfxll7.fsf@debian.org>
Lam <···················@nospam.org> writes:
> < lam > apt-cache search clocc port
> clocc-port - The Common Lisp library 'port' from CLOCC.
Good
> < lam : port > pwd
> /usr/share/common-lisp/repositories/clocc/port
There is no need to go to this directory.
···@mustyr-host:~ :) $lisp
CMU Common Lisp release x86-linux 3.0.12 18d+ 22 May 2002 build 3350, running on mustyr-host
For support see http://www.cons.org/cmucl/support.html Send bug reports to the debian BTS.
or to ········@debian.org
type (help) for help, (quit) to exit, and (demo) to see the demos
Loaded subsystems:
Python 1.0, target Intel x86
CLOS based on PCL version: September 16 92 PCL (f)
* (require :port)
; Loading #p"/usr/share/common-lisp/repositories/clocc/port/port.system".
(#<FILE: shell> #<FILE: proc> #<FILE: net> #<FILE: sys> #<FILE: gray>
#<FILE: ext> #<FILE: package>)
* (apropos "ipaddr-to-dotted")
CLOCC-PORT:IPADDR-TO-DOTTED (defined)
*
> in a test file i write this :
>
> (require :port)
>
> (ipaddr-to-dotted "128.18.65.4")
As you can see the ipaddr-to-dotted function is in the clocc-port
package. But I see that:
> * (load "test.lisp")
> ; Loading #p"/home/nlamirault/bin/test.lisp".
> Warning: CLOCC-PORT also exports the following symbols:
> (CLOCC-PORT:PROCESS-WAIT STREAM-LISTEN
[...]
These errors cannot be the result of loading the file shown above.
But are the effect or redefining the port package.
And in the end the argument you give to the function is not
what it expects. It expects an ipaddr, not a string :-)
So what should work:
cat > test.lisp <<EOF
(in-package :commmon-lisp-user)
(require :port)
(clocc-port:dotted-to-ipaddr "127.0.0.1")
EOF
Groetjes, Peter
--
It's logic Jim, but not as we know it. | ········@debian.org
"God, root, what is difference?" - Pitr|
"God is more forgiving." - Dave Aronson| http://cvs2.cons.org/~pvaneynd/
Peter Van Eynde <········@debian.org> a �crit le mardi 04 juin 2002 :
> Lam <···················@nospam.org> writes:
>
>> < lam > apt-cache search clocc port
>> clocc-port - The Common Lisp library 'port' from CLOCC.
>
> Good
>
>> < lam : port > pwd
>> /usr/share/common-lisp/repositories/clocc/port
>
> There is no need to go to this directory.
it just for verify files :)
> ···@mustyr-host:~ :) $lisp
> CMU Common Lisp release x86-linux 3.0.12 18d+ 22 May 2002 build 3350, running on mustyr-host
> For support see http://www.cons.org/cmucl/support.html Send bug reports to the debian BTS.
> or to ········@debian.org
> type (help) for help, (quit) to exit, and (demo) to see the demos
>
> Loaded subsystems:
> Python 1.0, target Intel x86
> CLOS based on PCL version: September 16 92 PCL (f)
> * (require :port)
>
> ; Loading #p"/usr/share/common-lisp/repositories/clocc/port/port.system".
> (#<FILE: shell> #<FILE: proc> #<FILE: net> #<FILE: sys> #<FILE: gray>
> #<FILE: ext> #<FILE: package>)
> * (apropos "ipaddr-to-dotted")
>
> CLOCC-PORT:IPADDR-TO-DOTTED (defined)
> *
>
>> in a test file i write this :
>>
>> (require :port)
>>
>> (ipaddr-to-dotted "128.18.65.4")
>
> As you can see the ipaddr-to-dotted function is in the clocc-port
> package. But I see that:
>
>> * (load "test.lisp")
>> ; Loading #p"/home/nlamirault/bin/test.lisp".
>> Warning: CLOCC-PORT also exports the following symbols:
>> (CLOCC-PORT:PROCESS-WAIT STREAM-LISTEN
> [...]
> These errors cannot be the result of loading the file shown above.
> But are the effect or redefining the port package.
>
> And in the end the argument you give to the function is not
> what it expects. It expects an ipaddr, not a string :-)
>
> So what should work:
>
> cat > test.lisp <<EOF
> (in-package :commmon-lisp-user)
> (require :port)
> (clocc-port:dotted-to-ipaddr "127.0.0.1")
> EOF
it works :)
thanks !
> Groetjes, Peter
--
Lam
"Depuis ce sombre dimanche, j'vomis chaque soir sur les quais, tranquille,
tous mes regrets" (Les Hurlements d'Leo)