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 %>
|
42
|
36 <p>A text editor is a basic tool for reactionary programmers. We use simple flexible tools. Modern scum use an <a href="https://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a> which is big, <a href="http://www.mikraite.org/Changed-my-mind-about-IDE-s-tp2769.html">complicated</a>, and inflexible. We don't use such tools.</p>
|
|
37
|
|
38 <p>I reviewed the available text editors and I think <a href="https://www.sublimetext.com/">Sublime Text</a> is the best one available. So please download it and learn how it works.</p>
|
|
39
|
43
|
40 <p><a href="https://en.wikipedia.org/wiki/JSON">JSON</a> is the most popular text data format. I think JSON was the last good programming idea from modern culture, developed around 2001, before modern culture became fully depraved. Do your own research on JSON to understand it. It is fairly simple.</p>
|
42
|
41
|
|
42 <p>I paired Sublime Text with JSON because Sublime Text uses JSON files for its <a href="https://www.sublimetext.com/docs/settings.html">settings</a>. (Actually not quite pure JSON because it includes comments which are lines starting with "<code>//</code>".) Experiment with Sublime Text settings to learn more about both Sublime Text and JSON.</p>
|
40
|
43 <%
|
|
44 end
|
|
45 }
|
41
|
46 bash = {
|
|
47 title = "Bash - Command Line Shell"
|
|
48 content = function()
|
|
49 %>
|
|
50 <p>later</p>
|
|
51 <%
|
|
52 end
|
|
53 }
|
|
54 hg = {
|
|
55 title = "Mercurial - Source Control"
|
|
56 content = function()
|
|
57 %>
|
|
58 <p>later</p>
|
|
59 <%
|
|
60 end
|
|
61 }
|
|
62 html = {
|
|
63 title = "HTML and CSS"
|
|
64 content = function()
|
|
65 %>
|
|
66 <p>later</p>
|
|
67 <%
|
|
68 end
|
|
69 }
|
|
70 js = {
|
|
71 title = "JavaScript"
|
|
72 content = function()
|
|
73 %>
|
|
74 <p>later</p>
|
|
75 <%
|
|
76 end
|
|
77 }
|
|
78 luan = {
|
|
79 title = "Luan"
|
|
80 content = function()
|
|
81 %>
|
|
82 <p>later</p>
|
|
83 <%
|
|
84 end
|
|
85 }
|
|
86 http = {
|
|
87 title = "HTTP"
|
|
88 content = function()
|
|
89 %>
|
|
90 <p>later</p>
|
|
91 <%
|
|
92 end
|
|
93 }
|
|
94 java = {
|
|
95 title = "Java 8"
|
|
96 content = function()
|
|
97 %>
|
|
98 <p>later</p>
|
|
99 <%
|
|
100 end
|
|
101 }
|
40
|
102 }
|
|
103
|
|
104
|
|
105 local function show_toc(content)
|
|
106 %>
|
|
107 <ul>
|
|
108 <%
|
|
109 for id, info in pairs(content) do
|
|
110 %>
|
|
111 <li><a id="c_<%=id%>" href="#<%=id%>"><%=info.title%></a></li>
|
|
112 <%
|
|
113 end
|
|
114 %>
|
|
115 </ul>
|
|
116 <%
|
|
117 end
|
|
118
|
|
119 local function show_content(content,h)
|
|
120 for id, info in pairs(content) do
|
|
121 %>
|
|
122 <div heading>
|
|
123 <h<%=h%>><a id="<%=id%>" href="#<%=id%>"><%=info.title%></a></h<%=h%>>
|
|
124 <a href="#c_<%=id%>">contents</a>
|
|
125 </div>
|
|
126 <%
|
|
127 info.content()
|
|
128 end
|
|
129 end
|
|
130
|
|
131 return function()
|
|
132 Io.stdout = Http.response.text_writer()
|
|
133 %>
|
|
134 <!doctype html>
|
|
135 <html>
|
|
136 <head>
|
|
137 <% head() %>
|
|
138 <title>Learn Reactionary Programming</title>
|
|
139 <style>
|
|
140 div[toc] ul {
|
|
141 list-style-type: none;
|
|
142 }
|
|
143 div[toc] > ul {
|
|
144 padding-left: 0;
|
|
145 }
|
|
146 div[toc] > ul > li {
|
|
147 margin-bottom: 16px;
|
|
148 }
|
|
149 div[heading] {
|
|
150 display: flex;
|
|
151 justify-content: space-between;
|
|
152 margin-top: 36px;
|
|
153 }
|
|
154 div[heading] > * {
|
|
155 margin: 0;
|
|
156 }
|
|
157 div[heading] > a {
|
|
158 font-size: 14px;
|
|
159 }
|
|
160 </style>
|
|
161 </head>
|
|
162 <body>
|
|
163 <% header() %>
|
|
164 <div content>
|
|
165 <h1><a href="learn.html">Learn Reactionary Programming</a></h1>
|
|
166 <hr>
|
|
167 <h2>Contents</h2>
|
|
168 <div toc>
|
|
169 <% show_toc(content) %>
|
|
170 </div>
|
|
171 <hr>
|
|
172 <% show_content(content,2) %>
|
|
173 </div>
|
|
174 </body>
|
|
175 </html>
|
|
176 <%
|
|
177 end
|