Planet Squeak

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

May 16, 2019

PharoWeekly

[GSoC] Student Introductions

Google Summer of Code 2019 has officially started with its community bonding period. Pharo Consortium has accepted 7 students from 4 different countries to participate in this year’s GSoC.

Every week our students will publish blog posts to announce and document their progress. In this first week, we asked students to introduce themselves, tell us a little about their background and the projects they will be working on.

These are the blog posts where our students introduce themselves to the community. Feel free to contact them personally with questions, feedback, or just words of encouragement.

  1. Atharva Khare, GSoC 2019: Extending DataFrame library for Pharo Consortium
  2. Nikhil Pinnaparaju, My Journey Into Google Summer of Code — 2019
  3. Dayne Lorena Guerra Calle, GSoC 2019 introducing my project: Next Generation of Unit Testing
  4. Evelyn Cusi Lopez, Better and more refactorings for Pharo — Part 1
  5. Myroslava Romaniuk, Improving Code Completion @ GSoC 2019: introduction
  6. Nina Medic, GSoC Project
  7. Smiljana Knezev, New Collections for Pharo

by Stéphane Ducasse at May 16, 2019 11:32 AM

[Ann] on do: messages

https://medium.com/@i.oleks/consistency-of-do-messages-in-pharo-dataframe-be604c3a22aa

by Stéphane Ducasse at May 16, 2019 10:06 AM

[Ann] TF-IDF in Pharo

A little library to learn super basic technique for document processing.

https://github.com/olekscode/TF-IDF

Stef

by Stéphane Ducasse at May 16, 2019 09:51 AM

May 15, 2019

PharoWeekly

[Ann] Pharo VM generated from Pharo

Hi all,

Just to keep everyone informed, last week I’ve spent a couple of days making slang work on Pharo again, based on the initial effort of Eliot.
The summary of what I did is:
 – we can generate, compile and run a stack vm
 – we can generate, compile and run a cog vm
 – for this, I’ve done a couple of patches to VMMaker
  – the ones specific to Pharo has been pushed
  – the ones that touch cross dialect code are still in review (I think)
To do this work
 – I had to review the AST-to-AST transformation, checking the output, comparing it to what squeak does and so on…
 – I’ve written several unit tests to ensure that future migrations are easier to do
 – I’ve introduced several compatibility classes/methods related to PackageInfo, Time and so on…
Cheers,
Guille

by Stéphane Ducasse at May 15, 2019 07:39 AM

April 28, 2019

PharoWeekly

[Ann] Two nice books for the forthcoming mooc!

