[Pharo-users] Re: Maintainer of smalltalk.org?

2021-10-06 Thread Benoit St-Jean via Pharo-users
Peter William Lount.
Used to work with him, I'll let him know when I get back home!

Envoyé à partir de Yahoo Courriel sur Android 
 
  Le mar., oct. 5 2021 à 22:25, James Foster a écrit :  
 I recently came across smalltalk.org and am curious to know who maintains it. 
I tried sending an email to the contact but the address bounced.
Thanks!
James Foster

  


[Pharo-users] Re: Can a class be not equal to itself?

2020-12-31 Thread Benoit St-Jean via Pharo-users

It never occurred to me that it would ever be the case!

I've always thought classes were singleton and that SomeClass copy would 
always return the sole instance of that class!


I wonder what are the implications of returning a copy, say, when you 
add an instVar to the "original" class ?  What happens to the reshaping 
of the instances created by the copy?


On 2020-12-31 20:25, Richard O'Keefe wrote:

Squeak, VisualWorks,
GNU Smalltalk, and Pharo *deliberately* make
aClass copy


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)



Re: [Pharo-users] The results are in!

2020-02-08 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
I guess I have to re-ask again since nobody answered my question from 
this week...


Where can we post Pharo 
questions/remarks/thoughts/you-might-want-to-have-a-look-at-this-cool-idea/whatever 
(or anything that could be of any interest to Pharoers) ?


MAYBE we need another list...

This is getting ridiculous!  The guy spends energy, time, effort and is 
able to gather 13K in prizes and puts Pharo to the forefront with this 
cool contest in schools, makes a lot of youngsters learn & use Pharo for 
their projects, puts up a website, makes videos, writes blog posts, 
PROMOTES Pharo and he gets slapped for posting here ?!?!  WTF ???


Where should he post?  Where should I post ?

On 2020-02-08 17:35, Guillermo Polito wrote:

Hi Richard,

I’d like to invite you to refrain yourself from posting such off-topic 
messages in the future.



--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] About "it's not pharo but smalltalk"

2020-02-08 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Smalltalk didn't "fail". We just didn't have the CPU power at the time 
to achieve our dreams! And "Smalltalk is slow" was tagged forever 
besides the name...


2020-02-08 07:17, Ben Coman wrote:The aim of the advertised statement 
that Pharo-is-not-Smalltalk is to

avoid you "later" being surprised if it differs from ST-80.
A marketing strategy analogous to a "fail early" programming paradigm,
and avoid such arguments that try to shackle Pharo.

In practice, its probably many years before Pharo is any more
incompatible with Smalltalk than the incompatibilities between
existing Smalltalks.
But Smalltalk-backward-compatibility should not be one of your
tick-boxes to choose Pharo.

cheers -ben


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] Promoting Pharo

2020-02-06 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Really sorry for the tone of my last reply Norbert...  But I've had my 
share of "get the fuck out of this list" private emails tonight...


Truly sorry. :(

On 2020-02-06 06:33, Norbert Hartl wrote:




Am 06.02.2020 um 12:22 schrieb Benoit St-Jean :



I don't mind doing 1, 2 and 3 but you'd probably complain that if I 
do 2 and 3, you'll find my interview "too smalltalkish"  for your own 
taste...  ;)


Please do! It is not important if it is to my taste or not. Why should 
it? If you do it you decide how it is done. That is exactly what we 
always try to explain. A community lives from its contributors and its 
shape is defined by whom contributes. Proposing work that someone else 
should do does not work.


Unless you want to provide me with your official text that I'll just 
read?



No, I don‘t want to do and it wasn‘t my proposal.

Norbert


On 2020-02-06 06:12, Norbert Hartl wrote:

Are the numbers the order in which you will do it?

Norbert

Am 06.02.2020 um 11:37 schrieb Benoit St-Jean via Pharo-users 
mailto:pharo-users@lists.pharo.org>>:



*Von: *Benoit St-Jean mailto:bstj...@yahoo.com>>
*Betreff: **Promoting Pharo*
*Datum: *6. Februar 2020 um 11:37:00 MEZ
*An: *Any question about pharo is welcome 
mailto:pharo-users@lists.pharo.org>>



Some rough & simple ideas...

1) Make Pharo visible on Rosetta.org <http://Rosetta.org>

There is currently 1006 tasks (mini projects) implemented in 764 
programming languages. Pharo is nowhere to be seen there, besides 
the programming language entry on the wiki for Pharo still points 
to pharo-project.org <http://pharo-project.org>. This project has 
the advantage of exposing programming languages with small 
tasks/problems any newbie can work on.  You always have the option 
to compare how it's done in your favorite language with the one 
you're trying to learn. Rosetta.org <http://Rosetta.org> is often a 
useful and popular source for people wanting to learn a new 
programming language by starting with some simple problems.


http://rosettacode.org/wiki/Rosetta_Code

2) Hacker Public Radio (aka HPR)

This podcast has a big audience and lots of loyal followers. Anyone 
can create a podcast and upload it there for broadcast. Normally, 
99% the podcasts are related to computer science, programming and 
technology.  It is a well-known and respected podcast as they have 
already created over 3000 podcasts already (it's a daily podcast)! 
They are very flexible on what you can talk about and pretty lax on 
the format : as long as you talk about something you love and that 
could interested other, it's fine with them!


http://hackerpublicradio.org/

3) FLOSS Weekly

Another well-known podcast with lots of listeners! They've already 
covered Squeak and Seaside (long ago) but they haven't talked about 
Pharo yet. Randall (Schwartz) is always looking for new guests and 
new subjects so I'm pretty sure having a podcast about Pharo would 
be easy and quick!


https://twit.tv/shows/floss-weekly

4) CLBG

The Computer Language Benchmark Game is another good place to get 
exposure. BUT I suggest we wait a bit before publishing code there 
as, obviously, we won't get good numbers as compared to other 
languages...  Let's wait for Pablo to finish his threading stuff in 
the VM first...  ;)


https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html

--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. 
Einstein)








--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

--- End Message ---


Re: [Pharo-users] Promoting Pharo

2020-02-06 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Really sorry for the tone of my last reply Norbert...  But I've had my 
share of "get the fuck out of this list" private emails tonight...


Truly sorry. :(

On 2020-02-06 06:33, Norbert Hartl wrote:




Am 06.02.2020 um 12:22 schrieb Benoit St-Jean :



I don't mind doing 1, 2 and 3 but you'd probably complain that if I 
do 2 and 3, you'll find my interview "too smalltalkish"  for your own 
taste...  ;)


Please do! It is not important if it is to my taste or not. Why should 
it? If you do it you decide how it is done. That is exactly what we 
always try to explain. A community lives from its contributors and its 
shape is defined by whom contributes. Proposing work that someone else 
should do does not work.


Unless you want to provide me with your official text that I'll just 
read?



No, I don‘t want to do and it wasn‘t my proposal.

Norbert


On 2020-02-06 06:12, Norbert Hartl wrote:

Are the numbers the order in which you will do it?

Norbert

Am 06.02.2020 um 11:37 schrieb Benoit St-Jean via Pharo-users 
mailto:pharo-users@lists.pharo.org>>:



*Von: *Benoit St-Jean mailto:bstj...@yahoo.com>>
*Betreff: **Promoting Pharo*
*Datum: *6. Februar 2020 um 11:37:00 MEZ
*An: *Any question about pharo is welcome 
mailto:pharo-users@lists.pharo.org>>



Some rough & simple ideas...

1) Make Pharo visible on Rosetta.org <http://Rosetta.org>

There is currently 1006 tasks (mini projects) implemented in 764 
programming languages. Pharo is nowhere to be seen there, besides 
the programming language entry on the wiki for Pharo still points 
to pharo-project.org <http://pharo-project.org>. This project has 
the advantage of exposing programming languages with small 
tasks/problems any newbie can work on.  You always have the option 
to compare how it's done in your favorite language with the one 
you're trying to learn. Rosetta.org <http://Rosetta.org> is often a 
useful and popular source for people wanting to learn a new 
programming language by starting with some simple problems.


http://rosettacode.org/wiki/Rosetta_Code

2) Hacker Public Radio (aka HPR)

This podcast has a big audience and lots of loyal followers. Anyone 
can create a podcast and upload it there for broadcast. Normally, 
99% the podcasts are related to computer science, programming and 
technology.  It is a well-known and respected podcast as they have 
already created over 3000 podcasts already (it's a daily podcast)! 
They are very flexible on what you can talk about and pretty lax on 
the format : as long as you talk about something you love and that 
could interested other, it's fine with them!


http://hackerpublicradio.org/

3) FLOSS Weekly

Another well-known podcast with lots of listeners! They've already 
covered Squeak and Seaside (long ago) but they haven't talked about 
Pharo yet. Randall (Schwartz) is always looking for new guests and 
new subjects so I'm pretty sure having a podcast about Pharo would 
be easy and quick!


https://twit.tv/shows/floss-weekly

4) CLBG

The Computer Language Benchmark Game is another good place to get 
exposure. BUT I suggest we wait a bit before publishing code there 
as, obviously, we won't get good numbers as compared to other 
languages...  Let's wait for Pablo to finish his threading stuff in 
the VM first...  ;)


https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html

--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. 
Einstein)








--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

--- End Message ---


Re: [Pharo-users] Promoting Pharo

2020-02-06 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
I don't mind doing 1, 2 and 3 but you'd probably complain that if I do 2 
and 3, you'll find my interview "too smalltalkish"  for your own 
taste...  ;) Unless you want to provide me with your official text that 
I'll just read?


On 2020-02-06 06:12, Norbert Hartl wrote:

Are the numbers the order in which you will do it?

Norbert

Am 06.02.2020 um 11:37 schrieb Benoit St-Jean via Pharo-users 
mailto:pharo-users@lists.pharo.org>>:



*Von: *Benoit St-Jean mailto:bstj...@yahoo.com>>
*Betreff: **Promoting Pharo*
*Datum: *6. Februar 2020 um 11:37:00 MEZ
*An: *Any question about pharo is welcome 
mailto:pharo-users@lists.pharo.org>>



Some rough & simple ideas...

1) Make Pharo visible on Rosetta.org <http://Rosetta.org>

There is currently 1006 tasks (mini projects) implemented in 764 
programming languages. Pharo is nowhere to be seen there, besides the 
programming language entry on the wiki for Pharo still points to 
pharo-project.org <http://pharo-project.org>. This project has the 
advantage of exposing programming languages with small tasks/problems 
any newbie can work on.  You always have the option to compare how 
it's done in your favorite language with the one you're trying to 
learn. Rosetta.org <http://Rosetta.org> is often a useful and popular 
source for people wanting to learn a new programming language by 
starting with some simple problems.


http://rosettacode.org/wiki/Rosetta_Code

2) Hacker Public Radio (aka HPR)

This podcast has a big audience and lots of loyal followers. Anyone 
can create a podcast and upload it there for broadcast. Normally, 99% 
the podcasts are related to computer science, programming and 
technology.  It is a well-known and respected podcast as they have 
already created over 3000 podcasts already (it's a daily podcast)! 
They are very flexible on what you can talk about and pretty lax on 
the format : as long as you talk about something you love and that 
could interested other, it's fine with them!


http://hackerpublicradio.org/

3) FLOSS Weekly

Another well-known podcast with lots of listeners! They've already 
covered Squeak and Seaside (long ago) but they haven't talked about 
Pharo yet.  Randall (Schwartz) is always looking for new guests and 
new subjects so I'm pretty sure having a podcast about Pharo would be 
easy and quick!


https://twit.tv/shows/floss-weekly

4) CLBG

The Computer Language Benchmark Game is another good place to get 
exposure. BUT I suggest we wait a bit before publishing code there 
as, obviously, we won't get good numbers as compared to other 
languages...  Let's wait for Pablo to finish his threading stuff in 
the VM first...  ;)


https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html

--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)







--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

--- End Message ---


Re: [Pharo-users] Large Image Generator

2020-02-06 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Pablo,

Here's my quick list of ideas to generate gigantic images...

The easiest way to fill the image quickly is to load huge packages that 
can also generate tons of data. The firsts that come to mind are Moose, 
Roassal, Seaside, BioSmalltalk, PolyMath, Marea, Magma (not sure if it 
is still supported though) and Dr. Geo. Another possibility is to use 
tools that can import tons of data into the image : there are tons of 
stress-test-gicantic XML schemas out there that we could load/read with 
one of our XML readers out there.


Another good candidate to torture the GC would be the FHCP challenge: 
they had to solved gigantic graphs and, luckily for us, the winners in 
2016 were from Inria so someone there must have the data to load those 
graphs (and perhaps the algorithms!). DeepTraverser could probably do 
the job here.


Other obvious tests involve pushing the language/VM to its limits : how 
does Pharo react if we flood the image with 4 million symbols??? Or 
create a hierarchy of 3 classes? Or have a package with 2000 tags? 
Is there any limit to the size of a methods (say, we create a method 
with 5000 literals)? Or create a gazillion classes, each with the 
maximum number of instance variables possible? What if we create a class 
that has a reference to every class in the image and see how the 
dependency checker copes with that?


Also, there's a lot of objects that are treated "specially" in the 
image.?? How does the VM/GC reacts when there's a gazillion of them? 
Semaphores, blocks, symbols, points, processes, weak objects, etc.


We could also generate a humongous graph/collection/whatever that could 
be loaded fast with Fuel instead of having to create those objects from 
scratch every time.


P.S. I have found quite a few discussions on the Squeak & Pharo mailing 
lists regarding problems with large images and I've collected the 
references to those threads. I'd be more than happy to share those with 
you in private if you're interested! I've also found lots of references 
to GC benchmarks/torture-tests used by other languages with GC and I 
think lots of them could also apply to our memory model...



On 2020-01-29 13:30, teso...@gmail.com wrote:

The main goal of the project is to start a recollection of existing
solutions and to add new ones to generate this synthetic images. We
want also to generate images that reproduce the nature of images. For
example, it is not enough to generate random method selectors if we
are testing the indexing of them. A good index varies its performance
depending of the nature of the text. We need to generate random
methods following some rules a developer whould use, for example using
more a given word or using real words.


--
-
Beno??t St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


[Pharo-users] Promoting Pharo

2020-02-06 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Some rough & simple ideas...

1) Make Pharo visible on Rosetta.org

There is currently 1006 tasks (mini projects) implemented in 764 
programming languages. Pharo is nowhere to be seen there, besides the 
programming language entry on the wiki for Pharo still points to 
pharo-project.org. This project has the advantage of exposing 
programming languages with small tasks/problems any newbie can work on.  
You always have the option to compare how it's done in your favorite 
language with the one you're trying to learn. Rosetta.org is often a 
useful and popular source for people wanting to learn a new programming 
language by starting with some simple problems.


http://rosettacode.org/wiki/Rosetta_Code

2) Hacker Public Radio (aka HPR)

This podcast has a big audience and lots of loyal followers. Anyone can 
create a podcast and upload it there for broadcast. Normally, 99% the 
podcasts are related to computer science, programming and technology.  
It is a well-known and respected podcast as they have already created 
over 3000 podcasts already (it's a daily podcast)! They are very 
flexible on what you can talk about and pretty lax on the format : as 
long as you talk about something you love and that could interested 
other, it's fine with them!


http://hackerpublicradio.org/

3) FLOSS Weekly

Another well-known podcast with lots of listeners! They've already 
covered Squeak and Seaside (long ago) but they haven't talked about 
Pharo yet.  Randall (Schwartz) is always looking for new guests and new 
subjects so I'm pretty sure having a podcast about Pharo would be easy 
and quick!


https://twit.tv/shows/floss-weekly

4) CLBG

The Computer Language Benchmark Game is another good place to get 
exposure. BUT I suggest we wait a bit before publishing code there as, 
obviously, we won't get good numbers as compared to other languages...  
Let's wait for Pablo to finish his threading stuff in the VM first...  ;)


https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html

--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] About "it's not pharo but smalltalk"

2020-02-06 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Then I have a question... and I'm not being sarcastic here!

As Pharo users, are we allowed to suggest ideas from other environments, 
even other languages or projects?


If I think we should implement something similar to VisualWork's 
MemoryPolicy in Pharo, where should I discuss that?


If I see package XYZ in Python that I think would be worth porting to 
Pharo, where should I discuss that?


If there are features in the Atom editor that are worth considering & 
cool for Pharo, where should I discuss that?


If I have ideas/places/means to promote Pharo or give it exposure, where 
should I discuss that?


If VisualAge has a nice config map to interface MQSeries and I'd like to 
know if a port to Pharo would interest anyone, where should I discuss that?


