Re: [Pharo-project] ClassOrganizer oddities

2009-10-28 Thread Stéphane Ducasse
> > Any change to system should be captured _before_ it applied. > This allows us to introduce a policy which can validate the change > and decide > whether it allowed to be made or not. > > I made the SystemChangeEvent class, which having following state: > - changeKind - a symbol, which identif

Re: [Pharo-project] ClassOrganizer oddities

2009-10-28 Thread Igor Stasenko
2009/10/28 Stéphane Ducasse : >> >> Any change to system should be captured _before_ it applied. >> This allows us to introduce a policy which can validate the change >> and decide >> whether it allowed to be made or not. >> >> I made the SystemChangeEvent class, which having following state: >> -

Re: [Pharo-project] ClassOrganizer oddities

2009-10-28 Thread Alain Plantec
Igor Stasenko wrote: > 2009/10/28 Stéphane Ducasse : > > > well, my initial idea is to enable a package developer to establish own policy > for his package. > A policy get notified of any change before it made and of course > doesn't cares if there's anyone > who listens for notifications of cha

[Pharo-project] How to make Pharo produce random garbage bytes

2009-10-28 Thread Niko Schwarz
Hi list, I learned something fun today from a friend, how to make Pharo produce random garbage! Make a class AC which is defined as: Object subclass: #AC instanceVariableNames: 'a' classVariableNames: '' poolDictionaries: '' category: 'OB-Standard-Browsers' Then you

Re: [Pharo-project] How to make Pharo produce random garbage bytes

