Showing posts with label Smalltalk. Show all posts
Showing posts with label Smalltalk. Show all posts

Wednesday, April 10, 2013

Smalltalk config candour

What follows is my reply to an exasperated Smalltalker :
CC  rider : config issues are as old as commercial Smalltalk ; I keep an entire mail bin of these (separate from 'user' or 'tips' conversations.) At least this is not
                    eclipse+CVS+Java+open-source !
I work in a very advanced commercial OOP created by MIT Lisp gurus and THAT IDE has package circularity issues that have to be addressed by developers who push beyond the pre-tested envelope.
Does the issue exist for commercial PROLOG implementations with packages ? That would be amusing .... (there had been SOUL and QSOUL projects for Squeak as well as a Prolog and then Lisp for Squeak )
I would not be surprised to find packaging issues with functors in Mozart/Oz ! And I could check the Mercury dev mailing list ... (Mercury - which can gen Erlang code ! )
The Puppy Linux folks have a real challenge in getting tools into their light Linux ... but so far so good (mostly) - I say "mostly" as I cannot get the ObjectIcon IDE to run in their JWM X ... but Icon with objects could be used to address that very config issue in a maintainable, readable fashion !!!
Practical computing : tasks which keep our sense of irony well-honed ;-) (even without management)
Needed : Pre-Factoring browsers ! ;-)
and please do keep smiling ... but only if the crows' feet crinkle at the edges of the temples ...

Thursday, June 9, 2011

Squeak MVC

At squeak.org the blurb for 4.2 says
  and legacy MVC support
but the first test that I make gives a ScheduledControllers that is nil.
Both BitEditor and FormEditor appear unusable.
I looked in Monticello and the Universe browser but I see no relevant package to retrieve.
The package ToolBuilder-MVC retains this gem:
isActiveBuilder
"Answer whether I am the currently active builder"
"This is really a way of answering whether 'Smalltalk isMVC'"
ScheduledControllers ifNil:[^false].
So something is amiss.  I am looking for a dependency framework - events, or Announcements or whatever in this image.

In Kernel-Objects package the Object class has a class variable DependentsFields.

In Kernel-Model package Model has an instance var named dependents.

But I see no tests for MVC.

There had been a Tweak package and a code.google.com project to revive MVC in Squeak.  Perhaps more interesting is Announcements in Pharo and the coming changes to Model-View-Presenter in Dolphin Smalltalk.

Abstractions are needed.  MVC could be complex and Morphic seems best for direct manipulation rather than for traditional GUI applications.  I like the admissions made at Dolphin for their candor - and I like working in Dolphin when all that I need is a Windows app or tool over at http://apps.logiquewerks.com/ST

note:  the method >>isMVC  is not available.

BUT.  There is an answer.  You need to start a new project which is an MVC project.

And now you are in as old a Smalltalk as you can imagine: an ST-80.  Oh vey.  This is not offering an MVC option.  This is a collapsible Model-A in the cargo space of your auto-plane.

This is not Smalltalk the programming environment, but Smalltalk the split-environment for a house divided among partisans, some laboring under a tax of 90%, some under a flat-10%.

Tuesday, April 12, 2011

Seaside Tutorial and Lulu eBook

 
I don't recall posting a link to this tutorial for Seaside for Smalltalk.

There is also a Lulu book.

There are many thinks going on in Smalltalk these days (Cog VM, Roar VM, Pharo, revival of instantiations.com) but Seaside, like SOUL, is one of the best indications of the strength of Smalltalk as compared to Java, Ruby or Python.

I noted with annoyance that there is almost no mention of Smalltalk in the VM article on en.wikipedia.org  — the reader would think it all began in Java!

Friday, February 18, 2011

Squeak Smalltalk 4.2

Squeak Smalltalk 4.2 is now available at http://squeak.org as a single bundle "app".

I find the more conventional IDE to be to my liking - a click on a menubar selection opens a window.  On my Windows box this gave a much more conventional feel which, for better or worse, is now the common desktop look and likely an aid both to productivity and to ease of adoption.

This version is designed to be compatible with the coming "Cog" VM so additional performance improvements can be expected soon.

The main alternative 'squeak' is now http://pharo-project.org where Traits from Self have been brought into Smalltalk as an alternative to AOP and Mixins.  The awaited Pharo 1.2  is expected soon.

