Planet Smalltalk

February 06, 2010

Andres Valloud - Chatter on Toyota

Lately, the news is full of "another safety problem for Toyota", "Toyota still does not have a fix", etc. Today, the NY Times has a headline stating "Toyota Has Pattern of Slow Response on Safety Issues". Well, I'd like to know what is, say, Chrysler's safety response pattern. Or GM's, Ford's, Honda's...

The problem with this type of headline is that it only says something is slow, but it does not compare it to anything else. For instance, I could say that 1GHz CPUs are slow. Sure, unless I am talking about something like this, in which case 1GHz CPUs are quite enough and also save you a lot of electricity.

Finally, Toyota's alleged safety procrastinations are nothing compared to what Boeing did with the 737 since the 90s. It took close to 10 years to fix a design defect in the rudder controls that could (and did) send planes into a tailspin and into the ground. And I do not think the investigations were helped much when Boeing reportedly "lost" critical parts recovered from an accident. In the words of a pilot that survived,

"I have been told by my company ...that the FAA and Boeing (were) aware of the problems with the spurious rudder inputs but considered them to be more of a nuisance problem than a flight safety issue. I was informed, that so far as everyone was concerned, the rudder hard.overs were a problem but that the 'industry' felt the losses would be in the acceptable range.

I was being mollified into thinking the incident did not happen, and for the 'greater good' it would be best not to pursue the matter. In other words I am expendable as are the passengers I am responsible for, because for liability reasons the FAA, Boeing et al cannot retroactively redesign the rudder mechanisms to improve their reliability."

So, really, I do not necessarily mind Toyota being trashed on the media. However, if the allegation is that Toyota is slow to react, I want to know what Toyota is slow in comparison to. And if Toyota has all these complaints against it, I want to know what are the numbers for other car manufacturers as well. Otherwise, how can anybody be sure this is not a smearing campaign that is out of touch with reality?

Andres Valloud - Assessments 1.27 and 1.28

I just published Assessments 1.27 and 1.28 to the public Store repository. Here are the changes:
  • Support for test skipping based on resource (prerequisite) availability. This feature should be available in SUnit 4.x.
  • Support for the latest resource (prerequisite) check sorting in SUnit and SUnitToo.
  • Slimmed down the execution stack down to one exception handler, simplified the execution model a bit.
Enjoy!

February 05, 2010

Chris Thorgrimsson - Component rotation…the final stages


In my last post, I previewed the early stages of my cairo (I was told it’s “cairo” not “Cairo”…) component rotation functionality using the GUI Painter Tools. This post will deal with how it has evolved over the past few weeks. The main evolution of my work has been around the rotation slice that I mentioned in the last post. It has now turned into the Transform slice. Just as the Position slice is the interface to configure your layout, my Transform slice is the interface to configure the TransformWrapper.

A picture of the Transform Slice

The Transform Slice

Since there would be way too much typing to explain it all, if figured I would make my first narrated video.  I have a couple of comments before you watch it. During the video, the component I am playing with has its container’s bounds set to visible. This was to demonstrate how the container’s bounds were changing as I manipulated the transform. The Details slice that is not shown in the video does give the user the option to set border visibility on both the container (border always vertical and horizontal) and/or the component (border moves with the component).

Now that the slice is in good shape, it’s time for some code cleanup and a bit more documentation. I hope to have a bundle ready to publish to the Cincom public store in a couple of weeks.

Transform Tool Demo 1

James Foster - Scaling Objects Videos

James Foster - Video: Garbage Collection Q&A


This video records few questions and answers. How effective is the mark-sweep? Which objects will be found? Does garbage collection reduce the size of the extent? How can you reduce the size of the repository? How do you manage a “warm” standby for quick recovery?

This is the final video from the GemStone/S tutorial at the Smalltalks 2009 conference in Buenos Aires.

Torsten Bergmann - Monticello, Metacello ... Metaceller

Metacello is a nice package management system for Monticello in Pharo.
There are already various configurations for well known packages available in the MetacelloRepository project.

With a pharo image installed Metacello can be used to load a specific (or the latest) versions of Seaside:

  Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfSeaside30';
load.

