[Pharo-users] bug in debugger?

2016-09-28 Thread Usman Bhatti
Hello,

I have a strange error in my image that results in image start taking up
system memory and crashes when it attains the max. the VM can provide on my
machine (2Gb). I am working on Pharo 4.0 + Spec debugger.

After some digging in the image, I know that the error comes from an
assignment operation (below in bold). And the bug only occurs when the
method initialize is executed as inherited method.
The strange part is that that it does not crash when the value assigned is
slightly different e.g. "nosignature1" instead of "nosignature".

FAMIXInvocation>>initialize
super initialize.
sender := nil.
receiver := nil.
receiverSourceCode := nil.
*signature := 'nosignature'.*
candidates := FMMultiMultivalueLink on: self opposite: #incomingInvocations.

The crash doesn't happen when I override initialize in the subclass without
sending initialize message to the superclass. So this report is about a
very very specific case, but it is there. I tried to analyze further in the
debugger but with announcements, etc. I wasn't able to achieve anything.

So, if someone's interested to have a look, I can provide the image.

regards.

Usman


[Pharo-users] Spur problem?

2016-09-07 Thread Usman Bhatti
Hi,

While working on a Pharo 5 image for 3-4 hours, I got an image crash and I
was no more able to start the image from the UI interface. When starting
the image from the command line I got the following error:

Pharo(50871,0xa02c91a8) malloc: *** error for object 0x1af7a04: incorrect
checksum for freed object - object was probably modified after being freed.

*** set a breakpoint in malloc_error_break to debug

fish: '/Users/ubhatti/temp/vm-spur/Pha…' terminated by signal SIGBUS
(Misaligned address error).

The image is about 973 Mb (Moose + seaside + a model for a big industrial
software). This message might not go beyond reporting an error that I do
not know how to produce neither can I share the image (it contains client
proprietary software model and hence we are restricted).

Just to let you know that there was a problem and n ask if someone has
encountered it before?


regards.

Usman


Re: [Pharo-users] load directive

2015-09-15 Thread Usman Bhatti
On Fri, Sep 11, 2015 at 11:06 PM, Dale Henrichs <
dale.henri...@gemtalksystems.com> wrote:

> Usman,
>
> Off topic --- I don't read all of the pharo posts on both pharo lists, but
> if you put Metacello in the subject, I have an email filter that alerts me
> and I read those (more often:) ...
>

Ok :)


>
> What you are getting with record is what would be loaded in the image, so
> my guess is that in Pharo4.0 there are equivalent or later versions of all
> the packages that would be loaded ...
>

In the versions prior to Pharo4, the directive showed me all the packages
regardless.


