blob: 3e633c0d7375647bc09d98206710de458ec0fa63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# [GOLEM](https://kdx.re/cgit/golem)
## Introduction
Programming language.
Designed for losers, by a loser.
Here's GOLEM's grandiose resume, please be nice: GOLEM is quite shy.
* no typing, everything is a shitty unsigned integer
* no complexity, made to be super simple to parse
* no ambiguity, there's only one shitty way to do each shitty thing
* no safety, every unsigned integer is also a pointer
* no abstraction, there ain't no stdlib
Here's some cute GOLEM code.
```golem
fn alloc(size);
fn atoi(str);
fn main(argc, argv) {
var i;
var ret;
var ptr;
var arr;
i = 2;
powed = 1;
arr = alloc(argc);
while i < argc {
arr[i] = atoi(argv[i]);
powed *= arr[i];
}
// bad heap management
heap -= argc;
// GOLEM has no * deference and uses $ for reference
ptr = $i;
ret += ptr[0];
return ret;
}
fn alloc(size) {
var ptr;
ptr = heap;
heap += size;
return ptr;
}
fn atoi(str) {
// <--- good code here
return 2038;
}
```
GOLEM is pretty much dumber
[C](https://en.wikipedia.org/wiki/C_programming_language),
think [B](https://en.wikipedia.org/wiki/B_programming_language) 2.0.69.
## Why?
GOLEM's goal is to be used on custom made virtual machines at a very low level
of abstraction.
GOLEM code is easy and pleasantly simple to write.
It's sheer simplicity makes it easily expandable.
I fucking wanted to make it.
## When?
I don't know, I progress on GOLEM to procrastinate on important work so
probably soon lol
|