If I want to know if there's any interest to develop a native DB2 
database driver, should I discuss it here ?  From what I've read, the 
answer is NO.  Do you really think that if I post "hey guys, we should 
really port that to Pharo" on comp.databases.ibm-db2, it will draw any 
attention from Pharoers ? This is getting ridiculous!


I mean, are we limited to only discuss about what's in the Pharo image? 
Yeah, the Collection hierarchy is cool but are we gonna talk about that 
for the next 5 years? As a Pharo USER, I am not limited to what's in the 
image : Pharo interfaces with lots of things on the outside.  If we 
can't discuss about what's outside of the image and that could improve 
Pharo (library-wise),  tell me where I can do so!


If I understand correctly, we can't talk about anything that is not 100% 
Pharo on pharo-dev, pharo-users and lse-pharo4pharo, is that it ?!?!?!? 
What's left for the "outside world" ?


P.S. I'm not saying that this mailing list should be a catch-all place 
where we can discuss about baseball, fishing, cars, music, chess, C# and 
politics.  There has to be a way to sometimes discuss about stuff that 
is "outside" of Pharo but that could help us improve it!


On 2020-02-06 03:21, Esteban Lorenzano wrote:

Then let it phrase it like this: this list is not to talk about the whole 
Smalltalk universe but this particular implementation.


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] About "it's not pharo but smalltalk"

2020-02-05 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Here we go again...



What is wrong with you people? Seriously? With this "Pharo is NOT 
Smalltalk" BS? If it looks like a duck, swims like a duck, and quacks 
like a duck, then it probably is a duck!


To convince yourself, I urge you all to try to evaluate this in any 
other Smalltalk (Dolphin, Cuis, VisualWorks, LittleSmalltalk, 
ObjectStudio, VisualAge Smalltalk, IBM Smalltalk, Instantiations 
Smalltalk, Smalltalk/X, ObjectWorks, Visual Smalltalk Enterprise, 
Smalltalk Express, Amber Smalltalk, Redline Smalltalk, Smalltalk MT, GNU 
Smalltalk, you-f*cking-name-it-Smalltalk) to see if it compiles:


Transcript inspect.
Workspace inspect.
Processor inspect.
Smalltalk inspect.
true inspect.
false inspect.
thisContext inspect.
nil inspect.
self inspect.
super inspect.
Undeclared inspect.
#someSymbol inspect.
#(1 2 3) inspect.
Object allInstances.
OrderedCollection class inspect.
Behavior inspect.
Class inspect.
MethodDictionary inspect.
Smalltalk garbageCollect.
3@4 inspect.
([ :a :b | a + b ] value: 3 value: 4) inspect.
[50 factorial] forkAt: Processor userBackgroundPriority.


Now, if you still think that Pharo is NOT Smalltalk, I strongly suggest 
we remove all the code that was inherited from Squeak (Smalltalk) or 
inspired/borrowed by/from VisualWorks & others.  Same thing for the VM : 
we should build our own from scratch as Squeak and Cuis also use the 
same!  And we should assign different numbers to every primitive we do 
share with all other Smalltalks out there since 1980 : we wouldn't want 
to be associated with any Smalltalk, right? We don't want any Smalltalk 
in Pharo, don't we, since it is NOT Smalltalk?


Besides, just so you can glady remove all traces of the "forbidden" word 
or heritage, you must know that the current Pharo 8 images has 1724 
references to the global Smalltalk.  If you dig a little bit deeper 
(adding comments, deprecated code, the string 'Smalltalk' as well as the 
#Smalltalk symbol, you'll end up with 5000+ occurrences of the 
"forbidden word" "Smalltalk" in the current Pharo 8 image.  Wanna add 
occurrences of "Smalltalk" in method names as well while we're at it? ;) 
But hey, Pharo is NOT Smalltalk, right? ;)  loll


Should I create a PR for every occurrence of the forbidden word so we 
can get rid of that shameful heritage and clean up the image?  We should 
also remove the strings Squeak (56 times), Cuis, VisualWorks, VW, 
VisualAge & others since Pharo is NOT Smalltalk?  Did I say it enough?  
Pharo is NOT Smalltalk!  Even if I can load Smalltalk code from 
SmalltalkHub, SqueakSource and ss3.gemtalksystems.com, Pharo is NOT 
Smalltalk, do you get it? I can load mcz packages made for Cuis & Squeak 
but, nonetheless, Pharo is NOT Smalltalk!  How many times do I have to 
say it?


Imagine the following discussion:

A- I heard you bought a new car?

B- No I bought a Toyota Corolla.

A- So you bought a new car!

B- A TOYOTA COROLLA IS **NOT** A CAR.

Ain't that discussion & deny stupid enough?

I get the impression we constantly have this kind of denial/discussion 
here...  A serious case of SSS : Shame of Smalltalk Syndrome.


Pharo wants to be different : okay.  Fine. Cool!

But please, stop saying that Pharo is NOT Smalltalk.

It is.





//

--

-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

--- End Message ---


Re: [Pharo-users] [ANN] Hashtable on pharo-contributions

2020-01-30 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Cool!

If that helps, I'm currently working on a "custom" type of collection 
used for sampling objects based on probabilities. Should be ready in a 
few days if anyone's interested. For lack of a better word, it's 
currently called "SamplingSet". To make a long story short, I'm using 
this to generate random data that mimics the statistical properties of 
those objects in the real world. For example, if I'm generating last 
names for say an instance of class Person for Russia, chances are you 
should very rarely get any "St-Jean" as opposed to "Ivanov" so this 
collection samples those last names accordingly based on their 
probabilities. So all that SamplingSet does is return a random object 
that respects the statistical probability of such an occurrence.


I'm working on a few optimizations as I'm having to deal with sets of a 
few million items and right now, the 4M mark seems to be hard to break 
without paying a high price.  But I should be done withing a week or so.


On 2020-01-30 09:19, Cyril Ferlicot wrote:

Hi!

In Moose there is a project call "Hashtable". The goal of this project
is to provide faster collections when they have a big number of
elements.

I think this is something that can be useful for more than just Moose
so I extracted it to pharo-contributions so that we can use it and
improve it more.

https://github.com/pharo-contributions/Hashtable

Have a nice day.


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] Large Image Generator

2020-01-30 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Thanks for your quick & detailed answer Pablo!

I have a big list of ideas, all I need to do now is to type my notes! I 
wasn't sure if you wanted to test performance of a specific part/aspect 
of Pharo/VM hence my question to clarify all that!


Is there any preferred image (8.x or 9.x) you're looking for? Do you 
need/want tests that might only apply to P8 or your starting point is 
P9? Are you considering tests that use Morph/UI objects as well?


P.S. I just installed the latest Pharo Launcher and it rocks (long story 
short, don't ask, I had tons of problems previously because of the 
accentuated "i" in my first name, stuff that hadn't been removed when I 
uninstalled, etc. and I'm on Sh*tdows 10 !) so I'll first start by 
moving all my stuff into ONE place (Thanks Pharo Launcher) and after 
that experiment a little bit with Iceberg! In the meantime, would you 
consider contributions in the form of a fileOut/mcz file ?


On 2020-01-29 13:30, teso...@gmail.com wrote:

Hi Benoit,
  the main idea as always is to have better tests.
We have seen that Pharo, and many users reported, that Pharo does not
behaves correctly in some cases when handling large images. When I
take about large images, I am talking about images with a lot of code
and/or with a lot of data (yes the code for us is data... but I am
just differencing because if we are testing senders / implementors we
don't care about having a 10GB ByteArray).

Also we have seen that for correctly testing this scenarios, we need
good images, because depending the characteristics of the image it
stress different parts of the system. As you correctly said we need to
improve the tools (Calypso, System Navigation, Spotter, Iceberg, etc)
and the infrastructure (GC, Compiler, VM in general). So we need to
generate a lot of different images with different characteristics.

Also, as you correctly mentioned we need to generate images with
static behavior and with dynamic behavior (e.g., lots of concurrent
processes).

The main goal of the project is to start a recollection of existing
solutions and to add new ones to generate this synthetic images. We
want also to generate images that reproduce the nature of images. For
example, it is not enough to generate random method selectors if we
are testing the indexing of them. A good index varies its performance
depending of the nature of the text. We need to generate random
methods following some rules a developer whould use, for example using
more a given word or using real words.

So basically, we started collecting the easy algorithms to generate
and we will add more, and of course, it is open to contribution from
anyone and to different usage scenarios. The two I have implemented
are the ones we are using this week to solve three issues: (1)
improving the startup time, (2) improving the detection of deprecated
methods, (3) improving the analysis of big literal methods. I have
finished 1, the other two we are in working.

Also, I will like to add an implementation of the work of Clement and
Sophie to generate images to stress the GC.

If you have ideas or things to add let's share them!!

Cheers,
Pablo

On Wed, Jan 29, 2020 at 6:48 PM Benoit St-Jean via Pharo-users
 wrote:

Just read that announcement
(https://pharoweekly.wordpress.com/2020/01/29/ann-large-image-generator/)
on Pharo Weekly.

Anyone knows more about the precise goal of that project?  What is the
exact purpose of those images and what are we trying to test?  Garbage
collection?  The VM behavior under stress? Limitations of Pharo on a
specific OS? A reference against which future versions will be
benchmarked for performance? Iceberg and code management performance?
How base classes react when they have to deal with millions of objects
(e.g. a Bag with 15 million objects, forking 15000 processes, creating
2 semaphores, etc) ?

--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)





--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


[Pharo-users] Large Image Generator

2020-01-29 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Just read that announcement 
(https://pharoweekly.wordpress.com/2020/01/29/ann-large-image-generator/) 
on Pharo Weekly.


Anyone knows more about the precise goal of that project?  What is the 
exact purpose of those images and what are we trying to test?  Garbage 
collection?  The VM behavior under stress? Limitations of Pharo on a 
specific OS? A reference against which future versions will be 
benchmarked for performance? Iceberg and code management performance? 
How base classes react when they have to deal with millions of objects 
(e.g. a Bag with 15 million objects, forking 15000 processes, creating 
2 semaphores, etc) ?


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] Resources Page

2020-01-28 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
I don't know if it's still the case but "trial version" for VAST, in the 
past, only meant that you could use the product forever but you didn't 
have the possibility to create an executable iirc.


On 2020-01-28 20:37, horrido wrote:

I never consider a trial version as a free product. As far as I'm considered,
it's only free (or Community Edition) if I can use it indefinitely.



Dale Henrichs-3 wrote

I think the free license is contingent upon having contributed to an
open source project. Also there appears to be free trial version[1].

Dale

[1] https://www.instantiations.com/products/vasmalltalk/download.html

On 1/28/20 5:25 PM, Richard Sargent wrote:

Thanks.

On Tue, Jan 28, 2020, 17:21 horrido 

horrido.hobbies@
  
 mailto:

horrido.hobbies@
> wrote:

 Done. I didn't realize there was a free license for GemStone/S.

 Too bad VA Smalltalk doesn't offer a free license.


I believe they do.





 Richard Sargent (again) wrote
 > Thank you, Richard.
 >
 > Would you be kind enough to annotate the GemStone link to point
 out that
 > we have a free license that permits commercial use, not only
 personal use.
 >
 > Thanks again for all your hard work!
 >
 >
 > On January 28, 2020 2:24:16 PM PST, Richard Kenneth Eng 

 > horrido.hobbies@

 >  wrote:
 >>I've added a Resources page to my new blog:
 >>https://smalltalk.tech.blog/resources/.
 >>
 >>It is very much a *curated *list. I felt this was needed because
 when I
 >>visit other Smalltalk resources pages, I get overwhelmed by the
 number
 >>of
 >>links and options. It is possible to have *too many* choices.
 >>
 >>Moreover, many of those links are either broken, or they point to
 >>obscure
 >>materials that people may not be interested in.
 >>
 >>As curator, it is my job to present those links that I believe
 will be
 >>useful. Of course, this is necessarily very subjective.
 >>
 >>Also, it is likely that I've overlooked some links that others
 feel are
 >>useful. However, I am open-minded. If there are Smalltalk links
that
 >>you
 >>believe I should consider, please let me know.





 --
 Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html






--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] [pharo-project/pharo] Proposed improvement : performance of #atRandom: in class Bag (#5392)

2019-12-18 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
While I'm at it, another improvement would be to buffer #newFrom: by 
reading large chunks of the argument  via a ReadStream, 
adding the objects read to a  buffer and inserting into the 
receiver via #add:withOccurrences:.  That way, if you read say 1000 
object (of which lots are similar), you don't have to "add" 1000 items, 
you could reduce the number of adds by reducing the duplicates with this 
buffer bag.  Wouldn't make much of a difference in the worst case 
scenario but one can assume that since you're using a bag, you normally 
expect a lot of dups!  So we could gain a lot that way.  Anyway, that's 
what I'm seeing with my experiments (millions of objects) and I'm still 
contemplating that improvement with more & more tests (such as adjusting 
the buffer size).  So far, this is really promising!


On 2019-12-18 06:32, Sven Van Caekenberghe wrote:


OK, now I see. I was thrown off by the weird formatting ;-)

The final expression is not needed, since you started with an emptyCheck.

Reformatted then:

|Bag>>#atRandom: aGenerator "Answer a random element of the receiver. 
Uses aGenerator which should be kept by the user in a variable and 
used every time. Use this instead of #atRandom for better uniformity 
of random numbers because only you use the generator. Causes an error 
if self has no elements." | rand index | self emptyCheck. rand := 
aGenerator nextInt: self size. index := 0. self doWithOccurrences: [ 
:key :count | index := index + count. rand <= index ifTrue: [ ^ key ] ] |


Still, we need a PR as well. And maybe a specific test unless this is 
already covered by other tests.


—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub 
, 
or unsubscribe 
.



--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

--- End Message ---


[Pharo-users] Proposed improvement : performance of #atRandom: in class Bag

2019-12-18 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

For those interested,

I proposed a fix to *drastically* improve the performance of 
Bag>>#atRandom: !


See https://github.com/pharo-project/pharo/issues/5392

--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] SplitMix64

2019-10-25 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Of course !!!

On 2019-10-25 04:57, Serge Stinckwich wrote:



On Fri, Oct 25, 2019 at 4:04 AM Benoit St-Jean via Pharo-users 
mailto:pharo-users@lists.pharo.org>> wrote:


For those interested, my implementation of the SplitMix64
pseudo-random
number generator.

Useful if you need to generate pseudo-random big integers (up to
2^64).


https://github.com/bstjean/SmalltalkStuff/tree/master/SplitMix64



Can we add this to our RNG collection in PolyMath ?
Thank you.
Regards,


--
-
Beno??t St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

--- End Message ---


[Pharo-users] SplitMix64

2019-10-24 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
For those interested, my implementation of the SplitMix64 pseudo-random 
number generator.


Useful if you need to generate pseudo-random big integers (up to 2^64).


https://github.com/bstjean/SmalltalkStuff/tree/master/SplitMix64


-
Beno??t St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] how to get out of this mess

2019-03-24 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Hi Roelof,


I probably missed your prior posts but I do have a few questions and/or 
comments for you before I can be of any help!


This code is for tournaments of what sport exactly?  Hockey teams?  
Baseball teams?  Or tournaments between players (such as in chess where 
the concept of Team exists only every 4 years for the chess Olympiads).  
Do you plan on handling different sports? Different tournament formats 
(round robin, ladder, etc).


The whole thing seems to be centered around games/match results but you 
don't have such a class in your example.  Besides, how do you handle 
different results for one team for the same tournament a few years apart 
(say, the 2017 Formula 1 season vs the 2018 Formula 1 season) ?  
Shouldn't tournaments also have a name and a year (or a Season object) 
like they have in tennis, golf, chess, hockey, baseball, etc?


So my first impression is that you need the following classes : Team, 
GameResult, Tournament and something like TournamendDirector to create 
tournaments and create matches (or read/write them).


In other words, we need more info on what you are trying to do!


On 2019-03-24 14:02, Roelof Wobben wrote:

Hello,

I tried another way to solve this but the code is a mess now.

I can update a record but the record is not updated.
And I have to do a lot of the same steps for every team.

Anyone who can help me to get out of this mess.

Code so far:  https://github.com/RoelofWobben/tournament

Roelof



--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
GitHub: bstjean
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] Parsing text to discover general data of interest (phone, email, address, ...)

2019-03-07 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Couldn't find anything in Smalltalk but that should you give ideas and 
inspire you or get you started...


https://github.com/search?q=contact+scraping=Repositories

I guess we have all that's needed in Pharo : parsers (HTML, XML, 
PetitParser), Soup & regex !


On 2019-03-07 04:52, Cédrick Béler wrote:

Hi all,

