Re: [Pharo-users] Pillar for 30 gone the way of the dodo on the CI

2015-10-03 Thread stepharo



well… I’m with Marcus here: the real problem is that we shouldn’t use the CI as 
a repository for download images.
Yes I understand but now I have to edit my scripts and find what it not 
working.



Instead, I would keep them in a public file server (pretty much the same we do 
with Pharo, we do not keep all builds (or versions) in the CI, but all history 
is available at files.pharo.org.
And we cannot keep this indefinitely because of many reasons (and the fact that 
INRIA servers are not infinite is one important).

So, maybe we should make community available some files.pharo.org/contribution 
where jobs can upload the built versions (not the full history, but at least 
stable and development versions?


would be nice.


that way people can still  find their versions and we can reduce a bit the 
weight of pharo-contribution?

cheers,
Esteban


On 03 Oct 2015, at 09:15, stepharo  wrote:



We removed the Pillar job for Pharo 3 because we introduced an new
feature not backward compatible.

Why is that a reason to remove the build? You have a configuration,
don't you?

I would suggest: move to a separate job that is run much less often
and doesn't keep so many old artifacts. That makes it easier to get old stuff 
running again.

+ 1











Re: [Pharo-users] NeoCSV and special handling for some columns

2015-10-03 Thread stepharo

Do you commit the new section?
Because I'm full.

Le 3/10/15 09:39, Sven Van Caekenberghe a écrit :

Yes, there are a couple of newer features that were added after the 
documentation was written. Keeping documentation up to date is also a PITA.


On 03 Oct 2015, at 08:54, stepharo  wrote:

sven do you think that we should add this to the chapter?


Le 28/9/15 16:42, Sven Van Caekenberghe a écrit :

On 28 Sep 2015, at 15:04, Mariano Martinez Peck  wrote:

Imagine something like this:

neoCSVReader := (NeoCSVReader on: stream).
neoCSVReader
separator: $,;
recordClass: PriceRecord;
addIgnoredField; ""
addField:  #securityUniqueId: ; ""  
addField: #date: converter: [ :string | Date readFrom: string readStream 
pattern: 'mmdd' ]; ""
addFloatField: #open: ; ""
addFloatField: #high: ; ""
addFloatField: #low: ; ""
addFloatField: #close: ; ""
addIntegerField: #volume: . ""
neoCSVReaderskipHeader.
priceRecords := neoCSVReader upToEnd.


The #recordClass: is optional. If not, you can get an array of arrays instead.
You can add #addIgnoredField for all the ones you want to ignore, then add the 
#addNumber: etc for the number ones, etc.

Correct.


To write a default empty value, I would use my own converter. Something like:

addField: #stringcolumn: converter: [ :string | string isEmptyOrNil ifTrue: [ 
'' ]  ];
addField: #numbercolumn: converter: [ :string | string isEmptyOrNil ifTrue: [ 0 
] ifFalse: [ NeoNumberParser parse: string ]  ];

Actually there is NeoCSVReader>>#emptyFieldValue: which you can use the 
configure the reader (but it counts for all fields).


Hope this helps.

Cheers,



On Mon, Sep 28, 2015 at 9:06 AM, Nicolai Hess  wrote:
Hi,

I have two problems I could not solve:

1. I would like to read only some columns: I have a large file with
 ~30 colums, but I am only interested on ~5 columns
 (not that important, I could pre-process the file) but anyway it would be
 nice to do it in smalltalk.

2. some columns will contain only strings (quoted values) and some only numbers,
 but the field may be empty, is it possible to define the default 
"emptyValue" as an
 - empty string for empty fields in the "string column"
 - 0 for empty fields in the "number column"?


thanks
  in advance

nicolai



--
Mariano
http://marianopeck.wordpress.com












Re: [Pharo-users] Pillar for 30 gone the way of the dodo on the CI

