Position Independent Source Code

Position Independent Source Code
Login

Postion Independent Source Code

PISC is a stack-based programming language that is primarily inspired by factor, TCL, bash and a little bit of python, written in go. It's currently a study in how far one can take code quotations, polymorphic stacks and pervasive dynamism.

Current longer term plan here

Noteworthy things can be found in the announcements

Some examples:

"Hello, World!" print

{ 
   "The answer is " 
   6 7 * >string 
   ", but we don't know the question" 
} "" str-join
    

/* Defining an adjustable fizzbuzz word */
: fizzbuzz-n ( n -- ) :n /* Store from stack to n local */
    1 :i /* Store 1 into num variable */
     
    $n [
        $i 3 divisor? [ "Fizz" ] [ "" ] if :f
        $i 5 divisor? [ "Buzz" ] [ "" ] if :b
        $f $b concat :fb
        $fb len 0 > [ $fb print ] [ $num print ] if 
        ++i
    ] times ;
    
25 fizzbuzz-n

If you want to look over a tour of more PISC features, check out PISC in Y mintues

The largest achievement in PISC to date is a CSV parser.

Installing From Source

Before you can install PISC for trying out, you'll need to install Go 1.7 or newer.

There are two ways to install PISC right now

1) Install fossil and run

fossil clone https://pisc.junglecoder.com/home/apps/fossil/PISC.fossil PISC.fossil

2) Using Go get

go get github.com/yumaikas/PISC-mirror

Once you have Go, and have PISC somewhere where the go compiler can work with it, you can run go get to fetch PISC's go dependencies, and go build -o PISC to build the PISC interpreter.

Once you have PISC built, PISC -i will open an interactive PISC session.

Other items

List of things to do.