Re: [Pharo-dev] How production ready is Pharo on SQLServer?

2014-09-19 Thread Stephan Eggermont
Sebastian, that doesn't look like the correct one
DBXTalk is on smalltalkhub

https://ci.inria.fr/dbxtalk/

Stephan



[Pharo-dev] Pharo books - association

2014-09-19 Thread stepharo

Hi guys

I wanted to let you know that each time you buy a pharo book the small 
benefit is given to the association.


Stef



Re: [Pharo-dev] How production ready is Pharo on SQLServer?

2014-09-19 Thread Tudor Girba
Here is how to load and install DBXTalk in Pharo 3.0:

Gofer new
 smalltalkhubUser: 'DBXTalk' project: 'DBXTalkDriver';
 package: 'ConfigurationOfOpenDBXDriver';
 load.
 #ConfigurationOfOpenDBXDriver asClass loadBleedingEdge.
  #NBPharoOpenDBX asClass installAsCurrent.

Cheers,
Doru


On Fri, Sep 19, 2014 at 8:45 AM, Esteban Lorenzano esteba...@gmail.com
wrote:

 yeah… I told you that dbxtalk site information is outdated (and never find
 the time to update)

 you need to look here:

 http://smalltalkhub.com/#!/~DBXTalk/Configurations

 (or in the configuration browser)

 cheers,
 Esteban

 On 19 Sep 2014, at 08:00, Stephan Eggermont step...@stack.nl wrote:

  Sebastian, that doesn't look like the correct one
  DBXTalk is on smalltalkhub
 
  https://ci.inria.fr/dbxtalk/
 
  Stephan
 





-- 
www.tudorgirba.com

Every thing has its own flow


[Pharo-dev] [Review: 11536] Add Stream printString:

2014-09-19 Thread Max Leske
This issue was more of a discussion between Camillo and Sven. They never 
reached a conclusion, so please take a look. I’ve compiled the transcript below.

The issue isn’t easy to solve and maybe we can just close it as “not important”.

https://pharo.fogbugz.com/f/cases/11536/Add-Stream-printString




Camillo:
This method should be added to avoid many asString sends.

Example:
stream nextPutAll: #('ABC') asString could be written as stream printString: 
#('ABC').

This is a common extension of the following pattern:
stream nextPutAll: #('ABC') printString could be written as stream print: 
#('ABC').



Sven:
And what about #print: as implemented by Transcripts and SocketStreams ?

It is shorter.
Feels more familiar.



Camillo:
#print: is already implement and doesn't solve the stream nextPutAll: foo 
asString case. Since you cannot simply write stream print: foo, since you get 
quotes added for Strings.

Ok, I admit that with decent design you can avoid this, since it should almost 
never happen that you have a String or a non string object in the same 
variable, right?



Sven:
Yeah, that String issue is a bit annoying sometimes.
Indeed there is Stream#print: already.

But look:

ThreadSafeTranscript#print: anObject

self nextPutAll: anObject asString

how about that ?

There is also # whose implementation is even weirder, but it is handy.

The question remain: when do you want to mix Strings and other objects as 
arguments ?



Camillo:
- # is basically a lazy combination of #nextPut: and #nextPutAll:
- #print: should call #printOn: on the initial argument, which for strings 
defaults to storeOn: which I think is wrong, but I would hardly stand a chance 
changing that :P

So my global goal here is to avoid any kind of asString sends while pushing 
stuff on a stream. Sadly this happens more often than I thought :/



Sven:
Maybe this discussion should happen on the mailing list ?

Changing String#printOn: might be hard, but # is much more recent, no ? 
Could it not be changed to do what you want ? Like

Streamm anObject
  self nextPutAll: anObject asString

Another point is that #asString is not so efficient, since it creates throwaway 
Strings.

Re: [Pharo-dev] Versioner does not work on Pharo 4

2014-09-19 Thread Christophe Demarey
Hi Kilon,

You error is strange. I use Versionner on Pharo 4.0 without any problem.
If I take a closer look at the stack trace, the error comes from the 
MetacelloToolBox when Versionner asks for configuration classes.
What is really strange is that after this message sent, the stack shows the 
execution goes through EphPyParser class(Object)mustBeBoolean.
I don't get why.
I tried in a fresh Pharo image to load Ephestos, create a config for it, and 
got no problem.
Can you try to reproduce and give more information about the environment, what 
you did?

Thanks,
Christophe.

Le 17 sept. 2014 à 16:57, kilon alios a écrit :

 So I tried today to open versioner to make a configuration for Ephestos and i 
 got this error
 
 RBMethodNode(Object)doesNotUnderstand: #asSequenceNode
 EphPyParser class(Object)mustBeBooleanInMagic:
 EphPyParser class(Object)mustBeBoolean
 MetacelloProjectRegistration classExecuteUnOptimizedIn:
 EphPyParser class(Object)mustBeBooleanInMagic:
 EphPyParser class(Object)mustBeBoolean
 [ :cl | 
 (answer includes: cl)
   ifFalse: [ 
   (([ cl isMetacelloConfig ]
   on: Error
   do: [ :ex | ex return: false ]) and: [ cl name asString 
 beginsWith: 'ConfigurationOf' ])
   ifTrue: [ answer add: cl ] ] ] in 
 MetacelloProjectRegistration classconfigurationClasses in Block: [ :cl | ...
 OrderedCollectiondo:
 MetacelloProjectRegistration classconfigurationClasses
 MetacelloToolBox classconfigurationClasses
 MBConfigurationRootconfigurationClasses
 MBConfigurationRootconfigurations
 VersionnerSpecBrowser classimageConfigurations
 VersionnerSpecBrowser classopen
 [ VersionnerSpecBrowser open ] in VersionnerSpecBrowser classmenuCommandOn: 
 in Block: [ VersionnerSpecBrowser open ]
 BlockClosurecull:
 [ 
 | selArgCount |
 show cursor in case item opens a new MVC window
 (selArgCount := selector numArgs) = 0
   ifTrue: [ target perform: selector ]
   ifFalse: [ 
   selArgCount = arguments size
   ifTrue: [ target perform: selector withArguments: 
 arguments ]
   ifFalse: [ target perform: selector withArguments: 
 (arguments copyWith: evt) ] ].
 self changed ] in ToggleMenuItemMorph(MenuItemMorph)invokeWithEvent: in 
 Block: [ ...
 BlockClosureensure:
 CursorWithMask(Cursor)showWhile:
 ToggleMenuItemMorph(MenuItemMorph)invokeWithEvent:
 ToggleMenuItemMorph(MenuItemMorph)mouseUp:
 ToggleMenuItemMorph(MenuItemMorph)handleMouseUp:
 MouseButtonEventsentTo:
 ToggleMenuItemMorph(Morph)handleEvent:
 MorphicEventDispatcherdispatchDefault:with:
 MorphicEventDispatcherdispatchEvent:with:
 ToggleMenuItemMorph(Morph)processEvent:using:
 MorphicEventDispatcherdispatchDefault:with:
 MorphicEventDispatcherdispatchEvent:with:
 MenuMorph(Morph)processEvent:using:
 



smime.p7s
Description: S/MIME cryptographic signature


Re: [Pharo-dev] Versioner does not work on Pharo 4

2014-09-19 Thread kilon alios
Well to kepp you updated , because I did not bother replying to my own
thread since none seemed to care or have the same issue as me. I tried on
windows again same error as macos on a fresh image by the way. So I know it
must not be me.

But now with a latest Pharo 4 image i get no errors in both Macos and
Windows, so the bug apparently was fixed. That may explain why you get no
error , maybe it was a bug in a specific release.

The only things I am doing with pharo is

1) use dark theme

2) use free type font Arial on windows and Monaco on macos

3) use filetree for working with a git directory.

