Home Steve Waring's Neglected Smalltalk Journal

change D6 Goodies

Ted Bracht has kindly ported the LinkButton and DropContainer packages to Dolphin 6. The download is here. Thanks Ted!

23rd Feb 2006

change Dolphinharbor

Earlier this week I received an email from Jerry telling me that after 240 days up, he had applied a MS security patch to the dolphinharbor.org machine, rebooted and got a BSOD on startup.

After further investigation it seems the hard drive is dead :(

Jerry is trying to locate some new hardware at the moment, but it will be a while before the dolphinharbor server is back online. (BTW: If anyone has any old hardware they want to donate to the dolphinharbor cause, please get in contact with either myself or Jerry Bell).

Link 8:38:08 PM, Sunday, 10 August 2003 Email

change ASP

I moved houses two weeks ago and I am at the end of my beta program, so I am hoping to get more time for this blog over the next couple of months. While I cant say the last couple of months have been interesting, I have learnt how much work is involved in taking a working "engine" into a finished product. Doing the documentation, UI, websites, e-comm, support systems, protection etc etc has taken me at least twice as long as I estimated ... and that estimate had already been doubled.

My bit intake has been well down ... I have not read any blogs or many newsgroups for months. I did join the Association of Shareware Professionals and I have been reading their private newsgroups. These newsgroups have been a valuable source of information for me, the discussions are high quality, and have helped greatly in setting up the marketing/e-comm side of my program. Well worth the $100 joining fee.

Link 7:24:09 AM, Thursday, 24 July 2003 Email

change Update

It has been a while since my last entry ... I have been spending my weekends renovating my office, which has not left me much time or energy for blogging.

I do have a couple of bug-fixes I need to post; a fix to SWLinkButton's calculateExtent which allows it to be used in a flowLayout manager, and some fixes to SWDropContainerLayout which reduce the amount of re-painting that is required when resized.

I wont be able to upload these fixes for a couple of weeks, but if you need them, email me

Link 3:13:30 PM, Monday, 17 March 2003 Email

change Dolphin PL2

The second patch level was released for Dolphin 5 last week.

Yesterday I updated my fresh images, and moved my main project over to a PL2 image.

Everything went smoothly, but I know from experience there will be times over the next couple of weeks where I will come across something strange and wonder if the patch changes introduced it.

In the Dolphin 5 Environment article I mention a script that I file in, that replaces the base CompilationResult>>fireSystemUpdateEvent method with a method that not only informs the system that a new method has been complied, but also informs me by logging a trace to the Transcript.

I rarely use this, but it is handy when needed. The problem with PL2 is that as part of the patching process, it rebuilds the Transcript window and therefore resets my log. So I modified the method to log to a fileStream:

CompilationResult >>fireSystemUpdateEvent

self isNew ifFalse:
[| fileStream |
fileStream := FileStream write: 'PL2 Update.log' mode: #append.
[
fileStream
display: '====='; cr;
display: oldMethod; cr; cr;
display: oldMethod getSource; cr]
ensure: [fileStream close]].
self method methodClass environment
trigger: (self isNew
ifTrue: [#methodAdded:]
ifFalse: [#methodUpdated:])
with: self

If you dont want to make this change to your image, I have uploaded the log file that was written when I updated a PL1 image.

The file will be a handy reference, it will allow me to quickly check if a method was replaced, and what the original source of that method was.

After I had done this, I realized that a more useful approach would be to make changes so that before a method is updated, the original is firstly recompiled. This would place the orginal method in the change log, and as a result, I could use a tool like Ian Bartholomew's Chunk Browser to "flip" between the old and updated methods. I didnt bother to do this, the log file will be good enough ... maybe next time.

Link 1:32:37 PM, Monday, 17 February 2003 Email

change Catching up on news

BottomFeeder

I have been catching up on news this morning. I didnt read any news this week ... time to download the new BottomFeeder version and see what has been happening. The 2.7 version looks great, I can see I have some new goodies and features to explore. Thanks to James Robertson, Dave Murphy and Rich Demers! (have I missed anybody?)

Smalltalk vs Lisp

Interesting discussion on the perception of Smalltalk and Lisp by Ted Leung James Robertson and Chris Double

Webservices

James Robertson writes in Call me Cynical

...
The good part for Smalltalk is that Web Services are (relatively) 
easy to support. VW, VA, and Dolphin all have support, so the level
of "buzzword compliance" is high. Is it more than buzzwords
though? So far, no. 
...

I enjoyed implementing a couple of those buzzwords for Dolphin, but it got to the point where I could see that the buzzword factory was not going to slow down and I was in danger of getting buried by buzzwords. In addition, battle lines were being drawn by the big companies, and I was also in danger of being shot in the middle by the wrong buzzword :).

On a more serious note, for anything more than a trivial application, I dont think the benefit of being able to change a local messageSend to a SOAP networked request/response will result in reliable networked applications. The problems that e-lang addresses can not be swept under the carpet. For the Spray Client for Microsoft's TerraServer I borrowed some ideas from the documentation on E and implemented a message pattern so that the application layer could asynchronously place requests in a message queue and receive the responses via Dolphin's event system.

This worked nicely, but I felt that it was starting to get complex, and that I really needed a message pattern like e's promises.

I look forward to seeing what comes of Squeak-E!

Link 11:55:28 AM, Saturday, 15 February 2003 Email

change HTTPClient update

I found a bug in HTTPClient11 this week. The HostCache singleton can return stale DNS entries if you save it into an image and restart windows. My fix is to register for the #sessionStarted event and clear the Current singleton.

I will release an update with this fix in a couple of weeks. I know a couple of guys who are using the package, and I want to wait and integrate any feedback or fixes from them.

I also need to do some work to add the ability to log just the headers that are sent and received. At the moment you can log everything that is sent/received over the HTTPClient's sockets, or log the progress events, or ask for the #headerReportString. The problem with the last method is that if multiple requests are sent, the reportString can only access the last.

Link 9:19:03 AM, Saturday, 15 February 2003 Email

change The Dolphin Smalltalk Companion

In comp.lang.smalltalk.dolphin Ted Bracht wrote:

You can get Dolphin4VE reasonably cheap by buying 
The Dolphin Smalltalk Companion - the book with 
D4VE is around US$40, whereas the original price
from Object Arts was around US$70, so you get a 
discount of $30 and the book for free!

See www.tedbracht.co.uk

Nice deal!

Link 9:03:00 AM, Saturday, 15 February 2003 Email

change Camp Smalltalk

Camp Smalltalk 6 is happening in Germany, June, 22-28, hosted by Exept Software.

I went to Camp Smalltalk 4 in Colorado Springs, and while I wish I could go to CS6, it isnt practical for me to do an overseas trip this year.

What is Camp Smalltalk?

My brother-in-law had the same question for me when I first told him I was going.

  • BIL: You are doing what?? ... Colorado in the middle of summer?
  • ME: Yep (Having been a ski-bum in a previous life, spending 4 winters living in the Canadian Rockies, I couldnt believe it myself)
  • BIL: So if you are not skiing, what do you do?
  • ME: Well it looks like about 40 people are going, and I guess we will split into groups and work on Smalltalk programs.
  • BIL: What?
  • ME: No, not that kind of small talk. Smalltalk, it is a programming language.
  • BIL: Who would go to that?
  • ME: Looking at the list of attendees, it is like a who's who of the Smalltalk world.
  • BIL: So how did you get a start?
  • BIL: That is the nice thing; "Who's he"s are also welcomed :)
  • BIL: Is this normal?

... well, I still dont think it is normal for 40 people to give up their free time, travel across the country/world and sit in a room for 12 hours a day for a week, but I think it shows how dedicated Smalltalkers are, and that Smalltalk is fun.

I had read about previous Camp Smalltalks by way of John McIntosh's trip reports.

Jerry Bell and I had been talking about going to one, and when CS4 came up, we decided to go.

By the last day, I was almost full acclimatized and I was wishing that it would go on for another week. For me, it was a 22hr trip from my front door to the front door of the Denver hotel. I had underestimated the temperature by about 10degrees. It was far hotter and the air drier than I expected (if only there was a "f2c" webservice I could have used:)

The Glen Eyrie resort is a beautiful place and the people were very friendly. I was concerned when I first checked in to my room; I was expecting the standard TV, coffee maker, mini-bar etc, but all I found was a couple of religious books. I soon forgot about that (... well, after finding a coffee machine), but I do wonder what the other guests made of us all huddled around computers for the week. I am sure that is not a typical activity for the resort.

The first person I met was Jerry. I went outside for an early morning (legal, but non-smalltalk) drug-fix, trying hard to believe it was actually the morning. "Hi ... you here for Camp Smalltalk?", "Yep", "I'm Steve Waring" ... and "I'm Jerry Bell". We then proceeded into a conversation like 1 of the 1000's of email rambles we had exchanged in the past :)

The atmosphere was great throughout the week. We all worked in a large room, and there was a constant buzz.

Camp Smalltalk 4

I had only met one other Smalltalker before, and that was a week before I left for the Camp. I had never been in a room full of programmers before, nor attended any computer conferences. The whole experience was very new. At the start, I felt very over-awed ... over there, was a guy who had co-authored a book that is considered a classic in the software development field, over there, the guys who wrote the Refactoring borwser, in that corner was the guy who wrote the first Smalltalk book I had read, ... the VM hacker ... the vendor guys. I could go on, but I would need more room on this server, the bottom-line is that I felt like I was in a room full of the "Smalltalk gods" :)

I came away from Camp Smalltalk feeling positive about Smalltalk's future. Cincom had a large contingent of its Visualworks development team at Camp Smalltalk, and their commitment and passion for Smalltalk was obvious. Smalltalk is well and truly alive!

I felt welcomed, and it was great to soak up the collective wisdom of all these people for the week. I got to work with some great people from the IBM and Visualworks development teams; it really was an amazing opportunity and experience.

As I mentioned at the start, I cant make CS6, but I am hoping to go to CS8/9 or 10!

Link 10:00:50 AM, Sunday, 9 February 2003 Email

change Icons

Found some great looking icons released under a BSD license.

They are in all sizes, ranging from 16*16 to 96*96. They are in they png format, which I have found easiest to convert to both WinXP and Win2k icons.

A big thank you to Vadim Plessky, for the BlueSphere icons and for releasing them under the BSD license.

The KDE-Look website lists some nice icon sets. Many are released under the GPL license, unfortunately due to the viral nature of this license, I cant touch them.

There are a couple of sets, for example The Aqua Fusion set, that are released under the Design Science License. My reading of this license is that it is not viral, but I have trouble understanding legalese, so I could easily be wrong.

I also came across a couple of LGPLed sets, for example The IcOsX Theme. I am not sure what the LGPL license means in the context of icons ... actually, after reading discussions of the LGPL on the Squeak mailing list, I realized that I dont understand what the LGPL license means in most contexts.

Link 6:23:13 PM, Tuesday, 4 February 2003 Email

change Ian Bartholomew - linktestdemo

In comp.language.smalltalk.dolphin, Ian Bartholomew posted:

http://idb.me.uk/linktestdemo.zip

This adds URL links to the existing RichTextEdit class and provides a shell to test that it works. Install the package, ignoring the warning about overwriting methods, and evaluate

Thanks (once again!) Ian.

If you are new to Dolphin Smalltalk you should definitely check out Ian's webpages.

The first thing I do when I open a new image is to run a script which installs Ian's ChunkBrowser and Profiler. I also make regular use of his NewsBrowser and DeviceIndependentBitmap.

IMO, a great way to get to know a Smalltalk environment like Dolphin, is to download all Ian's goodies, install them all into the same image and then play around with the Development tools, the Object-Arts samples and Ian's goodies.

Keep in mind that everything you are seeing and using, (including the development tools), is implemented in the image, and can be copied/studied or modified.

Identify a goodie/sample or tool that you want to understand.

I recommend approaching it from three aspects;

1/ Source code: Have a look at the source code in a ClassHierarchyBrowser. If I want to "skim" through new code, I will take each method and "browse the definitions" of that method. If the method has many definitions (ie is implemented in multiple classes), I can quickly get a feel of what is common and different across the definitions. If my class has the only definition of the method, I will "browse the senders" of it.

2/ Objects: Have a look at the objects using an inspector. For example if you are studying the "Video Library" sample, you can use the "Visual Object Finder" to open inspectors on the objects that make the "Video Library Shell" work. It is simply a matter of clicking on the "Visual Object Finder" tool button, and then clicking in the "Video Library Shell". Once you have an inspector up, poke around.

3/ Messages: Add a "self halt" to the code (commands are a good place to start). If this is hit, a debugger will open, and you can step, messageSend by messageSend, and see how the command or code works. (Note: This can have adverse effects, and it is very possible to crash an image with a "self halt", however the Dolphin environment is surprisingly resilient).

Before you do any of this, save your image! I have learnt most about the environment when it doesnt matter if the image crashes or not, and therefore, I feel comfortable taking off the cotton-wool gloves.

If you are new to a Smalltalk environment, it may be natural to want to spend more time on the first aspect ... trying to understand the code. IMO, the quicker you can move to the second and third aspects, the better the chance you will get a taste of the "aliveness" of a Smalltalk image ... and this is what can be very addictive about Smalltalk.

The source code is static, but looking at (and changing) objects in an inspector, and watching the objects interact with each other in a debugger is dynamic and fun. I should point out that nothing will stop you from shooting yourself in the foot ... if you have an inspector open on an object, you can modify that object however you like, for example you could change a view's parent to an integer.

Far from worrying about doing something "wrong", I would encourage you to; if your image is saved, just exit and restart the image, and you have your foot back :)

