From frgo at me.com Mon Jun 1 14:30:04 2009 From: frgo at me.com (Frank Goenninger) Date: Mon, 01 Jun 2009 16:30:04 +0200 Subject: [cells-devel] Cello: What does "swdw" stand for ? Message-ID: <5B708138-74C5-4AEC-9477-6E1536047585@me.com> Oh that abbreviationism of His Kennyness ... ;-) As ".w." is defined as (define-symbol-macro .w. (or (.window-cache self) (setf (.window-cache self) (upper self window)))) and swdw is defined as (defmacro swdw () '.w.) I am guessing that this stands for something like "symbol-w?-d?- window" but I may be simply going wild and crazy here (that being my standard ending for mails to Kenny as I have completely missed a fundamental concept in the past ;-) Thanks for enlightening me! Cheers Frank -- Frank Goenninger Cell: +49 175 4321058 E-Mail: frgo at me.com -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2227 bytes Desc: not available URL: From alessiostalla at gmail.com Thu Jun 4 19:49:41 2009 From: alessiostalla at gmail.com (Alessio Stalla) Date: Thu, 4 Jun 2009 21:49:41 +0200 Subject: [cells-devel] Fwd: Cells on ABCL In-Reply-To: <9A16B2F1-592D-40D2-8D19-F9803D539B85@gmail.com> References: <835c01920905252347h6e688f50ydd544837d5e38487@mail.gmail.com> <4A1BDDD9.4020602@gmail.com> <835c01920905261353r3a1d8da4u5cd5fc04cda67a6d@mail.gmail.com> <835c01920905261355lc14862wac73f12cdd922760@mail.gmail.com> <9A16B2F1-592D-40D2-8D19-F9803D539B85@gmail.com> Message-ID: <835c01920906041249s21409cb0g880b60cbad657e9a@mail.gmail.com> I have found out the problem with Cells on abcl after a bit of debugging. The function c-unlink-useds in link.lisp uses delete, which somehow destructively modifies something it should not - the list of useds gets one item shorter (not the list inside the cell but the list "useds" in c-unlink-unused, which apparently shares structure with the list inside the cell, but who knows). Replacing delete with remove does the trick. I don't know if this is caused by abcl's delete being buggy but I doubt it, since the implementation of delete in abcl is taken from cmucl, and that should be bug-free enough ;) however, I'll investigate this further. (Thomas, I saw you at the ELS but in the end I didn't want to bother you with this - I wanted to keep the fun for me ;) thanks for your offer of help, anyway). So now tests appear to pass. And, apart from using remove and adding a few read conditionals, no changes to cells are required for it to work on abcl. Abcl itself needs to be slightly modified (it needs to expose a couple of internal MOP functions). I'll talk to the devs about incorporating these changes on trunk and hopefully in the coming 0.15 release of abcl. Bye, Alessio S. From kentilton at gmail.com Thu Jun 4 20:27:41 2009 From: kentilton at gmail.com (Kenneth Tilton) Date: Thu, 04 Jun 2009 16:27:41 -0400 Subject: [cells-devel] Fwd: Cells on ABCL In-Reply-To: <835c01920906041249s21409cb0g880b60cbad657e9a@mail.gmail.com> References: <835c01920905252347h6e688f50ydd544837d5e38487@mail.gmail.com> <4A1BDDD9.4020602@gmail.com> <835c01920905261353r3a1d8da4u5cd5fc04cda67a6d@mail.gmail.com> <835c01920905261355lc14862wac73f12cdd922760@mail.gmail.com> <9A16B2F1-592D-40D2-8D19-F9803D539B85@gmail.com> <835c01920906041249s21409cb0g880b60cbad657e9a@mail.gmail.com> Message-ID: <4A282E3D.1040906@gmail.com> Alessio Stalla wrote: > I have found out the problem with Cells on abcl after a bit of debugging. > > The function c-unlink-useds in link.lisp uses delete, which somehow > destructively modifies something it should not - Right you are. But it is not doing it should not -- that labels from gets passed the same structure being acted on by the delete, so the outer guy of course sees that. I have always hated that code, but one attempt to clean it up did have a performance hit so it has to stay a little ugly. I think the remove works but is the wrong fix (and will be a performance killer scaled up). I see that the outer block of code does its own cleanup of useds, so it is being done twice -- very efficiently, but twice. What I think needs doing is avoiding the inner delete by mutating the list differently. I will stare at it and see what I can come up with. Thx for the detective work. kt the list of useds > gets one item shorter (not the list inside the cell but the list > "useds" in c-unlink-unused, which apparently shares structure with the > list inside the cell, but who knows). Replacing delete with remove > does the trick. I don't know if this is caused by abcl's delete being > buggy but I doubt it, since the implementation of delete in abcl is > taken from cmucl, and that should be bug-free enough ;) however, I'll > investigate this further. > > (Thomas, I saw you at the ELS but in the end I didn't want to bother > you with this - I wanted to keep the fun for me ;) thanks for your > offer of help, anyway). > > So now tests appear to pass. And, apart from using remove and adding a > few read conditionals, no changes to cells are required for it to work > on abcl. Abcl itself needs to be slightly modified (it needs to expose > a couple of internal MOP functions). I'll talk to the devs about > incorporating these changes on trunk and hopefully in the coming 0.15 > release of abcl. > > Bye, > Alessio S. > > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel > > > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.339 / Virus Database: 270.12.53/2154 - Release Date: 06/04/09 05:53:00 > From ocorrain at gmail.com Tue Jun 23 13:50:43 2009 From: ocorrain at gmail.com (Tiarnan O'Corrain) Date: Tue, 23 Jun 2009 14:50:43 +0100 Subject: [cells-devel] Which cellsy lisp GUI? Message-ID: Hi-- a question for the cognoscenti: which of the various Cells-based GUI toolkits is the easiest to pick up and use on an experimental project? I know there's a Cells/GTK mix, a Cell/Tk one which was getting a lot of discussion some time ago, and the sunlit uplands of Cello. Any recommendations? I have a simple GUI client in mind, nothing too fancy. regards Tiarnan -- difficile est saturam non scribere -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Tue Jun 23 14:35:30 2009 From: kentilton at gmail.com (Kenneth Tilton) Date: Tue, 23 Jun 2009 10:35:30 -0400 Subject: [cells-devel] Which cellsy lisp GUI? In-Reply-To: References: Message-ID: <4A40E832.9030500@gmail.com> Tiarnan O'Corrain wrote: > Hi-- > > a question for the cognoscenti: which of the various Cells-based GUI > toolkits is the easiest to pick up and use on an experimental project? > I know there's a Cells/GTK mix, a Cell/Tk one which was getting a lot of > discussion some time ago, and the sunlit uplands of Cello. > > Any recommendations? I have a simple GUI client in mind, nothing too fancy. Tough call. Cells-gtk got a lot of work when Peter Hildebrandt jumped in, but it's not clear he got itall merged with the mainline so you might have to reach out to him for the latest/greatest. I like Tcl/Tk over GTk so I am partial to Celtk. Frank Goenninger has recently been cleaning up Cello so that might not be completely unapproachable. OpenGL is pretty, but you don't get the widget sets of Tk or Gtk. kt From ocorrain at gmail.com Tue Jun 23 14:43:00 2009 From: ocorrain at gmail.com (Tiarnan O'Corrain) Date: Tue, 23 Jun 2009 15:43:00 +0100 Subject: [cells-devel] Which cellsy lisp GUI? In-Reply-To: <4A40E832.9030500@gmail.com> References: <4A40E832.9030500@gmail.com> Message-ID: Hi-- thanks for the prompt reply. I think I'll try Celt, but where to get it? cvs -d:pserver:anonymous at common-lisp.net:/project/cells/cvsroot co celtk doesn't do the job. Where can I get the latest? thanks Tiarnan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramarren at gmail.com Tue Jun 23 15:27:46 2009 From: ramarren at gmail.com (Ramarren) Date: Tue, 23 Jun 2009 17:27:46 +0200 Subject: [cells-devel] Which cellsy lisp GUI? In-Reply-To: References: <4A40E832.9030500@gmail.com> Message-ID: Hello, On Tue, Jun 23, 2009 at 4:43 PM, Tiarnan O'Corrain wrote: > I think I'll try Celt, but where to get it? > > cvs -d:pserver:anonymous at common-lisp.net:/project/cells/cvsroot co celtk According to http://common-lisp.net/faq.shtml a command like cvs -z3 -d :pserver:anonymous:anonymous at common-lisp.net:/project/cells/cvsroot co Celtk should work. As for cells-gtk, I have created a fork http://github.com/Ramarren/cells-gtk3/tree/master to make it run with newest versions of its dependencies, and recently tried to cleanup types (there was at least on place where an int argument was declared as float, and one where there was :int instead of :int32, so perhaps it works now on 64-bit systems, although I don't have on to check), so you might also want to try that. Regards, Jakub Higersberger From achambers.home at googlemail.com Tue Jun 23 21:41:12 2009 From: achambers.home at googlemail.com (Andy Chambers) Date: Tue, 23 Jun 2009 22:41:12 +0100 Subject: [cells-devel] What is functional reactive programming? Message-ID: Someone asks this on stackoverflow. http://stackoverflow.com/questions/1028250/what-is-functional-reactive-programming -- ---- Andy Chambers Formedix Ltd From gwking at metabang.com Tue Jun 23 22:30:29 2009 From: gwking at metabang.com (Gary King) Date: Tue, 23 Jun 2009 18:30:29 -0400 Subject: [cells-devel] What is functional reactive programming? In-Reply-To: References: Message-ID: <4A0265AE-3CC2-41B2-A7E0-9D14A8CC96C9@metabang.com> > Someone asks this on stackoverflow. > > http://stackoverflow.com/questions/1028250/what-is-functional-reactive-programming > I thought that is when you start salivating when someone says "functional programming"... > -- > ---- > Andy Chambers > Formedix Ltd > > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter From kentilton at gmail.com Wed Jun 24 00:22:03 2009 From: kentilton at gmail.com (Kenneth Tilton) Date: Tue, 23 Jun 2009 20:22:03 -0400 Subject: [cells-devel] What is functional reactive programming? In-Reply-To: References: Message-ID: <4A4171AB.1010004@gmail.com> Andy Chambers wrote: > Someone asks this on stackoverflow. > > http://stackoverflow.com/questions/1028250/what-is-functional-reactive-programming I always cite FRP as similar when cataloging cells-alikes, and I dare say reactive programming is about the most common buzzword used to describe these dataflow beasts. I believe Scheme FrTime is a poster boy for FRP, btw. kt From frgo at me.com Wed Jun 24 07:26:22 2009 From: frgo at me.com (Frank Goenninger) Date: Wed, 24 Jun 2009 09:26:22 +0200 Subject: [cells-devel] Which cellsy lisp GUI? In-Reply-To: <4A40E832.9030500@gmail.com> References: <4A40E832.9030500@gmail.com> Message-ID: <39442BB7-3C0D-428F-B5AD-47C524C2E8AA@me.com> Am 23.06.2009 um 16:35 schrieb Kenneth Tilton: > > > Tiarnan O'Corrain wrote: >> Hi-- >> >> a question for the cognoscenti: which of the various Cells-based GUI >> toolkits is the easiest to pick up and use on an experimental >> project? >> I know there's a Cells/GTK mix, a Cell/Tk one which was getting a >> lot of >> discussion some time ago, and the sunlit uplands of Cello. >> >> Any recommendations? I have a simple GUI client in mind, nothing >> too fancy. > > Tough call. Cells-gtk got a lot of work when Peter Hildebrandt jumped > in, but it's not clear he got itall merged with the mainline so you > might have to reach out to him for the latest/greatest. > > I like Tcl/Tk over GTk so I am partial to Celtk. > > Frank Goenninger has recently been cleaning up Cello so that might not > be completely unapproachable. OpenGL is pretty, but you don't get the > widget sets of Tk or Gtk. And that work is currently on hold due to paying clients making me do something else... So: If anyone needs an easy one: Celtk, definitely. I still use it for quick hacks and it really works. Cheers Frank -- Frank Goenninger Cell: +49 175 4321058 E-Mail: frgo at me.com From ocorrain at gmail.com Wed Jun 24 09:54:45 2009 From: ocorrain at gmail.com (Tiarnan O'Corrain) Date: Wed, 24 Jun 2009 10:54:45 +0100 Subject: [cells-devel] Which cellsy lisp GUI? In-Reply-To: <39442BB7-3C0D-428F-B5AD-47C524C2E8AA@me.com> References: <4A40E832.9030500@gmail.com> <39442BB7-3C0D-428F-B5AD-47C524C2E8AA@me.com> Message-ID: Thanks. I'm missing one piece at the moment: "gui-geometry". Where can I download that? regards T -------------- next part -------------- An HTML attachment was scrubbed... URL: From frgo at me.com Wed Jun 24 10:05:59 2009 From: frgo at me.com (Frank Goenninger) Date: Wed, 24 Jun 2009 12:05:59 +0200 Subject: [cells-devel] Which cellsy lisp GUI? In-Reply-To: References: <4A40E832.9030500@gmail.com> <39442BB7-3C0D-428F-B5AD-47C524C2E8AA@me.com> Message-ID: It's part of Cells (and, in fact, is a sub-directory under cells). hth Frank Am 24.06.2009 um 11:54 schrieb Tiarnan O'Corrain: > Thanks. I'm missing one piece at the moment: "gui-geometry". Where > can I download that? > > regards > > T > > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel -- Frank Goenninger Cell: +49 175 4321058 E-Mail: frgo at me.com From ocorrain at gmail.com Wed Jun 24 10:31:01 2009 From: ocorrain at gmail.com (Tiarnan O'Corrain) Date: Wed, 24 Jun 2009 11:31:01 +0100 Subject: [cells-devel] Which cellsy lisp GUI? In-Reply-To: References: <4A40E832.9030500@gmail.com> <39442BB7-3C0D-428F-B5AD-47C524C2E8AA@me.com> Message-ID: Thanks! I had an older version of cells (via asdf-install), which didn't have it. regards Tiarnan -------------- next part -------------- An HTML attachment was scrubbed... URL: From neil.baylis at gmail.com Thu Jun 25 05:52:48 2009 From: neil.baylis at gmail.com (Neil Baylis) Date: Wed, 24 Jun 2009 22:52:48 -0700 Subject: [cells-devel] Cells & Clozure CL Message-ID: <1e6b7d810906242252o34d760a3wd64a4332a5d0f067@mail.gmail.com> Hello, I'm wanting to look at cells for a new project I'm into, which will be using Clozure CL on Mac. Has anyone got cells working with Clozure CL and could provide me with pointers? (I want to use the Cocoa bridge, so SBCL will not work for me). Thanks, Neil Baylis -- http://www.pixpopuli.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From frgo at me.com Mon Jun 29 12:59:46 2009 From: frgo at me.com (Frank Goenninger) Date: Mon, 29 Jun 2009 14:59:46 +0200 Subject: [cells-devel] First time for me: Currrent DP not GE pulse x .... ?!? Message-ID: <9B2B12DA-1745-48AC-926F-63F78B716225@me.com> Hi all Cells-users: It is the first time I get a Current DP 1 not GE pulse 4 of cell (NIL . )<4:A ASCENDER/HELVETICA = NIL> [Condition of type SIMPLE-ERROR] error. This code throws the error: (defun c-pulse-update (c key) (declare (ignorable key)) (unless (find key '(:valid-uninfluenced)) (trc nil "!!!!!!! c-pulse-update updating !!!!!!!!!!" *data-pulse- id* c key :prior-pulse (c-pulse c))) (assert (>= *data-pulse-id* (c-pulse c)) () "Current DP ~a not GE pulse ~a of cell ~a" *data-pulse-id* (c- pulse c) c) (setf (c-pulse c) *data-pulse-id*)) Backtrace: 0: (ERROR "Current DP ~a not GE pulse ~a of cell ~a" 1 4 (NIL . )<4:A ASCENDER/HELVETICA = NIL>) 1: (CELLS::C-PULSE-UPDATE (NIL . )<4:A ASCENDER/HELVETICA = NIL> :VALID-UNINFLUENCED) Locals: CELLS::C = (NIL . )<4:A ASCENDER/HELVETICA = NIL> CELLS::KEY = :VALID-UNINFLUENCED CELLS::C = (NIL . )<4:A ASCENDER/HELVETICA = NIL> #:|g38499| = #(0 NIL ..) 2: (CELLS::ENSURE-VALUE-IS-CURRENT (NIL . )<4:A ASCENDER/ HELVETICA = NIL> :C-READ NIL) 3: ((:INTERNAL CELLS::CELL-READ 0) NIL NIL) 4: (CELLS::CALL-WITH-INTEGRITY NIL NIL # NIL) 5: (CELLS::CELL-READ (NIL . )<4:A ASCENDER/HELVETICA = NIL>) 6: (CELLS::MD-SLOT-VALUE HELVETICA CNX::ASCENDER) 7: ((METHOD CNX::ASCENDER (CNX::CELLO-FONT)) HELVETICA) 8: ((METHOD CNX::FONT-ASCENDER (CNX::CELLO-CONTROL)) FRGO-TEXT-1) Locals: CELLS:SELF = FRGO-TEXT-1 9: ((:INTERNAL (MOP:CLASS-DEFAULT-INITARGS CNX::CNX-TEXT :LT) 0) dirty<0:A LT/FRGO-TEXT-1 = NIL>) 10: (CELLS::CALCULATE-AND-LINK dirty<0:A LT/FRGO-TEXT-1 = NIL>) 11: ((FLET CELLS::CALCULATE-AND-SET CELLS::BODY)) 12: (CELLS::CALCULATE-AND-SET dirty<0:A LT/FRGO-TEXT-1 = NIL> :FN- AWAKEN-CELL NIL) 13: ((METHOD CELLS::AWAKEN-CELL (CELLS::C-RULED)) dirty<0:A LT/FRGO- TEXT-1 = NIL>) 14: ((METHOD CELLS:MD-AWAKEN (CELLS::MODEL-OBJECT)) FRGO-TEXT-1) 15: ((METHOD CELLS:MD-AWAKEN :AROUND (CELLS::MODEL-OBJECT)) FRGO- TEXT-1) 16: ((:INTERNAL (:EFFECTIVE-METHOD 1 NIL NIL T T) 0) FRGO-TEXT-1) 17: ((:INTERNAL (:INTERNAL (METHOD SHARED-INITIALIZE :AFTER #) 0) 0) :AWAKEN FRGO-TEXT-1) 18: (CELLS::JUST-DO-IT :AWAKEN) 19: (CELLS::FINISH-BUSINESS) 20: ((FLET CELLS::CALL-WITH-INTEGRITY CELLS::GO-GO)) 21: (CELLS::CALL-WITH-INTEGRITY NIL NIL # NIL) 22: (CTK::%RUN-WINDOW) 23: (CTK::%DO-RUN-WINDOW) 24: (CTK:RUN-WINDOW CNX-TEST::CELLO-NX-TEST-MAIN-WINDOW) 25: (CNX-TEST:TEST-MAIN) Now - questions I have are: What does :valid-uninfluenced actually mean? Is the code above correct or should the assertion be inside the (unless ...) form? What is the logic behind? Thanks for helping ... Cheers Frank -- Frank Goenninger Cell: +49 175 4321058 E-Mail: frgo at me.com From kentilton at gmail.com Mon Jun 29 13:25:57 2009 From: kentilton at gmail.com (Kenneth Tilton) Date: Mon, 29 Jun 2009 09:25:57 -0400 Subject: [cells-devel] First time for me: Currrent DP not GE pulse x .... ?!? In-Reply-To: <9B2B12DA-1745-48AC-926F-63F78B716225@me.com> References: <9B2B12DA-1745-48AC-926F-63F78B716225@me.com> Message-ID: <4A48C0E5.1080909@gmail.com> Frank Goenninger wrote: > Hi all Cells-users: > > It is the first time I get a > > Current DP 1 not GE pulse 4 of cell > (NIL . )<4:A ASCENDER/HELVETICA = NIL> > [Condition of type SIMPLE-ERROR] > > error. This code throws the error: > > (defun c-pulse-update (c key) > (declare (ignorable key)) > (unless (find key '(:valid-uninfluenced)) > (trc nil "!!!!!!! c-pulse-update updating !!!!!!!!!!" *data-pulse- > id* c key :prior-pulse (c-pulse c))) > (assert (>= *data-pulse-id* (c-pulse c)) () > "Current DP ~a not GE pulse ~a of cell ~a" *data-pulse-id* (c- > pulse c) c) > (setf (c-pulse c) *data-pulse-id*)) > > Backtrace: > 0: (ERROR "Current DP ~a not GE pulse ~a of cell ~a" 1 4 (NIL . > )<4:A ASCENDER/HELVETICA = NIL>) > 1: (CELLS::C-PULSE-UPDATE (NIL . )<4:A ASCENDER/HELVETICA = > NIL> :VALID-UNINFLUENCED) > Locals: > CELLS::C = (NIL . )<4:A ASCENDER/HELVETICA = NIL> > CELLS::KEY = :VALID-UNINFLUENCED > CELLS::C = (NIL . )<4:A ASCENDER/HELVETICA = NIL> > #:|g38499| = #(0 NIL ..) > 2: (CELLS::ENSURE-VALUE-IS-CURRENT (NIL . )<4:A ASCENDER/ > HELVETICA = NIL> :C-READ NIL) > 3: ((:INTERNAL CELLS::CELL-READ 0) NIL NIL) > 4: (CELLS::CALL-WITH-INTEGRITY NIL NIL # CELLS::CELL-READ 0) @ #x10e6b8da> NIL) > 5: (CELLS::CELL-READ (NIL . )<4:A ASCENDER/HELVETICA = NIL>) > 6: (CELLS::MD-SLOT-VALUE HELVETICA CNX::ASCENDER) > 7: ((METHOD CNX::ASCENDER (CNX::CELLO-FONT)) HELVETICA) > 8: ((METHOD CNX::FONT-ASCENDER (CNX::CELLO-CONTROL)) FRGO-TEXT-1) > Locals: > CELLS:SELF = FRGO-TEXT-1 > 9: ((:INTERNAL (MOP:CLASS-DEFAULT-INITARGS CNX::CNX-TEXT :LT) 0) > dirty<0:A LT/FRGO-TEXT-1 = NIL>) > 10: (CELLS::CALCULATE-AND-LINK dirty<0:A LT/FRGO-TEXT-1 = NIL>) > 11: ((FLET CELLS::CALCULATE-AND-SET CELLS::BODY)) > 12: (CELLS::CALCULATE-AND-SET dirty<0:A LT/FRGO-TEXT-1 = NIL> :FN- > AWAKEN-CELL NIL) > 13: ((METHOD CELLS::AWAKEN-CELL (CELLS::C-RULED)) dirty<0:A LT/FRGO- > TEXT-1 = NIL>) > 14: ((METHOD CELLS:MD-AWAKEN (CELLS::MODEL-OBJECT)) FRGO-TEXT-1) > 15: ((METHOD CELLS:MD-AWAKEN :AROUND (CELLS::MODEL-OBJECT)) FRGO- > TEXT-1) > 16: ((:INTERNAL (:EFFECTIVE-METHOD 1 NIL NIL T T) 0) FRGO-TEXT-1) > 17: ((:INTERNAL (:INTERNAL (METHOD SHARED-INITIALIZE :AFTER #) 0) > 0) :AWAKEN FRGO-TEXT-1) > 18: (CELLS::JUST-DO-IT :AWAKEN) > 19: (CELLS::FINISH-BUSINESS) > 20: ((FLET CELLS::CALL-WITH-INTEGRITY CELLS::GO-GO)) > 21: (CELLS::CALL-WITH-INTEGRITY NIL NIL # %RUN-WINDOW 0) [CELLO-NX-TEST-MAIN-WINDOW] @ #x10dd0fea> NIL) > 22: (CTK::%RUN-WINDOW) > 23: (CTK::%DO-RUN-WINDOW) > 24: (CTK:RUN-WINDOW CNX-TEST::CELLO-NX-TEST-MAIN-WINDOW) > 25: (CNX-TEST:TEST-MAIN) > > > Now - questions I have are: > > What does :valid-uninfluenced actually mean? When cell X changes, another cell C becomes current with that change aka valid one of two ways: cell C gets recalculated, or the cells engine determines C does not depend directly or indirectly on X. The latter case is "valid and uninfluenced". > Is the code above correct Yes. > or should the assertion be inside the (unless ...) form? What is the > logic behind? The logic is that it is impossible for a cell pulse to get ahead of *data-pulse-id* without something being broken in the Cells engine, so the engine yells if it sees that. I have encountered this myself, and it is indeed rare. It arose because I had a model instance lying around from a previous iteration. I forget /exactly/ how I did that, but it was trickier than just doing something silly like use a global variable to hold onto some data. ie, It might take some digging to figure out how an old instance is still in play. Wish I could remember the deets. kt From kentilton at gmail.com Mon Jun 29 13:41:26 2009 From: kentilton at gmail.com (Kenneth Tilton) Date: Mon, 29 Jun 2009 09:41:26 -0400 Subject: [cells-devel] First time for me: Currrent DP not GE pulse x .... ?!? In-Reply-To: <4A48C0E5.1080909@gmail.com> References: <9B2B12DA-1745-48AC-926F-63F78B716225@me.com> <4A48C0E5.1080909@gmail.com> Message-ID: <4A48C486.2010606@gmail.com> Kenneth Tilton wrote: > > Frank Goenninger wrote: >> Hi all Cells-users: >> >> It is the first time I get a >> >> Current DP 1 not GE pulse 4 of cell >> (NIL . )<4:A ASCENDER/HELVETICA = NIL> >> [Condition of type SIMPLE-ERROR] >> >> error. This code throws the error: >> >> (defun c-pulse-update (c key) >> (declare (ignorable key)) >> (unless (find key '(:valid-uninfluenced)) >> (trc nil "!!!!!!! c-pulse-update updating !!!!!!!!!!" *data-pulse- >> id* c key :prior-pulse (c-pulse c))) >> (assert (>= *data-pulse-id* (c-pulse c)) () >> "Current DP ~a not GE pulse ~a of cell ~a" *data-pulse-id* (c- >> pulse c) c) >> (setf (c-pulse c) *data-pulse-id*)) >> >> Backtrace: >> 0: (ERROR "Current DP ~a not GE pulse ~a of cell ~a" 1 4 (NIL . >> )<4:A ASCENDER/HELVETICA = NIL>) >> 1: (CELLS::C-PULSE-UPDATE (NIL . )<4:A ASCENDER/HELVETICA = >> NIL> :VALID-UNINFLUENCED) >> Locals: >> CELLS::C = (NIL . )<4:A ASCENDER/HELVETICA = NIL> >> CELLS::KEY = :VALID-UNINFLUENCED >> CELLS::C = (NIL . )<4:A ASCENDER/HELVETICA = NIL> >> #:|g38499| = #(0 NIL ..) >> 2: (CELLS::ENSURE-VALUE-IS-CURRENT (NIL . )<4:A ASCENDER/ >> HELVETICA = NIL> :C-READ NIL) >> 3: ((:INTERNAL CELLS::CELL-READ 0) NIL NIL) >> 4: (CELLS::CALL-WITH-INTEGRITY NIL NIL #> CELLS::CELL-READ 0) @ #x10e6b8da> NIL) >> 5: (CELLS::CELL-READ (NIL . )<4:A ASCENDER/HELVETICA = NIL>) >> 6: (CELLS::MD-SLOT-VALUE HELVETICA CNX::ASCENDER) >> 7: ((METHOD CNX::ASCENDER (CNX::CELLO-FONT)) HELVETICA) >> 8: ((METHOD CNX::FONT-ASCENDER (CNX::CELLO-CONTROL)) FRGO-TEXT-1) >> Locals: >> CELLS:SELF = FRGO-TEXT-1 >> 9: ((:INTERNAL (MOP:CLASS-DEFAULT-INITARGS CNX::CNX-TEXT :LT) 0) >> dirty<0:A LT/FRGO-TEXT-1 = NIL>) >> 10: (CELLS::CALCULATE-AND-LINK dirty<0:A LT/FRGO-TEXT-1 = NIL>) >> 11: ((FLET CELLS::CALCULATE-AND-SET CELLS::BODY)) >> 12: (CELLS::CALCULATE-AND-SET dirty<0:A LT/FRGO-TEXT-1 = NIL> :FN- >> AWAKEN-CELL NIL) >> 13: ((METHOD CELLS::AWAKEN-CELL (CELLS::C-RULED)) dirty<0:A LT/FRGO- >> TEXT-1 = NIL>) >> 14: ((METHOD CELLS:MD-AWAKEN (CELLS::MODEL-OBJECT)) FRGO-TEXT-1) >> 15: ((METHOD CELLS:MD-AWAKEN :AROUND (CELLS::MODEL-OBJECT)) FRGO- >> TEXT-1) >> 16: ((:INTERNAL (:EFFECTIVE-METHOD 1 NIL NIL T T) 0) FRGO-TEXT-1) >> 17: ((:INTERNAL (:INTERNAL (METHOD SHARED-INITIALIZE :AFTER #) 0) >> 0) :AWAKEN FRGO-TEXT-1) >> 18: (CELLS::JUST-DO-IT :AWAKEN) >> 19: (CELLS::FINISH-BUSINESS) >> 20: ((FLET CELLS::CALL-WITH-INTEGRITY CELLS::GO-GO)) >> 21: (CELLS::CALL-WITH-INTEGRITY NIL NIL #> %RUN-WINDOW 0) [CELLO-NX-TEST-MAIN-WINDOW] @ #x10dd0fea> NIL) >> 22: (CTK::%RUN-WINDOW) >> 23: (CTK::%DO-RUN-WINDOW) >> 24: (CTK:RUN-WINDOW CNX-TEST::CELLO-NX-TEST-MAIN-WINDOW) >> 25: (CNX-TEST:TEST-MAIN) >> >> >> Now - questions I have are: >> >> What does :valid-uninfluenced actually mean? > > When cell X changes, another cell C becomes current with that change aka > valid one of two ways: cell C gets recalculated, or the cells engine > determines C does not depend directly or indirectly on X. The latter > case is "valid and uninfluenced". > >> Is the code above correct > > Yes. > >> or should the assertion be inside the (unless ...) form? What is the >> logic behind? > > The logic is that it is impossible for a cell pulse to get ahead of > *data-pulse-id* without something being broken in the Cells engine, so > the engine yells if it sees that. > > I have encountered this myself, and it is indeed rare. It arose because > I had a model instance lying around from a previous iteration. Sorry, I forgot to explain. By "iteration" I mean the test iteration/application run that begins with cells-reset. So I would test some stuff, make some changes, and tkick off another test. cells-reset runs dropping the pulse to 1, but then some old instance from the prior test comes into play. kt > I forget > /exactly/ how I did that, but it was trickier than just doing something > silly like use a global variable to hold onto some data. ie, It might > take some digging to figure out how an old instance is still in play. > Wish I could remember the deets. > > kt > > > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel > > > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.375 / Virus Database: 270.12.93/2206 - Release Date: 06/27/09 17:55:00 > From frgo at me.com Mon Jun 29 14:31:54 2009 From: frgo at me.com (Frank Goenninger) Date: Mon, 29 Jun 2009 16:31:54 +0200 Subject: [cells-devel] First time for me: Currrent DP not GE pulse x .... ?!? In-Reply-To: <4A48C486.2010606@gmail.com> References: <9B2B12DA-1745-48AC-926F-63F78B716225@me.com> <4A48C0E5.1080909@gmail.com> <4A48C486.2010606@gmail.com> Message-ID: <452D6348-FDC7-4770-B2CB-38EFED2FC60D@me.com> Hi Kenny, Am 29.06.2009 um 15:41 schrieb Kenneth Tilton: > > Sorry, I forgot to explain. By "iteration" I mean the test iteration/ > application run that begins with cells-reset. So I would test some > stuff, make some changes, and tkick off another test. cells-reset > runs dropping the pulse to 1, but then some old instance from the > prior test comes into play. Yep, that's clear. Except that this happens to me right during the first run after a fresh lisp image start! At a loss, really. - How to debug this ??? Thanks Frank -- Frank Goenninger Cell: +49 175 4321058 E-Mail: frgo at me.com From kentilton at gmail.com Mon Jun 29 16:08:55 2009 From: kentilton at gmail.com (Kenneth Tilton) Date: Mon, 29 Jun 2009 12:08:55 -0400 Subject: [cells-devel] First time for me: Currrent DP not GE pulse x .... ?!? In-Reply-To: <452D6348-FDC7-4770-B2CB-38EFED2FC60D@me.com> References: <9B2B12DA-1745-48AC-926F-63F78B716225@me.com> <4A48C0E5.1080909@gmail.com> <4A48C486.2010606@gmail.com> <452D6348-FDC7-4770-B2CB-38EFED2FC60D@me.com> Message-ID: <4A48E717.9010501@gmail.com> Frank Goenninger wrote: > Hi Kenny, > > Am 29.06.2009 um 15:41 schrieb Kenneth Tilton: > >> Sorry, I forgot to explain. By "iteration" I mean the test iteration/ >> application run that begins with cells-reset. So I would test some >> stuff, make some changes, and tkick off another test. cells-reset >> runs dropping the pulse to 1, but then some old instance from the >> prior test comes into play. > > > Yep, that's clear. Except that this happens to me right during the > first run after a fresh lisp image start! > > At a loss, really. - How to debug this ??? I notice the pulse was pretty damn low, 1 in the clock vs 4 in the cell. Lotsa print statements should do it since I doubt the volume will be unmanageable. My guess, btw, is that you have a call to cells-reset someplace you thought would be safe and now that is getting called downstream from an earlier reset and after some work is done. kt From neil.baylis at gmail.com Mon Jun 29 21:25:20 2009 From: neil.baylis at gmail.com (Neil Baylis) Date: Mon, 29 Jun 2009 14:25:20 -0700 Subject: [cells-devel] Cells & Clozure CL Message-ID: <1e6b7d810906291425x3604cd2ev95046687df015a5e@mail.gmail.com> I guess I have to assume nobody is using Cells with CCL. I'm attempting to get it to work, but am a little out of my depth. To begin with, I had to add a couple of conditionals for ccl to get past initial errors. Then: ,load-system cells There is no package named "EXCL" . [Condition of type CCL::NO-SUCH-PACKAGE] I don't know what EXCL is, but I'm offered a restart to treat it as a nickname for "COMMON-LISP-USER", so I choose that: Reader error on #, near position 921, within " (mop::class-prot": Reference to unknown package "MOP". [Condition of type CCL::SIMPLE-READER-ERROR] Any advice about how to proceed would be welcomed. I think I ought to begin by resolving the EXCL issue, but haven't had much luck finding such a package. Thanks, Neil Baylis [] -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Mon Jun 29 21:57:04 2009 From: kentilton at gmail.com (Kenneth Tilton) Date: Mon, 29 Jun 2009 17:57:04 -0400 Subject: [cells-devel] Cells & Clozure CL In-Reply-To: <1e6b7d810906291425x3604cd2ev95046687df015a5e@mail.gmail.com> References: <1e6b7d810906291425x3604cd2ev95046687df015a5e@mail.gmail.com> Message-ID: <4A4938B0.5000100@gmail.com> Neil Baylis wrote: > I guess I have to assume nobody is using Cells with CCL. I'm attempting > to get it to work, but am a little out of my depth. > > To begin with, I had to add a couple of conditionals for ccl to get past > initial errors. > > Then: ,load-system cells > > There is no package named "EXCL" . > [Condition of type CCL::NO-SUCH-PACKAGE] > > I don't know what EXCL is, but I'm offered a restart to treat it as a > nickname for > "COMMON-LISP-USER", so I choose that: Unless you have pushed :allegro onto *features* you should not be hitting excl: usage (those are Franz "ex"tensions to "cl"). I think any you find can safely be zapped since they will be in debugging code only. > > Reader error on # ("/Users/neil/.asdf-install-dir/site/cells/utils-kt/..."/7 ISO-8859-1) > #x8D1F7CE>, near position 921, within " (mop::class-prot": > Reference to unknown package "MOP". > [Condition of type CCL::SIMPLE-READER-ERROR] > > Hunh, surprised that MOP:: is there unfeatured. I am sure CCL has class-prototype somewhere, but ISTR it either is in the CL package so you can just delete the MOP:: or it is in... well, I'll let you find out: (apropos "CLASS-PROTOTYPE") kt From neil.baylis at gmail.com Tue Jun 30 01:43:23 2009 From: neil.baylis at gmail.com (Neil Baylis) Date: Mon, 29 Jun 2009 18:43:23 -0700 Subject: [cells-devel] Cells & Clozure CL In-Reply-To: <4A4938B0.5000100@gmail.com> References: <1e6b7d810906291425x3604cd2ev95046687df015a5e@mail.gmail.com> <4A4938B0.5000100@gmail.com> Message-ID: <1e6b7d810906291843v31bfdbd5l100e7c85f8f26c66@mail.gmail.com> On Mon, Jun 29, 2009 at 2:57 PM, Kenneth Tilton wrote: > > Unless you have pushed :allegro onto *features* you should not be hitting > excl: usage (those are Franz "ex"tensions to "cl"). I think any you find can > safely be zapped since they will be in debugging code only. > There are a couple of places where EXCL is referred to unconditionally. I added tests for ccl and that made it happy. > Hunh, surprised that MOP:: is there unfeatured. I am sure CCL has > class-prototype somewhere, but ISTR it either is in the CL package so you > can just delete the MOP:: or it is in... well, I'll let you find out: > (apropos "CLASS-PROTOTYPE") > > Yes, ccl has class-prototype. I deleted the mop::, and got past that hurdle. There were a couple more in a similar vein that I also fixed. I got a compile error in fm-utilities.lisp compiling fm-find-one. CCL complained about the declaration of dynamic-extent for 'matcher'. I added ccl to the #-lispworks test, and it compiled OK. Whether that's important at runtime, I don't know. Anyway, it now loads without any errors. Now to see if I can use it in my project. Thanks for the help, Neil Baylis -- http://www.pixpopuli.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From kentilton at gmail.com Tue Jun 30 13:59:16 2009 From: kentilton at gmail.com (Kenneth Tilton) Date: Tue, 30 Jun 2009 09:59:16 -0400 Subject: [cells-devel] Cells & Clozure CL In-Reply-To: <1e6b7d810906292323t42d1ad72s1b7d2180780169f3@mail.gmail.com> References: <1e6b7d810906291425x3604cd2ev95046687df015a5e@mail.gmail.com> <4A4938B0.5000100@gmail.com> <1e6b7d810906291843v31bfdbd5l100e7c85f8f26c66@mail.gmail.com> <4A4972BC.90007@gmail.com> <1e6b7d810906292323t42d1ad72s1b7d2180780169f3@mail.gmail.com> Message-ID: <4A4A1A34.3040005@gmail.com> [I have taken the liberty of CCing cells-devel because it might be useful in the archive.] Neil Baylis wrote: > This cells.. is a good thing. Do you want to incorporate the changes I > made to make it work under Clozure CL? Nah, I am not really doing o/s any more. Thx, tho. > >>From what I've seen so far, it looks as though it fits with my > project, which is some kind of geometry/art tool for exploring > tilings, tessellations, symmetries, etc. > > The graphic objects will mainly be triangles and squares, and I'm > still figuring out how I want to model them. > > Take triangles: At first glance, it looks as though I would model a > triangle with a cell. I would have some way to initialize it, and then > slots to return attributes. E.g. if I specifed 3 sides, there would be > slots that returned the angles (lazily). Another slot might return the > area. That much I understand. > > But there are more ways to create a triangle. I could specify 3 sides, > or 2 sides and an angle, etc. I could also say "make it similar to > that triangle over there, but the same size as that square over there, > etc. So, it seems to me that each of those cases would require a > different defmodel, because they would have different initforms. Is > that right? No. One of the most powerful features of Cells is an accident: OO works now, because two instances of the same class can have different rules (or a non-rule literal or an input cell allowing conventional procedural code to alter a slot) for the same slot. This means more reuse for a class, because normally the variation you describe requires one to forever be creating new classes. The only question is whether you go crazy and have just one class (say, polygon) or strike a middle ground and have classes for triangle, quadrangle, etc. I guess it comes down to how much you want to get out of method specialization, which obviously calls for a different instance type. That said, I often create a class (a defmodel) just as a way of bundling up a bunch of rules. ie, They can as well be functions or macros with a make-instance 'polygon inside. I guess for debugging and inspecting specifically a different class can be of use. You prolly do want a defmodel triangle, but going for isosceles might be a point of dimishing return. > > Anyway, assume I have that sorted out. Then, I'll create a bunch of > instances of these classes. I'd start by putting one of them in the > middle of the canvas. Then attach others to it, as dependents.So, if I > then change a dimension on the original object, that change would have > to propagate to all the dependent objects so they resize themselves. > That part sounds like cells to me. > > The relationships will all be about geometry: coincident points, equal > angles, similar figures, parallel lines, intersections, etc. "This > triangle is rotated 45 degrees further than that one over there". And > so on. Maybe circles as well, tangents, secants, etc. That's a lot of > stuff right there. > > I've attached an image of the kind of thing I want to do. This one I > created in Inkscape, but the UI there is somewhat horrid and it's easy > for cumulative errors to creep in. But that was built up entirely from > small squares and triangles. It's a reproduction of a tile pattern I > saw in Sydney Australia when I went there earlier this year. Nice. > > I was thinking I wanted a full blown geometric constraint solver, but > I'm hoping that I don't need that. It's a lot of math and other > theory I want to avoid learning at the moment. Cells looks like it > might do the trick. I need to get more familiar with it though. Not sure where you need a solver, unless the idea is that you hope to specify just a few parameters and let a solver figure out a pattern that "works". Cells is not about that -- we specify all the rules and the Cells engine just sees to it that the rules run. If you need something non-deterministic I would use Screamer+ to work out the hard stuff and have cell rules mine the screamer results. > > > I also had a probably dumbass newbie question: Whenever I eval a > (defmodel..) I get compiler errors, such as: > > CELLS> (defmodel hello-cells () > ((num :accessor num :initarg :num :initform (c-in 0)) > (square-num :accessor square-num > :initform (c? (* (num self) (num self)))))) > ;Compiler warnings : > ; In an anonymous lambda form inside an anonymous lambda form inside > an anonymous lambda form: Undefined function NUM > ; In an anonymous lambda form inside an anonymous lambda form inside > an anonymous lambda form: Undefined function NUM > NIL > CELLS> > > I imagine there's some delcaration I need to invoke to make that not > happen. Any ideas? I actually see that from time to time, but rarely. There must be something wrong with my eval-whens internal to defmodel. You won't see those on subsequent iterations, so ignore them (or go crazy and debug defmodel). cheers, ken From ramarren at gmail.com Tue Jun 30 15:14:27 2009 From: ramarren at gmail.com (Ramarren) Date: Tue, 30 Jun 2009 17:14:27 +0200 Subject: [cells-devel] Cells & Clozure CL In-Reply-To: <4A4A1A34.3040005@gmail.com> References: <1e6b7d810906291425x3604cd2ev95046687df015a5e@mail.gmail.com> <4A4938B0.5000100@gmail.com> <1e6b7d810906291843v31bfdbd5l100e7c85f8f26c66@mail.gmail.com> <4A4972BC.90007@gmail.com> <1e6b7d810906292323t42d1ad72s1b7d2180780169f3@mail.gmail.com> <4A4A1A34.3040005@gmail.com> Message-ID: Hello, On Tue, Jun 30, 2009 at 3:59 PM, Kenneth Tilton wrote: > Neil Baylis wrote: >> This cells.. is a good thing. Do you want to incorporate the changes I >> made to make it work under Clozure CL? ... >> I imagine there's some delcaration I need to invoke to make that not >> happen. Any ideas? > > I actually see that from time to time, but rarely. There must be > something wrong with my eval-whens internal to defmodel. You won't see > those on subsequent iterations, so ignore them (or go crazy and debug > defmodel). I have been keeping a fork of Cells on github [ http://github.com/Ramarren/cells/commits/master ], although mostly to keep cells-gtk working. I have tried to understand how cells work a few times, but it seems to require more effort than I can put in... anyway, I have modified it to work on CCL. Neil, you might want compare your changes with mine and send me any I have missed, so there will be version of cells working on CCL somewhere public. Not that anyone will find it, perhaps I should put a pointer on Cliki, but I would want to look like I was hijacking it or anything. I have also rearranged defmodel to remove the warning you mentioned. Apparently, CCL is even more touchy about order of definition than SBCL... but while I was at it I managed to somewhat simplify defmodel macroexpansion (and I can see how it can drive anyone who likes MOP crazy, the entire thing seems to be hanging on symbol plists!). I hope I haven't broken it, but cells-gtk application seems to work, which would be unlikely with broken cells, and after all I did not touch the internals. Regards, Jakub Higersberger From peter.hildebrandt at gmail.com Tue Jun 30 14:46:51 2009 From: peter.hildebrandt at gmail.com (Peter Hildebrandt) Date: Tue, 30 Jun 2009 16:46:51 +0200 Subject: [cells-devel] Cells & Clozure CL In-Reply-To: <4A4A1A34.3040005@gmail.com> References: <1e6b7d810906291425x3604cd2ev95046687df015a5e@mail.gmail.com> <4A4938B0.5000100@gmail.com> <1e6b7d810906291843v31bfdbd5l100e7c85f8f26c66@mail.gmail.com> <4A4972BC.90007@gmail.com> <1e6b7d810906292323t42d1ad72s1b7d2180780169f3@mail.gmail.com> <4A4A1A34.3040005@gmail.com> Message-ID: <7758b2680906300746p59726c3bp565bf803f46de6dd@mail.gmail.com> Sounds like a very interesting project (plus, pleasing to the eye :-)) Incidentially, I used cells for a similar (albeit much smaller) project recently. I wrote a graphic, interactive editor for Bayes Nets and Petri Nets and used cells for two purposes: a) Interactive editing: The graph can be changed via drag and drop, and if a node is moved, the connecting edges follow suit (I took this idea to its extremes, for example defining each arrowhead as a filled triangle whose rotation and position are tied to the line representing the edge -- or the marking of each node is drawn as filled circles defined in relation to the position of the node) b) Constant updates of the visual: Whenever the underlying mathematic model is updated, the drawn graph immediately changes as well, given that the relevant properties of the visual primitives (angles, colors, lengths, positions) are linked to the variables in the underlying mathematic model (and thus you could have the model update in the background (threads) and have a node change while it is being dragged along) All this was built on cells and worked pretty nicely :-) Just a random bit of information -- Peter On Tue, Jun 30, 2009 at 3:59 PM, Kenneth Tilton wrote: > [I have taken the liberty of CCing cells-devel because it might be > useful in the archive.] > > Neil Baylis wrote: >> This cells.. is a good thing. Do you want to incorporate the changes I >> made to make it work under Clozure CL? > > Nah, I am not really doing o/s any more. Thx, tho. > >> >>>From what I've seen so far, it looks as though it fits with my >> project, which is some kind of geometry/art tool for exploring >> tilings, tessellations, symmetries, etc. >> >> The graphic objects will mainly be triangles and squares, and I'm >> still figuring out how I want to model them. >> >> Take triangles: At first glance, it looks as though I would model a >> triangle with a cell. I would have some way to initialize it, and then >> slots to return attributes. E.g. if I specifed 3 sides, there would be >> slots that returned the angles (lazily). Another slot might return the >> area. That much I understand. >> >> But there are more ways to create a triangle. I could specify 3 sides, >> or 2 sides and an angle, etc. I could also say "make it similar to >> that triangle over there, but the same size as that square over there, >> etc. So, it seems to me that each of those cases would require a >> different defmodel, because they would have different initforms. Is >> that right? > > No. One of the most powerful features of Cells is an accident: OO works > now, because two instances of the same class can have different rules > (or a non-rule literal or an input cell allowing conventional procedural > code to alter a slot) for the same slot. This means more reuse for a > class, because normally the variation you describe requires one to > forever be creating new classes. The only question is whether you go > crazy and have just one class (say, polygon) or strike a middle ground > and have classes for triangle, quadrangle, etc. I guess it comes down to > how much you want to get out of method specialization, which obviously > calls for a different instance type. > > That said, I often create a class (a defmodel) just as a way of bundling > up a bunch of rules. ie, They can as well be functions or macros with a > make-instance 'polygon inside. I guess for debugging and inspecting > specifically a different class can be of use. > > You prolly do want a defmodel triangle, but going for isosceles might be > a point of dimishing return. > >> >> Anyway, assume I have that sorted out. Then, I'll create a bunch of >> instances of these classes. I'd start by putting one of them in the >> middle of the canvas. Then attach others to it, as dependents.So, if I >> then change a dimension on the original object, that change would have >> to propagate to all the dependent objects so they resize themselves. >> That part sounds like cells to me. >> >> The relationships will all be about geometry: coincident points, equal >> angles, similar figures, parallel lines, intersections, etc. "This >> triangle is rotated 45 degrees further than that one over there". And >> so on. Maybe circles as well, tangents, secants, etc. That's a lot of >> stuff right there. >> >> I've attached an image of the kind of thing I want to do. This one I >> created in Inkscape, but the UI there is somewhat horrid and it's easy >> for cumulative errors to creep in. But that was built up entirely from >> small squares and triangles. It's a reproduction of a tile pattern I >> saw in Sydney Australia when I went there earlier this year. > > Nice. > >> >> I was thinking I wanted a full blown geometric constraint solver, but >> I'm hoping that I don't need that. It's a lot of math ?and other >> theory I want to avoid learning at the moment. Cells looks like it >> might do the trick. I need to get more familiar with it though. > > Not sure where you need a solver, unless the idea is that you hope to > specify just a few parameters and let a solver figure out a pattern that > "works". Cells is not about that -- we specify all the rules and the > Cells engine just sees to it that the rules run. > > If you need something non-deterministic I would use Screamer+ to work > out the hard stuff and have cell rules mine the screamer results. > >> >> >> I also had a probably dumbass newbie question: Whenever I eval a >> (defmodel..) I get compiler errors, such as: >> >> CELLS> (defmodel hello-cells () >> ? ((num :accessor num :initarg :num :initform (c-in 0)) >> ? ?(square-num :accessor square-num >> ? ? ? ? ? ? ?:initform (c? (* (num self) (num self)))))) >> ;Compiler warnings : >> ; ? In an anonymous lambda form inside an anonymous lambda form inside >> an anonymous lambda form: Undefined function NUM >> ; ? In an anonymous lambda form inside an anonymous lambda form inside >> an anonymous lambda form: Undefined function NUM >> NIL >> CELLS> >> >> I imagine there's some delcaration I need to invoke to make that not >> happen. Any ideas? > > I actually see that from time to time, but rarely. There must be > something wrong with my eval-whens internal to defmodel. You won't see > those on subsequent iterations, so ignore them (or go crazy and debug > defmodel). > > cheers, ken > > > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel > From turbo24prg at web.de Tue Jun 30 21:32:02 2009 From: turbo24prg at web.de (=?ISO-8859-15?Q?Bastian_M=FCller?=) Date: Tue, 30 Jun 2009 21:32:02 +0000 Subject: [cells-devel] make-instance, initarg, c-in Message-ID: <4A4A8452.3000408@web.de> Hi, I'm currently using cells and it works very well, except one thing seems a little unhandy: When defining a model it's possible to use (c-in ..) as an initform to define a slot as a cell, but when instantiating a class you have to supply (c-in ...) instead the normal value, eg. (defmodel x () ((y :accessor y :initarg :y :initform (c-in nil)) ...)) (let ((test (make-instance 'x :y (c-in 1)))) (setf (y test) 2)) works, but instead sth like (let ((test (make-instance 'x :y 1))) (setf (y test) 2)) would be nice. I tried it with (defmethod initialize-instance ((self x) &rest rest) (loop for slot in rest by #'cddr do (let ((value (getf rest slot)) (name (intern (symbol-name slot)))) (setf (slot-value self name) (c-in value))))) but I just get: The slot CELLS::.CELLS is unbound in the object #. [Condition of type UNBOUND-SLOT] Is there any way to get this behavior? kind regards, Bastian From kentilton at gmail.com Tue Jun 30 22:50:50 2009 From: kentilton at gmail.com (Kenneth Tilton) Date: Tue, 30 Jun 2009 18:50:50 -0400 Subject: [cells-devel] make-instance, initarg, c-in In-Reply-To: <4A4A8452.3000408@web.de> References: <4A4A8452.3000408@web.de> Message-ID: <4A4A96CA.3000104@gmail.com> Bastian M?ller wrote: > Hi, > > I'm currently using cells and it works very well, > except one thing seems a little unhandy: > > When defining a model it's possible to use (c-in ..) > as an initform to define a slot as a cell, but when > instantiating a class you have to supply (c-in ...) > instead the normal value, eg. > > (defmodel x () > ((y :accessor y > :initarg :y > :initform (c-in nil)) > ...)) > > (let ((test (make-instance 'x :y (c-in 1)))) > (setf (y test) 2)) > > works, but instead sth like > > (let ((test (make-instance 'x :y 1))) > (setf (y test) 2)) > > would be nice. I have in fact considered such a thing (making c-input the default) but decided it was cray. A premise being that if you need a lot of c-inputs you are not really using Cells. So c-input is the rare one, and those should stand out and require a declaration from the programmer. > > I tried it with > > (defmethod initialize-instance ((self x) &rest rest) > (loop for slot in rest by #'cddr > do (let ((value (getf rest slot)) > (name (intern (symbol-name slot)))) > (setf (slot-value self name) > (c-in value))))) > > but I just get: > > The slot CELLS::.CELLS is unbound in the object #. > [Condition of type UNBOUND-SLOT] > > Is there any way to get this behavior? A whole lot of work, off the top of my head, but nothing profound cells-wise. kt