newLISP development release v.10.0.5

Started by Lutz, May 13, 2009, 07:14:01 AM

Previous topic - Next topic

Lutz

• a new 'xfer-event' for monitoring HTTP byte transfers



• postgres.lsp module for PostgreSQL



• bug fixes



for files and CHANGES notes see:



http://www.newlisp.org/downloads/development/CHANGES-10.0.3-5.txt">http://www.newlisp.org/downloads/develo ... .0.3-5.txt">http://www.newlisp.org/downloads/development/CHANGES-10.0.3-5.txt

cormullion

#1
Quotenew 'last-error' replaces 'error-number' and 'error-text'


shouldn't these be deprecated and  announced for removal in a full release, before removal in a subsequent release, rather than simply removed?

Lutz

#2
Yes, I though about this, and this is normally what should be done.



But after going through 62 modules published on http://www.newlisp.org/">http://www.newlisp.org/ and going through 335 files contributed by users over the last ~6 years and collected by me, I found 'error-event', 'error-number' or 'error-text' only used once by Norman in xerror.lsp (currently not published by Norman), a 4-line program defining an error handler to pop up a little box on X-windows in Unix installations.



Of course it also can be found in syntax highlighter files, but that does not break code. And I found it in programs translating functions into other languages than English. But I did not count those.



It also does nor occur in "Introduction to newLISP"



Today custom error handlers are basically only written using 'catch', which gives a fine grainier error handling for a specific portion of code. Its the correct way to write error handlers and done in a similar way by most other programming languages. 'catch' was introduced many years after 'error-event'.



The new 'last-error' behaves like 'net-error' and 'sys-error'.



So I thought its safe to just change it right away :-)

cormullion

#3
OK, I see your point, in this instance. :)  But I think adopting a general, more formal, procedure would be better. Then you wouldn't have to make guesses as to how many people have used a function, how many people have written and published code that used that function, how many people have written but not published code that used that function, how many people need to run the same newLISP code on more than one release at the same time, and so on.



I'm still in the middle of the transition between version 9 and 10... :)

newdep

#4
Aaaaha ! What a great way to solve that byte transfer, great enhancement Lutz thanks! very very nice... ill try that right away...
-- (define? (Cornflakes))

HPW

#5
QuoteSo I thought its safe to just change it right away :-)


Unfourtunatly it brokes the error-handler in my neobook-interface.

(define (error-handler) (print "ErrorNum: " (error-number) " " (error-text)))
(error-event (quote error-handler))


So now I have to do a version checking.

(And it does not matter if it happen in sub or major-releases)

;-(



Edit:

So it must be this:
Quote(define (error-handler) (if(<(first(-2(sys-info)))10005)(print "ErrorNum: " (error-number) " " (error-text))(print "ErrorNum: " (first(last-error)) " " (last(last-error)))))
Hans-Peter

Lutz

#6
So you are the exception to the rule: "Nobody uses it" ;).



Your's is the typical application, where you expect and need this type of error handler: frontends, IDEs and the like. Fortunately these programs are rare.

cormullion

#7
QuoteSo you are the exception to the rule: "Nobody uses it" ;).


No, he's the only one that you've heard from.



Even if it's not worth arguing about in this case, I just don't think this is the way you should remove functions from your software. I may be wrong - perhaps "Mr Python" removes functions that he can't find on his computer in the same way...

shercipher

#8
I don't see anything on the newLisp website guaranteeing that the API is stable anyway. If he wants to remove something or change its behavior, the worst you have to do is probably a find-replace. Unless the behavior of a fundamental, commonly used function is totally changed, which isn't what this was about.

unixtechie

#9
and is it worth announcing it on http://www.freshmeat.net">www.freshmeat.net?

TedWalther

#10
Quote from: "unixtechie"and is it worth announcing it on http://www.freshmeat.net">www.freshmeat.net?


Hell yes!  I don't go there often, but I still look back on freshmeat fondly.
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence.  Nine months later, they left with a baby named newLISP.  The women of the ivory towers wept and wailed.  \"Abomination!\" they cried.

Lutz

#11
development version 10.0.6, released today, will be on Freshmeat tomorrow morning. After a nice spike initally (I think with version 10.0.2),  Freshmeat announcements did not have so much of an impact. So I don't think its a big deal, that 10.0.5 wasn't on it.