Re: [Pharo-users] Zinc: How to use the @ character in an URL

2013-10-24 Thread Olivier Auverlot
Thanks for the improvement. Don't hesitate to contact me if I can help you

Olivier ;-)

Le 22 oct. 2013 à 18:49, Sven Van Caekenberghe a écrit :

 
 On 22 Oct 2013, at 18:27, p...@highoctane.be p...@highoctane.be wrote:
 
 Ok, point taken.
 
 Still, ZnClient is unusable for the intended purpose as is. No matter what 
 encoding, % or not, Olivier cannot get the URL to work. Couldn't the 
 ZnClient use something like the StampClient does: options? (where 
 prefetch-count can be set for example - I also discovered the little inbox 
 thing after some hair pulling sessions BTW).
 
 
 Phil
 
 But Olivier's problem is that he is talking to a server that does not do 
 proper percent decoding, IMHO. A server parsing a URL should resolve all 
 percent encodings, after parsing using the significant delimiters (/ : ? #).
 
 http://foo.com/abc and http://foo.com/%61%62%63 are the same thing, just like 
 http://foo.com/abc@1 and http://foo.com/abc%401 are - again as far as I 
 understand it.
 
 That being said, I am going to study the specs again and might change what 
 gets encoded or not depending on the URL element, instead of encoding 
 aggressively in the better safe than sorry way.
 
 Olivier's suggestion about safer authorisation parsing does make sense and 
 will get added as well - Thanks Olivier !
 
 Sven
 
 PS: BTW, ZnClient has such an option object already.
 
 




Re: [Pharo-users] Zinc: How to use the @ character in an URL

2013-10-24 Thread Sven Van Caekenberghe
Hi Olivier,

Can you please test the latest Zn with your use case ?

You can load ConfigurationOfZincHTTPComponents from StHub and do

  ConfigurationOfZincHTTPComponents project bleedingEdge load.

The are the relevant commits:

===
Name: Zinc-Character-Encoding-Core-SvenVanCaekenberghe.22
Author: SvenVanCaekenberghe
Time: 24 October 2013, 10:40:00.795063 am
UUID: 3d7bc73c-48b3-40af-8c01-5ba533472a92
Ancestors: Zinc-Character-Encoding-Core-SvenVanCaekenberghe.21

Made the default safeSet of ZnPercentEncoder an explicit constant named 
#rfc3986UnreservedCharacters
===
Name: Zinc-Resource-Meta-Core-SvenVanCaekenberghe.21
Author: SvenVanCaekenberghe
Time: 24 October 2013, 10:48:32.342296 am
UUID: 7401fc4c-0f26-46e4-8f7d-b0bf10e8352c
Ancestors: Zinc-Resource-Meta-Core-SvenVanCaekenberghe.20

Rewrote ZnUrl percent encoding to use safe sets per component;
Fixed a bug in ZnUrl#parseAuthority:from:to: where end was not respected (Thx 
Olivier Auverlot);
Removed/renamed ZnResourceMetaUtils class#encodePercent:withEncoding to 
#encodePercent:[safeSet:]encoding:
Added some safeSet constants to ZnResourceMetaUtils
===
Name: Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.13
Author: SvenVanCaekenberghe
Time: 24 October 2013, 10:50:11.698368 am
UUID: 2d73205c-3415-4597-8d98-abcff1e16259
Ancestors: Zinc-Resource-Meta-Tests-SvenVanCaekenberghe.12

Added ZnUrlTests#testComponentSpecificEncoding
Fixed ZnUrlTests#testQueryEncoding
Fixed ZnMimeTypeTests#testLegacy
===

It should work, let me know how it goes ;-)

Sven

