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.