Jim Prewett | 5 Oct 2007 17:09
Picon
Favicon

sb-bsd-sockets:get-host-by-address under MacOS?


Hello,

I'm using SBCL 1.0.10 under MacOS 10.4.10 (Intel).  

When I run:
(sb-bsd-sockets:get-host-by-address #(129 24 244 1))

I get an error as follows:
Name service error in "getnameinfo": 5 (ai_family not supported)
   [Condition of type SB-BSD-SOCKETS:NAME-SERVICE-ERROR]

Am I doing something wrong?  The same code seems to work fine under SBCL 
1.0.3 on my Intel Linux machine.  Unfortunately, I do not have the latest 
SBCL on that Linux box :P

Thanks!,
Jim

James E. Prewett                    Jim <at> Prewett.org download <at> hpc.unm.edu 
Systems Team Leader           LoGS: http://www.hpc.unm.edu/~download/LoGS/ 
Designated Security Officer         OpenPGP key: pub 1024D/31816D93    
HPC Systems Engineer III   UNM HPC  505.277.8210

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
(Continue reading)

Chris Goellner | 6 Oct 2007 17:53
Picon

Re: sb-bsd-sockets:get-host-by-address under MacOS?

I get the same error under SBCL 1.0.10/MacOS 10.4.10 (Intel) and I
don't get the error under SBCL 1.0.3/MacOS 10.4.10 (Intel).

I don't have a different OS to test right now so I can't tell if
1.0.10 works on other systems.

On 10/5/07, Jim Prewett <download <at> hpc.unm.edu> wrote:
>
> Hello,
>
> I'm using SBCL 1.0.10 under MacOS 10.4.10 (Intel).
>
> When I run:
> (sb-bsd-sockets:get-host-by-address #(129 24 244 1))
>
> I get an error as follows:
> Name service error in "getnameinfo": 5 (ai_family not supported)
>    [Condition of type SB-BSD-SOCKETS:NAME-SERVICE-ERROR]
>
> Am I doing something wrong?  The same code seems to work fine under SBCL
> 1.0.3 on my Intel Linux machine.  Unfortunately, I do not have the latest
> SBCL on that Linux box :P
>
> Thanks!,
> Jim
>
> James E. Prewett                    Jim <at> Prewett.org download <at> hpc.unm.edu
> Systems Team Leader           LoGS: http://www.hpc.unm.edu/~download/LoGS/
> Designated Security Officer         OpenPGP key: pub 1024D/31816D93
> HPC Systems Engineer III   UNM HPC  505.277.8210
(Continue reading)

Jim Prewett | 6 Oct 2007 22:04
Picon
Favicon

Re: sb-bsd-sockets:get-host-by-address under MacOS?


For grins, I downloaded SBCL 1.0.3 - 1.0.10.  I found the error I reported 
below happens with all versions 1.0.4 and above.

Many thanks to Chris for pointing out that 1.0.3 does what I expect.

Jim

James E. Prewett                    Jim <at> Prewett.org download <at> hpc.unm.edu 
Systems Team Leader           LoGS: http://www.hpc.unm.edu/~download/LoGS/ 
Designated Security Officer         OpenPGP key: pub 1024D/31816D93    
HPC Systems Engineer III   UNM HPC  505.277.8210

On Sat, 6 Oct 2007, Chris Goellner wrote:

> I get the same error under SBCL 1.0.10/MacOS 10.4.10 (Intel) and I
> don't get the error under SBCL 1.0.3/MacOS 10.4.10 (Intel).
> 
> I don't have a different OS to test right now so I can't tell if
> 1.0.10 works on other systems.
> 
> On 10/5/07, Jim Prewett <download <at> hpc.unm.edu> wrote:
> >
> > Hello,
> >
> > I'm using SBCL 1.0.10 under MacOS 10.4.10 (Intel).
> >
> > When I run:
> > (sb-bsd-sockets:get-host-by-address #(129 24 244 1))
> >
(Continue reading)

Rudi Schlatte | 8 Oct 2007 08:26
Picon
Gravatar

Re: sb-bsd-sockets:get-host-by-address under MacOS?


On 05.10.2007, at 23:09, Jim Prewett wrote:
>
> I'm using SBCL 1.0.10 under MacOS 10.4.10 (Intel).
>
> When I run:
> (sb-bsd-sockets:get-host-by-address #(129 24 244 1))
>
> I get an error as follows:
> Name service error in "getnameinfo": 5 (ai_family not supported)
>    [Condition of type SB-BSD-SOCKETS:NAME-SERVICE-ERROR]

Peering closely at header files, it turns out that struct sockaddr_in  
has an additional length field on Mac OS X that wants to be defined  
and filled (and the Linux manpages, but not the Darwin ones, say that  
error number 5 can also mean "incorrect length", duh).

Anyway, sbcl version 1.0.10.38 tells me that you are looking for  
summit.hpc.unm.edu.

Cheers,

Rudi

Jim Prewett | 8 Oct 2007 14:04
Picon
Favicon

Re: sb-bsd-sockets:get-host-by-address under MacOS?


Thank you Rudi!  Yes, that IP should resolve to summit.hpc.unm.edu!

Jim

James E. Prewett                    Jim <at> Prewett.org download <at> hpc.unm.edu 
Systems Team Leader           LoGS: http://www.hpc.unm.edu/~download/LoGS/ 
Designated Security Officer         OpenPGP key: pub 1024D/31816D93    
HPC Systems Engineer III   UNM HPC  505.277.8210

On Mon, 8 Oct 2007, Rudi Schlatte wrote:

> 
> On 05.10.2007, at 23:09, Jim Prewett wrote:
> > 
> > I'm using SBCL 1.0.10 under MacOS 10.4.10 (Intel).
> > 
> > When I run:
> > (sb-bsd-sockets:get-host-by-address #(129 24 244 1))
> > 
> > I get an error as follows:
> > Name service error in "getnameinfo": 5 (ai_family not supported)
> >    [Condition of type SB-BSD-SOCKETS:NAME-SERVICE-ERROR]
> 
> Peering closely at header files, it turns out that struct sockaddr_in
> has an additional length field on Mac OS X that wants to be defined
> and filled (and the Linux manpages, but not the Darwin ones, say that
> error number 5 can also mean "incorrect length", duh).
> 
> Anyway, sbcl version 1.0.10.38 tells me that you are looking for
(Continue reading)

Bruno Daniel | 11 Oct 2007 16:10
Picon

Closures as callbacks

Dear developers,

I found a very simple way to use callbacks in CFFI or in alien-lambda without
the performance and memory implications we discussed, at least for the case
that the callback doesn't call C again:

The callback given to C is just a delegator to a closure that is saved in a
the global variable *once-to-c-closure-callback*.

--------------------------------------------------------------------
(defvar *once-to-c-closure-callback* nil)

(defcallback delegating-callback :double ((x :double))
  ;; (callback-index :int))
  (funcall *once-to-c-closure-callback* x))

(defun closure-callback (func)
  (setq *once-to-c-closure-callback* func)
  (callback delegating-callback))
--------------------------------------------------------------------
Here's an example with a C function executing the callback:
--------------------------------------------------------------------
// Compile with CF=testc && gcc -fPIC -c $CF.c && gcc -shared -Wl,-soname,$CF.so -o $CF.so $CF.o

#include <stdio.h>

double execute_callback (void* callback, double x) {
  if (callback != NULL) {
    printf("callback: %ld\n", (long)callback);
    double (*callback1)();
(Continue reading)

Bruno Daniel | 11 Oct 2007 16:16
Picon

Re: Closures as callbacks

> For callbacks that are allowed to call C again one would have to use a
> self-expanding global array instead of *once-to-c-closure-callback* and pass
> the index into the array where the closure is saved to the C function as
> well.

In case the C code receives another callback and wants to call both of them
interchangingly, one would have to use the array solution as well.

Viele Grüße
  Bruno Daniel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Jimmy Miller | 18 Oct 2007 22:13
Picon

ASDF-install on Windows gives error

I'm trying to use ASDF-install on the Windows XP version of SBCL like so:

(asdf-install:install 'clx)

Every time I try to install CLX, right after SBCL says that it is
going to install to site-systems, the following error comes up:

debugger invoked on a SIMPLE-ERROR:
  #<SB-IMPL::STRING-OUTPUT-STREAM {AC19949}> is closed.

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-KERNEL:CLOSED-FLAME #<SB-IMPL::STRING-OUTPUT-STREAM {AC19949}>)
0]

The STRING-OUTPUT-STREAM number is always different, but the general
error is always the same.

Does anyone know what would cause this?

--

-- 
<a href="http://www.spreadfirefox.com/?q=affiliates&id=153516&t=1"><textarea
rows="3" cols="40">Get Firefox!</a>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
(Continue reading)

František Štáfek | 20 Oct 2007 22:04
Picon

what is SBCL equivalent to lispworks (comm:open-tcp-stream "localhost" portnumber))

Hello everybody...
i'm quite newbie in CL and SBCL, I'd like to try FOIL library to
interact with .NET system. Library is written originally for Lispworks
and as it seems to me the only platform specific thing is the
connection to network socket (I hope at least :-)

what is SBCL equivalent to Lispworks
(comm:open-tcp-stream "localhost" portnumber))

I've just installed latest SBCL for windows via msi installer...

Thanks for any tip...

  
Best regards
 František Štáfek

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Sbcl-help mailing list
Sbcl-help <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help
Luke McCarthy | 21 Oct 2007 01:25
Picon

Trying to asdf-install cells

I am trying to install Cells in SBCL 1.0.9. When I run 
(asdf-install:install 'cells) and choose "personal installation" it spits out 
a load of binary garbage followed by:

    öiöiöiöiöiöiöiöiöiöióó$px
    ^[[?1;2c^[[?1;2c^[[?1;2c-----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.0 (Darwin)

    iD8DBQFD1qcfl2RwVlDQtPYRApX/AKCFgsrLXsv8FllEQ1YQtC2nYRZiHACcDkJY
    whE3bSaRgquYThmepNzfYVc=
    =Pacw
    -----END PGP SIGNATURE-----
    "
     #P"/home/shaurz/CELLS.asdf-install-tmp")

When I CTRL-D I get the following error:

    debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD "initial thread" 
{A6B5671}>:
      The variable | is unbound.

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

    restarts (invokable by number or by possibly-abbreviated name):
      0: [ABORT         ] Reduce debugger level (to debug level 1).
      1: [SKIP-GPG-CHECK] Don't check GPG signature for this package
      2:                  Exit debugger, returning to top level.

    (SB-INT:SIMPLE-EVAL-IN-LEXENV | #<NULL-LEXENV>)

(Continue reading)


Gmane