Page 1 of 1

development version newLISP 8.7.6

Posted: Mon Jan 02, 2006 11:24 pm
by Lutz
Several improvements and bugfixes, for files and change notes see:

http://newlisp.org/downloads/development

Note that there is an extension to the build system: by just typing 'make' a script called 'build' will try to figure out the platform it is running on and choose the right makefile. 'make help' will bring up all the old choices.

At the moment MacOS X with and without readliune support, Linux, FreeBSD, OpenBSD, NetBSD, Solaris and Windows XP are all discovered automatically, but I need still need put in discovery support for libreadline on Linux (next time).

Lutz

Posted: Mon Jan 02, 2006 11:38 pm
by Fanda
I forgot to ask about 8.7.5.
It says that you can "allow default functions to be defined as primitives".

Could give me an example?

Thank you, Fanda

Posted: Tue Jan 03, 2006 12:28 am
by Lutz
For example:

Code: Select all

(define foo:foo println)

(foo x y z)
and you could have some other stuff supporting that function lexically separated in the same context 'foo'. i.e. in OO programming. I don't have a real world example at the moment, but ran into needing it some time ago.

Lutz

Posted: Tue Jan 03, 2006 12:46 am
by Dmi
: (colon) now will be returned as token even if attached to other following chars
What is the proposed application for this feature?

Posted: Tue Jan 03, 2006 12:48 am
by Dmi
Debian packaging script is ready. (now with readline support)
http://en.feautec.pp.ru/store/newlisp-d ... .7.6-1.tgz

Posted: Tue Jan 03, 2006 5:52 am
by Lutz
>>> What is the proposed application for this feature?

don't know yet, its up to the user. One could define it as an operator or function and use it as some sort of prefix.

Lutz

Posted: Tue Jan 03, 2006 9:52 am
by Dmi
Just an opinion...

There was already a way to define an operator or another symbol for ':, or for ':something. Like for '+ and '+something etc.
Now complex forms such as ':something became unavaliable.

Also this makes some difficulties for introducing lisp-like keywords.

...and also this crunches a clear lisp syntax, where two separate words are _always_ separated by a space. (except only for brackets and a quote).

There must be a cause! ;-)

Posted: Tue Jan 03, 2006 2:24 pm
by Lutz
In newLISP the colon is also a syntax element for separating the context name from the variable-symbol name, so now the colon is represents a parseing border to the left and right just like a a parenthesis or a comma.

As long as one leave thes ':' alone nothing has changed except for makeing symbol-names like ':something' unavailable, which may be a good thing, because it would have been confusing for the reader of the program. On the other side it opens the possibility to define the ':' to something related to contexts. I did not have any specific plans or intentions doing this, but perhaps somebody comes up with something interesting ;)

The whole change came about while reviewing the getToken() parser code fixing another issue, and I thought the ':' should be treated by the parser similar to the comma ','.

Lutz

Posted: Tue Jan 03, 2006 11:17 pm
by nigelbrown
Lutz wrote:makeing symbol-names like ':something' unavailable, which may be a good thing
Lutz
On the other hand it probably stops one doing a macro that could accept the standard keyword style - I've not thought this through but I gather that
(my-keyword-driven-fn :x 2 :y 3 :b 2 :a 4) can't be done now?

Nigel

Posted: Wed Jan 04, 2006 12:03 am
by Lutz
you still would be able to write that macro:

Code: Select all

> (define-macro (foo) (args))
(lambda-macro () (args))
> (foo :var x)
(: var x)
> 
So the only difference is that the colon and the symbol after it would be parsed as separate tokens.

Lutz

Posted: Wed Jan 04, 2006 2:54 pm
by Dmi
Virtually yes, but really this encounter many restrictions and complexity.
But, probably, the usage of one symbol in two senses isn't a good idea anyway.

Btw, there is a place for conformation about some reommended (not hard-coded) prefixes meaning: either we need one for keywords...
...also I like an idea about one for list's indexes:

Code: Select all

(data-list 5)
is sometimes less useful than

Code: Select all

(data-list #customer-name)
(not meaning will it be # or another char, but the one, which will not gives special meaning in a feature)

Posted: Thu Jan 05, 2006 8:09 pm
by Fanda
What about using it this way:

Code: Select all

:add equals MAIN:add
or possibly

Code: Select all

::add equals MAIN:add
Fanda