Pascal J. Bourguignon | 3 Aug 14:59 2010
Face

defgeneric/defmethod lambda list mismatch.


In gray-stream-mixin.lisp, there are inconsistencies in the lambda
lists of generic functions and the corresponding methods:

(defgeneric stream-read-sequence
    (stream sequence start end &key &allow-other-keys))

(defgeneric stream-write-sequence
    (stream sequence start end &key &allow-other-keys))

#+clisp
(progn
  (defmethod gray:stream-read-sequence
      ((s trivial-gray-stream-mixin) seq &optional start end)
    (stream-read-sequence s seq (or start 0) (or end (length seq))))

  (defmethod gray:stream-write-sequence
      ((s trivial-gray-stream-mixin) seq &optional start end)
    (stream-write-sequence s seq (or start 0) (or end (length seq))))

  (defmethod gray:stream-position ((stream trivial-gray-stream-mixin) position)
    (if position
        (setf (stream-file-position stream) position)
        (stream-file-position stream))))

--

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

Stelian Ionescu | 3 Aug 15:11 2010

Re: defgeneric/defmethod lambda list mismatch.

On Tue, 2010-08-03 at 14:59 +0200, Pascal J. Bourguignon wrote:
> In gray-stream-mixin.lisp, there are inconsistencies in the lambda
> lists of generic functions and the corresponding methods:
> 
> 
> (defgeneric stream-read-sequence
>     (stream sequence start end &key &allow-other-keys))
> 
> (defgeneric stream-write-sequence
>     (stream sequence start end &key &allow-other-keys))
> 
> 
> 
> #+clisp
> (progn
>   (defmethod gray:stream-read-sequence
>       ((s trivial-gray-stream-mixin) seq &optional start end)
>     (stream-read-sequence s seq (or start 0) (or end (length seq))))
> 
>   (defmethod gray:stream-write-sequence
>       ((s trivial-gray-stream-mixin) seq &optional start end)
>     (stream-write-sequence s seq (or start 0) (or end (length seq))))
> 
>   (defmethod gray:stream-position ((stream trivial-gray-stream-mixin) position)
>     (if position
>         (setf (stream-file-position stream) position)
>         (stream-file-position stream))))

There's no inconsistency here: iolib.base:stream-read-sequence and
gray:stream-read-sequence are different generic functions
(Continue reading)

Stelian Ionescu | 3 Aug 21:06 2010

IOLib release 0.7.0

After 18 months, there's a new IOLib release. Get it while it's hot :)
Tarball available  <at>  http://common-lisp.net/project/iolib/download.shtml

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
After 18 months, there's a new IOLib release. Get it while it's hot :)
Tarball available  <at>  http://common-lisp.net/project/iolib/download.shtml

--

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
Stelian Ionescu | 4 Aug 11:00 2010
Picon

New patches: 3-Aug-2010


commit 097f7bdff047ca21df0fae1aa0df161c8fc75b41
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Wed Aug 4 02:54:13 2010 +0800

    Update CHANGES

 CHANGES |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

commit c449735495632bed4be98de2cc69d209cdcd3cf0
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Wed Aug 4 02:51:22 2010 +0800

    Update version.lisp-expr

 version.lisp-expr |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

commit ea173212ef33253fd1344beaae5e9f6a672aff0d
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Wed Aug 4 02:15:08 2010 +0800

    Version 0.7.0

 CHANGES           |    6 ++++--
 version.lisp-expr |    2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

commit 2688688ef2a41ff3aff481580faaf4224e4969d4
(Continue reading)

Heka Treep | 7 Aug 23:27 2010
Picon

Need FFI for some new syscalls

Hello,

Is it possible to add in IOLIB several new syscalls? Namely:

1) Syslog staff (part of the POSIX standrd),
2) Sendfile (is not standardized, but still good thing),
3) And aio_* syscalls (is also part of the POSIX).

All of these calls are often used when writing web servers and if someone wants to write one in CL - they may come in handy :)

I added 1 & 2 to iolib-clean repo on gitorios.org. 3 is more complicated (especially the representation of structures in Linux).

