WPL
所属分类:其他
开发工具:D
文件大小:0KB
下载次数:0
上传日期:2023-11-25 17:12:01
上 传 者:
sh-1993
说明: 奇怪的编程语言
(Weird Programming Language)
文件列表:
LICENSE (1065, 2023-12-03)
dub.json (184, 2023-12-03)
examples/ (0, 2023-12-03)
examples/array.wpl (168, 2023-12-03)
examples/brainfuck.wpl (1369, 2023-12-03)
examples/carpet.wpl (590, 2023-12-03)
examples/cmdargs.wpl (91, 2023-12-03)
examples/computerZero.wpl (1543, 2023-12-03)
examples/factorial.wpl (166, 2023-12-03)
examples/fileWrite.wpl (225, 2023-12-03)
examples/filter.wpl (362, 2023-12-03)
examples/format.wpl (90, 2023-12-03)
examples/functions.wpl (77, 2023-12-03)
examples/hello_world.wpl (26, 2023-12-03)
examples/import.wpl (74, 2023-12-03)
examples/insertionSort.wpl (880, 2023-12-03)
examples/library.wpl (48, 2023-12-03)
examples/memory.wpl (277, 2023-12-03)
examples/name.wpl (174, 2023-12-03)
examples/random.wpl (122, 2023-12-03)
examples/structures.wpl (186, 2023-12-03)
examples/while.wpl (85, 2023-12-03)
source/ (0, 2023-12-03)
source/app.d (1884, 2023-12-03)
source/builtins.d (5893, 2023-12-03)
source/error.d (385, 2023-12-03)
source/exception.d (140, 2023-12-03)
source/interpreter.d (13469, 2023-12-03)
source/language.d (310, 2023-12-03)
source/lexer.d (2840, 2023-12-03)
source/operators/ (0, 2023-12-03)
source/operators/array.d (1642, 2023-12-03)
source/operators/floats.d (2681, 2023-12-03)
source/operators/function.d (1138, 2023-12-03)
source/operators/imperative.d (1074, 2023-12-03)
source/operators/integer.d (3769, 2023-12-03)
source/operators/io.d (1442, 2023-12-03)
source/operators/logic.d (1394, 2023-12-03)
... ...
# WPL
Interpreted programming language where everything is done with binary operators
## Build
```
dub build
```
## Example (insertionSort.wpl)
```
(sort = ([array] => {
(n = (array - 0)) ;
((n > 1) ? {
(i = 1) ;
({i < n} @ {
(key = ((array : i) : 0)) ;
(j = (i - 1)) ;
({{j >= 0} && {key < ((array : j) : 0)}} @ {
((array : (j + 1)) := ((array : j) : 0)) ;
(j = (j - 1))
}) ;
((array : (j + 1)) := key) ;
(i = (i + 1))
})
}) ;
array
})) ;
(array = (sort ! [[2 3 1 6 5]])) ;
(i = 0) ;
({i < (array - 0)} @ {
(stderr .d ((array : i) : 0)) ;
(stderr .s "\n") ;
(i = (i + 1))
})
```
近期下载者:
相关文件:
收藏者: