Startup Preferences: An Alternative

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Startup Preferences: An Alternative

Sean P. DeNigris
Administrator
Startup Preferences are great, but I felt limited by the "evaluate text files" approach, so I thought, "what's the minimum amount of code necessary to bootstrap into real smalltalk?" I came up with a really simple .st preference file that just loads a Metacello config with all my preferences. One cool thing is that this file never changes; all updates are to the packages which are loaded by the config. Talking to Ben at ESUG, I realized this might be helpful to people so I put it at http://smalltalkhub.com/#!/~SeanDeNigris/DeNigrisPreferences . There may be some stuff hardcoded, but at least you can see (and steal ;)) the approach if you find it valuable. There is more description in the project info on sthub.

HTH.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

philippeback
I am looking at this configuration and had fun loading the Batcave thing. What is this green area and slider on the right for?

Found fixIssue5656
"Issue 5656: Large fonts make tools slow 

| smallerFont |
smallerFont := LogicalFont familyName: 'Bitmap DejaVu Sans' pointSize: 12.
StandardFonts defaultFont: smallerFont.

Which I didn't knew about and for sure will help me!

All the loginTo things are quite useful as I faced this kind of situation enough to care :-)
Would be great to have a logout, in order to give images to other people without leaving credentials around.

This pref also useful:
customizeCompletion

NECPreferences
enabled: true;
caseSensitive: true;
expandPrefixes: true;
useEnterToAccept: false;
smartCharacters: true;
smartCharactersWithDoubleSpace: '[]{}';
spaceAfterCompletion: false;
popupAutomaticDelay: 100.

And a lot of other things that make it clear that a simple prefs file is not enough in your case :-)

Phil

Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

Sean P. DeNigris
Administrator
philippeback wrote
I am looking at this configuration and had fun loading the Batcave thing.
What is this green area and slider on the right for?
Cool! Ha ha, the batcave is full of experiments... the green widget is telling you that the system is up-to-date. It should turn red if there are Pharo updates available but not loaded. The other widget with the slider (which I don't think works so well, IIRC there is a bug in the slider interaction), well, ha ha, I read an article about how short an average human life actually is from the viewpoint of days remaining, which impacted me greatly, so it was supposed to be a little reminder about that. I think the slider was to play with different age projections and it was supposed to count down as the days go by...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

Sean P. DeNigris
Administrator
In reply to this post by Sean P. DeNigris
Sean P. DeNigris wrote
"what's the minimum amount of code necessary to bootstrap into real smalltalk?"
I simplified even further, and use #startUp: to handle the actual preferences. The only thing the startup.st actually does is load the code via Metacello on the first run:

StartupLoader default executeAtomicItems: {
    StartupAction name: 'Load DeNigrisPreferences' code: [
        Gofer it
            url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main';
            package: 'DeNigrisPreferences-Core';
            load
    ] runOnce: true
}.

Everything else is handled in the image. Enjoy!
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

Sean P. DeNigris
Administrator
In reply to this post by philippeback
philippeback wrote
Would be great to have a logout, in order to give images to other people
without leaving credentials around.
Done, added to world menu under the individual repo login options

The way the logins work is that a file named .mcconfig is expected in the general preferences folder with the format:

[squeaksource]
        user := 'me'.
        password := 'pwd'.
[squeaksource3]
        user := 'me'.
        password = 'pwd'.
[smalltalkhub]
        user := 'me'.
        password := 'pwd'.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

Sven Van Caekenberghe-2
This is really cool, is that in the image already ?
What about plain HTTP repos ?

On 23 Oct 2013, at 20:04, Sean P. DeNigris <[hidden email]> wrote:

> philippeback wrote
>> Would be great to have a logout, in order to give images to other people
>> without leaving credentials around.
>
> Done, added to world menu under the individual repo login options
>
> The way the logins work is that a file named .mcconfig is expected in the
> general preferences folder with the format:
>
> [squeaksource]
> user := 'me'.
> password := 'pwd'.
> [squeaksource3]
> user := 'me'.
> password = 'pwd'.
> [smalltalkhub]
> user := 'me'.
> password := 'pwd'.
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Startup-Preferences-An-Alternative-tp4713968p4716686.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

philippeback
In reply to this post by Sean P. DeNigris
I am sold. I happen top have an Excel sheet with days until I am quite old.

I did that sheet when I was about 30.

43 now :-)

Time flies indeed.



Phil



