S-Lang

Last updated
S-Lang
JED-editor-slang-source.png
S-Lang based editor, JED
Developer(s) John E. Davis [1]
Stable release
2.3.2 [2] [3]   OOjs UI icon edit-ltr-progressive.svg / 4 March 2018
Preview release
2.3.3-66 [4]   OOjs UI icon edit-ltr-progressive.svg / 25 January 2022
Written inS-Lang scripting language
Operating system POSIX
Type Widget toolkit
License GPL-2.0-or-later [5]
Website www.jedsoft.org/slang/ OOjs UI icon edit-ltr-progressive.svg

The S-Lang programming library is a software library for Unix, Windows, VMS, OS/2, and Mac OS X. It provides routines for embedding an interpreter for the S-Lang scripting language, and components to facilitate the creation of text-based applications. [6] The latter class of functions include routines for constructing and manipulating keymaps, an interactive line-editing facility, and both low- and high-level screen/terminal management functions. It is distributed under the terms of the GNU General Public License.

Contents

Brief history

The S-Lang programming library was started in 1992 by John E. Davis, considering that functions he wrote for a text editor might be useful in other programs. [7] The earliest version of the library contained input/output routines for interacting with computer terminals and an implementation of a simple stack-based interpreter with a PostScript-like syntax that he developed for use in a scientific plotting program. The JED text editor was the first program to both embed the interpreter and use the terminal I/O components of the library.

Interpreter

The interpreter makes up most of the S-Lang library, and is also where most of the development takes place. Although the original syntax supported by the interpreter resembled PostScript, the syntax has evolved to be much more C-like, with additional support for object-oriented style constructs. As a reflection of Davis's background in physics and professional interest in scientific computing, the language natively supports many vectorized array-based operations similar to MATLAB and IDL. [8]

Until version 2.0, the interpreter was not a standalone program. Instead, Davis advocated embedding it into applications to make them extensible. Using the interpreter meant either embedding it in a C program, or using it in the context of another application (e.g., the JED editor). The S-Lang shell, slsh, was a demonstration program capable of little more than running scripts. Version 2.0, released in 2005, made slsh interactive, and it has evolved into an application in its own right, with a number of external modules for use by it. As such, it has become the S-Lang interpreter.

Screen management

In the mid-1990s while porting the sc spreadsheet to the S-Lang library, Davis developed the library's screen management facility.[ citation needed ] This component was designed to optimize screen output (by minimizing the number of characters sent to the terminal), and provide a simple way to support a variety of terminals through an extra layer of abstraction between the application code and the terminal. The slrn newsreader was the first application to make full use of this interface.[ citation needed ] Since then, a number of other programs (e.g., Mutt [9] ) have taken advantage of this feature of the library, and it has become arguably the most used aspect of the library, as this component is considered to be an alternative to curses. [10] [11] Since version 2.0, the screen management routines have had transparent support for UTF-8.

See also

Related Research Articles

Bash (Unix shell) GNU replacement for the Bourne shell

Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. First released in 1989, it has been used as the default login shell for most Linux distributions. A version is also available for Windows 10 via the Windows Subsystem for Linux. It is also the default user shell in Solaris 11. Bash was also the default shell in all versions of Apple macOS prior to the 2019 release of macOS Catalina, which changed the default shell to zsh, although Bash remains available as an alternative shell.

Cygwin Unix subsystem for Windows machines

Cygwin is a POSIX-compatible programming and runtime environment that runs natively on Microsoft Windows. Under Cygwin, source code designed for Unix-like operating systems may be compiled with minimal modification and executed.

Shell script Script written for the shell, or command line interpreter, of an operating system

A shell script is a computer program designed to be run by the Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manipulation, program execution, and printing text. A script which sets up the environment, runs the program, and does any necessary cleanup or logging, is called a wrapper.

ScriptBasic is a scripting language variant of BASIC. The source of the interpreter is available as a C program under the LGPL license.

In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.

Gambas Integrated development environment

Gambas is the name of an object-oriented dialect of the BASIC programming language, as well as the integrated development environment that accompanies it. Designed to run on Linux and other Unix-like computer operating systems, its name is a recursive acronym for Gambas Almost Means Basic. Gambas is also the word for prawns in the Spanish, French, and Portuguese languages, from which the project's logos are derived.

A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is running. For example, a compiler that runs on a PC but generates code that runs on Android smartphone is a cross compiler.

