Hi Adrian,
I saw that you removed Collection>>separatedBy: from CodeFoo. I
thought this was a nice method, and I looked for other similar
methods to use, but I cannot seem to find the right one.
What am I missing?
Doru
--
www.iam.unibe.ch/~girbawww.iam.unibe.ch/~girba/blog/
"Value is always contextual."
Hello,
I am a new mooser, I am working on a Smalltalk project with VisualWorks. I am trying to write a unit test but I have a problem: I have not possibility to run and to step my test because I don't have the tools for it. Nevertheless, I have loaded the package StefFoo, my test class inherites from SUnit.TestCase.
What did I forget to run my tests?
Romain
Hey Stef, dear Moosers,
there is a new implementation of lazy (or dynamic, as I call them
now) inst vars for Moose. The new implementation is not based an wide
classes, but on anonymous subclasses, and includes very strict sanity
checks to guarantee type safety and Smalltalk's language model.
You may only extend a base class with an inst var, iff
name isString.
name isSymbol not.
name allSatisfy: #isLetter.
(case allInstVarNames includes: name) not.
class canUnderstand: name asSymbol.
class canUnderstand: (name copyWith: $:) asSymbol.
and you must implement the accessors in the class as follows
class >> foo
^self dynamicInstVarNamed: 'foo'
class >> foo: value
self dynamicInstVarNamed: 'foo' put: value
with this setup, we can guarantee that no tool is broken, neither the
browser, nor inspector and debugger or senders- and implementors-of.
Except for the first write access, access time on an dynamic instance
variable is guaranteed to be the same as for "normal" instance
variables.
Please refer to DynamicInstVars and DynamicInstVarsTest on SCG Store,
for a first draft implementation.
cheers,
AA
You are right.
On 3 Sep 2007, at 10:24 , Oscar Nierstrasz wrote:
>
> Aren't these emails supposed to be going to the moose-dev list?
>
> They are all being sent to scg-staff now.
>
> Oscar
>
> On Sep 3, 2007, at 10:10, Bergel, Alexandre wrote:
>
>>> Why touch the compiler, when two simple methods in Object can do
>>> the same?
>>
>> If WideClass is just an optimisation, then I should write my code
>> as if this mechanism is not present. Moreover, using a kind of
>> annotation mechanism will make legacy code to benefit from WideClass.
>>
>>>
>>> Also, when lazy inst vars are part of the class def, again we run
>>> into the limitation that they can not be a package extension.
>>> This is one of the needs we do have in Moose.
>>
>> As far as I understand, an ideal implementation of WC will have to
>> be in the VM. And this, for the same reason that lazy evaluation
>> in Haskel is implemented in the VM.
>>
>> Alexandre
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
As ESUG was so inspiring, I could not resist some VW hacking on the
train home...
If you browse to WideClass and WideClassTest on SCG Store, there is a
simple implementation of wide classes. As we have tons of empty inst
vars in moose models, that might help us to save some megas on large
case studies.
How to use it?
Sending #wide:put: to any object will install an instance var and
accessors on the receiver instance.
o := Object new.
o wide: #foo put: 4.
o foo
and even better, if you implement #foo and #foo: as follows
foo ^nil
foo: arg self wide: #foo put: arg
upon first execution of #foo: the foo inst var is installed and both
methods get properly overriden with simple accessors. There is no DNU
hack anywhere!
Hope you have some fun playing around with it!
cheers,
AA
Hi guys
As I mentioned during the moose workshop we would like to get your
evaluation of our ideas.
I would really like if you could perform the experiment described at:
http://lseg.free.fr/PackageBlueprints/
Stef
Hi,
Today I tried to import from mse files and I get the following
exception during the import:
"Message not understood: #accessedByLists"
Then, I tried to import a model from Smalltalk and to export it in
mse. Loading this fresh file generated the same exception. Could you
please fix this?
(I peeked a bit in the Moose code and it seems that
FAMIXAbstractStructuralEntity has an accessedByList attribute and two
pairs of accessors: #accessedByList and #accessedByLists and the
setters, too. Maybe it has something to do with this).
Thanks and cheers!
Ricky
PS. And another issue is that when I tried to load the latest
MooseDevelopment bundle, I got some packages that could not be loaded...
Hi,
I chatted with Travis Griggs and he showed me a package called
LessProgress. This packages replaces the ugly progress bars that
always get on top of any window with a small progress bar in the
Launcher (see attached picture).
To use it, you have to:
- load LessProgress (either from Cincom or from Bern Store)
- go to the Window menu in the Launcher
- New Launcher
- done
I put this in my base image.
Cheers,
Doru
--
www.iam.unibe.ch/~girbawww.iam.unibe.ch/~girba/blog/
"We cannot reach the flow of things unless we let go."