961 reputation
5927
bio website
location
age
visits member for 2 years, 7 months
seen Nov 13 at 5:44

I'm the author of a natural language programming system called EngScript.

Some of my favorite software projects are:

I have written some useful macros in sweet.js:

//for repeating if statements
macro ifs{
    rule{
        {$($x {$y...}) ...}
    } => {

        $(if($x){
            $y...
        }) ...
    }
}

//a concise way to define several different functions
macro manyFuncs{
    rule{{$($x ($y...) {$z...}) ...}
    } => {
        $(function $x($y...){
            $z...
        }) ...
    }
}

ifs {
    a{
        b
    }
    c{
        d
    }
}

manyFuncs{
    fullName(firstName, lastName) {
        return firstName + lastName;
    }
    squared(a){
        return a*a;
    }
}

Right now, I'm searching for a parser that can handle ambiguous grammars.

In theory, it would also be possible to create a very concise programming language with implicitly defined parameters:

isDivisibleBy: (foo % bar) == 0
//This is a function with 2 parameters: foo and bar.

isEven: isDivisibleBy(foo, 2)

isOdd: !isEven(param1)

firstCharacter: theString[0]

lastCharacter: theString[theString.length - 1]

firstNCharacters: theString[0:end]

firstCharacterIsLastCharacter: firstCharacter(stringParameter) == lastCharacter(stringParameter)

printEach: for current in anArray{ print current }

http://rosettacode.org/ is one of the most comprehensive programming language references I've ever found.

Optionally-typed programming languages are really awesome: they combine the type safety of languages like Java with the conciseness of languages like Python.

Some cool things that I've made:

Someday, I hope it will be possible to create a programming language that mixes code from different languages into a single file, like this:

Python {
    def foo():
        return "foo"
}
Ruby {
    def bar
        return foo + " was called from Python."
    end
}

Sep
24
awarded  Autobiographer
Jul
2
awarded  Curious
Jun
12
awarded  Famous Question
Apr
24
awarded  Yearling
Feb
1
accepted Making mobs ride other mobs in Minecraft
Jan
20
awarded  Caucus
Jan
9
awarded  Popular Question
Jan
8
awarded  Nice Question
Dec
28
awarded  Nice Question
Nov
13
awarded  Famous Question
Sep
27
accepted Do mobs spawn in the same location for every seed in Minecraft?
Aug
9
awarded  Notable Question
Jul
17
accepted What is the most efficient way to find caves in Minecraft?
Jul
15
comment Keep items in inventory on death in Minecraft
Someone edited my answer and added "you are OP'ed" to this answer. I'm not even sure what this is intended to mean: does it mean "overpowered", or does it mean something else?
May
27
awarded  Nice Question
May
6
awarded  Notable Question
Apr
26
awarded  Popular Question
Apr
25
awarded  Famous Question
Apr
24
awarded  Yearling
Apr
22
awarded  Cleanup