Re: [Pharo-users] Using Playgrounds as a notepad

2016-01-05 Thread Peter Uhnák
> Out of curiosity, is it possible to access any other data on the
clipboard.

At least for linux this is most likely not possible, as the underlying VM
code requests unicode string (that's what I remember when I was debugging
it about a year ago). In X11 clipboard, the client must explicitly request
the type of content he is interested in.

On Tue, Jan 5, 2016 at 8:14 AM, Dimitris Chloupis 
wrote:

> you need to accept the contents in order for the workspace to store your
> text, you can use either right click menu and accept or the shortcut that
> menus shows then you can get the contents as a string via
>
> ws := Workspace open.
> "type text and then accept it"
> ws contents asString
>
>
> On Tue, Jan 5, 2016 at 3:57 AM Andy Burnett <
> andy.burn...@knowinnovation.com> wrote:
>
>> @Dimitris
>>
>> Thanks for the Workspace idea. That is pretty much what I am looking for.
>> However, I am struggling to get it to behave the way I want.
>> When I type into the Workspace, and then inspect
>>
>> ws contents
>>
>> I just get an empty string. Is there a simple way to get the ws to update
>> its contents so that I can access it?
>>
>> @Sven, @Doru. Thanks. The Clipboard approach is very slick. I will use
>> that for the time being. Out of curiosity, is it possible to access any
>> other data on the clipboard. For instance, if I copy a pictured from my
>> desktop, is that accessible via the Clipboard object? I only saw text
>> oriented methods.
>>
>> Thanks
>> Andy
>>
>


Re: [Pharo-users] Browsing shortucts

2016-01-05 Thread Thierry Goubier
2016-01-05 14:42 GMT+01:00 David Allouche :

> Strangely, I am not able get any response from Ctrl-TAB, which is
> essential to tab out of a text widget.
>
> Looking with the inspector, it looks like it SHOULD do what I need, but it
> appears that the keyboard event does not get there.
>
> How can I get a transcript output for every detected keyboard event? I
> suspect that maybe something system-wide in MacOS is intercepting the event.
>

At high level, do

KMLog setDebug

(and get a transcript open)

to stop it, do

KMLog removeDebug.

(This will give you Keymapping behavior, but remember that: any app can add
a key processing on a morph instance manually, and that many morphs have
hardwired shortcuts such as navigation keys)

At a lower level, you can trace or add a watchpoint inside:

HandMorph>>#generateKeyboardEvent:

Use that if you don't see your ctrl+tab at the Keymapping level.

Thierry


>
>
> On 5 Jan 2016, at 14:35, Dimitris Chloupis  wrote:
>
> nope thats only the shortcuts of nautilus , a tiny fraction
>
> so what I did was the following
>
> Open playground and inspect
>
> KMKeymap allInstances .
>
> and it returns me
>
> 538
>
> now unless those are duplicates as well, which i doubt from the looks of
> it it that means we have 6 shortcuts more than emacs, so pharo has more
> shortcuts than emacs
>
>
> http://superuser.com/questions/768540/how-many-keyboard-shortcuts-are-in-emacs
>
> ah the irony is too strong in this one
>
> Please correct me if i am wrong because this is huge news for me :D
>
>
> On Tue, Jan 5, 2016 at 3:22 PM Sven Van Caekenberghe  wrote:
>
>> World Menu > System > Keymap Browser ?
>>
>> > On 05 Jan 2016, at 14:16, Dimitris Chloupis 
>> wrote:
>> >
>> > Hey guys I remember a way to open the inspector for browsing all
>> available keyboard shortcuts in pharo but I cannot find it via google,
>> anyone remembers the way to do this ?
>>
>>
>>
>


Re: [Pharo-users] Slow object printOn: with EURO symbol

2016-01-05 Thread Henrik Johansen

> On 05 Jan 2016, at 3:20 , Hilaire  wrote:
> 
> Le 05/01/2016 14:38, Sven Van Caekenberghe a écrit :
>> The problem can does also be restated: it is really necessary for a tool to 
>> convert 1000s of items to strings, even if only 10s are shown at the same 
>> time on a screen ?
>> 
>> I believe that fast table tries to do better here.
> But I need to show 1000s of them once, all in the same view, at the same
> time.
> 
> Hilaire

I think Sven was referring to opening an inspector, where you usually only see 
10-20 items in a list at once, even if the total number of items is much larger.
The new FastTable/List/Tree/WhateverItsCalled are much better suited for this, 
instead of creating the 1500 Strings that can potentially be shown before even 
opening the inspector, it creates the 20 or so that will actually be shown, 
then generates the rest as you scroll.

Cheers,
Henry


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Slow object printOn: with EURO symbol

