Archive for May, 2009

The Curl that is not on the pages of any book (yet)

Monday, May 25th, 2009

Over at my Curl blog I added a post on return, the Curl macro.

What I could have added were the tags of some of my bookmarks in my Curl Documentation Viewer, such as

never-returns
unreachable
EmptySource
OpenPackage

But I think that Curl templates are a very handy way to implement alternative technical ebooks: what is needed is for a technical ebook publisher such as Springer to adopt Curl as an alternative offering.

Regardless, I must get over to Lulu about that Curl ebook …

Tcl/Tk IDE for SNOBOL

Sunday, May 24th, 2009

If you are interested in pattern-matching languages but never learned SNOBOL, you might try the IDE by Rafal M. Sulejman.

If you are using linux, just make a few edits to the tksliderc file to flip the slash delimiters and set the path to your SNOBOL4. I also replaced the gvim entry with gedit but had to give an editor parameter of –new-window as it refused to add a tab to a running instance. A very handy feature is “Save Transcript” which for starters will save the hot-key guide when you first start the IDE.

If you like python or converge, you will be at home with the indenting. And there is SNOBOL for python in SnoPy.

I can only hope that someone extends the editor with XOTcl. SNOBOL patterns are also available for UNICON, one of the OOP variants of ICON, the language which evolved from the SNOBOL5 project.

It would appear that SNOBOL was the first language accidentally released as open-source (part of the story preserved in the Griswold papers here in MPLS at UMN.)

The story of SNOBOL and performance can be found by a google on SPITBOL over at duckduckgo.com

For another OOP-variant of ICON (this one with UNICODE) see the objecticon project ( a name choice as regrettable as ICON and UNICON as any web search will reveal.)

For a pythonic variant of ICON, see converge. For the latest on-going contribution of ICON to programming languages, see Fibers in Ruby 1.9

Curl for RIA with AMF

Friday, May 22nd, 2009

I was not aware that there was another binary alternative in Binary JSON or BISON. But I have found two places where developers outside ActionScript might want to take a look: the Glare framework for AMF with Smalltalk and the python AMF code.

Regardless, the Curl framework is using an abstract DataObject class with two subclasses: StandardDataObject and DynamicDataObject. It was interesting to see that one DataObject factory method uses
from-traits
    traits:DataObjectTraits

as traits are not much discussed in relation to Curl.

The supported types are bool, null, String, int, double, DateTime, DataObject, Array, ExtendedArray, ByteArray, AMFXmlDocument with the latter being just a wrapper for a String of XML. An ExtendedArray used to obtain a DataObject from a ByteInputStream or to put to a ByteOutputStream with its AMFSerializer and AMFDeserializer children.

Here is the default constructor for the DataObjectTraits:

{StandardDataObjectTraits.default
    name:String,
    members:StringArray,
    dynamic?:bool = true,
    externalizable?:bool = false
}

so this look very approachable. But it has nothing to do with Traits as in Squeak or Scala. Traits were introduced to help structure the refactoring of code in a way in which categorizing methods could not. Traits are classes which are not intended to have instances but which can implement methods. That is a very natural thing in Curl, but without a refactoring browser, their usefulness as an explicit cosntruct is dificult to demonstrate (an Eclipse plugin might be in the offing.) The Curl 7.0 introduction of a library access modifier should make naming classes with Trait more meaningful.

Now to get BlazeDS running on my Apache localhost.

CurlUnit and Curl site-specific browsers using the Surge RTE

Thursday, May 21st, 2009

Over at LogiqueWerks there are 2 new links on my Curl 7.0 page: a live page running unit tests against Curl project in a test runner UI (just click the RUN button) and the project beiing tested: a simple SSB (site-specific browser.)

I have come to rely on Mozilla Prism for the sites at which I make daily changes: but I know that Curl offers a an enterprise SSB alternative to GreaseMonkey. And I can see a Curl GTD browser that makes TiddlyWiki seem lame in comparison. Let 42 useful browsers bloom!

Three more open-source projects for the Curl RIA platform

Friday, May 15th, 2009

Over at sourceforge.net there are 3 more open-source projects for Curl. One is for a Curl MVC framework and as of today has no available downloads. Another is a non-visual Curl library with packages such as CODEC and packages with utility procedures such as
{visit-super-classes}.
The third package is a Curl-Java project to facilitate communications between a Curl client and server-side Java (both using the Spring framework and the Japanese Seasar2 AOP framework.)

The two projects with available downloads are for Curl 6.0 at this moment and do not yet have detailed English documentation. I had no problem deploying the LIB project as as to be able to install 6.0 documentation for the Curl Documentation Viewer. The ORB project has pre-compiler pre-processed pcurl code files containing standard Curl docs.

The ORB project includes both Curl and Java directories along with a curl-orb-client.jar which has classes such as CurlSerializableStreamWriter and a set of server-side JAR files including curl-serializer.jar and curl-orb-server.jar From what I can see, the object request project includes code for generating mappings between object instances in Java and object instances in Curl.

