OsĀ“ci`nes

n. pl. 1. (Zool.) Singing birds; a group of the Passeres, having numerous syringeal muscles, conferring musical ability.

View on GitHub

oscin.es is a JavaScript library based on the standard combinators.

The Code

There are two kinds of functions in the library. Functions with the capitalized nickname of a bird are fixed arity forms of the combinators, e.g. function Kestrel (x, y), function Starling (x, y, z). Functions with a capitalized abbreviated name are curried forms that match the semantics of combinatory logic, e.g. C is the curried form of Cardinal, T is the curried form of Thrush.

Normal-Order Reduction

The library includes a function that applies normal-order reduction to expressions composed of proper combinators and unknowns. You can type things like reduce('Dxyzw') or reduce('BBxyzw') and get the response 'xy(zw)' to both, thus demonstrating that D = BB. (Or in keeping with the passeri metaphor, "If you call out the name of the bluebird to itself, it responds with the name of the dove.")

Getting Started

npm install oscin.es

Then read readme.md.

Songbirds

To Mock a Mockingbird established the metaphor of songbirds for the combinators, and ever since then logicians have called the K combinator a "kestrel," the B combinator a "bluebird," and so forth. The library's specs contain a comprehensive listing of birds.

In Raymond Smullyan's book, when you call out the song of a bird, each songbird responds with a song denoting a songbird. For example, the Identity bird sings back the name of the bird you sang to it. From the presence of a few simple birds in a forest, you can deduce all of programming.

Project Status

The standard birds are included and fully tested. The combinator definitions are fully listed, and readme.md describes how to install and use oscin.es with npm and node.

You can browse the source code and tests online.

Support or Contact

oscin.es was written by Reg Braithwaite (@raganwald). It is published under the MIT License.