Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, April 10, 2013

HyperTalk hype


You may briefly see a resurgence in HyperCard script hype.

The script, HyperTalk, uses quasi-English as a gimmick aimed at, say, high school teachers who do not relish teaching programming and may only know a procedural paradigm.

Enter, stage left, "stacks" and "cards" without programming.

But a time comes when some text needs to be modified in accordance with some rule or pattern.

This is a teaching example :

function replaceStr pattern,newStr,inStr
   repeat while pattern is in inStr
      put offset(pattern,inStr) into pos
      put newStr into character pos to (pos +the length of pattern)-1 of inStr
   end repeat
   return inStr
end replaceStr


Can you see why the example is problematic?

No one who understood this code needs "is in" and all the rest of the quasi-English of this supposedly "non-programmer" scripting language.

So if someone tells you that your kid can build software in, say, RunRev "LiveCode" for free without learning how to program "the old way" you might ask them if that amazing thing comes complete with free money and winning lottery tickets as well.

There are alternatives out there : Rebol, Icon, Smalltalk but there is no escape from programming in software development ... not even for "mobile" or Android or iPad or "the web".

Posted with the usual apologies for not mentioning LISP in that list.




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.