newLISP development release v.10.0.5

Notices and updates
Post Reply
Lutz
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

newLISP development release v.10.0.5

Post by 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/develo ... .0.3-5.txt

cormullion
Posts: 2037
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

new '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
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

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/ 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
Posts: 2037
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

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
Posts: 2019
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

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
Posts: 1377
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

So I thought its safe to just change it right away :-)
Unfourtunatly it brokes the error-handler in my neobook-interface.

Code: Select all

(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:
(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
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

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
Posts: 2037
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

So 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
Posts: 15
Joined: Sun May 10, 2009 3:11 am

Post by shercipher »

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
Posts: 65
Joined: Sat Sep 06, 2008 6:30 am

...announcing it on www.freshmeat.net?

Post by unixtechie »

and is it worth announcing it on www.freshmeat.net?

TedWalther
Posts: 605
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC
Contact:

Re: ...announcing it on www.freshmeat.net?

Post by TedWalther »

unixtechie wrote:and is it worth announcing it on www.freshmeat.net?
Hell yes! I don't go there often, but I still look back on freshmeat fondly.

Lutz
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

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.

Post Reply