Link 5:56:22 PM, Tuesday, 4 February 2003 Email

change Themes

On the weekend I picked up a WinXP computer that I have organized to borrow for the coming month while the owner is on holidays.

I know plenty of people who enjoy buying and configuring new hardware, but I dont. I have been finding excuses to put off buying an XP machine for about 12 months now, but I get the feeling after this month, I am going to need one.

The machine feels cramped. I am used to dual 1024*768 monitors and a split natural keyboard. I could get used to a normal keyboard, but not a single screen.

Themes

Time to start experimenting with themes and visual styles.

I installed StyleXP and StyleBuilder by http://www.tgtsoft.com.

StyleBuilder is interesting. At first I thought it was a kindof visual-style inspector, but it seems that they have extracted the style information (including bitmaps), made their own templates, and StyleBuilder inspects and allows you to edit these templates. It will then take your changes and create(compile?) a new visual-style.

Even if you dont want to create a customized visual-style, the bitmaps it installs are handy to look at.

StyleXP changes themes and visual-styles, and allows non-Microsoft supported visual-styles to be used. Apparently they hook into UXTHEME.dll and stop it checking the digital signature of the style file. I think being able to change to non-Microsoft supported visual-styles is a good way to see how other programs deal with themes/styles under a bit more stress than usual.

