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 = {
|
52
|
13 title = [[Introduction]]
|
40
|
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 = {
|
52
|
33 title = [[Text Editor and JSON]]
|
40
|
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
|
44
|
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 = {
|
52
|
47 title = [[Bash - Command Line Shell]]
|
41
|
48 content = function()
|
|
49 %>
|
49
|
50 <p><a href="bash.html">Bash</a> is the other basic tool for reactionary programmers. I was hoping to just reference existing Bash tutorials in this lesson, but they are all horrible, so I am writing my own. So for this lesson, please read <a href="learn_bash.html">my tutorial</a>.</p>
|
41
|
51 <%
|
|
52 end
|
|
53 }
|
|
54 hg = {
|
52
|
55 title = [[Mercurial - Source Control]]
|
41
|
56 content = function()
|
|
57 %>
|
|
58 <p>later</p>
|
|
59 <%
|
|
60 end
|
|
61 }
|
|
62 html = {
|
52
|
63 title = [[HTML and CSS]]
|
41
|
64 content = function()
|
|
65 %>
|
|
66 <p>later</p>
|
|
67 <%
|
|
68 end
|
|
69 }
|
|
70 js = {
|
52
|
71 title = [[JavaScript]]
|
41
|
72 content = function()
|
|
73 %>
|
|
74 <p>later</p>
|
|
75 <%
|
|
76 end
|
|
77 }
|
|
78 luan = {
|
52
|
79 title = [[Luan]]
|
41
|
80 content = function()
|
|
81 %>
|
|
82 <p>later</p>
|
|
83 <%
|
|
84 end
|
|
85 }
|
|
86 http = {
|
52
|
87 title = [[HTTP]]
|
|
88 content = function()
|
|
89 %>
|
|
90 <p>later</p>
|
|
91 <%
|
|
92 end
|
|
93 }
|
|
94 regex = {
|
|
95 title = [[Regular Expressions]]
|
41
|
96 content = function()
|
|
97 %>
|
|
98 <p>later</p>
|
|
99 <%
|
|
100 end
|
|
101 }
|
|
102 java = {
|
52
|
103 title = [[Java 8]]
|
|
104 content = function()
|
|
105 %>
|
|
106 <p>later</p>
|
|
107 <%
|
|
108 end
|
|
109 }
|
|
110 lucene = {
|
|
111 title = [[Lucene]]
|
41
|
112 content = function()
|
|
113 %>
|
|
114 <p>later</p>
|
|
115 <%
|
|
116 end
|
|
117 }
|
40
|
118 }
|
|
119
|
|
120
|
|
121 local function show_toc(content)
|
|
122 %>
|
|
123 <ul>
|
|
124 <%
|
|
125 for id, info in pairs(content) do
|
|
126 %>
|
|
127 <li><a id="c_<%=id%>" href="#<%=id%>"><%=info.title%></a></li>
|
|
128 <%
|
|
129 end
|
|
130 %>
|
|
131 </ul>
|
|
132 <%
|
|
133 end
|
|
134
|
|
135 local function show_content(content,h)
|
|
136 for id, info in pairs(content) do
|
|
137 %>
|
|
138 <div heading>
|
|
139 <h<%=h%>><a id="<%=id%>" href="#<%=id%>"><%=info.title%></a></h<%=h%>>
|
|
140 <a href="#c_<%=id%>">contents</a>
|
|
141 </div>
|
|
142 <%
|
|
143 info.content()
|
|
144 end
|
|
145 end
|
|
146
|
|
147 return function()
|
|
148 Io.stdout = Http.response.text_writer()
|
|
149 %>
|
|
150 <!doctype html>
|
|
151 <html>
|
|
152 <head>
|
|
153 <% head() %>
|
|
154 <title>Learn Reactionary Programming</title>
|
|
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
|