>
> If you are interested in seeing all of the packages that would be loaded
> (without regard to packages already loaded in image) you can do the
> following:
>
>   ((ConfigurationOfGlamour project version: #stable)
> ignoreImage: true)
> record loadDirective
>

Ok. Thank you for this information.

regards.


>
>
> Dale
>
>
> On 09/11/2015 01:44 AM, Usman Bhatti wrote:
>
> Tx for looking.
>
> I did:
> (ConfigurationOfGlamour project version: #stable) record loadDirective
> in Moose 5.0 (pharo3) and Moose5.1(pharo4).
>
> Here is the difference in the output. And the first (with Pharo3) is much
> more helpful because with a single command one can understand ALL the
> packages loaded. Whereas, in Pharo4, we don't get the complete tree and
> hence one has to see the list of the individual configurations to
> understand.
>
> Pharo3
> linear load :
> linear load : 2.1 [ConfigurationOfGlamour]
> load : ConfigurationOfGrease
> atomic load : 2.1 [ConfigurationOfGlamour]
> load : Glamour-Announcements-tg.5
> load : Glamour-Helpers-TudorGirba.25
> long list continues--
> linear load : 2.162 [ConfigurationOfMondrian]
> load : ConfigurationOfHealthReportProducer
> linear load : 2.162 [ConfigurationOfMondrian]
> load : ConfigurationOfShapeST80
> atomic load : 2.162 [ConfigurationOfMondrian]
> linear load : 1.7 [ConfigurationOfHealthReportProducer]
> load : ConfigurationOfXMLSupport
> atomic load : 1.7 [ConfigurationOfHealthReportProducer]
> explicit load : XMLSupport
> load : ConfigurationOfXMLSupport-monty.75
> load : HealthReportProducer-Ivan_Rojas.13
> load : Nile-Base-DamienCassou.81
> load : Mondrian-ComplexShape-AlexandreBergel.33
> long list continues--
>
> Pharo4
> linear load :
> linear load : 3.3.0 [ConfigurationOfGlamour]
> load : ConfigurationOfMagritte3
> atomic load : 3.3.0 [ConfigurationOfGlamour]
> linear load : 1.14 [ConfigurationOfRoassal2]
> linear load : 11 [ConfigurationOfNeoJSON]
> load : Neo-JSON-Tests-SvenVanCaekenberghe.29
> linear load : 3.5.0 [ConfigurationOfMagritte3]
> load : Magritte-Pharo3-Model
> load : CollectionExtensions-TudorGirba.41
> load : Glamour-Roassal2-Presentations-TudorGirba.38
>
>
>
> regards.
>
> On Thu, Sep 10, 2015 at 8:53 PM, stepharo <steph...@free.fr> wrote:
>
>> (ConfigurationOfStore project version: #stable) record loadDirective
>>
>> linear load :
>> linear load : 0.10 [ConfigurationOfStore]
>> linear load : 0.2 [ConfigurationOfGarage]
>> load : ConfigurationOfTalkFFI
>> linear load : 0.2 [ConfigurationOfGarage]
>> load : Store-StephaneDucasse.13
>>
>>
>
>


Re: [Pharo-users] load directive

2015-09-11 Thread Usman Bhatti
Tx for looking.

I did:
(ConfigurationOfGlamour project version: #stable) record loadDirective
in Moose 5.0 (pharo3) and Moose5.1(pharo4).

Here is the difference in the output. And the first (with Pharo3) is much
more helpful because with a single command one can understand ALL the
packages loaded. Whereas, in Pharo4, we don't get the complete tree and
hence one has to see the list of the individual configurations to
understand.

Pharo3
linear load :
linear load : 2.1 [ConfigurationOfGlamour]
load : ConfigurationOfGrease
atomic load : 2.1 [ConfigurationOfGlamour]
load : Glamour-Announcements-tg.5
load : Glamour-Helpers-TudorGirba.25
long list continues--
linear load : 2.162 [ConfigurationOfMondrian]
load : ConfigurationOfHealthReportProducer
linear load : 2.162 [ConfigurationOfMondrian]
load : ConfigurationOfShapeST80
atomic load : 2.162 [ConfigurationOfMondrian]
linear load : 1.7 [ConfigurationOfHealthReportProducer]
load : ConfigurationOfXMLSupport
atomic load : 1.7 [ConfigurationOfHealthReportProducer]
explicit load : XMLSupport
load : ConfigurationOfXMLSupport-monty.75
load : HealthReportProducer-Ivan_Rojas.13
load : Nile-Base-DamienCassou.81
load : Mondrian-ComplexShape-AlexandreBergel.33
long list continues--

Pharo4
linear load :
linear load : 3.3.0 [ConfigurationOfGlamour]
load : ConfigurationOfMagritte3
atomic load : 3.3.0 [ConfigurationOfGlamour]
linear load : 1.14 [ConfigurationOfRoassal2]
linear load : 11 [ConfigurationOfNeoJSON]
load : Neo-JSON-Tests-SvenVanCaekenberghe.29
linear load : 3.5.0 [ConfigurationOfMagritte3]
load : Magritte-Pharo3-Model
load : CollectionExtensions-TudorGirba.41
load : Glamour-Roassal2-Presentations-TudorGirba.38



regards.

On Thu, Sep 10, 2015 at 8:53 PM, stepharo  wrote:

> (ConfigurationOfStore project version: #stable) record loadDirective
>
> linear load :
> linear load : 0.10 [ConfigurationOfStore]
> linear load : 0.2 [ConfigurationOfGarage]
> load : ConfigurationOfTalkFFI
> linear load : 0.2 [ConfigurationOfGarage]
> load : Store-StephaneDucasse.13
>
>


[Pharo-users] load directive

2015-09-10 Thread Usman Bhatti
Hi,

I'm trying to see packages loaded by Metacello. So, in the past, I used to
do:

(ConfigurationOfXXX project version: #stable) record loadDirective

to see the  list of packages resolved and loaded. But in Pharo 4.0, the
list of packages is empty.

How can I obtain the list of packages with the loadDirective?

tx in advance.
usman

P.S: I know GT-Inspector provides a map and a list of packages resolved
"statically". I'm looking to see how the loaded packages are resolved by
Metacello at "runtime".


Re: [Pharo-users] where to report Telescope bugs?

2015-07-20 Thread Usman Bhatti
On Mon, Jul 20, 2015 at 6:40 PM, Peter Uhnák i.uh...@gmail.com wrote:

 Btw subscriptionsDo: is added by Roassal2Spec package, which is not loaded
 into the CI build

 Also load script here http://rmod.inria.fr/web/software/telescope says
 its LeoPerard/Telescope
 while the CI loads Moose/Telescope.


Moose/Telescope is the correct repo.
We'll update the tutorial.





 Peter

 On Mon, Jul 20, 2015 at 6:34 PM, Peter Uhnák i.uh...@gmail.com wrote:

 Hi,

 where do I report Telescope bugs?

 I downloaded latest TL via Pharo Launcher (build #192), but any
 opening/closing interaction doesn't work.

 1. run TLDemosexampleCompositeExploringHierarchy
 2. click on +
 3. error MNU SubscriptionRegistrysubscriptionsDo:

 Also does this Work in progress
 http://rmod.inria.fr/web/software/telescope/tutorial-visualization-developer
 mean that someone is actually working on it, or that it is planned
 someday = I just use the source code for the foreseeable future (or maybe
 if you have some internal docs available)?

 Thanks,
 Peter





[Pharo-users] customizing SystemWindow menu

2015-07-06 Thread Usman Bhatti
Hi,

I wanted to customize system window menu and I could not find a relevant
method to change the default pragma used for menu generation. So, I thought
it will be nice to have this utility method on SystemWindow if possible:

SystemWindowmenuPragmaNamed: aPragmaName model: aModel
menuBuilder := PragmaMenuBuilder pragmaKeyword: aPragmaName model: aModel

May be there is some other, simpler way to achieve it that I missed?

regards,
usman


Re: [Pharo-users] customizing SystemWindow menu

2015-07-06 Thread Usman Bhatti
yep, this is what I was looking for.
Thanks.

Still, it will be nice to have the method I suggested to replace the
default menu.

regards.

On Mon, Jul 6, 2015 at 4:01 PM, Franck Warlouzet 
franck.warlou...@hotmail.fr wrote:

 Hi,

 If I correctly understood, you want to add entries to the system window
 menu ?
 To do that, you can implement the method addModelItemsToWindowMenu: aMenu
 in your class if you want to extend the system window menu.

 Franck

 --
 Date: Mon, 6 Jul 2015 15:53:48 +0200
 From: usman.bha...@gmail.com
 To: pharo-users@lists.pharo.org
 Subject: [Pharo-users] customizing SystemWindow menu


 Hi,

 I wanted to customize system window menu and I could not find a relevant
 method to change the default pragma used for menu generation. So, I thought
 it will be nice to have this utility method on SystemWindow if possible:

 SystemWindowmenuPragmaNamed: aPragmaName model: aModel
 menuBuilder := PragmaMenuBuilder pragmaKeyword: aPragmaName model: aModel

 May be there is some other, simpler way to achieve it that I missed?

 regards,
 usman



[Pharo-users] Glamour: opening paths in tree with filters

2015-06-30 Thread Usman Bhatti
Hi,

I am having trouble with opening a specific path in tree presentation
(using MorphTreeMorph) when filtering nodes.

What I am trying to achieve is that if a node is searched in a tree at
level 4, all the parent nodes are opened to show the node searched (hence
the user the does not need to open the nodes manually).

In Glamour, when combined with filtering, expanding up to the root of the
search node works when the parent node is already expanded, otherwise the
nodes are not expanded. At the end of the mail, there are two snippets to
reproduce the behavior.

MorphTreeMorphaddMorphsTo: from: withExpandedItems: atLevel: is the
method responsible for this behavior in Glamour and it seems that nodes are
only expanded (to show their children) if they were expanded beforehand. Is
there a way to do otherwise in MorphTreeMorph (open paths with non-expanded
nodes)?

tx.

Usman

Code snippets in Glamour (Pharo 4.0):

| tabulator |
tabulator := GLMTabulator new column: [ :c | c row: #one ]; yourself.
tabulator transmit to: #one; andShow: [:a |
a tree
title: 'Show filter paths';
rootsExpanded;
children: [:item :x : level |
 (item  5 and: [ level  6 ])
ifTrue: [ {item + 1}]
ifFalse:[#() ]];
filterOn: [:text :each | text = each asString]].
tabulator openOn: (1 to: 1) searching for 3 does not open the path to 3
?!?!?!

| tabulator | tabulator := GLMTabulator new column: [ :c | c row: #one ];
yourself. tabulator transmit to: #one; andShow: [:a | a tree title: 'Show
filter paths'; rootsExpanded; children: [:item :x : level | (item  3 and:
[ level  5 ]) to stop adding infinite children ifTrue: [ level = 4 plug
a node 5 deep down and see if we can find the path ifTrue: [(1 to: 5)]
ifFalse: [ (1 to: item * 2) ] ] ifFalse:[#() ]]; filterOn: [:text :each |
text = each asString]]. tabulator openOn: (1 to: 2) searching for 5
correctly opens the path up to 5


[Pharo-users] case-insensitive regexp

2015-06-04 Thread Usman Bhatti
Hi,

Some regular expression engines include support for /i flag that makes the
regexp case-insensitive.

In Pharo, regexp matcher can be setup to be case-insensitive (e.g.
'mypattern' asRegexIgnoringCase). But once a matcher is setup as
case-senstive, can we provide a pattern to make its search case-insensitive
using the /i (or a similar flag) in Pharo?

regards.

usman


Re: [Pharo-users] case-insensitive regexp

2015-06-04 Thread Usman Bhatti
Thanks Peter.

On Thu, Jun 4, 2015 at 1:51 PM, Peter Uhnák i.uh...@gmail.com wrote:

 I do not think this is possible. The problem is that the Regex compiles
 (parses) the pattern so once it's created you would have to reparse it.
 Theoretically speaking you could add ignoreCase accessors to RxMatcher but
 it is likely it would break things; or add method to RxMatcher that would
 return a new RxMatcher object with the proper settings.

 Also note that regular expressions in Pharo are not the extended versions,
 where these things are usually available (alongside lookahead/lookbehind
 and other).
 And personally I find the Regex library so awkward to use that I always
 opt for PetitParser.

 
 myParser := 'hello' asParser.
 myParser matches: 'Hello'. false
 myParser caseInsensitive matches: 'Hello'. true
 

 on the other hand there is no option to turn it back again. So if you
 regularly need to switch it back and forth it wouldn't be solution either.

 Peter



Re: [Pharo-users] mac address on windows

2015-05-12 Thread Usman Bhatti
Hi Nicolas,

Thank you for looking at the code.
I was away and could not try your code.

On Thu, May 7, 2015 at 9:27 AM, p...@highoctane.be p...@highoctane.be
wrote:



 On Thu, May 7, 2015 at 1:06 AM, Nicolai Hess nicolaih...@web.de wrote:



 2015-05-06 22:47 GMT+02:00 Henrik Sperre Johansen 
 henrik.s.johan...@veloxit.no:

 A few easily fixed Type/pointers to Types mixups, and a slipup where two
 different classes are confused for the same aside, the real show stopper,
 if I haven't missed something entirely, is that the struct parser/NB in
 general does not handle const sized arrays*, which is used in a few of the
 required structs.

 Extending the parser should be relatively straight forward, along the
 lines of adding
 stream peek: #'[' ifTrue: [stream next.
type := SizedExternalArrayType type: type size: stream next.
stream next = #']' ifFalse: [self error: 'Missing closing bracket for
 ', type printString]]
 to NBExtenralStructureFields  #parseFields:... after the name is read.

 Coding SizedExternalArrayType is a bit more work though...

 Cheers,
 Henry


 *The end goal would be to be able to generate accessors/read/write for a
 simple test-struct such as
 #fieldsDesc
 ^#(
   char   ip[MyClassVar +2];
 )


 Yes, a parser for this would be great.

 I tried it with a little hack

 NBExternalStructure subclass: #Char_260 ...

 Char_260 class#fieldDesc
 ^ #(char data)

 Char_260 classinstanceSize
 ^ 260

 You need another accessor for accessing the data, otherwise you'll only
 get the first char. AND I don't know how
 the external memory is handle, probably it is never freed :)

 Now a complete example (attached code) call it with
 GetMacWin32 getMacAddress



 Code loads fine on my 3.0


same here.



 But hiccup on:


 resolveType: aTypeName
  a type name could be
  - a class variable name
 - a class name
 - a type name
 - a type name, followed by arbitrary number pointer chars - $*

 | name newName resolver binding ptrArity |
  newName := aTypeName.
 ptrArity := 0.
 resolve aliases and pointers
 [
 name := newName trimRight. --- HERE - as newName is a
 subclass of NBExternalStructure, so no trimRight
 newName := self aliasForType: name.
 newName last = $* ifTrue: [
 ptrArity := ptrArity + 1.
 newName := newName allButLast ].
 name = newName ] whileFalse.

 I changed to name := newName asString trimRight.


this worked for me.



 Call worked then but output gives this:

 GetMacWin32 getMacAddress 'BYTE_8 (
 data: $¼  -- some weird string here
 )'


It worked for me, I didn't encounter the problem of strange characters.
I get:
000c29ab7096
The last 4 trailing zeros are not the part of the mac address and I am not
sure why these are getting added. I'll have a look at your code.

thanks again.

usman


 Also, I wonder why you call the primGet... twice

 getMacAddressOf: iInterface
 | ptr ptr2 nul ret |
 ptr := NativeBoost allocate: 4.
 nul := NativeBoost allocate: 0.
 ptr nbUInt32AtOffset: 0 put: 0.
 ret := self primGetAdaptersInfo: nul length: ptr.
 ret = 111 ERROR_BUFFER_OVERFLOW
 ifTrue: [
 | size |
 size := ptr nbUInt32AtOffset: 0.
 ptr2 := NativeBoost allocate: size.
 ret := self primGetAdaptersInfo: ptr2 length: ptr.
 ret = 0 NO_ERROR
 ifTrue: [
 | pip numberOfInterfaces|
numberOfInterfaces := size / IpAdapterInfo instanceSize.
(iInterface between:1 and: numberOfInterfaces)  ifFalse:[ ^ nil].
 pip := (NBExternalArray ofType: IpAdapterInfo) onAddress: ptr2 size:
 numberOfInterfaces.
 ^ (pip at:iInterface ) Address asString]].
 ^ nil

 Phil








 On Wed, May 6, 2015 at 5:28 PM, Esteban Lorenzano esteba...@gmail.com
 wrote:


 On 06 May 2015, at 17:03, Nicolai Hess nicolaih...@web.de wrote:



 2015-05-06 16:40 GMT+02:00 Esteban Lorenzano esteba...@gmail.com:


 On 06 May 2015, at 12:10, p...@highoctane.be wrote:

 I've loaded your package.

 A prerequisite is to load OS-Window to make it work.


 why?
 in any case, oswindow is already included in pharo4


 OS-Windows (by TorstenBergmann)

 not
 OSWindow  :)


 ahhh. Name clash :)


 It is needed for the shared pool WinTypes,
 but without OS-Window, he can use NBWinTypes instead.




 Esteban


 I've got the DLL call working nicely and the nativeboost with the
 structure freezing.

 Now, we should all have a look at:

 https://github.com/ronsaldo/bullet-pharo

 and

 https://github.com/ronsaldo/swig

 because it looks like the way to go to wrap libraries...

 Ronie, I know you modified swig for generating Pharo code;

 Is cloning your swig repo the way to go ?


 Phil




 On Wed, May 6, 2015 at 10:39 AM, Usman Bhatti usman.bha...@gmail.com
 wrote:

 Hi Nicolai,

 Here is my package that defines the nativeboost call and associated C
 structs.
 The external C struct is self referencing and hence sometimes I get
 infinite recursion when trying to change field descriptions. That is the
 reason why the automatically generated accessors are absent (although I 
 had
 them in an earlier version).

 Attached also

Re: [Pharo-users] mac address on windows

2015-05-06 Thread Usman Bhatti
On Wed, May 6, 2015 at 9:58 AM, Nicolai Hess nicolaih...@web.de wrote:



 2015-05-06 9:53 GMT+02:00 Usman Bhatti usman.bha...@gmail.com:



 On Tue, May 5, 2015 at 7:34 PM, p...@highoctane.be p...@highoctane.be
 wrote:


 On Tue, May 5, 2015 at 6:28 PM, Usman Bhatti usman.bha...@gmail.com
 wrote:

 I succeeded to do it by encapsulating the C routine as a DLL and doing
 an FFI call from my image (as suggested by Guille).


 At least there was a way!


 Exactly :)



 Looks like this is the most controlled|debuggable way:
   - get it working with C code out of Pharo
   - make a bridge that can be used easily with FFI in a dll
   - use that from Pharo with proven FFI

 Would NativeBoost work with your dll? Should.


 I have read a few resources about Nativeboost but I am still naive to
 know the difference between FFI and nativeboost. The FFI call I made to
 invoke the DLL function looked similar to the nativeboost calls.




 I also tried to perform the nativeboost call by creating my structures
 in Pharo. The function in Windows that can be used to retrieve mac address
 in Windows: GetAdaptersInfo
 https://msdn.microsoft.com/en-us/library/windows/desktop/aa365917%28v=vs.85%29.aspx
  that
 accepts a PIP_ADAPTER_INFO
 https://msdn.microsoft.com/en-us/library/windows/desktop/aa366062(v=vs.85).aspx
  structure.
 I subclassed NBExternalStructure to define this struct and the other used
 by it in the image but my NB call returned with 87 code (Invalid parameter)
 and it was impossible to debug. However, I would like to make this thing
 work to understand what went wrong.


 Has this something to do with 32|64 bit library complications?


 Not exactly. For me, it was more related to the fact that I had to map a
 complex C struct in Pharo. Here is an excerpt of the definition from MSDN:

 typedef struct _IP_ADAPTER_INFO {
   struct _IP_ADAPTER_INFO  *Next;
  ...
   PIP_ADDR_STRING CurrentIpAddress;
   IP_ADDR_STRING  GatewayList;
 ...
 }

 So, I had to define three external structures (all names in capitals) and
 I did the effort but in the end I got an error code that I could not debug
 in the image. Hence, I gave up and opted to go in the native environment.
 But I would like someone knowledgable to have a look at my nativeboost code
  because the nativeboost approach is more simple (everything's in the
 image).


 I can have a look.

 btw. for what do you need the mac address?


hardware lock.









 usman



 Phil


 With ProcessWrapper, I could not load the classes essential for making
 the plugin work.

 HTH,

 Usman




 On Mon, May 4, 2015 at 2:54 PM, Ben Coman b...@openinworld.com wrote:

 As a complete newb to VM building I found this fairly straight forward
 (on a Mac btw).
 https://github.com/pharo-project/pharo-vm
 cheers -ben

 On Mon, May 4, 2015 at 5:28 PM, Usman Bhatti usman.bha...@gmail.com
 wrote:



 On Sun, May 3, 2015 at 4:22 PM, Pierce Ng pie...@samadhiweb.com
 wrote:

 On Sat, May 02, 2015 at 03:55:47PM +0200, Usman Bhatti wrote:
  1/ OSProcess: I tried  (PipeableOSProcess command: 'ipconfig
 /all') output.

 I have used http://www.smalltalkhub.com/#!/~hernan/ProcessWrapper
 successfully
 back when I was on Windows using some now-ancient version of Pharo.


 I had initially discarded the idea of using this project because it
 required a plugin and the information of the plugin was outdated on
 squeaksource. However, having evaluated superficially the complexity of
 doing it with nativeboost (because too many external c struct involved in
 the call), I would like to see if I am better off using this wrapper.

 I loaded it with:

 Gofer it
   url: 'http://www.smalltalkhub.com/mc/hernan/ProcessWrapper/main';
   package: 'ProcessWrapper-Core';
   package: 'ProcessWrapper-Plugin';
   package: 'ProcessWrapper-Tests';
   load.

 But the plugins wont load because it requires the
 class SmartSyntaxInterpreterPlugin and apparently this file is a part of
 the VMMaker. Is there any recent config for VMMaker in Pharo because this
 one looks outdated:

 http://pharo.gemtalksystems.com/book/Virtual-Machine/Building/VMMakerTool/






 Pierce















Re: [Pharo-users] mac address on windows

2015-05-06 Thread Usman Bhatti
On Tue, May 5, 2015 at 7:34 PM, p...@highoctane.be p...@highoctane.be
wrote:


 On Tue, May 5, 2015 at 6:28 PM, Usman Bhatti usman.bha...@gmail.com
 wrote:

 I succeeded to do it by encapsulating the C routine as a DLL and doing an
 FFI call from my image (as suggested by Guille).


 At least there was a way!


Exactly :)



 Looks like this is the most controlled|debuggable way:
   - get it working with C code out of Pharo
   - make a bridge that can be used easily with FFI in a dll
   - use that from Pharo with proven FFI

 Would NativeBoost work with your dll? Should.


I have read a few resources about Nativeboost but I am still naive to know
the difference between FFI and nativeboost. The FFI call I made to invoke
the DLL function looked similar to the nativeboost calls.




 I also tried to perform the nativeboost call by creating my structures in
 Pharo. The function in Windows that can be used to retrieve mac address in
 Windows: GetAdaptersInfo
 https://msdn.microsoft.com/en-us/library/windows/desktop/aa365917%28v=vs.85%29.aspx
  that
 accepts a PIP_ADAPTER_INFO
 https://msdn.microsoft.com/en-us/library/windows/desktop/aa366062(v=vs.85).aspx
  structure.
 I subclassed NBExternalStructure to define this struct and the other used
 by it in the image but my NB call returned with 87 code (Invalid parameter)
 and it was impossible to debug. However, I would like to make this thing
 work to understand what went wrong.


 Has this something to do with 32|64 bit library complications?


Not exactly. For me, it was more related to the fact that I had to map a
complex C struct in Pharo. Here is an excerpt of the definition from MSDN:

typedef struct _IP_ADAPTER_INFO {
  struct _IP_ADAPTER_INFO  *Next;
 ...
  PIP_ADDR_STRING CurrentIpAddress;
  IP_ADDR_STRING  GatewayList;
...
}

So, I had to define three external structures (all names in capitals) and I
did the effort but in the end I got an error code that I could not debug in
the image. Hence, I gave up and opted to go in the native environment. But
I would like someone knowledgable to have a look at my nativeboost code
 because the nativeboost approach is more simple (everything's in the
image).



usman



 Phil


 With ProcessWrapper, I could not load the classes essential for making
 the plugin work.

 HTH,

 Usman




 On Mon, May 4, 2015 at 2:54 PM, Ben Coman b...@openinworld.com wrote:

 As a complete newb to VM building I found this fairly straight forward
 (on a Mac btw).
 https://github.com/pharo-project/pharo-vm
 cheers -ben

 On Mon, May 4, 2015 at 5:28 PM, Usman Bhatti usman.bha...@gmail.com
 wrote:



 On Sun, May 3, 2015 at 4:22 PM, Pierce Ng pie...@samadhiweb.com
 wrote:

 On Sat, May 02, 2015 at 03:55:47PM +0200, Usman Bhatti wrote:
  1/ OSProcess: I tried  (PipeableOSProcess command: 'ipconfig /all')
 output.

 I have used http://www.smalltalkhub.com/#!/~hernan/ProcessWrapper
 successfully
 back when I was on Windows using some now-ancient version of Pharo.


 I had initially discarded the idea of using this project because it
 required a plugin and the information of the plugin was outdated on
 squeaksource. However, having evaluated superficially the complexity of
 doing it with nativeboost (because too many external c struct involved in
 the call), I would like to see if I am better off using this wrapper.

 I loaded it with:

 Gofer it
   url: 'http://www.smalltalkhub.com/mc/hernan/ProcessWrapper/main';
   package: 'ProcessWrapper-Core';
   package: 'ProcessWrapper-Plugin';
   package: 'ProcessWrapper-Tests';
   load.

 But the plugins wont load because it requires the
 class SmartSyntaxInterpreterPlugin and apparently this file is a part of
 the VMMaker. Is there any recent config for VMMaker in Pharo because this
 one looks outdated:

 http://pharo.gemtalksystems.com/book/Virtual-Machine/Building/VMMakerTool/






 Pierce













Re: [Pharo-users] mac address on windows

2015-05-05 Thread Usman Bhatti
I succeeded to do it by encapsulating the C routine as a DLL and doing an
FFI call from my image (as suggested by Guille).

I also tried to perform the nativeboost call by creating my structures in
Pharo. The function in Windows that can be used to retrieve mac address in
Windows: GetAdaptersInfo
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365917%28v=vs.85%29.aspx
that
accepts a PIP_ADAPTER_INFO
https://msdn.microsoft.com/en-us/library/windows/desktop/aa366062(v=vs.85).aspx
structure.
I subclassed NBExternalStructure to define this struct and the other used
by it in the image but my NB call returned with 87 code (Invalid parameter)
and it was impossible to debug. However, I would like to make this thing
work to understand what went wrong.

With ProcessWrapper, I could not load the classes essential for making the
plugin work.

HTH,

Usman




On Mon, May 4, 2015 at 2:54 PM, Ben Coman b...@openinworld.com wrote:

 As a complete newb to VM building I found this fairly straight forward (on
 a Mac btw).
 https://github.com/pharo-project/pharo-vm
 cheers -ben

 On Mon, May 4, 2015 at 5:28 PM, Usman Bhatti usman.bha...@gmail.com
 wrote:



 On Sun, May 3, 2015 at 4:22 PM, Pierce Ng pie...@samadhiweb.com wrote:

 On Sat, May 02, 2015 at 03:55:47PM +0200, Usman Bhatti wrote:
  1/ OSProcess: I tried  (PipeableOSProcess command: 'ipconfig /all')
 output.

 I have used http://www.smalltalkhub.com/#!/~hernan/ProcessWrapper
 successfully
 back when I was on Windows using some now-ancient version of Pharo.


 I had initially discarded the idea of using this project because it
 required a plugin and the information of the plugin was outdated on
 squeaksource. However, having evaluated superficially the complexity of
 doing it with nativeboost (because too many external c struct involved in
 the call), I would like to see if I am better off using this wrapper.

 I loaded it with:

 Gofer it
   url: 'http://www.smalltalkhub.com/mc/hernan/ProcessWrapper/main';
   package: 'ProcessWrapper-Core';
   package: 'ProcessWrapper-Plugin';
   package: 'ProcessWrapper-Tests';
   load.

 But the plugins wont load because it requires the
 class SmartSyntaxInterpreterPlugin and apparently this file is a part of
 the VMMaker. Is there any recent config for VMMaker in Pharo because this
 one looks outdated:
 http://pharo.gemtalksystems.com/book/Virtual-Machine/Building/VMMakerTool/






 Pierce






Re: [Pharo-users] mac address on windows

2015-05-04 Thread Usman Bhatti
On Sun, May 3, 2015 at 4:22 PM, Pierce Ng pie...@samadhiweb.com wrote:

 On Sat, May 02, 2015 at 03:55:47PM +0200, Usman Bhatti wrote:
  1/ OSProcess: I tried  (PipeableOSProcess command: 'ipconfig /all')
 output.

 I have used http://www.smalltalkhub.com/#!/~hernan/ProcessWrapper
 successfully
 back when I was on Windows using some now-ancient version of Pharo.


I had initially discarded the idea of using this project because it
required a plugin and the information of the plugin was outdated on
squeaksource. However, having evaluated superficially the complexity of
doing it with nativeboost (because too many external c struct involved in
the call), I would like to see if I am better off using this wrapper.

I loaded it with:

Gofer it
  url: 'http://www.smalltalkhub.com/mc/hernan/ProcessWrapper/main';
  package: 'ProcessWrapper-Core';
  package: 'ProcessWrapper-Plugin';
  package: 'ProcessWrapper-Tests';
  load.

But the plugins wont load because it requires the
class SmartSyntaxInterpreterPlugin and apparently this file is a part of
the VMMaker. Is there any recent config for VMMaker in Pharo because this
one looks outdated:
http://pharo.gemtalksystems.com/book/Virtual-Machine/Building/VMMakerTool/






 Pierce




[Pharo-users] mac address on windows

2015-05-02 Thread Usman Bhatti
Hello,

Has anyone tried to retrieve MAC address(es) of a windows machine using
Pharo? I have tried two options thus far without any success:

1/ OSProcess: I tried  (PipeableOSProcess command: 'ipconfig /all') output.
This opens a command prompt on windows machine without anything happening
inside it. Although when I try it on Linux/Mac (with ifconfig), I retrieve
the output of the command. Another option is to do OSProcess command:
'ipconfig' but I wasn't able to find a way to retrieve the output of the
command.

2/ Nativeboost comes with a set of built-in command to interact with
Windows (class NBWin32Shell). One can get environment variables, etc. But I
wasn't able to find a way to execute a command on the line and get the
results.


Would someone know of a way to retrieve the MAC addresses in Windows
through the way listed above or any other form from the Pharo image?

thanks in advance,

Usman


Re: [Pharo-users] mac address on windows

2015-05-02 Thread Usman Bhatti
Yes, I already started exploring this path but there are few a problems
that I'll share in another thread.

On Sat, May 2, 2015 at 4:43 PM, p...@highoctane.be p...@highoctane.be
wrote:

 looks like a bit of C code is required.


 http://stackoverflow.com/questions/13646621/how-to-get-mac-address-in-windows-with-c

 Maybe a good time to put the C code generator to the test.

 Phil
 Le 2 mai 2015 15:55, Usman Bhatti usman.bha...@gmail.com a écrit :

 Hello,

 Has anyone tried to retrieve MAC address(es) of a windows machine using
 Pharo? I have tried two options thus far without any success:

 1/ OSProcess: I tried  (PipeableOSProcess command: 'ipconfig /all')
 output. This opens a command prompt on windows machine without anything
 happening inside it. Although when I try it on Linux/Mac (with ifconfig), I
 retrieve the output of the command. Another option is to do OSProcess
 command: 'ipconfig' but I wasn't able to find a way to retrieve the output
 of the command.

 2/ Nativeboost comes with a set of built-in command to interact with
 Windows (class NBWin32Shell). One can get environment variables, etc. But I
 wasn't able to find a way to execute a command on the line and get the
 results.


 Would someone know of a way to retrieve the MAC addresses in Windows
 through the way listed above or any other form from the Pharo image?

 thanks in advance,

 Usman






[Pharo-users] hardware locking an image

2015-03-26 Thread Usman Bhatti
Hi,

Has anyone tried to hardware-lock a Pharo image? That means making Pharo
image work on known hardware only, hence copying and running it on another
machine would not work.

I am thinking about locking with Mac address obtained through OSProcess
calls.

regards.


Re: [Pharo-users] dirty packages

2015-01-29 Thread Usman Bhatti
Thanks Torsten.
Indeed, renaming the package solved the problem.

On Thu, Jan 29, 2015 at 12:11 AM, Torsten Bergmann asta...@gmx.de wrote:

 Because MyPackage and MyPackage-Ext fall into the same
 class categories. The name MyPackage is part of the string
 MyPackage-Ext.

 Packages and class categories are mixed to provide Pharo packages
 and with this you are also still able to use old code or
 import code from other Smalltalks.

 use: MyPackage-Core and MyPackage-Ext or
  MyPackage-Core and MyPackage-Ext-Core

 and you wont have this problem.

 If you follow a proper naming scheme (like Seaside and mainly
 also Pharo) you wont get this problem.

 Bye
 T.





Re: [Pharo-users] dirty packages

2015-01-28 Thread Usman Bhatti
Esteban,

I tried your script in my image. I did not help i.e. dirty packages are
still present in Monticello browser ( and I still do not know why).

On Wed, Jan 28, 2015 at 5:05 PM, Esteban Lorenzano esteba...@gmail.com
wrote:

 You can try rebuilding the rpackage structure.

 1) close all browsers
 2) execute RPackageOrganizer default initializeFromMC

 Esteban

  On 28 Jan 2015, at 16:50, Usman Bhatti usman.bha...@gmail.com wrote:
 
  Hello,
 
  I have two packages MyPackage and MyPackage-Ext. When I load
 MyPackge-Ext, MyPackage becomes dirty and do not have any clue why. When I
 try to see changes in MyPackage in Monticello Browser, the package becomes
 clean again.
 
  There are two possibilities why MyPackage-Ext makes MyPackage dirty:
  - There are names conflict of some sort (MyPackage-Ext can be seen as a
 category for MyPackage).
  - Overriding of the extension methods introduced on the third package.
 Now I wrote a small script to verify it:
  firstCollection := (RPackage organizer packageNamed: 'MyPackage')
 extensionMethods values flatten.
  secondCollection := (RPackage organizer packageNamed: 'MyPackage-Ext')
 extensionMethods values flatten.
  (secondCollection intersection: firstCollection)
  The above script gives empty result so there are no overriding selectors.
 
  Any ideas how can I hack into Monticello to see what is causing
 MyPackage to become dirty while I load the second one manually. May be by
 logging the override load definitions on Transcript?
 
  In general, will it be possible to see overriding without these
 disappearing when doing changes on a dirty package?
 
 
  tx in advance.
 
  Usman
 
 





