-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
471 lines (445 loc) · 26.6 KB
/
Copy pathindex.html
File metadata and controls
471 lines (445 loc) · 26.6 KB
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="HandheldFriendly" content="True">
<meta name="format-detection" content="telephone=no">
<meta name="description" content="Radon is a source-first programming language with its own REPL, script runner, built-in functions, and standard library modules written in Radon.">
<meta name="keywords" content="radon, programming language, repl, interpreter, radon language, radon docs, radon github">
<meta name="author" content="Md. Almas Ali">
<meta name="robots" content="index, follow">
<meta name="google-site-verification" content="zTEe-bypjwy2g3fTznxeCaJr54OYPmawh_Njmj3gB1o">
<meta property="og:title" content="The Radon Programming Language">
<meta property="og:description" content="Run Radon from source, use the REPL, execute .rn files, and explore the standard library and built-ins from the current repository.">
<meta property="og:image" content="./static/Rn.png">
<meta property="og:url" content="https://radon-project.github.io/">
<meta property="og:site_name" content="The Radon Programming Language">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@almasali22">
<meta name="twitter:creator" content="@almasali22">
<meta name="twitter:title" content="The Radon Programming Language">
<meta name="twitter:description" content="Source-first installation, REPL usage, standard library modules, and current Radon examples.">
<meta name="twitter:image" content="./static/Rn.png">
<title>The Radon Programming Language</title>
<link rel="shortcut icon" href="./static/favicon.ico" type="image/x-icon">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./static/main.css?v=4.2.0">
</head>
<body>
<div class="page-shell">
<header class="site-header">
<a href="/" class="brand" aria-label="Radon home">
<img src="./static/Rn.svg" alt="Radon logo">
<span>Radon</span>
</a>
<nav class="site-nav" id="mainNav" aria-label="Primary">
<a href="/docs">Docs</a>
<a href="#syntax">Syntax</a>
<a href="#features">Features</a>
<a href="#modules">Modules</a>
<a href="#contribute">Contribute</a>
</nav>
<div class="nav-ctas">
<button class="menu-toggle" id="menuToggle" aria-label="Toggle menu" aria-expanded="false" aria-controls="mainNav">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
</button>
<a href="https://github.com/radon-project/radon" class="nav-cta-link" target="_blank" rel="noopener" aria-label="View on GitHub"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg><span>GitHub</span></a>
<a href="/download" class="nav-cta-primary">Download</a>
<a href="https://discord.gg/C2aVE9ya6N" target="_blank" rel="noopener" class="nav-cta-discord"><svg class="discord-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03z"/></svg><span>Discord</span></a>
</div>
</header>
<main>
<section class="hero" id="start">
<div class="hero-copy">
<p class="eyebrow">Source-first • Python-powered</p>
<h1>The Radon Programming Language</h1>
<p class="lead">
Write clean, expressive code with built-in REPL, script runner, standard library modules,
classes, error handling, and safe Python interop — all from source.
</p>
<div class="hero-chips">
<span class="chip"><span class="chip-icon">⚡</span> REPL</span>
<span class="chip"><span class="chip-icon">📄</span> Script runner</span>
<span class="chip"><span class="chip-icon">🐍</span> Python interop</span>
<span class="chip"><span class="chip-icon">📦</span> Standard library</span>
</div>
<div class="hero-actions">
<a class="button button-primary" href="/download">Download Radon</a>
<a class="button button-secondary" href="/docs">Open Documentation</a>
<a class="button button-tertiary" href="https://github.com/radon-project/radon"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>View Repository</a>
</div>
<ul class="hero-points">
<li>Run the REPL with <code>python radon.py</code></li>
<li>Execute files with <code>python radon.py program.rn</code></li>
<li>Use modules, classes, arrays, hash maps, and Python interop</li>
</ul>
</div>
<div class="hero-art">
<div class="logo-orbit">
<div class="rn-emblem" aria-label="Radon emblem">Rn</div>
<span class="orbit orbit-a" aria-hidden="true"></span>
<span class="orbit orbit-b" aria-hidden="true"></span>
<span class="version-badge">v0.0.1a2</span>
</div>
</div>
</section>
<section class="panel command-panel" id="install">
<div>
<p class="eyebrow">Quick start</p>
<h2>Get running in under a minute</h2>
<p>
Clone the repository and run directly from source. No build step required —
just Python 3.12+ and you're ready to go.
</p>
</div>
<div class="code-block">
<button class="copy-btn" aria-label="Copy to clipboard" data-copy>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
</button>
<pre><code class="language-bash">git clone https://github.com/radon-project/radon.git
cd radon
python radon.py # Start REPL
python radon.py examples/simple.rn # Run a file</code></pre>
</div>
</section>
<section class="panel syntax-tour" id="syntax">
<div class="section-heading">
<p class="eyebrow">Language tour</p>
<h2>Explore the syntax</h2>
<p>Familiar constructs, clean design. See how Radon handles classes, loops, error handling, and more.</p>
</div>
<div class="tour-tabs" role="tablist">
<button class="tour-tab active" role="tab" data-tab="classes" aria-selected="true">Classes</button>
<button class="tour-tab" role="tab" data-tab="loops" aria-selected="false">Loops</button>
<button class="tour-tab" role="tab" data-tab="errors" aria-selected="false">Error handling</button>
<button class="tour-tab" role="tab" data-tab="collections" aria-selected="false">Arrays & maps</button>
<button class="tour-tab" role="tab" data-tab="pyapi" aria-selected="false">Python interop</button>
</div>
<div class="tour-panels">
<div class="tour-panel active" id="tab-classes">
<div class="code-block">
<button class="copy-btn" aria-label="Copy to clipboard" data-copy>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
</button>
<pre><code class="language-radon">import io
class Animal {
fun __constructor__(name, sound) {
this.name = name
this.sound = sound
}
fun speak() {
print(this.name + " says " + this.sound)
}
# Operator overloading
fun __add__(other) {
return Animal(this.name + "&" + other.name, "...")
}
}
var dog = Animal("Dog", "Woof")
var cat = Animal("Cat", "Meow")
dog.speak()
cat.speak()
var both = dog + cat
both.speak() # Dog&Cat says ...</code></pre>
</div>
</div>
<div class="tour-panel" id="tab-loops">
<div class="code-block">
<button class="copy-btn" aria-label="Copy to clipboard" data-copy>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
</button>
<pre><code class="language-radon"># Counting with a for loop
for i = 0 to 5 {
print(i)
}
# While loop with a condition
var count = 0
while count < 3 {
print("tick: " + str(count))
count = count + 1
}
# Loop with step
for i = 0 to 10 step 2 {
print(i) # 0, 2, 4, 6, 8
}</code></pre>
</div>
</div>
<div class="tour-panel" id="tab-errors">
<div class="code-block">
<button class="copy-btn" aria-label="Copy to clipboard" data-copy>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
</button>
<pre><code class="language-radon">fun divide(a, b) {
if b == 0 {
raise Exception("Division by zero")
}
return a / b
}
# Wrap risky calls in try/catch
try {
print(divide(10, 2)) # 5
print(divide(5, 0)) # raises
} catch err {
print("Caught: " + str(err))
}</code></pre>
</div>
</div>
<div class="tour-panel" id="tab-collections">
<div class="code-block">
<button class="copy-btn" aria-label="Copy to clipboard" data-copy>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
</button>
<pre><code class="language-radon"># Arrays
var nums = [1, 2, 3, 4, 5]
append(nums, 6)
print(nums) # [1, 2, 3, 4, 5, 6]
print(nums[0]) # 1
# Slicing
print(nums[1:4]) # [2, 3, 4]
# Hash maps
var config = {
"host": "localhost",
"port": 8080
}
print(config["host"]) # localhost</code></pre>
</div>
</div>
<div class="tour-panel" id="tab-pyapi">
<div class="code-block">
<button class="copy-btn" aria-label="Copy to clipboard" data-copy>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
</button>
<pre><code class="language-radon"># Import and use any Python module
var os_mod = pyapi("import os; os")
var cwd = pyapi("os.getcwd()")
print(cwd)
# Python's math library
var math = pyapi("import math; math")
print(pyapi("math.sqrt(144)")) # 12.0
# Date and time
var dt = pyapi("import datetime; datetime")
print(pyapi("str(datetime.date.today())"))</code></pre>
</div>
</div>
</div>
</section>
<section class="feature-grid" id="features">
<article class="panel feature-card accent-blue">
<div class="feature-card-icon">⚡</div>
<p class="eyebrow">REPL & scripting</p>
<h3>Run code your way</h3>
<p>Launch an interactive REPL with <code>python radon.py</code> or run any <code>.rn</code> file directly. No build step, no config.</p>
</article>
<article class="panel feature-card accent-amber">
<div class="feature-card-icon">🏗️</div>
<p class="eyebrow">OOP</p>
<h3>Classes and objects</h3>
<p>Define classes with <code>__constructor__</code>, instance methods, and <code>this</code> — operator overloading supported out of the box.</p>
</article>
<article class="panel feature-card accent-red">
<div class="feature-card-icon">🛡️</div>
<p class="eyebrow">Error handling</p>
<h3>Try, catch, raise</h3>
<p>Structured exception handling with <code>try</code>/<code>catch</code>/<code>raise</code> lets you write robust programs without crashing the runtime.</p>
</article>
<article class="panel feature-card accent-blue">
<div class="feature-card-icon">🔧</div>
<p class="eyebrow">Built-ins</p>
<h3>Rich built-in functions</h3>
<p>Over 30 built-in helpers — <code>str_len</code>, <code>is_num</code>, <code>append</code>, <code>range</code>, <code>type</code> and more — available with no imports.</p>
</article>
<article class="panel feature-card accent-amber">
<div class="feature-card-icon">📦</div>
<p class="eyebrow">Modules</p>
<h3>Import system</h3>
<p>Use <code>import module</code> or <code>from module import name</code>. Standard library modules are plain <code>.rn</code> files you can read and modify.</p>
</article>
<article class="panel feature-card accent-red">
<div class="feature-card-icon">🔒</div>
<p class="eyebrow">Security</p>
<h3>Sandboxed Python bridge</h3>
<p>Access any Python library via <code>pyapi()</code>. The runtime can prompt the user before allowing Python, disk, or network access.</p>
</article>
</section>
<section class="panel modules-panel" id="modules">
<div class="section-heading">
<p class="eyebrow">Standard library</p>
<h2>Modules currently shipped in the repo</h2>
</div>
<div class="module-grid">
<div><strong>argparser</strong><span>CLI argument parsing</span></div>
<div><strong>array</strong><span>Array utilities & helpers</span></div>
<div><strong>colorlib</strong><span>Terminal colour output</span></div>
<div><strong>io</strong><span>Typed input helpers</span></div>
<div><strong>math</strong><span>Mathematical functions</span></div>
<div><strong>os</strong><span>OS & filesystem access</span></div>
<div><strong>radiation</strong><span>Radon meta-utilities</span></div>
<div><strong>string</strong><span>String manipulation</span></div>
<div><strong>system</strong><span>Process & env control</span></div>
<div><strong>universe</strong><span>Global constants & helpers</span></div>
<div><strong>winlib</strong><span>Windows-specific APIs</span></div>
</div>
<p class="modules-note">
All modules are plain <code>.rn</code> files in the <code>stdlib/</code> folder — readable, forkable, and easy to extend.
See the <a href="/docs/standard-library">standard library docs</a> for full API references.
</p>
</section>
<section class="panel contribute-panel" id="contribute">
<div class="contribute-grid">
<div>
<p class="eyebrow">Open source</p>
<h2>Get involved</h2>
<p>Radon is built in the open on GitHub. Whether you want to file a bug, write a new standard-library module, or improve the interpreter — all contributions are welcome.</p>
<div class="hero-actions">
<a class="button button-primary" href="https://github.com/radon-project/radon/issues/new">File an issue</a>
<a class="button button-secondary" href="https://discord.gg/C2aVE9ya6N" target="_blank" rel="noopener"><svg class="discord-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03z"/></svg>Join Discord</a>
<a class="button button-secondary" href="https://github.com/radon-project/radon/pulls">Submit a PR</a>
</div>
</div>
<div class="contribute-links">
<a class="contribute-link" href="https://github.com/radon-project/radon">
<span class="cl-label">Source repository</span>
<span class="cl-desc">radon-project/radon</span>
<span class="cl-arrow">→</span>
</a>
<a class="contribute-link" href="/docs/contribution">
<span class="cl-label">Contribution guide</span>
<span class="cl-desc">How to set up and submit changes</span>
<span class="cl-arrow">→</span>
</a>
<a class="contribute-link" href="https://github.com/radon-project/radon/issues">
<span class="cl-label">Open issues</span>
<span class="cl-desc">Good first issues and bug reports</span>
<span class="cl-arrow">→</span>
</a>
<a class="contribute-link" href="https://github.com/radon-project/radon/blob/master/stdlib">
<span class="cl-label">Standard library source</span>
<span class="cl-desc">Written in Radon — easy to extend</span>
<span class="cl-arrow">→</span>
</a>
<a class="contribute-link" href="https://discord.gg/C2aVE9ya6N" target="_blank" rel="noopener">
<span class="cl-label"><svg class="discord-icon discord-icon--purple" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03z"/></svg>Discord community</span>
<span class="cl-desc">Ask questions, share projects, get help</span>
<span class="cl-arrow">→</span>
</a>
</div>
</div>
</section>
</main>
<footer class="site-footer">
<p>Radon Software Foundation · Maintained by <a href="https://github.com/Almas-Ali">Md. Almas Ali</a></p>
<div class="footer-links">
<a href="https://github.com/radon-project/radon">GitHub</a>
<a href="/docs">Docs</a>
<a href="https://discord.gg/C2aVE9ya6N" target="_blank" rel="noopener">Discord</a>
</div>
</footer>
</div>
<button class="scroll-top" id="scrollTop" aria-label="Back to top" title="Back to top">
<span class="st-atom">Rn</span>
<span class="st-label">↑ top</span>
</button>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-core.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
<script>
// Radon language syntax highlighting
Prism.languages.radon = {
'comment': /#.*/,
'string': /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,
'keyword': /\b(?:var|fun|class|if|elif|else|for|while|return|import|from|in|and|or|not|null|true|false|this|break|continue|try|catch|raise|end|to|step)\b/,
'builtin': /\b(?:print|input|str|int|float|bool|len|str_len|type|range|pyapi|is_num|is_str|is_list|is_fun|append|pop|extend)\b/,
'number': /\b\d+(?:\.\d+)?\b/,
'operator': /[+\-*\/=<>!]+|\b(?:and|or|not)\b/,
'punctuation': /[{}()\[\],.;:]/
};
</script>
<script>
(function() {
// Mobile menu toggle
var menuToggle = document.getElementById('menuToggle');
var mainNav = document.getElementById('mainNav');
if (menuToggle && mainNav) {
menuToggle.addEventListener('click', function() {
var isOpen = mainNav.classList.toggle('nav-open');
menuToggle.setAttribute('aria-expanded', isOpen);
});
// Close menu when clicking outside
document.addEventListener('click', function(e) {
if (!menuToggle.contains(e.target) && !mainNav.contains(e.target)) {
mainNav.classList.remove('nav-open');
menuToggle.setAttribute('aria-expanded', 'false');
}
});
}
// Scroll-to-top button
var stBtn = document.getElementById('scrollTop');
window.addEventListener('scroll', function() {
stBtn.classList.toggle('st-visible', window.scrollY > 400);
});
stBtn.addEventListener('click', function() {
stBtn.classList.add('st-launching');
window.scrollTo({ top: 0, behavior: 'smooth' });
setTimeout(function() { stBtn.classList.remove('st-launching'); }, 700);
});
// Copy to clipboard buttons
document.querySelectorAll('.copy-btn').forEach(function(btn) {
btn.addEventListener('click', function() {
var codeBlock = btn.closest('.code-block');
var code = codeBlock.querySelector('code');
if (code) {
navigator.clipboard.writeText(code.textContent).then(function() {
btn.classList.add('copied');
setTimeout(function() { btn.classList.remove('copied'); }, 2000);
});
}
});
});
// Syntax tour tab switcher
document.querySelectorAll('.tour-tab').forEach(function(btn) {
btn.addEventListener('click', function() {
var tab = btn.getAttribute('data-tab');
document.querySelectorAll('.tour-tab').forEach(function(b) {
b.classList.remove('active');
b.setAttribute('aria-selected', 'false');
});
document.querySelectorAll('.tour-panel').forEach(function(p) {
p.classList.remove('active');
});
btn.classList.add('active');
btn.setAttribute('aria-selected', 'true');
var panel = document.getElementById('tab-' + tab);
panel.classList.add('active');
Prism.highlightAllUnder(panel);
});
});
// Active nav link highlighting on scroll
var sections = document.querySelectorAll('section[id]');
var navLinks = document.querySelectorAll('.site-nav a[href^="#"]');
window.addEventListener('scroll', function() {
var scrollPos = window.scrollY + 150;
sections.forEach(function(section) {
if (section.offsetTop <= scrollPos && (section.offsetTop + section.offsetHeight) > scrollPos) {
navLinks.forEach(function(link) {
link.classList.remove('active');
if (link.getAttribute('href') === '#' + section.id) {
link.classList.add('active');
}
});
}
});
});
})();
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EQVZ8DQMSF"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-EQVZ8DQMSF');
</script>
</body>
</html>