release newLISP version 10.0

Started by Lutz, December 08, 2008, 07:10:31 AM

Previous topic - Next topic

xytroxon

#15
Some I just found in Code Patterns to fix (may be some variable names)



caugth



chracter



conventsions



differencing



distibuted



eilnpsw



elmnt



exampls



extabish



fropm



fucntion



funcion



indetd



nde



netcat



nodep



nohup



prodcons



resuls



solutions



somefile



sring



transfomed



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

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

Lutz

#16
Thanks to xytroxon and all the others sending in corrections for documentation. A new version of Code Patterns is  online here:



http://www.newlisp.org/downloads/CodePatterns.html">http://www.newlisp.org/downloads/CodePatterns.html



The manual was updated last on december 20th.



There will be a 10.0.1 maintenance release update during the first week of January, fixing some bugs and updating some external files. Most of these files are already online, i.e. stat.lsp and newLISPdoc.html.



Many thanks to everybody in the community for their participation and advice.



To all a good transition into a happy and peaceful year 2009.

Jeremy Dunn

#17
Sorry Xytotron, there is a typo in your typos! it should be



otherwis -> otherwise



not



otherwis -> otherwize

xytroxon

#18
Quote from: "Jeremy Dunn"Sorry Xytotron, there is a typo in your typos! it should be



otherwis -> otherwise



not



otherwis -> otherwize


Thankzzz!



Muzzzt of been the early AM hour here... ;)



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

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

didi

#19
I can't write-line to a file , maybe a bug, maybe i'm to dumb -  i tried it in a program and than with the original-sample from the manual:


( set 'out-file (open "myfile" "write" ))
( write-line "hello there" out-file )
( close out-file )


leads to :

ERR: string expected in function write-line : out-file



my system : windows-xp

xytroxon

#20
You are confused by the "string device" syntax verses the  "file device" syntax...



Change:
( write-line "hello there" out-file )
To:
( write-line out-file "hello there" )

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

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

Lutz

#21
'write-line' changed order of parameters for 10.0, but unfortunately the string device example in the reference didn't get converted, now corrected:



http://www.newlisp.org/newlisp_manual.html#write-line">http://www.newlisp.org/newlisp_manual.html#write-line



the I/O device is now always the first parameter

didi

#22
Thanks for the fast help - now it works fine.

newBert

#23
newLISP 10.0 Manual


Quote from: "newLISP 10.0 Manual"set[/color] Gen:acc x)))



    (Gen 1)  → 1

    (Gen 1)  → 2

    (Gen 2)  → 4

    (Gen 3)  → 7



    gen:acc  → 7



The first time the Gen function is called, its accumulator is set to the value of the argument. Each successive call increments Gen's accumulator by the argument's value.



The definition of Gen:Gen shows, how a fuction is put in its own namespace without using the surroundng (context 'Gen) and (context MAIN) statements. In that case only symbols qualified by the namespace prefix will end up in the Gen context. In the above example the variable x is still part of MAIN.

and the example causes an error:
ERR: symbol expected in function set : acc
called from user defined function Gen

(set Gen]setq[/color] Gen:acc x) or (set 'Gen:acc x)
<r><I>>Bertrand<e></e></I> − <COLOR color=\"#808080\">><B>newLISP<e></e></B> v.10.7.6 64-bit <B>>on Linux<e></e></B> (<I>>Linux Mint 20.1<e></e></I>)<e></e></COLOR></r>

DrDave

#24
Quote from: "newBert"newLISP 10.0 Manual



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)

            (setq Gen]

On v.9.9.4 Win32 I additionally had to add a quote to the inc code:

replace      (inc Gen:acc x)

with           (inc 'Gen:acc x)



(Don't have v10 installed on this computer.)
...it is better to first strive for clarity and correctness and to make programs efficient only if really needed.

\"Getting Started with Erlang\"  version 5.6.2

cormullion

#25
I think the changes to inc and dec were in a later 9.9.x release... So the 9.9.4 version you have is somewhat between version 9 and version 10... (and presumably slightly less reliable as well?)

DrDave

#26
Quote from: "cormullion"I think the changes to inc and dec were in a later 9.9.x release... So the 9.9.4 version you have is somewhat between version 9 and version 10... (and presumably slightly less reliable as well?)


OK, I installed v.10.0.1 Win32 and this runs correctly


define (Gen:Gen x)
(if Gen:acc
(inc Gen:acc x)
(setq Gen:acc x)))
...it is better to first strive for clarity and correctness and to make programs efficient only if really needed.

\"Getting Started with Erlang\"  version 5.6.2