On Wed, Oct 23, 2013 at 7:48 PM, Sean P. DeNigris <[hidden email]> wrote:
philippeback wrote
> I am looking at this configuration and had fun loading the Batcave thing.
> What is this green area and slider on the right for?

Cool! Ha ha, the batcave is full of experiments... the green widget is
telling you that the system is up-to-date. It should turn red if there are
Pharo updates available but not loaded. The other widget with the slider
(which I don't think works so well, IIRC there is a bug in the slider
interaction), well, ha ha, I read an article about how short an average
human life actually is from the viewpoint of days remaining, which impacted
me greatly, so it was supposed to be a little reminder about that. I think
the slider was to play with different age projections and it was supposed to
count down as the days go by...



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Startup-Preferences-An-Alternative-tp4713968p4716684.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

Igor Stasenko
In reply to this post by Sven Van Caekenberghe-2

On 23 October 2013 20:21, Sven Van Caekenberghe <[hidden email]> wrote:
This is really cool, is that in the image already ?
What about plain HTTP repos ?


indeed, what could be simpler than:

Compiler evaluate: (ZnEasy get: 'http://my.url.with.script.st')

and you can, of course place it on github, if you need version control, like:

https://raw.github.com/pharo-project/pharo-vm/master/codegen-scripts/LoadVMMaker.st

 
On 23 Oct 2013, at 20:04, Sean P. DeNigris <[hidden email]> wrote:

> philippeback wrote
>> Would be great to have a logout, in order to give images to other people
>> without leaving credentials around.
>
> Done, added to world menu under the individual repo login options
>
> The way the logins work is that a file named .mcconfig is expected in the
> general preferences folder with the format:
>
> [squeaksource]
>       user := 'me'.
>       password := 'pwd'.
> [squeaksource3]
>       user := 'me'.
>       password = 'pwd'.
> [smalltalkhub]
>       user := 'me'.
>       password := 'pwd'.
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Startup-Preferences-An-Alternative-tp4713968p4716686.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>





--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

EstebanLM
you mean:

CodeImporter evaluateString:  (ZnEasy get: 'my-url') contents.

:)

On Oct 23, 2013, at 11:17 PM, Igor Stasenko <[hidden email]> wrote:


On 23 October 2013 20:21, Sven Van Caekenberghe <[hidden email]> wrote:
This is really cool, is that in the image already ?
What about plain HTTP repos ?


indeed, what could be simpler than:

Compiler evaluate: (ZnEasy get: 'http://my.url.with.script.st')

and you can, of course place it on github, if you need version control, like:

https://raw.github.com/pharo-project/pharo-vm/master/codegen-scripts/LoadVMMaker.st

 
On 23 Oct 2013, at 20:04, Sean P. DeNigris <[hidden email]> wrote:

> philippeback wrote
>> Would be great to have a logout, in order to give images to other people
>> without leaving credentials around.
>
> Done, added to world menu under the individual repo login options
>
> The way the logins work is that a file named .mcconfig is expected in the
> general preferences folder with the format:
>
> [squeaksource]
>       user := 'me'.
>       password := 'pwd'.
> [squeaksource3]
>       user := 'me'.
>       password = 'pwd'.
> [smalltalkhub]
>       user := 'me'.
>       password := 'pwd'.
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Startup-Preferences-An-Alternative-tp4713968p4716686.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>





--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

Sven Van Caekenberghe-2
And to save on parenthesis, you could also write

 Compiler evaluate: 'http://my.url.with.script.st' asZnUrl retrieveContents.

 CodeImporter evaluateString: 'http://my.url.with.script.st' asUrl retrieveContents.

With #asUrl and #asZnUrl soon to be 100% the same thing.

On 24 Oct 2013, at 14:32, Esteban Lorenzano <[hidden email]> wrote:

> you mean:
>
> CodeImporter evaluateString:  (ZnEasy get: 'my-url') contents.
>
> :)
>
> On Oct 23, 2013, at 11:17 PM, Igor Stasenko <[hidden email]> wrote:
>
>>
>> On 23 October 2013 20:21, Sven Van Caekenberghe <[hidden email]> wrote:
>> This is really cool, is that in the image already ?
>> What about plain HTTP repos ?
>>
>>
>> indeed, what could be simpler than:
>>
>> Compiler evaluate: (ZnEasy get: 'http://my.url.with.script.st')
>>
>> and you can, of course place it on github, if you need version control, like:
>>
>> https://raw.github.com/pharo-project/pharo-vm/master/codegen-scripts/LoadVMMaker.st
>>
>>  
>> On 23 Oct 2013, at 20:04, Sean P. DeNigris <[hidden email]> wrote:
>>
>> > philippeback wrote
>> >> Would be great to have a logout, in order to give images to other people
>> >> without leaving credentials around.
>> >
>> > Done, added to world menu under the individual repo login options
>> >
>> > The way the logins work is that a file named .mcconfig is expected in the
>> > general preferences folder with the format:
>> >
>> > [squeaksource]
>> >       user := 'me'.
>> >       password := 'pwd'.
>> > [squeaksource3]
>> >       user := 'me'.
>> >       password = 'pwd'.
>> > [smalltalkhub]
>> >       user := 'me'.
>> >       password := 'pwd'.
>> >
>> >
>> >
>> > -----
>> > Cheers,
>> > Sean
>> > --
>> > View this message in context: http://forum.world.st/Startup-Preferences-An-Alternative-tp4713968p4716686.html
>> > Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>> >
>>
>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>


Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

Igor Stasenko



On 24 October 2013 14:42, Sven Van Caekenberghe <[hidden email]> wrote:
And to save on parenthesis, you could also write

 Compiler evaluate: 'http://my.url.with.script.st' asZnUrl retrieveContents.

 CodeImporter evaluateString: 'http://my.url.with.script.st' asUrl retrieveContents.

this is why i love smalltalk: that you can express highly complex stuff (there's a lot
of stuff happens under the hood) by single line expression.

Comparing to most examples of C frameworks, where  you had to manually allocate buffers,
initialize some data structures, and pass several options and flags here and there, which at the end
does what you need, but floods your mind with hundreds of tiny irrelevant details..
 
With #asUrl and #asZnUrl soon to be 100% the same thing.

On 24 Oct 2013, at 14:32, Esteban Lorenzano <[hidden email]> wrote:

> you mean:
>
> CodeImporter evaluateString:  (ZnEasy get: 'my-url') contents.
>
> :)
>
> On Oct 23, 2013, at 11:17 PM, Igor Stasenko <[hidden email]> wrote:
>
>>
>> On 23 October 2013 20:21, Sven Van Caekenberghe <[hidden email]> wrote:
>> This is really cool, is that in the image already ?
>> What about plain HTTP repos ?
>>
>>
>> indeed, what could be simpler than:
>>
>> Compiler evaluate: (ZnEasy get: 'http://my.url.with.script.st')
>>
>> and you can, of course place it on github, if you need version control, like:
>>
>> https://raw.github.com/pharo-project/pharo-vm/master/codegen-scripts/LoadVMMaker.st
>>
>>
>> On 23 Oct 2013, at 20:04, Sean P. DeNigris <[hidden email]> wrote:
>>
>> > philippeback wrote
>> >> Would be great to have a logout, in order to give images to other people
>> >> without leaving credentials around.
>> >
>> > Done, added to world menu under the individual repo login options
>> >
>> > The way the logins work is that a file named .mcconfig is expected in the
>> > general preferences folder with the format:
>> >
>> > [squeaksource]
>> >       user := 'me'.
>> >       password := 'pwd'.
>> > [squeaksource3]
>> >       user := 'me'.
>> >       password = 'pwd'.
>> > [smalltalkhub]
>> >       user := 'me'.
>> >       password := 'pwd'.
>> >
>> >
>> >
>> > -----
>> > Cheers,
>> > Sean
>> > --
>> > View this message in context: http://forum.world.st/Startup-Preferences-An-Alternative-tp4713968p4716686.html
>> > Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>> >
>>
>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>





--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

philippeback
Ah ah yeah sure is cool.

Now I was explaining some Seaside stuff to a friend who is doing .Net and he had a hard time grasping the thing.

Phil