On 24 Oct 2013, at 08:01, Olivier Auverlot olivier.auver...@gmail.com wrote:

 Thanks for the improvement. Don't hesitate to contact me if I can help you
 
 Olivier ;-)
 
 Le 22 oct. 2013 à 18:49, Sven Van Caekenberghe a écrit :
 
 
 On 22 Oct 2013, at 18:27, p...@highoctane.be p...@highoctane.be wrote:
 
 Ok, point taken.
 
 Still, ZnClient is unusable for the intended purpose as is. No matter what 
 encoding, % or not, Olivier cannot get the URL to work. Couldn't the 
 ZnClient use something like the StampClient does: options? (where 
 prefetch-count can be set for example - I also discovered the little inbox 
 thing after some hair pulling sessions BTW).
 
 
 Phil
 
 But Olivier's problem is that he is talking to a server that does not do 
 proper percent decoding, IMHO. A server parsing a URL should resolve all 
 percent encodings, after parsing using the significant delimiters (/ : ? #).
 
 http://foo.com/abc and http://foo.com/%61%62%63 are the same thing, just 
 like http://foo.com/abc@1 and http://foo.com/abc%401 are - again as far as I 
 understand it.
 
 That being said, I am going to study the specs again and might change what 
 gets encoded or not depending on the URL element, instead of encoding 
 aggressively in the better safe than sorry way.
 
 Olivier's suggestion about safer authorisation parsing does make sense and 
 will get added as well - Thanks Olivier !
 
 Sven
 
 PS: BTW, ZnClient has such an option object already.
 
 
 
 




Re: [Pharo-users] Zinc: How to use the @ character in an URL

2013-10-24 Thread Olivier Auverlot
Hi Sven,

Fantastic work ! I just tested the new version and it seem that all is ok. 

Olivier ;-)




Re: [Pharo-users] Zinc: How to use the @ character in an URL

2013-10-24 Thread Sven Van Caekenberghe
Good, thanks a lot for the feedback !

Sven

On 24 Oct 2013, at 12:05, Olivier Auverlot olivier.auver...@gmail.com wrote:

 Hi Sven,
 
 Fantastic work ! I just tested the new version and it seem that all is ok. 
 
 Olivier ;-)
 
 




[Pharo-users] Tip: Recovering a broken image

2013-10-24 Thread Bernat Romagosa
Hi list,

I've just recovered a broken image that crashed upon startup. There was
some problem with a SerialPort that stayed open and tried to write/read
into a physical port that didn't exist no more, or something of the sort.

So here's the magic line:

$ bin/myVm shared/MyImage.image eval SmalltalkImage backupTo: 'recover'

This makes a copy of the image into a new image called recover.image, but
as the documentation states:

*Unlike #saveAs: do not transfer the default execution to the new image. *


So there you go!

Hope it helps someone else. :)

-- 
Bernat Romagosa.


Re: [Pharo-users] Tip: Recovering a broken image

2013-10-24 Thread Sven Van Caekenberghe
Hi Bernat,

Interesting, I never heard of #backupTo:

But if recover.image is a copy of MyImage.image, and that last one failed to 
start up, why then would the copy not have the same problem ?

Sven

On 24 Oct 2013, at 13:32, Bernat Romagosa tibabenfortlapala...@gmail.com 
wrote:

 Hi list,
 
 I've just recovered a broken image that crashed upon startup. There was some 
 problem with a SerialPort that stayed open and tried to write/read into a 
 physical port that didn't exist no more, or something of the sort.
 
 So here's the magic line:
 
 $ bin/myVm shared/MyImage.image eval SmalltalkImage backupTo: 'recover'
 
 This makes a copy of the image into a new image called recover.image, but 
 as the documentation states:
 
 Unlike #saveAs: do not transfer the default execution to the new image. 
 
 So there you go!
 
 Hope it helps someone else. :)
 
 -- 
 Bernat Romagosa.




[Pharo-users] Spec Question

2013-10-24 Thread Manfred Kröhnert
Hi everyone,

I finally got around to check back on a Spec question that popped up about
two weeks ago.

At that time I was giving Spec a first try and gathered information from a
couple of sources.
One of them was the draft chapter about Spec from the Pharo for the
Enterprise book.

https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/ws/Spec/Spec.pier.pdf/*view*/

The example has the following method:

TestSpecinitializePresenter
example whenTextIsAccepted: [ changes text: 'The text Changed'.
acceptChanges enable ].


