The 9.4.0 newLISP manual

Started by Lutz, June 09, 2008, 06:05:01 AM

Previous topic - Next topic

cormullion

#30
I'm not sure it would easy. And  I think Microsoft have announced they're moving away from that format to another one. Also, I don't think it's easy to develop on systems other than Windows.

newdep

#31
chm just is so easy to click on actualy and Voila you have a nice windowed

manual that runs on everything that has windows on it..



But i agree chm is from the OS2 days and its time for Microsoft to invent

their own stuff for once ;-)





I think  Ill continue with porting the the Newlisp manual then to my JAVA

manual viewer by use of GS...(always a pleasure to use domestic tools ;-)
-- (define? (Cornflakes))

newdep

#32
For release 10.0



perhpas the left pane index could get a little more extention?



!  +-*/%  Ab  Ap  B  Ca  Co  Da  Di  Em  Ev  Fa  Fn  G  I  J  La  Li  Ma  Me  Na   Ne  No  O  Pa  Q  Ra  Reg  Sa  Sh  St  T  U  W  X  





more function now exist and this small index jumps over functions...

Not realy an issue but would walking through the manual a little more

smooth...





!  +-*/%  Ab An Ap  B  Ca  Co  Da  Di  Em  Ev  Fa  Fn  G  I  J  La  Li  Lo Ma  Me  Na Ne Ni No Nu  O Pa Pe Pi  Q  Ra  Re Ro  Sa Se Si Sg Sh So St Sy Ta Ti  Un Up Ut  Wa Wr  X Ze
-- (define? (Cornflakes))

newdep

#33
For release 10.0



another document extention...



Could the Chapters listed on the left frame ->



List processing, flow control and integer arithmetic

String and conversion functions

Floating point math and special functions

Matrix functions

Array functions

..

..



Also "be" a link that points to the description of these...
-- (define? (Cornflakes))

HPW

#34
Hans-Peter

newdep

#35
9.9.9.3



Manual states, which does not work anymore due to inc/dec changes->









Functions with memory



A default function can update the lexically isolated static variables contained inside its namespace:



    ;; a function with memory



    (define (Gen:Gen x)

        (if Gen:acc

            (inc 'Gen:acc x)

            (set 'Gen:acc x)))



    (Gen 1)  → 1

    (Gen 1)  → 2

    (Gen 2)  → 4

    (Gen 3)  → 7



    gen:acc  → 7
-- (define? (Cornflakes))

Lutz

#36
Thanks, I am working all this week on documentation, so any corrections are specially welcome this week.

newdep

#37
init.conf.example has a wrong directory for lynx.



"lynx /usr/share/newlisp/doc/newlisp_manual.html#%s"



should be (according to the Makefile) ->



"lynx /usr/share/doc/newlisp/newlisp_manual.html#%s"





On the otherhand? You could change it with this ->

(but the html is very nice too)





;; --- command line help

(define-macro (help func-name)

(if (find func-name "|+*-") (push "\" func-name))

(set 'html-text (join (find-all (format {(syntax: (%s.*?)} (name func-name) )

(read-file "/usr/share/doc/newlisp/newlisp_manual.html")) "n"))

(println (replace "<.*?>" html-text "" 0))

"" )
-- (define? (Cornflakes))

xytroxon

#38
Errata:



http://newlisp.nfshost.com/downloads/development/newlisp_manual.html">http://newlisp.nfshost.com/downloads/de ... anual.html">http://newlisp.nfshost.com/downloads/development/newlisp_manual.html



A sneaky html / frames problem with this section in the manual:



---------

   4. Functions in alphabetical order



      !  +-*/%  Ab  Ap  As  Ba  Ca  Cl  Co  Cu  De  Di  Do  En

      Ex  Fi  Fl  Ga  Gl  In  La  Li  Ma  Mu  Net  New  Nt  Pa

      Pr  Ra  Rea  Reg  Sea  Seq  Sl  St  Sy  Ti  Tr  Ut  Wr



Appendix...

-------



When reading the newLISP manual in HTML format, no frames, clicking on any of the above links opens another (one) copy of newlisp_manual.html in my browser...



The problem is caused by the links being in the form:
<a href="..." target="body">
when no parent frame is present...



So the links in newlisp_manual.html should be in this form:
<a href="...">

Note: target="body" does not cause a problem when clicking these links from this section of the newlisp_manual.html in the frames version. That is, when the manual_frame.html page is used to view the manual.



---------



set-ref-all * <- uses asterisk instead of ! (exclamation point) as used by all other destructive functions



----------



-- xytroxon
\"Many computers can print only capital letters, so we shall not use lowercase letters.\"

-- Let\'s Talk Lisp (c) 1976

Lutz

#39
Thanks for all the manual corrections. An updated version is available here:



http://www.newlisp.org/downloads/development/newlisp_manual.html">http://www.newlisp.org/downloads/develo ... anual.html">http://www.newlisp.org/downloads/development/newlisp_manual.html

newdep

#40
Missing brackets ->



manual 9.9.9.4



8. Lambda expressions in newLISP



(set 'double (lambda (x) (+ x x))  <---- missing )

(set 'double (fn (x) (+ x x))   <---- missing )
-- (define? (Cornflakes))

newdep

#41
The define function is just a shorter way of assigning a lambda expression to a symbol:



    (define (double x) (+ x x)))  → (lambda (x) (+ x x))

    (double 123)                  → 246





should be ->



    (define (double x) (+ x x))  → (lambda (x) (+ x x))

    (double 123)                  → 246
-- (define? (Cornflakes))

newdep

#42
according to the manual ->



A lambda list can be manipulated as a first-class object using any function that operates on lists:



    (setf (double 1) '(mul 2 x))     → (lambda (x) (mul 2 x))

    double                           → (lambda (x) (mul 2 x))

    (double 123)                     → 246







But that gives ->





# No Symbol reference found!
-- (define? (Cornflakes))

Lutz

#43
The example in the manual is wrong, because '(double 1)' will be evaluated returning 2, its the ambiguity of implicit indexing versus function call, therefore 'nth' has to be used:



This is the correct example:


(setf (nth 1 double) '(mul 2 x)) => (mul 2 x)
double => (lambda (x) (mul 2 x))

newdep

#44
Use the constant function (which works like set) to protect the symbol from subsequent alteration. Using the setq or setq function eliminates the need to quote the variable symbol.





should be ->

Use the constant function (which works like set) to protect the symbol from subsequent alteration. Using the setq or setf function eliminates the need to quote the variable symbol.



(setq should be setf, the link is oke though...)
-- (define? (Cornflakes))