Monthly Archives: October 2016

ImageSaver

I like to save images with a time tag and got tired of typing in the save window.

So, there is HOImageSaver.

https://github.com/Pharophile/HOImageSaver

It works with Pharo 5.

Load as follows:

Metacello new
githubUser: ‘pharophile’

    project: ‘HOSImageSaver’
    commitish: ‘master’
    path: ‘packages’;

    baseline: ‘HOImageSaver’;
onWarningLog;
load

Phil

New tutorial: Building UIs with Spec

A great tutorial on the Spec framework. To build by composing and reusing UIs.

http://books.pharo.org/

Johan and Stef

About alternate ways to teach Pharo

Hi,

On the issue of contributing to Free, Libre, Open Source Software (FLOSS) projects, I have been reading recently Nadia Eghbal and her analysis that confirm that most FLOSS projects are done by individuals and small teams, which is contrary to the bazaar narrative. This comic shows the point:

gdjagcbegknegifc.png

and you can find more details here: https://medium.com/@nayafia/what-success-really-looks-like-in-open-source-2dd1facaf91c#.e360z53sf

In that sense Pharo and what we’re doing here on small communities, teams and individuals, is not the exception, is the rule. We’re fortunate that we have a friendly and dynamic community around a powerful environment, so even being part of the rule, we can be very creative and productive.

On the issue of step 0, learning materials and approaches, and Pharo for beginners, my findings are that Pharo is pretty well suited for non-programmers (journalist, scientist, teachers, philosophers) compared to IPython for example. I have tried both, IPython notebooks and Pharo/Grafoscopio, and the uniformity and self containment of the environment is very empowering, without too much overhead and extra complications. So I think that we also need to look towards the non-usual programmer and computer scientist profiles for the “newbies” and interested in belonging to the community.

Our approach in our Data Week workshop is different:

– We start with some panoramic view of computing comparing Unix fathers versus dynabook children. This gives a point to see the technology and the differences and why Pharo is more like OS + IDE + Apps in a minimalist fashion, instead of the Unix legacy approach to the same problem.

– We go to the professor Stef tutorial, which is the first part of a Grafoscopio notebook. Then we use some one liners taking from Sven’s Elegant Pharo code, then we use Hernán’s Internet Movie Data Base example to introduce JSON, queries and REST API, then we use blocks to abstract the example (see below) and create our first “Cinemania” package.

– Then we learn how to extend the Dataviz package (made in Roassal), with our Twitter exported data and we deal with an open problem: Twitter Data Selfies.

 

negeljdciicigpaf.png

 

 

So, there are several routes to learning for different populations and contexts. Putting the new contextualized stuff we’re doing in dialogue with the material the community is creating (MOOC, UPBE, Deep Into Pharo) and other communities like Open Knowledge (see our recent for the upcomming Data Week 7 at [a]) is the key to let learners traverse different paths according to their needs and interests.

[a] https://discuss.okfn.org/t/data-week-7-our-critical-code-data-literacy-and-visualization-hackathon-returns/3823

Cheers,

Offray

The four stages of Pharo addiction

By dimitris chloupis 🙂
STEP1
“I am interested in Pharo , any quick tutorial to get me started ?”

If you want a quick dive to Pharo for experienced coders there is this

STEP2
“Ah I really like Pharo maybe more info about the language and a practical example to give it a go myself ?”
for a bit more dive into the Smalltalk language there is this
STEP3
“Damn this is really cool , where I can find more info I really like to give this a deeper look!”
and of course the rest of the book for those that cant get enough of Pharo
STEP4
“I hate you so much !!! I cant sleep, cant eat, no friends, ex girlfriend…. AHHH CANNNOT STOP !!!! TOO MUCH FUN!!!”

Garage status update

Hi,
I only have to say that at least six months ago I updated garage sqlite to work on pharo 6, with UFFI. And it still works.

I just checked in a new image, pharo6, doing:

– Install Garage Sqlite3

Gofer it
smalltalkhubUser: ‘DBXTalk’ project: ‘Garage’;
configurationOf: ‘Garage’;
load.

(ConfigurationOfGarage project version: ‘0.5’)
load: ‘sqlite3’.

– Then I installed sqlite3 32bit library in my machine

sudo apt-get install sqlite3:i386

– Then I created a symlink to my library so the VM can find it:

ln -s /usr/lib/i386-linux-gnu/libsqlite3.so.0 libsqlite3