2015-10-03 Thread Esteban Lorenzano
well… I’m with Marcus here: the real problem is that we shouldn’t use the CI as 
a repository for download images. 
Instead, I would keep them in a public file server (pretty much the same we do 
with Pharo, we do not keep all builds (or versions) in the CI, but all history 
is available at files.pharo.org. 
And we cannot keep this indefinitely because of many reasons (and the fact that 
INRIA servers are not infinite is one important).

So, maybe we should make community available some files.pharo.org/contribution 
where jobs can upload the built versions (not the full history, but at least 
stable and development versions?
that way people can still  find their versions and we can reduce a bit the 
weight of pharo-contribution?

cheers, 
Esteban

> On 03 Oct 2015, at 09:15, stepharo  wrote:
> 
> 
 We removed the Pillar job for Pharo 3 because we introduced an new
 feature not backward compatible.
>>> 
>>> Why is that a reason to remove the build? You have a configuration,
>>> don't you?
>> 
>> I would suggest: move to a separate job that is run much less often
>> and doesn't keep so many old artifacts. That makes it easier to get old 
>> stuff running again.
> 
> + 1
> 
> 
> 




Re: [Pharo-users] Morph: event handler on wrong morph/submorph

2015-10-03 Thread Federico.Balaguer
Yes!
On Oct 3, 2015 3:57 AM, "stepharo [via Smalltalk]" <
ml-node+s1294792n4853384...@n4.nabble.com> wrote:

> Hi federico
>
> could you
>  - show it to damien when he will come to Laplata?
>  - could you produce a small video because I would like to share it
> with other teachers?
>
> Stef
>
> Le 28/9/15 18:59, Federico.Balaguer a écrit :
>
> > Hello,
> >
> > I found a problem with BotArena
> > (http://smalltalkhub.com/#!/~FedericoBalaguer/BotArena) on Pharo 4.
> >
> > BotArena is an interactive robot simulation environment that we use in
> my
> > university to teach OOP basics. BotArena was developed as an
> instantiation
> > of BOSS (http://smalltalkhub.com/#!/~CAR/BOSS/).
> >
> > BotArena (as well as BOSS) has a window (Morph) that has three buttons
> and a
> > grid view that is subclass of BorderedMorph. The GridView can handle
> > RedButtons, a click on the grid adds a new robot to the simulation.
> >
> > The problem that raised on Pharo4 is that, after a RedButton event, any
> > event (focus to another pharo window or clicking on one of the buttons
> of
> > BotArena) will be handled by the GridView.
> >
> > It seems like the GridView retains the focus after the (first) RedButton
> > event was handled.
> >
> > Could someone help me to sort this one out?
> >
> > Thanks! Federico
> >
> >
> >
> > --
> > View this message in context:
> http://forum.world.st/Morph-event-handler-on-wrong-morph-submorph-tp4852370.html
> > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> >
> >
>
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://forum.world.st/Morph-event-handler-on-wrong-morph-submorph-tp4852370p4853384.html
> To unsubscribe from Morph: event handler on wrong morph/submorph, click
> here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://forum.world.st/Morph-event-handler-on-wrong-morph-submorph-tp4852370p4853410.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Morph: event handler on wrong morph/submorph

2015-10-03 Thread stepharo

Hi federico

could you
- show it to damien when he will come to Laplata?
- could you produce a small video because I would like to share it 
with other teachers?


Stef

Le 28/9/15 18:59, Federico.Balaguer a écrit :

Hello,

I found a problem with BotArena
(http://smalltalkhub.com/#!/~FedericoBalaguer/BotArena) on Pharo 4.

BotArena is an interactive robot simulation environment that we use in my
university to teach OOP basics. BotArena was developed as an instantiation
of BOSS (http://smalltalkhub.com/#!/~CAR/BOSS/).

BotArena (as well as BOSS) has a window (Morph) that has three buttons and a
grid view that is subclass of BorderedMorph. The GridView can handle
RedButtons, a click on the grid adds a new robot to the simulation.

The problem that raised on Pharo4 is that, after a RedButton event, any
event (focus to another pharo window or clicking on one of the buttons of
BotArena) will be handled by the GridView.

It seems like the GridView retains the focus after the (first) RedButton
event was handled.

Could someone help me to sort this one out?

Thanks! Federico



--
View this message in context: 
http://forum.world.st/Morph-event-handler-on-wrong-morph-submorph-tp4852370.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.







Re: [Pharo-users] NeoCSV and special handling for some columns

2015-10-03 Thread stepharo

sven do you think that we should add this to the chapter?


Le 28/9/15 16:42, Sven Van Caekenberghe a écrit :

On 28 Sep 2015, at 15:04, Mariano Martinez Peck  wrote:

Imagine something like this:

neoCSVReader := (NeoCSVReader on: stream).
neoCSVReader
separator: $,;
recordClass: PriceRecord;
addIgnoredField; ""
addField:  #securityUniqueId: ; ""  
addField: #date: converter: [ :string | Date readFrom: string readStream 
pattern: 'mmdd' ]; ""
addFloatField: #open: ; ""
addFloatField: #high: ; ""
addFloatField: #low: ; ""
addFloatField: #close: ; ""
addIntegerField: #volume: . ""
neoCSVReaderskipHeader.
priceRecords := neoCSVReader upToEnd.


The #recordClass: is optional. If not, you can get an array of arrays instead.
You can add #addIgnoredField for all the ones you want to ignore, then add the 
#addNumber: etc for the number ones, etc.

Correct.


To write a default empty value, I would use my own converter. Something like:

addField: #stringcolumn: converter: [ :string | string isEmptyOrNil ifTrue: [ 
'' ]  ];
addField: #numbercolumn: converter: [ :string | string isEmptyOrNil ifTrue: [ 0 
] ifFalse: [ NeoNumberParser parse: string ]  ];

Actually there is NeoCSVReader>>#emptyFieldValue: which you can use the 
configure the reader (but it counts for all fields).


Hope this helps.

Cheers,



On Mon, Sep 28, 2015 at 9:06 AM, Nicolai Hess  wrote:
Hi,

I have two problems I could not solve:

1. I would like to read only some columns: I have a large file with
 ~30 colums, but I am only interested on ~5 columns
 (not that important, I could pre-process the file) but anyway it would be
 nice to do it in smalltalk.

2. some columns will contain only strings (quoted values) and some only numbers,
 but the field may be empty, is it possible to define the default 
"emptyValue" as an
 - empty string for empty fields in the "string column"
 - 0 for empty fields in the "number column"?


thanks
  in advance

nicolai



--
Mariano
http://marianopeck.wordpress.com








Re: [Pharo-users] IS there TypePlug for Pharo or similar type annotation tool?

2015-10-03 Thread stepharo

Why do you need that?



Le 2/10/15 20:50, Peter Uhnák a écrit :

Hi,

What options do we have in terms of type annotations in Pharo?

I stumbled upon TypePlug this 
https://marcusdenker.de/talks/08ParisTypes/08ParisTypePlug.pdf (or 
rather this http://scg.unibe.ch/archive/masters/Hald07a.pdf )


which enabled type annotation for Squeak such as

Fruit>>mixWith: aFruit <:type: Fruit :>
^ (Array with: self with: aFruit) <:type: Array E: Fruit :>

Orange>>color
^ (Color orange) <:type: Color :>

(or even blocks)
[ :a1 <:type: Integer :> :a2 <:type: Integer :> | a1 + a2 ]


obviously something like this wouldn't even compile in Pharo (does 
Sqeak have different syntax for pragmas, or did the TypePlug change 
the syntax?)


