July 17th 2000.

Camp Smalltalk (July 17-20th 2000)


Camp Smalltalk Annapolis Monday July 17th, 2000

Greetings, it's late 1:30AM tuesday morning, not that's unusual for your scribe. This time around I've decided to post early, just in case someone feels left behind and perhaps they would like to fly in before the fun stops, thus my proofreading and linking isn't quite up to previous standards. Also at some point I'll migrate all this to a swiki

So CS2 begins:

July 17th 2000

It's morning, really early if you are on the west coast, very early, it's 3AM for me. After spending the night at Donald MacQueen (A JWarrior) we arrived to find 16 odd people milling abound, and a few children lurking in the background. Ralph Johnson was busy talking to the group about what the objectives were for the week and how things should be organized.

Did you know that some Digitalk warriors still exists, one of the campers has spent 8 years working on a Digitalk office based system. During our discussion, he expressed concern about where the source code was and how support was going to happen in the future. It seems that the current owner of the code (SeaGull) is non-committal about its future or even existence of the code, where is the code anyway?

Suddenly about 50 patch cables appeared and we started laying wire and hooking Ethernet hubs together.

Ralph then got us together and we made introductions. Some people of course had a dozen years or more of experience, and some only had 6 months, yes even today people are choosing an OO language and picking Smalltalk. People came from as close as a few miles to as far away as Europe, a few locals appeared in the evening just to see what is going on, remember the concept of having a some small local Camp Smalltalks? Perhaps they will work.

Ralph went on to talk about the ANSI test suit and how at Camp Smalltalk #1 they converted Richard A. Harmon original work into something cleaner. The first time it was run in VisualWorks there were several hundred failures, which has now fallen to about 50, 47 actually. Is the ANSI spec right? For example number conversion Float + Rational gives what? There are a few issues, perhaps a revised ANSI standard is required to fix the issues.

James Robertson talked about EXDI an object storage system that Cincom is going to make available to the community much like XML. It was mentioned that David Liebs did the original XML code.

Sames moved discussion to the projects and queried people about what they wanted to work on. Some people wanted to work on projects that could be completed within a week, other who wanted to work on SOAP realized that size of a project might take much more time, but because of the importance to the community that was ok but maybe this week they would tackle only a small part of the puzzle.

More work then we focused on deciding how the network infrastructure should be setup, questions about internet access were raised, chair and tables flowed. More coffee was need by your author, and Twinkies, an America breakfast food was passed about.

Some camper hustled out to the local mall to get a Linux book Mandrake 7.0 I might add, since no one had an installation disk available, mmm actually someone did, but that was discovered later. It's sad that one can't just as easily pickup a copy of Smalltalk at your local mall. Various tables were focus around the projects and should they be round, or square?

Ever see nine laptops edge to edge on a table, and a pile of cable? Well at Camp Smalltalk you could.

By 10am the groups had consolidated and Ralph was leading the ANSI group, which had about 7 interested developers. Tremendous interest in this area, as people trickled in they stated they wanted to work on the ANSI project. Topics floated towards pair programming, how much more productive is it? It was pointed out that pair programming is competitive as a pair an individual works harder so they don't look bad to the other person, accountability! So yes we should use pair programming.

Ever see a Squeak mouse with red eye? Well at Camp Smalltalk you could, neat T-shirt Roger.

Mark was working with the GLORP team, they first had to setup an Oracle server and some infrastructure but first were decided what part of the problem they wanted to tackle.

Over at the SOAP table documentation was being passed out regarding the SOAP standard, and decisions being made about how to tackle an implementation.

Enoch brought his famous expresso machine and setup camp in a corner, surround somewhat by caffeine deprived westerns.

In the ANSI group Ralph was talking about how the test cases were organized, the easy high value work was being done first. In some of the cases extra testing was done where the spec sometimes was vague about the class of the object being returned and other characteristics campers realized where important.

At the Sazoo table, Vlad and Peter were setting up an environment to develop on.

James Robertson tackled the food issue and sent out for 16+ pizza's