On Fri, Sep 19, 2014 at 11:20 AM, Christophe Demarey 
christophe.dema...@inria.fr wrote:

 Hi Kilon,

 You error is strange. I use Versionner on Pharo 4.0 without any problem.
 If I take a closer look at the stack trace, the error comes from the
 MetacelloToolBox when Versionner asks for configuration classes.
 What is really strange is that after this message sent, the stack shows
 the execution goes through EphPyParser class(Object)mustBeBoolean.
 I don't get why.
 I tried in a fresh Pharo image to load Ephestos, create a config for it,
 and got no problem.
 Can you try to reproduce and give more information about the environment,
 what you did?

 Thanks,
 Christophe.

 Le 17 sept. 2014 à 16:57, kilon alios a écrit :

  So I tried today to open versioner to make a configuration for Ephestos
 and i got this error
 
  RBMethodNode(Object)doesNotUnderstand: #asSequenceNode
  EphPyParser class(Object)mustBeBooleanInMagic:
  EphPyParser class(Object)mustBeBoolean
  MetacelloProjectRegistration classExecuteUnOptimizedIn:
  EphPyParser class(Object)mustBeBooleanInMagic:
  EphPyParser class(Object)mustBeBoolean
  [ :cl |
  (answer includes: cl)
ifFalse: [
(([ cl isMetacelloConfig ]
on: Error
do: [ :ex | ex return: false ]) and: [ cl name
 asString beginsWith: 'ConfigurationOf' ])
ifTrue: [ answer add: cl ] ] ] in
 MetacelloProjectRegistration classconfigurationClasses in Block: [ :cl |
 ...
  OrderedCollectiondo:
  MetacelloProjectRegistration classconfigurationClasses
  MetacelloToolBox classconfigurationClasses
  MBConfigurationRootconfigurationClasses
  MBConfigurationRootconfigurations
  VersionnerSpecBrowser classimageConfigurations
  VersionnerSpecBrowser classopen
  [ VersionnerSpecBrowser open ] in VersionnerSpecBrowser
 classmenuCommandOn: in Block: [ VersionnerSpecBrowser open ]
  BlockClosurecull:
  [
  | selArgCount |
  show cursor in case item opens a new MVC window
  (selArgCount := selector numArgs) = 0
ifTrue: [ target perform: selector ]
ifFalse: [
selArgCount = arguments size
ifTrue: [ target perform: selector withArguments:
 arguments ]
ifFalse: [ target perform: selector withArguments:
 (arguments copyWith: evt) ] ].
  self changed ] in ToggleMenuItemMorph(MenuItemMorph)invokeWithEvent:
 in Block: [ ...
  BlockClosureensure:
  CursorWithMask(Cursor)showWhile:
  ToggleMenuItemMorph(MenuItemMorph)invokeWithEvent:
  ToggleMenuItemMorph(MenuItemMorph)mouseUp:
  ToggleMenuItemMorph(MenuItemMorph)handleMouseUp:
  MouseButtonEventsentTo:
  ToggleMenuItemMorph(Morph)handleEvent:
  MorphicEventDispatcherdispatchDefault:with:
  MorphicEventDispatcherdispatchEvent:with:
  ToggleMenuItemMorph(Morph)processEvent:using:
  MorphicEventDispatcherdispatchDefault:with:
  MorphicEventDispatcherdispatchEvent:with:
  MenuMorph(Morph)processEvent:using:
 




[Pharo-dev] Implementing lazy loading for expandable collections

2014-09-19 Thread Max Leske
I’ve written an implementation of lazily initialized expandable collections 
(for OrderedCollection and subclasses only for now), inspired by Alexandre’s 
talk at ESUG 
(http://www.youtube.com/watch?v=x0YJ2dsZdKglist=UUO-vBhaKVZf0al-ISMMPvRw). The 
implementation is pretty much straight forward but there are a couple of 
culprits I want to point out in case anybody else wants to do this:

- my implementation requires an extra instance variable in OrderedCollection to 
store the requested size. This extra instance variable will break Monticello 
(and possibly other tools) because Monticello uses OrderedCollections to load 
code and the particular way it uses them makes it impossible to change the 
number of instance variables on OrderedCollection. Also, all .mcz files written 
after the change will not be loadable by images without the new instance 
variable (same reason).
- the above means that you have to modify the code in the image manually and 
save a new “base image
- read only messages should obviously not initialize the array. The 
‘firstIndex’ and ‘lastIndex’ variables are quite handy for that. I initialize 
those variables to 1 and 0 respectively which makes most things work already 
(e.g. #size, #isEmpty etc.).
- when trying to implement the same for HashedCollection I couldn’t. The image 
didn’t just stop working, there was no output at all on the console, not even 
when using a debug VM. The problem seems to be MethodDictionary, at least 
that’s the only subclass of Dictionary for which adding an instance variable 
doesn’t work.

I’ll share some memory monitoring as soon as I have something significant (only 
just rolled it out).


Big thanks to Alex for his talk and the cool work he and his students did!

Cheers,
Max


Re: [Pharo-dev] Versioner does not work on Pharo 4

2014-09-19 Thread Christophe Demarey

Le 19 sept. 2014 à 11:21, kilon alios a écrit :

 Well to kepp you updated , because I did not bother replying to my own thread 
 since none seemed to care or have the same issue as me.

I was out of office last days ...

 I tried on windows again same error as macos on a fresh image by the way. So 
 I know it must not be me. 

On which image? I just tried on a fresh 3.0 image and it also works for me.

 The only things I am doing with pharo is 
 
 1) use dark theme
 
 2) use free type font Arial on windows and Monaco on macos
 
 3) use filetree for working with a git directory.

Maybe a side effect.
Could you give me a script to help reproducing the problem? Maybe just your 
startup script.
Does the problem appear the first time you open Versionner?

Thanks,
Christophe.

smime.p7s
Description: S/MIME cryptographic signature


[Pharo-dev] [pharo-project/pharo-core]

2014-09-19 Thread GitHub
  Branch: refs/tags/40234
  Home:   https://github.com/pharo-project/pharo-core


[Pharo-dev] [pharo-project/pharo-core] a53477: 40234

2014-09-19 Thread GitHub
  Branch: refs/heads/4.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: a5347722741a52b59c77091c4af73d0799f8ed57
  
https://github.com/pharo-project/pharo-core/commit/a5347722741a52b59c77091c4af73d0799f8ed57
  Author: Jenkins Build Server bo...@pharo-project.org
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
A Deprecated40.package/extension/Locale/class/addLocalChangedListener_.st
A Deprecated40.package/extension/Locale/class/isoLocale_.st
A Deprecated40.package/extension/Locale/class/localeChanged.st
A Deprecated40.package/extension/Locale/class/localeChangedListeners.st
A Deprecated40.package/extension/LocaleID/class/previous.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - 
scripts/script234.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - 
updates/update40234.st
M 
ScriptLoader40.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
A 
System-Localization-Tests.package/ISOLanguageDefinitionTest.class/README.md
A 
System-Localization-Tests.package/ISOLanguageDefinitionTest.class/definition.st
A 
System-Localization-Tests.package/ISOLanguageDefinitionTest.class/instance/tests/testISO2LanguageDefinition.st
A 
System-Localization-Tests.package/ISOLanguageDefinitionTest.class/instance/tests/testISO3LanguageDefinition.st
A System-Localization-Tests.package/LocaleAnnouncementTests.class/README.md
A 
System-Localization-Tests.package/LocaleAnnouncementTests.class/definition.st
A 
System-Localization-Tests.package/LocaleAnnouncementTests.class/instance/events/localeWasChanged_.st
A 
System-Localization-Tests.package/LocaleAnnouncementTests.class/instance/private
 accessing/frenchLocale.st
A 
System-Localization-Tests.package/LocaleAnnouncementTests.class/instance/running/setUp.st
A 
System-Localization-Tests.package/LocaleAnnouncementTests.class/instance/running/tearDown.st
A 
System-Localization-Tests.package/LocaleAnnouncementTests.class/instance/tests/testLocaleChangeAnnouncement.st
A System-Localization-Tests.package/LocaleChangedTest.class/README.md
A System-Localization-Tests.package/LocaleChangedTest.class/definition.st
A 
System-Localization-Tests.package/LocaleChangedTest.class/instance/private 
accessing/englishLocale.st
A 
System-Localization-Tests.package/LocaleChangedTest.class/instance/private 
accessing/germanLocale.st
A 
System-Localization-Tests.package/LocaleChangedTest.class/instance/tests/testInstanceCreation.st
A System-Localization-Tests.package/LocaleIDTest.class/README.md
A System-Localization-Tests.package/LocaleIDTest.class/definition.st
A System-Localization-Tests.package/LocaleIDTest.class/instance/tests - 
test data/frenchLocaleID.st
A System-Localization-Tests.package/LocaleIDTest.class/instance/tests - 
test data/germanLocaleID.st
A 
System-Localization-Tests.package/LocaleIDTest.class/instance/tests/testComparision.st
A 
System-Localization-Tests.package/LocaleIDTest.class/instance/tests/testCurrent.st
A 
System-Localization-Tests.package/LocaleIDTest.class/instance/tests/testFromISOString.st
A 
System-Localization-Tests.package/LocaleIDTest.class/instance/tests/testFromSingleISOString.st
A 
System-Localization-Tests.package/LocaleIDTest.class/instance/tests/testHashing.st
A 
System-Localization-Tests.package/LocaleIDTest.class/instance/tests/testInstanceCreationWithISOLanguage.st
A 
System-Localization-Tests.package/LocaleIDTest.class/instance/tests/testInstanceCreationWithISOLanguageAndCountry.st
A 
System-Localization-Tests.package/LocaleIDTest.class/instance/tests/testPosixNameConversion.st
A 
System-Localization-Tests.package/LocaleIDTest.class/instance/tests/testPrintString.st
A System-Localization-Tests.package/LocaleTest.class/README.md
A System-Localization-Tests.package/LocaleTest.class/definition.st
A 
System-Localization-Tests.package/LocaleTest.class/instance/tests/testAccessLocaleID.st
A 
System-Localization-Tests.package/LocaleTest.class/instance/tests/testCurrent.st
A 
System-Localization-Tests.package/NaturalLanguageTranslatorTest.class/README.md
A 
System-Localization-Tests.package/NaturalLanguageTranslatorTest.class/definition.st
A 
System-Localization-Tests.package/NaturalLanguageTranslatorTest.class/instance/running/setUp.st
A 
System-Localization-Tests.package/NaturalLanguageTranslatorTest.class/instance/running/tearDown.st
A 
System-Localization-Tests.package/NaturalLanguageTranslatorTest.class/instance/tests/testRegisterCustomTranslator.st
A 
System-Localization-Tests.package/NaturalLanguageTranslatorTest.class/instance/tests/testTranslatePureString.st
A 
System-Localization-Tests.package/RegisterableTranslatorMock.class/README.md
A 
System-Localization-Tests.package/RegisterableTranslatorMock.class/definition.st
A 

Re: [Pharo-dev] Filetree and Git and Github

2014-09-19 Thread p...@highoctane.be
On Fri, Sep 19, 2014 at 11:32 AM, kilon alios kilon.al...@gmail.com wrote:

 I have been told that there are some problem with gitfiletree that make it
 not recommended for public consumption and recommendation to newcomers.

 I have been using not gitfiletree but filetree alone for the past week for
 my project Ephestos, because I am ok commiting to git via terminal/

 https://github.com/kilon/phEphestos

 I have to congratulate people behind filetree it has been a smooth ride so
 far.I had no problems with it at all and I am using git in terminal for
 doing all the git commits and push etc.

 filetree also has been very succesful at some major refactoring I have
 done to Ephestos, I had to change the name of an entire class and I had to
 change methods to other classes . Filetree did an excellent job not just
 with the export to st file but actually git was able to see which files
 were deleted and which were renamed.

 That meant I did not have to do any git rm .

 However I do need to git add every time I add a new method or filetree
 creates a new file. Usually that is not  a problem because I can see what
 files are not tracked by git with git status and copy paste their paths to
 git add.

 So I will say overall my commits have been a process of saving in
 monticello , git add, git commit and git push which exactly the same
 process I have used for when I was and still coding in python.

 So thank you for this tool , I got fed up with the slow downs of
 Smalltalkhub and all its problems and it feels great to be back at using
 github :)


I'd agree to that thing. Took me a while but now the Git based workflow
just feels better.
Also useful is storing snippets as gists.
Git has won, let's embrace that.
This doesn't mean that STH is not useful as a project repository. MCZs are
still the main artifact.


 I will keep testing for a couple a months and then completely move to
 github . The only thing I noticed is that sometimes monticello slows down
 but that may well be a problem with Pharo 4.



Re: [Pharo-dev] How production ready is Pharo on SQLServer?

2014-09-19 Thread Sean P. DeNigris
Tudor Girba-2 wrote
  package: 'ConfigurationOfOpenDBXDriver';
  load.
  #ConfigurationOfOpenDBXDriver asClass loadBleedingEdge.

 configurationOf: 'OpenDBXDriver';
 loadVersion: #bleedingEdge.

:)



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/How-production-ready-is-Pharo-on-SQLServer-tp4777508p4778944.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



[Pharo-dev] [pharo-project/pharo-core]

2014-09-19 Thread GitHub
  Branch: refs/tags/40235
  Home:   https://github.com/pharo-project/pharo-core


[Pharo-dev] [pharo-project/pharo-core] 31716f: 40235

2014-09-19 Thread GitHub
  Branch: refs/heads/4.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: 31716ff672da83deb83bf7f262f0890fd0e105be
  
https://github.com/pharo-project/pharo-core/commit/31716ff672da83deb83bf7f262f0890fd0e105be
  Author: Jenkins Build Server bo...@pharo-project.org
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
R KernelTests.package/JobTest.class/instance/tests/testCurrent.st
A Ring-Core-Kernel.package/RGClassDefinition.class/class/instance 
creation/createSharedPoolNamed_.st
M Ring-Core-Kernel.package/RGClassDefinition.class/instance/shared 
pools/addSharedPoolNamed_.st
R 
Ring-Core-Kernel.package/RGFactory.class/instance/factory/createClassVariableNamed_parent_.st
R 
Ring-Core-Kernel.package/RGFactory.class/instance/factory/createPoolVariableNamed_parent_.st
R 
Ring-Core-Kernel.package/RGFactory.class/instance/factory/createSharedPoolNamed_.st
M 
Ring-Tests-Kernel.package/RGGlobalDefinitionTest.class/instance/testing/testPoolDefinition.st
M 
Ring-Tests-Kernel.package/RGVariableDefinitionTest.class/instance/testing/testClassVariable.st
M 
Ring-Tests-Kernel.package/RGVariableDefinitionTest.class/instance/testing/testPoolVariable.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - 
scripts/script235.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - 
updates/update40235.st
M 
ScriptLoader40.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
M Spec-Tools.package/MessageBrowser.class/instance/messageList 
interface/open.st

  Log Message:
  ---
  40235
14038 #testSendersOfAt failing when running the tests in the image 
https://pharo.fogbugz.com/f/cases/14038

14039 #testCurrent always fails when running all tests...
https://pharo.fogbugz.com/f/cases/14039