[Pharo-users] dirty packages

2015-01-28 Thread Usman Bhatti
Hello,

I have two packages MyPackage and MyPackage-Ext. When I load MyPackge-Ext,
MyPackage becomes dirty and do not have any clue why. When I try to see
changes in MyPackage in Monticello Browser, the package becomes clean again.

There are two possibilities why MyPackage-Ext makes MyPackage dirty:
- There are names conflict of some sort (MyPackage-Ext can be seen as a
category for MyPackage).
- Overriding of the extension methods introduced on the third package. Now
I wrote a small script to verify it:
firstCollection := (RPackage organizer packageNamed: 'MyPackage')
extensionMethods values flatten.
secondCollection := (RPackage organizer packageNamed: 'MyPackage-Ext')
extensionMethods values flatten.
(secondCollection intersection: firstCollection)
The above script gives empty result so there are no overriding selectors.

Any ideas how can I hack into Monticello to see what is causing MyPackage
to become dirty while I load the second one manually. May be by logging the
override load definitions on Transcript?

In general, will it be possible to see overriding without these
disappearing when doing changes on a dirty package?


tx in advance.

Usman


Re: [Pharo-users] Metacello does not load the expected version from ConfigOf

2015-01-08 Thread Usman Bhatti
On Wed, Jan 7, 2015 at 8:25 PM, Dale Henrichs 
dale.henri...@gemtalksystems.com wrote:

  Usman,

 No, I appreciate your patience:) If creating your own configuration works
 for you then that is a good route to go...


 Sharing your image will make it much easier for me to get the bottom of
 this (on my own schedule:), so please send me a link for accessing your
 image and I'll dig into this in more detail when I have time ...


