annotate src/bash.html.luan @ 29:a04ef87cf4a0

drag and drop
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 23 Dec 2022 15:31:50 -0700
parents 9694eff797bf
children 4c511f4aa282
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 local Io = require "luan:Io.luan"
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 local Http = require "luan:http/Http.luan"
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 local Shared = require "site:/lib/Shared.luan"
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 local head = Shared.head or error()
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 local existing_header = Shared.existing_header or error()
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 return function()
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 Io.stdout = Http.response.text_writer()
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 %>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 <!doctype html>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 <html>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 <head>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 <% head() %>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 <title>Reactionary Software - Bash</title>
15
9694eff797bf fix html
Franklin Schmidt <fschmidt@gmail.com>
parents: 14
diff changeset
18 </head>
14
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 <body>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20 <% existing_header() %>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 <div content>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22 <h1>Bash</h1>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 <p><a href="https://www.gnu.org/software/bash/">Bash</a> is a Unix shell or command line. There are many shells available but Bash is old and standard. None of the alternatives are better, so stick with Bash.</p>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 <p>Bash is the first programming language that one should learn. This isn't the conventional approach, but think of human languages like English. Does one start a new language by having conversations or by writing essays? The command line is like having a conversation with one's computer while a program is like an essay. Using the command line will naturally get one used to the right kind of thinking needed for programming. The next step is to write programs (shell scripts) in Bash to automate what one does from the command line. Another benefit to learning bash is that it helps one understand one's computer. Bash deals with basic concepts like files and directories. Note that the first <a href="/books.html">book</a> recommended here is <a href="https://www.amazon.com/Unix-Programming-Environment-Prentice-Hall-Software/dp/013937681X/">The Unix Programming Environment</a> which introduces the shell.</p>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28 <p>The right environment for programming is the command line and a text editor, not an <a href="https://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a>. IDEs are one of the horrors of modern programming. They are bloated, overcomplicated, and inflexible. Reactionary programming should be based on using simple flexible tools like the shell and a text editor.</p>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
29 </div>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30 </body>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
31 </html>
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32 <%
44025d01ad7e add bash
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
33 end