14041 Continue cleaning Ring Factory
https://pharo.fogbugz.com/f/cases/14041

http://files.pharo.org/image/40/40235.zip




Re: [Pharo-dev] Implementing lazy loading for expandable collections

2014-09-19 Thread Markus Fritsche

On 2014-09-19 11:35, Max Leske wrote:


- my implementation requires an extra instance variable in
OrderedCollection to store the requested size. This extra instance
variable will break Monticello (and possibly other tools) because
Monticello uses OrderedCollections to load code and the particular way
it uses them makes it impossible to change the number of instance
variables on OrderedCollection. Also, all .mcz files written after the
change will not be loadable by images without the new instance
variable (same reason).


I might be a bit fundamentalistic, but shouldn't this (a using class
making assumptions about the objects it's using) be considered a bug
by object oriented standards?

Best regards
  Markus



Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Sean P. DeNigris
From
http://forum.world.st/Next-version-of-Date-DateAndTime-and-Duration-API-updates-td4778871.html
:

Now in the InBox:
   KernelTests-cbc.278.mcz
   Kernel-cbc.871.mcz
The tests add in test for expected Duration addition and subtraction from
each other, including the new GenericMonth and GenericYear, and the very new
GenericDuration.  It also adds a few more tests for LeapYear tests with
adding years to them.

The test are still based on what it currently does, with the exceptions
listed previously (I haven't really changed any to expect failures, as has
been suggested - that will come shortly.  For now, I want to try to cause
little to no changes o expected behavior first - just new behavior for now).

Kernel adds the GenericDuration, and handles adding and subtracting
GenericMonth, GenericYear, and GenericDurations togeher in a rational way. 
This involves turning + and - in Durations into a double-dispatch so that it
will work.

There are no comments  yet in these classes - they will be there before the
weekend is over at the latest.

Any comments are more than welcome.

-cbc



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/Interesting-Date-Time-Thread-on-Squeak-Dev-tp4778652p4778945.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



Re: [Pharo-dev] Versioner does not work on Pharo 4

2014-09-19 Thread kilon alios
just for the record I have not created any kind of configuration in
Ephestos. The code that you can download from Smalltalkhub or github is the
only thing that lives inside the image. I use Smalltalkhub as a backup for
github repo until I make sure filetree is a reliable way to work with
github and pharo. I have not touche any of the internals of Pharo all my
code lives inside the SThub repo.

Other than the steps I described , and the code you can get from sthub I
have done nothing to the pharo image.

Also I forgot to say I dont mind at all late replies, I did not want to
imply that I was annoyed or anything like that with people not replying.
 Its perfectly ok to not reply to my threads or reply days afterwards or
even moths. I have in my hand scientific evidence that I am not the center
of this world.

Thank you Christopher and everyone who is trying to help me in each of my
problems. I really appreciate it.

On Fri, Sep 19, 2014 at 12:49 PM, kilon alios kilon.al...@gmail.com wrote:

 I dont use a startup script myself, in windows the image with problem is
 release 40230, i download that specific release and it works o_O , so maybe
 it was something I did afterall ? very strange

 so I attached my image folder, hope it helps you

 On Fri, Sep 19, 2014 at 12:39 PM, Christophe Demarey 
 christophe.dema...@inria.fr wrote:


 Le 19 sept. 2014 à 11:21, kilon alios a écrit :

  Well to kepp you updated , because I did not bother replying to my own
 thread since none seemed to care or have the same issue as me.

 I was out of office last days ...

  I tried on windows again same error as macos on a fresh image by the
 way. So I know it must not be me.

 On which image? I just tried on a fresh 3.0 image and it also works for
 me.

  The only things I am doing with pharo is
 
  1) use dark theme
 
  2) use free type font Arial on windows and Monaco on macos
 
  3) use filetree for working with a git directory.

 Maybe a side effect.
 Could you give me a script to help reproducing the problem? Maybe just
 your startup script.
 Does the problem appear the first time you open Versionner?

 Thanks,
 Christophe.





Re: [Pharo-dev] Implementing lazy loading for expandable collections

2014-09-19 Thread Nicolas Cellier
2014-09-19 13:55 GMT+02:00 Markus Fritsche mfrits...@reauktion.de:

 On 2014-09-19 11:35, Max Leske wrote:

  - my implementation requires an extra instance variable in
 OrderedCollection to store the requested size. This extra instance
 variable will break Monticello (and possibly other tools) because
 Monticello uses OrderedCollections to load code and the particular way
 it uses them makes it impossible to change the number of instance
 variables on OrderedCollection. Also, all .mcz files written after the
 change will not be loadable by images without the new instance
 variable (same reason).


 I might be a bit fundamentalistic, but shouldn't this (a using class
 making assumptions about the objects it's using) be considered a bug
 by object oriented standards?

 Best regards
   Markus


It's not the using class per se.
It's that MC is using a serialization framework sensitive to internal
object representation (number/order of ivars).
The question is this one:
- would using FUEL would have resolved the problem or not?
- wouldn't a serialization using message sends to reconstruct the objects
be more robust (future proof)?
Of course the later requires the maintenance of a well defined API, so the
robstness is relative.
But at least, it would respect the object paradigm a bit more.

Nicolas


Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Max Leske
Hi Sean,

did you see issue 13229 
(https://pharo.fogbugz.com/f/cases/13229/Year-arithmetic-broken)? It adds a new 
class AnnualDuration to allow for correct year based arithmetics. It also 
introduces floats for seconds (with nano seconds as base).

I guess that issue and your change will conflict but as I understand it, your 
change probably does pretty much the same (for the year part at least)? Could 
you take a look?

Cheers,
Max


On 19.09.2014, at 13:54, Sean P. DeNigris s...@clipperadams.com wrote:

 From
 http://forum.world.st/Next-version-of-Date-DateAndTime-and-Duration-API-updates-td4778871.html
 :
 
 Now in the InBox:
   KernelTests-cbc.278.mcz
   Kernel-cbc.871.mcz
 The tests add in test for expected Duration addition and subtraction from
 each other, including the new GenericMonth and GenericYear, and the very new
 GenericDuration.  It also adds a few more tests for LeapYear tests with
 adding years to them.
 
 The test are still based on what it currently does, with the exceptions
 listed previously (I haven't really changed any to expect failures, as has
 been suggested - that will come shortly.  For now, I want to try to cause
 little to no changes o expected behavior first - just new behavior for now).
 
 Kernel adds the GenericDuration, and handles adding and subtracting
 GenericMonth, GenericYear, and GenericDurations togeher in a rational way. 
 This involves turning + and - in Durations into a double-dispatch so that it
 will work.
 
 There are no comments  yet in these classes - they will be there before the
 weekend is over at the latest.
 
 Any comments are more than welcome.
 
 -cbc
 
 
 
 -
 Cheers,
 Sean
 --
 View this message in context: 
 http://forum.world.st/Interesting-Date-Time-Thread-on-Squeak-Dev-tp4778652p4778945.html
 Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
 




Re: [Pharo-dev] Implementing lazy loading for expandable collections

2014-09-19 Thread Max Leske

On 19.09.2014, at 14:06, Nicolas Cellier nicolas.cellier.aka.n...@gmail.com 
wrote:

 
 
 2014-09-19 13:55 GMT+02:00 Markus Fritsche mfrits...@reauktion.de:
 On 2014-09-19 11:35, Max Leske wrote:
 
 - my implementation requires an extra instance variable in
 OrderedCollection to store the requested size. This extra instance
 variable will break Monticello (and possibly other tools) because
 Monticello uses OrderedCollections to load code and the particular way
 it uses them makes it impossible to change the number of instance
 variables on OrderedCollection. Also, all .mcz files written after the
 change will not be loadable by images without the new instance
 variable (same reason).
 
 I might be a bit fundamentalistic, but shouldn't this (a using class
 making assumptions about the objects it's using) be considered a bug
 by object oriented standards?
 
 Best regards
   Markus
 
 
 It's not the using class per se.
 It's that MC is using a serialization framework sensitive to internal object 
 representation (number/order of ivars).

IIRC, MC counts the number of inst vars in the implementation that is being 
loaded and then assumes that the current implementation has the same number of 
fields. It might actually be quite easy to simply use the min of the number of 
instance variables and ignore the rest. However, that would not address the 
problem of modified variable position (which is a problem at least in theory).

 The question is this one:
 - would using FUEL would have resolved the problem or not?

Partly. You could tell Fuel to migrate to the new layout dynamically which 
would allow reading of the old format as well as reading and writing of the new 
format. It wouldn’t be exactly “nice” though.

 - wouldn't a serialization using message sends to reconstruct the objects be 
 more robust (future proof)?
 Of course the later requires the maintenance of a well defined API, so the 
 robstness is relative.
 But at least, it would respect the object paradigm a bit more.
 
 Nicolas



Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Sean P. DeNigris
Max Leske wrote
 your change

It's not mine. I just scanned the thread from Squeak Dev and was intrigued
because I've run into this limitation (the tension between year/month/etc as
a conceptual ideal, and those entities as a specific number of days in
context) a bunch before



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/Interesting-Date-Time-Thread-on-Squeak-Dev-tp4778652p4778960.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Max Leske

On 19.09.2014, at 14:16, Sven Van Caekenberghe s...@stfx.eu wrote:

 Part of that is in 
 https://pharo.fogbugz.com/f/cases/13229/Year-arithmetic-broken
 
 Furthermore, I am not so sure all this is a good idea, year/month durations 
 are not constants and are dealt with differently in many context (say the 
 financial world).
 
 January 30 + 1 month ?
 January 31 + 1 month ?

Issue 13299 doesn’t change that (I don’t know about the other change). There is 
still only the Month object which knows its number of days, so a month will 
always be used in a defined context.

 Februari 29 2004 + 1 year ?

This one is hard and the change in issue 13299 does indeed make the assumption 
that February 29 2004 + 1 year = February 28 2005. One might argue that is 
should be March 1.
But: that is also the assumption the *current* implementation makes, so no 
change there.

 
 And given all sorts of cleverness, will basic math rules still work ?
 
 A +B = B + A 
 A + B = C  = C - B = A
 
 On 19 Sep 2014, at 13:54, Sean P. DeNigris s...@clipperadams.com wrote:
 
 From
 http://forum.world.st/Next-version-of-Date-DateAndTime-and-Duration-API-updates-td4778871.html
 :
 
 Now in the InBox:
  KernelTests-cbc.278.mcz
  Kernel-cbc.871.mcz
 The tests add in test for expected Duration addition and subtraction from
 each other, including the new GenericMonth and GenericYear, and the very new
 GenericDuration.  It also adds a few more tests for LeapYear tests with
 adding years to them.
 
 The test are still based on what it currently does, with the exceptions
 listed previously (I haven't really changed any to expect failures, as has
 been suggested - that will come shortly.  For now, I want to try to cause
 little to no changes o expected behavior first - just new behavior for now).
 
 Kernel adds the GenericDuration, and handles adding and subtracting
 GenericMonth, GenericYear, and GenericDurations togeher in a rational way. 
 This involves turning + and - in Durations into a double-dispatch so that it
 will work.
 
 There are no comments  yet in these classes - they will be there before the
 weekend is over at the latest.
 
 Any comments are more than welcome.
 
 -cbc
 
 
 
 -
 Cheers,
 Sean
 --
 View this message in context: 
 http://forum.world.st/Interesting-Date-Time-Thread-on-Squeak-Dev-tp4778652p4778945.html
 Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
 
 
 




Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Max Leske