This should change the text of the 'changes' LabelModel when the text
in the 'example' TextModel is accepted.

Now, there the issue for me was that the Label text did not change once
when I typed text into the presented textfield.
Even when I changed the method from 'whenTextIsAccepted:' to
'whenTextChanged:'.
Is this intended or is this an issue with Spec?

Also, it is not clear to me what 'accepting' text means (maybe I didn't
look thoroughly enough).
The method comment just states that it is called when the text is accepted.
Which is kind of self referential ;-)

The OS X Pharo versions I used for testing where newly downloaded Pharo 2.0
and 3.0 from about 2 weeks ago.
They were downloaded from here:
http://files.pharo.org/platform/Pharo2.0-mac.zip
http://files.pharo.org/platform/Pharo3.0-mac.zip

Best,
Manfred


Re: [Pharo-users] Spec Question

2013-10-24 Thread Benjamin
Text is accepted when you “save” it (cmd+s)

Ben

On 24 Oct 2013, at 14:05, Manfred Kröhnert mkroehner...@googlemail.com wrote:

 Hi everyone,
 
 I finally got around to check back on a Spec question that popped up about 
 two weeks ago.
 
 At that time I was giving Spec a first try and gathered information from a 
 couple of sources.
 One of them was the draft chapter about Spec from the Pharo for the 
 Enterprise book.
 
 https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/ws/Spec/Spec.pier.pdf/*view*/
 
 The example has the following method:
 
 TestSpecinitializePresenter
 example whenTextIsAccepted: [ changes text: 'The text Changed'. 
 acceptChanges enable ].
 
 This should change the text of the 'changes' LabelModel when the text in the 
 'example' TextModel is accepted.
 
 Now, there the issue for me was that the Label text did not change once when 
 I typed text into the presented textfield.
 Even when I changed the method from 'whenTextIsAccepted:' to 
 'whenTextChanged:'.
 Is this intended or is this an issue with Spec?
 
 Also, it is not clear to me what 'accepting' text means (maybe I didn't look 
 thoroughly enough).
 The method comment just states that it is called when the text is accepted.
 Which is kind of self referential ;-)
 
 The OS X Pharo versions I used for testing where newly downloaded Pharo 2.0 
 and 3.0 from about 2 weeks ago.
 They were downloaded from here:
 http://files.pharo.org/platform/Pharo2.0-mac.zip
 http://files.pharo.org/platform/Pharo3.0-mac.zip
 
 Best,
 Manfred



Re: [Pharo-users] Spec Question

2013-10-24 Thread Clément Bera
Hey,

Accepting a text usually means the is compiled. To accept a text, right
click on it, then click accept in the contextual menu (at the bottom). You
can also do it with Cmd+s on Mac.

Try again and tell us if the #whenTextIsAccepted: works fine in your image
or not.

Best,



2013/10/24 Benjamin benjamin.vanryseghem.ph...@gmail.com

 Text is accepted when you “save” it (cmd+s)

 Ben

 On 24 Oct 2013, at 14:05, Manfred Kröhnert mkroehner...@googlemail.com
 wrote:

 Hi everyone,

 I finally got around to check back on a Spec question that popped up about
 two weeks ago.

 At that time I was giving Spec a first try and gathered information from a
 couple of sources.
 One of them was the draft chapter about Spec from the Pharo for the
 Enterprise book.


 https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/ws/Spec/Spec.pier.pdf/*view*/

 The example has the following method:

 TestSpecinitializePresenter
 example whenTextIsAccepted: [ changes text: 'The text Changed'. 
 acceptChanges enable ].


 This should change the text of the 'changes' LabelModel when the text in the 
 'example' TextModel is accepted.

 Now, there the issue for me was that the Label text did not change once
 when I typed text into the presented textfield.
 Even when I changed the method from 'whenTextIsAccepted:' to
 'whenTextChanged:'.
 Is this intended or is this an issue with Spec?

 Also, it is not clear to me what 'accepting' text means (maybe I didn't
 look thoroughly enough).
 The method comment just states that it is called when the text is accepted.
 Which is kind of self referential ;-)

 The OS X Pharo versions I used for testing where newly downloaded Pharo
 2.0 and 3.0 from about 2 weeks ago.
 They were downloaded from here:
 http://files.pharo.org/platform/Pharo2.0-mac.zip
 http://files.pharo.org/platform/Pharo3.0-mac.zip

 Best,
 Manfred





