annotate src/learn.html.luan @ 58:54933428f388

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 14 Jan 2024 23:38:29 -0700
parents 536dc2d435ea
children 91b5033f53b1
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 = {
52
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
13 title = [[Introduction]]
40
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 = {
52
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
33 title = [[Text Editor and JSON]]
40
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 = {
52
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
47 title = [[Bash - Command Line Shell]]
41
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 = {
52
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
55 title = [[Mercurial - Source Control]]
41
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 %>
54
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
58 <p>Thankfully <a href="mercurial.html">Mercurial</a> is well documented. Read <a href="http://hgbook.red-bean.com/">Mercurial: The Definitive Guide</a> up to chapter 9.</p>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
59
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
60 <p>To get started with Mercurial, download Mercurial from <a href="https://www.mercurial-scm.org/">their website</a> and install it. Then do:</p>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
61
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
62 <code block>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
63 ~/learn $ hg version
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
64 Mercurial Distributed SCM (version 5.2.2)
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
65 (see https://mercurial-scm.org for more information)
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
66
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
67 Copyright (C) 2005-2019 Matt Mackall and others
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
68 This is free software; see the source for copying conditions. There is NO
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
69 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
70 ~/learn $
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
71 </code>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
72
58
Franklin Schmidt <fschmidt@gmail.com>
parents: 57
diff changeset
73 <p>If this works, it is installed properly. Next <a href="http://hgbook.red-bean.com/read/a-tour-of-mercurial-the-basics.html#sec:tour-basic:username">set up your Mercurial configuration file</a> which is <code>~/.hgrc</code> on a Mac or <code>/c/Users/$(whoami)/mercurial.ini</code> on Windows <a href="https://www.msys2.org/">MSYS2</a>. My <a href="https://www.mercurial-scm.org/doc/hgrc.5.html">hgrc</a> file looks like this:
54
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
74
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
75 <code block>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
76 [ui]
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
77 username = Franklin Schmidt <fschmidt@gmail.com>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
78
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
79 [auth]
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
80 hghosting.prefix = https://hg.reactionary.software/repo/
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
81 hghosting.username = fschmidt@gmail.com
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
82 hghosting.password = xxxxxxxxxx
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
83
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
84 [extensions]
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
85 hgext.extdiff =
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
86
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
87 [extdiff]
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
88 cmd.dm = diffmerge
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
89 </code>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
90
56
Franklin Schmidt <fschmidt@gmail.com>
parents: 54
diff changeset
91 <p>You should register on <a href="https://hg.reactionary.software/">our Mercurial hosting service</a> and use your email as the username and the assigned password in <code>.hgrc</code>. The last two blocks set up <code>hg dm</code> to call <a href="https://sourcegear.com/diffmerge/">DiffMerge</a> by using the <a href="https://wiki.mercurial-scm.org/ExtdiffExtension">Extdiff extension</a>.</p>
54
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
92
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
93 <p>Now you can play with <a href="https://hg.reactionary.software/repo/test/">https://hg.reactionary.software/repo/test/</a> like this:</p>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
94
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
95 <code block>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
96 ~/learn $ hg clone https://hg.reactionary.software/repo/test/ hgtest1
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
97 no changes found
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
98 updating to branch default
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
99 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
100 ~/learn $ hg clone https://hg.reactionary.software/repo/test/ hgtest2
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
101 no changes found
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
102 updating to branch default
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
103 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
104 ~/learn $ ls -Fd h*
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
105 hgtest1/ hgtest2/
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
106 ~/learn $ cd hgtest1
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
107 ~/learn/hgtest1 $ touch file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
108 ~/learn/hgtest1 $ e file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
109 ~/learn/hgtest1 $ cat file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
110 some text
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
111 ~/learn/hgtest1 $ hg status
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
112 ? file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
113 ~/learn/hgtest1 $ hg add file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
114 ~/learn/hgtest1 $ hg status
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
115 A file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
116 ~/learn/hgtest1 $ hg pull
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
117 pulling from https://hg.reactionary.software/repo/test/
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
118 no changes found
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
119 ~/learn/hgtest1 $ hg commit -m 'add file.txt'
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
120 ~/learn/hgtest1 $ hg push
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
121 pushing to https://hg.reactionary.software/repo/test/
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
122 searching for changes
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
123 remote: adding changesets
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
124 remote: adding manifests
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
125 remote: adding file changes
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
126 remote: added 1 changesets with 1 changes to 1 files
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
127 ~/learn/hgtest1 $ cd ../hgtest2
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
128 ~/learn/hgtest2 $ hg pull
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
129 pulling from https://hg.reactionary.software/repo/test/
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
130 requesting all changes
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
131 adding changesets
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
132 adding manifests
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
133 adding file changes
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
134 added 1 changesets with 1 changes to 1 files
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
135 new changesets aab34516d8dc
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
136 (run 'hg update' to get a working copy)
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
137 ~/learn/hgtest2 $ hg update
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
138 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
139 ~/learn/hgtest2 $ hg status
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
140 ~/learn/hgtest2 $ cat file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
141 some text
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
142 ~/learn/hgtest2 $ e file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
143 ~/learn/hgtest2 $ cat file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
144 some text
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
145 and more
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
146 ~/learn/hgtest2 $ hg status
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
147 M file.txt
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
148 ~/learn/hgtest2 $ hg pull
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
149 pulling from https://hg.reactionary.software/repo/test/
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
150 searching for changes
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
151 no changes found
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
152 ~/learn/hgtest2 $ hg dm
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
153 ~/learn/hgtest2 $ hg commit -m 'and more'
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
154 ~/learn/hgtest2 $ hg push
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
155 pushing to https://hg.reactionary.software/repo/test/
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
156 searching for changes
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
157 remote: adding changesets
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
158 remote: adding manifests
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
159 remote: adding file changes
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
160 remote: added 1 changesets with 1 changes to 1 files
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
161 </code>
50db01566278 learn mercurial
Franklin Schmidt <fschmidt@gmail.com>
parents: 52
diff changeset
162
41
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
163 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
164 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
165 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
166 html = {
52
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
167 title = [[HTML and CSS]]
41
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
168 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
169 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
170 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
171 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
172 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
173 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
174 js = {
52
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
175 title = [[JavaScript]]
41
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
176 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
177 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
178 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
179 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
180 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
181 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
182 luan = {
52
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
183 title = [[Luan]]
41
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
184 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
185 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
186 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
187 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
188 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
189 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
190 http = {
52
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
191 title = [[HTTP]]
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
192 content = function()
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
193 %>
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
194 <p>later</p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
195 <%
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
196 end
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
197 }
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
198 regex = {
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
199 title = [[Regular Expressions]]
41
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
200 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
201 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
202 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
203 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
204 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
205 }
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
206 java = {
52
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
207 title = [[Java 8]]
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
208 content = function()
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
209 %>
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
210 <p>later</p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
211 <%
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
212 end
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
213 }
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
214 lucene = {
Franklin Schmidt <fschmidt@gmail.com>
parents: 49
diff changeset
215 title = [[Lucene]]
41
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
216 content = function()
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
217 %>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
218 <p>later</p>
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
219 <%
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
220 end
fbf2a8deee98 learn minor
Franklin Schmidt <fschmidt@gmail.com>
parents: 40
diff changeset
221 }
40
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
222 }
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
223
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
224
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
225 local function show_toc(content)
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
226 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
227 <ul>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
228 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
229 for id, info in pairs(content) do
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
230 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
231 <li><a id="c_<%=id%>" href="#<%=id%>"><%=info.title%></a></li>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
232 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
233 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
234 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
235 </ul>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
236 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
237 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
238
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
239 local function show_content(content,h)
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
240 for id, info in pairs(content) do
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
241 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
242 <div heading>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
243 <h<%=h%>><a id="<%=id%>" href="#<%=id%>"><%=info.title%></a></h<%=h%>>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
244 <a href="#c_<%=id%>">contents</a>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
245 </div>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
246 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
247 info.content()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
248 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
249 end
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
250
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
251 return function()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
252 Io.stdout = Http.response.text_writer()
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
253 %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
254 <!doctype html>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
255 <html>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
256 <head>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
257 <% head() %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
258 <title>Learn Reactionary Programming</title>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
259 </head>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
260 <body>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
261 <% header() %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
262 <div content>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
263 <h1><a href="learn.html">Learn Reactionary Programming</a></h1>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
264 <hr>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
265 <h2>Contents</h2>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
266 <div toc>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
267 <% show_toc(content) %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
268 </div>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
269 <hr>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
270 <% show_content(content,2) %>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
271 </div>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
272 </body>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
273 </html>
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
274 <%
ebab99118e19 add learn.html
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
275 end