From asimon at math.bme.hu Sat Mar 5 12:03:14 2005 From: asimon at math.bme.hu (Andras Simon) Date: Sat, 5 Mar 2005 13:03:14 +0100 (CET) Subject: [cells-gtk-devel] small patch for widgets.lisp Message-ID: There's no need to exclude cmucl here: RCS file: /project/cells-gtk/cvsroot/root/cells-gtk/widgets.lisp,v retrieving revision 1.11 diff -u -r1.11 widgets.lisp --- cells-gtk/widgets.lisp 26 Feb 2005 22:31:41 -0000 1.11 +++ cells-gtk/widgets.lisp 5 Mar 2005 12:00:52 -0000 @@ -232,7 +232,6 @@ , at body 1)))) -#-cmu (ff-defun-callable :cdecl :int timeout-handler-callback ((data (* :int))) ;;(print (list :timeout-handler-callback data)) Andras From ktilton at nyc.rr.com Sat Mar 5 15:24:17 2005 From: ktilton at nyc.rr.com (Kenny Tilton) Date: Sat, 05 Mar 2005 10:24:17 -0500 Subject: [cells-gtk-devel] Re: [cells-devel] Newbie questions In-Reply-To: References: Message-ID: <4229CF21.4070008@nyc.rr.com> Mike J. Bell wrote: >I suppose some of this might be in a FAQ or something, but I'm >somewhat lazy and I've got some questions burning. > >I also apologize for A) not knowing CL very well B) not knowing very >much about CLOS at all (except what it stands for). Please pardon any >strange or misused terminology. > >That said, I've got some questions about how Cells works. > >1) Synchronicity, or the currency conversion problem: Let's say I >define a slot in an object that represents the amount of US Dollars I >have in a bank account. Let's further say that in my app I also want >to represent the amount of Japanese Yen in my account. If someone >"sets" the amount of dollars, I want the yen slot to be updated. If >someone sets the yen, I want the dollars to be updated. Is there a >mechanism to create such co-dependent cells? > I did a foreign exchange system once, so I would say always update the dollars. But to answer your question, the way I handle things like scroll bars (the thumb can be used to move the text, but scrolling thru the text with the arrow keys moves the thumb) is to have DEF-C-OUTPUT methods on both the text offset and (really) the scrollbar ratio, with each one setf-ing the other, meaning both get initialized to (c-input 0). I used to have a more elaborate scheme in Cells which handled this sort of thing by swapping in a different pair of rules when the user moused-down on the thumb, but I decided dual outputs, while losing the declarative thing, were better because it let me eliminate the whole dynamic rule-swapping section of Cells. > (Obviously this is >addressing the update cycle problem, and at the shortest path level: >A depends on B depends on A (length 1), which forms a very useful >group of calculations). > Cells have always grown in response to application requirements, so if someone comes up with a good example I will gladly look at implementing cycles in Cells. The question is, how can a = f(b) and b=f(a) ever be computed? In your example, there is no real cycle, because you are saying: "dollars is a function of yen /when changes/, and yen is a function of dollar /when dollar changes/." Only one can be changing at a time, so there is no cycle as the problem is conceived. But how is an instance initialized? I can supply conversion rules for dollar-balance and yen-balance, but how do I get the intial balance in there? I would need to specify a starting value, but for which one? Both? What if I specify 1 for both? That conversion would be wrong, the dollar is (for now) worth more than 1 yen. Conceivably the answer is to let the programmer worry about it. I could specify a value (and the conversion rule) for dollar-balance and specify "unbound" and a rule for all other currencies. Then if the others get accessed, the system just calculates as usual. If all values are unbound a runtime error results. If the programmer specifies inconsistent initial values they get a wrong result (which we might be able to detect at some point of runtime) until some SETF perturbs the model and the formulas kick in to make things consistent. Thoughts on this? > >2) Equals: It looks like, from reading 01-Cell-basics.lisp, that >setting a slot to an "equivalent" object does not cause all its >dependencies to fire again (in order to save substantial useless >recalculations). What does "equivalent" mean? Can I install my own >equivalency operator, per slot (or per class would be fine) so that >Cells knows when computations should be rerun? > Yes. There is an :unchanged-if option (default EQL (supplied by Cells internals)) on slot definitions in DEFMODEL: Example from Cello: (defmodel image (ogl-node model) ((clipped :cell nil :initarg :clipped :initform nil :reader clipped) (inset :initarg :inset :unchanged-if 'v2= :initform (mkv2 0 0) :reader inset) ....etc.... [Actually, I just noticed that I also had ":cell nil" on that! "inset" was not a Cell for a lonnnggg time, and I think when I finally wanted to make it a Cell I was smart enough to specify unchanged-if, but dumb enough to leave behind :cell nil. Looks like I never tested... perhaps before I got done I decided against playing with inset? Anyway, that is neither there nor there.] (defstruct v2 (h 0 ) (v 0 ) ) (defun v2= (a b) (and a b (= (v2-h a)(v2-h b)) (= (v2-v a)(v2-v b)))) > >3) Lack of values, or triggers: It's easy to come up with typed slots >that participate in calculations. However, what about untyped events? > For instance, a press of a button conveys no useful state >information. Is it possible in Cells to make slots dependent upon the >"change" of a stateless slot? (This sort of ties back into the equals >business...I understand you could implement this sort of functionality >by setting a slot to, for example, a gensym uninterned symbol, so that >there is no useful value and it's sure to cause everything to >recalculate by any useful definition of equals, but this solution >is...well, kind of ugly. It would be nice to be able to define the >recalculation or "firing" semantics of a slot, which is a superset of >the "equals" issue above). > I am afraid I do not follow you. My GUIs all manage buttons and other standard GUI components via Cells. A button has a "click event" slot (because clicking is surprisingly complicated) which Cello mouse-handling SETFs (so it is initialized to (c-input nil). Anyway, I am not answering your question... could you explain again what you mean by a stateless slot? By the way, in case this helps, as a steady-state, declarative approach, Cells do make handling events tricky. I came up with the :ephemeral option to the :cell option of a slot definition: (defmodel window .... (mouse-up-evt :cell :ephemeral :initarg :mouse-up-evt :initform (c-in nil) :accessor mouse-up-evt) ..... The way it works is this: when I SETF such a slot, the engine takes care of all propagation and then silently (not via any accessor) resets the slot value to nil. Not sure, but I think the internals yell at you if you try to initialize to anything other than nil, such as (c-in 42). Close? > >4) Transactions: Let's say you have 50 or 60 slots that are connected >in a complicated graph of calculation. A change to one slot (let's >call this "initiation") causes all of these guys to start running >until finally the system reaches a steady state and no more changes >occur. We could conceptualize this initiation, subsequent >calculations and then collapse into steady state as a single >"transaction." > >Now, imagine that at the second-to-last calculation of this >propagation of values, the system enters a state of inconsistency. In >other words, the initiation of that one state change way back in the >beginning is actually invalid. However, we don't know that (given >that this is a nice event-driven framework) until step 52, and we've >got 40 slots that are all now different than they were, and *wrong*. >Ideally, it would be nice to have mechanism that A) notifies the >programmer, similar to a "catch" construct, so that s/he can note it >in an appropriate fashion, and B) restores all the slots in the system >to the last known good steady state; i.e., what they were before the >initiation occured. > >Does Cells have a transaction model similar to this? If so, can >someone explain it? Are there separate phases of execution in the >transaction? Are there separate "guards" that are responsible for >determining the validity of system state? Is there a way to specify >that slots get updated only once the system state becomes steady; i.e. >they don't participate in the middle of the transaction? (These >beasts have quite a few constraining properties, I realize, but they >could (are) be very useful to reduce the amount of "spinning" the >recalculation has to do). > No, there is no such rollback mechanism in Cells, but it is not a bad idea. If you check out the function finish-business, you might be able to make out the flow: - first, recalculate all "users" (direct dependents) of the original changed cell, recursively propagating to users of users as necessary. - second, invoke any output methods defined on the changed cells - third, invoke SETF's of cells deferred during outputs (that is indeed legal) note that the processing of each SETF is handled by executing those same steps. Anyway, rollback would take a little work since there is no dynamic scope encompassing all the state changes -- then we could just restore the slot value in unwind-protect -- but it would be feasible. As for other questions, the latest revision of Cells (I call it Cells II) guarantees the following (I really should write this up!): - during propagation, each cell calculates only once - no slot accessor returns a "stale" value, by which I mean a value which has yet to be re-calculated after some dependency direct or indirect has changed. kt -- Cells? Cello? Cells-Gtk?: http://www.common-lisp.net/project/cells/ Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film "Doctor, I wrestled with reality for forty years, and I am happy to state that I finally won out over it." -- Elwood P. Dowd From peter.denno at nist.gov Sat Mar 5 15:26:54 2005 From: peter.denno at nist.gov (Peter Denno) Date: Sat, 5 Mar 2005 10:26:54 -0500 Subject: [cells-gtk-devel] small patch for widgets.lisp In-Reply-To: References: Message-ID: <200503051026.55122.peter.denno@nist.gov> Hi Andras, Thanks. I'll be committing some stuff tomorrow. Do you have access to CVS yet? Either way if this one isn't in there when I commit I'll do it. On Saturday 05 March 2005 07:03, Andras Simon wrote: > There's no need to exclude cmucl here: > > RCS file: /project/cells-gtk/cvsroot/root/cells-gtk/widgets.lisp,v > retrieving revision 1.11 > diff -u -r1.11 widgets.lisp > --- cells-gtk/widgets.lisp 26 Feb 2005 22:31:41 -0000 1.11 > +++ cells-gtk/widgets.lisp 5 Mar 2005 12:00:52 -0000 > @@ -232,7 +232,6 @@ > , at body > 1)))) > > -#-cmu > (ff-defun-callable :cdecl :int timeout-handler-callback > ((data (* :int))) > ;;(print (list :timeout-handler-callback data)) > > > Andras > _______________________________________________ > cells-gtk-devel site list > cells-gtk-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-gtk-devel -- Best Regards, - Peter From peter.denno at nist.gov Sat Mar 5 16:22:42 2005 From: peter.denno at nist.gov (Peter Denno) Date: Sat, 5 Mar 2005 11:22:42 -0500 Subject: [cells-gtk-devel] Re: [cells-devel] Newbie questions In-Reply-To: <4229CF21.4070008@nyc.rr.com> References: <4229CF21.4070008@nyc.rr.com> Message-ID: <200503051122.43249.peter.denno@nist.gov> On Saturday 05 March 2005 10:24, Kenny Tilton wrote: > Yes. There is an :unchanged-if option (default EQL (supplied by Cells > internals)) on slot definitions in DEFMODEL: > > Example from Cello: > (defmodel image (ogl-node model) > ? ?((clipped :cell nil :initarg :clipped :initform nil :reader clipped) > ? ? (inset :initarg :inset > ? ? ? :unchanged-if 'v2= I would have thought that :unchanged-if would take a function of one value. Are you saying here that it still uses EQL, but instead of checking against old-value #'(lambda (x) (eql old-value new-value)) it is doing #'(lambda (x) (eql new-value 'v2=)) ? -- Best Regards, - Peter From ktilton at nyc.rr.com Sat Mar 5 17:14:19 2005 From: ktilton at nyc.rr.com (Kenny Tilton) Date: Sat, 05 Mar 2005 12:14:19 -0500 Subject: [cells-gtk-devel] Re: [cells-devel] Newbie questions In-Reply-To: <200503051122.43249.peter.denno@nist.gov> References: <4229CF21.4070008@nyc.rr.com> <200503051122.43249.peter.denno@nist.gov> Message-ID: <4229E8EB.8060300@nyc.rr.com> Peter Denno wrote: >On Saturday 05 March 2005 10:24, Kenny Tilton wrote: > > >>Yes. There is an :unchanged-if option (default EQL (supplied by Cells >>internals)) on slot definitions in DEFMODEL: >> >>Example from Cello: >>(defmodel image (ogl-node model) >> ((clipped :cell nil :initarg :clipped :initform nil :reader clipped) >> (inset :initarg :inset >> :unchanged-if 'v2= >> >> > >I would have thought that :unchanged-if would take a function of one value. >Are you saying here that it still uses EQL, but instead of checking against >old-value #'(lambda (x) (eql old-value new-value)) it is doing #'(lambda (x) >(eql new-value 'v2=)) ? > > > A function of one value? No, the question is whether the prior value calculated by a rule is the same as the latest value calculated because some dependency changed. The prototype would be: (defun custom-change-test (latest-value prior-value).... Here is the relevant code, massively edited/simplified here to make the flow apparent: (defmethod md-slot-value-assume (c raw-value) (let ((prior-state (c-value-state c)) (prior-value (c-value c)) (absorbed-value (c-absorb-value c raw-value))) (unless (and (eql prior-state :valid) (c-no-news c absorbed-value prior-value)) (setf (c-changed c) t) (c-propagate c prior-value (not (eql :unbound prior-state))))) absorbed-value))) ;----------------- change detection --------------------------------- (defun c-no-news (c new-value old-value) (bif (test (c-unchanged-test (c-model c) (c-slot-name c))) (funcall test new-value old-value) (eql new-value old-value))) kt -- Cells? Cello? Cells-Gtk?: http://www.common-lisp.net/project/cells/ Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film "Doctor, I wrestled with reality for forty years, and I am happy to state that I finally won out over it." -- Elwood P. Dowd From peter.denno at nist.gov Sat Mar 5 17:37:56 2005 From: peter.denno at nist.gov (Peter Denno) Date: Sat, 5 Mar 2005 12:37:56 -0500 Subject: [cells-gtk-devel] Re: [cells-devel] Newbie questions In-Reply-To: <4229E8EB.8060300@nyc.rr.com> References: <200503051122.43249.peter.denno@nist.gov> <4229E8EB.8060300@nyc.rr.com> Message-ID: <200503051237.57003.peter.denno@nist.gov> I should have read your whole note before writing. I thought 'v2= was a symbol you were comparing to, not a function. Silly me. -- Best Regards, - Peter From ktilton at nyc.rr.com Sat Mar 5 17:45:35 2005 From: ktilton at nyc.rr.com (Kenny Tilton) Date: Sat, 05 Mar 2005 12:45:35 -0500 Subject: [cells-gtk-devel] Re: [cells-devel] More newbie questions In-Reply-To: References: Message-ID: <4229F03F.2050100@nyc.rr.com> Mike J. Bell wrote: >I wasn't thinking totally clearly at 3am, so around 4:30 I thought of >some things that I didn't ask. =) > >(You may notice that I'm coming from an event-driven paradigm... > No problem. I am usually developing GUI apps--all events all the time. >I'm >trying to map my understanding of how mine works onto Cells and "make >sure" Cells is a superset of what I'm using). > >5) Multi-method (?) calculations: I've seen simple examples in the >Cells docs that show a slot being dependent on another slot. It looks >like you install this computation in the "destination" slot, i.e. the >one that's dependent. What if you've got a situation where you have >five slots, A B C D and E, that are parts of say three different >objects, O1 O2 and O3. There's one computation that needs A B C D and >E, and ends up modifying slots F G H and I in objects O4 and O5. Can >it be done, making a single computation that depends on many slots in >different instances that then updates slots in many instances? Or do >you need to decompose this computation into (complicated!) pieces to >be installed in each of the destination slots (F G H and I)? > You say complicated, I say "divide and conquer". Have you ever developed a finite state machine, breaking some complex problem down into a kazillion states? It seems painfully slow at first, until you realize how effortlessly the approach deals with the overall computation, which had you so confused that you resorted to using a finite state machine. :) Cells is all about exposing the semantics of a slot in the one formula which determines the value of a slot. What you are describing is "classic" imperative programming, where this point in the code decides FGHI, another decides GH, another decides GHZ, etc etc. At which point no one can really tell us the semantics of H. Now if you promise me that there is one and only one computation which decides FGHI, what I do in cases like that is simply create a new slot called FGHI (I wager the real name will be quite meaningful to anyone reading your code) and then F, G, H, and I can have extremely simple rules: :f (c? (get-f (^fghi))) :g (c? (get-g (^fghi))) ..etc... > Can a >change in one or more of A B C D and E cause a computation that >updates C D F and G? (I.e. C and D are both inputs *and* outputs of >the calculation. Note that self-cycling must be avoided!). > Again, sounds like you are resisting "divide and conquer". I have been doing cells for about nine years now, and I have never had a problem decomposing big computations into so many slots mediated by so many cells. The cyclicity thing rarely materializes, but see my discussion of scrollbars in an earlier reply for how I handle that cyclic case. > >6) Multiple "owners" of responsibility, or aspect separation: (this >is related to #5 above) What if you have a normal calculation that >happens 99% of the time that changes slot A into slot B (B is >dependent on A). You write the formula into the slot code for B, and >you're happy. But then, because of some strange requirement or other >complicated design issue, you realize that B also depends, every once >in a while (say 1%), on C D and E. But you don't want to stick this >new computation and dependency code with the original code, because it >will not only clutter reading, but also the complicated process may >change in the future. > You say "clutter", I say "completely specified". What is wrong with: (c? (if (one-chance-in-a-million self) (big-hairy-mess (^c) (^d) (e))) (nice-and-easy (^a)))) And who cares if it changes in the future? Just maintain the formula, which will always fully document the semantics of a slot. One of the nice things about not using GOTOs is just /knowing/ without worrying that any given point in the code is always reached via visible control flow. > So you want to keep the concerns separate, i.e. >the two different "times" when B can change. Is there a way in Cells >to make two different pieces of code that show two different ways that >slot B is dependent on other slots? > Not sure what you mean. Are you aware that different instances of the same class can have different rules for the same slot. This might help with your question above. Perhaps the rare situation is known at make-instance time? In which case you can indeed supply a different rule which goes after CDE. > >7) "Lazy" updates: Probably a bad term for this, not to be confused >with strict and non-strict argument evaluation. Nonetheless, let's >say you have a slot A that depends on B C D and E. B and C are >absolutely critical to A's computation, and every single time they >change, you need to enforce that A is recomputed. My guess is that >Cells works like this already, automatically. However, let's say D >and E change their values inordinately fast, like maybe they're mouse >X and Y coordinates on the screen. Let's also say that the >computation for A is non-trivial, and you want to run it only when >absolutely necessary. Further, although A needs the current mouse X >and Y coordinates, it doesn't make sense to recompute A every time >they change. Is there a way to tell Cells that A should be recomputed >*every* time that B and C change, but also needs access to cells D and >E while not "firing" every time they change? > Yes. See "synapses". I believe Bill's blog on Cells covers that, as well as some of my awful doc. > >Sorry if this sounds stupidly simple, but remember, I'm projecting my >domain onto yours, so I'm pretty new at this. > >8) Phase-based calculation, or data "wave" propagation: If a slot A >depends on slots B C and D...when will A get recomputed? Every time >that B C or D change, right? What if two other computations change >both C and D as a result of a single slot change in E...does Cells >defer the running of A until *both* C and D have been recalculated >(i.e. enforced breadth-first dependency graph traversal), or will the >calculation of A happen twice, once when C changes and once when D >changes (i.e. random, depth-first, or other traversal)? > Some recent work I playfully christened "Cells II" addressed this concern. Now A will be calculated only once. Each wave gets an ID (just an incremented count) and, if A gets calculated too early, no problem. The engine sees that C and/or D are obsolete (we are calculating wave N, but C and/or D are stamped N-1) and recomputes them Just In Time before completeing the calculation of A. > >9) Introspection: How easy is it to determine the full dependency >graph of interrelated computation given a system coded using Cells? >I.e., other than of course looking at the code, can I use a >programmatic method to determine the topology of the dependencies in >order to, for instance, produce a visual graph of the system? Is this >introspection system static, or dynamic (i.e. allow callback hooks or >the like to update changes in the system as they happen)? > A visual graph would be easy to do and probably great fun to watch. I imagine little sparks shooting around, like an animation of the brain. I have long been tempted to do something like that. I guess the thing that holds me back is the problem of how to lay out the visual elements so the whole thing looks good. I always hate the way graphical class browsers end up looking. kt From asimon at math.bme.hu Sat Mar 5 18:17:19 2005 From: asimon at math.bme.hu (Andras Simon) Date: Sat, 5 Mar 2005 19:17:19 +0100 (CET) Subject: [cells-gtk-devel] small patch for widgets.lisp In-Reply-To: <200503051026.55122.peter.denno@nist.gov> References: <200503051026.55122.peter.denno@nist.gov> Message-ID: On Sat, 5 Mar 2005, Peter Denno wrote: > Hi Andras, > > Thanks. I'll be committing some stuff tomorrow. Do you have access to CVS yet? Last time I checked I didn't. But if you don't mind accepting occasional patches, I'm quite comfortable with this. > Either way if this one isn't in there when I commit I'll do it. Thanks! Andras From c1288 at jypoly.fi Sun Mar 13 23:38:49 2005 From: c1288 at jypoly.fi (Sampo Vuori) Date: Mon, 14 Mar 2005 01:38:49 +0200 Subject: [cells-gtk-devel] cells-gtk and sbcl Message-ID: <20050314013849.6b80b0f2@localhost> Hi, cells-gtk looks like a very promising gui toolkit and therefore I wouldn't like settle down to something worse :) Someone on comp.lang.lisp said that cells-gtk compiled easily on sbcl, however I'm a rank newbie and couldn't do it myself. It does not find libraries (even though compiles fine on cmucl). I tried to trick it into believing it had found the libgtk but I still ran into troubles. Anyone here know the sorcery to make it play nice with sbcl (or is it even supposed to)? I'm using cells-gtk-2005-02-26 and sbcl 0.8.19.3 Thanks in advance, Sampo From peter.denno at nist.gov Mon Mar 14 02:24:08 2005 From: peter.denno at nist.gov (Peter Denno) Date: Sun, 13 Mar 2005 21:24:08 -0500 Subject: [cells-gtk-devel] cells-gtk and sbcl In-Reply-To: <20050314013849.6b80b0f2@localhost> References: <20050314013849.6b80b0f2@localhost> Message-ID: <200503132124.08309.peter.denno@nist.gov> Hi, cells-gtk does not currently run sbcl. AFAIK no one has looked into it yet. I hope to look into making it run sbcl, but I will not have time until May. Maybe someone else will get to it before then. cells-gtk compiles easily on cmucl. On Sunday 13 March 2005 18:38, Sampo Vuori wrote: > Hi, > cells-gtk looks like a very promising gui toolkit and therefore I wouldn't > like settle down to something worse :) Someone on comp.lang.lisp said that > cells-gtk compiled easily on sbcl, however I'm a rank newbie and couldn't > do it myself. It does not find libraries (even though compiles fine on > cmucl). I tried to trick it into believing it had found the libgtk but I > still ran into troubles. > > Anyone here know the sorcery to make it play nice with sbcl (or is it even > supposed to)? > > I'm using cells-gtk-2005-02-26 and sbcl 0.8.19.3 > > Thanks in advance, > > Sampo > _______________________________________________ > cells-gtk-devel site list > cells-gtk-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-gtk-devel -- Best Regards, - Peter From peter.denno at nist.gov Mon Mar 14 14:53:35 2005 From: peter.denno at nist.gov (Peter Denno) Date: Mon, 14 Mar 2005 09:53:35 -0500 Subject: [cells-gtk-devel] cells-gtk and sbcl In-Reply-To: <20050314134853.GA14008@seid-online.de> References: <20050314013849.6b80b0f2@localhost> <200503132124.08309.peter.denno@nist.gov> <20050314134853.GA14008@seid-online.de> Message-ID: <200503140953.36178.peter.denno@nist.gov> On Monday 14 March 2005 08:48, rm at fabula.de wrote: > On Sun, Mar 13, 2005 at 09:24:08PM -0500, Peter Denno wrote: > > Hi, > > > > cells-gtk does not currently run sbcl. What I should have said was that I (the maintainer) have no knowledge of it running on SBCL. The one time I tried it, it didn't work, and I expected that there would be plenty of problems. > > Ahhrgh, conflicting information - from c.l.l: > | Fred Gilham writes: > | > | ... > | > | Cells-gtk builds very easily using sbcl, though, and is interesting in > | its own way. > > whom to belive? > In my follow-up i mentioned some problems (missing package :lisp for > example) > > and Peter Scott replied: > | I got the same problem, but I just changed :lisp to :common-lisp and > | went from there. I still had some issues (a warning about the lack of > | libcellsgtk.so and some places where it apparently tried to redefine > | constants, but nothing major) but I was able to get gtk-ffi.lisp > | compiled with SBCL 0.8.16 on x86. OK, so it compiles.... > | > > AFAIK no one has looked into it yet. > > I hope to look into making it run sbcl, but I will not have time until > > May. Maybe someone else will get to it before then. > > Well, i hade a quick glance at it (and spotted some problems) - i might > have a closer look at it soon (but i'm about to get sick, so i can't > promise any time- frame). Some problems found so far: > > - uses package :LISP (should most likely be :COMMON-LISP) > > - does attempt to redefine some constants (but redifines to the same value > so not too big a problem - still, it should be fixed). Send it along... > > - has _hardcoded_ pathes in the test for library locations! Really? Where is that? > > - the test '(directory "/path/glob*")' doesn't seem to work ... I don't know what this refers to. > > - complains about undefined alien functions (tons of'em). Which sounds to me like it isn't going to work. > Except the last problem i have already fixes .., > > HTH Ralf Mattes > > > cells-gtk compiles easily on cmucl. He didn't say it runs. But if you just enjoy compiling it ... ;^) If you do get it to run, please let me/us know. -- Best Regards, - Peter From rm at seid-online.de Mon Mar 14 15:13:33 2005 From: rm at seid-online.de (rm at seid-online.de) Date: Mon, 14 Mar 2005 16:13:33 +0100 Subject: [cells-gtk-devel] cells-gtk and sbcl Message-ID: <20050314151333.GA14459@seid-online.de> On Sun, Mar 13, 2005 at 09:24:08PM -0500, Peter Denno wrote: > Hi, > > cells-gtk does not currently run sbcl. Ahhrgh, conflicting information - from c.l.l: | Fred Gilham writes: | | ... | | Cells-gtk builds very easily using sbcl, though, and is interesting in | its own way. whom to belive? In my follow-up i mentioned some problems (missing package :lisp for example) and Peter Scott replied: | I got the same problem, but I just changed :lisp to :common-lisp and | went from there. I still had some issues (a warning about the lack of | libcellsgtk.so and some places where it apparently tried to redefine | constants, but nothing major) but I was able to get gtk-ffi.lisp | compiled with SBCL 0.8.16 on x86. > AFAIK no one has looked into it yet. > I hope to look into making it run sbcl, but I will not have time until May. > Maybe someone else will get to it before then. Well, i hade a quick glance at it (and spotted some problems) - i might have a closer look at it soon (but i'm about to get sick, so i can't promise any time- frame). Some problems found so far: - uses package :LISP (should most likely be :COMMON-LISP) - does attempt to redefine some constants (but redifines to the same value so not too big a problem - still, it should be fixed). - has _hardcoded_ pathes in the test for library locations! - the test '(directory "/path/glob*")' doesn't seem to work ... - complains about undefined alien functions (tons of'em). Except the last problem i have already fixes .., HTH Ralf Mattes > cells-gtk compiles easily on cmucl. > > On Sunday 13 March 2005 18:38, Sampo Vuori wrote: > > Hi, > > cells-gtk looks like a very promising gui toolkit and therefore I wouldn't > > like settle down to something worse :) Someone on comp.lang.lisp said that > > cells-gtk compiled easily on sbcl, however I'm a rank newbie and couldn't > > do it myself. It does not find libraries (even though compiles fine on > > cmucl). I tried to trick it into believing it had found the libgtk but I > > still ran into troubles. > > > > Anyone here know the sorcery to make it play nice with sbcl (or is it even > > supposed to)? > > > > I'm using cells-gtk-2005-02-26 and sbcl 0.8.19.3 > > > > Thanks in advance, > > > > Sampo > > _______________________________________________ > > cells-gtk-devel site list > > cells-gtk-devel at common-lisp.net > > http://common-lisp.net/mailman/listinfo/cells-gtk-devel > > -- > Best Regards, > - Peter > _______________________________________________ > cells-gtk-devel site list > cells-gtk-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-gtk-devel From rm at seid-online.de Mon Mar 14 15:46:45 2005 From: rm at seid-online.de (rm at seid-online.de) Date: Mon, 14 Mar 2005 16:46:45 +0100 Subject: [cells-gtk-devel] cells-gtk and sbcl In-Reply-To: <200503140953.36178.peter.denno@nist.gov> References: <20050314013849.6b80b0f2@localhost> <200503132124.08309.peter.denno@nist.gov> <20050314134853.GA14008@seid-online.de> <200503140953.36178.peter.denno@nist.gov> Message-ID: <20050314154645.GB14459@seid-online.de> On Mon, Mar 14, 2005 at 09:53:35AM -0500, Peter Denno wrote: > On Monday 14 March 2005 08:48, rm at fabula.de wrote: > > On Sun, Mar 13, 2005 at 09:24:08PM -0500, Peter Denno wrote: > > > Hi, > > > > > > cells-gtk does not currently run sbcl. > > What I should have said was that I (the maintainer) have no knowledge of it > running on SBCL. The one time I tried it, it didn't work, and I expected that > there would be plenty of problems. Ah ok, i think the confusion stems from the c.l.l posting about saying that "Cells-gtk builds very easily using sbcl" - but you are right, the post never claims it _runs_ :-) > [...] > > - the test '(directory "/path/glob*")' doesn't seem to work ... > > I don't know what this refers to. Well, it refers to the code in the following files: ./load.lisp ./root/load.lisp ./root/gtk-ffi/gtk-ffi.lisp ./root/cells-gtk/gtk-app.lisp all have the following code: (cond ((directory "/usr/lib/libgtk*") .... which, i assume, should test for the existance of libgtk... files. Unfortunately SBCL can't deal with the wildcard pattern _in_ the filename. Hmm, it might be more portable to parse the output of pkg-config to get the location of libgtk (as well as the libs it depends on). > > > > - complains about undefined alien functions (tons of'em). > > Which sounds to me like it isn't going to work. Oh, it opens a window (splash i assume) and then breaks and breaks and ... > [...] > > He didn't say it runs. But if you just enjoy compiling it ... ;^) Hours of fun :-) > If you do get it to run, please let me/us know. Ok, i'll report as soon as i get it working. Cheers RalfD > > -- > Best Regards, > - Peter > _______________________________________________ > cells-gtk-devel site list > cells-gtk-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-gtk-devel From rm at seid-online.de Mon Mar 14 16:18:59 2005 From: rm at seid-online.de (rm at seid-online.de) Date: Mon, 14 Mar 2005 17:18:59 +0100 Subject: [cells-gtk-devel] cells-gtk and sbcl In-Reply-To: <200503140953.36178.peter.denno@nist.gov> References: <20050314013849.6b80b0f2@localhost> <200503132124.08309.peter.denno@nist.gov> <20050314134853.GA14008@seid-online.de> <200503140953.36178.peter.denno@nist.gov> Message-ID: <20050314161859.GC14459@seid-online.de> On Mon, Mar 14, 2005 at 09:53:35AM -0500, Peter Denno wrote: > > OK, so it compiles.... Well, i frankestoned the code so copiles/loads o.k. - now, when i try to run the example i get the following: Done! Now try (test-gtk::gtk-demo) T * (test-gtk::gtk-demo) debugger invoked on a SIMPLE-ERROR in thread 5323: The assertion CELLS-GTK::CB failed. You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE] Retry assertion. 1: [ABORT ] Reduce debugger level (leaving debugger, returning to toplevel). 2: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop. (SB-KERNEL:ASSERT-ERROR CELLS-GTK::CB NIL NIL) 0] backtrace 0: (SB-KERNEL:ASSERT-ERROR CELLS-GTK::CB NIL NIL) 1: ((SB-PCL::FAST-METHOD CELLS::C-OUTPUT-SLOT-NAME PROGN ((EQL 'CELLS-GTK:ON-ACTIVATE) CELLS-GTK:ENTRY T T T)) # # # ENTRY # # #) 2: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1. SB-PCL::.ARG2. SB-PCL::.ARG3. SB-PCL::.ARG4.)) # # CELLS-GTK:ON-ACTIVATE ENTRY # NIL T) 3: ((LAMBDA ())) 4: (CELLS::FINISH-BUSINESS) 5: (CELLS::CALL-WITH-INTEGRITY # (:OUTPUT NIL) #) 6: ((SB-PCL::FAST-METHOD CELLS:MD-AWAKEN (CELLS::MODEL-OBJECT)) (#(NIL 8) . #()) # TEST-GTK) 7: (CELLS:TO-BE TEST-GTK) 8: (CELLS-GTK:START-APP TEST-GTK::TEST-GTK :DEBUG NIL) 9: (SB-INT:EVAL-IN-LEXENV (TEST-GTK::GTK-DEMO) #S(SB-KERNEL:LEXENV :FUNS NIL :VARS NIL :BLOCKS NIL :TAGS NIL :TYPE-RESTRICTIONS NIL :LAMBDA NIL :CLEANUP NIL :HANDLED-CONDITIONS NIL :DISABLED-PACKAGE-LOCKS NIL :POLICY ((SAFETY . 3) (COMPILATION-SPEED . 2) (DEBUG . 2) (SPEED . 1) (SPACE . 1) (INHIBIT-WARNINGS . 1)))) 10: (INTERACTIVE-EVAL (TEST-GTK::GTK-DEMO)) 11: (SB-IMPL::REPL-FUN NIL) 12: ((LAMBDA ())) 13: ((LAMBDA ())) 14: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #) 15: (SB-IMPL::TOPLEVEL-REPL NIL) 16: (SB-IMPL::TOPLEVEL-INIT) 17: ((FLET SB-IMPL::RESTART-LISP)) 0] Help! Err, this does look somehow familiar ... how much of lamda-gtk does your code use? Somehow CELLS-GTK::CB rings the "callback"-problem bell. cheers RalfD From peter.denno at nist.gov Mon Mar 14 17:38:23 2005 From: peter.denno at nist.gov (Peter Denno) Date: Mon, 14 Mar 2005 12:38:23 -0500 Subject: [cells-gtk-devel] cells-gtk and sbcl In-Reply-To: <20050314161859.GC14459@seid-online.de> References: <20050314013849.6b80b0f2@localhost> <200503140953.36178.peter.denno@nist.gov> <20050314161859.GC14459@seid-online.de> Message-ID: <200503141238.24037.peter.denno@nist.gov> Hi, > Help! Err, this does look somehow familiar ... how much of lamda-gtk does > your code use? Somehow CELLS-GTK::CB rings the "callback"-problem bell. cells-gtk>fgrep lambda-gtk `find . -name \*.lisp` cells-gtk> ??? -- Best Regards, - Peter From peter.denno at nist.gov Mon Mar 14 17:53:01 2005 From: peter.denno at nist.gov (Peter Denno) Date: Mon, 14 Mar 2005 12:53:01 -0500 Subject: [cells-gtk-devel] cells-gtk and sbcl In-Reply-To: <20050314134853.GA14008@seid-online.de> References: <20050314013849.6b80b0f2@localhost> <200503132124.08309.peter.denno@nist.gov> <20050314134853.GA14008@seid-online.de> Message-ID: <200503141253.01747.peter.denno@nist.gov> On Monday 14 March 2005 08:48, rm at fabula.de wrote: > Well, i hade a quick glance at it (and spotted some problems) - i might > have a closer look at it soon (but i'm about to get sick, so i can't > promise any time- frame). Some problems found so far: > ?- has _hardcoded_ pathes in the ?test for library locations! Of course if it going to look somewhere for the libraries, it needs to be told where to look. Thus it is "hardcoded" load.lisp reports an error if it can't find the libraries. That is a reasonable behavior given the circumstances. What can be improved upon, however is that it currently isn't enough to just change the value in load.lisp. If it fails, gtk-ffi/gtk-ffi.lisp and/or gtk-app.lisp must also be changed. That should be fixed. Your point about wildcard not being interpreted by sbcl's directory function is well taken. Perhaps we can use logical pathnames, or is there a better way? -- Best Regards, - Peter