I’ve often got the need to analyse some random unstructured text to discover 
(structured) information (in email for instance), to extract :
- emails
- telephone numbers
- addresses
- events
- person names (according to a list of known persons),
- etc…

Apple do it in email for instance (strangely, this is not generalized).


So my questions are :
- do we have something equivalent in Smalltalk/Pharo ? (I didn’t find)
- if not, what strategy would you use ?
=> I do really stupid text analysis (substrings, finding @, …, parsing 
according to the text structure when there is… kind of Soup parsing…)
=> I feel this is a job for PetitParser ? And would be a nice feet to the new 
GToolkit.

All ideas or suggestions are welcome ;-)


TIA,

Cédrick




--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] http://planet.smalltalk.org ?

2019-03-03 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
The smalltalk.org domain was registered to Peter William Lount. I've 
worked with him at some point.  Maybe I could ask him if he plans to do 
anything with planet.smalltalk.org at all (we are still in contact) ?


On 2019-03-03 20:07, Pierce Ng wrote:

On Sun, Mar 03, 2019 at 12:56:26PM -0300, Hernán Morales Durand wrote:

Me too I used to track a lot of interesting blogs out there. At one
time the main contact for the site was Coen de Roover :
http://soft.vub.ac.be/~cderoove/

Maybe someone already wrote him to ask?

I wrote Coen a few weeks back. Did not receive a reply.

At least going by www.smalltalk.org the domain hasn't gone to squatters.

Pierce



--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] Fwd: startup error in windows 10

2019-01-30 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Hi Hilaire,

Unfortunately, Dr. Geo suffers from the same problem I have with any 
Pharo 6.x and 7.x image regarding the encoding of my name in Windows.  
It crashes when the app starts at the exact same place and I can't do 
much.  Sorry.


On 2019-01-30 08:15, Hilaire wrote:

Hi Benoit,

It is DrGeo 18.06
https://launchpad.net/drgeo/trunk/18.06/+download/DrGeo.app-18.06a.zip

Thanks to try out.

Hilaire

Le 30/01/2019 à 00:16, Benoit St-Jean via Pharo-users a écrit :

Hilaire, do you have an URL so I can download the exact same thing
that users has?  I'm also on Windows 10.

I'll try to run in dev mode and see what happens!


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] Fwd: startup error in windows 10

2019-01-29 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Hilaire, do you have an URL so I can download the exact same thing that 
users has?  I'm also on Windows 10.


I'll try to run in dev mode and see what happens!

On 2019-01-29 14:27, Hilaire wrote:

I asked the user to send me the PharoDebug.log to have a more accurate
feedback:

http://forum.drgeo.eu/file/n4025537/PharoDebug.log

Of course I should make him to test with a newer VM to see if the
problem is gone, but it is a bit  more complicate.

Are the video info necessary? The image world starts just fine.

Hilaire

Le 28/01/2019 à 23:34, Ben Coman a écrit :

To provide the best chance for someone to help, can you provide:
* base Image version
* vm version
* systeminfo.exe (stripped of personally identifying data)
    * with dates added to hotfixes from
(https://www.tenforums.com/tutorials/5472-view-windows-update-history-windows-10-a.html)
* video info from (wmic path win32_VideoController get /all
/format:htable >> c:\temp\graphics.html)


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] Class name with diacritic character and Pharo

2019-01-27 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Sorry, my toothache meds are kicking in! lol

Correction to my last post:

I mean *fileouts" don't work when author name has diacritic French 
characters!


Obviously, couldn't test filing in!


On 2019-01-27 11:03, Sven Van Caekenberghe wrote:

Hi Dominique,


On 27 Jan 2019, at 11:40, Dominique Dartois  wrote:

Hello all.
If a use french diacritic character in a class name, the code runs but I can’t 
fileout the package nor save it with Monticello.
For example, the C cedilla in the class name drive me to an 
‘ZnInvalidUTF8:Illegal byte for utf-8 encoding' when filing out.

Is it a bug or a feature?
Thank you

---
Dominique Dartois

Thanks for reporting this. This is most definitely a bug, I can confirm its 
occurrence.

I'm CC pharo-dev as this is quite important. This will be a long mail.


This is one manifestation of a problem that has been present for quite a while.

I'll start by describing what I did, what went well and where/how this fails, 
some generic points, and two conceptual solutions (that need further 
verification).

Like you, I created a new subclass:

Object subclass: #ClasseFrançaise
instanceVariableNames: ''
classVariableNames: ''
package: '_UnpackagedPackage'

With comment:

I am ClasseFrançaise.

Try:

ClasseFrançaise new élève.
ClasseFrançaise new euro.

And two methods (in the 'test' protocol):

élève
^ 'élève'

euro
^ '€'

I added the euro sign (because that is encoded in UTF-8 with 3 bytes, not 2 
like ç).
Like you said, the system can cope with such class and method names and seems 
to function fine.

Looking at the .changes file, the correct source code was appended:

SNAPSHOT2019-01-26T23:36:18.548555+01:00 work.image priorSource: 339848!

Object subclass: #ClasseFrançaise
 instanceVariableNames: ''
 classVariableNames: ''
 package: '_UnpackagedPackage'!
!ClasseFrançaise commentStamp: 'SvenVanCaekenberghe 1/27/2019 12:25' prior: 0!
I am ClasseFrançaise.!
!ClasseFrançaise methodsFor: 'test' stamp: 'SvenVanCaekenberghe 1/27/2019 
12:26'!
élève
 ^ 'élève'! !
!ClasseFrançaise commentStamp: 'SvenVanCaekenberghe 1/27/2019 12:27' prior: 
33898360!
I am ClasseFrançaise.

Try:

 ClasseFrançaise new élève.
 ClasseFrançaise new euro.
!
!ClasseFrançaise methodsFor: 'test' stamp: 'SvenVanCaekenberghe 1/27/2019 
12:27'!
euro
^ '€'! !


Doing a file out (or otherwise saving the source code) fails. The reason is an 
incorrect manipulation of this source file while looking for what is called the 
method preamble, in SourcFileArray>>#getPreambleFrom:at: position

An programmatic way to invoke the same error is by doing