<div><p>Hello,<br><br>Is it possible to add in IOLIB several new syscalls? Namely:<br><br>1) Syslog staff (part of the POSIX standrd),<br>2) Sendfile (is not standardized, but still good thing),<br>3) And aio_* syscalls (is also part of the POSIX).<br><br>All of these calls are often used when writing web servers and if someone wants to write one in CL - they may come in handy :)<br><br>I added 1 &amp; 2 to iolib-clean repo on <a href="http://gitorios.org">gitorios.org</a>. 3 is more complicated (especially the representation of structures in Linux).<br></p></div>
Pascal J. Bourguignon | 9 Aug 03:33 2010
Face

error with :soname in clisp


asdf loading the latest iolib (git pull ten minutes ago), in clisp
2.48 on Linux, I get the following error:

Illegal keyword/value pair :SONAME, "libiolib-syscalls" in argument list.
The allowed keywords are #1=(:CC-FLAGS
    :NAME :VERSION :IN-ORDER-TO :DO-FIRST :PARENT :PATHNAME
    :PROPERTIES)
   [Condition of type SYSTEM::SIMPLE-KEYWORD-ERROR]

CL-USER> (print-bug-report-info)

LISP-IMPLEMENTATION-TYPE     "CLISP"
LISP-IMPLEMENTATION-VERSION  "2.48 (2009-07-28) (built 3487176824) (memory 3487176954)"
SOFTWARE-TYPE                
"gcc -O2 -pipe -march=native -mno-tls-direct-seg-refs -Wa,--noexecstack -I/usr/include/db4.7 -W
-Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations
-Wno-sign-compare -Wno-format-nonliteral -O -falign-functions=4 -pthread -DUNICODE
-DMULTITHREAD -DPOSIX_THREADS -DDYNAMIC_FFI -I. -Wl,-O1  /usr/lib64/libreadline.so -lncurses -ldl
/usr/lib64/libavcall.so /usr/lib64/libcallback.so  -L/usr/lib64 -lsigsegv -L/usr/lib64 -lc 
SAFETY=0 TYPECODES WIDE_HARD GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.8
libreadline 6.1"
SOFTWARE-VERSION             "GNU C 4.3.5"
MACHINE-INSTANCE             "kuiper.lan.informatimago.com [192.168.7.2]"
MACHINE-TYPE                 "X86_64"
MACHINE-VERSION              "X86_64"
*FEATURES*                   
(CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI :X86-64 :LITTLE-ENDIAN :LINUX
 :TESTING-SCRIPT :COM.INFORMATIMAGO.PJB :ASDF-INSTALL :SPLIT-SEQUENCE :ASDF
 :ZLIB :PCRE :GDBM :DBUS :BERKELEY-DB :CLX-MIT-R5 :CLX-MIT-R4 :XLIB :CLX
 :CLX-LITTLE-ENDIAN :RAWSOCK :WILDCARD :READLINE :REGEXP :SYSCALLS :I18N :LOOP
 :COMPILER :CLOS :MOP :CLISP :ANSI-CL :COMMON-LISP :LISP=CL :INTERPRETER :MT
 :SOCKETS :GENERIC-STREAMS :LOGICAL-PATHNAMES :SCREEN :FFI :GETTEXT :UNICODE
 :BASE-CHAR=CHARACTER :WORD-SIZE=64 :PC386 :UNIX)

;;; uname -a
Linux kuiper 2.6.35-gentoo-c5-kvm-nvidia #1 SMP Wed Aug 4 21:11:58 CEST 2010 x86_64 Intel(R) Core(TM) i7
CPU 950  <at>  3.07GHz GenuineIntel GNU/Linux
;;; (EXT:ARGV)
#("/usr/lib64/clisp-2.48/full/lisp.run" "-B" "/usr/lib64/clisp-2.48" "-M"
  "/usr/lib64/clisp-2.48/full/lispinit.mem" "-N" "/usr/share/locale" "-ansi"
  "-q" "-K" "full" "-m" "32M" "-I" "-E" "UTF-8" "-Epathname" "ISO-8859-1"
  "-Eforeign" "ISO-8859-1")
