Manual and release notes for upcoming 10.2.0
Manual and release notes for upcoming 10.2.0
The manual and release notes for upcoming version 10.2.0 of newLISP have been updated here:
http://www.newlisp.org/downloads/development/latest/
If anybody wants to make corrections (including better wording), there are not many days left before release.
http://www.newlisp.org/downloads/development/latest/
If anybody wants to make corrections (including better wording), there are not many days left before release.
Re: Manual and release notes for upcoming 10.2.0
<<, >>
(>> 0x800000000000000 1)
(>> 0x8000000000000000 1)
define
Expressions in exp-default are evaluated in the function's current environment.
(define-macro (foo (a 10) (b (div a 2)))
(define (foo (a 10) (b (div a 2)))
for
If no step size is specified, 1.0 is assumed.
If no step size is specified, 1 is assumed.
fv
If payment is at the end of the period, int-type is 0 (zero); for payment at the end of each period, int-type is 1. If num-type is omitted, payment at the end of each period is assumed.
If payment is at the end of the period, int-type is 0 (zero); for payment at the end of each period, int-type is 1. If num-type is omitted, payment at the end of the period is assumed.
because
int
If str is invalid, int returns nil as a default value if not otherwise specified.
If exp is invalid, int returns nil as a default value if not otherwise specified.
maybe.
Sorry, I ended the translation up to I, yet.
(>> 0x800000000000000 1)
(>> 0x8000000000000000 1)
define
Expressions in exp-default are evaluated in the function's current environment.
(define-macro (foo (a 10) (b (div a 2)))
(define (foo (a 10) (b (div a 2)))
for
If no step size is specified, 1.0 is assumed.
If no step size is specified, 1 is assumed.
fv
If payment is at the end of the period, int-type is 0 (zero); for payment at the end of each period, int-type is 1. If num-type is omitted, payment at the end of each period is assumed.
If payment is at the end of the period, int-type is 0 (zero); for payment at the end of each period, int-type is 1. If num-type is omitted, payment at the end of the period is assumed.
because
Code: Select all
> (fv (div 0.07 12) 1 775.3 -100000 0)
99808.03333
> (fv (div 0.07 12) 1 775.3 -100000 1)
99803.51075
> (fv (div 0.07 12) 1 775.3 -100000)
99808.03333
If str is invalid, int returns nil as a default value if not otherwise specified.
If exp is invalid, int returns nil as a default value if not otherwise specified.
maybe.
Sorry, I ended the translation up to I, yet.
Re: Manual and release notes for upcoming 10.2.0
The last lines of the newLISP manual function definitions:
======
inc
Use the ++ function for incrementing numbers in integer mode.
----------
dec
Use the inc function to increment numbers.
======
Need to be changed to something like:
======
inc
Use the ++ function for incrementing numbers in integer mode.
Use the dec function to decrement numbers.
----------
dec
Use the -- function for decrementing numbers in integer mode.
Use the inc function to increment numbers.
======
(And if it's not too much trouble ;p)
You added ++ and -- to the +, -, *, /, % table entry
in:
Function Reference
1. Syntax of symbol variables and numbers
2. Data types and names in the reference
3. Functions in groups
* List processing, flow control, and integer arithmetic
Now the table entry is:
+, ++, -, --, *, /, % integer arithetic
Besides looking messy ;p)
When deconstructing the single newLISP manual html file into individual html pages, the ++ and -- sections are not reachable by scrolling down from +, ++, -, --, *, /, %.
Could you change the table to:
+, -, *, /, % integer arithmetic
++ incremet integer number
-- decrement integer number
-- xytroxon
======
inc
Use the ++ function for incrementing numbers in integer mode.
----------
dec
Use the inc function to increment numbers.
======
Need to be changed to something like:
======
inc
Use the ++ function for incrementing numbers in integer mode.
Use the dec function to decrement numbers.
----------
dec
Use the -- function for decrementing numbers in integer mode.
Use the inc function to increment numbers.
======
(And if it's not too much trouble ;p)
You added ++ and -- to the +, -, *, /, % table entry
in:
Function Reference
1. Syntax of symbol variables and numbers
2. Data types and names in the reference
3. Functions in groups
* List processing, flow control, and integer arithmetic
Now the table entry is:
+, ++, -, --, *, /, % integer arithetic
Besides looking messy ;p)
When deconstructing the single newLISP manual html file into individual html pages, the ++ and -- sections are not reachable by scrolling down from +, ++, -, --, *, /, %.
Could you change the table to:
+, -, *, /, % integer arithmetic
++ incremet integer number
-- decrement integer number
-- xytroxon
"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976
-- Let's Talk Lisp (c) 1976
Re: Manual and release notes for upcoming 10.2.0
Many thanks to Johu and Xytroxon for the corrections. Updated versions of the documents can be found here:
http://www.newlisp.org/downloads/development/latest/
http://www.newlisp.org/downloads/development/latest/
Re: Manual and release notes for upcoming 10.2.0
Thank you Lutz.
and,
mat
Using the second syntax, all cells in matrix-A are multiplied with a scalar in number:
Using the second syntax, all cells in matrix-A are operated with a scalar in number:
maybe.
I ended the translation up to M.
and,
mat
Using the second syntax, all cells in matrix-A are multiplied with a scalar in number:
Using the second syntax, all cells in matrix-A are operated with a scalar in number:
maybe.
I ended the translation up to M.
Re: Manual and release notes for upcoming 10.2.0
Sorry, I have not ended the translation up to N, yet.
net-interface
This function has only usage on multihoned servers
This function has only usage on multihomed servers
An interface address can be defined as either and IP address or a name.
An interface address can be defined as either IP address or a name.
maybe and also,
Socket TCP/IP and UDP network API
net-eval Sets the default interface IP address on multihoned computers.
net-interface Sets the default interface IP address on multihomed computers.
net-interface
This function has only usage on multihoned servers
This function has only usage on multihomed servers
An interface address can be defined as either and IP address or a name.
An interface address can be defined as either IP address or a name.
maybe and also,
Socket TCP/IP and UDP network API
net-eval Sets the default interface IP address on multihoned computers.
net-interface Sets the default interface IP address on multihomed computers.
Re: Manual and release notes for upcoming 10.2.0
Thanks for your help, Johu. Release will be next week, so everything coming in until Monday or Tuesday, will be in the distribution packages. But I always post revisions with corrections for the on-line manual between releases too.
Re: Manual and release notes for upcoming 10.2.0
newLISP manual spelling errors:
addtionally -> additionally
arithmetik -> arithmetic
beginnig -> beginning
charcaters -> characters
comforms -> conforms
comminicate -> communicate
directoy -> directory
Erros -> errors
errror -> errors
espressions -> expressions
exspired -> expired
fucntion -> function
imformation -> information
implementarion -> implementation
insteead -> instead
interacive -> interactive
libraryi -> library
specific matric operations -> specific matrix operations
mssage -> message
nsufficient -> insufficient
occurrance -> occurrence
Ofset -> Offset
othet -> other
previusly -> previously
recognizabe -> recognizable
routinesi -> routines
succesfully -> successfully
in thr sender -> in the sender
Whe the prefix -> When the prefix
woth -> with
-- xytroxon
addtionally -> additionally
arithmetik -> arithmetic
beginnig -> beginning
charcaters -> characters
comforms -> conforms
comminicate -> communicate
directoy -> directory
Erros -> errors
errror -> errors
espressions -> expressions
exspired -> expired
fucntion -> function
imformation -> information
implementarion -> implementation
insteead -> instead
interacive -> interactive
libraryi -> library
specific matric operations -> specific matrix operations
mssage -> message
nsufficient -> insufficient
occurrance -> occurrence
Ofset -> Offset
othet -> other
previusly -> previously
recognizabe -> recognizable
routinesi -> routines
succesfully -> successfully
in thr sender -> in the sender
Whe the prefix -> When the prefix
woth -> with
-- xytroxon
"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976
-- Let's Talk Lisp (c) 1976
Re: Manual and release notes for upcoming 10.2.0
not
If exp evaluates to nil, then true is returned; otherwise, nil is returned.
If exp evaluates to nil or the empty list (), then true is returned; otherwise, nil is returned.
Next time, I will post in a new topic.
If exp evaluates to nil, then true is returned; otherwise, nil is returned.
If exp evaluates to nil or the empty list (), then true is returned; otherwise, nil is returned.
Next time, I will post in a new topic.
Re: Manual and release notes for upcoming 10.2.0
Spelling errors in Code Patterns 10.1.12 02-23-2010
allthough -> although
chracter -> character
controlls -> controls
conventsions -> conventions
distibuted -> distributed
fucntion -> function
libararies -> libraries
mesaging ->messaging
messsages -> messages
mulitple -> multiple
persisten -> persistent
shapters -> chapters
sring -> string
sruct mystruct -> struct mystruct
transfomed -> transformed
-- xytroxon
allthough -> although
chracter -> character
controlls -> controls
conventsions -> conventions
distibuted -> distributed
fucntion -> function
libararies -> libraries
mesaging ->messaging
messsages -> messages
mulitple -> multiple
persisten -> persistent
shapters -> chapters
sring -> string
sruct mystruct -> struct mystruct
transfomed -> transformed
-- xytroxon
"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976
-- Let's Talk Lisp (c) 1976
Re: Manual and release notes for upcoming 10.2.0
Many thanks again to Johu and Xytroxon for the latest corrections. You can find files in the usual downloads/development/latest/ -location. Please try to post pending corrections until March 16th, 12:00 UTC.
Re: Manual and release notes for upcoming 10.2.0
pack
See also the address, get-int, get-long get-char, get-string, and unpack functions.
See also the address, get-int, get-long, get-char, get-string, and unpack functions.
parse
If <em>str-data</em> is specified, there is no limitation on the length of tokens.
If <em>str-break</em> is specified, there is no limitation on the length of tokens.
Instead of { and } (left and right curly brackets), quotes can be used to limit the pattern.
Instead of { and } (left and right curly brackets), double quotes can be used to limit the pattern.
And,
Are the following the same ?
I think that fv's sentence is better.
fv
If payment is at the end of the period, int-type is 0 (zero) or int-type is omitted; for payment at the beginning of each period, int-type is 1.
nper
If payment is at the end of the period, int-type is 0; else it is 1. If int-type is omitted, 0 is assumed.
pmt
When paying at the end of each period, num-type is 0 (zero); otherwise,it is 1. If omitted, int-type is assumed to be 0 (zero) for payment at the end of a period.
When paying at the end of each period, int-type is 0 (zero); otherwise,it is 1. If omitted, int-type is assumed to be 0 (zero) for payment at the end of a period.
pv
If payment is at the end of each period, 0 (zero) is assumed for int-type; otherwise, 1 is assumed.
See also the address, get-int, get-long get-char, get-string, and unpack functions.
See also the address, get-int, get-long, get-char, get-string, and unpack functions.
parse
If <em>str-data</em> is specified, there is no limitation on the length of tokens.
If <em>str-break</em> is specified, there is no limitation on the length of tokens.
Instead of { and } (left and right curly brackets), quotes can be used to limit the pattern.
Instead of { and } (left and right curly brackets), double quotes can be used to limit the pattern.
And,
Are the following the same ?
I think that fv's sentence is better.
fv
If payment is at the end of the period, int-type is 0 (zero) or int-type is omitted; for payment at the beginning of each period, int-type is 1.
nper
If payment is at the end of the period, int-type is 0; else it is 1. If int-type is omitted, 0 is assumed.
pmt
When paying at the end of each period, num-type is 0 (zero); otherwise,it is 1. If omitted, int-type is assumed to be 0 (zero) for payment at the end of a period.
When paying at the end of each period, int-type is 0 (zero); otherwise,it is 1. If omitted, int-type is assumed to be 0 (zero) for payment at the end of a period.
pv
If payment is at the end of each period, 0 (zero) is assumed for int-type; otherwise, 1 is assumed.
Re: Manual and release notes for upcoming 10.2.0
search
If int-options is mot specified
Re: Manual and release notes for upcoming 10.2.0
Lutz,
can you post the link to the odt file when the documentation becomes stable.
I want to compile it to a CHM file as you suggested.
Here I have CHM files belonging to the previous version 10.1.x ,
namely
codepatterns and
introduction-to-newlisp from Wikibooks
Would you prefer me to update them first?
Also I was working on a compiled help file containing the GTK+ Reference Manual for GTK+ 2.18.9 .
The good thing will be to use the reference as contextsensitive help in editors.
Do you and others like them separately or all in one file?
Regards,
Michael
can you post the link to the odt file when the documentation becomes stable.
I want to compile it to a CHM file as you suggested.
Here I have CHM files belonging to the previous version 10.1.x ,
namely
codepatterns and
introduction-to-newlisp from Wikibooks
Would you prefer me to update them first?
Also I was working on a compiled help file containing the GTK+ Reference Manual for GTK+ 2.18.9 .
The good thing will be to use the reference as contextsensitive help in editors.
Do you and others like them separately or all in one file?
Regards,
Michael
Re: Manual and release notes for upcoming 10.2.0
Here is the latest version in OpenOffice ODT format:
http://www.newlisp.org/newlisp_manual-10201.odt
The PDF and HTML versions have been updated too.
Ps: I would keep different formats in different files.
http://www.newlisp.org/newlisp_manual-10201.odt
The PDF and HTML versions have been updated too.
Ps: I would keep different formats in different files.
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Re: Manual and release notes for upcoming 10.2.0
Sorry to have missed out on the editing this time round! Thanks to everyone for making theh newLISP manual (even) better!
In some spare moments I've been thinking about ebooks and electronic docs. I've been using the newlisp manual as a real-world example. One thing I tried was this:
Yes, it doesn't work. But that's just because the manual is in HTML Transitional. I ran the HTML source through BBEdit's version of Tidy - converting it to XHTML. It appears to make little difference to the 'user experience' in a browser - a lot of changes to BR tags and so on, but not much else.
But now that code above works, and produces SXML of the source:
Yes it looks crazy (but better than HTML), but I can't help thinking that this format might be useful, because you can easily use newLISP on it. For example:
gives a list of all syntax definitions, suitable for producing a quick reference guide...
A few questions arise: what are the problems with distributing the manual in XHTML rather than HTML, such that a trip through Tidy wouldn't be necessary? Also, how could you go about outputting the SXML structure to other formats, such as plain old HTML? It kind of looks to me like it could be executable, somehow, if there were definitions for the major tags... And another possibility - could this format be the basis for some kind of newLISP-oriented text editor?
Just a few thoughts... :)
In some spare moments I've been thinking about ebooks and electronic docs. I've been using the newlisp manual as a real-world example. One thing I tried was this:
Code: Select all
(set 'f (read-file {/usr/share/doc/newlisp/newlisp_manual.html}))
(xml-type-tags nil nil nil)
(set 'xf (xml-parse f 15))
But now that code above works, and produces SXML of the source:
Code: Select all
(html ((xmlns "http://www.w3.org/1999/xhtml")) (head (meta ((http-equiv "content-type")
(content "text/html; charset=utf-8")))
(meta ((name "author") (content "Lutz Mueller")))
(meta ((name "keywords") (content "newLISP Lisp SCHEME programming language manual reference Artificial Intelligence AI NUEVATEC")))
(meta ((name "description") (content "newLISP Users Manual and Reference")))
...
(a ((name "shell") (id "shell")))
(h2 (span ((class "function")) "!"))
(h4 "syntax: (! " (em "str-shell-command") ")")
(p "Executes the command in " (em "str-command") " by shelling out to the operating system and executing. This function returns a different value depending on the host operating system.")
(pre "\n(! \"vi\") \n(! \"ls -ltr\")\n")
...
Code: Select all
(set 'xr (ref-all 'h4 xf))
(dolist (r xr) (println (rest (xf (chop r)))))
A few questions arise: what are the problems with distributing the manual in XHTML rather than HTML, such that a trip through Tidy wouldn't be necessary? Also, how could you go about outputting the SXML structure to other formats, such as plain old HTML? It kind of looks to me like it could be executable, somehow, if there were definitions for the major tags... And another possibility - could this format be the basis for some kind of newLISP-oriented text editor?
Just a few thoughts... :)
Re: Manual and release notes for upcoming 10.2.0
peanut gallery here. all of that sounds very cool and useful to me. :-)
Re: Manual and release notes for upcoming 10.2.0
This is a great idea. If you can send me an XHTML translation of the current rev-2 manual from:
http://www.newlisp.org/downloads/newlisp_manual.html
and I can try if it works with my PDF conversion.
http://www.newlisp.org/downloads/newlisp_manual.html
and I can try if it works with my PDF conversion.
Re: Manual and release notes for upcoming 10.2.0
In the end I succeded to do the XHTML conversion myself, and its online now:
http://www.newlisp.org/downloads/newlisp_manual.html
it can be parsed using:
and you can do this:
The 'true' flag at the end of 'ref/ref-all' was introduced in 10.1.7 to return the content instead of the index-vector.
http://www.newlisp.org/downloads/newlisp_manual.html
it can be parsed using:
Code: Select all
(xml-type-tags nil nil nil nil)
(xml-parse (read-file "newlisp_manual.html") 15)
Code: Select all
> (ref-all '(h1 *) (xml-parse (read-file "./newlisp_manual.html") 15) match true)
((h1 "Contents") (h1 "newLISP Users Manual") (h1 "newLISP Function Reference"))
>
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Re: Manual and release notes for upcoming 10.2.0
Cool - I was going to do it when I got back today but you beat me to it. I think Tidy is freely available, even though BBEdit costs money...
I can see how you'd scan the SXML for analysis:
But presumably it's possible to actually execute the SXML list directly, provided that there are suitable functions already define for each symbol/tag...? How would I do that?
I can see how you'd scan the SXML for analysis:
Code: Select all
(define Tags:Tags)
(define (count-tags expr)
(cond
((list? (first expr))
(count-tags (first expr))
(dolist (s (rest expr)) (count-tags s)))
((symbol? (first expr))
(dolist (s (rest expr))
(count-tags s))
(set 'key (string (first expr)))
(if (Tags key)
(Tags key (inc (Tags key)))
(Tags key 1))
)
)
)
(count-tags xf)
(println (Tags))
(
("a" 2298)
("align" 47)
("alink" 1)
("b" 150)
("bgcolor" 1)
("blockquote" 21)
("body" 1)
("border" 20)
("br" 1079)
("cellpadding" 20)
("center" 42)
("class" 2031)
("color" 29)
...
But presumably it's possible to actually execute the SXML list directly, provided that there are suitable functions already define for each symbol/tag...? How would I do that?
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Re: Manual and release notes for upcoming 10.2.0
I tried to work out how to make such an SXML list can be an expression that can be directly evaluated. The problem is with the double-parenthesized expressions. For example, this is OK:
because user-defined functions can be defined that output some representation of paragraph and underlined text. But I can't make these work:
because of the double parentheses?
Code: Select all
(p "Built-in and user-defined functions are suitable for " (u "both") " types of arguments, but when passing context names, data will be passed by reference.")
(p "Quoted symbols can also be used to pass data by reference, but this method has disadvantages:")
Code: Select all
(a ((href "#load")) "load")
Re: Manual and release notes for upcoming 10.2.0
You need to add the SXML attribute tag '@' via option 16
Now the '@' could be defined as processing the s-expressions follwing it. Basically it would work like a 'begin'.
Code: Select all
(xml-type-tags nil nil nil nil)
(xml-parse "<a href='#thelink'>a Link</a>" 31)
=> ((a (@ (href "#thelink")) "a Link"))
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Re: Manual and release notes for upcoming 10.2.0
Yes - that works, thanks! Although now I've got even further into the jungle:
First I had to redefine the built-in symbols that also appear in the SXML, but then:
it gives a stack overflow error... Nested too much? I didn't think so. I think I'm close to a solution but ...
First I had to redefine the built-in symbols that also appear in the SXML, but then:
Code: Select all
(set-ref-all 'div xf '_div)
(set-ref-all 'name xf '_name)
(set-ref-all '@ xf '_@)
(define (_@) (begin (args)))
(map
(fn (f)
(letex
((fn-name (sym (string f))))
(define (fn-name a)
(string a))))
(map first (Tags)))
(println (apply eval xf))
Re: Manual and release notes for upcoming 10.2.0
In newlisp_manual.html, some lines that have a unbalanced double quotes(") are found.
Please see diff file below:
Please see diff file below:
Code: Select all
--- newlisp_manual-10.2.1-rev2.orig.html Tue Mar 30 02:59:58 2010
+++ newlisp_manual-10.2.1-rev2.html Tue Mar 30 03:12:13 2010
@@ -2099,7 +2099,7 @@
; strings
-(set 's "NewLISP)
+(set 's "NewLISP")
(setf (s 0) "n") <span class='arw'>→</span> "n"
@@ -2590,7 +2590,7 @@
</pre>
<p>The <a href="#symbols">symbols</a> function is used to show all symbols
-belonging to a context"</p>
+belonging to a "context"</p>
<pre>
(symbols FOO) <span class='arw'>→</span> (FOO:func FOO:var FOO:x FOO:y FOO:z)
@@ -2896,7 +2896,7 @@
;; Variables used throughout this namespace
(define db:handle)
-(define db:host "http://localhost)
+(define db:host "http://localhost")
;; Constants