And my question is... is there a port of this, or something similar?

I've also found this 
http://randycoulman.com/blog/2013/02/12/specifying-types-for-smalltalk-fit/

Which is a framework for integrated testing that uses pragmas such as

makeBatchWithdrawalOn: aDate note: aString
  
  
  ^(BatchWithdrawalFixture date: aDate note: aString)
  systemUnderTest: systemUnderTest


Right now I am exploring what options we have in Pharo in terms of 
type annotations (before writing yet-another-library ;-)).


Thanks,
Peter





Re: [Pharo-users] Some news from the growing pharo teacher front

2015-10-03 Thread stepharo

+1

Stef


Le 29/9/15 18:02, Johan Fabry a écrit :

On Sep 29, 2015, at 12:52, Offray Vladimir Luna Cárdenas  
wrote:

Hi,

On 29/09/15 10:08, Stephan Eggermont wrote:

On 29-09-15 16:52, Offray Vladimir Luna Cárdenas wrote:

Thanks for your interest. Please try this updated installation script [1]:

Is there a specific reason this is not a Metacello configuration?


Yep. I don't know how to do them ;-), a lot of stuff I need to learn to get a 
minimal interface working (now is Spec and GT, but in my list testing has high 
priority) and few time to hack on Pharo, so a script seemed like the easier 
approach to get the installation working.

