New Pharo by Example book available!

Hi

After several iterations and some month of efforts, the new version of Pharo by Example is finally available in print form and pdf.

http://books.pharo.org

Tx all the contributors.

Pharo TechTalk

Hi,

I added

http://pharo.org/TechTalk

This is linked from http://pharo.org/community

The idea is to keep a log of all past tech talks with links to the archival recording (if there is one).

Marcus

An instance variables cache

Hi,

at Synectique, we are using cache for lots of projects and for now we were always using another instance variable or a dictionary to store many. It is complicated to maintain and we are always reinventing the wheel.

That’s why i created a first implementation (very naive but functional, documented and tested) of a cache.

It is available here (with usage explication):
http://smalltalkhub.com/#!/~GuillaumeLarcheveque/SmallCache

and you can get it by doing:

Metacello new
smalltalkhubUser: ‘GuillaumeLarcheveque’ project: ‘SmallCache’;
configuration: ‘SmallCache’;
version: #development;
load

Tell me if you are interested in it or if you have ideas about it.

Pillar 4.0.7 for Pharo 50 is out

Hi

We are happy to announce a new version of Pillar for Pharo 50 and 60.
Thanks Maxime Roelandt for the help.
Features
     – Now we can rebuild the mooc slides (the metadata is correctly handled)
     – The double walking of the tree fixes by Yann Dubois is integrated.
     – We checked and we can produce HTML, books and slides
The version 4.0.7 will be the last stable version for Pharo 50.
On Pharo 60 we will start a large cleaning. Here is the list:
– integrate AST tokens fixed by Doru.

– decouple the installer logic from the command-line work made by Maxime.
– remove the DNU tricks for magritte elements.
– repackage and minimize dependencies (the core of Pillar should not depend on magritte).
– package a minimal core that could be used for class comments.
– document architecture and phases.
– remove the “optimisation hell” produced by metadata vs. data. (KISS principle please).
– make sure that ecstatic can be reexpressed on top of the new system.
– make sure citezen components and smart publication ecstatic plugin can work
– remove dependency to git script in the book template.
– add test block so that we can run the tests of a book automatically.
If you want to help you are welcome.
Pillar can be a really sexy Pharo showcase.

[consortium] 27 feb-5 march

Hello!

This is my weekly ChangeLog, from 27 February 2017 to 5 March 2017.
You can see it in a better format by going here: http://log.smallworks.eu/web/search?from=27/2/2017&to=5/3/2017

ChangeLog
=========

3 March 2017:
————-

* And now I made +libssh2.so+ compile on linux too

I think Iceberg is fixed now for linux, can someone with linux try +vmLatest60+.

* I worked on VM for linux, this time fixing dependencies for libgit2: it was not working because it was trying to link libssh2 existing in the system instead the one we provide (a problem with rpath)… I figured out I  need to add some CMAKE options:

—-
-DCMAKE_SKIP_BUILD_RPATH=FALSE
-DCMAKE_INSTALL_RPATH=”.”
—-

otherwise +make install+ was ignoring the +-Wl,rpath,.+ configuration. With this it seems to be working, but now I have a problem with +libssh2+ compilation.

I’ll see this next.

* I took some moments to fix a problem on new UFFI version (0.26): Now, structures use a class variable to keep the offset value of a field. So now, instead having an accessor to a field of the form (for example):

—-
MyStructure>>myField
^ handle unsignedLongAt: 42
—-

… now you have an accessor of the form:

—-
MyStructure>>myField
^ handle unsignedLongAt: OFFSET_MYFIELD
—-

this is necesary to allow different platforms to use same structures (because sizes of fields, and in consequence of offsets of them inside a stricture are different). This ‘offsets’ are calculated (as structure compiled specs) at first access to +#compiledSpec+ of structure, which usually happens when you use it first time… but now always, as [case: 19788](https://pharo.fogbugz.com/f/cases/19788) shows.

Well, now I fixed that

2 March 2017:
————-

