diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2018-10-18 08:07:33 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2018-10-18 08:08:54 +0000 |
| commit | e38d6d5c8e098cff0c4eb941693edb5844d51411 (patch) | |
| tree | a4dd56bba857eff94ede46961d74703f1076a6a3 /app | |
| parent | animate CoM (diff) | |
| parent | fix realities (diff) | |
| download | mmm-e38d6d5c8e098cff0c4eb941693edb5844d51411.tar.gz mmm-e38d6d5c8e098cff0c4eb941693edb5844d51411.zip | |
Merge branch 'duct_tape'
Diffstat (limited to 'app')
| -rw-r--r-- | app/html.client.moon | 5 | ||||
| -rw-r--r-- | app/html.server.moon | 5 | ||||
| -rw-r--r-- | app/realities.moon | 50 |
3 files changed, 39 insertions, 21 deletions
diff --git a/app/html.client.moon b/app/html.client.moon index fdec714..77d6c51 100644 --- a/app/html.client.moon +++ b/app/html.client.moon @@ -28,8 +28,9 @@ element = (element) -> (...) -> elements = {} add = (e) -> elements[e] = element e -for e in *{'div', 'span', 'a', 'p', 'pre', 'button', 'ul', 'li', 'i', 'b', 'u', 'tt'} do add e -for e in *{'br', 'img', 'input', 'p'} do add e +for e in *{'div', 'form', 'span', 'a', 'p', 'button', 'ul', 'ol', 'li', 'i', 'b', 'u', 'tt'} do add e +for e in *{'article', 'section', 'header', 'footer', 'content'} do add e +for e in *{'br', 'hr', 'img', 'input', 'p', 'textarea'} do add e for i=1,8 do add "h" .. i elements diff --git a/app/html.server.moon b/app/html.server.moon index 6bd05e1..3a27b37 100644 --- a/app/html.server.moon +++ b/app/html.server.moon @@ -29,8 +29,9 @@ element = (element) -> (...) -> elements = {} add = (e) -> elements[e] = element e -for e in *{'div', 'span', 'a', 'p', 'pre', 'button', 'ul', 'li', 'i', 'b', 'u', 'tt'} do add e -for e in *{'br', 'img', 'input', 'p'} do add e +for e in *{'div', 'form', 'span', 'a', 'p', 'button', 'ul', 'ol', 'li', 'i', 'b', 'u', 'tt'} do add e +for e in *{'article', 'section', 'header', 'footer', 'content'} do add e +for e in *{'br', 'hr', 'img', 'input', 'p', 'textarea'} do add e for i=1,8 do add "h" .. i elements diff --git a/app/realities.moon b/app/realities.moon index b3c5020..d4713a0 100644 --- a/app/realities.moon +++ b/app/realities.moon @@ -1,8 +1,24 @@ -import append, tohtml, h1, h2, p, a, i, div, ol, li, br, hr, span, button, section, article from require 'app.component' +import append, h1, h2, p, a, i, div, ol, li, br, hr, span, button, section, article from require 'app.component' local Diagram, o GRID_W = 50 GRID_H = 40 + +on_client = switch MODE + when 'SERVER' + import compile from require 'duct_tape' + (fn, ...) -> + code = compile fn + -- warn code + append "<script type=\"application/lua\"> + local fn = #{code} + fn(#{table.concat { ... }, ', '}) + </script>" + when 'CLIENT' + (fn, ...) -> fn ... + +-- script https://cdnjs.cloudflare.com/ajax/libs/svg.js/2.6.6/svg.min.js + if MODE == 'CLIENT' require 'svg.js' eval = js.global\eval @@ -105,7 +121,6 @@ figures = do 'justify-content': 'space-evenly' (...) -> div { :style, ... } - sources = do short = (id) => "#{id} #{@year}" long = => @names, " (#{@year}): ", (i @title), ", #{@published}" @@ -189,32 +204,33 @@ append with article style: { margin: 'auto', 'max-width': '750px' } \append with sect "Terminology" \append p "We propose the following terms and definitions that will be used extensively for the remainder of the paper:" - for term, definition in pairs { - "layer of reality": "a closed system consisting of a world model and a set of rules or dynamics operating on and - constraining said model.", - "world model": "describes a world state containing objects, agents and/or concepts on an arbitrary abstraction level.", - break: 1, - "reality stack": "structure consisting of all layers of reality encoding an agent's interaction with his environment - in their world model at a given moment, as well as all layers supporting these respectively." - next: 2, - "physical reality": "layer of reality defined by physical matter and the physical laws acting upon it. + for definition in *{ + { "layer of reality": "a closed system consisting of a world model and a set of rules or dynamics operating on and + constraining said model." }, + { "world model": "describes a world state containing objects, agents and/or concepts on an arbitrary abstraction level." }, + '------', + { "reality stack": "structure consisting of all layers of reality encoding an agent's interaction with his environment + in their world model at a given moment, as well as all layers supporting these respectively." }, + '------', + { "physical reality": "layer of reality defined by physical matter and the physical laws acting upon it. While the emergent phenomena of micro- and macro physics as well as layers of social existence etc. may be seen - as separate layers, for the purpose of this paper we will group these together under the term of physical reality." - "mental reality": "layer of reality perceived and processed by the brain of a human agent.", - "digital reality": "layer of reality created and simulated by a digital system, e.g. a virtual reality game." - "phys, mind, digi": "abbreviations for physical, mental and digital reality respectively.", + as separate layers, for the purpose of this paper we will group these together under the term of physical reality." }, + { "mental reality": "layer of reality perceived and processed by the brain of a human agent." }, + { "digital reality": "layer of reality created and simulated by a digital system, e.g. a virtual reality game." }, + { "phys, mind, digi": "abbreviations for physical, mental and digital reality respectively." }, } - if 'number' == type definition + if 'string' == type definition \append hr! continue \append with div style: { 'margin-left': '2rem' } + term = next definition \append span term, style: { display: 'inline-block', 'margin-left': '-2rem', 'font-weight': 'bold', 'min-width': '140px' } - \append span definition + \append span definition[term] \append with sect "Introduction" \append p "We identify two different types of relationships between layers in multi-reality environments. |