curses (programming library)

curses is a terminal control library for Unix-like systems, enabling the construction of text user interface (TUI) applications.

Text-based user interface Type of interface based on outputting to or controlling a text display

In computing, text-based user interfaces (TUI), is a retronym describing a type of user interface (UI) common as an early form of human–computer interaction, before the advent of graphical user interfaces (GUIs). Like GUIs, they may use the entire screen area and accept mouse and other inputs. They may also use color and often structure the display using special graphical characters such as ┌ and ╣, referred to in Unicode as the "box drawing" set. The modern context of use is usually a terminal emulator.

A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging from widely used languages for common domains, such as HTML for web pages, down to languages used by only one or a few pieces of software, such as MUSH soft code. DSLs can be further subdivided by the kind of language, and include domain-specific markup languages, domain-specific modeling languages, and domain-specific programming languages. Special-purpose computer languages have always existed in the computer age, but the term "domain-specific language" has become more popular due to the rise of domain-specific modeling. Simpler DSLs, particularly ones used by a single application, are sometimes informally called mini-languages.

Comparison of command shells Wikimedia list article

A command shell is a command-line interface to interact with and manipulate a computer's operating system.

Harbour is a computer programming language, primarily used to create database/business programs. It is a modernized, open sourced and cross-platform version of the older Clipper system, which in turn developed from the dBase database market of the 1980s and 1990s.

Lazarus (software) Free cross-platform integrated development environment for Free Pascal

Lazarus is a free cross-platform visual integrated development environment (IDE) for rapid application development (RAD) using the Free Pascal compiler. Its goal is to provide an easy-to-use development environment for programmers developing with the Object Pascal language, which is as close as possible to Delphi.

JED (text editor)

JED is a text editor that makes extensive use of the S-Lang library. It is highly cross-platform compatible; JED runs on Windows and all flavors on Linux and Unix. Older versions are available for DOS. It is also very lightweight, which makes it an ideal editor for older systems, embedded systems, etc. JED's Emacs mode is one of the most faithful emulations available.

A scripting language or script language is a programming language for a runtime system that automates the execution of tasks that would otherwise be performed individually by a human operator. Scripting languages are usually interpreted at runtime rather than compiled.

Command-line interface Type of computer interface based on entering text commands and viewing text output

A command-line interface (CLI) processes commands to a computer program in the form of lines of text. The program which handles the interface is called a command-line interpreter or command-line processor. Operating systems implement a command-line interface in a shell for interactive access to operating system functions or services. Such access was primarily provided to users by computer terminals starting in the mid-1960s, and continued to be used throughout the 1970s and 1980s on VAX/VMS, Unix systems and personal computer systems including DOS, CP/M and Apple DOS.

Red (programming language) Computer programming language released in 2011

Red is a programming language designed to overcome the limitations of the programming language Rebol. Red was introduced in 2011 by Nenad Rakočević, and is both an imperative and functional programming language. Its syntax and general usage overlaps that of the interpreted Rebol language.

References

  1. Davis, John (26 November 2017). "A little bit about me". John E. Davis Software. Archived from the original on 31 May 2020. Retrieved 1 June 2020.
  2. http://www.jedsoft.org/releases/slang/.
  3. http://lists.jedsoft.org/lists/slang-users/2018/0000002.html.
  4. http://www.jedsoft.org/snapshots/.
  5. Davis, John (4 March 2018). "S-Lang Software License Information". John E. Davis Software. Archived from the original on 31 May 2020. Retrieved 31 May 2020.
  6. Linux Bible 2010 Edition: Boot Up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 13 Other Distributions, by Christopher Negus, Wiley, 2009, ISBN   978-0-470-48505-7, p.775
  7. "A Brief History of S-Lang" . Retrieved June 6, 2017.
  8. Getting more from your multicore: exploiting OpenMP from an open-source numerical scripting language, Noble, M. S., Concurrency and Computation: Practice and Experience Volume 20, Issue 16, pages 1877–1891, 2008, doi: 10.1002/cpe.1296
  9. "Mutt install guide" . Retrieved 2015-10-04.
  10. MySQL Developer's Library, by Paul Dubois, Pearson Education, 2009, ISBN   9780672329388, section 6.1
  11. Linux application development, by Michael K. Johnson and Erik W. Troan, Addison-Wesley, 2005, ISBN   9780321219145, p513