Introduction
本章,我们学习如何使用 Docker 构建可复用的开发环境,以创建 Flask-restful, Postgres 网页应用,并部署到云服务器。
pip install flask-restplus |
from flask import Flask |
$ python demo01.py |
$ http :5000/hello |
This tutorial show you how to Install Xampp ,Laravel and Lumen on Linux (Ubuntu , mint , OpenSuse …).If you are involved in building web apps using PHP, MySQL / MariaDB and Apache the Xampp is the ultimate choice for Development .
XAMPP is a completely free, easy to install Apache distribution containing MySQL / MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use. Best part is Xampp is cross-platform tool available for Windows , Mac and Linux.
sudo add-apt-repository ppa:certbot/certbot |
sudo service nginx stop |
vim /etc/nginx/sites-available/ssl.conf
:
server { |
sudo ln -s /etc/nginx/sites-available/ssl.conf /etc/nginx/sites-enabled/ssl.conf |
https://github.com/norvig/paip-lisp/blob/master/docs/chapter3.md
No doubt about it. Common Lisp is a big language.
-Guy L. Steele, Jr.
Foreword to Koschman 1990
In general, there are six maxims that every programmer should follow:
definitions | conditional | variables | iteration | other |
---|---|---|---|---|
defun | and | let | do | declare |
defstruct | case | let* | do* | function |
defvar | cond | pop | dolist | progn |
defparameter | if | push | dotimes | quote |
defconstant | or | setf | loop | return |
defmacro | unless | incf | trace | |
labels | when | decf | untrace |
To be precise, only declare, function, if, labels, let, let*, progn
and quote
are true special forms. The others are actually defined as macros that expand into calls to more primitive special forms and functions. There is no real difference to the programmer, and Common Lisp implementations are free to implement macros as special forms and vice versa, so for simplicity we will continue to use “special form” as a blanket term for both true special forms and built-in macros.
(defun function-name (parameter...) "optional documentation" body...) |
https://github.com/norvig/paip-lisp/blob/master/docs/chapter2.md
Certum quod factum.
(One is certain of only what one builds.)
-Giovanni Battista Vico (1668-1744)
Italian royal historiographer
The program we will develop in this chapter generates random English sentences. Here is a simple grammar for a tiny portion of English:
Sentence => Noun-Phrase + Verb-Phrase |
We will develop a program that generates random sentences from a phrase-structure grammar. The most straightforward approach is to represent each grammar rule by a separate Lisp function:
(defun sentence () (append (noun-phrase) (verb-phrase))) |
Now we can test the program by generating a few random sentences, along with a noun phrase and a verb phrase:
|
The program works fine, and the trace looks just like the sample derivation above, but the Lisp definitions are a bit harder to read than the original grammar rules. This problem will be compounded as we consider more complex rules. Suppose we wanted to allow noun phrases to be modified by an indefinite number of adjectives and an indefinite number of prepositional phrases. In grammatical notation, we might have the following rules:
Noun-Phrase => Article + Adj* + Noun + PP* |
(defun Adj* () |
I’ve chosen two different implementations for Adj* and PP*; either approach would work in either function. We have to be careful, though; here are two approaches that would not work:
(defun Adj* () |
An alternative implementation of this program would concentrate on making it easy to write grammar rules and would worry later about how they will be processed. Let’s look again at the original grammar rules:
Sentence => Noun-Phrase + Verb-Phrase |
https://github.com/norvig/paip-lisp/blob/master/docs/chapter1.md
You think you know when you learn, are more sure when you can write, even more when you can teach, but certain when you can program.
-Alan Perlis
Yale University computer scientist
https://github.com/norvig/paip-lisp/blob/master/docs/preface.md
paradigm n 1 an example or pattern; esp an outstandingly clear or typical example.
-Longman’s Dictionary of the English Language, 1984
This book is concerned with three related topics:
Lisp is one of the oldest programming languages still in widespread use today.