. .

smalltalk

Smalltalk on the JVM

April 13, 2011 20:45:12.281

I've seen a lot of efforts in this direction over the years, most recently the RedLine guys. This one sounds like it's got a real project to push onto the JVM though, so maybe there's a bit more of an immediate motivation.

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

smalltalk

Smalltalk in Seattle

April 13, 2011 20:40:26.131

There's a Smalltalk user's group in Seattle again. No meetings scheduled yet - so if you're in Seattle and using Smalltalk, why not help out with that?

posted by James Robertson

 Share Tweet This

smalltalk

Some StS Video Is Up

April 12, 2011 21:54:30.046

Some of the video from Smalltalk Solutions 2011 is up - if you go to the relevant STIC page, there's a list of links. Some of them lead to video, and some of them lead only to the slide decks (although those all say that the video will be forthcoming). You have to click through on each link to tell whether there's video or not; it would be nice if that info were on the index page. The good news is, the video is all hosted on Vimeo, so it'll work on any mobile device you use, not just flash enabled ones.

Technorati Tags:

posted by James Robertson

 Share Tweet This

smalltalk

Where is that Method Defined?

April 12, 2011 11:11:12.149

Sometimes you look at a method's declared location and wonder. Take this method in class Text (VisualWorks), for example:

 

allItalic
	"Set the emphasis for all characters in the receiver to be italic."

	self emphasizeAllWith: #italic

 

Looks like a generic method that should be part of the core aspect of class Text, right? Well, it's not - it's located in package Debugger-Support. This cropped up on us this week, due to the way we do builds now. Instead of RTP stripping, our tool just yanks packages - including Debugger-Support. Whoops. The solution I came up with was to clone the method with a new name in one of our own packages, and change the references in our code (thankfully, only one) to use the new method. This looks like something Cincom should clean up though...

posted by James Robertson

 Share Tweet This

smalltalk

Test Reporting with SUnitToo

April 11, 2011 14:40:57.589

 

What I wanted was a simple configuration object - it would hold a collection of TestCase class names, in a specific order. Those classes have a class method, #order which specifies the order for the tests in the class. If the method is absent, then I just query the class for all test methods and use the order that comes back. Actually running tests is pretty easy, and there's a nice class - Results - already there to gather results for you:

 

tests do: [:eachTest |
		| tc |
		tc := aTestCaseClass selector: eachTest.
		self orderRun add: eachTest.
		tc run]

 

To get the results saved, all you do is something like this:

 

Results collectWhile: [self runTestsInOrder].

 

You end up with a nice set of passed, failed, and errored out tests, which you can then easily report on. I created a simple little reporter object that dropped out three html tables, each wrapped in a named div (so that someone with some CSS awareness could do something useful with the results). It all came together pretty quickly. Next up: creating a simple UI to create the test configurations.

posted by James Robertson

 Share Tweet This

smalltalk

Why Smalltalk

April 9, 2011 8:05:08.746

Andy Berry explains why he has used - and continues to use - Smalltalk as his software development platform of choice.

posted by James Robertson

 Share Tweet This

smalltalk

Updating Packages in a Bundle

April 7, 2011 11:48:12.888

The development process where I work treats bundles as configurations - manifests for all the proper (for that trunk/branch of development) that will go into a release. Given that, individual developers generally don't publish a bundle. A build is created, and part of that process spits out an associated development image. From there, the developer works (and publishes) the package(s) he or she is responsible for.

So... one of the things I got tired of was "let's see what packages have been updated inside the bundle" - so I added a method like this to the browser:


updatePackagesInBundle
	"add menu item to RB"

	<menuItem: 'Update Packages in Bundle...'
		icon: nil
		nameKey: #mesPackagesUpdate
		enablement: #isBundleSelected
		indication: nil
		menu: #(#pundleMenu)
		position: 200.1>

	| pundle stream version match |
	(self pundles size > 1 or: [Store.DbRegistry isConnected not])
		ifTrue: [^Dialog warn: 'Select one bundle and/or establish a Store Connection'].
	pundle := self pundles first.
	stream := pundle versionString readStream.
	stream skip: 1.
	version := stream upTo: $,.
	match := version size 

I have a class that handles the actual updating, BundleDef. The relevant code there looks like this:


getRecordsAndUpdatePackages
	self getMatchingRecord.
	self allContainedPackagesAndBundles.
	self updateAllPackages.

That gets any newer published package in the same branch (based on the version string passed in), and then iteratively updates each package (including those in contained bundles). The work is in the last two methods above:


allContainedPackagesAndBundles
	"get the full collection of contained packages and bundles"

	self allContainedPackagesAndBundlesFor: pundle.
	containedBundles add: pundle.

allContainedPackagesAndBundlesFor: aBundle
	"answer a collection of all the packages I have, regardless of bundles in the middle"

	| items  |
	items := aBundle containedItems.
	items do: [:each |
		each isBundle
			ifTrue: [self allContainedPackagesAndBundlesFor: each.
					containedBundles add: each]
			ifFalse: [containedPackages add: each]].

And finally, the check and update:


updateAllPackages
	"iterate over the packages and update them"

	containedPackages do: [:each |
		| all newerMatch |
		all := Store.Package allVersionsWithName: each name newerThan: each.
		newerMatch := all detect: [:each1 | versionFragment match: each1 version] ifNone: [nil].
		newerMatch 
			ifNotNil: [Transcript show: 'Updating: ', each name; cr.
						newerMatch loadSrc]].

I just verified that this works in the upcoming 7.8 release of VW; it probably does use the (soon to be deprecated) Store objects though. I'll have to investigate that soon

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This

smalltalk

The Place for Smalltalk

April 6, 2011 14:30:04.000

A new Smalltalk hosting environment (code repository) is in the process of bootstrapping:

We've been working on a new code repository & project management application for Smalltalk with ESUG named SmalltalkHub. If everything goes fine, the app should be in public beta in a week. The source code of SmalltalkHub will be available at the same moment (the project itself is hosted by SmalltalkHub).

Nicholas Petton has posted a screen shot of the work in progress.

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This

smalltalk

Pharo 1.2.1 is Out

April 6, 2011 8:31:52.968

Pharo 1.2.1 has shipped:

The Pharo Project is proud to announce the release of Pharo 1.2.1, the third major release of this clean, innovative, open-source Smalltalk environment.

Follow the link for more details and download info.

Technorati Tags:

posted by James Robertson

 Share Tweet This

smalltalk

More Pharo Doc

April 6, 2011 6:17:02.820

Looks like using Metacello in Pharo just got easier - there's been a doc refresh:

here is a new version of the metacello chapter. So we wrote it, rewrote it, rerewrote it. Now if this is of interest for you you can read it

Technorati Tags: ,

posted by James Robertson

 Share Tweet This

Previous Next (1107 total)