I dropped into discussing the network infrastructure group and how FTP should work. Les stopped in and discussed IMAP with us, which he feels is a poor standard, however some careful coding can overcome the issues as the standard committee searches for better solutions, which might be to late now. We agreed in principle about how it should be architected.

Glancing over to the ANSI group six people were busy help Ralph build a test SUnit for array logic.

Les, Alex and I got out a white board and discussed how Les' IMAP implementation worked. It was clear the command buffer class was an important part of IMAP but could just as well be used by the FTP logic. We went on to discuss how responses were handled and the fact we need a dependency protocol to allow long running command to feed information back to the client, so the client can do real time updating if required.

Thanks to CinCom for the Lunch. Pizza boxes everywhere.

{zzzzzz}
A few hours of sleep.

Four O'clock. 26 people hard at work and a core of people surrounding David Simmons discussing Java, patents, Sun and C#. Discussion turned to engineering and how that relates to software programming, and back to how Smalltalk hasn't promoted itself and how it has contributed to the knowledge of computing, that many ideas now marketed were invented by Smalltalk. David felt that we are lacking in our efforts to market, and we must ensure the word gets out that Smalltalk was the origin of most of the interesting things in languages today. Discussion roamed over to the job market, and the problem with companies can't find consultants, and consultants can't find jobs. A major disconnect here, why? How do we better market Smalltalk, and ourselves.

Over in the ANSI camp Don and Jeff were working on the SequencedReeadableCollection Test suite and had completed the easy screening. Facing a long page of code they were refactoring the test into something smaller and starting work on the difficult stuff. What? Replied Don as I left… Behind me I noticed the whiteboard had been filled with a list of messages and broken into functional groups.

The GLORP group, had finally gotten Oracle up and PostSQL and where talking to each from their laptop using GLORP, they had learned more about Unix admin that they had wished. They were starting to look at the exception model and how the lower level database exceptions were thrown to higher level code.

Over in the ANSI test suite group they had pulled the 2800 odd test suites over to VisualAge from Squeak. As far as they knew no-one had ported the ANSI suite to VisualAge, if someone has they better speak up. The ANSI compatibility Suite, SUnit, Squeak ANSI test suite was pulled together and an ENVY application build for it. In summary 2608 test ran, 17 failed and 713 had errors. Perhaps SUnit should have a graduated bar of green/red and at a certain point you could ship, Ah NOT!

A question for exceptions was raised in one of the test cases, a failure causes doesNotUnderstand which is trapped and an ExError throw, but the problem is the SUnit packet isn't expected this instance exception behavior and a failure becomes an error.

The SOAP group had various color coded CRC cards were strewn about, progress was being made. The issue was how to get stuff done in the short timeframe, some existing code was being ported from a DOM implementation in VisualAge to VisualWorks.

Where did AI go, if you went to Camp Smalltalk you would know…

Many hours were spent talking to people about the emerging Smalltalk renaissance and interesting things people were doing with the language. Due to your scribes lack of sleep I've not recorded it all, after all you really need to attend Camp Smalltalk to get the buzz on where Smalltalk is going.

Do you have a Squeak.org pin. Ah if you did some Squeaking lately for the community and attended Camp Smalltalk you would. A camper was kind enough to make up a dozen or so and was distributing them to various people. Should we have community awards for contributions to the cause of Smalltalk? Perhaps a good idea, who would like to be a sponsor.

Oh I did however learn a trick or two about H/W clock management on the Mac from an Smalltalk VM Mac guru.

David Simmons presentation on Smalltalk-2000 (SmallScript) ".net"

7:00pm after a few slices of left over pizza and a hastily found Cincom LCD projector was brought in David Simmons started to give his presentation to 28 Campers. We ran into issues with the projector and Sames started to get excited, if you know Sames we got to hear a story.

An audio visual problem leaped up and a run for another projector was done. So to pass the minutes stories were told and people cemented relationships with a representative of Ernest & Young. Are you an employer, looking for some Smalltalk consultants? Sad, you should have come to Camp Smalltalk. Perhaps the next Camp needs a Job fair.

Around the room various senior Smalltalker were explain issues and how problems were solved, eyes glowed as information about how to solve problems were transferred.

