40
|
1 local Luan = require "luan:Luan.luan"
|
|
2 local error = Luan.error
|
|
3 local pairs = Luan.pairs or error()
|
|
4 local Io = require "luan:Io.luan"
|
|
5 local Http = require "luan:http/Http.luan"
|
|
6 local Shared = require "site:/lib/Shared.luan"
|
|
7 local head = Shared.head or error()
|
|
8 local header = Shared.header or error()
|
|
9
|
|
10
|
|
11 local content = {
|
|
12 intro = {
|
|
13 title = "Introduction"
|
|
14 content = function()
|
|
15 %>
|
|
16 <p>Learning reactionary programming will give you a deep understanding of programming and will enable to you to write your own programs and websites. However this is not enough to get a job with modern scum (members of depraved modern culture). Modern scum will expect you to use tools popular with them, so you would have to learn one of those. Probably the least horrible programming tool used by modern scum is <a href="python.html">Python</a>, so I would recommend learning that if you want a job.</p>
|
|
17
|
41
|
18 <p>The next 3 lessons are basic computer literacy. Even if you are not interested in programming, these would be useful skills.</p>
|
|
19
|
40
|
20 <p>I will develop this course incrementally based on demand. Whenever anyone completes the content here, I will add another lesson/section. This way I won't waste my time writing content that no one will use.</p>
|
|
21
|
|
22 <p>This course will be designed for you to learn reactionary programming in a logical sequence. I will focus on finding relevant resources, and I will only write explanations when nothing else is available on the subject. I will focus on web development since that is what I know best.</p>
|
|
23
|
41
|
24 <p>I will often say "Do X" without saying how to do X. A big part of programming is figuring out how to do things. Your two main resources are Google and ChatGPT. If you get stuck, you can ask me.</p>
|
40
|
25
|
|
26 <p>ChatGPT has become an essential programming tool. So the only task for this lesson is to play with ChatGPT. Later you can ask it technical questions.</p>
|
41
|
27
|
|
28 <p>If you have any questions, you can <a href="https://discord.gg/Qdcgvm3aAq">ask me on Discord</a>.</p>
|
40
|
29 <%
|
|
30 end
|
|
31 }
|
|
32 editor = {
|
|
33 title = "Text Editor and JSON"
|
|
34 content = function()
|
|
35 %>
|
|
36 <p>later</p>
|
|
37 <%
|
|
38 end
|
|
39 }
|
41
|
40 bash = {
|
|
41 title = "Bash - Command Line Shell"
|
|
42 content = function()
|
|
43 %>
|
|
44 <p>later</p>
|
|
45 <%
|
|
46 end
|
|
47 }
|
|
48 hg = {
|
|
49 title = "Mercurial - Source Control"
|
|
50 content = function()
|
|
51 %>
|
|
52 <p>later</p>
|
|
53 <%
|
|
54 end
|
|
55 }
|
|
56 html = {
|
|
57 title = "HTML and CSS"
|
|
58 content = function()
|
|
59 %>
|
|
60 <p>later</p>
|
|
61 <%
|
|
62 end
|
|
63 }
|
|
64 js = {
|
|
65 title = "JavaScript"
|
|
66 content = function()
|
|
67 %>
|
|
68 <p>later</p>
|
|
69 <%
|
|
70 end
|
|
71 }
|
|
72 luan = {
|
|
73 title = "Luan"
|
|
74 content = function()
|
|
75 %>
|
|
76 <p>later</p>
|
|
77 <%
|
|
78 end
|
|
79 }
|
|
80 http = {
|
|
81 title = "HTTP"
|
|
82 content = function()
|
|
83 %>
|
|
84 <p>later</p>
|
|
85 <%
|
|
86 end
|
|
87 }
|
|
88 java = {
|
|
89 title = "Java 8"
|
|
90 content = function()
|
|
91 %>
|
|
92 <p>later</p>
|
|
93 <%
|
|
94 end
|
|
95 }
|
40
|
96 }
|
|
97
|
|
98
|
|
99 local function show_toc(content)
|
|
100 %>
|
|
101 <ul>
|
|
102 <%
|
|
103 for id, info in pairs(content) do
|
|
104 %>
|
|
105 <li><a id="c_<%=id%>" href="#<%=id%>"><%=info.title%></a></li>
|
|
106 <%
|
|
107 end
|
|
108 %>
|
|
109 </ul>
|
|
110 <%
|
|
111 end
|
|
112
|
|
113 local function show_content(content,h)
|
|
114 for id, info in pairs(content) do
|
|
115 %>
|
|
116 <div heading>
|
|
117 <h<%=h%>><a id="<%=id%>" href="#<%=id%>"><%=info.title%></a></h<%=h%>>
|
|
118 <a href="#c_<%=id%>">contents</a>
|
|
119 </div>
|
|
120 <%
|
|
121 info.content()
|
|
122 end
|
|
123 end
|
|
124
|
|
125 return function()
|
|
126 Io.stdout = Http.response.text_writer()
|
|
127 %>
|
|
128 <!doctype html>
|
|
129 <html>
|
|
130 <head>
|
|
131 <% head() %>
|
|
132 <title>Learn Reactionary Programming</title>
|
|
133 <style>
|
|
134 div[toc] ul {
|
|
135 list-style-type: none;
|
|
136 }
|
|
137 div[toc] > ul {
|
|
138 padding-left: 0;
|
|
139 }
|
|
140 div[toc] > ul > li {
|
|
141 margin-bottom: 16px;
|
|
142 }
|
|
143 div[heading] {
|
|
144 display: flex;
|
|
145 justify-content: space-between;
|
|
146 margin-top: 36px;
|
|
147 }
|
|
148 div[heading] > * {
|
|
149 margin: 0;
|
|
150 }
|
|
151 div[heading] > a {
|
|
152 font-size: 14px;
|
|
153 }
|
|
154 </style>
|
|
155 </head>
|
|
156 <body>
|
|
157 <% header() %>
|
|
158 <div content>
|
|
159 <h1><a href="learn.html">Learn Reactionary Programming</a></h1>
|
|
160 <hr>
|
|
161 <h2>Contents</h2>
|
|
162 <div toc>
|
|
163 <% show_toc(content) %>
|
|
164 </div>
|
|
165 <hr>
|
|
166 <% show_content(content,2) %>
|
|
167 </div>
|
|
168 </body>
|
|
169 </html>
|
|
170 <%
|
|
171 end
|