A modern Unix shell language.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 89aedf6 Jan 10, 2018
Permalink
Failed to load latest commit information.
examples change file layout. Jan 10, 2018
src change file layout. Jan 10, 2018
.gitignore change file layout. Jan 10, 2018
.travis.yml add travis.yml Jan 10, 2018
makefile add travis.yml Jan 10, 2018
readme.md readme. Jan 11, 2018
todo.txt update todo. Jan 15, 2016

readme.md

rish - Modern Unix shell language

Build Status

Example

fun enumerate {
    let $i = 0 
    while fetch $e {
        yield $i $e
        let $i = $i + 1
    }
}

fun even_elements {
    enumerate | while fetch $i $e {
        if ($i % 2 == 0) {
            yield $e
        }
    }
}

yield a b c d | even_elements | sort -r

The result is

d
b

Quick sorting:

fun qsort {
    if fetch $pv ($xs) {
        $xs -> while fetch $x { if ($x <= $pv) { yield $x } } | qsort
        yield $pv
        $xs -> while fetch $x { if ($x >  $pv) { yield $x } } | qsort
    }
}

Current status

The development is currently stalled.