David Simmons decided to start his introduction to Microsoft dot net as we waited for another projector. Some highlights of history followed: His introduction to OO was when Brad Cox brought out a book on Objective-C. From that career changing experience he build a Objective-C clone, then saw a Digitalk Smalltalk VM a year later. From that in 1992 he built Smalltalk-Agents for the Macintosh which focused around distributed objects.

In about 1995 Microsoft called in the Smalltalk vendors and were looking for a Smalltalk solution to promote Smalltalk and VisualBasic as a solution. (as you know that never happened, tsk, tsk)

In 1999, David signed about a million NDAs and got to see this grand project Microsoft called "dot net" er ".net". They have spent over 1 billion dollars to build this encompassing vision. This is all based on a unified virtual machine, to support C++, to Cobal, and run on embedded devices, settop boxes, to the latest desktop platforms. SOAP and XML are the transport layer, but all the details are hidden from the application programmer. They approached about 20+ languages vendors, Cobol for example, and got commitment from all excluding common Lisp. They also have a vision of doing vertical market applications, and have been building numerous verticals.

Thus you can go find a service on the web, which is self describing, and in the application development environment you can wire them up to build an application that meets your business needs. IE A vendor can build a set of basic building blocks and a client can piece the pieces together to build a application unique to their corporate business process.

This really is a replacement for the Windows operating system. It ranges from deployment tools, migration tools, versioning, to Metadata and reflection capabilities.

No one outside of Microsoft's marking drones like the '.net' being tacked onto every product name.

All the SQL server stuff, Office etc etc is moving towards this, how do you spend a billion dollars? Well some of this is licensing, for example they have licensed lots of technology from Rational. They've build an entire layer of OO onto of all the major SQL backends. Mmm 10,000 programmers at a $100,000 per year costs a lot of money.

A month ago things just didn't work, last week they had an Alpha, in three months a beta, expect a golden in a year.

Question Will it talk to Corba? How? Well it will, but David didn't know the details

Question Could you take an existing Smalltalk application and run it on the Microsoft UVM. In theory yes. The ".net" platform has a rich class library too, but for example the String class is not the same, you could run with say the Squeak class but you can't share the data and this is important for reasons you will see later.

There is an entire new API for doing UI, something called WinForm.

Question: Will the WinAPI go away? Officially no, but yes it will become irrelavent.

David took his new virtual machine which takes Smallscript (Smalltalk-98) and emits IL information for the UVM.

Question: Could you take a Cincom bytecode across to the UVM? Yes that was their first trial they had a cross bytecode compiler from QKS to UVM. But this doesn't help with the verifiable part of the '.net' solution. Class have attributes: private, public, scope, security. A lot of work is required to make an existing Smalltalk a first class player in the '.net' environment. {In some respects more that a first class player since you can do more neat things in Smalltalk than in C#}

The Metatools of course use this attribute information to allow you to wire stuff together.

Mercury, Effiel, Cobol. But Microsoft is silent on Java. No Lisp and no Fortran.

Mmmm nothing about Java we wonder where it will go…

Question: How compatible is your SmallScript with Smalltalk. A long answer ensued In 1998 David started building a scripting language based on Smalltalk, this became the core framework for their '.net' solution. In general a basic non-UI Smalltalk system should port in the same amount of time as port it between say VisualWorks and VisualAge.

Smallscript VM is 300K

The projector arrived, we got to see the presentation he gave in Orlando last week. First by using a tool called Visual SlickEdit we saw a small example of C#, then the same example in Smallscript.

The class description, name,version, classId (a long set of numbers), etc….

The Smallscript was:

hello: otherParty
stdout << '`nGreetings "' << otherParty << '"I'm Smallscript!`n"

stdout is a replacement for Transcript, really it's a instance var for the pipe, the << is a operator much like ',' and the "`" is the escape character much like "\"

With this example the C# called the SmallScript program and passed a value

Someone pointed out there isn't any IDL step. Right said David, no IDL to build. The Class description builds an XML definition. This XML information of course can be used by the MetaTools.

