TalkTalk

a lil programming language.

View on GitHub

For Loops!

You’ve probably seen these before. If not, well, buckle up. You’re in for a treat.

for i in [1, 2, 3] {
  print(i)
}

Fibonacci!

Want to inefficiently calculate some numbers in the fibonacci sequence? Copy the code you see here.

func fib(n) {
	if n <= 1 { return n }

	return fib(n - 2) + fib(n - 1)
}

var i = 0

// Calculate some numbers
while i < 15 {
	print(fib(i))
	i = i + 1
}

Protocols!

TalkTalk supports protocols, which are like Swift protocols but they do less. But you don’t need to annotate as many types.

Also we’ve got string interpolation.

protocol Greetable {
	func greet(name: String) -> String
}

struct Person: Greetable {
	func greet(name) {
		"Hello, \(name)!"
	}
}

func greet(greetable: Greetable) {
	print(greetable.greet("pat"))
}

greet(Person())

Install

$ brew install talktalklang/tap/talktalk

TalkTalk isn’t beta, or even alpha. It’s whatever comes before that. Sigma? I don’t know but don’t expect everything to work.

Frequently Asked Questions

“Why?”

The only question that really gets asked about TalkTalk is: why? I guess the best answer is: why not?