F-Script (programming language)

Last updated
F-Script
Paradigm multi-paradigm: object-oriented, array
Designed by Philippe Mougin
Developer Jonathan Mitchell, Ilya Kulakov, others
First appearedJune 28, 2009;13 years ago (2009-06-28)
Stable release
2.2.1 / February 5, 2014;8 years ago (2014-02-05)
Typing discipline dynamic
Platform x86
OS macOS
License Open-source
Website github.com/pmougin/F-Script
Major implementations
F-Script
Influenced by
Smalltalk, APL

F-Script is an object-oriented scripting programming language for Apple's macOS operating system developed by Philippe Mougin. F-Script is an interactive language based on Smalltalk, using macOS's native Cocoa API.

Contents

Overview

F-Script is based on a pure object paradigm: every entity manipulated within the language is an object. Its base syntax and concepts are identical to those of the language Smalltalk (the canonical example of an object-oriented language) with specific extensions to support array programming as in the language APL.

F-Script provides an interpreted, interactive environment with support for workspaces, which provide a rich set of functions including object persistence, distributed objects, graphical user interface (GUI) framework, database access, among other things.

Syntax

Like Smalltalk, F-Script's syntax is very simple, without requiring specific notation for control structures which are provided in a unified manner by the message send operation. Unlike Smalltalk, F-Script provides specific notational extensions to support the Array class, using curly brackets to describe literal arrays, which may contain any F-Script expressions.

For example, {1+3, 'name', true} is a valid array literal. The empty array is denoted by {}. Arrays of arrays are supported transparently, since any array is just another object.

Message sending

Message expressions in F-Script are similar to those in Smalltalk: they specify which object is the receiver of the message, which operation is called by the message, and any argument objects needed by the operation. F-Script supports unary, binary, and keyword messages. F-Script message semantics are extended to support array programming by recognizing that an array operation, such as adding to numerical vectors, must be viewed as generating a number of messages relating the elements of the vectors involved

Thus, if A = {1, 2, 3} and B = {10, 20, 30}, then F-Script allows A + B = {11, 22, 33}.

Usage

F-Script is chiefly used as a lightweight scripting layer on top of macOS's Cocoa application programming interface (API). It can be embedded in applications using the F-Script framework and Interface Builder palettes. It can also be used interactively from the F-Script interpreter to prototype applications. Finally, it can be used to explore applications' object hierarchies using an injector such as F-Script Anywhere.

Forks

The original F-script development by Philippe Mougin stopped at version 2.1 in 2011. Ilya Kulakov (Kentzo) took over the FScript.org website and updated the program to work with Mac OS X 10.7 through 10.10 until version 2.3 of 2014, building off Jonathan Mitchell's modernization work. Kulakov noted that as F-Script ties deeply into the system, the code must be changed to reflect the framework available in each Mac OS X release. The last update to this chain of work was done in 2018, by Wolfgang Baird, who updated F-Script to work with Mac OS X 10.12. [1]

Related Research Articles

<span class="mw-page-title-main">Ruby (programming language)</span> General-purpose programming language

Ruby is an interpreted, high-level, general-purpose programming language which supports multiple programming paradigms. It was designed with an emphasis on programming productivity and simplicity. In Ruby, everything is an object, including primitive data types. It was developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan.

<span class="mw-page-title-main">Smalltalk</span> Object-oriented programming language first released in 1972

Smalltalk is an object-oriented, dynamically typed reflective programming language. It was designed and created in part for educational use, specifically for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Diana Merry, Scott Wallace, and others during the 1970s.

In computing, serialization is the process of translating a data structure or object state into a format that can be stored or transmitted and reconstructed later. When the resulting series of bits is reread according to the serialization format, it can be used to create a semantically identical clone of the original object. For many complex objects, such as those that make extensive use of references, this process is not straightforward. Serialization of object-oriented objects does not include any of their associated methods with which they were previously linked.

Cocoa is Apple's native object-oriented application programming interface (API) for its desktop operating system macOS.

<span class="mw-page-title-main">GNUstep</span> Open source widget toolkit and application development tools

