annotate website/src/why.html.luan @ 1821:d28f5ed56454

fix stringify empty list
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 09 Jul 2024 07:17:41 -0600
parents 5b8f056527a3
children 3cd1d267508c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
1 local Luan = require "luan:Luan.luan"
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
2 local error = Luan.error
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
3 local Io = require "luan:Io.luan"
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
4 local Http = require "luan:http/Http.luan"
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
5 local Shared = require "site:/lib/Shared.luan"
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
6 local head = Shared.head or error()
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
7 local header = Shared.header or error()
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
8
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
9
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
10 return function()
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
11 Io.stdout = Http.response.text_writer()
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
12 %>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 <!doctype html>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 <html>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 <head>
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
16 <% head() %>
1522
bafe6a6797ce blasma.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1521
diff changeset
17 <title>Why Luan?</title>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18 </head>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 <body>
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
20 <% header() %>
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
21 <div content>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 <h1>Why Luan?</h1>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24
1646
1828ed4ee75d improve why.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1523
diff changeset
25 <p>Luan is designed for simplicity and readability. What makes its extreme simplicity possible is that it is a pure scripting language as Ousterhout envisioned in his paper <a href="scripting.pdf">Scripting: Higher Level Programming for the 21st Century</a> (1998). Luan is tightly coupled with Java, with Luan for scripting (writing applications) and Java for writing libraries. Compare this to a language like Python. While Python is a nice language, it is optimal neither for scripting nor for writing libraries. Python sits in the middle as a compromise. Ousterhout's vision is to use the optimal tool for each task. Luan is an uncompromising scripting language while Java is ideal for writing libraries.</p>
1828ed4ee75d improve why.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1523
diff changeset
26
1828ed4ee75d improve why.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1523
diff changeset
27 <p>Luan rejects the complexity of modern software. It is mature software that I have been using for years for web programming. Whether Luan will appeal to you depends on who you are. So I will address different groups of people.</p>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
28
1523
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
29 <h2>For Moderns</h2>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30
1523
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
31 <p>I define Moderns as members of depraved modern western culture. They will hate Luan and shouldn't use it. This is because they are evil people who love complexity and hate simplicity. They worship their own insane ideas and ideologies while ignoring practical real-world concerns. This is taken to an extreme in Silicon Valley where the world's worst software is produced.</p>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
33 <h2>For Muslims</h2>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
34
1523
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
35 <p>By Muslims, I mean those having the values of the Quran, not of modern culture. Muslims who accept modern culture and modern software are only <a href="https://en.wikipedia.org/wiki/Cultural_Muslim">nominally Muslim</a> and are really Moderns. Such Muslims should not use Luan.</p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
36
1522
bafe6a6797ce blasma.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1521
diff changeset
37 <p>The Quran has a broad message to seek the good and avoid the bad. This applies to all things including programming. I am not Muslim, I follow the Old Testament. But all scripture inspired by God has a similar message. Programming is a way of expressing ideas, just like any kind of writing. And where are ideas best expressed? In scripture. I try to use the writing style of the Torah as my guide for how I should program. Biblical Hebrew is a very simple language, yet the Torah expresses profound ideas in a simple and direct way using this language. This is exactly what one wants from good programming. And Luan is designed for this kind of programming.</p>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
38
1522
bafe6a6797ce blasma.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1521
diff changeset
39 <p>Look at modern western culture, especially the culture of Silicon Valley. Can any religious person deny that this culture is the product of Satan? And so their software is inspired by Satan. Is this the kind of software that a Muslim or any religious person should use?</p>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
40
1523
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
41 <p>As I use the Torah for inspiration, Muslims should use the Quran. Consider how ideas are expressed in the Quran and try to apply the same style to your programming. The Silicon Valley obsession with programming ideologies is really nothing more than idolatry. Don't allow idolatry into your code. Scripture is full of general wisdom. I have <a href="http://www.mikraite.org/The-Old-Testament-on-Programming-tp1923.html">applied</a> the wisdom of the Old Testament to programming. Muslims should try to do the same with the Quran.</p>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
42
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
43 <p>The Muslim world will not improve until Muslims free themselves from dependencies on the degenerate West. For programmers the place to start is with software tools. Luan is one step in the right direction.</p>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
44
1523
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
45 <h2>For the Right</h2>
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
46
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
47 <p>Those on the Right who think their issue is primarily political are basically Moderns, and Luan isn't for them. But those on the Right that understand that the core issue is cultural and religious should find Luan appealing. The West first decayed religiously and then decayed culturally. This decay made the people evil to the point where they are completely incapable of producing anything good. But this is recent, happening between 2000 and 2010. America produced great software in the last century, and Luan is designed in this spirit. Things like Unix, C, and the internet protocols were all designed for simplicity and power. Luan has the same kind of design.</p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
48
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
49 <p>How does this matter practically? The Right is suffering because the Left dominates technology. And when the Right does try to produce technology, like a number of its social media platforms, the results are poor. I believe that one reason for this is that the Right is using software tools designed by the Left. These tools are horrible and overcomplicated. The Silicon Valley types who produce them are not stupid, they are just extremely evil. So these tools are only really suited for them. Decent programmers want simple tools that don't force them to struggle to conform to some insane programming ideology. So decent programmers should use software produced in the West before it became fully depraved, meaning before 2000 to be safe. When more recent software is needed, look for software produced outside of western culture. For example <a href="https://nginx.org/">nginx</a> is okay because it was produced in Russia.</p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
50
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
51 <p>I designed Luan in reaction to horrible modern software. I think Luan should appeal to programmers on the Right who share my traditional western values. And I think Luan would allow these programmers to more efficiently produce websites to compete with the Left.</p>
Franklin Schmidt <fschmidt@gmail.com>
parents: 1522
diff changeset
52
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
53 <h2>For Japanese</h2>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
54
1522
bafe6a6797ce blasma.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1521
diff changeset
55 <p>Japan is the only remaining culture that I know of that values quality. The Japanese understand that quality is the result of keeping things clean and simple, and of continuous improvement. I have applied these things to Luan. I discussed how Japanese ideas apply to my programming <a href="http://www.mikraite.org/Core-Programming-Principles-tp1237.html">here</a>. I think you can see all of these principles in my code.</p>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
56
1522
bafe6a6797ce blasma.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1521
diff changeset
57 <p>Western software does not follow these ideas. Instead it just continuously gets more complicated and unreliable. In contrast, Luan has been getting simpler and more reliable over the years as a result of continuous improvement. You cannot expect to achieve Japanese standards of quality and reliability if you use modern western software. So use Luan instead.</p>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
58
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
59 <h2>For Chinese</h2>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
60
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
61 <p>The Chinese have mostly practical concerns, so I will address this first. But then I will show that principles are actually very practical.</p>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
62
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
63 <p>Because Luan is simple and flexible, you can quickly create a website. And Luan code is easy to change, so maintenance is easy. Most other systems for web development have a bigger learning curve and are not so flexible. I will admit that Luan documentation could be better. I will fix this, but for now I promise fast support to answer your questions.</p>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
64
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
65 <p>The best way to explain why principles are practical is to consider the game of Go (围棋). To win at Go, you must both be practical and apply principles. Your initial moves will determine the structure of the game, so are critical. Consider how this relates to programming. To just pick any random tools when starting a programming project is like picking random moves at the beginning of a Go game. In Go, your structure will be horrible and you will lose. And in programming, you will be stuck with messy code that will be hard to maintain. So the choices you make at the beginning of a Go game or at the beginning of a programming project are critical. In both cases, your initial choices should be based on sound principles.</p>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
66
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
67 <p>Another point is that Go begins with an empty board, giving you complete flexibility about how you want to develop your position. Luan is the same, allowing you to create a clean design from scratch. This is in contrast to frameworks that impose structure on you which adds complexity and reduces flexibility.</p>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
68
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
69 <p>Many Chinese programmers are willing to struggle to make any tool work. But this is a mistake because most of the work in programming isn't writing the code, it is maintaining the code. With messy code, the struggle never ends. But with clean readable code, maintenance is easy. Luan is designed to be simple and readable, so code written in Luan should be easier to maintain than code written in another language.</p>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
70
1522
bafe6a6797ce blasma.html
Franklin Schmidt <fschmidt@gmail.com>
parents: 1521
diff changeset
71 <h2 id=nabble>For Nabble Users</h2>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
72
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
73 <p><a href="https://www.nabble.com/">Nabble</a> is a forum platform that I developed long ago, before I fully understood the importance of simplicity. Because users wanted to customize their forums, I developed <a href="http://naml.nabble.com/">NAML</a>. This started out as a simple macro language that looks like HTML. But as more and more functionality was needed in NAML, it grew into a monster. Now I hate my own creation. The lesson I learned is that front end code needs logic, so it should be implemented with a full programming language. I actually started working on Luan as a replacement for NAML, but Luan was so successful for me that I ended up using it in many projects. Because Luan was designed for end-users, it is the simplest programming language that I know of. I hope that a future replacement for Nabble will use Luan for customization. In that case, customization will be easy and unlimited.</p>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
74
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
75 </div>
1521
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
76 </body>
d3e61cd2aca0 docs and shell bug fix
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
77 </html>
1651
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
78 <%
5b8f056527a3 docs work
Franklin Schmidt <fschmidt@gmail.com>
parents: 1646
diff changeset
79 end