Both StyleXP and StyleBuilder worked well, and seem to be nicely done.

Changing Themes

The XP machine I am using doesnt have many programs installed, but it did come with Microsoft Works which includes about 6 programs like; Word and Picture-It.

I didnt see any problems with the Dolphin environment, and all the themes looked fine.

mmm :) , Jerry ... this one is for you:

osxCHB

Some observations:

  • Using StyleXP to switch themes, partly broke the StyleBuilder UI (one of its TreeViews had corrupt state icons). I wasnt sure whether to laugh or cry.
  • The StyleXP program itself uses external skins, and doesnt use the current theme ... fair enough, that could get tricky.
  • Microsoft programs are inconsistent when it comes to themes. Came across a relevant Kuro5hin article discussing this.
  • Microsoft Picture-It and Encarta seem to completely ignore the current theme in their client areas.
  • The XP help system also seems to ignore theme colors.
  • Windows Explorer does get changed, but this StyleBuilder faq entry suggests it is a result of replacing the shellstyle.dll, rather than explorer picking up the visual-style like the rest of us mere mortals should be doing.

Playing around with UXTHEME

I fleshed out Dolphin's ThemeLibrary with a couple of extra functions, and started playing around in a workspace.

I would have been having alot more fun with this library if I didnt have to think about what to do on Win2k/98 machines. Ignoring that, it seems that there are some cool things that can be done with UXTHEME.

