From danlentz at gmail.com Sun Mar 18 18:20:05 2012 From: danlentz at gmail.com (Dan Lentz) Date: Sun, 18 Mar 2012 14:20:05 -0400 Subject: [cells-devel] functional programming Message-ID: <3257627306555759356@unknownmsgid> I'm an extreme newbie to cells and have just begun reviewing the literature so this may be a FAQ, but in general how does cells relate to "functional" programming practice? My first reaction is that is seems antithetical, as it inherently introduces state and eliminates referential transparency. However if one looks at it as a declarative approach in making statements about relations, perhaps not. maybe it can therefore be used in a functional style along the same lines as standard clos/mop, which can also be considered stateful if evaluated at the level of the individual sub protocols etc. Really my question is "is cells something one should consider if otherwise one has worked hard to achieve functional style practices?" ---- Replace the method the carefully chosen name deletes the comment From frgo at me.com Sun Mar 18 18:51:22 2012 From: frgo at me.com (Frank Goenninger) Date: Sun, 18 Mar 2012 19:51:22 +0100 Subject: [cells-devel] functional programming In-Reply-To: <3257627306555759356@unknownmsgid> References: <3257627306555759356@unknownmsgid> Message-ID: <3F5501E4-564D-4D4E-A6B0-553F8887FF73@me.com> Hi - Am 18.03.2012 um 19:20 schrieb Dan Lentz: > I'm an extreme newbie to cells and have just begun reviewing the > literature so this may be a FAQ, but in general how does cells relate > to "functional" programming practice? My first reaction is that is > seems antithetical, as it inherently introduces state and eliminates > referential transparency. However if one looks at it as a declarative > approach in making statements about relations, perhaps not. maybe it > can therefore be used in a functional style along the same lines as > standard clos/mop, which can also be considered stateful if evaluated > at the level of the individual sub protocols etc. > > Really my question is "is cells something one should consider if > otherwise one has worked hard to achieve functional style practices?" I don't know. I am answering questions like this for myself like: If it fits your needs then use it. If it doesn't, well, then don't use it. I, personally, didn't find anything non-functional in Cells the way I use it. Cheers Frank From frgo at me.com Sun Mar 18 21:53:13 2012 From: frgo at me.com (Frank Goenninger) Date: Sun, 18 Mar 2012 22:53:13 +0100 Subject: [cells-devel] Triple Cells: AllegroGraph 4.5 "porting" Message-ID: Hi Kenny, I just began using Triple Cells. We have planned a rather large AllegroGraph-based implementation and as a fan of Cells I am porting Triple Cells to AllegroGraph 4.5. I am running in a situation where I get a problem with 3c-pulse-advance: (I have instrumented 3c a bit ...;-) 0> PULSE> ---- advancing: (:change) 0> 3c-make storing type !hw:computer future-part 0> 3c-in nil t equal !hw:echo-happen {_:anon4} 0> stmt-new called with {_:anon3} !hw:happen {_:anon4} {_:anon4} 0> stmt-new (3c-cell? o) <_:anon4 type input> 0> 3c-install-cell called with s p o {_:anon3} !hw:happen {_:anon4} 0> subject-cells-node called with s = {_:anon3} 0> subject-cells-node tr nil 0> subject-cells-node new-blank-node {_:anon5} 0> subject-cells-node (add-triple s !ccc:cells n) 13 0> 3c-install-cell subject-cells-node s = {_:anon5} 0> subject-cells-node called with s = {_:anon3} 0> subject-cells-node tr <_:anon3 cells _:anon5> 0> subject-cells-node (object tr) = {_:anon5} 0> 3c-install-cell (add-triple (subject-cells-node s) p o) 14 0> 3c-install-cell (add-triple o !ccc:is-cell-of-model s) 15 0> 3c-install-cell (add-triple o !ccc:is-cell-of-predicate p) 16 0> stmt-new called with {_:anon3} !hw:location {_:anon6} {_:anon6} 0> stmt-new (3c-cell? o) <_:anon6 type ruled> 0> 3c-install-cell called with s p o {_:anon3} !hw:location {_:anon6} 0> subject-cells-node called with s = {_:anon3} 0> subject-cells-node tr <_:anon3 cells _:anon5> 0> subject-cells-node (object tr) = {_:anon5} 0> 3c-install-cell subject-cells-node s = {_:anon5} 0> subject-cells-node called with s = {_:anon3} 0> subject-cells-node tr <_:anon3 cells _:anon5> 0> subject-cells-node (object tr) = {_:anon5} 0> 3c-install-cell (add-triple (subject-cells-node s) p o) 22 0> 3c-install-cell (add-triple o !ccc:is-cell-of-model s) 23 0> 3c-install-cell (add-triple o !ccc:is-cell-of-predicate p) 24 0> stmt-new called with {_:anon3} !hw:response {_:anon7} {_:anon7} 0> stmt-new (3c-cell? o) <_:anon7 type ruled> 0> 3c-install-cell called with s p o {_:anon3} !hw:response {_:anon7} 0> subject-cells-node called with s = {_:anon3} 0> subject-cells-node tr <_:anon3 cells _:anon5> 0> subject-cells-node (object tr) = {_:anon5} 0> 3c-install-cell subject-cells-node s = {_:anon5} 0> subject-cells-node called with s = {_:anon3} 0> subject-cells-node tr <_:anon3 cells _:anon5> 0> subject-cells-node (object tr) = {_:anon5} 0> 3c-install-cell (add-triple (subject-cells-node s) p o) 31 0> 3c-install-cell (add-triple o !ccc:is-cell-of-model s) 32 0> 3c-install-cell (add-triple o !ccc:is-cell-of-predicate p) 33 0> cell-model called with c = {_:anon7} 0> cell-model object {_:anon3} 0> subject-cells-node called with s = {_:anon3} 0> subject-cells-node tr <_:anon3 cells _:anon5> 0> subject-cells-node (object tr) = {_:anon5} 0> subject-cells-node called with s = {_:anon3} 0> subject-cells-node tr <_:anon3 cells _:anon5> 0> subject-cells-node (object tr) = {_:anon5} 0> 3c-cell-pulse: c = {_:anon6} 0> 3c-cell-pulse: sp = nil 0> 3c-cell-pulse: sp is NIL ! It would help if you could shed some light on this ... (I know you have other stuff to do but still ;-) TIA! Hope all is fine on your side. Missing you on c.l.l. ... Cheers Frank From kentilton at gmail.com Mon Mar 19 14:24:21 2012 From: kentilton at gmail.com (Kenneth Tilton) Date: Mon, 19 Mar 2012 10:24:21 -0400 Subject: [cells-devel] functional programming In-Reply-To: <3257627306555759356@unknownmsgid> References: <3257627306555759356@unknownmsgid> Message-ID: <4F674195.9050109@gmail.com> On 3/18/2012 2:20 PM, Dan Lentz wrote: > I'm an extreme newbie to cells and have just begun reviewing the > literature so this may be a FAQ, but in general how does cells relate > to "functional" programming practice? My first reaction is that is > seems antithetical, as it inherently introduces state and eliminates > referential transparency. However if one looks at it as a declarative > approach in making statements about relations, perhaps not. maybe it > can therefore be used in a functional style along the same lines as > standard clos/mop, which can also be considered stateful if evaluated > at the level of the individual sub protocols etc. > > Really my question is "is cells something one should consider if > otherwise one has worked hard to achieve functional style practices?" I think you have it about right: Cell rules are nicely declarative and generally functional, but in the end Cells is all about managing a complex pile of application state representing . So, for example, the RoboCells implementation kept its own internal model of the game, with players and the ball modelled as CLOS instances. This model got updated as new sensory inputs were received. Sounds like "state" to me. :) That said, I imagine even functional programmers have to deal with long-lived models so maybe ....a monad? Sorry, I wish I knew more about the functional game. One thought that crosses my mind is Clojure with its functional state (if I have that right) and I know some folks over there were playing with implementing something Cells-ish in Clojure. Maybe chack in with those folks for thoughts from folks more functionally inclined than myself. > ---- > Replace the method > the carefully chosen name > deletes the comment Haha, I always love when during refactoring I come to a comment that is no longer needed because the comment was explaining something the refactoring fixed. Best, ken From frgo at me.com Sun Mar 18 22:04:09 2012 From: frgo at me.com (Frank Goenninger) Date: Sun, 18 Mar 2012 23:04:09 +0100 Subject: [cells-devel] Additional info AllegroGraph 4.5 porting: Screendump of RDF DB Message-ID: <1808EC68-3BC4-410F-9D9A-4254B30EC928@me.com> .... see attached screendump. TIA again. Cheers Frank -------------- next part -------------- A non-text attachment was scrubbed... Name: screendump-3c.pdf Type: application/pdf Size: 259312 bytes Desc: not available URL: From kentilton at gmail.com Mon Mar 19 14:47:26 2012 From: kentilton at gmail.com (Kenneth Tilton) Date: Mon, 19 Mar 2012 10:47:26 -0400 Subject: [cells-devel] Triple Cells: AllegroGraph 4.5 "porting" In-Reply-To: References: Message-ID: <4F6746FE.6090205@gmail.com> On 3/18/2012 5:53 PM, Frank Goenninger wrote: > Hi Kenny, > > I just began using Triple Cells. We have planned a rather large AllegroGraph-based implementation and as a fan of Cells I am porting Triple Cells to AllegroGraph 4.5. Great. I love the data model (and you know I love Cells). On my project we have a PostGres table called "triple". Only problem is the object column because SQL does not like untyped columns (so I create object columns for any type I need to store ). > > I am running in a situation where I get a problem with 3c-pulse-advance: > (I have instrumented 3c a bit ...;-) > > 0> PULSE> ---- advancing: (:change) > 0> 3c-make storing type !hw:computer future-part > 0> 3c-in nil t equal !hw:echo-happen {_:anon4} > 0> stmt-new called with {_:anon3} !hw:happen {_:anon4} {_:anon4} > 0> stmt-new (3c-cell? o)<_:anon4 type input> > 0> 3c-install-cell called with s p o {_:anon3} !hw:happen {_:anon4} > 0> subject-cells-node called with s = {_:anon3} > 0> subject-cells-node tr nil > 0> subject-cells-node new-blank-node {_:anon5} > 0> subject-cells-node (add-triple s !ccc:cells n) 13 > 0> 3c-install-cell subject-cells-node s = {_:anon5} > 0> subject-cells-node called with s = {_:anon3} > 0> subject-cells-node tr<_:anon3 cells _:anon5> > 0> subject-cells-node (object tr) = {_:anon5} > 0> 3c-install-cell (add-triple (subject-cells-node s) p o) 14 > 0> 3c-install-cell (add-triple o !ccc:is-cell-of-model s) 15 > 0> 3c-install-cell (add-triple o !ccc:is-cell-of-predicate p) 16 > 0> stmt-new called with {_:anon3} !hw:location {_:anon6} {_:anon6} > 0> stmt-new (3c-cell? o)<_:anon6 type ruled> > 0> 3c-install-cell called with s p o {_:anon3} !hw:location {_:anon6} > 0> subject-cells-node called with s = {_:anon3} > 0> subject-cells-node tr<_:anon3 cells _:anon5> > 0> subject-cells-node (object tr) = {_:anon5} > 0> 3c-install-cell subject-cells-node s = {_:anon5} > 0> subject-cells-node called with s = {_:anon3} > 0> subject-cells-node tr<_:anon3 cells _:anon5> > 0> subject-cells-node (object tr) = {_:anon5} > 0> 3c-install-cell (add-triple (subject-cells-node s) p o) 22 > 0> 3c-install-cell (add-triple o !ccc:is-cell-of-model s) 23 > 0> 3c-install-cell (add-triple o !ccc:is-cell-of-predicate p) 24 > 0> stmt-new called with {_:anon3} !hw:response {_:anon7} {_:anon7} > 0> stmt-new (3c-cell? o)<_:anon7 type ruled> > 0> 3c-install-cell called with s p o {_:anon3} !hw:response {_:anon7} > 0> subject-cells-node called with s = {_:anon3} > 0> subject-cells-node tr<_:anon3 cells _:anon5> > 0> subject-cells-node (object tr) = {_:anon5} > 0> 3c-install-cell subject-cells-node s = {_:anon5} > 0> subject-cells-node called with s = {_:anon3} > 0> subject-cells-node tr<_:anon3 cells _:anon5> > 0> subject-cells-node (object tr) = {_:anon5} > 0> 3c-install-cell (add-triple (subject-cells-node s) p o) 31 > 0> 3c-install-cell (add-triple o !ccc:is-cell-of-model s) 32 > 0> 3c-install-cell (add-triple o !ccc:is-cell-of-predicate p) 33 > 0> cell-model called with c = {_:anon7} > 0> cell-model object {_:anon3} > 0> subject-cells-node called with s = {_:anon3} > 0> subject-cells-node tr<_:anon3 cells _:anon5> > 0> subject-cells-node (object tr) = {_:anon5} > 0> subject-cells-node called with s = {_:anon3} > 0> subject-cells-node tr<_:anon3 cells _:anon5> > 0> subject-cells-node (object tr) = {_:anon5} > 0> 3c-cell-pulse: c = {_:anon6} > 0> 3c-cell-pulse: sp = nil > 0> 3c-cell-pulse: sp is NIL ! > > It would help if you could shed some light on this ... Not sure I follow the output, but that could be because I have not looked at triplecells in ages. I do not even have that source on this laptop! Big Q: the above looks like it is from the Hello World example/test. Yes? Is sp the current datapulse? I notice your log does not include that, and I would think that would be interesting (unless of course as it seems the whole history is one pulse ) I can try looking at this tonight. Are you free to send me your triple cells project so I have your diagnostics (and just to be sure we are debugging the same thing)? Good to hear from you! ken > (I know you have other stuff to do but still ;-) > > TIA! > > Hope all is fine on your side. Missing you on c.l.l. ... > > Cheers > Frank > > > > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel From frgo at me.com Mon Mar 19 22:04:56 2012 From: frgo at me.com (Frank Goenninger) Date: Mon, 19 Mar 2012 23:04:56 +0100 Subject: [cells-devel] Triple Cells: AllegroGraph 4.5 "porting" In-Reply-To: <4F6746FE.6090205@gmail.com> References: <4F6746FE.6090205@gmail.com> Message-ID: Am 19.03.2012 um 15:47 schrieb Kenneth Tilton: > On 3/18/2012 5:53 PM, Frank Goenninger wrote: >> Hi Kenny, >> >> I just began using Triple Cells. We have planned a rather large AllegroGraph-based implementation and as a fan of Cells I am porting Triple Cells to AllegroGraph 4.5. > > Great. I love the data model (and you know I love Cells). On my project we have a PostGres table called "triple". Only problem is the object column because SQL does not like untyped columns (so I create object columns for any type I need to store ). Wow - I thought BLOBs would be the way to go. For PostgreSQL, it's this: http://www.postgresql.org/docs/current/static/datatype-binary.html [snip] >> 0> 3c-cell-pulse: sp = nil >> 0> 3c-cell-pulse: sp is NIL ! >> >> It would help if you could shed some light on this ... > > Not sure I follow the output, but that could be because I have not looked at triplecells in ages. I do not even have that source on this laptop! > > Big Q: the above looks like it is from the Hello World example/test. Yes? It is! I just instrumented it a bit with lots of calls to #'trc. > Is sp the current datapulse? Yes, as in: (defun 3c-cell-pulse (c) (trc "3c-cell-pulse: c = " c) (let ((sp (get-sp c !ccc:pulse))) (trc "3c-cell-pulse: sp = " sp) (if sp (progn (let ((object (object sp))) (trc "3c-cell-pulse object" object) object)) ;; <<<<----- This is the datapulse, I assume ... (progn (trc "3c-cell-pulse: sp is NIL !") (break))))) It is right at the first time #'3c-cell-pulse is called when it fails... I am still trying to wrap my head around your use of subject, predicate, object in 3c ;-) It get's pretty "anonymous" with all those "anon" blank nodes ... > I notice your log does not include that, and I would think that would be interesting (unless of course as it seems the whole history is one pulse ) I /think/ it's one pulse (there's only one call to #'3c-pulse-advance)... > I can try looking at this tonight. Are you free to send me your triple cells project so I have your diagnostics (and just to be sure we are debugging the same thing)? Sure - see attachment. I suggest you unzip it somewhere and wade through it ;-) The main files are ccagcore/object-store.lisp and the triple-cells files, of course. > Good to hear from you! > > ken Ha, seems as if you're kind of busy these days. Would love to meet with you some time - do you plan to go to ILC this year ? Cheers Frank -------------- next part -------------- A non-text attachment was scrubbed... Name: triple-cells.zip Type: application/zip Size: 15446 bytes Desc: not available URL: From kentilton at gmail.com Tue Mar 20 14:10:15 2012 From: kentilton at gmail.com (Kenneth Tilton) Date: Tue, 20 Mar 2012 10:10:15 -0400 Subject: [cells-devel] Triple Cells: AllegroGraph 4.5 "porting" In-Reply-To: References: <4F6746FE.6090205@gmail.com> Message-ID: <4F688FC7.3030201@gmail.com> On 3/19/2012 6:04 PM, Frank Goenninger wrote: > Am 19.03.2012 um 15:47 schrieb Kenneth Tilton: > >> On 3/18/2012 5:53 PM, Frank Goenninger wrote: >>> Hi Kenny, >>> >>> I just began using Triple Cells. We have planned a rather large AllegroGraph-based implementation and as a fan of Cells I am porting Triple Cells to AllegroGraph 4.5. >> Great. I love the data model (and you know I love Cells). On my project we have a PostGres table called "triple". Only problem is the object column because SQL does not like untyped columns (so I create object columns for any type I need to store). > Wow - I thought BLOBs would be the way to go. For PostgreSQL, it's this: > http://www.postgresql.org/docs/current/static/datatype-binary.html Hey, good idea. Thanks. > > [snip] > >>> 0> 3c-cell-pulse: sp = nil >>> 0> 3c-cell-pulse: sp is NIL ! >>> >>> It would help if you could shed some light on this ... >> Not sure I follow the output, but that could be because I have not looked at triplecells in ages. I do not even have that source on this laptop! >> >> Big Q: the above looks like it is from the Hello World example/test. Yes? > It is! I just instrumented it a bit with lots of calls to #'trc. > >> Is sp the current datapulse? > Yes, as in: > > (defun 3c-cell-pulse (c) > (trc "3c-cell-pulse: c = " c) > (let ((sp (get-sp c !ccc:pulse))) > (trc "3c-cell-pulse: sp = " sp) > (if sp > (progn > (let ((object (object sp))) > (trc "3c-cell-pulse object" object) > object)) ;;<<<<----- This is the datapulse, I assume ... > (progn > (trc "3c-cell-pulse: sp is NIL !") > (break))))) > > It is right at the first time #'3c-cell-pulse is called when it fails... I am still trying to wrap my head around your use of subject, predicate, object in 3c ;-) It get's pretty "anonymous" with all those "anon" blank nodes ... Yeah, blank nodes are hard to look at. In the above get-sp is supposed to return a triple, the object of which is the datapulse. So the question is why get-sp returns nil? You are right, btw, I am so busy I forgot to look at the code when I got home. I just spent ten minutes just looking at the code and, wow, this will take some refreshing and I'll have to run it and trace a bit to see what is up. I'll see if I can get to it tonight. Have you ever run it on any AG4.x? I do know there have been enough changes that I am not surprised we have to get the hood up. One thought: did you add the bit that complains about not getting a pulse? Since this is early in the life of the cell I can imagine that the intent was to treat a missing !pulse as "uninitialized". In which case I think the error you got was in the caller where upi= tries to compare UPIs and it gets upset over being passed nil. In which case it would just mean they tightened up something and we need to do our own more flexible upi-equal or something. I will probably start by grabbing triple cells off github and start from there just to reduce the variables. cheers, ken > >> I notice your log does not include that, and I would think that would be interesting (unless of course as it seems the whole history is one pulse) > I /think/ it's one pulse (there's only one call to #'3c-pulse-advance)... > >> I can try looking at this tonight. Are you free to send me your triple cells project so I have your diagnostics (and just to be sure we are debugging the same thing)? > Sure - see attachment. I suggest you unzip it somewhere and wade through it ;-) The main files are ccagcore/object-store.lisp and the triple-cells files, of course. > >> Good to hear from you! >> >> ken > Ha, seems as if you're kind of busy these days. Would love to meet with you some time - do you plan to go to ILC this year ? > > Cheers > Frank From frgo at me.com Tue Mar 20 16:29:47 2012 From: frgo at me.com (Frank Goenninger) Date: Tue, 20 Mar 2012 17:29:47 +0100 Subject: [cells-devel] Triple Cells: AllegroGraph 4.5 "porting" In-Reply-To: <4F688FC7.3030201@gmail.com> References: <4F6746FE.6090205@gmail.com> <4F688FC7.3030201@gmail.com> Message-ID: <03E59DBC-6344-432E-AF90-656E9371D59F@me.com> Am 20.03.2012 um 15:10 schrieb Kenneth Tilton: > In the above get-sp is supposed to return a triple, the object of which is the datapulse. So the question is why get-sp returns nil? Yep, true. > You are right, btw, I am so busy I forgot to look at the code when I got home. hehe, hope that whatever is keeping you busy is kind of cool and worth the sweat ;-) > I just spent ten minutes just looking at the code and, wow, this will take some refreshing and I'll have to run it and trace a bit to see what is up. I'll see if I can get to it tonight. Would be good ... ;-) > > Have you ever run it on any AG4.x? I do know there have been enough changes that I am not surprised we have to get the hood up. I only do AG4.5. Earlier versions don't work anymore - many API changes. You see a (require :agraph4) instead of just :agraph in my Triple-Cells variant (file defpackage.lisp). AG4.x is the currently distributed stuff, so no reason to do earlier versions. > One thought: did you add the bit that complains about not getting a pulse? I ran into an error due to sp being nil: (object sp) barfs then, of course. > Since this is early in the life of the cell I can imagine that the intent was to treat a missing !pulse as "uninitialized". In which case I think the error you got was in the caller where upi= tries to compare UPIs and it gets upset over being passed nil. In which case it would just mean they tightened up something and we need to do our own more flexible upi-equal or something. Ah - yes, that sounds like something worth exploring! > I will probably start by grabbing triple cells off github and start from there just to reduce the variables. Yep, I see - only thing is to also download AG4.5 server and also AG4.5 clients from Franz and run against that AG4.5 server. > > cheers, ken Thanks much! Cheers Frank From kentilton at gmail.com Tue Mar 20 17:27:20 2012 From: kentilton at gmail.com (Kenneth Tilton) Date: Tue, 20 Mar 2012 13:27:20 -0400 Subject: [cells-devel] Triple Cells: AllegroGraph 4.5 "porting" In-Reply-To: <03E59DBC-6344-432E-AF90-656E9371D59F@me.com> References: <4F6746FE.6090205@gmail.com> <4F688FC7.3030201@gmail.com> <03E59DBC-6344-432E-AF90-656E9371D59F@me.com> Message-ID: <4F68BDF8.3090406@gmail.com> On 3/20/2012 12:29 PM, Frank Goenninger wrote: > Am 20.03.2012 um 15:10 schrieb Kenneth Tilton: > >> In the above get-sp is supposed to return a triple, the object of which is the datapulse. So the question is why get-sp returns nil? > Yep, true. > >> You are right, btw, I am so busy I forgot to look at the code when I got home. > hehe, hope that whatever is keeping you busy is kind of cool and worth the sweat ;-) > >> I just spent ten minutes just looking at the code and, wow, this will take some refreshing and I'll have to run it and trace a bit to see what is up. I'll see if I can get to it tonight. > Would be good ... ;-) > >> Have you ever run it on any AG4.x? I do know there have been enough changes that I am not surprised we have to get the hood up. > I only do AG4.5. Earlier versions don't work anymore - many API changes. You see a (require :agraph4) instead of just :agraph in my Triple-Cells variant (file defpackage.lisp). AG4.x is the currently distributed stuff, so no reason to do earlier versions. > >> One thought: did you add the bit that complains about not getting a pulse? > I ran into an error due to sp being nil: (object sp) barfs then, of course. > >> Since this is early in the life of the cell I can imagine that the intent was to treat a missing !pulse as "uninitialized". In which case I think the error you got was in the caller where upi= tries to compare UPIs and it gets upset over being passed nil. In which case it would just mean they tightened up something and we need to do our own more flexible upi-equal or something. > Ah - yes, that sounds like something worth exploring! > >> I will probably start by grabbing triple cells off github and start from there just to reduce the variables. > Yep, I see - only thing is to also download AG4.5 server and also AG4.5 clients from Franz and run against that AG4.5 server. Ugh, and find a Linux machine. I forgot about all that. Is AG3 still available? You could use it to figure out what should be happening, and confirm my guess that you can just take 3c-cell-pulse and make it look like 3c-pulse: test that the triple is found before returning the object. You may then blow up on testing upi= with nil, but just do my suggested upi-equal. I took some time to look at the code and I do not see that tcells get their !pulse set when created, nor do I see ensure-current being called necessarily up front, so it might just work if you make this one change. The danger is that some incompatibility somewhere else is changing the code path so that initialization or ensure-current is different, in which case the above fix would just mask the real problem -- but then it should break again soon enough. If AG3 can be had for Windows I could give it a try, if not it might be a while before I can get to a Linux set-up. Falback is a painful email debugging, with more diagnostics. btw, are you dying on the test build or reopen? -kt > >> cheers, ken > Thanks much! > > Cheers > Frank > From frgo at me.com Tue Mar 20 17:50:48 2012 From: frgo at me.com (Frank Goenninger) Date: Tue, 20 Mar 2012 18:50:48 +0100 Subject: [cells-devel] Triple Cells: AllegroGraph 4.5 "porting" In-Reply-To: <4F68BDF8.3090406@gmail.com> References: <4F6746FE.6090205@gmail.com> <4F688FC7.3030201@gmail.com> <03E59DBC-6344-432E-AF90-656E9371D59F@me.com> <4F68BDF8.3090406@gmail.com> Message-ID: <470AAE65-8235-4F2E-B27B-90D54F9C119B@me.com> Am 20.03.2012 um 18:27 schrieb Kenneth Tilton: > Ugh, and find a Linux machine. I forgot about all that. No need to! Just DL VMware Fusion and run a pre-packaged, complete VM from Franz with AG4.5 server! Really easy ... > > Is AG3 still available? No. > You could use it to figure out what should be happening, and confirm my guess that you can just take 3c-cell-pulse and make it look like 3c-pulse: test that the triple is found before returning the object. You may then blow up on testing upi= with nil, but just do my suggested upi-equal. > > I took some time to look at the code and I do not see that tcells get their !pulse set when created, nor do I see ensure-current being called necessarily up front, so it might just work if you make this one change. ah ... Beginning to understand ... > > The danger is that some incompatibility somewhere else is changing the code path so that initialization or ensure-current is different, in which case the above fix would just mask the real problem -- but then it should break again soon enough. > > If AG3 can be had for Windows I could give it a try, if not it might be a while before I can get to a Linux set-up. See above, The VMware Fusion of VMware Player is available for Windows, too! > > Falback is a painful email debugging, with more diagnostics. oh yeah ... > > btw, are you dying on the test build or reopen? On the test build already. ;; Frank From kentilton at gmail.com Thu Mar 22 17:20:50 2012 From: kentilton at gmail.com (Kenneth Tilton) Date: Thu, 22 Mar 2012 13:20:50 -0400 Subject: [cells-devel] TripleCells: A new twist to the unbound variable CACHE challenge ... In-Reply-To: References: Message-ID: <4F6B5F72.4040203@gmail.com> On 3/21/2012 3:44 PM, Frank Goenninger wrote: >>> Von: Kenneth Tilton >>> Datum: 21. M?rz 2012 14:57:23 MEZ >>> An: Frank Goenninger >>> Betreff: Re: [cells-devel] Triple Cells: AllegroGraph 4.5 "porting" >>> >>> Sorry, we went so late last night I completely forgot about this. I'll keep trying to find time (and keep sending me emails so I remember to). I will try to dig thru the below. >>> >>> Do I gather there is a new error now about CACHE? I do not even recognize that. > After a full recompile I get another error: > Error: Attempt to take the value of the unbound variable `CACHE'. > > Note: Not cache? but cache ... > > Digging into the 3c code reveals: > > The cell rule gets stored as a string. This is done in #'3c? : > > (defmacro 3c? (rule&key test ephemeral observer) > `(call-3c? '(lambda (node cache cache?) ;;<<<<<<<<------ This is the "offending" LoC ... > (declare (ignorable cache cache?)) > (let ((*calc-nodes* (cons node *calc-nodes*))) > ,rule)) ;;<<<<<<<<<------ There cache is not defined anymore - see below for explanation ... > :test ,test > :observer ,observer > :ephemeral ,ephemeral)) > > When running #'test-prep I get the following last lines in a trace: > > 0> 3c?-rule: got rule "(lambda (triple-cells::node triple-cells::cache triple-cells::cache?) > (declare (ignorable triple-cells::cache triple-cells::cache?)) > (let ((triple-cells::*calc-nodes* > (cons triple-cells::node triple-cells::*calc-nodes*))) > (let ((h (3c (3c-find-id \"dell\") !hw:happen))) > (trc \"rule sees happen\" h) > (cond ((string-equal h \"arrive\") \"home\") > ((string-equal h \"leave\") \"away\") > (triple-cells::cache? cache) > (t \"away\")))))" > > I can't see what is wrong with this... cache needs the explicit package as well: (cond ((string-equal h \"arrive\") \"home\") ((string-equal h \"leave\") \"away\") (triple-cells::cache? triple-cells::cache) ;;<-- need package on both (t \"away\")))))" HTH, ken