158 reputation
6
bio website
location
age
visits member for 1 year, 8 months
seen Mar 16 at 18:45

I'm the author of a natural language programming tool called EngScript, which automatically translates English sentences into Python source code.

For reference, I've posted a link to questions with tags that I'm interested in.

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
Oct
24
awarded  Scholar
Oct
24
accepted Do Spanish verbs have principal parts?
Jan
31
comment Do Spanish verbs have principal parts?
There are also stem changing verbs, as well as irregular verbs.
Jan
30
awarded  Teacher
Jan
29
asked Find all forms of a verb, given one form of the verb
Jan
29
answered Find all forms of a verb, given one form of the verb
Jan
28
revised Do Spanish verbs have principal parts?
edited body
Jan
28
comment How can I recognize the conjugation of a verb from its infinitive?
@GabeThorns I'm only referring to regular verbs in this case, not irregular verbs. Are there any principal parts for regular verbs that can be used to fully conjugate those verbs (as there are in Latin)? (For example, in order to conjugate every form of a regular stem-changing verb (such as "dormir"), which forms of the verb would I need to memorize?) I think I'd only need to memorize the verb's infinitive, along with its original stem and modified stem: correct me if I'm wrong. :)
Jan
27
comment Do Spanish verbs have principal parts?
Which forms of each verb will I need to memorize, then, in order to conjugate every other form of the verb? (i. e., what principal parts will I need to know for each verb in order to fully conjugate the verb?)
Jan
27
comment Do Spanish verbs have principal parts?
Do you mean that it's possible to conjugate a verb (and determine whether it is a stem-changing verb) just by looking at the stem of the verb?
Jan
27
awarded  Editor
Jan
27
revised Do Spanish verbs have principal parts?
added 245 characters in body; edited title
Jan
27
comment Do Spanish verbs have principal parts?
For example, in Latin, the principle parts of the verb "tenere" would be "teneo, tenere, tenui, tentus". Are there any equivalent principal parts in Spanish for the verb "tener" (and other regular verbs)?
Jan
27
asked Do Spanish verbs have principal parts?
Jan
27
comment How can I recognize the conjugation of a verb from its infinitive?
@belisarius I know that there are some rules for finding conjugations, but I'm still not sure what they are. :/ In general, do any principal parts for a verb (besides the infinitive) need to be memorized in order to fully conjugate a regular verb?
Jan
27
awarded  Student
Jan
27
awarded  Supporter
Jan
27
comment How can I recognize the conjugation of a verb from its infinitive?
In particular, is it possible to recognize a stem-changing regular verb based on its infinitive (such as "dormir" --> "duermen" vs. "pedir" --> "piden"? Can regular stem-changing verbs be recognized from their infinitive form?
Jan
27
comment How can I recognize the conjugation of a verb from its infinitive?
In general, is it possible to conjugate all verbs in all of their tenses based on their infinitives?