Today's Smalltalk 4 You looks at log4s (a logging framework) in VA Smalltalk. Today we just scratch the surface; there will be more screencasts on this topic. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Today we'll look at the logging framework that ships with VA Smalltalk - log4s (A Smalltalk port of the well known log4J package). It's already in your image, so there's no need to load it from ENVY. There are a couple of different ways to get started, but today we'll look at setting it up via the ini file. Every VA image has a corresponding (same base name) ini file - you'll want to append a new "stanza" to it. Here we are setting up a basic file logger, using the default root level logger. You can have multiple logging streams (each filtered separately) on a single logger; today we'll just look at a simple file logger. Here's the way we define that in the ini file:

What that sets up is a file logger off the root (technically, a new appender - each logger can have any number of appenders associated with it). When you log something, it will appear in that log file (we specified vaLog.log above). The pattern specified how the log entry appears; the VA documentation goes through in great detail how you can customize that. To log a warning, you can do something like this:

"simple log event"
EsLogManager warn: 'This is a warning, beware!'

One caveat - the doc talks about class LogManager, while it's actually EsLogManager. The output for what we did above?

We'll get into filtering, programmatic setup and more in the future screencasts

Today's Smalltalk 4 You continues our examination fo log4s, setting up a new logging channel (called an appender in the framework). If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Today we'll add a new logging stream (called an appender in the framework) using log4s. The same information gets logged to all streams for a given logger; we'll look at how to add new loggers in another screencast. First, recall how we specified the root level logger in the VA ini file:

Welcome to episode 70 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.

This week we have the conclusion to last week's ESUG 2011 presentation - here's the abstract on the talk from Georg Heeg - this is part 2, which you can watch here if you would rather see the video. You can listen to part 1 here

Georg Heeg AG purchased assets of CS Component Studio GmbH including the software and rights of CS Component Set. CS Component set is a toolbox of ERP components for small and mid-size companies. It has been developed over more than a decade and is in daily use in successful companies throughout Germany. The basic idea has been to have an ERP system which has many standard components for any business and is adaptable to specific needs of special businesses and individual companies. Georg Heeg AG plans to fully support existing customers and to bring the software to an up-to-date level and to implement new and innovative applications.

You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.

To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.

Welcome to episode 70 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson and David Buck.

This week we have the conclusion to last week's ESUG 2011 presentation - here's the abstract on the talk from Georg Heeg - this is part 2, which you can watch here if you would rather see the video. You can listen to part 1 here

Georg Heeg AG purchased assets of CS Component Studio GmbH including the software and rights of CS Component Set. CS Component set is a toolbox of ERP components for small and mid-size companies. It has been developed over more than a decade and is in daily use in successful companies throughout Germany. The basic idea has been to have an ERP system which has many standard components for any business and is adaptable to specific needs of special businesses and individual companies. Georg Heeg AG plans to fully support existing customers and to bring the software to an up-to-date level and to implement new and innovative applications.

You can subscribe to the podcast in iTunes (or any other podcatching software) using this feed directly or in iTunes with this one.

To listen now, you can either download the mp3 edition, or the AAC edition. The AAC edition comes with chapter markers. You can subscribe to either edition of the podcast directly in iTunes; just search for Smalltalk and look in the Podcast results. You can subscribe to the mp3 edition directly using this feed, or the AAC edition using this feed using any podcatching software. You can also download the podcast in ogg format.

After Georg kicked things off with an explanation of the name change, Chris Thorgrimsson - talking about their use of Cairo in their wafer fab software. The explanation of how they did graphics prior to using Cairo is interesting - lots of primitive "stop motion" stuff with CompositePart. They are still on VW 7.4, for reasons that sound very familiar to me - large organizations often have a whole set of constraints on them that aren't related to simple tech issues. Here's a link to the abstract.

They've integrated Cairo right into the VW GUI framework, with views (and eventually, controllers) that slot into the standard VW way of doing things. That included work to bring them into the GUI builder, making them easier to get started with. The layout (transform) editor for these components looks very nice - once the videos for the conference start hitting the web, you should have a look. On that subject, the conference has professional video work this year, so the audio quality should be a whole lot better than it has been in the past.

It's funny that Chris has to defend the use of Cairo, due to nervousness about external linking - people tend to blame any crash on Cairo. I say amusing because there was a perception where I work that any crash (an unhandled exception that brings the app down) meant a blue screen of death at the Windows level.

