. .

smalltalk

Kinect and EToys

January 20, 2011 12:30:03.000

The folks at GIRA have hooked up Kinect and EToys - follow the link for some video and explanation on how to get started.

Technorati Tags: , ,

 Share Tweet This

smalltalk

Builds and Project Oddities

January 20, 2011 11:34:48.793

You find a lot of quirks when you try to automate your Smalltalk builds. Some of them are related to your project, and others are in the system itself. With the way VisualWorks is built now, it's easy (in theory) to unload packages you don't need at runtime. For instance, here's the code I use to pull the entire Debugger bundle:

[(Store.Registry pundleNamed: 'Tools-Debugger') ifNotNil: [:pundle |
      pundle leafItems do: [:each | each markNotModified].
      [pundle markNotModified; unloadFromImage] on: Warning do: [:ex | ex resume: true]].

Seems easy enough, right? Do the same for the rest of the tools, including the UIPainter, and you get a smaller runtime where you know exactly what got pulled out and why (as opposed to the somewhat arcane process that the RTP uses). This is where I ran into some problems though - in package Debugger-UI, there's a postUnloadBlock:

[
        Notifier beDevelopment]

I think that's an artifact from when VW had its own debugger, and the PDP was an add on - unload it, and it restored the base behavior. Now, when you try to unload the debugger, that fires and immediately blows up. It seems like something that could be easily fixed; I tossed this code into my build script:

(Store.Registry pundleNamed: 'DebuggerUI') properties at: #postUnloadBlock put: [:pkg | ].

That worked, but the Debugger-UI Parcel still had that block. So I tried this:

(Parcel parcelNamed: 'Debugger-UI') properties at: #postUnloadBlock put: [:pcl | ].

And... no effect. I scratched my head over that one for a bit, then finally decided it was easier to just dynamically recompile the offending method (Notifier>>beDevelopment) than it was to keep pounding sand. That's a problem with the base system (VW 7.6). Then there are issues at the project level.

As part of the system here, there are two overrides to classes in UIPainter. Ideally, they would be in a development package instead of the master bundle, but right now, that's not my call. I'd still like to be able to unload UIPainter, so how do I get there? Simple - yank the overrides in the script, then remove the painter. I had to debug my way through the browser doing an override removal to find this code:

overrides := (Store.Registry pundleNamed: 'UIPainter') overrides select: [:each | each class = OverridenClass].
overrides do: [:each | each reinstall.
			Override removeOverride: each].

That restores the base behavior, removing the overrides from the master bundle (which are only needed during development) - and thus allowing UIPainter to be cleanly removed. That was almost all the interesting issues, but I ran across one more.

Yesterday, I did a test build with a colleague. The runtime looked good, but it threw an MNU - something that surprised me - the whole point of avoiding the RTP was to get more predictability, right? Well, it turns out that the RTP scan can cause you grief, but it's also smart enough to spot things you might miss. In this case, I missed this: we use HotDraw, which happens to live in the Refactory namespace. Where is that namespace defined? In the RB bundle. What's one of the things I'm removing? The RB. The fix is pretty simple here. Instead of yanking the entire RB bundle, I just yank all of the packages in the bundle except for the one that defines the needed namespace.

At least so far as I know now, that looks like all the issues - my little build tool produces a runtime, and it doesn't look like anything we need is missing. I'd be curious to know what similar issues other people have run into though - the ones I detailed above weren't always easy to spot, and who knows - I may well be missing something else :)

 Share Tweet This

smalltalk

Smalltalk on Rubinius

January 20, 2011 11:27:21.000

Looks like a work in progress - Smalltalk on Rubinius.

Technorati Tags: ,

 Share Tweet This

smalltalk

Test Coverage in Pharo

January 20, 2011 9:58:09.000

There's a new test coverage tool for Pharo - Hapao:

Hapao is an innovative test coverage tool, implemented in the Pharo Smalltalk programming language. It employs an effective and intuitive graphical representa- tion to visually assess the quality of the coverage.

Follow the link for downloads, screenshots, and documentation.

 Share Tweet This

js4u

JS 4U 25: Booleans

January 20, 2011 6:41:19.708

Javascript 4 U

Today's Javascript 4 You. Today we take a look at the Boolean class in Javascript. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

Booleans

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:

Technorati Tags: ,

Enclosures:
[js4u25-iPhone.m4v ( Size: 3368848 )]

 Share Tweet This

smalltalk

Cincom Public Store Repository?

January 19, 2011 23:46:51.915

I guess things aren't back to normal at cincomsmalltalk.com yet - the public store repository is offline this evening.

 Share Tweet This

smalltalk

Cincom Smalltalk Offline?

January 19, 2011 11:34:59.192

Looks like the Cincom Smalltalk website is down this morning. If you're on the VWNC mailing list, people have been posting about it there.

Update: - it came back while I was at lunch

 Share Tweet This

st4u

ST 4U 36: The Pharo Debugger

January 19, 2011 6:42:29.937

Today's Smalltalk 4 You takes a look at the Pharo debugger, using it to diagnose and fix a small bug. 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:

Debugger

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:

Technorati Tags: , ,

Enclosures:
[st4u36-iPhone.m4v ( Size: 6359492 )]

 Share Tweet This

games

Playing Another Way

January 18, 2011 16:00:00.000

I've been doing (yet another) playthrough of "Fallout: New Vegas", which was inspired by my first (basically failed) crack at the "Dead Money" DLC. I went in with a level 30 character, but I had the wrong skills for the DLC:

  • Low Sneak (not upped at all)
  • Low Unarmed (not upped at all)
  • Low Melee (not upped at all)
  • Low Survival (not upped at all)

I was able to get through the Villas with difficulty - my character had high science, speech, guns, and lockpick - none of which were terribly useful out there. There are virtually no guns or energy weapons (the HoloRifle has very little ammo available), so you really, really need to go with unarmed or melee. So.... I started over.

That's been something of a revelation for me. So many encounters have been so much easier with high sneak - even with mediocre weapon skills, I can get close enough to line up and kill without ever using VATS. I expect that I'll get through the DLC much better this time (although I'll have to wait for the PC edition or get my work schedule to support some remote work - no XBox in the hotel). Even with that, it's been a lot of fun to play this way - it's almost like a new game.

 Share Tweet This

smalltalk

Pharo in Grenoble

January 18, 2011 12:53:53.000

There's a code retreat (not entirely certain what that is - something like a BarCamp, sounds like, but my French is spotty) in Grenoble, January 21.

 Share Tweet This

js4u

JS 4U 24: The Array Object

January 18, 2011 6:45:43.384

Javascript 4 U

Today's Javascript 4 You. Today we take a look at the Array class in Javascript. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

More on Strings

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:

Technorati Tags: ,

Enclosures:
[js4u24-iPhone.m4v ( Size: 2644611 )]

 Share Tweet This

smalltalk

Smalltalk Solutions Agenda

January 17, 2011 18:31:30.525

The schedule of talks and events at Smalltalk Solutions 2011 has been posted. Haven't registered yet? Why not do that now?

Technorati Tags: ,

 Share Tweet This

st4u

ST 4U 35: Doing a Build in VisualWorks

January 17, 2011 8:29:18.282

Today's Smalltalk 4 You takes a look at doing runtime builds in VisualWorks. 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:

Builds

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:

Technorati Tags: , , ,

Enclosures:
[st4u35-iPhone.m4v ( Size: 8904545 )]

 Share Tweet This

travel

PlaneFi

January 16, 2011 22:38:03.966

Well, it's better than no connectivity, but not by much: this is what I get at 30,000 feet:

Technorati Tags:

 Share Tweet This

podcastAAC

Independent Misinterpretations 13: The Future of Instantiations (AAC)

January 16, 2011 12:58:34.276

Welcome to episode 13 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson, Michael Lucas-Smith, and David Buck. This week David Buck and I interview Mike Taylor, President and CEO of Instantiations about the future directions for Instantiations. It was mostly a high level talk - if you want more of a tech focused look at Instantiations, go back to our two part interview with John O'Keefe - part 1 here, part 2 here.

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.

If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!

If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!

Enclosures:
[im13.m4a ( Size: 22,207,611 )]

 Share Tweet This

podcast

Independent Misinterpretations 13: The Future of Instantiations

January 16, 2011 12:58:19.626

Welcome to episode 13 of Independent Misinterpretations - a Smalltalk and dynamic language oriented podcast with James Robertson, Michael Lucas-Smith, and David Buck. This week David Buck and I interview Mike Taylor, President and CEO of Instantiations about the future directions for Instantiations. It was mostly a high level talk - if you want more of a tech focused look at Instantiations, go back to our two part interview with John O'Keefe - part 1 here, part 2 here.

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.

If you like the music we use, please visit Josh Woodward's site. We use the song Troublemaker for our intro/outro music. I'm sure he'd appreciate your support!

If you have feedback, send it to jarober@gmail.com - or visit us on Facebook - you can subscribe in iTunes using this iTunes enabled feed.. If you enjoy the podcast, pass the word - we would love to have more people hear about Smalltalk!

Enclosures:
[im13.mp3 ( Size: 15954323 )]

 Share Tweet This

news

Specialized Ambulances

January 15, 2011 18:28:37.238

This is kind of amazing - Boston has retrofitted an ambulance for the extremely obese:

The ambulance is equipped with a special stretcher that can hold 850 pounds and a hydraulic lift with a 1,000 pound capacity

The part that made me do a double take though - a spokesman was quoted on the need:

The ambulance is likely to be needed two to four times a week, he said.
 Share Tweet This

smalltalk

Cuis 3.0 is Out

January 15, 2011 8:28:25.328

Spotted in Planet Squeak

Juan Vuletich has just announced the release of version 3.0 of Cuis.

Technorati Tags: ,

 Share Tweet This

Macintosh

Upgrade

January 14, 2011 23:25:05.045

My MacBook Pro is happier:

Now to see if my Windows VM is happier with 4 GB of memory....

 Share Tweet This

smalltalk

More Predictable than RTP

January 14, 2011 9:47:24.364

I've been building BottomFeeder without RTP for awhile now, but until I started looking at build automation for this new job, I hadn't fully automated it. That's something I've done now, and one thing that I really like about the process I use is the predictability.

With RTP, if you let it scan and strip, you're never really sure what it took out. Oh, sure, there's a report it generates, and you can go through that - but it's not easy to digest. Instead, I have a script that pulls out a set of named packages - this is one of the advantages to the newer releases of VW, btw - having defined blobs of code that have structure not only makes loading easier, it makes unloading easier. Here's what I have my script do:

"Unload the debugger and other tools"
(Store.Registry pundleNamed: 'Tools-Debugger')  ifNotNil: [:pundle |
	pundle leafItems do: [:each | each markNotModified].
	[pundle markNotModified; unloadFromImage] on: Warning do: [:ex | ex
	resume: true]].
(Store.Registry pundleNamed: 'Tools-Refactoring Browser')  ifNotNil: [:pundle |
	pundle leafItems do: [:each | each markNotModified].
	[pundle markNotModified; unloadFromImage] on: Warning do: [:ex | ex
	resume: true]].
(Store.Registry pundleNamed: 'Tools-Parcel Manager')  ifNotNil: [:pundle |
	pundle leafItems do: [:each | each markNotModified].
	[pundle markNotModified; unloadFromImage] on: Warning do: [:ex | ex
	resume: true]].
(Store.Registry pundleNamed: 'Tools-Changes')  ifNotNil: [:pundle |
	pundle leafItems do: [:each | each markNotModified].
	[pundle markNotModified; unloadFromImage] on: Warning do: [:ex | ex
	resume: true]].
(Store.Registry pundleNamed: 'Tools-File Browser')  ifNotNil: [:pundle |
	pundle leafItems do: [:each | each markNotModified].
	[pundle markNotModified; unloadFromImage] on: Warning do: [:ex | ex
	resume: true]].
(Store.Registry pundleNamed: 'UIPainter')  ifNotNil: [:pundle |
	pundle leafItems do: [:each | each markNotModified].
	[pundle markNotModified; unloadFromImage] on: Warning do: [:ex | ex
	resume: true]].
(Store.Registry pundleNamed: 'StoreForPostgreSQL')  ifNotNil: [:pundle |
	pundle leafItems do: [:each | each markNotModified].
	[pundle markNotModified; unloadFromImage] on: Warning do: [:ex | ex
	resume: true]].

The handler block allows the script to proceed if anything odd happens; I should probably be logging those events. The larger point is this: I know exactly what got pulled, and, more importantly - what didn't. Unless you're really careful (and you have to be careful every time code has changed), RTP will strip code from your application. That's usually safe, but if you use constructed message sends for any reason (good or bad), you can get smacked. I think this approach is vastly safer.

I've posted before on how I put the image into a runtime state, but it's worth going over again:

  • Have a subclass of UserApplication. Specify your prereq subsystems, and implement #main. In that method, start your application. It'll get called when it's safe to do so at startup, based on the prereqs you specified
  • Execute the following code after you do whatever other image prep is necessary:

"set up logging and exception handling"
DeploymentOptionsSystem current startInRuntime: true.
Notifier current: RuntimePackager.RuntimeEmergencyNotifier.
RuntimePackager.RuntimeManager errorLogPath: 'error.log'.
Notifier logToFile: true.
"set up runtime state"
UI.WindowManager noWindowBlock: [:windowManager | ].
stream := WriteStream on: String new.
stream nextPutAll: 'changeRequest'; cr; cr; tab.
stream nextPutAll: '^true'.
VisualLauncher compile: stream contents.
VisualLauncher allInstances do: [:each | each closeAndUnschedule.  each release].
ObjectMemory garbageCollect.
Workbook allInstances do: [:each | each closeRequest].
(Delay forSeconds: 20) wait.
Parcel searchPathModel value: (List with: (PortableFilename named: '.')).
SourceFileManager default discardSources.

"Now save the image such that this file doesn't get looked for at startup"
[ObjectMemory permSaveAs: runtime' thenQuit: false] fork.
[(Delay forSeconds: 25) wait.
RuntimeSystem isRuntime ifFalse: [ObjectMemory quit]] fork.

I actually use some of the RTP infrastructure (the runtime exception handler and logging) - I just don't use it to create the image. It's a pretty simple process, and once you have the script created, it's easy to have a "one button click" UI drive it - from another image

 Share Tweet This

st4u

ST 4U 34: Monticello Overview

January 14, 2011 6:32:16.567

Today's Smalltalk 4 You takes a brief overview tour of Monticello in the Pharo environment. 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:

Monticello Overview

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:

Technorati Tags: , , ,

Enclosures:
[st4u34-iPhone.m4v ( Size: 22870264 )]

 Share Tweet This

smalltalk

Getting the Comments for a Store Publish

January 13, 2011 14:33:17.471

You would think that getting the version comment for a package or bundle you've published to Store would be simple - there's a method called #versionComment right there in Pundle - but you would be mistaken. No, that's not the comment you type into the text field when you publish.

Why do I care? Well, as part of my build automation work, I'm generating a small report, and part of that report involves pulling out the comment for a published package. That takes more work to get at than you might think:

 

pkg := (Store.Package withName: 'PkgNameHere' version: 'versionStringHere') first.
blessing := (Blessing 
				blessingsForRecordID: pkg  primaryKey
				type: pkg  typeStringForBlessing) first.
comment := blessing getCommentString.

 

Just tracing Store code to figure that out was painful; the comparison tool Version Browser doesn't make it obvious. Then there's the whole head scratching nature of "why isn't there a method that does this for me in Pundle?" Anyway, that does the job I wanted, and now I have that bit of my reporting task handled.

 Share Tweet This

education

Advanced Smalltalk Research

January 13, 2011 7:26:09.024

INRIA is holding a seminar on advanced Smalltalk topics, March 7 - 11 in Lille:

The objective of this school is to present on advanced Smalltalk topics such as compiler compiler, virtual machine, interaction with C, advanced UI

You can register here.

Technorati Tags:

 Share Tweet This

js4u

JS 4U 23: The Date Object

January 13, 2011 7:09:19.564

Javascript 4 U

Today's Javascript 4 You. Today we look at the Date class in Javascript. If you have trouble viewing it here in the browser, you can also navigate directly to YouTube.

Join the Facebook Group to discuss the tutorials. You can view the archives here.

To watch now, click on the image below:

More on Strings

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:

Technorati Tags: ,

Enclosures:
[js4u23-iPhone.m4v ( Size: 3402747 )]

 Share Tweet This