Scsh
Encyclopedia
Scsh is a POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...

 API layered on top of the Scheme programming language in a manner to make the most of Scheme's capability for scripting. It is limited to 32-bit
32-bit
The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295. Hence, a processor with 32-bit memory addresses can directly access 4 GB of byte-addressable memory....

 platforms but there is a development version against the latest scheme48 that works in 64bit mode..

The reference manual for Scsh includes a well-known acknowledgements page written by Olin Shivers in 1994,

Who should I thank? My so-called "colleagues", who laugh at me behind my back, all the while becoming famous on my work? My worthless graduate students, whose computer skills appear to be limited to downloading bitmaps off of netnews? My parents, who are still waiting for me to quit "fooling around with computers," go to med school, and become a radiologist? My department chairman, a manager who gives one new insight into and sympathy for disgruntled postal workers?


...


Oh, yes, the acknowledgements. I think not. I did it. I did it all, by myself.

Features

Scsh includes these notable features:
  • Library support for list, character, and string
    String (computer science)
    In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet....

     manipulations;
  • Regular expression
    Regular expression
    In computing, a regular expression provides a concise and flexible means for "matching" strings of text, such as particular characters, words, or patterns of characters. Abbreviations for "regular expression" include "regex" and "regexp"...

    s manipulation support using scheme regular expressions, a little languages approach to the capabilities;
  • Strong networking support;
  • High-level support for awk like scripts, integrated into the language as macros;
  • Abstractions supporting pseudo terminal
    Pseudo terminal
    In some operating systems, including Unix, a pseudo terminal is a pseudo-device pair that provides a text terminal interface without an associated device, such as a virtual console, computer terminal or serial port...

    s;
  • A shell
    Shell (computing)
    A shell is a piece of software that provides an interface for users of an operating system which provides access to the services of a kernel. However, the term is also applied very loosely to applications and may include any software that is "built around" a particular component, such as web...

     language, modeled using quasi-quotation
    Quasi-quotation
    Quasi-quotation is a linguistic device that facilitates rigorous and terse formulation of general rules about linguistic expressions while properly observing the use–mention distinction. It was introduced by the philosopher and logician Willard van Orman Quine in his book Mathematical Logic,...

    .

Example

  • Print a list of all the executables available in the current PATH
    Environment variable
    Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.They can be said in some sense to create the operating environment in which a process runs...

     to the standard output:


  1. !/usr/local/bin/scsh -s

!#

(define (executables dir)
(with-cwd dir
(filter file-executable? (directory-files dir #t))))
(define (writeln x) (display x) (newline))

(for-each writeln
(append-map executables ((infix-splitter ":") (getenv "PATH"))))

See also

  • esh (Unix)
    Esh (Unix)
    The easy shell is a simple and lightweight Unix shell for Unix-like computer operating systems. Its syntax deviates completely from that of traditional shells, using instead a Lisp-like syntax...

  • Unix shell
    Unix shell
    A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems...

  • Comparison of command shells

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK