Re: How good Leo handles settings?

2017-06-29 Thread vitalije
On Thursday, June 29, 2017 at 4:16:38 PM UTC+2, Terry Brown wrote: > > Hey Vitalije, what are you working on exactly? Not wanting to > duplicate any effort and wondering if you're working on the sqlite > settings idea or something else, and if you have any thoughts on the > sqlite approach sep

Re: How good Leo handles settings?

2017-06-29 Thread Edward K. Ream
On Thu, Jun 29, 2017 at 8:47 AM, Kent Tenney wrote: > >setting: long - primary key for settings table > >name: text - setting name > >body: text - text data for setting for docs. and @data settings > >type: long - link to types table (@bool, @int, @data, etc.) > >parent: long - link to settings t

Re: How good Leo handles settings?

2017-06-29 Thread Terry Brown
Hey Vitalije, what are you working on exactly? Not wanting to duplicate any effort and wondering if you're working on the sqlite settings idea or something else, and if you have any thoughts on the sqlite approach separating file specific settings from the file they apply to, vs. the current syste

Re: How good Leo handles settings?

2017-06-29 Thread Terry Brown
On Thu, 29 Jun 2017 08:47:01 -0500 Kent Tenney wrote: > >setting: long - primary key for settings table > >name: text - setting name > >body: text - text data for setting for docs. and @data settings > >type: long - link to types table (@bool, @int, @data, etc.) > >parent: long - link to settings

Re: How good Leo handles settings?

2017-06-29 Thread Kent Tenney
>setting: long - primary key for settings table >name: text - setting name >body: text - text data for setting for docs. and @data settings >type: long - link to types table (@bool, @int, @data, etc.) >parent: long - link to settings table for hierarchy >outline: long - link to outline table Hows

Re: How good Leo handles settings?

2017-06-29 Thread Edward K. Ream
On Thursday, June 29, 2017 at 5:43:08 AM UTC-5, Edward K. Ream wrote: > Or Leo could cache leoSettings.leo and myLeoSettings.leo, pretty much as described in #511 . > I've just added caching to the list of items to be handled by the renamed >

Re: How good Leo handles settings?

2017-06-29 Thread Edward K. Ream
On Thursday, June 29, 2017 at 4:57:04 AM UTC-5, Edward K. Ream wrote: > > On Wednesday, June 28, 2017 at 11:53:42 AM UTC-5, vitalije wrote: > So Leo opens *two* documents (the settings files) before opening ekr.leo, > and then Leo reads ekr.leo twice. > > Is it really necessary? It is if we insis

Re: How good Leo handles settings?

2017-06-29 Thread Edward K. Ream
On Wednesday, June 28, 2017 at 11:53:42 AM UTC-5, vitalije wrote: So Leo actually reads four Leo documents before it starts opening your > document and it read it twice. > When I open ekr.leo, I see the following: reading settings in C:\leo.repo\leo-editor\leo\config\leoSettings.leo reading se

Re: How good Leo handles settings?

2017-06-29 Thread Edward K. Ream
On Wed, Jun 28, 2017 at 6:09 PM, Edward K. Ream wrote: @Edward, I have another question. Where is the point where the actual > reading of Leo document ends and data is transferred in the tree. > > To be more concrete I have found in method getLeoFileHelper of > FileCommands class the following l

Re: How good Leo handles settings?

2017-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2017 at 2:48 PM, vitalije wrote: @Edward, I have another question. Where is the point where the actual reading of Leo document ends and data is transferred in the tree. To be more concrete I have found in method getLeoFileHelper of FileCommands class the following lines: c.setR

Re: How good Leo handles settings?

2017-06-28 Thread Terry Brown
On Wed, 28 Jun 2017 12:48:06 -0700 (PDT) vitalije wrote: > > ​I would be happy with that, provided that a) settings can be > > organized > >> and b) per-document (.leo file) settings are possible.​ ​ The best > >> way of organizing anything is in a .leo file.​ > > > As I wrote in the earlier pos

Re: How good Leo handles settings?

2017-06-28 Thread vitalije
> > ​I would be happy with that, provided that a) settings can be organized >> and b) per-document (.leo file) settings are possible.​ ​ The best way of >> organizing anything is in a .leo file.​ > > As I wrote in the earlier post today, it is trivial in sqlite to open connection to several dif

Re: How good Leo handles settings?

2017-06-28 Thread Terry Brown
On Wed, 28 Jun 2017 13:25:39 -0500 "Edward K. Ream" wrote: > On Wed, Jun 28, 2017 at 12:05 PM, Terry Brown > wrote: > > > On Wed, 28 Jun 2017 06:39:41 -0700 (PDT) > > The success of the current > > ​ ​ > > code in the context of 1. is questionable, seeing new and even > > experienced users str

Re: How good Leo handles settings?

2017-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2017 at 12:05 PM, Terry Brown wrote: > On Wed, 28 Jun 2017 06:39:41 -0700 (PDT) > The success of the current > ​ ​ > code in the context of 1. is questionable, seeing new and even > experienced users struggle with settings management. > ​Imo few (none?) of those problems arise b

Re: How good Leo handles settings?

2017-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2017 at 11:01 AM, vitalije wrote: By transferring to ClojureScript I have discovered some very cool projects >> that I could not imagine were possible at all. One of the coolest things is >> writing reloadable code. I am amazed how cool it is to make small change in >> your code a

Re: How good Leo handles settings?

2017-06-28 Thread Offray Vladimir Luna Cárdenas
Yes, Smalltalk has liveness build in the core experience since early releases. Is something that you can not find almost anywhere the common experience of programming and computing in general. Recently I was reading about how this liveness impressed Steve Jobs and his team and inspired much of the

Re: How good Leo handles settings?