This attention to the j2ee server-side should help move Curl towards the goal of Curl as a secure enterprise platform and not just a mature web-content language for the client-side.

Curl 7.0 RIA platform released May 7, 2009

Sunday, May 10th, 2009

The latest Curl from Curl Inc. is now available as both Runtime and developer IDE or Eclipse plugin for Windows and Linux (both as rpm and as deb).

If you are a developer looking at the Curl platform you will not want to miss the example code ZIP files in the docs/default/examples directory. It is found under your install below /Surge/8/docs ( the “8″ because 7.0 is known internally as curl8, rather as you started your 2nd year on your 1st birthday.)

The most significant change for me as someone who has worked mostly in Curl 3.0 is the “library” access modifier which allows packages under the same project manifest to share code ( so we have private, protected, package, library and public.) I recently worked on a framework where this would have helped keep classes in separate packages which worked with each other across component layers. And this means we have the syntactic-sugar of “library-get” and “library-set” for ease in declaring accessors.

As most often in the past, Curl 7 installs so as to co-exist with Curl 3.x, 5.x or 6.x either as RTE or also with IDE’s. If you have seen a Curl installer in the Windows Control Panel you will know that it is very selective as to what you can uninstall or retain among your Curl versions.

I had been hoping to see an option to “disable selected breakpoints” on that Debug pane, but there are now large, obvious buttons with dropdowns on the IDE for flipping from one edit point back to another which is helpful when refactoring code across scurl source files.

The best kept IDE secret is that a right click on an edit pane tab gives you the option to “split” right or top ( the menu has an option which defaults to split to the bottom.)

With the TextMate knock-off for Windows and Linux, E, now going open-source for linux, I will want to try using E. But Curl also comes with an emacs site file and offers an Eclipse plugin for the Curl language.

Curl Inc. is now positioning Curl as more of an RIA enterprise platform than a web content language (Curl is usually presented as HTML + JavaScript + CSS) and now has more options for using JSON, JavaScript, Flash and Flex. There are a few Curl open-source packages now for XML as a data format, for SQLite and for UnitTests among others. I have not checked yet whether Curl embedded as an HTML Object now accepts Object parameters – the lack of which had been a pet peeve of mine … or whether there is now more complete documentation of the API for Curl sub-applets.

I am glad to be able to say that the Curl RIA demos at the Curl home page are not “toy” applications as can be seen with the dynamic “social network” applet for FaceBook or the impressive Timeline demo. In addition, there are code examples available elsewhere on the web for advanced Curl UI’s.

In a few days I may have a chance to look at writing Mixin classes in Curl and see what has become more comfortable with the “library” access modifier for code common across packages for code which is not public or protected (Curl allows multiple inheritance and constructors are of the “factory” pattern.)

With the renewed enterprise interest in Smalltalk, the re-emergence of the “Slate” project as “Clean Slate Smalltalk”, the fine Seaside web framework, traits from Squeak Smalltalk and the good work done on the Io beyond-Smalltalk language, it is nice to be able to say that the only web programming environment which I think can rival Curl is a multi-platform dialect of Smalltalk. Curl allows you to relax all typing and do your prototype and then get down to re-writing your application as an industrial-strength web or desktop app relying largely on static types. All that I miss in the Curl IDE is a Smalltalk-style refactoring browser …

In my many years working on mission critical applications first in both Curl and Smalltalk, Curl is as productive for experienced developers as Smalltalk and just as well-suited to evolutionary approaches to software development. Both promote: “See, Yes you can! Just like this …” And after that short turn-around demo or prototype, we can get the app right with UnitTests, an excellent debugger, live documentation and then get it fast with the profiler and the HTTP monitor. And have the option of using Curl itself as the data format. And now Curl stylesheets as well (Smalltalk Seaside is also not married to HTML.)

If you have not yet looked at Seaside for Smalltalk and you are doing web applications, you owe it to yourself to do so. It you are interested in the desktop or in site-specific browser applets, then Curl is a must-see, must-try. Then if you opt for Air or Silverlight or yet another framework, library or platform, you will make that choice knowing what you have passed up. Just as you may have thought you knew why you ignore PROLOG for business rules, you may just not know about Logtalk or the latest on constraints in distributed Oz. These are not just languages: Curl as much as Smalltalk, Erlang or Oz offers an approach to getting from a software vision to a maintainable product with manageable risks and a good chance of being within budget. But as much as Smalltalk or Rebol or UNICON you must be ready to set aside preconceived notions – and I think that it helps to embrace evolution as a fact: your prototype need not be a throw-away but you must have the discipline to move beyond exploratory and feasibility mode to the demands of industrial-strength components. Curl offers restrictions at the code package level which would offend most Smalltalkers. But it is worth it in my experience. Start modeling your web app in a declarative mode with no type restrictions. And then get beyond that.