Scsh (a ''Scheme shell'') is computer
software, a type of
shell for an
operating system. It is a Portable Operating System Interface (
POSIX)
application programming interface
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how t ...
(API) layered on the programming language
Scheme, in a manner to make the most of Scheme's ability for
scripting
Script may refer to:
Writing systems
* Script, a distinctive writing system, based on a repertoire of specific elements or symbols, or that repertoire
* Script (styles of handwriting)
** Script typeface, a typeface with characteristics of handw ...
. Scsh is limited to
32-bit
In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in 32-bit units. Compared to smaller bit widths, 32-bit computers can perform large calculation ...
platforms but there is a development version against the latest
Scheme 48 that works in
64-bit mode. It is
free and open-source software
Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
released under the
BSD-3-Clause
BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the use and distribution of covered software. This is in contrast to copyleft licenses, which have share-alike requirements. The original BSD lic ...
license.
Features
Scsh includes these notable features:
*
Library support for list, character, and
string
String or strings may refer to:
*String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects
Arts, entertainment, and media Films
* ''Strings'' (1991 film), a Canadian anim ...
manipulations;
*
Regular expressions manipulation support using ''scheme regular expressions'', a
domain-specific language
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 f ...
(DSL), or little languages, approach to the abilities;
* Strong networking support;
* High-level support for
awk like scripts, integrated into the language as
macros;
* Abstractions supporting
pseudo terminals;
* A
shell language, modeled using
quasi-quotation.
Example
* Print a list of all the executables available in the current
PATH to the
standard output:
#!/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"))))
"Acknowledgments"
The reference manual for Scsh includes a spoof
Acknowledgments section
written by Olin Shivers. It starts:
:''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?''
and concludes with:
:''Oh, yes, the acknowledgements. I think not. I did it. I did it all, by myself.''
See also
*
Unix shell
*
Comparison of command shells
References
External links
*
*
Sourceforge project page
Unix shells
Scheme (programming language) interpreters
Scheme (programming language) implementations
Scripting languages
Software using the BSD license
{{Unix-stub