Here is the image.
https://dl.dropboxusercontent.com/u/11804892/downgrade-with-metacello.zip

You just need to execute the script in the workspace/playground to
reproduce the problem (i.e. launching the directive to load PP 1.51 and
that not happening).


 If you find yourself stuck and needing the `downgrade directive` again,
 I'll bump up the priority ...


I can still wait till next week. If you could have a look by then, it'll be
great.
tx.
Usman




 Dale


 On 01/07/2015 09:19 AM, Usman Bhatti wrote:



 On Tue, Jan 6, 2015 at 6:56 PM, Dale Henrichs 
 dale.henri...@gemtalksystems.com wrote:


 On 1/6/15 7:16 AM, Usman Bhatti wrote:

  Dale,

  I couldn't make it work with the upgraded Metacello and the script you
 provided.

 Steps I did:

  1. Download moose image:
 https://ci.inria.fr/moose/job/moose-5.0/

  2. Update my Metacello to the 'full' version:
  Metacello new
   baseline: 'Metacello';
   repository: 'github://dalehenrich/metacello-work:master/repository';
   get.
 Metacello new
   baseline: 'Metacello';
   repository: 'github://dalehenrich/metacello-work:master/repository';
   onConflict: [:ex | ex allow];
   load

  3. File in the ConfigurationOfDummyParser (see the first message in the
 thread).

  4.  Run this script to downgrade to PetitParser version 1.51

  Metacello new
 configuration: 'DummyParser';
 version: '1.0';
 repository: '???';
 onDowngradeUseIncoming: #('PetitParser');
 load.

  The desired version is still not loaded, am I missing something here?

 Good question, I don't have a lot of time today to spend time trying to
 reproduce your problem, but if you send me a copy of the Transcript
 produced while doing the load I might be able to spot the problem ...


  It looks to me that the downgrade command is not working. Whenever I
 point to the version preceding the one loaded, the packages are not fetched.

  I am attaching here two files.

  The first (Transcript-PP151) is the output of the transcript as you
 asked. You can see that PetitParser packages as defined by the version 1.51
 are not fetched. All that is loaded is Glamour because the version 1.51 of
 PetitParser loads the latest packages of Glamour. The load works because it
 is an upgrade from the current version of Glamour which is a stable.

  When I saw that only Glamour packages are loaded, I thought of testing
 Glamour downgrade too to see if the problem is specific to PetitParser. You
 can see the result in the second file (Transcript-downgrade-glamour). No
 packages of Glamour are fetched because the configuration tries to
 downgrade it (stable is more recent than 3.0.0 which I try to load).

  In my opinion, downgrade is not working as required. If you want I can
 share my image thru dropbox so that you can have a look to see what might
 be wrong.




  regards,

  A question: I always use Metacello with ConfigOf and have never used
 the scripting API myself or saw it being used elsewhere.
 Can you provide a link that describes the use cases for both: ConfigOf
 vs. Scripting API?

  I've noticed the same thing:)

 My elevator pitch for the script api goes like this:
   1. The scripting api maintains a registry of the actual project
 versions loaded into the image,
   making #currentVersion obsolete. #currentVersion is bad because it
 does a calculation of
   the current version that can be very slow and sometimes completely
 incorrect.
2. The old api has rules that it follows when loading projects (i.e.,
 newer projects always win) and
there is no mechanism for altering those rules. The scripting api
 provides mechanisms for
for bending those rules to fit your needs ... like allowing a
 downgrade of a project.

 Part of the reason that people haven't changed has to do with how
 incredibly difficult it is to change the existing inertia. Another part of
 it is that I continue to support the old way of doing things, so there is
 no explicit motivation to change.

 If you look back 2-3 years in the archives of the Metacello mailing
 list[1] you should be able to find a number of posts where I make a more
 detailed cases for the scripting api:)

 At the end of the day, it isn't important to me to get people to use the
 scripting api, as I said, I continue to support using the old api. I
 figure that when enough people start asking questions about how to bend
 the Metacello rules that folks will begin to use the new scripting api:)


  So, what I learn is that I am trying to bend the rules of Metacello
 which is a rare use case :). I am

Re: [Pharo-users] Metacello does not load the expected version from ConfigOf

2015-01-07 Thread Usman Bhatti
On Tue, Jan 6, 2015 at 6:56 PM, Dale Henrichs 
dale.henri...@gemtalksystems.com wrote:


 On 1/6/15 7:16 AM, Usman Bhatti wrote:

  Dale,

  I couldn't make it work with the upgraded Metacello and the script you
 provided.

 Steps I did:

  1. Download moose image:
 https://ci.inria.fr/moose/job/moose-5.0/

  2. Update my Metacello to the 'full' version:
  Metacello new
   baseline: 'Metacello';
   repository: 'github://dalehenrich/metacello-work:master/repository';
   get.
 Metacello new
   baseline: 'Metacello';
   repository: 'github://dalehenrich/metacello-work:master/repository';
   onConflict: [:ex | ex allow];
   load

  3. File in the ConfigurationOfDummyParser (see the first message in the
 thread).

  4.  Run this script to downgrade to PetitParser version 1.51

  Metacello new
 configuration: 'DummyParser';
 version: '1.0';
 repository: '???';
 onDowngradeUseIncoming: #('PetitParser');
 load.

  The desired version is still not loaded, am I missing something here?

 Good question, I don't have a lot of time today to spend time trying to
 reproduce your problem, but if you send me a copy of the Transcript
 produced while doing the load I might be able to spot the problem ...


It looks to me that the downgrade command is not working. Whenever I point
to the version preceding the one loaded, the packages are not fetched.

I am attaching here two files.

The first (Transcript-PP151) is the output of the transcript as you asked.
You can see that PetitParser packages as defined by the version 1.51 are
not fetched. All that is loaded is Glamour because the version 1.51 of
PetitParser loads the latest packages of Glamour. The load works because it
is an upgrade from the current version of Glamour which is a stable.

When I saw that only Glamour packages are loaded, I thought of testing
Glamour downgrade too to see if the problem is specific to PetitParser. You
can see the result in the second file (Transcript-downgrade-glamour). No
packages of Glamour are fetched because the configuration tries to
downgrade it (stable is more recent than 3.0.0 which I try to load).

In my opinion, downgrade is not working as required. If you want I can
share my image thru dropbox so that you can have a look to see what might
be wrong.




  regards,

  A question: I always use Metacello with ConfigOf and have never used the
 scripting API myself or saw it being used elsewhere.
 Can you provide a link that describes the use cases for both: ConfigOf vs.
 Scripting API?

 I've noticed the same thing:)

 My elevator pitch for the script api goes like this:
   1. The scripting api maintains a registry of the actual project versions
 loaded into the image,
   making #currentVersion obsolete. #currentVersion is bad because it
 does a calculation of
   the current version that can be very slow and sometimes completely
 incorrect.
2. The old api has rules that it follows when loading projects (i.e.,
 newer projects always win) and
there is no mechanism for altering those rules. The scripting api
 provides mechanisms for
for bending those rules to fit your needs ... like allowing a
 downgrade of a project.

 Part of the reason that people haven't changed has to do with how
 incredibly difficult it is to change the existing inertia. Another part of
 it is that I continue to support the old way of doing things, so there is
 no explicit motivation to change.

 If you look back 2-3 years in the archives of the Metacello mailing
 list[1] you should be able to find a number of posts where I make a more
 detailed cases for the scripting api:)

 At the end of the day, it isn't important to me to get people to use the
 scripting api, as I said, I continue to support using the old api. I
 figure that when enough people start asking questions about how to bend
 the Metacello rules that folks will begin to use the new scripting api:)


So, what I learn is that I am trying to bend the rules of Metacello which
is a rare use case :). I am thinking of avoiding this downgrading
altogether by forking to create my own ConfigOf that loads the correct
versions. Downgrading might be an anti-pattern.

Thank you for your patient so far :)

regards.




 Dale
 [1] https://groups.google.com/forum/#!forum/metacello

Loading 1.0 of ConfigurationOfDummyParser...
Project: PetitParser 1.51
Project: Glamour development [3.0-baseline]
Project: GlamourCore development [3.0-baseline]
Fetched - Glamour-Morphic-Brick-AliakseiSyrel.92 --- 
http://smalltalkhub.com/mc/Moose/Glamour/main/ --- 
http://smalltalkhub.com/mc/Moose/Glamour/main/
Project: Rubric development [0.2-baseline]
Fetched - Rubric-AndreiChis.156 --- 
http://smalltalkhub.com/mc/AlainPlantec/Rubric/main/ --- 
http://smalltalkhub.com/mc/AlainPlantec/Rubric/main/
Fetched - Glamour-Morphic-Theme-TudorGirba.195 --- 
http://smalltalkhub.com/mc/Moose/Glamour/main/ --- 
http://smalltalkhub.com/mc/Moose/Glamour/main/
Fetched - Glamour-Morphic-Widgets-AndreiChis

Re: [Pharo-users] Metacello does not load the expected version from ConfigOf

2015-01-06 Thread Usman Bhatti
Dale,

I couldn't make it work with the upgraded Metacello and the script you
provided.

Steps I did:

1. Download moose image:
https://ci.inria.fr/moose/job/moose-5.0/

2. Update my Metacello to the 'full' version:
Metacello new
  baseline: 'Metacello';
  repository: 'github://dalehenrich/metacello-work:master/repository';
  get.
Metacello new
  baseline: 'Metacello';
  repository: 'github://dalehenrich/metacello-work:master/repository';
  onConflict: [:ex | ex allow];
  load

3. File in the ConfigurationOfDummyParser (see the first message in the
thread).

4.  Run this script to downgrade to PetitParser version 1.51

Metacello new
configuration: 'DummyParser';
version: '1.0';
repository: '???';
onDowngradeUseIncoming: #('PetitParser');
load.

The desired version is still not loaded, am I missing something here?

regards,

A question: I always use Metacello with ConfigOf and have never used the
scripting API myself or saw it being used elsewhere.
Can you provide a link that describes the use cases for both: ConfigOf vs.
Scripting API?

On Fri, Jan 2, 2015 at 6:47 PM, Dale Henrichs 
dale.henri...@gemtalksystems.com wrote:

  Usman,

 It is likely that Pharo3.0 is not using the latest version of Metacello.
 You should be able to upgrade to the latest versions following the install
 instructions for Pharo3.0[1].

 Dale

 [1] https://github.com/dalehenrich/metacello-work#pharo30


 On 1/2/15 6:23 AM, Usman Bhatti wrote:

 Dale,

  Thanks for your detailed explanations.

  Metacello class in my image does not seem to define the messages
 described in the documentation for handling downgrading and upgrading
 conflicts:

 https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#downgrade

  I am using Pharo 3.0 with Moose.

  [image: Inline image 1]

  Did I miss something?

  regards,
 Usman

 On Fri, Dec 19, 2014 at 7:00 PM, Dale Henrichs 
 dale.henri...@gemtalksystems.com wrote:

  Usman,

 With classic Metacello (using the `(ConfigurationOfxxx project version:
 'xxx') load` pattern) you can only downgrade via an explicit load of a
 particular version of the project. When loading projects indirectly via a
 project reference from another project Metacello is biased towards upgrade.

 With the Metacello Scripting API[1], you may include an
 #onDowngradeUseIncoming: clause to selectively permit downgrades:

   Metacello new
 configuration: 'DummyParser';
 version: '1.0';
 repository: '???';
 onDowngradeUseIncoming: #('PetitParser');
 load.

 For additional downgrade options see[2].

 Since you are interested in using a specific version of a project you may
 also be interested in locking the project[3][4]. With a `lock` Metacello
 will not upgrade or downgrade the project but always `honor` the lock
 unless an #onLock: clause is used ...

 Note that for `locking` to work, you must use the Metacello Scripting API
 to do all of your project loads ...

 Dale

 [1]
 https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#metacello-user-guide
 [2]
 https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#downgrade
 [3]
 https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#locking
 [4]
 https://github.com/dalehenrich/metacello-work/blob/master/docs/LockCommandReference.md#lock-command-reference


 On 12/19/2014 07:44 AM, Usman Bhatti wrote:

 Hi all,

  I am trying to load a specific version of PetitParser in a Moose image.
 A Moose image comes with the latest development version of PetitParser. So,
 I am trying to downgrade to an older version. So, when I load the version
 manually, older versions of the packages are loaded:
 (ConfigurationOfPetitParser project version: '1.51') load

  But when I try to load the same version within my ConfigOf the expected
 packages are not loaded and list of the PetitParser packages loaded remains
 unchanged. Here is how my baseline looks like:

  ConfigurationOfDummyParserbaseline01: spec
  version: '0.1-baseline'

  spec for: #'common' do: [
  spec blessing: #'baseline'.
  spec project: 'PetitParser' with: [
  spec
  className: #ConfigurationOfPetitParser;
  versionString: '1.51';
  repository: 'http://smalltalkhub.com/mc/Moose/PetitParser/main/' ]. ].

  I also tried creating a version but it didn't help.

  ConfigurationOfDummyParserversion10: spec
  version: '1.0' imports: #('0.1-baseline' )

  spec for: #'common' do: [
  spec blessing: #'stable'.
  spec description: 'version 1.0'.
  spec author: 'usmanbhatti'.
  spec timestamp: '12/19/2014 16:35'.
  spec project: 'PetitParser' with: '1.51'. ].

  I also had a look at the package the configuration tries to load and
 the list shows correct packages to be loaded (see screenshot).

  Does anyone have an idea what may be problematic in my code or that of
 Metacello? I am attaching the code of my ConfigOf for a Moose image.

  Thanks in advance.

  Usman[image: Inline image 1]