2016-01-05 Thread Hilaire
Le 05/01/2016 15:45, Henrik Johansen a écrit :
>>> I believe that fast table tries to do better here.
>> > But I need to show 1000s of them once, all in the same view, at the same
>> > time.
>> > 
>> > Hilaire
> I think Sven was referring to opening an inspector, where you usually only 
> see 10-20 items in a list at once, even if the total number of items is much 
> larger.
> The new FastTable/List/Tree/WhateverItsCalled are much better suited for 
> this, instead of creating the 1500 Strings that can potentially be shown 
> before even opening the inspector, it creates the 20 or so that will actually 
> be shown, then generates the rest as you scroll.
Got it

Thanks

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





Re: [Pharo-users] Working with a compressed Fuel file?

2016-01-05 Thread Stephan Eggermont

On 03-01-16 20:31, Mariano Martinez Peck wrote:

I may have a hint. Which is the error upon materialization? A dnu on the
stream? Which message?


Here is a further problem. I've done:

|project|
Gofer it
smalltalkhubUser: 'StephanEggermont' project: 'MonticelloProjects';
package: 'MonticelloProjects';
load.

project := (Smalltalk at: #MCProject) new location: 
'http://source.squeak.org/VMMaker'.

project read.
project repository: nil.
FLSerializer serialize: project toFileNamed: 'VMMaker.fl'.

That takes a while (downloads 5 GB or so).
It results in a 1.2 GB Fuel file.
That is way too much, so somewhere I'm pulling in too many objects,
or they are not recognized as equal.

Writing out the 71712 unique definitions in this project separately is 
54MB. The project consists of 17 packages with 2723 package versions, 
the total number of pointers to the definitions is 2.2 million.

The total should be below 100MB

Stephan





Re: [Pharo-users] Dolphin Smalltalk open-sourced...

2016-01-05 Thread Pierce Ng
On Tue, Jan 05, 2016 at 01:45:13PM +0100, H. Hirzel wrote:
> Did you use this
> http://www.pocketsmalltalk.com/sif/contents/sifall.zip link (labeled
> 'sifall'.zip) to download the code?

Yes, that's the zip file I used.

Pierce



Re: [Pharo-users] Browsing shortucts

2016-01-05 Thread Sven Van Caekenberghe

> On 05 Jan 2016, at 14:35, Dimitris Chloupis  wrote:
> 
> nope thats only the shortcuts of nautilus , a tiny fraction

How so ?

This is part of what it shows on 50511



Clearly not just Nautilus, but many elements and components of the system.

Are we looking at the same thing ?

Re: [Pharo-users] Browsing shortucts

2016-01-05 Thread Dimitris Chloupis
I am an idiot , sorry, I though you were talking about nautilus shortcut
dialog

yeah thats what i am looking for 200+ shortcuts

ok so I was wrong , still not bad at all :)

On Tue, Jan 5, 2016 at 4:04 PM Thierry Goubier 
wrote:

> 2016-01-05 14:42 GMT+01:00 David Allouche :
>
>> Strangely, I am not able get any response from Ctrl-TAB, which is
>> essential to tab out of a text widget.
>>
>> Looking with the inspector, it looks like it SHOULD do what I need, but
>> it appears that the keyboard event does not get there.
>>
>> How can I get a transcript output for every detected keyboard event? I
>> suspect that maybe something system-wide in MacOS is intercepting the event.
>>
>
> At high level, do
>
> KMLog setDebug
>
> (and get a transcript open)
>
> to stop it, do
>
> KMLog removeDebug.
>
> (This will give you Keymapping behavior, but remember that: any app can
> add a key processing on a morph instance manually, and that many morphs
> have hardwired shortcuts such as navigation keys)
>
> At a lower level, you can trace or add a watchpoint inside:
>
> HandMorph>>#generateKeyboardEvent:
>
> Use that if you don't see your ctrl+tab at the Keymapping level.
>
> Thierry
>
>
>>
>>
>> On 5 Jan 2016, at 14:35, Dimitris Chloupis  wrote:
>>
>> nope thats only the shortcuts of nautilus , a tiny fraction
>>
>> so what I did was the following
>>
>> Open playground and inspect
>>
>> KMKeymap allInstances .
>>
>> and it returns me
>>
>> 538
>>
>> now unless those are duplicates as well, which i doubt from the looks of
>> it it that means we have 6 shortcuts more than emacs, so pharo has more
>> shortcuts than emacs
>>
>>
>> http://superuser.com/questions/768540/how-many-keyboard-shortcuts-are-in-emacs
>>
>> ah the irony is too strong in this one
>>
>> Please correct me if i am wrong because this is huge news for me :D
>>
>>
>> On Tue, Jan 5, 2016 at 3:22 PM Sven Van Caekenberghe 
>> wrote:
>>
>>> World Menu > System > Keymap Browser ?
>>>
>>> > On 05 Jan 2016, at 14:16, Dimitris Chloupis 
>>> wrote:
>>> >
>>> > Hey guys I remember a way to open the inspector for browsing all
>>> available keyboard shortcuts in pharo but I cannot find it via google,
>>> anyone remembers the way to do this ?
>>>
>>>
>>>
>>


