From 462d61dab6790ecaa7651ba4593c6cf3549d3cf3 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Tue, 27 May 2025 07:20:06 +1000 Subject: [PATCH] misc: fix spelling --- _ref/app.tem | 6 +++--- _ref/arc/ac.scm | 2 +- _ref/arc/app.arc | 2 +- _ref/arc/brackets.scm | 2 +- _ref/arc/news.arc | 2 +- _ref/docs/assign.html | 2 +- _ref/docs/macros.html | 4 ++-- _ref/io.tem | 2 +- _ref/setforms.tem | 2 +- _ref/string.tem | 2 +- ref/app.html | 6 +++--- ref/assign.html | 2 +- ref/assignment.html | 2 +- ref/foundation-doc.html | Bin 57117 -> 57116 bytes ref/io.html | 2 +- ref/macros.html | 4 ++-- ref/setforms.html | 2 +- ref/string.html | 2 +- 18 files changed, 23 insertions(+), 23 deletions(-) diff --git a/_ref/app.tem b/_ref/app.tem index 6e97327..045e067 100644 --- a/_ref/app.tem +++ b/_ref/app.tem @@ -19,10 +19,10 @@ (mac defopl "name parm [body]" "Version of defop to create handler that will redirect to login page if the user is not logged in." (faketest "(defopl foo req (prn \"Welcome!\"))" "")) -(mac uform "user req after [body ...]" "Generates form that ensures it was submitted by user (by using when-umatch). body outputs the form body to stdout. After submission, the continuation code after is executed; req specifies the varible name in after to receive the request." +(mac uform "user req after [body ...]" "Generates form that ensures it was submitted by user (by using when-umatch). body outputs the form body to stdout. After submission, the continuation code after is executed; req specifies the variable name in after to receive the request." (faketest "(uform user req (prn \"Result\") (prn \"The form\") (submit))" "")) -(mac urform "user req after [body ...]" "Generates form with redirection target with guard that user submitted it. After submission, the continuation expression after is executed and must return the redirect string; req specifies the varible name in after to receive the request." (faketest "(urform user req \"newpage\" (prn \"Form\") (submit))" "")) +(mac urform "user req after [body ...]" "Generates form with redirection target with guard that user submitted it. After submission, the continuation expression after is executed and must return the redirect string; req specifies the variable name in after to receive the request." (faketest "(urform user req \"newpage\" (prn \"Form\") (submit))" "")) (mac when-umatch "user req [body...]" "If user matches the user associated with req, executes body. Otherwise executes mismatch-message." (faketest "(defopl ul req (let user (get-user req) @@ -121,7 +121,7 @@ (def varfield "typ id val" "Prints HTML for an input field of type typ, name id, and value val. typ is one of bigtoks, date, doc, int, lines, mdtext, mdtext2, num, posint, string, string1, sym, syms, text, time, toks, url, users. The type of field and the processing of val depend on typ." (htmltests (show varfield 'syms 'foo '(a b c)))) -(def text-rows "text width [pad]" "Detemines how many rows to hold text based on width and padding." (tests (text-rows "abcde" 2))) +(def text-rows "text width [pad]" "Determines how many rows to hold text based on width and padding." (tests (text-rows "abcde" 2))) (def needrows "text cols [pad]" "Determines how many rows are needed to hold text, based on the length of the text and the number of newlines." (tests (needrows "abcde" 2))) diff --git a/_ref/arc/ac.scm b/_ref/arc/ac.scm index 173ff4a..32f624c 100644 --- a/_ref/arc/ac.scm +++ b/_ref/arc/ac.scm @@ -580,7 +580,7 @@ (define fn-signatures (make-hash-table 'equal)) -; This is a replacement for xdef that stores opeator signatures. +; This is a replacement for xdef that stores operator signatures. ; Haven't started using it yet. (define (odef a parms b) diff --git a/_ref/arc/app.arc b/_ref/arc/app.arc index 292800f..7ac3bf5 100644 --- a/_ref/arc/app.arc +++ b/_ref/arc/app.arc @@ -387,7 +387,7 @@ ; (= fail* (uniq)) -(def fail* ()) ; coudn't possibly come back from a form +(def fail* ()) ; couldn't possibly come back from a form ; Takes a list of fields of the form (type label value view modify) and ; a fn f and generates a form such that when submitted (f label newval) diff --git a/_ref/arc/brackets.scm b/_ref/arc/brackets.scm index fa52a53..646ae0e 100644 --- a/_ref/arc/brackets.scm +++ b/_ref/arc/brackets.scm @@ -9,7 +9,7 @@ ; main reader function for []s ; recursive read starts with default readtable's [ parser, -; but nested reads still use the curent readtable: +; but nested reads still use the current readtable: (define (read-square-brackets ch port src line col pos) `(fn (_) diff --git a/_ref/arc/news.arc b/_ref/arc/news.arc index e837d64..2e27df7 100644 --- a/_ref/arc/news.arc +++ b/_ref/arc/news.arc @@ -1823,7 +1823,7 @@ function vote(node) { (def commentable (i) (in i!type 'story 'comment 'poll)) ; By default the ability to comment on an item is turned off after -; 45 days, but this can be overriden with commentable key. +; 45 days, but this can be overridden with commentable key. (= commentable-threshold* (* 60 24 45)) diff --git a/_ref/docs/assign.html b/_ref/docs/assign.html index 10a678f..ea18f27 100644 --- a/_ref/docs/assign.html +++ b/_ref/docs/assign.html @@ -22,7 +22,7 @@

Assignment primitives

Unusual list structures, including cyclic lists, can be created by splicing lists together with scar or scdr. Arc currently hangs if a cyclic list is displayed, so be forewarned.

Places and =

-Generallly, assignment in Arc is performed with the = macro. +Generally, assignment in Arc is performed with the = macro. It is similar to set, except it allows assignment not only to a symbol, but also to a "place". Roughly speaking, a place is a location that can be updated. The place can be a symbol, an index into a table, a character in a string, an index into a list, or a complex location in a list. The following examples illustrate how these different places can be updated. diff --git a/_ref/docs/macros.html b/_ref/docs/macros.html index a029a91..fc1087d 100644 --- a/_ref/docs/macros.html +++ b/_ref/docs/macros.html @@ -26,7 +26,7 @@

How macros work

The macro foo does two things: it prints "macro executed" when it is executed during macroexpansion, and it returns the list: (prn "generated code executed"). When that list is executed in evaluation, it will display "generated code executed". (Since prn returns that string, the string is also displayed a second time as the result of the command.)

-Howerver, the two phases of macroexpansion and evaluation can be separated in time. +However, the two phases of macroexpansion and evaluation can be separated in time. If we use the macro inside a function definition, things get interesting:

 arc> (def bar () (prn "bar executed") (foo))
@@ -117,7 +117,7 @@ 

Macroexpansion

Comparing ac-mac-call to ac-call shows why macros receive their arguments unevaluated. ac-mac-call applies the macro function to the arguments, while ac-call maps ac on the arguments before applying the function, causing the arguments to be evaluated.

Evaluation

-Nothing partcularly special happens for macro code during evaluation. At this point it is Scheme code, and it gets executed the same as any other code. Specifically, arc-eval calls eval on the Scheme code generated by ac. It may use ar-funcalln to execute functions, and execution will typically bottom-out with foundation operations implemented in native Scheme. (See Arc Foundation Documentation for details.) +Nothing particularly special happens for macro code during evaluation. At this point it is Scheme code, and it gets executed the same as any other code. Specifically, arc-eval calls eval on the Scheme code generated by ac. It may use ar-funcalln to execute functions, and execution will typically bottom-out with foundation operations implemented in native Scheme. (See Arc Foundation Documentation for details.)

macex and macex1

The macex and macex1 functions perform macro expansion. If the outermost form is a macro, macex1 expands it once, while macex expands it repeatedly until it is no longer a macro. These functions are typically used for debugging, to see what a macros is doing. Note that neither macex nor macex1 expand inner macros. diff --git a/_ref/io.tem b/_ref/io.tem index b378763..60f00c5 100644 --- a/_ref/io.tem +++ b/_ref/io.tem @@ -81,7 +81,7 @@ ) (newtable "Disk variables" - (mac diskvar "var file" "Creates a variable that will be loaded from file and stored in file. If file exists, var is initialzed from file. New in arc3." (tests (diskvar foo "file.txt"))) + (mac diskvar "var file" "Creates a variable that will be loaded from file and stored in file. If file exists, var is initialized from file. New in arc3." (tests (diskvar foo "file.txt"))) (mac disktable "var file" "Creates a table variable that will be loaded from file and stored in file. New in arc3." (tests (disktable bar "file.txt"))) (mac todisk "var [expr]" "Writes var to disk, optionally setting it to expr first. New in arc3." (tests (todisk bar))) (mac fromdisk "var file init load save" "If var is not bound, var is initialized either by calling load function on file or using init. The save function is saved for later use. Internal function. New in arc3.") diff --git a/_ref/setforms.tem b/_ref/setforms.tem index e4e9779..f02682e 100644 --- a/_ref/setforms.tem +++ b/_ref/setforms.tem @@ -5,7 +5,7 @@ (var setter "" (tests)) (mac destructive defset "name parms [body ...]" "Defines a new type of place. Creates a new setforms handler for the function of the specified name." (tests (defset foo (x) nil))) (def predicate metafn "x" "Helper predicate for setforms. Tests if x is a meta function: that is, it has special syntax, or uses compose or complement." (tests '(metafn '(a:b)))) -(def expand-metafn-call "f args" "Helper for setforms. Take a function of the form (compose ...) and expands it into the approprate composed function calls.." (tests "(expand-metafn-call '(compose g h) '(a b))" +(def expand-metafn-call "f args" "Helper for setforms. Take a function of the form (compose ...) and expands it into the appropriate composed function calls.." (tests "(expand-metafn-call '(compose g h) '(a b))" )) (def expand= "place val" "Helper for =. Generates code to assign val to place." (tests (expand= 'a 42))) (def expand=list "terms" "Helper for =. Pairs up the arguments to =, and calls expand= on each pair." (tests (expand=list '(a 42 b 43)))) diff --git a/_ref/string.tem b/_ref/string.tem index f2f4e88..29370f8 100644 --- a/_ref/string.tem +++ b/_ref/string.tem @@ -6,7 +6,7 @@ (def predicate nonwhite "c" "Predicate to test if a character is not whitespace (space, newline, tab, or return)." (tests (nonwhite #\tab) (nonwhite #\a))) (def predicate letter "c" "Predicate to test if a character is alphabetic. New in arc3." (tests (letter #\A) (letter #\2))) (def predicate alphadig "c" "Predicate to test if a character is alphabetic or a digit." (tests (alphadig #\A) (alphadig #\2))) -(def predicate punc "c" "Predicate to detemine if c is a punctuation character in the set: .,;:!?" (tests (punc #\.) (punc #\a) (punc "."))) +(def predicate punc "c" "Predicate to determine if c is a punctuation character in the set: .,;:!?" (tests (punc #\.) (punc #\a) (punc "."))) (def downcase "str" "Converts a string, character, or symbol to lower case. This only converts ASCII; Unicode is unchanged." (tests (downcase "abcDEF123") (downcase #\A) (downcase 'abcDEF123))) (def upcase "str" "Converts a string, character, or symbol to lower case. This only converts ASCII; Unicode is unchanged." (tests (upcase "abcDEF123") (upcase #\a) (upcase 'abcDEF123))) diff --git a/ref/app.html b/ref/app.html index dff410d..e271a78 100644 --- a/ref/app.html +++ b/ref/app.html @@ -212,7 +212,7 @@

User management

uform user req after [body ...] -
Generates form that ensures it was submitted by user (by using when-umatch). body outputs the form body to stdout. After submission, the continuation code after is executed; req specifies the varible name in after to receive the request.
+
Generates form that ensures it was submitted by user (by using when-umatch). body outputs the form body to stdout. After submission, the continuation code after is executed; req specifies the variable name in after to receive the request.
 >(uform user req (prn "Result") (prn "The form") (submit))
@@ -223,7 +223,7 @@ 

User management

urform user req after [body ...] -
Generates form with redirection target with guard that user submitted it. After submission, the continuation expression after is executed and must return the redirect string; req specifies the varible name in after to receive the request.
+
Generates form with redirection target with guard that user submitted it. After submission, the continuation expression after is executed and must return the redirect string; req specifies the variable name in after to receive the request.
 >(urform user req "newpage" (prn "Form") (submit))
@@ -712,7 +712,7 @@ 

Internals

text-rows text width [pad] -
Detemines how many rows to hold text based on width and padding.
+
Determines how many rows to hold text based on width and padding.
 >(text-rows "abcde" 2)
diff --git a/ref/assign.html b/ref/assign.html
index 10a678f..ea18f27 100644
--- a/ref/assign.html
+++ b/ref/assign.html
@@ -22,7 +22,7 @@ 

Assignment primitives

Unusual list structures, including cyclic lists, can be created by splicing lists together with scar or scdr. Arc currently hangs if a cyclic list is displayed, so be forewarned.

Places and =

-Generallly, assignment in Arc is performed with the = macro. +Generally, assignment in Arc is performed with the = macro. It is similar to set, except it allows assignment not only to a symbol, but also to a "place". Roughly speaking, a place is a location that can be updated. The place can be a symbol, an index into a table, a character in a string, an index into a list, or a complex location in a list. The following examples illustrate how these different places can be updated. diff --git a/ref/assignment.html b/ref/assignment.html index 665e0c7..d526e69 100644 --- a/ref/assignment.html +++ b/ref/assignment.html @@ -46,7 +46,7 @@

Assignment primitives

Unusual list structures, including cyclic lists, can be created by splicing lists together with scar or scdr. Arc currently hangs if a cyclic list is displayed, so be forewarned.

Places and =

-Generallly, assignment in Arc is performed with the = macro. +Generally, assignment in Arc is performed with the = macro. It is similar to set, except it allows assignment not only to a symbol, but also to a "place". Roughly speaking, a place is a location that can be updated. The place can be a symbol, an index into a table, a character in a string, an index into a list, or a complex location in a list. The following examples illustrate how these different places can be updated. diff --git a/ref/foundation-doc.html b/ref/foundation-doc.html index 0c463a2db69d2e99f4f57f05057e93d8352104a2..2baa8e3f0d01ad5add23902c6b04e1334149a571 100644 GIT binary patch delta 14 WcmbQck9p2M<_(%FHfyc;Yz6=`a|Y`G delta 16 YcmbQUk9qDs<_(%F7`ZlUuJ~*Q06ZxM^#A|> diff --git a/ref/io.html b/ref/io.html index dae1d43..43e63ef 100644 --- a/ref/io.html +++ b/ref/io.html @@ -548,7 +548,7 @@

Disk variables

diskvar var file -
Creates a variable that will be loaded from file and stored in file. If file exists, var is initialzed from file. New in arc3.
+
Creates a variable that will be loaded from file and stored in file. If file exists, var is initialized from file. New in arc3.
 >(diskvar foo "file.txt")
diff --git a/ref/macros.html b/ref/macros.html
index a029a91..fc1087d 100644
--- a/ref/macros.html
+++ b/ref/macros.html
@@ -26,7 +26,7 @@ 

How macros work

The macro foo does two things: it prints "macro executed" when it is executed during macroexpansion, and it returns the list: (prn "generated code executed"). When that list is executed in evaluation, it will display "generated code executed". (Since prn returns that string, the string is also displayed a second time as the result of the command.)

-Howerver, the two phases of macroexpansion and evaluation can be separated in time. +However, the two phases of macroexpansion and evaluation can be separated in time. If we use the macro inside a function definition, things get interesting:

 arc> (def bar () (prn "bar executed") (foo))
@@ -117,7 +117,7 @@ 

Macroexpansion

Comparing ac-mac-call to ac-call shows why macros receive their arguments unevaluated. ac-mac-call applies the macro function to the arguments, while ac-call maps ac on the arguments before applying the function, causing the arguments to be evaluated.

Evaluation

-Nothing partcularly special happens for macro code during evaluation. At this point it is Scheme code, and it gets executed the same as any other code. Specifically, arc-eval calls eval on the Scheme code generated by ac. It may use ar-funcalln to execute functions, and execution will typically bottom-out with foundation operations implemented in native Scheme. (See Arc Foundation Documentation for details.) +Nothing particularly special happens for macro code during evaluation. At this point it is Scheme code, and it gets executed the same as any other code. Specifically, arc-eval calls eval on the Scheme code generated by ac. It may use ar-funcalln to execute functions, and execution will typically bottom-out with foundation operations implemented in native Scheme. (See Arc Foundation Documentation for details.)

macex and macex1

The macex and macex1 functions perform macro expansion. If the outermost form is a macro, macex1 expands it once, while macex expands it repeatedly until it is no longer a macro. These functions are typically used for debugging, to see what a macros is doing. Note that neither macex nor macex1 expand inner macros. diff --git a/ref/setforms.html b/ref/setforms.html index a2ed03d..b301c21 100644 --- a/ref/setforms.html +++ b/ref/setforms.html @@ -259,7 +259,7 @@

Operations to support places

expand-metafn-call f args -
Helper for setforms. Take a function of the form (compose ...) and expands it into the approprate composed function calls..
+
Helper for setforms. Take a function of the form (compose ...) and expands it into the appropriate composed function calls..
 >(expand-metafn-call '(compose g h) '(a b))
diff --git a/ref/string.html b/ref/string.html
index a9bd2ff..ea57ec9 100644
--- a/ref/string.html
+++ b/ref/string.html
@@ -105,7 +105,7 @@ 

String operations

punc c -
Predicate to detemine if c is a punctuation character in the set: .,;:!?
+
Predicate to determine if c is a punctuation character in the set: .,;:!?
 >(punc #\.)