Re: [Pharo-users] Metacello does not load the expected version from ConfigOf

2015-01-02 Thread Usman Bhatti
Dale,

Thanks for your detailed explanations.

Metacello class in my image does not seem to define the messages described
in the documentation for handling downgrading and upgrading conflicts:
https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#downgrade

I am using Pharo 3.0 with Moose.

[image: Inline image 1]

Did I miss something?

regards,
Usman

On Fri, Dec 19, 2014 at 7:00 PM, Dale Henrichs 
dale.henri...@gemtalksystems.com wrote:

  Usman,

 With classic Metacello (using the `(ConfigurationOfxxx project version:
 'xxx') load` pattern) you can only downgrade via an explicit load of a
 particular version of the project. When loading projects indirectly via a
 project reference from another project Metacello is biased towards upgrade.

 With the Metacello Scripting API[1], you may include an
 #onDowngradeUseIncoming: clause to selectively permit downgrades:

   Metacello new
 configuration: 'DummyParser';
 version: '1.0';
 repository: '???';
 onDowngradeUseIncoming: #('PetitParser');
 load.

 For additional downgrade options see[2].

 Since you are interested in using a specific version of a project you may
 also be interested in locking the project[3][4]. With a `lock` Metacello
 will not upgrade or downgrade the project but always `honor` the lock
 unless an #onLock: clause is used ...

 Note that for `locking` to work, you must use the Metacello Scripting API
 to do all of your project loads ...

 Dale

 [1]
 https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#metacello-user-guide
 [2]
 https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#downgrade
 [3]
 https://github.com/dalehenrich/metacello-work/blob/master/docs/MetacelloUserGuide.md#locking
 [4]
 https://github.com/dalehenrich/metacello-work/blob/master/docs/LockCommandReference.md#lock-command-reference


 On 12/19/2014 07:44 AM, Usman Bhatti wrote:

 Hi all,

  I am trying to load a specific version of PetitParser in a Moose image.
 A Moose image comes with the latest development version of PetitParser. So,
 I am trying to downgrade to an older version. So, when I load the version
 manually, older versions of the packages are loaded:
 (ConfigurationOfPetitParser project version: '1.51') load

  But when I try to load the same version within my ConfigOf the expected
 packages are not loaded and list of the PetitParser packages loaded remains
 unchanged. Here is how my baseline looks like:

  ConfigurationOfDummyParserbaseline01: spec
  version: '0.1-baseline'

  spec for: #'common' do: [
  spec blessing: #'baseline'.
  spec project: 'PetitParser' with: [
  spec
  className: #ConfigurationOfPetitParser;
  versionString: '1.51';
  repository: 'http://smalltalkhub.com/mc/Moose/PetitParser/main/' ]. ].

  I also tried creating a version but it didn't help.

  ConfigurationOfDummyParserversion10: spec
  version: '1.0' imports: #('0.1-baseline' )

  spec for: #'common' do: [
  spec blessing: #'stable'.
  spec description: 'version 1.0'.
  spec author: 'usmanbhatti'.
  spec timestamp: '12/19/2014 16:35'.
  spec project: 'PetitParser' with: '1.51'. ].

  I also had a look at the package the configuration tries to load and the
 list shows correct packages to be loaded (see screenshot).

  Does anyone have an idea what may be problematic in my code or that of
 Metacello? I am attaching the code of my ConfigOf for a Moose image.

  Thanks in advance.

  Usman[image: Inline image 1]







[Pharo-users] STON - new release?

2014-12-08 Thread Usman Bhatti
Hi Sven,

I have used STON to serialize some of my objects and it is really simple
and cool to work with STON. For my project, I loaded the stable version.
When I tried to customize the names of my classes for serialization using
stonName, I got errors of MetaClass DNU. I saw that you already fixed this
problem a few months back. I loaded recent changes and the problem was
resolved.

I would like to load a newer version of STON with this bug fix. Do you plan
to update ConfigOf with a latest release because I would like to avoid
loading a baseline?

thanks.

usman


Re: [Pharo-users] Kiviat support in Roassal

2014-11-20 Thread Usman Bhatti
Thank you. I'll have a look asap :)

On Thu, Nov 20, 2014 at 1:48 PM, Alexandre Bergel alexandre.ber...@me.com
wrote:

 Hi!

 Pierre just finished a first version of Kiviat in Roassal. Here are some
 example:

 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 b := RTKiviatBuilder new.

 b objects: RTAbstractCircleLayout withAllSubclasses.

 n := RTMultiLinearColorForIdentity new objects: (b objects).
 b shape circle color: [ :value | n rtValue: value named]; size: 10.

 b addMetric: #numberOfLinesOfCode.
 b addMetric: #numberOfMethods.
 b addMetric: #numberOfVariables.

 b activatePolygons.

 b build.
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

 It would be great to have feedback on this!

 Cheers,
 Alexandre

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






[Pharo-users] UI testing

2014-09-30 Thread Usman Bhatti
Hi all,

Is there anything in Pharo that supports UI testing?
What I would like to achieve is to be able to simulate a click, select a
menu item, input some text in text fields, Ok/Cancel button click, and some
other basic task for the automation of my tests.

With Glamour, I can simulate transmissions programatically and then test
for the display values in the presentations or dig the resulting morph
structure to test for specific information. The problem with dialog boxes
is that once launched, I cannot perform anything in the system because my
test code is active only when dialog boxes get their intended input and are
validated.

So, if there is anything for simulating testing scenarios (click on
second button - select third menu item - fill up text field - select
color - ok button - test fourth PanelMorph in the window ), it would be
really helpful and make my testing much more productive.

regards,

usman


Re: [Pharo-users] UI testing

2014-09-30 Thread Usman Bhatti
Tx Marcus.
I'll have a look at what this infrastructure already offers to see if I can
use it directly or with some enhancements.

usman

On Tue, Sep 30, 2014 at 11:22 AM, Marcus Denker marcus.den...@inria.fr
wrote:


 On 30 Sep 2014, at 11:00, Usman Bhatti usman.bha...@gmail.com wrote:

  Hi all,
 
  Is there anything in Pharo that supports UI testing?
  What I would like to achieve is to be able to simulate a click, select a
 menu item, input some text in text fields, Ok/Cancel button click, and some
 other basic task for the automation of my tests.
 
  With Glamour, I can simulate transmissions programatically and then test
 for the display values in the presentations or dig the resulting morph
 structure to test for specific information. The problem with dialog boxes
 is that once launched, I cannot perform anything in the system because my
 test code is active only when dialog boxes get their intended input and are
 validated.
 
  So, if there is anything for simulating testing scenarios (click on
 second button - select third menu item - fill up text field - select
 color - ok button - test fourth PanelMorph in the window ), it would be
 really helpful and make my testing much more productive.
 

 There is UITestCase (see the subclasses), e.g.

 testSimulateClick
 self run: #testSimulateClick

 morph := TextMorph new contents: ''; openInWorld.
 morph simulateClick.
 self assert: morph hasKeyboardFocus.


 But it definitely needs more e.g. for pressing buttons and things like
 that.

 Marcus



[Pharo-users] Mac VM - developer unidentified

2014-09-24 Thread Usman Bhatti
Hi,

Today I downloaded Pharo vm from pharo.org. When I try to open the VM I get
this security notification from Mac and it didn't happen with earlier
versions of Pharo VM. I'm running: OS X 10.9.4 (13E28).


[image: Inline image 1]

I should be able to change my security settings to run it but I prefer not
to and for less knowledgable it can be a negative message.

regards,

usman


Re: [Pharo-users] Mac VM - developer unidentified

2014-09-24 Thread Usman Bhatti
On Wed, Sep 24, 2014 at 11:18 AM, Mircea S. mir...@unom.ro wrote:

 Right click on the app and click Open.

 This time around it will bring up the same screen but with a second button
 that says Open.

 After you click that it will never ask again.


Tx for saving me the effort to google about it :)



 Trimis de pe iPhone-ul meu

 Pe 24.09.2014, la 12:13, Usman Bhatti usman.bha...@gmail.com a scris:

 Hi,

 Today I downloaded Pharo vm from pharo.org. When I try to open the VM I
 get this security notification from Mac and it didn't happen with earlier
 versions of Pharo VM. I'm running: OS X 10.9.4 (13E28).


 Screen Shot 2014-09-24 at 11.07.29 AM.png

 I should be able to change my security settings to run it but I prefer not
 to and for less knowledgable it can be a negative message.

 regards,

 usman




Re: [Pharo-users] Gettext with pharo 3 and seaside 3.1.2

2014-09-08 Thread Usman Bhatti
Hi Peter,

For my application needs (English - French), I normally use the gettext
package from STHub  and it works without any problems for me.
http://smalltalkhub.com/#!/~PharoExtras/Gettext

GetText so far not including in the Configuration Browser but we should
include it. There is also a configurationOf for Gettext and some
explanation in Pharo book how to use the package.
http://pharo.gemtalksystems.com/book/LanguageAndLibraries/Localisation/PreparingImage/

I dont know the seaside version and I have never tested it.

usman


On Sun, Sep 7, 2014 at 3:32 PM, Peter Schorsch trala...@freenet.de wrote:

 Hi,

 Just started with pharo and seaside. Now I want to write an example
 seaside-application but with a multi lingual interface. So I installed
 pharo3 and then seaside via configuration browser.

 But then I had to realize that the seaside-gettext package was not
 installed; and also no gettext package. I found a gettext package in
 the repository http://smalltalkhub.com/mc/PharoExtras/Gettext.

 I installed the package ConfigurationOfGettext, but the
 configuraitonof-browser does not show it. So I installed the package
 Gettext via monticello.

 Then I found the seaside-gettext packages in the repository
 http://smalltalkhub.com/mc/Seaside/Seaside30Addons and installed via
 monticello the packages Seaside-Gettext-Core and
 Seaside-Gettext-Examples.

 Then I open a webbrowser to watch the gettext example. But there I only
 see:

 fontsize

* locale
* locale
* locale
* locale
* locale

 That looks for me like gettext is not working with pharo3 and seaside
 3.1.2

 Any help is welcome - best a mini howto for gettext with pharo3 and
 seaside 3.1.2

 Thanks in advance




Re: [Pharo-users] Updatable trees in Moose browsers (It was Re: Rephrasing my question on Stackoverflow ...)

2014-08-13 Thread Usman Bhatti
Hi Offray,

As Doru mentioned, without a complete example it is difficult to reproduce
and analyze your problem.

For the tree to get updated on node addition or removal, you need to use
GLMAnnouncingCollection to group your nodes. Hence, when you add a new node
in your announcing collection object, this code comes into effect:

updateOn: GLMItemAdded from: #yourself;

So, make sure you are using appropriate collection object.

usman