(ClasseFrançaise>>#élève) timeStamp.
(ClasseFrançaise>>#élève) author.

Both fail with the same error.


The source code of methods is (currently) stored in a .sources or .changes 
file. CompiledMethods know their source pointer, an offset in one of these 
files. Right before the place where the source starts is a preamble that 
contains some meta information (including the author and timestamp). To access 
that preamble, the source code pointer is moved backwards to the beginning of 
the preamble (which begins and ends with a !).


The current approach fails in the presence of non-ASCII characters. More 
specifically because of a mixup between the concept of byte position and 
character position when using UTF-8, a variable length encoding (both the 
.changes and the .sources are UTF-8 encoded).

For example, consider

'à partir de 10 €' size. "16"
'à partir de 10 €' utf8Encoded size. "19"

So although the string contains 16 characters, it is encoded as 19 bytes, à 
using 2 bytes and € using 3 bytes. In general, moving backwards or forwards in 
UTF-8 encoded bytes cannot be done without understanding UTF-8 itself.

ZnUTF8Encoder can do both (moving forward is #nextFromStream: while moving 
backwards is #backOnStream:). However, ZnUTF8Encoder is also strict: it will 
signal an error when forced to operate in between encoded characters, which is 
what happens here.

It is thus not possible to move to arbitrary bytes positions and assume/hope to 
always arrive on the correct character boundaries and it is also wrong to take 
the difference between two byte positions as the count of characters present 
(since their encoding is of variable length).

SourcFileArray>>#getPreambleFrom:at: is doing both of these wrong (but gets 
away with it in 99.99% of all cases since very few people name their classes like 
that).

There are two solutions: operate mostly on the byte level or operate correctly 
on the character level. Here are two conceptual solutions (you must execute 
either solution 1 or 2, not both), with two different inputs.


src := '!ClasseFrançaise methodsFor: ''test'' stamp: ''SvenVanCaekenberghe 
1/27/2019 12:27''!
euro
^ ''€''! !'.

"startPosition := 83"

str := ZnCharacterReadStream on: (src utf8Encoded readStream).
str 

Re: [Pharo-users] Class name with diacritic character and Pharo

2019-01-27 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
While we're at it, a similar problem arises when the author name (in my 
case BenoîtStJean) contains a French diacritic.


Just tested it with Pharo 7 (64 bit on Windows 10)...

Fileout works fine.  But filing in crashes!

On 2019-01-27 11:03, Sven Van Caekenberghe wrote:

Hi Dominique,


On 27 Jan 2019, at 11:40, Dominique Dartois  wrote:

Hello all.
If a use french diacritic character in a class name, the code runs but I can’t 
fileout the package nor save it with Monticello.
For example, the C cedilla in the class name drive me to an 
‘ZnInvalidUTF8:Illegal byte for utf-8 encoding' when filing out.

Is it a bug or a feature?
Thank you

---
Dominique Dartois

Thanks for reporting this. This is most definitely a bug, I can confirm its 
occurrence.

I'm CC pharo-dev as this is quite important. This will be a long mail.


This is one manifestation of a problem that has been present for quite a while.

I'll start by describing what I did, what went well and where/how this fails, 
some generic points, and two conceptual solutions (that need further 
verification).

Like you, I created a new subclass:

Object subclass: #ClasseFrançaise
instanceVariableNames: ''
classVariableNames: ''
package: '_UnpackagedPackage'

With comment:

I am ClasseFrançaise.

Try:

ClasseFrançaise new élève.
ClasseFrançaise new euro.

And two methods (in the 'test' protocol):

élève
^ 'élève'

euro
^ '€'

I added the euro sign (because that is encoded in UTF-8 with 3 bytes, not 2 
like ç).
Like you said, the system can cope with such class and method names and seems 
to function fine.

Looking at the .changes file, the correct source code was appended:

SNAPSHOT2019-01-26T23:36:18.548555+01:00 work.image priorSource: 339848!

Object subclass: #ClasseFrançaise
 instanceVariableNames: ''
 classVariableNames: ''
 package: '_UnpackagedPackage'!
!ClasseFrançaise commentStamp: 'SvenVanCaekenberghe 1/27/2019 12:25' prior: 0!
I am ClasseFrançaise.!
!ClasseFrançaise methodsFor: 'test' stamp: 'SvenVanCaekenberghe 1/27/2019 
12:26'!
élève
 ^ 'élève'! !
!ClasseFrançaise commentStamp: 'SvenVanCaekenberghe 1/27/2019 12:27' prior: 
33898360!
I am ClasseFrançaise.

Try:

 ClasseFrançaise new élève.
 ClasseFrançaise new euro.
!
!ClasseFrançaise methodsFor: 'test' stamp: 'SvenVanCaekenberghe 1/27/2019 
12:27'!
euro
^ '€'! !


Doing a file out (or otherwise saving the source code) fails. The reason is an 
incorrect manipulation of this source file while looking for what is called the 
method preamble, in SourcFileArray>>#getPreambleFrom:at: position

An programmatic way to invoke the same error is by doing

(ClasseFrançaise>>#élève) timeStamp.
(ClasseFrançaise>>#élève) author.

Both fail with the same error.


The source code of methods is (currently) stored in a .sources or .changes 
file. CompiledMethods know their source pointer, an offset in one of these 
files. Right before the place where the source starts is a preamble that 
contains some meta information (including the author and timestamp). To access 
that preamble, the source code pointer is moved backwards to the beginning of 
the preamble (which begins and ends with a !).


The current approach fails in the presence of non-ASCII characters. More 
specifically because of a mixup between the concept of byte position and 
character position when using UTF-8, a variable length encoding (both the 
.changes and the .sources are UTF-8 encoded).

For example, consider

'à partir de 10 €' size. "16"
'à partir de 10 €' utf8Encoded size. "19"

So although the string contains 16 characters, it is encoded as 19 bytes, à 
using 2 bytes and € using 3 bytes. In general, moving backwards or forwards in 
UTF-8 encoded bytes cannot be done without understanding UTF-8 itself.

ZnUTF8Encoder can do both (moving forward is #nextFromStream: while moving 
backwards is #backOnStream:). However, ZnUTF8Encoder is also strict: it will 
signal an error when forced to operate in between encoded characters, which is 
what happens here.

It is thus not possible to move to arbitrary bytes positions and assume/hope to 
always arrive on the correct character boundaries and it is also wrong to take 
the difference between two byte positions as the count of characters present 
(since their encoding is of variable length).

SourcFileArray>>#getPreambleFrom:at: is doing both of these wrong (but gets 
away with it in 99.99% of all cases since very few people name their classes like 
that).

There are two solutions: operate mostly on the byte level or operate correctly 
on the character level. Here are two conceptual solutions (you must execute 
either solution 1 or 2, not both), with two different inputs.


src := '!ClasseFrançaise methodsFor: ''test'' stamp: ''SvenVanCaekenberghe 
1/27/2019 12:27''!
euro
^ ''€''! !'.

"startPosition := 83"

str := ZnCharacterReadStream on: (src 

Re: [Pharo-users] adding instance variables (data) to the Object class

2019-01-16 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Petr,

Since you seem to want to add this (these) extra instance variable(s) in 
the context of some kind of persistence (objects being retrieved/created 
from/to some kind of database), perhaps subclassing all your objects 
from a PersistentObject class (that inherits from Object) would be the 
simplest solution.




--- End Message ---


Re: [Pharo-users] [Pharo-dev] New book: Pharo with Style

2018-12-31 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Besides, I forgot to add one comment : you should have guidelines for 
protocol naming.  It's not critical per se but I find it quite annoying 
to look for stuff in "enumerating" when it's been put in "printing" !  loll


On 2018-12-31 03:51, Stephane Ducasse wrote:

Thanks! Thanks!
I will go over it (now laying on my back :(( stupid muscles strike back!)

On Mon, Dec 31, 2018 at 2:18 AM Benoit St-Jean  wrote:

On 2018-12-30 16:13, Stephane Ducasse wrote:

Hello Fellow Pharoers

I'm happy to announce a new little book to improve the culture around Pharo.
I will revise it in the future so you can feel free to send feedback
and pull requests
to https://github.com/SquareBracketAssociates/Booklet-PharoWithStyle

Stef

"The best way to predict the future is to invent" so I do it.

Stéphane,

You'll find, attached, a revised PDF version with my comments.



--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] GPS / Longitude / Latitude library

2018-12-22 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---

Hi Alistair!

First off, thanks for the "thank you note" in this email & on GitHub.

Would you be interested in working on a port of GeoSphere 
(https://cran.r-project.org/web/packages/geosphere/geosphere.pdf) to 
Pharo ?  I'll have some spare time in the next weeks so we could work on 
that together.  Since this package is widely known and used, it could 
serve as a base for a Geo package for Pharo.  I have R installed with 
this package here so cross-checking Pharo results vs R calculations 
wouldn't be a problem!  That also means plenty of unit tests are 
possible !  ;)


I noticed (at least on Pharo 6.1) that you reference "WebBrowser" which 
is either present in P7 (and not in P6) or it indicates a dependency 
problem.


I also noticed that you use the WGS84 reference ellipsoid as a hardcoded 
constant (in other works, assuming the earth radius is 6378137 meters 
for all calculations).  Modifying the code to have reference ellipsoids 
objects and use the WGS84 as the default (which is what everyone uses) 
would be a more flexible solution. Besides, it would also allow funky 
stuff like being able to use the same framework to work for every known 
spatial body like say, the Moon or Mars or whatever! Besides, that way 
(using reference ellipsoid objects), older maps/coordinates/calculations 
could still be used just by changing the ellipsoid reference.


Let me know if you're interested!

P.S.  I couldn't find a similar package/framework for 
Pharo/Squeak/WhateverSmalltalk.  If I missed it, let me know guys!!  I'm 
not a big fan of reinventing the wheel!!


On 2018-12-19 02:32, Alistair Grant wrote:

Hi All,

If anyone is interested, I've created the beginnings of a library for
handling coordinates at: https://github.com/akgrant43/GeoSphere

It only:

- Parses string coordinates
- Calculates the distance between coordinates
- Opens a web browser in OpenStreetMap at the receiver's coordinates

Examples of string formats that can be parsed:

- 144.61025 @ -38.28697
- 38° 17′ 13.09″ S, 144° 36′ 36.9″ E
- 38 deg 17' 13.09" S, 144 deg 36' 36.9" E
- https://www.openstreetmap.org/#map=18/-38.28697/144.61025

The distance calculation uses haversine (assumes the earth is a
sphere), which is good enough for my needs at the moment.

Thanks again to Sven, Benoit, Pierce and Richard for their input.

Cheers,
Alistair


--
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


--- End Message ---


Re: [Pharo-users] GPS / Longitude / Latitude library

2018-12-04 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Perhaps porting the R package GeoSphere to Pharo/Squeak/Smalltalk would be an 
option?  It's rather complete and used a lot (at least in the R community) !
https://cran.r-project.org/web/packages/geosphere/geosphere.pdf
- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Wednesday, December 5, 2018, 2:24:07 a.m. EST, Alistair Grant 
 wrote:  
 
 Hi Sven,

On Tue, 4 Dec 2018 at 11:04, Sven Van Caekenberghe  wrote:
>
> Hi Alistair,
>
> > On 4 Dec 2018, at 10:21, Alistair Grant  wrote:
> >
> > Hi,
> >
> > Does anyone know of a library for processing GPS coordinates?
> >
> > What I'm looking for are things like:
> >
> > - Parsing from and printing to various string formats (HMS, NESW, decimal)
> > - Distance between two points
> > - etc.
> >
> > Thanks,
> > Alistair
>
> We've got some elementary stuff based on WGS84 coordinates as points. For 
> example,
>
> T3GeoTools distanceBetween: 5.33732@50.926 and: 5.49705@50.82733.
> T3GeoTools bearingFrom: 5.33732@50.926 to: 5.49705@50.82733.
> T3GeoTools destinationFrom: 5.33732@50.926 bearing: 45 distance: 2500.
> T3GeoTools centroidOf: { 5.48230@50.82249. 5.49523@50.81288. 
> 5.50138@50.82008. 5.50228@50.82595. 5.49265@50.82560. 5.48230@50.82249 }.
> T3GeoTools is: 5.33732@50.92601 inside: { 5.48230@50.82249. 5.49523@50.81288. 
> 5.50138@50.82008. 5.50228@50.82595. 5.49265@50.82560. 5.48230@50.82249 }.
>
> This is not open source, but it is not rocket science either (just 
> implementations of public algorithms).

Right, I'll probably have a go at this a put it up on github.

It looks like you've chosen to model the coordinates using the Point
class rather than creating a Coordinate class.  Can you explain why (I
don't have a strong preference either way, so am wondering what your
thinking is).

It also looks like it is longitude @ latitude.  Is that correct?  (I
guess it lines up with the point y value being vertical, which is
latitude.  But most written forms put latitude first).

Thanks!
Alistair

  --- End Message ---


Re: [Pharo-users] Latest Pharo and Aida/Web

2018-12-03 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
If I'm not mistaken (according to the fact that both class comments are exactly 
the same), SecureHashAlgorithm (in Squeak) is the exact same thing as class 
SHA1 (in Pharo)... 

Just updating the code with the "new" class name will probably do the job!

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Monday, December 3, 2018, 4:18:55 p.m. EST, eftomi 
 wrote:  
 
 Hi, I'm trying to run Aida/Web on Pharo 5.0, 6.1 and 7.0 with no luck. After
package inclusion with Catalog Browser, the initialisation with 

SwazooAida demoStart

wasn't working, since Timestamp was not present. After I "faked" it with
DateAndTime, the web server is running, but if I visit the initial web
address http://localhost:/, I get his error:

WebSecurityManager class>>hashPassword: (SecureHashAlgorithm is Undeclared).

Before I continue with exploration & debugging, I'd like to know how far
from a working and stable team is Aida & latest Pharo (if somebody knows, of
course). I'm a beginner with Smalltalk and Aida seems to be very nice
framework, however there are other options as well, without any challenges
for a newbie :-)

Thanks, Tomaz 




--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

  --- End Message ---


Re: [Pharo-users] can I improve this

2018-12-03 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Wouldn't be that hard to implement.  We just need a modulo (like I did) when 
sending #next to wrap around...
Or even better: a "cyclic" iterator, something like #withWrapDo: ?

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Monday, December 3, 2018, 1:28:09 p.m. EST, phil--- via Pharo-users 
 wrote:  
 
 CyclicReadStream. Not in base Pharo.
I wish.
We have atWrap: but not the best.
Phil

On Mon, Dec 3, 2018 at 1:17 PM Richard O'Keefe  wrote:

"if I use do:   this ends at the end of the array."True.  But all that means is 
that you have to keen on using #do:.
Processing an array repeatedly is as simple as  [true] whileTrue: [    anArray 
do: [:each |      ...]]
I had intended to twist this into
  [changes anySatisfy: [:change | ...]] whileFalse.
However, in this case your second alternative has much to recommend it.The 
control flow is simple.  There's no magic about it.  It's anunusual setup, so 
no need to get fancy.
  seen := Set new.  frequency := 0.  found := false.  i := changes size.  
[found] whileFalse: [    i := i = changes size ifTrue: [1] ifFalse: [i+1].    
frequency := frequency + (changes at: i).    found := seen includes: frequency. 
   seen add: frequency].

I like this better than what I had.
If we _were_ to get fancy, then introducing a CyclicReadStreamclass and doing   
 seen := Set new.    frequency := 0.    found := false.    stream := 
CyclicReadStream on: self changes.    [found] whileFalse: [      frequency := 
frequency + stream next.      found := seen includes: frequency.      seen add: 
frequency].wouldn't shrink the code much.  Oddly enough, I've 
encounteredproblems in previous Advent of Code exercises where 
CyclicReadStreamwould have been handy.  But just for this case?  No.

On Tue, 4 Dec 2018 at 00:25, Roelof Wobben  wrote:

  hello Richard, 
 
 Thanks, I figured that out already.
 What I do not get is how to read the array multiple times. 
 
 if I use do:   this ends at the end of the array.
 
 Or I must use something as this : 
 
 index := 0 
 if index > array length 
     index =:  1 
 else 
 index := index + 1 
 
 
 and then read the number with array at: index 
 
 Roelof
 
 
 Op 3-12-2018 om 10:08 schreef Richard O'Keefe:
  
  Roelof Wobben wrote "I have to reread the file till the adding causes the 
same outcome  as we had already" You have to process the *sequence of changes* 
repeatedly; you DON't have to *reread the file*.  Somebody already made this 
point. Having read the changes into an array, you can iterate repeatedly over 
that array. 
  to find the first repeated frequency given a sequence of changes     make an 
empty Set to hold the sums that have been seen so far.
      set the frequency to 0.     loop forever         for each change in the 
changes             increment the frequency by the change.             if the 
frequency is in the set                 return the frequency            
otherwise add the frequency to the set.
  
   partTwo: aFileName     Transcript print: (self firstRepeatedFrequency: (self 
changesFrom: aFileName)); cr; flush.  
  On Mon, 3 Dec 2018 at 19:31, Roelof Wobben  wrote:
  
  Thanks, 
 
 For the second I have to take a good look.
 
 I have to reread the file till the adding causes the same outcome  as we had 
already 
 
 so for example if we have the sequence : 
 
 +3, +3, +4, -2, -4
 
 it has as outcome : 
 
 3 6 10 8 4 
 
 so no outcome is there a second time so we repeat the sequence
 
 
 7 10 
 
 the 10 shows up a second time so there we have our answer. 
 
 
 Roelof
 
 
 
 Op 3-12-2018 om 03:45 schreef Richard O'Keefe:
  
  The key question is "what do you mean by improve"? I'd start by asking "what 
are you doing that you will still have to do in part 2, and what won't you do?" 
 So looking at part 2, you will want to convert the lines to integers, and   
input := Array streamContents: [:lines |     'input.txt' asFileReference 
readStreamDo: [:in |       [in atEnd] whileFalse: [lines nextPut: in nextLine 
asInteger]]]. gives you a chunk of code you can use in both parts.  So you 
might want to have 
  Day1   changesFrom: aFileName     ^Array streamContents: [:changes |       
aFileName asFileReference readStreamDo: [:in |         [in atEnd] whileFalse: 
[changes nextPut: in nextLine asInteger]]]   partOne: aFileName     ^(self 
changesFrom: aFileName) sum   partTwo: aFileName     ... The file name should 
not be wired in because you want some test files. 
  
   
  
  
   
 
  
  
 
 

  --- End Message ---


Re: [Pharo-users] can I improve this

2018-12-03 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
It's just a matter of taste and/or habit.  Quite frankly, I never think about 
using #streamContents nor #readStream or other variations since I've always had 
to write that kinda code "the long way" since 1992 ! 

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Monday, December 3, 2018, 11:09:31 a.m. EST, Roelof Wobben 
 wrote:  
 
 Op 3-12-2018 om 17:01 schreef Benoit St-Jean via Pharo-users:

Many many many thanks

For me too

and that is the answer I expect

Two question,

Why is trough StandardFileStream a line

and can this also be rewritten with a StreamContents



Roelof


  --- End Message ---


Re: [Pharo-users] can I improve this

2018-12-03 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Works fine with my Squeak and Pharo code.
Result is 558 in both cases!

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Monday, December 3, 2018, 10:37:57 a.m. EST, Roelof Wobben 
 wrote:  
 
 Op 3-12-2018 om 16:13 schreef Benoit St-Jean via Pharo-users:
> file := StandardFileStream readOnlyFileNamed: 'C:\Recv\day.1.input'.
> [file atEnd] whileFalse: [numbers add: (file nextLine asInteger)].
> file close.
very wierd, on my Pharo 7 box I do not work.
I also see a message that temp variables are not written or read


Can you try your code on my input : 
https://gist.github.com/RoelofWobben/001a0d7f9a8d5b5a0ebbc3f133dbd032
and tell me the outcome.

I have solved it already so you do not spoil anything


Roelof


  --- End Message ---


Re: [Pharo-users] can I improve this

2018-12-03 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
I'm on Squeak btw.  Tried it in Pharo 6.1 and it looks like number parsing is 
different.
Here's a version that works fine on Pharo 6.1
| file total numbers index frequencies duplicate |

duplicate := false.
frequencies := Set new: 15.
frequencies add: 0.
numbers := OrderedCollection new: 1000.
total := 0.

file := StandardFileStream readOnlyFileNamed: 'C:\Recv\day.1.input'.
[file atEnd] whileFalse: [numbers add: (file nextLine asInteger)].
file close.

index := 0.
[duplicate] whileFalse: [index := index \\ (numbers size) + 1.
                        total := total + numbers at: index.
                        (frequencies includes: total) 
                            ifTrue: [duplicate := true]
                            ifFalse: [frequencies add: total]].

total

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Monday, December 3, 2018, 10:12:36 a.m. EST, Roelof Wobben 
 wrote:  
 
 Op 3-12-2018 om 16:08 schreef Benoit St-Jean via Pharo-users:

yep

I did change it by the argument

partTwo: aFileName
     | total numbers index frequencies duplicate file |

duplicate := false.
frequencies := Set new: 15.
frequencies add: 0.
numbers := OrderedCollection new: 1000.
total := 0.

file := self changesFrom: aFileName.

index := 0.
[duplicate] whileFalse: [index := index \\ (numbers size) + 1.
     total := total + numbers at: index.
     (frequencies includes: total)
     ifTrue: [duplicate := true]
     ifFalse: [frequencies add: total]].

^total

and changesFrom looks like this :

changesFrom: aFileName
     ^Array streamContents: [:changes |
   aFileName asFileReference readStreamDo: [:in |
     [in atEnd] whileFalse: [changes nextPut: in nextLine asInteger]]]


  --- End Message ---


Re: [Pharo-users] can I improve this

2018-12-03 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Did you change the file name?

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Monday, December 3, 2018, 9:52:08 a.m. EST, Roelof Wobben 
 wrote:  
 
 yep, on  Pharo this is a empty collection.

numbers := OrderedCollection new: 1000.

so   index \\ (numbers size)   is  something divide by zero

Roelof



Op 3-12-2018 om 15:44 schreef Roelof Wobben:
> Op 3-12-2018 om 15:30 schreef Benoit St-Jean via Pharo-users:
>
> Thanks,
>
> But at first glance you do not use the contents of file anywhere or am 
> I mistaken.
> When I try your code on the real input I see a divide by zero error 
> message.
>
> Roelof
>
>
>
>


  --- End Message ---


Re: [Pharo-users] can I improve this

2018-12-03 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Concerning Day1, part2 of Advent Of Code 2018, here's my quick take (Coded in a 
workspace with Squeak)...

| file total numbers index frequencies duplicate |

duplicate := false.
frequencies := Set new: 15.
frequencies add: 0.
numbers := OrderedCollection new: 1000.
total := 0.

file := StandardFileStream readOnlyFileNamed: 'day.1.input'.
[file atEnd] whileFalse: [numbers add: (Integer readFrom: file nextLine)].
file close.

index := 0.
[duplicate] whileFalse: [index := index \\ (numbers size) + 1.
                        total := total + numbers at: index.
                        (frequencies includes: total) 
                            ifTrue: [duplicate := true]
                            ifFalse: [frequencies add: total]].

^total

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Monday, December 3, 2018, 2:01:08 a.m. EST, p...@highoctane.be 
 wrote:  
 
 Also, given the time that some people solve the puzzle, doing it too nice is 
actually not the best use of time in AoC.
Now, I'll try to solve quick and this will for sure lead to interesting things 
in Pharo.
>From Reddit, people solve it quick then make it nice.
Phil
On Mon, Dec 3, 2018, 03:45 Richard O'Keefe --- End Message ---


Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Just realized that String>>#asNumber works differently in Pharo and in Squeak.

'+3' asNumber "Works in Squeak, not in Pharo"
BUT

'+3' asInteger "Works in both Squeak and Pharo"


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, December 2, 2018, 11:06:56 a.m. EST, p...@highoctane.be 
 wrote:  
 
 I am not using a file, but copy/paste my puzzleInput into a puzzleInput method.
Then I use lines from there.
e.g. shifts

    ^ self puzzleInput lines collect: [ :each | ((each beginsWith: '+') ifTrue: 
[ each allButFirst ] ifFalse: [ each  ]) asNumber ]
Because the challenge is personalized and it is annoying to have to commit a 
supplementary file in the github repository.

Phil

On Sun, Dec 2, 2018 at 3:27 PM Benoit St-Jean via Pharo-users 
 wrote:

Exactly!
It's easier to manipulate that OrderedCollection that to open/reopen the file.  
It'll be VERY handy for problem #2 where you will need to iterate multiple 
times on the data!  ;)

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, December 2, 2018, 7:15:06 a.m. EST, Roelof Wobben 
 wrote:  
 
 Op 2-12-2018 om 12:19 schreef Benoit St-Jean via Pharo-users:


oke, and if I understand your code files is then the variable that holds 
the file.

Roelof


  
  --- End Message ---


Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Wasn't sure, I'm on Squeak right now!!  loll

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, December 2, 2018, 6:26:12 a.m. EST, Sven Van Caekenberghe 
 wrote:  
 
 

> On 2 Dec 2018, at 12:14, Benoit St-Jean via Pharo-users 
>  wrote:
> 
> 
> From: Benoit St-Jean 
> Subject: Re: [Pharo-users] How to take care that the + before a number is 
> ignored
> Date: 2 December 2018 at 12:14:10 GMT+1
> To: pharo-users@lists.pharo.org
> Reply-To: Benoit St-Jean 
> 
> 
> You can do solve the problem without the "lines" variable but, believe me, 
> you want to keep those lines in a collection.  It's gonna be a lot easier 
> down the road!
> 
> Hint (to solve the problem) : look at what "lines" contain (instances of 
> which class).  That class has everything you need to parse those '+2' and 
> '-8' ...  ;)
> 
> 
> | file  |
> 
> lines := OrderedCollection new.
> 
> file := StandardFileStream readOnlyFileNamed: 'day.1.input'.

That is a deprecated class in Pharo 7.

> [file atEnd] whileFalse: [lines add: file nextLine].
> file close.

Here is a better way:

Array streamContents: [ :lines |
  'file.log' asFileReference readStreamDo: [ :in |
    [ in atEnd ] whileFalse: [ lines nextPut: in nextLine ] ] ]

> - 
> Benoît St-Jean 
> Yahoo! Messenger: bstjean 
> Twitter: @BenLeChialeux 
> Pinterest: benoitstjean 
> Instagram: Chef_Benito
> IRC: lamneth 
> Blogue: endormitoire.wordpress.com 
> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
> 
> 
> On Sunday, December 2, 2018, 6:09:42 a.m. EST, Roelof Wobben 
>  wrote:
> 
> 
> Op 2-12-2018 om 11:55 schreef Benoit St-Jean via Pharo-users:
> 
> Nope, only the part how I can read the file.
> 
> 
> Roelof
> 
> 
> 
> 
  --- End Message ---


Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Exactly!
It's easier to manipulate that OrderedCollection that to open/reopen the file.  
It'll be VERY handy for problem #2 where you will need to iterate multiple 
times on the data!  ;)

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, December 2, 2018, 7:15:06 a.m. EST, Roelof Wobben 
 wrote:  
 
 Op 2-12-2018 om 12:19 schreef Benoit St-Jean via Pharo-users:


