Planet Squeak

blogs about Squeak, Pharo, Croquet and family
planet squeak - planet squeak es - planet squeak jp - planet croquet - planet squeak code - planet smalltalk

August 16, 2017

PharoWeekly

Pharo 70 is starting to roll for real :)

[Pharo 70 ] build 40 – PR 133 FileReference-EnsureCreateFile

[Pharo 70 ] build 39 – PR 210 20165/Support-segment-path-printing

[Pharo 70 ] build 38 – PR 199 FileReference-size-needs-a-comment

[Pharo 70 ] build 37 – PR 206 File names should not be canonicalised by default

[Pharo 70 ] build 36 – PR 204 Improve-comment-of-SmallDictionary

[Pharo 70 ] build 35 – PR 172 Implement-WeakIdentityValueDictionary

[ Pharo 70 ] build 32  – PR 73

[ Pharo 70 ] build 30  – PR 69

[ Pharo 70 ] Build 29 – PR 191 20302 world menu help should have a comment

[Pharo 70] Build 28 / PR 194

[Pharo 70] Build 26 / PR 192

[Pharo 70] Build 27 / PR 103


by Stéphane Ducasse at August 16, 2017 07:14 PM

“codeAndMusic choses Pharo” testimony

http://www.codeandmusic.com/why-i-chose-pharo-smalltalk-to-build-my-bot/

 

Tx for the testimony Sergio!


by Stéphane Ducasse at August 16, 2017 06:51 PM

August 14, 2017

PharoWeekly

Pharo: a soup of stones with great developers.

I always loved the soup of stones. To me it captures a key aspect of the philosophy behind Pharo. Sharing to empowering us all. And it is working!

https://en.wikipedia.org/wiki/Stone_Soup

Stef

 


by Stéphane Ducasse at August 14, 2017 07:55 PM

Git: keeping your repo in sync

Another really nice blog post around pharo and git

https://github.com/guillep/PharoIntegrationProcess/wiki/Keep-your-repo-in-sync

We want more 🙂


by Stéphane Ducasse at August 14, 2017 06:02 PM

August 11, 2017

PharoWeekly

Glance at the new Pharo70 git-based dev process

https://github.com/guillep/PharoIntegrationProcess/wiki/Pharo-Development-Process

Stef

 


by Stéphane Ducasse at August 11, 2017 05:03 PM

August 10, 2017

PharoWeekly

How to contribute to Pharo 70

Hi

Here is a nice tutorial explaining how to contribute to Pharo 70. https://github.com/guillep/PharoIntegrationProcess/wiki/Contribute-a-fix-to-Pharo

Stef


by Stéphane Ducasse at August 10, 2017 07:09 PM

[Pharo 70 alpha] Integration log restarts

Hi

We do not have yet an automated mail after each integration. So I will
do it by hand. I’m going over the green issues that you can see here:

https://ci.inria.fr/pharo-ci-jenkins2/job/Test%20pending%20pull%20request%20and%20branch%20Pipeline/view/change-requests/

You can comments them in

 https://github.com/pharo-project/pharo/pulls

Here are the current integration items

[Pharo 70] Build 23 / PR 132

[Pharo 70] Build 22 / PR 169

[Pharo 70] Build 21 / PR 187

[Pharo 70] build 19 / PR-168

[Pharo 70] Build 18 / PR 66

[Pharo 70] Build 17 / PR 185


by Stéphane Ducasse at August 10, 2017 09:34 AM

August 08, 2017

Torsten Bergmann

Live Programming in Smalltalk development environments survey

There is a survey about how Smalltalk software developers use live programming features in practice. Nice!

by Torsten (noreply@blogger.com) at August 08, 2017 09:35 AM

Benoit St-Jean

Radix Sort

C’est un article qui date mais, parfois, il est bon de revisiter les algorithmes de base, ne serait-ce que pour les avoir encore bien en tête quand le jour viendra où vous en aurez besoin pour un problème bien particulier!  Parce que les cours universitaires, ils commencent à être loin loin loin dans mes pensées!

Le radix sort revisité!


Classé dans:algorithmes, informatique, programmation Tagged: algorithme, radix sort, tri

by endormitoire at August 08, 2017 05:03 AM

Smalltalk en Afrique

