This is the Project Isidore Reference Manual, version 1.2.1, generated automatically by Declt version 4.0b2.
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
The main system appears first, followed by any subsystem dependency.
Next: The project-isidore/packages system, Previous: Systems, Up: Systems [Contents][Index]
Personal Web Application
Benedict H. Wang <foss@bhw.name>
Benedict H. Wang <foss@bhw.name>
https://www.benedicthanshenwang.com/blog/project-isidore-doc.html
(GIT https://gitlab.com/bhw/project-isidore.git)
GNU Affero General Public License 3.0 or later
Project Isidore is currently a blog as well as a modern reproduction of the 1859 Haydock Bible.
1.2.1
deploy (system).
Next: The project-isidore/model system, Previous: The project-isidore system, Up: Systems [Contents][Index]
Benedict H. Wang <foss@bhw.name>
Benedict H. Wang <foss@bhw.name>
https://www.benedicthanshenwang.com/blog/project-isidore-doc.html
(GIT https://gitlab.com/bhw/project-isidore.git)
GNU Affero General Public License 3.0 or later
Next: The project-isidore/theophilus system, Previous: The project-isidore/packages system, Up: Systems [Contents][Index]
Benedict H. Wang <foss@bhw.name>
Benedict H. Wang <foss@bhw.name>
https://www.benedicthanshenwang.com/blog/project-isidore-doc.html
(GIT https://gitlab.com/bhw/project-isidore.git)
GNU Affero General Public License 3.0 or later
Next: The project-isidore/data system, Previous: The project-isidore/model system, Up: Systems [Contents][Index]
Benedict H. Wang <foss@bhw.name>
Benedict H. Wang <foss@bhw.name>
https://www.benedicthanshenwang.com/blog/project-isidore-doc.html
(GIT https://gitlab.com/bhw/project-isidore.git)
GNU Affero General Public License 3.0 or later
Next: The project-isidore/views system, Previous: The project-isidore/theophilus system, Up: Systems [Contents][Index]
Benedict H. Wang <foss@bhw.name>
Benedict H. Wang <foss@bhw.name>
https://www.benedicthanshenwang.com/blog/project-isidore-doc.html
(GIT https://gitlab.com/bhw/project-isidore.git)
GNU Affero General Public License 3.0 or later
Next: The project-isidore/styles system, Previous: The project-isidore/data system, Up: Systems [Contents][Index]
Benedict H. Wang <foss@bhw.name>
Benedict H. Wang <foss@bhw.name>
https://www.benedicthanshenwang.com/blog/project-isidore-doc.html
(GIT https://gitlab.com/bhw/project-isidore.git)
GNU Affero General Public License 3.0 or later
Next: The project-isidore/controller system, Previous: The project-isidore/views system, Up: Systems [Contents][Index]
Benedict H. Wang <foss@bhw.name>
Benedict H. Wang <foss@bhw.name>
https://www.benedicthanshenwang.com/blog/project-isidore-doc.html
(GIT https://gitlab.com/bhw/project-isidore.git)
GNU Affero General Public License 3.0 or later
cl-css (system).
Next: The project-isidore/webserver system, Previous: The project-isidore/styles system, Up: Systems [Contents][Index]
Benedict H. Wang <foss@bhw.name>
Benedict H. Wang <foss@bhw.name>
https://www.benedicthanshenwang.com/blog/project-isidore-doc.html
(GIT https://gitlab.com/bhw/project-isidore.git)
GNU Affero General Public License 3.0 or later
Previous: The project-isidore/controller system, Up: Systems [Contents][Index]
Benedict H. Wang <foss@bhw.name>
Benedict H. Wang <foss@bhw.name>
https://www.benedicthanshenwang.com/blog/project-isidore-doc.html
(GIT https://gitlab.com/bhw/project-isidore.git)
GNU Affero General Public License 3.0 or later
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The project-isidore/packages/file-type․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
project-isidore (system).
Next: The project-isidore/model/file-type․lisp file, Previous: The project-isidore/project-isidore․asd file, Up: Lisp files [Contents][Index]
project-isidore/packages (system).
list-project-isidore-dependencies (function).
package-dependencies (function).
Next: The project-isidore/theophilus/file-type․lisp file, Previous: The project-isidore/packages/file-type․lisp file, Up: Lisp files [Contents][Index]
project-isidore/model (system).
Next: The project-isidore/data/file-type․lisp file, Previous: The project-isidore/model/file-type․lisp file, Up: Lisp files [Contents][Index]
project-isidore/theophilus (system).
Next: The project-isidore/views/file-type․lisp file, Previous: The project-isidore/theophilus/file-type․lisp file, Up: Lisp files [Contents][Index]
project-isidore/data (system).
Next: The project-isidore/styles/file-type․lisp file, Previous: The project-isidore/data/file-type․lisp file, Up: Lisp files [Contents][Index]
project-isidore/views (system).
Next: The project-isidore/controller/file-type․lisp file, Previous: The project-isidore/views/file-type․lisp file, Up: Lisp files [Contents][Index]
project-isidore/styles (system).
Next: The project-isidore/webserver/file-type․lisp file, Previous: The project-isidore/styles/file-type․lisp file, Up: Lisp files [Contents][Index]
project-isidore/controller (system).
Previous: The project-isidore/controller/file-type․lisp file, Up: Lisp files [Contents][Index]
project-isidore/webserver (system).
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
Next: The project-isidore/styles package, Previous: Packages, Up: Packages [Contents][Index]
Project Isidore Web Page View Generation.
Uses the CL-WHO and PARENSCRIPT libraries to generate both HTML and Javascript
respectively.
CSS is generated in STYLES.LISP.
When developing with both the =view= and =style= files, it is useful to view the
generated HTML, CSS or JS. However SLIME or SLY will cut off long streams in the
REPL and insert =[sly-elided string of length x]=. To disable this behavior,
#+begin_src lisp
;; https://github.com/joaotavora/sly/issues/334
;; Consider putting this in your .sbclrc or lisp configuration file.
(setf (cdr (assoc ’slynk:*string-elision-length* slynk:*slynk-pprint-bindings*)) nil)
#+end_src
https://idlewords.com/talks/website_obesity.htm
common-lisp.
Next: The project-isidore/controller package, Previous: The project-isidore/views package, Up: Packages [Contents][Index]
Project Isidore Cascading Styles Sheets.
Generate GLOBAL.CSS from sexp notation. Provide static styling.
See VIEWS.LISP for HTML generation.
common-lisp.
Next: The project-isidore/webserver package, Previous: The project-isidore/styles package, Up: Packages [Contents][Index]
Project Isidore Web Interface.
Starting the Web server for the application is defined by
‘initialize-application’. The Project Isidore web interface has a rough mapping
onto the Model View Controller (MVC) design pattern.
Project Isidore Controller.
This package contains URI handler and routing logic.
1. Serve static assets via HTTP.
This includes the HTML blog articles, reference manual, code coverage report,
external CSS files, JS files, webp photos and png photos all located under
"project-isidore/assets/". See the
‘hunchentoot:create-folder-dispatcher-and-handler’ form.
‘hunchentoot:define-easy-handler’ links an uri with a function postfixed with ’-page’. It is said function which will generate the "view", or output HTML.
2. Serve dynamically generated HTML via HTTP.
See ‘index-page’ (inline CSS + JS example), ‘about-page’, ‘work-page’ and
‘contact-page’.
3. Serve dynamically generated HTML from persistent CLOS object state via HTTP.
Persistent CLOS object state equals our datastore in this use case.
‘create-datastore’ as defined in MODEL.LISP deserializes data found in the
"project-isidore/data/" See ‘bible-page’.
4. Serve Websocket resources.
Work-in-progress.
Next: The project-isidore/packages package, Previous: The project-isidore/controller package, Up: Packages [Contents][Index]
Added features to the Hunchentoot web server
1. URL routing library in Snooze.
2. Websocket protocol, RFC 6455, with Clog (transitive dependency on
websocket-driver).
3. A thread-pooling taskmaster for better performance with quux-hunchentoot.
Reexport symbols in these three packages under one unified namespace: webserver.
"New features also include :mix and :reexport. :mix mixes imported symbols from several packages: when multiple packages export symbols with the same name, the conflict is automatically resolved in favor of the package named earliest, whereas an error condition is raised when using the standard :use clause. :reexport reexports the same symbols as imported from given packages, and/or exports instead the same-named symbols that shadow them. ASDF 3.1 adds :mix-reexport and :use-reexport, which combine :reexport with :mix or :use in a single statement, which is more maintainable than repeating a list of packages."
– http://fare.tunes.org/files/asdf3/asdf3-2014.html
Next: The project-isidore/theophilus package, Previous: The project-isidore/webserver package, Up: Packages [Contents][Index]
Project Isidore Meta Package.
Export a single package PROJECT-ISIDORE with all the external symbols from all
inferred packages. Inferred here is taken to signify the ASDF Package Inferred
System.
For the web application entry point, see INITIALIZE-APPLICATION. This symbol is located in APPLICATION.LISP. For a comprehensive index of exported symbols and definitions, see the Reference Manual at /project-isidore/assets/reference/manual.html
project-isidore
list-project-isidore-dependencies (function).
package-dependencies (function).
Next: The project-isidore/data package, Previous: The project-isidore/packages package, Up: Packages [Contents][Index]
If the Aristotelian tradition so loved and integrated by the Angelic Doctor
shares heritage with the Greek culture within the great Library of Alexandria,
and its so-called daughter of the great Library, the temple of Serapeum, then
let Saint Theophilus of Alexandria be the discerning flame that took what is
good and true from said traditions – while fighting idolotrous aspects – and
handed it down to Western Civilization (nee Christendom).
https://en.wikipedia.org/wiki/Serapeum_of_Alexandria
It’s a personal utility package. Clearly I have nothing better to do than to
come up with fanciful names.
Symbol Conflicts:
1. SCAN, SERIES, SERAPEUM
Reexport symbols in these utility packages under one unified namespace.
Next: The project-isidore/model package, Previous: The project-isidore/theophilus package, Up: Packages [Contents][Index]
Project Isidore Data.
I have tried putting these in their own class and slot in BKNR.DATASTORE, however this results in a 100% percent increase in performance cost.
common-lisp.
Previous: The project-isidore/data package, Up: Packages [Contents][Index]
Project Isidore Object Schema.
Data serialization & interchange.
How to represent tree structure? XML, JSON or SEXP?
https://unthought.net/2016/08/16-xml-json-trees-and-lisp/
https://eli.thegreenplace.net/2012/03/04/some-thoughts-on-json-vs-s-expressions
Microsoft Word uses compressed XML. Web browsers render (X)HTML. Jupyter
notebooks use JSON. I see no benefits to inserting an extra layer. CLOS Object >
JSON > (X)HTML.
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Public Interface | ||
• Internals |
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
• Public special variables | ||
• Public ordinary functions | ||
• Public generic functions | ||
• Public standalone methods | ||
• Public classes |
Next: Public ordinary functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
To be used in ‘initialize-application’ to create an instance of class ‘vhost’ to listen to a PORT
To be used in ‘initialize-application’ to create an instance of class ‘vhost’ to listen to a PORT
Regex explanation.
[1-4]? 4 K. is the highest for 4 Kings. ? signifies the number may or may not be
there.
s whitespace.
[a-zA-Z]{1,15} Paralipomenon is the longest book name I have found thus far.
. optional period.
s whitespace.
[0-9]{1,3} 3 digits that make up a chapter number.
: colon.
[0-9]{1,3} 3 digits that make up a verse number.
An extra backslash is need to escape the backslash itself.
Associative list of bible books with their respective links for easy conversion into HTML links.
Associative list of bible chapters with their respective links for easy conversion into HTML links.
Next: Public generic functions, Previous: Public special variables, Up: Public Interface [Contents][Index]
See the appropriate ‘rip:explain-condition’ method.
See the appropriate ‘rip:explain-condition’ method.
Application entry point. Emulate a "main" function. Used in SAVE-LISP-AND-DIE to save Application as a Lisp image. Note PORT is a keyword argument that defaults to 8080. Heroku dynamically sets the PORT variable to be binded.
Given a Bible book string name or integer, convert to the opposite format.
Example:
(bible-book-convert-dwim "Matthew") => 47
(bible-book-convert-dwim 47) => "Matthew"
Returns the instance of object class ‘bible’ when BIBLE-UID matches UNIQUE-ID. If BIBLE-UID is invalid return NIL. The BIBLE-UID can be found by calling ‘get-bible-uid’.
Serializes into HTML view all objects of class ‘bible’ apropos each
‘unique-id-of’ in UID-LIST. UID-LIST validation is done by the URL route handler
‘bible’
CL-USER> (bible-page ’(1 2 3 37198))
127.0.0.1:8080/bible?query=chicken where QUERY "chicken" is a string.
DIV ID’s
——–
query-syntax
query-tutorial
query-form
Generates global.css file in the #P/project-isidore/assets/global.css
Returns the text slot of object class ‘bible’ in a string. If BIBLE-UID is invalid return NIL. The BIBLE-UID can be found by calling ‘get-bible-uid’.
Return a unique identifier assigned to each instance of class ‘bible’.
As class ‘bible’ is of CLOS metaclass ‘db:persistent-class’, this
returns the aforementioned unique identifier as an integer value bound to slot
ID. BOOK CHAPTER and VERSE must be an integer with the range 1 - 35817.
Example:
(get-bible-uid 47 3 6) => 27917
(get-bible-uid 12983 29394 2938498) => NIL
Returns a string if bible-uid is valid else return NIL.
Only get text if commentary exists for given BIBLE-UID.
The bible-uid can be found by calling ‘get-bible-uid’ with valid arguments.
Unlike ‘get-cross-references-text’, the ’with-links’ variation will take the
cross references in the verse itself (if any exist) and
‘encode-cross-references-to-html-links’. Return NIL otherwise.
Example:
(get-cross-references-text-with-links
(get-bible-uid (bible-book-convert-dwim "Leviticus") 2 3))
=> "<a href="/bible/26-7-34">Ecclesiasticus 7:34</a>.", T
Returns a string if bible-uid is valid else return NIL.
Only get text if commentary exists for given BIBLE-UID.
The bible-uid can be found by calling ‘get-bible-uid’ with valid arguments.
Example:
(get-footnotes-text (get-bible-uid (bible-book-convert-dwim "Leviticus") 2 3))
=> "Holy of holies. That is, most holy; as being dedicated to God, and set
aside by his ordinance for the use of his priests. (Challoner) — All was to be
eaten or consumed in the tabernacle. The high priest offered a gomor full of
flour and oil, rather baked, every day, Leviticus 6:20. (Calmet)"
(get-footnotes-text (get-bible-uid (bible-book-convert-dwim "Leviticus") 999 999))
=> The value
NIL
is not of type
REAL
[Condition of type TYPE-ERROR]
Unlike ‘get-footnotes-text’, the ’with-links’ variation will take the cross
references in the footnote text (if any exist) and
‘encode-cross-references-to-html-links’. Return NIL otherwise.
Example:
(get-footnotes-text-with-links
(get-bible-uid (bible-book-convert-dwim "Leviticus") 2 3))
=> "Holy of holies. That is, most holy; as being dedicated to God, and set aside by his ordinance for the use of his priests. (Challoner) — All was to be eaten or consumed in the tabernacle. The high priest offered a gomor full of flour and oil, rather baked, every day,<a href="/bible/3-6-20"> Leviticus 6:20</a>. (Calmet)", T
Returns the title slot of object class ‘bible’ in a string. If BIBLE-UID is invalid return NIL. The BIBLE-UID can be found by calling ‘get-bible-uid’.
Start a web server at PORT. Takes a PORT parameter as Heroku assigns a
different PORT per dyno/environment. CMD-USER-INTERFACE when set to true will
determine cause C-c (control+c) to exit.
Slynk server is used to connect to a running production LISP image.
See APPLICATION-TOPLEVEL for the main function or entry point in MAKE.LISP.
Returns a list of all third party libraries needed to load Project Isidore.
Example:
(in-package :cl-user)
(list-project-isidore-dependencies) =>
Selects the right links from ‘data:+bible-chapter-url-alist+’ based on the interval
created from the first and last elements of list UID-LIST. Note that for an
interval that is within a single book or single chapter, the function is
recursed to cover all chapters within the book. If this is not done during the
former case of a single book, then the last chapter will be cut off as a result
of an off by one error.
Example:
(project-isidore/model:make-bible-chapter-url-list ’(10 91)) =>
(("/bible/1-1-1/1-1-31" . "Genesis 1")
("/bible/1-2-1/1-2-25" . "Genesis 2")
("/bible/1-3-1/1-3-24" . "Genesis 3"))
See the appropriate ‘rip:explain-condition’ method. INVALID-RANGE is a list of two numbers representing the first and last BIBLE-UID present in invalid GET request. In the interest of adhering to the principle of least surprise, a condition is thrown instead of silently swapping the two numbers.
To create an executable binary, MAKE.LISP calls ‘sb-ext:save-lisp-and-die’, which closes all open file streams. We open ‘*search-index*’ and ‘*database*’ again upon application start.
Searches the Bible and Haydock’s commentary. Returns an association list of Bible unique ID’s and a relevance score
Stop the web server started by ‘initialize-application’, if it exists. When called with a non NIL value for SIGINT-POLL, it will listen for SIGINT (Catch a user’s Control-c in the terminal) and gracefully shut down the web server and exit the lisp process. ‘lparallel:kill-tasks’ is called to ensure termination of blocking threads.
If instance of object class ‘bible’ has slot ‘unique-id-of’ that matches with provided TEST-UID return TRUE, else return NIL. TEST-UID must be of type INTEGER.
> (valid-bible-uid-p 1234)
T
> (valid-bible-uid-p 23898389)
NIL
> (valid-bible-uid-p ’98fj)
SIMPLE-TYPE-ERROR
Next: Public standalone methods, Previous: Public ordinary functions, Up: Public Interface [Contents][Index]
Cross references of object instance.
Haydock text of the object instance.
The reference verse includes the book, chapter and line number. Ex. "((BOOK . 1) (CHAPTER . 2) (VERSE . 3))"
Text of the object instance.
text.
automatically generated reader method
Next: Public classes, Previous: Public generic functions, Up: Public Interface [Contents][Index]
hunchentoot.
snooze.
Previous: Public standalone methods, Up: Public Interface [Contents][Index]
Each verse of the Bible is created as an object instance of class ‘bible’, each with appropriate text in it’s slot. FOOTNOTES however, may be unbound.
persistent-object.
fixnum
:unique-id
This slot is read-only.
The reference verse includes the book, chapter and line number. Ex. "((BOOK . 1) (CHAPTER . 2) (VERSE . 3))"
cons
:heading
This slot is read-only.
Text of the object instance.
string
:text
This slot is read-only.
Cross references of object instance.
string
:cross-references
This slot is read-only.
Haydock text of the object instance.
string
:footnotes
This slot is read-only.
Previous: Public Interface, Up: Definitions [Contents][Index]
• Private special variables | ||
• Private macros | ||
• Private ordinary functions | ||
• Private generic functions | ||
• Private conditions | ||
• Private classes |
Next: Private macros, Previous: Internals, Up: Internals [Contents][Index]
Project Isidore uses an OODBMS (Object-Oriented Database Management System) to store persistent state in the form of conses, vectors and CLOS objects.
Used in ‘search-bible’ to query Bible data. Since ‘sb-ext:save-lisp-and-die’ closes all open streams, this parameter is set during ‘initialize-application’.
Next: Private ordinary functions, Previous: Private special variables, Up: Internals [Contents][Index]
Template HTML for bible webpages. It removes the top banner navigation located in the ‘web-page-template’ macro and the copyright footer. The work is in the public domain and frankly I think it’s tacky to plaster the top navbar with my name.
Template HTML for application webpages. Other than the landing page (aka ’index.html’), the static blog post HTML files and other generated HTML files, all other web app pages uses this boilerplate.
Next: Private generic functions, Previous: Private macros, Up: Internals [Contents][Index]
Boilerplate function to specify duration DELAY in seconds
Boilerplate function to specify background IMAGE and duration DELAY in seconds
Haydock commentary cross references are in the form BOOK, CHAPTER, VERSE. Ex.
"Psalm 12:9.". BIBLE-UID is to handle the special abbreviated case where the
commentary cross references are in the anaphoric form "C. xxiii. 3." where C.
is short form for (same) chapter. INTERNAL-CHAPTER depends on BIBLE-UID.
Example:
(bible-ref-to-url "Leviticus 6:20"
(get-bible-uid (bible-book-convert-dwim "Leviticus") 2 3))
=> "/bible/3-6-20"
Where STRING can be any footnote or cross-reference text and BIBLE-UID must be
corresponding.
Example:
(encode-cross-references-to-html-links
(get-cross-references-text (get-bible-uid (bible-book-convert-dwim "Amos") 5 18))
(get-bible-uid (bible-book-convert-dwim "Amos") 5 18))
=> "<a href="/bible/28-30-7">Jeremias 30:7</a>.;<a href="/bible/34-2-11">
Joel 2:11</a>.;<a href="/bible/41-1-15"> Sophonias 1:15</a>.", T
Collect explicit dependencies of an ASDF system.
Human readable call to ‘view:bible-page’. UID-SYM must be of the following format,
BOOK-delimiter-CHAPTER-delimiter-VERSE, where delimiters are the SAME single
NON-alphanumeric unreserved character. CHAPTER and VERSE must be numeric,
whereas BOOK must be alphanumeric. Unreserved characters are defined as
uppercase and lowercase letters, decimal digits, hyphen, period, underscore,
and tilde. See RFC3986 2.3. Unreserved Characters
https://www.ietf.org/rfc/rfc3986.txt
Ex. /bible/genesis-2-10,/bible/47~4~2 etc.
> (parse-uid-sym ’genesis-2-10)
51
> (parse-uid-sym ’1.2.10)
51
> (parse-uid-sym ’1.2-10)
ARG-COUNT-ERROR
Next: Private conditions, Previous: Private ordinary functions, Up: Internals [Contents][Index]
Provide ‘bible-page’ with a list of BIBLE-UIDs. Lists are defined by a BEGINNING-VERSE and an optional ENDING-VERSE
This resource defines a read-only GET request of ‘project-isidore:*search-index*’. In the GET request, a QUERY parameter (of type STRING) is passed to ‘project-isidore:bible-search-page’.
Calls the view ‘project-isidore:bible-search-page’ with STRING QUERY.
List of dispatch functions
Next: Private classes, Previous: Private generic functions, Up: Internals [Contents][Index]
http-condition.
Initarg | Value |
---|---|
:status-code | 416 |
:endpoints
Previous: Private conditions, Up: Internals [Contents][Index]
acceptor.
Initarg | Value |
---|---|
:address | 127.0.0.1 |
List of dispatch functions
(quote nil)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
4
A B C D E F G H I L M N P R S T U V W |
---|
Jump to: | (
4
A B C D E F G H I L M N P R S T U V W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
+
C D E F H S T U |
---|
Jump to: | *
+
C D E F H S T U |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | B C F N P S V |
---|
Jump to: | B C F N P S V |
---|