Both Squeak and Pharo are compatible with the Seaside 3.0 web application framework.

Tuesday, December 21, 2010

Tcl EventLoop

TIP #379: Add a Command for Delivering Events Without Tk


Seen at http://www.tcl.tk/cgi-bin/tct/tip/ as a Tcl Improvement Proposal.

Compare: Smalltalk's new Announcements framework or Curl's Sonntag.

A blog note regarding Dolphin Smalltalk.

Monday, December 20, 2010

Seaside versus Aida

The Aida 6 web framework is rather different in objectives than Seaside 3 as a Smalltalk application server. My specific interest was to determine to what extent the services for web applications were orthogonal to any given web markup.  Both default to HTML but I am looking at frameworks suitable for emitting declarative Curl markup using the Curl web content language (originally MIT and now Sumisho.)

Both frameworks loaded fine into Pharo as Metacello configured packages and both had gotchas which required some experience in Smalltalk - unlike the Gofer and Metacello tools themselves.

What was distinctive in Aida was the need to make changes across many framework classes - and in Pharo Smalltalk, I can see no way to move new methods for base classes into my packages other than the *extensions mechanism.

The worst problem was an >>initialize method which started with super initialize and then failed to call a private method - the one mechanism that permits a subclass to override initialize properly ( I will submit my change as a fix.)

A serious problem was the lack of critical cleanup and reset methods ( I only needed to add one to Seaside for WAKom.)  I will submit these to the Aida team.

You will not want to try to prototype anything in Aida without using the process browser tool and without running a set of >>allInstances sanity-check mthods.

The proliferation of objects comes from inadequate cleanup - but in a Version 6 of Aida may reflect the reliance on loading packages into base images.  This is terrific for PITL but Smalltalk was always great for prototyping and that almost means maintaining a 'working' image - which is one way to spot objects that hang around.

In the early days of Seaside my rule was to discard any image in which Seaside had launched.  For anything other than prototyping, Aida would mean working from a close-to core base image.  That's just my take on what I saw after running two subclasses of SwazooSite in the same image, stopping, saving, quitting, launching ST.

And all bets are off until I have seen what a production image looks like - in the old days this was a matter of "stripping" images down - but we should now be in the age of building core images up.

I say that with a clear awareness of just how tiny servers can be in other alternative languages - such as Rebol - aside from any issues of code getting reused, code being understood and code being maintainable.

In the positive column: Aida has achieved a dialect for composing web pages which I think is on a par with Seaside.  But Rebol is also great at dialecting ... so dialecting is not enough.

In secure corporate environments where Curl shines, I remain concerned with the use of a pharo.st file at startup.  On the other side of that coin, the Aida tag method looks as if it should be reading from a resource file as adding a new tag should not always be a matter of changing framework level code.

At this time I have more of Curl running under Seaside but neither have the equivalent of 'halos' in Curl yet - so the jury is still out on a Smalltalk web framework for Curl markup.

Curl has great prospects in Asia, the subcontinent and Africa (most professional Curl developers are in India and Japan) wherever security is paramount.

My current work has moved from "eyes-only" document browsing* to "dark documents" on analogy with "dark matter": shedding light on a file directory or a DB table does not reveal them.  The key is to make "dark documents" run light in collaborative environments.  Both Smalltalk and Curl come with such excellent programmer facilities that they make a terrific match for prototyping a dark objects source and viewers.  And Curl has an exisiting inheritance mechanism near to Traits and no barrier to evolution away from classic OOP  (having been designed and implemented by MIT Lisp and Scheme experts at curl.com)

More to follow ...
* a early prototype for which there are links at logiquewerks.com and at aule-browser.com - both required the Curl runtime for the browser or the Curl REPL with scripted variants.
Enhanced by Zemanta

Sunday, December 19, 2010

Pharo Curl

It took some effort again to get Curl markup running as an alternative to HTML+JavaScript on Seaside 3.0 on Pharo 1.1.1 Smalltalk.

The worst nuisance was Seaside using a method named text: for the equivalent of stream nextPutAll: or document print

This is because text is a common declarative identifier in Curl markup.  But it is only an annoyance and without examing available selectors at runtime or usinf perform: I can't see a workaround while leaving Seaside intact.

What was vexing was to still have to modifiy the WAAdmin class to defeat HTML-bias built into the framework.  And one or two other known quirks.

If only Seaside would embrace Traits on Pharo Smalltalk!  Traits would make it so clear that the choice of markup can be separated from the choice to use continuations, to use halos ...

Traits might also reduce the reliance on the Decorator pattern.  In a language with late binding, this leads to odd code, such as assigning a stream to an object whose class name and instance identifier clearly mean that it is not a stream ( but of course it is a decorator of a stream.)

Traits might reduce the reliance on the visitor pattern whcih I think reduces the understandability of code far more than double-dispatch itself because of the proliferation of visitor classes.  It is no longer necessary to ake a virtue of that necessity ( dare we now say, 'limitation' ?)

Many things are improved in Seaside 3.0 so that overall flipping from HTML markup to Curl goes well in the details - especially in a reduced need to subclass where closed tags happen to be identical across HTML and Curl.

It was amusing to me this time to add crlf so as to get better formatted Curl markup to inspect using the Curl source inspector - and spc to put spaces into the markup layout itself (Curl ignores whitespace the same an HTML client.)

The one concession was to use txt: to dump plain text - but super was not enough to preserve a Curl text: tag - for that I had to look at the runtime class so blocks go to text: and strings go to the canvas encoder for printing.

Curl 'attributes' (properties and options) are laid out the same as Seaside HtmlAttributes so anyone who can layout HTML for Seaside can layout Curl while remaining on 'the gentle slope' of the Curl language when used for declarative web content markup.

It still may be that Aida will be a better home for Curl poetry markup on a Pharo Smalltalk web server.

Thursday, December 16, 2010

Silver Smalltalk

'Vista Smalltalk' is back as SilverSmalltalk !

There is a silversmalltalk blog and a test page at appspot.

I saw this good news at planet.squeak.org

In non-news, there seems to be a little delay in Squeak 4.2 with the Cog VM ... other coming releases that I have an eye on: UNICON, a Rebol3 beta, Converge 1.1.1 and seeing Tcl 8.6 get out of beta.  And I am waiting to see what is next in ObjectIcon ... and for any news on a Curl 8.0 aka curl9 from curl.com
Enhanced by Zemanta

Tuesday, December 14, 2010

Friday, December 10, 2010

Inspecting Global Variables in Pharo Smalltalk 1.1.1

I cannot resist posting this: it creates an interable collection of associations of all current global identifiers and their current types:

"A recipe from Squeak wiki at http://wiki.squeak.org/squeak/1824

Smalltalk keys select:
   [:k | ((Smalltalk at: k) isKindOf: Class) not]
     thenCollect:
        [:k | k -> (Smalltalk at: k) class]


"The code is in SystemDictionary's class comment."

Smalltalk implementations and VM's are evolving - but just compare what has to be done today in other dynamic languages to achieve the same ...

One notable exception is the Io Lobby object.  With a little care, the same result can be very succinct in Rebol 2.7.6. and even simpler in Rebol3.

Here is a node.js shell result on startup:
for (var s in process) { s}
'listeners'
In a Pharo One-Click I get an Array of 127 assocs.

Python does have dir(obj) which is hardly a Smalltalk inspection widget ...

in JavaScript there had been access to the Arguments object for a top-level function callee/caller to get into the activation/call object - But what will that kludge's fate be now that ECMAScript5 is here and Mozilla JavaScript 2.0 is coming?

In all fairness, in Smalltalk and Rebol the unwary traditionally can clobber anything.  But in Smalltalk you can inspect almost anything non-primitive - even during startup. And a bootstrapping JavaScript interpreter written in JavaScript achieves almost the same transparency.  See also: The avocado variant of Lively-Kernel.

see: JavaScript Function.call and Function.apply and ECMAScrip5 Function.prototype.bind

Sunday, November 7, 2010

Seaside Book at Lulu or as PDF

Seaside - the Book

Dynamic Web Development with Seaside, by Steph Ducasse

Available for charge as PDF or from Lulu as softcover.

Suitable for use with Pharo Smalltalk.

Pharo Smalltalk for Seaside on Windows, Mac and Linux