Re: [Pharo-users] Slow object printOn: with EURO symbol

2016-01-05 Thread Hilaire
Le 05/01/2016 14:38, Sven Van Caekenberghe a écrit :
> The problem can does also be restated: it is really necessary for a tool to 
> convert 1000s of items to strings, even if only 10s are shown at the same 
> time on a screen ? 
>
> I believe that fast table tries to do better here.
But I need to show 1000s of them once, all in the same view, at the same
time.

Hilaire

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





[Pharo-users] Ctrl-tab not working

2016-01-05 Thread David Allouche

> On 5 Jan 2016, at 15:03, Thierry Goubier  wrote:
> 
> 2016-01-05 14:42 GMT+01:00 David Allouche  >:
> Strangely, I am not able get any response from Ctrl-TAB, which is essential 
> to tab out of a text widget.
> 
> Looking with the inspector, it looks like it SHOULD do what I need, but it 
> appears that the keyboard event does not get there.
> 
> How can I get a transcript output for every detected keyboard event? I 
> suspect that maybe something system-wide in MacOS is intercepting the event.
> 
> At high level, do
> 
> KMLog setDebug
> 
> (and get a transcript open)
> 
> to stop it, do
> 
> KMLog removeDebug.
> 
> (This will give you Keymapping behavior, but remember that: any app can add a 
> key processing on a morph instance manually, and that many morphs have 
> hardwired shortcuts such as navigation keys)
> 
> At a lower level, you can trace or add a watchpoint inside:
> 
> HandMorph>>#generateKeyboardEvent:
> 
> Use that if you don't see your ctrl+tab at the Keymapping level.
> 
> Thierry
>  

Thanks.

I added some logging statements to HandMorph>>#generateKeyboardEvent: and they 
show that this method is not run at all for Ctrl-Tab keyDown events.

But it is run for Ctrl-Tab  keyUp events, and it returns a keyEvent for those.

It does not look like there is a OS level shortcut override for Ctrl-Tab, since 
it works correctly, in Safari for example (switch tabs).

Could it be a bug in the VM? I am running the Pharo 4.0 release VM and image.

Can anyone else running MacOS can confirm that Ctrl-TAB works for them in Pharo?



Re: [Pharo-users] Slow object printOn: with EURO symbol

2016-01-05 Thread Ben Coman
On Tue, Jan 5, 2016 at 10:20 PM, Hilaire  wrote:
> Le 05/01/2016 14:38, Sven Van Caekenberghe a écrit :
>> The problem can does also be restated: it is really necessary for a tool to 
>> convert 1000s of items to strings, even if only 10s are shown at the same 
>> time on a screen ?
>>
>> I believe that fast table tries to do better here.
> But I need to show 1000s of them once, all in the same view, at the same
> time.

Is it that the same 1000 strings are being rendered multiple times a
second?  I had a similar problem with Roassal 1 with a unicode char
massively slowing down to UI.  I managed to achieve fairly normal
response time by cached the Freetype calculated width of the string.
I found the right place to do this by both profiling the whole system,
and just the rendering by wrapping MessaeTally around the code of
fullDrawOn: .

Then I cache both the string and its calculated length from the
rendering code, then if the cached string is the same as current I
just returned the cached length.

Sorry I can't be clearer.
cheers -ben



Re: [Pharo-users] Using Playgrounds as a notepad

2016-01-05 Thread stepharo
This is where I would like our tools to try not to be smarter but let us 
do what we want.


Stef

Le 4/1/16 02:21, Andy Burnett a écrit :
I often find that I need to do simple manipulations to passages of 
text, e.g. remove all carriage returns, or extract email addresses etc.


Pasting the text into a Playground doesn't work because there is 
always an apostrophe, or line break or... etc. and the playground 
complains.


Is there a way to tell a Playground to just ignore the text, and give 
me a handle to its contents, so that I can then do something like


playgroundId contents splitOn:Character space.

Alternatively, is there another object that would be more appropriate? 
Playground would be really useful just because it is in the menu, and 
always available.


Cheers
Andy





Re: [Pharo-users] Lawsuit Tracker app

2016-01-05 Thread stepharo



I encourage people to provide correct project descriptions.


I updated a couple of my configs.


Good reaction!

Stef



cheers,
Esteban



Sincerely,
Gour

--
In the material world, one who is unaffected by whatever good
or evil he may obtain, neither praising it nor despising it,
is firmly fixed in perfect knowledge.








Re: [Pharo-users] Working with a compressed Fuel file?

2016-01-05 Thread Stephan Eggermont

On 05-01-16 16:29, Stephan Eggermont wrote:

Writing out the 71712 unique definitions in this project separately is
54MB. The project consists of 17 packages with 2723 package versions,
the total number of pointers to the definitions is 2.2 million.
The total should be below 100MB


Thanks to the help of Max and Thierry I found the problem.

