Sunday, August 10, 2008

Falcon Programming Language

The home of Falcon at www.falconpl.org is now a regular on my browser. The official release is still shy of 1.0 and is known as Piuma, or 0.8.10.

Falcon is being built by a team but it is the child of Giancarlo Niccolai, who was looking for an alternative scripting and embeddable language which would be multi-paradigm. Falcon is an object-oriented and a messaging language which can also be viewed as either procedural or functional and which allows all four to co-exist. The emphasis is on both flexibility and performance.

Running Falcon in MSys (the Mingw version for Win32) with -? gives the following:
Usage: falcon [options] file.fal [script options]
Options:
-a assemble the given module (a Falcon Assembly '.fas' file)
-c compile only the given source
-C Check for memory allocation correctness.
-D Set directive (as =).
-e Set given encoding as default for VM I/O.
-E Source files are in encoding (overrides -e)
-f force recompilation of modules even when .fam are found
-h/-? this help
-l Set preferential language of loaded modules
-L set path for 'load' directive
-m do NOT compile in memory (use temporary files)
-M do NOT save the compiled modules in '.fam' files
-o output to instead of [filename.xxx]
-p preload (pump in) given module
-P use load path also to find main module
-r do NOT recompile sources to fulfil load directives
-s compile via assembly
-S produce an assembly output
-t generate a syntactic tree (for logic debug)
-T force input parsing as .ftd (template document)
-v print copyright notice and version and exit
-w Add an extra console wait after program exit
-x execute a binary '.fam' module
-y write string translation table for the module

Paths must be in falcon file name format: directory separatros must be slashes [/] and multiple entries must be entered separed by a semicomma (';')
File names may be set to '-' meaning standard input or output (depending on the option)