To support the start of the new season of the Pharo Mooc (https://www.fun-mooc.fr/courses/course-v1:inria+41010+self_paced/about) on May 6th, we are happy to announce a new version of the book: TinyBlog: a First web App in Pharo in English and French.

 

http://books.pharo.org/tinyblog-tutorial/ and http://books.pharo.org/tinyblog-tutoriel/

Stéphane, Luc and Olivier. http://mooc.pharo.org

by Stéphane Ducasse at April 28, 2019 01:01 PM

April 27, 2019

PharoWeekly

Best paper award in the “Industrial Robot” category @ ICARSC 2019

IMTDouai Team (L. Fabresse/N. Bouraqadi) just won the Best paper award in the “Industrial Robot” category @ ICARSC 2019 () with our paper titled “PolySLAM: A 2D Polygon-based SLAM Algorithm” implemented in Pharo @johannDichtl @glozenguez

Well done!

by Stéphane Ducasse at April 27, 2019 07:12 AM

April 26, 2019

PharoWeekly

Agile Artificial Intelligence

Dear All, I have a good and bad news
the good news is that the book Agile Artificial Intelligence will be published by Apress, a major publisher in computer science. This will bring visibility to Pharo at a large scale
👍🏻

3
The bad news is that the website https://agileartificialintelligence.github.io/ will be shut off soon
Agile Artificial Intelligence
Source of the book Agile Artificial Intelligence
However, the source code given in the book will have its own GitHub repository and will remain free of access

by Stéphane Ducasse at April 26, 2019 06:03 PM

April 25, 2019

Torsten Bergmann

Lunch with Alan Kay

Interesting read of Lunch with Alan

by Torsten (noreply@blogger.com) at April 25, 2019 09:28 AM

Madrid Smalltalk User Group Meeting on Pharo - 29. April 2019

Nueva reunión del meetup de Madrid Smalltalk el lunes 29/4: "Taller sobre Moldable Development en Pharo". Read more here

by Torsten (noreply@blogger.com) at April 25, 2019 09:02 AM

April 23, 2019

Torsten Bergmann

Pharo Sprint April 26

Read https://association.pharo.org/event-3253846 for more details.

by Torsten (noreply@blogger.com) at April 23, 2019 03:19 PM

Geranium

Geranium is an Energy consumption simulator for participatory modelling and decision making, taking into account: urban, social and micro-climate data. It is written in Pharo available on github on

https://github.com/npapoylias/Geranium

They are currently looking for a Pharo Developer for 4 months, based in La Rochelle France. Check the jobs channel on Pharo Discord if you are interested. Or check here.

by Torsten (noreply@blogger.com) at April 23, 2019 03:12 PM

Moose for Pharo 7

is now available. Check the webpage:

http://moosetechnology.org

by Torsten (noreply@blogger.com) at April 23, 2019 03:10 PM

Type Checking Pharo methods

Manuel Leuenberger reported that he improved performance on his type checker for GT Tools.

Code is here: https://github.com/maenu/gtoolkit-contribution-typer

I wonder if it would work also without GT / Bloc / Brick and could be used already in a standard out of the box Pharo image...

by Torsten (noreply@blogger.com) at April 23, 2019 12:15 PM

April 18, 2019

PharoWeekly

[Pre-ann] Spec 2.0 Gtk3 bindings

People that assisted to Pharo Days 2019 (or that follow my twitter account) already know this, but it needs to be formally announced: 
 
We are working on Spec 2.0, and it will provide not just the classic Morphic bindings but also a new option for developers: Gtk3 bindings!
Why we want a Spec 2.0 with different backends?
There are reasons that converged to decide us to make it:
For us, this is a fundamental step to continue improving Pharo itself, and it matches also the work we are doing on going real-headless:  Pharo users will be able to start the Morphic world, a Gtk application or the next backend to come.
Why Gtk3?
There are some other important players in the “native widgets scene”, so why we choose Gtk3? 
Again, several reasons  were taken into account: 
Next step: tool migration
The only way to know if you have covered what is needed is actually taking real-life use cases and implementing them. We have a list of tools that needs to be migrated and we are starting from them: 
  1. Old GT tools will be replaced by new Spec tools (while preserving its power).
  2. Calypso UI needs to be rewritten in Spec 2.0 (it is in plain Morphic now).
  3. Pharo launcher as a standalone application is a good example of what you can do with the Gtk3 bindings.
And that’s it. Pharo 8.0 will come with Spec 2.0 and users will be able to benefit of it immediately 🙂
Pharo 80 will not need Gtk3. We will provide packages for Gtk3 for the people that need it. We will also release Spec20 soon so that people can try Spec 20 – independently of Gtk3
Pharo Consortium mainly Esteban, Pablo and Guille

by Stéphane Ducasse at April 18, 2019 06:06 PM

[ann] Workflow engine in Pharo

Hello everyone,
we’ve been working on a workflow engine written in Pharo. You can check it out at: https://github.com/skaplar/NewWave
It is still in the early development and we discussed about making it public so everyone interested can join, take a look or provide any kind of feedback. I’m also at discord so you can contact me @skaplar.
Best regards,
Sebastijan Kaplar

by Stéphane Ducasse at April 18, 2019 06:00 PM

Torsten Bergmann

Pharo and native UIs - from Mars to Spec

Pharo 7 (beside many other features) was focused on being able to bootstrap an image right from the source as well as the transition to using git. Also stabilizing Iceberg tool with Git binding to have an improved source code management and give Pharo and its source code more exposure to the outside non-Smalltalk world.


Now Pharo 8 (which is currently in development) will focus on an updated version of Spec called "Spec 2.0". To build abstractions and prove that other backends (beside Morphic) could be used there is a plan to have a GTK binding as a second backend. This goes back to the old "Mars" project from Esteban - a native user interface framework which aimed to bring the native UI into Pharo. If I remember correctly back at the time it used an ObjectiveC Bridge.

This was already discussed on PharoDays 2019 and now Esteban gives some more detailed infos about the background on the Pharo mailinglist.

by Torsten (noreply@blogger.com) at April 18, 2019 01:11 PM

April 17, 2019

Torsten Bergmann

Workflow engine written in Pharo

In 2017 Netstyle open sourced a workflow engine for Pharo. I reported about this here.

Now in 2019 there is another Workflow engine written in Pharo from Sebastijan Kaplar:

    https://github.com/skaplar/NewWave


Still in early development. But you can also join if you like

by Torsten (noreply@blogger.com) at April 17, 2019 06:27 PM

Data Analysis of UCI Heart Disease Dataset using Pharo

Data Analysis of UCI Heart Disease Dataset using Pharo - a short tutorial by Dhanya Sreekumar

by Torsten (noreply@blogger.com) at April 17, 2019 10:01 AM

April 16, 2019

Torsten Bergmann

Why I Talk About Smalltalk Even Though I’m Working in Java

Interesting medium.com article from Andrew Glynn called "Why I Talk About Smalltalk Even Though I’m Working in Java"

by Torsten (noreply@blogger.com) at April 16, 2019 09:21 PM

April 11, 2019

Torsten Bergmann

Hunter: a JavaScript reengineering platform based on Pharo

Hunter: a JavaScript reengineering platform based on Pharo is available on 

          https://github.com/dorellang/hunter


 

by Torsten (noreply@blogger.com) at April 11, 2019 03:40 PM

April 10, 2019

Torsten Bergmann

Pharo language track on exercism.io

An exercism.io language track for Pharo can be found here:  https://exercism.io/my/tracks/pharo-smalltalk

by Torsten (noreply@blogger.com) at April 10, 2019 12:45 PM

Pharo DataFrame v2.0

Pharo DataFrame release v2.0 is available: 

 https://github.com/PolyMathOrg/DataFrame/releases/tag/v2.0

Read here what it can do for you.

by Torsten (noreply@blogger.com) at April 10, 2019 12:22 PM

Pharo graphics using Roassal

Milton shows some nice graphics examples on his twitter stream (using Pharo and Roassal): 

https://twitter.com/akevalion

by Torsten (noreply@blogger.com) at April 10, 2019 12:20 PM

Pharo Newsletter April 2019

Pharo Newsletters for each month are available at:  http://newsletter.pharo.org

by Torsten (noreply@blogger.com) at April 10, 2019 12:18 PM

PharoDays 2019 in Lille

Some impressions from Pharo Days 2019 in Lille

https://gopro.com/v/rD5G5reVmG9pd

by Torsten (noreply@blogger.com) at April 10, 2019 11:23 AM

Debugger driven development in Pharo

Some work Vincent Blondeau and Stephan Eggermont have been doing on the Taskbar have inspired Stephan me to make some screencasts showing how to do debugger driven development, and take the first steps towards refactoring the TaskBarMorph in Pharo, driven by tests.

by Torsten (noreply@blogger.com) at April 10, 2019 09:31 AM

April 05, 2019

PharoWeekly

New success story: the openPonk platform

http://pharo.org/success/openPonk

Great work guys!

by Stéphane Ducasse at April 05, 2019 10:15 AM

Looking in the future @Pharodays

Really great talks at PharoDays

by Stéphane Ducasse at April 05, 2019 10:13 AM

April 02, 2019

PharoWeekly

About Performance Issues

Hi, this will be a long mail. I have organized it in different sections.

This work is sponsored by the Pharo consortium and financially supported by Lifeware and Schmidt.
Summary:
======

– There are performance issues in Pharo 7.
– I have made benchmarks.
– With Guille we made an improvement in saving source code in methods.
– More improvements to come.
– Automation and CI in the future.

Background
=========

Since the release of Pharo 7 (and before it), it was notorious that
there exists a performance regression in the normal execution of the
image. By checking the usual operations, we have seen ( and many have
also detected) that there was an issue with the loading, compilation,
and unloading of code. Also with the creation of classes, traits and
the use of slots.

Benchmarks
=========

Although we were sure that there is a performance regression, we have
to show it in a way we can test it and measure it. If we cannot
measure it or repeat its execution it is worthless.
For doing so, I have created an initial set of micro-benchmarks to
cover normal operations of the image.

The set of benchmarks is available here:
https://github.com/tesonep/pharo-benchmarks

These benchmarks are developed on top of SMark, only adding a command
line tool and the ability to generate a CSV file.

The idea is to run the benchmarks in different versions of Pharo an
assert that we are not breaking anything.

The first results were basically a nightmare, some operations take
almost 20 times more in Pharo 7. Especially, the ones that are
compiling methods.

In the attached document, there is the detail of all the benchmarks,
the different results and the analysis of the improvements and
regressions (Positive percentages are regressions (more time),
negative are improvements (less time)).

I have checked the results in OSX with 64 bits images. But as the
problem is in pure Smalltalk implementations the problems are (and the
solutions) cross platforms.

First Improvement
==============

Having the benchmarks, it was easy to start looking for the problems.
Thanks to the help of Guille we have detected some problems in the
implementation of SourceFile. Objects of this class have the
responsibility to handle the save of the source code when a method is
modified.

Improving this implementation we have gotten to results similar to
Pharo 6 in the compilation of methods.

Comparing a stock Pharo8 image with the one with the fix, we have the
following improvements:

AddingAnInstanceVariableToAClassWithASubclass -3.96%
AddingAnInstanceVariableToAClassWithoutASubclassAndInstances -15.91%
AddingAnInstanceVariableToAClassWithoutSubclasses -28.50%
ClassAndSubclassCreation -25.67%
ClassUsingATrait -90.05%
SimpleClassCreation -26.55%
TraitCreation -92.95%
TraitCreationUsingOtherTrait -91.68%
CompileAMethodAndModifyIt -32.92%
CompileAMethodInAClassUsingATrait -83.28%
CompileAMethodInATraitNotUsed -85.12%
CompileAMethodInATraitUsed -88.16%
CompileANewMethod -40.73%
CompileANewMethodUsingInstanceVariable -33.93%
MethodAccessingAGlobal -47.57%

Again there are more details in the attached file.

Also, we have ported this fix to Pharo 7.

Next Steps
========

– Making it a part of the CI infrastructure: making it run in each PR
and build to detect regressions in the changes.

– Adding more micro and macro benchmarks. I have a list of things to
test, but I am open to more:

# Micro

– Slot Implementation
– Process handling
– Refactorings
– Files (open / write / read)

# Macro

– Loading:  Moose  / Seaside
– Recompile All
– Condense Sources
– Startup
– Shutdown

We also know that there are platform related issues (especially
Windows), so the idea it will be the same, build a benchmark, measure
it, improve it.

The idea is to have a more robust way of detecting and handling the
performance of Pharo. Of course, I am open to all your comments.

Cheers,
Pablo

by Stéphane Ducasse at April 02, 2019 02:39 PM

March 29, 2019

Torsten Bergmann

ComputedSlots in Pharo

In Pharo 8 it is now possible to use ComputedSlots. Beside the regular instance variable (slots) we add a computed slot with a block.

Let's assume I would like to implement a Person class with a name and firstName but also get a fullName.

Object subclass: #Person
slots: { #name. #firstName. #fullName => ComputedSlot with: [ :obj | obj firstName asString , ' ' , obj name asString ] }
classVariables: { }
package: 'Simple-Example'

so when you test
 
|p|
p := Person new.
p name: 'Adams'.
p firstName: 'Douglas'.
p fullName

it would return the full name 'Douglas Adams'.

When you now add an additional class side method #firstName:name: like

firstName: firstName lastName: lastName

^(self new)
firstName: firstName;
name: lastName;
yourself

you can simply write with our small english like DSL:

 (Person firstName: 'Douglas' lastName: 'Adams') fullName

to get the same result.

For sure we could have implement the getter method #fullName like this:

fullName

^self firstName asString , ' ' , self name asString

to achieve the same - but a computed slot shows up really in the inspector as if it would be a real variable and is recomputed if you for instance would change the name or firstName.

by Torsten (noreply@blogger.com) at March 29, 2019 12:21 PM