Archive for May, 2007

A reformed Curl for the curlr might be LcurlR

Thursday, May 24th, 2007

The Curl language has a lot to recommend itself as a web development language. But there are issues, among them the confusion of Curl with cURL. A google on LcurlR reveals no such issues.

Here is some Curl:

{ some-curl-code }

which you could think of as

Lcurl some-curl-code Rcurl

Here is a snippet from a Curl web applet:

{curl 3.0 applet}

{let name:TextField = {TextField max-chars = 30, value = “My name”},
address:TextField = {TextField max-chars = 60, value = “12635 Somestreet”},
city:TextField = {TextField max-chars = 50, value = “Plymouth-or-Gardena”},
state:TextField = {TextField max-chars = 20, value = “MN-or-CA”},
zip:TextField = {TextField max-chars = 14, value = “55441-or-90245″}
}

Because RSI is a reality and not just a TLA, here is the same snippet in LcurlR

{LcurlR 3.0 applet}

{let name:= {TextField max-chars = 30, value = “My name”},
address:= {TextField max-chars = 60, value = “12635 Somestreet”},
city:= {TextField max-chars = 50, value = “Plymouth-or-Gardena”},
state:= {TextField max-chars = 20, value = “MN-or-CA”},
zip:= {TextField max-chars = 14, value = “55441-or-90245″}
}

If you are stilll not convinced of the virtues of LcurlR syntactic sugar over Curl try