GNUstep is a free software implementation of the Cocoa Objective-C frameworks, widget toolkit, and application development tools for Unix-like operating systems and Microsoft Windows. It is part of the GNU Project.

<span class="mw-page-title-main">Self (programming language)</span> Prototype-based programming language

Self is an object-oriented programming language based on the concept of prototypes. Self began as a dialect of Smalltalk, being dynamically typed and using just-in-time compilation (JIT) as well as the prototype-based approach to objects: it was first used as an experimental test system for language design in the 1980s and 1990s. In 2006, Self was still being developed as part of the Klein project, which was a Self virtual machine written fully in Self. The latest version is 2017.1 released in May 2017.

HyperTalk is a discontinued high-level, procedural programming language created in 1987 by Dan Winkler and used in conjunction with Apple Computer's HyperCard hypermedia program by Bill Atkinson. Because the main target audience of HyperTalk was beginning programmers, HyperTalk programmers were usually called "authors" and the process of writing programs was known as "scripting". HyperTalk scripts resembled written English and used a logical structure similar to that of the Pascal programming language.

AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system automation tools. The term "AppleScript" may refer to the language itself, to an individual script written in the language, or, informally, to the macOS Open Scripting Architecture that underlies the language.

<span class="mw-page-title-main">F Sharp (programming language)</span> Microsoft programming language

F# is a functional-first, general purpose, strongly typed, multi-paradigm programming language that encompasses functional, imperative, and object-oriented programming methods. It is most often used as a cross-platform Common Language Infrastructure (CLI) language on .NET, but can also generate JavaScript and graphics processing unit (GPU) code.

SuperCollider is an environment and programming language originally released in 1996 by James McCartney for real-time audio synthesis and algorithmic composition.

<span class="mw-page-title-main">Factor (programming language)</span> Stack-oriented programming language

Factor is a stack-oriented programming language created by Slava Pestov. Factor is dynamically typed and has automatic memory management, as well as powerful metaprogramming features. The language has a single implementation featuring a self-hosted optimizing compiler and an interactive development environment. The Factor distribution includes a large standard library.

In the macOS, iOS, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as p-list files.

StepTalk is the official GNUstep scripting language framework that represents separate scriptable servers or applications as a single object environment. It is meant to be independent of the programming language used. Its default language is Smalltalk running on an Objective-C runtime.

PyObjC is a bidirectional bridge between the Python and Objective-C programming languages, allowing programmers to use and extend existing Objective-C libraries, such as Apple's Cocoa framework, using Python.

Apple Dylan is the original implementation of the programming language Dylan. It was developed by Apple Computer from 1992 to 1995.

libffi is a foreign function interface library. It provides a C programming language interface for calling natively compiled functions given information about the target function at run time instead of compile time. It also implements the opposite functionality: libffi can produce a pointer to a function that can accept and decode any combination of arguments defined at run time.

Nu is an interpreted object-oriented programming language, with a Lisp-like syntax, created by Tim Burks as an alternative scripting language to program OS X through its Cocoa application programming interface (API). Implementations also exist for iPhone and Linux.

Dart is a programming language designed for client development, such as for the web and mobile apps. It is developed by Google and can also be used to build server and desktop applications.

Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTSTEP operating system. Objective-C was the standard programming language supported by Apple for developing macOS and iOS applications using their respective application programming interfaces (APIs), Cocoa and Cocoa Touch, until the introduction of Swift in 2014.

Swift is a general-purpose, multi-paradigm, compiled programming language developed by Apple Inc. and the open-source community. First released in 2014, Swift was developed as a replacement for Apple's earlier programming language Objective-C, as Objective-C had been largely unchanged since the early 1980s and lacked modern language features. Swift works with Apple's Cocoa and Cocoa Touch frameworks, and a key aspect of Swift's design was the ability to interoperate with the huge body of existing Objective-C code developed for Apple products over the previous decades. It was built with the open source LLVM compiler framework and has been included in Xcode since version 6, released in 2014. On Apple platforms, it uses the Objective-C runtime library, which allows C, Objective-C, C++ and Swift code to run within one program.

References

  1. Baird, Wolfgang (23 March 2020). "w0lfschild/F-Script".