Re: [Pharo-users] Spec Question

2013-10-24 Thread Manfred Kröhnert
Hello Ben and Clément,

thanks for the quick reply.
But even when I hit Cmd+s the Text of the label stays the same and the
button is not enabled.
No matter if I use 'whenTextChanged:' or 'whenTextIsAccepted:'.

I only tested this in the Pharo 2.0 image.

Best,
Manfred






On Thu, Oct 24, 2013 at 2:22 PM, Clément Bera bera.clem...@gmail.comwrote:

 Hey,

 Accepting a text usually means the is compiled. To accept a text, right
 click on it, then click accept in the contextual menu (at the bottom). You
 can also do it with Cmd+s on Mac.

 Try again and tell us if the #whenTextIsAccepted: works fine in your
 image or not.

 Best,



 2013/10/24 Benjamin benjamin.vanryseghem.ph...@gmail.com

 Text is accepted when you “save” it (cmd+s)

 Ben

 On 24 Oct 2013, at 14:05, Manfred Kröhnert mkroehner...@googlemail.com
 wrote:

 Hi everyone,

 I finally got around to check back on a Spec question that popped up
 about two weeks ago.

 At that time I was giving Spec a first try and gathered information from
 a couple of sources.
 One of them was the draft chapter about Spec from the Pharo for the
 Enterprise book.


 https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/ws/Spec/Spec.pier.pdf/*view*/

 The example has the following method:

 TestSpecinitializePresenter
 example whenTextIsAccepted: [ changes text: 'The text Changed'. 
 acceptChanges enable ].


 This should change the text of the 'changes' LabelModel when the text in the 
 'example' TextModel is accepted.


 Now, there the issue for me was that the Label text did not change once
 when I typed text into the presented textfield.
 Even when I changed the method from 'whenTextIsAccepted:' to
 'whenTextChanged:'.
 Is this intended or is this an issue with Spec?

 Also, it is not clear to me what 'accepting' text means (maybe I didn't
 look thoroughly enough).
 The method comment just states that it is called when the text is
 accepted.
 Which is kind of self referential ;-)

 The OS X Pharo versions I used for testing where newly downloaded Pharo
 2.0 and 3.0 from about 2 weeks ago.
 They were downloaded from here:
 http://files.pharo.org/platform/Pharo2.0-mac.zip
 http://files.pharo.org/platform/Pharo3.0-mac.zip

 Best,
 Manfred






Re: [Pharo-users] Spec Question

2013-10-24 Thread Benjamin
Can you try in 3.0, since Spec changed *a lot* in the meantime 

Ben

On 24 Oct 2013, at 14:25, Manfred Kröhnert mkroehner...@googlemail.com wrote:

 Hello Ben and Clément,
 
 thanks for the quick reply.
 But even when I hit Cmd+s the Text of the label stays the same and the button 
 is not enabled.
 No matter if I use 'whenTextChanged:' or 'whenTextIsAccepted:'.
 
 I only tested this in the Pharo 2.0 image.
 
 Best,
 Manfred
 
 
 
 
 
 
 On Thu, Oct 24, 2013 at 2:22 PM, Clément Bera bera.clem...@gmail.com wrote:
 Hey,
 
 Accepting a text usually means the is compiled. To accept a text, right click 
 on it, then click accept in the contextual menu (at the bottom). You can also 
 do it with Cmd+s on Mac.
 
 Try again and tell us if the #whenTextIsAccepted: works fine in your image or 
 not.
 
 Best,
 
 
 
 2013/10/24 Benjamin benjamin.vanryseghem.ph...@gmail.com
 Text is accepted when you “save” it (cmd+s)
 
 Ben
 
 On 24 Oct 2013, at 14:05, Manfred Kröhnert mkroehner...@googlemail.com 
 wrote:
 
 Hi everyone,
 
 I finally got around to check back on a Spec question that popped up about 
 two weeks ago.
 
 At that time I was giving Spec a first try and gathered information from a 
 couple of sources.
 One of them was the draft chapter about Spec from the Pharo for the 
 Enterprise book.
 
 https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/ws/Spec/Spec.pier.pdf/*view*/
 
 The example has the following method:
 
 TestSpecinitializePresenter
 example whenTextIsAccepted: [ changes text: 'The text Changed'. 
 acceptChanges enable ].
 
 This should change the text of the 'changes' LabelModel when the text in the 
 'example' TextModel is accepted.
 
 
 
 
 Now, there the issue for me was that the Label text did not change once when 
 I typed text into the presented textfield.
 Even when I changed the method from 'whenTextIsAccepted:' to 
 'whenTextChanged:'.
 Is this intended or is this an issue with Spec?
 
 Also, it is not clear to me what 'accepting' text means (maybe I didn't look 
 thoroughly enough).
 The method comment just states that it is called when the text is accepted.
 Which is kind of self referential ;-)
 
 The OS X Pharo versions I used for testing where newly downloaded Pharo 2.0 
 and 3.0 from about 2 weeks ago.
 They were downloaded from here:
 http://files.pharo.org/platform/Pharo2.0-mac.zip
 http://files.pharo.org/platform/Pharo3.0-mac.zip
 
 Best,
 Manfred
 
 
 



Re: [Pharo-users] Spec Question

2013-10-24 Thread Manfred Kröhnert
Yes, I can do that but it'll have to wait until tomorrow.
Will report back, soon.

Thanks for the help so far,
Manfred




On Thu, Oct 24, 2013 at 2:29 PM, Benjamin 
benjamin.vanryseghem.ph...@gmail.com wrote:

 Can you try in 3.0, since Spec changed *a lot* in the meantime

 Ben

 On 24 Oct 2013, at 14:25, Manfred Kröhnert mkroehner...@googlemail.com
 wrote:

 Hello Ben and Clément,

 thanks for the quick reply.
 But even when I hit Cmd+s the Text of the label stays the same and the
 button is not enabled.
 No matter if I use 'whenTextChanged:' or 'whenTextIsAccepted:'.

 I only tested this in the Pharo 2.0 image.

 Best,
 Manfred






 On Thu, Oct 24, 2013 at 2:22 PM, Clément Bera bera.clem...@gmail.comwrote:

 Hey,

 Accepting a text usually means the is compiled. To accept a text, right
 click on it, then click accept in the contextual menu (at the bottom). You
 can also do it with Cmd+s on Mac.

 Try again and tell us if the #whenTextIsAccepted: works fine in your
 image or not.

 Best,



 2013/10/24 Benjamin benjamin.vanryseghem.ph...@gmail.com

 Text is accepted when you “save” it (cmd+s)

 Ben

 On 24 Oct 2013, at 14:05, Manfred Kröhnert mkroehner...@googlemail.com
 wrote:

 Hi everyone,

 I finally got around to check back on a Spec question that popped up
 about two weeks ago.

 At that time I was giving Spec a first try and gathered information from
 a couple of sources.
 One of them was the draft chapter about Spec from the Pharo for the
 Enterprise book.


 https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/ws/Spec/Spec.pier.pdf/*view*/

 The example has the following method:

 TestSpecinitializePresenter
 example whenTextIsAccepted: [ changes text: 'The text Changed'. 
 acceptChanges enable ].


 This should change the text of the 'changes' LabelModel when the text in 
 the 'example' TextModel is accepted.



 Now, there the issue for me was that the Label text did not change once
 when I typed text into the presented textfield.
 Even when I changed the method from 'whenTextIsAccepted:' to
 'whenTextChanged:'.
 Is this intended or is this an issue with Spec?

 Also, it is not clear to me what 'accepting' text means (maybe I didn't
 look thoroughly enough).
 The method comment just states that it is called when the text is
 accepted.
 Which is kind of self referential ;-)

 The OS X Pharo versions I used for testing where newly downloaded Pharo
 2.0 and 3.0 from about 2 weeks ago.
 They were downloaded from here:
 http://files.pharo.org/platform/Pharo2.0-mac.zip
 http://files.pharo.org/platform/Pharo3.0-mac.zip

 Best,
 Manfred








Re: [Pharo-users] Spec Question

2013-10-24 Thread Benjamin
Ok :)

Thank you, and see you tomorrow :P

Ben

On 24 Oct 2013, at 14:34, Manfred Kröhnert mkroehner...@googlemail.com wrote:

 Yes, I can do that but it'll have to wait until tomorrow.
 Will report back, soon.
 
 Thanks for the help so far,
 Manfred
 
 
 
 
 On Thu, Oct 24, 2013 at 2:29 PM, Benjamin 
 benjamin.vanryseghem.ph...@gmail.com wrote:
 Can you try in 3.0, since Spec changed *a lot* in the meantime 
 
 Ben
 
 On 24 Oct 2013, at 14:25, Manfred Kröhnert mkroehner...@googlemail.com 
 wrote:
 
 Hello Ben and Clément,
 
 thanks for the quick reply.
 But even when I hit Cmd+s the Text of the label stays the same and the 
 button is not enabled.
 No matter if I use 'whenTextChanged:' or 'whenTextIsAccepted:'.
 
 I only tested this in the Pharo 2.0 image.
 
 Best,
 Manfred
 
 
 
 
 
 
 On Thu, Oct 24, 2013 at 2:22 PM, Clément Bera bera.clem...@gmail.com wrote:
 Hey,
 
 Accepting a text usually means the is compiled. To accept a text, right 
 click on it, then click accept in the contextual menu (at the bottom). You 
 can also do it with Cmd+s on Mac.
 
 Try again and tell us if the #whenTextIsAccepted: works fine in your image 
 or not.
 
 Best,
 
 
 
 2013/10/24 Benjamin benjamin.vanryseghem.ph...@gmail.com
 Text is accepted when you “save” it (cmd+s)
 
 Ben
 
 On 24 Oct 2013, at 14:05, Manfred Kröhnert mkroehner...@googlemail.com 
 wrote:
 
 Hi everyone,
 
 I finally got around to check back on a Spec question that popped up about 
 two weeks ago.
 
 At that time I was giving Spec a first try and gathered information from a 
 couple of sources.
 One of them was the draft chapter about Spec from the Pharo for the 
 Enterprise book.
 
 https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/ws/Spec/Spec.pier.pdf/*view*/
 
 The example has the following method:
 
 TestSpecinitializePresenter
 example whenTextIsAccepted: [ changes text: 'The text Changed'. 
 acceptChanges enable ].
 
 This should change the text of the 'changes' LabelModel when the text in 
 the 'example' TextModel is accepted.
 
 
 
 
 
 Now, there the issue for me was that the Label text did not change once 
 when I typed text into the presented textfield.
 Even when I changed the method from 'whenTextIsAccepted:' to 
 'whenTextChanged:'.
 Is this intended or is this an issue with Spec?
 
 Also, it is not clear to me what 'accepting' text means (maybe I didn't 
 look thoroughly enough).
 The method comment just states that it is called when the text is accepted.
 Which is kind of self referential ;-)
 
 The OS X Pharo versions I used for testing where newly downloaded Pharo 2.0 
 and 3.0 from about 2 weeks ago.
 They were downloaded from here:
 http://files.pharo.org/platform/Pharo2.0-mac.zip
 http://files.pharo.org/platform/Pharo3.0-mac.zip
 
 Best,
 Manfred
 
 
 
 
 



Re: [Pharo-users] Tip: Recovering a broken image

2013-10-24 Thread Bernat Romagosa
Yes, but you'll have the opportunity to fix whatever broke it before saving
and opening the image again.