;;; /usr/bin/clisp --version
GNU CLISP 2.48 (2009-07-28) (built 3487176824) (memory 3487176952)
Software: GNU C 4.3.5 
gcc -O2 -pipe -march=native -mno-tls-direct-seg-refs -Wa,--noexecstack -I/usr/include/db4.7 -W
-Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations
-Wno-sign-compare -Wno-format-nonliteral -O -falign-functions=4 -pthread -DUNICODE
-DMULTITHREAD -DPOSIX_THREADS -DDYNAMIC_FFI -I. -Wl,-O1  /usr/lib64/libreadline.so -lncurses -ldl
/usr/lib64/libavcall.so /usr/lib64/libcallback.so  -L/usr/lib64 -lsigsegv -L/usr/lib64 -lc 
SAFETY=0 TYPECODES WIDE_HARD GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.8
libreadline 6.1
Features: 
(READLINE REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP
 LISP=CL INTERPRETER MT SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI
 GETTEXT UNICODE BASE-CHAR=CHARACTER WORD-SIZE=64 PC386 UNIX)
C Modules: (clisp i18n syscalls regexp readline)
Installation directory: /usr/lib64/clisp-2.48/
User language: ENGLISH
Machine: X86_64 (X86_64) kuiper.lan.informatimago.com [192.168.7.2]
; No value
CL-USER> 

--

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

Stelian Ionescu | 9 Aug 10:03 2010

Re: error with :soname in clisp

On Mon, 2010-08-09 at 03:33 +0200, Pascal J. Bourguignon wrote:
> asdf loading the latest iolib (git pull ten minutes ago), in clisp
> 2.48 on Linux, I get the following error:
> 
> 
> Illegal keyword/value pair :SONAME, "libiolib-syscalls" in argument list.
> The allowed keywords are #1=(:CC-FLAGS
>     :NAME :VERSION :IN-ORDER-TO :DO-FIRST :PARENT :PATHNAME
>     :PROPERTIES)
>    [Condition of type SYSTEM::SIMPLE-KEYWORD-ERROR]

You must use CFFI HEAD for the moment

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
On Mon, 2010-08-09 at 03:33 +0200, Pascal J. Bourguignon wrote:
> asdf loading the latest iolib (git pull ten minutes ago), in clisp
> 2.48 on Linux, I get the following error:
> 
> 
> Illegal keyword/value pair :SONAME, "libiolib-syscalls" in argument list.
> The allowed keywords are #1=(:CC-FLAGS
>     :NAME :VERSION :IN-ORDER-TO :DO-FIRST :PARENT :PATHNAME
>     :PROPERTIES)
>    [Condition of type SYSTEM::SIMPLE-KEYWORD-ERROR]

You must use CFFI HEAD for the moment

--

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
Pascal J. Bourguignon | 14 Aug 04:47 2010
Face

remote-host on a closed socket.


When calling remote-host on a closed socket, we get an unrelated type
error (on ECL, about NIL not being a FIXNUM).

By analogy to CL:CLOSE, I think it would be better if it returned the
remote-host of the last connection, or either return NIL or a specific
condition (which would be guaranted to be the same on all
implementations).

(let ((s (open "/etc/passwd"))) 
   (close s)
   (pathname s))
--> #P"/etc/passwd"

--

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

Dennis Stevenson | 18 Aug 22:25 2010

Problem compiling iolib on CentOS 5/x86_64

I just downloaded from the website as the tar, not the git.

Is there a simple fix?

* (asdf:compile-system :iolib)