Set withAll: (MCVersionInfo allInstances collect: [  :each | each id ]) 7155

MCVersionInfo allInstances size 2726588

2030 versions of VMMaker-> 2029+2028+2027+...+1 MCVersionInfo's ideally...

Stephan






Re: [Pharo-users] Browsing shortucts

2016-01-05 Thread Dimitris Chloupis
nope thats only the shortcuts of nautilus , a tiny fraction

so what I did was the following

Open playground and inspect

KMKeymap allInstances .

and it returns me

538

now unless those are duplicates as well, which i doubt from the looks of it
it that means we have 6 shortcuts more than emacs, so pharo has more
shortcuts than emacs

http://superuser.com/questions/768540/how-many-keyboard-shortcuts-are-in-emacs

ah the irony is too strong in this one

Please correct me if i am wrong because this is huge news for me :D


On Tue, Jan 5, 2016 at 3:22 PM Sven Van Caekenberghe  wrote:

> World Menu > System > Keymap Browser ?
>
> > On 05 Jan 2016, at 14:16, Dimitris Chloupis 
> wrote:
> >
> > Hey guys I remember a way to open the inspector for browsing all
> available keyboard shortcuts in pharo but I cannot find it via google,
> anyone remembers the way to do this ?
>
>
>


Re: [Pharo-users] Browsing shortucts

2016-01-05 Thread Dimitris Chloupis
looks like that it does not contain the global shortcuts like how you open
the playground etc
all am i still missing something ?

On Tue, Jan 5, 2016 at 4:12 PM Dimitris Chloupis 
wrote:

> I am an idiot , sorry, I though you were talking about nautilus shortcut
> dialog
>
> yeah thats what i am looking for 200+ shortcuts
>
> ok so I was wrong , still not bad at all :)
>
> On Tue, Jan 5, 2016 at 4:04 PM Thierry Goubier 
> wrote:
>
>> 2016-01-05 14:42 GMT+01:00 David Allouche :
>>
>>> Strangely, I am not able get any response from Ctrl-TAB, which is
>>> essential to tab out of a text widget.
>>>
>>> Looking with the inspector, it looks like it SHOULD do what I need, but
>>> it appears that the keyboard event does not get there.
>>>
>>> How can I get a transcript output for every detected keyboard event? I
>>> suspect that maybe something system-wide in MacOS is intercepting the event.
>>>
>>
>> At high level, do
>>
>> KMLog setDebug
>>
>> (and get a transcript open)
>>
>> to stop it, do
>>
>> KMLog removeDebug.
>>
>> (This will give you Keymapping behavior, but remember that: any app can
>> add a key processing on a morph instance manually, and that many morphs
>> have hardwired shortcuts such as navigation keys)
>>
>> At a lower level, you can trace or add a watchpoint inside:
>>
>> HandMorph>>#generateKeyboardEvent:
>>
>> Use that if you don't see your ctrl+tab at the Keymapping level.
>>
>> Thierry
>>
>>
>>>
>>>
>>> On 5 Jan 2016, at 14:35, Dimitris Chloupis 
>>> wrote:
>>>
>>> nope thats only the shortcuts of nautilus , a tiny fraction
>>>
>>> so what I did was the following
>>>
>>> Open playground and inspect
>>>
>>> KMKeymap allInstances .
>>>
>>> and it returns me
>>>
>>> 538
>>>
>>> now unless those are duplicates as well, which i doubt from the looks of
>>> it it that means we have 6 shortcuts more than emacs, so pharo has more
>>> shortcuts than emacs
>>>
>>>
>>> http://superuser.com/questions/768540/how-many-keyboard-shortcuts-are-in-emacs
>>>
>>> ah the irony is too strong in this one
>>>
>>> Please correct me if i am wrong because this is huge news for me :D
>>>
>>>
>>> On Tue, Jan 5, 2016 at 3:22 PM Sven Van Caekenberghe 
>>> wrote:
>>>
 World Menu > System > Keymap Browser ?

 > On 05 Jan 2016, at 14:16, Dimitris Chloupis 
 wrote:
 >
 > Hey guys I remember a way to open the inspector for browsing all
 available keyboard shortcuts in pharo but I cannot find it via google,
 anyone remembers the way to do this ?



>>>


[Pharo-users] [ANN] The next Pharo Sprints (Lille)

2016-01-05 Thread Marcus Denker
Hello,

We looked at the calendar and fixed the dates for all public sprints that we 
will do this
year here locally. These are all Fridays:

29 Januar
26 Feb
25 March
29 April
27 May

They will be at the Inria Lille, Building B, third floor (RMoD offices).
Remotely, you can join us on Slack or the IRC channel #pharo on
irc.freenode.net server. During the sprint, we will try to synchronize
local and remote Pharo sprinters.

One nice idea is to organise local sprints yourself. E.g. over the last
sprints we had one in Chile at the same time.

Marcus