Il y a maintenant un groupe de discussion Google pour les développeurs Smalltalk africains, le African Smalltalk User Group.

Bienvenue à tous nos nouveaux confrères!  Au plaisir de vous jaser!


Classé dans:Smalltalk Tagged: African Smalltalk User Group, Afrique, ASUG, discussion, forum, Google group, Smalltalk

by endormitoire at August 08, 2017 04:31 AM

FLOSS Weekly

Si le monde de l’open source vous intéresse ou que vous voulez tout simplement savoir quels sont les projets/outils/langages informatiques du moment qui pourraient vous aider ou grandement vous simplifier la vie, je vous recommande fortement le podcast de FLOSS Weekly (FLOSS étant l’acronyme pour Free Libre Open Source Software).

Le podcast est disponible en version vidéo et audio.  Les sujets abordés y sont variés et clairement expliqués, l’animateur Randall Schwartz s’efforçant de vous offrir une vue d’ensemble plutôt que les détails infiniment techniques accessibles aux seuls initiés.  L’animation est sympathique et les entrevues faites dans un style décontracté.

Un podcast à ajouter à votre liste!


Classé dans:informatique, internet, langage de programmation, logiciels, open source, outils, programmation, Système d'exploitation Tagged: FLOSS, FLOSS Weekly, Free Libre Open Source Software, Randall Schwartz

by endormitoire at August 08, 2017 03:54 AM

August 07, 2017

Benoit St-Jean

Le chef Michel Dumas

Assurément, un de mes immenses coups de coeur en cuisine! Je viens de me taper un 10 heures de visionnement des vidéos du chef Michel Dumas sur sa chaîne YouTube et j’en redemande! Le type est ultra-sympathique, amusant et surtout intéressant.  Son amour pour le dressage, la présentation et aussi la technique en cuisine expliquent aussi certainement le succès de ses vidéos.  Par ailleurs, il se fait un point d’honneur d’utiliser des produits locaux, « made in Québec » ! Son style « bullet point » est un brin déconcertant au début mais on s’y fait vite.  Il a également sa page Facebook et son compte Instagram.

Un exemple de ce qu’il fait…


Classé dans:Cuisine Tagged: chef, cuisine, Michel Dumas, recettes

by endormitoire at August 07, 2017 01:48 PM

La chanson du jour (1335)

For Whom The Bells Tolls de Metallica.

Take a look to the sky just before you die
It’s the last time he will
Blackened roar, massive roar, fills the crumbling sky
Shattered goal fills his soul with a ruthless cry
Stranger now, are his eyes, to this mystery
He hears the silence so loud


Classé dans:music, musique Tagged: For Whom The Bells Tolls, Metallica

by endormitoire at August 07, 2017 06:33 AM

August 06, 2017

Benoit St-Jean

La chanson du jour (1334)

Comme c’est assez autobiographique, je vous laisse ici toutes les paroles de la chanson…

Cinderella Man de Rush.

A modest man from Mandrake
Traveled rich to the city
He had a need to discover
A use for his newly-found wealth
Because he was human
Because he had goodness
Because he was moral
They called him insane
Delusions of grandeur
Visions of splendor
A manic-depressive
He walks in the rain
Eyes wide open
Heart undefended
Innocence untarnished
Cinderella Man
Doing what you can
They can’t understand
What it means
Cinderella Man
Hang on to your plans
Try as they might
They cannot steal your dreams, whoa
In the betrayal of his love, he awakened
To face a world of cold reality
And a look in the eyes of the hungry
Awakened him to what he could do
He held up his riches
To challenge the hungry
Purposeful motion
For one so insane
They tried to fight him
Just couldn’t beat him
This manic-depressive
Who walks in the rain
Cinderella Man
Doing what you can
They can’t understand
What it means
Cinderella Man
Hang on to your plans
Try as they might
They cannot steal your dreams

 

 


Classé dans:music, musique Tagged: Cinderella Man, Rush

by endormitoire at August 06, 2017 03:21 AM

Pierce Ng

DataFrame and Simple Linear Regression

In the previous post I mentioned using Iceberg successfully. The code I was pushing is SLRCalculator, a simple linear regression calculator, written to take Oleksandr Zaytsev's DataFrame library for a spin, by way of porting Jason Brownlee's excellent simple linear regression in Python to Pharo.

