RFC open on newLISP documentation
In the v8.1.2 manual section on 'expand', the phrase "expand is when composing lambda expressions:" should be "expand is useful when composing lambda expressions:". Also, it appears that (expand list sym1 sym2) is equivalent to (expand (expand list sym1) sym2) instead of simultaneous expansion as the following illustrates:
> (set 'a 'b 'b 'a)
a
> a
b
> b
a
> (expand '(a b) 'a)
(b b)
> (expand '(a b) 'a 'b)
(a a)
> (expand '(a b) 'b 'a)
(b b)
> (set 'a 'b 'b 'a)
a
> a
b
> b
a
> (expand '(a b) 'a)
(b b)
> (expand '(a b) 'a 'b)
(a a)
> (expand '(a b) 'b 'a)
(b b)
Hello Lutz,
In the manual "net-select" the example below is
confusing because net-listen is none-blocking by itself aleady..
==== net-select ====
set 'listen-socket (net-listen 1001))
; wait for connection
(while (not (net-select listen-socket "read" 1000))
(if (net-error) (print (net-error))))
(set 'connection (net-accept listen-socket))
(net-send connection "hello")
In the manual "net-select" the example below is
confusing because net-listen is none-blocking by itself aleady..
==== net-select ====
set 'listen-socket (net-listen 1001))
; wait for connection
(while (not (net-select listen-socket "read" 1000))
(if (net-error) (print (net-error))))
(set 'connection (net-accept listen-socket))
(net-send connection "hello")
-- (define? (Cornflakes))
Yes, but the 'net-select' checks the listen-socket for the blocking 'net-accept' call. The (net-listen ..) is before the net-select. So is waits in the (while ...) loop until something is ready to accept on the listen-socket.
Perhaps the naming of the socket as 'listen-socket' is confusing? perhaps I just should call it 'socket' ?
Also, just posted 8.1.3 with the Solaris 'get-url' fix
Lutz
Perhaps the naming of the socket as 'listen-socket' is confusing? perhaps I just should call it 'socket' ?
Also, just posted 8.1.3 with the Solaris 'get-url' fix
Lutz
-
- Posts: 429
- Joined: Tue Nov 11, 2003 2:11 am
- Location: Brisbane, Australia
In Manual definition of define
"define
syntax: (define (sym-name [sym-param-1 ...]) [body-1])
syntax: (define sym-name exp )
Defines a new function sym-name with optional parameters sym-param-1 .... define is equivalent to assigning a lambda expression to sym-name. When calling a defined function, all arguments are evaluated and assigned to the variables in sym-param-1 ..., then the body-1 ... expression(s) are evaluated.
"
it probably should be
syntax: (define (sym-name [sym-param-1 ...]) [body-1 ...])
as this is consistent with "then the body-1 ... expression(s)"
and with how it works viz.
> (define (sayhello) (setq thehello "hi") "hello2")
(lambda () (setq thehello "hi") "hello2")
> thehello
nil
> (sayhello)
"hello2"
> thehello
"hi"
>
Maybe a comment along the lines that "the return value from a
function is the value of the last evaluated body-1 ... evaluation".
Nigel
"define
syntax: (define (sym-name [sym-param-1 ...]) [body-1])
syntax: (define sym-name exp )
Defines a new function sym-name with optional parameters sym-param-1 .... define is equivalent to assigning a lambda expression to sym-name. When calling a defined function, all arguments are evaluated and assigned to the variables in sym-param-1 ..., then the body-1 ... expression(s) are evaluated.
"
it probably should be
syntax: (define (sym-name [sym-param-1 ...]) [body-1 ...])
as this is consistent with "then the body-1 ... expression(s)"
and with how it works viz.
> (define (sayhello) (setq thehello "hi") "hello2")
(lambda () (setq thehello "hi") "hello2")
> thehello
nil
> (sayhello)
"hello2"
> thehello
"hi"
>
Maybe a comment along the lines that "the return value from a
function is the value of the last evaluated body-1 ... evaluation".
Nigel
Thanks Nigel for the doc corrections.
There is a new Tutorial about importing libraries at: http://www.newlisp.org/index.cgi?page=C ... _Libraries
Lutz
There is a new Tutorial about importing libraries at: http://www.newlisp.org/index.cgi?page=C ... _Libraries
Lutz
(command-line nil)
Hello Lutz,
Just a reminder...
The feature request from sometime ago is not documented.
(It was that i remembered it :-)
Missing is in de manual ->
(command-line nil)
Under linux this will also disable signaling handling display:
user reset - (c)ontinue, e(x)it, (r)eset:
Just a reminder...
The feature request from sometime ago is not documented.
(It was that i remembered it :-)
Missing is in de manual ->
(command-line nil)
Under linux this will also disable signaling handling display:
user reset - (c)ontinue, e(x)it, (r)eset:
-- (define? (Cornflakes))
Manual 8.2.1
Hi Lutz,
The Framed manual from 8.2.1 does not allow any "searching" anymore
in de newlisp_index.html..?
Norman.
The Framed manual from 8.2.1 does not allow any "searching" anymore
in de newlisp_index.html..?
Norman.
-- (define? (Cornflakes))
File-info / file?
Hi lutz,
Minor issue...
Perhpas an enhancement for the folling two function in the manual wil
clarify a little bit more...
file-info
Returns a list of information about the file or directory in str_name. newLISP uses the POSIX system call stat() to get the following information:
-->
Returns a list of information about the file, directory, socket, pipe in str_name. newLISP uses the POSIX system call stat() to get the following information:
file?
Checks for the existence of a file in str-name. Returns true if the file exists and is readable else returns nil.
-->
Checks for the existence of a file, directory, socket, pipe in str-name. Returns true if the file exists and is readable else returns nil.
Minor issue...
Perhpas an enhancement for the folling two function in the manual wil
clarify a little bit more...
file-info
Returns a list of information about the file or directory in str_name. newLISP uses the POSIX system call stat() to get the following information:
-->
Returns a list of information about the file, directory, socket, pipe in str_name. newLISP uses the POSIX system call stat() to get the following information:
file?
Checks for the existence of a file in str-name. Returns true if the file exists and is readable else returns nil.
-->
Checks for the existence of a file, directory, socket, pipe in str-name. Returns true if the file exists and is readable else returns nil.
-- (define? (Cornflakes))
Corrections in spelling for the latest manual
Hi Lutz,
I've sent you an email with an attachment. There was a fair bit of context which enlarged the file thereby making it too large to post here.
Lucas.
I've sent you an email with an attachment. There was a fair bit of context which enlarged the file thereby making it too large to post here.
Lucas.
Hi Lutz ,
I got a PM from you to say that the mail might have been dropped.
So here is a link to the tarball.
http://homepages.paradise.net.nz/~j_gauss/wix/lucas.tgz
** since removed -- Lutz now has it **
This was just a first pass over the docs yielding about 80 possible errors/typos.
Reject or accept each as you deem appropriate.
Lucas.
I got a PM from you to say that the mail might have been dropped.
So here is a link to the tarball.
http://homepages.paradise.net.nz/~j_gauss/wix/lucas.tgz
** since removed -- Lutz now has it **
This was just a first pass over the docs yielding about 80 possible errors/typos.
Reject or accept each as you deem appropriate.
Lucas.
Last edited by lwix on Wed Nov 17, 2004 10:20 pm, edited 1 time in total.
A quick look at the latest manual (8.2.7) indicates that you've fixed the little typos. Thank you very much -- now I can read without tripping ;-)
But the first typo was hard to pick up: nuevatAc used instead of nuevatEc. It occurs as a hypertext link in the last line of the paragraph that comes just before the "Deprecated Functions" section. (I checked the link just in case the company registered both names :-)
I'll do another quick pass over the manual looking for more typos.
But the first typo was hard to pick up: nuevatAc used instead of nuevatEc. It occurs as a hypertext link in the last line of the paragraph that comes just before the "Deprecated Functions" section. (I checked the link just in case the company registered both names :-)
I'll do another quick pass over the manual looking for more typos.
small's beautiful
Only a few this time.
http://homepages.paradise.net.nz/~j_gauss/wix/7diff.txt
some slips may be hard to pick up: lib|d|emo vs lib|b|emo
and semaphore vs sempahore because lines are the same length.
http://homepages.paradise.net.nz/~j_gauss/wix/7diff.txt
some slips may be hard to pick up: lib|d|emo vs lib|b|emo
and semaphore vs sempahore because lines are the same length.
small's beautiful
bugger - one more
2996c2996
< version 8.2.7 espressions in exp-1 ... where not evaluated.
Apart from the slip indicated in the diff, 'where' should be 'were'.
Sorry.
< version 8.2.7 espressions in exp-1 ... where not evaluated.
Apart from the slip indicated in the diff, 'where' should be 'were'.
Sorry.
small's beautiful
Typo in manual 8.4.3
chapter ->
List processing, flow control and integer arithmetic
tells ->
and pick an argument at random and evaluate it
should be "amb"
Norman.
List processing, flow control and integer arithmetic
tells ->
and pick an argument at random and evaluate it
should be "amb"
Norman.
-- (define? (Cornflakes))