On Wed, Aug 13, 2014 at 2:19 AM, Offray Vladimir Luna Cárdenas 
off...@riseup.net wrote:

 Hi again,

 I'm looking at the code at Updataeble Browser in the Basic Examples and I
 have done some small modifications. The code I have (see below) is running
 without error, so I suppose that nodes are being added, but the tree view
 is not updated. My guess is that this is done with updateOn: message, but
 I would like to know, what I'm missing.

 Here is my code

 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 | browser mainTree |
 mainTree := UbakyeNode new.
 mainTree becomeDefaultTree.
 browser := GLMTabulator new.
 browser column: #preview.
 browser
 act: [:newNode |
 newNode := UbakyeNode
 header: 'nuevoNodo' body:
 ''.
 mainTree addNode: newNode.]
 icon: GLMUIThemeExtraIcons glamorousAdd
 entitled: 'Add an item in the collection'.
 browser
 act: [:b | b entity removeLast. b update ]
 icon: GLMUIThemeExtraIcons glamorousRemove
 entitled: 'Remove last item from the collection'.
 browser
 updateOn: GLMItemAdded from: #yourself;
 updateOn: GLMItemRemoved from: #yourself.
 (browser transmit)
 to: #preview;
 andShow: [ :a |
 a tree
 title: mainTree header;
 children: [:eachNode | eachNode children ];
 format: [:eachNode | eachNode header ].
 a text
 title: 'Text'].
 browser openOn: mainTree.
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

 An UbakyeNode is a simple data structure with a header (text), a body
 (text) and a list of children, wich are also Ubakye nodes.

 Any advice is welcomed, as always,

 Offray

 On 08/12/2014 04:42 PM, Offray Vladimir Luna Cárdenas wrote:

 Hi,

 On 08/12/2014 03:13 PM, Tudor Girba wrote:

 I do not understand exactly what you did. Could you be more explicit
 about where
 the error happened?


 I'm not able to reproduce it again. But as soon as I can catch it again,
 I will be doing it.

  Also, the code you provide depends on the data you have. This makes it
 difficult
 for us to reproduce the issue. If you want to have quicker answers you
 could try
 providing an example that works with simpler objects, or at least
 provide a
 script to setup the data as you need it.


 That's why I was asking (in other thread) how to point to my code
 online. I'm using SmalltalkHub to share this learning project here:

 http://smalltalkhub.com/#!/~Offray/Ubakye/

 but would be nice to point to a published snippets of code about this
 questions. May be I just don't understand how to point to specific code
 online like usually happens with DVCS like fossil or git.

 Anyway if you can load my code from this repository you can then open a
 Playground and run:

 UbakyeBrowser open.

 to see the context I'm talking about.

 Meanwhile, let me illustrate my next question with a image. I have
 already a browser with three panels, as shown here:

 http://www.enlightenment.org/ss/e-53ea868b320b20.66100223.jpg

 - The tree panel, at the left for showing node titles (headers).
 - The content panel, at the top right for showing node content (bodies).
 - The code panel, at the bottom right for writing Smalltalk code.

 I'm able to send message from code panel to another external objects,
 like the usual Transcript, but I would like to be able to send messages
 from the code panel to the tree that is being shown in the browser. I
 would like to start with adding nodes to the current tree, and changing
 its values. How can be this done?


 Thanks for Glamorous Toolkit. I'm really enjoying being able to
 prototype new tools as fast, despite of being  a newbie (¡Power to the
 (newbie) user! --also).

 Cheers,

 Offray







Re: [Pharo-users] the mystery of dirty package

2014-05-30 Thread Usman Bhatti
Tx for the pointer Thierry.

So, I did a small script (because there were 314 methods) to see number of
non-class-extension methods with and without loading the dirty marker
package and I could spot the culprit.

Running this script before and after loading the second package and doing a
difference on the two sets shows determining the overridden method.

methods := (RPackage organizer packageNamed: packageName) definedClasses
flatCollect: [:class | class  methodDict values].
methods := methods select: [:aMethod | aMethod category asString
includesSubstring: '*'].


regards,
usman


On Wed, May 28, 2014 at 4:30 PM, Goubier Thierry thierry.goub...@cea.fr
wrote:

 Hi Usman,

 look if the loaded package has overrides on other packages. If yes, it
 will dirty them, and looking for changes will clean them.

 Thierry

 Le 28/05/2014 15:59, Usman Bhatti a écrit :

  Hi,

 It is second time in a week that I have to analyze a problem related to
 a package getting dirty because of loading another package. But when
 looking for changes, the first package becomes clean again.


 One occurrence of the problem can be seen in the latest moose image:
 - download the latest image here:https://ci.inria.fr/moose/job/moose-5.0/
 - monticello browser - Collections-Abstract - changes and the package
 becomes clean.

 Any idea how to determine which method(s) from the incoming package
 might be causing changes in the loaded package? Or generally, how to go
 about correcting this problem?

 usman


 --
 Thierry Goubier
 CEA list
 Laboratoire des Fondations des Systèmes Temps Réel Embarqués
 91191 Gif sur Yvette Cedex
 France
 Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95




Re: [Pharo-users] the mystery of dirty package

2014-05-30 Thread Usman Bhatti
On Fri, May 30, 2014 at 1:16 PM, Tudor Girba tu...@tudorgirba.com wrote:

 I do not quite understand.

 If it is an overriden method, the dirtyness should not go away when
 looking for changes, no?


+1


 In our case, there are no changes found.


 @Usman: what is the problematic method?


Doru, I didn't try it in moose yet. I'll give it a try later in the
afternoon and inform you.



 Doru


 On Fri, May 30, 2014 at 1:11 PM, Usman Bhatti usman.bha...@gmail.com
 wrote:

 Tx for the pointer Thierry.

 So, I did a small script (because there were 314 methods) to see number
 of non-class-extension methods with and without loading the dirty marker
 package and I could spot the culprit.

 Running this script before and after loading the second package and doing
 a difference on the two sets shows determining the overridden method.

 methods := (RPackage organizer packageNamed: packageName) definedClasses
 flatCollect: [:class | class  methodDict values].
 methods := methods select: [:aMethod | aMethod category asString
 includesSubstring: '*'].


 regards,
 usman



 On Wed, May 28, 2014 at 4:30 PM, Goubier Thierry thierry.goub...@cea.fr
 wrote:

 Hi Usman,

 look if the loaded package has overrides on other packages. If yes, it
 will dirty them, and looking for changes will clean them.

 Thierry

 Le 28/05/2014 15:59, Usman Bhatti a écrit :

  Hi,

 It is second time in a week that I have to analyze a problem related to
 a package getting dirty because of loading another package. But when
 looking for changes, the first package becomes clean again.


 One occurrence of the problem can be seen in the latest moose image:
 - download the latest image here:https://ci.inria.fr/
 moose/job/moose-5.0/
 - monticello browser - Collections-Abstract - changes and the package
 becomes clean.

 Any idea how to determine which method(s) from the incoming package
 might be causing changes in the loaded package? Or generally, how to go
 about correcting this problem?

 usman


 --
 Thierry Goubier
 CEA list
 Laboratoire des Fondations des Systèmes Temps Réel Embarqués
 91191 Gif sur Yvette Cedex
 France
 Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95





 --
 www.tudorgirba.com

 Every thing has its own flow



Re: [Pharo-users] the mystery of dirty package

2014-05-30 Thread Usman Bhatti
On Fri, May 30, 2014 at 1:16 PM, Tudor Girba tu...@tudorgirba.com wrote:

 I do not quite understand.

 If it is an overriden method, the dirtyness should not go away when
 looking for changes, no? In our case, there are no changes found.

 @Usman: what is the problematic method?



Grease overrides two methods in Collections-Abstract
- Collection#contents
- SequenceableCollection#sorted

For the curious ones: in moose loading glamour makes collections-abstract
package dirty. But doing changes makes the package clean.

Doru, for Moose, the solution might be to update glamour config to use
latest Grease as suggested by Stephan.





 Doru


 On Fri, May 30, 2014 at 1:11 PM, Usman Bhatti usman.bha...@gmail.com
 wrote:

 Tx for the pointer Thierry.

 So, I did a small script (because there were 314 methods) to see number
 of non-class-extension methods with and without loading the dirty marker
 package and I could spot the culprit.

 Running this script before and after loading the second package and doing
 a difference on the two sets shows determining the overridden method.

 methods := (RPackage organizer packageNamed: packageName) definedClasses
 flatCollect: [:class | class  methodDict values].
 methods := methods select: [:aMethod | aMethod category asString
 includesSubstring: '*'].


 regards,
 usman



 On Wed, May 28, 2014 at 4:30 PM, Goubier Thierry thierry.goub...@cea.fr
 wrote:

 Hi Usman,

 look if the loaded package has overrides on other packages. If yes, it
 will dirty them, and looking for changes will clean them.

 Thierry

 Le 28/05/2014 15:59, Usman Bhatti a écrit :

  Hi,

 It is second time in a week that I have to analyze a problem related to
 a package getting dirty because of loading another package. But when
 looking for changes, the first package becomes clean again.


 One occurrence of the problem can be seen in the latest moose image:
 - download the latest image here:https://ci.inria.fr/
 moose/job/moose-5.0/
 - monticello browser - Collections-Abstract - changes and the package
 becomes clean.

 Any idea how to determine which method(s) from the incoming package
 might be causing changes in the loaded package? Or generally, how to go
 about correcting this problem?

 usman


 --
 Thierry Goubier
 CEA list
 Laboratoire des Fondations des Systèmes Temps Réel Embarqués
 91191 Gif sur Yvette Cedex
 France
 Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95





 --
 www.tudorgirba.com

 Every thing has its own flow



[Pharo-users] the mystery of dirty package

2014-05-28 Thread Usman Bhatti
Hi,

It is second time in a week that I have to analyze a problem related to a
package getting dirty because of loading another package. But when looking
for changes, the first package becomes clean again.


One occurrence of the problem can be seen in the latest moose image:
- download the latest image here:https://ci.inria.fr/moose/job/moose-5.0/
- monticello browser - Collections-Abstract - changes and the package
becomes clean.

Any idea how to determine which method(s) from the incoming package might
be causing changes in the loaded package? Or generally, how to go about
correcting this problem?

usman


Re: [Pharo-users] A possible problem coming from Zinc?

2014-05-21 Thread Usman Bhatti
On Wed, May 21, 2014 at 1:37 PM, Sven Van Caekenberghe s...@stfx.eu wrote:


 On 21 May 2014, at 13:30, Usman Bhatti usman.bha...@gmail.com wrote:

  Hi,
 
  When turning on ZincFileLogger on a Zinc server, after some time (1h or
 so) I get the FileWrite error (see screenshot). I browsed through the bugs
 related to Zinc in the Fogbugz but couldn't find any bug related to my
 problem. I get the problem both on Mac (local machine) and Ubuntu
 (DigitalOcean instance) on Pharo 3.0 (release).
 
  This is my code to register logging on the server events:
 
  server := ZnMultiThreadedServer startOn: 4001.
  logger := ZnFileLogger onFileNamed: 'server-log.txt'.
  server log addListener: logger.
 
  Any pointers?

 That is really weird: in the code above the file is named 'server-log.txt'
 while in the screenshot the file is named 'License-log.txt', how is that
 possible ?

 The error is that the file is closed, probably 'underneath' the logging
 code, so the question is, how is that possible, who did that ?


