Gabriel Dos Reis wrote:
> On Fri, Jan 8, 2010 at 5:04 PM, Arthur Ralfs <art...@mathbrane.ca> wrote:
>> To fully expose the C socket interface in spad I think I need
>> more data types capable of being passed.  I'm using the 'select'
>> function just to set a timeout of 1 microsecond so that the
>> read calls don't block forever.
> 
> OK.  Do you have a list in mind?

The default for a read on a socket is to block until something is
available to read so the main difficulty I had with sockets was
preventing this once I had read something successfully.  My first
try was to use the 'recv' function with the 'MSG_DONTWAIT' flag set but
trying to do that meant I had to pass the read buffer from spad.  I
couldn't figure out how to do this.  I see what you've done in
'sys-os.boot' but couldn't mimic that successfully in spad.

I ended up using the 'select' function just for it's capacity to set a
timeout.

How can I get an array as a return value?  In particular  how do I get
a string and an array of integers?

I suspect with those I could work around most other issues.

> 
>> Also I'd really like to have regular expressions, but while GCL
>> had them SBCL doesn't, and I haven't figured out any reasonable way
>> of accessing the C library regular expressions with the limited data
>> types.
> 
> Yes, Regular Expressions are part of the big non-portable but essential
> features from Lisp.  I thought about implementing one at the Spad level
> (a good exercise for myself) but well, the TODO list just gets longer.
> C does not have a standard RE library (though C++ does now).  And while
> this is not a problem on many Unix, it becomes a problem when we move
> to Windows platforms where there does not seem to exist one freely
> available that compile all the time.
> 

Unless there's absolutely no other way to do it I doubt that you should
spend your valuable time on such an 'exercise'.  The thought crossed my
own mind but I'd rather work on something that hasn't been done.

I only use linux so for myself I'd be happy if I could access regexp's
in glibc.  If I could get a return value of a string or an array of
integers I could write the interface to that.

Arthur

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to