From: Ken Tilton on 2 Mar 2007 01:47 Luke J Crook wrote: > Frank Buss wrote: > >>The code below creates buttons like this: >> >>http://www.frank-buss.de/tmp/buttons.png >> >>In LispWorks 4.3.7 it is not very fast, but SBCL needs not many seconds :-) >> > > > You know there is this little-known package called lispbuilder-sdl that > can also be used for the back-end rendering. ;) Maybe he suffers from IH syndrome. lb-sdl is interesting. A kazillion libraries, not a few dead links, and no unifying GUI or app framework. Maybe the LB should stand for "lotsabindings"? What's up with that? kt -- Well, I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it. -- Elwood P. Dowd In this world, you must be oh so smart or oh so pleasant. -- Elwood's Mom
From: Frank Buss on 2 Mar 2007 03:53 Ken Tilton wrote: > Luke J Crook wrote: >> >> You know there is this little-known package called lispbuilder-sdl that >> can also be used for the back-end rendering. ;) Yes, and saving images would be a good idea for lispbuilder-sdl-images :-) > lb-sdl is interesting. A kazillion libraries, not a few dead links, and > no unifying GUI or app framework. Maybe the LB should stand for > "lotsabindings"? > > What's up with that? My main idea was to create a Lisp distribution, with lots of useful libraries, for Mac, Linux and Windows, with which you can create platform independant end-user installable GUI applications, like it is possible with LispWorks and CAPI: http://wiki.alu.org/Application_Builder Thanks to the volunteers, the library part is very advanced and lispbuilder-sdl is even working for Mac. Now the distribution part needs some work. -- Frank Buss, fb(a)frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de
From: Ken Tilton on 2 Mar 2007 10:06 Frank Buss wrote: > Ken Tilton wrote: > > >>Luke J Crook wrote: >> >>>You know there is this little-known package called lispbuilder-sdl that >>>can also be used for the back-end rendering. ;) > > > Yes, and saving images would be a good idea for lispbuilder-sdl-images :-) > > >>lb-sdl is interesting. A kazillion libraries, not a few dead links, and >>no unifying GUI or app framework. Maybe the LB should stand for >>"lotsabindings"? >> >>What's up with that? > > > My main idea was to create a Lisp distribution, with lots of useful > libraries, for Mac, Linux and Windows, with which you can create platform > independant end-user installable GUI applications, like it is possible with > LispWorks and CAPI: > > http://wiki.alu.org/Application_Builder Ah, there it is: wxCL or all-Lisp native GUI. Not Tcl/Tk? Hmmm, also interesting, I thought I saw wxWindows was GPL last I looked, but now I see an exception saying binaries are cool ("under my own temrs"). Nice. > > Thanks to the volunteers, the library part is very advanced and > lispbuilder-sdl is even working for Mac. Yes, very impressive libs list. OpenRM /and/ ODE. Is SDL still one-window only? Not that that is a big problem for games. And SDL and wxWindows work together? kt -- Well, I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it. -- Elwood P. Dowd In this world, you must be oh so smart or oh so pleasant. -- Elwood's Mom
From: Thomas A. Russ on 2 Mar 2007 12:05 Harald Hanche-Olsen <hanche(a)math.ntnu.no> writes: > + Harald Hanche-Olsen <hanche(a)math.ntnu.no>: > > | for fizz in '#3=(nil nil "Fizz" . #3#) > | for buzz in '#5=(nil nil nil nil "Buzz" . #5#) > > But I hadn't read the whole thread and missed Rob Warnock's use of > this same trick in <zZSdnVArCY40vHjYnZ2dnUVZ_ruknZ2d(a)speakeasy.net>. Of course, this hack just calls out for generalization as well: (defun make-mod-list (modulus &optional (true-value t)) (let ((mod-list (make-list (1- modulus) :initial-element nil))) (setf (cdr (last mod-list)) (cons true-value mod-list)) mod-list)) Then you can try: (setq *print-circle* t) (make-mod-list 3 "Fizz") (make-mod-list 5 "Buzz") This can, of course, be combined with #. for even more fun. As the next exercise, someone can rewrite make-mod-list to dispense with the need to call LAST.... -- Thomas A. Russ, USC/Information Sciences Institute
From: Thomas A. Russ on 2 Mar 2007 12:15
"John Thingstad" <john.thingstad(a)chello.no> writes: > On Thu, 01 Mar 2007 04:19:08 +0100, lojic <lojicdotcom(a)gmail.com> wrote: > > > On Feb 28, 5:39 pm, t...(a)sevak.isi.edu (Thomas A. Russ) wrote: > >> Well, OK -- I have gone into the West, but I stopped just short of the > >> Pacific Ocean. Obviously this requires some finesse since we don't want > >> to have to specify arguments more than once. So we do need to obscurely > >> move back and forth along the argument list: > >> > >> (dotimes (i 20) > >> (format t "~[Fizz~:;~]~[Buzz~*~:;~2:*~[~2*~:;~*~D~]~]~%" aaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb cc ddddeeeeeeeeeeeeee ffff gggg > >> (mod i 3) (mod i 5) i)) arg 0 arg 1 arg 2 a uses arg 0 and chooses the first clause on a 0 value, otherwise the second (empty clause) b uses arg 1 and choose the first clause on a 0 value, otherwise the large second clause. c consumes arg 2 using the ~* directive. Not strictly necessary in this format string, but it's good hygiene to not leave arguments unprocessed , especially if you ever want to add this to another, larger string. d backs up the argument pointer 2 places so that we will process arg 0 again with the next format directive e uses arg 0 and chooses the first clause (f) on a 0 value, otherwise the second clause (g) f since we handled this case in directive (a), we just consume the next two arguments, arg 1 and arg 2 for hygiene. g We get here if both arg 0 and arg 1 are non-zero, but the testing was done in the reverse order. So we consume arg 1 and then print arg 2 > >> > >> Now this is just way too obscure for me -- and it looks vaguely like > >> Perl code ;) > > > > Disturbing yet impressive. Anyone want to give a hand to the newbie in > > understanding the above? > > > > Brian > > > > Shouldn't be necessary. The key to this cypher is in > the ANSI document under format options. Well, as the author, I fell somewhat obligated.... -- Thomas A. Russ, USC/Information Sciences Institute |