I must say that JAVA is a good choise if you want to be Multi OS based with a
solid well tested GUI.. Its even working on Mobile Phones , Tv's and my
microwave ;-)
JAVA has lots and lots of possibilty's !! including a newlisp GUI, and by making
that step newlisp will become a harder competitor for other languages.
On the other hand... I was never found of JAVA because i lack the way of thinking...
And i think with the guiserver we dont even have to go that way anyway...
I realy dislike the VM memory megabyte kill of JAVA..(eats too much memory 50MB+)
But on the otherhand I always loved the flexibilty of JAVA's GUI..
That brings me right to http://www.processing.org where newlisp will now
push that right off the edge !!!
So.. I now truly need to brush my teeth because the word JAVA did not
pass my mouth that often as today..I also need to Reinstall on every system I
own JAVA..(because its the first thing I remove when I find it..;-)
man..after rethinking this choise... I must say.. Good one!
Lets kick some tools into the world and push some languages to the bin-basket ;-)
Norman.
newLISP development release 9.1.6
Interesting news!- guiserver is built on swing libs
So we can use/learn swing related resources.
http://java.sun.com/docs/books/tutorial/uiswing/
Will it be possible/make sense to use one of the available swing-GUI builders?
(Converting GUI-definitions to newLISP GUI-server-syntax)
Hans-Peter
Any plans to add a 3D API later?
http://java.sun.com/products/java-media/3D/
https://java3d.dev.java.net/
(Natural question from a CAD-LISP-Programmer)
;-)
http://java.sun.com/products/java-media/3D/
https://java3d.dev.java.net/
(Natural question from a CAD-LISP-Programmer)
;-)
Hans-Peter
No, no.So we can use/learn swing related resources.
The newLISP API is very different, much smaller and in part terminology has changed too. Lerning anything Java or Swing won't help you. The Java style of programming is also completely different.
The module documentation coming with guiserver and the examples are enough to get you started.
Lutz
ps: in the near/middle future no plans for a 3D API only standard Java RE stuff. I don't think the 3D media libraries are part of this.
Getting more and more curious on the release!The module documentation coming with guiserver and the examples are enough to get you started.
Would it be possible after a seperate install of the 3D media libraries with an extended version of the GUI-server?ps: in the near/middle future no plans for a 3D API only standard Java RE stuff. I don't think the 3D media libraries are part of this.
Hans-Peter
Maybe a different approach would even better.... extended version of the GUI-server
A API to let the GUI-server load java extension libraries (like the 3D media libraries) at runtime and a technic to call this libs without providing a complete lisp-wrapper in the GUI server. (like the import feature in newLISP) So no need to modify the server for each etxetsnion and it can be smaller with the core functions.
Edit: In newLISP-TK there was the possibility to use everything what TCL offers in a easy way. So it was possible to use the best things from both enviroments (newLISP and TCL/TK). So it would be nice to have the best from Java and newLISP.
Hans-Peter
I still keep thinking about this and I am canceling my suggestion. Instead of using an 'apply' for folding, I would create a new 'fold':Fanda wrote:2) apply with negative 'int-reduce' - similar to fold right
http://newlisp-on-noodles.org/wiki/inde ... ts_-_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))))
Code: Select all
(define (fold f lst n)
(let (result nil)
(if
(and (>= n -1) (less-or-equal n 1))
(throw-error "n cannot be -1, 0 or 1!")
(> n 0)
(begin
(set 'result (apply f (0 n lst)))
(dotimes (i n) (pop lst))
(while lst
(set 'result (apply f (append (list result) (0 (- n 1) lst))))
(dotimes (i (- n 1)) (pop lst))))
(less-than n 0)
(begin
(set 'n (- n))
(set 'result (apply f ((- (length lst) n) lst)))
(dotimes (i n) (pop lst -1))
(while lst
(set 'result (apply f (append ((- (length lst) (- n 1)) lst) (list result))))
(dotimes (i (- n 1)) (pop lst -1)))))
result))
Examples:
Code: Select all
> (fold + '(1 2 3 4 5) 2)
15
> (fold + '(1 2 3 4 5) -2)
15
> (fold - '(1 2 3 4 5) 2)
-13
> (fold - '(1 2 3 4 5) -2)
3
> (fold (fn (x y) (list '- x y)) '(1 2 3 4 5) 2)
(- (- (- (- 1 2) 3) 4) 5)
> (fold (fn (x y) (list '- x y)) '(1 2 3 4 5) -2)
(- 1 (- 2 (- 3 (- 4 5))))
; general function f
> (fold (fn () (append '(f) (args))) '(1 2 3 4 5 6 7 8 9) 2)
(f (f (f (f (f (f (f (f 1 2) 3) 4) 5) 6) 7) 8) 9)
> (fold (fn () (append '(f) (args))) '(1 2 3 4 5 6 7 8 9) 3)
(f (f (f (f 1 2 3) 4 5) 6 7) 8 9)
> (fold (fn () (append '(f) (args))) '(1 2 3 4 5 6 7 8 9) 4)
(f (f (f 1 2 3 4) 5 6 7) 8 9)
> (fold (fn () (append '(f) (args))) '(1 2 3 4 5 6 7 8 9) -2)
(f 1 (f 2 (f 3 (f 4 (f 5 (f 6 (f 7 (f 8 9))))))))
Fanda