On 19.09.2014, at 14:16, Sean P. DeNigris s...@clipperadams.com wrote:

 Max Leske wrote
 your change
 
 It's not mine. I just scanned the thread from Squeak Dev and was intrigued
 because I've run into this limitation (the tension between year/month/etc as
 a conceptual ideal, and those entities as a specific number of days in
 context) a bunch before

Ok. Then I’ll look at it.

 
 
 
 -
 Cheers,
 Sean
 --
 View this message in context: 
 http://forum.world.st/Interesting-Date-Time-Thread-on-Squeak-Dev-tp4778652p4778960.html
 Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
 




Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Max Leske
Oops. Didn’t realize that thread was from Squeak dev. So there’s no Pharo 
implementation of that change for now anyway.

On 19.09.2014, at 14:35, Max Leske maxle...@gmail.com wrote:

 
 On 19.09.2014, at 14:16, Sean P. DeNigris s...@clipperadams.com wrote:
 
 Max Leske wrote
 your change
 
 It's not mine. I just scanned the thread from Squeak Dev and was intrigued
 because I've run into this limitation (the tension between year/month/etc as
 a conceptual ideal, and those entities as a specific number of days in
 context) a bunch before
 
 Ok. Then I’ll look at it.
 
 
 
 
 -
 Cheers,
 Sean
 --
 View this message in context: 
 http://forum.world.st/Interesting-Date-Time-Thread-on-Squeak-Dev-tp4778652p4778960.html
 Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
 
 




Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Max Leske
Ok, so I read Chris’ e-mail and I’m intrigued. 

Sven, you’re still right about financial months being 30 days for instance but 
the thing is that the current implementation seems broken (or inconsisten at 
least) and doesn’t honor that case either. *Not* making the change will not 
help us either…

So I’d say: let’s do it. If somebody objects (or proposes a change) then we can 
handle that but at least we can claim that we try to give the users what we 
preach, like writing natural language like code (e.g. “x + 1 month” which is 
currently not possible).

That’s my view at least. Also: we’re changing so much stuff in Pharo anyway all 
the time, I don’t think this would hurt.

Cheers,
Max


On 19.09.2014, at 14:37, Max Leske maxle...@gmail.com wrote:

 Oops. Didn’t realize that thread was from Squeak dev. So there’s no Pharo 
 implementation of that change for now anyway.
 
 On 19.09.2014, at 14:35, Max Leske maxle...@gmail.com wrote:
 
 
 On 19.09.2014, at 14:16, Sean P. DeNigris s...@clipperadams.com wrote:
 
 Max Leske wrote
 your change
 
 It's not mine. I just scanned the thread from Squeak Dev and was intrigued
 because I've run into this limitation (the tension between year/month/etc as
 a conceptual ideal, and those entities as a specific number of days in
 context) a bunch before
 
 Ok. Then I’ll look at it.
 
 
 
 
 -
 Cheers,
 Sean
 --
 View this message in context: 
 http://forum.world.st/Interesting-Date-Time-Thread-on-Squeak-Dev-tp4778652p4778960.html
 Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
 
 
 




Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Esteban A. Maringolo
2014-09-19 9:16 GMT-03:00 Sven Van Caekenberghe s...@stfx.eu:
 Part of that is in 
 https://pharo.fogbugz.com/f/cases/13229/Year-arithmetic-broken

 Furthermore, I am not so sure all this is a good idea, year/month durations 
 are not constants and are dealt with differently in many context (say the 
 financial world).

+1

 January 30 + 1 month ?
 January 31 + 1 month ?
 Februari 29 2004 + 1 year ?

 And given all sorts of cleverness, will basic math rules still work ?

 A +B = B + A
 A + B = C  = C - B = A

Pharo Date/DateAndTime are incremental[1], then all this
week/month/year operations will simply add/subtract the increment from
epoch.

The only way to do this in a deterministic way is to have a field based Date.

Regards!

Esteban A. Maringolo

[1] http://www.w3.org/TR/2005/NOTE-timezone-20051013/#d2e310



Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Christophe Demarey

Le 19 sept. 2014 à 14:59, Esteban A. Maringolo a écrit :

 Pharo Date/DateAndTime are incremental[1], then all this
 week/month/year operations will simply add/subtract the increment from
 epoch.
 
 The only way to do this in a deterministic way is to have a field based Date.

Yes, it would be a good idea.
Then, you may have today + 1 month, today + 1 financialMonth, ...

smime.p7s
Description: S/MIME cryptographic signature


Re: [Pharo-dev] Visualising Network Latency

2014-09-19 Thread Max Leske
Very cool.

- Do you parse data from a file? If so, what format does that file need to be 
in?
- Is the map zoomable to city level (to see connections between Bern and Zürich 
for instance)?

Cheers,
Max

On 19.09.2014, at 15:23, Leonel Merino mer...@iam.unibe.ch wrote:

 Hi All,
 
 I have been working on a visualisation of latency on a network. I found an 
 interesting dataset with latency information of 140 cities around the world.
 In the visualisation I show different metrics regarding latency such as from 
 each city which other has the best/worst latency; cities that geographically 
 are close but have high latency; far cities that have low latency; and 
 average latency for each city.
 
 When visualising the worst latency for each city I found that, for this 
 network (at least), Valencia and in a minor extent Nairobi represent the 
 worst endpoint for connections (in terms of latency). Also in the 
 visualisation of far cities with low latency, Newmarket in Canada and Toledo 
 in Spain concentrate the best endpoint for connections coming from Europe and 
 North-America respectively.  
 
 
 Here a couple of screenshots:
 
 PastedGraphic-4.pdf
 
 PastedGraphic-5.pdf
 
 PastedGraphic-6.pdf
 
 
 Here there is a screencast:
 http://www.youtube.com/watch?v=gDQnE-5yeWI
 
 
 
 
 If you want to load the code:
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Gofer new smalltalkhubUser: 'merino'
 project: 'NetworkLatency';
 package: 'ConfigurationOfNetworkLatency';
 load.
 (ConfigurationOfNetworkLatency project version: '0.1') load.
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
 
 To execute the visualisation:
 NLVisualise new open
 
 
 
 
 I would be glad to have your comments and suggestions.
 
 Best regards,
 
 Leonel Merino
 Research Assistant
 Software Composition Group
 Institute of Computer Science and Applied Mathematics
 University of Bern



Re: [Pharo-dev] Visualising Network Latency

2014-09-19 Thread Leonel Merino
Hi Max,

Thanks !

The input is a CSV file which contains a grid with city names and latency.
Surely you can zoom-in at city level. However, the map only contains 
information of the cities that come in the dataset (is not Bern).

Best regards,
Leonel

On 19 Sep 2014, at 15:30, Max Leske maxle...@gmail.com wrote:

 Very cool.
 
 - Do you parse data from a file? If so, what format does that file need to be 
 in?
 - Is the map zoomable to city level (to see connections between Bern and 
 Zürich for instance)?
 
 Cheers,
 Max
 
 On 19.09.2014, at 15:23, Leonel Merino mer...@iam.unibe.ch wrote:
 
 Hi All,
 
 I have been working on a visualisation of latency on a network. I found an 
 interesting dataset with latency information of 140 cities around the world.
 In the visualisation I show different metrics regarding latency such as from 
 each city which other has the best/worst latency; cities that geographically 
 are close but have high latency; far cities that have low latency; and 
 average latency for each city.
 
 When visualising the worst latency for each city I found that, for this 
 network (at least), Valencia and in a minor extent Nairobi represent the 
 worst endpoint for connections (in terms of latency). Also in the 
 visualisation of far cities with low latency, Newmarket in Canada and Toledo 
 in Spain concentrate the best endpoint for connections coming from Europe 
 and North-America respectively.  
 
 
 Here a couple of screenshots:
 
 PastedGraphic-4.pdf
 
 PastedGraphic-5.pdf
 
 PastedGraphic-6.pdf
 
 
 Here there is a screencast:
 http://www.youtube.com/watch?v=gDQnE-5yeWI
 
 
 
 
 If you want to load the code:
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Gofer new smalltalkhubUser: 'merino'
 project: 'NetworkLatency';
 package: 'ConfigurationOfNetworkLatency';
 load.
 (ConfigurationOfNetworkLatency project version: '0.1') load.
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
 
 To execute the visualisation:
 NLVisualise new open
 
 
 
 
 I would be glad to have your comments and suggestions.
 
 Best regards,
 
 Leonel Merino
 Research Assistant
 Software Composition Group
 Institute of Computer Science and Applied Mathematics
 University of Bern
 



Re: [Pharo-dev] The Dilemma: Building a Futuristic GUI for Ephestos

2014-09-19 Thread Alexandre Bergel
Hi Kilon,

Not sure what you are trying to do.

Try this:
-=-=-=-=-=-=-=-=-=-=-=-=
forms := Form allInstances.
v := RTView new.
t := 1.
e := (RTBitmap new form: [ :index | forms at: index ]) elementOn: t.

v add: e.
v open.

[
50 timesRepeat: [ 
t := t + 1. 
e model: t. 
e updateShape.
(Delay forMilliseconds: 500) wait.
v signalUpdate ]
] fork.
-=-=-=-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre


On Sep 14, 2014, at 1:22 AM, kilon alios kilon.al...@gmail.com wrote:

 so I tried to animate in Roassal having two different images display with a 
 delay for few millisecond but it only displays the second image with this code
 
 form1 :=Form fromFileNamed:'/Users/kilon/Pictures/pharo.png'.
 form2 :=Form fromFileNamed:'/Users/kilon/Pictures/box.png'.
 v := RTView new.
 c := v canvas.
 s := TRBitmapShape new.
 s form: form1.
 c addShape: s.
 v  open.
 
 (1 to: 100) do: [ :index| 
 s form: form1.
 s signalUpdate .
 (Delay forMilliseconds: 1000 ) wait.
 s form: form2.
 s signalUpdate .
 (Delay forMilliseconds: 1000) wait.].
 
 I looked into RTAnimation but dont know how to use it for this example. Any 
 help ? Does Roassal 2 support such animations ? 
 
 if I do s form: and then s signalUpdate for each form separately it works 
 fine but inside the loops does not seem to work , I tried bigger delays with 
 no effect. 
 
 On Sun, Sep 14, 2014 at 10:57 AM, stepharo steph...@free.fr wrote:
 Ronie when you ready I can help writting a chapter for the nex book.
 
 Stef
 
 
 On 13/9/14 21:42, Ronie Salgado wrote:
 Hello,
 
 On 13/9/14 20:11, Enrico Schwass wrote:
 Hi 
 
 another option could be the verse protocol. There was a plugin for Maya and 
 Blender to do realtime rendering. Dont know if there is some automatic 
 Swig-like wrapper for smalltalk but FFI might work. 
 
 There is Wig like wrapper for Pharo done by ronie salgado.
 
 I have an adapted version of Swig for Pharo NativeBoost here: 
 https://github.com/ronsaldo/swig
 
 Currently I am using it to generate my Bullet bindings (available here: 
 https://github.com/ronsaldo/bullet-pharo) that can be used as an example of 
 using Swig. 
 I still have to improve more my Swig generator, by writing documentation and 
 fixing some bugs.
 
 Greetings,
 Ronie
 
 2014-09-13 16:11 GMT-03:00 stepharo steph...@free.fr:
 
 On 13/9/14 20:11, Enrico Schwass wrote:
 Hi 
 
 another option could be the verse protocol. There was a plugin for Maya and 
 Blender to do realtime rendering. Dont know if there is some automatic 
 Swig-like wrapper for smalltalk but FFI might work. 
 
 There is Wig like wrapper for Pharo done by ronie salgado.
 
 Stef
 
 
 
 http://youtu.be/c_D2YJSNj8I
 
 Almost a decade ago I did some ruby bindings by hand. It was working out of 
 the box
 
 Bye
 Enno
 
 Am 13.09.2014 um 16:11 schrieb kilon alios kilon.al...@gmail.com:
 
 
  I am curious. You mean rendering Bitmap from blender, for later use in 
 Pharo UI? 
 
 yes exactly. Blender can render in all popular graphics files, most used 
 are png. Animation frames can be rendered each frame in its own file. 
 
 So basically its a lot like the average games out there. 
 
 I will suggest bare bone Morphic mainly, then Athens when you need 
 vectorial drawing.
 
 ok 
 
 For iStoa I decided to go purely Morphic, I have a lot of bitmap. Bitmap 
 source is SVG, then converted to PNG, overscaled for production use. Then 
 from iStoa, depending on the application window extent, the bitmap are 
 downscaled accordingly, I am pretty satisfied by the result.
 
 I fail to understand how your bitmap source is SVG for me bitmap is a 
 raster graphic format svg is  procedural graphic format. Two opposite 
 things. 
 
 Sure. The downpoint, you will depend on one additional layer.
 
 dependency is not an issue. Afterall the graphic files themselves will be 
 far bigger download even more so if the GUI becomes very large.
 
 Nice.  What will be the expected outcomes of such API, I am not sure to 
 understand and I am curious. 
 
 Well Blender besides creating 3d objects (which can be used as 2d objects 
 too) it can also create 3d unrendable objects. That means that objects 
 produce no graphics and have the role of placeholders or helpers, for 
 example when you want an emitter of light or emitter of a physical power 
 like gravity or wind. Those are called dummy objects and I could use them 
 to give characteristics to the graphics , for example I could use a dummy 
 to define the are of influence of a mouse click , or what type of event 
 the bitmap will respond to. That means you wont have to import the 
 graphics manually to pharo and create a separate morph for each bitmap and 
 then set the events but rather press a button in blender and then Ephestos 
 will import then bitmaps to pharo , set the events and create the morphs 
 automagically. 
 
 So basically you will be using Blender as a GUI designer. 
 
 Use fuel to store the state of 

Re: [Pharo-dev] The Dilemma: Building a Futuristic GUI for Ephestos

2014-09-19 Thread Alexandre Bergel
Well… Porting Roassal3d to Woden is almost straightforward :-)
We can help on this.

