Thursday, September 28, 2006

Seaside for the .Net Developer

Ramón León compares web development with Smalltalk/Seaside and web development with .NET.

Wednesday, September 27, 2006

Small Cruise

There is a sneak preview of SmallCruise available showing the integration between Dolphin Smalltalk and CruiseControl.net (providing Continuous Integration of your Smalltalk projects).

Tuesday, September 26, 2006

Sandcastle

When working with Smalltalk I usually dont care about reference documentation since I'm more used to browsing the code directly. On the other hand it is very easy to use reflection in Smalltalk and write out some static html files if required (see this Squeak class documentation for an example).

In Java and .NET you typically use documentation annotations in the code and tools like JavaDoc and NDoc. As you may have heard NDoc is now discontinued since Microsoft provides an own documentation tool called "Sandcastle".

So I just downloaded the Community Technology Preview for "Sandcastle" to document the assemblies of one of my .NET projects. Sandcastle allows you to build accurate, informative documentation with a common look and feel similar to the MSDN documentation.

There are several GUI tools available helping you to control the compilers input and output (the CTP for Sandcastle comes only comes with a command line compiler).

After trying the SandCastleBuilder tool I was more happy using the SandcastleGUI tool. Much better than using MRefBuilder.exe, BuildAssembler.exe and XslTransform.exe manually.

Since I already had the MS HTML Help Compiler installed it was very easy to build a CHM file with the docu. One of the nice features is that the documentation includes live links to the MSDN documentation.

All in all nothing worldshaking but sometimes helpful if work on the .NET side of life.

News from Exupery

A port of the Exupery virtual machine is now available for Windows and Solaris.

The Exupery project (by Bryce Kampjes) compiles bytecodes to machine code. The source code is available at SqueakMap.

Dont forget to have a look at the Exupery talk from Brussels2006 Smalltalk party (see video).

Wednesday, September 20, 2006

IsDate and Agent Zed

While reviewing code I found an interesting bug in a VB component today.
There is a piece of software that should validate if a given input value
represents a correct date.

Unfortunately it just used the IsDate() function to check the value.
If I reduce the code to its minimum it does something similar to:

Private Sub Command1_Click()
   Dim inputValue As String
   inputValue = "28.02.06"
   MsgBox IsDate(inputValue)
   MsgBox CDate(inputValue)
End Sub


This works as expected: the inputValue represents a date (so we get "True")
and after the date conversion we get the correct date: 28.02.2006.

But have you tried with "31.02.06" - an input value which is not a
correct date (at least if you think of the format dd.mm.yy)

It is silently accepted by the code and VB is converting it into
the "06.02.1931"! Beside the fact that this is the day where actor
Rip Torn was born (who played Agent Zed in Men in Black) we found the
reason for accepting the bad input value.

So if VB cant find a matching date in the right order it just parses
the string reverse and checks for a reasonable date value.

Let's do a quick check in .NET using C#:

DateTime date = DateTime.Parse("31.02.06");

Fortunately this is not an issue since a FormatException is thrown.

Conclusion: never stop testing your code and when it comes to
dates remember the birth of Agent Zed...

Monday, September 18, 2006

More VM news

Looks like Ian Piumarta's new Pepsi and Coke Meta-VM might lift off with the OLPC project. A quote from the OLPC news:

"2. Alan Kay, Kim Rose, and the eToys team spent the week in Cambridge at the OLPC offices. They continue to make rapid progress towards the integration of eToys into the laptop software environment (they also provided useful feedback) and have eToys running on the laptop. IanPiumarta gave the OLPC team an update on his dynamically reconfigurable virtual machine, which may be in the longer term the basis of programming environment for the Laptop, in that it is simple, fast, extremely flexibleand quite eloquent."

Wednesday, September 13, 2006

Comet Screencasts - new web possibilities

Diego shows some examples for Comet use as screencasts:

- a Cooperative shopping cart
- a colaborative spreadsheet

Full info is available here and here - spanish only.

So there are more and more arguments for using Seaside as THE web development framework. If you dont know about Comet you should have a look at one of my ealier posts about it.

News from Squeak and OLPC

Another step for the "One Laptop per Child" (OLPC) project: Squeak Etoys is running on a first prototype display. See the pictures on Ians homepage:

    http://piumarta.com/photos/olpc/

Monday, September 11, 2006

Sun release Strongtalk VM into OpenSource

Sun has released the Strongtalk VM as Open Source in September 2006. The Strongtalk VM executes Smalltalk much faster than any other Smalltalk implementation (at the time of its release), using an advanced inlining compiler based on type-feedback technology. See

http://www.strongtalk.org/

for more info.

The current system was developed in secret at a small startup company, Animorphic Systems (officially LongView Technologies, Inc.), that was started in 1994. Unfortunately for Strongtalk, the rapid and unexpected rise of Sun Microsystem's Java forced Animorphic to halt work on the Strongtalk system before it was ever released. Animorphic was acquired by Sun Microsystems in 1997, and parts of the Animorphic virtual machine technology became the core of what is currently Sun's production Java virtual machine implementation (it made it into the Hotspot Java Jitter/dynamic optimizer).

The VM is a mixed-mode system, with a fast interpreter as well as dynamic
compiler that was invoked based on dynamic profiling info. The only previous application of similar technology was Self, which was entirely compiled and had a huge footprint.

The Strongtalk VM did not make use of the type system at all; typing was strictly optional. Method dispatch was based on inline caches, including PICs. All code was represented internally as mixins, and any class could be used as a mixin as well.

Benchmarks showed that we were 2.5-4 times faster than commercial Smalltalks at that time (Digitalk, ParcPlace (now Cincom) and IBM).

Wednesday, September 06, 2006

Squeak Developer Workspace (including Seaside)

A new release of DeveloperWorkspace for Squeak 3.9 is available. It creates a predefined image and may help developers as well as beginners. It now also includes all packages for Seaside development.

Some of its features:


  • assembles usefull packages and developer tools (AST, FFI, RefactoringBrowser, RoelTyper, TestBrowser, Techo, ScriptManager, MemoryUsage, ...)
  • syntax highlighting using Shout
  • autocompletion using eCompletion package
  • includes seaside and a seaside workspace to easily start web development (no external webserver required)
  • window switching using ALT+W (thanks to keybinder)
  • provides an beginners workspace (uncomplete, help appreciated)

Unfortunately I was not able to register a new package version on SqueakMap today, so here is a short howto:

Download the latest 3.9 release of Squeak (actually Squeak3.9g-7055.zip) from http://ftp.squeak.org/3.9

Open a new workspace and evaluate the following code:


| repository version |
repository := MCHttpRepository location: 'http://www.squeaksource.com/DeveloperWorkspace' user: '' password: ''.
version := repository versionFromFileNamed: 'DEVImageInstaller-tbn.4.mcz'.
version load.


A workspace will appear with

DEVImageInstaller install

Just select this text and evaluate it.

Answer all following questions with "yes" or "ok". Note that you have to provide a username and password during the install. They are used to secure the seaside webserver configuration console.

When the installation finishes just save the image. You can now use the tools or follow the instructions in one of the workspaces.

Have fun

Monday, September 04, 2006

Pictures from ESUG 2006

Here are the first pictures from the 14th European Smalltalk User Group (ESUG) conference in Prague.

You can also have a look at the presentations from Monday.

and some first impressions from James:
- Meta Driven Browsers (about the OmniBrowser framework)
- Modularizing the ObjectLens