2013/10/24 Sven Van Caekenberghe s...@stfx.eu

 Yes, I understand - I read that, but the next time you start your new
 recover.image they will run again, no ? Resulting in the same problem as
 the original image, or not ?

 On 24 Oct 2013, at 14:34, Bernat Romagosa tibabenfortlapala...@gmail.com
 wrote:

  Because:
 
  ”Unlike #saveAs: do not transfer the default execution to the new image.
 
  So the startup and shutdown scripts won't be executed :)
 
  (Or that's what I understood)
  On Oct 24, 2013 1:54 PM, Sven Van Caekenberghe s...@stfx.eu wrote:
  Hi Bernat,
 
  Interesting, I never heard of #backupTo:
 
  But if recover.image is a copy of MyImage.image, and that last one
 failed to start up, why then would the copy not have the same problem ?
 
  Sven
 
  On 24 Oct 2013, at 13:32, Bernat Romagosa 
 tibabenfortlapala...@gmail.com wrote:
 
   Hi list,
  
   I've just recovered a broken image that crashed upon startup. There
 was some problem with a SerialPort that stayed open and tried to write/read
 into a physical port that didn't exist no more, or something of the sort.
  
   So here's the magic line:
  
   $ bin/myVm shared/MyImage.image eval SmalltalkImage backupTo:
 'recover'
  
   This makes a copy of the image into a new image called
 recover.image, but as the documentation states:
  
   Unlike #saveAs: do not transfer the default execution to the new image.
  
   So there you go!
  
   Hope it helps someone else. :)
  
   --
   Bernat Romagosa.
 
 





-- 
Bernat Romagosa.


[Pharo-users] Has anyone tried?

2013-10-24 Thread Friedrich Dominicus
To use PetitParser for XSD Parsing and generation of Smalltalk code
based on this Parsing?

Regards
Friedrich



Re: [Pharo-users] Three copies of JSON-ul.35 on Smalltalkhub

2013-10-24 Thread Paul DeBruicker
Hi Stef,

Will you please add me to the PharoExtras/JSON repo?


Thanks

Paul



On Oct 23, 2013, at 2:09 PM, Stéphane Ducasse stephane.duca...@inria.fr wrote:

 
 On Oct 23, 2013, at 10:25 PM, Paul DeBruicker pdebr...@gmail.com wrote:
 
 There are (at least) three locations of the JSON-ul.35 package on 
 Smalltalkhub.  
 
 Here:
 http://smalltalkhub.com/#!/~NicolasPetton/JSON/
 
 here:
 http://smalltalkhub.com/#!/~PharoExtras/JSON/
 
 and here:
 http://smalltalkhub.com/#!/~pdebruic/JSONg
 
 
 
 I've also unknowingly duplicated Stef's efforts at making a 
 ConfigurationOfJSON again here:
 
 http://smalltalkhub.com/#!/~pdebruic/JSONg (but this version includes the 
 JSON port to Gemstone)
 
 
 Which of the above should we treat as the canonical JSON repository?   
 
 If you want to have access to the PharoExtras just ask.
 I like the idea that a team can maintain a set of used libraries.
 
 
 Thanks
 
 
 Paul
 
 




Re: [Pharo-users] Three copies of JSON-ul.35 on Smalltalkhub

2013-10-24 Thread Damien Cassou
On Thu, Oct 24, 2013 at 6:26 PM, Paul DeBruicker pdebr...@gmail.com wrote:
 Will you please add me to the PharoExtras/JSON repo?


what is your login please?

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

Success is the ability to go from one failure to another without
losing enthusiasm.
Winston Churchill



[Pharo-users] Reset Spec #openWorldWithSpec:

2013-10-24 Thread btc


Message #openWorldWithSpec: sets a Spec entity to take up the whole 
World.  How can that be reverted? ...to set the World back to the state 
delivered with a virgin Pharo image?


cheers -ben



Re: [Pharo-users] Three copies of JSON-ul.35 on Smalltalkhub

2013-10-24 Thread Paul DeBruicker
pdebruic


Thanks Damien!



