annotate src/learn.html.luan @ 51:4c511f4aa282

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 08 Jan 2024 12:27:07 -0700
parents 3057adc065f3
children 8e5ad4f564f5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 local pairs = Luan.pairs or error()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 local Io = require "luan:Io.luan"
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 local Http = require "luan:http/Http.luan"
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 local Shared = require "site:/lib/Shared.luan"
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 local head = Shared.head or error()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 local header = Shared.header or error()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 local content = {
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 intro = {
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 title = "Introduction"
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 content = function()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
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>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17
41
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
18 <p>The next 3 lessons are basic computer literacy. Even if you are not interested in programming, these would be useful skills.</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
19
40
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
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>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
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>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23
41
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
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
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
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
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
27
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
28 <p>If you have any questions, you can <a href="https://discord.gg/Qdcgvm3aAq">ask me on Discord</a>.</p>
40
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
31 }
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32 editor = {
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
33 title = "Text Editor and JSON"
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
34 content = function()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
35 %>
42
84b97e86f4db learn - editor
Franklin Schmidt <fschmidt@gmail.com>
parents: 41
diff changeset
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>
84b97e86f4db learn - editor
Franklin Schmidt <fschmidt@gmail.com>
parents: 41
diff changeset
37
84b97e86f4db learn - editor
Franklin Schmidt <fschmidt@gmail.com>
parents: 41
diff changeset
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>
84b97e86f4db learn - editor
Franklin Schmidt <fschmidt@gmail.com>
parents: 41
diff changeset
39
43
Franklin Schmidt <fschmidt@gmail.com>
parents: 42
diff changeset
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
84b97e86f4db learn - editor
Franklin Schmidt <fschmidt@gmail.com>
parents: 41
diff changeset
41
44
5b4d5cf453a8 start bash
Franklin Schmidt <fschmidt@gmail.com>
parents: 43
diff changeset
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
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
43 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
44 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
45 }
41
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
46 bash = {
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
47 title = "Bash - Command Line Shell"
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
48 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
49 %>
49
3057adc065f3 finish learn_bash
Franklin Schmidt <fschmidt@gmail.com>
parents: 45
diff changeset
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
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
51 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
52 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
53 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
54 hg = {
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
55 title = "Mercurial - Source Control"
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
56 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
57 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
58 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
59 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
60 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
61 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
62 html = {
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
63 title = "HTML and CSS"
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
64 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
65 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
66 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
67 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
68 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
69 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
70 js = {
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
71 title = "JavaScript"
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
72 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
73 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
74 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
75 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
76 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
77 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
78 luan = {
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
79 title = "Luan"
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
80 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
81 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
82 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
83 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
84 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
85 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
86 http = {
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
87 title = "HTTP"
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
88 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
89 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
90 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
91 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
92 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
93 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
94 java = {
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
95 title = "Java 8"
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
96 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
97 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
98 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
99 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
100 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
101 }
40
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
102 }
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
103
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
104
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
105 local function show_toc(content)
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
106 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
107 <ul>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
108 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
109 for id, info in pairs(content) do
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
110 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
111 <li><a id="c_<%=id%>" href="#<%=id%>"><%=info.title%></a></li>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
112 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
113 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
114 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
115 </ul>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
116 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
117 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
118
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
119 local function show_content(content,h)
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
120 for id, info in pairs(content) do
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
121 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
122 <div heading>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
123 <h<%=h%>><a id="<%=id%>" href="#<%=id%>"><%=info.title%></a></h<%=h%>>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
124 <a href="#c_<%=id%>">contents</a>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
125 </div>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
126 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
127 info.content()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
128 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
129 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
130
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
131 return function()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
132 Io.stdout = Http.response.text_writer()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
133 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
134 <!doctype html>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
135 <html>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
136 <head>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
137 <% head() %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
138 <title>Learn Reactionary Programming</title>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
139 </head>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
140 <body>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
141 <% header() %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
142 <div content>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
143 <h1><a href="learn.html">Learn Reactionary Programming</a></h1>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
144 <hr>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
145 <h2>Contents</h2>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
146 <div toc>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
147 <% show_toc(content) %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
148 </div>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
149 <hr>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
150 <% show_content(content,2) %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
151 </div>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
152 </body>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
153 </html>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
154 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
155 end