(Smalltalk at: #ConfigurationOfSeaside30) loadLatestVersion


Tudor Girba now created a basic version of a browser called "Metaceller" for managing Metacello configurations that are already loaded in the image. Read more here.

To load in Pharo evaluate:

 Gofer new 
squeaksource: 'glamoroust';
package: 'ConfigurationOfGlamoroust';
load.
(Smalltalk at: #ConfigurationOfGlamoroust) perform: #loadDefault.

After loading you can open the tool using:

 GTMetaceller open

James Robertson - [Smalltalk Tidbits, Industry Rants] Getting Started with Cairo

I have a post up detailing the basic steps to getting started with Cairo Graphics in Smalltalk, right up to the "make sure it works" step. Next week, I'll be doing some screencasts on this stuff.

Technorati Tags: ,

JR's Smalltalk Daily - Smalltalk Daily 02/05/10: WriteBarriers

A simple example demonstrating how to use WriteBarriers to track object changes

Joachim Tuchel - Great summary on how to deploy a Pharo-based application

Torsten answers a question asked on the pharo-dev mailing list and gives a great and short overview of what you need to do if you want to deploy a Smalltalk Application developped in Pharo Smalltalk. It fits nicely for Squeak as well and is really a dense intro to deploying Squeak/Pharo as a stand-alone or a [...]

David A. Smith - Palm Pixi Rox

I just bought a new phone, and it wasn't an iPhone, but it is still very cool. I have been planning to buy an iPhone as my next communication device - all my friends have one. I am very glad that they no longer feel the urge to demonstrate how cool they are by showing me some stupid picture or new app on their iPhone - except for Frank, of course.

So why didn't I buy an iPhone? Well, it is a bit complicated. My family has five phones with Sprint. I actually had a Rumor, which is a pretty good texting phone, but not much use for anything else. I was reasonably happy with it, though the blue-tooth quality was pretty poor. It was not too useful in California - unless you are married to the governator. Sprint is pretty good for quality of reception, but I always thought the selections of their phones sucked. A few years ago, I decided I needed a Blackberry and tried to upgrade at Sprint. Believe it or not, they would not sell me one. They only sold them to businesses. Morons. I did buy a Blackberry from someone else and carried two phones. I dropped the Blackberry after a while, because I realized I could almost always check my email with my MacBook, even when I was traveling.

So why the new phone? Somehow, I must have either dropped or stepped on my Rumor. I had made two or three phone calls earlier in the day from my office. I put it in my pocket and went downstairs to talk to my wife and while I was talking to her I received another call. I took the phone out and pressed the answer button and then saw that it had a big crack in the center of the screen. Worse, the voice quality on the other end was totally garbled - like some sort of electronica convolution filter. It was basically toast. I needed my phone to work this week, as there are many things going on in my life (that I will be writing about soon) so whether I liked it or not, I had to go visit the Sprint store for a replacement.

When I got there I had a few nice surprises - first the selections of phones was not terrible. In fact it was getting interesting. No iPhone of course - this wasn't AT&T, but they had an Android phone and yes, they finally were offering Blackberries to real people, and a they had the new Palm WebOS-based phones. I was interested in the Google phone, but a friend of mine had just bought one and was trying to take some pictures in the bright sunlight. The screen was unusable. Also it was kind of big and bulky - sort of like what the old Soviet Union might build if they were trying to make an iPhone knock-off.

What really caught my eye was the Palm Pixi. It is the smaller and slightly cheaper brother to the Palm Pre (which had the very strange commercials last year). I like small phones, as I already carry too much hardware in my pockets. The Pixi was actually smaller than my old Rumor (which really wasn't that small) and it was a real smart phone. Better yet, Sprint was offering a hell of a data plan where my family's monthly costs, which did not include data, would actually drop with the new plan which did include it. The phone was $200 with a $100 rebate - including a new two year contract, but now, even that was pro-rated. Sprint is definitely getting aggressive.

So now the review of the Pixi. In a nutshell, it is terrific.

Here is a list of pros followed by cons:

Pros
- Setup was trivial. The guy at the Sprint store did most of the work and I had a working phone with all my contact info when I walked out.
- The phone perfectly integrates with Gmail, which is my main email connection these days. It pulled all of my contact info into the phone and I was immediately reading the most recent emails.
- It supports Google Calendar, which my wife and I share. And it issued calendar alerts. Very nice.
- It is quite small, but the built in thumb-keyboard is quite usable. It took a little getting used to, but it works fine and has a nicer feel than my Blackberry or my earlier RIM device. I do love the size - it is quite thin and feels very nice in my hands.
- Sprint's wireless network performance is great. I was at a Starbuck's with a friend of mine and wanted to show him a video I had posted to YouTube. He tried to access it with his iPhone, but I had it running on the Pixi well before he even had an connection. He never did get it to work, but he was using the AT&T network and not the local Wi-Fi.
- Web browsing works pretty good, given the size of the screen. Certain sites, like Boing Boing are excellent, because they have a mobile version automatically loaded. Amazon was a bit crappy, surprisingly.

Cons
- The text is too small, especially for us old guys.
- The sound volume is not quite loud enough, even with it maxed out.
- When I called my mother, she said the sound quality on her end was echo-y, like I was far away from the phone.
- I tried to read a PDF document using the included Adobe reader app, but it didn't word wrap, so this was basically a lost cause. Seriously - if I zoom into a document using PDF, you really need to provide an option to wrap the text so I don't have to scroll left and right.
- Camera quality is poor. Good enough for a random picture now and then, but it won't replace my Casio Exilim.
- Takes a long time to charge (maybe 4-5 hours?)
- Charge lasts about 3 days with use. Since it was a new phone, I probably did more with it than I normally will in the future, so this probably caused the battery to drain quickly.
- Some apps re-orient based on the orientation of the phone. Others don't.
- It really needs a search app that has instant access.

Overall, this is a great non-Android Google phone. It is really nice how cleanly and easily it interfaces with my Google life. And I love the size. It is really quite elegant. It has only been three days now, so let's see how it holds up over the next few months.

As an aside, I had a rental car last week - a Ford Flex. This included the Microsoft Sync software. I might comment more on this later, but short answer - it was terrible. I actually liked the car (more of an SUV actually), but this software was really opaque. After linking it to my now sadly demised phone via BlueTooth I could not figure out how to get to the phone interface to make a call. I nearly had an accident trying to figure this thing out. I never did figure out how to use the built-in GPS for directions. Luckily I had my Garmin Nuvi with me. Sync is Bad Bad Bad. If anyone from Ford is reading this - I did like the Flex, but will never buy anything with Sync installed.

February 04, 2010

Douglas Putnam - PHP vs Ruby vs Python vs C vs C++ vs Java vs Lisp: Reserved Words

A reserved word in a programming language is a word that is off limits to the programmer. For example, in PHP print is a reserved word. This means that you, as the programmer, cannot create a function named print because PHP owns that word.

Most languages have reserved words, some a few, and some very, very many. Usually the fewer reserved words a language has, the more flexible it is. For example, in the list below, you will see that Lisp has no reserved words. We all know that Lisp is very flexible and powerful.

As you look at the table below, do not think unkind thoughts about PHP—it’s different from the other languages. It is not designed to be a general purpose programming language, though it can certainly do almost anything you want it to do. It is intended for web programming, which explains the existence of so many of the predefined functions and constants. Those are exactly the kinds of items that other languages must implement individually if they want to be as handy with web development as PHP. This is no small task, kids. Just take a look around try to find a web site implemented in C++.

Reserved Words

Language Count Reserved Words
Lisp 0 Lisp has no reserved words. Lisp is written in Lisp. Alan Kay, the creator of Smalltalk, said: “Lisp isn’t a language, it’s a building material.”
Smalltalk 5 self super nil true false
C 32 auto break case chart const continue default do double else enum extern float for goto if int long register return short signed sizeof static struct switch typedef union unsigned void volatile while
C++ ~62 and and_eq asm auto bitand bitor bool break case catch char class compl const const_cast continue default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable namespace new not not_eq operator or or_eq private protected public register reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq
Ruby 38 alias and BEGIN begin break case class def defined? do else elsif END end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield
Python 31 and del from not while as elif global or with assert else if pass yield break except import print class exec in raise continue finally is return def for lambda try
Java 47 abstract do if package synchronized boolean double implements private this break else import protected throw byte extends instanceof public throws case false int return transient catch final interface short true char finally long static try class float native strictfp void const for new super volatile continue goto null switch while default assert
PHP 418 __CLASS__ __COMPILER_HALT_OFFSET__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __PHP_INCOMPLETE_CLASS ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5 ABDAY_6 ABDAY_7 ABMON_1 ABMON_10 ABMON_11 ABMON_12 ABMON_2 ABMON_3 ABMON_4 ABMON_5 ABMON_6 ABMON_7 ABMON_8 ABMON_9 ABSTRACT ALT_DIGITS AM_STR AND ARGC ARGV ARRAY AS ASSERT_ACTIVE ASSERT_BAIL ASSERT_CALLBACK  ASSERT_QUIET_EVAL ASSERT_WARNING AUTH_TYPE BREAK CASE CASE_LOWER CASE_UPPER CATCH CFUNCTION CHAR_MAX CLASS CLONE CODESET CONNECTION_ABORTED CONNECTION_NORMAL CONNECTION_TIMEOUT CONST CONTINUE COUNT_NORMAL COUNT_RECURSIVE CREDITS_ALL CREDITS_DOCS CREDITS_FULLPAGE CREDITS_GENERAL CREDITS_GROUP CREDITS_MODULES CREDITS_QA CREDITS_SAPI CRNCYSTR CRYPT_BLOWFISH CRYPT_EXT_DES CRYPT_MD5 CRYPT_SALT_LENGTH CRYPT_STD_DES CURRENCY_SYMBOL D_FMT D_T_FMT DAY_1 DAY_2 DAY_3 DAY_4 DAY_5 DAY_6 DAY_7 DECIMAL_POINT DECLARE DEFAULT DEFAULT_INCLUDE_PATH DIE DIRECTORY_SEPARATOR DO DOCUMENT_ROOT E_ALL E_COMPILE_ERROR E_COMPILE_WARNING E_CORE_ERROR E_CORE_WARNING E_ERROR E_NOTICE E_PARSE E_STRICT E_USER_ERROR E_USER_NOTICE E_USER_WARNING E_WARNING ECHO ELSE ELSEIF EMPTY ENDDECLARE ENDFOR ENDFOREACH ENDIF ENDSWITCH ENDWHILE  ENT_COMPAT ENT_NOQUOTES ENT_QUOTES ERA ERA_D_FMT ERA_D_T_FMT ERA_T_FMT ERA_YEAR EVAL EXCEPTION EXIT EXTENDS EXTR_IF_EXISTS EXTR_OVERWRITE EXTR_PREFIX_ALL EXTR_PREFIX_IF_EXISTS EXTR_PREFIX_INVALID EXTR_PREFIX_SAME EXTR_SKIP FINAL FOR FOREACH FRAC_DIGITS FUNCTION GATEWAY_INTERFACE GLOBAL GROUPING HTML_ENTITIES HTML_SPECIALCHARS HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_HOST HTTP_REFERER HTTP_USER_AGENT HTTPS IF IMPLEMENTS INCLUDE INCLUDE_ONCE INFO_ALL INFO_CONFIGURATION INFO_CREDITS INFO_ENVIRONMENT INFO_GENERAL INFO_LICENSE INFO_MODULES INFO_VARIABLES INI_ALL INI_PERDIR INI_SYSTEM INI_USER INT_CURR_SYMBOL INT_FRAC_DIGITS INTERFACE ISSET LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LIST LOCK_EX LOCK_NB LOCK_SH LOCK_UN LOG_ALERT LOG_AUTH LOG_AUTHPRIV LOG_CONS LOG_CRIT LOG_CRON LOG_DAEMON LOG_DEBUG LOG_EMERG LOG_ERR LOG_INFO LOG_KERN LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 LOG_LPR LOG_MAIL LOG_NDELAY LOG_NEWS LOG_NOTICE LOG_NOWAIT LOG_ODELAY LOG_PERROR LOG_PID LOG_SYSLOG LOG_USER LOG_UUCP LOG_WARNING M_1_PI M_2_PI M_2_SQRTPI M_E M_LN10 M_LN2 M_LOG10E M_LOG2E M_PI M_PI_2 M_PI_4 M_SQRT1_2 M_SQRT2 MON_1 MON_10 MON_11 MON_12 MON_2 MON_3 MON_4 MON_5 MON_6 MON_7 MON_8 MON_9 MON_DECIMAL_POINT MON_GROUPING MON_THOUSANDS_SEP N_CS_PRECEDES N_SEP_BY_SPACE N_SIGN_POSN NEGATIVE_SIGN NEW NOEXPR NOSTR OLD_FUNCTION OR P_CS_PRECEDES P_SEP_BY_SPACE P_SIGN_POSN PATH_SEPARATOR PATH_TRANSLATED PATHINFO_BASENAME PATHINFO_DIR NAME PATHINFO_EXTENSION PEAR_EXTENSION_DIR PEAR_INSTALL_DIR PHP_AUTH_DIGEST PHP_AUTH_PW PHP_AUTH_USER PHP_BINDIR PHP_CONFIG_FILE_PATH PHP_CONFIG_FILE_SCAN_DIR PHP_DATADIR PHP_EOL PHP_EXTENSION_DIR PHP_INT_MAX PHP_INT_SIZE PHP_LIBDIR PHP_LOCALSTATEDIR PHP_OS PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END PHP_OUTPUT_HANDLER_START PHP_PREFIX PHP_SAPI PHP_SELF PHP_SHLIB_SUFFIX PHP_SYSCONFDIR PHP_USER_FILTER PHP_USER_FILTER PHP_VERSION PM_STR POSITIVE_SIGN PRINT PRIVATE PROTECTED PUBLIC QUERY_STRING RADIXCHAR REMOTE_ADDR REMOTE_HOST REMOTE_PORT REQUEST_METHOD REQUEST_TIME REQUEST_URI REQUIRE REQUIRE_ONCE RETURN SCRIPT_FILENAME SCRIPT_NAME SEEK_CUR SEEK_END SEEK_SET SERVER_ADDR SERVER_ADMIN SERVER_NAME SERVER_PORT SERVER_PROTOCOL SERVER_SIGNATURE SERVER_SOFTWARE SORT_ASC SORT_DESC SORT_NUMERIC SORT_REGULAR SORT_STRING STATIC STDCLASS STR_PAD_BOTH STR_PAD_LEFT STR_PAD_RIGHT SWITCH T_FMT T_FMT_AMPM THIS THOUSANDS_SEP THOUSEP THROW TRY UNSET USE VAR WHILE XOR YESEXPR YESSTR LASS__ __COMPILER_HALT_OFFSET__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __PHP_INCOMPLETE_CLASS ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5 ABDAY_6 ABDAY_7 ABMON_1 ABMON_10 ABMON_11 ABMON_12 ABMON_2 ABMON_3 ABMON_4 ABMON_5 ABMON_6 ABMON_7 ABMON_8 ABMON_9 ABSTRACT ALT_DIGITS AM_STR AND ARGC ARGV ARRAY AS ASSERT_ACTIVE ASSERT_BAIL ASSERT_CALLBACK ASSERT_QUIET_EVAL ASSERT_WARNING AUTH_TYPE BREAK CASE CASE_LOWER CASE_UPPER CATCH CFUNCTION CHAR_MAX CLASS CLONE CODESET CONNECTION_ABORTED CONNECTION_NORMAL CONNECTION_TIMEOUT CONST CONTINUE COUNT_NORMAL COUNT_RECURSIVE CREDITS_ALL CREDITS_DOCS CREDITS_FULLPAGE CREDITS_GENERAL CREDITS_GROUP CREDITS_MODULES CREDITS_QA CREDITS_SAPI CRNCYSTR CRYPT_BLOWFISH CRYPT_EXT_DES CRYPT_MD5 CRYPT_SALT_LENGTH CRYPT_STD_DES CURRENCY_SYMBOL D_FMT D_T_FMT DAY_1 DAY_2 DAY_3

James Foster - Video: Epoch GC, Offline GC, and Multi-Machine


This short video gives a brief description three topics.
“Epoch” garbage collection is a variation on repository-wide garbage collection in which only objects created or modified during a specified period (“epoch”) are scanned. If young objects are more likely to be dereferenced, then this can be much more efficient than a full database scan.
“Off-Line” garbage collection is a variation on repository-wide garbage collection in which the most time- and resource-consuming steps are done on a backup of the database, with intermediate data structures imported into the main database to complete the process.
Multi-machine configuration allows virtual machines (“Gems”) to run on a host separate from the Stone host. This requires a shared page cache (SPC) on the remote machine, and various extra processes on both hosts. While more complex, it does allow significant scaling—with one customer using hundreds of machines all connected to a single database.

JR's Smalltalk Daily - Smalltalk Daily 02/04/10: Native Printer Dialog Use on Windows

Demonstrates how to create a Document object and print it using the native print dialog on Windows (rather than the default printer, which is what will normally happen).

Pharocasts - Code history tools

  • Browse versions of a method
  • Recover lost changes
  • Code versioning with Monticello and a local repository

Download screencast (800x600): .mpeg, 18.4 MB, .mov, 27.8 MB

Andres Valloud - SuperPower oneWayBecome: SuperResponsibility

So let's say you like super powers, right? Execute the following code.

    a := ClassA new.
    ClassA oneWayBecome: ClassB

What should be the response to the following expression?

    a class

Really? Why? :)...

February 03, 2010

James Robertson - [Smalltalk Tidbits, Industry Rants] Smalltalk in Ottawa

Dave Buck relays news of Cincom customer Igor Dmytryk talking about the trading system at EDC at the next Ottawa STUG, on Feb 10:

The core trading platform used by the Treasury group at Export Development Canada is written in Smalltalk. The system has been under constant development for over 10 years. The talk will demo the system and cover aspects of our development methodology, testing and future plans.

Follow the link for details.

Technorati Tags: ,

David Buck - Smalltalk at EDC

Smalltalk at EDC
Igor Dmytryk
The core trading platform used by the Treasury group at Export Development Canada is written in Smalltalk. The system has been under constant development for over 10 years. The talk will demo the system and cover aspects of our development methodology, testing and future plans. RSVP required.

Location: Meet at main lobby of EDC
151 O'Connor, Ottawa
Wednesday, Feb 10th, 2010 at 6:00pm

RSVP is mandatory for this event so Igor can make arrangements with security

Please RSVP to david@simberon.com if you plan to attend.

%FEFF

James Foster - Gem Startup Process


A frequent area of confusion in GemStone/S is the use of ports for the NetLDI when starting a remote gem. The Gem startup process is somewhat complex; describing it takes an hour or so of the Advanced Configuration class. I’ll see if I can condense it…

  1. A GCI client (Topaz, GemTools, Jade, VW/VA, etc.) contacts the NetLDI on a host/port. The port can be specified by number (e.g., 50377) or by name (e.g., gs64ldi) in which case it should be in the client and server services file with the same name/number. This port is defined implicitly by the name provided to the startnetldi command. If no name is provided, then the default of ‘gs64ldi’ is assumed. This port is unrelated to the port range provided as an optional argument (described later).
  2. The GCI client requests a service from the NetLDI; generally this is a new Gem using the script ‘gemnetobject’. The NetLDI puts the GCI client “on hold” while it starts up the new Gem. This conversation resumes at step #8.
  3. The NetLDI listens on a new random port for a callback (see #5).
  4. The NetLDI starts the Gem and passes it the port number from #3.
  5. The Gem calls the NetLDI on the port from #3 to request further instructions.
  6. The NetLDI tells the Gem that a GCI client wishes to make contact and that it should listen for the GCI client. If a port range is specified, then the NetLDI will select a port from the range and tell the new Gem to listen on that port. If no port range is specified then the Gem will allow the OS to pick a port at random.
  7. Using the connection established in #5, the Gem tells the NetLDI which port it is listening on (from #6). The connection from #5 is then closed.
  8. The NetLDI returns to the GCI client (using the connection established in #1 and put “on hold” in #2) and tells it what port to use to contact the Gem (the port number from #6). The connection between the GCI client and the NetLDI is then closed.
  9. The GCI client initiates a call to the Gem on the same host as the NetLDI but on a different port–the port on which the Gem is listening. That port number will be one selected by the NetLDI if a port range is specified or one selected by the OS if no port range is specified.
  10. The Gem accepts the connection from the GCI client and the GCI client provides login information (Stone NRS, userID, password, etc.).

Note that there are three (3) connections involved: (1) from the GCI client to the NetLDI; (2) from the Gem to the NetLDI; and, (3) from the GCI client to the Gem. The first connection is on the official NetLDI port that should be in the services file for each machine (gs64ldi/50377). The second connection is on a random port and there are no naming issues because it is completely self-contained in one host. The third connection is the one that can be random or can be limited to a particular range (using the -p50378:50378 argument to the startnetldi command). If there is a firewall on the server, then the ports for connections 1 and 3 need to be open to calls initiated from outside the server.

There are additional complexities. If the GCI client and the NetLDI are on the same host, then the named NetLDI does not need to be in the services file. Also, in steps 9/10 there are actually two connections, a primary one and an “out-of-band” connection. Furthermore, I could have gotten some of this wrong, but I think there is enough right to explain the difference between the number in the services file and the number in the port range.

James Foster - Video: Nine Steps in Repository-Wide Garbage Collection


This video starts with a description of “Shadow Objects,” objects for which a newer version has been saved in a later transaction. Then we move to the nine steps of repository-wide garbage collection:

  1. Mark/sweep (to identify live objects);
  2. Object table sweep (to create a list of possible dead);
  3. Record possible dead;
  4. Voting on possible dead by current gems;
  5. Finalize voting (on behalf of recent commits);
  6. Read possible dead objects (cleanup);
  7. Promote to dead (transition);
  8. Dead object reclamation; and
  9. Return of pages and object IDs to the free pool.

Understanding these steps and being able to identify where we are in the process is very important to managing a production database since GC may require significant resources.

James Robertson - [Smalltalk Tidbits, Industry Rants] Smalltalk Conferences in Europe

If you've registered for one of the Smalltalk events we have coming up (in Paris and London), you may well have gotten inaccurate information in the confirmation email. It looks like the times are off by 5 hours (London) and 6 hours (Paris). The events run from 9 AM - 1 PM local time in both locations.

The addresses you received are fine; just be careful about the times :)

Technorati Tags: ,

JR's Smalltalk Daily - Smalltalk Daily 02/03/10: JSON Support in WebVelocity 1.0

A look at the JSON support built into WebVelocity 1.0

February 02, 2010

James Foster - Name and Location of GCI Library


Because GemStone Smalltalk does not have a native GUI, most developers use a “client” Smalltalk with some tools that give access to the “server” Smalltalk. Traditionally, this has been GemBuilder for Smalltalk (GBS) installed into a VA Smalltalk or VisualWorks client. With the advent of GLASS (and a no-cost license for GemStone/S 64 Bit), tools are also available for Squeak/Pharo (named GemTools).

Because it is non-trivial to set up a local Squeak/Pharo system, we have provided a pre-build “one-click” download that works on Linux, Macintosh, and Microsoft Windows. Of course, once something like this is made, it is immediately out-of-date and it becomes a challenge to provide updates. Updates to GemTools itself, while significant, are at least confined to executing Smalltalk code in the client. Updates to the client environment are, however, more complex. Also, there are those who want to build things from scratch so as to better understand what is going on.

A further complication is that once you a working environment, you are less likely to rebuild it from scratch. This leaves the frustrating experience that “it works for me” and “when I followed the instructions I get a different result.” In our case, the instructions refer to third-parties (the Squeak/Pharo web sites) and simply direct you to follow their download and install instructions. When those instructions change—or the things being installed change—the results are likely to change (and not for the better!). It was into this pit that Friedrich fell a few days ago. He faithfully followed the instructions, but got a different result from those of us who followed the instructions sometime earlier.

Given that Squeak/Pharo is an open-source project and is rapidly developing (and diverging?), keeping GemTools up-to-date is a major challenge. One of the biggest challenges is related to the external library that is used on the client to interact with the server. The name and location of the library seems to be different for each platform and VM. Debugging these problems is particularly challenging, since one gets little more than the error “Unable to find function address.”

As of the date of this blog post, the Pharo download page provides two sources for a client virtual machine. One takes you to a place to get builds of Squeak-3.11.3.2135 for various operating systems, including Linux; the other immediately downloads pharo-vm-0.15.2f-linux.zip. If you take the “Pharo” VM, things work; if you take Squeak-3.11.3.2135, then things don’t work. It turns out that the latest Squeak VM has a change in how external libraries are referenced.

When the new VM was released, Ian Piumarta included a release note:

Plugin search stretegy rationalised and simplified.  Default location is now the executable directory (where ’squeakvm’ is installed).  The -plugins argument can be a colon-separated list of locations to search, just like PATH.  Plugins are named ’so.plugin’ to make interference with FFI libraries less likely.

Thus, we need to change not just the location of the library, but also its name. Instead of putting ‘gciForLinux.so’ next to the image, you now need to put ’so.gciForLinux’ next to the virtual machine. Furthermore, when opening the library you need to leave off the ’so.’ prefix.

So, if you are using Squeak-3.11.3.2135, put ’so.gciForLinux’ next to the VM, and edit GciLibrary>>#’moduleName’ as follows:
GciLibrary>>#moduleName
| path |
self isOnWindows ifTrue: [^'gciForWindows.dll'].
self isOnMacintosh ifTrue: [^'gciForMacintosh.so'].
self isOnLinux ifFalse: [self error: 'Unknown platform!'].
path := SmalltalkImage current vmPath , 'so.gciForLinux'.
(FileDirectory new fileExists: path) ifTrue: [^'gciForLinux'].
^'gciForLinux.so'.

Once this is done, the client should be able to interact with the GCI library. We should be able to update GemTools with this method soon.

James Foster - Video: Live and Dead Objects


This video introduces the topic of garbage collection (GC), one of the more complex subjects in GemStone Smalltalk. There are two types of GC: (1) in a local virtual machine (the Gem), and (2) across the entire Repository (persistent objects). “Live” objects are objects that are referenced from a persistent root. “Dead” objects are those that are not referenced from a persistent root. To identify live objects, we need to start from a system-defined well-known root (AllUsers, the collection of UserProfile instances) and identify each referenced object. This process can take hours or days.

JR's Smalltalk Daily - Smalltalk Daily 02/02/10: RESTful Web Services in Seaside

A simple RESTful web service built in Seaside 3.0

Joachim Tuchel - Neuer Smalltalk-Stammtisch: Köln

Bisher gab es in Deutschland zwei Smalltalk-Stammtische: den Anfang machte vor einigen Jahren Frankfurt, allerdings ist es ein bisschen ruhiger um diesen Stammtisch geworden. Sehr viel aktiver ist der Münchener Stammtisch, der sich wirklich regelmässig trifft, und fast immer mit sehr interessanten Themen aufwarten kann, also eigentlich viel mehr ist als nur ein gemeinsames Bier [...]

February 01, 2010

James Foster - Video: The Stone Process


This video describes the ‘Stone’ process in the GemStone Smalltalk system. The Stone allocates resources (object identifiers, free extent pages in the repository). The Stone manages the object lock requests. The Stone manages gem-to-gem communication. The Stone manages the commit process, including notifying gems that are interested in changed objects. The Stone supervises garbage collection, including the commit record backlog. The Stone manages checkpoints, the act of flushing all dirty pages from the shared page cache to the extents.

Torsten Bergmann - Smalltalk meetup in Cologne

There is a Cologne Smalltalk User Meetup on 18th of February.
Read more here.

Miguel Cobá - Seaside book - PDF version

Just announced on the Lukas Renggli’s blog:

The PDF version of the book Dynamic Web Development with Seaside is available to download now:

http://book.seaside.st/book/introduction/pdf-book

At the end of the payment process (PayPal) you will be redirected to the download area where you are able to get the latest builds of the PDF version of the book. If you bookmark the page you will be able to download fixes and extra chapters as we integrate them into the online version. By buying the PDF version you support our hard work on the book.

We wish to thank the European Smalltalk User Group, inceptive.be, Cincom Smalltalk and GemStone Smalltalk for generously sponsoring this book. We are looking for additional sponsors. If you are interested, please contact us. If you are a publisher and interested in publishing this material, please let us know.

So if you’re looking for a updated reference to Seaside, this is the book to have. Support the effort by purchasing a copy in PDF version. Also, soon they will have this version available in lulu so that if you prefere the dead-tree version, you’ll also soon have access to it.

Ramon Leon - Dynamic Web Development with Seaside PDF Available for Purchase

Reposted from Lukas Renggli blog:

The PDF version of the book Dynamic Web Development with Seaside is available to download now.

At the end of the payment process (PayPal) you will be redirected to the download area where you are able to get the latest builds of the PDF version of the book. If you bookmark the page you will be able to download fixes and extra chapters as we integrate them into the online version. By buying the PDF version you support our hard work on the book.

We wish to thank the European Smalltalk User Group, inceptive.be, Cincom Smalltalk and GemStone Smalltalk for generously sponsoring this book. We are looking for additional sponsors. If you are interested, please contact us. If you are a publisher and interested in publishing this material, please let us know.

So please, support the Seaside community and buy the book, I know I will.

Pharocasts - Deploy on Seaside Hosting

Tips & Tricks seaside blog is now online. Here is the making-of !

Note: this screencast is the third part of a Seaside 2.8 serie:

  1. Seaside blog
  2. RSS feed with Seaside

Download screencast (800x600): .mpeg, 13.7 MB, .mov, 16.2 MB