– Finally I configured the tests to run with the Sqlite backend

GAContinuousIntegrationConfiguration new configureSqlite3.

And all tests run…

Hi,
I only have to say that at least six months ago I updated garage sqlite to work on pharo 6, with UFFI. And it still works.

I just checked in a new image, pharo6, doing:

– Install Garage Sqlite3

Gofer it
smalltalkhubUser: ‘DBXTalk’ project: ‘Garage’;
configurationOf: ‘Garage’;
load.

(ConfigurationOfGarage project version: ‘0.5’)
load: ‘sqlite3’.

– Then I installed sqlite3 32bit library in my machine

sudo apt-get install sqlite3:i386

– Then I created a symlink to my library so the VM can find it:

ln -s /usr/lib/i386-linux-gnu/libsqlite3.so.0 libsqlite3

– Finally I configured the tests to run with the Sqlite backend

GAContinuousIntegrationConfiguration new configureSqlite3.

And all tests run…

fibcphdjohkefeji.png

Esteban, can you test it locally to see if you have any problems?

Norbert, I hope this works for you ^^.

Now, as Stef says, it is a bit complicated on my side to work on database drivers because I do not work using them. But! If something is interested in collaborating, contact me, I will be only positive about it 🙂

Guille

 

Esteban, can you test it locally to see if you have any problems?

Norbert, I hope this works for you ^^.

Now, as Stef says, it is a bit complicated on my side to work on database drivers because I do not work using them. But! If something is interested in collaborating, contact me, I will be only positive about it 🙂

Guille

AndroidVM alpha

Still far from production. But since i would happy to have some feedback, I’m happy to show you some progress on the android VM. Not yet release. But we have already a way of compiling and deploying an image into an android device.

  You can check it in this repo github.
  The building steps are detailed on the README-Android.md file.

Building the Stack AndroidVM

  1. Download the sources from github
    git clone --depth=1 https://github.com/sbragagnolo/pharo-vm
    cd pharo-vm
  2. Set-up your environment: This script will download the SDK installer and NDK R10
    cd android/scripts
    ./setupAndroidEnvironment.st

    This script downloads the content from

    After this process you should have available the environment variables ANDROID_NDK_HOME and ANDROID_SDK_HOME. Ensure this by checking your .bashrc file at the user’s home directory.

  3. Create a new image: this image will be created by pointing to this local git repository
    cd android/scripts
    ./newImage.st
  4. Link sources to the build folder: The Android vm relies on a Java wrapper. This sources must be accessible from the build folder.
    cd android/scripts
    ./linkSources.st
  5. Generate the sources of the stack vm: This script executes the generator of the image created on int the 3rd step.
    cd android/scripts
    ./generateStackAndroidMake.st
  6. Generate the resource image for deployment: This script download and suites up an image for deployment on the folder build/assets/SmalltalkRessources
    cd android/scripts
    ./newResourceImage.st

    This image created in this point is downloaded with it related VM for editing and loading the code you want to deploy, or configure the things you want.

  7. The VM compilation: This script generates the libraries with the VM code.
    cd build
    ./build.sh
  8. The Java wrapper compilation and Android Application packaging
    cd build
    ./package.sh
  9. Installing into your device. If you want to generate an APK file with your custom name, you will need to deal with the AndroidManifest.xml before runing the package.sh script 🙂
    cd build/bin
    adb install -r StackActivity-debug.apk
– Im currently working on the JIT version of the VM, that still avoiding me :).
 But you have as well the instruction on the same README-Android.me file.
 Santiago

Pharo/Seaside on Pi

Hi

Just for fun, I’ve set up my Raspberry Pi 3B with Raspbian and Pharo with Seaside.

Thought I’d share the success thus far!

Image
-----
/home/riverdusty/pharo.app/pharo.image
Pharo5.0
Latest update: #50761
Unnamed

Virtual Machine
---------------
/home/riverdusty/pharo.app/pharo
CoInterpreter VMMaker.oscog-rsf.1951 uuid: c714858a-7f63-47bd-a9ec-4bc1350eead2 Oct 20 2016
StackToRegisterMappingCogit VMMaker.oscog-rsf.1951 uuid: c714858a-7f63-47bd-a9ec-4bc1350eead2 Oct 20 2016
VM: 201610190705 https://github.com/estebanlm/opensmalltalk-vm.git $ Date: Wed Oct 19 09:05:15 2016 +0200 $ Plugins: 201610190705 https://github.com/estebanlm/opensmalltalk-vm.git $