Arden Thomas (Cincom's product manager) is giving a live demo of ObjectStudio with Dirk Verleysen (one of their engineers) - this is another talk that will play far better on video (once those hit the web) than it will in text :) Basically, it's a quick demo of a simple app for a presumed client (a health/fitness club).

One interesting thing I've run into (doing a screencast, but also in theory looking at our database at work) - the database mapping (old to new) presumes a relatively clean database where all tables either have a primary key, or have some set of columns that can be used as a primary key. I've now seen that in the real world, that assumption doesn't always hold :)

Having said that, the demo itself is pretty slick. Read the datamodel, map it, and then create simple GUI application from all of that. Additionally, a simple web interface got created using AidaWeb, and that looks pretty nice.

First keynote of the conference - Eric Clayberg talking about Google's Dart. Eric is deep into Dart at Google. Eric is working on a Dart editor (Eclipse) which we may get to. Why Dart? Building large web applications is hard - Javascript just isn't up to the task. Dart is supposed to bring structured programming to the web, along with good tools. Right now, Dart is really "alpha" stage software.

One of the biggest changes is isolates, inspired by Erlang. One of the large non-changes is the syntax, which looks a lot like Javascript. That's for obvious reasons; you need to sell it to world developers. Another design goal - Dart is intended to be used at the client (browser) and server level, rather than the common split that exists now.

As with the previous talk, a fair amount of this one will only come across in video - Eric's doing a bunch of Dart demos, from simple to more complex.

Post lunch at STIC 2012 - time for Amber. John Thornton is giving the talk:

Amber is an implementation of the Smalltalk-80 language that runs on top of the JavaScript runtime. With Amber, client-side web development finally gets the power and productivity that has existed for decades in other Smalltalk dialects.

John started out in Ruby (Rails), and came across Smalltalk in 2009. The path was through a mobile game he was writing, SubWars.

Amber is a full browser based Smalltalk, with a full object model, core libraries, access to the web canvas, and a full featured IDE. Like most Smalltalks, it's largely written in itself.

Amber simplifies the workflow - edit everything (HTML, CSS, Javascript, Smalltalk) in the browser, and keep your "mental context" focused. This is another talk you'll want to watch the video for - John is doing live demos in an Amber driven presentation.

Don MacQueen is presenting log4s - a port of log4j to VA Smalltalk. I've been doing screencasts on this, so I'm interested :)

To set all of this stuff up, you'll want to look at the VA docs. Other than a few naming discrepancies, those docs are pretty good. And, they (Instantiations) eat their own dogfood - they are using log4s internally, and are talking about using it more extensively.

Over the last year or so, there's been a lot of confusion surrounding the security (encryption) libraries in Cincom Smalltalk - an ugly confluence of US government regulation confusion and lawyers :)

The good news? The kerfuffle (apparently settled now) led their engineering group to add bindings to external encryption libraries. That means that now developers have two paths through CST - use the Smalltalk libraries (always there), or use the faster platform libraries (if they are installed).

What libs? CNG/Bcrypt on Windows (Vista or higher), and libcrypto (openSSL) elsewhere.

There are a few API changes that come along with these changes - in PKCS8, X509, and SSL/TLS. The SSL/TLS implementation has been completely redone, with support for SSL3.0 (TLS 1.0 - 1.2).

Mike Taylor kicked off day 2 by reminding everyone here about the drawing for a Kindle Fire at 5 PM - and the odds of winning that are way better than the odds of winning at one of the slot machines downstairs :)

Seth Berman - who's relatively new to the VA team at Instantiations - built the new code completion facilities for the tool. I've done a screencast on that - and Set looked at various other implementations (VW, Pharo, non-Smalltalk tools) before calling his work done.

Lots of new stuff in 8.5.1 - when I did my screencast, it was in 8.5. Sounds like I need to go back and have another look. It sounds like you can configure the way this works a lot more than you could with the first release of it.

Here's the abstract:

Code Completion allows for developers to type less by predicting how to complete what is being typed and offering these predictions to the developer to select from. Code Completion was first introduced in VA Smalltalk 8.5, but development didn’t stop there. Many additional features have since been added and it has continued to improve in usability and configurability. This presentation will show Code Completion in action by providing a thorough demonstration of its capabilities in the browsers, debuggers and workspaces. Furthermore, an overview of its extensive set of configuration options will be given to show how one can create a completely customized experience.

There's more coming for this, too - tighter integration with the existing code assist features being the biggest. As with many of these talks, you'll want to see the video (when STIC releases it) for the demo.

Ok, this is cool. The CamelCase matching is really quite nice. If you type in RWS, it knows that you mean "match by camel case", and offers "ReadWriteStream". This is the kind of intelligent help that experienced Smalltalkers could make great use of, and it makes long descriptive names easier to use. Works for methods, too: #add:afterIndex: comes up if you type aai - each character after the : gets treated (for matching purposes) as if it were a capital in camel case.