, October 24, 2013, Igor Stasenko <[hidden email]> wrote:
>
>
>
> On 24 October 2013 14:42, Sven Van Caekenberghe <[hidden email]> wrote:
>>
>> And to save on parenthesis, you could also write
>>
>>  Compiler evaluate: 'http://my.url.with.script.st' asZnUrl retrieveContents.
>>
>>  CodeImporter evaluateString: 'http://my.url.with.script.st' asUrl retrieveContents.
>>
> this is why i love smalltalk: that you can express highly complex stuff (there's a lot
> of stuff happens under the hood) by single line expression.
>
> Comparing to most examples of C frameworks, where  you had to manually allocate buffers,
> initialize some data structures, and pass several options and flags here and there, which at the end
> does what you need, but floods your mind with hundreds of tiny irrelevant details..
>  
>>
>> With #asUrl and #asZnUrl soon to be 100% the same thing.
>>
>> On 24 Oct 2013, at 14:32, Esteban Lorenzano <[hidden email]> wrote:
>>
>> > you mean:
>> >
>> > CodeImporter evaluateString:  (ZnEasy get: 'my-url') contents.
>> >
>> > :)
>> >
>> > On Oct 23, 2013, at 11:17 PM, Igor Stasenko <[hidden email]> wrote:
>> >
>> >>
>> >> On 23 October 2013 20:21, Sven Van Caekenberghe <[hidden email]> wrote:
>> >> This is really cool, is that in the image already ?
>> >> What about plain HTTP repos ?
>> >>
>> >>
>> >> indeed, what could be simpler than:
>> >>
>> >> Compiler evaluate: (ZnEasy get: 'http://my.url.with.script.st')
>> >>
>> >> and you can, of course place it on github, if you need version control, like:
>> >>
>> >> https://raw.github.com/pharo-project/pharo-vm/master/codegen-scripts/LoadVMMaker.st
>> >>
>> >>
>> >> On 23 Oct 2013, at 20:04, Sean P. DeNigris <[hidden email]> wrote:
>> >>
>> >> > philippeback wrote
>> >> >> Would be great to have a logout, in order to give images to other people
>> >> >> without leaving credentials around.
>> >> >
>> >> > Done, added to world menu under the individual repo login options
>> >> >
>> >> > The way the logins work is that a file named .mcconfig is expected in the
>> >> > general preferences folder with the format:
>> >> >
>> >> > [squeaksource]
>> >> >       user := 'me'.
>> >> >       password := 'pwd'.
>> >> > [squeaksource3]
>> >> >       user := 'me'.
>> >> >       password = 'pwd'.
>> >> > [smalltalkhub]
>> >> >       user := 'me'.
>> >> >       password := 'pwd'.
>> >> >
>> >> >
>> >> >
>> >> > -----
>> >> > Cheers,
>> >> > Sean
>> >> > --
>> >> > View this message in context: http://forum.world.st/Startup-Preferences-An-Alternative-tp4713968p4716686.html
>> >> > Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>> >> >
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --

>> >> Best regards,
>> >> Igor Stasenko.
>> >
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.

--
---
Philippe Back
Dramatic Performance Improvements
Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
Blog: http://philippeback.be | Twitter: @philippeback

High Octane SPRL
rue cour Boisacq 101 | 1301 Bierges | Belgium

Pharo Consortium Member - http://consortium.pharo.org/
Featured on the Software Process and Measurement Cast - http://spamcast.libsyn.com
Sparx Systems Enterprise Architect and Ability Engineering EADocX Value Added Reseller
 


Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

Stéphane Ducasse
In reply to this post by Igor Stasenko
this is what I do for the PharoTopics :)

On Oct 24, 2013, at 4:17 AM, Igor Stasenko <[hidden email]> wrote:


On 23 October 2013 20:21, Sven Van Caekenberghe <[hidden email]> wrote:
This is really cool, is that in the image already ?
What about plain HTTP repos ?


indeed, what could be simpler than:

Compiler evaluate: (ZnEasy get: 'http://my.url.with.script.st')

and you can, of course place it on github, if you need version control, like:

https://raw.github.com/pharo-project/pharo-vm/master/codegen-scripts/LoadVMMaker.st

 
On 23 Oct 2013, at 20:04, Sean P. DeNigris <[hidden email]> wrote:

> philippeback wrote
>> Would be great to have a logout, in order to give images to other people
>> without leaving credentials around.
>
> Done, added to world menu under the individual repo login options
>
> The way the logins work is that a file named .mcconfig is expected in the
> general preferences folder with the format:
>
> [squeaksource]
>       user := 'me'.
>       password := 'pwd'.
> [squeaksource3]
>       user := 'me'.
>       password = 'pwd'.
> [smalltalkhub]
>       user := 'me'.
>       password := 'pwd'.
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Startup-Preferences-An-Alternative-tp4713968p4716686.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>





--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Startup Preferences: An Alternative

Sean P. DeNigris
Administrator
In reply to this post by Sven Van Caekenberghe-2
Sven Van Caekenberghe-2 wrote
This is really cool, is that in the image already ?
It's just something I use personally in my images (see DeNigrisPreferences on sthub), but if there's interest I will extract it...
Cheers,
Sean