Showing posts with label IDE. Show all posts
Showing posts with label IDE. Show all posts

Friday, December 10, 2010

Curl pragma

Chris Barber's Zuzu Curl testing package is a sort of Curl goldmine.

Here is one snippet:

{getter public inline {size}:int

  {pragma suppress SyntaxRequiresInteger}
  {return {bit-count self.mask}}
  {pragma unsuppress SyntaxRequiresInteger}
}
There is very little documentation on pragmas in Curl other than the documentation page for pragma in the package CURL.LANGUAGE.PRAGMA

Here is a short exerpt:
This syntax allows the developer to specify directives in the source code to affect the behavior of advanced versions of the Curl IDE that support real-time error checking. Pragmas are ignored by the Curl RTE and have no effect on the runtime behavior of Curl programs.
That snippet is followed by the caveat that pragmas are only processed by the Curl plugin for Eclipse
One use that I think terrific is {pragma info|warning|error message}An example would be
{pragma info FIX_THIS really klunky and hard to test}

But how to keep these out of code commits (let there be no TODO in thy code escrow....) ?

Tuesday, June 29, 2010

Visual Prolog 7.3

Prolog Development Center has just released version 7.3 of Visual Prolog.

VIP was once known as Borland Turbo Prolog and was one of my favorite tools alongside Borland C++ for OS/2.

PDC Prolog has its counterpart in the Mercury project: a typed Prolog.

So what is new in 7.3? Well, Visual Prolog is getting ready to go 64-bit.  That and more are detailed at the 7.3 page.

For a while I thought the Prolog would go behind the scenes at PDC as it did when Air Liquide acquired Prologia in France (the home of Prolog IV as CLP.)   Happily PDC now is back to showcasing at least AI and not just smart software applications.

But what will the fate of this Prolog prove to be?  In a decade or two, projects such as Oz and Mercury may be in other hands - but a small commercial venture?

In my experience the strength of Visual Prolog was not the IDE or the GUI-building tools but the debugging.  And that has been further strengthened in the 7.3 release.

There is a "personal version" available for download and extensive examples come with it.

Prolog is part of the Adobe world in the ILOG arena (an IBM acquisition) and in an age of multi-processor 64-bit hardware, Prolog should come into its own in the RDF processing needs of the semantic web (in which regard, see Logtalk and the XSB project as well as http://www.swi-prolog.org/ for alternatives to PDC.)

A typed-Prolog should present no problem to ActionScript Flex developers at home with a typed ECMAScript variant - and "declarative" MXML UI layout.

Other languages superbly suited to processing text: ObjectIcon, Icon 9.5, Rebol, Oz.

Other Prolog implementations of merit: Eclipse-housed AMZI! Prolog.

For OOP for almost any other Prolog than PDC, see http://www.logtalk.org/

When the ICON language was named, Ralph Griswold could not have suspected that computing would come to have an "iconic" interface.  Curl has suffered a similar fate due to haxx.se and cURL.  Sadly, XML has a "prolog" and not a "prologue" so without RDF, searching for news on Prolog and XML is vexing.  So far, Rebol fares best and Oz much better.  As for Mercury and Alice, what's in a name?

http://www.logiquewerks.com/index.html

Sunday, May 24, 2009

Using gedit with the Tcl/Tk IDE for SNOBOL4

Over at my Curl blog I've added on note on using gedit as the external editor with a nice simple IDE for SNOBOL, the original pattern-matching language intended for computer users. That blog entry also has a link to an object extension to ICON which permits UNICODE strings.

Friday, June 29, 2007

a Rebol tip

If you are new to the Rebol language on Windows you may have noticed that there are 2 files named rebol.exe
One is in \core and one is in \view
If you have followed the wiki-book you may be in the habit of running \core\rebol.exe in which case you may hit two oddities: first, that console does not know how to respond to
desktop
and, second, that it cannot respond to
editor ""
or the more interesting
editor system/view

The answer is to launch Rebol only using the home directory view.exe
From there you can go back and forth to console and then return to ViewTop using the command
desktop

While you are at it, try
source build-tag
or
source to-email
or
type? {this and that}
or
reduce [ 2 + 3 + 5 7 ]
or
compose ["this" (21 + 21) "that"]
or
parse {this that these those} " "
and enjoy!

PS. Here are 3 links to console info:
core
shell
quick-start

Wednesday, June 13, 2007

QTk scripting in Oz/Mozart

The relative neglect of oz/mozart compared to say, Scala, has an explanation.

Part of it must lie in the needless snags along the learning curve. Steep is fine; jagged bits, less so.

There is no learning Oz/Mozart without embracing their emacs mode. And tolerating their tutorial.

Do not begin with applications. An application will require at least one 'functor'.

Ignore the bits that say you are compiling. You are not. No tutorial code will compile. Just do as you are told (follow the instructions) and 'feed' in a line. Or 'feed' in a region. Or 'feed' in a buffer.

What they mean is pass a line, a selection or the file through the interpreter only.

Think of it as scripting in Oz/Mozart. Now you can open a window with widgets using an few lines of Qtk.

No language which interfaces to Tk should be hampered by such a tutorial or such documentation; the usual answer is to buy the somewhat pricey MIT book by Peter van Roy.

Try to understand that the people who are assessing the need to revise the on-line documentation already know oz/Mozart inside-out and cannot 'see' the bits that say 'compile' when nothing compiled at all. They think you know what they mean by 'pickle' and that you get the 'functor' jibe at Prolog. A module is a module. Sometimes in some language a class is just a module. And writing a fine tutorial is an art. If you can get the video intro to Revolution/Transcript/MetaCard to run under Windows using the required QT codec, you may actually see what I mean.

But hey, you could not script the Oz/Qtk way in C. The fact that it looks easier in Jython may be that you know java and python. But it is easier in Tcl/Tk wish. So the point must be what can be achieved in oz/Mozart and that may be as much as can be achieved with Scala and then some.

Watch this blog for a link to a tutorial and a concordance/commentary to their friendly-looking documentation. And just accept that all you need to know is in the oz/Mozart maillist.

Somewhere in oz, climbing a cliff on the way to the corner store.

Note: do try the QTk Prototyper.  The tutorial leaves out one essential: declare the Prototyper, as in

 declare Prototyper
[Prototyper]={Module.link ["x-oz://system/wp/Prototyper.ozf"]}
{Prototyper.run}