Brat
Brat is a little language which tries to let you do what you want to do, because it knows no one is the boss of you. While influenced by Ruby in many ways, it accidentally resembles Javascript. The language design attempts to avoid "special cases" as much as possible, and therefore has no keywords and very few special symbols.
In Brat, everything is either an object or a function, and all functions are closures. Objects are essentially just collections of functions which can have inheritance relationships with other objects. The object system in Brat uses a prototyping approach, so new objects are always created as children of some existing object. Functions in Brat are first-class values which can be passed around like any other value.
Brat is also a very eager language. The only way to delay code evaluation is to enclose it in a function. Any use of a variable containing a function is assumed to be calling the function.
Tasks
- A+B
- Accumulator factory
- Ackermann function
- Apply a callback to an array
- Arithmetic/Integer
- Array length
- Assertions
- Associative array/Creation
- Associative array/Iteration
- Averages/Arithmetic mean
- Averages/Simple moving average
- Balanced brackets
- Binary search
- Bulls and cows
- Catalan numbers
- Comments
- Execute Brainfuck
- Execute a system command
- Exponentiation operator
- Factorial
- Fibonacci sequence
- Filter
- FizzBuzz
- Flatten a list
- Function composition
- Function definition
- Greatest element of a list
- Guess the number
- Guess the number/With feedback
- Hailstone sequence
- Happy numbers
- Hash from two arrays
- Hello world!
- Hello world/Text
- Higher-order functions
- Increment a numerical string
- Integer comparison
- Integer sequence
- Interactive programming
- Kaprekar numbers
- Knuth shuffle
- Least common multiple
- Logical operations
- Loops/Downward for
- Loops/For
- Loops/Infinite
- Loops/While
- Menu
- Multiple distinct objects
- Mutual recursion
- Number reversal game
- Pangram checker
- Read a file line by line
- Read entire file
- Regular expressions
- Remove duplicate elements
- Repeat a string
- Respond to an unknown method call
- Reverse a string
- Sorting algorithms/Bogosort
- Stack
- Sum of a series
- Sum of squares
- Test a function