Also:

x := OrderedCollection new.
y := x
z := y.

Doing code completion on z (or x or y) offers methods from OrderedCollection. There's a setting option to filter out all of the inherited from Object stuff too. In general, the completer uses static analysis/type reconstruction to help it decide what to offer.

Norm Green is explaining what's going on with Gemstone - 2.4.5.1 is the next (minor) release, with all of the big stuff happening in the 3.x version stream (which is where all future work is happening). It has a JIT, an FFI interface (obviating the need to hook in at a low C level). Martin McClure presented that at last year's ESUG. I'd provide a link, but I can't find it in the playlist.

Gemstone is now multi-threaded, and each thread (OS thread) uses a GS session. You get a fair bit of control over how aggressive you want that to be.

Smalltalk changes - arrays are constructed (runtime) with curly braces, in line with Pharo (and VW with extensions). ANSI exceptions now standard, old stuff deprecated.

There's a few metaclass level changes due to MagLev work - should be transparent. The upgrade should be easier than the last few, but Smalltalk code does need to be filed in (there are byte code changes).

Mark Grinnell and Andreas Hiltner (Cincom) are giving something of a continuation of the talk Arden gave yesterday - how to get a new web application up and running when what you have is a set of older legacy applications.

The legacy domain is medical data - and the baseline idea is that the legacy systems are from a bunch of different labs, and can't be updated/retired - they need to keep running as is. Any new system is additive, not a replacement. The goal is to create a web app that creates a unified view over the top of the disparate ones from the multiple labs (for instance: different IDs for patients in each system).

The next bit is demo - you'll really have to wait for the video to see that. The demo is using the same glorp mapping approach Arden talked about, just in front of a larger problem.

Last talk of the day - memory management in Cincom Smalltalk. There have been changes in this area over the last couple of releases, which is good - I learned a fair bit about the old stuff (caveat: having said that, I only ever scratched the surface), and the new stuff makes it a bit more accessible. Andres Valloud is giving the talk - he's starting with some basic background on memory management in CST (eden, survivor spaces, all of that stuff - I'll refer you to the docs for a broad discussion of that).

Today's Smalltalk 4 You delves deeper into log4s, looking at how to create a new logger in code (as opposed to in the ini file). If you have trouble viewing it here in the browser, you can also navigate directly to YouTube. To watch now, click on the image below:

We worked a lot with INRIA lawyers and tried a lot of different scenarios. We arrived to a setup that make sense now we would like to get your input. Please have a look at the following powerpoint presentation and feel free to comment!

First talk of the day: Georg Heeg is talking about doing new projects in Smalltalk.

Some of this has to to with improving CRM systems (intelligent guidance as opposed to classic UI design) - Heeg has been helping with product development on that. The main message of the talk is that Heeg's company is involved in new project development using Smalltalk.

James Foster is expaining CloudFoundry - a service VMWare is building out for public and private cloud services. Part of this presentation is an audience participation demo using CloudFoundry - I'd talk about that more, but we had issues getting the necessary parts installed on my Mac :) It looks cool, but it looks like the setup requires more than the handful of minutes I was able to devote to it.

The next bit you can follow along on the video once that's released - or contact James Foster, who I'm sure will be more than happy to talk you through it.

There are some interesting issues with getting Smalltalk into this kind of service - it's a monolithic image, as opposed to a small runtime that you muck with via small text files. Additionally, that image needs to run continuously, as opposed to running on demand only. Interestingly, the solution here looks a lot like what I do to run this blog (with the caveat that what I do is way less formalized).

Push new code to service

launch Smalltalk, load code, save image

launch saved image

Start HTTP Server on specified port

The result of all this some baseline support for a Gemstone service in the cloud - which is pretty cool.

ObjectStudio - Arden points out that the modeling and mapping tools are OS specific, but the outputs can be used in VW as well (the GLORP mappings). See this talk and this talk for more on that.

Tools for GLORP - use ObjectStudio, publish the results to Store, use in VW or OS. OS has better integration with the Runtime Pacakager tool as well. One of the main new things on the OS roadmap (other than continued DB modeling/mapping support) is 64 bit support.

The new work looks like it's moving the stuff listed above forward - but there's also some interesting UI work (Skins) that Travis will be talking about next. Once that's posted, scroll up :) Also on the radar - dllcc improvements, Windows 8 support (metro?), code completion, WebSockets, font improvements. Kind of the summary statement - a lot of the product changes are driven by customer feedback and needs.

Travis has mentioned the Skins (UI) work on his blog before - and today he's going to talk about it at STIC.