Effort behind Woden, Roassal, GraphET are not to simply tools. But instead 
producing an effective solution for a given problem. So, they will always be 
changing :-)

Cheers,
Alexandre


On Sep 14, 2014, at 7:28 AM, Nicolai Hess nicolaih...@web.de wrote:

 Sometimes it is a bit dangerous to trust on bleeding edge pharo frameworks. 
 I did some work based on Roassal3D just to found out there won't be any 
 further development.
 The same happens with Roassal and GraphET.
 The same can happen with Woden too :)

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Sven Van Caekenberghe

On 19 Sep 2014, at 14:59, Esteban A. Maringolo emaring...@gmail.com wrote:

 2014-09-19 9:16 GMT-03:00 Sven Van Caekenberghe s...@stfx.eu:
 Part of that is in 
 https://pharo.fogbugz.com/f/cases/13229/Year-arithmetic-broken
 
 Furthermore, I am not so sure all this is a good idea, year/month durations 
 are not constants and are dealt with differently in many context (say the 
 financial world).
 
 +1
 
 January 30 + 1 month ?
 January 31 + 1 month ?
 Februari 29 2004 + 1 year ?
 
 And given all sorts of cleverness, will basic math rules still work ?
 
 A +B = B + A
 A + B = C  = C - B = A
 
 Pharo Date/DateAndTime are incremental[1], then all this
 week/month/year operations will simply add/subtract the increment from
 epoch.
 
 The only way to do this in a deterministic way is to have a field based Date.

Saying that it is not deterministic is a bit harsh ;-)

 Regards!
 
 Esteban A. Maringolo
 
 [1] http://www.w3.org/TR/2005/NOTE-timezone-20051013/#d2e310

Very interesting link, really useful - Thx.





Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Sven Van Caekenberghe
Being consistent is of course better (note however that #month does not exist 
today, probably because it is hard to define). The double-dispatching is also 
good. But I would have to study the actual code in detail to have a better 
opinion.

On 19 Sep 2014, at 14:48, Max Leske maxle...@gmail.com wrote:

 Ok, so I read Chris’ e-mail and I’m intrigued. 
 
 Sven, you’re still right about financial months being 30 days for instance 
 but the thing is that the current implementation seems broken (or inconsisten 
 at least) and doesn’t honor that case either. *Not* making the change will 
 not help us either…
 
 So I’d say: let’s do it. If somebody objects (or proposes a change) then we 
 can handle that but at least we can claim that we try to give the users what 
 we preach, like writing natural language like code (e.g. “x + 1 month” which 
 is currently not possible).
 
 That’s my view at least. Also: we’re changing so much stuff in Pharo anyway 
 all the time, I don’t think this would hurt.
 
 Cheers,
 Max
 
 
 On 19.09.2014, at 14:37, Max Leske maxle...@gmail.com wrote:
 
 Oops. Didn’t realize that thread was from Squeak dev. So there’s no Pharo 
 implementation of that change for now anyway.
 
 On 19.09.2014, at 14:35, Max Leske maxle...@gmail.com wrote:
 
 
 On 19.09.2014, at 14:16, Sean P. DeNigris s...@clipperadams.com wrote:
 
 Max Leske wrote
 your change
 
 It's not mine. I just scanned the thread from Squeak Dev and was intrigued
 because I've run into this limitation (the tension between year/month/etc 
 as
 a conceptual ideal, and those entities as a specific number of days in
 context) a bunch before
 
 Ok. Then I’ll look at it.
 
 
 
 
 -
 Cheers,
 Sean
 --
 View this message in context: 
 http://forum.world.st/Interesting-Date-Time-Thread-on-Squeak-Dev-tp4778652p4778960.html
 Sent from the Pharo Smalltalk Developers mailing list archive at 
 Nabble.com.
 
 
 
 
 




Re: [Pharo-dev] Visualising Network Latency

2014-09-19 Thread Alexandre Bergel
This is excellent Leonel!
I’ve tried, but I could not make the visualization work. Apparently you are 
using a rather old version of Roassal2. I suggest you to update it to the last 
version of Roassal2.

Cheers,
Alexandre


On Sep 19, 2014, at 6:48 AM, Leonel Merino mer...@iam.unibe.ch wrote:

 Hi Max,
 
 Thanks !
 
 The input is a CSV file which contains a grid with city names and latency.
 Surely you can zoom-in at city level. However, the map only contains 
 information of the cities that come in the dataset (is not Bern).
 
 Best regards,
 Leonel
 
 On 19 Sep 2014, at 15:30, Max Leske maxle...@gmail.com wrote:
 
 Very cool.
 
 - Do you parse data from a file? If so, what format does that file need to 
 be in?
 - Is the map zoomable to city level (to see connections between Bern and 
 Zürich for instance)?
 
 Cheers,
 Max
 
 On 19.09.2014, at 15:23, Leonel Merino mer...@iam.unibe.ch wrote:
 
 Hi All,
 
 I have been working on a visualisation of latency on a network. I found an 
 interesting dataset with latency information of 140 cities around the world.
 In the visualisation I show different metrics regarding latency such as 
 from each city which other has the best/worst latency; cities that 
 geographically are close but have high latency; far cities that have low 
 latency; and average latency for each city.
 
 When visualising the worst latency for each city I found that, for this 
 network (at least), Valencia and in a minor extent Nairobi represent the 
 worst endpoint for connections (in terms of latency). Also in the 
 visualisation of far cities with low latency, Newmarket in Canada and 
 Toledo in Spain concentrate the best endpoint for connections coming from 
 Europe and North-America respectively.  
 
 
 Here a couple of screenshots:
 
 PastedGraphic-4.pdf
 
 PastedGraphic-5.pdf
 
 PastedGraphic-6.pdf
 
 
 Here there is a screencast:
 http://www.youtube.com/watch?v=gDQnE-5yeWI
 
 
 
 
 If you want to load the code:
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Gofer new smalltalkhubUser: 'merino'
 project: 'NetworkLatency';
 package: 'ConfigurationOfNetworkLatency';
 load.
 (ConfigurationOfNetworkLatency project version: '0.1') load.
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
 
 To execute the visualisation:
 NLVisualise new open
 
 
 
 
 I would be glad to have your comments and suggestions.
 
 Best regards,
 
 Leonel Merino
 Research Assistant
 Software Composition Group
 Institute of Computer Science and Applied Mathematics
 University of Bern
 
 

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Esteban A. Maringolo
2014-09-19 11:14 GMT-03:00 Sven Van Caekenberghe s...@stfx.eu:

 On 19 Sep 2014, at 14:59, Esteban A. Maringolo emaring...@gmail.com wrote:

 2014-09-19 9:16 GMT-03:00 Sven Van Caekenberghe s...@stfx.eu:
 Pharo Date/DateAndTime are incremental[1], then all this
 week/month/year operations will simply add/subtract the increment from
 epoch.

 The only way to do this in a deterministic way is to have a field based Date.

 Saying that it is not deterministic is a bit harsh ;-)

Sorry, it wasn't my intention. Maybe consistent was the proper word. :)

 [1] http://www.w3.org/TR/2005/NOTE-timezone-20051013/#d2e310

 Very interesting link, really useful - Thx.

At least it makes you understand some pros/cons about date implementations.
After reading that I understood why Java's Calendar object is field based.


Additionally
I would like this:
'2014/08/31 24:00' asDateAndTime - 2014/09/01 00:00

Or even better:
'2014/08/31 24:00' asDateAndTime - 2014/08/31 24:00
And:
'2014/08/31 24:00' asDateAndTime = '2014/09/01 00:00' asDateAndTime

Regards!


Esteban A. Maringolo



Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Sven Van Caekenberghe

On 19 Sep 2014, at 16:31, Esteban A. Maringolo emaring...@gmail.com wrote:

 2014-09-19 11:14 GMT-03:00 Sven Van Caekenberghe s...@stfx.eu:
 
 On 19 Sep 2014, at 14:59, Esteban A. Maringolo emaring...@gmail.com wrote:
 
 2014-09-19 9:16 GMT-03:00 Sven Van Caekenberghe s...@stfx.eu:
 Pharo Date/DateAndTime are incremental[1], then all this
 week/month/year operations will simply add/subtract the increment from
 epoch.
 
 The only way to do this in a deterministic way is to have a field based 
 Date.
 
 Saying that it is not deterministic is a bit harsh ;-)
 
 Sorry, it wasn't my intention. Maybe consistent was the proper word. :)
 
 [1] http://www.w3.org/TR/2005/NOTE-timezone-20051013/#d2e310
 
 Very interesting link, really useful - Thx.
 
 At least it makes you understand some pros/cons about date implementations.
 After reading that I understood why Java's Calendar object is field based.
 
 
 Additionally
 I would like this:
 '2014/08/31 24:00' asDateAndTime - 2014/09/01 00:00
 
 Or even better:
 '2014/08/31 24:00' asDateAndTime - 2014/08/31 24:00
 And:
 '2014/08/31 24:00' asDateAndTime = '2014/09/01 00:00' asDateAndTime

Actually, 