Firstly, install DataFrame. This also pulls in Roassal.

Metacello new
  baseline: 'DataFrame';
  repository: 'github://PolyMathOrg/DataFrame';
  load.

SLRCalculator implements mean, variance, covariance, coefficients etc, and also incorporates the Swedish automobile insurance dataset used by Jason in his Python example.

SLRCalculator class>>loadSwedishAutoInsuranceData
  "Source: https://www.math.muni.cz/~kolacek/docs/frvs/M7222/data/AutoInsurSweden.txt"
  | df |

  df := DataFrame fromRows: #(
            ( 108 392.5 )
            ( 19 46.2 )
            ( 13 15.7 )
            "more lines" ).
  df columnNames: #(X Y).
  ^ df

The computation for covariance also uses DataFrame.

covariance: dataFrame
  | xvalues yvalues xmean ymean covar |

  xvalues := dataFrame columnAt: 1.
  yvalues := dataFrame columnAt: 2.	
  xmean := self mean: xvalues.
  ymean := self mean: yvalues.	
  covar := 0.
  1 to: xvalues size do: [ :idx |
    covar := covar + (((xvalues at: idx) - xmean) * ((yvalues at: idx) - ymean)) ].
  ^ covar 

Let's see how to use SLRCalculator to perform linear regression, with graphing using Roassal. First declare the variables and instantiate some objects:

| allData splitArray trainingData testData s coeff g dsa dlr legend |

s := SLRCalculator new.

allData := SLRCalculator loadSwedishAutoInsuranceData.

Next, split the data set into training and test subsets. Splitting without shuffling means to always take the first 60% of the data for training.

splitArray := s extractForTesting: allData by: 60 percent shuffled: false.  
trainingData := splitArray at: 1.
testData := splitArray at: 2.
coeff := s coefficients: trainingData.

