[Pharo-project] Startup Preferences
Yeah I would really love to see this. maybe with a fixed lookup chain 1. Settings from the Image directory/startup.st 2. Settings from ~/.pharo/$VERSION/startup.st 3. Settings from ~/.pharo/startup.st cami
New version: Now there is a hierarchy for the setting file - first it lloks in the image diretory for st files - if none is found, it looks into ~/.config/pharo/${VERSION} - if none is found it looks into ~/.config/pharo/general We could also add a look into ~/.pharo/ Gofer new squeaksource: 'StartupPreferences'; package: 'StartupPreferences'; load. Ben On Dec 1, 2011, at 6:50 PM, Stéphane Ducasse wrote:
me too.
Stef
On Dec 1, 2011, at 6:38 PM, Camillo Bruni wrote:
Yeah I would really love to see this.
maybe with a fixed lookup chain
1. Settings from the Image directory/startup.st 2. Settings from ~/.pharo/$VERSION/startup.st 3. Settings from ~/.pharo/startup.st
cami
Sounds cool. Doru On Tue, Dec 13, 2011 at 11:37 AM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
New version:
Now there is a hierarchy for the setting file
- first it lloks in the image diretory for st files - if none is found, it looks into ~/.config/pharo/${VERSION} - if none is found it looks into ~/.config/pharo/general We could also add a look into ~/.pharo/
Gofer new squeaksource: 'StartupPreferences'; package: 'StartupPreferences'; load.
Ben
On Dec 1, 2011, at 6:50 PM, Stéphane Ducasse wrote:
me too.
Stef
On Dec 1, 2011, at 6:38 PM, Camillo Bruni wrote:
Yeah I would really love to see this.
maybe with a fixed lookup chain
1. Settings from the Image directory/startup.st
2. Settings from ~/.pharo/$VERSION/startup.st
3. Settings from ~/.pharo/startup.st
cami
-- www.tudorgirba.com "Every thing has its own flow"
we should integrate it :) Stef On Dec 13, 2011, at 11:37 AM, Benjamin wrote:
New version:
Now there is a hierarchy for the setting file
- first it lloks in the image diretory for st files - if none is found, it looks into ~/.config/pharo/${VERSION} - if none is found it looks into ~/.config/pharo/general
We could also add a look into ~/.pharo/
Gofer new squeaksource: 'StartupPreferences'; package: 'StartupPreferences'; load.
Ben
On Dec 1, 2011, at 6:50 PM, Stéphane Ducasse wrote:
me too.
Stef
On Dec 1, 2011, at 6:38 PM, Camillo Bruni wrote:
Yeah I would really love to see this.
maybe with a fixed lookup chain
1. Settings from the Image directory/startup.st 2. Settings from ~/.pharo/$VERSION/startup.st 3. Settings from ~/.pharo/startup.st
cami
Benjamin Van Ryseghem-2 wrote
- first it lloks in the image diretory for st files
Any .st file (not good) or just startup.st? -- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4190520.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Dec 13, 2011, at 2:51 PM, Sean P. DeNigris wrote:
Benjamin Van Ryseghem-2 wrote
- first it lloks in the image diretory for st files
Any .st file (not good) or just startup.st?
right now it's any, but easily good be changed ;) Ben
-- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4190520.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 13 Dec 2011, at 11:37, Benjamin wrote:
Now there is a hierarchy for the setting file
- first it lloks in the image diretory for st files - if none is found, it looks into ~/.config/pharo/${VERSION} - if none is found it looks into ~/.config/pharo/general
We could also add a look into ~/.pharo/
Will looking in a lot of places not slow down the startup ?
I wouldn't look in much places, that ambiguity is bad in the mid term... I would look just on ~/.pharo (the "config" name is bad: too generic) Cheers, Esteban El 13/12/2011, a las 11:21a.m., Sven Van Caekenberghe escribió:
On 13 Dec 2011, at 11:37, Benjamin wrote:
Now there is a hierarchy for the setting file
- first it lloks in the image diretory for st files - if none is found, it looks into ~/.config/pharo/${VERSION} - if none is found it looks into ~/.config/pharo/general
We could also add a look into ~/.pharo/
Will looking in a lot of places not slow down the startup ?
On Tue, Dec 13, 2011 at 3:26 PM, Esteban Lorenzano <estebanlm@gmail.com> wrote:
I would look just on ~/.pharo (the "config" name is bad: too generic)
This ~/.config directory is a freedesktop standard: "If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used. " (http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) But everyone seems to agree that ~/.pharo is better so I would not push ~/.config further. -- Damien Cassou http://damiencassou.seasidehosting.st "Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry
Damien Cassou wrote
This ~/.config directory is a freedesktop standard: "If ... But everyone seems to agree that ~/.pharo is better so I would not push ~/.config further.
I have no preference for the extension, only the location. Since we're making this up, why not use the most standard; although I thought the objection is that there may be more than config info there? Now that I think about it. I do not understand the motivation for this file in general. Will someone give a use case? Why not just do whatever it is in the start up list? -- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4195476.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Dec 14, 2011, at 4:50 PM, Sean P. DeNigris wrote:
Damien Cassou wrote
This ~/.config directory is a freedesktop standard: "If ... But everyone seems to agree that ~/.pharo is better so I would not push ~/.config further.
I have no preference for the extension, only the location. Since we're making this up, why not use the most standard; although I thought the objection is that there may be more than config info there?
Now that I think about it. I do not understand the motivation for this file in general. Will someone give a use case?
The use case of shared scripts between images is that I ( and Stef, and probably other people) download maybe 3-4 images from Jenkins per day, because I have to work one the last version of Pharo (for compatibility by example). So it's really boring (and time consuming) to have to set my preferences to have a nice environment to work with all the time. I want to specify them once and for all, put them into a preferences folder, and then, each image is responsible to load preferences at launch time. I also think that other project could use such a folder but :) Ben
Why not just do whatever it is in the start up list?
-- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4195476.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Benjamin Van Ryseghem-2 wrote
So it's really boring (and time consuming) to have to set my preferences to have a nice environment to work with all the time.
I understand that and have the same problem, but solved it in the image with code and Metacello. Mariano has a blog post about it at http://marianopeck.wordpress.com/2011/11/19/loading-projects-and-building-yo.... In fact, the Metacello approach solves the next problem the script will run into, which is that each version of Pharo is a different incompatible platform, so there will have to be a different script for each 1.3, 1.4, 102.16; or create tags, or a script language, or... I am hesitant to add mechanisms outside the image because one of Smalltalk's compelling strengths is its consistency (we don't even have mathematical operator precedence, for ch*st sake :)) and this is one more thing to learn/understand/remember esp. for newbies. Also, maybe this is how Java's XML virus started ;-) -- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4196010.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Dec 14, 2011, at 6:23 PM, Sean P. DeNigris wrote:
Benjamin Van Ryseghem-2 wrote
So it's really boring (and time consuming) to have to set my preferences to have a nice environment to work with all the time.
I understand that and have the same problem, but solved it in the image with code and Metacello. Mariano has a blog post about it at http://marianopeck.wordpress.com/2011/11/19/loading-projects-and-building-yo.... In fact, the Metacello approach solves the next problem the script will run into, which is that each version of Pharo is a different incompatible platform, so there will have to be a different script for each 1.3, 1.4, 102.16; or create tags, or a script language, or...
But sometimes, we want different script for different version. Use case: integration. When Stef is integrating, paths for scripts are different, and so are repos. The Metacello approach is network dependent. When I download a new image from Jenkins, I do it through a script which save the latest version. So if Jenkins is down (or my internet connection), I can have a fresh image. Another thing is, I won't have to Gofer blabla, I am to lazy (and my memory is too bad for that ^^) ;) Moreover, I had no clue this solution was existing ;) I want it to work out of the box, without thinking (and I am damn good at that ^^) ;) Ben
I am hesitant to add mechanisms outside the image because one of Smalltalk's compelling strengths is its consistency (we don't even have mathematical operator precedence, for ch*st sake :)) and this is one more thing to learn/understand/remember esp. for newbies. Also, maybe this is how Java's XML virus started ;-)
-- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4196010.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Benjamin Van Ryseghem-2 wrote
But sometimes, we want different script for different version.
If you mean different Pharo versions, this is part of what Metacello provides e.g. load only in on #'Pharo1.3.x'. Benjamin Van Ryseghem-2 wrote
When Stef is integrating, paths for scripts are different, and so are repos.
So each person would have their own configuration (just like they would presumably have their own startup preference file Benjamin Van Ryseghem-2 wrote
The Metacello approach is network dependent.
Metacello is not any more network dependent than a preference file. Each person could keep the config on their local machine. It still seems that the preference file approach adds complexity without providing any benefit. Of course I may be missing something ;-) So, now that the Metacello approach is on the table, which is already used successfully (at least by myself and Mariano), what does the preference file add - what can you do with the file that can't be done with Metacello? -- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4205366.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Dec 16, 2011, at 5:41 PM, Sean P. DeNigris wrote:
Benjamin Van Ryseghem-2 wrote
But sometimes, we want different script for different version.
If you mean different Pharo versions, this is part of what Metacello provides e.g. load only in on #'Pharo1.3.x'.
Benjamin Van Ryseghem-2 wrote
When Stef is integrating, paths for scripts are different, and so are repos.
So each person would have their own configuration (just like they would presumably have their own startup preference file
Benjamin Van Ryseghem-2 wrote
The Metacello approach is network dependent.
Metacello is not any more network dependent than a preference file. Each person could keep the config on their local machine.
It still seems that the preference file approach adds complexity without providing any benefit. Of course I may be missing something ;-) So, now that the Metacello approach is on the table, which is already used successfully (at least by myself and Mariano), what does the preference file add - what can you do with the file that can't be done with Metacello?
You are right. It doesn't add a lot, except maybe that you can set an action do be performed only once per image and not at every launch. But may be you can do it also with Metacello :) But the thing is, we could use metacello to laod something from your hard drive instead of serializing. The thing is to have an automatic mechanism which can load sth ( a st file, a mc configuration, a fuel objet, idk ) which is shared among images. So yes, why not replaced StartupAtomics by metacello script ? I think the only argument is the "unique execution" thing Ben
-- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4205366.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Benjamin Van Ryseghem-2 wrote
You are right. It doesn't add a lot, except maybe that you can set an action do be performed only once per image and not at every launch.
But may be you can do it also with Metacello :)
If I understand correctly, Metacello would. My primary motivation here is to make sure we squeeze all the juice out of our current tools before adding more. I've been working a lot with Morphic, and I see how hard it is to remove bloat once it's been incorporated into the image. I always go back to two items of the manifesto: * Beauty to learn from * Clean, lean and fast It is imperative that we add as little as possible, especially where a context shift is required. Sean -- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4205896.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Dec 16, 2011, at 8:16 PM, Sean P. DeNigris wrote:
Benjamin Van Ryseghem-2 wrote
You are right. It doesn't add a lot, except maybe that you can set an action do be performed only once per image and not at every launch.
But may be you can do it also with Metacello :)
If I understand correctly, Metacello would. My primary motivation here is to make sure we squeeze all the juice out of our current tools before adding more. I've been working a lot with Morphic, and I see how hard it is to remove bloat once it's been incorporated into the image. I always go back to two items of the manifesto: * Beauty to learn from * Clean, lean and fast
It is imperative that we add as little as possible, especially where a context shift is required.
Sean
Metacello can code, for sure. The point is that StartupPreferences is not a mechanism to load code, it's a mechanism to load code at startup and to have a chain a possible location to find scripts. So if you want to load a metacello gofer a load time, you will have to create a class to launch it. Moreover, you can't ensure some action are set only once and some each time. I am not for pushing new useless stuff in the system, but I am pretty sure that such a mechanism is really needed ( I can't imagine liveing without it now ^^) Ben
-- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4205896.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Cool, For me the default config dir is still in "~/.pharo/" so that would be cool if added... cami On 2011-12-13, at 11:37, Benjamin wrote:
New version:
Now there is a hierarchy for the setting file
- first it lloks in the image diretory for st files - if none is found, it looks into ~/.config/pharo/${VERSION} - if none is found it looks into ~/.config/pharo/general
We could also add a look into ~/.pharo/
Gofer new squeaksource: 'StartupPreferences'; package: 'StartupPreferences'; load.
Ben
On Dec 1, 2011, at 6:50 PM, Stéphane Ducasse wrote:
me too.
Stef
On Dec 1, 2011, at 6:38 PM, Camillo Bruni wrote:
Yeah I would really love to see this.
maybe with a fixed lookup chain
1. Settings from the Image directory/startup.st 2. Settings from ~/.pharo/$VERSION/startup.st 3. Settings from ~/.pharo/startup.st
cami
Guys, I am ok for any proposition but please try to find only one together :) some of you are for ~/.config/pharo/bla others for ~/.pharo/bla some of you are for multi location, other for only one. Personally I am for ~/.pharo and for multi locations :) Waiting for your arguments ;) Ben On Dec 13, 2011, at 5:57 PM, Camillo Bruni wrote:
Cool,
For me the default config dir is still in "~/.pharo/" so that would be cool if added...
cami
On 2011-12-13, at 11:37, Benjamin wrote:
New version:
Now there is a hierarchy for the setting file
- first it lloks in the image diretory for st files - if none is found, it looks into ~/.config/pharo/${VERSION} - if none is found it looks into ~/.config/pharo/general
We could also add a look into ~/.pharo/
Gofer new squeaksource: 'StartupPreferences'; package: 'StartupPreferences'; load.
Ben
On Dec 1, 2011, at 6:50 PM, Stéphane Ducasse wrote:
me too.
Stef
On Dec 1, 2011, at 6:38 PM, Camillo Bruni wrote:
Yeah I would really love to see this.
maybe with a fixed lookup chain
1. Settings from the Image directory/startup.st 2. Settings from ~/.pharo/$VERSION/startup.st 3. Settings from ~/.pharo/startup.st
cami
I would like to have it first look in the local folder :). For the global place, I also believe that there should be only one, and ~/.pharo sounds the best to my ears. Cheers, Doru On 13 Dec 2011, at 20:48, Benjamin wrote:
Guys, I am ok for any proposition but please try to find only one together :)
some of you are for ~/.config/pharo/bla others for ~/.pharo/bla
some of you are for multi location, other for only one.
Personally I am for ~/.pharo and for multi locations :)
Waiting for your arguments ;)
Ben
On Dec 13, 2011, at 5:57 PM, Camillo Bruni wrote:
Cool,
For me the default config dir is still in "~/.pharo/" so that would be cool if added...
cami
On 2011-12-13, at 11:37, Benjamin wrote:
New version:
Now there is a hierarchy for the setting file
- first it lloks in the image diretory for st files - if none is found, it looks into ~/.config/pharo/${VERSION} - if none is found it looks into ~/.config/pharo/general
We could also add a look into ~/.pharo/
Gofer new squeaksource: 'StartupPreferences'; package: 'StartupPreferences'; load.
Ben
On Dec 1, 2011, at 6:50 PM, Stéphane Ducasse wrote:
me too.
Stef
On Dec 1, 2011, at 6:38 PM, Camillo Bruni wrote:
Yeah I would really love to see this.
maybe with a fixed lookup chain
1. Settings from the Image directory/startup.st 2. Settings from ~/.pharo/$VERSION/startup.st 3. Settings from ~/.pharo/startup.st
cami
-- www.tudorgirba.com "We cannot reach the flow of things unless we let go."
Tudor Girba-2 wrote
I would like to have it first look in the local folder :).
For the global place, I also believe that there should be only one, and ~/.pharo sounds the best to my ears.
+1 for "imageFolder/.pharo followed by ~/.pharo (although is ~ meaningful on Windows?) -- View this message in context: http://forum.world.st/Startup-Preferences-tp4129591p4192954.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 14/12/11 11:24, Sean P. DeNigris wrote:
+1 for "imageFolder/.pharo followed by ~/.pharo (although is ~ meaningful on Windows?)
There's something like C:/Users/<current_user_name> - though I think that might be a different location between Vista and XP and so on. There's also the added complication that programs can be installed for the current user or 'all users' - I don't know what the implications of that are. Steve
Steve Taylor wrote:
On 14/12/11 11:24, Sean P. DeNigris wrote:
+1 for "imageFolder/.pharo followed by ~/.pharo (although is ~ meaningful on Windows?) There's something like C:/Users/<current_user_name> - though I think that might be a different location between Vista and XP and so on. There's also the added complication that programs can be installed for the current user or 'all users' - I don't know what the implications of that are. Steve From [1], for Windows I suggest: %ALLUSERSPROFILE% \pharo\startup.st - for default system wide settings %APPDATA%\pharo\startup.st - for personal settings
[1] http://www.axleration.com/default-environment-variable-values-of-windows-xp-...
Hi Benjamin: On 13 Dec 2011, at 11:37, Benjamin wrote:
New version:
Gofer new squeaksource: 'StartupPreferences'; package: 'StartupPreferences'; load.
Ben
Works, great, thanks. One detail: could you make sure that the files are written out with the standard line ending of the platform? This is usually a big pain with Smalltalk, the infrastructure is there, but usually not used. And now I end up with config files that are not easily editable in for instance vim. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525
On Dec 14, 2011, at 1:09 PM, Stefan Marr wrote:
Hi Benjamin:
On 13 Dec 2011, at 11:37, Benjamin wrote:
New version:
Gofer new squeaksource: 'StartupPreferences'; package: 'StartupPreferences'; load.
Ben
Works, great, thanks. One detail: could you make sure that the files are written out with the standard line ending of the platform? This is usually a big pain with Smalltalk, the infrastructure is there, but usually not used. And now I end up with config files that are not easily editable in for instance vim.
I was wondering why nano opened the files in a strange way ;) I will change that right now ;) Thanks, Ben
Thanks Stefan
-- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525
participants (11)
-
Ben Coman -
Benjamin -
Camillo Bruni -
Damien Cassou -
Esteban Lorenzano -
Sean P. DeNigris -
Stefan Marr -
Steve Taylor -
Stéphane Ducasse -
Sven Van Caekenberghe -
Tudor Girba