Now I have more time, so after finishing Spec-Glamour interface, I will try to 
learn more about Metacello and try a better way to install grafoscopio on pharo 
4.

Try using Versionner (World->Tools->Versionner). I do not understand Metacello 
at all yet I was able to create a configuration in less than 30 minutes. There are 
also some tutorials on Youtube, but I don’t have a link here, sorry.


---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
Chile








Re: [Pharo-users] Pillar for 30 gone the way of the dodo on the CI

2015-10-03 Thread stepharo

So let us archive it but now my scripts are broken.

Stef

Le 1/10/15 10:10, Marcus Denker a écrit :


On 01 Oct 2015, at 10:07, Marcus Denker > wrote:


Is CI an archive?



What I mean: it seems to me not possible to keep all CI build alive 
“forever” as a CI server build.

Shouldn’t we separate “archival of builds” from “active ci”?

For Pharo itself we do that, as we do not have the manpower (we just 
don’t) to keep the CI alive for
stable and dev, yet every build ever is on files.pharo.org 
 *forever*, archived.


Marcus

On 01 Oct 2015, at 10:05, Peter Uhnak > wrote:


In Jenkins you specify configuration matrix (versions of pharo 
versus type (development, stable, ...)).. So it will run development 
for all versions, even pharo 30 (which is now permanently broken)


From: Stephan Eggermont 
Sent: ‎10/‎1/‎2015 9:47 AM
To: pharo-users@lists.pharo.org 
Subject: Re: [Pharo-users] Pillar for 30 gone the way of the dodo on 
the CI


On 01-10-15 09:41, Stephan Eggermont wrote:
> On 30-09-15 19:57, Ferlicot D. Cyril wrote:
>
>> We removed the Pillar job for Pharo 3 because we introduced an new
>> feature not backward compatible.
>
> Why is that a reason to remove the build? You have a configuration,
> don't you?

I would suggest: move to a separate job that is run much less often
and doesn't keep so many old artifacts. That makes it easier to get old
stuff running again.

Stephan











Re: [Pharo-users] Pillar for 30 gone the way of the dodo on the CI

2015-10-03 Thread stepharo



We removed the Pillar job for Pharo 3 because we introduced an new
feature not backward compatible.


Why is that a reason to remove the build? You have a configuration,
don't you?


I would suggest: move to a separate job that is run much less often
and doesn't keep so many old artifacts. That makes it easier to get 
old stuff running again.


+ 1





Re: [Pharo-users] Spec LabelModel's #font: and other styles

2015-10-03 Thread stepharo

I think that this part has been completely forgotten by spec.
Normally the layout should take into account the size of the label and font
and I do not see why we could not specify the color and other attributes 
we want to have but we did not work on this point.

Now we will have to see that in the context of Brick skin.

Stef

Le 2/10/15 13:47, Peter Uhnák a écrit :

