/
index.html
61 lines (57 loc) · 2.85 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bJou</title>
<link rel="stylesheet" href="styles/basic.css">
<link rel="stylesheet" href="styles/source_code.css">
<script src="scripts/toggle_mobile_menu.js"></script>
</head>
<div class="topnav">
<a href="index.html" class="active logo_a" id="logo_link"><img class="logo" src="images/logo_blue.png"/><span class="logo_text active">bJou</span></a>
<span id="navlinks">
<a href="install.html" class="nav_a">Install</a>
<a href="features.html" class="nav_a">Features</a>
<a href="learn.html" class="nav_a">Learn</a>
<a href="blog.html" class="nav_a">Blog</a>
</span>
</div>
<body>
<header>
<h1>Program effectively. Compile quickly. Create fast code.</h1>
</header>
<p>
bJou is a simple systems programming language that focuses on speed and effectiveness in both the process of programming and the generated programs.
While the core of the language is relatively simple, bJou allows for limitless power of expressiveness through compile-time metaprogramming.
<a href="install.html">Try it out</a> and <a href="learn.html">learn more</a>.
</p>
<figure>
<pre class="inline_code numbered">
<span class="sl"><span class="kw">using</span> <span class="kw">import</span> <span class="str">"compiler.bjou"</span></span>
<span class="sl"></span>
<span class="sl"><span class="cmt"># run this at compile time</span></span>
<span class="sl"><span class="kw">\static_do</span> {</span>
<span class="sl"> <span class="cmt"># create the AST</span></span>
<span class="sl"> message := bjou_createStringLiteral(<span class="str">"Hello, world!\n"</span>)</span>
<span class="sl"> args := bjou_createArgList(&message, 1)</span>
<span class="sl"> ident := bjou_createIdentifier("printf")</span>
<span class="sl"> call := bjou_createCallExpression(ident, args)</span>
<span class="sl"></span>
<span class="sl"> <span class="cmt"># register symbols</span></span>
<span class="sl"> bjou_addSymbols(call, bjou_getGlobalScope())</span>
<span class="sl"></span>
<span class="sl"> <span class="cmt"># add to our program</span></span>
<span class="sl"> bjou_appendNode(call)</span>
<span class="sl">}</span></pre>
<figcaption> Building "Hello, world!" at compile time</figcaption>
</figure>
</body>
<footer>
<ul>
<li><a href="https://www.github.com/kammerdienerb/bJou" target="_blank"><img src="images/GitHub-Mark-120px-plus.png"/></a></li>
<li><a href="https://discord.gg/ZuDqxb8" target="_blank"><img src="images/Discord-Logo-Color.png"/></a></li>
</ul>
<span class="foot_txt">This website is open source and available on <a href="https://www.github.com/kammerdienerb/kammerdienerb.github.io" target="_blank">GitHub</a>.</span>
</footer>
</html>