ZTimestamp fromString: '2014/08/31 24:00:00'. 

 = '2014-09-01T00:00:00Z'

(ZTimestampFormat fromString: '2001/02/03 16:05') parse: '2014/08/31 24:00'. 

 = '2014-09-01T00:00:00Z'

but that is not really by design, it just does normalisation.

I am not sure what to think of that, it is certainly interesting ;-)





Re: [Pharo-dev] Visualising Network Latency

2014-09-19 Thread Leonel Merino
Thanks Alex !
Sure, I’ll do it.

—Leonel

On 19 Sep 2014, at 16:30, Alexandre Bergel alexandre.ber...@me.com wrote:

 This is excellent Leonel!
 I’ve tried, but I could not make the visualization work. Apparently you are 
 using a rather old version of Roassal2. I suggest you to update it to the 
 last version of Roassal2.
 
 Cheers,
 Alexandre
 
 
 On Sep 19, 2014, at 6:48 AM, Leonel Merino mer...@iam.unibe.ch wrote:
 
 Hi Max,
 
 Thanks !
 
 The input is a CSV file which contains a grid with city names and latency.
 Surely you can zoom-in at city level. However, the map only contains 
 information of the cities that come in the dataset (is not Bern).
 
 Best regards,
 Leonel
 
 On 19 Sep 2014, at 15:30, Max Leske maxle...@gmail.com wrote:
 
 Very cool.
 
 - Do you parse data from a file? If so, what format does that file need to 
 be in?
 - Is the map zoomable to city level (to see connections between Bern and 
 Zürich for instance)?
 
 Cheers,
 Max
 
 On 19.09.2014, at 15:23, Leonel Merino mer...@iam.unibe.ch wrote:
 
 Hi All,
 
 I have been working on a visualisation of latency on a network. I found an 
 interesting dataset with latency information of 140 cities around the 
 world.
 In the visualisation I show different metrics regarding latency such as 
 from each city which other has the best/worst latency; cities that 
 geographically are close but have high latency; far cities that have low 
 latency; and average latency for each city.
 
 When visualising the worst latency for each city I found that, for this 
 network (at least), Valencia and in a minor extent Nairobi represent the 
 worst endpoint for connections (in terms of latency). Also in the 
 visualisation of far cities with low latency, Newmarket in Canada and 
 Toledo in Spain concentrate the best endpoint for connections coming from 
 Europe and North-America respectively.  
 
 
 Here a couple of screenshots:
 
 PastedGraphic-4.pdf
 
 PastedGraphic-5.pdf
 
 PastedGraphic-6.pdf
 
 
 Here there is a screencast:
 http://www.youtube.com/watch?v=gDQnE-5yeWI
 
 
 
 
 If you want to load the code:
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Gofer new smalltalkhubUser: 'merino'
project: 'NetworkLatency';
package: 'ConfigurationOfNetworkLatency';
load.
 (ConfigurationOfNetworkLatency project version: '0.1') load.
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=
 
 To execute the visualisation:
 NLVisualise new open
 
 
 
 
 I would be glad to have your comments and suggestions.
 
 Best regards,
 
 Leonel Merino
 Research Assistant
 Software Composition Group
 Institute of Computer Science and Applied Mathematics
 University of Bern
 
 
 
 -- 
 _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
 Alexandre Bergel  http://www.bergel.eu
 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
 
 
 
 




Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Esteban A. Maringolo
2014-09-19 11:41 GMT-03:00 Sven Van Caekenberghe s...@stfx.eu:
 [1] http://www.w3.org/TR/2005/NOTE-timezone-20051013/#d2e310

 Very interesting link, really useful - Thx.

 At least it makes you understand some pros/cons about date implementations.
 After reading that I understood why Java's Calendar object is field based.

 Additionally
 I would like this:
 '2014/08/31 24:00' asDateAndTime - 2014/09/01 00:00

 Actually,
 ZTimestamp fromString: '2014/08/31 24:00:00'.
  = '2014-09-01T00:00:00Z'

 but that is not really by design, it just does normalisation.

 I am not sure what to think of that, it is certainly interesting ;-)

Yes!
I forgot to mention, but I did this test with ZTimestamp before and it
gave me the expected results.
I played with having ZTimestamp as the default object class for
PostgresSQL's timestamp without time zone data type, but then I
discarded this option. PostgreSQL also converts '2014-08-31 24:00' to
'2014-09-01 00:00'.

Regards!


Esteban A. Maringolo



[Pharo-dev] [pharo-project/pharo-core]

2014-09-19 Thread GitHub
  Branch: refs/tags/40236
  Home:   https://github.com/pharo-project/pharo-core


[Pharo-dev] [pharo-project/pharo-core] 489cbe: 40236

2014-09-19 Thread GitHub
  Branch: refs/heads/4.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: 489cbebbe3d9bf20b8370adc3a1647f8e169375f
  
https://github.com/pharo-project/pharo-core/commit/489cbebbe3d9bf20b8370adc3a1647f8e169375f
  Author: Jenkins Build Server bo...@pharo-project.org
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - 
scripts/script236.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - 
updates/update40236.st
M 
ScriptLoader40.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
M Traits.package/TClass.class/instance/compiling/compileAll.st

  Log Message:
  ---
  40236
14037 #recompile does not recompile the classTrait
https://pharo.fogbugz.com/f/cases/14037

http://files.pharo.org/image/40/40236.zip




Re: [Pharo-dev] Visualising Network Latency

2014-09-19 Thread Markus Fritsche

On 19.09.2014 15:23, Leonel Merino wrote:
 If you want to load the code:
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Gofer new smalltalkhubUser: 'merino'
 project: 'NetworkLatency';
 package: 'ConfigurationOfNetworkLatency';
 load.
 (ConfigurationOfNetworkLatency project version: '0.1') load.
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=

 To execute the visualisation:
 NLVisualise new open

What are the prerequisites? I tried to load it in Pharo-3.0 (with latest
updates) and it was missing Trachel. So I updated Roassal2 to the latest
version and now I get a MNU:
MessageNotUnderstood: RTMapBuildermapPing:

Kind regards,
  Markus



Re: [Pharo-dev] Interesting Date/Time Thread on Squeak Dev

2014-09-19 Thread Mark Bestley

On 19/09/2014 13:48, Max Leske wrote:

Ok, so I read Chris’ e-mail and I’m intrigued.

Sven, you’re still right about financial months being 30 days for instance but 
the thing is that the current implementation seems broken (or inconsisten at 
least) and doesn’t honor that case either. *Not* making the change will not 
help us either…

So I’d say: let’s do it. If somebody objects (or proposes a change) then we can 
handle that but at least we can claim that we try to give the users what we 
preach, like writing natural language like code (e.g. “x + 1 month” which is 
currently not possible).

That’s my view at least. Also: we’re changing so much stuff in Pharo anyway all 
the time, I don’t think this would hurt.



That comment re 30 day months in financial is not totally correct.

A common reason for calculating days in a financial calculation is for 
interest calculation and then you don't just need a number for the day 
difference but also for the number of days in a year. When I did this I 
think I had to support many ways of calculating the fraction of a year 
that was the difference between two dates depending on the interest 
basis (ie the contract terms) , Wikipedia gives 11 
http://en.wikipedia.org/wiki/Day_count_convention



So I think that adding a financial number of days into a basic date 
object does not make sense as it will not be correct in many cases. The 
best way I have seen is to pass a daycount basis strategy class into the 
calculation and that strategy object does the calculation.




--
Mark




[Pharo-dev] [pharo-project/pharo-core]

2014-09-19 Thread GitHub
  Branch: refs/tags/40237
  Home:   https://github.com/pharo-project/pharo-core


[Pharo-dev] [pharo-project/pharo-core] 9e6619: 40237

2014-09-19 Thread GitHub
  Branch: refs/heads/4.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: 9e661910bcd2381958d313ad66631dc0a8cb7d07
  
https://github.com/pharo-project/pharo-core/commit/9e661910bcd2381958d313ad66631dc0a8cb7d07
  Author: Jenkins Build Server bo...@pharo-project.org
  Date:   2014-09-19 (Fri, 19 Sep 2014)

  Changed paths:
M 
Morphic-Widgets-Pluggable.package/PluggableTabButtonMorph.class/class/instance 
creation/on_label_.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - 
scripts/script237.st
A ScriptLoader40.package/ScriptLoader.class/instance/pharo - 
updates/update40237.st
M 
ScriptLoader40.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st

  Log Message:
  ---
  40237
14043 TabContainerMorph example gives DNU #instance
https://pharo.fogbugz.com/f/cases/14043

http://files.pharo.org/image/40/40237.zip




Re: [Pharo-dev] AppeX

2014-09-19 Thread stepharo
This is not yet possible. I would hope we get this to work within the 
context of TxText.


Igor got nearly embedded morphs to react to event: we embedded a 
simpleButtonMorph in TxText
and we can click on it, delete it... Now there are some problems with 
positionning but

it should be fixed soon.

We are looking for scenario to work with txText to check the api

- igor wants to have handling event (to support smart sugs, click on a 
text to jump...)

- syntax highlithing
- replacing existing editor?

Stef



Re: [Pharo-dev] AppeX

2014-09-19 Thread stepharo

As you could see in the Pillar highlighting support,
Rubric can now handle any syntax highlighting in a rather
straightforward way. You can also easily embed this in a
Glamour browser.


I'll have a look. I find that PluggableTextMorph automatic
behavior (smart characters, styling) is very nice when doing
Smalltalk code, but a pain in anything else. I'd like to see
that Smalltalk-customized code be refactored elsewhere than in
the editor.

What I'd like to see is the ability to customize the behavior
for islands of text inside a text (recursively of course :)).


This is not yet possible. I would hope we get this to work within
the context of TxText.


I was thinking of having a look at TxText ;)


Please
Igor added the possibility to have span different attributes (like 
changing mouse cursor)


I noticed that I have already started to reimplement part of the 
StringHolder / PluggableTextMorph logic outside it (via menu command 
objects / keymapping shortcuts instead of using the hardcoded versions 
inside the Morph or Model object) and I wanted to see if this was 
already done (or prepared for) in TxText.


I think that, even in the context of the current TextEditor, I could 
customize based on islands based on what I already have. But I have to 
spend some time on it.


I'm accustomed to the smart suggestion stuff as I implemented it, 
makes it very easy to drill down in code...


What I use a lot:

Right mouse button on a global, select 'Browse' : inspect the class 
variable or open a browser on the class (depending on what it is). 
Also valid in a class #subclass: display in the browser, to browse the 
super class.


Implementors / sendors of / accesses to instance var under right mouse 
button: open a full browser showing all the resulting methods (and not 
a message list :( ). Also works in the string containing instance 
variable names in a class definition pane.


Double click on a package / class - open a browser scoped to that 
package / class (where all search operations are limited to that scope).


Ctrl+F - open the finder toolbar on top of the browser, with reduced 
gui (no package choice) : result of the finder will appear in a new 
browser, and finder is scoped by the initial browser scope.


So, when I end up in Nautilus, I just find myself very clumsy looking 
around (which is not good for my self-esteem ;) ) Not forgetting the 
fact that opening a Nautilus browser takes a lot longer. In Moose 
also, GTInspector is slow.


Take it as a different experience on the GUI side; I know I invest a 
lot in the motor skill part of the GUI, and this has an effect when I 
switch platform.


Thierry






Re: [Pharo-dev] AppeX

2014-09-19 Thread stepharo



Take it as a different experience on the GUI side; I know I
invest a lot in the motor skill part of the GUI, and this has
an effect when I switch platform.


