Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the zenekindarl Reference Manual, version 0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Tue Dec 22 15:33:05 2020 GMT+0.
• Introduction | What zenekindarl is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Expected to be a fast, flexible, extensible, low memory usage, async, concurrent template engine.
Like this
(render "Hello {{var name}}!!"
:name "κeen")
(let ((renderer (compile-template-string :stream "Hello {{var name}}!!")))
(funcall renderer *standard-output* :name "κeen"))
.
For more information, see docstring
Zenekindarl perform x16 as fast as a template engine in Python in the following instant benchmark.
Template engines | Time[sec] ---------------------|---------- Zenekindarl, SBCL 1.1.8 | 1.365 Jinja2, Python 2.7.5 | 24.07
The benchmark code for Zenekindarl:
> (time
(with-open-file (out #P"~/Desktop/out" :direction :output :if-exists :supersede)
(let ((fun (zenekindarl:compile-template-string :stream "Hello {{var name}}!!")))
(loop repeat 1000000
do (funcall fun out :name "κeen")))))
Evaluation took:
1.625 seconds of real time
1.364707 seconds of total run time (1.302198 user, 0.062509 system)
[ Run times consist of 0.042 seconds GC time, and 1.323 seconds non-GC time. ]
84.00% CPU
1 form interpreted
3 lambdas converted
3,265,218,807 processor cycles
528,706,464 bytes consed
The benchmark code for a template engine in Python:
$ cat te.py
from jinja2 import Template
template = Template( u'Hello {{ name }}!!' )
f = open( 'out', 'w' )
for i in range( 1000000 ):
f.write( template.render( name=u'κeen' ).encode( 'utf-8' ) )
$ time python te.py
real 0m25.612s
user 0m24.069s
sys 0m0.190s
variables will be HTML escaped
{{var foo}}
{{repeat 10}}hello{{endrepeat}}
{{repeat n as i}}<li>{{var i}}th item</li>{{endrepeat}}
<ol>
{{loop items as item}}
<li>{{var item}}</li>
{{endloop}}
</ol>
{{if new-p}}New{{else}}Old{{endif}}
See code below
<code><pre>
{{insert "snippet.lisp"}}
</pre></code>
<nav>
{{incude "sidebar.tmpl"}}
</nav>
Copyright (c) 2014
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The zenekindarl system |
κeen
A fast precompiling template engine
0.1
zenekindarl.asd (file)
src (module)
Modules are listed depth-first from the system components tree.
• The zenekindarl/src module | ||
• The zenekindarl/src/be module | ||
• The zenekindarl/src/le module |
Next: The zenekindarl/src/be module, Previous: Modules, Up: Modules [Contents][Index]
zenekindarl (system)
src/
Next: The zenekindarl/src/le module, Previous: The zenekindarl/src module, Up: Modules [Contents][Index]
backend.lisp (file)
src (module)
src/backend/
Previous: The zenekindarl/src/be module, Up: Modules [Contents][Index]
src (module)
src/lexer/
default.lisp (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
Next: The zenekindarl/src/zenekindarl․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
zenekindarl.asd
zenekindarl (system)
Next: The zenekindarl/src/att․lisp file, Previous: The zenekindarl․asd file, Up: Lisp files [Contents][Index]
src (module)
src/zenekindarl.lisp
Next: The zenekindarl/src/backend․lisp file, Previous: The zenekindarl/src/zenekindarl․lisp file, Up: Lisp files [Contents][Index]
util.lisp (file)
src (module)
src/att.lisp
Next: The zenekindarl/src/be/stream․lisp file, Previous: The zenekindarl/src/att․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/backend.lisp
Next: The zenekindarl/src/be/sequence․lisp file, Previous: The zenekindarl/src/backend․lisp file, Up: Lisp files [Contents][Index]
be (module)
src/backend/stream.lisp
Next: The zenekindarl/src/be/fast-io․lisp file, Previous: The zenekindarl/src/be/stream․lisp file, Up: Lisp files [Contents][Index]
stream.lisp (file)
be (module)
src/backend/sequence.lisp
Next: The zenekindarl/src/token․lisp file, Previous: The zenekindarl/src/be/sequence․lisp file, Up: Lisp files [Contents][Index]
sequence.lisp (file)
be (module)
src/backend/fast-io.lisp
Next: The zenekindarl/src/pass․lisp file, Previous: The zenekindarl/src/be/fast-io․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/token.lisp
Next: The zenekindarl/src/parse․lisp file, Previous: The zenekindarl/src/token․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/pass.lisp
Next: The zenekindarl/src/lexer․lisp file, Previous: The zenekindarl/src/pass․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/parse.lisp
Next: The zenekindarl/src/le/default․lisp file, Previous: The zenekindarl/src/parse․lisp file, Up: Lisp files [Contents][Index]
Next: The zenekindarl/src/parser․lisp file, Previous: The zenekindarl/src/lexer․lisp file, Up: Lisp files [Contents][Index]
le (module)
src/lexer/default.lisp
lex (method)
Next: The zenekindarl/src/util․lisp file, Previous: The zenekindarl/src/le/default․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/parser.lisp
=template (function)
Previous: The zenekindarl/src/parser․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/util.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
Next: The zenekindarl․att package, Previous: Packages, Up: Packages [Contents][Index]
zenekindarl.lisp (file)
zen
Next: The zenekindarl․backend package, Previous: The zenekindarl package, Up: Packages [Contents][Index]
att.lisp (file)
Next: The zenekindarl․backend․stream package, Previous: The zenekindarl․att package, Up: Packages [Contents][Index]
backend.lisp (file)
Next: The zenekindarl․backend․sequence package, Previous: The zenekindarl․backend package, Up: Packages [Contents][Index]
stream.lisp (file)
Next: The zenekindarl․backend․fast-io package, Previous: The zenekindarl․backend․stream package, Up: Packages [Contents][Index]
sequence.lisp (file)
Next: The zenekindarl․token package, Previous: The zenekindarl․backend․sequence package, Up: Packages [Contents][Index]
fast-io.lisp (file)
fast-io-backend (class)
Next: The zenekindarl․pass package, Previous: The zenekindarl․backend․fast-io package, Up: Packages [Contents][Index]
token.lisp (file)
Next: The zenekindarl․parse package, Previous: The zenekindarl․token package, Up: Packages [Contents][Index]
pass.lisp (file)
Next: The zenekindarl․lexer package, Previous: The zenekindarl․pass package, Up: Packages [Contents][Index]
parse.lisp (file)
Next: The zenekindarl․lexer․default package, Previous: The zenekindarl․parse package, Up: Packages [Contents][Index]
lexer.lisp (file)
common-lisp
Next: The zenekindarl․parser package, Previous: The zenekindarl․lexer package, Up: Packages [Contents][Index]
default.lisp (file)
Next: The zenekindarl․util package, Previous: The zenekindarl․lexer․default package, Up: Packages [Contents][Index]
parser.lisp (file)
=template (function)
Previous: The zenekindarl․parser package, Up: Packages [Contents][Index]
util.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported special variables | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported structures | ||
• Exported classes | ||
• Exported types |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
pass.lisp (file)
Next: Exported generic functions, Previous: Exported special variables, Up: Exported definitions [Contents][Index]
parser.lisp (file)
pass.lisp (file)
pass.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
att.lisp (file)
Read ‘file’ into string and passes ‘compile-template-string’
zenekindarl.lisp (file)
compiles ‘str’ with ‘env’ and emmit renderer with backend ‘backend’.
‘backend’: Currently, one of :stream :octet-stream :string :octets :fast-io.
‘str’: A template string.
‘syntax’: Currently, :default only.
‘env’: A plist of compile time information. Left nil.
return: A keyword argumented lambda.
If the backend is :stream or :octet-stream, it looks like (lambda (stream &key ...) ...).
If the backend is :string or :octets, it looks like (lambda (&key ...) ...).
If the backend is :fast-io, it looks like (lambda (fast-io-buffer &key ...) ...).
Keys are free variables appear in the template.
zenekindarl.lisp (file)
pass.lisp (file)
pass.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
util.lisp (file)
parse.lisp (file)
parse.lisp (file)
pass.lisp (file)
Parse template and render it with args. Like below:
(render "Hello {{var name}}!!" :name "κeen")
(render "Hello {{var name}}!!" :backend :octet-stream stream :name "κeen")
.
If args have ‘:backend backend’ key-value pair, this function uses it. If not given the backend is :stream and stream is *standard-output*.
And also if ‘:syntax syntax’ is given, use it or default to :default.
zenekindarl.lisp (file)
A wrapper of ‘render’
zenekindarl.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
Next: Exported structures, Previous: Exported functions, Up: Exported definitions [Contents][Index]
att.lisp (file)
automatically generated reader method
att.lisp (file)
automatically generated writer method
att.lisp (file)
automatically generated reader method
att.lisp (file)
automatically generated writer method
att.lisp (file)
automatically generated reader method
sequence.lisp (file)
automatically generated writer method
sequence.lisp (file)
backend.lisp (file)
sequence.lisp (file)
stream.lisp (file)
stream.lisp (file)
backend.lisp (file)
fast-io.lisp (file)
sequence.lisp (file)
sequence.lisp (file)
stream.lisp (file)
stream.lisp (file)
backend.lisp (file)
lexer.lisp (file)
default.lisp (file)
backend.lisp (file)
fast-io.lisp (file)
sequence.lisp (file)
sequence.lisp (file)
stream.lisp (file)
stream.lisp (file)
automatically generated reader method
stream.lisp (file)
automatically generated writer method
stream.lisp (file)
automatically generated reader method
backend.lisp (file)
automatically generated writer method
backend.lisp (file)
automatically generated reader method
att.lisp (file)
automatically generated writer method
att.lisp (file)
automatically generated reader method
att.lisp (file)
automatically generated writer method
att.lisp (file)
Next: Exported classes, Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
token.lisp (file)
token (structure)
token.lisp (file)
token (structure)
token.lisp (file)
token (structure)
token-cond-clause (function)
(setf token-cond-clause) (function)
token.lisp (file)
token (structure)
list
token-include-template (function)
(setf token-include-template) (function)
token.lisp (file)
token (structure)
string
""
token-insert-string (function)
(setf token-insert-string) (function)
token.lisp (file)
token (structure)
(or list symbol)
token-seq (function)
(setf token-seq) (function)
(or null symbol)
token-loop-sym (function)
(setf token-loop-sym) (function)
token.lisp (file)
token (structure)
(or integer symbol)
token-times (function)
(setf token-times) (function)
(or null symbol)
token-repeat-sym (function)
(setf token-repeat-sym) (function)
token.lisp (file)
token (structure)
string
""
token-str (function)
(setf token-str) (function)
token.lisp (file)
token (structure)
(or null symbol)
token-value (function)
(setf token-value) (function)
boolean
t
token-auto-escape (function)
(setf token-auto-escape) (function)
Next: Exported types, Previous: Exported structures, Up: Exported definitions [Contents][Index]
att.lisp (file)
att-leaf (class)
:value
value (generic function)
(setf value) (generic function)
att.lisp (file)
att-node (class)
att.lisp (file)
att-leaf (class)
:sexp
sexp (generic function)
(setf sexp) (generic function)
att.lisp (file)
att-variable (class)
(quote (or null string))
:gensym-string
gensym-string (generic function)
(setf gensym-string) (generic function)
att.lisp (file)
att-control (class)
:cond
cond-clause (generic function)
(setf cond-clause) (generic function)
(quote zenekindarl.att:att-node)
:then
then-clause (generic function)
(setf then-clause) (generic function)
(quote zenekindarl.att:att-node)
:else
(zenekindarl.att:att-nil)
else-clause (generic function)
(setf else-clause) (generic function)
att.lisp (file)
att-control (class)
:path
path (generic function)
(setf path) (generic function)
att.lisp (file)
att-node (class)
(quote (or null t))
:auto-escape
t
auto-escape (generic function)
(setf auto-escape) (generic function)
att.lisp (file)
att-control (class)
(quote zenekindarl.att:att-leaf)
:loop-seq
loop-seq (generic function)
(setf loop-seq) (generic function)
(quote zenekindarl.att:att-variable)
:loop-var
loop-var (generic function)
(setf loop-var) (generic function)
(quote zenekindarl.att:att-node)
:body
body (generic function)
(setf body) (generic function)
att.lisp (file)
att-leaf (class)
att.lisp (file)
standard-object (class)
att.lisp (file)
att-control (class)
:arg
arg (generic function)
(setf arg) (generic function)
att.lisp (file)
att-control (class)
(quote list)
:nodes
nodes (generic function)
(setf nodes) (generic function)
att.lisp (file)
att-control (class)
(quote zenekindarl.att:att-leaf)
:repeat-times
repeat-times (generic function)
(setf repeat-times) (generic function)
(quote zenekindarl.att:att-variable)
:repeat-var
repeat-var (generic function)
(setf repeat-var) (generic function)
(quote zenekindarl.att:att-node)
:body
body (generic function)
(setf body) (generic function)
att.lisp (file)
att-leaf (class)
(quote string)
:value
value (generic function)
(setf value) (generic function)
att.lisp (file)
att-leaf (class)
att-gensym (class)
(quote symbol)
:varsym
varsym (generic function)
(setf varsym) (generic function)
(quote (or :string :anything))
:vartype
:anything
vartype (generic function)
(setf vartype) (generic function)
backend.lisp (file)
standard-object (class)
stream-backend (class)
symbols (generic function)
(setf symbols) (generic function)
scopes (generic function)
(setf scopes) (generic function)
fast-io.lisp (file)
octet-backend (class)
emit-lambda (method)
sequence.lisp (file)
fast-io-backend (class)
(gensym "buffer")
buffer-of (generic function)
(setf buffer-of) (generic function)
stream.lisp (file)
stream-backend (class)
octet-backend (class)
stream.lisp (file)
backend (class)
:stream
(gensym "stream")
stream-of (generic function)
(setf stream-of) (generic function)
sequence.lisp (file)
stream-backend (class)
octet-backend (class)
:string
string-of (generic function)
(setf string-of) (generic function)
Previous: Exported classes, Up: Exported definitions [Contents][Index]
util.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal special variables | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal structures |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
pass.lisp (file)
Next: Internal generic functions, Previous: Internal special variables, Up: Internal definitions [Contents][Index]
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
parser.lisp (file)
pass.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
token.lisp (file)
parser.lisp (file)
token.lisp (file)
default.lisp (file)
/home/quickref/quicklisp/dists/quicklisp/software/maxpc-20200427-git/primitives.lisp
token.lisp (file)
default.lisp (file)
default.lisp (file)
default.lisp (file)
default.lisp (file)
default.lisp (file)
default.lisp (file)
default.lisp (file)
default.lisp (file)
default.lisp (file)
default.lisp (file)
Next: Internal structures, Previous: Internal functions, Up: Internal definitions [Contents][Index]
backend.lisp (file)
pass.lisp (file)
pass.lisp (file)
backend.lisp (file)
pass.lisp (file)
pass.lisp (file)
backend.lisp (file)
backend.lisp (file)
backend.lisp (file)
pass.lisp (file)
automatically generated reader method
backend.lisp (file)
automatically generated writer method
backend.lisp (file)
automatically generated reader method
sequence.lisp (file)
automatically generated writer method
sequence.lisp (file)
pass.lisp (file)
Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
token.lisp (file)
structure-object (structure)
integer
0
token-start (function)
(setf token-start) (function)
integer
0
token-end (function)
(setf token-end) (function)
token-template (function)
(setf token-template) (function)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L M Z |
---|
Jump to: | F L M Z |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
=
?
A B C E F G H I L M N O P R S T V |
---|
Jump to: | (
=
?
A B C E F G H I L M N O P R S T V |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
A B C E G I L N P R S T V |
---|
Jump to: | *
A B C E G I L N P R S T V |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | A B C F O P S T Z |
---|
Jump to: | A B C F O P S T Z |
---|