 🔱

# Introduction

What is the best way to express and deliver our ideas?

## Types

Complex Number. Real number. Rational number. Integer number. Natural number. $x:X$﻿ such that $X=\{...\}$﻿, $x\in X$﻿. Char. Array.

All types are first-class.

# Expressions

Should expressions admit whitespaces in names?

Closure.

## Some expressions

$+(||(0.7,0.2)-(0.2,0.3)||_2) $ + . ||(0.7,0.2)-(0.2,0.3)||_2

$||(0.7,0.2)-(0.2,0.3)||_2 | + $ (x => x+1)(1)
1

$interval(1000) | reduce(p => [p,p+p],[0,1]) $ connect(protocol=WebRTC) | chat
abc

connect(protocol=WebRTC, key="abc") |
interval(1000) |
reduce(p => [p,p+p],[0,1]) |
echo

## Declarations and assignments

You can declare new terms but alpha doesn’t allow assignments.

## Expressions

Alpha follows the convention that every expression has a value. The declarations or definitions return their references such that

x=6
// x
f(x)=x
// f

## Functions

The type of argument is by default real numbers.

f(x)=x^2

f (a,b,c) = (x1, x2) where
expressions

## Regular expressions

a ~ /REGULAR_EXPRESSION/g

# Program

UTF-8

Programs are not evaluated on the fly.

f(x) = x^2
f.self
// f(x)=x^2 : self
f.self.body.self
// x^2 : self
f.self.body.self.evaluate({"x": 1})
// 1^2
f.self.body.self.evaluate({"x": 1}).apply()
// 1

# Streams, composition, and pipes

The means of combinations are streams, composition ($f.g$﻿), and pipes (g|f).

# Lexical Structure

id: Unicode symbols

# Examples

## Grammar

Consider a grammar G4 where its production rules are
S: X*
what is its type?

Consider G4:Grammar where its production rules are
S: X*
what is its type?

Consider G4:Grammar where we have a environment e and its production rules are
S: X* {x=1}

W
graph TD
G --> Expr
Expr --> Expr+Expr
Expr+Expr --> Expr
Expr+Expr --> Expr
Expr --> 1

G —> Expr —> 1

G —> Expr —> Expr+Expr —>

## Kernels

%% html
%% prolog
%% alpha

Authoring

Interactive

## References

https://xtermjs.org/

https://www.npmjs.com/package/react-terminal#features