git.s-ol.nu mmm / b0b26d2
marginnote embedding s-ol 1 year, 9 months ago
17 changed file(s) with 62 addition(s) and 29 deletion(s). Raw diff Collapse all Expand all
77 js_fix = if MODE == 'CLIENT'
88 (arg) ->
99 return if arg == js.null
10 return if arg == ''
1011 arg
1112
1213 -- fix JS bool values
120121 when 'path' then path = val
121122 when 'facet' then facet = val
122123 when 'wrap' then opts.wrap = val
124 when 'style' then opts.style = val
123125 when 'nolink' then opts.nolink = true
124126 when 'inline' then opts.inline = true
125127
142144 path = js_fix element\getAttribute 'path'
143145 facet = js_fix element\getAttribute 'facet'
144146 wrap = js_fix element\getAttribute 'wrap'
147 style = js_fix element\getAttribute 'style'
145148 nolink = js_bool element\getAttribute 'nolink'
146149 inline = js_bool element\getAttribute 'inline'
147150 desc = js_fix element.innerText
149152
150153 raw = js_bool element\getAttribute 'raw' -- deprecated
151154
152 opts = :wrap, :nolink, :inline, :desc, :raw
155 opts = :wrap, :style, :nolink, :inline, :desc, :raw
153156 element\replaceWith embed path or '', facet or '', fileder, opts
154157
155158 embeds = \getElementsByTagName 'mmm-link'
00 refs = require 'mmm.refs'
11
2 merge = (orig={}, extra) ->
2 merge = (orig={}, extra={}) ->
33 with attr = {k,v for k,v in pairs orig}
44 for k,v in pairs extra
55 attr[k] = v
105105
106106 intext = sup a key, href: "##{id}"
107107
108 print "STYLE IS '#{opts.style}'"
108109 span intext, div {
109110 class: 'sidenote'
110 style:
111 'margin-top': '-1rem'
111 style: opts.style or 'margin-top: -1rem;'
112112
113113 div :id, class: 'hook'
114114 b key, class: 'ref'
115115 ' '
116 opts.desc or ''
116117 node
117118 }
119
120 when 'marginnote'
121 div {
122 class: 'sidenote'
123 style: opts.style
124
125 opts.desc or ''
126 node
127 }
128
118129 else
119130 error "unknown embed 'wrap': '#{opts.wrap}'"
120131
9292 Additionally it could be made possible to use this mechanism to locally override *converts* inherited from
9393 further up in the tree, for example to specialize types based on their context in the system.
9494
95 <div class="sidenote">see also <mmm-embed wrap="raw" path="../references/alternatives-to-trees"></mmm-embed>
96 </div>The biggest downside to this approach would be that it presents another pressure factor for, while also
97 reincforcing, the hierarchical organization of data, thereby exacerbating the limits of hierarchical structures.
95 <mmm-embed wrap="marginnote" path="../references/alternatives-to-trees">See also </mmm-embed>
96 The biggest downside to this approach would be that it presents another pressure factor for, while also reincforcing,
97 the hierarchical organization of data, thereby exacerbating the limits of hierarchical structures.
9898
9999 ### code outside of the system
100100 At the moment, a large part of the mmmfs codebase is still separate from the content, and developed outside of mmmfs
5555 The strengths of modular architectures should similarily also extend into the way the system will be used by users.
5656 If users are to store their information and customized behaviour in such an architecture, then powerful tools need to be
5757 present in order to assemble more complex solutions out of such parts. Therefore static content should be able to be
58 linked to (as envisioned for the *Memex*, see above), but also to be <span class="sidenote">The term <i>transclusion</i>
59 refers to the concept of including content from a separate document, possibly stored remotely, by reference rather than
60 by duplication. See also <mmm-embed wrap="raw" path="../references/transclusion"></mmm-embed></span>*transcluded*,
58 linked to (as envisioned for the *Memex*, see above), but also to be <mmm-embed wrap="marginnote"
59 path="../references/transclusion">The term <i>transclusion</i> refers to the concept of including content from a
60 separate document, possibly stored remotely, by reference rather than by duplication. See also
61 </mmm-embed>*transcluded*,
6162 to facilitate the creation of flexible data formats and interactions, such that e.g. a slideshow slide can include
6263 content in a variety other formats (such as images and text) from anywhere else in the system. Behaviours also should be
6364 able to be transcluded and reused to facilitate the creation of ad-hoc sytems and applets based on user needs. For
0 <p><i>How systems influenced later systems. This graph summarizes how various systems related to Star have influenced
1 one another over the years. Time progresses downwards. Double arrows indicate direct successors (i.e.,
2 follow-on versions). [...]</i></p>
3 <mmm-embed wrap="raw" path="../../references/xerox-star"></mmm-embed>
3030 labelled with a name and persistently stored, providing a mechanism to store metadata such as user preference for
3131 ordering or the defaut view mode of a folder for example.
3232
33 <div class="sidenote" style="margin-top: 1rem;">
34 <p><i>How systems influenced later systems. This graph summarizes how various systems related to Star have influenced
35 one another over the years. Time progresses downwards. Double arrows indicate direct successors (i.e.,
36 follow-on versions). [...]</i></p>
37 <mmm-embed wrap="raw" path="../references/xerox-star"></mmm-embed></div>
38 <mmm-embed nolink path="star-graph"></mmm-embed>
33 <mmm-embed path="star-graph" facet="note" wrap="marginnote" style="margin-top: 1rem;"></mmm-embed>
34 <mmm-embed path="star-graph" nolink></mmm-embed>
3935
4036 The earliest indirect influence for the Xerox Alto and many other systems of its time, was the *Memex*.
4137 The *Memex* is a hypothetical device and system for knowledge management. Proposed by Vannevar Bush in 1945<mmm-embed
0 confusion
01 type_coercion_graph
12 tree_mmmfs
23 tree_mainstream
0 For example, the difference between changing a file extension and converting a file between two formats is often unclear
1 to users, as evident from questions like this: <a
2 href="https://askubuntu.com/questions/166602/why-is-it-possible-to-convert-a-file-just-by-renaming-its-extension">
3 Why is it possible to convert a file just by renaming it?</a>, https://askubuntu.com/q/166602 from 2019-12-18
4 <!-- https://www.quora.com/What-happens-when-you-rename-a-jpg-to-a-png-file -->
4343 Because these various mechanisms are applied at different times by the operating system and applications,
4444 it is possible for files to be labelled as or considered as being in different formats at the same time by different
4545 components of the system.
46 <div class="sidenote" style="margin-top: -5rem;">
47 The difference between changing a file extension and converting a file between two formats is commonly unclear to users,
48 see for example <a href="https://askubuntu.com/questions/166602/why-is-it-possible-to-convert-a-file-just-by-renaming-its-extension">
49 Why is it possible to convert a file just by renaming it?</a>, https://askubuntu.com/q/166602 from 2019-12-18
50 <!-- https://www.quora.com/What-happens-when-you-rename-a-jpg-to-a-png-file -->
51 </div>
46 <mmm-embed path="confusion" wrap="marginnote" style="margin-top: -5rem;"></mmm-embed>
5247 This leads to confusion about the factual format of data among users, but can also pose a serious security risk:
5348 Under some circumstances it is possible that a file contains maliciously-crafted code and is treated as an executable
5449 by one software component, while a security mechanism meant to detect such code determines the same file to be a
0 Note that 'creative' here does not only mean 'artistic': this applies to any field, and limits the ability of domain
1 experts to push the boundaries of practice by using technology in innovative ways.
1010 interaction model. Functionality and capabilities of the digital devices are bundled in, marketed, sold and distributed
1111 as applications.
1212
13 <!-- native vs other vs new ?? -->
14 <!-- limitations not mentioned yet -->
1315 In addition, a lot of functionality is nowadays delivered in the form of *Web Apps* or *Cloud Services*, which share the
1416 limitations of native applications in addition to more specific issues that will be discussed in a separate section
1517 below.
1618
1719 This focus on applications as the primary unit of systems can be seen as the root cause of multiple problems.
1820
21 <!-- rephrase vvv -->
1922 For one, since applications are the products companies produce, and software represents a market of users,
2023 developers compete on features integrated into their applications. To stay relevant, monlithic software or software
2124 suites tend to accrete features rather then modularise and delegate to other software<mmm-embed wrap="sidenote"
3639 solicit feedback, advice and ideas from domain experts, communication is a barrier. Additionally, domain experts are
3740 generally unfamiliar with the technical possibilities, and may therefore not be able to express feedback that would lead
3841 to more significant advances.
39 <div class="sidenote">Note that 'creative' here does not only mean 'artistic': this applies to any field, and limits
40 the ability of domain experts to push the boundaries of practice by using technology in innovative ways.</div>
42 <mmm-embed path="creative" wrap="marginnote"></mmm-embed>
4143 As a result, creative use of computer technology is limited to programmers, since applications constrain their users to
4244 the paths and abilities that the developers anticipated and deemed useful.
4345
66 import article, h1, h2, h3, section, p, div, a, sup, ol, li, span, code, pre, br from html
77 import moon from (require 'mmm.highlighting').languages
88
9 article with _this = class: 'sidenote-container', style: { 'max-width': '640px' }
9 article with _this = class: 'sidenote-container', style: { 'max-width': '640px', 'line-height': '1.5' }
1010 append = (a) -> table.insert _this, a
1111
1212 footnote, getnotes = do
11 html = require 'mmm.dom'
22 import div, h1, ol, li from html
33
4 refs = for ref in *@children
5 li ref\gett 'mmm/dom'
46 div {
57 h1 "references"
6 ol for ref in *@children
7 li ref\gett 'mmm/dom'
8 ol with refs
9 refs.style = 'line-height': 'normal'
810 }
66 import article, h1, h2, h3, section, p, div, a, sup, ol, li, span, code, pre, br from html
77 import moon from (require 'mmm.highlighting').languages
88
9 article with _this = class: 'sidenote-container', style: { 'max-width': '640px' }
9 article with _this = class: 'sidenote-container', style: { 'max-width': '640px', 'line-height': '1.5' }
1010 append = (a) -> table.insert _this, a
1111
1212 footnote, getnotes = do
1616 > blockquote {
1717 @include left-border;
1818
19 line-height: normal;
1920 margin: 1rem var(--margin-wide);
2021 padding: 1rem;
2122 background: $gray-bright;
4546 width: inherit;
4647 height: inherit;
4748 max-width: inherit;
49
50 line-height: normal;
4851
4952 .description {
5053 text-align: center;
7679 white-space: pre-wrap;
7780 overflow-x: auto;
7881
82 line-height: normal;
7983 background: #1d1f21;
8084 color: #c5c8c6;
8185 }
102106
103107 margin: 1rem var(--margin-wide);
104108 padding: 1rem;
109 line-height: normal;
105110 background: $gray-bright;
106111 border-color: $gray-neutral;
107112 }
2121
2222 color: $gray-dark;
2323 border-top: 1px solid $gray-dark;
24 font-size: 0.8em;
2524 word-break: break-word;
2625
26 font-size: 0.8em;
27 line-height: 1.1;
2728 text-align: initial;
2829
2930 .hook {
4647 text-align: right;
4748 }
4849
50 > .markdown > p:first-child {
51 margin-top: 0;
52 }
53
4954 a {
5055 display: inline;
5156 }