David showed us the IL disassembler, This showed the inheritance hierarchy, and the 'manfest' of what the DLL requires to run. They provide for a variety of digital signing tools so you can sign your DLL. Mmmm can't Microsoft engineers get away from eight character naming conventions, sigh…

Alas they have two type systems, one is a value type, where the value knows its type, the other is just a data type, where you need to wrap the data with a type. The right solution didn't win. Perhaps the fault lies in their GC solution. Is there a performance hit? Perhaps we'll see, remember the beta isn't here yet. Later discussion focus around how we lost that argument, although some senior Smalltalk VM people argued that all objects should be typed, the Java folks rued the day.

Next we got an example of the bytecode, the first issue David had was that classes aren't first class objects, but you can build a first class object using the class information. The UVM also doesn't support dynamic messaging in the raw VM, so David needed to build a dynamic dispatcher, Microsoft is aware of these problems and this could change.

Why did the Lisp people bail? Rumor is that the Lisp people felt they would loose their intellectual property regarding multiple dispatching so no deal.

Back to the bytecodes. Technically the instance creation method, calls super new.

The hello method was then disassembled it had 181 bytes of bytecodes.

The UVM is stack based, but the SmallScript VM is register based. There was some interesting redundant load/stores which were there to get around some broken parts of the UVM. 13 byte code were used to dispatch a selector, a big performance concern. This could be fixed in version 2, it just didn't make the cut date for version 1. In most cases the Jitter will remove the extra/redundant instructions when it performs optimization. It also seems there are different JIT that give different degress of optimization.

Is there a porting tool so you can port say Snobol? About a million files to help one port a language to ".net" now exist, along with documentation etc etc. This was all distributed by Microsoft last week on CD.

A side point about unsafe code which allows you to use pointers, which of course allows you access to low level hardware, and of course defeat any sandbox protection was discussed for a few minutes.

David showed some more documentation, lots of classes, from currency to collections, serialization, networking, text services, regular expressions. In a Smalltalkers opinion the core base classes are poorly implemented. There is a problem here the base core classes are sealed and some of them you can't subclass, but David managed to get around that. The reason for the protection is to help the optimizer cheat. Getting around the sealing of course make SmallScript different.

Most of Microsoft programmers have switch from C++ to C# and love it, sounded like all of Microsoft's products are being rewritten in C#.

A short break.

David showed lots of dos screens that showed how to invoke the C# and smallscript compiler. The QKS disassembler emits comments, does formatting etc. It makes debugging an implementation much easier.

The core MicroSoft debugger allows you to interact with the language specific debugger.

David now turned the discussion to QKS SmallScript aka Smalltalk-2000

