Tuesday, April 16, 2013

Pharo 3.0 and Opal compiler

After Pharo 2.0 came out the development on 3.0 immediately started.

Pharo 3.0 already has many new updates and today it also integrates Opal (a new compiler).
If you want to know more about Opal then read here or look at this presentation from the Deep into Smalltalk summer school.

Still Opal is not the default compiler - but step by step...

Monday, April 15, 2013

Sunday, April 14, 2013

Friday, April 12, 2013

Athens Tutorial

Want to use the new Athens graphics package? There is a new tutorial that you can run from within the image. This video from James shows how to use it.

Thursday, April 11, 2013

Profiling using Spy framework

Alexandre Bergel is demonstrating some profiling and visualization of the Spy framework. He uses package "HelpSystem" - stuff that I wrote back in 2010. Interesting point of view on things I did myself in the past. Looks like I should apply these visualizations to the new Online Help system as well to get even better results. Thanks!

Sunday, April 07, 2013

First 13 minutes of PharoConf

First 13 minutes of Pharo conference are available as video. Others are in preparation.

Pharo package for Ubuntu

There is now also a special Pharo package for Ubuntu, so you can easily install it. Read more.

Friday, April 05, 2013

Amber Smalltalk Game

A nice demo of an in-browser game developed in Amber Smalltalk is available
since today. Click here to try or read here.

If the demo runs in your browser click on "class browser" to see the code.

Thursday, April 04, 2013

Alan Kay interview

Again an interesting interview with Alan Kay.

Quicksilver

Quicksilver is a tool for the interactive exploration of hierarchical graphs. Code is on SmalltalkHub.
Gofer new
smalltalkhubUser: 'Quicksilver' project: 'Quicksilver';
package: 'Quicksilver';
load
It requires Moose and can be used to create Roassal visualizations like this from a filesystem.

Wednesday, April 03, 2013

Athens Vector graphics tutorial for Pharo

Athens is a new vector graphics API for Pharo. There is now an in-image tutorial from Igor you can use to get used to it. Really nice!

Trying Parasol with Selenium in Pharo Smalltalk

Johan Brichau answered my question from my last post: about the difference between the "Parasol" and "Webtester":
So I gave Parasol a short try today:
  • a fresh Mozilla Firefox was already installed on my machine
  • Parasol still requires old Pharo 1.4, so even when I prefer Pharo 2.0 I downloaded it again
  • I installed the current version selenium-server-standalone-2.31.0.jar of Selenium which can be found here
On Windows (64Bit) I start the JAR with a batch to tell the Java component about the firefox location

java -jar C:\selenium\selenium-server-standalone-2.31.0.jar -Dwebdriver.firefox.bin="C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
pause

Now in Pharo 1.4 image I installed Parasol using:

Gofer new
    url: 'http://ss3.gemstone.com/ss/Parasol';
    package: 'ConfigurationOfParasol';
    load.