Re: [Pharo-users] Lawsuit Tracker app

2016-01-05 Thread Alexandre Bergel
I did the same
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



> On Jan 5, 2016, at 4:00 PM, stepharo  wrote:
> 
>> 
>> I updated a couple of my configs.
> 
> Good reaction!



Re: [Pharo-users] Interogation about recursivity or sequential

2016-01-05 Thread Alexandre Bergel
Recursivity is usually better to read, understand. However sequential is 
usually more efficient (but harder to implement right).

Cheers,
Alexandre

> On Jan 4, 2016, at 6:11 PM, Yann Dubois  wrote:
> 
> Hello World, Happy new year 2016 !
> 
> I actually work on an integration of a double linked list on Pharo and I have 
> a little interogation.
> It's better to use recursivity or senquential algorithm ?
> 
> Yann

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






Re: [Pharo-users] Lawsuit Tracker app

2016-01-05 Thread Sven Van Caekenberghe

> On 04 Jan 2016, at 12:07, Esteban Lorenzano  wrote:
> 
>> 
>> On 04 Jan 2016, at 11:23, Saša Janiška  wrote:
>> 
>> On Ned, 2016-01-03 at 12:49 +0100, Esteban Lorenzano wrote:
>> 
>>> you have it:
>>> 
>>> http://catalog.pharo.org
>> 
>> That's nice, but there are, imho, too many pkgs with "No description
>> provided", so maybe that should be made as mandatory?
> 
> it is mandatory… but people does not provide them, and we could reject the 
> projects, but then they will be irremediable lost. 
> So we took the “least pain” path. 
> 
> I encourage people to provide correct project descriptions.

I updated a couple of my configs.

> cheers, 
> Esteban
> 
>> 
>> 
>> Sincerely,
>> Gour
>> 
>> -- 
>> In the material world, one who is unaffected by whatever good 
>> or evil he may obtain, neither praising it nor despising it, 
>> is firmly fixed in perfect knowledge.




[Pharo-users] Crash or locked VM

2016-01-05 Thread Hilaire
Hi,

I have a situation with a recursive Dr. Geo script where the image crash
or get locked (Can't hold on the image).
I tried with latest VM as detailed in the joined crash dump.

I did not get similar problem with other recursive script. So I may have
very special interaction between the objects, but I did not find out.

It may also be related to Morph because when instantiating first the
canvas and its window (2nd line of the script), then the rest of the
script, it does not crash.

The crashing image itself can be found there in case of usefulness
https://www.dropbox.com/s/rur8ayt8eon6mab/drgeo.image.zip?dl=0

When not crashing it outputs this cherry tree.

Thanks

Hilaire

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

Segmentation fault Tue Jan  5 21:17:54 2016


/home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/pharo
pharo VM version: 3.9-7 #1 Thu Dec 24 00:36:34 CET 2015 gcc 4.6.3 [Production 
ITHB VM]
Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.21 uuid: 
4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Dec 24 2015
With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.21 uuid: 
4d9b9bdf-2dfa-4c0b-99eb-5b110dadc697 Dec 24 2015
Revision: https://github.com/pharo-project/pharo-vm.git Commit: 
bad6fa2684afcf1d7cdb485f11049a4a4290fbc8 Date: 2015-12-14 12:47:06 +0100 By: 
Esteban Lorenzano  Jenkins build #15025
Build host: Linux pharo-linux 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 
16:39:45 UTC 2012 i686 i686 i386 GNU/Linux
plugin path: /home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/ 
[default: /home/hilaire/Travaux/Developpement/DrGeoII/trunk/build/tmp/]


C stack backtrace & registers:
eax 0xff9d4e24 ebx 0xff9d4d40 ecx 0xff9d4dd8 edx 0xff9d4d8c
edi 0xff9d4c10 esi 0xff9d4c10 ebp 0xff9d4ca8 esp 0xff9d4cf4
eip 0xff9d4f08
*[0xff9d4f08]
./pharo[0x80a3332]
./pharo[0x80a3696]
[0xf770a410]
./pharo[0x8084627]
./pharo[0x8085311]
./pharo(incrementalGC+0x212)[0x80874c2]
./pharo[0x80876fa]
./pharo[0x8087ad7]
./pharo[0x8087bba]
./pharo(ceStackOverflow+0x54)[0x8089c04]
[0xb4968260]
[0xb4a1f936]
[0xb4a20f50]
[0xb4a20de4]
[0xb4a206d1]
[0xb4a224b6]
[0xb4a20508]
[0xb4968648]
[0x442]