Unix built on Oct 20 2016 07:31:59 Compiler: 4.9.2
VMMaker versionString VM: 201610190705 https://github.com/estebanlm/opensmalltalk-vm.git $ Date: Wed Oct 19 09:05:15 2016 +0200 $ Plugins: 201610190705 https://github.com/estebanlm/opensmalltalk-vm.git $
CoInterpreter VMMaker.oscog-rsf.1951 uuid: c714858a-7f63-47bd-a9ec-4bc1350eead2 Oct 20 2016
StackToRegisterMappingCogit VMMaker.oscog-rsf.1951 uuid: c714858a-7f63-47bd-a9ec-4bc1350eead2 Oct 20 2016

Operating System/Hardware
-------------------------
unix linux-gnu armv7l

(And for those who can see it, a screenshot)jedbjpaeeilnjoea.png

gareth@inspired.org

Scale: Scripting made easier

Hi everybody.

We are officially releasing a first version of scale.

Scale is a command line handler that is there for making easier the life of the people that uses scripting in linux. As such, we only tested it so far in linux. It will be for sure easy to adapt it to mac because its a *nix, but not for windoze.

IMPORTANT REMARK: scale is not meant to develop applications, it is meant to develop scripts in Pharo, to be launched from the command line. This means that scale does not provide a top level syntax to declare classes or methods: people should do that as any normal Pharo application. Scale should be used to invoke such applications.

When would you use scale?
  – For example, to replace some bash scripts used for common boring tasks (and you are using python or ruby there :P)
  – Another example, would be when you want to replace bash scripts that chain things like:
    ./pharo eval –save “something”
    ./pharo eval –save “other something”
    …
Oneliner to install: (note it needs sudo) 
In the repository there is some user level documentation based on examples and a list of available methods on the magical variable system.  There are many examples as well on the repository.
Last but not least, I’m using this project in others two projects, where it proof it self quite powerful what keeps me on maintaining Scale.
These projects are:
Pharo Android VM building https://github.com/sbragagnolo/pharo-vm
 Here I use it for automating the creation of a
       * new building image,
       * the creation of new resource image (for deploying on the android apk),
       * linking the android sources into the building directory
       * generating the code from the console
MakrosTool is an extension of scale that adds a second magical variable for building up component reification in a ROS based environment.
Santiago & Guille

AR.Drone 2.0

Hi!

Earlier this year I told you about the communication API for controlling the AR.Drone 2.0 from Pharo I was developing as part of my final degree project.
Today I want to share with you its final version. As before, the code is hosted in: http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo
I made two demo videos:
In each demo the drone flies autonomously according to the location of tags detected by its cameras. The demos are programmed using a live programming language called LRP. This language was developed by members of my university. Here you can find more about LRP: https://pleiad.cl/research/software/lrp
The code was tested and developed under ubuntu 12.04 and Pharo 5.0.
I hope you like it! 🙂
Cheers
Caro

Sparta V1.1

Hi
I am happy to announce the release of Sparta v1.1 for Pharo 6.
It can be bootstrapped with the following script:
Metacello new
  baseline: 'Sparta';
  repository: 'github://syrel/sparta:v1.1/src';
  load: #file:core
Examples are on class side of: MozExamples, MozTextExamples
(for linux users: if you use 32bit pharo on 64bit linux, sparta will not work, since 32bit plugin depends on 32bit GTK which conflicts with 64bit GTK. Either use 32bit linux or 64bit pharo. I tested sparta with 64bit vm on mac and linux – it works, but some features fail because FFI is not ready)
Release of v1.1 is focused on hardware acceleration, windows support and text rendering.
What is new:
 – Default backends on all platforms changed from software to hardware accelerated.
 – Now also works on Windows! Default backend is Direct2D for drawings and DirectWrite for text. On multi-gpu machines per-app-default setting is respected. In case of Nvidia it can be changed in nvidia control panel. Sparta is x2 faster on discrete gpu than on integrated one.
 – Added initial text support, for instance rendering and high precision measurement.
 – Per-platform settings system is now image based. Allows to enable/disable hardware acceleration, change default backends, change font-mappings tables.
Some text examples:
sparta-text-haiku.png
sparta-text-measurement.png