Peter Hildebrandt | 1 Aug 14:59 2008
Picon

Re: [cells-devel] Re: installation notes, type error in test-gtk

On Fri, Jul 25, 2008 at 5:38 PM, Kenny Tilton <kennytilton <at> optonline.net> wrote:
> Laziz Foo wrote:
>>>
>>> Thanks! So I have lost track, is this Cells-Gtk3 (with Cells 3 Inside) or
>>> Oldskool Cells-Gtk?
>>
>>
>> This is cells-gtk3.  Oldschool works out of the box, but I wanted the
>> cairo stuff.
>
> And you got help from someone other than Peter H so it sounds as if CG3 has
> taken hold. Cool.
>
> So it is a battle to death between Cello and Cells-Gtk3 for GUI supremacy?
> Awesome.

I'm afraid I won't be able to push cells-gtk as much in the near
future.  Now that I have a job and a new apartment, Real Life keeps me
quite busy.

So 1:0 for cello ...

>> It also occurs to me that
>> if the 'yobbos' really wanted to popularize lisp, they'd find some way
>> to use cells-*tk to create a Visual Studio-like thingy that would
>> enable any CTO's nephew to say, "Oh lisp-- yeah, I do that."
>
> It would not help, I think. Programming is receding into the background (or
> India or Russia or China) of culture. Once was a time lotsa people wired up
> electronics. The career is still there for the odd weirdo, but -- well, it's
(Continue reading)

Kenny Tilton | 3 Aug 13:34 2008
Picon

Real-World Cells...

Ever wonder what real-world Cells looks like?

     http://www.theoryyalgebra.com/

...only for Windows at this point, but based on Cello which runs 
everywhere so just a matter or priorities. As the page says, intro guide 
inside zip.

Learned quite a few Deep Lessons when I got lazy and went "procedural" 
with a lot of SETFing in observers. Maybe not lazy, we never want to be 
slave to a paradigm. Anyway, I sure climbed that learning curve and it 
is a funny one when one tries to do a few SETFs (to other Cells) in an 
observer. Doable in the end and predictable and understandable once one 
knows The Way(tm), but till then... ugh.

I might also see Cells/4 from where I am standing. It would start by 
making the Procedural Cells (Procells?) easier, and unrelatedly solve a 
referential integrity problem I keep running into, where the instance 
owning a Cell I am using gets not-to-be'ed but I did not learn about the 
instance (in that rule) by reading a kids slot so I have no clue that I 
am depending on a dead cell. Until I run again. :)

Anyway, right now I am just trying to stave off bankruptcy so I can keep 
doing open source (and eat) so I would be very appreciative to anyone 
who could check out the software at this early alpha stage so i can get 
to beta and start pestering non-techie math people knowing the download 
they encounter more or less works.

Just downloading and running and seeing if it works would help, btw.

(Continue reading)

Mayson Lancaster | 8 Aug 22:38 2008
Picon

Greenspunning Cells in C++

Just listened to a google techtalk by Sean Parent from Adobe which I (perhaps incorrectly) would characterise by the above subject.

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/4moyKUHApq4&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/4moyKUHApq4&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object>

Code at: http://stlab.adobe.com/

Papers/book in progress: http://www.stepanovpapers.com/

fwiw

Mayson

<div><p>Just listened to a google techtalk by Sean Parent from Adobe which I (perhaps incorrectly) would characterise by the above subject.<br><br>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="<a href="http://www.youtube.com/v/4moyKUHApq4&amp;hl=en&amp;fs=1">http://www.youtube.com/v/4moyKUHApq4&amp;hl=en&amp;fs=1</a>"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="<a href="http://www.youtube.com/v/4moyKUHApq4&amp;hl=en&amp;fs=1">http://www.youtube.com/v/4moyKUHApq4&amp;hl=en&amp;fs=1</a>" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;<br><br>Code at: <a href="http://stlab.adobe.com/">http://stlab.adobe.com/</a><br><br>Papers/book in progress: <a href="http://www.stepanovpapers.com/">http://www.stepanovpapers.com/</a><br><br>fwiw<br><br>Mayson<br></p></div>
Kenny Tilton | 9 Aug 00:32 2008
Picon

Re: Greenspunning Cells in C++

Mayson Lancaster wrote:
> Just listened to a google techtalk by Sean Parent from Adobe which I 
> (perhaps incorrectly) would characterise by the above subject.

Yes, I cite Adam in the prior art section of cells-manifesto.txt.