If you want to have a quick poke around, firstly file this in:

!ThemeLibrary methodsFor!


closeThemeData: aHTHEME
"
THEMEAPI CloseThemeData(HTHEME hTheme);
"
<stdcall: hresult CloseThemeData handle>
^self invalidCall!


drawThemeBackground: aHTheme hdc: aHandle iPartId: int1 
iStateId: int2 pRect: aRect pClipRect: aRect2
"
THEMEAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, 
int iPartId, int iStateId, const RECT *pRect, OPTIONAL const RECT *pClipRect);
"
<stdcall: hresult DrawThemeBackground handle handle sdword 
sdword RECT* RECT*>
^self invalidCall!


openThemeData: aWindowHandle pszClassList: aLPCWSTR
"
THEMEAPI_(HTHEME) OpenThemeData(HWND hwnd, LPCWSTR pszClassList);
"
<stdcall: handle OpenThemeData handle lpwstr>
^self invalidCall! !

And then, in a workspace evaluate:

library := ThemeLibrary default.

themeView := View show.

hTheme := library openThemeData: themeView handle pszClassList: 'EXPLORERBAR' asUnicodeString.

library
drawThemeBackground: hTheme
hdc: themeView canvas asParameter
iPartId: 7 "TM_PART(7, EBP, NORMALGROUPEXPAND)"
iStateId: 1"TM_STATE(1, EBNGE, NORMAL)"
pRect: (10 @ 10 extent: 30 @ 30) asParameter
pClipRect: nil.

library closeThemeData: hTheme

ta da ...

ssExplorerBarTheme

A full list of parts and states can be found in the SDK "Tmschema.h" file.

FWIW: I dont think it would be too hard to create a Theme inspector in Dolphin which reads and parses the "Tmschema.h" file, and then dynamically calls the appropriate UXTHEME functions.

Revisiting the SWDropContainer

I did some more work on improving the look of my SWDropContainer.

After playing around with the ThemeLibrary, I can now see where I can pick up the fonts and colors I will need to keep my views in sync with the current theme.

ssDropCont1

The above screen-shot is from my current application (running on Win2k). This doesnt use the ThemeLibrary to do any drawing, and therefore works unchanged in XP/2k/98. I have made use of the GDI+ library to get the down gradient fill for the outer container, and the across gradient fill for the headings.

I am still not sure what to call this kind of view. My package and class name is "SWDropContainer". In the Microsoft documentation I have seen them referred to as "Category views", Generic Webview folders", "Special Folders", "ExplorerBar folders" and "The new Explorer UI elements".