oke, and if I understand your code files is then the variable that holds 
the file.

Roelof


  --- End Message ---


Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Oups!
Usually, it's way nicer/better/suggested to declare all variables...  Forgot 
"lines" !
.
Nicer version:
| file lines  |

lines := OrderedCollection new.

file := StandardFileStream readOnlyFileNamed: 'day.1.input'.
[file atEnd] whileFalse: [lines add: file nextLine].
file close.





- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, December 2, 2018, 6:09:42 a.m. EST, Roelof Wobben 
 wrote:  
 
 Op 2-12-2018 om 11:55 schreef Benoit St-Jean via Pharo-users:

Nope, only the part how I can read the file.

Roelof


  --- End Message ---


Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
You can do solve the problem without the "lines" variable but, believe me, you 
want to keep those lines in a collection.  It's gonna be a lot easier down the 
road!
Hint (to solve the problem) : look at what "lines" contain (instances of which 
class).  That class has everything you need to parse those '+2' and '-8' ...  ;)

| file  |

lines := OrderedCollection new.

file := StandardFileStream readOnlyFileNamed: 'day.1.input'.
[file atEnd] whileFalse: [lines add: file nextLine].
file close.



- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, December 2, 2018, 6:09:42 a.m. EST, Roelof Wobben 
 wrote:  
 
 Op 2-12-2018 om 11:55 schreef Benoit St-Jean via Pharo-users:

Nope, only the part how I can read the file.

Roelof


  --- End Message ---


Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Do you want the solution for the first one to get you going?
The part2 of problem 1 is somewhat a little more complex but once you get the 
idea, the rest shouldn't be that hard!

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, December 2, 2018, 5:50:30 a.m. EST, Roelof Wobben 
 wrote:  
 
 Op 2-12-2018 om 11:43 schreef Benoit St-Jean via Pharo-users:


if you can learn me that.
Right now., the input is a method.

I think I can do the rest from there



  --- End Message ---


Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
You're giving yourself *A LOT* of trouble by not simply reading a file!  
Besides, you'll have the same problem for every problem, twice per problem!

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, December 2, 2018, 5:46:21 a.m. EST, Roelof Wobben 
 wrote:  
 
 Op 2-12-2018 om 11:15 schreef Hilaire:
> #(+1 -8) inject: 0 into: [:sum :each | each ~= #+ ifTrue: [sum +  each]
> ifFalse: [sum]] .

Thanks,

Now to stretch my mind I will try to make one with double-dispatch.

Roelof


  --- End Message ---


Re: [Pharo-users] How to take care that the + before a number is ignored

2018-12-02 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Roeloff,
Is this for the Advent of Code 2018?
The easiest way is to read the input file...  Then, I can guide you from there! 
 ;)

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, December 2, 2018, 4:49:06 a.m. EST, Roelof Wobben 
 wrote:  
 
 Hello,

I have a collection that looks like this :

sampleData1
     "comment stating purpose of message"

     ^ #( -8
     +7)

I want to add those numbers up but the code chokes at the +

so I did this :

FrequencyFinderData  new class sampleData1   inject: 0 into: [:sum :each 
| (each ~= $+) ifTrue: [sum +  each asInteger] ]

so when the each is not a +  it must count it but still the code chokes 
at the +

Where do I think wrong ?

Roelof


  --- End Message ---


Re: [Pharo-users] split on space or -

2018-11-24 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Nice!
Never realized we had that method in the image!

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Saturday, November 24, 2018, 4:08:09 p.m. EST, Nicolai Hess 
 wrote:  
 
 What have you tried so far?There is a split method in pharo, with examples :)

Am Sa., 24. Nov. 2018 um 21:49 Uhr schrieb Roelof Wobben :

Hello,

For a acronym maker challenge on exercism.io I have to make acronyms.
But I see I have to split the parts on space and when it's a word with a 
- then I have to split on that,

Any hint how I can do that ?

Roelof


  --- End Message ---


Re: [Pharo-users] split on space or -

2018-11-24 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
You need to add something like this in class String:


rejectForAcronymsWords: aCollectionOfUnwantedWords
"

'An example with an unwanted particle at the start of a sentence and also one 
in the middle'     rejectForAcronymsWords: #('a' 'an' 'the' 'in' 'of' 'at' 
'and')
    
"

^self asLowercase substrings reject: [ :word |  aCollectionOfUnwantedWords 
includes: word]



- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Saturday, November 24, 2018, 3:49:56 p.m. EST, Roelof Wobben 
 wrote:  
 
 Hello,

For a acronym maker challenge on exercism.io I have to make acronyms.
But I see I have to split the parts on space and when it's a word with a 
- then I have to split on that,

Any hint how I can do that ?

Roelof

  --- End Message ---


Re: [Pharo-users] Line Number...

2018-11-20 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
You probably need:
String>>#lineNumberCorrespondingToIndex:

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Tuesday, November 20, 2018, 9:17:34 p.m. EST, Arturo Zambrano 
 wrote:  
 
 Hi, given a text file and an offset, is there any class//message to obtain 
theline  number of that offset? I just don't want to reinvent the wheel :)
TIAarturo  --- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-22 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
>What I find sad is that people spent hours talking instead of doing.
>This is why Smalltalk is for them.
>Personally I prefer Pharo.

Well, I guess I don't belong here anymore since "Pharo is NOT Smalltalk" as you 
keep saying!  

And since I've been a Smalltalker for only 25+ years, I guess Smalltalk is 
really for me as you wrote!  Every Smalltalker is a moron as you so often imply 
(especially in private emails incidentally): only Pharoers "do it right"...  So 
I'll go back to that moronic programming language!

P.S.  I'll let you handle the questions in #pharo on IRC as I'll no longer be 
on the channel : you'll see, it'll be really instructive for you! People there 
have those weird practical problems, it's crazy!



- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-20 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
I concur with Sean's comments.  The problem is not using names : the problem is 
for new users.

A very quick look at what's in Pharo 7 shows the following names : Iceberg, 
Ombu, Calypso, Flashback, Nautilus, Renraku, Zodiac, Shift, Zinc, Hermes, 
Beacon, Cargo, Hermes, Opal, Shoreline, Epicea, Balloon, BlueInk, Commander, 
Fuel, Glamorous, Glamour, Gofer, Hiedra, Metacello, Moose, Ring, Rubric, Shout, 
Spec, etc...

How many Pharo *users* (not regular contributors!) know what those 
tools/frameworks/packages do ???  Make the test and tell us how many out of 30 
names you were able to identify correctly !

Unless we *clearly* publicize/describe what those names are, there's no way in 
a thousand years you could tell that BlueInk is not a package dealing with 
fonts (that was my first guess) !
Newcomers and (developers in general) expect a few things.  For instance, 
there's a gazillion UI frameworks out there and, most of the time, the name 
used for them is one of a famous painter.  VisualWorks had Chagall for 
instance. 

Or you'd expect some kind of hint from the name, e.g. XStreams, ScriptManager, 
RefactoringBrowser.

Or somethings as simple as Regex, the regex package from Bykov.  Or 
Announcements from the same guy.

Or names that reveals something from an etymology standpoint, e.g. TelePharo.

The simple fact that someone had to create a file to describe all those 
names/projects/framework on GitHub tells us a lot 
(https://github.com/AdamSadovsky/pharo-family/blob/master/catalog.txt) !

Unless we make it *EXTRA* clear and easily searchable and obvious what those 
names represent, it's just more confusion for the newcomer. 

Do you know what Celery is?  Probably not!  But if I ask you the same question 
for RabbitMQ, ActiveMQ, MQSeries, StormMQ, SnakeMQ, IronMQ, ZeroMQ, MQTT and 
MSMQ, you probably figured out it's related to message queues, right?  Well, 
Celery is also related to message queues...  See?

There's nothing worse or more confusing than a bad/weird/unrelated name.  For 
example, the biggest company in Canada is called "Canadian Tire".  If you think 
you're gonna end up in a place specialized in tires, you're off for a big 
surprise 

On the other end of the spectrum, you have something like iTunes.  Everybody 
knows iTunes.  And I guess, even if you didn't know, you can kinda easily guess 
it's related to music.  Your grandma might not exactly remember the name but 
she'll remember "Was it xTunes? zTunes? yTunes? It was something 'tunes', to 
music" !

And comparing other "names" with Pharo names makes no sense.  Nike, Hibernate, 
Jenkins, Docker and Oracle cannot be compared to Epicea, BlueInk, Flashback and 
Opal.  They just don't have the same visibility and public exposure.  That is 
hopefully a problem that will vanish as Pharo gets more and more attention and 
users and gets known more and more.  But in the meantime, those names merely 
help us differentiate implementations of solutions, for us the *regulars*.

Was it really that hard to replace the old workspace with Workspace2 or 
WhateverWorkspace ?  Or even better : get rid of the old Workspace and replace 
it with Playground while retaining the name "Workspace" ??? Did we really need 
to call it Playground and confuse every new Smalltalker out there that has seen 
the term "Workspace" for Dolphin, Smalltalk/X, VisualAge, VisualWorks, 
ObjectStudio, GNU Smalltalk, Amber, PharoJS, Smalltalk MT and every other 
Smalltalk around *EXCEPT* Pharo?

Why are we trying to complicate things when we could just make it 
soo simple?

Let's make it easy for **newcomers** to get their way around and know what the 
named tools/frameworks do.  Get rid of duplicate tools (do we need more than 
one kind of Inspector?  Do we need 2 compilers?  Do we need 8 Delay schedulers? 
 Do we need 2 system browsers? Do we need the duo Workspace/Playground) ?  Make 
these extra tools available somewhere it can be loaded from if a user *really* 
wants them in their image, but let's keep those OUT of the image!



- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Friday, April 20, 2018, 10:09:13 a.m. EDT, Sean P. DeNigris 
 wrote:  
 
 Stephane Ducasse-3 wrote
> I like when developers are talking about names:
> They use a mac and not a computer, they were nike, lewis and not shoes
> and pants
> So guys can we focus our energy on positive things.

IHMO this is certainly a positive subject because it highlights the
as-yet-to-be-resolved tension regarding understandability of the system
between having a unique name (good for googling, distinguishing between
versions) and a name that reveals what the project does/is for. What is the
plan to resolve this because it is a real problem?


[Pharo-users] UTF-8 encoding

2018-04-16 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Regarding the problems I have with my firstname and file paths and utf-8 
encoding, I found something weird in the UTF-8 encoding.  In fact, to be more 
precise, I found something strange when converting a String to a ByteArray 
(which UTF-8 encoders convert from)
If I look at the example in the comment of ByteArray>>utf8Decoded, 'Les élèves 
français' is encoded as: 

#[76 101 115 32 195 169 108 195 168 118 101 115 32 102 114 97 110 195 167 97 
105 115]

NOW, if I take that very same string, 'Les élèves français' , and convert it to 
a ByteArray, I get :
'Les élèves français' asByteArray printString.

#[76 101 115 32 233 108 232 118 101 115 32 102 114 97 110 231 97 105 115]

The 2 don't match!
By the way, this problem exists on Pharo 5.1, 6.1 and 7.1 (on Windows 10 )
Can anyone confirm/infirm on another platform to see if this is 
Windows-specific?


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Some random musings

2018-04-16 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
"Float randomBetween: -4.1 and: 2.5
would be the most descriptive and compliant to your signature ;-)"
I also prefer #randomBetween:and: .
"Going to the class side of Float makes sense because you create a new 
instance."

But I'm not so sure about putting this on the class side.
In fact, right now #atRandom is on the instance side and it's been that way 
since the beginning.  It would be akward to have one method of generating 
random numbers on the class side and all others on the instance side.  And 
moving everything on the class side would break tons of code and legacy code.  
Besides, random numbers have always been seen and/or dealt with as streams : 
the intent was to get "the next one" in the stream, not create "a new instance"



- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Some random musings

2018-04-16 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
"Any interest to introduce a method to produce random float numbers in an 
interval in Pharo ?"
Yes, that would definitely be useful   And it would not only be useful for 
Float but for all numbers.  Would save us from the usual "#truncated and +1" 
trick we always have to write!!


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Pharo Launcher

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
It would be nice if I could uninstall the previous version...  :(
https://pharo.fogbugz.com/f/cases/21705/Pharo-Launcher-cannot-uninstall-on-Windows-10
- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, April 15, 2018, 6:07:15 p.m. EDT, p...@highoctane.be 
<p...@highoctane.be> wrote:  
 
 Go to 
http://files.pharo.org/pharo-launcher/bleedingEdge/ 

Install using the MSI, the laucher should go into %APPDATA% and images/vms to 
%DOCUMENTS%/Pharo/...
This is the observed behavior of that new version.
Older versions worked differently on Windows 10.
Best,Phil
On Mon, Apr 16, 2018 at 12:02 AM, Benoit St-Jean via Pharo-users 
<pharo-users@lists.pharo.org> wrote:



-- Forwarded message --
From: Benoit St-Jean <bstj...@yahoo.com>
To: Ben Coman <b...@openinworld.com>
Cc: Any question about pharo is welcome <pharo-users@lists.pharo.org>, Esteban 
Lorenzano <esteba...@gmail.com>
Bcc: 
Date: Sun, 15 Apr 2018 22:02:35 + (UTC)
Subject: Re: Pharo Launcher
"What path did you install to?"

The installer put it in:
C:\Users\Benoît St-Jean\AppData\Local\ Programs\Pharo\ BCPharoLauncher>


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


  --- End Message ---


Re: [Pharo-users] Pharo Launcher

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Tried it, doesn't work.
Changing the .js file didn't change anything.  The problem occurs in the 
image...

Problem seems to be (in my case)
1) the accentuated "Î" which cannot be handled properly in a path FileReference 
(expecting UTF-8 encoding but the string is seen as a Latin-1
2) PlatformResolver>>launcherUserFilesLocation that defaults to my "Documents" 
folder, namely "C:\Users\Benoît St-Jean\Documents", hence the path string 
encoding problem





- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, April 15, 2018, 6:04:22 p.m. EDT, p...@highoctane.be 
<p...@highoctane.be> wrote:  
 
 Install the bleeding edge thing, it works for me on win 10. 
I also noticed that the launcher runs images with VMs that do have a weird 
management of cursors in the dark themes, it seems that there the masks are not 
used properly and so, the dark arrow has no white border making it impossible 
to see.It was not like that before, so I suspect a VM thing.
Phil
On Sun, Apr 15, 2018 at 9:00 PM, Hilaire <hila...@drgeo.eu> wrote:

Can you make a search for your PharoDebug.log, because I can see, at least on 
P7 and Linux, this file is not always located nearby the image but at the user 
root directory.

Hilaire


Le 15/04/2018 à 20:52, Benoit St-Jean via Pharo-users a écrit :

Downloaded it.  Installed it.  Started it.  Selected an image.  Bam.  The app 
vanished.

Also tried on a brand-new-and-fresh-Windows-10 -machine-with-nothing-previous 
ly-installed and same thing.

The app doesn't even show in the task manager.

And no error file was created.



-- 
Dr. Geo
http://drgeo.eu






  --- End Message ---


Re: [Pharo-users] Pharo Launcher

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
"What path did you install to?"

The installer put it in:
C:\Users\Benoît St-Jean\AppData\Local\Programs\Pharo\BCPharoLauncher>


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
"I don't understand what you mean.  There is a setting that *gives* you the 
opportunity to decide."
I have no clue, I've never been able to actually have PharoLauncher start & 
work!!!

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
"As a work around, in the PharoLauncher settings can you set the directories 
like C:\PharoLauncher\imagesC:\PharoLaucnher\vmsand report if that helps.  
"
Or even better, let the user decide!


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, April 15, 2018, 12:58:44 a.m. EDT, Ben Coman 
<b...@openinworld.com> wrote:  
 
 

On 13 April 2018 at 17:49, Benoit St-Jean via Pharo-users 
<pharo-users@lists.pharo.org> wrote:



-- Forwarded message --
From: Benoit St-Jean <bstj...@yahoo.com>
To: Esteban Lorenzano <esteba...@gmail.com>
Cc: Any question about pharo is welcome <pharo-users@lists.pharo.org>
Bcc: 
Date: Fri, 13 Apr 2018 09:49:15 + (UTC)
Subject: Re: [Pharo-users] Where do we go now ?
For those interested.
Created the issues 21686, 21693, 21695, 21696.
And more to come...