2017-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2017 at 11:01 AM, vitalije wrote: Every ivar that caches settings can be turned into property that gets its >> value from c.config.get< >> ​something>. >> > ​Excellent idea. There is a performance penalty, but it is not likely significant. It wouldn't be so hard to even make a sc

Re: How good Leo handles settings?

2017-06-28 Thread Terry Brown
On Wed, 28 Jun 2017 12:10:27 -0500 Offray Vladimir Luna Cárdenas wrote: > Using Pharo Smalltalk I have experienced a similar feeling about a > direct live system where changes are reflected immediately without > any reload. Years ago someone showed me the Squeak Smalltalk environment. It seemed

Re: How good Leo handles settings?

2017-06-28 Thread Offray Vladimir Luna Cárdenas
Hi, Using Pharo Smalltalk I have experienced a similar feeling about a direct live system where changes are reflected immediately without any reload. Also I have shared that dealing with traversing the settings three could be cumbersome and you need to read a lot before having the change you want,

Re: How good Leo handles settings?

2017-06-28 Thread Terry Brown
On Wed, 28 Jun 2017 06:39:41 -0700 (PDT) "Edward K. Ream" wrote: > 1. Clarity and simplicity of *purpose*. > 2. Stability and simplicity of *user interface*, including gui and > scripting api. > 3. Simplicity of *code*. [snip] > In this discussion, the first two priorities demand that Leo cont

Re: How good Leo handles settings?

2017-06-28 Thread vitalije
Someone asked how this proposition can help users. I wasn't clear about that. It won't help that much unless reloading is also addressed. But there are some settings that aren't so obvious when represented as a text. Colors, shortcuts for example. Now it is required that a user writes them as a

Re: How good Leo handles settings?

2017-06-28 Thread vitalije
> > > For example, yesterday I discovered a settings table that inited several > commander ivars. My first thought was, maybe this table could go away. > But no. These ivars appear all over Leo. It would be horrible to use > c.config.getInt or c.config.getBool in their stead. So this table

Re: How good Leo handles settings?

2017-06-28 Thread Edward K. Ream
On Tuesday, June 27, 2017 at 12:24:24 PM UTC-5, Terry Brown wrote: > On Tue, 27 Jun 2017 11:27:27 -0500 > "Edward K. Ream" wrote: > > > ​How does that help new users?​ > > That's the problem with this proposal, it's so overloaded with benefits > it's hard to keep them categorized ;-) >

Re: How good Leo handles settings?

2017-06-27 Thread Terry Brown
On Tue, 27 Jun 2017 11:27:27 -0500 "Edward K. Ream" wrote: > > But a large part of the proposal's benefit is in the non-UI > > simplification of @settings loading. > > ​How does that help new users?​ That's the problem with this proposal, it's so overloaded with benefits it's hard to keep them

Re: How good Leo handles settings?

2017-06-27 Thread Edward K. Ream
On Tue, Jun 27, 2017 at 9:53 AM, Terry Brown wrote: But a large part of the proposal's benefit is in the non-UI > simplification of @settings loading. > ​How does that help new users?​ import leo.core.leoGlobals as g > config = g.config_for_outline("/path/to/somefile.leo") > > could create `con

Re: How good Leo handles settings?

2017-06-27 Thread Terry Brown
On Tue, 27 Jun 2017 06:54:30 -0700 (PDT) "Edward K. Ream" wrote: > On Tuesday, June 27, 2017 at 7:58:02 AM UTC-5, Terry Brown wrote: > > My interpretation of the proposal was a replacement of all @settings > > trees, not simply caching. > > That's a much harder sell, but I won't veto it until

Re: How good Leo handles settings?

2017-06-27 Thread Edward K. Ream
On Tuesday, June 27, 2017 at 7:58:02 AM UTC-5, Terry Brown wrote: My interpretation of the proposal was a replacement of all @settings > trees, not simply caching. That's a much harder sell, but I won't veto it until I know a lot more. Sqlite is a standard Python library, so no installation is

Re: How good Leo handles settings?

2017-06-27 Thread Terry Brown
On Tue, 27 Jun 2017 05:33:15 -0500 "Edward K. Ream" wrote: > > On Mon, Jun 26, 2017 at 11:21 AM, vitalije > > wrote: > > What would be the benefits if Leo configuration code use database to > > store and retrieve settings​[?]​ > > ​An interesting question. As I understand you, you are, in effe

Re: How good Leo handles settings?

2017-06-27 Thread Edward K. Ream
On Mon, Jun 26, 2017 at 12:09 PM, Terry Brown wrote: > On Mon, 26 Jun 2017 09:21:46 -0700 (PDT) > vitalije wrote: > > > As I have mention in other thread I have some ideas about how can be > > improved Leo code that deals with the configuration and user settings. > > Very interesting analysis.

Re: How good Leo handles settings?

2017-06-27 Thread Edward K. Ream
On Mon, Jun 26, 2017 at 11:21 AM, vitalije wrote: > What would be the benefits if Leo configuration code use database to store > and retrieve settings > ​[?]​ > ​An interesting question. As I understand you, you are, in effect, suggesting that Leo cache the contents of leoSettings.leo and myLeo

Re: How good Leo handles settings?

2017-06-26 Thread Terry Brown
On Mon, 26 Jun 2017 09:21:46 -0700 (PDT) vitalije wrote: > As I have mention in other thread I have some ideas about how can be > improved Leo code that deals with the configuration and user settings. Very interesting analysis. I've had similar experiences in the init. code, that is, for examp

How good Leo handles settings?

2017-06-26 Thread vitalije
As I have mention in other thread I have some ideas about how can be improved Leo code that deals with the configuration and user settings. Using small python script I have collected all settings from leoSettings.leo and created a dictionary whose keys are types of settings (int, ratio, float,