[Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-06-24 Thread William Xu
"felix winkelmann" <[EMAIL PROTECTED]> writes: > A parameter is a special kind of procedure. You access it like this: > > (tcp-read-timeout) -> > (tcp-read-timeout ) Ah, I didn't know this kind of procedure. Thanks! > There is now API for that, yet. But see the function ##sys#bind-socket > in

[Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-06-24 Thread William Xu
Peter Bex <[EMAIL PROTECTED]> writes: > Chicken has an implementation of SRFI-39: Parameter Objects of which > you can find docs at http://srfi.schemers.org/srfi-39/srfi-39.html I read the srfi-39 carefully. It appears that it can be more or less expressed by simple lexical scoping. For instanc

[Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-06-25 Thread William Xu
Alex Sandro Queiroz e Silva <[EMAIL PROTECTED]> writes: > may call procedures that have a tcp-read-timeout free > variable, but due to lexical scope that variable will most certainly not > be bound to the one you want. For this you need dynamic scope. Do you mean something like the procedur

[Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-06-25 Thread William Xu
"Jim Ursetto" <[EMAIL PROTECTED]> writes: > Although unit tcp doesn't have an explicit API for setting socket > options, it is possible to do this for server sockets. (IIRC it can't > be done at the moment for clients as that socket is not directly > exposed to the user.) That sounds a big str

[Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-07-07 Thread William Xu
Tobia Conforto <[EMAIL PROTECTED]> writes: > The benefits of parameters are dynamic scoping and thread safety. > > Contrary to function arguments and let forms, parameters are dynamically > scoped, much like global variables, or "special variables" in other lisp > dialects. This is very handy f

Re: [Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-06-24 Thread Alex Sandro Queiroz e Silva
Hallo, William Xu wrote: ,[ let ] | (define tcp-read-timeout 6) | | (let ((tcp-read-timeout #f)) |body) ` So what's the extra benifits of using `parameter'? may call procedures that have a tcp-read-timeout free variable, but due to lexical scope that variable will

Re: [Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-06-24 Thread Jim Ursetto
Hello, Although unit tcp doesn't have an explicit API for setting socket options, it is possible to do this for server sockets. (IIRC it can't be done at the moment for clients as that socket is not directly exposed to the user.) Here is an example: #;1> (use tcp socket) ; loading library tcp ..

Re: [Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-06-25 Thread Alex Sandro Queiroz e Silva
Hallo, William Xu wrote: Alex Sandro Queiroz e Silva <[EMAIL PROTECTED]> writes: may call procedures that have a tcp-read-timeout free variable, but due to lexical scope that variable will most certainly not be bound to the one you want. For this you need dynamic scope. Do you mean som

Re: [Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-07-07 Thread Tobia Conforto
William Xu wrote: I read the srfi-39 carefully. It appears that it can be more or less expressed by simple lexical scoping. So what's the extra benifits of using `parameter'? First of all, the macro you refer to is called `parameterize', not `parameter', and it's just a shorthand for set

Re: [Chicken-users] Re: tcp-read-timeout: procedure or parameter?

2008-07-09 Thread felix winkelmann
On Mon, Jul 7, 2008 at 10:18 AM, Tobia Conforto <[EMAIL PROTECTED]> wrote: > > Contrary to global variables, parameters are thread-local, so every thread > has its own set of parameter values. > > The combination of these two features makes parameters very useful. > Another nice property of parame