{keep in mind it was difficult for me to decide which of the following is in the QKS VM, and which is going into the Microsoft ".net" UVM. Later David said all of it is going into ".net" The issue is the ".net" stuff is a year away, but he wants to introduce a script capable VM to the world at ECOOP.

The QKS development environment allows you to edit things like tooltips, and allows you to build a complete windows targeted application (or should we say a '.net' application). Their repository version all classes, and even instances of objects and you can also version by language type.

Scripts, aka Workspace code fragments can be created and stored in the repository.

Little things, the class search window allows you to type regular expressions. The interesting thing here IMO is the attempt to bring Smalltalk to the masses.

David had looked at issues with Smalltalk versus scripting languages
Note some of the language grammer below isn't quite correct, due to your authors problems in transcribing information on the fly. If you have questions about the finer details then ask on comp.lang.smalltalk or email David directly or visit the QKS site.

Control Flow
Regular Expressions
Closure
Exceptions
Unicode
Read/Write Barriers, Structured Storage
Namespaces, Scoped Messages

You can switch an application from USA encoding to Unicoding without pain!
You can have the VM do a read/write barrier on an instance slot, so A := 10 would trigger an debugging exception.

Question: Is this a Smalltalk QKS feature, or a Smallscript .net feature. Currently it's not in '.net' but it could be.

David gave another examplewhere he added a method to a instance of Object.

Q := Object new.
Q addMethod: `hello ^``Hello from: `',super asString'.
Q hello

This is difficult to do in other '.net' languages. But remember in Smalltalk you can add methods while having instance of the object around. This was a hard thing to do and exploited the full extent of serialization in '.net'

Other constructs:

IfXTrue, ifXFalse / ifQuivTrue ifEquivFalse
IfNil ifNotNil
IfZero ifNotZero

If (1<2) [ ] else [ ].

If (…) [:v | ] else if (…) [:v | else …

The passed in block value is the result of the evaluation of the expression for the if clause.

There are a number of new reserved keywords.
For example this versus self, but if you define this then this is disabled as a reserved word.

All this is syntactic sugar to make it tasty for the masses.

[] whileTrue: [:value | ]
[] whileTrue: [ | ]
[] whileXTrue: []
[] whileNil :[]
[] whileZero: []

and all the
do [:prevValue | ] while [ ]
styles

Unicode

You can add full style information so you can embed unicode and other style information into Strings.

Exception handing.
This is done down at the Jitter level. Unified with C++ exception handling.

Try []
Catch []
Curtailed []
Finally []

More examples

Desktop useWhile: [
(Icon foo 'STLogo@32) drawIn: ((700*380) exten 32*8)
].

Draws an icon on the screen, quite a shock to the C++/Java folks.

A slightly complicated example using 14 lines to rotate text was also given. Text is drawn around a point and shrunk into the middle. Easy for Smalltalkers and as we know difficult for other languages. David said it was a new experience for the Microsoft people to see the ability to run things dynamically in the development environment transparently.

More syntax

A way to declare an alternate method name and the return type to keep the '.net' stuff happy. This of course is done for you if not supplied, but this makes things clearer. Also allows you to give the optimizer a hint for type based optimization.

<return-type; ::copy >
copyFrom: <Integer> to: <Integer>


Multi-dispatch? In Smalltalk we typically do double dispatching. But with multi-dispatching you don't need to do this. For ambiguous expression the name space information is used to resolve the method to dispatch.

Mmultiple return values
<|rv1, <int32|nil> rv2,<Com.System.Console|nil> rv3 | List; :: foo(<any>)>

Also you can declare variables at any time in your code

| rv1 rv2 rv3 | := anObject foo: anyObject.
Or
|rv1, rv2, rv3 | := anObject foo: anyObject.
Or
list := anObject foo: anyObject

Some of this grammar sugar will disappear once the community has decided which way to jump. The above examples declare rv1, rv2, and rv3 and get initialized from the foo: send

| <String| nil> result |
aString[rxExr] !? [:xr | result := aString [2:xr@1].
AString[2:xr@1] = 'replacement'].

This ultimately expands to straight Smalltalk but looks like Perl because it was modeled after Perl. The [rxExr] is a regular expression and the !? means ifNotNil. The example is really doing lazy initialization.

QKS also has FFI support to allow you to call native toolbox calls.

Back to optimization, you can add typing information, as hints or as guarantes.

<!Integer>factorial
|<!Integer>i | := 2.

The type declarations (! Means guaranteed) allow the JIT to do better optimization.

Python, and mercury are being ported to the QKS environment.

80-100 CPU cycle object creation time
4-9 CPU cycle binding
Multi-threaded
Native FFI.
300K for the compiler and tools
Small appls 1-4kb compile w/200kb RT/DLL)
Scheduled for release in Q4. Bits in the UK in August.

One of the things David did at the Microsoft conference is actually cover Smalltalk History. It's a crime that we have not published our efforts that have make many significant advances in Computer Science. David reviewed this as a reminder to us all. In general the Smalltalk vendors haven't promoted the history on their web site. David say he had an argument at the conference with some Microsoft people about XP. They couldn't believe that XP came out of Smalltalk shameful isn't it. Vendors should revise their sites, and refer to OOPLSA papers, and the history of the macintosh and how Smalltalk influenced all of that. Two of the Java machines are really Smalltalk VM, why because the technology is good. But history is silent on the issue, how can you change that?

For some reason the Java folks don't have any references to Smalltalk but the C++ spec has over 50. Why?

Adoption barriers to Smalltalk

Deployment Pricing
Footprint/Speed
Poor FFI
The language Syntax & Grammar

QKS SmalltalkAgents
1991-2000
Where it came from and our plan.

SmallScript develops
1998: learning from mistakes
A new name
Keep it smalltalk, keep it simple
XML targeted

Fall of 1999
Microsoft ".net" happens

To Microsoft's credit they actually listen and ".net" would not be as good today without the involvement of the Smalltalkers that participated in refining the vision and implementation.

Some more examples comparing C# and SmallScript.

A number to string converter using arbitrary base. The C# program is subclassing the Smalltalk class. This of course is true for other languages so you can subclass a Cobol program with a VisualBasic program. This is a unique idea. You can mix and match languages, sure some have done this before but remember Microsoft is pursing 20 different languages.

This project began about 5 years ago. George Bosworth was an active contributor.

A question was raised about recompiling a Smalltalk class with a running C# instance. What does this do? Well ".net" isn't designed for a dynamic environment. But the environment recompiled the C# application since it was dependent on the Smalltalk class.

The UVM does late binding, so a variable reference isn't bound until execution. This leads to problem since you can version the variable out from under an Application. However there is a tool that attempts to do closure on variables, but it's not perfect.

There is lots that still need to be done in the UVM with regarding to dynamic language support. For example you cannot iterate over all the objects in the UVM.

Why can they support all these languages, when the Java VM can’t. Not sure if David answered that… {Later this question was raised again and some in the hallway felt it was a problem with Java being too much C++ focused}

David showed the SmallScript VM.

It loads and runs in milliseconds, this of course is important.

He showed a test that tested the GC and the precision, for example
stcs . eval: "100 factoral"

This had a problem so he build a new VM from the VM source code.

With the new virtual machine you can, much like Smalltalk/X, invoke C++ from a Smalltalk method or assembler, thus mixing and matching languages to solve different problems.

It did 10000 factorial in a few seconds. Very fast…

A final example

Using Smalltalk in the Microsoft Visual Debugger.

Remember you are making Smalltalk a traditional compiled language. Rolling back to a minimal form. So build a Smalltalk project, add some new items.

A C# main class, and a Smalltalk Describer class.

The Describer describes the passed in object. Strings are sealed object, but on the Smalltalk side you can modify them!

Oops of course David had fix his VM and we needed to fix it back to make it work with the Microsoft Debugger.

The C# didn't compile, but the error whizzed by and we couldn't read it. We shut it down and restarted, somewhat unstable. We couldn't get it to work. We're sure thousands of Microsoft ".net" programmers are up late tonight tearing hair out.

The VM will be free, the compiler most likely will be free, extra tools will not be free. How much of the QKS knowledge will migrate to ".net" depends on $$ and other factors.

It's 11pm and 22 people are still carefully watching and listening to David.

David: Things like binding and namespaces allow me to add methods to say String, but they are private to me and their scope prevents accidental use outside of our code.

Question: What about stripping?

David: There are issues, perform is used etc You could implement a tree shake but we don't

Question: What was the response of the people in the show?

David: Lots of people flooded the podium after the presentation to ask questions. Lots of interest in subclassing. Microsoft developer magazine needs articles, publishers need ".net" books you can do guerrilla marketing here under the guise of ".net" . Keep this in mind people who write for a living.

Distributed?
Distributed GC, SOAP etc etc it's all there.

David had some questions back to us, try to understand the market.
Why does our language not have the same growth as something like perl?

Ah someone said, pricing, policy and marketing. Squeak is free, but not quite there.
Lots of these languages python, php3 are command driven from emacs. It's difficult to get people to migrate. Smalltalk is difficult to approach, you don't get it from a command line toolset.

David:
So if you have a free Smalltalk command line tool, and docs, and examples/tutorial, would this make a difference?

Cincom pointed out in the next version of VisualWorks Ivan has made a new workspace tutorial that they would like feedback on.

David explored the issues of how to better market Smalltalk. We need to have a simple introduction that is a simple entry point to the world of Smalltalk. Anywhere you could use python or perl you could use SmallScript.

The evening faded slowly and by 1:00 most Smalltalkers departed for bed.


Note on tuesday I hope to write some code so words might be sparce that day.

Camp Smalltalk Annapolis Tuesday July 18th, 2000