caneka

A programming langauge for streams and lifecycles

Caneka is based on a common computer science challenge: "How to handle something, and move on, when the order is not the same". The langauge automatically populates virtual stacks and queues to handle tasks that would otherwise involve extensive handling.

Consider a real world example:

How do you know the end of a movie...
When the credits role!

Notice that the differences could be the credits, blank screen, different music, the names of real people, or certain conditionals such as the titles only apearing after a period of time.

This is the case for every parser, and most lifecycle based computer science problems. If you're parsing mixed content such as "number 128938 is cool". The number will only be complete when you recieve the space after the second 8. Any numerical character, in and of itself, is not an indication that the numerical content has been fully encountered.

Example Caneka Code

    cycle Movie 
        new { 
            if(titles() and later() and realPeople()){
                @ending
            }else{
                @experience
            }
        } experience {
            sad() ->
                cry()
                hugFriends()
            happy() ->
                yay()
            political() ->
                shout("oh $!@t not again. 'merica").then(goVote())
            other() ->
                thinkDeeply()

            @new
        } ending { 
            turnOffTube()
            startTalking()
            goHome()
        }
    }

    watching = Movie()
    for scene in theMovie
        watching(scene)
    

Status

The components of caneka have been created and are used in BasicTypes, and CycleServe from compare basic. These components are pre-production and will be first used for Email2Site.

The language itself will not be implemented until there is a need for authors on our team who are not comfortable writing against the C apis directly.