From kennytilton at optonline.net Thu Oct 11 05:06:25 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Thu, 11 Oct 2007 01:06:25 -0400 Subject: [cells-devel] Interesting cells issue, synapses to the rescue Message-ID: <470DAF51.10408@optonline.net> Events are always a problem for a Cells-driven model, which being declarative is more of a steady-state paradigm: each cell rule is authored in the midset of "if the rest of the world is such and such, then I am so-and-so". What I have been seleing as a general solution to the event problem is: (c? (case (^event) (this (derive-this self)) (otherwise .cache))) ..where .cache is my current value. ie, as far as this rule is concerned, any event other than 'this means nothing to me and I wish I did not even have to worry about it. The problem I ran into is that my derive-this returned some other model instance, and as other events ignored by this rule transpired, that model instance ceased to be. So the slot in question now held a dead instance and returned it when the slot got queried. This happened in turn because models are cells-mediated and normally when the instance ceased to be some dependency would have kicked off the above rule and it would have returned nil or some new instance, but... ...when some event other than 'this came through, the rule ran and the cell ended up dependent only on the event cell. Rules depend only on the things they touched in their last invocation, and when some other event comes through the only cell touched is the event cell. uh-oh. What is needed is a cells-aware way of saying I /really/ do not want to know about other events, and that is the kind of thing I use synapses for. A synapse is like an flet or labels function, a cell internal to a rule. I have not bundled up the new synapse to look all clever so a lot of wiring shows but in the end it will just be something like: (c? (case (f-find (^event) '(this that)) (this ...) (that ...))) ...and the rule will fire only when the event is thos or that, meaning any/all dependencies established during the processing of this or that will stay around until another event this or that occurs. kt From Feed at common-lisp.net Sun Oct 14 23:04:02 2007 From: Feed at common-lisp.net (Feed at common-lisp.net) Date: 14 Oct 2007 16:04:02 -0700 Subject: [cells-devel] Feed Blaster puts your ad right to the screens of millions in 15 Minutes ! Message-ID: <20071014160359.EB98550317C17862@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From martin at martindengler.com Tue Oct 16 05:06:34 2007 From: martin at martindengler.com (Martin Dengler) Date: Tue, 16 Oct 2007 06:06:34 +0100 Subject: [cells-devel] PATCH: cells_2.0 clisp support tweak Message-ID: <20071016050634.GJ2855@sun.xades.com> Hi, I'm using clisp 2.41[1] and had to comment out three lines of (seems like now-unnecessary) code to get cells to asdf-install:install; here is a patch against the released version (the CVS repo links on the cells website are broken, and I couldn't guess any valid ones). It's tiny, so probably has already been fixed better in CVS, but JIC/FWIW: --- detritus.lisp~ 2005-05-02 20:37:22.000000000 +0100 +++ detritus.lisp 2007-10-16 05:39:00.000000000 +0100 @@ -26,9 +26,9 @@ `(let ((*dbg* t)) , at body)) -#+clisp -(defun slot-definition-name (slot) - (clos::slotdef-name slot)) +;#+clisp +;(defun slot-definition-name (slot) +; (clos::slotdef-name slot)) ;;;(defmethod class-slot-named ((classname symbol) slotname) ;;; (class-slot-named (find-class classname) slotname)) --- defpackage.lisp~ 2005-05-02 20:36:31.000000000 +0100 +++ defpackage.lisp 2007-10-16 05:39:06.000000000 +0100 @@ -41,6 +41,6 @@ #:make-fifo-queue #:fifo-add #:fifo-empty #:fifo-pop #:mapfifo #-mcl #:true - #+clisp #:slot-definition-name +; #+clisp #:slot-definition-name #+(and mcl (not openmcl-partial-mop)) #:class-slots )) Martin PS - For the record, I also had the problem mentioned here: http://www.interactivecode.com/googles-summer-code-17/cells-under-lispworks-35096/ with asdf-install. I can install cl-ppcre and some other packages fine, but not cells. asdf-install isn't putting the symlink to the .asd file in the correct directory, so I'm having to add the cells_2.0 download directory to *central-registry* explicitly. 1. Full version info for clisp: $ /usr/bin/clisp --version GNU CLISP 2.41 (2006-10-13) (built on hammer3.fedora.redhat.com) Software: GNU C 4.1.1 20061011 (Red Hat 4.1.1-30) gcc -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -O -DUNICODE -DDYNAMIC_FFI -I. -x none libcharset.a libavcall.a libcallback.a /usr/lib64/libreadline.so -Wl,-rpath -Wl,/usr/lib64 -ltermcap -ldl -L/usr/lib64 -lsigsegv -R/usr/lib64 -L/usr/lib64 SAFETY=0 TYPECODES WIDE GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY libsigsegv 2.4 libreadline 5.1 Features: (READLINE REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI GETTEXT UNICODE BASE-CHAR=CHARACTER PC386 UNIX) C Modules: (clisp i18n syscalls regexp readline) Installation directory: /usr/lib64/clisp/ User language: ENGLISH Machine: X86_64 (X86_64) cree.xades.com [127.0.0.1] -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From Instant at common-lisp.net Thu Oct 18 04:07:00 2007 From: Instant at common-lisp.net (Instant at common-lisp.net) Date: 17 Oct 2007 21:07:00 -0700 Subject: [cells-devel] Can you afford to lose 300, 000 potential customers per year ? Message-ID: <20071017210700.246357889B342C7B@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Income at common-lisp.net Sun Oct 21 03:21:05 2007 From: Income at common-lisp.net (Income at common-lisp.net) Date: 20 Oct 2007 20:21:05 -0700 Subject: [cells-devel] How would you like an extra $500 - $1000 a week with 15 minutes of your time ? Message-ID: <20071020202105.420351B40D47BDE9@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Unsubscribe email.txt URL: From Hit-Booster at common-lisp.net Thu Oct 25 01:56:17 2007 From: Hit-Booster at common-lisp.net (Hit-Booster at common-lisp.net) Date: 24 Oct 2007 18:56:17 -0700 Subject: [cells-devel] How to get free quality visitors to your website? Message-ID: <20071024113602.770E83202E@common-lisp.net> An HTML attachment was scrubbed... URL: From achambers.home at googlemail.com Fri Oct 26 22:42:12 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Fri, 26 Oct 2007 23:42:12 +0100 Subject: [cells-devel] multiselect listbox Message-ID: Hi, I tried to hack at the scrolled-list definition to make it support multi-select lists but it didn't seem to work. Is there something else you have to change to get this working? (deftk scrolled-list (row-mixin frame-selector) ((list-item-keys :initarg :list-item-keys :accessor list-item-keys :initform nil) (list-item-factory :initarg :list-item-factory :accessor list-item-factory :initform nil) (list-height :initarg :list-height :accessor list-height :initform nil) (selectmode :initarg :selectmode :accessor selectmode :initform nil)) (:default-initargs :list-height (c? (max 1 (length (^list-item-keys)))) :kids-packing nil :kids (c? (the-kids (mk-listbox :id :list-me :kids (c? (the-kids (mapcar (list-item-factory .parent) (list-item-keys .parent)))) --> :selectmode (c? (selectmode .parent)) <-- :tkfont '(courier 9) :state (c? (if (enabled .parent) 'normal 'disabled)) :takefocus (c? (if (enabled .parent) 1 0)) :height (c? (list-height .parent)) :packing (c? (format nil "pack ~a -side left -fill both -expand 1" (^path))) :yscrollcommand (c? (when (enabled .parent) (format nil "~a set" (path (nsib)))))) (mk-scrollbar :id :vscroll :packing (c?pack-self "-side right -fill y") :command (c? (format nil "~a yview" (path (psib))))))))) Cheers, Andy From Hit-Booster at common-lisp.net Sat Oct 27 10:31:37 2007 From: Hit-Booster at common-lisp.net (Hit-Booster at common-lisp.net) Date: 27 Oct 2007 03:31:37 -0700 Subject: [cells-devel] How to get free quality visitors to your website? Message-ID: <20071027073205.974E92E1D6@common-lisp.net> An HTML attachment was scrubbed... URL: From achambers.home at googlemail.com Sun Oct 28 23:03:50 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Mon, 29 Oct 2007 00:03:50 +0100 Subject: [cells-devel] Hacking the gtk-ffi Message-ID: Hi, What are all the things you need to do to add support for a property on a widget. I'm trying to add the "headers-visible" property to the tree-view widget. Here is what I did.... - added the symbol headers-visible to the gtk-slots list in the widget specfication - added the form below to "def-gtk-lib-functions" - made an app with a listbox using that option (gtk-tree-view-set-headers-visible :void ((tree-view :pointer) (visible :gtk-boolean))) I ran the app with debug on but didn't see any calls to the c function. Is there something else you need to do? Any general tips on debugging cells/gtk apps are also welcome. Cheers, Andy From achambers.home at googlemail.com Sun Oct 28 23:50:19 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Mon, 29 Oct 2007 00:50:19 +0100 Subject: [cells-devel] Re: Hacking the gtk-ffi In-Reply-To: References: Message-ID: On 10/29/07, Andy Chambers wrote: > Hi, > > What are all the things you need to do to add support for a property > on a widget. I'm trying to add the "headers-visible" property to the > tree-view widget. Here is what I did.... > > - added the symbol headers-visible to the gtk-slots list in the > widget specfication > - added the form below to "def-gtk-lib-functions" > - made an app with a listbox using that option > > (gtk-tree-view-set-headers-visible :void > ((tree-view :pointer) > (visible :gtk-boolean))) > > I ran the app with debug on but didn't see any calls to the c > function. Is there something else you need to do? Any general tips > on debugging cells/gtk apps are also welcome. OK. I think I know why its not working. The ffi call never gets made because cells only uses it if either the new or old value is not nil. Looking further into it, the editable slot on the entry widget seems to have the same problem. Does anyone successfully make entry widgets non-editable? Cheers, Andy From kennytilton at optonline.net Mon Oct 29 00:36:48 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Sun, 28 Oct 2007 20:36:48 -0400 Subject: [cells-devel] Re: [cells-gtk-devel] Re: Hacking the gtk-ffi In-Reply-To: References: Message-ID: <47252B20.5020101@optonline.net> Andy Chambers wrote: > On 10/29/07, Andy Chambers wrote: > >>Hi, >> >>What are all the things you need to do to add support for a property >>on a widget. I'm trying to add the "headers-visible" property to the >>tree-view widget. Here is what I did.... >> >> - added the symbol headers-visible to the gtk-slots list in the >>widget specfication >> - added the form below to "def-gtk-lib-functions" >> - made an app with a listbox using that option >> >>(gtk-tree-view-set-headers-visible :void >> ((tree-view :pointer) >> (visible :gtk-boolean))) >> >>I ran the app with debug on but didn't see any calls to the c >>function. Is there something else you need to do? Any general tips >>on debugging cells/gtk apps are also welcome. > > > OK. I think I know why its not working. The ffi call never gets made > because cells only uses it if either the new or old value is not nil. Properties are propagated from the Lisp model to Gtk by "observers" on a slot. Celtk and Cells-Gtk generate these observers as part of the macroexpansion of the def macro to which it seems you correctly added the slot. It should not matter that the value (as you imply) never changes, because Cells understands that an initial propagation is necessary so observers and observed start out in synch. You can check that you see an observer in the macroexpansion, then that that is being called. If not, I would have a concern that Cells-Gtk has not been upgraded to use the latest version of Cells, because I have a faint recollection that possibly older versions do not propagate a nil initial value. I would be shocked if it did not propagate a non-nil value, so one thing you might try as a sanity check is to specify a non-nil just to see if anything fires. Hmmm. As I write this I find myself wondering why Cells-Gtk would know to call that function. I am afraid it has been years since I touched that code. Does the macroexpansion splice together a call by concatenating "GTK-TREE-VIEW-SET-" with the slot name? Again, examine the macroexpansion of DEFGTK (or whatever it is) of the tree-view class to make sure you see a call to the desired function. If not, you need to supply an observer on the slot yourself. I believe the method combination on observers has been PROGN for a while so multiples are fine, if not make it before or after, should not matter. hope these avenues of investigation move you forward some. kt From BlogBlaster at common-lisp.net Mon Oct 29 11:27:01 2007 From: BlogBlaster at common-lisp.net (BlogBlaster at common-lisp.net) Date: 29 Oct 2007 03:27:01 -0800 Subject: [cells-devel] "How would you like to have your ad on 2 Million Websites ?" Message-ID: <20071029032701.C45719A5D5EA92E4@from.header.has.no.domain> An HTML attachment was scrubbed... URL: From kennytilton at optonline.net Mon Oct 29 13:49:34 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Mon, 29 Oct 2007 09:49:34 -0400 Subject: [cells-devel] Re: [cells-gtk-devel] Re: Hacking the gtk-ffi In-Reply-To: References: <47252B20.5020101@optonline.net> Message-ID: <4725E4EE.2010801@optonline.net> Andy Chambers wrote: > On 10/29/07, Ken Tilton wrote: > >>Andy Chambers wrote: >> >>>On 10/29/07, Andy Chambers wrote: > > >>>OK. I think I know why its not working. The ffi call never gets made >>>because cells only uses it if either the new or old value is not nil. >> >>Properties are propagated from the Lisp model to Gtk by "observers" on a >>slot. Celtk and Cells-Gtk generate these observers as part of the >>macroexpansion of the def macro to which it seems you >>correctly added the slot. It should not matter that the value (as you >>imply) never changes, because Cells understands that an initial >>propagation is necessary so observers and observed start out in synch. >> >>You can check that you see an observer in the macroexpansion, then that >>that is being called. If not, I would have a concern that Cells-Gtk has >>not been upgraded to use the latest version of Cells, because I have a >>faint recollection that possibly older versions do not propagate a nil >>initial value. I would be shocked if it did not propagate a non-nil >>value, so one thing you might try as a sanity check is to specify a >>non-nil just to see if anything fires. > > > The observer is being created in the macro-expansion. That's how I knew to > add the ffi definition (how cool is it that the software knew what function it > needed to call before I did :-)). > > My immediate problem is fixed by overriding the generated observer to always > propagate the value so I think you're spot on about cells-gtk not > using the latest cells but I'm starting to have some fun now and feel > a lot more confident about trying to upgrade. You mean upgrade Cells-Gtk to the latest Cells? Interestingly, one of the things I did in later versions was first to handle propagation by posting tasks to a fifo queue (so we do not go recursively deeper on propagation, which can make debugging harder) and then to allow specification of a user handler for processing the queue. I did the latter because Tk (not Gtk) can be a little sensitive to the order in which things happen and a user queue handler allows me to tag all messages to Tk with some keyword or other which then gets used by the queue handler to order tasks to kep Tk happy. I do not know if Cells-Gtk has the same issues, or if they reach the application user of Cells-Gtk itself, but there it is. The latest Cells also put the whole thing on a much solider foundation correctness-wise, at the expense of a little loss in transparency. The "correctness gap" was interesting in how few problems it caused, but I always knew the gap was there and when I undertook RoboCup that application definitely broke for those reasons, so Cells got fixed. I think you cannot "upgrade" Cells-Gtk, I think you have to make a giant leap for guikind and call it Cells-Gtk3 (or 4, I actually forget if I am at Cells3 or 4, the good thing being I do not think about Cells anymore (tho every 4-8 months I run into a solid bug (another reason to, um, upgrade))). Cells-Gtk3 will be an interestingly big job since I /think/ you will be getting into a user-queue handler that knows about Gtk, but as did Cells-Gtk Classic you can start by mimicking Celtk. kt From achambers.home at googlemail.com Tue Oct 30 10:11:40 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Tue, 30 Oct 2007 10:11:40 +0000 Subject: [cells-devel] porting to cells3 Message-ID: On 10/29/07, Ken Tilton wrote: > > I think you cannot "upgrade" Cells-Gtk, I think you have to make a giant > leap for guikind and call it Cells-Gtk3 (or 4, I actually forget if I am > at Cells3 or 4, the good thing being I do not think about Cells anymore > (tho every 4-8 months I run into a solid bug (another reason to, um, > upgrade))). Cells-Gtk3 will be an interestingly big job since I /think/ > you will be getting into a user-queue handler that knows about Gtk, but > as did Cells-Gtk Classic you can start by mimicking Celtk. I knew it wouldn't just be a case of moving the asd files around but perhaps I was still underestimating the task. Here's the problems I've come accross so far. 1) def-c-output seems to be called defobserver now. Is there any semantic differences between the two? 2) make-instance 'family now requires an :fm-parent My approach until now has been to update the cells that cells-gtk uses, then load-system, fix errors, load-system.... I'm just communicating this in case it elicits a nugget of insight from someone that might have attempted a similar task before. Cheers, Andy