From Feed at common-lisp.net Thu May 3 21:39:22 2007 From: Feed at common-lisp.net (Feed at common-lisp.net) Date: 03 May 2007 14:39:22 -0700 Subject: [cells-devel] Feed Blaster puts your ad right to the screens of millions in 15 Minutes ! Message-ID: <20070503143922.D17FC408F322BC92@from.header.has.no.domain> An HTML attachment was scrubbed... URL: From gracin at tel.fer.hr Thu May 3 23:09:13 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Fri, 04 May 2007 01:09:13 +0200 Subject: [cells-devel] Lots of instances, callback when particular instance changes Message-ID: <463A6B99.2080004@tel.fer.hr> Hello! I have the following class (defmodel switch (component) ((pos :initarg :pos :initform (c-in :off) :accessor switch-position))) and I've created lots of switches in a family and I can find them by name. Is there any elegant way of establishing a dependency between one particular instance of switches and some code? I mean, like a callback function to be called when the value of that switch changes? If I use def-c-output on 'pos', it will get called whenever any of the switch instances sets it. Thanks! From gracin at tel.fer.hr Fri May 4 20:41:26 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Fri, 04 May 2007 22:41:26 +0200 Subject: [cells-devel] Lots of instances, callback when particular instance changes In-Reply-To: <463A6B99.2080004@tel.fer.hr> References: <463A6B99.2080004@tel.fer.hr> Message-ID: <463B9A76.6010203@tel.fer.hr> Here's what I'm currently doing (just an outline): (defmodel switch (component) ((switch-position :cell t :initarg :switch-position :initform (c-in :off) :accessor switch-position) (change-handler :cell nil :initform nil :initarg :change-handler :reader switch-change-handler))) (def-c-output switch-position (self new-value old-value) (when (switch-change-handler self) (funcall (switch-change-handler self) self new-value old-value))) And then create instances: ... (mksys 'switch :main-battery-switch) (mksys 'switch :apu-start-switch :change-handler 'apu-start-switch-change-handler) ... The reason I need the change handler is that the change handler has to modify the value of the self switch. For example, when apu-start-switch changes its value to :START, change handler schedules an action which will set the switch back to :ON after some time. I fail to see how I can do this using regular slot-dependency mechanisms provided by Cells. Am I making any sense? From instant at common-lisp.net Sat May 5 16:13:23 2007 From: instant at common-lisp.net (instant at common-lisp.net) Date: 05 May 2007 09:13:23 -0700 Subject: [cells-devel] Can you afford to lose 300.000 potential customers per year!? Message-ID: <20070505091323.22F560F12C2EC540@from.header.has.no.domain> An HTML attachment was scrubbed... URL: From frgo at mac.com Sat May 5 10:02:15 2007 From: frgo at mac.com (Frank Goenninger) Date: Sat, 5 May 2007 12:02:15 +0200 Subject: [cells-devel] Lots of instances, callback when particular instance changes In-Reply-To: <463B9A76.6010203@tel.fer.hr> References: <463A6B99.2080004@tel.fer.hr> <463B9A76.6010203@tel.fer.hr> Message-ID: Hi - Am 04.05.2007 um 22:41 schrieb Josip Gracin: > Here's what I'm currently doing (just an outline): > > (defmodel switch (component) > ((switch-position :cell t > :initarg :switch-position > :initform (c-in :off) > :accessor switch-position) > (change-handler :cell nil > :initform nil > :initarg :change-handler > :reader switch-change-handler))) > > > (def-c-output switch-position (self new-value old-value) > (when (switch-change-handler self) > (funcall (switch-change-handler self) self new-value old-value))) > > And then create instances: > > ... > (mksys 'switch :main-battery-switch) > (mksys 'switch :apu-start-switch > :change-handler 'apu-start-switch-change-handler) > ... > > The reason I need the change handler is that the change handler has > to modify the value of the self switch. For example, when apu- > start-switch changes its value to :START, change handler schedules > an action which will set the switch back to :ON after some time. I > fail to see how I can do this using regular slot-dependency > mechanisms provided by Cells. > > Am I making any sense? You do - yet there is another approach I adopted from Kenny: -X-X-X- (in-package :cells) (defmodel component () ((.md-name :accessor id :initarg :id))) (defmodel switch (component) ((value :accessor value :initform (c-in nil) :initarg :value))) (defmodel apu-start-switch (switch) ((opcode :initform (c? (if (eql (^value) :START) :DO-START :DO-NOTHING)))) (:default-initargs :value (c-in :off))) (defobserver opcode ((self apu-start-switch)) (when (eql new-value :DO-START) (format t "~&*** APU STARTING ...") (sleep 3) ;; Do something meaningful here ... (format t "~&*** ... APU STARTED - NOW SETTING APU SWITCH TO :ON") (with-integrity (:change self) ;; This is how you set the value (setf (^value) :ON)))) ;; while maintaining Cells rules for integrity (defun run-test () (let ((apu-start-switch (make-instance 'apu-start-switch :id :apu-start-switch))) (format t "~&*** APU START SWITCH \"~A\" created." (id apu-start-switch)) (sleep 1) (format t "~&*** Now starting APU !") (setf (value apu-start-switch) :START) (format t "~&*** APU START SWITCH is now in position \"~A\"." (value apu-start-switch)))) -X-X-X- (you may need to reformat the code to be able to read - use your favorate editor) Instead of making different instances of just the class SWITCH I often subclass - as shown above for the APU-START-SWITCH. I then model behaviour by having "remote control facility" - the OPCODE. By assigning values to the opcode the corresponding observer (see DEFOBSERVER above) is a way of modeling state-transitions conviniently IMO. Feedback from others ??? HTH, Frank From gracin at tel.fer.hr Sat May 5 22:04:18 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Sun, 06 May 2007 00:04:18 +0200 Subject: [cells-devel] Lots of instances, callback when particular instance changes In-Reply-To: References: <463A6B99.2080004@tel.fer.hr> <463B9A76.6010203@tel.fer.hr> Message-ID: <463CFF62.1030003@tel.fer.hr> Frank Goenninger wrote: > You do - yet there is another approach I adopted from Kenny: Thanks! Now I have to spend some time examining stuff you've written that I've never heard of before (such as with-integrity...). :-) Also, there doesn't seem to be anything named "defobserver" in the latest asdf-installable cells. Has this become def-c-output perhaps? Anyway, I was kind of trying to avoid sub-classing because I have lots of switches. I'll have to re-think that decision. From frgo at mac.com Sat May 5 22:23:41 2007 From: frgo at mac.com (Frank Goenninger) Date: Sun, 6 May 2007 00:23:41 +0200 Subject: [cells-devel] Lots of instances, callback when particular instance changes In-Reply-To: <463CFF62.1030003@tel.fer.hr> References: <463A6B99.2080004@tel.fer.hr> <463B9A76.6010203@tel.fer.hr> <463CFF62.1030003@tel.fer.hr> Message-ID: <98AADEBC-E49C-40B5-8114-FBEE2241C20A@mac.com> Am 06.05.2007 um 00:04 schrieb Josip Gracin: > Frank Goenninger wrote: >> You do - yet there is another approach I adopted from Kenny: > > Thanks! Now I have to spend some time examining stuff you've > written that I've never heard of before (such as with- > integrity...). :-) > Also, there doesn't seem to be anything named "defobserver" in the > latest asdf-installable cells. Has this become def-c-output perhaps? You definitely should get the CVS sources from common-lisp.net! See there for how to access the CVS repository... - def-c-output (sort of) became defobserver ... Also, there's a big chance you won't find with-integrity in the asdf-installable sources... > > Anyway, I was kind of trying to avoid sub-classing because I have > lots of switches. I'll have to re-think that decision. Yeah, it took some time for me too to take that decision. And it still is very situation/use case-dependent, so there's no "always go that route" rule available, IMO. Still, I don't mind heaving a few hundred classes defined in my Lisp programs (using AllegroCL 8 here). Kenny is surprisingly quiet ... Maybe he's busy taking orders for his new AlgebraOne software ;-) Cheers Frank From gracin at tel.fer.hr Sun May 6 12:11:56 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Sun, 06 May 2007 14:11:56 +0200 Subject: [cells-devel] Lots of instances, callback when particular instance changes In-Reply-To: <98AADEBC-E49C-40B5-8114-FBEE2241C20A@mac.com> References: <463A6B99.2080004@tel.fer.hr> <463B9A76.6010203@tel.fer.hr> <463CFF62.1030003@tel.fer.hr> <98AADEBC-E49C-40B5-8114-FBEE2241C20A@mac.com> Message-ID: <463DC60C.6060300@tel.fer.hr> Frank Goenninger wrote: > You definitely should get the CVS sources from common-lisp.net! See > there for how to access the CVS repository... - I thought asdf-install was pretty much in sync with the CVS. Oh well... OTOH, "check it out from CVS" is easier said than done, since none of the links to the CVS tree that I was able to find were valid. In the end I had to guess the correct location. Here it is, in case anyone is interested: cvs -z3 -d:pserver:anonymous at common-lisp.net:/project/cells/cvsroot co cells From Hit at common-lisp.net Tue May 8 09:14:08 2007 From: Hit at common-lisp.net (Hit at common-lisp.net) Date: 08 May 2007 02:14:08 -0700 Subject: [cells-devel] How to get free quality visitors to your website Message-ID: <20070508021406.0D0D08598AE8D915@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hit booster.htm Type: application/octet-stream Size: 418 bytes Desc: not available URL: From gracin at tel.fer.hr Wed May 9 20:05:27 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Wed, 09 May 2007 22:05:27 +0200 Subject: [cells-devel] How to delay evaluation of defobserver? Message-ID: <46422987.9060609@tel.fer.hr> Hello! I've successfully ported my application from cells2.0 to Cells3. Cells3 looks very nice indeed. When needed, I've used c_? to delay evaluation and it worked great. However, I also have some observers defined with defobserver and I'd like them to be lazily evaluated because they depend on some not-yet-created instances. Is there a way to do this? From gracin at tel.fer.hr Wed May 9 21:03:58 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Wed, 09 May 2007 23:03:58 +0200 Subject: [cells-devel] How to delay evaluation of defobserver? In-Reply-To: <46422987.9060609@tel.fer.hr> References: <46422987.9060609@tel.fer.hr> Message-ID: <4642373E.2000107@tel.fer.hr> Josip Gracin wrote: > and it worked great. However, I also have some observers defined with > defobserver and I'd like them to be lazily evaluated because they depend > on some not-yet-created instances. Is there a way to do this? Of course. Just define the observers after you've created all the instances. Oh well... This does make the code layout uglier because I have to move all the defobservers to some file which will be loaded after all other files. Is there a better way to organize this? From kentilton at gmail.com Wed May 9 22:01:24 2007 From: kentilton at gmail.com (Ken Tilton) Date: Wed, 9 May 2007 18:01:24 -0400 Subject: [cells-devel] test (ignore) Message-ID: test -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Wed May 9 22:03:51 2007 From: kentilton at gmail.com (Ken Tilton) Date: Wed, 9 May 2007 18:03:51 -0400 Subject: Fwd: [cells-devel] How to delay evaluation of defobserver? In-Reply-To: References: <46422987.9060609@tel.fer.hr> Message-ID: [Sorry if folks have seen this before, but I haven't, so not sure what is going on. - kt] ---------- Forwarded message ---------- From: Ken Tilton Date: May 9, 2007 5:12 PM Subject: Re: [cells-devel] How to delay evaluation of defobserver? To: Josip Gracin Not sure what is going on. I sent this to the list and you earlier from another mail account and apparently neither got thru. Trying again direct from google mail. Saw your second note. Nah, I would do anything with load order. But this is a design question, which means it cannot be answered in the abstract (which is what I cover below). kt Josip Gracin wrote: Hello! I've successfully ported my application from cells2.0 to Cells3. Cells3 looks very nice indeed. When needed, I've used c_? to delay evaluation and it worked great. However, I also have some observers defined with defobserver and I'd like them to be lazily evaluated because they depend on some not-yet-created instances. Is there a way to do this? You might have to provide an example, distilled from your application if the whole thing would be too much. Are you saying obersvers are getting called even before the lazy cell got kicked off? Or do you mean, OK, the lazy cell gets kicked off when expected, but now I further want to defer the observer running? Or is this unrelated to lazy cells? ie, You have a normal cell but you want the observer deferred? But then, OK, how do you indicate when the laziness ends and the observer should fire? Presumably you want a rule X that terminates laziness and activates an observer. If so, you could just code up: (defobserver ..... (when X ;; in your case, (fm-includes self ) )) Depending on the design, you might also consider having a Cell that says "OK, now the model has reached this state", part of which is determined by these other instances coming into existence. Then you either hang your observer off that new state variable or check that state variable in the observer. kt -- Ken Tilton Theory Y Learning ken at theoryyalgebra.com 2112 Baileys Corner Rd http://www.theoryyalgebra.com Wall, NJ 07719 732-359-6038 | 646-269-1077 (m) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gracin at tel.fer.hr Thu May 10 09:30:40 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Thu, 10 May 2007 11:30:40 +0200 Subject: [cells-devel] How to delay evaluation of defobserver? In-Reply-To: References: <46422987.9060609@tel.fer.hr> Message-ID: <4642E640.70808@tel.fer.hr> Ken Tilton wrote: > Depending on the design, you might also consider having a Cell that says > "OK, now the model has reached this state", part of which is determined > by these other instances coming into existence. That is what I actually need. I'm constructing a model with lots of interdependent instances and I'd like to be able to say, "Ok, I've created all instances of the model, make it alive." Isn't this what to-be used to do? Here's an example. I have defined a macro called make-system which lets me create family trees in convenient way. It just creates instances and sets appropriate fm-parent for each instance. Its lambda list is (class-name system-name &rest args) For example, it converts (make-system b777-aircraft :aircraft) into (make-instance 'b777-aircraft :md-name :aircraft). The &rest 'args' can contain keyword :subsystems which recursively calls make-system on the rest of the args after that keyword (supplying :fm-parent in all subsystems). This all is a substitute for what I've used to accomplish with "(make-instance parent-class :kids (list ...)" in cells2.0. ;;============================================= (make-system b777-aircraft :aircraft :subsystems (lights :lights :subsystems (switch :pass-signs-switch) (switch :no-smoking-signs-switch) (b777-flaps-system :flaps-system :subsystems (b777-flaps-lever :flaps-lever) (flaps-indicator :flaps-indicator) .....) ;;============================================ So, I instantiate all components of an aircraft in this one place. Now, suppose I have an observer defined on some slot of class 'switch' (see above) and that the body of the observer depends on :flaps-indicator component. At the moment when switch :pass-signs-switch is instantiated, flaps-indicator still does not exist, so when the observer is called, it fails. As I said in my previous mail, it seems to be the case of "don't do it then". :-) The "fix" is to define the observer after the aircraft has been constructed, so that all its components are available. OTOH, if I were able to stop the Cells engine, create instances, and then start the engine, that's what I'd do instead. Thanks! From gracin at tel.fer.hr Thu May 10 20:35:31 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Thu, 10 May 2007 22:35:31 +0200 Subject: [cells-devel] Using with-integrity Message-ID: <46438213.8040901@tel.fer.hr> Where can I learn about various opcodes for with-integrity? I'm using (with-integrity (:change) ...) with merely a hint on what it actually does. Thanks! From kentilton at gmail.com Fri May 11 13:00:27 2007 From: kentilton at gmail.com (Ken Tilton) Date: Fri, 11 May 2007 09:00:27 -0400 Subject: [cells-devel] Using with-integrity In-Reply-To: <46438213.8040901@tel.fer.hr> References: <46438213.8040901@tel.fer.hr> Message-ID: [sent yesterday, but my email seems to work only occasionally] Josip Gracin wrote: Where can I learn about various opcodes for with-integrity? The only one not for internal-use-only (besides :change) is :client. More below. The source code for with-integrity is pretty concise, and the key function there is "finish-business", which */really/* shows you how Cells3 works in re data integrity. Indispensible reading is cells-manifesto.txt in the Cells directory. I'm using (with-integrity (:change) ...) with merely a hint on what it actually does. cells-manifesto.txt talks about state change processing not overlapping. generation A must be fully finished before B begins, and things B must not see any data from generation A. I allow observers to trigger state change though it feels like a GOTO, but you gots to wrap it in with-integrity :change which defers the actual SETF until The Right Time. See the Celtk code for how and why the :client option exists. In the declarative paradigm we specify what should happen and the engine takes care of that as it sees fit. But Tk is a brittle beast that is not so good at that, and we need to feed it information in The Right Order. The :client mechanism allows one to queue things up and then process them in an order specified by an optional client-queue handler. kt -- Ken Tilton Theory Y Learning ken at theoryyalgebra.com 2112 Baileys Corner Rd http://www.theoryyalgebra.com Wall, NJ 07719 732-359-6038 | 646-269-1077 (m) -------------- next part -------------- An HTML attachment was scrubbed... URL: From frgo at mac.com Sat May 12 23:21:33 2007 From: frgo at mac.com (Frank Goenninger) Date: Sun, 13 May 2007 01:21:33 +0200 Subject: [cells-devel] Cells + CL-WHO: Strange behavior - your help needed ... Message-ID: Hi all: I do have a strange behaviour of a small code snippet ...: (the used macro with-html-output is from CL-WHO - see http:// www.weitz.de/cl-who - it generates HTML markup) (defmacro as-html (&body body) `(with-html-output (*standard-output*) , at body)) (defmodel simple (family) ((slot-1 :accessor slot-1 :initform (c-in nil) :initarg :slot-1)) (:default-initargs :value (c? (as-html (:h1 (^slot-1)))))) Now when inspecting the result of (make-instance 'simple :slot-1 "Hi") I get no value back for slot-1 but simply see

... - what the f*ck am I doing wrong ??? Inspecting the instance reveals: SIMPLE15 is a standard-object. [type: SIMPLE] -------------------- Class: # .MD-STATE: :AWAKE .AWAKEN-ON-INIT-P: NIL .CELLS: ((.KIDS . =0/.KIDS/SIMPLE15])) .CELLS-FLUSHED: ((.VALUE . =1/.VALUE/SIMPLE15])) ADOPT-CT: 0 .MD-NAME: SIMPLE15 .FM-PARENT: NIL .VALUE: "" ZDBG: NIL .KID-SLOTS: NIL .KIDS: NIL SLOT-1: "Hallo" Hunh? Slot ".value" is "" ?? Any help really appreciated ... Oh - ah - this is going to be part of marrying Cells with Edi Weitz's Hunchentoot Web Server (see http://www.weitz.de/hunchentoot ) Thx!!! Cheers - Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From frgo at mac.com Sat May 12 23:54:23 2007 From: frgo at mac.com (Frank Goenninger) Date: Sun, 13 May 2007 01:54:23 +0200 Subject: [cells-devel] Cells + CL-WHO: Strange behavior - your help needed ... In-Reply-To: References: Message-ID: Am 13.05.2007 um 01:21 schrieb Frank Goenninger: > > > SIMPLE15 is a standard-object. > [type: SIMPLE] > -------------------- > Class: # > .MD-STATE: :AWAKE > .AWAKEN-ON-INIT-P: NIL > .CELLS: ((.KIDS . =0/.KIDS/SIMPLE15])) > .CELLS-FLUSHED: ((.VALUE . =1/.VALUE/SIMPLE15])) > ADOPT-CT: 0 > .MD-NAME: SIMPLE15 > .FM-PARENT: NIL > .VALUE: "" > ZDBG: NIL > .KID-SLOTS: NIL > .KIDS: NIL > SLOT-1: "Hallo" <---- Actually, this is SLOT-1: "Hi! ;-) Copy/Paste error ... Oh well ... I have been digging a little deeper - and only can think of some strange thing happening with "<" and ">" being interpreted by Cells ??? Being desperate ... Frank From kennytilton at optonline.net Sun May 13 01:51:16 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Sat, 12 May 2007 21:51:16 -0400 Subject: [cells-devel] Cells + CL-WHO: Strange behavior - your help needed ... In-Reply-To: References: Message-ID: <46466F14.9060705@optonline.net> Frank Goenninger wrote: > Hi all: > > I do have a strange behaviour of a small code snippet ...: > (the used macro with-html-output is from CL-WHO - see > http://www.weitz.de/cl-who - it generates HTML markup) > > (defmacro as-html (&body body) > `(with-html-output (*standard-output*) > , at body)) > > (defmodel simple (family) > ((slot-1 :accessor slot-1 :initform (c-in nil) :initarg :slot-1)) > (:default-initargs > :value (c? (as-html > (:h1 (^slot-1)))))) > > Now when inspecting the result of > > (make-instance 'simple :slot-1 "Hi") > > I get no value back for slot-1 but simply see > >

> > ... - what the f*ck am I doing wrong ??? > > Inspecting the instance reveals: > > SIMPLE15 is a standard-object. > [type: SIMPLE] > -------------------- > Class: # > .MD-STATE: :AWAKE > .AWAKEN-ON-INIT-P: NIL > .CELLS: ((.KIDS . =0/.KIDS/SIMPLE15])) > .CELLS-FLUSHED: ((.VALUE . =1/.VALUE/SIMPLE15])) > ADOPT-CT: 0 > .MD-NAME: SIMPLE15 > .FM-PARENT: NIL > .VALUE: "" > ZDBG: NIL > .KID-SLOTS: NIL > .KIDS: NIL > SLOT-1: "Hallo" > > Hunh? Slot ".value" is "" ?? > > Any help really appreciated ... The first problem was writing the html to standard output instead of a string, the second problem is that cl-who does not quite work the way you think. What I did was replace as-html with the appropriate with-html-output form and then macroexpand. Give it a try. Meanwhile, this works: (defpackage #:whofix (:use #:common-lisp #:cells #:cl-who)) (in-package :whofix) (defmacro as-html (var &body body) `(with-output-to-string (,var) (with-html-output (,var) , at body) )) (defmodel simple (family) ((slot-1 :accessor slot-1 :initform (c-in nil) :initarg :slot-1)) (:default-initargs :value (c? (trc "enetering rule" (^slot-1)) (as-html xxx (:h1 (write-string (^slot-1) xxx)))))) (describe (make-instance 'simple :slot-1 "booters")) ;;;0> 4331 enetering rule "booters" ;;;SIMPLE8054 is an instance of #: ;;; The following slots have :INSTANCE allocation: ;;; .MD-STATE :AWAKE ;;; .AWAKEN-ON-INIT-P NIL ;;; .CELLS ((.KIDS . =0/.KIDS/SIMPLE8054])) ;;; .CELLS-FLUSHED ((.VALUE . =10966/.VALUE/SIMPLE8054])) ;;; ADOPT-CT 0 ;;; .MD-NAME SIMPLE8054 ;;; .FM-PARENT NIL ;;; .VALUE " ;;; ;;;

booters

" ;;; ZDBG NIL ;;; .KID-SLOTS NIL ;;; .KIDS NIL ;;; SLOT-1 "booters" From frgo at mac.com Sun May 13 12:02:52 2007 From: frgo at mac.com (Frank Goenninger) Date: Sun, 13 May 2007 14:02:52 +0200 Subject: [cells-devel] Cells + CL-WHO: Strange behavior - your help needed ... In-Reply-To: <46466F14.9060705@optonline.net> References: <46466F14.9060705@optonline.net> Message-ID: Hi Kenny - Am 13.05.2007 um 03:51 schrieb Ken Tilton: > The first problem was writing the html to standard output instead > of a string, the second problem is that cl-who does not quite work > the way you think. What I did was replace as-html with the > appropriate with-html-output form and then macroexpand. Hm - ok - now that you say it ... Obviously the right thing to do. I was looking for Cells misuse anywhere - wrong. It was the CL-WHO side which I did not get right. Oh well.... > Give it a try. Meanwhile, this works: > > (defpackage #:whofix > (:use #:common-lisp #:cells #:cl-who)) > > (in-package :whofix) > > (defmacro as-html (var &body body) > `(with-output-to-string (,var) > (with-html-output (,var) > , at body) > )) As this is working as-html has to be changed because in CL-WHO there's (defmacro with-html-output-to-string ((var &optional string-form &key (element-type ''character) prologue indent) &body body) "Transform the enclosed BODY consisting of HTML as s-expressions into Lisp code which creates the corresponding HTML as a string." `(with-output-to-string (,var ,string-form #-(or :ecl :cmu :sbcl) :element-type #-(or :ecl :cmu :sbcl) ,element-type) (with-html-output (,var nil :prologue ,prologue :indent ,indent) , at body))) So, we can write: (defmacro as-html (&body body) `(with-html-output-to-string (*standard-output* nil :prologue nil) , at body)) Hm - coming back to your remark > the second problem is that cl-who does not quite work the way you > think Well, I think I have understood that I have to output any data via write-string because this is what is to be inserted between tags... Anything else? Thx anyway! Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennytilton at optonline.net Sun May 13 13:03:57 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Sun, 13 May 2007 09:03:57 -0400 Subject: [cells-devel] Cells + CL-WHO: Strange behavior - your help needed ... In-Reply-To: References: <46466F14.9060705@optonline.net> Message-ID: <46470CBD.6030406@optonline.net> Frank Goenninger wrote: > Hi Kenny - > > Am 13.05.2007 um 03:51 schrieb Ken Tilton: > >> The first problem was writing the html to standard output instead of a >> string, the second problem is that cl-who does not quite work the way >> you think. What I did was replace as-html with the appropriate >> with-html-output form and then macroexpand. > > > Hm - ok - now that you say it ... Obviously the right thing to do. I was > looking for Cells misuse anywhere - wrong. It was the CL-WHO side which > I did not get right. Oh well.... > >> Give it a try. Meanwhile, this works: >> >> (defpackage #:whofix >> (:use #:common-lisp #:cells #:cl-who)) >> >> (in-package :whofix) >> >> (defmacro as-html (var &body body) >> `(with-output-to-string (,var) >> (with-html-output (,var) >> , at body) >> )) > > > As this is working as-html has to be changed because in CL-WHO there's > > (defmacro with-html-output-to-string ((var &optional string-form > &key (element-type ''character) > prologue > indent) > &body body) > "Transform the enclosed BODY consisting of HTML as s-expressions > into Lisp code which creates the corresponding HTML as a string." > `(with-output-to-string (,var ,string-form > #-(or :ecl :cmu :sbcl) :element-type > #-(or :ecl :cmu :sbcl) ,element-type) > (with-html-output (,var nil :prologue ,prologue :indent ,indent) > , at body))) > > So, we can write: > > (defmacro as-html (&body body) > `(with-html-output-to-string (*standard-output* nil :prologue nil) > , at body)) > > Hm - coming back to your remark > > >> the second problem is that cl-who does not quite work the way you think > > > Well, I think I have understood that I have to output any data via > write-string because this is what is to be inserted between tags... > Anything else? I actually have never used cl-who before, so I cannot help you on that last bit. I saw disappearing characters and guessed "stream issue", then macroexpanded the w-h-o call to see why I was still just getting hl-\hl. kt From Quality at common-lisp.net Mon May 21 15:23:29 2007 From: Quality at common-lisp.net (Quality at common-lisp.net) Date: 21 May 2007 08:23:29 -0700 Subject: [cells-devel] Get 1000's of Highly Targeted visitors Message-ID: <20070521082329.15CE75E4C2DB6BBB@from.header.has.no.domain> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hit booster.htm Type: application/octet-stream Size: 398 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unsubscribe email.txt Type: application/octet-stream Size: 25 bytes Desc: not available URL: From Blog at common-lisp.net Wed May 23 08:13:29 2007 From: Blog at common-lisp.net (Blog at common-lisp.net) Date: 23 May 2007 01:13:29 -0700 Subject: [cells-devel] "How would you like to have your ad on 2 Million Websites ?" Message-ID: <20070523011329.E53205905678B956@from.header.has.no.domain> Discover the power of the Blog Blaster! Brandnew software revolutionizes the power of online advertising -never seen before!- BRAND NEW FOR MARCH 2007! How would you like 2 Million Sites linking to your ad ? Weblog or blog population is exploding around the world, resembling the growth of e-mail users in the 1990s. Post your ads where people read them! - What if you could place your ad on all these sites ? Right, that would mean you would have millions of sites linking to your ad - and my idea actually works. I have developed a software that automatically places your ad on millions of blogs. You will receive thousands of targeted hits to your website as Blog Blaster places your ad on blogs that match your ad's category. This method has never been released to the public before. Very few, if anyone has implemented this For full details please read the attached .html file Unsubscibe: Please read the attached .txt file -------------- next part -------------- A non-text attachment was scrubbed... Name: blog blaster mg.htm Type: application/octet-stream Size: 446 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unsubscribe email.txt Type: application/octet-stream Size: 25 bytes Desc: not available URL: From Blog at common-lisp.net Wed May 23 12:16:38 2007 From: Blog at common-lisp.net (Blog at common-lisp.net) Date: 23 May 2007 05:16:38 -0700 Subject: [cells-devel] "How would you like to have your ad on 2 Million Websites ?" Message-ID: <20070523051636.241B1C20555E2061@from.header.has.no.domain> Discover the power of the Blog Blaster! Brandnew software revolutionizes the power of online advertising -never seen before!- BRAND NEW FOR MARCH 2007! How would you like 2 Million Sites linking to your ad ? Weblog or blog population is exploding around the world, resembling the growth of e-mail users in the 1990s. Post your ads where people read them! - What if you could place your ad on all these sites ? Right, that would mean you would have millions of sites linking to your ad - and my idea actually works. I have developed a software that automatically places your ad on millions of blogs. You will receive thousands of targeted hits to your website as Blog Blaster places your ad on blogs that match your ad's category. This method has never been released to the public before. Very few, if anyone has implemented this For full details please read the attached .html file Unsubscibe: Please read the attached .txt file -------------- next part -------------- A non-text attachment was scrubbed... Name: blog blaster mg.htm Type: application/octet-stream Size: 446 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: unsubscribe email.txt Type: application/octet-stream Size: 25 bytes Desc: not available URL: From achambers.home at googlemail.com Tue May 29 22:22:03 2007 From: achambers.home at googlemail.com (Andy Chambers) Date: Tue, 29 May 2007 23:22:03 +0100 Subject: [cells-devel] Installation handholding required (only a little :-)) Message-ID: Hi, Could someone give us a few pointers on how to get celtk running on linux/sbcl please. I've downloaded the latest source from cvs for cells, and celtk. The demo for ltk runs fine but I suspect that might be irrelevant. When I (require :celtk) after linking the relevant asd files to my ~/.sbcl/systems, I get some errors, the first of which is that "utils-kt:eval-now! is not defined". If I just keep on accepting the errors/warnings it does eventually compile. Howver, when I try (ctk::tk-test), I get "Unable to load foreign library: libtcl.so". This file doesn't seem to belong to any debian package. Cheers, Andy p.s This program has the best name ever!! (I support Glasgow "Celtk" football team) From kennytilton at optonline.net Wed May 30 02:51:31 2007 From: kennytilton at optonline.net (Ken Tilton) Date: Tue, 29 May 2007 22:51:31 -0400 Subject: [cells-devel] Installation handholding required (only a little :-)) In-Reply-To: References: Message-ID: <465CE6B3.3080400@optonline.net> Andy Chambers wrote: > Hi, > > Could someone give us a few pointers on how to get celtk running on > linux/sbcl please. I've downloaded the latest source from cvs for > cells, and celtk. The demo for ltk runs fine but I suspect that might > be irrelevant. No, that is important, it means you have Tcl/Tk installed properly. > > When I (require :celtk) after linking the relevant asd files to my > ~/.sbcl/systems, I get some errors, the first of which is that > "utils-kt:eval-now! is not defined". That might be because ASDF sucks so bad. Try ":force t" so it always recompiles and loads as it goes. > > If I just keep on accepting the errors/warnings it does eventually > compile. Howver, when I try > (ctk::tk-test), I get "Unable to load foreign library: libtcl.so". > This file doesn't seem to belong to any debian package. Ah, hang on, LTk talks to wish.exe over a pipe, I talk to Tcl/Tk via the FFI. So Ltk needs wish.exe, Celtk (glad you liked the name!) needs the .SOs. You might be able to get them from ActiveState directly, but they should not be /that/ hard to find. Yes, folks have run Celtk on Linux and Mac OS/X. Wish I could help more, but I do not do Linux. best, kt From jan.marecek at gmail.com Wed May 30 02:59:54 2007 From: jan.marecek at gmail.com (jan) Date: Wed, 30 May 2007 12:59:54 +1000 Subject: [cells-devel] Installation handholding required (only a little :-)) In-Reply-To: References: Message-ID: <200705301259.55120.jan.marecek@gmail.com> On Wednesday 30 May 2007 08:22, Andy Chambers wrote: > Howver, when I try > (ctk::tk-test), I get "Unable to load foreign library: libtcl.so". > This file doesn't seem to belong to any debian package. You can work around this by creating a symlink eg. first find which version of tcl is installed $ ls /usr/lib/libtcl* /usr/lib/libtcl8.4.so.0 then as root create a symlink $ ln -s /usr/lib/libtcl8.4.so.0 /usr/lib/libtcl.so The proper solution is for the shared library loader to find the file itself, I'm working on a fix this. -- jan