Set up for graphing. Load `allData' as points.

g := RTGrapher new.

allData do: [ :row |
  dsa := RTData new.
  dsa dotShape color: Color blue.
  dsa points: { (row at: 1) @ (row at: 2) }.
  dsa x: #x.
  dsa y: #y.
  g add: dsa ].

Create the points to plot the linear regression of the full data set, using the coefficients computed from the training subset.

dlr := RTData new.
dlr noDot.
dlr connectColor: Color red.
dlr points: (allData column: #X).
" y = b0 + (b1 * x) "
dlr x: #yourself.
dlr y: [ :v | (coeff at: 1) + (v * (coeff at: 2)) ].
g add: dlr.

Make the plot look nice.

g axisX noDecimal; title: 'Claims'.
g axisY title: 'Total payment in SEK'.
g shouldUseNiceLabels: true.
g build.

legend := RTLegendBuilder new.
legend view: g view.
legend addText: 'Swedish Automobile Insurance Data Linear Regression'.
legend build.

g view

Putting the code altogether:

| allData splitArray trainingData testData s coeff g dsa dlr legend |

s := SLRCalculator new.

allData := SLRCalculator loadSwedishAutoInsuranceData.
splitArray := s extractForTesting: allData by: 60 percent shuffled: false.  
trainingData := splitArray at: 1.
testData := splitArray at: 2.
coeff := s coefficients: trainingData.

g := RTGrapher new.

allData do: [ :row |
  dsa := RTData new.
  dsa dotShape color: Color blue.
  dsa points: { (row at: 1) @ (row at: 2) }.
  dsa x: #x.
  dsa y: #y.
  g add: dsa ].

dlr := RTData new.
dlr noDot.
dlr connectColor: Color red.
dlr points: (allData column: #X).
" y = b0 + (b1 * x) "
dlr x: #yourself.
dlr y: [ :v | (coeff at: 1) + (v * (coeff at: 2)) ].
g add: dlr.

g axisX noDecimal; title: 'Claims'.
g axisY title: 'Total payment in SEK'.
g shouldUseNiceLabels: true.
g build.

legend := RTLegendBuilder new.
legend view: g view.
legend addText: 'Swedish Automobile Insurance Data Linear Regression'.
legend build.

g view

Copy/paste the code into a playground, press shift-ctrl-g...

by Pierce Ng at August 06, 2017 01:53 AM

August 05, 2017

Benoit St-Jean

La chanson du jour (1333)

Stigmata de Ministry.

Stronger than reason
Stronger than lies
The only truth I know
Is the look in your eyes
The look in your eyes!


Classé dans:music, musique Tagged: Ministry, Stigmata

by endormitoire at August 05, 2017 07:58 PM

La chanson du jour (1332)

Straight Up de Paula Abdul.

Straight up, now tell me ,
Do you really wanna love me forever,
Oh, oh, or am I caught in hit and run?
Straight up, now tell me,
Is it gonna be you and me together,
Oh, oh, oh, or are you just havin’ fun


Classé dans:music, musique Tagged: Paula Abdul, Straight Up

by endormitoire at August 05, 2017 07:55 PM

La chanson du jour (1331)

I Feel For You de Chaka Khan.

Chaka Khan let me tell you what I wanna do
I wanna love you, wanna hug you, wanna squeeze you too


Classé dans:music, musique Tagged: Chaka Khan, I Feel For You

by endormitoire at August 05, 2017 07:51 PM

La chanson du jour (1330)

Last Train To London de Electric Light Orchestra.

But I really want tonight to last forever
I really wanna be with you.
Let the music play on down the line tonight.


Classé dans:music, musique Tagged: Electric Light Orchestra, Elo, Last Train To London

by endormitoire at August 05, 2017 07:44 PM

PharoWeekly

Moldable brick editor – alpha

Hi,

We are very happy to announce the alpha version of a moldable editor built in Brick (https://github.com/pharo-graphics/Brick) which is based on Bloc (https://github.com/pharo-graphics/Bloc). This is primarily the work of Alex Syrel. The project was initially financially sponsored by ESUG and it is currently supported by feenk. And of course, the project is based on the tremendous work that went into Bloc and Brick by all contributors.

Take a look at this 2 min video:
https://www.youtube.com/watch?v=2vy6VMJM9W4&feature=youtu.be

The basic editor works and it is both flexible and scalable. For example, the last example shown in the video is an editor opened on 1M characters, which is reasonably large, and as can be seen see one can interact with it as smoothly as with the one screen text. It actually works just as fine with 100M characters.

The functionality of the editor includes: rendering, line wrapping, keypress and shortcut handling, navigation, selection and text styling. Currently, the editor is 1260  lines of code including method and class comments. This is not large for a text editor and this is possible because most of the work is done by generic concepts that already exist in Bloc such as layouts and text measurements. Beside the small maintenance cost, the benefit is that we have the option to build all sorts of variations with little effort. That is why we call this a moldable text editor.

Another benefit of using elements and layouts is that we can also embed other kinds of non-text elements with little effort (such as pictures), and obtain a rich and live text editor. We already have basic examples for this behavior, and we will focus more in the next period on this area.

The next immediate step is to add syntax highlighting. Beside the text attributes problem, this issue will also exercise the thread-safety the implementation is. The underlying structure (https://en.wikipedia.org/wiki/Rope_(data_structure)) is theoretically thread-safe, but it still needs to be proven in practice.

We think this is a significant step because the editor was the main piece missing in Brick and it will finally allow us to build value that can be directly perceived by regular users on top of Brick and this, in turn, will generate more traction. Please also note that because now Bloc is directly embeddable in Morphic it means that we can actually start using it right away. For example, the picture below shows the text element being shown through a live preview in the GTInspector.

unnamed.png

This is another puzzle piece towards the final goal of engineering the future of the Pharo user interface. There is still a long way to go to reach that goal, but considering the work that is behind us, that goal that looked so illusive when Alain and Stef initiated the Bloc project is now palpable.

We will continue the work on this over the next period and we expect to announce new developments soon.

If you want to play with it, you can load the code like this (works in both Pharo 6 and 7):
Iceberg enableMetacelloIntegration: true.
Metacello new
baseline: ‘Brick’;
repository: ‘github://pharo-graphics/Brick/src’;
load: #development

Please let us know what you think.

Cheers,
Alex and Doru


by Stéphane Ducasse at August 05, 2017 04:01 PM

Pierce Ng

Iceberg and SSH keys

On a laptop that I've just rebuilt recently, I created and have been using an ED25519 SSH key pair, including with Github. Iceberg doesn't work with it though, throwing the error 'LGit_GIT_ERROR: No ssh-agent suitable credentials found". This is because Iceberg uses libgit2, which uses libssh2, which apparently doesn't support ED25519 keys. Created a new RSA key pair, registered it with Github, and Iceberg works.

by Pierce Ng at August 05, 2017 12:29 PM

August 04, 2017

PharoWeekly

Live coding Survey

Dear Pharoers,

Live programming frees developers from the “edit-compile-run” loop and allows people to interact with running programs very easily. Live programming is getting popular, but many of its features have been present in Smalltalk for a very long time.

We want to understand how Smalltalk software developers use live programming features in practice. We would be grateful if you could participate in our 10-minute survey on this subject: http://bit.ly/2ufcg2D

As a thank you for your participation, you will be able to participate in a raffle to win a Smalltalk book of your choice. If you wish to participate, you will need to share your email with us, so that we can contact you.

We will appreciate if you share the survey
– Twitter post: https://twitter.com/JurajKubelka/status/893006267085709312
– Facebook post: https://www.facebook.com/juraj.kubelka/posts/10212505941300008
By participating in the survey you will:
– help me to successfully finish my PhD,
– push Smalltalk awareness in Live Programming research community,
– bring new integrated electronic communication ideas, and
– bring new ideas to improve our Smalltalk Live Programming experience 🙂
We will close the survey on Wednesday, August 9, 2017 AoE.

Thank you and we really hope you enjoy participating in our survey!
Juraj Kubelka, PhD Student at the University of Chile
Romain Robbes, Professor at Free University of Bozen-Bolzano
Alexandre Bergel, Professor at the University of Chile


by Stéphane Ducasse at August 04, 2017 07:10 AM

August 01, 2017

PharoWeekly

Another supercool enhancement in bootstrap

Hello,
we are checking a huge pull request #177 (https://github.com/pharo-project/pharo/pull/177) that will change some basics of the bootstrap process:
Now we will bootstrap a smaller image that will not include compiler/parser. Compiler and related packages are exported and loaded using a binary exporter named Hermes.
The compiler is then used to load FileSystem and Monticello. The rest of the bootstrap process will be the same as before.
As the result we will have faster bootstrap and better system modularization and possibilities.
It required some modularization efforts:
– simplified initialization scripts
– Use Zinc converters and encoders instead of FilePathEncoder and old TextConverter
– Use Stdio instead of FileStream
– Using File instead of FileSystem
– Deprecated FileStream & childs (Moved to Deprecated70)
– Extracted Path classes to their on package: FileSystem-Path
– Moved OpalEncoders to their own package. They are required by the runtime (not only for compilation)
– Introduced AsciiCharset in the kernel to answer to #isLetter #isUppercase and so on without requiring full Unicode tables from the beginning
– Cleaning up a bit the full exception logging infrastructure (streams, transcript, files, stack printing…)
– Split Ring methods required for system navigation to the Ring-Navigation package
– Remove usages of #translated in the kernel
– Refactored the bootstrapping classes to remove duplications
– Cleaning up dependencies in CompiledMethod>>printOn:
– fix path printing
We need to merge these changes at once and of course it can cause some conflicts with the existing pull requests or external code. Anyway, we need to merge it as soon as possible.
So please, try to look at the PR and test the resultant image [1] to avoid some major problems.
[1] https://ci.inria.fr/pharo/view/7.0/job/70-PR-Check-Load/lastSuccessfulBuild/artifact/bootstrap-cache/Pharo7.0-32bit-9c0691d.zip
Cheers,
— Pavel

by Stéphane Ducasse at August 01, 2017 10:33 AM

July 31, 2017

Benoit St-Jean

Sarah. Pourquoi?

Pourquoi ma fille se prénomme Sarah?

Pour la beauté de la Nouvelle-Écosse, pour la pureté, la beauté et l’émotion que Sarah McLachlan te crisse en pleine face.  Always.

Pour le prénom bilingue, pour le passé et le respect que l’histoire que celui-ci chârrie encore.  Sarah, c’est aussi ancien que moderne, ça traverse les époques, les modes, le temps.

Pour son étymologie, « petite princesse ».

Parce que tsé, j’ai jamais connu une Sarah poche.

Parce que tsé, il fallait que le prénom de notre fille soit crissement parfait : pour sa mère et encore plus pour moi, son père.

Sarah was destined to be someone with a great first name : she was also destined to be someone great.


Classé dans:Divers

by endormitoire at July 31, 2017 07:18 PM

Daddy Jack’s Cooking With The Blues Show

Vous manquez d’inspiration culinaire?  Je vous conseille la chaîne YouTube de Daddy Jack (Jack Chaplin de son vrai nom). C’est sans prétention, simple et sympathique, comme Jack!  Son resto a aussi une page Facebook.


Classé dans:Cuisine, Divers Tagged: cuisine, Daddy Jack, Jack Chaplin, recettes

by endormitoire at July 31, 2017 10:51 AM

La chanson du jour (1329)

Building A Mystery de Sarah McLachlan.

Oh you’re so beautiful
With an edge and a charm
But so careful
When I’m in your arms


Classé dans:music, musique Tagged: Building A Mystery, Sarah McLachlan

by endormitoire at July 31, 2017 10:16 AM

La chanson du jour (1328)

The Trooper de Iron Maiden.

You’ll take my life but I’ll take yours too
You’ll fire your musket but I’ll run you through
So when you’re waiting for the next attack
You’d better stand there’s no turning back.


Classé dans:music, musique Tagged: Iron Maiden, The Trooper

by endormitoire at July 31, 2017 10:09 AM

La chanson du jour (1327)

Steam de Peter Gabriel.

You know your culture from your trash
You know your plastic from your cash
When I lose sight of the track
You know the way back
But I know you


Classé dans:music, musique Tagged: Peter Gabriel, Steam

by endormitoire at July 31, 2017 10:04 AM

La chanson du jour (1326)

Panic In Detroit de Bowie.

He laughed at accidental sirens that broke the evening gloom
The police had warned of repercussions
They followed none too soon


Classé dans:music, musique Tagged: David Bowie, Panic In Detroit

by endormitoire at July 31, 2017 09:57 AM

July 30, 2017

PharoWeekly

How to publish github managed project to Pharo Catalog

Hi Norbert,

I manage some of my projects already in GitHub. For example Tealight which is also in catalog.

Anything you have to do is
1) to create a “tag” in git  (see https://stackoverflow.com/questions/18216991/create-a-tag-in-github-repository), I name the tags with the according version number like 0.0.2 following semantic versioning (http://semver.org)
2) provide a ConfigurationOf (as you had in the past) where the “version” references the “git tag” with the same name
a) also #stable has to point to the “version” as it was in the past
optional:  b) the #development should point to the Baseline in the git branch that you typically use for development (this allows for loading of bleeding edge as before)
3) upload the Configuration to a MetaRepo as before to appear in catalog

Example:
=======
1) I have two tagged versions for Tealight on Git (0.0.1 and 0.0.2)
https://github.com/astares/Tealight/releases

2) In my ConfigurationOfTealight (which I also manage in git) I reference the tag, for example in version 0.0.2 I reference the tag with the same name “github://astares/Tealight:0.0.2/repository”:
See  https://github.com/astares/Tealight/blob/master/repository/ConfigurationOfTealight.package/ConfigurationOfTealight.class/instance/v0_0_2..st

Side note: a) now you can use your #stable definition in the ConfigurationOf as before https://github.com/astares/Tealight/blob/master/repository/ConfigurationOfTealight.package/ConfigurationOfTealight.class/instance/stable..st
b) Your #development definition should point to the master branch (or whatever the development branch is)

https://github.com/astares/Tealight/blob/master/repository/ConfigurationOfTealight.package/ConfigurationOfTealight.class/instance/development..st
https://github.com/astares/Tealight/blob/master/repository/ConfigurationOfTealight.package/ConfigurationOfTealight.class/instance/dev..st

3) http://smalltalkhub.com/#!/~Pharo/MetaRepoForPharo60/packages/ConfigurationOfTealight

Iceberg is managed in a similar way (but is now included in the image and the catalog part is only for compatibility).

Hope this helps.

Thanks
Torsten


by Stéphane Ducasse at July 30, 2017 05:36 PM