Thanks for those.  I don't much time right to devote, but managed to knock one 
off.And I learn't something new. I'd not known there was a setting for screen 
background.
The other ones seem related to a problem dealing with user home folders 
containing non-ascii characters.Currently this seems only to affect a small 
number of people, but is a show stopper for them,and the numbers will grow with 
our hoped for growing popularity.
As a work around, in the PharoLauncher settings can you set the directories 
like C:\PharoLauncher\imagesC:\PharoLaucnher\vmsand report if that helps.  
Note, I bumped into an issue changing that setting myself recently where it 
tries to migrate the existing images from the old to the new folder, causing a 
catch-22 when your tryingto do that to work around other problems.  To work 
around that, I had to scroll down the debug stack to find where the migration 
was iterating through the image folders,and short circuit that with "Return 
entered value" from the context menu.  Any valuewill do when the return value 
is not used. good luck.
@PharoLauncher maintainers, can the change in this setting be made to succeed 
even if the migration fails.(I need to run right now)
cheers -ben
  --- End Message ---


Re: [Pharo-users] Pharo Launcher

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
I looked for it : isn't there.


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, April 15, 2018, 3:01:30 p.m. EDT, Hilaire <hila...@drgeo.eu> 
wrote:  
 
 Can you make a search for your PharoDebug.log, because I can see, at 
least on P7 and Linux, this file is not always located nearby the image 
but at the user root directory.

Hilaire


Le 15/04/2018 à 20:52, Benoit St-Jean via Pharo-users a écrit :
> Downloaded it.  Installed it.  Started it.  Selected an image.  Bam.  
> The app vanished.
>
> Also tried on a 
> brand-new-and-fresh-Windows-10-machine-with-nothing-previously-installed 
> and same thing.
>
> The app doesn't even show in the task manager.
>
> And no error file was created.
>

-- 
Dr. Geo
http://drgeo.eu



  --- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
"I find NPM as obscure as Pharo, honestly, and VA Smalltalk is worse (wth does 
abt or sst stand for?).  Grunt, Gulp, etc., how do the names relate to what 
they do?  
"
iirc, Abt was for "Application Builder Toolkit", Cw was for "Common Widgets", 
"Cfs was for "Common File System", Sst was for "Server Smalltalk", etc.  There 
used to be a list of VAST prefixes on the IBM website but I couldn't find it...


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
"At some point we should force rule "All packages have comments". And 
indication with icon like we do for classes."
 +1

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
OS/2 ?  What???  Is it free/openSource?  Man!  Where can I get that!!!  Good 
memories


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Friday, April 13, 2018, 6:57:16 a.m. EDT,  wrote:  
 
 
Btw, in my fascination with messing around, the 32 bit version of Pharo 7 for 
Windows runs better on OS/2 v.5 (yes, it still exists, it was released last 
June).  Probably because its Win32 subsystem is more compatible with Win32 apps 
than Windows 10.

  

Andrew

  

From: Benoit St-Jean  
Sent: Friday, April 13, 2018 5:26 AM
To: Esteban Lorenzano 
Cc: Any question about pharo is welcome 
Subject: Re: [Pharo-users] Where do we go now ?

  

BTW, why put an .exe installer for Windows available when it crashes right from 
the start? It just doesn't work at all.  Period.  For everyone.

  

And I thought looking for senders of a method was something we mastered a long 
time ago, like starting with Smalltalk-76.  Am I supposed to assume that 
everything, even basic functionalities, are all broken because it's labeled 
"alpha" ?

  

  

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  

  

On Friday, April 13, 2018, 5:20:28 a.m. EDT, Esteban Lorenzano 
 wrote: 

  

  

  






On 13 Apr 2018, at 11:07, Benoit St-Jean  wrote:

  

I'm on Windows 10, using Pharo 7.0 alpha 32 bit.

  


  

and btw… which part of ALPHA you do not get?

  

Esteban
  --- End Message ---


[Pharo-users] Pharo Launcher

2018-04-15 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
"To be clear, the problem was heavily influenced by the constraints of an 
external tool.Get PharoLauncher installed in the right location and it works 
like a dream.Did you try the proof-of-concept installer I posted previously to 
the list... http://www.mediafire.com/file/3g579bmzqspt8e1/BCPharoLauncher.msi 
"
Downloaded it.  Installed it.  Started it.  Selected an image.  Bam.  The app 
vanished.
Also tried on a 
brand-new-and-fresh-Windows-10-machine-with-nothing-previously-installed and 
same thing.
The app doesn't even show in the task manager.
And no error file was created.

If that helps, both machines have Windows in French installed.

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
--- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-13 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
For those interested.
Created the issues 21686, 21693, 21695, 21696.
And more to come...



- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-13 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
BTW, why put an .exe installer for Windows available when it crashes right from 
the start? It just doesn't work at all.  Period.  For everyone.

And I thought looking for senders of a method was something we mastered a long 
time ago, like starting with Smalltalk-76.  Am I supposed to assume that 
everything, even basic functionalities, are all broken because it's labeled 
"alpha" ?


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Friday, April 13, 2018, 5:20:28 a.m. EDT, Esteban Lorenzano 
 wrote:  
 
 


On 13 Apr 2018, at 11:07, Benoit St-Jean  wrote:
I'm on Windows 10, using Pharo 7.0 alpha 32 bit.


and btw… which part of ALPHA you do not get?
Esteban  --- End Message ---


Re: [Pharo-users] Where do we go now ?

2018-04-13 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
"You cannot take an alpha version and expect production quality."
I'm on Windows 10, using Pharo 7.0 alpha 32 bit.

Can I at least expect to be able to save code in my local Monticello repository 
? It bombs. I just reported a bug!
Can I expect the Windows installer for Pharo Launcher to work on Windows?  It 
doesn't : it crashes.  

Can I expect Pharo Launcher (not installed from the .exe installer) to work on 
Windows?  It just doesn't. I get all kinds of error related to WindowsStore, 
bad UTF-8 encoding and other things... (see 
https://twitter.com/smalltalkdev/status/978973863332798464)
Can I expect that when looking for implementors of a method things still work?  
I get duplicates (see attached file).
Can I expect reading input from the console to work on Windows?  It doesn't.
Can I expect to be able to test my stuff on Windows?  That's kinda hard when 
Windows is always 6 months to 1 year behind VM-wise.
Can I expect to be able to contribute ?  That is kinda sad but all the cool 
scripts out there are .sh files.

I'm not whining about the effort people put into this project : I'm mostly 
whining about duplication of effort and code and *very poor* Windows support...
Just spend 2 weeks working with Pharo on Windows.  You can start with version 
5.1 if you want and let me know how it goes...  Brace yourself, I'm telling 
you, you're off for a wild & unpleasant ride.






- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


[Pharo-users] Where do we go now ?

2018-04-12 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Hello guys,

Just a quick word to get some things straight because, quite frankly, I really 
don't know where we're heading.

When Pharo started, the goal was to depart from Squeak and do a *major clean 
up* of all the code, especially Morphic.  The promise of a new, clean & lean 
Smalltalk attracted a lot of people.  And then...

I'm looking at the Pharo 7.0 image right now and I just don't get where we're 
heading.  Every Pharo release gets bigger, and bigger, and bigger.  I don't 
mind the environment getting bigger if it adds functionalities or new tools but 
that's not quite the case here. LOTS of stuff is just duplicated.

Do we really need 2 code completion classes (NECController, NOCController) ?  
Do we really need 2 system browsers (Nautilus, Calypso)? Do we really need 2 
compilers (OpalCompiler, Compiler) ?  Do we really need 8 delay schedulers 
(DelayMicrosecondScheduler, DelayMillisecondScheduler, DelayNullScheduler, 
DelayExperimentalSpinScheduler, DelaySpinScheduler, DelayTicklessScheduler, 
DelayExperimentalCourageousScheduler, DelayExperimentalSemaphoreScheduler) ?  
Do we really need 2 inspectors (GTInspector, EyeInspector) ?  Do we really need 
2 workspaces (GTPlayground, Workspace) ? Et cetera. Et cetera. Et cetera.  I 
could go on, and on, and on...

Pharo 5.1 had 5885 classes. Pharo 6.1 had 6481 classes. Pharo 7.0 alpha has 
7612 classes.  Can you see a trend?

Pharo 5.1 had 416 preference settings. Pharo 6.1 had 494 preference settings. 
Pharo 7.0 alpha has 662 preference settings.  Can you see a trend?

Pharo 5.1 had a 27.44 MB image. Pharo 6.1 had a 35.18 MB image. Pharo 7.0 alpha 
has a 47.97 MB image.  Can you see a trend?

Add to that the fact that Pharo is a nightmare when you want to port code.  
Just with the 7.0 release, 61 classes will be deprecated (and lots more to come 
if you search for the string "deprecated" into the code, most of the time 
hidden in the comments of the soon-to-be-deprecated-in-Pharo-8-I-guess classes).

You have code that deals with sockets, should you use the old Socket classes or 
convert everything to Zodiac? And why do we keep both "frameworks" in the image 
?  Pharo hasn't been backward compatible with "old socket classes" a looong 
time ago anyway!

You have code that deals with dependencies, should you use the old dependents 
mechanism or convert everything to announcements?

UI speaking, what framework should anyone use ?  Athens?  Something else?

You have code that deals with streams, should you use the old stream classes or 
convert everything to Zinc ? And why do we keep both "frameworks" in the image 
?  Pharo hasn't been backward compatible with the old stream classes a 
looong time ago anyway! 

So what's the plan?  For instance, should I keep using the Nautilus Browser or 
I should switch to the Calypso browser and get used to it because Nautilus will 
be deprecated?  Or should I just don't care because a third system browser will 
be added in Pharo 8 just because "it's cool, let's add this one too!" ?

Couldn't we just decide on what's "official" and what's a goodie or an external 
optional tool/package/framework the same way all other Smalltalks do?  If you 
say Calypso is the official & supported browser, fine!  Then just get Nautilus 
out of the image, create a nice loadable package for it and if someone prefers 
Nautilus, they'll just have to load it into the image, the same way VW has a 
gazillion optional tools/packages/frameworks you can load from a parcel!

Whenever I get asked a simple question by a newbie like "Oh, which system 
browser should I use?", quite frankly, I don't know what to answer.  Did we 
include Calypso to deprecate Nautilus later?  Is Calypso just a proof of 
concept?  Is it just an optional tool?  What about all those delay schedulers?  

"I loaded this code from SqueakSource and it just doesn't work".  Should I help 
the guy to fix it or just tell him to convert all the code to the corresponding 
framework in Pharo?

Perhaps a little bit of clarity and details about what's coming and what's the 
plan would be beneficial to a lot of us.

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] In P7 scrpt variable to tmp when in debugger

2018-04-12 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
What happens if you debug the script starting with a "self halt" ?  Are the 
variables there with their original name?  looks like decompiled code.  A 
problem with your .sources file?


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Thursday, April 12, 2018, 10:11:37 a.m. EDT, Hilaire  
wrote:  
 
 Hi,

When an executed script throws an error, in the debugger the script lost 
its variable names and the code is not exactly the same.

Any idea why?

See screenshot

Thanks

Hilaire

-- 
Dr. Geo
http://drgeo.eu

  --- End Message ---


Re: [Pharo-users] Bitwise operations in ByteArray (slicing, etc.)

2018-03-04 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Just put that in Integer.
bitsSliceFrom: start to: end
    "
    Extract bits 4 to 6, i.e. 111 which equals to 7
    2r1111000 bitsSliceFrom: 4 to: 6
    "
    | num mask  |

    self < 0 ifTrue: [self error: 'This operation is not allowed for negative 
numbers!'].
    num := self >> (start - 1).
    mask := (1 << ((end - start) + 1)) -  1.

    ^num bitAnd: mask.-bitsSliceInPlaceFrom: start 
to: end
    "
    Extract bits 4 to 6, IN PLACE, i.e. 111 which equals to 2r0111000 = 56
    2r1111000 bitsSliceInPlaceFrom: 4 to: 6
    "
    |  |

    ^(self bitsSliceFrom: start to: end) << (start - 
1)
This should do the job!  hth

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, March 4, 2018, 2:59:16 PM EST, Esteban A. Maringolo 
 wrote:  
 
 I do bitshifts and masks on Integer.

What if you want to take the bits from the 3rd to the 7th? You have to
do a some arithmetic to get the slice you want.
I'm simply asking for something more dev-friendlier that adds a
"layer" on top of that, but that internally does regular bitwise.

What I don't like about Integers is that you "lose" information about
the zero bits to the left, and with a ByteArray you don't, because the
array is fixed size.

E.g.
(1 << 16) printStringBase: 16. "'1'"
#[1 0 0] hex "'01'"

Maybe I'm too lazy asking when I could have done it myself :)

Regards,

Esteban A. Maringolo


2018-03-04 16:40 GMT-03:00 Sven Van Caekenberghe :
> Take a 24-bit number and you want to isolate the first 5 (these are actually 
> the last, higher order) bits.
>
> n := 2r10101000.
> n >> (16+3).
>
> If necessary, you can apply a mask (assume there are bits earlier/later 
> still).
>
> (n >> (16+3)) bitAnd: 2r1
>
> Large integers behave as bit strings, see the 'bit manipulation' protocol, 
> and are efficient at it.
>
>> On 4 Mar 2018, at 20:29, Esteban A. Maringolo  wrote:
>>
>> Is there any package/library that makes bitwise operations as simple
>> as with an Integer, but for larger numbers (as in a ByteArray).
>>
>> Something that allows me to "slice" a sequence of bits, or extract
>> some using the same protocol as with a String of ones and zeros.
>>
>> Now when I need to work with sequence of bits, I convert an Integer to
>> a zero padded version of it up a known size, and then do #copyFrom:to:
>> to extract what I need and read back the number from it.
>>
>> I could use a bytearray for it, but as its name implies, it is
>> oriented towards bytes rather than bits (as in the case of Integer).
>>
>> Now I do stuff like the following to to extract the first 5 bits of a
>> fixed length 256 bit array (an Integer).
>>
>> Integer
>>  readFrom:
>>    (((SHA256 hashMessage: message)) asInteger
>>      printStringBase: 2 length: 256 padded: true)
>>      copyFrom: 1 to: 5)
>>  base: 2
>>
>> I understand bitwise operations, but I couldn't find something that
>> does the above in a conciser way.
>>
>> Performance in my case isn't critical, but working with strings is
>> probably two orders of magnitude slower than manipulating bits in
>> integers or ByteArrays
>>
>> Regards,
>>
>> Esteban A. Maringolo
>>
>
>

  --- End Message ---


Re: [Pharo-users] Bitwise operations in ByteArray (slicing, etc.)

2018-03-04 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Hi Esteban,

When you say "extract", what exactly do you mean?

Let's suppose you have 86, i.e. 2r1010110 
Which case do you want?

a) 2r1010110 "2 to 5 = 2r10[1011]0 = 2r1011 = 11"

or

b) 2r1010110 "2 to 5 = 2r10[1011]0 = 2r00[1011]0 =  2r0010110 =  22"
Both cases can be dealt with bit shifting and a bitAnd with optimal performance.

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, March 4, 2018, 2:31:21 PM EST, Esteban A. Maringolo 
 wrote:  
 
 Is there any package/library that makes bitwise operations as simple
as with an Integer, but for larger numbers (as in a ByteArray).

Something that allows me to "slice" a sequence of bits, or extract
some using the same protocol as with a String of ones and zeros.

Now when I need to work with sequence of bits, I convert an Integer to
a zero padded version of it up a known size, and then do #copyFrom:to:
to extract what I need and read back the number from it.

I could use a bytearray for it, but as its name implies, it is
oriented towards bytes rather than bits (as in the case of Integer).

Now I do stuff like the following to to extract the first 5 bits of a
fixed length 256 bit array (an Integer).

Integer
  readFrom:
    (((SHA256 hashMessage: message)) asInteger
      printStringBase: 2 length: 256 padded: true)
      copyFrom: 1 to: 5)
  base: 2

I understand bitwise operations, but I couldn't find something that
does the above in a conciser way.

Performance in my case isn't critical, but working with strings is
probably two orders of magnitude slower than manipulating bits in
integers or ByteArrays

Regards,

Esteban A. Maringolo

  --- End Message ---


Re: [Pharo-users] [Pharo-dev] Looking for names for the booklet collection

2018-03-04 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Why not simply:

Pharo Tools & TechnologiesPharo Language & Environment
- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, March 4, 2018, 10:30:46 AM EST, Ben Coman  
wrote:  
 
 

On 4 March 2018 at 20:21, Stephane Ducasse  wrote:

Hi

I would like to make a distinction between booklet on Pharo
technologies (Smacc, Voyage, Scraping ...) and the booklets more
oriented towards teaching something with pharo (building an
interpreter, a reflective language...)


Pharo Applications / Inside Pharo 
Over Pharo / Under Pharo 

Right now we have The Pharo Booklet Collection.
And I'm looking for two names

