Monthly Archives: April 2014

Pharo 3.0 is just released

Just a little overview

The past year seemed short as we got busy building more than usual. Many things have changed in Pharo. Here are the highlights:
– The new modular Opal compiler is now the default compiler used in the system.
– The Athens vector graphics canvas is now integrated and it supports Cairo rendering on all platforms.
– Many tools have been rewritten using Spec, a new framework for building user interfaces.
– Versionner and Kommiter are two of the new development tools.
– RPackage, a new package mechanism got enhanced with tags and is fully integrated in the system.
– The debugger model was rewritten to become modular, the inspector received a bump to support multiple views, and the Nautilus code browser supports tags, search and lot more improvements.
– Morphic has seen many cleanings and improvements and the visual theme has been revamped.

Read the news!

http://pharo.org/news/pharo-3.0-released

 

 

Gravatar for Pharo

Hi,

The "Gravatar" project is a simple wrapper for the Gravatar API allowing you to get small avatar images for a given registered email address. You can easily access and use it in Pharo.

The project is located on STHub at http://smalltalkhub.com/#!/~TorstenBergmann/Gravatar

To install just open the Pharo configuration browser and load "Gravatar" from there.
You can also install manually, read the docu on the project page.

Some examples:

    Gravatar imageURLFor: 'example@mail.com'
    
If you require a different size just evaluate:

    Gravatar imageURLFor: 'example@mail.com' size: 32.

If you need the real image you can use Pharos Zinc components suite to get the image form over HTTP and open it on your Pharo desk:

|form|
form := ZnEasy getJpeg: (self imageURLFor: 'example@mail.com').
form asMorph openInWorld

In the end it is just a simple class - but I think it may be useful for 
others too.

Thx
T.

Commits: March 3

30823

30822

30821

30820

30819

30818

30817

30816

30815

Font Awesome for Seaside

Hi,

FontAwesome is (as you may know) an iconic font designed for the user with Twitter Bootstrap.

I now created a "FontAwesome for Seaside" project - which is a small Seaside wrapper for the 
FontAwesome project (using the latest version 4.0.3). 

This is intended as an addition to the already available "Bootstrap for Seaside" [2] project 
that I wrote and both should allow you to give your Smalltalk based web application a nice 
stylish look.

The project is located on STHub, see [1] where you will also find the documentation.

A live demo can be found on http://pharo.pharocloud.com/fontawesome.

To try yourself load it from the Pharo config browser or read the docu to see what is required.

Thx
T.

[1] http://smalltalkhub.com/#!/~TorstenBergmann/FontAwesome
[2] http://smalltalkhub.com/#!/~TorstenBergmann/Bootstrap

Mapless

Sebastian Sastre juste released Mapless.

Mapless is a small framework for storing objects in a key->data fashion (i.e.: noSQL databases) without requiring any kind of object-data map. So far only MongoDB is supported. It can use Redis for reactivity (pub/sub) and cache.

Motivation

I wanted to persist objects with extremely low friction and extremely low maintenanceand great scaling and availability capabilities so Mapless is totally biased towards that. This framework is what I came up with after incorporating my experience withAggregate.

There is no spoon…

There is no object-relational impedance…

There is no instVars…

only persistence 😀
 
Code and instructions here:
 
 
All MIT, enjoy
 

DigitalOcean initial support

Sean De Nigris announced a first initial support for DigitalOcean. Here is the mail sent by its author.

The embryo is alive. See documentation at
http://smalltalkhub.com/#!/~SeanDeNigris/DigitalOcean

A few supported operations:
DoDroplet allActive.
DoDroplet allActive detect: [ :e | e name = ‘mycooldomain.org‘ ].
DoDropletSize all.
DoDropletSize named: ‘512MB’

Commits: March 21-30

30814

30813

30812

30809

30808

30807

30806

30805

30803

30802

30801

30800

Getting AST Visual in 3 min

There was one announce about C# tool to see ASTs and Alexandre Bergel shows that within minutes you could get the same in Pharo with roassal :). Here is what he is saying:

I am not sure to what syntax visualization is useful for, but indeed, this is easy in Roassal. Assuming a class MyVisitor, that simples collect the nodes of the AST.

| ast visitor g |
“We get the nodes from the AST”
ast := RBParser parseMethod: (ArrayTest>>#testReplaceFromToWithStartingAt) getSource.
visitor := MyVisitor new.
ast acceptVisitor: visitor.”Visualization”
g := RTGraphBuilder new.
g node
if: #isMessage shape: (RTEllipse new size: 10; color: Color red ) + (RTLabel new text: #selector);
if: #isReturn shape: (RTEllipse new size: 10; color: Color red );
if: #isBlock shape: (RTBox new size: 10; color: Color blue );
shape: (RTEllipse new size: 10; color: Color gray ).
g layout use: RTTreeLayout new.
g edge connectTo: #parent.g addAll: visitor nodes.

g applyLayout.
g view

Screen Shot 2014-04-05 at 9.56.35 PM
Tagged , ,

Shapping data with Roassal

Roassal is a visualization engine for Pharo and it is described in the http://DeepIntoPharo.com book.  
Here is an example.
 
The data are embedded within the distribution of Roassal2. Just execute:

RTMetricMap new example06DeepIntoPharo

and you will get the same rendering.
 
The map builder has attracted some interest. Here is a small example on how you can render you own data. 
First of all, you need some data. Usually, you get data in a tabular table. For example, I just stumbled on http://www.gdbridge.org/gdb_index
I copy and paste the small columns on the right hand side of the web page into a string in a workspace.
I then convert the third column as floats. I paint all countries in white. I then paint countries from the table using the first column as a name, and the third column as a color gradient 
 
| b table |
b := RTMetricMap new.
table := RTTabTable new.
table input: ‘Hong Kong, China 1 0.631447
Singapore 2 0.5889286
Netherlands 3 0.515425
Switzerland 4 0.5018929
United States 5 0.4871152
Norway 6 0.4851121
Denmark 7 0.4665922
Sweden 8 0.4567912
Finland 9 0.4460537
Korea, Rep. 10 0.4382369
Ireland 11 0.4324097
Luxembourg 12 0.4227912
Germany 13 0.4190357
Belgium 14 0.4022478
Canada 15 0.3983661
Australia 16 0.3982408
United Kingdom 17 0.3930691
Japan 18 0.3904902
Spain 19 0.3876414
Kuwait 20 0.3800776
France 21 0.377015
Brunei Darussalam 22 0.3627484
Austria 23 0.3621858
Israel 24 0.3585244
China 25 0.3560882′ usingDelimiters: String tab.
table convertColumn: 3 to: [ :t | Float readFrom: t ].

b allCountriesColor: Color white.
b countries: table values named: #first metric: #third.

b open

 
 
Oh… almost forgot. You can export a visualization on the web. Here is the generated HTML for the sells

Image

Tagged