Painter

I found that to get the exact look (of the above screenshot), I needed to subclass ContainerView, Splitter and SWLinkButton. My need to subclass was really only so that I could tell Windows not to erase the background (ie #onEraseRequired:). This coupled with setting the #isTransparent style, gives the headers the rounded corner look.

While I am not sure how generally applicable the work I am currently doing is (as I am not using CommonControls), this did get me wondering if View could make use of a pluggable "Painter". Similar to an Interactor, by default a view would act as its own painter, but give the user the opportunity to plug in custom behavior. While the view's presenter could be used, it seems outside the typical responsibility of Presenters.

The Painter's protocol could be:

  • #view ... answer the view
  • #onPaintRequired:
  • #onEraseRequired:

A typical custom-view may have three classes of Painter it could choose from; an XPPainter, a Non-XP-GDIPlusPainter and a GDIPainter.

An XPPainter could open and hold a ThemeHandle, and use that to paint the view. A Non-XP-GDIPlusPainter could make use of the GDIPlus library (and probably do a good job of simulating the XPPainter).

I would give it a try, but I dont feel like changing the shape of View without thinking about it some (alot!) more.

Link 5:30:43 PM, Monday, 3 February 2003 Email

change Jerry Bell: a new Smalltalker blog

Jerry has started blogging: Jerry Bell's Radio Weblog.

Looking forward to reading his blog. I am sure I will have more to say later :)

Link 7:18:29 AM, Monday, 3 February 2003 Email

change SWScheme

Over the past couple of weeks I have received a few emails about my SWScheme project.

SWScheme is a mostly RSR4 compliant - toy - Scheme evaluator.

The project is Dolphin Smalltalk 4 code; I never got around to moving it to Dolphin 5, therefore it has never had the pleasure of meeting the Refactoring Browser.

I am planning to spend some time on the project when Dolphin 6 is released. The remaining test failures were as a result of not being able to implement Continuations fully, and Dolphin 6's support for Continuations should allow me to fix these tests.

SICP

I created the SWScheme project while I read the Structure and Interpretation of Computer Programs, by Abelson, Sussman, and Sussman. I can not recommend this book more highly, not only did I learn more about programming from it than any other 10 books, it was great fun to read and do the examples. It is a giant puzzle book.

I used DrScheme as my Scheme environment, and did most of the examples in it. It took me about 3 months to read and work my way through the whole book.

When I came across a particularly elegant Scheme example/solution I would then attempt to code it in Smalltalk to try to identify what it was about Scheme that allowed such elegant solutions for certain types of problems. I put the Smalltalk code into a package named (imaginatively!) "Schemish". Over time, the code in the "Schemish" package was refactored and redesigned so that eventually it was a full Scheme evaluator.

Aside

I have found that working through the exercises in a programming book, once as intended, and a second time in another language is a good way to learn more about both languages. I did this with Bruce Eckel's Thinking in Java about 18 months ago. Jerry and I had been playing around with Zope on Dolphinharbor at the time, and the second language I used was Python. I dont think I need to say that the Thinking in Java/Java/Python combination didnt come close to the SICP/Scheme/Smalltalk combination, however I really liked Python. I found that while I struggled through the Java, Python "flowed" for me ... it was easy to get into the zone of thinking about the problem at hand.

The Java experience did improve the second week of this exercise. An early beta of Eclipse was released, and I switched to it from the IDE that I had been using in the first week.

I think that one of the problems I have with Java is that it hurts my eyes.

MyDescriptivelyNamedThing aMyDescriptivelyNamedThing = new MyDescriptivelyNamedThing ()

I see this, and warning bells go off ... "duplication duplication duplication" My nose detects a code smell ... but of course both my eyes and nose are wrong. (but not my choice ... see above ... you are not reading Steve Waring's Java Journal)

Dolphin's Stack

SWScheme piggy-backs Dolphin's stack for its procedure calls. To implement tail-recursion, I would pass an object through the Dolphin stack that would track whether the procedures where called in the tail position, and could be used to drop frames from the Dolphin stack when the same procedure was called again from the tail position.

Continuations proved to be more of a problem. It took me long enough to figure out what they were, and then I need to work out how to implement them. I used a technique that is very similar to how an ExceptionHandler is created in Dolphin Smalltalk. The call-withcc procedure would create a BlockClosure which could later be used to return to that same point in Dolphin's Message Stack.

This only worked with what I later came to think of as downward Continuations, in other cases I would get a "Cant return to an expired context" exception from the VM.

The conclusion that I came to at the time was that it would not be possible to implement full Continuations while still piggy-backing Dolphin's Message stack ... I would need to write my own Scheme compiler simulator.

Continuations

Continuations came up again for the port of Seaside to Dolphin. Early on in the porting effort, a couple of us asked Blair from Object-Arts for guidance on whether it was possible to have Continuations in Dolphin. He believed it was and gave us a couple of tips; we would need to copy a Process instance and then fix up the addresses and other objects that couldnt (shoudnt) be shared between the original and copied process.

Never one to back away from a challenge, I dived straight in. I had been mucking around with it before Blair's information, but knowing that it was possible made it much easier. I did have fun working on it, and learnt alot about Dolphin's process/context/exception implementations.

I got it half working ... half the time I could copy a process and reactivate it successfully, the other half of the time Dolphin gpfed :) During one long afternoon/evening/early morning coding session, I had literally 100's of GPFs!