the Pharo academic booklet collection ?
and
the Pharo technology booklet collection ?

Pharology / Pharocraft 

cheers -ben 
 
 


  --- End Message ---


Re: [Pharo-users] Ever growing image

2018-03-04 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Estaban,
I understand the difference between the 2 approaches my point was just to 
mention that I guess there are some advantages to shrink the image (as compared 
to bootstrapping from a minimal image) since all major vendors used that 
approach (and are still using it).  It's just that I was curious to know if 
anyone knows any paper/document/study comparing the 2 approaches or explaining 
in detail both of them.  I googled for a few hours but couldn't find anything...


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Sunday, March 4, 2018, 5:13:30 AM EST, Esteban Lorenzano 
<esteba...@gmail.com> wrote:  
 
 


On 3 Mar 2018, at 16:35, Benoit St-Jean via Pharo-users 
<pharo-users@lists.pharo.org> wrote:

From: Benoit St-Jean <bstj...@yahoo.com>
Subject: Re: [Pharo-users] Ever growing image
Date: 3 March 2018 at 16:35:19 CET
To: pharo-users@lists.pharo.org, Hilaire <hila...@drgeo.eu>
Reply-To: Benoit St-Jean <bstj...@yahoo.com>


On a side note, being a long-time VW & VAST user, I've always felt the Image 
Stripper & Runtime Packager did a fairly good job at removing crap from the 
resulting image.  
I don't recall ready anything substantial comparing the Pharo way 
(bootstrapping from a minimal image and adding stuff) to the VW & VAST way 
(removing unreferenced stuff) but this would definitely be an interesting topic 
to read about.



No idea if any “substantial" thing has been written (there are some phds around 
that may talk about), but main difference is very simple to explain: first 
approach (which was the same for Pharo before) is non-deterministic while the 
second is. Then, for purpose of repeatability of process (and testing, etc.) 
bootstrapping is better. You would not know the amount of effort made to make 
this possible, it required at least 2 phd works and a considerable amount of 
engineering effort.In our community, Pavel is the person that has the bigger 
experience on shrinking process images. I followed his work for years and I 
know the fragility of the process. Basically each new addition/removal was 
breaking it and needing dependency tracking, etc. Now is the opposite: you just 
add what you want, and you are sure the resulting image is a) healthy and b) 
identical when running.
Esteban


- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Saturday, March 3, 2018, 9:22:06 AM EST, Hilaire <hila...@drgeo.eu> 
wrote:  
 
 Le 02/03/2018 à 22:52, Marcus Denker a écrit :
>
> we should again do some analysis where space is going… the Pharo7 download
> is now 38MB (the image, decompressed).

Situation improved :) Remember P3 was just above 20 MB  



  --- End Message ---


Re: [Pharo-users] Ever growing image

2018-03-03 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
On a side note, being a long-time VW & VAST user, I've always felt the Image 
Stripper & Runtime Packager did a fairly good job at removing crap from the 
resulting image.  
I don't recall ready anything substantial comparing the Pharo way 
(bootstrapping from a minimal image and adding stuff) to the VW & VAST way 
(removing unreferenced stuff) but this would definitely be an interesting topic 
to read about.

- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein) 

On Saturday, March 3, 2018, 9:22:06 AM EST, Hilaire  
wrote:  
 
 Le 02/03/2018 à 22:52, Marcus Denker a écrit :
>
> we should again do some analysis where space is going… the Pharo7 download
> is now 38MB (the image, decompressed).

Situation improved :) Remember P3 was just above 20 MB  --- End Message ---


Re: [Pharo-users] How do you store and manage small programs?

2017-11-25 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Have a look at Script Manager.
http://catalog.pharo.org/catalog/project/ScriptManager
 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Andy Burnett 
 To: "pharo-users@lists.pharo.org"  
 Sent: Saturday, November 25, 2017 12:35 PM
 Subject: [Pharo-users] How do you store and manage small programs?
   
I have just created a couple of small playground scripts that do some useful 
data wrangling. The chances are that I will reuse them from time to time, but 
with tweaks. Does version 6 Have some way to store them? I think I am after a 
sort of scripts catalogue.

   

|  | Virus-free. www.avg.com  |

--- End Message ---


Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-21 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Oups!  Didn't see that one.  Yes!
 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Sean P. DeNigris 
 To: pharo-users@lists.pharo.org 
 Sent: Tuesday, November 21, 2017 9:14 PM
 Subject: Re: [Pharo-users] Timespan translateToUTC problematic
   
Pharo Smalltalk Users mailing list wrote
> #hasSameDayAs: - 

Wouldn't that be #isSameDayAs:?



-
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html


   --- End Message ---


Re: [Pharo-users] Timespan translateToUTC problematic

2017-11-21 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
#hasSameDayAs: - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Alistair Grant 
 To: Any question about pharo is welcome  
 Sent: Tuesday, November 21, 2017 12:07 PM
 Subject: Re: [Pharo-users] Timespan translateToUTC problematic
   
On 20 November 2017 at 09:16, Sven Van Caekenberghe  wrote:
>
> We can discuss about this ad infinitum. I think we all agree that
> there are 2 views (abstract calendar date and concrete time
> interval/span, which requires a TZ), as well as 2 possible ways to
> deal with the second case (TZ inside date or as context outside of the
> date).


Right, I think changing things now will be quite a bit of work.

However there are a couple of things we can do to make life a bit easier:

1. Add a method that facilitates TZ independent comparisons.
2. Add a bit more information in the class comments.


I've named the method #dmyEquals: below, although I don't particularly
like it.  If anyone has a better idea, please reply.

I've also added some proposed text for the class comments.

If I don't hear back in a couple of days I'll submit a PR (with
automated tests).


Cheers,
Alistair



dmyEquals: aDate
    "Perform a time zone independent comparison of the dates, i.e.
only compare day, month and year"

    ^self year = aDate year and: [
        self monthIndex = aDate monthIndex and:
        [ self dayOfMonth = aDate dayOfMonth ] ]


Class comment:

Instances of Date are Timespans with duration of 1 day.
Their default creation assumes a start of midnight in the local time zone.

!Comparing Dates

We tend to use dates in one of two modes:

- Time zone dependent
- Time zone independent

In the first instance, dates are only the same if they are in the same
time zone (otherwise they are two different 24 hour periods).  This is
the default behaviour of Date.

In the second, comparison is only interested in whether the day, month
and year are the same.

As an example, take someone's birthday.  If I want to know whether we
were born on the same day, I will want to compare dates without time
zones.  If I want to know if it is currently their birthday where they
are, I'll want to use time zones.


[[[language=smalltalk
| birthday1 birthday2 |

birthday1 := (DateAndTime fromString: '2018/01/01T00:00:00+10') asDate.
birthday2 := (DateAndTime fromString: '2018/01/01T00:00:00+01') asDate.

"Is it person 1's birthday now? (where they live: UTC+10)"
birthday1 includes: DateAndTime now.

"Do person 1 and person 2 have the same birthday?"
birthday1 dmyEquals: birthday2.
]]]



   --- End Message ---


Re: [Pharo-users] Help in thinking about how to save a "program"

2017-06-12 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Hi Glenn,
Another very useful tool you can use to save/manipulate/store Smalltalk scripts 
is ScriptManager (http://catalog.pharo.org/catalog/project/ScriptManager).  
There are plenty of similar tools but this one is very easy to use and simple 
and has been doing the job for years for me.

hth - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Glenn Hoetker 
 To: pharo-users@lists.pharo.org 
 Sent: Sunday, June 11, 2017 7:23 PM
 Subject: [Pharo-users] Help in thinking about how to save a "program"
   
Hi all.  I’m new to Pharo and loving it.  As I transition from a text-file 
based mindset, I’m a little stuck and would appreciate help in how to think 
about a situation in a Pharonic (Pharo-ish, Pharoc?) way.
I”m crafting a short program to help me process a large text file 
(specifically: extract, sorting, and regularizing the “keyword” fields of a 
large BibTex file). Especially since I don’t really know what I’m doing, 
working in a Playground has been a great development environment.  Now that the 
program is complete (under 30 lines, wonderful), I want to be able to save it 
for future reference (and perhaps for future use).  If I’d written a shell 
script, I’d just save “fixBibDeskKeyWords.sh” to a directory. I’m not sure what 
to do in the Pharo environment, thought.
At the moment, it just lives in the Playground I’ve developed it on.  I could 
save the image and leave that Playground open, but I’m just positive that’s not 
a best practice. I also worry about what happens if I closed/cleared that 
Playground by accident.
I think I understand that, if I created a new package, I could use Monticello 
to save it to a local cache and load it into a new image whenever I needed it.  
But, given that it’s short, highly specialized and fairly linear, the idea of 
creating a “GHBibDeskStuff” package with one class (“GBibDeskKeywordFixer” 
containing a single “FixFile” method seems really heavy and awkward.
Can one save the contents of a Playground in a Pharonic way?  Is there a better 
approach?
Thank you to all involved in this wonderful programming ecosystem. I appreciate 
any advice.
Glenn
Glenn Hoetkerghoetker@me.comhttp://hoetker.faculty.asu.edu




   --- End Message ---


Re: [Pharo-users] PostgreSQL and Pharo 6

2017-04-18 Thread Benoit St-Jean via Pharo-users
ntellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> 
>> >>> From: Dimitris Chloupis <kilon.al...@gmail.com>
>> >>> To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is
>> >>> welcome <pharo-users@lists.pharo.org>
>> >>> Sent: Monday, April 17, 2017 5:24 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Following the instructions here
>> >>>
>> >>> http://guillep.github.io/DBXTalk/garage/installation.html
>> >>>
>> >>> I did
>> >>>
>> >>> Gofer it
>> >>> smalltalkhubUser: 'DBXTalk' project: 'Garage';
>> >>> configurationOf: 'Garage';
>> >>> load.
>> >>>
>> >>>
>> >>> (ConfigurationOfGarage project version: '0.5')
>> >>> load: 'postgresV2'.
>> >>>
>> >>> And it did install
>> >>>
>> >>>
>> >>> On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <bstj...@yahoo.com>
>> >>> wrote:
>> >>>
>> >>> Tell me which exact package you loaded (or even better, the exact to
>> >>> load
>> >>> it) and I will test some code against my PostgreSQL server...
>> >>>
>> >>>
>> >>> -
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> 
>> >>> From: Dimitris Chloupis <kilon.al...@gmail.com>
>> >>> To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is
>> >>> welcome <pharo-users@lists.pharo.org>
>> >>> Sent: Monday, April 17, 2017 4:55 PM
>> >>>
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> no conn connect does not work because GAConnection has no such method.
>> >>> #connect exist in GAPostgresDrive but even if I go that route I get
>> >>> error
>> >>> #OptionAt:IfAbsent: was sent to nil . With this code
>> >>>
>> >>> conn2 := GAPostgresDriver new .
>> >>> conn2 host: 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> port: ''
>> >>> database:'***'
>> >>> user: '*'
>> >>> password:''***'.
>> >>> conn2 connect.
>> >>>
>> >>> Is there sample code that connects to online databases ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <bstj...@yahoo.com>
>> >>> wrote:
>> >>>
>> >>> You have to #connect before executing SQL statements!
>> >>>
>> >>> Something like (in your code):
>> >>>
>> >>> conn connect.
>> >>>
>> >>> -
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> 
>> >>> From: Dimitris Chloupis <kilon.al...@gmail.com>
>> >>> To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is
>> >>> welcome <pharo-users@lists.pharo.org>
>> >>> Sent: Monday, April 17, 2017 3:54 PM
>> >>> Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Installing from Catalog Browser fails
>> >>>
>> >>> I installed it via the the website instructions, it installs fine
>> >>>
>> >>> But if I use it this way
>> >>>
>> >>> conn := GAConnection new.
>> >>> ca := GAConnectionArgs hostname:
>> >>> 'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com'
>> >>> portno: ''
>> >>> databaseName:'***'
>> >>> userName: '*'
>> >>> password:''***'.
>> >>> conn connectionArgs: ca.
>> >>> conn execute: 'select * from search_terms'.
>> >>>
>> >>> it fails with no connection, is there anything else i need to do ?
>> >>> is there a guide for how to use this ?
>> >>>
>> >>>
>> >>>
>> >>> On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis
>> >>> <kilon.al...@gmail.com>
>> >>> wrote:
>> >>>
>> >>> thank you Benoit
>> >>>
>> >>> On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users
>> >>> <pharo-users@lists.pharo.org> wrote:
>> >>>
>> >>> ODBC worked fine as well if you don't need native driver access
>> >>>
>> >>> -
>> >>> Benoît St-Jean
>> >>> Yahoo! Messenger: bstjean
>> >>> Twitter: @BenLeChialeux
>> >>> Pinterest: benoitstjean
>> >>> Instagram: Chef_Benito
>> >>> IRC: lamneth
>> >>> Blogue: endormitoire.wordpress.com
>> >>> "A standpoint is an intellectual horizon of radius zero".  (A.
>> >>> Einstein)
>> >>>
>> >>>
>> >>> 
>> >>> From: Dimitris Chloupis <kilon.al...@gmail.com>
>> >>> To: Any question about pharo is welcome <pharo-users@lists.pharo.org>
>> >>> Sent: Sunday, April 16, 2017 4:37 AM
>> >>> Subject: [Pharo-users] PostgreSQL and Pharo 6
>> >>>
>> >>> Hey guys , I play with PostgreSQL and I really like it, sorry Esteban
>> >>> :D
>> >>>
>> >>> I am using Python for it but I would like to give access also to Pharo
>> >>> to
>> >>> my database. I was informed that Garage has a driver for PostgreSQL ,
>> >>> is
>> >>> there any other candidate ? Any advice ?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >
>>
>




   --- End Message ---


Re: [Pharo-users] PostgreSQL and Pharo 6

2017-04-17 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Try this:
| sql conn connectionSpec result  |
sql := 'SELECT * FROM search_terms'.
conn := GAConnection new.
connectionSpec := GAConnectionArgs
                            hostname: 'localhost'
                            portno: 5432
                            databaseName: 'sodbxtest'
                            userName: 'sodbxtest'
                            password: 'sodbxtest'.
conn connectionArgs: connectionSpec.

"Connect to the server"
result := conn startup. 
(result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ].

"Execute your SQL stuff"
result := conn execute: sql.
(result errorResponse isKindOf: GAErrorResponse) ifTrue: [ self halt ] ifFalse: 
[result inspect].

"Disconnect from the server"
conn close. 

 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis <kilon.al...@gmail.com>
 To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is welcome 
<pharo-users@lists.pharo.org> 
 Sent: Monday, April 17, 2017 5:24 PM
 Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
   
Following the instructions here 

http://guillep.github.io/DBXTalk/garage/installation.html

I did 

Gofer it
 smalltalkhubUser: 'DBXTalk' project: 'Garage';
 configurationOf: 'Garage';
 load.


(ConfigurationOfGarage project version: '0.5')
 load: 'postgresV2'.

And it did install 


On Tue, 18 Apr 2017 at 00:02, Benoit St-Jean <bstj...@yahoo.com> wrote:

Tell me which exact package you loaded (or even better, the exact to load it) 
and I will test some code against my PostgreSQL server...
 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis <kilon.al...@gmail.com>
 To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is welcome 
<pharo-users@lists.pharo.org> 
 Sent: Monday, April 17, 2017 4:55 PM
 Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
  
no conn connect does not work because GAConnection has no such method. #connect 
exist in GAPostgresDrive but even if I go that route I get error 
#OptionAt:IfAbsent: was sent to nil . With this code
conn2 := GAPostgresDriver new .conn2 host: 
'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com' port: 
''database:'***'  user: '*'  password:''***'.conn2 connect.
Is there sample code that connects to online databases ?


On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <bstj...@yahoo.com> wrote:

You have to #connect before executing SQL statements!
Something like (in your code):
conn connect. - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis <kilon.al...@gmail.com>
 To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is welcome 
<pharo-users@lists.pharo.org> 
 Sent: Monday, April 17, 2017 3:54 PM
 Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
   
Installing from Catalog Browser fails
I installed it via the the website instructions, it installs fine
But if I use it this way 
conn := GAConnection new.
ca := GAConnectionArgs hostname: 
'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com' portno: 
''databaseName:'***'  userName: '*'  password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?is there a 
guide for how to use this ? 


On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <kilon.al...@gmail.com> wrote:

thank you Benoit 
On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users 
<pharo-users@lists.pharo.org> wrote:

ODBC worked fine as well if you don't need native driver access 
- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis <kilon.al...@gmail.com>
 To: Any question about pharo is welcome <pharo-users@lists.pharo.org> 
 Sent: Sunday, April 16, 2017 4:37 AM
 Subject: [Pharo-users] PostgreSQL and Pharo 6
  
Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D
I am using Python for it but I would like to give access also to Pharo to my 
database. I was informed that Garage has a driver for PostgreSQL , is there any 
other candidate ? Any advice ? 

 



 


 


   --- End Message ---


Re: [Pharo-users] PostgreSQL and Pharo 6

2017-04-17 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Tell me which exact package you loaded (or even better, the exact to load it) 
and I will test some code against my PostgreSQL server...
 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis <kilon.al...@gmail.com>
 To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is welcome 
<pharo-users@lists.pharo.org> 
 Sent: Monday, April 17, 2017 4:55 PM
 Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
   
no conn connect does not work because GAConnection has no such method. #connect 
exist in GAPostgresDrive but even if I go that route I get error 
#OptionAt:IfAbsent: was sent to nil . With this code
conn2 := GAPostgresDriver new .conn2 host: 
'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com' port: 
''database:'***'  user: '*'  password:''***'.conn2 connect.
Is there sample code that connects to online databases ?


On Mon, Apr 17, 2017 at 11:18 PM Benoit St-Jean <bstj...@yahoo.com> wrote:

You have to #connect before executing SQL statements!
Something like (in your code):
conn connect. - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis <kilon.al...@gmail.com>
 To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is welcome 
<pharo-users@lists.pharo.org> 
 Sent: Monday, April 17, 2017 3:54 PM
 Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
   
Installing from Catalog Browser fails
I installed it via the the website instructions, it installs fine
But if I use it this way 
conn := GAConnection new.
ca := GAConnectionArgs hostname: 
'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com' portno: 
''databaseName:'***'  userName: '*'  password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?is there a 
guide for how to use this ? 


On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <kilon.al...@gmail.com> wrote:

thank you Benoit 
On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users 
<pharo-users@lists.pharo.org> wrote:

ODBC worked fine as well if you don't need native driver access 
- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis <kilon.al...@gmail.com>
 To: Any question about pharo is welcome <pharo-users@lists.pharo.org> 
 Sent: Sunday, April 16, 2017 4:37 AM
 Subject: [Pharo-users] PostgreSQL and Pharo 6
  
Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D
I am using Python for it but I would like to give access also to Pharo to my 
database. I was informed that Garage has a driver for PostgreSQL , is there any 
other candidate ? Any advice ? 

 



 


   --- End Message ---


Re: [Pharo-users] PostgreSQL and Pharo 6

2017-04-17 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
You have to #connect before executing SQL statements!
Something like (in your code):
conn connect. - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis <kilon.al...@gmail.com>
 To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is welcome 
<pharo-users@lists.pharo.org> 
 Sent: Monday, April 17, 2017 3:54 PM
 Subject: Re: [Pharo-users] PostgreSQL and Pharo 6
   
Installing from Catalog Browser fails
I installed it via the the website instructions, it installs fine
But if I use it this way 
conn := GAConnection new.
ca := GAConnectionArgs hostname: 
'ec2-**-***-***-185.eu-west-1.compute.amazonaws.com' portno: 
''databaseName:'***'  userName: '*'  password:''***'.
conn connectionArgs: ca.
conn execute: 'select * from search_terms'.

it fails with no connection, is there anything else i need to do ?is there a 
guide for how to use this ? 


On Mon, Apr 17, 2017 at 7:30 PM Dimitris Chloupis <kilon.al...@gmail.com> wrote:

thank you Benoit 
On Mon, Apr 17, 2017 at 4:23 AM Benoit St-Jean via Pharo-users 
<pharo-users@lists.pharo.org> wrote:

ODBC worked fine as well if you don't need native driver access 
- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis <kilon.al...@gmail.com>
 To: Any question about pharo is welcome <pharo-users@lists.pharo.org> 
 Sent: Sunday, April 16, 2017 4:37 AM
 Subject: [Pharo-users] PostgreSQL and Pharo 6
  
Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D
I am using Python for it but I would like to give access also to Pharo to my 
database. I was informed that Garage has a driver for PostgreSQL , is there any 
other candidate ? Any advice ? 

 



   --- End Message ---


Re: [Pharo-users] PostgreSQL and Pharo 6

2017-04-16 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
ODBC worked fine as well if you don't need native driver access 
- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Dimitris Chloupis 
 To: Any question about pharo is welcome  
 Sent: Sunday, April 16, 2017 4:37 AM
 Subject: [Pharo-users] PostgreSQL and Pharo 6
   
Hey guys , I play with PostgreSQL and I really like it, sorry Esteban :D
I am using Python for it but I would like to give access also to Pharo to my 
database. I was informed that Garage has a driver for PostgreSQL , is there any 
other candidate ? Any advice ? 

   --- End Message ---


Re: [Pharo-users] Pharo 5 ODBC

2017-03-20 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Can you give the URL of what exactly you loaded?  There's a bunch of ODBC 
packages/versions out there so I'd need more details.  I've used ODBC on Pharo 
5 before without any problem.  Besides, what OS and database are you using?
 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Glenn Swanlund 
 To: pharo-users@lists.pharo.org 
 Sent: Monday, March 20, 2017 3:50 PM
 Subject: [Pharo-users] Pharo 5 ODBC
   
Does Pharo 5 support ODBC? I loaded the UDBC package and can't see how to make 
an ODBC connection. There is a class UDBCODBCConnection but it is empty. Any 
pointers?
Regards,Glenn

   --- End Message ---


Re: [Pharo-users] [Pharo-dev] What is the craziest bug you ever face

2017-03-13 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
My worst bug(s) is(are) related to the TopLink ORM.
In one particular case, we were working on a *huge* system and different 
"modules" were assigned to different teams.  Every module was working perfectly 
by itself (as confirmed by the SUnit testing) but sometimes, the database would 
get out of whack.
I finally realized that depending on the classes you used to perform object 
deletion (we had a parent-children-familymembers kinda model), none of the 
"modules" did it the same way and they all differed when it came to access the 
to-be-deleted object.  Most classes accessed the same "kind" of object from a 
single access point but not all of them!  That did create interesting problems 
where the to-be-deleted object reappeared in the database with old values, or 
just vanished during some operation only to reappear afterwards...  Besides, 
debugging proxies and cached objects is a real pain in the *ss !  And in many 
cases, you can't ever log properly anything as it would instantiate the 
proxies!  So I ended up not trusting the Smalltalk side of things and worked my 
way out from DB/2 logging only!    - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)





   --- End Message ---


[Pharo-users] Socket, network, testing and coding

2017-02-28 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Hi guys,

Quick question regarding sockets and testing.

I'm trying to implement a simple communication protocol to exchange data 
(strings) between 2 images and I was wondering what was the easiest way to 
test/develop my code?  I want to be able to do something similar to a chat 
client between 2 images where none of those 2 images acts as a server.  So data 
can originate from any of those 2 images and both images have to "listen" to 
each other.  Besides, both images would have to transmit/receive on the same 
port.

1) Is this possible (the way I want to do/test it)?
2) How do I simulate something like this on a *single* machine running those 2 
images?
3) Do I need to have one of those 2 images act as a "server" ?
4) Any helpful tip and/or interesting link to propose?
5) Can you think of any simple code or example I could look at to understand 
what I need to do?  - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] About asSymbol message , some questions in my mind

