From: Simon Strandgaard Date: 2005-03-03T19:40:34+09:00 Subject: Re: ruby, unittesting and lego On Thu, 3 Mar 2005 19:10:25 +0900, Brian Schr�der wrote: > On Thu, 3 Mar 2005 07:33:10 +0900, Simon Strandgaard wrote: [snip] > > Here is a picture of my lego model: > > http://aeditor.rubyforge.org/data/lego_model_of_caching_system.jpg [snip] > > would you mind to elaborate a bit on how this models your caching > system? Even though the model seems quite concise and I understand > danish I just don't get how it works ;) Its heavy to do realtime syntax coloring in an editor, so naturally one wants to do as little work as possible. Computing syntax coloring for 50 lines takes about 0.7 seconds on my 700 MHz box. You can change one letter and then the editor will compute the affected line. In case the syntax state is different to the previous syntax state then we must propagate the change to the following line. Imagine inserting a double quote then the following lines gets colored differently. When inserting/removing a few line into the buffer, then we want to recycle as much syntax state as possible. Its difficult to explain. Sorry. The lego model helped me thinking through all kinds of senarios. If I had to draw these senarios on paper than it would have taken forever. -- Simon Strandgaard