The VW widget set is an emulate done - the problem with moving it forward has to do with how fast UIs evolve in the host OS, and the limited manpower available to keep up with that. On the other hand, lots of legacy code relies on this stuff. Another issue - in the VW MVC model, the view and controller are really, really tightly coupled. The model tends to be more coupled than we'd like as well.

Over time, this got more complex with the addition of layout wrappers which again got more tightly coupled with the views than maybe they should have been. Then there are state wrappers (enablement) - and from there the wrapper party just grew like weed, and trackers just made things more complex. Then you add in all of the subclasses for views, controllers, and trackers....

Skinny goals:

Offload drawing to external resources

incremental on/off

grow in place replacement (not a big bang)

avoid a massive rewrite of platform interfaces

address some of the issues in the VW widget set

play the subclass card differently

Widgets will be simpler - manage own state, use models when they make sense. Layouts are being punted for now, the existing stuff is still in play, with some small mods. Controllers are out. State is being handled in a properties dictionary, and VisualPart already had that. Drawing - that's where things are offloaded to a strategy/policy pattern. The Skin api tend sto be a large, flat collection of methods, with a generic DNU handler for methods that follow the conventions.

The rest of the presentation is a demo - as with many of the other talks, you'll really need to wait for the video to see what happened here :) What he showed was a skinned Windows (XP in a Mac VM) and a skinned OS X Lion. Linux (GTK) is still being investigated, but using Cairo he got something pretty nice out (KDE Look) in a day.

This is in 7.9 builds, but not enabled. It can be turned on. There's still work to do on the more involved widgets, but it's taking shape. It is a a work in progress, but can be played with now.

Dave Buck is presenting some interesting work he's been doing - fluid positioning. We've talked about this some on the podcast, but it's a topic well worth exploring in more depth. There's also a video Dave put out last summer. The basic idea: allow widgets in a VW window to be laid out relative to each other, and seamlessly reposition themselves (in the GUI builder) as you move things around.

The baseline goal - make it all easy to work with in the UI. In casting about for other work on this subject, Dave needed something that worked the way he needed it to work - Aukland was something he had to push off. He's now on his second iteration of the work, because his first stab "almost" worked. Almost just wasn't good enough :)

At this point, you'll have to wait for the video to see the first iteration - it's a demo.

Issues? Undo doesn't work right with groups. Heck, undoing a group loses properties s-is :)

in algorithm two, he's not dealing with groups or oriented composites. Instead, he's modeling the layout explicitly. His new take on this looks much cleaner, and doesn't force groups on the UI (which lets the developer add them for their own purposes later). In this demo, it's clear that there's still work to do - widgets sometimes get oddd sizes based on his layout calculations.

Still work to do on save/restore, dealing with existing specs, and the one layout issue. One big lesson: tests help, but they aren't enough here - some it relies on the "mark one eyeball" :)

Last main talk of the conference - Dale Henrich's on using Git with Smalltalk. Caveats:

Git can be used well with Smalltalk

It's not practical to expect all dialects to switch wholesale off whatever they use now

It can be used to share code across dialects

What about the stock stuff, like ENVY, Store, and Monticello? High cost of porting the tools between dialects, and they tend to be tightly coupled with their "home" toolsets. The implementation as it exists now is called FileTree. The basic implementation is based on Monticello - but the disk structure does not rely on Monticello artifacts, and works in Pharo, Squeak (and thus GLASS).

The FileTree package structure is SCM neutral, so it could be used with any standard SCM toolset. What's a Package in this context? an object or algorithm that defines the contents of a Snapshot. A Snapshot is the state of a Package at a given point in time. In an image, a Snapshot is represented as a collection of class and method definitions. On disk, it's class and method chunks in a collection of .st files.

By saving packages this way, it leverages what Git can do from a "what changed over time" standpoint. Status? This comes from work that has been ongoing for a bit in the Pharo world, so it's actually being used "in the real world". Right now, it's suitable for anyone using Monticello. There's work to be done to accommodate this to all dialects (in terms of file format alone).

Dale says that Envy and Store were better options in the mid 90's, but Git/GitHub is better now. Right now, GST, Redline, and Amber are all using GitHub. Using Git is an upgrade from Monticello, but for Store/Envy it's more of a way to share code. It's an addition, not a replacement.

After a lot of short (5 minute) lightning talks, we've reached the end of STIC 2012. I'm told that the videos (which I've been referring to in this series of posts) will be posted soon - check the STIC website for details.

STIC 2013 has just been announced: June 2013 in Arizona. The dates aren't nailed down yet, but there it is! Want a discount on registration? Send Suzanne (you know her email address if you're a Smalltalker) an email with "STIC 2013" in the subject line. The call for research papers for next year is also out already - check stic.st for details.