Setup Transparent Proxy with SS-redir, IPTables+IPSet, and Cloudflared

  1. Setup SS Server & Client(Redir)
  2. Setup IPSet & IPTables
  3. Setup DNS-over-HTTPS: Cloudflared

Modifying SELinux Settings for Full Nginx Functionality

Temporarily Disabling SELinux for Nginx:

# semanage permissive -a httpd_t

so that systemctl start nginx like normally before. Or just try:

# nginx -c /etc/nginx/nginx.conf

when it complains:

nginx: [emerg] open() "/etc/nginx/conf.d/www.conf" failed (13: Permission denied) in /etc/nginx/nginx.conf:29

which I had met 2 times. More details, see:

JS: World’s Most Misunderstood Has Become Most Popular

Jean Sammet wrote Computer Languages: History and Fundamentals in 1969. It was a survey of 120 programming languages, some in considerable detail. Sammet’s book chronicled languages that were designed before the Structured Programming Revolution and the later development of Object-Orientation. The book’s cover featured a picture of the Tower of Babel. Many of the bricks in the structure of the tower bore the names of programming languages.

Jean Sammet1969年编撰了《计算机语言:历史和基础知识》一书。它综述了120种程序语言,其中不少语言细节翔实。其书按时间为序罗列出了结构化编程革命之前所设计的那些语言及其后面向对象升级版本。书封面以一张巴比伦塔照片作为其显著特征,塔身里许多砖块上还刻着各种程序语言的名字。

This of course refers to Genesis [11:1-9] in which some excellent engineering talent was applied to the task of building a city and a tower with which to unify the world.


But the LORD came down to see the city and the tower which the sons of men had built. And the LORD said, “Indeed the people are one and they all have one language, and this is what they begin to do; now nothing that they propose to do will be withheld from them. Come, let Us go down and there confuse their language, that they may not understand one another’s speech.” So the LORD scattered them abroad from there over the face of all the earth, and they ceased building the city. Therefore its name is called Babel, because there the LORD confused the language of all the earth; and from there the LORD scattered them abroad over the face of all the earth.

Sometimes this is read as a warning against hubris. Sometimes this is read as a just-so story explaining why people speak so many languages: The LORD created the I18N Problem to prevent humanity from reaching its potential. But I think its truest interpretation is as a metaphor for programming language design. The principle problem in programming is the management of complexity. If a language does not help us to manage very complex systems in the face of changing requirements, then confusion results, and failure follows.


Why are there so many programming languages? Beyond the Sammet set, there have been lots of new languages and dialects developed over the past 40 years. We have been programming at a High Level for a very long time. Shouldn’t we have converged on the right way to do it by now? There are obvious efficiencies that would be obtained from the design and adoption of a single, perfect language. We could focus our resources more effectively on training and tool development. Why haven’t we done that?


We have been trying. There have been several attempts to build massive, universal languages. They all failed. As a language design grows, increasing its applicability, it becomes more and more complex. Designers who makes their language too complex will confuse the language, sayeth the LORD.

我们已在上下求索。已有相当多尝试,建造大规模、统一语言的尝试,全都失败了。当语言设计不断发展、不断增广其适用范围时,语言就会变得越来越复杂。 上帝曰:把语言弄得太过复杂的设计者自己都将被语言搞迷糊。

So we see instead a large number of more specialized languages. A specialized language will be very effective for some range of tasks. And that’s good enough. For people who have to accomplish those tasks, having the the right language can be, well, a godsend.


A programming language cobbles a model of computation with some sort of expressive syntax. Most languages will have a set of useful values such as numbers and texts (which most languages, strangely, call strings), and operations that mutate and synthesize values and some form of variation or repetition, and some way of packaging operations into more convenient idioms. The variations that are possible are endless, much like the variations possible in the preparation of a fine meal or a work of music. The art in language design is knowing what to leave out. The features of a good language work together harmoniously. A good language helps us to better understand a problem and to find the best expression of its solution.

编程语言往往会在计算模型中缀入某些类具有表达能力的语法。绝大多数编程语言都会有一整套诸如数字、文本(诡异的是,它们都叫它“ 字符串 ”)等的值、用以改变、合成这些值及其某种形式变体或重复的运算、以及一些将这些运算打包在一起构成更为便捷短语表达的方式。可能的变体无穷无尽、很像准备一顿美味佳肴或创作一首音乐作品一样,各种花样和套路。语言设计的艺术在于懂得如何取舍。好语言特性彼此和谐起效。好语言能有助于我们更好的理解问题并找出其解答的最佳表达。

A good language is composed of a limited set of features. But there is little agreement on which features are best. Programmers can argue endlessly about features and whether they make one language better than another. This does not mean that the features don’t matter. They matter greatly. We just don’t understand yet how they matter.