Oops. I renamed the log file name in my mail. I should have had a closer
look at the screenshot before sending it :((. So, my code should have
looked like it to match the error in the screenshot:

 server := ZnMultiThreadedServer startOn: 4001.
logger := ZnFileLogger onFileNamed: 'License-log.txt'.
server log addListener: logger.



 Can it be that two file (descriptors) got swapped ?

 Did you save the image, move it around, across machines ?


I had this doubt of moving my development image to the cloud instance so I
created a script on the cloud instance to prepare my server from a freshly
downloaded pharo image. But I had the same problem. Contents from the tail
of the log file, if that can be of any help:

2014-05-20 21:01:03 308891 T GET /validate:123 200 18B 4ms
2014-05-20 21:01:03 308891 I Wrote a ZnResponse(200 OK
text/plain;charset=utf-8 18B)
2014-05-20 21:01:03 308891 D ZnUnknownHttpMethod bad request while parsing
2014-05-20 21:01:03 308891 D ConnectionClosed: Cannot write data while
writing response
2014-05-20 21:01:03 308891 D Closing stream
2014-05-20 21:06:03 817717 D Wait for accept timed out
2014-05-20 21:11:03 817717 D Wait for accept timed out
2014-05-20 21:16:03 817717 D Wait for accept timed out

usman



  tx.
 
  Usman
 
  Screen Shot 2014-05-21 at 1.20.46 PM.png





Re: [Pharo-users] A possible problem coming from Zinc?

2014-05-21 Thread Usman Bhatti
Please find the debug log file here. I hope this helps.

https://dl.dropboxusercontent.com/u/11804892/PharoDebug.log

On my side, I'll switch to Transcript logging in the meantime to see if
that is not coming from any errors in my implementation of the server.

tx

usman


On Wed, May 21, 2014 at 5:15 PM, Sven Van Caekenberghe s...@stfx.eu wrote:


 On 21 May 2014, at 16:59, Usman Bhatti usman.bha...@gmail.com wrote:

 
 
 
  On Wed, May 21, 2014 at 1:37 PM, Sven Van Caekenberghe s...@stfx.eu
 wrote:
 
  On 21 May 2014, at 13:30, Usman Bhatti usman.bha...@gmail.com wrote:
 
   Hi,
  
   When turning on ZincFileLogger on a Zinc server, after some time (1h
 or so) I get the FileWrite error (see screenshot). I browsed through the
 bugs related to Zinc in the Fogbugz but couldn't find any bug related to my
 problem. I get the problem both on Mac (local machine) and Ubuntu
 (DigitalOcean instance) on Pharo 3.0 (release).
  
   This is my code to register logging on the server events:
  
   server := ZnMultiThreadedServer startOn: 4001.
   logger := ZnFileLogger onFileNamed: 'server-log.txt'.
   server log addListener: logger.
  
   Any pointers?
 
  That is really weird: in the code above the file is named
 'server-log.txt' while in the screenshot the file is named
 'License-log.txt', how is that possible ?
 
  The error is that the file is closed, probably 'underneath' the logging
 code, so the question is, how is that possible, who did that ?
 
  Oops. I renamed the log file name in my mail. I should have had a closer
 look at the screenshot before sending it :((. So, my code should have
 looked like it to match the error in the screenshot:
 
   server := ZnMultiThreadedServer startOn: 4001.
  logger := ZnFileLogger onFileNamed: 'License-log.txt'.
  server log addListener: logger.

 OK.

  Can it be that two file (descriptors) got swapped ?
 
  Did you save the image, move it around, across machines ?
 
  I had this doubt of moving my development image to the cloud instance so
 I created a script on the cloud instance to prepare my server from a
 freshly downloaded pharo image. But I had the same problem. Contents from
 the tail of the log file, if that can be of any help:
 
  2014-05-20 21:01:03 308891 T GET /validate:123 200 18B 4ms
  2014-05-20 21:01:03 308891 I Wrote a ZnResponse(200 OK
 text/plain;charset=utf-8 18B)
  2014-05-20 21:01:03 308891 D ZnUnknownHttpMethod bad request while
 parsing
  2014-05-20 21:01:03 308891 D ConnectionClosed: Cannot write data while
 writing response
  2014-05-20 21:01:03 308891 D Closing stream
  2014-05-20 21:06:03 817717 D Wait for accept timed out
  2014-05-20 21:11:03 817717 D Wait for accept timed out
  2014-05-20 21:16:03 817717 D Wait for accept timed out

 I have to little information to say anything. I doubt that it is related
 to Zn logging on itself, but who knows, anything is possible. It seems you
 can reproduce it quite easily. Is there more in PharoDebug.log ?

 In most cases I use #logToTranscript, but with something like

   NonInteractiveTranscript file install.

 on top of my start.st script. That way I can easily write other things to
 the same log file.

 Sven





Re: [Pharo-users] A possible problem coming from Zinc?

2014-05-21 Thread Usman Bhatti
On Wed, May 21, 2014 at 5:15 PM, Sven Van Caekenberghe s...@stfx.eu wrote:


 On 21 May 2014, at 16:59, Usman Bhatti usman.bha...@gmail.com wrote:

 
 
 
  On Wed, May 21, 2014 at 1:37 PM, Sven Van Caekenberghe s...@stfx.eu
 wrote:
 
  On 21 May 2014, at 13:30, Usman Bhatti usman.bha...@gmail.com wrote:
 
   Hi,
  
   When turning on ZincFileLogger on a Zinc server, after some time (1h
 or so) I get the FileWrite error (see screenshot). I browsed through the
 bugs related to Zinc in the Fogbugz but couldn't find any bug related to my
 problem. I get the problem both on Mac (local machine) and Ubuntu
 (DigitalOcean instance) on Pharo 3.0 (release).
  
   This is my code to register logging on the server events:
  
   server := ZnMultiThreadedServer startOn: 4001.
   logger := ZnFileLogger onFileNamed: 'server-log.txt'.
   server log addListener: logger.
  
   Any pointers?
 
  That is really weird: in the code above the file is named
 'server-log.txt' while in the screenshot the file is named
 'License-log.txt', how is that possible ?
 
  The error is that the file is closed, probably 'underneath' the logging
 code, so the question is, how is that possible, who did that ?
 
  Oops. I renamed the log file name in my mail. I should have had a closer
 look at the screenshot before sending it :((. So, my code should have
 looked like it to match the error in the screenshot:
 
   server := ZnMultiThreadedServer startOn: 4001.
  logger := ZnFileLogger onFileNamed: 'License-log.txt'.
  server log addListener: logger.

 OK.

  Can it be that two file (descriptors) got swapped ?
 
  Did you save the image, move it around, across machines ?
 
  I had this doubt of moving my development image to the cloud instance so
 I created a script on the cloud instance to prepare my server from a
 freshly downloaded pharo image. But I had the same problem. Contents from
 the tail of the log file, if that can be of any help:
 
  2014-05-20 21:01:03 308891 T GET /validate:123 200 18B 4ms
  2014-05-20 21:01:03 308891 I Wrote a ZnResponse(200 OK
 text/plain;charset=utf-8 18B)
  2014-05-20 21:01:03 308891 D ZnUnknownHttpMethod bad request while
 parsing
  2014-05-20 21:01:03 308891 D ConnectionClosed: Cannot write data while
 writing response
  2014-05-20 21:01:03 308891 D Closing stream
  2014-05-20 21:06:03 817717 D Wait for accept timed out
  2014-05-20 21:11:03 817717 D Wait for accept timed out
  2014-05-20 21:16:03 817717 D Wait for accept timed out

 I have to little information to say anything. I doubt that it is related
 to Zn logging on itself, but who knows, anything is possible. It seems you
 can reproduce it quite easily. Is there more in PharoDebug.log ?

 In most cases I use #logToTranscript, but with something like

   NonInteractiveTranscript file install.

 on top of my start.st script. That way I can easily write other things to
 the same log file.


The problem disappears when I use Transcript logging and my image is
stable. So, I'll stick to this solution.

tx.
usman



 Sven





Re: [Pharo-users] changes and sources file availability

2014-04-06 Thread Usman Bhatti
Hi,

Tx for your replies.

On Fri, Apr 4, 2014 at 10:09 AM, Marcus Denker marcus.den...@inria.frwrote:


 On 03 Apr 2014, at 19:05, Hilaire Fernandes hilaire.fernan...@gmail.com
 wrote:

  Hi,
 
  It is gone. And for me it is a very annoying.
 
  Now if you want the system to prevent looking I am afraid you have to
  modify some system class method as there is no more hook to do it
  properly (see the mailing list archive for discussion about that a few
  weeks ago). Then I don't know the consequence of Pharo3 running without
  the source files. Some feedback will be nice on that specific point.
 

 So... yes, right now there are no Preferences. But we can add them back.
 (I can do that).


 The only thin that will (right now) not work is decompiling, but just
 running
 a program is fine. If you want to debug you need sources+changes.


My use case is to prevent access to the source code in the image as much as
possible.

For changes file, I found this:
PharoFilesOpener shouldInformAboutReadOnlyChanges.

For sources, no idea. But it would be good to remove the Pharo sources as
well because that's not really needed.

regards,

Usman

This is not nice and we will fix that with Pharo4.

  I guess this situation can evolve in future.
 
 Yes!

 Marcus



[Pharo-users] changes and sources file availability

2014-04-02 Thread Usman Bhatti
Hello,

In Pharo 2.0, we could enforce the image not to look for sources and
changes file at the startup with:

SmalltalkImage
   checkChangesFileAvailability: false;
   checkSourcesFileAvailability: false.

I could not found these selectors anymore in my Pharo 3.0 image.

Clement mentioned to me a while ago that it was due to the change of
compiler (Opal) and it might not be safe to remove these files (if I
remember correctly). So, my question:

1/ Can I remove these two files safely from my production image?
2/ If the answer to 1/ is yes, how can I tell my image not to look for
these files at image startup?

tx,
Usman


Re: [Pharo-users] The new versionner is cool

2014-02-25 Thread Usman Bhatti
On Sat, Feb 22, 2014 at 7:12 PM, Hernán Morales Durand 
hernan.mora...@gmail.com wrote:



 2014-02-21 8:25 GMT-03:00 Usman Bhatti usman.bha...@gmail.com:

 Hello,

 I found Versionner very productive tool. I was able to create a new
 configuration from scratch within a few minutes with the packages that I
 wanted to put into it. Though, I couldn't commit my new config through its
 interface because Komitter kept asking for a issue number but I didn't have
 it.


 You want to commit a new configuration through Kommiter?


Kommiter wasn't my choice but this is what popups when you want to commit
your config created with Versionner.







[Pharo-users] The new versionner is cool

2014-02-21 Thread Usman Bhatti
Hello,

I found Versionner very productive tool. I was able to create a new
configuration from scratch within a few minutes with the packages that I
wanted to put into it. Though, I couldn't commit my new config through its
interface because Komitter kept asking for a issue number but I didn't have
it.

So, it is excellent to have such a tool in Pharo.
Great work guys.
regards,
Usman


Re: [Pharo-users] [gsoc-mentors] GSoC: call for ideas

2014-02-13 Thread Usman Bhatti
[Anne Etien could not post this msg on the mentors list I m forwarding it
on her behalf].

Title: FAST JavaScript model

Level: advanced

Possible mentor: Anne Etien

Possible second mentor: Nicolas Anquetil or Yuriy Tymchuk

Description:
For in depth source code analysis a support of abstract syntax trees is
required. FAST is an abstract syntax tree extension for FAMIX meta-model
that is used by Moose technology. The goal of this project is to create
a JavaScript version of FAST.

Technical Details:
As programming languages are different, their AST representations are
different too. FAST model aims for creation of as generic as possible
core that can be extended for different languages. Also the structure of
a model allows creation of generic algorithms like symbol resolution,
metrics calculation and rule checking that will work for any language.
Prototypes of FAST for Smalltalk and Java are already implemented.
During the project a student will implement the JavaScript model. More
detailed information about FAST is provided in the Moose day
presentation: http://youtu.be/dRr3WHOD3x4

Benefits to the Student:
The student will gain a deep understanding of a JavaScript syntax and
abstract syntax tree model. He will also learn about PetitParser
framework, and gain knowledge about software modeling and analysis.

Benefits to the Community:
Community will get a FAST model for JavaScript that can be used for
software assessment with Moose. Also this model can be used later in PhD
projects such as automation of source code translation. With this third
model, the community will have raw material to real think and improve
generic algorithms based on AST.


On Tue, Feb 11, 2014 at 10:42 AM, Damien Cassou damien.cas...@gmail.comwrote:

 Hi fellow Pharo hackers,

 ESUG, the European Smalltalk User Group, is applying for this
 year's Google Summer of Code.  As you probably know, the Summer
 of Code provides the opportunity to fund students to work during
 the summer on Pharo.  Please reply to this
 email (be sure to use Reply to all) if you have ideas you
 would like to propose.

 Please include a summary of the project and links to web pages
 that can help prospective students to write their application.
 Please also include the following information:

 - if applicable, other dialects that you would be willing to
   mentor this project for

 - the skill level

 - name of the mentor(s), email addresses, and possibly any IRC
   network/channel/nickname where they can be found.

 Thanks for contributing to ESUG's Summer of Code application!

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

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

 --
 You received this message because you are subscribed to the Google Groups
 Smalltalk GSoC mentors group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to smalltalk-gsoc-mentors+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.



Re: [Pharo-users] Current 3.0 download is broken

2013-11-12 Thread Usman Bhatti
I was about to complaint about the issue but good that some people already
complained, found the source of the problem and the resolution (sources
should be in VM directory and not in image).
Good work. The resolution works for me.
Now I can revive my pharo settings because I thought the problem was
originating from the startup scripts.

Usman




On Sun, Nov 10, 2013 at 4:48 PM, Johan Fabry jfa...@dcc.uchile.cl wrote:


 On principle, a big +1 on going forward on the PhD! :-)

 But, the one-click download Pharo3.0-mac.zip being broken is an important
 issue that should be addressed fairly quickly in my opinion. As I said, the
 sources file should be moved out of Contents/Resources and moved into
 Contents/MacOS. Then the one-click also runs.

 On Nov 10, 2013, at 10:29 AM, Stéphane Ducasse stephane.duca...@inria.fr
 wrote:

 
  On Nov 10, 2013, at 2:05 PM, Camillo Bruni camillobr...@gmail.com
 wrote:
 
  It did not solve the issue yet :/, I will have to look into it next
 week.
 
  Don't ;)
  You should not touch Pharo related things and start use pomodoroes to
 blast your phd
 
  Stef
  In any case, I think it would be unrelated to a bootstrap since
 FileLocator
  is already lazily initialized. There is just the typical problem on how
 and
  when to update a singleton…
  Ok so this is good then.
 
 
  I should reopen the issue since the problem persists.



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

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





[Pharo-users] fileout or something similar from crashed image

2013-10-14 Thread Usman Bhatti
Hello,

I crashed my image and I had some unsaved code. Now, I know I can go to the
changes file but I'm lazy. I am told there is a tool that allows
repairing/rejuvenating a crashed image to recover .mcz files and I would
like to give it a try.

Tx

Usman


Re: [Pharo-users] MSI packaging for Pharo

2013-08-28 Thread Usman Bhatti
Tx all. That's some useful information. As my requirement is a MSI file,
I'll try to use WIX or MSI wrapper. I'll let you know how my experience
goes.

regards,

Usman


On Tue, Aug 27, 2013 at 10:34 AM, p...@highoctane.be p...@highoctane.bewrote:

 You can also use Inno Setup which is nice, easy, and free.

 http://www.jrsoftware.org/isinfo.php#features

 But ok, it doesn't do MSI.

 http://stackoverflow.com/questions/6245260/installers-wix-or-inno-setup

 But you can get around that with http://www.exemsi.com/inno-setup-and-msi

 Good luck.

 Phil





 On Tue, Aug 27, 2013 at 7:27 AM, Hernán Morales Durand 
 hernan.mora...@gmail.com wrote:

 I have never tried but it seems you can wrap installer in MSI files using
 WiX http://wixtoolset.org/ and this package http://www.exemsi.com/

 To write the installer check this out:

 http://code.google.com/p/**biosmalltalk/wiki/**NSISInstallerScripthttp://code.google.com/p/biosmalltalk/wiki/NSISInstallerScript

 Hernán

 El 26/08/2013 17:29, Usman Bhatti escribió:

 On Mon, Aug 26, 2013 at 7:10 PM, Stéphane Ducasse
 stephane.duca...@inria.fr 
 mailto:stephane.ducasse@**inria.frstephane.duca...@inria.fr
 wrote:



   Hello,
  
   Does anyone have experience of distributing Pharo-based software
 as an MSI installer package to be installed by clients?

 what is an MSI?


 Microsoft installer, a packaging for windows-based software that allows
 installation of the software on a windows machine: creation of registry
 keys, Start menu items, looking for previous installations of the
 software and upgrading it, etc.


   I would particularly like to know the tool that was used to
 create the MSI.

 Do you mean installing a Pharo App?
 What means installing?


 So, it would mean that Pharo app is installed on a client machine:
 creating directory hierarchy, placing image and vm files and any scripts
 that come with the image, and creating windows shortcuts. For the time,
 its a question from a client so I thought someone might have some
 relevant exp.


 Because if you ship an image in essence:
  you ship one image
  with an opening image saying installing….
  then you save



  
   regards,
  
   Usman Bhatti










[Pharo-users] MSI packaging for Pharo

2013-08-26 Thread Usman Bhatti
Hello,

Does anyone have experience of distributing Pharo-based software as an MSI
installer package to be installed by clients? I would particularly like to
know the tool that was used to create the MSI.

regards,

Usman Bhatti


Re: [Pharo-users] MSI packaging for Pharo

2013-08-26 Thread Usman Bhatti
On Mon, Aug 26, 2013 at 7:10 PM, Stéphane Ducasse stephane.duca...@inria.fr
 wrote:



  Hello,
 
  Does anyone have experience of distributing Pharo-based software as an
 MSI installer package to be installed by clients?

 what is an MSI?


Microsoft installer, a packaging for windows-based software that allows
installation of the software on a windows machine: creation of registry
keys, Start menu items, looking for previous installations of the software
and upgrading it, etc.



  I would particularly like to know the tool that was used to create the
 MSI.

 Do you mean installing a Pharo App?
 What means installing?


So, it would mean that Pharo app is installed on a client machine: creating
directory hierarchy, placing image and vm files and any scripts that come
with the image, and creating windows shortcuts. For the time, its a
question from a client so I thought someone might have some relevant exp.



 Because if you ship an image in essence:
 you ship one image
 with an opening image saying installing….
 then you save



 
  regards,
 
  Usman Bhatti





Re: [Pharo-users] image resize event

2013-08-20 Thread Usman Bhatti
Fernando is going to propose a fix for this in PasteUpMorphextent:
Once his fix integrated in Pharo, PasteUpMorph announcer can be used to
capture the image window size change event and trigger the update code:

World announcer on: WindowResizing do:[ do some actions]


usman

On Tue, Aug 20, 2013 at 4:19 PM, Tudor Girba tu...@tudorgirba.com wrote:

 I would like to know the solution for this as well :)

 Doru


 On Tue, Aug 20, 2013 at 9:30 AM, fritsche.mar...@gmail.com wrote:


*Von: *Henrik Johansen
 *Gesendet: *Dienstag, 20. August 2013 09:24 PM
 *An: *Any question about pharo is welcome
 *Antwort an: *Any question about pharo is welcome
 *Betreff: *Re: [Pharo-users] image resize event


 On Aug 19, 2013, at 6:07 , Usman Bhatti usman.bha...@gmail.com wrote:

 Hello,

 I would like to resize all my windows opened inside my image when
 resizing the image window. Can anyone point me to the hook where I can plug
 my code for window resizing?

 For example, it would like to do
 onImageResize
   World fitAll.

 tx,

 usman


 You need to install a #windowEventHandler: on the World, this will
 receive all host window events, such as resizes.
 Make sure you also handle #windowClose events if you want the native X
 button to work, as per PasteUpMorph  #windowEvent:

 Cheers,
 Henry




 --
 www.tudorgirba.com

 Every thing has its own flow



[Pharo-users] image resize event

2013-08-19 Thread Usman Bhatti
Hello,

I would like to resize all my windows opened inside my image when resizing
the image window. Can anyone point me to the hook where I can plug my code
for window resizing?

For example, it would like to do
onImageResize
  World fitAll.

tx,

usman


Re: [Pharo-users] New win32 VM available (was: More than 500MB for windows)

2013-07-16 Thread Usman Bhatti
On Tue, Jul 16, 2013 at 11:33 AM, Tudor Girba tu...@tudorgirba.com wrote:

 Actually, I did read, but what I understood is only that I should look for
 another URL do download PharoS :).

 In any case, thanks a lot. I tried with the Pharo VM and it works as
 expected, too. I set it to 1GB and got the warning only when the image went
 passed that limit.


That's a very good news.
Tx igor for fixing and Doru for testing ;).



 Cheers,
 Doru


 On Mon, Jul 15, 2013 at 5:36 PM, Igor Stasenko siguc...@gmail.com wrote:

 On 15 July 2013 16:59, Tudor Girba tu...@tudorgirba.com wrote:
  Aha :).
 
  Ok. I tested PharoS with 1GB and I got a 800MB image running well.
 
  Is there really no chance of getting Cog with this feature? :)
 
 please ,read more carefully.. :)
 it was error in config, which copied PharoS files over Pharo ones.
 And answering your question: you should have the same feature in both
 VMs since they sharing same C codebase.

  Doru
 
 
 
 
  On Mon, Jul 15, 2013 at 4:23 PM, Igor Stasenko siguc...@gmail.com
 wrote:
 
  On 15 July 2013 15:34, Damien Cassou damien.cas...@gmail.com wrote:
   On Mon, Jul 15, 2013 at 3:27 PM, Tudor Girba tu...@tudorgirba.com
   wrote:
   Ok, I admit. I should read emails thoroughly :). Please ignore the
   second
   issue. Still, why is it called PharoS?
  
  
   may it be because this is a StackVM and not Cog?
 
  yeah, it looks like Esteban by making configs for PharoS VM
  made a mistake and these VMs uploaded into same location as Cog ones..
  (we fixed it already, building new VM, which will copy stuff properly)
 
  alternatively , you can download VM from build server:
 
 
 
 https://ci.inria.fr/pharo/view/VM/job/PharoVM/182/Architecture=32,Slave=vm-builder-win/
 
  (to make sure we're talking about same VM)
 
  
   --
   Damien Cassou
   http://damiencassou.seasidehosting.st
  
   Success is the ability to go from one failure to another without
   losing enthusiasm.
   Winston Churchill
  
 
 
 
  --
  Best regards,
  Igor Stasenko.
 
 
 
 
  --
  www.tudorgirba.com
 
  Every thing has its own flow



 --
 Best regards,
 Igor Stasenko.




 --
 www.tudorgirba.com

 Every thing has its own flow



[Pharo-users] More than 500MB for windows

2013-07-08 Thread Usman Bhatti
[I know there were some discussions on the topic and the topic of 64-bit VM
but I'm not sure where we stand today].
I would like to know if we can allocate more than 500MB for pharo virtual
machine in Windows? I am getting an Out Of memory msg and the following
VM statistics when trying to parse a large application with Moose.
Increasing the size would be the cheapest option (in terms of effort)
before trying other optimizations.

tx

[image: Inline image 1]
Screen Shot 2013-07-08 at 12.31.38 PM.png

Re: [Pharo-users] More than 500MB for windows

2013-07-08 Thread Usman Bhatti
On Mon, Jul 8, 2013 at 1:11 PM, Sven Van Caekenberghe s...@stfx.eu wrote:

 Hi Usman,

 On 08 Jul 2013, at 13:05, Usman Bhatti usman.bha...@gmail.com wrote:

  [I know there were some discussions on the topic and the topic of 64-bit
 VM but I'm not sure where we stand today].
  I would like to know if we can allocate more than 500MB for pharo
 virtual machine in Windows? I am getting an Out Of memory msg and the
 following VM statistics when trying to parse a large application with
 Moose. Increasing the size would be the cheapest option (in terms of
 effort) before trying other optimizations.
 
  tx
 
  Screen Shot 2013-07-08 at 12.31.38 PM.png

 I know nothing about the (extra) limitations of the Windows VM.
 But on Linux you can allocate close to 1GB (see mailing list).
 On Mac you seem to be able to get pretty close to that (see Phil's
 answers).
 So switching hardware/OS is an option too ;-)


I would be surprised if the client agrees to it :). So that I can't (SAS
will take some time to come).
So, may be currently, we'll have to resort to some optimizations through
serialization and de-serialization, but memory limitation is going to be a
recurrent problem for us.




 Sven


 --
 Sven Van Caekenberghe
 Proudly supporting Pharo
 http://pharo.org
 http://association.pharo.org
 http://consortium.pharo.org








