Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.613.mcz
==================== Summary ====================
Name: Kernel-nice.613
Author: nice
Time: 29 August 2011, 12:20:33.523 am
UUID: c5ac2f0a-3419-41d9-a4e5-0331ff55467d
Ancestors: Kernel-cmm.612
Don't provide separate setters for Complex #real: and #imaginary: parts.
Instead, provide a single #real:imaginary: initializer, that's faster and safer (like Magnitude, Complex numbers might be shared and it would be dangerous to modify a Complex in place).
=============== Diff against Kernel-cmm.612 ===============
Item was changed:
----- Method: Complex class>>real:imaginary: (in category 'instance creation') -----
real: aNumber1 imaginary: aNumber2
+ ^self basicNew real: aNumber1 imaginary: aNumber2!
- | newComplex |
- newComplex := super new.
- newComplex
- real: aNumber1;
- imaginary: aNumber2.
- ^ newComplex!
Item was removed:
- ----- Method: Complex>>imaginary: (in category 'private') -----
- imaginary: aNumber
- imaginary := aNumber.!
Item was removed:
- ----- Method: Complex>>real: (in category 'private') -----
- real: aNumber
- real := aNumber.!
Item was added:
+ ----- Method: Complex>>real:imaginary: (in category 'private') -----
+ real: aNumber1 imaginary: aNumber2
+ "Private - initialize the real and imaginary parts of a Complex"
+ real := aNumber1.
+ imaginary := aNumber2.!
Hi all,
I'm happy to announce that we have a public, read-only Squeaksource mirror up and running at the Universidad de Chile. The URL is: http://www.dsal.cl/squeaksource/ TECHNICAL DETAILS BELOW. Feel free to broadcast this announcement!
MOTIVATION:
For us, Switzerland is a long way and the connection to Squeaksource has always been painfully slow. We've set up this mirror to help to address this, and I imagine that it will be of use not only for the Chileans but also other countries in latin america, which is why I am announcing it here.
ITS TRANSPARENT:
I've worked out a way to make the use of this mirror transparent when using Pharo 1.3: you just use monticello as always, and have a setting to redirect loads from Squeaksource to wherever you want. I have successfully loaded Moose and Seaside from the mirror using this package, so it should work for you. And I can tell you, it was blazingly fast: Seaside loaded in 5m45, and most of the time was spent compiling ... ;-)
So try the mirror and the package out, send me your comments, we want to work on this to make Squeaksource a better experience for everybody.
HOW TO USE from Pharo 1.3:
- Get the redirection package from http://www.squeaksource.com/MonticelloRedirect
- To load from the mirror instead of from Squeaksource, do-it of the following:
MRManager redirectFrom: 'http://www.squeaksource.com/' to: 'http://www.dsal.cl/squeaksource/'.
- To remove this redirection: MRManager removeFrom: 'http://www.squeaksource.com/'.
- See comments of MRManager for more info. MRManager list can be useful at some times.
- Only 2 classes, < 10 methods, not counting accessors. The trick is the use of MethodWrappers.
- I did not test this in Squeak or other versions of Pharo. Feel free to try it out in your environment and send me patches if needed.
- There is no UI, contributions are welcome!!
DETAILS ON THE MIRROR
- It's a full copy of Squeaksource, updated daily.
- The mirror is read-only: if you want to make a commit you still have to do it in Squeaksource. This is to avoid all the complications of distributed writes.
- Updates happen once a day, before midnight Chilean time. Updates take typically (up till now) 200 minutes (!), average download speed here is 200KB/s :-(
- The Squeaksource team has been so kind as to provide a list of the packages that are in Squeaksource, refreshed daily and we pass this to wget (with some massaging of the data inbetween).
- The Squeaksource list of packages is available here: http://scg.unibe.ch/download/SSProjectList/projectList.txt
- The software that does the mirror is available here: https://github.com/vramiro/easy-wget-mirror
MANY THANKS TO:
- Daniel Galdames for doing the original mirroring tests
- Victor Ramiro for taking Daniels' work and putting it in production
- The Squeaksource team for providing the daily list of packages, especially Fabrizio Perin and Mircea Lungu
- You for trying it out and telling us about it!
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry
jfabry(a)dcc.uchile.cl - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile
Hi,
[this is not really about VM alone, but rather how image and VM
interact - hence posting to multiple lists]
In the process of porting Cog to Android, I observed the following
pattern. If a scrollbar's "up" or "down" button is held pressed
(prolonged tap on a button) for few seconds, the VM freezes, and gets
killed by Android. Digging down the code got me to the
WorldState>>interCyclePause: method. When there are morphs requesting
stepping by shorter than certain time interval, the process
responsibke for running step methods keeps looping without giving up
to lower priority processes (and the host OS). ScrollBar seems to
decrease the stepping interval over time to simulate accelerated
scrolling.
In order to port Cog to Android, I turned it into an event-driven VM
based on ideas found in [1]. The same was done by Andreas for his
earlier Classic VM port. My approach is a bit different such as the
longjmp call is made as part of the relinquishProcessor primitive.
Such primitive is called only from the lowest priority (idle) process
which only can run when there are no external events to deal with. The
event-driven VM needs to exit from the interpreter to the host process
in order to obtain any input events. Thus, non-interrupted polling
just deadlocks the interpreter as it cannot exit to the host process
to get more events, yet keeps polling for them.
The serverMode flag [2] (aka Mantis #6581) came to rescue. With such
flag set to true, polling for events always yields CPU for 50ms (which
in the Android case is meaningless anyway: I would not give the VM
idle timer more often than 10 times per sec, so 50ms granularity is
just not handleable). Anyway this does the trick as the lowest
priority process gets its CPU time, and exits the interpreter to the
host process. With serverMode = true I can tap a scroller button as
long as I want, and even the text cursor in a workspace keeps blinking
which means that stepping works and VM is alive. BTW in Android, the
interpreter will be called as soon as any user action is intercepted,
so responsiveness is not degraded regardless of the delay introduced
by serverMode.
I have found at least one place (this is in PharoCore) where
serverMode is not honored: PolygonMorph class >> fromHand: (this
method creates a polygon drawn by the mouse)
This method has code pieces (repeating multiple times btw - why is it
not a separate method?)
[Sensor anyButtonPressed] whileFalse:
[self currentWorld displayWorldSafely; runStepMethods].
which is clearly grabbing the event sensor to the polygon morph while
keeping other morphs stepped, so the VM does not seem dead entirely.
In my case though executing PolygonMorph fromHand: defaultHand freezes
the VM immediately as this is uninterrupted polling again.
While I'll try to experiment with inserting interCyclePause somewhere
in these loops, there are broader questions on how event polling is
done these days:
1. Are there other morphs in packages not included in PharoCore where
event grabbing is done such way?
1a. Is this possible in general to have such functionality properly
embedded in WorldState instead of having it in a morph itself, if
event grabbing is needed?
2. Are there images in active development (other than PharoCore, and
Squeak) where event polling is done without an option to relinquish
processor?
In fact, this VM freezing on stepping morphs was a big issue, and it
mainly kept me from moving towards the public release. Now that it
seems to be solved (unless there is a flaw in my logic above) it takes
me closer to finishing the Cog for Android port.
Thanks.
------------------------------------------
[1] http://lists.squeakfoundation.org/pipermail/vm-dev/2009-November/003385.html
[2] http://bugs.squeak.org/view.php?id=6581
--
Dimitry Golubovsky
Anywhere on the Web
in http://www.mirandabanda.org/files/Cog/VM/VM.r2487/.
Fix bugs described in the "[Pharo-project] Troubles with #flushCache and
#run:with:in:" thread http://lists.gforge.inria.fr/pipermail/pharo-project/
2011-July/050858.html. The PIC machinery wrongly treated invoke-as-method
sends as MNUs.
Closely related, finally fully implement PIC MNU cacheing where, by calling
a
special abort, a PIC is able to record that a gven selector is an MNU for a
particular class. Speeds up a simple MNU benchmark by 33% (with more
performance the deeper the receiver's cass hierarchy is).
On Mac fix mis-editing of Info.plist to insert revision info so that VM .app
once again starts on 10.5.x.
--
best,
Eliot
I forgot to check yesterday but I finally just did and my missing
versions have been 'magically' restored to my repository! Thanks
Fabrizio and thanks to Tobias for relaying my request for assistance.
Ken
We have a 3 year postdoc position on dynamic languages and security:
http://rmod.lille.inria.fr/web/pier/blog/2011-08-19-2
Do not hesitate to apply
Postdoc Position
• Duration: 3 years
• Starting date: end 2011
• Where: RMOD team at INRIA Lille Nord Europe http://rmod.lille.inria.fr
• Salary: 55 Keuros net (before taxes)
Keywords: dynamic languages, security, information flow, Smalltalk, Javascript
The position will take place in the context of the Systematic Resilience project. We will focus on the following main tasks:
• Identification and understanding of security problems in Javascript and other dynamic languages
• Study and analyze existing approaches towards securing Javascript (Caja, isolates...)
• Comparison of different approaches to secure dynamic applications (Zope model, ZTK), Ruby
• Study of Mirrors/Capabilities as a basis for security in Javascript
• Proposition of an safe architecture for Resilience
Please contact Stephane Ducasse (Stephane.Ducasse(a)inria.fr) for more information.
Stef
Hurrah! After 5 years of inaction with eyes turned toward heavens,
brain waiting for a miraculous enlightening, I suddenly had the
illumination and solved most of may Smallapack problems in Squeak!
See http://smallissimo.blogspot.com/2011/08/smallapack-progress-on-squeak.html
This post shall interest anyone using or wanting to use FFI. Unless
maybe I was the last idiot not knowing how to ;)
This information shall be written in FFI classes comment, in the WIKI
and every place pretending to inform the poor unaware users like me.
Nicolas
Hi guys
We have a position for an engineer position around dynamic language (javascript, smalltalk) and security.
Engineer position
• Duration: 1-2 years
• Starting date: end 2011/beginning 2012
• Where: RMOD team at INRIA Lille Nord Europe http://rmod.lille.inria.fr/
• Salary: 55 Keuros net (before taxes)
Keywords: dynamic languages, security, information flow, Smalltalk, Javascript
The position will take place in the context of the Systematic Resilience project. Three main tasks will be our focus:
• Develop a component model named JIO to manage I/O user interface in Javascript for cloud applications
• Identification of security problems in Javascript
• Study and analyze approaches towards securing Javascript and dynamic languages (Caja, isolate...)
• Prototype of a safe architecture for Resilience
Please contact Stephane Ducasse (Stephane.Ducasse(a)inria.fr) for more information.
------------------------
Dr. Stéphane Ducasse -- Directeur de Recherche (Senior Researcher)
INRIA - USTL - CNRS UMR 8022
stephane.ducasse(a)inria.fr
http://stephane.ducasse.free.frhttp://rmod.lille.inria.fr/
**NEW ***Tel 00 33 (0)3 20 43 42 56 - Fax 33 3 59 57 78 50
40, avenue Halley, Parc Scientifique de la Haute Borne,
Bât.A, Park Plaza, Villeneuve d'Ascq, FR-59650, France.
My goal is to make it easy for Squeak users to store working configurations.
Berts comment finally clued me in about why MCConfigurations have
multiple repository's and then, on top of that, prompting the user for
yet another repository. The ones that are part of the Config specify
where to access the packages. The one prompted by the menu is asking
for where to store the .mcm itself. This is to support configurations
that source from a variety of repositories.
Bert said he was ok with the smart-copy with a warning guard, how
about you? Friends, I am sincerely curious why we would want to store
a broken configuration. The Config specifies the packages that will
be copied, and "permission" is indicated by the user clicking the
"Store" button (the balloon help for it says, "Store the
Configuration"). It seems obvious and "safe" to me. I don't even
think we need the warning, but I would certainly rather live with that
than continuing to copy packages individually..
- Chris
On Sun, Aug 21, 2011 at 12:23 PM, <commits(a)source.squeak.org> wrote:
> David T. Lewis uploaded a new version of MonticelloConfigurations to project The Trunk:
> http://source.squeak.org/trunk/MonticelloConfigurations-dtl.98.mcz
>
> ==================== Summary ====================
>
> Name: MonticelloConfigurations-dtl.98
> Author: dtl
> Time: 21 August 2011, 1:23:49.864 pm
> UUID: 0a3ef28c-0cbb-4dd2-9a08-3923a305d67e
> Ancestors: MonticelloConfigurations-cmm.97
>
> A configuration should not copy files into a target repository without knowledge or permission of the user. Revert prior changes until a safer implementation is proposed.
>
> =============== Diff against MonticelloConfigurations-cmm.97 ===============
>
> Item was changed:
> ----- Method: MCConfigurationBrowser>>checkDependencies (in category 'dependencies') -----
> checkDependencies
> + ^self checkModified and: [self checkMissing]!
> - | missing |
> - missing := (self dependencies collect:
> - [ : ea | ea versionInfo name ]) asSet.
> - self repositories do:
> - [ : eachRepository | eachRepository cacheAllFileNamesDuring:
> - [ missing copy do:
> - [ : eachVersionName | (eachRepository includesVersionNamed: eachVersionName) ifTrue: [ missing remove: eachVersionName ] ] ] ].
> - ^ missing isEmpty or:
> - [ self selectDependency: missing anyOne.
> - self confirm:
> - (String streamContents:
> - [ : strm | strm
> - nextPutAll: 'No repository found for' ;
> - cr.
> - missing do:
> - [ : r | strm
> - nextPutAll: r ;
> - cr ].
> - strm nextPutAll: 'Do you still want to store?' ]) ]!
>
> Item was added:
> + ----- Method: MCConfigurationBrowser>>checkMissing (in category 'dependencies') -----
> + checkMissing
> + | missing |
> + missing := (self dependencies collect:
> + [ : ea | ea versionInfo name ]) asSet.
> + self repositories do:
> + [ : eachRepository | eachRepository cacheAllFileNamesDuring:
> + [ missing copy do:
> + [ : eachVersionName | (eachRepository includesVersionNamed: eachVersionName) ifTrue: [ missing remove: eachVersionName ] ] ] ].
> + ^ missing isEmpty or:
> + [ self selectDependency: missing anyOne.
> + self confirm:
> + (String streamContents:
> + [ : strm | strm
> + nextPutAll: 'No repository found for' ;
> + cr.
> + missing do:
> + [ : r | strm
> + nextPutAll: r ;
> + cr ].
> + strm nextPutAll: 'Do you still want to store?' ]) ]!
>
> Item was changed:
> ----- Method: MCConfigurationBrowser>>store (in category 'actions') -----
> store
> + (self checkRepositories and: [self checkDependencies]) ifFalse: [^self].
> + self pickName ifNotNil: [:name |
> + self configuration name: name.
> + self pickRepository ifNotNil: [:repo |
> + repo storeVersion: self configuration]].!
> - (self checkRepositories and: [ self checkDependencies ]) ifFalse: [ ^ self ].
> - self pickName ifNotNil:
> - [ : name | self configuration name: name.
> - self pickRepository ifNotNil:
> - [ : repo | repo cacheAllFileNamesDuring:
> - [ self configuration dependencies do:
> - [ : each | repo
> - versionWithInfo: each versionInfo
> - ifAbsent: [ repo storeVersion: (MCRepositoryGroup default versionWithInfo: each versionInfo) ] ] ].
> - repo storeVersion: self configuration ] ]!
>
>
>