From peter.hildebrandt at gmail.com Fri Aug 1 12:59:00 2008 From: peter.hildebrandt at gmail.com (Peter Hildebrandt) Date: Fri, 1 Aug 2008 14:59:00 +0200 Subject: [cells-devel] Re: [cells-gtk-devel] installation notes, type error in test-gtk In-Reply-To: <4889F375.5080500@optonline.net> References: <873e58110807231821t6268cd9k67ecb764f0b1d3ff@mail.gmail.com> <4888237E.8090308@optonline.net> <873e58110807241948p7987fa79o59103a9487c16aa2@mail.gmail.com> <48897488.5040306@optonline.net> <873e58110807250417h2944ef2ax683baceca25bb2a0@mail.gmail.com> <4889F375.5080500@optonline.net> Message-ID: <7758b2680808010559ncae0ddgb7bdec5570c561cf@mail.gmail.com> On Fri, Jul 25, 2008 at 5:38 PM, Kenny Tilton 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 > like shade-tree auto mechanics: gone along with the simple technology. I'd rather say it is like manufacturing: Programming has become a commodity rather than an art, so the big players produce where it is cheapest. So yes, the point-and-click low-barriers code writing will be gone soon, along with making sneakers, plastic toys, and printed circuit boards. But -- every now and then a handful of smart people realizes that there is more to programming than typing code, and then they create something great. Those people don't care about shiny IDEs, tho. Peter From kennytilton at optonline.net Sun Aug 3 11:34:41 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Sun, 03 Aug 2008 07:34:41 -0400 Subject: [cells-devel] Real-World Cells... Message-ID: <489597D1.5070405@optonline.net> 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. Thx! kenny From maysonl at gmail.com Fri Aug 8 20:38:55 2008 From: maysonl at gmail.com (Mayson Lancaster) Date: Fri, 8 Aug 2008 13:38:55 -0700 Subject: [cells-devel] Greenspunning Cells in C++ Message-ID: <2c65b300808081338w2b9f9707j36e6df7acebed404@mail.gmail.com> Just listened to a google techtalk by Sean Parent from Adobe which I (perhaps incorrectly) would characterise by the above subject. Code at: http://stlab.adobe.com/ Papers/book in progress: http://www.stepanovpapers.com/ fwiw Mayson -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennytilton at optonline.net Fri Aug 8 22:32:03 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Fri, 08 Aug 2008 18:32:03 -0400 Subject: [cells-devel] Greenspunning Cells in C++ In-Reply-To: <2c65b300808081338w2b9f9707j36e6df7acebed404@mail.gmail.com> References: <2c65b300808081338w2b9f9707j36e6df7acebed404@mail.gmail.com> Message-ID: <489CC963.6040105@optonline.net> 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 , but I never saw much come of it. kt From kennytilton at optonline.net Fri Aug 8 22:36:02 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Fri, 08 Aug 2008 18:36:02 -0400 Subject: [cells-devel] Greenspunning Cells in C++ In-Reply-To: <489CC963.6040105@optonline.net> References: <2c65b300808081338w2b9f9707j36e6df7acebed404@mail.gmail.com> <489CC963.6040105@optonline.net> Message-ID: <489CCA52.2070307@optonline.net> 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 From kennytilton at optonline.net Fri Aug 8 22:39:02 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Fri, 08 Aug 2008 18:39:02 -0400 Subject: [cells-devel] Greenspunning Cells in C++ In-Reply-To: <489CC963.6040105@optonline.net> References: <2c65b300808081338w2b9f9707j36e6df7acebed404@mail.gmail.com> <489CC963.6040105@optonline.net> Message-ID: <489CCB06.4000708@optonline.net> 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 From mikko.ahonen at grupposoftware.com Sun Aug 10 16:42:25 2008 From: mikko.ahonen at grupposoftware.com (Mikko Ahonen) Date: Sun, 10 Aug 2008 19:42:25 +0300 Subject: [cells-devel] Current DP not GE pulse ... Message-ID: <5fd426040808100942y47851acdidf189b4451ee3096@mail.gmail.com> 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 . )<85:A VISIBLE-NAME/# = Foo> Is there some simple workaround? Best regards, Mikko Ahonen -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennytilton at optonline.net Sun Aug 10 17:22:55 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Sun, 10 Aug 2008 13:22:55 -0400 Subject: [cells-devel] Current DP not GE pulse ... In-Reply-To: <5fd426040808100942y47851acdidf189b4451ee3096@mail.gmail.com> References: <5fd426040808100942y47851acdidf189b4451ee3096@mail.gmail.com> Message-ID: <489F23EF.30909@optonline.net> 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 . )<85:A > VISIBLE-NAME/# = 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 \ From achambers.home at googlemail.com Wed Aug 13 21:54:06 2008 From: achambers.home at googlemail.com (Andy Chambers) Date: Wed, 13 Aug 2008 22:54:06 +0100 Subject: [cells-devel] the cells way Message-ID: 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 From kennytilton at optonline.net Wed Aug 13 23:34:03 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Wed, 13 Aug 2008 19:34:03 -0400 Subject: [cells-devel] the cells way In-Reply-To: References: Message-ID: <48A36F6B.9010704@optonline.net> 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 From kennytilton at optonline.net Fri Aug 15 22:09:15 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Fri, 15 Aug 2008 18:09:15 -0400 Subject: [cells-devel] Need help getting Mac version of my Algebra software Message-ID: <48A5FE8B.5040000@optonline.net> Bill Clementson has kindly volunteered to take a look at making a build of my Algebra program for Mac OS X. I have already dragged the code over and it Just Compiles (doesn't hurt that we are using ACL on both OSes). Yeah. So with luck we just need shared libs and fine-tuning of any CFFI calls referencing same. Right now I am stuck, btw, can't find a way around actually running the GraphicsMagick installer -- I'd rather just do what I do in the Windows version: just throw all the libs into the application directory. Not sure if the Mac works that way. I am tempted to just beg borrow steal the libs in binary form -- bad idea? I imagine Tcl/Tk/Togl can be installed from ActiveState and then move their libs into the app directory (if that bit is even the same)... well, any ideas/thoughts/advice on this issue are welcome. cheers, kenny ps. Heard from my first interested customer, a school in Missouri. They need a Mac version. I knew I was going to do one, but I am reminded again at how much more interesting Mac users are. (Saw this last time I sold the app.) k From maysonl at gmail.com Fri Aug 15 23:19:19 2008 From: maysonl at gmail.com (Mayson Lancaster) Date: Fri, 15 Aug 2008 16:19:19 -0700 Subject: [cells-devel] Need help getting Mac version of my Algebra software In-Reply-To: <48A5FE8B.5040000@optonline.net> References: <48A5FE8B.5040000@optonline.net> Message-ID: <2c65b300808151619x6b6781e9ra04547d153f20d96@mail.gmail.com> On 8/15/08, Kenny Tilton wrote: > > Bill Clementson has kindly volunteered to take a look at making a build of > my Algebra program for Mac OS X. I have already dragged the code over and it > Just Compiles (doesn't hurt that we are using ACL on both OSes). Yeah. > > So with luck we just need shared libs and fine-tuning of any CFFI calls > referencing same. > > Right now I am stuck, btw, can't find a way around actually running the > GraphicsMagick installer -- I'd rather just do what I do in the Windows > version: just throw all the libs into the application directory. Not sure if > the Mac works that way. > > I am tempted to just beg borrow steal the libs in binary form -- bad idea? > I imagine Tcl/Tk/Togl can be installed from ActiveState and then move their > libs into the app directory (if that bit is even the same)... well, any > ideas/thoughts/advice on this issue are welcome. > > cheers, kenny > > ps. Heard from my first interested customer, a school in Missouri. They > need a Mac version. I knew I was going to do one, but I am reminded again at > how much more interesting Mac users are. (Saw this last time I sold the > app.) k > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel I just installed GraphicsMagick on my MacBook using macports via Porticus - took about 20 minutes for it and dependencies - ended up with .dylib's and .a's in /opt/local/lib/ - I'm not sure what else (if anything) other than those would be necessary. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennytilton at optonline.net Fri Aug 15 23:35:38 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Fri, 15 Aug 2008 19:35:38 -0400 Subject: [cells-devel] Need help getting Mac version of my Algebra software In-Reply-To: <2c65b300808151619x6b6781e9ra04547d153f20d96@mail.gmail.com> References: <48A5FE8B.5040000@optonline.net> <2c65b300808151619x6b6781e9ra04547d153f20d96@mail.gmail.com> Message-ID: <48A612CA.1060003@optonline.net> Mayson Lancaster wrote: > > I just installed GraphicsMagick on my MacBook using macports via > Porticus - took about 20 minutes for it and dependencies - ended up > with .dylib's and .a's in /opt/local/lib/ - I'm not sure what else (if > anything) other than those would be necessary. Thanks for taking the trouble. Big library! Windows searches first the app directory, then the PATH values, then /windows/system32. The cool thing is I can just lob all my DLLs into the app folder and not worry about (a) conflicts or (b) learning how to use an installer (not that that would be the end of the world). Does the Mac have a similar search sequence? I heard on the wiki it was customary for Mac apps to just "install" by copying a directory. GM is a mystery, and their list was silent. One theory was about COM registration, even tho I am using FFI. Anyway, perhaps on the Mac if we /can/ just toss dylibs in the app directory it will work on the Mac where it did not on Windows. Thx again, kt From stefano.dissegna at gmail.com Sun Aug 17 13:38:29 2008 From: stefano.dissegna at gmail.com (Stefano Dissegna) Date: Sun, 17 Aug 2008 15:38:29 +0200 Subject: [cells-devel] Cells tutorial Message-ID: <933dcb390808170638l64dfcb6cg5e96fea5c2a4c8de@mail.gmail.com> Hi! I'm a cells newbie, and while learning it I'm writing a tutorial. It's certainly full of errors, so I would highly appreciate if you could have a look at it and tell what do you think. You can find it here: http://github.com/stefano/cells-doc/tree/master At the moment there are two files: the Lyx source and a dvi file generated by Lyx/LaTex. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefano.dissegna at gmail.com Sun Aug 17 14:11:44 2008 From: stefano.dissegna at gmail.com (Stefano Dissegna) Date: Sun, 17 Aug 2008 16:11:44 +0200 Subject: [cells-devel] Cells tutorial In-Reply-To: <48A82C1E.6050001@optonline.net> References: <933dcb390808170638l64dfcb6cg5e96fea5c2a4c8de@mail.gmail.com> <48A82C1E.6050001@optonline.net> Message-ID: <933dcb390808170711x7d28169an19316bd8fe654055@mail.gmail.com> 2008/8/17 Kenny Tilton > > Glad to, but can you convert them to something I can read on a windows box? > > kt > I've added the pdf version (fonts are quite ugly, though) and a txt version (both unix and windows end-of-line). -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefano.dissegna at gmail.com Mon Aug 18 11:43:25 2008 From: stefano.dissegna at gmail.com (Stefano Dissegna) Date: Mon, 18 Aug 2008 13:43:25 +0200 Subject: [cells-devel] Cells tutorial In-Reply-To: <48A844C2.2030907@optonline.net> References: <933dcb390808170638l64dfcb6cg5e96fea5c2a4c8de@mail.gmail.com> <48A82C1E.6050001@optonline.net> <933dcb390808170711x7d28169an19316bd8fe654055@mail.gmail.com> <48A844C2.2030907@optonline.net> Message-ID: <933dcb390808180443o784ca3afs7e915307e8760cc7@mail.gmail.com> 2008/8/17 Kenny Tilton > Stefano Dissegna wrote: > > >> >> 2008/8/17 Kenny Tilton > kennytilton at optonline.net>> >> >> >> >> Glad to, but can you convert them to something I can read on a >> windows box? >> >> kt >> >> >> >> I've added the pdf version (fonts are quite ugly, though) and a txt >> version (both unix and windows end-of-line). >> > > Looks pretty solid. I do have some suggestions, will send later. Have you > read cells-manifesto.txt, btw? > > kt > Thanks for the suggestions, later I'll read them and fix the tutorial. I will also keep extending it as I get to know more about cells. I've had just a quick look at the cells manifesto, I'll read it more thoroughly today. -------------- next part -------------- An HTML attachment was scrubbed... URL: From frgo at me.com Mon Aug 18 12:02:13 2008 From: frgo at me.com (Frank Goenninger) Date: Mon, 18 Aug 2008 14:02:13 +0200 Subject: Fwd: [cells-devel] Need help getting Mac version of my Algebra software References: Message-ID: <0E703E88-1BF6-4F92-97E4-E7278143F501@me.com> Reposting to the list ... Anfang der weitergeleiteten E-Mail: > Von: Frank Goenninger > Datum: 18. August 2008 08:52:56 MESZ > An: Kenny Tilton > Kopie: cells-devel > Betreff: Re: [cells-devel] Need help getting Mac version of my > Algebra software > > Kenny, all: > > Am 16.08.2008 um 01:35 schrieb Kenny Tilton: > >> Windows searches first the app directory, then the PATH values, >> then /windows/system32. The cool thing is I can just lob all my >> DLLs into the app folder and not worry about (a) conflicts or (b) >> learning how to use an installer (not that that would be the end of >> the world). >> >> Does the Mac have a similar search sequence? I heard on the wiki it >> was customary for Mac apps to just "install" by copying a directory. >> >> GM is a mystery, and their list was silent. One theory was about >> COM registration, even tho I am using FFI. Anyway, perhaps on the >> Mac if we /can/ just toss dylibs in the app directory it will work >> on the Mac where it did not on Windows. >> >> Thx again, kt > > On the Mac, things are a bit different. I'd first restate the > requirements from the above paragraph: > > 1. Install all libs in the app's folder in order to have full > control over the libs being loaded. > 2. Get the app to find the libs in that folder. > > Mac OS X's idea of an application is really a folder named App.app > (notice the suffix "app"). In that ".app" folder we have: > > /Contents/ ("/" denoting a directory) > > and within the Contents folder the following structure: > > /Info.plist > /MacOS/ > /Library > /MacOS > /Resources > > While not going into too much detail here (see below how to make a > suitable ".app" folder structure) I would advice to package up GM > into the /Library folder. This folder holds "foreign" libs. Same for > Tcl/Tk. > > So, how to build that ".app" folder: > > On Mac OS X there's a "Developer" folder right at the root directory > of the internal disk if you have selected to install the developer > tools (like Xcode etc.). > > In folder /Developer/Applications/Utilities there's a tool called > "PackageMaker". After having build your source folder tree like > > .../StuckOnAlgebra/ > > as the root dir and then below that > > /Library/TclTk8.5 > /Library/GraphicsMagic > /bin/stuckonalgebra (the "exe") > /... whatever files else needed for the app > > you may use the PackageMaker to build the package via drag-and-drop > and customizing the install process. > > In PackageMaker you want to select the options such that the install > process is installing SoA in /Applications. This ensures that you > can rely on the Library path to be "/Applications/StuckOnAlgebra.app/ > Library/". > > Then, in Cello and in Celtk, you have to adapt the load paths > accordingly. > > That should do it. You may want to automate that process when > building stuff over and over again. It then may be required to use > Xcode or a shell script to make this automated. 2 days work to get > everything stable... > > Complex? No ;-) Just Different. > > I could make a first package if you want me to... > > Cheers, > Frank > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 860 bytes Desc: not available URL: From stefano.dissegna at gmail.com Tue Aug 26 12:10:41 2008 From: stefano.dissegna at gmail.com (Stefano Dissegna) Date: Tue, 26 Aug 2008 14:10:41 +0200 Subject: [cells-devel] What's a cells-store? Message-ID: <933dcb390808260510v76ae1673t24d80637f57a4996@mail.gmail.com> Reading cells source files, I noticed cells-store. I think it has something to do with hash tables, but nothing beside this. What's its purpose? How is a cells-store normally used? Thanks in advance for an answer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.hildebrandt at gmail.com Tue Aug 26 13:29:36 2008 From: peter.hildebrandt at gmail.com (Peter Hildebrandt) Date: Tue, 26 Aug 2008 15:29:36 +0200 Subject: [cells-devel] What's a cells-store? In-Reply-To: <933dcb390808260510v76ae1673t24d80637f57a4996@mail.gmail.com> References: <933dcb390808260510v76ae1673t24d80637f57a4996@mail.gmail.com> Message-ID: <7758b2680808260629p331587c1y53ddc64177f33f6a@mail.gmail.com> Hi Stefano, A cells-store is a cells-aware data store. It is internally implemented on top of a hash table. The idea is as follows: Imagine you have a cell which depends on a certain entry or the whole set of data in a table/database. Several issues arise: - what if the entry does not yet exist at initialization time? - what if it is added later? - what if the entry is overwritten/deleted later? - what if the cell depends on the whole set of data and new data is added/existing data removed? I invented the cells-store so that I won't have to worry about these things anymore. Now you just use the bwhen-c-stored operator inside a (c? ...) clause, and everything behaves as you would expect. You can check out cells-store-test.lisp (or something like this) for a small example. My core use case was GUI design: Some ruled cells of certain widgets depend on cells slots of other widgets, which might or might not exist at initialization time. So I keep all the widgets in a cells store, each identified by a unique name, and can just use bwhen-c-stored to refer to other widgets by name. If they don't exist, a default is used, and once they are initialized, the cell is executed, and everything behaves as expected. HTH, Peter 2008/8/26 Stefano Dissegna : > Reading cells source files, I noticed cells-store. I think it has something > to do with hash tables, but nothing beside this. What's its purpose? How is > a cells-store normally used? > > > Thanks in advance for an answer. > > > _______________________________________________ > cells-devel site list > cells-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cells-devel > From stefano.dissegna at gmail.com Wed Aug 27 11:25:07 2008 From: stefano.dissegna at gmail.com (Stefano Dissegna) Date: Wed, 27 Aug 2008 13:25:07 +0200 Subject: [cells-devel] What's a cells-store? In-Reply-To: <7758b2680808260629p331587c1y53ddc64177f33f6a@mail.gmail.com> References: <933dcb390808260510v76ae1673t24d80637f57a4996@mail.gmail.com> <7758b2680808260629p331587c1y53ddc64177f33f6a@mail.gmail.com> Message-ID: <933dcb390808270425m5a3c5349x4b5197f14bf6a693@mail.gmail.com> Thanks to everyone for the answers! -------------- next part -------------- An HTML attachment was scrubbed... URL: From larry at theclapp.org Fri Aug 29 11:02:34 2008 From: larry at theclapp.org (Larry Clapp) Date: Fri, 29 Aug 2008 07:02:34 -0400 Subject: [cells-devel] laziness -- what does "once-asked" mean? Message-ID: <20080829110234.GF11773@cupid.theclapp.org> I understand (I think ...) what :once-asked *does*, I want to know what it *means*. In other words, the other two options seem to answer the question "when is this cell lazy?" Well, an :always cell is always lazy -- it's not recalculated until and unless you ask for it. An :until-asked cell is lazy until you query it once, then it's non-lazy from then on. "once-asked" seems to answer a *different* question, "when is this cell evaluated?" It's evaluated once, when created, and then only when queried. Is there any single "question" that all three answer, or are they just inconsistent? Thanks! -- L From kennytilton at optonline.net Fri Aug 29 11:34:10 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Fri, 29 Aug 2008 07:34:10 -0400 Subject: [cells-devel] laziness -- what does "once-asked" mean? In-Reply-To: <20080829110234.GF11773@cupid.theclapp.org> References: <20080829110234.GF11773@cupid.theclapp.org> Message-ID: <48B7DEB2.7080903@optonline.net> Larry Clapp wrote: > I understand (I think ...) what :once-asked *does*, I want to know > what it *means*. > > In other words, the other two options seem to answer the question > "when is this cell lazy?" Well, an :always cell is always lazy -- > it's not recalculated until and unless you ask for it. An > :until-asked cell is lazy until you query it once, then it's non-lazy > from then on. > > "once-asked" seems to answer a *different* question, "when is this > cell evaluated?" It's evaluated once, when created, and then only > when queried. > > Is there any single "question" that all three answer, or are they just > inconsistent? Once-asked would be "un-lazy until you query it once" (ie, consistent) but it also looks to be vestigial: all code seems to treat it the same as always. If I missed it in my brief scan of the code, it would have to do with model instance initialization. Normal cells get evaluated and observed very soon after initialize-instance, during md-awaken. An always lazy cell just sits there until someone actually reads the corresponding slot-value, then resumses sitting and not reacting to dependencies. An until-asked cell likewise just sits there until the slot is read, but then recalculates when any dependency changes. A once-asked cell would calculate during md-awaken but then be lazy ever after. So there may be a gap in the code or maybe I missed it. Lazy stuff does not get a lot of use so it is possible there is a hole there. kt -- http://www.theoryyalgebra.com/ From kennytilton at optonline.net Fri Aug 29 11:40:03 2008 From: kennytilton at optonline.net (Kenny Tilton) Date: Fri, 29 Aug 2008 07:40:03 -0400 Subject: [cells-devel] laziness -- what does "once-asked" mean? In-Reply-To: <48B7DEB2.7080903@optonline.net> References: <20080829110234.GF11773@cupid.theclapp.org> <48B7DEB2.7080903@optonline.net> Message-ID: <48B7E013.3050105@optonline.net> Kenny Tilton wrote: > Larry Clapp wrote: > >> I understand (I think ...) what :once-asked *does*, I want to know >> what it *means*. >> >> In other words, the other two options seem to answer the question >> "when is this cell lazy?" Well, an :always cell is always lazy -- >> it's not recalculated until and unless you ask for it. An >> :until-asked cell is lazy until you query it once, then it's non-lazy >> from then on. >> >> "once-asked" seems to answer a *different* question, "when is this >> cell evaluated?" It's evaluated once, when created, and then only >> when queried. >> >> Is there any single "question" that all three answer, or are they just >> inconsistent? > > > Once-asked would be "un-lazy until you query it once" (ie, consistent) > but it also looks to be vestigial: all code seems to treat it the same > as always. > > If I missed it in my brief scan of the code, it would have to do with > model instance initialization. Yeah, looks like I missed it, because the code looks for other than :once-asked to break off initialization and I was just searching on once-asked. kt -- http://www.theoryyalgebra.com/ From larry at theclapp.org Fri Aug 29 16:53:55 2008 From: larry at theclapp.org (Larry Clapp) Date: Fri, 29 Aug 2008 12:53:55 -0400 Subject: [cells-devel] laziness -- what does "once-asked" mean? In-Reply-To: <48B7E013.3050105@optonline.net> References: <20080829110234.GF11773@cupid.theclapp.org> <48B7DEB2.7080903@optonline.net> <48B7E013.3050105@optonline.net> Message-ID: <20080829165355.GG11773@cupid.theclapp.org> On Fri, Aug 29, 2008 at 07:40:03AM -0400, Kenny Tilton wrote: > Kenny Tilton wrote: > >Larry Clapp wrote: > > > > > I understand (I think ...) what :once-asked *does*, I want to > > > know what it *means*. > > > > > > In other words, the other two options seem to answer the > > > question "when is this cell lazy?" Well, an :always cell is > > > always lazy -- it's not recalculated until and unless you ask > > > for it. An :until-asked cell is lazy until you query it once, > > > then it's non-lazy from then on. > > > > > > "once-asked" seems to answer a *different* question, "when is > > > this cell evaluated?" It's evaluated once, when created, and > > > then only when queried. > > > > > > Is there any single "question" that all three answer, or are > > > they just inconsistent? > > > > > > Once-asked would be "un-lazy until you query it once" (ie, > > consistent) but it also looks to be vestigial: all code seems to > > treat it the same as always. > > > > If I missed it in my brief scan of the code, it would have to do > > with model instance initialization. > > Yeah, looks like I missed it, because the code looks for other than > :once-asked to break off initialization and I was just searching on > once-asked. Ah, so they all *do* answer the same question, "when is this cell lazy?", but with the clarification that creation => asking. once-asked: Lazy once you ask for it (creating asks) until-asked: Lazy until you ask for it (creating does not ask) always: Lazy always (creating does not ask) This is probably one of those things that would have become clear once I got more experience with Cells, but I'm lazy, so I asked. :) Thanks for the quick answer! -- L