James Robertson of Cincom has a Pharo Smalltalk introduction on YouTube.

If you know JavaScript and ruby but never learned to work in a Smalltalk environment, this video is just one of a starter series called "Smalltalk For You".

And if you are taken with Pharo, you an go to their pages at code.google.com/p/pharo or start with Smalltalk Television.

Both Cincom Smalltalk and Pharo have taken to Seaside for Smalltalk.

The Pharo Smalltalk branch of Squeak Smalltalk requires itself to support the Seaside web development framework while focusing on Traits as an abstraction mechanism for programming to interfaces without deep inheritance subclassing.  With the advent of the Roar multi-core VM for Squeak Smalltalk, this should be an alternative to Scala.

For daily Smalltalk podcasts on Cincom Smalltalk and their variant development using the Seaside framework, see Cincom Smalltalk on Web Velocity.

For an alternative using Seaside, see Sea Breeze: YouTube has these links.

F-Script sorta Smalltalk Mac OSX Cocoa object scripting

This is just too cool - Smalltalk scripting for Cocoa objects on Mac OSX: F-Script

Here is a YouTube intro by Cincom's James Robertson in his series "Smalltalk for you"

Friday, July 23, 2010

disposable 10$ laptop to throw-away into recycling?

Years ago in a Byte article Alan Kaye conjectured on electronic paper - the prospect of a 10$ laptop is now in the BBC news. But it will run linux ... and which linux?

Wednesday, July 21, 2010

Java Smalltalk

When I'm between contracts I can end up in some odd "HR" conversations called "technical interviews."