Smalltalk stack dump:
0xff9e6e9c M Association(Magnitude)>max: 0xb634e1f0: a(n) Association
0xff9e6ec8 M Rectangle class>origin:extent: 0xb4cc0f44: a(n) Rectangle class
0xff9e6ef8 M INVALID RECEIVER>insetRectangle: 0xb634e194 is in old space
0xff9e6f14 M Float(Rectangle)>insetBy: 0xb63468f8: a(n) Float
0xff9e6f30 M DrGDrawable(Morph)>innerBounds 0xb6339b18: a(n) DrGDrawable
0xff9e6f48 M DrGDrawable(Morph)>clippingBounds 0xb6339b18: a(n) DrGDrawable
0xff9e6f68 M DrGDrawable(Morph)>invalidRect:from: 0xb6339b18: a(n) DrGDrawable
0xb634e214 is not a context

Most recent primitives
new:
at:put:
new:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
millisecondClockValue
basicNew
new:
millisecondClockValue
basicNew
at:put:
at:put:
at:put:
at:put:
basicNew
@
@
basicNew
@
basicNew
@
@
basicNew
@
@
@
@
@
@
perform:with:
truncated
truncated
@
@
@
basicNew
@
@
basicNew
compare:with:collated:
compare:with:collated:
@
@
perform:with:
@
@
@
basicNew
@
new:
at:put:
at:put:
perform:with:
truncated
fractionPart
truncated
perform:with:
truncated
bitShiftMagnitude:
+
hashBytes:startingWith:
digitCompare:
digitCompare:
perform:with:
truncated
@
@
perform:with:
@
@
@
new:
at:put:
new:
replaceFrom:to:with:startingAt:
replaceFrom:to:with:startingAt:
millisecondClockValue
basicNew
new:
millisecondClockValue
basicNew
at:put:
at:put:
at:put:
at:put:
basicNew
@
@
basicNew
@
basicNew
@
@
basicNew
@
@
@
@
@
@
basicNew
@
@
basicNew
@
perform:with:
perform:with:
@
perform:with:
perform:with:
@
basicNew
basicNew
@
@
basicNew
@
perform:with:
perform:with:
@
perform:with:
perform:with:
@
basicNew
perform:with:
perform:with:
@
perform:with:
perform:with:
@
basicNew
at:put:
basicNew
basicNew
new:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
@
@
basicNew
@
basicNew
@
@
basicNew
@
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated
fractionPart
truncated
truncated
basicNew
truncated
fractionPart
fractionPart
truncated
fractionPart
truncated

Re: [Pharo-users] Using Playgrounds as a notepad

2016-01-05 Thread Andy Burnett
Thanks everyone!
I completely forgot that I should ctrl+s on the workspace. I think I have
just become too used to google docs etc., and it didn't occur to me that I
had to save in order to update a model.

Right, I now have two ways forward, and they both look useful for different
problems.

ws := Workspace open

Gives me a simple way to paste in text, and do some initial hand editing

Clipboard clipboardText

Will be great when I know there is a 'clean-up' method that I need to run
on e.g. a table I have grabbed from the web.

Cheers
Andy


[Pharo-users] Browsing shortucts

2016-01-05 Thread Dimitris Chloupis
Hey guys I remember a way to open the inspector for browsing all available
keyboard shortcuts in pharo but I cannot find it via google, anyone
remembers the way to do this ?


Re: [Pharo-users] Browsing shortucts

2016-01-05 Thread Sven Van Caekenberghe
World Menu > System > Keymap Browser ?

> On 05 Jan 2016, at 14:16, Dimitris Chloupis  wrote:
> 
> Hey guys I remember a way to open the inspector for browsing all available 
> keyboard shortcuts in pharo but I cannot find it via google, anyone remembers 
> the way to do this ?




Re: [Pharo-users] Slow object printOn: with EURO symbol

2016-01-05 Thread Hilaire
Agree.
Nevertheless, the performance impact I got on OOP way of doing things
can't be wiped out: when you ask an object to give its text
representation but use non latin1 character, you get an important
penalty. In the long term, it looks like a problem for Pharo.

Hilaire


Le 05/01/2016 13:20, Sven Van Caekenberghe a écrit :
> 0450822759String with ByteString and WideString subclasses has been a 
> standard feature of Squeak/Pharo for a long time. The transparent automatic 
> conversion between the two is a feature, not a limitation.
>
> In se, there is nothing wrong with it.
>
> Yes, other representations of Strings are possible, but is is far from sure 
> that they would be faster overall. The current implementation favours Latin1 
> (and thus ASCII), because that is so common. In my work image I count them as 
> follows:
>
> ByteString allInstances size. "301498"
>
> WideString allInstances size. "136"
>
> That is less than 0.05%.
>
>> On 05 Jan 2016, at 13:08, Hilaire  wrote:
>>
>> Le 04/01/2016 11:05, Henrik Johansen a écrit :
>>> In the fallback code for WriteStream >> #nextPut:, at:put: is called,  so 
>>> yes, streaming a wide char causes the streams collection to be converted 
>>> from Byte to WideString.
>>> Conversion is done using become, which currently triggers a full heap scan 
>>> for references, and is thus very slow.
>>> One could add a fast-path along the lines of #pastEndPut: (which has 
>>> already broken any assumption that a reference to the collection will 
>>> reflect all writes for the lifetime of stream, for the same performance 
>>> problems one would face using #become:); if collection is a ByteString and 
>>> anObject is a wide characters, replace collection with a WideString, and 
>>> *then* call at:put:
>>> But, it is not a very nice thing to add to a generic streaming class, nor 
>>> is it a very attractive at this point in time considering that making 
>>> become: a fast operation is one of the problems solved by Spur.
>> So wait and see for Spur?
>> To not forget about it, it is recorded here, and it should be kept open
>> for later check:
>> https://pharo.fogbugz.com/f/cases/17315/Slow-object-printOn-with-EURO-symbol
>>
>> It is  possible to turn around this problem, but this sort of annoyance
>> with Pharo internal encoding regularly arises, so I am not sure what to
>> think about the state of Pharo regarding internal encoding. Now days is
>> not supposed to be all utf-8?
>>
>> Thanks
>>
>> Hilaire
>>
>> -- 
>> Dr. Geo
>> http://drgeo.eu
>>
>>
>>
>
>


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