I am happy to see they are still at it. I saw Parent's excitement when 
they first released Adam, sounded familiar <g>, but I never saw much 
come of it.

kt

Kenny Tilton | 9 Aug 00:36 2008
Picon

Re: Greenspunning Cells in C++

Kenny Tilton wrote:
> Mayson Lancaster wrote:
>> Just listened to a google techtalk by Sean Parent from Adobe which I 
>> (perhaps incorrectly) would characterise by the above subject.
> 
> Yes, I cite Adam in the prior art section of cells-manifesto.txt.

Sorry, that should be "posterior art". :)

kt

Kenny Tilton | 9 Aug 00:39 2008
Picon

Re: Greenspunning Cells in C++

Kenny Tilton wrote:
> Mayson Lancaster wrote:
>> Just listened to a google techtalk by Sean Parent ...

Given on my birthday. Coincidence? I don't think so!!!

:)

kenny

Mikko Ahonen | 10 Aug 18:42 2008

Current DP not GE pulse ...

Hello,

Small issue I seem to constantly run into while debugging Cells source code:

First, I sometimes get "New as of Cells3: parent must be supplied to make-instance of .." for various reasons.  For example now I used c? for cell that did not refer to any other cell. Anyway, this is expected.

But even if I run (cells-reset) and then try running it again, I get this kind of error messages below.  It is slightly annoying to have to start the environment when this happens.

Current DP 1 not GE pulse 85 of cell (Foo . <vld>)<85:A VISIBLE-NAME/#<ROLE 22356BC7> = Foo>

Is there some simple workaround?

Best regards,

Mikko Ahonen
<div><div dir="ltr">Hello,<br><br>Small issue I seem to constantly run into while debugging Cells source code:<br><br>First, I sometimes get "New as of Cells3: parent must be supplied to make-instance of .." for various reasons.&nbsp; For example now I used c? for cell that did not refer to any other cell. Anyway, this is expected. <br><br>But even if I run (cells-reset) and then try running it again, I get this kind of error messages below.&nbsp; It is slightly annoying to have to start the environment when this happens.<br><br>Current DP 1 not GE pulse 85 of cell (Foo . &lt;vld&gt;)&lt;85:A VISIBLE-NAME/#&lt;ROLE 22356BC7&gt; = Foo&gt;<br><br>Is there some simple workaround?<br><br>Best regards,<br><br>Mikko Ahonen<br>
</div></div>
Kenny Tilton | 10 Aug 19:22 2008
Picon

Re: Current DP not GE pulse ...

Mikko Ahonen wrote:
> Hello,
> 
> Small issue I seem to constantly run into while debugging Cells source code:
> 
> First, I sometimes get "New as of Cells3: parent must be supplied to 
> make-instance of .." for various reasons.

Hmmm. That is just the family class, yes? If you are not specifying the 
:fm-parent, yep, that is what happens. Aside: I could probably relax 
that requirement, I think it just had to do with "kid-slotting", used 
only in GUI containers. Anyway..

>  For example now I used c? for 
> cell that did not refer to any other cell. Anyway, this is expected.

Not by me. :) A Cell not using another Cell is fine. I often use a rule 
just to achieve an initform that can see the instance being initialized. 
And I don't see how this ties into :fm-parent not being specified.

Probably just a failure of my imagination. Want to post some code?

> 
> But even if I run (cells-reset) and then try running it again, I get 
> this kind of error messages below.  It is slightly annoying to have to 
> start the environment when this happens.
> 
> Current DP 1 not GE pulse 85 of cell (Foo . <vld>)<85:A 
> VISIBLE-NAME/#<ROLE 22356BC7> = Foo>
> 
> Is there some simple workaround?

I have to think that although you are doing a cells-reset you are also 
then continuing work with existing model instances who still remember 
the last DP. If not, I am stumped and would need to see some code. If 
so, the simple workaround would be to set up your tests so a new test 
run starts with cells-reset and then recreates the entire universe of 
model instances you want to work with.

Other than that, you might be able to hack Cells quickly to respond to a 
/lower/ DP by simply treating that condition as "out of date" so the 
recalculation mechanism cuts in, at the end of which the new lower DP 
would replace the obsolete DP. I doubt we could claim integrity was 
being preserved because now rules and observers are running for no 
reason, but I wager there would rarely be an actuall ill effect.

cheers, kenneth
\
Andy Chambers | 13 Aug 23:54 2008

the cells way

Hey,

In openair, I'm getting problems with dead instances.  I think its
maybe because I'm working against cells.