; loading system definition from
; /home/steve/.sbcl/site/iolib-0.7.0/src/iolib.asd into #<PACKAGE "ASDF0">
; loading system definition from
; /home/steve/.sbcl/site/iolib-0.7.0/src/iolib.base.asd into #<PACKAGE "ASDF1">
; registering #<SYSTEM :IOLIB.BASE {B024F61}> as IOLIB.BASE
; loading system definition from /home/steve/.sbcl/systems/alexandria.asd into
; #<PACKAGE "ASDF1">
; registering #<SYSTEM :ALEXANDRIA {B1A85C1}> as ALEXANDRIA
; registering #<SYSTEM :IOLIB {B52FAD9}> as IOLIB
; loading system definition from
; /home/steve/.sbcl/site/iolib-0.7.0/src/iolib.sockets.asd into
; #<PACKAGE "ASDF0">
; loading system definition from /home/steve/.sbcl/systems/cffi-grovel.asd into
; #<PACKAGE "ASDF1">
; registering #<SYSTEM CFFI-GROVEL {ACE6B19}> as CFFI-GROVEL
; loading system definition from /home/steve/.sbcl/systems/cffi.asd into
; #<PACKAGE "ASDF1">
; registering #<SYSTEM CFFI {AECD291}> as CFFI
; loading system definition from /home/steve/.sbcl/systems/babel.asd into
; #<PACKAGE "ASDF1">
; registering #<SYSTEM BABEL {B052C61}> as BABEL
; loading system definition from /home/steve/.sbcl/systems/trivial-features.asd
; into #<PACKAGE "ASDF1">
; registering #<SYSTEM TRIVIAL-FEATURES {B1CB8A1}> as TRIVIAL-FEATURES
; registering #<SYSTEM :IOLIB.SOCKETS {B160B69}> as IOLIB.SOCKETS
; loading system definition from /home/steve/.sbcl/systems/bordeaux-threads.asd
; into #<PACKAGE "ASDF0">
; registering #<SYSTEM :BORDEAUX-THREADS {B3BC6B1}> as BORDEAUX-THREADS
; loading system definition from
; /home/steve/.sbcl/site/iolib-0.7.0/src/iolib.streams.asd into
; #<PACKAGE "ASDF0">
; registering #<SYSTEM :IOLIB.STREAMS {B0BEC51}> as IOLIB.STREAMS
; loading system definition from /home/steve/.sbcl/systems/trivial-garbage.asd
; into #<PACKAGE "ASDF0">
; registering #<SYSTEM TRIVIAL-GARBAGE {B225AD9}> as TRIVIAL-GARBAGE
; registering #<SYSTEM TRIVIAL-GARBAGE-TESTS {B374299}> as TRIVIAL-GARBAGE-TESTS
; loading system definition from
; /home/steve/.sbcl/site/iolib-0.7.0/src/iolib.multiplex.asd into
; #<PACKAGE "ASDF0">
; registering #<SYSTEM :IOLIB.MULTIPLEX {B6AE439}> as IOLIB.MULTIPLEX
; loading system definition from
; /home/steve/.sbcl/site/iolib-0.7.0/src/iolib.syscalls.asd into
; #<PACKAGE "ASDF0">
; registering #<SYSTEM :IOLIB.SYSCALLS {B9B9899}> as IOLIB.SYSCALLS

debugger invoked on a SB-PCL::INITARG-ERROR in thread #<THREAD
                                                        "initial thread" RUNNING
                                                        {AA03961}>:
  Invalid initialization argument:
    :SONAME
  in call for class #<STANDARD-CLASS CFFI-GROVEL:WRAPPER-FILE>.
See also:
  The ANSI Standard, Section 7.1.2

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-PCL::CHECK-RI-INITARGS
 #<CFFI-GROVEL:WRAPPER-FILE  {BAA81C1}>
 (:NAME "ffi-wrappers" :PATHNAME "ffi-wrappers-unix" :PARENT
  #<SYSTEM "iolib.syscalls" {B9B9899}> :SONAME "libiolib-syscalls"))

Faré | 18 Aug 22:44 2010
Picon

Re: Problem compiling iolib on CentOS 5/x86_64

On 18 August 2010 16:25, Dennis Stevenson <steve <at> cs.clemson.edu> wrote:
> I just downloaded from the website as the tar, not the git.
>
> Is there a simple fix?
>
>  Invalid initialization argument:
>    :SONAME
>  in call for class #<STANDARD-CLASS CFFI-GROVEL:WRAPPER-FILE>.

You need the latest CFFI.

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
There is no such thing as a "necessary evil". If it's necessary, then
it cannot be evil, neither can it be good: it's a datum.        — Faré


Gmane