summaryrefslogtreecommitdiff
path: root/artima
diff options
context:
space:
mode:
authormichele.simionato <devnull@localhost>2009-11-02 08:40:51 +0000
committermichele.simionato <devnull@localhost>2009-11-02 08:40:51 +0000
commitb5b12a01b6c286c3bd55b995001f5ed6b17f86d4 (patch)
tree02dd0c84d62d23708f5c0c85777466ae80ccf3ed /artima
parent78f315af3b0e39905169113fb9f2e1a5ca65e03f (diff)
downloadmicheles-b5b12a01b6c286c3bd55b995001f5ed6b17f86d4.tar.gz
A few misprint and minor fixes
Diffstat (limited to 'artima')
-rw-r--r--artima/notes/links-and-citations.txt1
-rw-r--r--artima/python/jquery/jquery_ex.py11
-rw-r--r--artima/python/webpy/dispatcher.py2
-rw-r--r--artima/scheme/scheme19.ss2
-rw-r--r--artima/scheme/scheme20.ss2
-rw-r--r--artima/scheme/scheme22.ss2
-rw-r--r--artima/scheme/scheme25.ss6
7 files changed, 16 insertions, 10 deletions
diff --git a/artima/notes/links-and-citations.txt b/artima/notes/links-and-citations.txt
index d8817fd..38b31f6 100644
--- a/artima/notes/links-and-citations.txt
+++ b/artima/notes/links-and-citations.txt
@@ -1,5 +1,6 @@
Those who can, do; those who can't, teach -- G. B. Shaw
+Programmers don't die, they just GOSUB without RETURN. (*continuations*)
#Why I Hate Frameworks
diff --git a/artima/python/jquery/jquery_ex.py b/artima/python/jquery/jquery_ex.py
index 69d6ca2..419c5f9 100644
--- a/artima/python/jquery/jquery_ex.py
+++ b/artima/python/jquery/jquery_ex.py
@@ -21,12 +21,17 @@ $(document).ready(function(){
'''
# the body of the page
-body = "<h3>click me and I will disappear!</h3>"
+body = """
+<button id="sql-button" class="short">SQL</button>
+<pre id="sql" class="sql" style="display: none">SELECT * FROM Product</pre>
+"""
# the javascript relying on JQuery
js = """
-$("h3").click(function(event){
- $(this).hide("slow");
+$("#sql-button").toggle(function(event){
+ $("#sql").hide("slow");
+ }, function(event){
+ $("#sql").show("slow");
});
"""
diff --git a/artima/python/webpy/dispatcher.py b/artima/python/webpy/dispatcher.py
index 2bec3a4..0a7d094 100644
--- a/artima/python/webpy/dispatcher.py
+++ b/artima/python/webpy/dispatcher.py
@@ -144,7 +144,7 @@ def safecall(call_hook, resource, req, args, content_type, show_tb=True):
"""
Utility calling the resource component and returning a WSGI
response. The component can return a sequence of strings or raise
- an HTTPResponse, which is trapped, or an unexpected exception,
+ a HTTPResponse, which is trapped, or an unexpected exception,
which is trapped if show_tb=True and re-raised otherwise. The only
way to change the headers for the resource is to raise an
HTTPResponse by using http.respond.
diff --git a/artima/scheme/scheme19.ss b/artima/scheme/scheme19.ss
index a6bf86e..5f2511f 100644
--- a/artima/scheme/scheme19.ss
+++ b/artima/scheme/scheme19.ss
@@ -100,7 +100,7 @@ Compiling Scheme modules vs compiling Python modules
Let me continue my comparison between Python modules and Scheme
modules, by comparing the compilation/execution mechanism in the two
languages. I will begin from Python, by giving a simplified
-description which is however not far for the truth.
+description which is however not far from the truth.
When you run a script ``script.py`` depending on some library
``lib.py``, the Python interpreter searches fo a bytecode-compiled
diff --git a/artima/scheme/scheme20.ss b/artima/scheme/scheme20.ss
index 4d1ee66..2681370 100644
--- a/artima/scheme/scheme20.ss
+++ b/artima/scheme/scheme20.ss
@@ -257,7 +257,7 @@ hacks. It is just more efficient to convert a a program into machine
code with a compiler than to interpret it expression by expression.
The other main reason to favor compilers over interpreters, apart
-from performance, is compile-time cheching. Compilers are able to reject a
+from performance, is compile-time checking. Compilers are able to reject a
class of incorrect programs even before executing them.
Scheme compilers are traditionally not too strong in this respect, because of
dynamic typing and because of the design philosophy of the
diff --git a/artima/scheme/scheme22.ss b/artima/scheme/scheme22.ss
index 0c6e0b2..c616de4 100644
--- a/artima/scheme/scheme22.ss
+++ b/artima/scheme/scheme22.ss
@@ -197,7 +197,7 @@ just a bug (`already fixed in the trunk`_).
Discussion
------------------------------------------
-The concept of meta-level is tricky. On one hand, there only two physical
+The concept of meta-level is tricky. On one hand, there are only two physical
meta-levels, i.e. the run-time (when the code is executed) and the compile
time (when the code is compiled). On the other hand, conceptually there is
an arbitrary number of positive meta-levels ("before compile time") and
diff --git a/artima/scheme/scheme25.ss b/artima/scheme/scheme25.ss
index c75b070..6390b6c 100644
--- a/artima/scheme/scheme25.ss
+++ b/artima/scheme/scheme25.ss
@@ -37,8 +37,8 @@ hygiene; I can skip it for the moment being.]
I have already stated in episode 12_ my political objection, i.e. my
belief that macros have a high cost in terms of complication of the
-language (look how much complicated the R6RS module system is!). Moreover,
-codes based on macros tends to be too clever, difficult to debug, and
+language (look how complicated the R6RS module system is!). Moreover,
+code based on macros tends to be too clever, difficult to debug, and
sometime idiosyncratic; I do not want to maintain code such kind of code
in a typical enterprise context, with programmers of any kind of competence.
Sometimes I wish that even Python was a simpler language!
@@ -91,7 +91,7 @@ questions like "what would a language look like if it had feature X?",
can solve his doubts by implementing the feature with macros.
Notice that I recognize that perhaps not everybody should design its
-own programming language, and that xcertainly not everybody should
+own programming language, and that certainly not everybody should
*distribute* its own personal language. Nevertheless, I think
everybody can have opinions about language design. Experimenting
with macrology can help to put to test such opinions and to learn