[PEAK] The Trellis has landed

Peter Damoc pdamoc at gmail.com
Sat Dec 1 02:49:15 EST 2007


Excellent,

I took a look at the way it is used in the sample Chandler app.... I tried
to implement a MVP structure in an older app, it felt great until my lack of
discipline kicked in and ruined a big chunk of code. The implementation that
I see in the demo is very nice, very nice... much nicer than my feeble
attempt.

If the right planets are aligned this weekend.... maybe my dream app will
also use Trellis.

Congratulations!
Peter

On Dec 1, 2007 1:14 AM, Phillip J. Eby <pje at telecommunity.com> wrote:

> The new algorithm is now in SVN, as Trellis-0.6a1dev-r2436, if you'd
> like to experiment.
>
> The documentation is practically untouched from the old version, and
> is thus out-of-date and *materially misleading*.  The code examples
> of course work, but you can't trust the explanatory text.  And there
> are important APIs that aren't documented at all.
>
> In practice, however, most existing trellis code should only need two
> kinds of changes:
>
> * @action rules should switch to @rule, @observer, or a combination of the
> two
>
> * Tasks can no longer observe discrete or receiver cells, and require
> an active EventLoop to run
>
> When converting @action rules, you must separate your code into code
> that makes trellis changes, and code that does non-trellis things
> (like GUI updates, I/O, etc.).  The former should become @rule, and
> the latter should become @observer.
>
> The only exception is when you have an @action that really intends
> that its changes should take effect in the *future*, instead of in
> the current recalculation.  If you intend your changes to take place
> in the future, you should use a @task or EventLoop.call() to schedule
> them.
>
> Also, note that rules can now be run more than once during the same
> recalculation pass -- if your rule has side-effects (other than
> setting cell values, or using trellisized data structures) it *must*
> use trellis.on_undo(func, *args) to register undo functions to be
> called in the event of an error or the need to recalculate due to an
> out-of-order modification.
>
> And speaking of undo and trellis data structures, please note that
> Dict, List, and Set do not actually support undo yet, which means
> they're not safe for modification via rules at the present
> moment.  I'll be fixing this soon, I hope, but in the meantime,
> please be aware of it.
>
> By the way, if you'd like to see a cool wxPython demo app built on
> the Trellis, take a look at:
>
> http://svn.osafoundation.org/chandler/branches/rearchitecture/
>
> It's an experimental and in-progress refactoring of the Chandler
> application UI to run on the Trellis and other PEAK technology such
> as AddOns, PlugIns, etc.
>
> In order to actually run it, you'll need to install this first, though:
>
> http://svn.osafoundation.org/chandler/trunk/chandler/
>
> as we're using Chandler's custom wx, PyICU, and various other
> libraries including Twisted.
>
> (Oh, and yes, it works with the new Trellis algorithm.)
>
> _______________________________________________
> PEAK mailing list
> PEAK at eby-sarna.com
> http://www.eby-sarna.com/mailman/listinfo/peak
>



-- 
There is NO FATE, we are the creators.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eby-sarna.com/pipermail/peak/attachments/20071201/93d5d12c/attachment.html


More information about the PEAK mailing list