newLISP development release 9.1.6

Started by Lutz, May 21, 2007, 05:25:27 AM

Previous topic - Next topic

Lutz

Version 9.1.6 contains only minor fixes and adjustments, no binary installers are available with this development release.



v.9.1.7, due around the end of May will contain the new GUI modules and come with binary installers.



http://newlisp.org/downloads/development/">http://newlisp.org/downloads/development/



Lutz

Fanda

#1
I got few ideas for improvement:



1) rest with optional number of elements to remove

(rest lst 2) = (rest (rest lst))



2) apply with negative 'int-reduce' - similar to fold right

http://newlisp-on-noodles.org/wiki/index.php/Functional_Programming#Reducing_lists_-_folds">http://newlisp-on-noodles.org/wiki/inde ... ts_-_folds">http://newlisp-on-noodles.org/wiki/index.php/Functional_Programming#Reducing_lists_-_folds



(apply op '(1 2 3 4 5) 2) = (op (op (op (op 1 2) 3) 4) 5)

(apply op '(1 2 3 4 5) -2) = (op 1 (op 2 (op 3 (op 4 5))))



3) (++ x) (-- x)

Very common +1 and -1 (for better readability).



4) destructive append

- similar to 'write-buffer', but for lists

(not sure about the name for this function)



5) function 'round' has 'int-digits' optional - currently not documented

> (round 123.49 0)

123

> (round 123.49)

123



Fanda

Dmi

#2
Quote4) destructive append

- similar to 'write-buffer', but for lists

(not sure about the name for this function)

Heh... and, probably, a way to push a list in the middle of the list :-)
(set 'lst (append (0 n lst) (lst-pushed) (n (length lst) lst)))
WBR, Dmi

Jeremy Dunn

#3
Add this to the list too:



1. Enhance the NOT function so that if it has multiple arguments it evals all of them so that you can write (not (= a 2)) as (not = a 2). This will get rid of a pair of parentheses almost every time.



2. Allow a negative integer in EXPLODE so that we break from the end rather than the beginning.

(explode "NewLISP" 2) -> ("Ne" "wL" "IS" "P")

(explode "NewLISP" -2) -> ("N" "ew" "LI" "SP")

HPW

#4
QuoteEnhance the NOT function so that if it has multiple arguments it evals all of them so that you can write (not (= a 2)) as (not = a 2).


I do not get this.

(eval =) only returns the symbol adress. (eval a) returns nil.

(eval 2) returns itself.

So you want a (not(and(eval =)(eval a)(eval 2))) ?

Maybe your way is is less typing, but not easy to read and understandable at the first look. Also when the logik gets more complex with nested expressions it seems not real lispy.
Hans-Peter

Jeremy Dunn

#5
I'm sorry that I explained myself badly. Perhaps I'll do so again but I will retry. What I had in mind was that with multiple arguments the first one should be a boolean function name and the rest of the arguments should be the arguments to that function. The idea was that for simple logic expressions like the one I gave that one can throw out the parentheses. Obviously you are not required to do so if you don't want to. As for "unlispy" I can't judge that because I thought LISP was all about finding simplifications of expressions.

pjot

#6
For your information, 9.1.6 still compiles and runs without errors and without problems on Tru64Unix.



Cheers

Peter

Fanda

#7
Quote from: "Fanda"1) rest with optional number of elements to remove

(rest lst 2) = (rest (rest lst))


It might not be necessary to redo 'rest'. N-rest can be done using 'slice' and implicit rest.


> (set 'lst '(1 2 3 4 5))
(1 2 3 4 5)
 
> (rest lst)
(2 3 4 5)
> (rest (rest lst))
(3 4 5)
 
> (2 lst)
(3 4 5)
> (slice lst 2)
(3 4 5)


Fanda

newdep

#8
Quote from: "Lutz"v.9.1.7, due around the end of May will contain the new GUI modules and come with binary installers.






...The beer just hit the fridge... Im ready.. ;-)
-- (define? (Cornflakes))

Lutz

#9
newLISP development version 9.1.7



Not the GUI version yet but some bug fixes I wanted to get out:

http://newlisp.org/download/development/">http://newlisp.org/download/development/



You can see a preview of what is coming next week here:

http://newlisp.org/download/development/guiserver-development.png">http://newlisp.org/download/development ... opment.png">http://newlisp.org/download/development/guiserver-development.png



The new GUI console app is entirely done using the new GUI facilities. The beautiful icons are created (*) by Michael Michaels from http://neglook.com">http://neglook.com



Lutz



(*) this is work in progress, not licensed for usage/distribution yet

HPW

#10
The beer has to wait a few days.



Still curious what the communication technic between newLISP and the GUI-Server will be?

2 processes communicating?

1 process with a GUI-Lib?



And of cource curious on the list of the supported GUI-elements.



The preview shows us:

gs:frame

gs:button

gs:panel



Tabbed pane?



gs:set-flow-layout seems also very interesting!



So what is used for the GUI-Server and has this project its own documentation?
Hans-Peter

newdep

#11
Aaaa now im realy lost... Cant make up 100% what the widgets are

made of ... Ill double the beer in the fridge ;-)



Btw: thanks for the fix Lutz!
-- (define? (Cornflakes))

Lutz

#12
I wonder nobody has figured it out so far :-)



several of the terms used in the API gave it away ;-)


Quote2 processes communicating?


yes, thats where the name server comes from. The server process links to a popular platform independent libray which comes preinstalled on Win32 and Mac OSX. On UBUNTU it also has been announced for 7.04, but not all kinks are worked out yet (have only been able to experiment with the life disk).


Quote...and has this project its own documentation?


yes, that library used does have its own documentation, but that documentation (which is rather huge) is not necessary to study when building newLISP GUI apps. The newLISP GUI API is a high-level abstraction of the original API. I am working on the newLISP documentation right now, and only that documentation will be required.


QuoteTabbed pane?


yes, it supports tabbed panes as the icon demo shows and also split-panes and scroll-panes. A split-pane is used in the console app to the left. You can drag the bar between the 2 windows up or down.



Lutz

rickyboy

#13
Quote from: "Lutz"newLISP development version 9.1.7



You can see a preview of what is coming next week here:

http://newlisp.org/download/development/guiserver-development.png">http://newlisp.org/download/development ... opment.png">http://newlisp.org/download/development/guiserver-development.png


Ah yes, and it looks soooo good on the Mac! (No offense to other platforms.)  :-)
(λx. x x) (λx. x x)

HPW

#14
QuoteNo offense to other platforms


We have not seen the other platforms yet!

;-)

So wait and see.
Hans-Peter