From kentilton at gmail.com Thu May 4 19:57:18 2006 From: kentilton at gmail.com (Ken Tilton) Date: Thu, 04 May 2006 15:57:18 -0400 Subject: [cells-devel] Oops, I panicked... Message-ID: <445A5C9E.7000900@gmail.com> I recently made a fundamental change to (setf md-slot-value) in the face of a bug in which a SETF got deferred and I could not think of a way to make the code work without taking out the integrity wrapper in (setf md-slot-value). That was dumb. The way the slot was being used (setf?! Only in eventhandlers, please.) the slot should not have been a cell. (Specify ":cell nil" in the slot definition.) What I decided to do was go the other way (more Cell-ish) and use a rule to get the slot initialized. Now I get to go back and take out the dozen extra (with-integrity (:change)...) wrappers I had to add all over the ltktest-ci demo to get that working after the dumb "fix". Anyway, if you grabbed Cells in the past few days you might want to wait till the smoke clears and grab it again. And this time I will run the Cells regression test, which I did not think to do last time. kt -------------- next part -------------- A non-text attachment was scrubbed... Name: kentilton.vcf Type: text/x-vcard Size: 171 bytes Desc: not available URL: From fgoenninger at prion.de Thu May 11 12:08:49 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Thu, 11 May 2006 14:08:49 +0200 Subject: [cells-devel] Multiple observers for a Cell slot ? Message-ID: <25352B71-5B7D-4479-B87A-41A0C1C255A7@prion.de> Hi Kenny, hi all: While developing a library here for I/O to a microcontroller I see that I need some observers being defined to handle operations of the I/O device. Naturally I am coding these as part of the library which I plan to ship just as a compiled file. The main application also needs to define observers on some Cell slots to update the GUI and other stuff. As an observer for the slot is already defined I am denied to define another one. Now, am I doing something wrong and is is just me or maybe there should be some hook-like behavior and defobserver just adds another observer to a list of observers maintained by the Cell woodoo magic ? Thanks for comments Frank From kentilton at gmail.com Thu May 11 12:40:25 2006 From: kentilton at gmail.com (Ken Tilton) Date: Thu, 11 May 2006 08:40:25 -0400 Subject: [cells-devel] Multiple observers for a Cell slot ? In-Reply-To: <25352B71-5B7D-4479-B87A-41A0C1C255A7@prion.de> References: <25352B71-5B7D-4479-B87A-41A0C1C255A7@prion.de> Message-ID: <446330B9.1080006@gmail.com> Frank Goenninger wrote: > Hi Kenny, hi all: > > While developing a library here . I see that I need some observers > being defined to handle operations of the I/O device. Naturally I am > coding these as part of the library which I plan to ship just as a > compiled file. > > The main application also needs to define observers on some Cell > slots to update the GUI and other stuff. As an observer for the slot > is already defined I am denied to define another one. Yes and no. (defgeneric slot-value-observe (slotname self new old old-boundp) #-(or cormanlisp clisp) ;; Hey, I think clisp does PROGN now! (:method-combination progn)) So we have a PROGN method combo which means subclasses and superclasses can both define the same observer and both will run. If you do not think your users will be subclassing, say, XXX, we still have a problem. Maybe then make your library class XXX-INTERNAL (unexported), subclass with XXX (exported/documented). Or you can require users to subclass, and enforce that in initialize-instance. Another trick is that possibly an :around method will work. PROGN does not let you also do :before/:after, but you an do :around. Not sure how that helps in this situation, because you might also want to let users at the :around method. A final trick would be to have your XXX/SLOT-A observer call USER-SLOT-A-OBSERVER (standard method combo) before/after doing what you want to do yourself in the observer. I guess this is a common problem in delivering CLOS applications. I wager most folks use the XXX-INTERNAL trick, or require users to subclass. If you think most users will be subclassing anyway, make it a requirement. That way it does not actually bother many people. Side note: you do not need an extra XXX-INTERNAL if your implementation itself naturally provides unpublished superclasses. I used tk-object and widget and item for that in Celtk, because those are all abstract classes if you will. kt -------------- next part -------------- A non-text attachment was scrubbed... Name: kentilton.vcf Type: text/x-vcard Size: 171 bytes Desc: not available URL: From fgoenninger at prion.de Sat May 13 12:39:44 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Sat, 13 May 2006 14:39:44 +0200 Subject: [cells-devel] Celtk: Question on mk-entry Message-ID: Hi again, When using the mk-entry widget I seem to not get any value back: CL-USER> (et::run-entry-test) "----------UTILSRESET----------------------------------" *** Tk_AppInit has been called. *** OBSERVER VAL: slot 'val' of ENTRY-TEST set to NIL 0> entry | "md-value output" | ENTRY | "" tk> bind . {destroy .} 0> no event handlers for | ENTRY | |write| 0> known key | CTK::|write| | SYMBOL 0> no event handlers for | ENTRY | |write| 0> known key | CTK::|write| | SYMBOL *** OBSERVER VAL: slot 'val' of ENTRY-TEST set to 0> tcl-do-one-event-loop has left the building NIL CL-USER> In order to get this output I turned on trc output in the defobserver .mdvalue ((self entry)) method. Yet the observer does not fire. When should/does the observer fire? On each change of the entry's entry field ? I used the following code to test (also attached as a file): (defpackage :et (:use :common-lisp)) (in-package :et) (eval-when (:load-toplevel :compile-toplevel :execute) #+asdf (progn #-cells (progn (asdf:operate 'asdf:load-op :cells) (use-package :cells)) #-cl-opengl (progn (asdf:operate 'asdf:load-op :cl-openg)) #-Celtk (progn (asdf:operate 'asdf:load-op :Celtk) (use-package :Celtk)) )) (defmodel entry-test (window) ((val :accessor val :initarg :val :initform (c-in nil))) (:default-initargs :title$ "entry test" :id :entry-test :kids (c? (the-kids (mk-row (:packing (c?pack-self)) (mk-label :text "Enter value:") (mk-entry :id :frgo-entry) (mk-button-ex ("Do it !" (setf (val (fm^ :entry-test)) (md-value (fm^ :frgo-entry)))))))))) ;;; DEBUG OBSERVERS (defobserver val ((self entry-test)) (format t "~&*** OBSERVER VAL: slot 'val' of ~S set to ~A~&" self new-value)) ;;; RUN/TEST FUNCTION (defun run-entry-test () (test-window 'entry-test)) ----- The code assumes the value of the entry widget (what the user entered) is stored in md-value of the entry widget. I tried monkey style copying from the demos to no avail so far. Hmmpf! What am I doing wrong ? Thx for any hints. Frank -------------- next part -------------- A non-text attachment was scrubbed... Name: frgo1.lisp Type: application/octet-stream Size: 1064 bytes Desc: not available URL: -------------- next part -------------- From ocorrain at yahoo.com Sat May 13 20:24:20 2006 From: ocorrain at yahoo.com (=?iso-8859-1?Q?Tiarn=E1n_=D3_Corr=E1in?=) Date: Sat, 13 May 2006 21:24:20 +0100 Subject: [cells-devel] Cells web? Message-ID: Hi-- I'm trying to get my head around Cells by writing an application with it, and I was wondering whether any work has been done in the area already. Has anyone used Cells as the basis for a Web app? I'm thinking specifically of something Ajax-y, with XMLHttp widget updates. Any thoughts on this line of enquiry? Tiarn?n From kentilton at gmail.com Sat May 13 21:10:51 2006 From: kentilton at gmail.com (Ken Tilton) Date: Sat, 13 May 2006 17:10:51 -0400 Subject: [cells-devel] Cells web? In-Reply-To: References: Message-ID: On 5/13/06, Tiarn?n ? Corr?in wrote: > > Hi-- > > I'm trying to get my head around Cells by writing an application with > it, and I was wondering whether any work has been done in the area > already. > > Has anyone used Cells as the basis for a Web app? Not me, but by the end of the year I might well. I have not heard of anyone doing so, but I often am surprised to learn others are using Cells unbeknownst to me. I'm thinking > specifically of something Ajax-y, with XMLHttp widget updates. Any > thoughts on this line of enquiry? Sorry, I am a Web app know-nothing. I myself have used Cells in four or five seriously different ways and they always seem to make life easier. kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgoenninger at prion.de Sat May 20 14:57:25 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Sat, 20 May 2006 16:57:25 +0200 Subject: [cells-devel] Celtk: setting the content of a text widget ? Message-ID: <197DD2DA-A91D-40CE-B195-3A2C80672763@prion.de> Hi Kenny, hi all: I do have a text widget which is created using mk-text-widget: (mk-text-widget :id :receive-window :state 'disabled :md-value (c?n "...") :height 10 :width 80 :borderwidth 2 :relief 'sunken :pady 5)) No matter what I do (even setting :state to 'enabled) I do get anything printed in the text widget. I actually execute a setf on md-value of the text widget: (setf (md-value (fm-other :receive-window)) data) Any idea? Thx! Best wishes Frank From fgoenninger at prion.de Sat May 20 20:55:24 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Sat, 20 May 2006 22:55:24 +0200 Subject: [cells-devel] Re: Celtk: setting the content of a text widget ? Fileevent working ! In-Reply-To: References: <197DD2DA-A91D-40CE-B195-3A2C80672763@prion.de> <446F42D1.10605@gmail.com> Message-ID: <2E3E7BAB-7AF3-45FE-8A34-B1435EF5DECC@prion.de> Am 20.05.2006 um 20:16 schrieb Frank Goenninger: > Am 20.05.2006 um 18:24 schrieb Ken Tilton: > >> Frank Goenninger wrote: >> >>> Hi Kenny, hi all: >>> >>> I do have a text widget which is created using mk-text-widget: >>> >>> (mk-text-widget :id :receive-window >>> :state 'disabled >>> :md-value (c?n "...") >>> :height 10 >>> :width 80 >>> :borderwidth 2 >>> :relief 'sunken >>> :pady 5)) >>> >>> No matter what I do (even setting :state to 'enabled) I do get >>> anything printed in the text widget. >>> >>> I actually execute a setf on md-value of the text widget: >>> >>> (setf (md-value (fm-other :receive-window)) data) >>> >>> >>> Any idea? Thx! >> >> >> Hmmm, looks like I did not finish implementing text widgets. > > Yep, meanwhile I recognized that an observer is missing in file > entry.lisp. Well, actually I had to do (in file entry.lisp): ;; Method CLEAR: clears a text widget to zero content (defmethod clear ((self text-widget)) (tk-format `(:variable ,self) "~a delete 1.0 end" (^path))) ;; This observer puts text to the widget if md-value has been set ;; Also takes care of edge cases like initialization time and setting ;; strings of length 0... (defobserver .md-value ((self text-widget)) (trc "md-value output" self new-value) (if (or (and (not old-value) (string= new-value "")) (not new-value)) (tk-format `(:variable ,self) "~a delete 1.0 end" (^path)) (if (> (length new-value) 0) (tk-format `(:variable ,self) "~a insert end ~a" (^path) new- value)))) With this and my fileevent stuff I can now say: ;; Model for a simple terminal output window. (defmodel fileevent-test-window (window) () (:default-initargs :kids (c? (the-kids (mk-stack (:packing (c?pack-self)) (mk-label :text "Receive window" :pady 10) (mk-text-widget :id :receive-window ;:state 'disabled :md-value (c-in "") :height 10 :width 80 :borderwidth 2 :relief 'sunken :pady 5)) (mk-fileevent :id :fileevent-test :read-fn 'read-from-pipe :iostream (open "/Users/frgo/tmp/frgo-test" :direction :input)))))) ;; The method read-from-pipe reads data from a pipe generated by ;; mkfifo /Users/frgo/tmp/frgo-test and puts this as the data of a ;; text widget (defmethod read-from-pipe ((self tk-fileevent) &optional (operation :read)) (declare (ignorable operation)) (let ((stream (^iostream))) (let ((data (read-line stream nil nil nil))) (trc "*** READ-FROM-PIPE: data = " data) (when data (setf (md-value (fm-other :receive-window)) data)))) ) ;; Test function that fires up the test case (defun test-fileevent () (trc "----------------------------------------------------------------------- ------") (test-window 'fileevent-test-window) (trc "----------------------------------------------------------------------- ------") ) Now, whenever I do a $ echo "Heya this is a test" > /Users/frgo/tmp/frgo-test the text gets displayed in the window. Of course there's other uses for this: You also can open a socket and send application commands to the application. The read-from-pipe function would then be a little interpreter kicking of actions in the application... For me I put the reading function to listen to a RS232C port that is connected to an AVR-based microcontroller. The controller send status information and voltage and current values from a power supply to be displayed as info by my application... Fileevent to be put to Celtk CVS in a few days ... watch out. Frank From fgoenninger at prion.de Sun May 21 17:04:08 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Sun, 21 May 2006 19:04:08 +0200 Subject: [cells-devel] Celtk: Not really Celtk related, but .... ?! format does unwanted optimizations ... Message-ID: Hi all: I have that problem that I get some unwanted optimizations from format : I want to do send a string to Tcl/Tk via function tk-format-now. My call to tk-format-now looks as follows: (tk-format-now "fileevent ~A readable [list readable ~A ~A]" ch-name ch-name path)) This produces a Tcl error: Tcl error: can not find channel named "#1=file22" [Condition of type SIMPLE-ERROR] When looking at the call stack then I see the followig: 6: (CTK::TCL-EVAL-EX 25144328 "fileevent #1=file22 readable [list readable #1# .fileevent-test]") Locals: CTK::I = 25144328 CTK::S = "fileevent #1=file22 readable [list readable #1# .fileevent-test]" 7: (CTK:TK-FORMAT-NOW "fileevent ~A readable [list readable ~A ~A]" #1="file22" #1# ".fileevent-test") Locals: CTK::FMT$ = "fileevent ~A readable [list readable ~A ~A]" NIL = "file22" NIL = "file22" NIL = ".fileevent-test" Obviously Lisp optimizes the reference to the string object "file22" into a reference (Hmm - this is new to me. Is this real Lisp speak to describe the facts shown above ???). Thx for any pointers! Frank From kentilton at gmail.com Sun May 21 20:48:42 2006 From: kentilton at gmail.com (Ken Tilton) Date: Sun, 21 May 2006 16:48:42 -0400 Subject: [cells-devel] Re: Celtk: setting the content of a text widget ? Fileevent working ! In-Reply-To: <2E3E7BAB-7AF3-45FE-8A34-B1435EF5DECC@prion.de> References: <197DD2DA-A91D-40CE-B195-3A2C80672763@prion.de> <446F42D1.10605@gmail.com> <2E3E7BAB-7AF3-45FE-8A34-B1435EF5DECC@prion.de> Message-ID: On 5/20/06, Frank Goenninger wrote: > > > Am 20.05.2006 um 20:16 schrieb Frank Goenninger: > > > Am 20.05.2006 um 18:24 schrieb Ken Tilton: > > > >> Frank Goenninger wrote: > >> > >>> Hi Kenny, hi all: > >>> > >>> I do have a text widget which is created using mk-text-widget: > >>> > >>> (mk-text-widget :id :receive-window > >>> :state 'disabled > >>> :md-value (c?n "...") > >>> :height 10 > >>> :width 80 > >>> :borderwidth 2 > >>> :relief 'sunken > >>> :pady 5)) > >>> > >>> No matter what I do (even setting :state to 'enabled) I do get > >>> anything printed in the text widget. > >>> > >>> I actually execute a setf on md-value of the text widget: > >>> > >>> (setf (md-value (fm-other :receive-window)) data) > >>> > >>> > >>> Any idea? Thx! > >> > >> > >> Hmmm, looks like I did not finish implementing text widgets. > > > > Yep, meanwhile I recognized that an observer is missing in file > > entry.lisp. > > Well, actually I had to do (in file entry.lisp): > > ;; Method CLEAR: clears a text widget to zero content > > (defmethod clear ((self text-widget)) > (tk-format `(:variable ,self) "~a delete 1.0 end" (^path))) > > ;; This observer puts text to the widget if md-value has been set > ;; Also takes care of edge cases like initialization time and setting > ;; strings of length 0... > > (defobserver .md-value ((self text-widget)) > (trc "md-value output" self new-value) > (if (or (and (not old-value) > (string= new-value "")) > (not new-value)) > (tk-format `(:variable ,self) "~a delete 1.0 end" (^path)) > (if (> (length new-value) 0) > (tk-format `(:variable ,self) "~a insert end ~a" (^path) new- > value)))) I took your stuff and whittled it down to: (defobserver .md-value ((self text-widget)) (trc "md-value output" self new-value) (with-integrity (:client `(:variable ,self)) (tk-format-now "~a delete 1.0 end" (^path)) (when (plusp (length new-value)) (tk-format-now "~a insert end ~s" (^path) new-value)))) That way two (setf (md-value self) "Hi mom") calls do not produce "Hi momHi mom". I was not sure the API entry point CLEAR was needed elsewhere. I can see that it would be, though. Really, the more I look at the text widget the more I think it needs imperative processing by application code that has a clear idea of what it wants to do with all the capabilities of the widget. I also brought both commands within the same integrity bundle by skipping the tk-format syntactic sugar and open-coding with-integrity. That just saves one enqueue, no big deal. A bigger deal is that the sort done by tk-user-queue-handler was not (until just now ) a stable sort, so the delete could have been executed after the insert. Bringing both operations into the single integrity bundle also fixes that. > > Now, whenever I do a > > $ echo "Heya this is a test" > /Users/frgo/tmp/frgo-test > > the text gets displayed in the window. Isn't great when we get stuff like that working? Is there a universal law: any time the effect produced by your own code surprises you, you are probably onto something good. Programming never gets old. > Fileevent to be put to Celtk CVS in a few days ... watch out. Thx. I am switching all my code to LLGPL now, btw. I think we settled on that for your stuff, yes? kt -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgoenninger at prion.de Sun May 21 21:30:36 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Sun, 21 May 2006 23:30:36 +0200 Subject: [cells-devel] Re: Celtk: setting the content of a text widget ? Fileevent working ! In-Reply-To: References: <197DD2DA-A91D-40CE-B195-3A2C80672763@prion.de> <446F42D1.10605@gmail.com> <2E3E7BAB-7AF3-45FE-8A34-B1435EF5DECC@prion.de> Message-ID: <0B1ABC96-7076-44AF-A160-D5031925186A@prion.de> Am 21.05.2006 um 22:48 schrieb Ken Tilton: > I took your stuff and whittled it down to: > > (defobserver .md-value ((self text-widget)) > (trc "md-value output" self new-value) > (with-integrity (:client `(:variable ,self)) > (tk-format-now "~a delete 1.0 end" (^path)) > (when (plusp (length new-value)) > (tk-format-now "~a insert end ~s" (^path) new-value)))) > > That way two (setf (md-value self) "Hi mom") calls do not produce > "Hi momHi mom". Hm, yes, but ... ;-) This changes behavior. Ok, I never really said anywhere anything about the implied behavior ... Now, whenever the model is set the whole text widget gets cleared and then the whole widget is set again. Which brings me to the "Hi mom" example above: I actually wanted the widget to behave that way. Now, seeing what you made of it, I see the need to really broaden the API to the text widget to have APPEND and SET functions for the model. > I was not sure the API entry point CLEAR was needed elsewhere. I > can see that it would be, though. Really, the more I look at the > text widget the more I think it needs imperative processing by > application code that has a clear idea of what it wants to do with > all the capabilities of the widget. hehe, exactly. As I said above... > I also brought both commands within the same integrity bundle by > skipping the tk-format syntactic sugar and open-coding with- > integrity. That just saves one enqueue, no big deal. A bigger deal > is that the sort done by tk-user-queue-handler was not (until just > now ) a stable sort, so the delete could have been executed > after the insert. Bringing both operations into the single > integrity bundle also fixes that. Oookkaaayy.... > $ echo "Heya this is a test" > /Users/frgo/tmp/frgo-test > > the text gets displayed in the window. > > Isn't great when we get stuff like that working? Is there a > universal law: any time the effect produced by your own code > surprises you, you are probably onto something good. Programming > never gets old. Right. Which is why we sit here after finishing our 2 hours of ballroom dancing on Sunday evening writing Cells code and emails like crazy. My wife is in bed already so I can pretend there's noone feeling bad about me sitting in the home office room here... > > > Fileevent to be put to Celtk CVS in a few days ... watch out. > > Thx. I am switching all my code to LLGPL now, btw. I think we > settled on that for your stuff, yes? Well, yeah, LLPPL or MIT is just fine. > > kt Frank From stuglaser at gmail.com Tue May 23 16:38:35 2006 From: stuglaser at gmail.com (Stu Glaser) Date: Tue, 23 May 2006 11:38:35 -0500 Subject: [cells-devel] Celtk and SBCL (and linux) Message-ID: <44733A8B.40306@gmail.com> Hi all, I'm trying to get Celtk working on SBCL. I've attached a patch with several bugfixes. Much still does not work, however, I have managed to display the "one-button-window" demo (though it crashes immediately after display. Sometime later I will have questions. Celtk still crashes often in finish-business, and I'm not yet familiar enough with cells to perform the fixes. I made a change in item-pictorial that I'm not certain about. In lotsa-widgets, tcl chokes when I use :bitmap in mk-bitmap: debugger invoked on a SIMPLE-ERROR in thread #: Tcl error: bitmap "/home/stu/tmp/cells/Celtk/x1.xbm" not defined I changed it to :file and added a -file entry in deftk bitmap. That fixed the first error, but created a new one (which occurs later): debugger invoked on a SIMPLE-ERROR in thread #: Tcl error: unknown option "-file" I'm not sure how to proceed here. Any help would be great. Lastly, anonymous CVS access would be great. It would certainly help for creating patches and for keeping my sources updated. Regards, -Stu Glaser -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch URL: From kentilton at gmail.com Tue May 23 18:54:16 2006 From: kentilton at gmail.com (Ken Tilton) Date: Tue, 23 May 2006 14:54:16 -0400 Subject: [cells-devel] Celtk and SBCL (and linux) In-Reply-To: <44733A8B.40306@gmail.com> References: <44733A8B.40306@gmail.com> Message-ID: On 5/23/06, Stu Glaser wrote: > > Hi all, > > I'm trying to get Celtk working on SBCL. I've attached a patch with > several bugfixes. Thx for the patches. I will start working thru them and update CVS shortly. speaking of which, not sure what you mean by not having anonymous CVS, but I am a CVS dummy. I just use TortoiseCVS on win32 and I have write access so... well, like I said, i do not know a thing about CVS, not sur ehow to help. Much still does not work, however, I have managed to > display the "one-button-window" demo (though it crashes immediately > after display. Without you doing anything? And it takes out your Lisp session as well, or do you get a backtrace? Sometime later I will have questions. Celtk still crashes often in > finish-business, and I'm not yet familiar enough with cells to perform > the fixes. Well, almost everything happens in "finish-business", so I would not worry about Cells as much as OS differences and Lisp differences and installation issues (as you have been). I made a change in item-pictorial that I'm not certain about. In > lotsa-widgets, tcl chokes when I use :bitmap in mk-bitmap: > debugger invoked on a SIMPLE-ERROR in thread > #: > Tcl error: bitmap "/home/stu/tmp/cells/Celtk/x1.xbm" not defined > > I changed it to :file and added a -file entry in deftk bitmap. Looking here: http://tmml.sourceforge.net/doc/tk/canvas.html, I do not see a -file configuration option on the Bitmap Canvas item (you have to scroll waaaay down under the Canvas widget to find the items. Which explains.... That > fixed the first error, but created a new one (which occurs later): > debugger invoked on a SIMPLE-ERROR in thread > #: > Tcl error: unknown option "-file" > > I'm not sure how to proceed here. Any help would be great. I think what happened is that you just made Tcl break sooner. ie, before it saw the (correct, I think) -bitmap option and then died when it decided the file was not "defined" (strange, it should say found, right? I will investigate over trying to recreate your error. So let's go back to that weird "not defined". I have a hunch but prefer to investigate first. meanwhile, a couple of things for you to try: 1. naturally, make sure the file is there. :) I am not sure I even had that .xbm file in the distro until recently. 2. find the function tk-format-now and monkey with the debug stuff so that any message to Tk with the word "bitmap" in it gets printed, and see if you can catch the output and post that. When really confused I rig that so it prints everything, but on lotsa-widgets that would be a lot. if you are brave you can try moving Just Enough Code from lotsa-widgets to one-button. But it is probably easiest to use my yes/no filters in tk-format-now to get just the right amount of messaging. kenny Lastly, anonymous CVS access would be great. It would certainly help > for creating patches and for keeping my sources updated. > > Regards, > -Stu Glaser > > > diff -c old-Celtk/composites.lisp Celtk/composites.lisp > *** old-Celtk/composites.lisp Mon May 15 00:15:37 2006 > --- Celtk/composites.lisp Tue May 23 04:00:59 2006 > *************** > *** 85,91 **** > #+wishful (ewish :initarg :ewish :accessor ewish :initform nil :cell > nil) ;; vestigial? > (title$ :initarg :title$ :accessor title$ > :initform (c? (string-capitalize (class-name (class-of self))))) > ! (dictionary :initarg :dictionary :initform (make-hash-table :test > 'string-equal) :accessor dictionary) > (tkwins :initform (make-hash-table) :reader tkwins) > (xwins :initform (make-hash-table) :reader xwins) > (callbacks :initarg :callbacks :accessor callbacks > --- 85,91 ---- > #+wishful (ewish :initarg :ewish :accessor ewish :initform nil :cell > nil) ;; vestigial? > (title$ :initarg :title$ :accessor title$ > :initform (c? (string-capitalize (class-name (class-of self))))) > ! (dictionary :initarg :dictionary :initform (make-hash-table :test > 'equalp) :accessor dictionary) > (tkwins :initform (make-hash-table) :reader tkwins) > (xwins :initform (make-hash-table) :reader xwins) > (callbacks :initarg :callbacks :accessor callbacks > diff -c old-Celtk/item-pictorial.lisp Celtk/item-pictorial.lisp > *** old-Celtk/item-pictorial.lisp Tue May 2 01:57:22 2006 > --- Celtk/item-pictorial.lisp Tue May 23 04:00:59 2006 > *************** > *** 31,36 **** > --- 31,37 ---- > -activebackground > -disabledbackground > -bitmap > + -file > -activebitmap > -disabledbitmap > -foreground > diff -c old-Celtk/run.lisp Celtk/run.lisp > *** old-Celtk/run.lisp Tue May 16 19:40:55 2006 > --- Celtk/run.lisp Tue May 23 04:00:59 2006 > *************** > *** 39,45 **** > (tk-app-init *tki*) > (tk-togl-init *tki*) > (tk-format-now "proc TraceOP {n1 n2 op} {event generate $n1 <> > -data $op}") > ! (tcl-create-command *tki* "do-on-command" (get-callback > 'do-on-command) 42 0) > > (with-integrity () > (setf *tkw* (make-instance root-class)) > --- 40,46 ---- > (tk-app-init *tki*) > (tk-togl-init *tki*) > (tk-format-now "proc TraceOP {n1 n2 op} {event generate $n1 <> > -data $op}") > ! (tcl-create-command *tki* "do-on-command" (get-callback > 'do-on-command) 42 (null-pointer)) > > (with-integrity () > (setf *tkw* (make-instance root-class)) > *************** > *** 85,88 **** > (force-output *tkw*) > (setf *tkw* nil)) > > ! (run-window root-class)) > \ No newline at end of file > --- 86,89 ---- > (force-output *tkw*) > (setf *tkw* nil)) > > ! (run-window root-class)) > diff -c old-Celtk/tk-events.lisp Celtk/tk-events.lisp > *** old-Celtk/tk-events.lisp Tue May 16 19:40:55 2006 > --- Celtk/tk-events.lisp Tue May 23 04:00:59 2006 > *************** > *** 35,41 **** > (tkwin :pointer) > (mask :int) > (proc :pointer) > ! (client-data :int)) > > (defcenum tk-event-type ;; do not try to generate masks from these! > "Ok for interpreting type field in event, but not for (expt 2 etype) > to get mask" > --- 35,41 ---- > (tkwin :pointer) > (mask :int) > (proc :pointer) > ! (client-data :pointer)) > > (defcenum tk-event-type ;; do not try to generate masks from these! > "Ok for interpreting type field in event, but not for (expt 2 etype) > to get mask" > diff -c old-Celtk/tk-interp.lisp Celtk/tk-interp.lisp > *** old-Celtk/tk-interp.lisp Tue May 16 16:17:15 2006 > --- Celtk/tk-interp.lisp Tue May 23 04:00:59 2006 > *************** > *** 36,50 **** > > (define-foreign-library Tcl > (:darwin (:framework "Tcl")) > ! (:windows (:or "/tcl/bin/Tcl85.dll"))) > (define-foreign-library Tk > (:darwin (:framework "Tk")) > ! (:windows (:or "/tcl/bin/tk85.dll"))) > > ;; Togl > (define-foreign-library Togl > (:darwin (:or "/opt/tcltk/togl/lib/Togl1.7/libtogl1.7.dylib")) > ! (:windows (:or "/tcl/lib/togl/togl17.dll"))) > > (defctype tcl-retcode :int) > > --- 36,57 ---- > > (define-foreign-library Tcl > (:darwin (:framework "Tcl")) > ! (:windows (:or "/tcl/bin/Tcl85.dll")) > ! (:unix "libtcl.so") > ! (t (:default "libtcl"))) > (define-foreign-library Tk > (:darwin (:framework "Tk")) > ! (:windows (:or "/tcl/bin/tk85.dll")) > ! (:unix "libtk.so") > ! (t (:default "libtk"))) > > ;; Togl > (define-foreign-library Togl > (:darwin (:or "/opt/tcltk/togl/lib/Togl1.7/libtogl1.7.dylib")) > ! (:windows (:or "/tcl/lib/togl/togl17.dll")) > ! (:unix "/usr/lib/Togl1.7/libTogl1.7.so")) > ! > ! (use-foreign-library Togl) > > (defctype tcl-retcode :int) > > *************** > *** 233,239 **** > > (defun argv0 () > #+allegro (sys:command-line-argument 0) > ! #+lispworks (nth 0 (io::io-get-command-line-arguments))) > > (defun tk-interp-init-ensure () > (unless *initialized* > --- 240,247 ---- > > (defun argv0 () > #+allegro (sys:command-line-argument 0) > ! #+lispworks (nth 0 (io::io-get-command-line-arguments)) > ! #+sbcl (nth 0 sb-ext:*posix-argv*)) > > (defun tk-interp-init-ensure () > (unless *initialized* > diff -c old-Celtk/widget.lisp Celtk/widget.lisp > *** old-Celtk/widget.lisp Tue May 16 19:40:55 2006 > --- Celtk/widget.lisp Tue May 23 04:00:59 2006 > *************** > *** 78,84 **** > > (defun tk-create-event-handler-ex (widget callback-name &rest masks) > (let ((self-tkwin (widget-to-tkwin widget))) > ! (assert (plusp self-tkwin)) > (trc nil "setting up widget virtual-event handler" widget :tkwin > self-tkwin) > (tk-create-event-handler self-tkwin > (apply 'foreign-masks-combine 'tk-event-mask masks) > --- 78,84 ---- > > (defun tk-create-event-handler-ex (widget callback-name &rest masks) > (let ((self-tkwin (widget-to-tkwin widget))) > ! (assert (not (null-pointer-p self-tkwin))) > (trc nil "setting up widget virtual-event handler" widget :tkwin > self-tkwin) > (tk-create-event-handler self-tkwin > (apply 'foreign-masks-combine 'tk-event-mask masks) > > > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Tue May 23 19:06:39 2006 From: kentilton at gmail.com (Ken Tilton) Date: Tue, 23 May 2006 15:06:39 -0400 Subject: [cells-devel] Celtk and SBCL (and linux) In-Reply-To: References: <44733A8B.40306@gmail.com> Message-ID: > 2. find the function tk-format-now and monkey with the debug stuff so that > any message to Tk with the word "bitmap" in it gets printed, and see if you > can catch the output and post that. > I get: tk> .f332.cv334 create bitmap 140 140 -bitmap "@\\0dev\\Celtk\\x1.xbm" That works. Then changing the name to something it will not find, I get: Error: Tcl error: error reading bitmap file "\0dev\Celtk\xoxox1.xbm" Here is my theory: the string does not look like a filename path to Tcl on Linux, so it looks for a /named/ bitmap. ie, yeah, tcl has a mechanism (perhaps only in the C api, I do not know) to associate an arbitrary name with a bitmap being loaded from a file. Then all your code just uses that name, and you only have to change the filename in one place to get everyone to use a different bitmap. Anyway, that would explain the "not defined" complaint. It also makes sense since you are (I might have warned you earlier) the first Linux user. The bad news is that I am also ignorant of Linux. :) hth, kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Tue May 23 20:05:20 2006 From: kentilton at gmail.com (Ken Tilton) Date: Tue, 23 May 2006 16:05:20 -0400 Subject: [cells-devel] Celtk and SBCL (and linux) In-Reply-To: References: <44733A8B.40306@gmail.com> Message-ID: On 5/23/06, Frank Goenninger wrote: > > Hi all: > > Am 23.05.2006 um 21:06 schrieb Ken Tilton: > > > > > 2. find the function tk-format-now and monkey with the debug stuff > > so that any message to Tk with the word "bitmap" in it gets > > printed, and see if you can catch the output and post that. > > > > I get: > > > > tk> .f332.cv334 create bitmap 140 140 -bitmap "@\\0dev\\Celtk\ > > \x1.xbm" > > > > That works. Then changing the name to something it will not find, I > > get: > > > > Error: Tcl error: error reading bitmap file "\0dev\Celtk > > \xoxox1.xbm" > > This has to be adapted to Linux-style path names: > > "/the/path/to/the/file/1.xbm" Thanks. Pardon my OS-centrism. Like this?: (mk-bitmap :coords (list 140 140) :bitmap (conc$ "@" (namestring (make-pathname :directory '(:absolute "0dev" "Celtk") :name "x1" :type "xbm")))) kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgoenninger at prion.de Tue May 23 20:21:21 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Tue, 23 May 2006 22:21:21 +0200 Subject: [cells-devel] Celtk and SBCL (and linux) In-Reply-To: References: <44733A8B.40306@gmail.com> Message-ID: Am 23.05.2006 um 22:05 schrieb Ken Tilton: > > > On 5/23/06, Frank Goenninger wrote: Hi all: > > Am 23.05.2006 um 21:06 schrieb Ken Tilton: > > > > > 2. find the function tk-format-now and monkey with the debug stuff > > so that any message to Tk with the word "bitmap" in it gets > > printed, and see if you can catch the output and post that. > > > > I get: > > > > tk> .f332.cv334 create bitmap 140 140 -bitmap "@\\0dev\\Celtk\ > > \x1.xbm" > > > > That works. Then changing the name to something it will not find, I > > get: > > > > Error: Tcl error: error reading bitmap file "\0dev\Celtk > > \xoxox1.xbm" > > This has to be adapted to Linux-style path names: > > "/the/path/to/the/file/1.xbm" > > Thanks. Pardon my OS-centrism. Hehe. ;-) > Like this?: > > (mk-bitmap :coords (list 140 140) > :bitmap (conc$ "@" (namestring (make-pathname > :directory > '(:absolute "0dev" "Celtk") > :name "x1" > :type "xbm")))) Yep. That's one way. Works also with (mk-bitmap :coords (list 140 140) :bitmap ("@/0dev/Celtk/name/x1.xbm") If that path exists, of course ;-) > > kenny Frank From tfb at ocf.berkeley.edu Tue May 23 20:43:55 2006 From: tfb at ocf.berkeley.edu (Thomas F. Burdick) Date: Tue, 23 May 2006 22:43:55 +0200 Subject: [cells-devel] Celtk and SBCL (and linux) In-Reply-To: <44733A8B.40306@gmail.com> References: <44733A8B.40306@gmail.com> Message-ID: On 5/23/06, Stu Glaser wrote: > Hi all, > > I'm trying to get Celtk working on SBCL. I've attached a patch with > several bugfixes. I'm not a Celtk user, but I am the Cells-on-SBCL guy, so I'm definately paying attention here. Could you please send patches in unified diff format? It's about 1000x easier to read (you can get diff to produce it with the -u option). > Much still does not work, however, I have managed to > display the "one-button-window" demo (though it crashes immediately > after display. > > Sometime later I will have questions. Celtk still crashes often in > finish-business, and I'm not yet familiar enough with cells to perform > the fixes. If Kenny or Frank doesn't get to this before I do, I can look into it in a couple weeks. If you guys haven't sorted it out with Celtk issues, it might be Cells related... > Lastly, anonymous CVS access would be great. It would certainly help > for creating patches and for keeping my sources updated. All of Cells uses the common-lisp.net infrastructure, and they turned off anonymous pserver access due to the constant security nightmare it implies. Sorry. I'd be happy with a move to svn, which would also mean reliable anonymous access, but I'm not sure if there's a reasonable client for Windows. There's a good OS X one, though, so I wouldn't be surprised if there was. From kentilton at gmail.com Tue May 23 20:57:05 2006 From: kentilton at gmail.com (Ken Tilton) Date: Tue, 23 May 2006 16:57:05 -0400 Subject: [cells-devel] Celtk and SBCL (and linux) In-Reply-To: References: <44733A8B.40306@gmail.com> Message-ID: On 5/23/06, Thomas F. Burdick wrote: > > On 5/23/06, Stu Glaser wrote: > > Hi all, > > > > I'm trying to get Celtk working on SBCL. I've attached a patch with > > several bugfixes. > > I'm not a Celtk user, but I am the Cells-on-SBCL guy, so I'm > definately paying attention here. Could you please send patches in > unified diff format? It's about 1000x easier to read (you can get > diff to produce it with the -u option). I look forward to that, but I had no problem working from the diff. I take your word for it, tho. > Much still does not work, however, I have managed to > > display the "one-button-window" demo (though it crashes immediately > > after display. > > > > Sometime later I will have questions. Celtk still crashes often in > > finish-business, and I'm not yet familiar enough with cells to perform > > the fixes. > > If Kenny or Frank doesn't get to this before I do, I can look into it > in a couple weeks. If you guys haven't sorted it out with Celtk > issues, it might be Cells related... OK, we'll keep an open mind. But as I said, /everything/ happens in finish-business it seems. Especially with Tk, which is pretty fussy about the order in which things happen. (And I just got bit by a timer going off as a window was being shut down. Oops. new :client task type on the way (up to twenty, I think)) > Lastly, anonymous CVS access would be great. It would certainly help > > for creating patches and for keeping my sources updated. > > All of Cells uses the common-lisp.net infrastructure, and they turned > off anonymous pserver access due to the constant security nightmare it > implies. Sorry. I'd be happy with a move to svn, which would also > mean reliable anonymous access, but I'm not sure if there's a > reasonable client for Windows. There's a good OS X one, though, so I > wouldn't be surprised if there was. I have TortoiseSVN now as well as TortoiseCVS. I hear svn is better. I am down with a switch. kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuglaser at gmail.com Wed May 24 06:32:02 2006 From: stuglaser at gmail.com (Stu Glaser) Date: Wed, 24 May 2006 01:32:02 -0500 Subject: [cells-devel] Celtk and SBCL (and linux) In-Reply-To: References: <44733A8B.40306@gmail.com> Message-ID: <4473FDE2.40300@gmail.com> I'm happy to report that the one-button-window test appears to run correctly. I've attached the appropriate patch. (The patch works from the current version in CVS, so it includes the previous changes) Additionally, menu-button-test, spinbox-test, lotsa-widgets almost works. When I selected File|Quit, it quit my lisp process too. Other than that, it appears okay. I can't find gears, and ltktest-cells-inside doesn't work. One major change: SBCL has a special type for pointers. This type does not work in hashtables, so the integer address must be stored there. Also, I managed to get anonymous CVS working. Enjoy, -Stu Glaser -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch URL: From nikodemus at random-state.net Wed May 24 07:31:53 2006 From: nikodemus at random-state.net (Nikodemus Siivola) Date: Wed, 24 May 2006 10:31:53 +0300 Subject: [cells-devel] Celtk and SBCL (and linux) In-Reply-To: (Thomas F. Burdick's message of "Tue, 23 May 2006 22:43:55 +0200") References: <44733A8B.40306@gmail.com> Message-ID: <87ejyjyj2u.fsf@logxor.random-state.net> "Thomas F. Burdick" writes: > All of Cells uses the common-lisp.net infrastructure, and they turned > off anonymous pserver access due to the constant security nightmare it > implies. Sorry. I'd be happy with a move to svn, which would also The anoncvs is back online (for good and for bad), and as a quick test cells/cells checks out fine -- if something isn't available there, a quick note to admin at common-lisp.net should fix it. But SVN is, nice, yes. /relurk -- Nikodemus Schemer: "Buddha is small, clean, and serious." Lispnik: "Buddha is big, has hairy armpits, and laughs." From kentilton at gmail.com Wed May 24 14:43:55 2006 From: kentilton at gmail.com (Ken Tilton) Date: Wed, 24 May 2006 10:43:55 -0400 Subject: [cells-devel] Celtk and SBCL (and linux) In-Reply-To: <4473FDE2.40300@gmail.com> References: <44733A8B.40306@gmail.com> <4473FDE2.40300@gmail.com> Message-ID: On 5/24/06, Stu Glaser wrote: > > I'm happy to report that the one-button-window test appears to run > correctly. I've attached the appropriate patch. > > (The patch works from the current version in CVS, so it includes the > previous changes) > > Additionally, menu-button-test, spinbox-test, > > lotsa-widgets almost works. When I selected File|Quit, it quit my lisp > process too. Other than that, it appears okay. It /is/ okay. :) Just yesterday I was thinking, "I really should change that before some poor user hits it." That buttons invoke a Tcl "exit", which is fine when talking to Tcl over a pipe. If it makes you feel better, I killed myself that way yesterday when testing. :) I can't find gears, Gears got moved into its own module under Cells. I did not want to commit Celtk to any one binding set to OpenGL, though Celtk does load the Togl widget. Reason? I do not like the new cl-opengl bindings on c-l.net, but I assume it will become the standard, so I will not force /my/ OpenGl bindings on anyone. They happen also to be called cl-opengl. and ltktest-cells-inside doesn't work. I am fighting it out with that over here as well. Not sure if we are talking about the same fight, of course. Oh, and I have not committed to CVS in quite a few days and things are really getting tossed around, so... let's talk again after the next CVS commit. I am sure we will need a second cycle of patches and then things should stabilize. One major change: SBCL has a special type for pointers. This type does > not work in hashtables, so the integer address must be stored there. OK, I will look at that. Hey, thanks for bringing Linux/SBCL on-line. kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Wed May 24 20:56:13 2006 From: kentilton at gmail.com (Ken Tilton) Date: Wed, 24 May 2006 16:56:13 -0400 Subject: [cells-devel] Celtk "Hard to Kill" interim release Message-ID: basically this release is just trying to get on the same page with Stu who is patching like crazy to bring SBCL/Linux on-line. Thx, Stu. The "Hard to Kill" bit reflects the past 24-hours work fighting tooth and nail with Tcl/Tk to bring down a Tk window gracefully. Thought I had it working and then on the last round of tests hit something new (pretty sure this is just something about also getting timers quiesced, which ironically is what started me on this mess 48hrs ago). Meanwhile, I have applied a lot of Stu's patches (Stu, you never got back to me on the Tugl use-lib -- that is in the interp startup now, does not need to be at the toplevel unless it turns out SBCL needs it there.) and want to see how close I got applying them manually as I did while I continue to fight it out with Tcl/Tk. I will also bring the Gears demo back under Celtk since 3d is so much fun, but anyone who wants to test it will have to load it separately: the core Celtk package will load and run without cl-opengl. kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Thu May 25 07:39:30 2006 From: kentilton at gmail.com (Ken Tilton) Date: Thu, 25 May 2006 03:39:30 -0400 Subject: [cells-devel] Celtk better Message-ID: <44755F32.6070300@gmail.com> Worked out all known issues shutting down a window, but will not be surprised if more arise. Always a delicate balance dealing with a foreign GUI. Did not bother to move Gears/Opengl demo under Celtk source module. Maybe tomorrow. Maybe. kt -------------- next part -------------- A non-text attachment was scrubbed... Name: kentilton.vcf Type: text/x-vcard Size: 171 bytes Desc: not available URL: From john at landahl.org Sat May 27 00:10:19 2006 From: john at landahl.org (John Landahl) Date: Fri, 26 May 2006 17:10:19 -0700 Subject: [cells-devel] Celtk2 installation Message-ID: <874pzcnx90.fsf@mobile.landahl.org> So I'd like to try out the new! improved! Celtk2 under Linux/SBCL, but I'm having some installation problems. First I found that I had a really old version of CFFI (thanks, Ubuntu!). After installing the latest CFFI tarball, I still get the following error: * (require :celtk) ; loading system definition from /usr/local/lib/sbcl/site-systems/cffi.asd into ; # ; registering # as CFFI ; loading system definition from /usr/local/lib/sbcl/site-systems/cells.asd ; into # ; registering # as CELLS debugger invoked on a SIMPLE-ERROR in thread #: When attempting to read the slot's value (slot-value), the slot CFFI::TO-C-DYNAMIC-EXPANDER is missing from the object #. Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [RETRY ] Retry performing # on #. 1: [ACCEPT] Continue, treating # on # as having been successful. 2: [ABORT ] Exit debugger, returning to top level. ((SB-PCL::FAST-METHOD SLOT-MISSING (T T T T)) # # # # CFFI::TO-C-DYNAMIC-EXPANDER SLOT-VALUE NIL) Any hints on where to go next? From kentilton at gmail.com Sat May 27 00:26:14 2006 From: kentilton at gmail.com (Ken Tilton) Date: Fri, 26 May 2006 20:26:14 -0400 Subject: [cells-devel] Celtk2 installation In-Reply-To: <874pzcnx90.fsf@mobile.landahl.org> References: <874pzcnx90.fsf@mobile.landahl.org> Message-ID: On 5/26/06, John Landahl wrote: > > So I'd like to try out the new! improved! Celtk2 under Linux/SBCL, but > I'm having some installation problems. First I found that I had a > really old version of CFFI (thanks, Ubuntu!). After installing the > latest CFFI tarball, I still get the following error: > > * (require :celtk) > > ; loading system definition from /usr/local/lib/sbcl/site-systems/cffi.asd > into > ; # > ; registering # as CFFI > ; loading system definition from > /usr/local/lib/sbcl/site-systems/cells.asd > ; into # > ; registering # as CELLS > > debugger invoked on a SIMPLE-ERROR in thread > #: > When attempting to read the slot's value (slot-value), the slot > CFFI::TO-C-DYNAMIC-EXPANDER is missing from the object > #. > > Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. > > restarts (invokable by number or by possibly-abbreviated name): > 0: [RETRY ] Retry performing # on > #. > 1: [ACCEPT] Continue, treating # on > # as having been > successful. > 2: [ABORT ] Exit debugger, returning to top level. > > ((SB-PCL::FAST-METHOD SLOT-MISSING (T T T T)) > # > # > # > # > CFFI::TO-C-DYNAMIC-EXPANDER > SLOT-VALUE > NIL) > > > Any hints on where to go next? Hmmm. (require :celtk)? Well, it got all the way up to tk-structs so i guess SBCL is smart enough to know what to do. To rule out an issue here, hop into celtk/load.lisp and start evaluating forms one by one. But really... That error has me concerned as to whether you have managed to get a clean CFFI environment. CFFI normally complains intelligently if I am off base, and that looks like an internals trip up. Might be a mismatch of old and new code. Meanwhile I will go stare at tk-structs and the CFFI source to see if I notice anything funny about :unsigned-longs. kt -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Sat May 27 00:44:14 2006 From: kentilton at gmail.com (Ken Tilton) Date: Fri, 26 May 2006 20:44:14 -0400 Subject: [cells-devel] Celtk2 installation In-Reply-To: <874pzcnx90.fsf@mobile.landahl.org> References: <874pzcnx90.fsf@mobile.landahl.org> Message-ID: On 5/26/06, John Landahl wrote: > > So I'd like to try out the new! improved! Celtk2 under Linux/SBCL, but > I'm having some installation problems. First I found that I had a > really old version of CFFI (thanks, Ubuntu!). After installing the > latest CFFI tarball, I still get the following error: > > * (require :celtk) > > ; loading system definition from /usr/local/lib/sbcl/site-systems/cffi.asd > into > ; # > ; registering # as CFFI > ; loading system definition from > /usr/local/lib/sbcl/site-systems/cells.asd > ; into # > ; registering # as CELLS > > debugger invoked on a SIMPLE-ERROR in thread > #: > When attempting to read the slot's value (slot-value), the slot > CFFI::TO-C-DYNAMIC-EXPANDER is missing from the object > #. I am going with the guess that your CFFI install is still not straight. The string "to-c-dynamic-expander" does not appear in my CFFI source tree, but it does appear in an old directory helpfully named cffi-pre-2006-04. This would be consistent with you having a mix of code now, in which some of it is old and still looking for that slot, while some of it is new and no longer has that slot. Of course I do see "to-c" stuff in the new tree because CFFI has a lot of built-in abilities that way, but I have to think they refactored recently. hth, kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Sat May 27 06:25:59 2006 From: kentilton at gmail.com (Ken Tilton) Date: Sat, 27 May 2006 02:25:59 -0400 Subject: [cells-devel] Cello Rizng Message-ID: GUI fans might want to start tracking the Cello list for ongoing development. Celtk is fine and with its Togl widget even does OpenGL, but Cello makes the Celtk/Togl come alive with: FTGL -- anti-aliased texture, polygon, outline, pixmap, bitmap, extruded, and one I ma forgetting fonts GraphicsMagick/ImageMagick -- awesome graphic file handling and more OpenAL -- fun with 3D sound Much more sophisticate dframework, esp. in re widget Geometry. Speaking of OpenAL, it looks as if the Tcl "Snack" library will provide terrific real-time audio synthesis (but that would be true for Celtk as well). Anyway, if you download Cello now (a) most of it is yet to be resurrected but (b) if you can get demo NeHe-06 running (1) you are pretty good at getting hairy libraries running and (2) i think you will enjoy it. :) Meanwhile, PyCells is bringing some attention this way: http://www.eby-sarna.com/pipermail/peak/2006-May/002545.html kt -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Sat May 27 15:28:33 2006 From: kentilton at gmail.com (Ken Tilton) Date: Sat, 27 May 2006 11:28:33 -0400 Subject: [cells-devel] Re: [PyCells] Possibly-useful prior art In-Reply-To: <5.1.1.6.0.20060526225520.02f1eb20@mail.telecommunity.com> References: <5.1.1.6.0.20060526225520.02f1eb20@mail.telecommunity.com> Message-ID: Phillip, Nice write-up. Random notes: What I discovered is quite cool. The Cells system *automatically discovers* dynamic dependencies, without having to explicitly specify that X depends on Y, as long as X and Y are both implemented using cell objects. And that is part of why Cells is pretty much all-or-nothing for a developer: I have not tried to figure out the threshhold, but above what I think is a very low one, all application semantics must be expressed declaratively as Cell rules. Otherwise imperative code gets left out of the action as the automatic dataflow engine does its thing. The corollary being your "as long as" qualifier: my declarative rules are crippled if some important datapoint is not a Cell. For the first seven years of Cells development, when in doubt I started out a new slot/attribute as a non-Cell, bending over backwards if you will not to force the mechanism where it should not go. The default :cell meta-attribute was nil until just recently. But in each case, soon enough it turned out I would need them to be Cells. Just recently "true" became the default for :cell. Specifically, the cells system understands how to make event-based updates orderly and deterministic, in a way that peak.events cannot. It may be of interest that this orderliness is relatively new to Cells. For the longest time and in the most intense applications I got away with murder. Strangely, it was development of a RoboCup client that forced Cells to "grow up". One especially interesting bit is that the Cells system can "optimize away" dependencies or subscriptions when their subjects are known to be constant values. I was quite surprised at how much faster this made Cells run. I'm also wondering if a Cells-like system couldn't also be used to implement STM (Software Transactional Memory) to allow for atomic operations even in the presence of threads. All reads and writes are controlled by the cells system, so it can in principle abort and retry a "transaction", by waiting until *something changes* that would affect the transaction's ability to succeed. We have a Google SoC project over on the Lisp side to implement STM, and yes, I am excited about that making Cells viable in a multi-threaded situation. Mind you, I had never heard of STM before this proposal landed on our doorstep, nor do even have much idea of what is available to applications when it comes to dealing with threads, but looking at how Cells manages data integrity I know it will need help to survive threads. STM looks like a great fix. However, seeing how the Cells paradigm works, it seems to me that it should be pretty easy to establish the convention that side-effects should be confined to non-rule "observer" code. Right, it is just a convention, but I think one that gets easier to follow because the engine provides a simple way to say "do this when the time is right". experience w/e.g. peak.binding attributes shows that it's rare to want to put side-effects into pull-oriented rules. "We could do it, but it would be wrong." Really, the principal downside to Cells is wrapping your head around the idea that *everything* should be treated as pull-oriented rules. Yes, it really is a paradigm shift, one it takes a long time to internalize. What I noticed was that, if I decided to add a significant new mechanism to the system, after about two hours of coding I would be having increasing difficulties and start to get a vague "bad feeling". Then I would realize that I had, from long habit, fallen back into an imperative style. Hence the "bad feeling". Because the code was all new, it did not grow naturally from the Cell-based model. if it had, It would of course been done originally in the declarative style. I have encouraged Ryan, the PyCells author, not to allow backdoors to the Cells engine, precisely because of this. The big win comes from the declarative paradigm, and developers will not climb that learning curve if they can avoid it. SImple human nature. Cells makes one think harder up front in return for all sorts of good things later, and that is a tradeoff I have always liked to make as a developer. There are some operations (such as receiving a command and responding to it) that seem to be more naturally expressed as pushing operations, where you make some decisions and then directly update things or send other commands out. Exactly! A spreadsheet is a steady-state thing (here are the values, here is the computed other state) and using Cells to express static reality is a snap. Otoh, imperative code is all about change, so it is great for handling events. We use ephemeral Cells to model events (they take on a value, propagate, then revert to null silently, without propagating), but one still can end up thinking pretty hard when it comes to events. I think the most frightening "rule" I have written was for a Timer class implemented by the Tcl "after" command. Actually, you can still do that, it's just that those updates or commands force another "virtual moment" of time into being, where if you had made them pull-driven they could've happened in the *same* "virtual moment". So, it's more that pull-based rules are slightly more efficient than push-based ones, which is nice because that means most developers will consider it worth learning how to do it the pull way. ;) That and the straitjacket I hope PyCells keeps from Cells. Anyway, there is a *lot* of interesting food for thought, here. For example, you could create object validation rules using cells, and the results would be automatically recomputed when something they depended on changed. Not only that, but it would be possible to do atomic updates, such that the validation wouldn't occur until *after* all the changes were made -- i.e., no false positives. Of course, you'd get the resulting validation errors in the *next* "time quantum", so you'd need to make the response to them event-driven as well. It's definitely a slippery slope. :) For example, this deterministic model of computation seems to resemble "object prevalence" (e.g. Prevayler) in that everything (even the clock) is deterministic, changes are atomic, and I/O occurs between logical moments of time. I haven't thought this particular link through very much yet, it's just an intriguing similarity. Nice call. I have heard the Cells data integrity model maps nicely onto the transaction model of AllegroCache, a persistent Lisp object database. The head-exploding part is figuring out how to get errors to propagate backwards in time, so that validation rules (which run in the "next moment") could appear to cause an error at the point where the values were set. Sounds like you want at least one Undo. What about a "fail now or forever hold your peace" policy? cheers, kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Mon May 29 18:23:29 2006 From: kentilton at gmail.com (Ken Tilton) Date: Mon, 29 May 2006 14:23:29 -0400 Subject: [cells-devel] Filters, anyone? Message-ID: Wow, just tripped over my own code in support of filters, aka synapses. I think I have to make a change. I manage to eliminate Synapses as distinct objects by /always/ interpreting the second of possibly multiple returned values as a "propagate?" indicator. I thought this would be OK since a slot can hold only one value. But! (c? (floor (^length) 2)) ...ends up feeding the "propagate?" interpretation, so it turned we all have been getting unnecessary propagation where we innocently returned multiple values and the second was non-nil. My proposed solution is to make the kludge even worse. :) A cell acting in the role of a synapse/filter will have to return 'cells::propagate-yes, 'cell::propagate-no, or (I think there was a third value). Only those will be meaningful. Anything else gets thrown away. Thoughts? Alternatives? kt -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Tue May 30 01:03:13 2006 From: kentilton at gmail.com (Ken Tilton) Date: Mon, 29 May 2006 21:03:13 -0400 Subject: [cells-devel] to propagate or not to propagate... Message-ID: Turns out the one filter I looked at was already answering either :propagate or :no-propagate, so on the fly I pronounced that a new standard, tweaked the code to respect either in re propagation and otherwise do the usual test of before/after value change. So is this an API change or bug fix? :) ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Tue May 30 03:00:36 2006 From: kentilton at gmail.com (Ken Tilton) Date: Mon, 29 May 2006 23:00:36 -0400 Subject: [cells-devel] New "tutorial/RT code in Cells source tree Message-ID: I have just uploaded a first rough set of example code which is intended to exercise Cells with a progression of challenges, in the order I might follow when developing a port of Cells to another language, or when validating cells after an enormous upheaval. I call it the tutorial directory, but it could also be a porting guide and a more concise regression test than the random mish-mosh in cells-test. I do plan to put future energy into this code as a regrression test suite, so... watch for a name change? :) kt -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgoenninger at prion.de Wed May 31 05:27:26 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Wed, 31 May 2006 07:27:26 +0200 Subject: [cells-devel] Celtk: Text widget API woes Message-ID: Hi all: Just a heads up on the behaviour of the text widget: Currently setting the contents of the text widget is done by setting the model value of the widget's model. This causes two steps to be triggered as Tcl commands: 1. Erase text widget to empty display 2. Set new text and display this text Now, if one is reading file contents to be display to the widget by using consequtive calls to read-line and setting each line as the new text widget content only the last line will be displayed, of course. And if this happens to be an empty line then just nothing will appear on the text widget. In case you want to dig in deeper on that subject, well, we're here... Frank From kentilton at gmail.com Wed May 31 05:44:06 2006 From: kentilton at gmail.com (Ken Tilton) Date: Wed, 31 May 2006 01:44:06 -0400 Subject: [cells-devel] Celtk: Text widget API woes In-Reply-To: References: Message-ID: On 5/31/06, Frank Goenninger wrote: > > Hi all: > > Just a heads up on the behaviour of the text widget: > > Currently setting the contents of the text widget is done by setting > the model value of the widget's model. This causes two steps to be > triggered as Tcl commands: > 1. Erase text widget to empty display > 2. Set new text and display this text > > Now, if one is reading file contents to be display to the widget by > using consequtive calls to read-line and setting each line as the new > text widget content only the last line will be displayed, of course. > And if this happens to be an empty line then just nothing will appear > on the text widget. > > In case you want to dig in deeper on that subject, well, we're here... Are you ready to solo? I do not think there is an off-the-shelf answer for anything more sophisticated than what you see now in text-widget. (1) subclass text-widget (2) define for that subclass an :around observer of .md-value that does nothing or "what you want" (3) add slots to your text-wdget subclass as needed and knock yourself out. What you can consider is an ephemeral "append-data" slot you will setf with each line of input. The observer on that line does the insert-at-end thing. md-value can have a rule that appends "append-data" to .cache. the md-value is just there should other code want to get to it, though there is always the text widget dump and cget (?) stuff. I'd hang out my shingle and suggest a contract, but this seems like a reasonable next step for you in re Cells fluency. ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgoenninger at prion.de Wed May 31 13:09:28 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Wed, 31 May 2006 15:09:28 +0200 Subject: [cells-devel] Celtk: Text widget API woes In-Reply-To: References: Message-ID: Am 31.05.2006 um 07:44 schrieb Ken Tilton: > > > On 5/31/06, Frank Goenninger wrote: Hi all: > > ... [snipped my earlier message] > In case you want to dig in deeper on that subject, well, we're here... > > Are you ready to solo? ??? What do you mean by that ? > I do not think there is an off-the-shelf answer for anything more > sophisticated than what you see now in text-widget. Yes, of course there is no better way to do this. I did not say otherwise. I just documented what is in there right now. I'll not do that again - I seem to understand you want me to stop contributing. I just do not get why right now. > (1) subclass text-widget > (2) define for that subclass an :around observer of .md-value that > does nothing or "what you want" > (3) add slots to your text-wdget subclass as needed and knock > yourself out. That's obviously the way to go. I also never said otherwise. > What you can consider is an ephemeral "append-data" slot you will > setf with each line of input. The observer on that line does the > insert-at-end thing. md-value can have a rule that appends "append- > data" to .cache. the md-value is just there should other code want > to get to it, though there is always the text widget dump and cget > (?) stuff. Sure. I know. I assumed you know that I know. > > I'd hang out my shingle and suggest a contract, but this seems like > a reasonable next step for you in re Cells fluency. Sorry, You lost me here completely. What does that mean? Text widget and Tk is not about Cells. I do know perfectly well that I am a bloody beginner in re Cells. As for the text widget I'd say I did gain some experience (that I am ready to share). Please enlighten me on how I did something I shouldn't have done. The only intention was to say "well, there is something you can use and if you do, don't be surprised it behaves like this." Because that's the thing I was trapped by. Assuming others might experience this also I "bursted out" into a few lines of a short notice - speaking from beginner to beginner. Well, I may be wrong here as I might well misunderstand all of the underlying message of this reply, or, even, there is none - if so, I beg pardon for implying something which isn't there. > ken Frank - having a big question mark in my mind From kentilton at gmail.com Wed May 31 13:25:06 2006 From: kentilton at gmail.com (Ken Tilton) Date: Wed, 31 May 2006 09:25:06 -0400 Subject: [cells-devel] Celtk: Text widget API woes In-Reply-To: References: Message-ID: On 5/31/06, Frank Goenninger wrote: > > > Am 31.05.2006 um 07:44 schrieb Ken Tilton: > > > > > > > On 5/31/06, Frank Goenninger wrote: Hi all: That is the part I missed. :) I thought you were writing to /me/ asking for help on the text widget. kt -------------- next part -------------- An HTML attachment was scrubbed... URL: From fgoenninger at prion.de Wed May 31 13:54:33 2006 From: fgoenninger at prion.de (Frank Goenninger) Date: Wed, 31 May 2006 15:54:33 +0200 Subject: [cells-devel] Celtk: Text widget API woes In-Reply-To: References: Message-ID: <87808FC1-28E2-4714-A314-EC371D8E1792@prion.de> Am 31.05.2006 um 15:25 schrieb Ken Tilton: > > > On 5/31/06, Frank Goenninger wrote: > Am 31.05.2006 um 07:44 schrieb Ken Tilton: > > > > > > > On 5/31/06, Frank Goenninger wrote: Hi all: > > > That is the part I missed. :) I thought you were writing to /me/ > asking for help on the text widget. > > kt Oh, I really, really, really want to say a big "I am sorry" for having written a lengthy message about just nothing!!! Back to hacking ;-) Frank From kentilton at gmail.com Wed May 31 16:07:54 2006 From: kentilton at gmail.com (Ken Tilton) Date: Wed, 31 May 2006 12:07:54 -0400 Subject: [cells-devel] Celtk: Text widget API woes In-Reply-To: <87808FC1-28E2-4714-A314-EC371D8E1792@prion.de> References: <87808FC1-28E2-4714-A314-EC371D8E1792@prion.de> Message-ID: > > That is the part I missed. :) I thought you were writing to /me/ > > asking for help on the text widget. > > > > kt > > Oh, I really, really, really want to say a big "I am sorry" for > having written a lengthy message about just nothing!!! Not at all, /my/ mistake in flipping exactly one bit made valid your entirely different interpretation. I would apologize but it has been worth the laugh. :) I needed a break from porting Cello to Celtk. But last night was a good one and it is starting to be fun now. If I actually do this and get that Amazing Spinning Shapes Demo working* under an entirely different framework I will be smiling from ear to ear -- and we can start spamming the Cello list instead of Cells. kenzo * Unfortunately without the neat Glut built-ins such as sphere, torus, and teapot. k -------------- next part -------------- An HTML attachment was scrubbed... URL: