Re: [Pharo-users] Crash in Athens

2017-02-27 Thread Esteban Lorenzano
Hi, 

the problem wit Ronie’s fix is that (as he says) you are copying another time 
the surface, before passing it to the VM (who makes yet-another-copy) so this 
is not optimal… and you can see it when running the Tiger demo: there are a lot 
of pauses.
So I would prefer the other approach he suggests:

Form subclass: #AthensCairoSurfaceForm
instanceVariableNames: 'surface'
classVariableNames: ''
package: 'Athens-Cairo'

AthensCairoSurfaceForm>>surface
^ surface

AthensCairoSurfaceForm>>surface: anObject
surface := anObject

AthensCairoSurface>>asForm
"create a form and copy an image data there"
self checkSession.
self flush.
^ (AthensCairoSurfaceForm extent: (self width@self height) depth: 32 
bits: id)
surface: self;
yourself

that seems to work. Can you try and see?

Esteban

> On 24 Feb 2017, at 15:47, stepharong  wrote:
> 
> Hi alex
> 
> can you try the fix of ronie and let us know if it makes roassal more stable?
> 
> Stef
> 
>> Dear Alexander,
>> 
>> Sine the new FFI of Pharo, using Athens has become unreliable. This is a 
>> pity, but fixing this is not trivial at all (we have been trying for years).
>> 
>> What exactly are you doing with Athens?
>> 
>> Alexandre
>> 
>> 
>>> On Feb 22, 2017, at 12:55 AM, Alexander Samoylovich  
>>> wrote:
>>> 
>>> Hello
>>> 
>>> I am writing graphic demo programs using Athens on Mac Sierra.
>>> Time by time Pharo VM crashes. Programs not using Athens work reliably.
>>> I believe the behavior is reproducible.
>>> How should I report a bug?
>>> 
>>> Alex
>> 
> 
> 
> -- 
> Using Opera's mail client: http://www.opera.com/mail/
> 




[Pharo-users] REMEMBER: Tomorrow 28/02 16h UTC TechTalk: Reflectivity

2017-02-27 Thread Esteban Lorenzano
Hi, 

It will be handled by Marcus who will present current status of Reflectivity 
integration. 

Esteban




[Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Serge Stinckwich
Great news !

Thank you Jigyasa, Uko, Peter and Alex for your great work this year !


-- Forwarded message --
From: Google Summer of Code 
Date: Mon, Feb 27, 2017 at 6:00 PM
Subject: GSoC 2017: Pharo Consortium has been accepted as a mentor
organization!
To: sergestinckw...@gmail.com


[image: Google Summer of Code]

Congratulations! Pharo Consortium has been selected as a Google Summer of
Code 2017 mentor organization.

You can now invite mentors and update your organization profile.

Please click here to visit your dashboard: https://summerofcode.
withgoogle.com/dashboard/

This email was sent to serge.stinckw...@gmail.com.

You are receiving this email because of your participation in Google Summer
of Code 2017.
https://summerofcode.withgoogle.com

To leave the program and stop receiving all emails, you can go to your
profile  and
request deletion of your program profile.

For any questions, please contact gsoc-supp...@google.com. Replies to this
message go to an unmonitored mailbox.

© 2017 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA



-- 
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/


Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Alexandre Bergel
This is great!!
We, the organizers, will discuss and make a public call. 

Alexandre 

> Le 27 févr. 2017 à 14:07, Serge Stinckwich  a 
> écrit :
> 
> Great news !
> 
> Thank you Jigyasa, Uko, Peter and Alex for your great work this year !
> 
> 
> -- Forwarded message --
> From: Google Summer of Code 
> Date: Mon, Feb 27, 2017 at 6:00 PM
> Subject: GSoC 2017: Pharo Consortium has been accepted as a mentor 
> organization!
> To: sergestinckw...@gmail.com
> 
> 
>   
> Congratulations! Pharo Consortium has been selected as a Google Summer of 
> Code 2017 mentor organization.
> 
> You can now invite mentors and update your organization profile.
> 
> Please click here to visit your dashboard: 
> https://summerofcode.withgoogle.com/dashboard/
> 
> This email was sent to serge.stinckw...@gmail.com.
> 
> You are receiving this email because of your participation in Google Summer 
> of Code 2017. 
> https://summerofcode.withgoogle.com
> 
> To leave the program and stop receiving all emails, you can go to your 
> profile and request deletion of your program profile.
> 
> For any questions, please contact gsoc-supp...@google.com. Replies to this 
> message go to an unmonitored mailbox.
> 
> © 2017 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA
> 
> 
> 
> 
> -- 
> Serge Stinckwich
> UCBN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://www.doesnotunderstand.org/


Re: [Pharo-users] [Pharo-dev] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Tudor Girba
Congratulations. And thank you!

Cheers,
Doru



> On Feb 27, 2017, at 6:21 PM, Alexandre Bergel  wrote:
> 
> This is great!!
> We, the organizers, will discuss and make a public call. 
> 
> Alexandre 
> 
> Le 27 févr. 2017 à 14:07, Serge Stinckwich  a 
> écrit :
> 
>> Great news !
>> 
>> Thank you Jigyasa, Uko, Peter and Alex for your great work this year !
>> 
>> 
>> -- Forwarded message --
>> From: Google Summer of Code 
>> Date: Mon, Feb 27, 2017 at 6:00 PM
>> Subject: GSoC 2017: Pharo Consortium has been accepted as a mentor 
>> organization!
>> To: sergestinckw...@gmail.com
>> 
>> 
>>  
>> Congratulations! Pharo Consortium has been selected as a Google Summer of 
>> Code 2017 mentor organization.
>> 
>> You can now invite mentors and update your organization profile.
>> 
>> Please click here to visit your dashboard: 
>> https://summerofcode.withgoogle.com/dashboard/
>> 
>> This email was sent to serge.stinckw...@gmail.com.
>> 
>> You are receiving this email because of your participation in Google Summer 
>> of Code 2017. 
>> https://summerofcode.withgoogle.com
>> 
>> To leave the program and stop receiving all emails, you can go to your 
>> profile and request deletion of your program profile.
>> 
>> For any questions, please contact gsoc-supp...@google.com. Replies to this 
>> message go to an unmonitored mailbox.
>> 
>> © 2017 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA
>> 
>> 
>> 
>> 
>> -- 
>> Serge Stinckwich
>> UCBN & UMI UMMISCO 209 (IRD/UPMC)
>> Every DSL ends up being Smalltalk
>> http://www.doesnotunderstand.org/

--
www.tudorgirba.com
www.feenk.com

“The smaller and more pervasive the hardware becomes, the more physical the 
software gets."




Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Thierry Goubier

Le 27/02/2017 à 18:07, Serge Stinckwich a écrit :

Great news !

Thank you Jigyasa, Uko, Peter and Alex for your great work this year !


Superb!

Thierry




-- Forwarded message --
From: *Google Summer of Code* mailto:summerofcode-nore...@google.com>>
Date: Mon, Feb 27, 2017 at 6:00 PM
Subject: GSoC 2017: Pharo Consortium has been accepted as a mentor
organization!
To: sergestinckw...@gmail.com 


__

Google Summer of Code

Congratulations! Pharo Consortium has been selected as a Google Summer
of Code 2017 mentor organization.

You can now invite mentors and update your organization profile.

Please click here to visit your dashboard:
https://summerofcode.withgoogle.com/dashboard/






This email was sent to serge.stinckw...@gmail.com
.

You are receiving this email because of your participation in Google
Summer of Code 2017.
https://summerofcode.withgoogle.com 

To leave the program and stop receiving all emails, you can go to your
profile  and
request deletion of your program profile.

For any questions, please contact gsoc-supp...@google.com
. Replies to this message go to an
unmonitored mailbox.

© 2017 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA






--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/





Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Sven Van Caekenberghe

> On 27 Feb 2017, at 18:37, Thierry Goubier  wrote:
> 
> Le 27/02/2017 à 18:07, Serge Stinckwich a écrit :
>> Great news !
>> 
>> Thank you Jigyasa, Uko, Peter and Alex for your great work this year !
> 
> Superb!

+10

> Thierry
> 
>> 
>> 
>> -- Forwarded message --
>> From: *Google Summer of Code* > >
>> Date: Mon, Feb 27, 2017 at 6:00 PM
>> Subject: GSoC 2017: Pharo Consortium has been accepted as a mentor
>> organization!
>> To: sergestinckw...@gmail.com 
>> 
>> 
>> __
>>  
>> Google Summer of Code
>> 
>> Congratulations! Pharo Consortium has been selected as a Google Summer
>> of Code 2017 mentor organization.
>> 
>> You can now invite mentors and update your organization profile.
>> 
>> Please click here to visit your dashboard:
>> https://summerofcode.withgoogle.com/dashboard/
>> 
>> 
>>  
>> 
>>  
>> 
>> This email was sent to serge.stinckw...@gmail.com
>> .
>> 
>> You are receiving this email because of your participation in Google
>> Summer of Code 2017.
>> https://summerofcode.withgoogle.com 
>> 
>> To leave the program and stop receiving all emails, you can go to your
>> profile  and
>> request deletion of your program profile.
>> 
>> For any questions, please contact gsoc-supp...@google.com
>> . Replies to this message go to an
>> unmonitored mailbox.
>> 
>> © 2017 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA
>> 
>>  
>> 
>> 
>> 
>> 
>> --
>> Serge Stinckwich
>> UCBN & UMI UMMISCO 209 (IRD/UPMC)
>> Every DSL ends up being Smalltalk
>> http://www.doesnotunderstand.org/
> 
> 




Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Hilaire
Well done!

Le 27/02/2017 à 18:07, Serge Stinckwich a écrit :
> Great news !
> 
> Thank you Jigyasa, Uko, Peter and Alex for your great work this year !
> 

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




Re: [Pharo-users] Crash in Athens

2017-02-27 Thread Igor Stasenko
On 27 February 2017 at 12:29, Esteban Lorenzano  wrote:

> Hi,
>
> the problem wit Ronie’s fix is that (as he says) you are copying another
> time the surface, before passing it to the VM (who makes yet-another-copy)
> so this is not optimal… and you can see it when running the Tiger demo:
> there are a lot of pauses.
> So I would prefer the other approach he suggests:
>
> Form subclass: #AthensCairoSurfaceForm
> instanceVariableNames: 'surface'
> classVariableNames: ''
> package: 'Athens-Cairo'
>
> AthensCairoSurfaceForm>>surface
> ^ surface
>
> AthensCairoSurfaceForm>>surface: anObject
> surface := anObject
>
> AthensCairoSurface>>asForm
> "create a form and copy an image data there"
> self checkSession.
> self flush.
> ^ (AthensCairoSurfaceForm extent: (self width@self height) depth:
> 32 bits: id)
> surface: self;
> yourself
>
> that seems to work. Can you try and see?
>
>
Btw, remember the culprit there , that you must have extra word in trailing
buffer space,
this is because bit-blt using read-ahead . Which is OK for objects located
in object memory,
since there are always something past the last object (unallocated space),
but not so ok for buffers allocated by malloc (such as cairo surface
bitmap), and so,
if you read even a single byte past it, you get protection fault.


> Esteban
>
> > On 24 Feb 2017, at 15:47, stepharong  wrote:
> >
> > Hi alex
> >
> > can you try the fix of ronie and let us know if it makes roassal more
> stable?
> >
> > Stef
> >
> >> Dear Alexander,
> >>
> >> Sine the new FFI of Pharo, using Athens has become unreliable. This is
> a pity, but fixing this is not trivial at all (we have been trying for
> years).
> >>
> >> What exactly are you doing with Athens?
> >>
> >> Alexandre
> >>
> >>
> >>> On Feb 22, 2017, at 12:55 AM, Alexander Samoylovich <
> samoylov...@gmail.com> wrote:
> >>>
> >>> Hello
> >>>
> >>> I am writing graphic demo programs using Athens on Mac Sierra.
> >>> Time by time Pharo VM crashes. Programs not using Athens work reliably.
> >>> I believe the behavior is reproducible.
> >>> How should I report a bug?
> >>>
> >>> Alex
> >>
> >
> >
> > --
> > Using Opera's mail client: http://www.opera.com/mail/
> >
>
>
>


-- 
Best regards,
Igor Stasenko.


Re: [Pharo-users] Crash in Athens

2017-02-27 Thread Igor Stasenko
and i was dealing with it by adding 1 extra line to cairo surface,
but reporting 1 less to Form. Like so, bitblt still reads past the
allowed size, but it is safe, because there are unused bit(s).

On 27 February 2017 at 20:31, Igor Stasenko  wrote:

>
>
> On 27 February 2017 at 12:29, Esteban Lorenzano 
> wrote:
>
>> Hi,
>>
>> the problem wit Ronie’s fix is that (as he says) you are copying another
>> time the surface, before passing it to the VM (who makes yet-another-copy)
>> so this is not optimal… and you can see it when running the Tiger demo:
>> there are a lot of pauses.
>> So I would prefer the other approach he suggests:
>>
>> Form subclass: #AthensCairoSurfaceForm
>> instanceVariableNames: 'surface'
>> classVariableNames: ''
>> package: 'Athens-Cairo'
>>
>> AthensCairoSurfaceForm>>surface
>> ^ surface
>>
>> AthensCairoSurfaceForm>>surface: anObject
>> surface := anObject
>>
>> AthensCairoSurface>>asForm
>> "create a form and copy an image data there"
>> self checkSession.
>> self flush.
>> ^ (AthensCairoSurfaceForm extent: (self width@self height)
>> depth: 32 bits: id)
>> surface: self;
>> yourself
>>
>> that seems to work. Can you try and see?
>>
>>
> Btw, remember the culprit there , that you must have extra word in
> trailing buffer space,
> this is because bit-blt using read-ahead . Which is OK for objects located
> in object memory,
> since there are always something past the last object (unallocated space),
> but not so ok for buffers allocated by malloc (such as cairo surface
> bitmap), and so,
> if you read even a single byte past it, you get protection fault.
>
>
>> Esteban
>>
>> > On 24 Feb 2017, at 15:47, stepharong  wrote:
>> >
>> > Hi alex
>> >
>> > can you try the fix of ronie and let us know if it makes roassal more
>> stable?
>> >
>> > Stef
>> >
>> >> Dear Alexander,
>> >>
>> >> Sine the new FFI of Pharo, using Athens has become unreliable. This is
>> a pity, but fixing this is not trivial at all (we have been trying for
>> years).
>> >>
>> >> What exactly are you doing with Athens?
>> >>
>> >> Alexandre
>> >>
>> >>
>> >>> On Feb 22, 2017, at 12:55 AM, Alexander Samoylovich <
>> samoylov...@gmail.com> wrote:
>> >>>
>> >>> Hello
>> >>>
>> >>> I am writing graphic demo programs using Athens on Mac Sierra.
>> >>> Time by time Pharo VM crashes. Programs not using Athens work
>> reliably.
>> >>> I believe the behavior is reproducible.
>> >>> How should I report a bug?
>> >>>
>> >>> Alex
>> >>
>> >
>> >
>> > --
>> > Using Opera's mail client: http://www.opera.com/mail/
>> >
>>
>>
>>
>
>
> --
> Best regards,
> Igor Stasenko.
>



-- 
Best regards,
Igor Stasenko.


Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Guillermo Polito
Thanks :)

On Mon, Feb 27, 2017 at 7:22 PM, Hilaire  wrote:

> Well done!
>
> Le 27/02/2017 à 18:07, Serge Stinckwich a écrit :
> > Great news !
> >
> > Thank you Jigyasa, Uko, Peter and Alex for your great work this year !
> >
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>


Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Peter Uhnak

Congratulations!

p.s. I think my name was there from last year (I didn't have time for this this 
year), so if you encounter it anywhere, feel free to remove it.

Peter

On Mon, Feb 27, 2017 at 06:07:18PM +0100, Serge Stinckwich wrote:
> Great news !
> 
> Thank you Jigyasa, Uko, Peter and Alex for your great work this year !
> 
> 
> -- Forwarded message --
> From: Google Summer of Code 
> Date: Mon, Feb 27, 2017 at 6:00 PM
> Subject: GSoC 2017: Pharo Consortium has been accepted as a mentor
> organization!
> To: sergestinckw...@gmail.com
> 
> 
> [image: Google Summer of Code]
> 
> Congratulations! Pharo Consortium has been selected as a Google Summer of
> Code 2017 mentor organization.
> 
> You can now invite mentors and update your organization profile.
> 
> Please click here to visit your dashboard: https://summerofcode.
> withgoogle.com/dashboard/
> 
> This email was sent to serge.stinckw...@gmail.com.
> 
> You are receiving this email because of your participation in Google Summer
> of Code 2017.
> https://summerofcode.withgoogle.com
> 
> To leave the program and stop receiving all emails, you can go to your
> profile  and
> request deletion of your program profile.
> 
> For any questions, please contact gsoc-supp...@google.com. Replies to this
> message go to an unmonitored mailbox.
> 
> © 2017 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA
> 
> 
> 
> -- 
> Serge Stinckwich
> UCBN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://www.doesnotunderstand.org/



Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Serge Stinckwich
On Mon, Feb 27, 2017 at 8:19 PM, Peter Uhnak  wrote:
>
> Congratulations!
>
> p.s. I think my name was there from last year (I didn't have time for this 
> this year), so if you encounter it anywhere, feel free to remove it.

BTW, I add you name, because you help a lot last year :-)

-- 
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/



Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Stephane Ducasse
Super good news.
I need good news in this moment!

On Mon, Feb 27, 2017 at 8:42 PM, Serge Stinckwich <
serge.stinckw...@gmail.com> wrote:

> On Mon, Feb 27, 2017 at 8:19 PM, Peter Uhnak  wrote:
> >
> > Congratulations!
> >
> > p.s. I think my name was there from last year (I didn't have time for
> this this year), so if you encounter it anywhere, feel free to remove it.
>
> BTW, I add you name, because you help a lot last year :-)
>
> --
> Serge Stinckwich
> UCBN & UMI UMMISCO 209 (IRD/UPMC)
> Every DSL ends up being Smalltalk
> http://www.doesnotunderstand.org/
>
>


Re: [Pharo-users] 4 new chapters for new book on OOP and Design

2017-02-27 Thread Stephane Ducasse
Hi mark

I could get the pdf with firefox. Can you tell me what you get?

Stef

On Sat, Feb 25, 2017 at 7:43 PM, Mark Neagu  wrote:

> Hi Stepharong,
>
> It seems that your link doesn't work :\ .
>
> Mark
>
> Le 25 février 2017 à 15:13, stepharong  a écrit :
>
> Hi
>
> I just released four new chapters for the Learning OO programming and
> design with Pharo.
>
> https://ci.inria.fr/pharo-contribution/view/Books/job/
> LearningObjectOrientedProgramming/98/artifact/book.pdf
>
> 6 Objects and Classes
> 7 LateBinding
> 13 Inheritance
> 14 Understanding Super
> Super thanks to Hayatou Oumarou for his deep reviews of the book.
>
> Stef
>
>


Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Ronie Salgado
Congratulations!

2017-02-27 16:54 GMT-03:00 Stephane Ducasse :

> Super good news.
> I need good news in this moment!
>
> On Mon, Feb 27, 2017 at 8:42 PM, Serge Stinckwich <
> serge.stinckw...@gmail.com> wrote:
>
>> On Mon, Feb 27, 2017 at 8:19 PM, Peter Uhnak  wrote:
>> >
>> > Congratulations!
>> >
>> > p.s. I think my name was there from last year (I didn't have time for
>> this this year), so if you encounter it anywhere, feel free to remove it.
>>
>> BTW, I add you name, because you help a lot last year :-)
>>
>> --
>> Serge Stinckwich
>> UCBN & UMI UMMISCO 209 (IRD/UPMC)
>> Every DSL ends up being Smalltalk
>> http://www.doesnotunderstand.org/
>>
>>
>


[Pharo-users] Windows automation [os-windows]

2017-02-27 Thread lw1990
I'm interested in using pharo to automate the windows operating system
through the windows API.
I found a package called os-windows, which has a lot of this functionality
but also a lot is missing, I want to help add more - how is this done?

Specifically I want to be able to:
Move the Windows cursor on the desktop relative to the screen size
Move the Windows cursor relative to the active window on any active window,
not just the console
Monitor all hardware keyboard activity (respond to hotkeys in any
application)
Send keystrokes to any target window or window control (such as an edit
control)
Get control information from external windows, such as the contents of an
edit control, or the label of an edit control, or the hwnd of the edit
control, etc.
Ability to do DllCalls (which opens a lot of functionality in Windows, such
as sending windows messages that can activate menu items in third party
desktop applications).

All of this functionality and more comes from the windows scripting language
AutoHotkey (https://autohotkey.com/)

I'm looking to make much of the AutoHotkey functionality available in Pharo,
so that I can use Pharo instead of Autohotkey. 

AutoHotkey is implemented under-the-hood with the C language and is open
source, so I can see how they made their functions work, I would like to
port this to Pharo.

Can anyone could shed some light on this process, is it even practical to do
this?



--
View this message in context: 
http://forum.world.st/Windows-automation-os-windows-tp4936229.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Crash in Athens

2017-02-27 Thread Stephane Ducasse
Tx igor I added

https://pharo.fogbugz.com/f/cases/19764/Improve-comment-of-AthensCairoSurfaceForm

On Mon, Feb 27, 2017 at 7:35 PM, Igor Stasenko  wrote:

> and i was dealing with it by adding 1 extra line to cairo surface,
> but reporting 1 less to Form. Like so, bitblt still reads past the
> allowed size, but it is safe, because there are unused bit(s).
>
> On 27 February 2017 at 20:31, Igor Stasenko  wrote:
>
>>
>>
>> On 27 February 2017 at 12:29, Esteban Lorenzano 
>> wrote:
>>
>>> Hi,
>>>
>>> the problem wit Ronie’s fix is that (as he says) you are copying another
>>> time the surface, before passing it to the VM (who makes yet-another-copy)
>>> so this is not optimal… and you can see it when running the Tiger demo:
>>> there are a lot of pauses.
>>> So I would prefer the other approach he suggests:
>>>
>>> Form subclass: #AthensCairoSurfaceForm
>>> instanceVariableNames: 'surface'
>>> classVariableNames: ''
>>> package: 'Athens-Cairo'
>>>
>>> AthensCairoSurfaceForm>>surface
>>> ^ surface
>>>
>>> AthensCairoSurfaceForm>>surface: anObject
>>> surface := anObject
>>>
>>> AthensCairoSurface>>asForm
>>> "create a form and copy an image data there"
>>> self checkSession.
>>> self flush.
>>> ^ (AthensCairoSurfaceForm extent: (self width@self height)
>>> depth: 32 bits: id)
>>> surface: self;
>>> yourself
>>>
>>> that seems to work. Can you try and see?
>>>
>>>
>> Btw, remember the culprit there , that you must have extra word in
>> trailing buffer space,
>> this is because bit-blt using read-ahead . Which is OK for objects
>> located in object memory,
>> since there are always something past the last object (unallocated space),
>> but not so ok for buffers allocated by malloc (such as cairo surface
>> bitmap), and so,
>> if you read even a single byte past it, you get protection fault.
>>
>>
>>> Esteban
>>>
>>> > On 24 Feb 2017, at 15:47, stepharong  wrote:
>>> >
>>> > Hi alex
>>> >
>>> > can you try the fix of ronie and let us know if it makes roassal more
>>> stable?
>>> >
>>> > Stef
>>> >
>>> >> Dear Alexander,
>>> >>
>>> >> Sine the new FFI of Pharo, using Athens has become unreliable. This
>>> is a pity, but fixing this is not trivial at all (we have been trying for
>>> years).
>>> >>
>>> >> What exactly are you doing with Athens?
>>> >>
>>> >> Alexandre
>>> >>
>>> >>
>>> >>> On Feb 22, 2017, at 12:55 AM, Alexander Samoylovich <
>>> samoylov...@gmail.com> wrote:
>>> >>>
>>> >>> Hello
>>> >>>
>>> >>> I am writing graphic demo programs using Athens on Mac Sierra.
>>> >>> Time by time Pharo VM crashes. Programs not using Athens work
>>> reliably.
>>> >>> I believe the behavior is reproducible.
>>> >>> How should I report a bug?
>>> >>>
>>> >>> Alex
>>> >>
>>> >
>>> >
>>> > --
>>> > Using Opera's mail client: http://www.opera.com/mail/
>>> >
>>>
>>>
>>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>


Re: [Pharo-users] 4 new chapters for new book on OOP and Design

2017-02-27 Thread Peter Uhnak
Hi Stef,

I also noticed this but thought the problem was on my end.

_All PDFs_ (books, mooc, ...) here 
https://ci.inria.fr/pharo-contribution/view/Books do not work in my Google 
Chrome (version 57). PDFs on different sites work fine.

Looking at console I see some errors related to content security policy.. maybe 
they are bit more uptight about ensuring CSP?

Peter


On Mon, Feb 27, 2017 at 08:57:27PM +0100, Stephane Ducasse wrote:
> Hi mark
> 
> I could get the pdf with firefox. Can you tell me what you get?
> 
> Stef
> 
> On Sat, Feb 25, 2017 at 7:43 PM, Mark Neagu  wrote:
> 
> > Hi Stepharong,
> >
> > It seems that your link doesn't work :\ .
> >
> > Mark
> >
> > Le 25 février 2017 à 15:13, stepharong  a écrit :
> >
> > Hi
> >
> > I just released four new chapters for the Learning OO programming and
> > design with Pharo.
> >
> > https://ci.inria.fr/pharo-contribution/view/Books/job/
> > LearningObjectOrientedProgramming/98/artifact/book.pdf
> >
> > 6 Objects and Classes
> > 7 LateBinding
> > 13 Inheritance
> > 14 Understanding Super
> > Super thanks to Hayatou Oumarou for his deep reviews of the book.
> >
> > Stef
> >
> >



[Pharo-users] Proof of Concept: FileTree and Fossil

2017-02-27 Thread Pierce Ng
Hi all,

I have written a simple integration of FileTree with Fossil to avoid the 2-step
Pharo- and shell-level work to add/delete/commit files.

At the operating system command prompt, init a new Fossil project:

  os% mkdir ~/repo
  os% cd ~/repo
  os% fossil init myproject.fossil
  project-id: 3c05c3016eeabf8e87816ee218c6a86d3c87b950
  server-id:  ff42bc86dba1a26b1d94b64685f7c09d02581617
  admin-user: laptop-user (initial password is "1fe2ff")

Open the repository:

  os% mkdir ~/myproject
  os% cd ~/myproject
  os% fossil open ~/repo/myproject.fossil

In a fresh Pharo 6 image - I used v60411 - install FossilFileTree:

  Metacello new 
baseline: 'FossilFileTree'; 
repository: 'github://PierceNg/FossilFileTree'; 
load.

Write code in Pharo. Open Monticello Browser. Add a "fossilfiletree"
repository, using ~/myproject as the directory. Save to said repository
from within Monticello Browser. Done. 

Full blog post here: 

  http://www.samadhiweb.com/blog/2017.02.28.fossil.filetree.html 

Pierce




[Pharo-users] How to capture the execution of a playground?

2017-02-27 Thread Offray Vladimir Luna Cárdenas

Hi,

I would like to store the object resulting from executing a playground. 
This would imply two steps:


- Knowing that the playground content was executed (via the play button 
or its shortcuts Ctrl + Shift + g or Ctrl + g).
- Getting the results of that execution. For example if the result at 
the end is a string or a dictionary, I would like to get that string or 
dictionary.


Any pointers on how to make that will be welcomed.

Cheers,

Offray

Ps: I still get lost when I search by myself trying to answer questions 
like the ones above. I imagine that in some way is related with 
evaluationAction and presentations, by looking for the source code of 
"do it and go", but still I can't get a functional code snippet to start 
prototyping.




Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Offray Vladimir Luna Cárdenas
Congratulations for this and thanks for all the work behind... this will 
be an interesting summer!


Cheers,

Offray



On 27/02/17 12:07, Serge Stinckwich wrote:

Great news !

Thank you Jigyasa, Uko, Peter and Alex for your great work this year !


-- Forwarded message --
From: *Google Summer of Code* >

Date: Mon, Feb 27, 2017 at 6:00 PM
Subject: GSoC 2017: Pharo Consortium has been accepted as a mentor 
organization!

To: sergestinckw...@gmail.com 




Google Summer of Code

Congratulations! Pharo Consortium has been selected as a Google Summer 
of Code 2017 mentor organization.


You can now invite mentors and update your organization profile.

Please click here to visit your dashboard: 
https://summerofcode.withgoogle.com/dashboard/ 








This email was sent to serge.stinckw...@gmail.com 
.


You are receiving this email because of your participation in Google 
Summer of Code 2017.

https://summerofcode.withgoogle.com 

To leave the program and stop receiving all emails, you can go to your 
profile  and 
request deletion of your program profile.


For any questions, please contact gsoc-supp...@google.com 
. Replies to this message go to an 
unmonitored mailbox.


© 2017 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 
94043, USA







--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/




Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread serge . stinckwich
Hi Offray,
You will register as a student ?
See you

Envoyé de mon iPhone

> Le 28 févr. 2017 à 04:30, Offray Vladimir Luna Cárdenas 
>  a écrit :
> 
> Congratulations for this and thanks for all the work behind... this will be 
> an interesting summer!
> 
> Cheers,
> 
> Offray
> 
> 
> 
>> On 27/02/17 12:07, Serge Stinckwich wrote:
>> Great news !
>> 
>> Thank you Jigyasa, Uko, Peter and Alex for your great work this year !
>> 
>> 
>> -- Forwarded message --
>> From: Google Summer of Code 
>> Date: Mon, Feb 27, 2017 at 6:00 PM
>> Subject: GSoC 2017: Pharo Consortium has been accepted as a mentor 
>> organization!
>> To: sergestinckw...@gmail.com
>> 
>> 
>> 
>> 
>> Congratulations! Pharo Consortium has been selected as a Google Summer of 
>> Code 2017 mentor organization.
>> 
>> You can now invite mentors and update your organization profile.
>> 
>> Please click here to visit your dashboard: 
>> https://summerofcode.withgoogle.com/dashboard/
>> 
>> 
>> 
>> This email was sent to serge.stinckw...@gmail.com.
>> 
>> You are receiving this email because of your participation in Google Summer 
>> of Code 2017. 
>> https://summerofcode.withgoogle.com
>> 
>> To leave the program and stop receiving all emails, you can go to your 
>> profile and request deletion of your program profile.
>> 
>> For any questions, please contact gsoc-supp...@google.com. Replies to this 
>> message go to an unmonitored mailbox.
>> 
>> © 2017 Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, USA
>> 
>> 
>> 
>> 
>> 
>> -- 
>> Serge Stinckwich
>> UCBN & UMI UMMISCO 209 (IRD/UPMC)
>> Every DSL ends up being Smalltalk
>> http://www.doesnotunderstand.org/
> 


[Pharo-users] And the Oscar goes to...

2017-02-27 Thread Hernán Morales Durand
| o i |
o :=  #[76 97 32 76 97 32 76 97 110 100] asString asText.
i := GTInspector openOn: o.
[ 1 second wait.
o
addAttribute: TextEmphasis struckOut;
append: #[77 111 111 110 108 105 103 104 116] asString.
i model update ] fork.

;)

Cheers,

Hernán


Re: [Pharo-users] Fwd: GSoC 2017: Pharo Consortium has been accepted as a mentor organization!

2017-02-27 Thread Stephan Eggermont

On 27/02/17 18:07, Serge Stinckwich wrote:

Great news !

Thank you Jigyasa, Uko, Peter and Alex for your great work this year !


Indeed. Great news, and well done.

Stephan





Re: [Pharo-users] How to capture the execution of a playground?

2017-02-27 Thread Ben Coman
On Tue, Feb 28, 2017 at 11:28 AM, Offray Vladimir Luna Cárdenas <
offray.l...@mutabit.com> wrote:

> Hi,
>
> I would like to store the object resulting from executing a playground.
> This would imply two steps:
>
> - Knowing that the playground content was executed (via the play button or
> its shortcuts Ctrl + Shift + g or Ctrl + g).
> - Getting the results of that execution. For example if the result at the
> end is a string or a dictionary, I would like to get that string or
> dictionary.
>
> Any pointers on how to make that will be welcomed.
>
> Cheers,
>
> Offray
>
> Ps: I still get lost when I search by myself trying to answer questions
> like the ones above. I imagine that in some way is related with
> evaluationAction and presentations, by looking for the source code of "do
> it and go", but still I can't get a functional code snippet to start
> prototyping.
>
>
In playground, if you evaluate "self halt. 42" at top of the debug stack
you'll see method...
   Undefined>>DoIt
   self halt.
   ^ 42

where stepping
OVER returns 42 into "value" variable in OpalCompiler>>evaluate
OVER returns 42 into "result" variable in
RubSmalltalkEditor>>evaluate:andDo:
at the end of which stepping
INTO "^aBlock value: result"  takes you to
RubSmalltalkEditor>>highlightEvaluateAndDo:, where
INTO "[:result | aBlock value: result]"takes you to
GLMPharoScriptPResentation(GLMRubricSmalltalkCodePresentation)>>executionSelectionActions
where changing "aPresentation highlightEvaluateAndDo: [ :result | ] ];
  to "aPresentation highlightEvaluateAndDo: [ :result |
self inform: 'Result ' , result printString] ]; "
   and opening a new Playground, then evaluating "42" informs us that 42 is
the result.

Stepping further along, in
GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodePresentation)>>highlightEvaluateAndDo::
the value returned from...
self
  evaluate: self highlightedTextAsStream
  andDo: [:result | aBlock value: result. ].

is not 42 but aGLMPharoScriptPresentation.  it might help to change that
to...
  andDo: [:result | aBlock value: result.  result ].
but anyway that return value is thrown away in
GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodePresentation)>>actOnHighlightAndEvaluate:


So subclassing GLMRubricSmalltalkCodePresentation and overriding
#executionSelectionActions
is perhaps your best bet.  Or some GLM expert provides a nice way for a
user to set this customAssignmentBlock...
  aPresentation highlightEvaluateAndDo: [ :result |
customAssignmentBlock value: result ].
in #executionSelectionActions.

cheers -ben


Re: [Pharo-users] Proof of Concept: FileTree and Fossil

2017-02-27 Thread stepharong

This is cool.
I'm curious to see if we could manage fossil back-end via iceberg.

Stef


On Tue, 28 Feb 2017 01:19:50 +0100, Pierce Ng   
wrote:



Hi all,
I have written a simple integration of FileTree with Fossil to avoid the  
2-step

Pharo- and shell-level work to add/delete/commit files.
At the operating system command prompt, init a new Fossil project:
 os% mkdir ~/repo
  os% cd ~/repo
  os% fossil init myproject.fossil
  project-id: 3c05c3016eeabf8e87816ee218c6a86d3c87b950
  server-id:  ff42bc86dba1a26b1d94b64685f7c09d02581617
  admin-user: laptop-user (initial password is "1fe2ff")
Open the repository:
 os% mkdir ~/myproject
  os% cd ~/myproject
  os% fossil open ~/repo/myproject.fossil
In a fresh Pharo 6 image - I used v60411 - install FossilFileTree:
 Metacello new
baseline: 'FossilFileTree';
repository: 'github://PierceNg/FossilFileTree';
load.
Write code in Pharo. Open Monticello Browser. Add a "fossilfiletree"
repository, using ~/myproject as the directory. Save to said repository
from within Monticello Browser. Done.
Full blog post here:
 http://www.samadhiweb.com/blog/2017.02.28.fossil.filetree.html
Pierce



--
Using Opera's mail client: http://www.opera.com/mail/



Re: [Pharo-users] How to capture the execution of a playground?

2017-02-27 Thread Ben Coman
On Tue, Feb 28, 2017 at 3:12 PM, Ben Coman  wrote:

>
>
> On Tue, Feb 28, 2017 at 11:28 AM, Offray Vladimir Luna Cárdenas <
> offray.l...@mutabit.com> wrote:
>
>> Hi,
>>
>> I would like to store the object resulting from executing a playground.
>> This would imply two steps:
>>
>> - Knowing that the playground content was executed (via the play button
>> or its shortcuts Ctrl + Shift + g or Ctrl + g).
>> - Getting the results of that execution. For example if the result at the
>> end is a string or a dictionary, I would like to get that string or
>> dictionary.
>>
>> Any pointers on how to make that will be welcomed.
>>
>> Cheers,
>>
>> Offray
>>
>> Ps: I still get lost when I search by myself trying to answer questions
>> like the ones above. I imagine that in some way is related with
>> evaluationAction and presentations, by looking for the source code of "do
>> it and go", but still I can't get a functional code snippet to start
>> prototyping.
>>
>>
> In playground, if you evaluate "self halt. 42" at top of the debug stack
> you'll see method...
>Undefined>>DoIt
>self halt.
>^ 42
>
> where stepping
> OVER returns 42 into "value" variable in OpalCompiler>>evaluate
> OVER returns 42 into "result" variable in RubSmalltalkEditor>>evaluate:
> andDo:
> at the end of which stepping
> INTO "^aBlock value: result"  takes you to 
> RubSmalltalkEditor>>highlightEvaluateAndDo:,
> where
> INTO "[:result | aBlock value: result]"takes you to
> GLMPharoScriptPResentation(GLMRubricSmalltalkCodePresentation)>>
> executionSelectionActions
> where changing "aPresentation highlightEvaluateAndDo: [ :result | ] ];
>   to "aPresentation highlightEvaluateAndDo: [ :result
> | self inform: 'Result ' , result printString] ]; "
>and opening a new Playground, then evaluating "42" informs us that 42
> is the result.
>
> Stepping further along, in GLMMorphicPharoScriptRenderer(
> GLMMorphicPharoCodePresentation)>>highlightEvaluateAndDo::
> the value returned from...
> self
>   evaluate: self highlightedTextAsStream
>   andDo: [:result | aBlock value: result. ].
>
> is not 42 but aGLMPharoScriptPresentation.  it might help to change that
> to...
>   andDo: [:result | aBlock value: result.  result ].
> but anyway that return value is thrown away in
> GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodePresentatio
> n)>>actOnHighlightAndEvaluate:
>
>
> So subclassing GLMRubricSmalltalkCodePresentation and overriding
> #executionSelectionActions
> is perhaps your best bet.  Or some GLM expert provides a nice way for a
> user to set this customAssignmentBlock...
>   aPresentation highlightEvaluateAndDo: [ :result |
> customAssignmentBlock value: result ].
> in #executionSelectionActions.
>
> cheers -ben
>
>
>> Ps: I still get lost when I search by myself trying to answer questions
like the ones above. I imagine that in some way is related with
evaluationAction and presentations, by looking for the source code of "do
it and go", but still I can't get a functional code snippet to start
prototyping.

btw, I didn't know any of that 10 minutes ago.  I find it hard to answer
such questions looking at static code. The trick is finding the right place
to drop a "haltOnce" so you can observe the flow of live objects.
Prospective breakpoints generally come from peeking behind menus and button
using halos, or searching for their label strings using Tools > Finder >>
Source.  In this case it was easier since I knew the DoIt was compiled into
code that returned the result and could just trace that flow through.

cheers -ben