2017-02-10 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
It can be useful if you want to save some space in some very specific cases.  
You could have a one million strings 'hello' (hence one million objects) or 
deal transform them into symbols and have only one #hello.  I recall a coworker 
telling me about this ultra-fast string search program in Gemstone where they 
transformed a gazillion duplicate strings into symbols thus using wy 
less memory and speeding up the lookup.
 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: lb 
 To: "pharo-users@lists.pharo.org"  
 Sent: Friday, February 10, 2017 11:59 PM
 Subject: [Pharo-users] About asSymbol message , some questions in my mind
   
Hi, I know Symbol is subclass of String.Any string object can become 
symbol object by sending 'asSymbol' message..I think  symbol must has its 
meaning in comon use, so the symbol should be composed of alphabet or number 
‘without space“.
BUT There are not compliant below1.    ' ' asSymbol     no 
meaning2.  '$%%&' asSymbol     no meaning3.  'sign' asSymbol = 'sign ' 
asSymbol   >>>  false because of space.3. '  one two  three ' asSymbol  
>>>I think It should become three symbols = #one, #two, #three

Maybe my understanding is wrong.
Bing Liang



   --- End Message ---


[Pharo-users] Pharo Spur 64 VM

2017-02-06 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Is this normal, I could not find the Spur 64bit VM for Windows on the Pharo 
file server? It is available for Mac & Linux but there's no file in the "win" 
directory. tia--- End Message ---


Re: [Pharo-users] DatePrinter

2016-11-04 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
I'm a bit late to comment but just remember that in French month and day names 
never use a capital letter !

 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: stepharo 
 To: pharo-users@lists.pharo.org 
 Sent: Friday, October 28, 2016 4:44 AM
 Subject: Re: [Pharo-users] DatePrinter
   
>> French is already in and there are so great class comments that I'm crying 
>> because of outshined by beauty.
> Please, don't cry ;-)
>
>> Excellent job of sven as usual.
> Thx.
>
> The ZTimestamp package also contains ZTimestampFormat (a by-example printer & 
> parser),

I love it :)
I threw away all my code :).
When I will have something running I will review the Date changes I did 
and ask fro review to push them in Date and Friends.

>  support for timezone aware conversions (to/from internal UTC) and NTP server 
>time checking (contacting an external time service).
>
>> french
>>      self monthNames: #(
>>          'Janvier' 'Février' 'Mars' 'Avril' 'Mai' 'Juin'
>>          'Juillet' 'Août' 'Septembre' 'Octobre' 'Novembre' 'Décembre' ).
>>      self weekdayNames: #(
>>          'Dimanche' 'Lundi' 'Mardi' 'Mecredi' 'Jeudi' 'Vendredi' 'Samedi' )
>>
>>
>>
>> Stef
>>
>> Le 27/10/16 à 14:27, Denis Kudriashov a écrit :
>>> 2016-10-27 14:22 GMT+02:00 stepharo :
>>> (ZTimestampFormat fromString: 'SAT, FEB 03 2001 (16:05:06)')
>>>          french
>>>
>>> #french is your addition? or it was already supported?
>
>




   --- End Message ---


Re: [Pharo-users] How does Boolean ifTrue work?

2016-11-04 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
I guess you can circumvent the inlining by using perform (and selecting the 
code with "debug it" from the menu) as in:
true perform: #ifTrue: with: [ 3 inspect ]
 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Nicolas Passerini 
 To: Any question about pharo is welcome  
 Sent: Monday, October 31, 2016 9:32 AM
 Subject: Re: [Pharo-users] How does Boolean ifTrue work?
   
Well, in fact Boolean class has no instances, the boolean value true is an 
instance of True class, you should look at the ifTrue: methods in the 
subclasses of Boolean True and False. 
But also, ifTrue: expressions are inlined, as the comment says in the code you 
posted. So I think that all this ifTrue: methods are never actually executed.
2016-10-31 14:17 GMT+01:00 CodeDmitry :

I am looking at

ifTrue: alternativeBlock
        "If the receiver is false (i.e., the condition is false), then the 
value is
the
        false alternative, which is nil. Otherwise answer the result of 
evaluating
        the argument, alternativeBlock. Create an error notification if the
        receiver is nonBoolean. Execution does not actually reach here because
        the expression is compiled in-line."

        self subclassResponsibility

In order to perform the block, ifTrue must somehow end up evaluating the
block, but this code only sends a subclassResponsibility message to itself
and implicitly returns itself.

Where does the block actually get evaluated?




--
View this message in context: http://forum.world.st/How- 
does-Boolean-ifTrue-work- tp4920873.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





   --- End Message ---


Re: [Pharo-users] Glorp

2016-09-30 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
I typically use MySQL but since I'm into databases a lot, I'll probably play 
with PostgreSQL, DB2, Oracle, SQLite and SQL Server as well...  I guess this 
port of Glorp also allows for an ODBC accessor or it only supports native 
connectors?
If that helps, I'm on Windows 10
 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Renaud de Villemeur <renaud.devillem...@free.fr>
 To: Benoit St-Jean <bstj...@yahoo.com>; Any question about pharo is welcome 
<pharo-users@lists.pharo.org> 
 Sent: Friday, September 30, 2016 9:50 PM
 Subject: Re: [Pharo-users] Glorp
   
Hi.
This documentation should give you the first 
hint:https://ci.inria.fr/pharo-contribution/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/book-result/Glorp/Glorp.html

It's still a work in progress, but the install part is accurate.  Do you plan 
to use it with Sqlite, or with MySql/postgreSQL
Renaud

2016-09-30 21:23 GMT-04:00 Benoit St-Jean via Pharo-users 
<pharo-users@lists.pharo.org>:



-- Message transféré --
From: Benoit St-Jean <bstj...@yahoo.com>
To: "pharo-users@lists.pharo.org" <pharo-users@lists.pharo.org>
Cc: 
Date: Sat, 1 Oct 2016 01:21:57 + (UTC)
Subject: Glorp
Hello Pharoers,
I want to use Glorp and I am puzzled as to what to install.
I have found a few Glorp related package and I really don't know which one to 
use nor which one is current.  Besides, those packages are spread across 
different websites.

So, which one should I use? And from where?
My current Pharo 5.0 images has the following in the Pharo Project Catalog :

Glorp? GlorpDBX? Garage?
On a different note, if anyone's interested, I'd be more than happy to 
test/fix/participate/develop for Glorp.  I have had the chance (ahem!?!?!?) to 
develop with TOPLink (Glorp's ancestor) for quite a while so Glorp is somewhat 
familiar to me.  In that case, where's the current effort/version to develop 
Glorp for Pharo and which Pharo version is the preferred one for 
development/tests ?

tia - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)




   --- End Message ---


[Pharo-users] Glorp

2016-09-30 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Hello Pharoers,
I want to use Glorp and I am puzzled as to what to install.
I have found a few Glorp related package and I really don't know which one to 
use nor which one is current.  Besides, those packages are spread across 
different websites.

So, which one should I use? And from where?
My current Pharo 5.0 images has the following in the Pharo Project Catalog :

Glorp? GlorpDBX? Garage?
On a different note, if anyone's interested, I'd be more than happy to 
test/fix/participate/develop for Glorp.  I have had the chance (ahem!?!?!?) to 
develop with TOPLink (Glorp's ancestor) for quite a while so Glorp is somewhat 
familiar to me.  In that case, where's the current effort/version to develop 
Glorp for Pharo and which Pharo version is the preferred one for 
development/tests ?

tia - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)--- End Message ---


Re: [Pharo-users] Converting a string containing dots to integer

2015-04-04 Thread Benoit St-Jean via Pharo-users
---BeginMessage---
Do you have more details?
Such as, do you have values  with more than one dot ?  (e.g. 1.436.782)Do you 
have values with no dot? -
Benoit St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
IRC: lamneth

Blogue: endormitoire.wordpress.com

A standpoint is an intellectual horizon of radius zero.  (A. Einstein)
  From: Offray Vladimir Luna Cárdenas off...@riseup.net
 To: Any question about pharo is welcome pharo-users@lists.pharo.org 
 Sent: Saturday, April 4, 2015 7:17 PM
 Subject: [Pharo-users] Converting a string containing dots to integer
   
Hi all,

I'm parsing some text which contains numbers like 8.324 and I would 
like to convert it to integer. The problem is that asNumber and 
asInteger don't make the trick because of the dot (.), which is there 
to indicate thousands, not decimal values. Which is the proper message 
to send?

Cheers,

Offray



  ---End Message---


Re: [Pharo-users] Converting a string containing dots to integer

2015-04-04 Thread Benoit St-Jean via Pharo-users
---BeginMessage---
This might do the trick:
(Number readFrom: ('8.524.757' copyReplaceAll: '.' with: '')) asIntegeror even 
nicer (and simpler)
('8.524.757' reject: [:char | char == $.]) asInteger
 -
Benoit St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
IRC: lamneth
Blogue: endormitoire.wordpress.com
A standpoint is an intellectual horizon of radius zero.  (A. Einstein)
  From: Offray Vladimir Luna Cárdenas off...@riseup.net
 To: Any question about pharo is welcome pharo-users@lists.pharo.org 
 Sent: Saturday, April 4, 2015 7:17 PM
 Subject: [Pharo-users] Converting a string containing dots to integer
   
Hi all,

I'm parsing some text which contains numbers like 8.324 and I would 
like to convert it to integer. The problem is that asNumber and 
asInteger don't make the trick because of the dot (.), which is there 
to indicate thousands, not decimal values. Which is the proper message 
to send?

Cheers,

Offray



  ---End Message---