Serge Orlov wrote: > Ken Tilton wrote: > >>It is vastly more disappointing that an alleged tech genius would sniff >>at the chance to take undeserved credit for PyCells, something probably >>better than a similar project on which Adobe (your superiors at >>software, right?) has bet the ranch. This is the Grail, dude, Brooks's >>long lost Silver Bullet. And you want to pass????? >> >>C'mon, Alex, I just want you as co-mentor for your star quality. Of >>course you won't have to do a thing, just identify for me a True Python >>Geek and she and I will take it from there. >> >>Here's the link in case you lost it: >> >> http://www.lispnyc.org/wiki.clp?page=PyCells >> >>:) >> >>peace, kenny >> >>ps. flaming aside, PyCells really would be amazingly good for Python. >>And so Google. (Now your job is on the line. <g>) k > > > Perhaps I'm missing something...
yes, but do not feel bad, everyone gets confused by the /analogy/ to spreadsheets into thinking Cells /is/ a spreadsheet. In fact, for a brief period I swore off the analogy because it was so invariably misunderstood. Even Graham misunderstood it. But it is such a great analogy! <sigh> > but what's the big deal about PyCells? > Here is 22-lines barebones implementation of spreadsheet in Python, > later I create 2 cells "a" and "b", "b" depends on a and evaluate all > the cells. The output is > > a = negate(sin(pi/2)+one) = -2.0 > b = negate(a)*10 = 20.0 Very roughly speaking, that is supposed to be the code, not the output. So you would start with (just guessing at the Python, it has been years since I did half a port to Python): v1 = one a = determined_by(negate(sin(pi/2)+v1) b = determined_by(negate(a)*10) print(a) -> -2.0 ;; this and the next are easy print(b) -> 20 v1 = two ;; fun part starts here print(b) -> 40 ;; of course a got updated, too The other thing we want is (really inventing syntax here): on_change(a,new,old,old-bound?) print(list(new, old, old-bound?) Then the print statements Just Happen. ie, It is not as if we are just hiding computed variables behind syntax and computations get kicked off when a value is read. Instead, an underlying engine propagates any assignment throughout the dependency graph before the assignment returns. My Cells hack does the above, not with global variables, but with slots (data members?) of instances in the CL object system. I have thought about doing it with global variables such as a and b above, but never really seen much of need, maybe because I like OO and can always think of a class to create of which the value should be just one attribute. kenny -- Cells: http://common-lisp.net/project/cells/ "Have you ever been in a relationship?" Attorney for Mary Winkler, confessed killer of her minister husband, when asked if the couple had marital problems. -- http://mail.python.org/mailman/listinfo/python-list