I created my own Process inspector that spotted likely addresses and converted them into stack pointers. It would also create StackFrame instances for me. Using this inspector I was able to work out how to access the objects and addresses that needed converting. I think I got stack frames/block contexts and exception handlers right. It turned out that there was a bug in the VM that effected shallowCopying a Process which wouldnt have helped, however I am still not sure that I dealt with ensure blocks (see BlockContext>>valueOnUnwind: and the "special cookie") nor the launchBlock/ProcessTermination handler. Mapping that code back to a linked list of numbers was a real mind-bender!

In any case, my hacking was not needed. A week later Blair came through with an elegant solution that used the visitor pattern, a patched VM, and TestCases that passed all of Seaside's Continuation requirements.

I understand that this will be part of Dolphin6. If you want Blair's package and the VM for Dolphin5, it is part of the Dolphin Seaside download.

The Blur

During the development of SWScheme, the moment I remember most fondly is when I solved my quasiquoting implementation problem. From the class comment:

This class is a bit of a mind bender, but I think the concept is an elegant solution to quasiquoting. My past implementations of quasiquoting were brittle, and it always seemed the hardest expression type to refactor into a new organisation. Most of the time it didnt refactor, and my quasiquoting tests stayed red for long periods of time. -This class borrows from an idea I read about from Paul Wilson of the University of Texas. In the analysis phase it firstly rewrites the expression into a procedure call to sw-dequasify(see #rewriteString). This procedure then rewrites the scheme code into a form that can latter be evaluated. (see #analyzeIn:) This step is crucial, because it allows any names to be analyzed into variables(which has been the sticking point for my other implementations).

Until this moment, in my mind I had being keeping the Smalltalk implementation, and the growing Scheme evaluator separate. In effect I was continually solving problems of the form: how do I write the Smalltalk such that this Scheme behavior will emerge.

At this moment, I realized that I could start using the Scheme evaluator to solve problems itself.

The line between the Smalltalk and Scheme behavior blurred ... I think I had one of those paradigm shifts :) ... I definitely remember feeling both very excited and a bit queasy on the stomach at the time :)

Plan for SWScheme

Aside from the opportunity to implement full Continuations when Dolphin 6 is released, I have no other plans for the code. It is a toy evaluator, and will probably remain that way. It was useful to me in that I learnt how a Scheme evaluator is implemented. It might be useful or interesting to other Smalltalkers to be able to step through analysis/evaluation of Scheme expressions in a Smalltalk debugger.

Scheme

While the project, and SICP taught me about Scheme, I left the project feeling that I still didnt "know" Scheme, and that the Scheme/Lisp family of languages were (and are) too powerful for me at this stage of my programming journey.

I can feel the power of Scheme, but on the other hand, I feel the productivity of Smalltalk. Since finishing the project 2 years ago, I have still not gained a better understanding of why this is so.

Last year, I spent some time working through a book on Mozart. It is an impressive language, but my impression (which may not be valid) was that it is a jack-of-all-trades language.

I am hoping to spend a couple of months in the middle of the year exploring new languages and techniques. I would like to work with a functional language, possibly one with type inferencing. I am not sure which language, I dont know enough about the choices, but any recommendations on a good environment/language preferably with a good tutorial book would be welcomed.

DrScheme

John Small, who wrote the Generic Server for Dolphin Smalltalk, started the Metro-Schemers and wrote some good Scheme tutorials. He has been very impressed with DrScheme, and it certainly seems to have been continuously updated since I last used it.

UnitTests

SWScheme was the first project that I built a full set of TestCases as I developed, and gave me my first taste of the benefits of unit testing. In hindsight, it was a great project to start unit testing; no External resource hassles, and I had ready made functional scheme tests by Aubrey Jaffer for compliance to RSR4. I converted his tests to SUnit TestCases, and also wrote independant unit tests.

I was amazed at the time how much the project evolved and changed as it developed from the original simple "Schemish" classes into its final form. In fact, I saved all my change logs from the development thinking that I should write a tool that would play back the changes like a "Smalltalk movie".

