-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
tht.scroll
74 lines (66 loc) · 1.53 KB
/
tht.scroll
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
import ../code/conceptPage.scroll
id tht
name tht
appeared 2017
tags pl
website https://tht-lang.org/
latestVersion v0.7.1
writtenIn php css javascript markdown bourne-shell json
repoStats
firstCommit 2017
commits 624
committers 7
files 249
newestCommit 2024
example
// Familiar variable and List syntax.
$colors = ['red', 'blue', 'green'];
// New JSON-style syntax for Maps
$colorHex = {
red: '#FF0000',
green: '#00FF00',
blue: '#0000FF',
};
// Built-in types have methods using
// the mainstream 'dot' syntax.
$colors.push('purple');
// Extra parens aren't needed.
if $colors.length() > 3 {
$colors.pop();
}
// The standard library is organized
// into modules.
Response.sendPage({
title: 'Colors',
body: bodyHtml($colors),
});
// Template Functions let you organize
// your output (views) however you like.
// (e.g. by component, module, file, etc.)
template bodyHtml($colors) {
<h1>Colors</>
<ul>
-- foreach $colors as $c {
<li>{{ $c.toUpperCaseFirst() }}</>
-- }
</>
}
githubRepo https://github.com/joelesko/tht
firstCommit 2017
stars 99
forks 5
subscribers 12
created 2017
updated 2022
description THT Programming Language
issues 0
lineCommentToken //
hasLineComments true
// A comment
hasComments true
// A comment
hasSemanticIndentation false
domainName tht-lang.org
hackerNewsDiscussions
id|title|time|timestamp|by|comments|score
15163343|Show HN: THT – a cleaner, safer language that compiles to PHP|2017-09-03 19:29:56 UTC|1504466996|jlesk|0|3