Re: [Pharo-users] Determining if a Process is waiting on a Semaphore

2016-01-05 Thread Guillermo Polito
Ben, did that help you?

> On 30 dic 2015, at 12:49 p.m., Guillermo Polito  
> wrote:
> 
> A bit more on that:
> 
> Processor activeProcess suspendingList. => nil “An active process has nil as 
> a list"
> Processor activeProcess isSuspended. => true??
> 
> 
> p := [  ] forkAt: 30.
> p suspendingList. => “the list where it is waiting ready to run"
> p isSuspended. => false?
> 
> s := Semaphore new.
> p := ([ s wait ] forkAt: 50). 
> p suspendingList. => “the semaphore where it is waiting to be unsuspended, 
> since a semaphore is a list"
> p isSuspended. => false?
> 
> It is evident that a suspended process has the list where it is waiting, and 
> the active process has nil.
> Then, I think the problem is that isSuspended is wrong.
> 
> isSuspended
>   ^myList isNil or: [ myList isEmpty ]
> 
> When it should be maybe
> 
> isSuspended
>   ^myList notNil
> 
> 
> Am I wrong?
> 
> Then, to actually answer your question, you can check if you are waiting in a 
> semaphore or not, you can compare that the suspendingList is = to the 
> semaphore. Of course we should also revise the API ^^.
> 
> s := Semaphore new.
> p := ([ s wait ] forkAt: 50). 
> p suspendingList == s
> 
> Guille
> 
> 
>> On 30 dic 2015, at 5:35 a.m., Ben Coman  wrote:
>> 
>> Looking at at the primitive comment in...
>> Semaphore>>wait
>>"excessSignals>0
>>   ifTrue: [excessSignals := excessSignals-1]
>>   ifFalse: [self addLastLink: Processor activeProcess suspend]"
>> 
>> I expected/hoped the following...
>>  Transcript clear.
>>  s := Semaphore new.
>>  p := [ Transcript crShow: '1'. s wait. Transcript crShow: '2' ] forkAt: 50.
>>  Transcript crShow: p isSuspended.
>>  s signal.
>> 
>> would produce
>> 1
>> true
>> 2
>> 
>> but I get
>> 1
>> false
>> 2
>> 
>> How do I determine from another thread if a Process is waiting on a
>> Semaphore,  or even better, waiting on a particular semaphore?
>> 
>> cheers -ben
>> 
> 




Re: [Pharo-users] Using Playgrounds as a notepad

2016-01-05 Thread Dimitris Chloupis
you really have tons of options what we told you is just the tip of the
icebeg, for example you can still use the playground if you enclose your
text inside single quotes which will convert it to a pharo string or double
quotes which will convert to a comment. Having it as a string gives you a
lot of parsing abilities to extract any info you want. The string class
comes with methods like substrings , tokens etc but my favorite way is
regex that can do some pretty complex detections.

TextMorph also comes with PlugableTextMorph which includes a scroll bare
for long text and there is also the option to auto accept any new contents
so you dont have to manually accept them.

If your get info from websites then its better to use BeautifulSoupd a
library specialised on extracting information from websites the easy way.

Stating exactly what you want with actual examples will allows us to help
you more with a specific solution. Pharo is huge with around 800 thousands
method spacking an enormous amount of features making it comparable even
with behemoths like Java :)

On Tue, Jan 5, 2016 at 11:32 PM Andy Burnett <
andy.burn...@knowinnovation.com> wrote:

> Thanks everyone!
> I completely forgot that I should ctrl+s on the workspace. I think I have
> just become too used to google docs etc., and it didn't occur to me that I
> had to save in order to update a model.
>
> Right, I now have two ways forward, and they both look useful for
> different problems.
>
> ws := Workspace open
>
> Gives me a simple way to paste in text, and do some initial hand editing
>
> Clipboard clipboardText
>
> Will be great when I know there is a 'clean-up' method that I need to run
> on e.g. a table I have grabbed from the web.
>
> Cheers
> Andy
>