((Smalltalk at: #ConfigurationOfParasol) project version: #development) load: 'dev'.

WAKomEncoded startOn: 8080.
Deprecation raiseWarning: false; showWarning: false.

Took a while since it loads Seaside. After anything is set up I can easily script the webdriver/Firefox from a Smalltalk workspace. Here is an example:

"Start the driver and open wikipedia" 
driver := BPRemoteWebDriver new.
driver get: 'http://en.wikipedia.org/'.
"click on search"
(driver findElementByID: 'searchInput') click.

"enter some text"
driver getKeyboard sendKeys: ('Pharo' , (String with: BPKeys return)).

"query some text from the webpage"
Transcript show: ((driver findElementByID: 'mw-content-text') findElementByTagName: 'p') getText.

driver quit

So it is easy to write SUnit tests or automate some tasks you do on the web using Pharo. With the help of F12 in the webbrowser it is easy to find out about element ids, ... in HTML, so one can easily navigate through pages.

I worked with Selenium in Java and other languages already in the past. Parasol is not as comfortable as with the Selenium IDE recorder - but it works and using Smalltalk usually makes one more productive.

It is nice to see that I can now also control the Firefox browser to automate things and write webtests directly from within Pharo Smalltalk.



Parasol - web testing using Smalltalk

There is a project called "Parasol" allowing you to do web testing using Smalltalk. It uses Selenium.


Still dont know what the difference to "WebTester" is - which is another project for webtesting I already blogged about.

Tuesday, April 02, 2013

Pharo and GitFS

There is a GitFS available for Pharo. It is a work in progress and there is already some docu.

Fuel and Tanker demo session

First videos from PharoConf 2013 appear on the net. One video is about Tanker - an experimental package loader. It uses Fuel to do serialization and deserialization and will allow for faster loading.

Didnt know about the debugger menu item to serialize the stack to a .fuel file. Allows to serialize an error stack in case of problem and materialize the stack in another image to reproduce.

Nice - try that with other technologies out there ;)

Code for Fuel is already in Pharo 2.0. The Tanker project is on SmalltalkHub.




Back to the command line with Pharo Smalltalk

Pharo 2.0 allows you to easily deal with the command line. This is very useful if you want to script some daily tasks or your CI builds.

You can pass arguments to the image and also register own command line commands. Just check out the class comment in class "CommandLineHandler" and check its subclasses.

Creating an own handler is easy: just subclass CommandLineHandler with a custom class:


CommandLineHandler subclass: #TimeCommandLineHandler
 instanceVariableNames: ''
 classVariableNames: ''
 poolDictionaries: ''
 category: 'Custom-CommandLine'

Implement a class side method to return the command name:

commandName
 ^ 'time'

and implement an instance side #activate method:

activate
 self activateHelp.
 
 FileStream stdout 
  nextPutAll: '[time] ';
  nextPutAll: Time now asString

Now call it from the command line

    $PATH_TO_VM myImage.image time

and it will print the current time on stdout. Note that the #activateHelp will activate the --help option which displays the class comment of your custom handler class.

Also note that it is now possible to write in colors in a terminal from Pharo as this photo shows (click to enlarge):

 

Get Pharo easily

If you want to install Pharo on your platform you can go to:

         http://files.pharo.org

and download the specific distribution for your platform from the platforms directory. For instance "Pharo2.0-win.zip" for Windows, "Pharo2.0-mac.zip" for Mac and "Pharo2.0-linux.zip" for Linux.

There is also a "Pharo2.0-portable.zip" if you change platforms often (just put it on a USB stick). Also note that Pharo 3.0 is already available there as well - so if you want to help with fixes and changes feel free to do so.

If you visit

      http://get.pharo.org

there is another way to install it. This page includes the Zero conf script allowing you to easily
install Pharo using the command line. For Pharo 2.0 this is:

    wget -O - http://get.pharo.org/20+vm | bash

And you can use:

    wget --quiet -O - get.pharo.org | bash

for the current stable release of Pharo and the PharoVM.

Tuesday, March 26, 2013

Pomodoro for Pharo 2.0

The Pomodoro Technique is a time management method. There is now also a simple timer implementation for Pharo 2.0 available.


You can load the tool right from the config browser and it allows easy scripting from Smalltalk:

   "Provide an action when pomodoro is finished"
   Pomodoro timerFor: 20 minutes 
            whenFinishedDo: [ self inform: 'Pomodoro finished']

Read more about the details here.

Thursday, March 21, 2013

IRC Pharo

The old IRC channel #pharo-project about Pharo is now closed. So if you want to chat about the Pharo environment use the new #pharo channel on freenode.

Moose 4.8 on Pharo 2.0

Moose moved to Pharo 2.0. All tests are green and the team recommends to use Pharo 2.0 in the future.

Wednesday, March 20, 2013

One-click is dead

Even when then new Pharo 2.0 is delivered as a one-click on the homepage, in the future we will see OS specific packages for Win, Linux, Mac, ...
The platform specific builds are already in place.

Squeak 4.4. for RiscOS

Squeak 4.4. is now available for RiscOS too.

Wednesday, March 06, 2013

Cross dialect Smalltalk CI

Do you want to use cross dialect Smalltalk (Pharo, Squeak and GemStone) continuous integration service? Then have a look at "builderCI" from Dale which is using GitHub and TravisCI.

Wednesday, February 27, 2013

OOP - a critical approach

Some years ago I had email exchange with Huw Collingbourne about programming and Smalltalk and  Smallscript/S# in particular. At this time I helped my friend David Simmons a little bit with some early Smallscript releases.

Huw runs the http://www.bitwisemag.com and he had a tutorial on Smalltalk with Squeak and one about Dolphin Smalltalk.

Huw also published an interview with David as the creator of Smallscript. Smallscript (as some of you may know) is still closed and not released into the wild for various reasons. It is still one of the most fascinating software technologies and dynamic scripting environment/language I was able to get my hands on.
But I dont want to write about Smallscript here.

Huw Collingbourne is instructor on programming languages, he wrote books about Ruby and is director of technology at SapphireSteel Software (known for their Ruby IDE).

I found an interesting post about Smalltalk and other programming languages in the context of object oriented programming from Dec 2012 written by Huw:

  https://www.udemy.com/blog/object-oriented-programming-a-critical-approach/

Read it. It should make you think and again remind you that the IT world made no real progress with recent languages and software technologies regarding objects.

Day by day I see so many people write code or writing about OO code (in blogs, papers, ...).
Not all really understood about OOP and its key concepts.

People learn languages like Groovy, CoffeScript or Scala today, the next day they learn Dart or the next language. Sometimes only the syntax changed. But they never looked at OOP, they never looked at its origins in Smalltalk or Lisp because these technologies are "too old" and not mainstream. But they should - it will help fighting complexity and help when the code grows.

Only a few of them ever took the time to look at Smalltalk. And a few of the few people really continued to look and understand that Smalltalk is not really a language. It is a dynamic object system with the language just built in. Even a class is an object and therefore has a class. It can dynamically changed, created or removed and garbage collected like any other object. If you need new control structures just add them as new methods. It's turtles all the way down and the power is in the simplicity: Objects and Messages.

Worked with several languages and environments I learned to know about both worlds. On one side the text file based, often static compiled world (mostly combined with a horrible grammar) that constraints writing good OOP and on the other side a dynamic live environment where you can lively interact with all the objects around either by using code or direct manipulation.

Smalltalk is still the mother of OO languages - you can not get any closer to OOP than within its environment. And it is also opens the door to metaprogramming - something I will write about later here.

I can only recommend it - grab a free copy and learn about it. You will not regret it even if you continue to work with more mainstream technologies.



Tuesday, February 26, 2013

Network Time Protocol in Pharo

Want to sync server times? You can check your local clock agains other servers using the NTP protocol. Sven provides some sample code in his Neo repository. Since the network time protocol (RFC2030) is based on the UDP protocol you now also have a nice example on how to use UDP datagrams.

Sunday, February 24, 2013

BioSmalltalk screenshots and integrated help

BioSmalltalk provides some screenshots of their Pharo based application. Way cool: it uses my HelpSystem which (as the site states) they could integrate in less than an hour work. Nice! But nonetheless I now provide an online version

Pharo Online Help with Markdown support

The Pharo Online Help now has support for the markdown format. I also made a tutorial available on how to use it. Code is on SqueakSource3, but will soon move to SmalltalkHub.

You can try in a clean Pharo 2.0 image, load it using the configuration browser.

Tuesday, February 19, 2013

Smalltalk Jobs

There is a new site for worldwide Smalltalk Jobs: http://SmalltalkJobs.com

PBE 2 as PDF

Want to read "Pharo by Example 2" book as a PDF. Here you go. Update: Now the book PDF is built by the CI Server and you can find the chapters here.

Tuesday, January 29, 2013

Marea: Swapping Objects

A new paper was published on Marea, an object graph swapper for Smalltalk. Read more here or directly go to the PDF.

Thursday, January 24, 2013

Smalltalk and CouchDB

If you want to develop an application with Smalltalk (Pharo) and CouchDB, then continue reading this paper.

It includes a port of the Mustache web template library which is easy to use if you work with JSON. Look here for a syntax example.

Code lives on SS3 and will soon move over to SmalltalkHub (at least the project is there already, still empty).

Wednesday, January 23, 2013

Loom

There is another new tool from ObjectProfile called "Loom - Threads Monitor Tool" which is available for Pharo and VisualWorks.

Monday, January 07, 2013

AsmJIT

Want to work with assembler even in high level languages? Then have a look at "asmjit" - a complete x86/x64 JIT Assembler for C++ Language. There is a port to Smalltalk at http://www.squeaksource.com/AsmJit.html It is already used in Pharos NativeBoost project.

Sunday, January 06, 2013

TalkFFI

There is an initial release for TalkFFI - a new project to automatically generate the Smalltalk bindings for FFI (here NativeBoost in Pharo) right from the header files.

Wednesday, January 02, 2013

Jun for Smalltalk

The Jun for Smalltalk project (a library to handle 3D graphics and multimedia) has a new version "Jun794" released.

Tuesday, January 01, 2013

Pharo Finder Tricks

Ben shares some tricks about the Pharo Finder tool.

Oak - distributed persistence using Smalltalk

Göran writes about Oak - a project for Smalltalk to make use of Riak for distributed and easy object persistence.

Fuel 1.8.1

There is a new Fuel release now ready for many image versions: Pharo 1.1.1, 1.1.2, 1.2, 1.3, 1.4, 2.0 Squeak 4.1, 4.2, 4.3, 4.4 Read more here.

Thursday, December 20, 2012

Squeak on RISC OS Pi

Tim Rowledge may be known to you. He ported Squeak to the Acorn RISC processor and wrote "A Tour of the Squeak Object Engine" when working at Interval Research. He is now working on the Raspberry Pi (RISC OS Pi) and as of today he has a running Squeak on it.

Wednesday, December 19, 2012

Need chocolate

The company Object profile is hiring: "Object Profile is hiring: Yes! We are ready to share our happyness! We are looking for fulltime and partime engineers to share fine chocolate." So if you want to work with Pharo and VW contact them.

Pharo Google Plus Community

There is now also a Google+ community for Pharo.

Thursday, December 06, 2012

Slides from Pharo workshop

Here are the new slides from Pharo workshop at fOSSa: - Talk 1: Pharo : a Dynamic Reflective System. Slides - Talk 2: Pharo: Syntax in a Nutshell. Slides - Talk 3: Pharo in the Real World. Slides

Pharo 2.0 enters Beta

Pharo 2.0 is now beta.

Friday, November 30, 2012

Redline Smalltalk article on jaxenter

There is a new online article on jaxenter (online page from Java's JAX magazine) about Redline Smalltalk.

Thursday, November 29, 2012

Redline Smalltalk in Maven (Maven plugin)

Not only is Redline available in a Maven repo (the JAR's, I reported about it). Now there is also a Maven plugin for Redline. Haven tried yet - but the plugin's mojo has one simple goal: stic So adding it to maven pom.xml should be easy. Here is a sample.

Pharo Help additional features

I added some new features to my Pharo Online Help project. Read more.

Smalltalk 30th Anniversary Reunion

There is a new page on Smalltalk-80 history: http://www.smalltalk-80.com/ and a "Smalltalk 30th Anniversary Reunion" in preparation. Read more on James' blog.

Growing Object-Oriented Software Guided by Tests

There is a book called "Growing Object-Oriented Software Guided by Tests" - the examples code is now ported to Pharo Smalltalk. See code at SmalltalkHub.

NativeBoost 1.7 for Pharo 2.0

A new NativeBoost version 1.7 for Pharo 2.0 (which is still alpha as of today) is now available.

Just fire up an updated fresh Pharo 2.0 image and select "Tools" and "Configuration Browser". Then select Native Boost and select "Install configuration (Stable version)".

- Igor changed the API of NativeBoost a little bit (avoid globals, etc.)
- Ciprian contributed special syntax for array arguments
- I contributed some more examples for Win32 by wrapping some common Win32 API functions

So if you are on Windows you can play with:

    NBWin32Shell shellBrowse: 'http://world.st' 
    NBWin32Shell getComputerName
NBWin32Shell showODBCSettings
NBWin32Shell lockWorkstation
...

A more complete list can be found here.

Using the shell you can also query infos about your system:

   NBWin32Shell getEnvironmentVariable: 'JAVA_HOME'
   NBWin32Shell getDriveType: (NBWin32Shell getHomeDrive)
   NBWin32Shell getPathEntries
   ...

You can also open the control panel and control panel applets:

   NBWin32Shell showControlPanel
   NBWin32Shell showDisplaySettingsBackground
   ...

See class NBWin32Shell for more examples.

Now there is also support for the "DebugOutputString" API - which allows you to write

    NBWin32Shell outputDebugString: 'Trace me'

These outputs can be viewed with tools like dbmon.exe (from WinSDK) or DebugView.
Very usefull if you run Pharo headless on Windows.

I also played with the MessageBox API allowing you to open native message boxes. Not yet complete but you can test with

  NBWin32MessageBox test

Additionally I started wrapping some Windows GDI functions - so if you need faster native drawing you can write:

   NBWin32Window getFocus getDC rectangleLeft: 10 top: 10 right: 100 bottom: 100


Note that NativeBoost will soon be integrated into Pharo 2.0 by default (before it goes beta).

Monday, November 26, 2012

Test coverage in Java and Smalltalk

When working with Java I usually have several plugins that I preconfigure in Maven. One is the the very usefull Cobertura plugin - it calculates the percentage of code assessed by tests.

That way you usually write a component/classes and try to cover it with as many tests as possible. Or you write the tests first (XP-Style) and then implement code until they are green. Often you want to know if you need more tests and how good they test your code.

When running maven with the Cobertura plugin (in combination with the site plugin) you get a site report that shows the coverage ratio. You can then dive into the report down into the Java packages and classes and see which lines are covered (green) and which not (red). For instance for an if/else you will see if both decision ways are covered by tests, etc.

Here is a sample report from the Java world.

Now Pavel created something similar for the Smalltalk and Pharo world. Here is the report from the Pharo kernel - scroll down to see the colored results. The Java report is still a little bit better structured - but I like that quality tools are available in both worlds.






Sunday, November 25, 2012

Thursday, November 22, 2012

Athens Animation and Chipmunk physics library in Pharo

Esteban had a little bit of time to dig deeper into Igors work:
  - NativeBoost (a new mechanism to call external libs and a replacement for the former FFI)
  - and Athens (a vector graphics framework)

On top of these Esteban created a new playground for animations based on Athens for Pharo and wrapped the chipmunks physic engine as this and this video proves. Nice!

New ChangesBrowser for Pharo 2.0

Nearly all Smalltalks I know come with a changes file and are able to easily track changes. Any change on a method - even a doIt is logged.

In Pharo 2.0 it is time to rethink some of the old tools (and change management) and add new features (like tracking semantic changes, undo/redo ...). A first preview is now available.

Just open Pharo 2.0 and evaluate:


Gofer new
 smalltalkhubUser: 'EzequielLamonica' project: 'NewChangeSystem'; 
 package: 'Changes'; 
 load 


Then open the "Changes Browser" from the tools menu. Leave the browser open and change a method in a system browser. I like that I can instantly see the change and diffs. I can also change the grouping or undo a method change, etc.

If you create a class then two changes are logged: that a class is created and that an expression is evaluated.
This is not a surprise for a Smalltalker - since a class is typically not created by a wizard or by creating a file (like in Java, C++, ...). It is created by sending a message to the superclass to create a new subclass and follows the "objects and messages" idea that makes Smalltalk. ;)

The UI of the browser needs some work - but it is already based on the new UI Specs in Pharo 2.0. The menu is also a little bit inconsistent (since the "undo" on evaluated expressions is enabled).

But nonetheless a nice and useful tool ...


Wednesday, November 21, 2012

Rossal and Calder

The Roassal visualization engine can also be used for simulation as this new video from the Calder project proves.

Redline Smalltalk for JVM funding

Getting Smalltalk to run on the JVM is not an easy task. There are currently two main projects trying to achieve that. One is RTalk from Mark Roos (that soon will see the open source light) and the other one is an already opens source project driven by James Ladd called Redline Smalltalk.

James now asks for support to fund the development. If you are interested in the campaign you can click here to become a Redliner.

Sunday, November 18, 2012

Thursday, November 15, 2012

Saturday, November 10, 2012

Redline in Maven

When I do Java work I always use Apache Maven. It's a clear step forward in Java world compared old Apache Ant - which is as terrible as old makefiles from C/C++ if the project grows. Although project descriptions (POM) in Maven are also static due to XML (and one has to code a Mojo with Java for non-common tasks) I like the unified way to treat projects and builds and the amount of plugins that are available (ranging from checkstyle, site plugins, project reports, ...).

Nice to hear that Redline Smalltalk JAR is now accessible in a Maven repo too - at least a snapshot (https://oss.sonatype.org/content/repositories/snapshots/st/redline/redline/0.2-SNAPSHOT/). Will make it easier to use it and follow Redlines development if new versions will show up as maven artefacts.

If time permits I will play with Redline a little bit in the next evenings since according to the latest commits one can now use a Java class like a Smalltalk class within Redline. This is done by dynamically generated Smalltalk to adopt a Java class. Here is an example for java.util.ArrayList.

Tuesday, November 06, 2012

Pharo Online Help (Preview)

Some time ago I wrote a little help system for Pharo. You can see some infos about it here.

I now implemented a hopefully better one and today published a preview of a possible "Pharo Online Help". Documentation and QuickStart tutorials are crucial in my opinion for better adoption of Pharo and Smalltalk. Lets see if the community accepts my proposal and helps moving it forward...

Click the image below for a preview or read about it here.

Smalltalk and multicore programming

Found a new presentation from a talk from Stefan Marr on Multicore programming in Smalltalk

How old are your objects

Nice discussion and info about the age of objects:

"Also, since our GC does not change the order of objects when compacting, you can tell if an object is older than another by enumerating all objects. The oldest ones are of course nil, false, and true (more than 30 years old now)"

Monday, November 05, 2012

Pharo downloads

If you want to grab the latest Pharo development you can regulary use the Pharo CI Server (http://ci.pharo-project.org). Unfortunaletely it is down today - but there is a page with all the latest things for download.

Friday, November 02, 2012

Pharo Server backend

UN Number is a new application for the iPad/Android. What you cant see is that it uses Pharo Smalltalk for the server backend.

Smalltalk is cool

A popular german computer magazine (ct') has a special issue on programming. On the title it states: "Cool Languages: Haskell, Smalltalk and D". Yes - and we plan to make Smalltalk even better.

 

Interactive Snap! using Seaside

A video about connecting Snap! and Scratch Sensor Board via Seaside - nice.

Yesplan video

This is a new video (in dutch) about Yesplan - a planning software made with Pharo and the Smalltalk Seaside web framework.

Byte Magazine on Smalltalk

The famous BYTE magazine issue about Smalltalk from 1981 is available online.

Aida with Websockets

The Aida web framework is now the first one with full Websocket support. So a new Aida 6.5 Interim release is published for Squeak, Pharo and VisualWorks. Download it from the website.