-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
284 lines (269 loc) · 13.1 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Rant - Home Page">
<meta property="og:site_name" content="The Rant Procedural Generation Language">
<meta property="og:url" content="https://rant-lang.org">
<meta property="og:description" content="Rant is a high-level language for templating and procedural generation. Easily create dynamic templates, dialogue, stories, name generators, test data, and much more with minimal code.">
<meta property="og:type" content="website">
<meta property="og:image" content="/img/rant4-logo.png">
<meta property="og:locale" content="en_US" />
<title>Rant – The Procedural Generation Language</title>
<link rel="icon" href="/favicon.png">
<link href="/css/main.css" rel="stylesheet">
<link href="/css/splash.css" rel="stylesheet">
<link href="/css/fontawesome.min.css" rel="stylesheet">
<link href="/css/brands.min.css" rel="stylesheet">
<link href="/css/hljs/rant.css" rel="stylesheet">
<script src="/js/highlight.pack.js"></script>
<script src="/js/hljs-rant.js"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
</head>
<body>
<nav id="navbar">
<img class="logo left" src="/img/rant4-logo_logo-white.png" />
<a href="/get-started">Get Started</a>
<a href="/install">Install</a>
<a href="https://docs.rant-lang.org">Documentation</a>
<a href="/pricing">Pricing</a>
</nav>
<main id="content">
<section id="splash-grid">
<div id="splash-cell-logo">
<img id="splash-logo" src="/img/rant4-logo-text_logo-text-13.png" alt="Rant logo">
</div>
<div id="splash-cell-title">
<h1 id="splash-title" aria-hidden="true">
The language for procedural
<div class="spinner">
<span class="spinner-item">text processing</span>
<span class="spinner-item">code templating</span>
<span class="spinner-item">storytelling</span>
<span class="spinner-item">worldbuilding</span>
<span class="spinner-item">game dialogue</span>
<span class="spinner-item">character stats</span>
<span class="spinner-item">data structures</span>
<span class="spinner-item">mock data</span>
<span class="spinner-item">anything</span>
<noscript><span class="active highlight">anything</span></noscript>
</div>
</h1>
</div>
<nav id="splash-nav">
<a href="/get-started">Get Started</a>
</nav>
</section>
<section id="section-about" class="theme-a">
<h1>Procgen made easy.</h1>
<p>
Rant is a high-level language for templating and procedural generation.
It enables you to easily create dynamic templates, dialogue, stories, name generators, test data, and much more with minimal code.
</p>
<h2>Rant is <em>intuitive</em></h2>
<p>
Think of Rant as the opposite of Regex: just as a regular expression compares inputs to a pattern, Rant generates matching outputs from a pattern.
If you understand one, you already understand the other!
</p>
<h2>Rant is <em>concise</em></h2>
<p>
Rant's standard library provides built-in utilities for many common use cases, cutting down on the amount of boilerplate you need to write.
</p>
<p>
Even for more complex generation tasks, Rant has your back. With its powerful set of synchronization, branching, and generation tools, you can get results with far less code than conventional programming languages.
</p>
<h2>Rant is <em>flexible</em></h2>
<p>
Rant is infinitely configurable for a wide range of use cases ranging from natural language generation to simple code templating. What you do with it is up to you!
</p>
</section>
<section id="section-features" class="theme-b">
<h1>Features</h1>
<div id="feature-showcase">
<section class="feature">
<div class="feature-desc">
<h3>Branching</h3>
<p>
Multiple possibilities? Not a problem. Branch off your code in unlimited directions by letting Rant pick randomly,
or use one of the numerous other available selection modes.
</p>
</div>
<pre><code class="language-rant">The quick {red|brown|orange} fox...
##
Possible outputs:
The quick red fox...
The quick brown fox...
The quick orange fox...
##
</code></pre>
</section>
<section class="feature">
<div class="feature-desc">
<h3>Dynamic type system</h3>
<p>
Take advantage of Rant's dynamic type system with several built-in primitive and collection types.
Influenced by languages like Lua and Python, Rant provides a familiar way to work with any kind of data.
</p>
</div>
<pre><code class="language-rant"><$lucky-number=[num:1;100]>
Your lucky number is <lucky-number>.
</code></pre>
</section>
<section class="feature">
<div class="feature-desc">
<h3>Automatic formatting</h3>
<p>
Configure your programs to passively perform tasks like
automatic capitalization, number formatting, and whitespace normalization on your output.
</p>
</div>
<pre><code class="language-rant">[case-fmt:upper]hello world!\n
[case-fmt:first]hello world!\n
[case-fmt:each-word]hello world!\n
##
Output:
HELLO WORLD!
Hello world!
Hello World!
##</code></pre>
</section>
<section class="feature">
<div class="feature-desc">
<h3>Modules</h3>
<p>
Rant's module system allows you to create reusable libraries of functions and import them into other programs with a single function call.
</p>
</div>
<pre><code class="language-rant"># laughter.rant
<$module=@()>
[module/laugh: length] {
[rep:<length>]{ha}
}
<module>
# main.rant
[require:laughter]
[laughter/laugh: 8] # "hahahahahahahaha"
</code></pre>
</section>
<section class="feature">
<div class="feature-desc">
<h3>Block-based execution</h3>
<p>
Rant represents loops and conditional statements using <b>blocks</b>.
Blocks can be configured with several special behaviors:
they can insert list separators, control branch selection, and much more!
</p>
</div>
<pre><code class="language-rant">[rep:3][sep:" and "]
It just keeps {going}...
##
Output:
It just keeps going and going and going...
##</code></pre>
</section>
<section class="feature">
<div class="feature-desc">
<h3>Entanglement</h3>
<p>
If you need to synch­ronize RNG behavior in multiple places,
Rant's built-in en­tanglement utilities make it easy to reuse RNG sequences
in different parts of your program.
</p>
</div>
<pre><code class="language-rant">[fork:a]{woo|yee}[unfork]-
[fork:a]{hoo|haw}[unfork]!
# Outputs "woo-hoo!" or "yee-haw!"
</code></pre>
</section>
<section class="feature">
<div class="feature-desc">
<h3>Cross-platform</h3>
<p>
Rant is written in <a href="https://rust-lang.org">Rust</a>, which means it can run on any­thing that has Rust compiler support.
Enjoy seam­less port­ability of your Rant programs across Windows, Mac, Linux, and WebAssembly.
</p>
</div>
<pre><code class="language-rust">use rant::Rant;
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
// Create a default Rant context
let mut rant = Rant::with_random_seed();
// Compile a simple program
let program = rant.compile_quiet(
"{Hello|Hi|Hey} world!"
)?;
// Run the program and print the output
let output = rant.run(&program)?;
println!("{}", output);
Ok(())
}</code></pre>
</section>
</div>
</section>
<section id="section-learn" class="theme-c">
<h1>Learn Rant</h1>
<p>
If you want to jump right in, the best place to start is the <a href="/get-started/">Get Started</a> page.
It goes over installing Rant, writing basic programs, and running them in the included CLI tool.
</p>
<p>
When your appetite for knowledge becomes insatiable, check out the <a href="https://docs.rant-lang.org">Rant docs</a> for information on every part of Rant.
</p>
</section>
</main>
<footer>
<section>
<h3>Resources</h3>
<ul>
<li><a href="/install">Installation</a></li>
<li><a href="https://docs.rant-lang.org">Rant Language Docs</a></li>
<li><a href="https://docs.rs/rant">Rust API Docs</a></li>
<li><a href="/pricing">Pricing</a></li>
</ul>
</section>
<section>
<h3>Legal stuff</h3>
<ul>
<li><a href="/licenses">Licenses</a></li>
</ul>
</section>
<section>
<h3>Social</h3>
<ul class="icon-list">
<li><a href="https://twitter.com/RantLang" title="Twitter" target="_blank"><i class="fab fa-twitter"></i></a></li>
<li><a href="https://reddit.com/r/RantLang" title="Reddit" target="_blank"><i class="fab fa-reddit-alien"></i></a></li>
<li><a href="https://github.com/rant-lang" title="GitHub" target="_blank"><i class="fab fa-github"></i></a></li>
<li><a href="https://discord.gg/5n7bnAD" title="Discord" target="_blank"><i class="fab fa-discord"></i></a></li>
</ul>
</section>
</footer>
<script type="text/javascript" async>
async function sleep(ms) {
await new Promise(r => setTimeout(r, ms));
}
async function animateSpinner() {
let waitIntervalMs = 750;
let lastElement = null;
for (element of document.querySelectorAll("#splash-title > .spinner > span")) {
if (lastElement) {
lastElement.classList.remove("active");
}
element.classList.add("active");
lastElement = element;
await sleep(waitIntervalMs);
}
}
animateSpinner();
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-179100611-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-179100611-1');
</script>
</body>
</html>