Re: [Pharo-users] Slow object printOn: with EURO symbol

2016-01-05 Thread Hilaire
Le 04/01/2016 11:05, Henrik Johansen a écrit :
> In the fallback code for WriteStream >> #nextPut:, at:put: is called,  so 
> yes, streaming a wide char causes the streams collection to be converted from 
> Byte to WideString.
> Conversion is done using become, which currently triggers a full heap scan 
> for references, and is thus very slow.
> One could add a fast-path along the lines of #pastEndPut: (which has already 
> broken any assumption that a reference to the collection will reflect all 
> writes for the lifetime of stream, for the same performance problems one 
> would face using #become:); if collection is a ByteString and anObject is a 
> wide characters, replace collection with a WideString, and *then* call at:put:
> But, it is not a very nice thing to add to a generic streaming class, nor is 
> it a very attractive at this point in time considering that making become: a 
> fast operation is one of the problems solved by Spur.
So wait and see for Spur?
To not forget about it, it is recorded here, and it should be kept open
for later check:
https://pharo.fogbugz.com/f/cases/17315/Slow-object-printOn-with-EURO-symbol

It is  possible to turn around this problem, but this sort of annoyance
with Pharo internal encoding regularly arises, so I am not sure what to
think about the state of Pharo regarding internal encoding. Now days is
not supposed to be all utf-8?

Thanks

Hilaire

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





Re: [Pharo-users] Slow object printOn: with EURO symbol

2016-01-05 Thread Sven Van Caekenberghe
String with ByteString and WideString subclasses has been a standard feature of 
Squeak/Pharo for a long time. The transparent automatic conversion between the 
two is a feature, not a limitation.

In se, there is nothing wrong with it.

Yes, other representations of Strings are possible, but is is far from sure 
that they would be faster overall. The current implementation favours Latin1 
(and thus ASCII), because that is so common. In my work image I count them as 
follows:

ByteString allInstances size. "301498"

WideString allInstances size. "136"

That is less than 0.05%.

> On 05 Jan 2016, at 13:08, Hilaire  wrote:
> 
> Le 04/01/2016 11:05, Henrik Johansen a écrit :
>> In the fallback code for WriteStream >> #nextPut:, at:put: is called,  so 
>> yes, streaming a wide char causes the streams collection to be converted 
>> from Byte to WideString.
>> Conversion is done using become, which currently triggers a full heap scan 
>> for references, and is thus very slow.
>> One could add a fast-path along the lines of #pastEndPut: (which has already 
>> broken any assumption that a reference to the collection will reflect all 
>> writes for the lifetime of stream, for the same performance problems one 
>> would face using #become:); if collection is a ByteString and anObject is a 
>> wide characters, replace collection with a WideString, and *then* call 
>> at:put:
>> But, it is not a very nice thing to add to a generic streaming class, nor is 
>> it a very attractive at this point in time considering that making become: a 
>> fast operation is one of the problems solved by Spur.
> So wait and see for Spur?
> To not forget about it, it is recorded here, and it should be kept open
> for later check:
> https://pharo.fogbugz.com/f/cases/17315/Slow-object-printOn-with-EURO-symbol
> 
> It is  possible to turn around this problem, but this sort of annoyance
> with Pharo internal encoding regularly arises, so I am not sure what to
> think about the state of Pharo regarding internal encoding. Now days is
> not supposed to be all utf-8?
> 
> Thanks
> 
> Hilaire
> 
> -- 
> Dr. Geo
> http://drgeo.eu
> 
> 
> 




Re: [Pharo-users] Dolphin Smalltalk open-sourced...

2016-01-05 Thread H. Hirzel
Thank you for the report, Pierce.

Did you use this
http://www.pocketsmalltalk.com/sif/contents/sifall.zip link (labeled
'sifall'.zip) to download the code?

--Hannes

On 1/4/16, Pierce Ng  wrote:
> On Mon, Jan 04, 2016 at 02:19:57PM -0300, Esteban A. Maringolo wrote:
>> I cloned the repo and ran BootAll.cmd and it ran right away in my
>> Windows 7 64 bit computer.
>
> The same.
>
> I looked into moving source back and forth, and found an implementation of
> Smalltalk Interchange File (SIF) by Eric Arseneau from the year 2000.  The
> Squeak version files in on Pharo 4 (and Squeak 5) and files some code out
> successfully (after a small change in symbol handling). Similarly the
> Dolphin
> version files in but fails to import a Squeak file-out, because Dolphin
> doesn't
> understand {} in Dictionary class>>newFromPairs:.  Next step is to look at
> the
> compiler I suppose. Down the rabbit hole...
>
> SIF is found here: http://www.pocketsmalltalk.com/sif/. Pocket Smalltalk,
> now that's a very cool thing.
>
> Pierce
>
>