It seems to me that you are not comparing the Moose image with the
Pharo image, right? What are you comparing with? Can I look at
these changes?


Simply AltBrowser loaded. There isn't much changes overall: AltBrowser 
is a bit larger than the old system browser and a lot smaller than 
Nautilus while providing the system browser, the message list and the 
finder.


It is certainly the proof Pharo provides a good infrastructure for IDE 
development and experimentation :)

:)
I encourage people to build the next generation that will make us switch :)


Re: [Pharo-dev] AppeX

2014-09-19 Thread Thierry Goubier
2014-09-19 20:32 GMT+02:00 stepharo steph...@free.fr:

 This is not yet possible. I would hope we get this to work within the
 context of TxText.


 Igor got nearly embedded morphs to react to event: we embedded a
 simpleButtonMorph in TxText
 and we can click on it, delete it... Now there are some problems with
 positionning but
 it should be fixed soon.


Cool. I did exactly that in VisualWorks when I was a student, and, when you
get it to work, it is really great!



 We are looking for scenario to work with txText to check the api

 - igor wants to have handling event (to support smart sugs, click on a
 text to jump...)
 - syntax highlithing
 - replacing existing editor?


I'll have a look.

Thierry



 Stef




Re: [Pharo-dev] How production ready is Pharo on SQLServer?

2014-09-19 Thread Sebastian Sastre
On Sep 19, 2014, at 8:05 AM, Torsten Bergmann asta...@gmx.de wrote:

 In the end I used ODBC package as it is easy to load from the config browser 
 and one only has
 to setup an ODBC name

After installing all and getting things sorted, it rejects my connection. 
Triplechecked, network settings, server and client with tcp enabled, everything 
but can’t connect.

So I guess is time to try ODBC.

but odbc has no host:port, what should I do about connection settings?

I how do I make a DBXConnection based in an odbc one?

thanks!

sebastian

o/

blog: http://sebastianconcept.com
LinkedIn: http://www.linkedin.com/in/sebastiansastre
github: https://github.com/sebastianconcept



Re: [Pharo-dev] Implementing lazy loading for expandable collections

2014-09-19 Thread stepharo

max why not subclassing OrderedCollections?


I’ve written an implementation of lazily initialized expandable collections (for 
OrderedCollection and subclasses only for now), inspired by Alexandre’s talk at 
ESUG 
(http://www.youtube.com/watch?v=x0YJ2dsZdKglist=UUO-vBhaKVZf0al-ISMMPvRw). The 
implementation is pretty much straight forward

you initialize to nil first?

but there are a couple of culprits I want to point out in case anybody else 
wants to do this:

- my implementation requires an extra instance variable in OrderedCollection to 
store the requested size. This extra instance variable will break Monticello 
(and possibly other tools) because Monticello uses OrderedCollections to load 
code and the particular way it uses them makes it impossible to change the 
number of instance variables on OrderedCollection. Also, all .mcz files written 
after the change will not be loadable by images without the new instance 
variable (same reason).
- the above means that you have to modify the code in the image manually and save a 
new “base image
- read only messages should obviously not initialize the array. The 
‘firstIndex’ and ‘lastIndex’ variables are quite handy for that. I initialize 
those variables to 1 and 0 respectively which makes most things work already 
(e.g. #size, #isEmpty etc.).
- when trying to implement the same for HashedCollection I couldn’t. The image 
didn’t just stop working, there was no output at all on the console, not even 
when using a debug VM. The problem seems to be MethodDictionary, at least 
that’s the only subclass of Dictionary for which adding an instance variable 
doesn’t work.

I’ll share some memory monitoring as soon as I have something significant (only 
just rolled it out).


Big thanks to Alex for his talk and the cool work he and his students did!

Cheers,
Max






Re: [Pharo-dev] Implementing lazy loading for expandable collections

2014-09-19 Thread Dale Henrichs
Keep in mind that Monticello is portable to other dialects and changing
the internal representation will break Monticello for other platforms ...

FWIW, the implemenation of OrderedCollection in GemStone is very different
than in Pharo or Squeak and it was possible for me to fudge the serializer
to do the right thing for Monticello (which was serialize the
OrderedCollections the way Pharo/Squeakl expected)... A similar thing could
be done for Pharo if you wanted to change the shape of OrderedCollection...

Dale

On Fri, Sep 19, 2014 at 5:06 AM, Nicolas Cellier 
nicolas.cellier.aka.n...@gmail.com wrote:



 2014-09-19 13:55 GMT+02:00 Markus Fritsche mfrits...@reauktion.de:

 On 2014-09-19 11:35, Max Leske wrote:

  - my implementation requires an extra instance variable in
 OrderedCollection to store the requested size. This extra instance
 variable will break Monticello (and possibly other tools) because
 Monticello uses OrderedCollections to load code and the particular way
 it uses them makes it impossible to change the number of instance
 variables on OrderedCollection. Also, all .mcz files written after the
 change will not be loadable by images without the new instance
 variable (same reason).


 I might be a bit fundamentalistic, but shouldn't this (a using class
 making assumptions about the objects it's using) be considered a bug
 by object oriented standards?

 Best regards
   Markus


 It's not the using class per se.
 It's that MC is using a serialization framework sensitive to internal
 object representation (number/order of ivars).
 The question is this one:
 - would using FUEL would have resolved the problem or not?
 - wouldn't a serialization using message sends to reconstruct the objects
 be more robust (future proof)?
 Of course the later requires the maintenance of a well defined API, so the
 robstness is relative.
 But at least, it would respect the object paradigm a bit more.

 Nicolas



Re: [Pharo-dev] How production ready is Pharo on SQLServer?

2014-09-19 Thread Alain Rastoul

Le 19/09/2014 13:36, Sebastian Sastre a écrit :

yes if things where in markdown friendly wiki and git you'll see a pull request 
in half a second

I'll think of something

but returning to the dll issue, you mention you endd up using odbc and I see 
there are two backends to choose from. The odbc and the mssql, so, i'm getting 
this right? If I use odbc that dll is not needed?

Any reason not to use odbc?

from iPad


Hi,

libsybdb.dll is for sybase, it may have worked well with (very) old 
versions of sql server but is definitely not the correct way to connect 
to MS sql server

(*plus MS has it's own version of dblib.dll).
(*plus I'm not sure that deploying sybase native libs is legal).

The MS recommendations for client connectivity to Sql server is not to 
use native libraries but instead use a standard layer.
it's a long story, but to make it short odbc seems to be the best choice 
once again: MS preconizations: odbc, then rdo, then dao, then oledb, 
then ado, (and ado.net) and finally  odbc again (on top of sql native 
client) with ado.net for dotnet.

see
http://msdn.microsoft.com/en-us/data/aa937732
http://msdn.microsoft.com/en-us/library/ms810810.aspx


I don't know how it works with opendbx, but odbc is quite solid,
and you don't have to take care of native libs deployment.
IMHO a good choice

Regards

Alain




Re: [Pharo-dev] How production ready is Pharo on SQLServer?

2014-09-19 Thread Torsten Bergmann
Hi Sebastian,



I think there are two ways for ODBCing from Pharo:



1. one is the one included in DBXTalk, I think I had this running also in the past and added
  the glorp adaptor for ODBC. Cant remember why I switched to 2.


2. the ODBC package (on top of FFI) that you can load from the Config browser in Pharo 3.0
  This one is based on the ODBC known from Squeak (http://wiki.squeak.org/squeak/2480)

Try it with the second first. You have to open the ODBC settings panel in Windows first,
and then connect to the DB by creating a system wide DSN name
similarto what is explained here for Oracle:

http://www.rpi.edu/datawarehouse/dw-brio-oce-stu-prod.html


You have to choose the correct MSSQL server driver.Then use this name forthe connection in Smalltalk.
If the connection fails try with adatabase viewer tool first.


In detail:

1. Use a new Pharo 3.0 as from the website first.

2. Install ODBC from the config browser (this will install requirements like FFI automatically)

3. Install OSWindows from config browser

 4. Evaluate
   WinControlPanel showODBCSettings
  to open the ODBC panel

 5. Click on the System DSN tab there

 6. Click Add

 7. Select the SQL Server driver (usually SQL Server Native Client blah), click Next

 8. Enter an unused DSN name like MYAPP_DB, also enter the IP address (xxx.xxx.xxx.xxx)
 of the server and go Next (no need for port as SQLServer usually runs on 1433)

 9. Authentication depends on installation. Usually one uses the SQL Server authentication, either with

   a dedicated user connection administrated in SQL Server Tools or by default theuser is something
  with sa (for system administrator)

10.After login you should be able to select the database and test connection right in the ODBC control panel
11. Go back to Pharo and run some query:
 
 con results 
Transcript open.
con := ODBCConnection dsn:MY_SYSTEM_DSN_NAME user: db_user password: secretOne.
results := (con query: select * from MyApp.dbo.MyTable) execute.
results do:[:row  Transcript show: row; cr].

con close.


Try the query with a database tool first. If the query works from ST you can either use this or try your luck
withDBXTalk and ODBC.Hope this helps.




Bye

T.





Gesendet:Freitag, 19. September 2014 um 21:00 Uhr
Von:Sebastian Sastre sebast...@flowingconcept.com
An:Pharo Development List pharo-dev@lists.pharo.org
Betreff:Re: [Pharo-dev] How production ready is Pharo on SQLServer?




On Sep 19, 2014, at 8:05 AM, Torsten Bergmann asta...@gmx.de wrote:


In the end I used ODBC package as it is easy to load from the config browser and one only has
to setup an ODBC name



After installing all and getting things sorted, it rejects my connection. Triplechecked, network settings, server and client with tcp enabled, everything but cant connect.



So I guess is time to try ODBC.



but odbc has no host:port, what should I do about connection settings?



I how do I make a DBXConnection based in an odbc one?



thanks!








sebastian



o/




blog:http://sebastianconcept.com
LinkedIn:http://www.linkedin.com/in/sebastiansastre

github:https://github.com/sebastianconcept










Re: [Pharo-dev] How production ready is Pharo on SQLServer?

2014-09-19 Thread Alain Rastoul

Le 19/09/2014 23:36, Torsten Bergmann a écrit :

Hi Sebastian,
I think there are two ways for ODBC'ing from Pharo:
  1. one is the one included in DBXTalk, I think I had this running also
in the past and added
  the glorp adaptor for ODBC. Cant remember why I switched to 2.

The same for me :)
About Glorp, it is a really nice piece of code, but has some drawbacks 
(like all orms): IIRC, there is a global object cache and Glorp manage 
object's locking conflicts in addition to Sql locking (imho bad). ORM is 
perfect for quick and simple queries but tend to write bad queries when 
complex.



  2. the ODBC package (on top of FFI) that you can load from the Config
browser in Pharo 3.0
  This one is based on the ODBC known from Squeak
(http://wiki.squeak.org/squeak/2480)

Try it with the second first. You have to open the ODBC settings panel
in Windows first,
and then connect to the DB by creating a system wide DSN name
similar to what is explained here for Oracle:
http://www.rpi.edu/datawarehouse/dw-brio-oce-stu-prod.html

You have to choose the correct MSSQL server driver. Then use this name
for the connection in Smalltalk.
If the connection fails try with a database viewer tool first.

In detail:
   1. Use a new Pharo 3.0 as from the website first.
   2. Install ODBC from the config browser (this will install
requirements like FFI automatically)
   3. Install OSWindows from config browser
   4. Evaluate
WinControlPanel showODBCSettings
   to open the ODBC panel
   5. Click on the System DSN tab there
   6. Click Add
   7. Select the SQL Server driver (usually SQL Server Native Client
blah), click Next
   8. Enter an unused DSN name like MYAPP_DB, also enter the IP
address (xxx.xxx.xxx.xxx)
  of the server and go Next  (no need for port as SQLServer usually
runs on 1433)
   9. Authentication depends on installation. Usually one uses the SQL
Server authentication, either with
   a dedicated user connection administrated in SQL Server Tools or
by default the user is something
   with sa (for system administrator)
10. After login you should be able to select the database and test
connection right in the ODBC control panel
11. Go back to Pharo and run some query:
| con results |
Transcript open.
con := ODBCConnection dsn:'MY_SYSTEM_DSN_NAME' user: 'db_user' password:
'secretOne'.
results := (con query: 'select * from MyApp.dbo.MyTable') execute.
results do:[:row | Transcript show: row; cr].
con close.

Try the query with a database tool first. If the query works from ST you
can either use this or try your luck
with DBXTalk and ODBC. Hope this helps.
Bye
T.

Perfectly correct, I would also add:
1) On windows, it's simpler to connect to a server without registering a 
DSN, you can specify the driver to use with odbc, it will find it in the 
registry. For example, using the MS driver, you specify
Driver={SQL Server}; in the connection string (don't remember for oracle 
but it can work the same way), with other attributes like server name, 
instance name (if any) ,user , password and so on. You can take a look 
in the registry to find installed drivers on your pc.

There is a class method on ODBCConnection that do the job:
toSqlServer:database:
And you can define your own if you need. Example:
ODBCConnection toSqlServer: 'MyServer\MyInstance'
database: 'AdventureWorks'
applicationId: 'MyApp'  
workstationId: 'LOCALST'
user: 'MyUser' password: 'MyPassord'
Using sa in an application is considered bad practice : a huge security 
breach and dangerous for your sql server.


2) On windows, you don't need to specify the IP address, the network 
resolution will find it for you. If you use tcp sockets, the sql browser 
service has to be started, it will handle port resolution for you, you 
just specify the server and instance name (if any).


3) to use windows authentication, you don't specify user and password 
but have to add a SSPI=true attribute (not sure, you should rtfm... 
al...zheimer?).
Your windows user is already defined as a sql login, but you have to map 
it to a windows user in your database and the sql server have to accept 
sql and windows authentication.


4) For production system, you *may* experience severe locking problems, 
because the Pharo vm is single threaded. That is the only big problem 
actually. you may also lock yourself between to connections (not a sql 
deadlock, we could call it a vm deadlock ...).


Apart of the last one, odbc/ffi works like a charm and is very fast.

HTH

Alain





Re: [Pharo-dev] Parsing Pharo syntax to C/C++

2014-09-19 Thread Alain Rastoul

Le 15/09/2014 14:21, kilon alios a écrit :

thanks I am looking at it

is this relevant to pharo ? -- http://en.wikipedia.org/wiki/Visitor_pattern


Hi,
Of course, the only difference between what you will find in 
java,dotNet,c++ examples and Smalltalk is that the latter does not 
support method signature because of it's typeless feature and you will 
have to define different methods.

The smalltalk equivalent of (java code)
void visit(Wheel wheel);
void visit(Engine engine);
void visit(Body body);
void visit(Car car);
would be the following methods:
visitWheel: aWhell
visitEngine: anEngine
visitBody: aBody
visitCar: aCar

A small disadvantage, but everything has a price ... :)