* I added a Discord link on [http://pharo.org/community](http://pharo.org/community)… I want to slowly start moving our community there. I know Slack is very popular among us this days but Dicords offers some advantages (like no 10k limit on messages and a powerful search).

1 March 2017:
————-

* … and now I made the [case:19783](https://pharo.fogbugz.com/f/cases/19783), to make SDL2 work on 64bits (it works!)

* Yesterday I spent the full day debugging a VM to see why Athens was not working for 64bits and I finally figured out the problem was in image and not in VM

As a result of the work, I produced these fixes:

* [case:19781](https://pharo.fogbugz.com/f/cases/19781) to fix a problem answering pointers on callbacks.
* [case:19782](https://pharo.fogbugz.com/f/cases/19782) to actually prepare Athens.

With this two cases, Athens works in 64bits (almost)

Now there is a problem in 64bits callbacks that makes the +VGTigerDemo runDemo+ to fail after some cycles. Since this problem does not happens on 32bits, I assume there is a problem on how callbacks work on 64bits. I’m not working on that (I will work also in migrating SDL2).

27 February 2017:
—————–

* Well, I spend some time trying to blindly figure out why athens may crash time to time when drawing surfaces,  basically testing the approachs [Ronie proposes](http://forum.world.st/Too-frequent-crashes-td4927143i20.html#a4934027).

First approach consists on copying data to not rely on a surface at all. Problem with this is that it involves a whole full copy, that causes a lot of GC that pauses a lot the image… so smoothness is gone.

Second approach seems a lot more doable, but I still don’t know if it works:

—-
Form subclass: #AthensCairoSurfaceForm
instanceVariableNames: ‘surface’
classVariableNames: ”
package: ‘Athens-Cairo’

AthensCairoSurfaceForm>>surface
^ surface

AthensCairoSurfaceForm>>surface: anObject
surface := anObject

AthensCairoSurface>>asForm
“create a form and copy an image data there”
self checkSession.
self flush.
^ (AthensCairoSurfaceForm extent: (self width@self height) depth: 32 bits: id)
surface: self;
yourself
—-

this will prevent surfaces to be garbage collected before its time and seems to be working fine (at least in my machine).

cheers!
Esteban

Testing regexp

Hi,

I wrote a little tool to test regular expressions and verify that
given samples match it. It also helps to divide an expression into
subexpressions to retrieve parts of a matched string.

Screenshot is attached. Code, load instructions and full tutorial
on how to use it is on https://github.com/astares/Pharo-Regex-Tools

Hope it is useful for others too. Have fun!

Bye
T.

XML Metadata Interchange (XMI) for Pharo

Hi,

if you work with UML, modeling tools or model data exchange often you might know XMI –
the XML Metadata Interchange format.

I wrote a little package that makes it easier to work and browse data based on this
format within Pharo.

For instance you can open an XMI object either from a given stream
or URL:

(XMIFile fromURL: ‘http://www.omg.org/spec/UML/20131001/UML.xmi’) inspect

You can also open a file

XMIFile importFile

Code is available on https://github.com/astares/Pharo-XMI

The package includes a small GT extension allowing you to walk and dive through the XMI
structure (see attached screenshot) and as the XMI nodes are unified it is easy to
code some code generators or transformers in Pharo afterwards.

For instance I used this package for a simple Pharo code generator based on Eclipse EMF models/diagrams.

Within the code you will find some examples to browse through prominent XMI models like:

– UML Spec
=> (XMIFile fromURL: ‘http://www.omg.org/spec/UML/20131001/UML.xmi’) inspect

– VISUAL PARADIGM
=> (XMIFile fromURL: ‘https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/VP_XMI21.xmi’) inspect

– ENTERPRISE ARCHITECT
=> (XMIFile fromURL: ‘https://raw.githubusercontent.com/staruml/XMI/master/unittest-files/EA_XMI21.xmi’) inspect

– ARCHIMATE
=> (XMIFile fromURL: ‘https://www.reflektis.com/repos/archimate-3.0.xmi) inspect

Once the inspector opens you have to select the “rootNode” and then the “Hierarchy” tab.

In Pharo 6 you can load “XMI” right from catalog. Hope the package is useful for others too.

Bye
T.xmi_gt.png

Agile visualisation book….

Just a little announce to tell you that the nice Agile visualisation book is now part of the Pharo books on http://books.pharo.org

Great job Alexandre Bergel!

Stef

Trick to get one single menu

Hi Pablo,

Concerning the World menu you first define your menu in a method, and
tag it with a dedicated pragma, for example in Dr. Geo I wrote:

worldMenu: aBuilder
<drgeoMenu>
(aBuilder item: ‘New’ translated)
action: [DrGeo newFullScreen];
icon: ThemeIcons current smallNewIcon;
order: 0.
(aBuilder item: ‘Open’ translated)
action: [DrGeo openFigureThumbnail: nil];
icon: ThemeIcons current smallOpenIcon;
order: 1.
(aBuilder item: ‘Quit’ translated) action: [DrGeo quit]; order: 999

Then you register this as your new world menu using the pragma name:

WorldState desktopMenuPragmaKeyword: ‘drgeoMenu’.

Pharo Bootstrapping

Hi,

I have published a short video of the Pharo bootstrapping from a Ring model that is browsed and modified by the Calypso browser.

No audio, please enable subtitles for the description.

Cheers,
— Pavel