2009-10-28 Thread Lukas Renggli
If you are up to that kind of random data you can also try Object new executeMethod: (Point >> #x) Lukas 2009/10/28 Niko Schwarz : > Hi list, I learned something fun today from a friend, how to make > Pharo produce random garbage! > >  Make a class AC which is defined as: >  Object subclass:

[Pharo-project] Abstract classes

2009-10-28 Thread Alexandre Bergel
Dear List, I was looking for a way to test whether a class is abstract or not. One easy way, is to check whether the class sends the message subclassResponsibility. This is not perfect, since we should also check whether the receiver is 'self' and this is the only statement in the method b

Re: [Pharo-project] Abstract classes

2009-10-28 Thread Mariano Martinez Peck
On Wed, Oct 28, 2009 at 10:22 AM, Alexandre Bergel wrote: > Dear List, > > I was looking for a way to test whether a class is abstract or not. > One easy way, is to check whether the class sends the message > subclassResponsibility. This is not perfect, since we should also > check whether the rec

Re: [Pharo-project] Abstract classes

2009-10-28 Thread Alexandre Bergel
> The only problem I see (maybe I am wrong) here is that there are > already a lot of implementors of isAbstract. For example, those used > in Sunit. So, if you add this method to Behavior, there will be a > lot of non-intentional overrides. I thought about it, but I haven't felt this could

Re: [Pharo-project] Abstract classes

2009-10-28 Thread Lukas Renggli
> The only problem I see (maybe I am wrong) here is that there are already a > lot of implementors of isAbstract. For example, those used in Sunit. So, if > you add this method to Behavior, there will be a lot of non-intentional > overrides. As Mariano writes, most applications implement a message

Re: [Pharo-project] Making packages shipped with Pharo ready for 1.0

2009-10-28 Thread Mariano Martinez Peck
On Tue, Oct 27, 2009 at 1:04 PM, Adrian Lienhard wrote: > Hi, > > I've more closely looked at the failing tests and undeclared > references in the Pharo image. The test result is 14 expected > failures, 34 failures, 54 errors, 2 unexpected passes. Considering > that the Pharo-core ships with all

Re: [Pharo-project] Abstract classes

2009-10-28 Thread Alexandre Bergel
> As Mariano writes, most applications implement a message #isAbstract > themselves with the exact semantics they require. I don't think a > generic message in Behavior is really useful, especially if it is not > used by the core system. In that case, we could have isAbstractClass or something els

Re: [Pharo-project] Abstract classes

2009-10-28 Thread Alexandre Bergel
>> If the class >> contains any method that sends #subclassResponsibility, the we >> consider the class as abstract. Presence of abstract method in the metaclass is also necessary. -=-=-=-=-=-=-=-=-=-=-=-= ISSUE #1383: This issue proposes the addition of -two new methods in Behavior: allMethods a

Re: [Pharo-project] Linux FFI question: library given function name?

2009-10-28 Thread Hernán Morales Durand
http://www.linuxselfhelp.com/HOWTO/Program-Library-HOWTO/miscellaneous.html 2009/10/27 Schwab,Wilhelm K > Hello all, > > In the short term, I'm looking for where I might find syslog() and friends, > but a fishing lesson would be even better. How does one figure out in which > library a named fu

Re: [Pharo-project] issue 496: Morph>>heading

2009-10-28 Thread Miguel Enrique Cobá Martinez
El mié, 28-10-2009 a las 07:03 +0100, Laval Jannik escribió: > So, > > Is anyone use the rotation in pharo-Core ? > If not, I will remove it. > And I will try to put it in another package, which will be loaded after. > Remove it, please, is not a core feature. > Jannik > > > On Oct 26, 2009,

Re: [Pharo-project] issue 496: Morph>>heading

2009-10-28 Thread Laval Jannik
On Oct 28, 2009, at 16:26 , Miguel Enrique Cobá Martinez wrote: > El mié, 28-10-2009 a las 07:03 +0100, Laval Jannik escribió: >> So, >> >> Is anyone use the rotation in pharo-Core ? >> If not, I will remove it. >> And I will try to put it in another package, which will be loaded >> after. >> >

Re: [Pharo-project] Abstract classes

2009-10-28 Thread Lukas Renggli
>> As Mariano writes, most applications implement a message #isAbstract >> themselves with the exact semantics they require. I don't think a >> generic message in Behavior is really useful, especially if it is not >> used by the core system. > > In that case, we could have isAbstractClass or someth

Re: [Pharo-project] Shared directories: The bug is quicker than the eye

2009-10-28 Thread Schwab,Wilhelm K
Dave, I'm not a fully trained penguin herder yet, so I have to ask a dumb question: is the idea to connect to the same file that went wrong and get an error condition after the fact, or are you hoping that opening and flushing will cause an error by itself? I suspect the problem is very real,

Re: [Pharo-project] Linux FFI question: library given function name?

2009-10-28 Thread Schwab,Wilhelm K
That seems to work. I found a similar looking script that did not. So far, it's sending me to a static library that I have yet to associate with anything that FFI can load, but it's progress. Thanks, Bill From: pharo-project-boun...@lists.gforge.inria.fr [

Re: [Pharo-project] Abstract classes

2009-10-28 Thread Alexandre Bergel
> What would be your isAbstract be useful for? To know whether it is wise to instantiate a class or not Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _

Re: [Pharo-project] Abstract classes

2009-10-28 Thread Lukas Renggli
>> What would be your isAbstract be useful for? > > To know whether it is wise to instantiate a class or not That would be a pure guess then. Presumably you will still have to look at the implementation, at the documentation, at its users or study the coding conventions of the project to know for

Re: [Pharo-project] Making packages shipped with Pharo ready for 1.0

2009-10-28 Thread Adrian Lienhard
Thanks, Nicolas We integrated your fix and now it does not fail anymore. Just have to remove it from expectedFailures. Cheers Adrian On Oct 27, 2009, at 17:58 , Nicolas Cellier wrote: > 2009/10/27 Adrian Lienhard : >> Pharo-core tests failing >> >> - FontTest>>testFal

Re: [Pharo-project] Linux FFI question: library given function name?

2009-10-28 Thread Martin McClure
Schwab,Wilhelm K wrote: > That seems to work. I found a similar looking script that did not. So > far, it's sending me to a static library that I have yet to associate > with anything that FFI can load, but it's progress. I'm not an expert in this field, but I've gone fishing for similar thin

Re: [Pharo-project] Starting out: db and gui recommendation

2009-10-28 Thread Stéphane Ducasse
> > mariano >it would be nice if you could start to write something on it. > May be we could turn that into a chapter for the pharo v 2 book? > > Yes! I have no problem to do it. Right now, I will translate one of > the Pharo By Example (1) chapters to Spanish. So, I will be familiar >

Re: [Pharo-project] Starting out: db and gui recommendation

2009-10-28 Thread Stéphane Ducasse
> Thanks for all the responses. They have caused me to rethink a > couple of things already. > > Sqlite is a holdover from thinking about a .Net version of this > app. I just need to persist my data. Something like Magma should be > fine. I had been looking at Sqlite as an embedded database

Re: [Pharo-project] Hashed collection changes, the performance graphs

2009-10-28 Thread Stéphane Ducasse
Martin so what you are saying is that we can gain speed. And that these changes are beneficial for simple default. > The test code, a variant of the test from the HashTable SqueakSource > wiki, is at the bottom of this message. Basically, it adds a bunch > of instances of Object to a Dicti

Re: [Pharo-project] Hashed collection improvements: Some code

2009-10-28 Thread Stéphane Ducasse
Martin are these changes related to the graphs you sent? I will have a look after my hospital check. Andres? Nicolas? Any feedback? Martin I imagine that I can package the changes :) Stef On Oct 24, 2009, at 4:01 AM, Martin McClure wrote: > OK, here's a filein that improves Pharo hashed collec

Re: [Pharo-project] Abstract classes

2009-10-28 Thread csrabak
Em 28/10/2009 17:52, Lukas Renggli escreveu: > > >> What would be your isAbstract be useful for? > > To know whether it is wise to instantiate a class or not > That would be a pure guess then. Presumably you will still have to > look at the implementation, at the documentation, at its users

Re: [Pharo-project] Shared directories: The bug is quicker than the eye

2009-10-28 Thread David T. Lewis
On any platform that supports the C library fflush(), there is numeric error number ("errno") that is set if the fflush() call does not succeed (type "man fflush" on your Linux or OS X console for details). John pointed out that the #flush method does not provide you with the errno value in the ev

Re: [Pharo-project] Hashed collection changes, the performance graphs

2009-10-28 Thread Andres Valloud
Stephane et al, Martin and I discussed this yesterday night at the PDX Smalltalk user group meeting. Mostly we agree, with perhaps one small exception. In order to make hashed collections simpler and identity hash handling more straightforward, hashed collections should get a small integer ra

Re: [Pharo-project] Hashed collection improvements: Some code

2009-10-28 Thread Andres Valloud
I should point out that the changesets I sent implement the scaledIdentityHash approach I just wrote about in the previous email. The mutation methodology is more robust as well (note it can also be used to implement the primIdentityHash approach). Finally, the prime table in the changesets I

Re: [Pharo-project] Linux FFI question: library given function name?

2009-10-28 Thread Schwab,Wilhelm K
Martin, Objdump is a new one; I found readelf, which with the --symbols option seems to do the job, though the names look a little more C++ decorated. That loud thump (by the time it reached your location) you just heard was me slapping my head over missing /lib. Many thanks! Bill -Or

Re: [Pharo-project] Hashed collection improvements: Some code

2009-10-28 Thread Martin McClure
Stéphane Ducasse wrote: > Martin > > are these changes related to the graphs you sent? Yes, you should be able to duplicate the graphs after filing in the code I sent. Sorry for not giving the two the same subject line; I was in too much of a hurry that night. But the code I sent isn't quite r

Re: [Pharo-project] Shared directories: The bug is quicker than the eye

2009-10-28 Thread Schwab,Wilhelm K
Dave, I am pretty certain I am *not* following all of this, but it is something that I will hopefully check in the near future. I have been amazed at Squeak's willingness to suppress information about errors in other situations, so this is worth a careful look. Bill -Original Message--

Re: [Pharo-project] Hashed collection changes, the performance graphs

2009-10-28 Thread Martin McClure
Andres Valloud wrote: > Stephane et al, > > Martin and I discussed this yesterday night at the PDX Smalltalk user > group meeting. Mostly we agree, with perhaps one small exception. In > order to make hashed collections simpler and identity hash handling more > straightforward, hashed collect

Re: [Pharo-project] Making packages shipped with Pharo ready for 1.0

2009-10-28 Thread Martin McClure
Adrian Lienhard wrote: > Pharo-core tests failing > > - FontTest>>testFallback (assumes different font, to be removed) > - FontTest>>testParagraphFallback (assumes different font, to be > removed) > - FontTest>>testResetAfterEmphasized (assumes different font, to be >

Re: [Pharo-project] Hashed collection changes, the performance graphs

2009-10-28 Thread Andres Valloud
Martin, One of the constituencies I thought of when I decided to leave identityHash alone was folks like you. Now, as a representative, if you are ok with dealing with broken identityHash senders (which I hope will be few), then most of my motivation for leaving identityHash unchanged is gone

Re: [Pharo-project] Hashed collection changes, the performance graphs

2009-10-28 Thread John McIntosh
I looked at the squeak identityHash in squeak a few years back (a) how efficient was the algorithm? Attempted at one time to replace with a fixed array of numbers. There was some benefit on slow machines. (b) only calculate the identity hash when required, but then how do you mark the oops with t

Re: [Pharo-project] issue 496: Morph>>heading

2009-10-28 Thread Serge Stinckwich
2009/10/28 Laval Jannik : > > On Oct 28, 2009, at 16:26 , Miguel Enrique Cobá Martinez wrote: > >> El mié, 28-10-2009 a las 07:03 +0100, Laval Jannik escribió: >>> So, >>> >>> Is anyone use the rotation in pharo-Core ? >>> If not, I will remove it. >>> And I will try to put it in another package, w

Re: [Pharo-project] Making packages shipped with Pharo ready for 1.0

2009-10-28 Thread Mariano Martinez Peck
On Wed, Oct 28, 2009 at 11:01 PM, Martin McClure wrote: > Adrian Lienhard wrote: > > > Pharo-core tests failing > > > > - FontTest>>testFallback (assumes different font, to be removed) > > - FontTest>>testParagraphFallback (assumes different font, to be > > removed) > > -

Re: [Pharo-project] issue 496: Morph>>heading

2009-10-28 Thread Laval Jannik
On Oct 29, 2009, at 04:27 , Serge Stinckwich wrote: > 2009/10/28 Laval Jannik : >> >> On Oct 28, 2009, at 16:26 , Miguel Enrique Cobá Martinez wrote: >> >>> El mié, 28-10-2009 a las 07:03 +0100, Laval Jannik escribió: So, Is anyone use the rotation in pharo-Core ? If not, I wi

Re: [Pharo-project] PhExample, because well designed tests expand on one another (Sneak Preview)

2009-10-28 Thread Dennis Schetinin
2009/10/27 Niko Schwarz > The example discussed above would read in code as follows: > > EGExample subclass: #ForExampleStack >… > > shouldBeEmpty >"Create the empty stack" >| stack | >stack := Stack new. >stack should be isEmpty. >stack size should