# dongbei

dongbei is a language created by Zhanyong Wan following wenyan. Its source code reflects the characteristics of Northeastern Mandarin, a branch of Mandarin Chinese native to some 120 million people. It is implemented in, and mutual operatable with, Python.

## Code samples

Hello World:

`嘀咕：“Hello World”。         # literally: whisper "Hello World".`
```酒数从99到1一步-1蹿磨叽：        # lit. #wine roams -1 steps a stride from 99 to 1
嘀咕：酒数、“ bottles of beer on the wall, ”、酒数、“ bottles of beer.”。
嘀咕：“Take one down, pass it around, ”、酒数减一、“ bottles of beer on the wall.\n”。

```

A more complex example:

```无产阶级的接班银图形阶级咋整：	# lit. The class Figure, succession of Proletariat
# in dongbei, Proletariat is logically the common ancestor class
面积咋整：			# lit. area gotta be
整叉劈了：NotImplemented。
整完了。

新对象（半径）咋整：          # lit. new object (radius) gotta be
整完了。
面积咋整：
翠花，上math。		# import math, lit. Cuixua, math please!
滚犊子吧math.pi乘俺的半径乘俺的半径！
整完了。

新对象（长，宽）咋整：
俺的长跟俺的宽抱团装长跟宽抱团。	# tuple assignment
整完了。
面积咋整：
滚犊子吧俺的长乘俺的宽。
整完了。

嘀咕：老张整面积。		# lit. whisper Lao Zhang gotta area

# Output:
# 28.274333882308138
# 15
```

Here is pseudo code(for that↑):

```class Shape:
{
def area(void)
{
pass
}
}
class Circle(super=Shape)
{
{
}
def area()
{
#import<math.lib>
}
}
class Rectangle(super=shape)
{
new object int length, width:
{
tuple(my.length, my.width) = (length, width)
}
def area()
{
return my.length * my.width
}
}

var circle1 = Circle(3)
var ractangle1 = Rectangle(3, 5)
@seg1 segment@
print(Rect.area(length, width))
@seg1 ends@
```

And Pseudo-LOLCODE-Script:

```HAI 2.1
O HAI IM Figure        BTW 无产阶级的接班银图形阶级咋整：        BTW 目↓
HOW IZ I getting_area
BTW Passed
IF U SAY SO
KTHX

O HAI IM Circle        BTW 目↑
I HAS A radius ITZ NUMBAR BTW Do you dare to guarantee that there is no circle with a radius of √2?
HOW IZ I getting_area
CAN HAS MATH?
FOUND PRODUKT OF MATH'Z PI AN (PRODUKT OF ME'Z radius AN ME'Z radius)        BTW 滚犊子吧math.pi乘俺的半径乘俺的半径！
IF U SAY SO
KTHX
OBTW
The decimal type is used because
there is no guarantee that the
length and width of the rectangle
or the radius of the circle
are exact integers.
TLDR
O HAI IM Rectangle        BTW 目↑
I HAS A length ITZ NUMBAR
I HAS A width ITZ NUMBAR
(ME'Z length AN ME'Z width) R (length, width)
HOW IZ I getting_area
FOUND PRODUKT OF ME'Z length AN ME'Z width
IF U SAY SO
KTHX

I HAS A rect_1 ITZ LIEK A Rectangle
rect_1 R (3, 5)
I HAS A cir_1 ITZ LIEK A Circle
cir_1 R 3
VISIBLE (rect_1 IZ getting_area MKAY)
VISIBLE (cir_1 IZ getting_area MKAY)

BTW The grinding is over.

KTHXBYE
```

## Computational class

Turing complete, because it can invoke any Python code.

`整eval（“# Python code”）。    # lit. gotta eval ("# Python code").`