It doesnt amaze me anymore, I know that is the luxury that having TestCases buys me.

Well, enough rambling for now. Have a good weekend!

Link 7:10:57 AM, Saturday, 1 February 2003 Email

change Chris Double - Cook Computing - Continuations

Chris Double has a post about Scheme and Continuations on his weblog.

It motivated me to finish up a post I had half finished on SWScheme. One of James Robertson's just one more thing late at night efforts :)

Another source of information on using Continuations in Web programming is the cs173 lecture notes.

Chris writes:

For some interesting usage of continuations you might also want to look at "Seaside". This is a web development framework for Squeak Smalltalk, parts of which have recently been ported to Ruby which also has continuations.

Interesting to hear that Seaside is being ported to Ruby. Last year, I exchanged many emails with NaHi, the author of SOAP4R, a SOAP toolkit for Ruby. I think we faced similar implementation problems. NaHi had a great set of interop tests which helped flush out a number of Spray bugs. I just checked for the first time in months, and it is good to see that Spray is still close to the top of his tests with 115/121. At the time he told me that a number of Smalltalk like IDEs were being developed for Ruby. I must check to see what progress has been made.

Chris also posts the following:

David Simmons has a write up on his web site about delays on his implementation of SmallScript for .NET (named S#). It's a fascinating read as it gives some information on what it's like to create a high performance dynamic language implementation under .NET.

I agree, a fascinating read. I think I get the big picture, but I wish I could understand the details of what David Simmons writes.

Link 6:58:20 AM, Saturday, 1 February 2003 Email

change Dolphin wiki unRESTful

The Dolphin wiki breaks a key REST principle.

HTTP Method semantics

From: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1

Safe: "... the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval ..."

Idempotent: " ... the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property ..."

Dolphin Wiki

The Dolphin wiki provides links for the user to change the state of the Wiki, for example; "Delete this page". These links cause the Browser to make a GET request.

The most obvious problem that results from this is the badly behaved spiders that turn up every couple of months, ignore the robots file, and do a "wiki-wipe". The spiders are at fault for ignoring the robots file, however they are not at fault for the way they follow the links, as they can expect GET requests to be both safe and idempotent.

Cost

IMO the biggest cost is that it stops good spiders, who do obey the robots file, from accessing and indexing the content of the wiki. There is some great information on the wiki, both specific to Dolphin and about Smalltalk in general.

Google likes content, if it could see the wiki pages, it would improve the rank of http://www.object-arts.com. It would also help improve the rankings and visibility of web-pages maintained by the Dolphin community which are linked to from wiki pages.

Link 10:00:38 PM, Friday, 31 January 2003 Email

change Surfing around

Google Dancing

Interesting article about Google on Kuro5hin. The past couple of days I have been watching Why Smalltalk Google dancing between 3 and 4.

After reading the article, I decided to give the Google toolbar a try. Normally I avoid BHOs like the plague, but I can make an exception for Google. It is interesting to see page-rank as I surf from page to page, but what I am finding most useful is being able to list the back-links. It turns up some interesting pages.

FWIW: a few page ranks:

  • http://www.stevewaring.net/blog/home/index.html 5/10
  • http://www.dolphinharbor.org/dh/index.html 6/10
  • http://www.whysmalltalk.com/ 6/10
  • http://www.smalltalk.org/ 7/10
  • http://www.stic.org/ 6/10
  • http://www.cincomsmalltalk.com/blog/blogView 5/10
  • http://www.object-arts.com 7/10
  • http://www.cincomsmalltalk.com 5/10
  • http://www.squeak.org 7/10
  • http://www-3.ibm.com/software/ad/smalltalk/ 6/10
  • http://www.smallscript.com/ 6/10

Windows XP Test Framework

Found in the Microsoft Download Center rss feed a link to the Designed for Windows XP Test Framework 1.1.1

This document is full of good test fodder. For me, not exactly UnitTests, but a good check-list to work through before deploying. For example: "TC1.1.6.1 Does the application crash when trying to print when no printer is installed?"... fair enough too. A search for "Designed for Windows 98 Test Framework" did not turn up any hits.

Link 7:57:54 AM, Thursday, 30 January 2003 Email

change Terragen

Came across a link to Terragen.

They have a new release out, and have resumed active development.

I have had fun with this program in the past. I used it about a year ago when I was working on dolphinharbor. My thought was to have one of those typical "single image" welcome pages that would lead to the main dolphinharbor index.

I came up with a couple of images, mmm let me see if I can dig one out:

dh

I decided against using it; somehow it felt too cold and lonely. All attempts to add beach-balls, boats or people failed miserably :)

I should try the latest version and have a go at a warm and lively dolphin harbor.

Link 6:00:48 PM, Tuesday, 28 January 2003 Email