Young Java team leads generally know nothing of Smalltalk (but they've heard tell of it), so they cannot believe that someone outside the fold would understand the difference of
  if  ( x == y )  {}
from
  if ( o.equals( obj ) ) {}
And yet this is the very difference that makes Smalltalk's IdentityDictionary suitable on one occasion and a mere Dictionary on another.

But how to talk about that to a Java interviewer? Better not to mention it. A Smalltalk Set of integer keys is not a Java Set.

And as for generics and Collections, best not to mention how long Curl (of http://www.curl.com/ ) had typed collections ( a Smalltalk abomination) and an {Iterator-of t:Type} class.  Or that Curl abstract classes with multiple inheritance an interface framework make.

There once was a day when COBOL developers could opt to work in Smalltalk on some banking and financial systems.  But would one of today's few Smalltalk teams be any too happy to be joined by someone with years in C++? Hmmm.  And some wonder why so little gets done in Logtalk or other specialized languages while talk goes on of "dialects" and "language-oriented programming".  What can multiple-paradigm languages such as Oz be taken for in the monoculture of C# and J2EE shops?  And all the while the scripting hares nibble quietly on their Python deployment scripts hidden from CIO- and CTO-view in over-grown weed patches ... called "integration" and "minifying" and "monitoring".

Perhaps it all stems from the obsession with mowing and trimming the chemically-perfected green lawn.  What humble vegetable gardener grows only the green bean, or only spuds? 

Monoculture.  Best practiced in the dark.  Now where was that Erlang posting? Hares, rabbits, meerkats ... it must be the O'R libra colophony.

Tuesday, May 25, 2010

Squeak Smalltalk 4.1


Could this be a Squeak right out of the box?

That is a menu bar with Projects, Tools, Extras, Windows, Help and a Search entry field. And where are the Fi$her-Price colours? (They are an option now.)

This is the influence of Gilad Bracha's Newspeak.  The release comes not long after Pharo Smalltalk went 1.0 (although I don't know the politics.)

The good news for Squeak and Smalltalk is that 4.1 has so many important changes which are not cosmetic. These include updated closures, even greater modularity (unload, reload), a new implementation of Traits from the folks who gave us traits. And a great many changes in the class hierarchy.  All of these listed when you click the green or the orange buttons on that "Welcome to Squeak 4.1" pane.

If you have wanted to learn Smalltalk, there are even more resources online now, including Pharo By Example. The first thing to know in Squeak or Pharo is to left or right click in that workarea background (the brushed aluminum-looking main window area.)

There will be other Smalltalk news coming when Vision Smalltalk appears (also known as DNG or Dolphin Next-Generation Smalltalk.)

It remains an oddity to me that Smalltalkers are still using Adobe PDF for their e-books .... see FotB.

Thursday, May 20, 2010

Cincom VisualWorks Smalltalk 7.7 and Seaside 3.0

About a week ago James Robertson began re-doing the >tutorial for Seaside 3.0 and Cincom VisualWorks Smalltalk 7.7.

An immediate problem arises if you installed an >NC image from Cincom without selecting "Preview" components for install: you will not have WriteBarriers.

Just connect Store to the Cincom repository, select Published and load WriteBarriers from down near the bottom of the list - I took the version at the top of the pile.

After that, the Package Manager loaded Seaside-All 3.0-3 with no complaint.

Now to see how often contentType is defaulting to 'text/html' ... (my interest in Seaside at the moment is for generating non-HTML content as Curl markup or 'text/vnd.curl')

PS
  Smalltalk Daily has a post on WriteBarriers.

Monday, February 22, 2010

Rebol 3, still alpha

Many mornings I begin in EeeBuntu linux on an Asus netbook and do
  cd rebol3
  ./r3
  upgrade
  chat
  n
first to see if there is another release of the alpha and then to check for new posts to the Rebol3 chat server.

It is not easy to form an opinion.  A rebol wiki, web pages and a text chat server appear to have become an immense anchor dragging in mud, impeding the entry of  a beta from being cleared into a safe harbour.

Perhaps the core of the Rebol code will see changes from struggles with a server, with multitasking issues, TCP/IP issues.  Perhaps an opinion could be informed by following the new rebol3 exchanges in the R3 world at altme.com

Maybe with economies so depressed, it is possible to imagine that there is no real urgency.  But the iPad is released an there is no Rebol option to Objective-C.

I am biased.  My interest is held more by ObjectIcon and Curl web content for poetry and poetry translation and for the last phases of adult foreign language learning.

There are other new languages of great interest: Io and Converge among others.  But as a web language, Rebol has always seemed to me to be an alternative to even Seaside in Smalltalk - and certainly an alternative to any language relying on regex.

It is not just that there is the imprint of one inventor over a group: that is the case with Io and with Falcon (the case of Icon after the death of Ralph Griswold is such a difficulty with at least three talented individuals on separate forks.)  In the case of Smalltalk, there was no standard and Self, Strongtalk or Slate were promising new directions - and now there is Io.

It may be that a beta with a graphical library is closer at hand than I am aware now that so many more developers are active in building modules for the R3 core.
And doubtless a Rebol 3.1 would be the version to await  for any major commercial project.

And in fairness, we are sure to see a Rebol 2.7.8 before Icon 9.5 - but still this has been a sobering story for anyone interested in the sociology of invention, if that is how best to understand such innovations  as computer programming languages on the edges or margins of science.  Not quite Esperanto and not the decoding of genomes.  An apposite analogy escapes me.

Monday, December 21, 2009

strongtalk Smalltalk: a new release

There is a new release of the strongtalk variant of Smalltalk at code.google

The story behind the Strongtalk team, Sun, Self, Netscape and Javascript is somewhat painful.

But thanks to the work of David Griswold we have a new Windows executable, a Mac OSX executable and easy builds on linux with gcc.

If you know anything about Smalltalk (or even the Tcl IDE bult in XOTcl) you will want to see the visionary strongtalk browser (especially if you have seen live code edits in Seaside web pages.)

Work also progresses on Self, the Sun LivelyKernel and Clean Slate Smalltalk.  Likely we are just plain lucky that Self and strongtalk escaped into open-source before Oracle acquired Sun.

Other recent Smalltalk notables: Cincom Web Velocity, Squeak Pharo, Iliad, Aida.
Notable Smalltalk-and-Actor inspired innovation: Io, the language.

Wednesday, August 26, 2009

Curl web content generated by Seaside 2.9

Today I tackled getting Seaside 2.9 alpha 4 sufficiently decoupled from HTML/XHTML to generate web content of MIME type 'text/vnd.curl'.

The Seaside alpha was installed in a Squeak 3.10 Smalltak image using a MonticelloCeonfigurations map from the folks at seaside.st

It was really satisfying to see a Curl application open in my browser with Seaside running as my localhost.

Now to get a "headless" version that can run as a server-side process to be maintained remotely ... that will start at seasidehosting.st