Language design has more to do with fashion than technology. It may seem strange that fashion is a major factor in the nerdliest of arts, but it is true. A language with radically different syntax, for example, has no hope of finding broad adoption, regardless of the brilliance of its design. This tends to constrain the rate at which languages evolve.


Like music and food, a programming language can be a product of its time. The deep problem in language design is not technological, it is psychological. A programming language should equip us with structures that help us to reason more effectively.


Programming languages are like cats. It is easier to get a new cat than to get an old cat fixed. Most successful languages are ultimately replaced by upstarts. Remodeled languages rarely match the glory of the original. Fortran was once the king of languages. It has been revised several times over the years, but the modernized dialects experienced a fraction of the prestige of Fortran IV. Similarly, Pascal was a popular structured programming language, but none of the object oriented dialects ever approached Pascal’s glory. Instead, languages tend to be superseded.

造语言像养猫。新养一只远比阉割老猫来得容易。许多很成功的语言最终都被后起之秀所取代。而这些改装的语言罕有原生的风光。FORTRAN曾是王者语言,多年来被数次改版,但这些摩登版所斩获声名尚不及FORTRAN IV的一个零头。同样,Pascal也曾是一门红极一时的结构化编程语言,但其面向对象改进版本却没有一门曾重现其往日荣光。然而,语言终究会换代下去。

Specialized languages are fun to make, which partly explains why there are so many. If a language doesn’t get too big, it can be managed by a single designer. Most languages can be identified with a single designer. Pascal: Wirth. C: Ritchie. C++: Stroustrup. Java: Gosling. C#: Hejlsberg. Rebol: Sassenrath. Python: van Rossum. PHP: Lerdorf. Perl: Wall. Ruby: Matsumoto. Lua: Ierusalimschy. E: Miller. JavaScript: Eich.

专门语言造起来十分有趣,这也部分解释了它们为何会如此之多。一门语言尚未变得过于庞大前,单个设计者即可掌控。绝大多数语言都能归功于某单个的设计者: Pascal => Wirth、C => Ritchie、C++ => Stroustrup、Java => Gosling、C# => Hejlsberg、Rebol => Sassenrath、Python => van Rossum、PHP => Lerdorf、Perl => Wall、Ruby => Matsumoto、Lua => Ierusalimschy、E => Miller、JavaScript => Eich。

Most languages die in obscurity. Only a few are able to build a following beyond a single project or company. And only a very small number of languages become important.

大多数语言糊里糊涂的就死掉了, 其中只有少数语言在其所发轫的单个项目或公司之后仍能后继有为,而这当中又只有非常小数目的语言真正变得举足轻重。

There are two ways that a language becomes important. The first is as a source or proving ground for important ideas. This includes languages like Smalltalk and Scheme. These languages are not widely used, but are generally recognized as brilliant, but out of fashion. They have a powerful influence on language designers.


The second way that a language becomes important is by becoming popular.There are many things that a programmer must consider when selecting a program language unless that programmer is writing for web browsers where the only choice currently is JavaScript.


JavaScript is an astonishing language, in the very worst sense. Its astonishing nature led to a very bad reputation. JavaScript is also coupled with The DOM, a horrendous API. There is a lot of confusion about where JavaScript ends and the DOM begins. There is lots of chatter about improving JavaScript, but that by itself would do little to improve the lives of web developers. The language is burdened with too many features, including many that interact badly or were poorly designed. It is a language that has, as Emperor Joseph would say, too many notes.

JavaScript是一门令人咂舌(非常负面意义上)的语言,因此而带来了非常坏的名声。而且JavaScript还总和DOM这一可怕的API搅在一起。究竟JavaScript是在哪里结束而DOM又是在哪里开始的,云山雾罩。就改进JavaScript多少次甚熙尘上,但仅改进它自己,对于改善Web开发者境况实难有所作为。该语言背负了太多的特性,包括大量交互性差、没怎么好好设计的特性。正像Emperor Joseph所说的,它就是这样一门特性过多、乱七八糟的语言。

So how did a language with such obvious deficiencies become the Sole Programming Language of the Web? Brendan Eich convinced his pointy-haired boss at Netscape that the Navigator browser should have its own scripting language, and that only a new language would do, a new language designed and implemented in big hurry, and that no existing language should be considered for that role. The Internet Explorer team at Microsoft wanted to capture Netscape’s market share, so they carefully reverse engineered Netscape’s language, huge hairy warts and all. The other browser makers followed Microsoft’s lead. There is no standard that says that a web browser must implement JavaScript; JavaScript is the only language implemented in all popular web browsers. There was no careful review of the language or its problem domain. There was no review of its suitability or the soundness of its design. It was slapped together at Netscape, and then copied elsewhere. Given the process that created JavaScript and made it a de facto standard, we deserve something far worse.