Does it make sense to be able to specify font and similar  at Spec-level?

And not just font, also the size, color, or emphasis (which currently 
only emphasis is supported).


From one perspective it's handy, because I can change it at a whim, 
however I wonder whether this shouldn't be responsibility of some 
styler instead.


Text as far as I know is capable of storing styled information. This 
would enable to outsource the style information to someone else (e.g. 
your stylesheet). However from practical perspective for the end user 
it would be extra work as it would add an indirection step.


For TextModel that would be clearly better (because you might want to 
style different parts of text differently), however for LabelModel I'm 
not so sure.


Any opinions?

Thanks,
Peter





Re: [Pharo-users] Analysis/Visualizations of DBs

2015-10-03 Thread stepharo

Anne Etien and Olivier Auverlot (with the help of Guillaume Larcheveque)
are parsing SQL and building representation in Moose about such objects.
So contact anne

anne.et...@inria.fr

Le 2/10/15 14:34, Torsten Bergmann a écrit :

Hi,

we have many nice analysis and visualizations tools available (Moose, Roassal, 
ViDi, ...)
Often it is focused on development or code. Also we have refactoring tools.

What would be cool would be to have some tool for doing this on (relational) 
databases and
included data:

  - visualize databases (tables, data clusters, number of columns, ...)
  - analyze tables on satisfying some (external) business constraints
and consistency rules
  - refactoring of databases (moving, migrating colums, ...)
  - easy building reports/visualizations of included data (extract, query, 
filter, ...)

What I think of is a tool where (after connecting to a possibly unknown 
database) you can easily
get/build an overview on the design, quality and data of the database (similar 
to what Moose, ViDi does
for code).

Is there any research, projects, ... for data mining already in Pharo? I guess 
this could make
up a great toolset with Pharo as a base and make it more known because in the 
software business
relational databases play a big role.

Any takers for the next Pharo success story? ;)

Bye
T.







Re: [Pharo-users] Accessors vs instance variables

2015-10-03 Thread stepharo

Hi lyn

I have the same experience than sven.

Stef

-Lyn


I think that with the current options in the tools (auto generation of 
accessors based on instance variables, checking references to instance 
variables, renaming either accessors or instance variables, syntax coloring) 
the difference between the two is becoming somewhat smaller.

I used to consistently use accessors for the reasons you describe, but lately I 
find it more important to think as object oriented as possible, to maximise 
encapsulation and minimise the interface to the outside world. Now, I only add 
accessors if that really makes sense, the lack of accessors should then signal 
the private nature of the instance variable.

Sven








Re: [Pharo-users] NeoCSV and special handling for some columns

2015-10-03 Thread Sven Van Caekenberghe
Yes, there are a couple of newer features that were added after the 
documentation was written. Keeping documentation up to date is also a PITA.