Re: [Pharo-users] JPEG export producing images with black background

2013-06-16 Thread Usman Bhatti
On Sun, Jun 16, 2013 at 12:00 AM, Benjamin 
benjamin.vanryseghem.ph...@gmail.com wrote:

 use png.

 Jpegs have background, so you will not go very further in this direction
 (if I understood well your problem ^^)


The thing is that I am using Artefact framework for PDF images and it uses
JPEG plugin for embedding images. Earlier, I tried with exporting PNGs
(that have a transparent background) but when importing these PNGs into pdf
docs, the JPEGReader adds the colored background (black in my case).

Another solution would be to see if Artefact can allow embedding Forms in
Pharo into PDF docs directly (currently it does not) or it can provide a
plugin for PNG images.





 Ben

 On Jun 15, 2013, at 11:56 PM, Usman Bhatti usman.bha...@gmail.com wrote:

 I need to export JPEG images in Pharo to later import then in my PDF
 document. When I export JPEG files with Pharo, the background is black,
 which makes the exported image meaningless. To reproduce the problem, do
 the following in the latest moose image (the image can be obtained from
 here https://ci.inria.fr/moose/job/moose-latest-dev-4.8/):

 |window|
 window := ESExamples new kiviat2.
 window model canvas imageForm writeJPEGfileNamed: 'fileName.jpg'.

 The file will be produced in the image folder. If someone could suggest
 how to make the background white or transparent, it'll be a great help.

 Usman





[Pharo-users] JPEG export producing images with black background

2013-06-15 Thread Usman Bhatti
I need to export JPEG images in Pharo to later import then in my PDF
document. When I export JPEG files with Pharo, the background is black,
which makes the exported image meaningless. To reproduce the problem, do
the following in the latest moose image (the image can be obtained
from herehttps://ci.inria.fr/moose/job/moose-latest-dev-4.8/
):

|window|
window := ESExamples new kiviat2.
window model canvas imageForm writeJPEGfileNamed: 'fileName.jpg'.

The file will be produced in the image folder. If someone could suggest how
to make the background white or transparent, it'll be a great help.

Usman


[Pharo-users] Fwd: Gettext package for 2.0 - information not updated

2013-05-27 Thread Usman Bhatti
Hello,

I am looking to see how localization works in Pharo. There is a pharo book
chapter that explains how to make it work but the chapter explains the
working on Pharo 1.4.
http://book.pharo-project.org/book/LanguageAndLibraries/Localisation

Recent changes in STHub allow to load the package in Pharo 2.0 but I see a
lot of references to FileDirectory (deprecated in 2.0) and hence the
tutorial in the book does not work.

The other package: System-Localization does not have much documentation so
that does not help either.

Can someone point to a working tutorial for Pharo localization for 2.0?

tx,

Usman


Re: [Pharo-users] Gettext package for 2.0 - information not updated

2013-05-27 Thread Usman Bhatti
On Mon, May 27, 2013 at 6:53 PM, stephane ducasse
stephane.duca...@free.frwrote:

 Usman there is a getText in the pharo repo on smalltalk but we have to
 check its state.


It still has references to FileDirectory so I was thinking if its usable on
2.0.



 Stef

 On May 27, 2013, at 2:35 PM, Usman Bhatti usman.bha...@gmail.com wrote:

 Hello,

 I am looking to see how localization works in Pharo. There is a pharo book
 chapter that explains how to make it work but the chapter explains the
 working on Pharo 1.4.
 http://book.pharo-project.org/book/LanguageAndLibraries/Localisation

 Recent changes in STHub allow to load the package in Pharo 2.0 but I see a
 lot of references to FileDirectory (deprecated in 2.0) and hence the
 tutorial in the book does not work.

 The other package: System-Localization does not have much documentation so
 that does not help either.

 Can someone point to a working tutorial for Pharo localization for 2.0?

 tx,

 Usman






[Pharo-users] Fwd: widget to show progress

2013-05-19 Thread Usman Bhatti
Hello all,

I am looking for a widget/control in Pharo that shows the progress of a
process that takes undeterministic time.


usman