One interesting feature is the functional sequence operator .[cascade which can be used for assigning not just functions but functions applied to functions. The cascade operator can be used to declare the functional sequence as a member in an object declaration.
When Falcon fledges as a 1.0 we should have another alternative language which will be worthy of attention.
The documentation thus far is largely PDF's, so a far cry from the excellent live document viewer that comes with Curl, the web content language. Recently I found that I liked the on-line documentation for the processing language at www.processing.org but we may yet see something emerge as a 'live' documentation standard comparable to what Curl offers and Smalltalk could offer.

Saturday, February 9, 2008

CURL6 in the RIA news

There has been good news lately at the CURL.com site with Curl winning the InfoWorld 2008 RIA development platform award and with Richard Monson-Haefel coming on-board to replace the late Marc Orchant.
I continue to try to create the urban legend that CURL stands for {url

My latest enthusiasm is to see features of ICON and UNICON appear in CURL 7 as an alternative to regexp - an extension which would also see back-tracking added to CURL. There must be a way to start that rumor ...

Some other sites seem noticably quiet, such as VistaScript.net but I continue to watch the DLR site of IronPython.

It was also great to see a new Win32 package for IO available at iolanguage.com

And of course there is a lot of activity via the ALTME link of REBOL.net with the alpha-release of REBOL3 ... and that page has a link to Carl Sassenrath's Rebol3 Frontline blog.

Thursday, September 13, 2007

Cool Curl 'live' code widget

Over at eclectic-pencil I have a post on a very cool Curl widget that rivals almost anything I have ever seen expand and collapse on a web page.

What I neglect to mention is that in the example, the only code to create the XMl tree is this:
   let xmldoc:XDMDocument =
{build-xml preserve-whitespace? = false, loc}
|| ...
{XDMTreeControl open? = true, xmldoc.root}

Which you would be hard-pressed to beat in Seaside for Smalltalk or in Groovy. Concise.

TiScript also has an alternative DOM and some nice features as a JavaScript alternative, but Curl 5.0 is a mature, full RIA product with 'live' code for inspection and a focus on the client-side. It is almost Smalltalk but it was also built for the web (in fairness, Curl goes about as far back as Smalltalk VisualWave.)

The only cool but alive technologies as neglected as Curl 5.0 must be Gemstone/S and Rebol 2.6.3 ... and the latter is soon to be 2.7.x with 3.0 in the wings ...

Watch for a Seaside for Gemstone/S beta in the news soon ...

PS For people living on AIR and FLASH, Rebol/FLASH went 2.0 today ...

Saturday, September 8, 2007

Curl and Occasionally Connected Computing

I have added a page on OCC at wikipedia. What is really interesting to me is the use of a custom URI scheme in Curl. Such a scheme might be
curl://occ/this-redirects-as-needed
which could be used to redirect to a resource depending on whether the user is connected.
If you have experience with OCC, please do contribute to the article. When I have some experience with Curl OCC I will add a page at eclectic-pencil with details and caveats.
To complement the article, I also opened one on CSPD. There are trolls at en.wikipedia.org who delight in suggesting page deletions so your contributions to articles to maintain NPOV or to suggest sensible article merging and separation are much appreciated. No edit wars, please. Solid references for articles are usually the key to survival of any given contribution in my experience.

Monday, August 27, 2007

Links relating to Curl 5.0 as RIA + CSPD

Client-side persistent data or CSPD may be out of favor in the current "I'm OK, stateless's OK" buzz but I like the 'public library' model: I return a book and the only record of my having borrowed it is my own record. Just try to sell that to the Barnes&Noble / Borders / Amazon / BlockBuster / BestBuy / NetFlix "we've got your number crowd". The more radical option is the 'purchase' card whose record does not belong to a bank or credit card conglomerate: I pick the 'bank' for transactions based on interest rate. Talk about competition! Having data 'client-side' need not mean 'local to this box' but rather, "not on your server". On this model your medical records would not be held by doctor PA's, hospitals or insurers. And your privacy could be in much better hands. Ok, I'll give it a REST ...

But my links to Curl which are not links to cURL are slowly coming alive ... and Curl is CSPD friendly. It has not yet seen that client-side 'store' should be opaque to the server, but it may get there. Not middleware. Call it 'periware' and 'exolayer'.
Buy a book at Borders and then go borrow a book at your library. Now make a return at each (don't cheat and read that new book!) Now ask where your medical records belong ( "we know you are in pain, but we need at least 24 hours notice to have your records sent up." I only had to hear it once.)
Having my records at my beck-and-call does not mean that I can 'access' them. It means that I decide who can access them short of a court order. And when. And where. And that is just my medical records.
The fine print on your savings account book may explain that your money is not always available for withdrawal. And in some countries you pay to have an account and fill out forms to make any withdrawal. PayPal is as foreign to those 'service' banks as is client-side data in the current praise for HTTP.
Many years ago, when TCP/IP turned 15, we were asking when the protocol would be replaced altogether. About the same year as we asked 'Is this the year of Unix?' Perhaps the year that I finally see overhead wires go underground, I will see the system of record no longer be the central system, but the peripheral system. Periware. Exolayer. The Exonet, adumbrated. How apposite.

Friday, August 24, 2007

Rebol dialects and Groovy builders

I am working on a blog post over at eclectic-pencil on DSL (domain-specific languages) in Rebol and Groovy. It is an area that the folks at PDC Prolog got into a few years back and that I first explored using Java + Amzi! Prolog with DCG's in Eclipse. I hope to get a piece up on Groovy and categories as mix-ins in comparison to exploring categories and protocols in Logtalk. In the meantime there is a great deal of activity on the SWI-Prolog mailing list often relating to their Java programming interface. And Plone has a new release just as I wait for Rebol3. And I have a new version of the Curl 5.0 Web SDK to check out. And the MindTouch Deki-Wiki up on VMWare as I watch for the Gemstone/S + Seaside beta. Too much!
My opinion of the out-of-print 'Official Guide' to Rebol 2.3 keeps improving: I wish I could say the same of Manning's 'Groovy In Action' or the APress 'Grails' book. Neither of my favorite bookstores had 'Programming Groovy' on the shelves, which might have been a better choice than the former. Of course there is no book on Logtalk to recommend ... yet.

Sunday, August 12, 2007

Documenting a Curl Surge Lab Interface class

Surge Lab had been marketed as the name for the Curl IDE. The IDE has a feature that you may recognize if you use eclipse or Aptana: you can flip from one perspective to another. But the IDE gives only a glimpse of Curl interaction for the developer because, like Smalltalk Seaside 'halos' on a web page, Curl offers a Ctrl-Right-Click which opens text and graphic inspectors on objects embedded in a 'live' web page.

The ctrl-right-click pop-up menu includes viewing and editing the Curl source, inspecting objects and both 'Start Profiling' and 'Start HTTP Monitoring'. (Curl also offers test-coverage tools for HP's Mercury QTP.)

The inspectors are toolbar driven and almost feel like a Smalltalk object inspector becuase one toolbar item is 'Evaluate' which is just like the JavaScript popup in FireFox developer tools. Unfortunately, the inspectors lack some features of a typical Smalltalk inspector. The first that I would add to be Curl-ish would be a 'select-text-F1' event-handler to get the fine Curl doc viewer to popup.

What I will do this morning is include a Curl snippet of what you might browse in such a popup; it demonstatrates how the doc viewer is driven.

The following snippet is copied from

I:\Curl RTE\Surge\6\ide\editor-interface
EditorInterface.scurl
Snippet:
{doc-next
{purpose
This class defines the interface that an editor must support
to be integrated with Surge Lab.
}
{details
An external editor needs to implement this class, and define
a top-level variable named {monospace surge-lab-editor} which
is an instance of its implementation of this class.
}
}
{define-class public open abstract EditorInterface

{doc-next
{purpose
Initialize the editor.  An interface back to Surge
Lab is provided for the editor.
}
}
{method public open abstract {initialize
surge-lab-interface:SurgeLabInterface
}:void
}

The behavior of the default Curl editor is not my favorite side of Curl at the moment: high-lighting a '{' offers a context popup to view the '{' in a class browser instead of the handy behavior when you add a '}' which is to blink the matching '{' in red.
Adding a '}' and then placing a CR in front has the disconcerting behavior of aligning the '}' with the matching '{'. This is annoying if it is your habit to end a line using a 'do' with an opening brace ( as required by many script interpreters such as Tcl and which is {script-style} for many programmers.)

But the little annoyances in the default editor come to nothing because there is an interface for external editors.

Over at eclectic-pencil I will add a page with a working HTML example of an embedded Curl {example} macro using a TreeControl object. Install the plugin and Ctrl-Right-Click. Cool.