What I need to do is keep track somewhere of all the nodes that change
in response to a request.  Currently, this is done using an "update"
slot which we setf on an xhtml observer.

(defobserver xhtml ((self html))
  (when (and new-value
	     (do-send self new-value old-value))
    (trc "new xhtml" new-value)
      (setf (update self)
	    (format nil "$(\"#~a\").replaceWith(\"~a\")" (md-name self)
		    (js-escape new-value)))))

When a new request comes in, we do the following:

  - walk the family tree, setting the update slot to nil.
  - feed the request parameters into the model
  - walk the family tree looking for places where update is not nil
and sending it to the browser

In some cases, that works fine but in others, we find dead cells while
walking the tree the first time.

Another point to note is that the update slot is specified as :cell
nil.  Based on its purpose and usage, does that make sense?

Should I be wrapping this traversal in with-integrity or something?

Cheers,
Andy
Kenny Tilton | 14 Aug 01:34 2008
Picon

Re: the cells way

Andy Chambers wrote:
> Hey,
> 
> In openair, I'm getting problems with dead instances.  I think its
> maybe because I'm working against cells.

Maybe, maybe not. I get this all the time, and although many times I can 
find a way to re-express my problem to avoid dead instances I would love 
to make this easier. Naturally and sensibly written code leads to dead 
instances, and we want that kind of code to Just Work, not make the 
programmer stop and scratch their head for an hour working around it. 
But for now....

> 
> What I need to do is keep track somewhere of all the nodes that change
> in response to a request.  Currently, this is done using an "update"
> slot which we setf on an xhtml observer.
> 
> (defobserver xhtml ((self html))
>   (when (and new-value
> 	     (do-send self new-value old-value))
>     (trc "new xhtml" new-value)
>       (setf (update self)
> 	    (format nil "$(\"#~a\").replaceWith(\"~a\")" (md-name self)
> 		    (js-escape new-value)))))
> 
> When a new request comes in, we do the following:
> 
>   - walk the family tree, setting the update slot to nil.
>   - feed the request parameters into the model
>   - walk the family tree looking for places where update is not nil
> and sending it to the browser
> 
> In some cases, that works fine but in others, we find dead cells while
> walking the tree the first time.

(1) Do you mean dead instances or dead Cells?
(2) If instances, and if the tree is a cells-mediated tree, ie 
family/.kids, it is not clear to me how dead children instances would be 
encountered.

What I see a lot is that I have a blinking edit caret watching the 
application focus and then the student quits a quiz and returns to the 
quiz menu. If I do not have code all over the map clearing the 
application focus the edit caret (a global thing, perhaps my real 
problem) ends up looking at a dead instance on the next blink. But that 
is because the application focus is an input Cell setf'ed by application 
code (setf being the root of all evil).

It is not always easy, but have you ever spent an hour trying to figure 
out how this actually happens? Exactly why does the traversal lead to a 
dead instance? Was someone keeping a reference to someone else instead 
of going thru channels (an fm-find)?

Another possibility may have to do with stuff forever coming and going 
as rules re-run and create all new instances even when just a small bit 
of the graph actually needs adding or removing. That /should/ work, but 
if you are keeping references to nodes such churning will break your 
code faster. Here again, tho, the problem would be keeping long-lived 
references vs. always going and looking for stuff such that only current 
instances get encountered.

To summarize, it /is/ a problem in general but I would like to know 
exactly how you hit these dead instances because it will change what I 
recommend.

FYI, one thing I am having luck with is a heavy hammer: md-slot-value 
not returning any value it sees is an MDEAD (sorry, that was just a 
debugging function at first, should be md-dead? or md-deadp) instance 
and returning nil when asked for any slot of an MDEAD instance. But that 
of course wll not always work, so let's not consider these until we 
understand exactly how deads are bein hit.

> 
> Another point to note is that the update slot is specified as :cell
> nil.  Based on its purpose and usage, does that make sense?

Yes.

> 
> Should I be wrapping this traversal in with-integrity or something?
> 

Hmmm. Hang on. Digression: Are you using lazy cells? Sorry, I forgot the 
details. If so, just traversing the tree and reading lazy cells will 
trigger Cells stuff and observers etc etc. Anyway, no, a toplevel model 
perturbation gets silently wrapped in with-integrity. It is necessary 
(as I say, even a read can kick off change) but I managed to hide that 
from the developer. Same goal: Cells should be as easy to live with as 
they are functionally powerful, or we are just replacing one hassle with 
another.

kt


Gmane