> On 03 Oct 2015, at 08:54, stepharo  wrote:
> 
> sven do you think that we should add this to the chapter?
> 
> 
> Le 28/9/15 16:42, Sven Van Caekenberghe a écrit :
>>> On 28 Sep 2015, at 15:04, Mariano Martinez Peck  
>>> wrote:
>>> 
>>> Imagine something like this:
>>> 
>>> neoCSVReader := (NeoCSVReader on: stream).
>>> neoCSVReader
>>> separator: $,;
>>> recordClass: PriceRecord;
>>> addIgnoredField; ""
>>> addField:  #securityUniqueId: ; ""  
>>> addField: #date: converter: [ :string | Date readFrom: string 
>>> readStream pattern: 'mmdd' ]; ""
>>> addFloatField: #open: ; ""
>>> addFloatField: #high: ; ""
>>> addFloatField: #low: ; ""
>>> addFloatField: #close: ; ""
>>> addIntegerField: #volume: . ""
>>> neoCSVReaderskipHeader.
>>> priceRecords := neoCSVReader upToEnd.
>>> 
>>> 
>>> The #recordClass: is optional. If not, you can get an array of arrays 
>>> instead.
>>> You can add #addIgnoredField for all the ones you want to ignore, then add 
>>> the #addNumber: etc for the number ones, etc.
>> Correct.
>> 
>>> To write a default empty value, I would use my own converter. Something 
>>> like:
>>> 
>>> addField: #stringcolumn: converter: [ :string | string isEmptyOrNil ifTrue: 
>>> [ '' ]  ];
>>> addField: #numbercolumn: converter: [ :string | string isEmptyOrNil ifTrue: 
>>> [ 0 ] ifFalse: [ NeoNumberParser parse: string ]  ];
>> Actually there is NeoCSVReader>>#emptyFieldValue: which you can use the 
>> configure the reader (but it counts for all fields).
>> 
>>> Hope this helps.
>>> 
>>> Cheers,
>>> 
>>> 
>>> 
>>> On Mon, Sep 28, 2015 at 9:06 AM, Nicolai Hess  wrote:
>>> Hi,
>>> 
>>> I have two problems I could not solve:
>>> 
>>> 1. I would like to read only some columns: I have a large file with
>>> ~30 colums, but I am only interested on ~5 columns
>>> (not that important, I could pre-process the file) but anyway it would 
>>> be
>>> nice to do it in smalltalk.
>>> 
>>> 2. some columns will contain only strings (quoted values) and some only 
>>> numbers,
>>> but the field may be empty, is it possible to define the default 
>>> "emptyValue" as an
>>> - empty string for empty fields in the "string column"
>>> - 0 for empty fields in the "number column"?
>>> 
>>> 
>>> thanks
>>>  in advance
>>> 
>>> nicolai
>>> 
>>> 
>>> 
>>> -- 
>>> Mariano
>>> http://marianopeck.wordpress.com
>> 
>> 
> 
> 




Re: [Pharo-users] IS there TypePlug for Pharo or similar type annotation tool?

2015-10-03 Thread Marcus Denker

> On 02 Oct 2015, at 20:50, Peter Uhnák  wrote:
> 
> Hi,
> 
> What options do we have in terms of type annotations in Pharo?
> 
> I stumbled upon TypePlug this 
> https://marcusdenker.de/talks/08ParisTypes/08ParisTypePlug.pdf 
>  (or rather 
> this http://scg.unibe.ch/archive/masters/Hald07a.pdf 
>  )
> 
> which enabled type annotation for Squeak such as
> 
> Fruit>>mixWith: aFruit <:type: Fruit :>
> ^ (Array with: self with: aFruit) <:type: Array E: Fruit :>
> 
> Orange>>color
> ^ (Color orange) <:type: Color :>
> 
> (or even blocks)
> [ :a1 <:type: Integer :> :a2 <:type: Integer :> | a1 + a2 ]
> 
> 
> obviously something like this wouldn't even compile in Pharo (does Sqeak have 
> different syntax for pragmas, or did the TypePlug change the syntax?)
> 

This was based on a hacked compiler (using a smack grammar on top of a code 
generator based on RB Nodes similar to the one we have now in
Opal). We changed the grammar to parse these kind of annotations.

Marcus



Re: [Pharo-users] Pillar for 30 gone the way of the dodo on the CI

2015-10-03 Thread Stephan Eggermont

On 03-10-15 09:16, stepharo wrote:

So let us archive it but now my scripts are broken.


If we want the old scripts to continue working, instead of creating a 
new (old) job for it we would need some mechanism to tell the build 
matrix in more detail what should happen to which build: only build 
nightly/weekly, and keep just a few artifacts


Stephan





Re: [Pharo-users] IS there TypePlug for Pharo or similar type annotation tool?

2015-10-03 Thread Stephan Eggermont

On 02-10-15 20:50, Peter Uhnák wrote:

What options do we have in terms of type annotations in Pharo?


The only type annotations I've actually used in Pharo is Magritte

Stephan