Re: [Pharo-users] TaskIt

2019-12-17 Thread Norbert Hartl
Hi,

> Am 16.12.2019 um 11:41 schrieb Santiago Bragagnolo 
> :
> 
> 
> Hi everybody! 
>We are starting to discuss with norbert about letting taskit to leave my 
> incubator (my github account to go elsewhere). I have being thinking about it 
> since long time, since i would like it to allow taskit to evolve into more 
> than just my needs and wishes.
> 
>The sidequestion i am bringing today it may seem (or even be) almost 
> scholastic at this point, but i think it should have some space. 
>The question is if to move it to pharo-contributions, or if to create a 
> new pharo-processing.  
> 
I was asking this myself for a long time. Then I just started to move things to 
pharo-contributions because I could not come up with a better idea. I‘m not 
convinced that having more organizations on github will help.

>During the ESUG i came up with the idea/feeling/etc that it would be nice 
> to have a group of people interested into processing (as hobby, duty, etc) 
> for being able to push further this project and what-ever-other related 
> project.
>   During the conference i addressed norbert, tomohiro, mariano, matteo, 
> guille, pablo, noury, (people for whom processing directly or indirectly is a 
> primary concern) and i think there is even more people interested in this 
> kind of general problematic, for what i sensed specially during my esug 
> presentation. I think that to build a kind of team or group for discussing 
> and working on this subject is a step in a direction that search to solve 
> many modern daily problems that pushes us out of larger models of business 
> and interaction (cloud and derivatives). Having this points in mind i think 
> that the choice of this new github project could be a good point to start a 
> to work on this goal (as a first place of gathering). 
> 
I personally wouldn‘t do it from the start. Usually this is kind of a premature 
optimization to put groups and permissions and all of that on the table.
If it comes to groups it comes to permissions and the management of them. You 
might try to solve a problem that might not even have. But you put the burden 
of managing memberships and permissions and that prevents collaboration to some 
extent

So my golden rule to this is that if you don‘t have real good reason to add 
something like this organization, just don‘t. Wait until there is a problem. At 
that point you know what problem you have and you might have an appropriate 
idea how to solve it. This is very hard to do a priori.

But we need indeed a general approach how to handle that. Every time someone 
asks me to be added to pharo-contributions I‘m thinking about if the setup is 
ok.

Norbert

>  Still, i would like to hear other's opinion, in order to be able to deal 
> with this maybe before new year :). 
> 
>Thanks for your time and reading :) 
> 
>Santiago
> 
> 
> 
> 
> 




[Pharo-users] [ANN] Next Pharo Sprint: Dec 20

2019-12-17 Thread Marcus Denker
We will organize a Pharo sprint / Moose dojo Dec 20, starting at

10:00am. (Local Time Paris). 

Goals of this sprint:

- Pharo 8: Fix issues from tracker 
https://github.com/pharo-project/pharo/issues 


Remote Sprint: Remotely, you can join us on Discord. During the sprint, we 
synchronize local and remote Pharo sprinters:

http://pharo.org/contribute-events 

We have added a Board to coordinate the work:
https://github.com/orgs/pharo-project/projects/9 


Known Local Sprint meetings

- Lille/France: It will be at the Inria Lille, Building B, third floor (RMoD 
offices). 
As the building is not open to the public, please contact us before if you plan 
to come

A list of all Pharo Event of the year an be found here: 
https://association.pharo.org/events 

Re: [Pharo-users] [Pharo-dev] TaskIt

2019-12-17 Thread Santiago Bragagnolo
El mar., 17 dic. 2019 a las 9:40, Norbert Hartl ()
escribió:

> Hi,
>
> > Am 16.12.2019 um 11:41 schrieb Santiago Bragagnolo <
> santiagobragagn...@gmail.com>:
> >
> > 
> > Hi everybody!
> >We are starting to discuss with norbert about letting taskit to leave
> my incubator (my github account to go elsewhere). I have being thinking
> about it since long time, since i would like it to allow taskit to evolve
> into more than just my needs and wishes.
> >
> >The sidequestion i am bringing today it may seem (or even be) almost
> scholastic at this point, but i think it should have some space.
> >The question is if to move it to pharo-contributions, or if to create
> a new pharo-processing.
> >
> I was asking this myself for a long time. Then I just started to move
> things to pharo-contributions because I could not come up with a better
> idea. I‘m not convinced that having more organizations on github will help.
>
> >During the ESUG i came up with the idea/feeling/etc that it would be
> nice to have a group of people interested into processing (as hobby, duty,
> etc) for being able to push further this project and what-ever-other
> related project.
> >   During the conference i addressed norbert, tomohiro, mariano, matteo,
> guille, pablo, noury, (people for whom processing directly or indirectly is
> a primary concern) and i think there is even more people interested in this
> kind of general problematic, for what i sensed specially during my esug
> presentation. I think that to build a kind of team or group for discussing
> and working on this subject is a step in a direction that search to solve
> many modern daily problems that pushes us out of larger models of business
> and interaction (cloud and derivatives). Having this points in mind i think
> that the choice of this new github project could be a good point to start a
> to work on this goal (as a first place of gathering).
> >
> I personally wouldn‘t do it from the start. Usually this is kind of a
> premature optimization to put groups and permissions and all of that on the
> table.
> If it comes to groups it comes to permissions and the management of them.
> You might try to solve a problem that might not even have. But you put the
> burden of managing memberships and permissions and that prevents
> collaboration to some extent
>
> So my golden rule to this is that if you don‘t have real good reason to
> add something like this organization, just don‘t. Wait until there is a
> problem. At that point you know what problem you have and you might have an
> appropriate idea how to solve it. This is very hard to do a priori.
>

wowowo, i never spoke about memberships nor access, it would be a nice
reason to me to not do it hahahaha. I am speaking only about drawing a box
where we put the discussions on processing. Ii am naming people is just to
remark the fact that there is people not only interested on this, but also
working on this, meaning that to have a place for having this punctual
disussions could be nice (just as a way of organising the discussions and
having only informtion relevant to the processing thing. Still, i am aware
that when we organise like this we are not organising for that, losing some
freedom, and adding a complexity when gathering general information).




What if we have links to all the groups in Pharo-project (pharo-misc,
pharo-processing, pharo-robotics, pharo-web) ? I can do the firsts steps if
we agree in here.





> But we need indeed a general approach how to handle that. Every time
> someone asks me to be added to pharo-contributions I‘m thinking about if
> the setup is ok.
>
> Norbert
>
> >  Still, i would like to hear other's opinion, in order to be able to
> deal with this maybe before new year :).
> >
> >Thanks for your time and reading :)
> >
> >Santiago
> >
> >
> >
> >
> >
>
>
>


[Pharo-users] Pharo TechTalk December 19th

2019-12-17 Thread Marcus Denker
A regular chat about Pharo.

Topic:  “Working with Spec2 and GTK”

https://association.pharo.org/event-3419547


There is a Discord channel where everything else will be organised (e.g. 
youtube life streaming
if needed).


[Pharo-users] Printer device communications

2019-12-17 Thread dario.trussardi65
Ciao,

i have to manage bidirectional communications with a printing device.


For now from Pharo i open a TCP-IP connection on the device that acts as a 
server.

So from the program ( client )  i manage the synchronous transmission and 
reception

 of the various commands to the device and everything is ok.

At this point it remains for me to manage - intercept on the client (Pharo)

the asynchronous transmission of commands by the server (  for example: 
the end of paper notification from the device )

How can i handle this?

At which level do you advise me to work?  ( socket  -  socketStream - websocket 
- ... . ) 

Any advice on this?

Thank,

Dario


Re: [Pharo-users] Printer device communications

2019-12-17 Thread Noury Bouraqadi
Hi Dario,

I suggest you use socket stream and more specifically the ZdcSocketStream class.

Socket is too low level, and web socket is for communications over HTTP.

Noury

> On 17 Dec 2019, at 13:20, dario.trussardi65  
> wrote:
> 
> Ciao,
> 
> i have to manage bidirectional communications with a printing device.
> 
> 
> For now from Pharo i open a TCP-IP connection on the device that acts as a 
> server.
> 
> So from the program ( client )  i manage the synchronous transmission and 
> reception
> 
>of the various commands to the device and everything is ok.
> 
> At this point it remains for me to manage - intercept on the client (Pharo)
> 
>   the asynchronous transmission of commands by the server (  for example: 
> the end of paper notification from the device )
> 
> How can i handle this?
> 
> At which level do you advise me to work?  ( socket  -  socketStream - 
> websocket - ... . ) 
> 
> Any advice on this?
>   
>   Thank,
> 
>   Dario




Re: [Pharo-users] [Pharo-dev] TaskIt

2019-12-17 Thread Torsten Bergmann
Santiago wrote:
>What if we have links to all the groups in Pharo-project (pharo-misc,
>pharo-processing, pharo-robotics, pharo-web) ? I can do the firsts steps if
>we agree in here.

Hi Santiago,

yes - we should link the groups from the main "pharo-project" so they are 
easier to find. Here are the ones I know:

1. https://github.com/pharo-project
2. https://github.com/pharo-contributions (general community managed 
contributions)
3. https://github.com/pharo-rdbms (relational database support)
4. https://github.com/pharo-nosql (NoSQL database support)
5. https://github.com/pharo-sql (points to https://github.com/pharo-rdbms)  
6. https://github.com/pharo-robotics (Robotics related)
7. https://github.com/pharo-brand (Brand Assets to do some marketing)


8. https://github.com/pharo-db (looks like offical DB stuff, but created by 
Todd Blanchard to assemble some database projects)


Not existing (yet), dont know why you need/mentioned them

https://github.com/pharo-misc  
https://github.com/pharo-processing 
https://github.com/pharo-we

For TaskIt maybe you start in "pharo-contributions" and if Pharo has more 
projects in similar directions an own separate group
could be created. 

I'm not sure if an own mailinglist other than "Pharo-users" makes sense but 
https://lists.pharo.org now also meanwhile got 
an additional "Pharo-iot" and "Workflow-engine" mailinglist. 

Thanks
T. 



[Pharo-users] how can I this refractor this so its more smalltalk

2019-12-17 Thread Roelof Wobben via Pharo-users
--- Begin Message ---

Hello,

My solution to day2 part1 is right this :

processData: instructions
    | opcode index firstNumber secondNumber placeToPut firstNumberIndex 
secondNumberIndex |

    index := 1.
    opcode := instructions at: index.
    [ opcode ~= 99 ]
        whileTrue: [ firstNumberIndex := instructions at: index + 1.
            secondNumberIndex := instructions at: index + 2.
            firstNumber := instructions at: firstNumberIndex + 1.
            secondNumber := instructions at: secondNumberIndex + 1.
            placeToPut := (instructions at: index + 3) + 1.
            opcode == 1
                ifTrue: [ instructions at: placeToPut put: firstNumber 
+ secondNumber ].

            opcode == 2
                ifTrue: [ instructions at: placeToPut put: firstNumber 
* secondNumber ].

            index := index + 4.
            opcode := instructions at: index ].
    ^ instructions at: 1

so its ugly code

is there a way  I can this more the smalltalk way by using streams or 
something else.
if so, is there someone who can tell me or can let me see how to make 
this cleaner code


Roelof


--- End Message ---


Re: [Pharo-users] how can I this refractor this so its more smalltalk

2019-12-17 Thread Kasper Osterbye
Hi Roelof

I saw your posts earlier, and will try to take a look. I am not into the
advent of code myself, but love a good puzzle. Would it be possible to
provide a link to the puzzle you are trying to solve?


Re: [Pharo-users] how can I this refractor this so its more smalltalk

2019-12-17 Thread Roelof Wobben via Pharo-users
--- Begin Message ---

  
  
of course but you have to use a githut
  account to reach it.
  
  All the puzzles can be found here :  https://adventofcode.com/
  
  I try to solve day2 and then part1. 
  
  Roelof
  
  
  Op 17-12-2019 om 18:33 schreef Kasper Osterbye:


  
  
Hi Roelof
  
  
  I saw your posts earlier, and will try to take a look. I
am not into the advent of code myself, but love a good
puzzle. Would it be possible to provide a link to the puzzle
you are trying to solve?

  


  