change Prisoners' Dilemma

Reading Mark Pilgrim's parse_at_all_costs post reminded me of the Prisoners' Dilemma. I can understand his reasons; If one aggregator decides to be liberal in how it reads rss, then it will gain a market advantage. However, if they all do, we get the "html situation". In my opinion, the cost of not being able to read a number of non-valid feeds is less than the cost of reading a growing number non-valid feeds, (which will surely happen as the liberal aggregators are used to "validate" the feeds), and the cost of rss being generally percieved as not well-formed.

I am able to sit here and read rss news thanks to many levels of specifications and protocols that build on each other. HTTP and TCP/IP are the obvious, but the point could be taken to the extreme by including lower level network protocols through to hardware protocols and APIs. This works because the specifications are adhered to, and that makes it easier to build a higher layer.

I would like to see rss built on, but if it turns into anything goes, that could go out the window.

This may be a naive suggestion, but the way I add feeds to the aggregators I have used, is to either use the auto-discovery feature, or by clinking a link that is served by the aggregator's built in server. In both cases the referring html page link is available. Why cant the aggregator store the html page link, and show that in place of an invalid rss feed?

I thought I had better check my own feed before posting this.

Thanks to Mark Pilgrim and Sam Ruby for providing the RSS Validator.

I was surprised to see that my feed doesnt validate because of the relative hrefs. I couldnt see this in the specification, should it be a warning rather than an error?

A couple of my posts include links that are discussed in the post ... not what is linked to, but the link itself. In effect I need someway to quote the link. For example: using the WebBrowser control.

The recent Marketing post includes links for similar reasons.

There may be a better way of including those links, but since it is (escaped) html ... who cares? :).

Link 5:49:09 PM, Tuesday, 28 January 2003 Email

change FastCGI

From the fastcgi mailing list:

From: "Rob Saccoccio" ....
Date: Sun, 19 Jan 2003 14:33:07 -0500
Subject: [FASTCGI] mod_fastcgi v2.4.0 released (including security update
and Apache2 support)


I just tagged and rolled mod_fastcgi v2.4.0.  This is the 
first official release of mod_fastcgi under Apache2.

I highly recommend upgrading to this latest release, 
particularly if your on WIN or use the wrapper 
support on *nix.

Source and WIN dlls (for both Apache 1.3 and 2.0) can 
be found here:
http://fastcgi.com/dist/.

Please note the first item in the change list if your using
FastCgiWrapper/FastCgiSuexec.

Many thanks to Michael Richards for identifying the security
issue and test/debug of dynamic wrapper support under 
Apache2.

I have not used Apache 2, but it is on my todo list to upgrade and test FS FastCGI with mod_fastcgi v2.4.0. If anybody tries this before I get around to it, please let me know how you get on.

Link 4:52:30 PM, Tuesday, 28 January 2003 Email

change Marketing

I think this comp.lang.smalltalk post by Peter van Rooijen has some great marketing ideas.

Click here to purchase the Object-Art's Dolphin replacement Notepad only $59.95.
(Free bonus!, integrated Dolphin Smalltalk value edition)

LOL, or even

Click here to purchase the Object-Art's COM Object inspector.
(contains the powerful, scripting like, Dolphin language) only $349.95.

Why not? I see plenty of programs for sale that provide a feature that is just one of many in a Smalltalk image. If the whole thing is too much, just give them a taste :).

Link 7:04:48 PM, Thursday, 23 January 2003 Email
Powered by Smalltalk

My Feeds

My RSS Feed Email me Add this feed to a running copy of BottomFeeder Add this feed to Radio Userland

My Archives

August
July
March
February
January
December
November
October
September

Smalltalk Related Feeds

rss Why Smalltalk
rss Cincom Smalltalk Blog
rss Cincom Smalltalk Wiki
rss Chris Double's Radio Weblog
rss Mark Watson's Blog

My Articles

Dolphin TestWare

XP Look and Feel - Look and Themes
XP Look and Feel - DropContainer
XP Look and Feel - LinkButtons
Border ImageView
Monitor ShellWindows
A wrapping of the Animation Control
Scriptable Shell Objects
Building an IE Favorites Menu
Reusing a Toolbar's ToolTip control
Menu Addons
My Dolphin Environment
Playing around with bitmaps

Dolphin Tips and Tricks

Generate mask testing methods
Splitting a FramingLayout


Links

RSS Tutorial

Powered By

Dolphin SmalltalkDolphin Smalltalk
YAXO and SIXX
Get the BottomFeeder RSS ViewerBottomFeeder RSS Viewer
Apache
FutureQuest


Dolphin Smalltalk Webring

[ Join Now | Ring Hub | Random | << Prev | Next >> ]

Copyright 2003 Steve Waring