{define-proc public
{sphere-vertices-normals hres:int, vres:int}:
({Array-of FloatDistance3d}, {Array-of FloatDirection3d})
let vertices:{Array-of FloatDistance3d} =
{{Array-of FloatDistance3d}.from-size
(hres + 1) * (vres + 1),
{FloatDistance3d 0f(m), 0f(m), 0f(m)}
}
let normals:{Array-of FloatDirection3d} =
{{Array-of FloatDirection3d}.from-size
(hres + 1) * (vres + 1),
{FloatDirection3d 0, 0, 0}
}

Programmers will tell you that their editor has a customizable code-completion feature. But waht it may not have is a hi-lite option for all those type declarations which are otiose.
Lets start here:

let vertices:{Array-of FloatDistance3d} =
{{Array-of FloatDistance3d}.from-size

versus

let vertices:=
{{Array-of FloatDistance3d}.from-size

Without some such sanity I cannot see Curl regaining a foothold in small companies which might otherwise be tempted to use Curl for their own web needs. Small companies understand the cost of RSI.
Curl may continue in Japan. Making a language needlessly difficult to read and write is the very essence of Nihon-go and the barriers to the gai-jin.
China might change. Vietnam might embrace LcurlR. Or Sri Lanka with its plethora of alphabets.
Perhaps Curl can wait for the SemanticWeb and a new Google. Until then, try a google on ‘curl’ and tell me then that a name is just a name. Then try the google on ‘LcurlR’
I rest my case { embrace {reformed {curl LcurlR }}}

AWAX, or AJAX without JavaScript

Wednesday, May 23rd, 2007

Suppose that the key to RIA is to have the server send something other than HTML to a smarter client. That might mean AJAX and JavaScript.

I love JavaScript – I call it LiveScript and pretend that I am running Self under Win32. But what if a small company wants to take over its web work rather than just replace their current web vendor? They cannot start hiring java developers and unix administrators, and a Prototype javascript guru and a CSS person. Perhaps they could hire a parttime designer and a fulltime developer, or give motivated employees an opportunity to fill the spots. Enter RIA without Javascript.

The key RIA technology today appears to be XMLHttpRequest as an alternative to HttpRequest for dynamic content in a web browser. It is often assumed that this means AJAX and Javascript, but it does not. ZK is a project devoted to RIA via AJAX without Javascript (well, take that with a grain of salt.)

And then there is Curl. Curl came out of MIT but appears largely absent on the North American scene, a bit like Roxxen and Pike. Nevertheless, at curlr.org there is a clear prescription for XMLHttpRequest without JavaScript.

Why should JavaScript concern the small company? For every reason laid out by Google to justify the use of the Google Web Toolkit, or GWT. Now, even with the Instantiations GWT Designer for Eclipse, the company will be looking for a senior developer, if not their own web guru.

But why would taking on your own company web projects mean competing to hire a Java developer? Companies in the past have taken employees with business knowledge and evolved them into top Smalltalk developers. That is in the very nature of Smalltalk.

Unless you are building electronic devices, though, taking a person with business knowledge and training them as a C or Forth programmer would likely be folly. Expert System shells were different – there you could evolve your own staff from a business area expert into an information system expert.

There are other options: Rebol is one. With Rebol, one language is all that is needed for the web project.

Still, for a gentle learning curve, it would be hard to beat Curl. It is a different business model and it is popular in Japan and elsewhere in southeast Asia. It could also mean competitive advantage for a small firm whose product is under price-point pressure from a larger firm with a bigger web presence. While there are licensing fees, they are not prohibitive, as were fees for, say, the Eiffel Windows library.

Ordinarily, taking on your own web projects means sacrificing the dynamic web content that an outside vendor could enable. But for an example of Curl at work, just visit Flickr.

Oh, and about hiring that Flash developer who not only knows ActionScript but who also was in on the latest Adobe Apollo Beta … the Basic Language used the $ sign. VBScript for ASP pages still does. But Javascript for the small company may require more like $$$.

If you still want to go with JavaScript, you may want to visit the http://www.openlaszlo.org/ home page or the OpenLaszlo article on wikipedia, or check out the article on OpenLaszlo at newsforge.

I do love LiveScript! I mean Self …

Portal: SmalltalkProlog

Tuesday, May 22nd, 2007

I have started a portal at Portal: SmalltalkProlog initially to explore such things as Prolog in Smalltalk/X and Squeak and the current state of Roel Wuyt’s SOUL in VisualWorks.

Prolog evolved on one branch, if you will, to PDC Visual Prolog and Mercury in much the same way as Smalltalk begat Strongtalk. In some ways, Mercury begat oz/Mozart. Or in the niche in which Mercury has not thrived, oz/Mozart might yet thrive.

Affinities of Strongtalk and Mercury are what I have planned for the menu next. Add a pinch of salt if you partake.

If you have used rules within Smalltalk in a project which can be discussed on a public forum, please do contribute. If you have a related site, please visit aboutus.org

Command line Smalltalk ( for David Cyr )

Monday, May 21st, 2007

I must give Perl it’s due: amok it may be, but @INC is there.

There is a post at Artima’s Agile Buzz by Cincom VisualWorks’ Jim Robertson on how to load the code for BottomFeeder into a VW Smalltalk 7.5 image (an aggregated source code file, if you will – Smalltalk is not file-based in the way C++ is file-based or the way java packages are file and directory hierarchy-based).

In my case that meant running

I:\vw7.5nc\image>..\bin\win\visual.exe visualnc.im -filein ..\scripts\build-bf-dev.st

The first thing you notice is that dialogs pop-up to request permission to re-load what is already loaded, so we are far from the typical command line for a programming language. That may sound unfair to Smalltalk, but console applications are an important way to salvage legacy Smalltalk code …

Then the whole thing fails when an XML file is not found.

Here are 2 tips.

If you use the non-commercial VisualWorks you will be using the public repository for code, called Store. When you connect to that repository there is no obvious way to save your connection profile. But you must save it and it must be named

cincomsmalltalk

which is not the default nor offered as a default. One way to do this is to arbitrarily flip the string for the user name from ‘guest’ to ‘guest2′ which triggers an enable on the SAVE button. Save. Now flip back to guest. Save again.

Step two. Open a workspace and DO IT on

Store.RepositoryManager open

and save that ConnectionProfile with an EXPORT. Naturally I wanted to save it with my script in my new .scripts directory. But you might naturally save it in the VW home directory. Forget where that is? Open
the System Transcript menu and check. Ah. Exit. Run script from command line.

Ka-boom! Busted agin. And so here Perl gets its due. Perl has @INC which gives you a good shot at finding files much the same as C and INCLUDE and the java classpath ( for which I have Classpath Canuck at Logiquewerks ( for a shameless plug.)

Check my command line. I am in the ./image directory which is the execution path so that is where the ‘repositories.xml’ file must reside.

Now some Smalltalk evil. I move the file. I add a space character to a comment and ACCEPT. Away we go. Why evil? I just changed a method to trick Smalltalk. And not just any method. A public method in a base class. But that is another subject.

Now to get intimate with BottomFeeder …

Rebol, yelled the rebels !

Sunday, May 20th, 2007

My Rebol page is coming soon …
TBC
WFM

Perl amok

Sunday, May 20th, 2007

The ‘camel’ book has become a little too thick, given what I just saw on my console.

I:\Tags_Project>perl tags_test002.prl
Creating pipe “PipeInTags”.
Can’t locate auto/Win32/Pipe/connect.al in @INC (@INC contains: [...]

What this means of course is that I have a typo.
I have typed

$PipeInTags->console()

where I should have typed

$PipeInTags->Console()

Perl cannot report that a string of text has a possible match in a PM in the same string with a leading Cap. Perl.

Perhaps a unix utility run amok. If Ruby is Smalltalk-as-perl where Objective-C is Smalltalk-as-Next-C then perhaps Ruby is the answer. But not for this task. Because Tclx remains buggy, I am left with Perl.

Many implementations of Smalltalk do not do much better with typos, which doubtless is why Unit testing started as SUnit (Dolphin 6 does quite well.)

MTF.

More to follow on Perl and the IDE.

Microsoft: what can one user do? OneNote 2011, watch out …

Sunday, May 20th, 2007

Bill Gates dreamed that all users would program with VisualBasic For Applications.

But this user is different: unlike most of Steve Ballmer’s customers, this user is a developer – and in the two languages of which Gates was ignorant in the 80’s: Smalltalk and Prolog.

So what can a user do after OneNote 2007 trashes OneNote 2003?

Build a better mousetrap. And market it.

Applications such as OneNote have a future in collaborative computing. But OneNote is not there yet. Not by a long shot. And Leo will not make it as a collaborative outliner without such a major re-write as to be a non-starter from the get-go. TreePad has had its shot.

OneNote is for GTD: Getting Things Done.

So evolve: use OneNote 2007 extensively while building its competitor. a product not married to MS Office and IE7+.

We might call it, I don’t know, EclecticPens

Many of us lamented the loss of the 99$ word processor in the MsWord-WordImperfect-AmiAmateur wars. But in the days of WordStar there were such products. I owned one which was excellent but was only bundled on Zenith computers. Remember Zenith PC’s? Bundle or die. And ignore antitrust – the DoJ didn’t even have PC’s.

Today there is TextPad and the free Crimson Editor. But I am betting they will not become web-collaborative any more than emacs or vim.

EclecticPens

Why I was exasperated with Microsoft ( OneNote at a time )

Sunday, May 20th, 2007

I sing the praises of OneNote 2003 at every opportunity. The Hungarian hacker may have gone orbital with billions from bundling that never should have been allowed, but I was not bitter. Bill incites kids to play bridge instead of chess or GO; I was not angry. An Iranian/American tycoon goes orbital with telecom gains that may belong to stockholders. No one seems to notice. Personally, I am more interested in Trujillo and some bankers going to jail than Joe Nacchio. Oh, lying and misleading employees holding company stock is a strategy, not a crime. And the two banks were run by two brothers, if I recall.

So having praised OneNote 2007 I decided to upgrade my OneNote 2003. The upgrade path was not obvious so I decided to be cautious. First I would remove the trial version. As it was running a doubt crossed my mind, and I quickly copied ./My Notebook from My Documents to a backup drive. Nothing seemed amiss after the removal of OneNote 2007 Trial. Add or Remove Programs still had a Microsoft OneNote 2003 and my Startup menu still had my OneNote 2003 icon. So I clicked that icon. Now Big Bill tells me that he is re-installing OneNote 2003. Then he tells me that the SKU1A1.CAB cannot be found. The maroon.

Quote. YOur Microsoft OneNote 2003 installation source has been corrupted or removed.

I hate, loathe and detest Microsoft. Not that info tech did not have arrogant companies before IBM wanted a DOS for the PC. But this one is special. IBM had customers. This one has users.

Oh I understand … that install/uninstall was only tested on VISTA … with 64-bit dual cores. Have I no shame, a 32-bit XP too timorous to be a pirate?

Piracy was what he feared. Not users, not Ricoh, not IBM, not USDJ. What, after all, can a user do?

resident evil

Sunday, May 20th, 2007

When I returned to Minnesota for a break from Smalltalk in L.A. I could no longer recall why IE7 was set as my default browser. I immediately flipped to FX. I thought it might have been for vistasmalltalk.net

Then I went to check for an upgrade to my one worthwhile Microscoff application, the incomparable Office OneNote. Ka-boom! OneNote opens a page in Firefox and before I can even click the check for updates

Caveat emptor. But I refuse to diss the upgrade to OneNote 2007. If you love OneNote 2007 as I do, then pay the devil his due. But flip your default browser to IE7 while you do it …

UWIN, you lose

Sunday, May 20th, 2007

There are a few toolsets for Unix functionality under Microsoft Windows. And there are other options altogether.

For tools only, the simplest way to go is just to create a \bin and \usr\local\bin and all the rest on your C drive. Selectively add them to your path with BAT or CMD or WSF files or leave them tagged on the end of your ‘user’ PATH environment variable. You might want to grab a zsh and a bash and a grep for starters. But you will be missing the little-known gem of unix, which is screen.

The next step up is to get the minimal GNU Mingw Msys installed. This may mean occasionally setting your ‘CC’ env var to being just empty with

set CC=

but that should be the worst pain you encounter until you need a make.exe which is not Mingw and not nmake.exe That is why I am working on tools for my web site at make-config.net.

But I cannot get GNU screen to run under mingw Msys; please POST if you know how …

Then there is what so many loathe: installing Cygwin. This means running cygwin’s current setup.exe from the Cygwin homepage, selecting a source repository, a local repository and just getting things right enough after the install that you can start building everything that is wrong, missing, out-dated or broken. It’s just the reality.

It could be worse. You could opt for UWIN from AT&T research. At one time I had some dealing with the 3B2 boxes for AT&T unix, so I could be biased. And I refuse to provide a link to their web site for UWIN.

Some think that ‘research’ languages are those which either don’t behave or don’t compile or don’t link or weren’t intended to do one or more of the above. But what about Windows tools for Unix-functionality from a one-time major player?

Imagine that the webmaster at sourceforge develops a READ-THIS-LICENSE monomania and forces you to register with a login name that MUST START with I-READ-THE-LICENSE_.

We might live with it if sourceforge were otherwise unaffected. But suppose that it also meant that first you couldn’t find any download links and then those you found were broken and Oh why did I not embrace Ruby the night we first met !?!

There are issues elsewhere (not at rubyforge, in my experience) such as my recent failure at Cincom’s public repository to get a working BottomFeeder to install. Or when I make the mistake of using an MSI for a Windows install from ActiveState. But UWIN.

They give the notion that ‘having a plan B is a good idea’ something of a bad name.

If you ever are able to layout 7 simple steps to download a UWIN package, please POST to somewhere public IFF said packages, in fact, run on, say, XP SP2. I fear you will end up with 12 steps. Not to bash ash and ksh. Not at all. UWIN. I leave.