If you are interested in object patterns, you should buy the GOF book
http://en.wikipedia.org/wiki/Design_Patterns
It's a must have
and it's smalltalk companion too
http://www.amazon.fr/The-Design-Patterns-Smalltalk-Companion/dp/0201184621
see chapters here:
http://stephane.ducasse.free.fr/FreeBooks/SmalltalkDesignPatternCompanion/



Regards,

Alain




Re: [Pharo-dev] [Review: 11536] Add Stream printString:

2014-09-19 Thread Eliot Miranda
On Fri, Sep 19, 2014 at 1:19 AM, Max Leske maxle...@gmail.com wrote:

 This issue was more of a discussion between Camillo and Sven. They never
 reached a conclusion, so please take a look. I’ve compiled the transcript
 below.

 The issue isn’t easy to solve and maybe we can just close it as “not
 important”.


+1.  But isn't the selector printString: broken?  Shouldn't it be
printAsString: ?



 https://pharo.fogbugz.com/f/cases/11536/Add-Stream-printString


 

 Camillo:
 This method should be added to avoid many asString sends.

 Example:
 stream nextPutAll: #('ABC') asString could be written as stream
 printString: #('ABC').

 This is a common extension of the following pattern:
 stream nextPutAll: #('ABC') printString could be written as stream print:
 #('ABC').


 
 Sven:
 And what about #print: as implemented by Transcripts and SocketStreams ?

 It is shorter.
 Feels more familiar.


 
 Camillo:
 #print: is already implement and doesn't solve the stream nextPutAll: foo
 asString case. Since you cannot simply write stream print: foo, since you
 get quotes added for Strings.

 Ok, I admit that with decent design you can avoid this, since it should
 almost never happen that you have a String or a non string object in the
 same variable, right?


 
 Sven:
 Yeah, that String issue is a bit annoying sometimes.
 Indeed there is Stream#print: already.

 But look:

 ThreadSafeTranscript#print: anObject

 self nextPutAll: anObject asString


 how about that ?

 There is also # whose implementation is even weirder, but it is handy.

 The question remain: when do you want to mix Strings and other objects as
 arguments ?


 
 Camillo:
 - # is basically a lazy combination of #nextPut: and #nextPutAll:
 - #print: should call #printOn: on the initial argument, which for strings
 defaults to storeOn: which I think is wrong, but I would hardly stand a
 chance changing that :P

 So my global goal here is to avoid any kind of asString sends while
 pushing stuff on a stream. Sadly this happens more often than I thought :/


 
 Sven:
 Maybe this discussion should happen on the mailing list ?

 Changing String#printOn: might be hard, but # is much more recent, no
 ? Could it not be changed to do what you want ? Like

 Streamm anObject
   self nextPutAll: anObject asString

 Another point is that #asString is not so efficient, since it creates
 throwaway Strings.




-- 
best,
Eliot


Re: [Pharo-dev] Parsing Pharo syntax to C/C++

2014-09-19 Thread Alain Rastoul

Le 15/09/2014 18:23, Eliot Miranda a écrit :


I find this whole discussion depressing.  It seems people would rather
put their energy in chasing quick fixes or other technologies instead of
contributing to the work that is being done in the existing VM.  People
discuss using LLVM as if the code generation capabilities inside Cog
were somehow poor or have no chance of competing.  Spur is around twice
as fast as the current memory manager, has much better support for the
FFI.  Clément and I, now with help from Ronie, are making excellent
progress towards an adaptive optimizer/speculative inliner that will
give us similar performance to V8 (the Google JavaScript VM, lead by
Lars Bak, who implemented the HotSpot VM (Smalltalk and Java)) et al.
  We are trying to get person-power for a high-quality FFI and have a
prototype for a non-blocking VM.  When we succeed C won't be any better
and so it won't be an interesting target.  One will be able to program
entirely in Smalltalk and get excellent performance.  But we need
effort.  Collaboration.


Hi Eliot,

Not everybody has the necessary skills to help and contribute to your 
work, my assembly skills are really faraway and outdated now (... little 
frustration here :( ... )

but imho your work is unvaluable to pharo and smalltalk community
- just to mention it, I noticed a 30 to 50% gain in a small bench I 
wrote for fun recently (a very dumb chess pawn moves generator) with the 
last Spur vm

I was shocked :)
64bits + x2 perfs + non blocking (or multi threaded?) vm are giant steps 
forward
that makes it possible for pharo smalltalk to compete with mainstream 
technologies


Regards,

Alain




Re: [Pharo-dev] Parsing Pharo syntax to C/C++

2014-09-19 Thread p...@highoctane.be
Le 20 sept. 2014 02:11, Alain Rastoul alf.mmm@gmail.com a écrit :

 Le 15/09/2014 18:23, Eliot Miranda a écrit :

 I find this whole discussion depressing.  It seems people would rather
 put their energy in chasing quick fixes or other technologies instead of
 contributing to the work that is being done in the existing VM.  People
 discuss using LLVM as if the code generation capabilities inside Cog
 were somehow poor or have no chance of competing.  Spur is around twice
 as fast as the current memory manager, has much better support for the
 FFI.  Clément and I, now with help from Ronie, are making excellent
 progress towards an adaptive optimizer/speculative inliner that will
 give us similar performance to V8 (the Google JavaScript VM, lead by
 Lars Bak, who implemented the HotSpot VM (Smalltalk and Java)) et al.
   We are trying to get person-power for a high-quality FFI and have a
 prototype for a non-blocking VM.  When we succeed C won't be any better
 and so it won't be an interesting target.  One will be able to program
 entirely in Smalltalk and get excellent performance.  But we need
 effort.  Collaboration.


 Hi Eliot,

 Not everybody has the necessary skills to help and contribute to your
work, my assembly skills are really faraway and outdated now (... little
frustration here :( ... )
 but imho your work is unvaluable to pharo and smalltalk community
 - just to mention it, I noticed a 30 to 50% gain in a small bench I wrote
for fun recently (a very dumb chess pawn moves generator) with the last
Spur vm
 I was shocked :)
 64bits + x2 perfs + non blocking (or multi threaded?) vm are giant steps
forward
 that makes it possible for pharo smalltalk to compete with mainstream
technologies

We'll prevail!

What we also need to do is to showcase the Smalltalk workflow and how nice
it is.

We cannot gain mindshare by technical prowess only.

Phil

 Regards,

 Alain




Re: [Pharo-dev] [Review: 11536] Add Stream printString:

2014-09-19 Thread Esteban A. Maringolo
2014-09-19 20:59 GMT-03:00 Eliot Miranda eliot.mira...@gmail.com:


 On Fri, Sep 19, 2014 at 1:19 AM, Max Leske maxle...@gmail.com wrote:

 This issue was more of a discussion between Camillo and Sven. They never
 reached a conclusion, so please take a look. I’ve compiled the transcript
 below.

 The issue isn’t easy to solve and maybe we can just close it as “not
 important”.


 +1.  But isn't the selector printString: broken?


The selector sounds broken to me too.

I always bring Dolphin to the discussion, but Dolphin streams had both
#print:/#display:

WriteStream#print: anObject
anObject printOn: aStream.

WriteStream#display: anObject
anObject displayOn: aStream.

But those are for printing/displaying the argument on the stream,
which is not exactly the same as sending #asString and then then
appending the result to receiver. So Eliot's #printAsString: seems to
be the most intention revealing selector for such task.

Regards!



Re: [Pharo-dev] Parsing Pharo syntax to C/C++

2014-09-19 Thread Alain Rastoul

Le 20/09/2014 02:33, p...@highoctane.be a écrit :


We'll prevail!

What we also need to do is to showcase the Smalltalk workflow and how
nice it is.

We cannot gain mindshare by technical prowess only.

Phil


I totally agree with you,
but I think that  those technical advances are vital in current 
technology trends (saas, cloud, server side dev) and progress in this 
field is important.


Despite the fact  I think that Smalltalk still has an advance in object 
oriented systems/development, and offers a different perception it is 
hard to get the point about object system with people who are formatted 
by the hype or by their experience. Discussing with collegues about some 
smalltalk concepts is always interesting :)