--- End Message ---


Re: [Pharo-users] how can I this refractor this so its more smalltalk

2019-12-17 Thread Todd Blanchard via Pharo-users
--- Begin Message ---
Well my main run method looks like this:
run
| op | 
ram := self input.
in := ReadStream on: ram.
[ (op := in next) = 99 ] whileFalse: [ self processOpcode: op ].
^self at: 0.

ram is the array of integers.
in is a ReadStream on them which lets me process them in order.
They are both instance variables.

self input provides a clean copy of the program memory (the integer array).  I 
just used an array literal.  No file IO.

The main dispatch method is

processOpcode: op 

op = 1 ifTrue: [ ^self processAdd ].
op = 2 ifTrue: [ ^self processMultiply ].

and for illustration 

processAdd
| a b c |
a := self at: in next.
b := self at: in next.
self at: in next put: a+b

There are custom versions of at: and at:put: that compensate for zero based vs 
one based array indexing.

at: idx
^ram at: idx + 1

I hope this helps you out.

> On Dec 17, 2019, at 6:59 AM, Roelof Wobben via Pharo-users 
>  wrote:
> 
> 
> From: Roelof Wobben 
> Subject: how can I this refractor this so its more smalltalk
> Date: December 17, 2019 at 6:59:28 AM PST
> To: Any question about pharo is welcome 
> 
> 
> Hello,
> 
> My solution to day2 part1 is right this :
> 
> processData: instructions
> | opcode index firstNumber secondNumber placeToPut firstNumberIndex 
> secondNumberIndex |
> index := 1.
> opcode := instructions at: index.
> [ opcode ~= 99 ]
> whileTrue: [ firstNumberIndex := instructions at: index + 1.
> secondNumberIndex := instructions at: index + 2.
> firstNumber := instructions at: firstNumberIndex + 1.
> secondNumber := instructions at: secondNumberIndex + 1.
> placeToPut := (instructions at: index + 3) + 1.
> opcode == 1
> ifTrue: [ instructions at: placeToPut put: firstNumber + 
> secondNumber ].
> opcode == 2
> ifTrue: [ instructions at: placeToPut put: firstNumber * 
> secondNumber ].
> index := index + 4.
> opcode := instructions at: index ].
> ^ instructions at: 1
> 
> so its ugly code
> 
> is there a way  I can this more the smalltalk way by using streams or 
> something else.
> if so, is there someone who can tell me or can let me see how to make this 
> cleaner code
> 
> Roelof
> 
> 
> 
> 

--- End Message ---


Re: [Pharo-users] [Pharo-dev] TaskIt

2019-12-17 Thread Esteban Lorenzano



> On 17 Dec 2019, at 15:38, Torsten Bergmann  wrote:
> 
> Santiago wrote:
>> What if we have links to all the groups in Pharo-project (pharo-misc,
>> pharo-processing, pharo-robotics, pharo-web) ? I can do the firsts steps if
>> we agree in here.
> 
> Hi Santiago,
> 
> yes - we should link the groups from the main "pharo-project" so they are 
> easier to find. Here are the ones I know:
> 
> 1. https://github.com/pharo-project
> 2. https://github.com/pharo-contributions (general community managed 
> contributions)
> 3. https://github.com/pharo-rdbms (relational database support)
> 4. https://github.com/pharo-nosql (NoSQL database support)
> 5. https://github.com/pharo-sql (points to https://github.com/pharo-rdbms)  
> 6. https://github.com/pharo-robotics (Robotics related)
> 7. https://github.com/pharo-brand (Brand Assets to do some marketing)
> 
> 
> 8. https://github.com/pharo-db (looks like offical DB stuff, but created by 
> Todd Blanchard to assemble some database projects)
> 
> 
> Not existing (yet), dont know why you need/mentioned them
> 
> https://github.com/pharo-misc  
> https://github.com/pharo-processing 
> https://github.com/pharo-we
> 
> For TaskIt maybe you start in "pharo-contributions" and if Pharo has more 
> projects in similar directions an own separate group
> could be created. 

+1