On Oct 24, 2013, at 9:30 AM, Damien Cassou damien.cas...@gmail.com wrote:

 On Thu, Oct 24, 2013 at 6:26 PM, Paul DeBruicker pdebr...@gmail.com wrote:
 Will you please add me to the PharoExtras/JSON repo?
 
 
 what is your login please?
 
 -- 
 Damien Cassou
 http://damiencassou.seasidehosting.st
 
 Success is the ability to go from one failure to another without
 losing enthusiasm.
 Winston Churchill
 




Re: [Pharo-users] Reset Spec #openWorldWithSpec:

2013-10-24 Thread Benjamin
eh

Basically what is done when you open a spec as world is that the background 
color changed,
all the morph are closed, and the spec is specified to take all the space.

So to revert it, I think you *only* need to close the spec morph, 
set the background color to white, and voilà

Ben

On 24 Oct 2013, at 18:51, b...@openinworld.com wrote:

 
 Message #openWorldWithSpec: sets a Spec entity to take up the whole World.  
 How can that be reverted? ...to set the World back to the state delivered 
 with a virgin Pharo image?
 
 cheers -ben
 



Re: [Pharo-users] Pharo 2.0 with RFBServer with -headless

2013-10-24 Thread Srikumar Karaikudi Subramanian
Following up ..

Almost as soon as I'd written this up, I realized I hadn't tried one
thing ... and that worked :)

1. I took the base image from get.pharo.org that I was using on the server,
2. Launched pharo using Pharo2.0.app on that image (with GUI),
3. Installed RFB using the Gofer part of the command in my previous mail,
4. Started the RFB server by running the RFB server part of the script,
5. Did save and quit,
6. Uploaded the new image to my server,
7. Ran in it headless mode.

Now it works! ... but I'm still at a loss to explain why this
worked but the following steps done entirely on the server via scripts
didn't -

1. Save and quit after just installing RFB (the Gofer part).
2. Save and quit after starting the RFB server.
3. Run the resultant image in -headless mode.

It looks like I had to get the image to be modified by Pharo2.0.app 
in order for this to work.

Hope this helps someone else struggling with the same thing.

Best,
-Kumar

On 25 Oct, 2013, at 8:54 AM, Srikumar Karaikudi Subramanian 
srikuma...@gmail.com wrote:

 Hi,
 
 Since this is my first post, I'd first like to say Pharo rocks!
 After quite a bit of search for a server-side programming environment
 that I can live with, I landed on Pharo/Zinc+family and went
 this is it! for my project which is like a wiki for music 
 notation.
 
 I'm trying to setup a pharo+zinc server with RFB installed on a VPS
 so I can access it through VNC (Chicken of the VNC on MacOS 10.8.5).
 I'm only get a static image of the pharo environment when I connect 
 and I don't get any interactivity at all. One other poster [1] who 
 mentioned this also posted that the problem was solved with a 
 later version of squeak, which I didn't have any luck with since I don't
 have X configured on my server.
 
 Much appreciate any tips.
 
 I got pharo from get.pharo.org and cloned the image using save.
 I run the following script on the cloned image with 
 the -headless flag (I tried with and without the flag.)
 
 begin code---
 Gofer it
 squeaksource: 'MetacelloRepository';
 package: 'ConfigurationOfRFB';
 load.
 (Smalltalk at: #ConfigurationOfRFB) load.
 
 (RFBServer current)
  allowEmptyPasswords: false;
  allowRemoteConnections: false;
  allowInteractiveConnections: true;
  allowZRLE: true;
  setFullPassword: 'my password';
  start: 0.
 
 [1 hour asDelay wait] repeat.
 end code
 
 One other point - if I save an image after loading the RFB package 
 (using Smalltalk snapshot: true andQuit: true.) and then 
 launch with a script that only starts the server, I get a static black screen
 instead and not even the static image. So I don't understand why
 there should be a behaviour difference between the two as well.
 
 Regards to all,
 -Kumar
 
 [1] http://groups.yahoo.com/neo/groups/squeak/conversations/topics/141662



signature.asc
Description: Message signed with OpenPGP using GPGMail