那么,这样一门有着诸多不足的语言何以能变成Web编程语言独一份的呢?Brendan Eich说服了他在Netscape时的秃头老板,Navigator浏览器应有属于其自身的脚本语言,且只能是新语言、一门极度赶工设计和实现的新语言才行,而无任一现存语言可堪考虑用于此途。微软的IE团队想跟Netscape抢夺市场份额,所以他们仔仔细细逆向工程了Netscape的语言,连毛带包、不分良莠一股脑照抄。其他浏览器制造商萧规曹随微软。没有任一标准说Web浏览器必须要实现JavaScript,但JavaScript是唯一被所有流行Web浏览器实现了的语言。没人花心思仔细审查这门语言及其问题所在,也没人留意其设计是否合适或合理。它先是在Netscape被随意与浏览器拍到了一起,随后又被拷贝到其他各处。若按这样的过程创建JavaScript并将其做成事实标准,我们理应得到更糟的结果才对。

But despite JavaScript’s astonishing shortcomings, deep down, in its core, it got something very right. When you peel away the cruft, there is an expressive and powerful programming language there. That language is being used well in many Ajax libraries to manage and augment the DOM, producing an application platform for interactive applications delivered as web pages. Ajax has become popular because JavaScript works. It works surprisingly well.

不过抛开JavaScript这些令人咂舌的缺点,深入其核心,其中有一些很正确的东西。当你剥离它这些赘疣,那儿便会留下一门富于表现力的强大的编程语言。这门语言被很多Ajax程序库广泛用于管理和完善DOM、创建出以网页形式递交、用于交互应用的应用平台。因JavaScript好用,不可思议的好用,Ajax已变得流行起来 。

JavaScript was the world’s most misunderstood programming language. Its obvious defects, its unfashionable programming model, intentional mispositioning at its introduction, and its ridiculous name caused it to be rejected as unworthy by most knowledgeable programmers. But Ajax gave JavaScript a second chance.


Because JavaScript is the language of the web browser, and because the web browser has become the dominant application delivery system, and because JavaScript isn’t too bad, JavaScript has become the World’s Most Popular Programming Language. Its popularity is growing. It is now being embedded in other applications and contexts. JavaScript has become important.


It is better to be lucky than smart.