> 
> I'm not sure if an own mailinglist other than "Pharo-users" makes sense but 
> https://lists.pharo.org now also meanwhile got 
> an additional "Pharo-iot" and "Workflow-engine" mailinglist. 
> 
> Thanks
> T. 
> 




Re: [Pharo-users] how can I this refractor this so its more smalltalk

2019-12-17 Thread Ben Coman
Apart from using streams, part of making code less ugly is splitting it up
its separate aaspects.
One way it to to do as little as possible within your loop.  See how Todd
only does one thing within his loop.
Apart from looking nicer, doing so improves how you "think" about the
problem.

cheers -ben

On Tue, 17 Dec 2019 at 23:00, Roelof Wobben via Pharo-users <
pharo-users@lists.pharo.org> wrote:

> Hello,
>
> My solution to day2 part1 is right this :
>
> processData: instructions
>  | opcode index firstNumber secondNumber placeToPut firstNumberIndex
> secondNumberIndex |
>  index := 1.
>  opcode := instructions at: index.
>  [ opcode ~= 99 ]
>  whileTrue: [ firstNumberIndex := instructions at: index + 1.
>  secondNumberIndex := instructions at: index + 2.
>  firstNumber := instructions at: firstNumberIndex + 1.
>  secondNumber := instructions at: secondNumberIndex + 1.
>  placeToPut := (instructions at: index + 3) + 1.
>  opcode == 1
>  ifTrue: [ instructions at: placeToPut put: firstNumber
> + secondNumber ].
>  opcode == 2
>  ifTrue: [ instructions at: placeToPut put: firstNumber
> * secondNumber ].
>  index := index + 4.
>  opcode := instructions at: index ].
>  ^ instructions at: 1
>
> so its ugly code
>
> is there a way  I can this more the smalltalk way by using streams or
> something else.
> if so, is there someone who can tell me or can let me see how to make
> this cleaner code
>
> Roelof
>
>
>


Re: [Pharo-users] TaskIt

2019-12-17 Thread Ben Coman
On Mon, 16 Dec 2019 at 18:41, Santiago Bragagnolo <
santiagobragagn...@gmail.com> wrote:

> Hi everybody!
>We are starting to discuss with norbert about letting taskit to leave
> my incubator (my github account to go elsewhere). I have being thinking
> about it since long time, since i would like it to allow taskit to evolve
> into more than just my needs and wishes.
>
>The sidequestion i am bringing today it may seem (or even be) almost
> scholastic at this point, but i think it should have some space.
>The question is if to move it to pharo-contributions, or if to create a
> new pharo-processing.
>

I know a bit of what TaskIt is, but not what "processing" is in-general.
Can you clue me in?

cheers -ben


[Pharo-users] Localization of Months and Day names

2019-12-17 Thread Esteban Maringolo
What is the "official way" (if any) to localize the printing of Date
Month and Day names?

I saw there is a Locale class, but neither the primLongDateFormat and
primShortDateFormat have any senders, so if they're used, it's not
through message sends.

Regards!

Esteban A. Maringolo



Re: [Pharo-users] Localization of Months and Day names

2019-12-17 Thread Sven Van Caekenberghe
I don't know, Locale is not a very useful class.

You might want to have a look at ZTimestampFormat, part of 
https://github.com/svenvc/ztimestamp

(ZTimestampFormat fromString: 'SATURDAY, FEBRUARY 03 2001 (16:05:06)')
french;
format: DateAndTime now. 

"'MECREDI, DÉCEMBRE 18 2019 (07:44:07)'"

(ZTimestampFormat fromString: 'SATURDAY, FEBRUARY 03 2001 (16:05:06)')
german;
format: DateAndTime now. 

"'MITTWOCH, DEZEMBER 18 2019 (07:44:28)'"

The first argument is an example, based on a reference date. There is lot of 
documentation.

> On 18 Dec 2019, at 02:55, Esteban Maringolo  wrote:
> 
> What is the "official way" (if any) to localize the printing of Date
> Month and Day names?
> 
> I saw there is a Locale class, but neither the primLongDateFormat and
> primShortDateFormat have any senders, so if they're used, it's not
> through message sends.
> 
> Regards!
> 
> Esteban A. Maringolo
>