Krashen’s “Principles & Practice in SLA”

  1. Intro
    • A. 3 approaches to method
      • a. SLA theory
      • b. applied linguistics research
      • c. ideas & intuitions from experience
    • B. interactions among approaches to practice
    • C. what 3 approaches have to say about method
    • D. goals: re-intro teachers to theory & to gain confidence
  2. SLA
    • A. 5 hypotheses
      • a. A-L distinction i.e. hypo:
        • adults also A
        • subconscious v.s. conscious
        • children v.s. adults
        • conclusion: A is more important than L
      • b. hypo natural order
        • acquisition order is similar to difficulty order
        • SLA order is different from FLA order, yet there are similarities
        • trasitional forms exist, this uniformity reflects the natural LA process
      • c. hypo monitor
        • A initiates utterances, is responsible for fluency
        • L has only Monitor/Editor function, under necessary yet insufficient conditions:
          • i) time
          • ii) focus on form
          • iii) know the rule
        • individual variation:
          • i) over-users
          • ii) under-users
          • iii) optimal user — able to fill part, but not all of the gap
      • *d. hypo input — how we acquire? we acquire by “going for meaning” first, and as a result, we acquire structure
        • 1) statement
          • a) relates to A, not L
          • b) acqure by understanding lang that contains structure beyond current competence level(i.e. i+1), with help of world knowledge/extra-linguistic info
          • c) when communication is successful/input is understood, and there is enough, i+1 will be provided automatically
          • d) fluency emerges over time, cannot be taught directly, can only be developed with comprehensible input
        • 2) evidence
          • a) FLA in children: caretaken-speech
            • i) to aid comprehension, understands first
            • ii) roughly- not finely-tuned, not a grammatically based syllabus
            • iii) here-and-now principle
          • b) SLA: simple codes, differs from caretaken in:
            • i) made for the purpose of lang teaching v.s. communication
            • ii) both are roughly-tuned
            • iii) not always here-and-now, but helpful when find other way to make input comprehensible
            • conclusion: natural, communicative, roughly-tuned, comprehensible input
          • c) SLA: silent period & L1 influence
          • d) advantages & disadvantages of L2 use
          • e) applied linguistic research
      • e. hypo affective filter
        • 1) 3 categories:
          • a) +motivation
          • b) +self-confidence
          • c) -anxiety
        • 2) not only include supplying comprehensible input, but also creating a situation that encourages a low filter
    • B. causative variable
      • a. overview: comprehensible input + filter level
      • b. lang teaching(instruction)
        • 1) it helps: for beginners & foreign lang students who have no chance to get input outside the class
        • 2) not helps: when rich sources of input are available
      • c. exposure var
      • d. age
        • 1) adults proceeds through SLA early stages faster
        • 2) older children acquire faster than younger ones
        • 3) natural exposure to SL, higher proficiency during childhood than as adults
      • e. acculturation(文化适应)
  3. Providing input4A
    • A. potential
    • B. limitations
    • C. role of output
      • a. coversation & LA
      • b. output & L
    • D. characteristics of optimal input4A
      • a. comprehensible
        • 1) how to aid comprehension
          • i) slower rate & clearer articulation, to allow more processing time & identify word boundaries more easily
          • ii) more use of hight frequency vocabulary, less slang, fewer idioms
          • iii) shorter sentences, syntactic simplification
        • 2) necessary but not sufficient
          • i) simply no i+1
          • ii) understanding w.o. utilizing syntax
          • iii) affective filter may be up
      • b. interesting &| relevant
        • info/material in need is the info/material indeed interesting/relevant
      • c. not grammatically sequenced
        • no need to deliberately include i+1, since it occurs naturally
        • there will be i+1, as long as there is enough input
      • d. must be in sufficient quantity
        • 1) natural communicative input could supply i+1, if it is:
          • i) not artificially constrained
          • ii) supplied in sufficient quantity
        • 2) how much input?
          • i) initial readiness to speak: TPR ~10h, informal LA 6m ‘silent period’
          • ii) higher level proficiency: 1950h classtime
        • 3) extensive v.s. intensive input
          • gain more from participating in conversations, many conversations, than from focused listening comprehension exercises
    • E. other features encouraging A
      • a. should not be put on defensive
        • 1) focus on the message instead of the form, ideally, ‘forget’ message is actually encoded in SL
        • 2) not to force production
        • 3) eliminate error correction entirely in communicative-type activities
      • b. provide tools to help obtain
    • F. teaching coversational competence
  4. Role of grammar & putting grammar in its place
    • A. L does not become A
    • B. place of grammar
    • C. L effects: accuracy
    • D. other effects
    • E. presentation of rules
    • F. notes on error correction
    • G. grammar as subject-matter
  5. Approaches to lang teaching
    • A. present-day teaching method
      • a. grammar & translation
      • b. audio-lingualism
      • c. cognitive-code
      • d. direct method
      • e. natural approach
      • f. total physical response(TPR)
      • g. suggestopedia
    • B. applied linguisitics research
    • C. alternative to methods
    • D. comments on achievement testing
    • E. some gaps in materials
    • F. some problems

How to build RPM packages from Spec files

Let’s take nginx as an example. First, let’s prepare the following building environment:

  • yum install gcc rpm-build rpm-devel rpmlint make python bash coreutils diffutils patch rpmdevtools
  • rpmdev-setuptree

Now under your home directory there is a rpmbuild directory, under which there are sub-directories:

  • RPMS

Since we build the RPM package from natively compiled source files, we then prepare the following nginx source package/files under the SOURCES directory(these source files are packaged at here):

  • nginx-1.15.8.tar.gz
  • nginx.service
  • nginx.logrotate
  • nginx.conf
  • nginx-upgrade
  • nginx-upgrade.8
  • index.html
  • poweredby.png
  • nginx-logo.png
  • 404.html
  • 50x.html

and nginx.spec file under the SPECS directory. Finally, we can build the RPM package with a single command:

rpmbuild -bb ~/rpmbuild/SPECS/nginx.spec

If it complains errors like “Failed build dependencies: …”, just yum install them. More details please see:

  1. Creating RPM packages
  2. RPM Packaging Guide

About us

We are a group of 2nd Language Acquisition(SLA) practiser. The 2nd language(SL)s denote languages other than mother tongues, which are accordingly called the 1st Language(FL)s.

Our vision is to make anyone could master any language one would love to and could thoroughly think in it with freedom.

Sounds impossible? In fact it is available. Consider that each SL is just the FL of other people, which in general are of no specialty. Their speaking in this FL is just an accidental arrangement. Thus principally, there is no mankind language that could not be mastered by us normal mankind. At least we could speak it fluently.

The key is the approach. Though mankinds have explored in SLA for several decades, we still could not figure out all the details. So much attainment in theory has been acquired, yet there was hardly any successful practice on SLA. We try to move forward from the edge where people had arrived, focusing on the practicing and true applying effects of the SLA theory.