├── .gitignore ├── logo2.png ├── slidy2 ├── graphics │ ├── bullet.gif │ ├── bullet.png │ ├── face1.gif │ ├── face2.gif │ ├── face3.gif │ ├── face4.gif │ ├── fold.gif │ ├── unfold.gif │ ├── example.png │ ├── fold-dim.gif │ ├── bullet-fold.gif │ ├── bullet-fold.png │ ├── fold-bright.gif │ ├── icon-blue.png │ ├── nofold-dim.gif │ ├── unfold-dim.gif │ ├── bullet-nofold.gif │ ├── bullet-nofold.png │ ├── bullet-unfold.gif │ ├── bullet-unfold.png │ ├── unfold-bright.gif │ ├── w3c-logo-blue.gif │ ├── bullet-fold-dim.gif │ ├── bullet-fold-dim.png │ ├── w3c-logo-white.gif │ ├── bullet-nofold-dim.gif │ ├── bullet-nofold-dim.png │ ├── bullet-unfold-dim.gif │ └── bullet-unfold-dim.png ├── blank.html ├── styles │ ├── print.css │ ├── slidy.css │ └── w3c-blue.css ├── scripts │ └── img.srcset.js └── Overview.html ├── gitadd.nim ├── readme.md ├── bintrees_gcs.nim ├── bintrees_manual.nim ├── bintrees_pools.nim ├── nimdoc.cfg ├── move_semantics.rst └── nimdoc.out.css /.gitignore: -------------------------------------------------------------------------------- 1 | nimcache/ 2 | nimblecache/ 3 | htmldocs/ 4 | -------------------------------------------------------------------------------- /logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/logo2.png -------------------------------------------------------------------------------- /slidy2/graphics/bullet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet.png -------------------------------------------------------------------------------- /slidy2/graphics/face1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/face1.gif -------------------------------------------------------------------------------- /slidy2/graphics/face2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/face2.gif -------------------------------------------------------------------------------- /slidy2/graphics/face3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/face3.gif -------------------------------------------------------------------------------- /slidy2/graphics/face4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/face4.gif -------------------------------------------------------------------------------- /slidy2/graphics/fold.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/fold.gif -------------------------------------------------------------------------------- /slidy2/graphics/unfold.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/unfold.gif -------------------------------------------------------------------------------- /slidy2/graphics/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/example.png -------------------------------------------------------------------------------- /slidy2/graphics/fold-dim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/fold-dim.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-fold.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-fold.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-fold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-fold.png -------------------------------------------------------------------------------- /slidy2/graphics/fold-bright.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/fold-bright.gif -------------------------------------------------------------------------------- /slidy2/graphics/icon-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/icon-blue.png -------------------------------------------------------------------------------- /slidy2/graphics/nofold-dim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/nofold-dim.gif -------------------------------------------------------------------------------- /slidy2/graphics/unfold-dim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/unfold-dim.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-nofold.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-nofold.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-nofold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-nofold.png -------------------------------------------------------------------------------- /slidy2/graphics/bullet-unfold.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-unfold.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-unfold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-unfold.png -------------------------------------------------------------------------------- /slidy2/graphics/unfold-bright.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/unfold-bright.gif -------------------------------------------------------------------------------- /slidy2/graphics/w3c-logo-blue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/w3c-logo-blue.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-fold-dim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-fold-dim.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-fold-dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-fold-dim.png -------------------------------------------------------------------------------- /slidy2/graphics/w3c-logo-white.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/w3c-logo-white.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-nofold-dim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-nofold-dim.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-nofold-dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-nofold-dim.png -------------------------------------------------------------------------------- /slidy2/graphics/bullet-unfold-dim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-unfold-dim.gif -------------------------------------------------------------------------------- /slidy2/graphics/bullet-unfold-dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pietroppeter/fosdem2020/master/slidy2/graphics/bullet-unfold-dim.png -------------------------------------------------------------------------------- /gitadd.nim: -------------------------------------------------------------------------------- 1 | 2 | import os, strutils 3 | 4 | const 5 | extensions = [".js", ".html", ".css", ".gif", ".png"] 6 | 7 | proc exec(cmd: string) = 8 | if execShellCmd(cmd) != 0: 9 | echo "failed ", cmd 10 | 11 | for f in walkDirRec(paramStr(1)): 12 | for x in extensions: 13 | if f.endsWith(x): 14 | exec "git add " & f 15 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # fosdem2020 2 | Slides and source code for my FOSDEM 2020 talk "Nim - Move semantics". 3 | 4 | # Build 5 | 6 | To build the slides run ``nim c -r build.nim``. 7 | 8 | # Benchmarks 9 | 10 | To compile the benchmarks use these commands: 11 | 12 | ``` 13 | nim c -d:danger --gc:markAndSweep bintrees_gcs.nim 14 | nim c -d:danger --gc:boehm bintrees_gcs.nim 15 | nim c -d:danger --gc:refc bintrees_gcs.nim 16 | nim c -d:danger --gc:arc bintrees_gcs.nim 17 | nim c -d:danger --gc:arc bintrees_manual.nim 18 | nim c -d:danger --gc:arc bintrees_pools.nim 19 | ``` 20 | -------------------------------------------------------------------------------- /slidy2/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | HTML Slidy - template for basic presentations 9 | 10 | 12 | 13 | 14 | 16 | 17 | 18 |
19 |

Sample heading

20 | 21 |

This is a template file you can copy and edit on your own server.

22 | 23 | 28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /bintrees_gcs.nim: -------------------------------------------------------------------------------- 1 | include prelude 2 | 3 | type 4 | Node {.acyclic.} = ref object 5 | le, ri: owned Node 6 | 7 | proc checkTree(n: Node): int = 8 | if n.le == nil: 1 9 | else: 1 + checkTree(n.le) + checkTree(n.ri) 10 | 11 | proc makeTree(depth: int): owned Node = 12 | if depth == 0: Node(le: nil, ri: nil) 13 | else: Node(le: makeTree(depth-1), ri: makeTree(depth-1)) 14 | 15 | proc main = 16 | let maxDepth = parseInt(paramStr(1)) 17 | const minDepth = 4 18 | 19 | let stretchDepth = maxDepth + 1 20 | 21 | echo("stretch tree of depth ", stretchDepth, "\t check:", 22 | checkTree makeTree(stretchDepth)) 23 | 24 | let longLivedTree = makeTree(maxDepth) 25 | var iterations = 1 shl maxDepth 26 | 27 | for depth in countup(minDepth, maxDepth, 2): 28 | var check = 0 29 | for i in 1..iterations: 30 | check += checkTree(makeTree(depth)) 31 | 32 | echo iterations, "\t trees of depth ", depth, "\t check:", check 33 | iterations = iterations div 4 34 | 35 | let t = epochTime() 36 | main() 37 | echo "Completed in ", $(epochTime() - t), "s. Success!" 38 | when declared(getMaxMem): 39 | echo "Peak mem ", formatSize getMaxMem() 40 | # use '21' as the command line argument 41 | -------------------------------------------------------------------------------- /bintrees_manual.nim: -------------------------------------------------------------------------------- 1 | 2 | include prelude 3 | 4 | type 5 | Node = ptr object 6 | le, ri: Node 7 | 8 | proc checkTree(n: Node): int = 9 | if n.le == nil: 1 10 | else: 1 + checkTree(n.le) + checkTree(n.ri) 11 | 12 | proc makeTree(depth: int): Node = 13 | result = cast[Node](alloc(sizeof(result[]))) 14 | if depth == 0: 15 | result.le = nil 16 | result.ri = nil 17 | else: 18 | result.le = makeTree(depth-1) 19 | result.ri = makeTree(depth-1) 20 | 21 | proc freeTree(n: Node) = 22 | if n != nil: 23 | freeTree(n.le) 24 | freeTree(n.ri) 25 | dealloc(n) 26 | 27 | proc main = 28 | let maxDepth = parseInt(paramStr(1)) 29 | const minDepth = 4 30 | 31 | let stretchDepth = maxDepth + 1 32 | 33 | let stree = makeTree(stretchDepth) 34 | echo("stretch tree of depth ", stretchDepth, "\t check:", 35 | checkTree stree) 36 | 37 | let longLivedTree = makeTree(maxDepth) 38 | var iterations = 1 shl maxDepth 39 | 40 | for depth in countup(minDepth, maxDepth, 2): 41 | var check = 0 42 | for i in 1..iterations: 43 | let tmp = makeTree(depth) 44 | check += checkTree(tmp) 45 | freeTree(tmp) 46 | 47 | echo iterations, "\t trees of depth ", depth, "\t check:", check 48 | iterations = iterations div 4 49 | 50 | freeTree(longLivedTree) 51 | freeTree(stree) 52 | 53 | let t = epochTime() 54 | main() 55 | echo("Completed in ", $(epochTime() - t), "s. Success! Peak mem ", formatSize getMaxMem()) 56 | # use '21' as the command line argument 57 | -------------------------------------------------------------------------------- /slidy2/styles/print.css: -------------------------------------------------------------------------------- 1 | /* print.css 2 | 3 | Copyright (c) 2005 W3C (MIT, ERCIM, Keio), All Rights Reserved. 4 | W3C liability, trademark, document use and software licensing 5 | rules apply, see: 6 | 7 | http://www.w3.org/Consortium/Legal/copyright-documents 8 | http://www.w3.org/Consortium/Legal/copyright-software 9 | */ 10 | body { 11 | color: black; 12 | font-family: sans-serif; 13 | font-size: 12pt; 14 | } 15 | 16 | div.slide { page-break-before: always; page-break-inside: avoid; } 17 | div.background { display: none; 18 | visibility: hidden; page-break-after: avoid; } 19 | div.handout { display: block; visibility: visible; } 20 | 21 | div dt 22 | { 23 | margin-left: 0; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | font-weight: bold; 27 | } 28 | div dd 29 | { 30 | margin-left: 2em; 31 | } 32 | 33 | blockquote { font-style: italic } 34 | 35 | pre { color: rgb(0,128,0); font-size: 80%; 36 | font-weight: bold; line-height: 120%; } 37 | 38 | p.copyright { font-size: smaller } 39 | 40 | a:visited { color: navy } 41 | a:link { color: blue } 42 | a:hover { color: red } 43 | a:active { color: red } 44 | 45 | a {text-decoration : none} 46 | .navbar a:link {color: white} 47 | .navbar a:visited {color: yellow} 48 | .navbar a:active {color: red} 49 | .navbar a:hover {color: red} 50 | 51 | ul { list-style-type: square; } 52 | ul ul { list-style-type: disc; } 53 | ul ul ul { list-style-type: circle; } 54 | ul ul ul ul { list-style-type: disc; } 55 | li { margin-left: 0.5em; } 56 | li li { font-size: 80%; font-style: italic } 57 | li li li { font-size: 80%; font-style: normal } 58 | 59 | -------------------------------------------------------------------------------- /bintrees_pools.nim: -------------------------------------------------------------------------------- 1 | 2 | include prelude 3 | 4 | type 5 | NodeObj = object 6 | le, ri: Node 7 | Node = ptr NodeObj 8 | 9 | PoolNode = object 10 | next: ptr PoolNode 11 | elems: UncheckedArray[NodeObj] 12 | 13 | Pool = object 14 | len: int 15 | last: ptr PoolNode 16 | lastCap: int 17 | 18 | proc newNode(p: var Pool): Node = 19 | if p.len >= p.lastCap: 20 | if p.lastCap == 0: p.lastCap = 4 21 | elif p.lastCap < 65_000: p.lastCap *= 2 22 | var n = cast[ptr PoolNode](alloc(sizeof(PoolNode) + p.lastCap * sizeof(NodeObj))) 23 | n.next = nil 24 | n.next = p.last 25 | p.last = n 26 | p.len = 0 27 | result = addr(p.last.elems[p.len]) 28 | inc p.len 29 | 30 | proc `=`(dest: var Pool; src: Pool) {.error.} 31 | 32 | proc `=destroy`(p: var Pool) = 33 | var it = p.last 34 | while it != nil: 35 | let next = it.next 36 | dealloc(it) 37 | it = next 38 | p.len = 0 39 | p.lastCap = 0 40 | p.last = nil 41 | 42 | proc checkTree(n: Node): int = 43 | if n.le == nil: 1 44 | else: 1 + checkTree(n.le) + checkTree(n.ri) 45 | 46 | proc makeTree(p: var Pool; depth: int): Node = 47 | result = newNode(p) 48 | if depth == 0: 49 | result.le = nil 50 | result.ri = nil 51 | else: 52 | result.le = makeTree(p, depth-1) 53 | result.ri = makeTree(p, depth-1) 54 | 55 | proc main = 56 | let maxDepth = parseInt(paramStr(1)) 57 | const minDepth = 4 58 | 59 | let stretchDepth = maxDepth + 1 60 | 61 | var longLived: Pool 62 | let stree = makeTree(longLived, stretchDepth) 63 | echo("stretch tree of depth ", stretchDepth, "\t check:", 64 | checkTree stree) 65 | 66 | let longLivedTree = makeTree(longLived, maxDepth) 67 | var iterations = 1 shl maxDepth 68 | 69 | for depth in countup(minDepth, maxDepth, 2): 70 | var check = 0 71 | for i in 1..iterations: 72 | var shortLived: Pool 73 | assert shortLived.len == 0 74 | check += checkTree(makeTree(shortLived, depth)) 75 | 76 | echo iterations, "\t trees of depth ", depth, "\t check:", check 77 | iterations = iterations div 4 78 | 79 | let t = epochTime() 80 | dumpAllocstats: 81 | main() 82 | echo("Completed in ", $(epochTime() - t), "s. Success! Peak mem ", formatSize getMaxMem()) 83 | # use '21' as the command line argument 84 | -------------------------------------------------------------------------------- /slidy2/scripts/img.srcset.js: -------------------------------------------------------------------------------- 1 | /* imgsrcset - Img srcset polyfill for resolution responsive images. Authors & copyright (c) 2012: WebLinc, David Knight. */ 2 | 3 | // Imgsrcset 4 | (function(win) { 5 | 'use strict'; 6 | 7 | var _viewport = win.document.documentElement, 8 | _srcsetID = 0, 9 | _srcsets = [], 10 | _eventPrefix = '', 11 | _addEvent = win.addEventListener || (_eventPrefix = 'on') && win.attachEvent, 12 | _removeEvent = win.removeEventListener || win.detachEvent, 13 | _srcExpr = /[^\s]+/g, 14 | _digitExpr = /[0-9\.]+/g, 15 | _timer = 0, 16 | 17 | /* 18 | _matches 19 | */ 20 | _matches = function(srcset) { 21 | var srcList = (srcset.indexOf(',') !== -1 && srcset.split(',')) || [srcset], 22 | srcIndex = srcList.length - 1, 23 | srcLength = srcIndex, 24 | 25 | list = null, 26 | listIndex = 0, 27 | 28 | src = '', 29 | media = ''; 30 | 31 | if (srcIndex < 0) { 32 | return; 33 | } 34 | 35 | do { 36 | var list = srcList[srcLength - srcIndex].match(_srcExpr) || [], 37 | listIndex = list.length; 38 | 39 | while (listIndex--) { 40 | var item = list[listIndex], 41 | feature = 0, 42 | digits = 0; 43 | 44 | if (listIndex > 0) { 45 | feature = (item.indexOf('w') !== -1 && (win.innerWidth || _viewport.clientWidth)) || 46 | (item.indexOf('h') !== -1 && (win.innerHeight || _viewport.clientHeight)) || 47 | (item.indexOf('x') !== -1 && (win.devicePixelRatio || 1)); 48 | 49 | digits = Number(item.match(_digitExpr)); 50 | 51 | if (feature && digits && digits > feature) { 52 | break; 53 | } 54 | } else { 55 | src = item; 56 | media = srcList[srcIndex]; 57 | } 58 | } 59 | } while (srcIndex--); 60 | 61 | return (src && media && {src: src, media: media}) || false; 62 | }, 63 | 64 | /* 65 | watch 66 | */ 67 | _watch = function(evt) { 68 | clearTimeout(_timer); 69 | 70 | _timer = setTimeout(function() { 71 | var srcset = null, 72 | srcsetIndex = _srcsetID - 1, 73 | srcsetLength = srcsetIndex, 74 | match = false; 75 | 76 | do { 77 | srcset = _srcsets[srcsetLength - srcsetIndex]; 78 | 79 | // If img element does not have a parent, remove array index to prevent caching 80 | if (!srcset.element.parentNode) { 81 | _srcsetID--; 82 | srcset.splice(srcsetIndex, 1); 83 | continue; 84 | } 85 | 86 | match = _matches(srcset.media); 87 | 88 | if (match && (srcset.matches !== match.media)) { 89 | srcset.matches = match.media; 90 | 91 | srcset.element.src = match.src; 92 | } else if (!match) { 93 | srcset.matches = false; 94 | srcset.src && (srcset.element.src = srcset.src); 95 | } 96 | } while(srcsetIndex--); 97 | }, 10); 98 | }, 99 | 100 | /* 101 | init 102 | */ 103 | _init = function() { 104 | _removeEvent(_eventPrefix + 'load', _init); 105 | 106 | win.Imgsrcset.parse(); 107 | _watch(); 108 | 109 | // Processes '_srcsets' array and determines which source to use 110 | // '_watch' will clear out any images from the array that do not have parents, which should eliminate element caching 111 | _addEvent(_eventPrefix + 'resize', _watch); 112 | _addEvent(_eventPrefix + 'orientationchange', _watch); 113 | }; 114 | 115 | /* 116 | imgsrcset 117 | */ 118 | win.Imgsrcset = { 119 | /* 120 | parse 121 | 122 | Called on '_init' and can also be called if new images are added/removed 123 | */ 124 | parse: function() { 125 | _srcsets = []; 126 | 127 | var imgs = win.document.getElementsByTagName('img') || [], 128 | imgIndex = imgs.length - 1, 129 | imgLength = imgIndex, 130 | img = null, 131 | srcset = ''; 132 | 133 | do { 134 | img = imgs[imgLength - imgIndex]; 135 | srcset = img.getAttribute('srcset') || ''; 136 | 137 | if (!srcset) { 138 | continue; 139 | } 140 | 141 | _srcsetID = _srcsets.push({ 142 | element : img, 143 | media : srcset, 144 | matches : false, 145 | src : img.getAttribute('src') || '' 146 | }); 147 | } while(imgIndex--); 148 | } 149 | }; 150 | 151 | // Set up listeners 152 | _addEvent(_eventPrefix + 'load', _init); 153 | })(window); 154 | -------------------------------------------------------------------------------- /nimdoc.cfg: -------------------------------------------------------------------------------- 1 | # This is the config file for the documentation generator. 2 | # (c) 2015 Andreas Rumpf 3 | # Feel free to edit the templates as you need. 4 | 5 | split.item.toc = "20" 6 | # too long entries in the table of contents wrap around 7 | # after this number of characters 8 | 9 | 10 | doc.listing_start = """
"""
 11 | doc.listing_end = """
""" 12 | doc.listing_button = "" 13 | 14 | doc.section = """ 15 |
16 |

$sectionTitle

17 |
18 | $content 19 |
20 | """ 21 | 22 | doc.section.toc = """ 23 |
  • 24 | $sectionTitle 25 | 28 |
  • 29 | """ 30 | 31 | doc.item = """ 32 |
    $header
    33 |
    34 | $desc 35 |
    36 | """ 37 | 38 | doc.item.toc = """ 39 |
  • $name
  • 40 | """ 41 | 42 | doc.toc = """ 43 | """ 48 | 49 | doc.body_toc = """ 50 |
    51 | $tableofcontents 52 |
    53 |
    54 | $moduledesc 55 | $content 56 |
    57 | """ 58 | 59 | doc.body_no_toc = """ 60 | $moduledesc 61 | $content 62 | """ 63 | 64 | doc.file = """ 65 | 66 | 67 | $title 68 | 69 | 71 | 73 | 306 | 307 | 309 | 310 | 311 | 312 |
    313 | Nimrod logo 315 |
    316 | 317 |

    $title

    318 | $content 319 | 320 | 321 | """ 322 | -------------------------------------------------------------------------------- /slidy2/styles/slidy.css: -------------------------------------------------------------------------------- 1 | /* slidy.css 2 | 3 | Copyright (c) 2005-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved. 4 | W3C liability, trademark, document use and software licensing 5 | rules apply, see: 6 | 7 | http://www.w3.org/Consortium/Legal/copyright-documents 8 | http://www.w3.org/Consortium/Legal/copyright-software 9 | */ 10 | body 11 | { 12 | margin: 0 0 0 0; 13 | padding: 0 0 0 0; 14 | width: 100%; 15 | height: 100%; 16 | color: black; 17 | background-color: white; 18 | font-family: "Gill Sans MT", "Gill Sans", GillSans, sans-serif; 19 | font-size: 14pt; 20 | } 21 | 22 | div.toolbar { 23 | position: fixed; z-index: 200; 24 | top: auto; bottom: 0; left: 0; right: 0; 25 | height: 1.2em; text-align: right; 26 | padding-left: 1em; 27 | padding-right: 1em; 28 | font-size: 60%; 29 | color: red; 30 | background-color: rgb(240,240,240); 31 | border-top: solid 1px rgb(180,180,180); 32 | } 33 | 34 | div.toolbar span.copyright { 35 | color: black; 36 | margin-left: 0.5em; 37 | } 38 | 39 | div.initial_prompt { 40 | position: absolute; 41 | z-index: 1000; 42 | bottom: 1.2em; 43 | width: 100%; 44 | background-color: rgb(200,200,200); 45 | opacity: 0.35; 46 | background-color: rgb(200,200,200, 0.35); 47 | cursor: pointer; 48 | } 49 | 50 | div.initial_prompt p.help { 51 | text-align: center; 52 | } 53 | 54 | div.initial_prompt p.close { 55 | text-align: right; 56 | font-style: italic; 57 | } 58 | 59 | div.slidy_toc { 60 | position: absolute; 61 | z-index: 300; 62 | width: 60%; 63 | max-width: 30em; 64 | height: 30em; 65 | overflow: auto; 66 | top: auto; 67 | right: auto; 68 | left: 4em; 69 | bottom: 4em; 70 | padding: 1em; 71 | background: rgb(240,240,240); 72 | border-style: solid; 73 | border-width: 2px; 74 | font-size: 60%; 75 | } 76 | 77 | div.slidy_toc .toc_heading { 78 | text-align: center; 79 | width: 100%; 80 | margin: 0; 81 | margin-bottom: 1em; 82 | border-bottom-style: solid; 83 | border-bottom-color: rgb(180,180,180); 84 | border-bottom-width: 1px; 85 | } 86 | 87 | div.slide { 88 | z-index: 20; 89 | margin: 0 0 0 0; 90 | padding-top: 0; 91 | padding-bottom: 0; 92 | padding-left: 20px; 93 | padding-right: 20px; 94 | border-width: 0; 95 | clear: both; 96 | top: 0; 97 | bottom: 0; 98 | left: 0; 99 | right: 0; 100 | line-height: 120%; 101 | background-color: transparent; 102 | } 103 | 104 | div.background { 105 | display: none; 106 | } 107 | 108 | div.handout { 109 | margin-left: 20px; 110 | margin-right: 20px; 111 | } 112 | 113 | div.slide.titlepage { 114 | text-align: center; 115 | } 116 | 117 | div.slide.titlepage h1 { 118 | padding-top: 10%; 119 | margin-right: 0; 120 | } 121 | 122 | div.slide h1 { 123 | padding-left: 0; 124 | padding-right: 20pt; 125 | padding-top: 4pt; 126 | padding-bottom: 4pt; 127 | margin-top: 0; 128 | margin-left: 0; 129 | margin-right: 60pt; 130 | margin-bottom: 0.5em; 131 | display: block; 132 | font-size: 160%; 133 | line-height: 1.2em; 134 | background: transparent; 135 | } 136 | 137 | @media screen and (max-device-width: 1024px) 138 | { 139 | div.slide { font-size: 100%; } 140 | } 141 | 142 | @media screen and (max-device-width: 800px) 143 | { 144 | div.slide { font-size: 200%; } 145 | div.slidy_toc { 146 | top: 1em; 147 | left: 1em; 148 | right: auto; 149 | width: 80%; 150 | font-size: 180%; 151 | } 152 | } 153 | 154 | div.toc-heading { 155 | width: 100%; 156 | border-bottom: solid 1px rgb(180,180,180); 157 | margin-bottom: 1em; 158 | text-align: center; 159 | } 160 | 161 | img { 162 | padding-left: 0px !important; 163 | margin-left: 0px !important; 164 | border-left: 0px !important; 165 | } 166 | 167 | pre { 168 | /*font-size: 80%;*/ 169 | font-weight: bold; 170 | line-height: 120%; 171 | padding-top: 0.2em; 172 | padding-bottom: 0.2em; 173 | padding-left: 1em; 174 | padding-right: 1em; 175 | border-style: solid; 176 | border-left-width: 1em; 177 | border-top-width: thin; 178 | border-right-width: thin; 179 | border-bottom-width: thin; 180 | border-color: #95ABD0; 181 | color: #00428C; 182 | background-color: #E4E5E7; 183 | } 184 | 185 | li pre { margin-left: 0; } 186 | 187 | blockquote { font-style: italic } 188 | 189 | img { background-color: transparent } 190 | 191 | p.copyright { font-size: smaller } 192 | 193 | .center { text-align: center } 194 | .footnote { font-size: smaller; margin-left: 2em; } 195 | 196 | a img { border-width: 0; border-style: none } 197 | 198 | a:visited { color: navy } 199 | a:link { color: navy } 200 | a:hover { color: red; text-decoration: underline } 201 | a:active { color: red; text-decoration: underline } 202 | 203 | a {text-decoration: none} 204 | .toolbar a:link {color: blue} 205 | .toolbar a:visited {color: blue} 206 | .toolbar a:active {color: red} 207 | .toolbar a:hover {color: red} 208 | 209 | ul { list-style-type: square; } 210 | ul ul { list-style-type: disc; } 211 | ul ul ul { list-style-type: circle; } 212 | ul ul ul ul { list-style-type: disc; } 213 | li { margin-left: 0.5em; margin-top: 0.5em; } 214 | li li { font-size: 85%; font-style: italic } 215 | li li li { font-size: 85%; font-style: normal } 216 | 217 | div dt 218 | { 219 | margin-left: 0; 220 | margin-top: 1em; 221 | margin-bottom: 0.5em; 222 | font-weight: bold; 223 | } 224 | div dd 225 | { 226 | margin-left: 2em; 227 | margin-bottom: 0.5em; 228 | } 229 | 230 | 231 | p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table { 232 | margin-left: 1em; 233 | margin-right: 1em; 234 | } 235 | 236 | p.subhead { font-weight: bold; margin-top: 2em; } 237 | 238 | .smaller { font-size: smaller } 239 | .bigger { font-size: 130% } 240 | 241 | td,th { padding: 0.2em } 242 | 243 | ul { 244 | margin: 0.5em 1.5em 0.5em 1.5em; 245 | padding: 0; 246 | } 247 | 248 | ol { 249 | margin: 0.5em 1.5em 0.5em 1.5em; 250 | padding: 0; 251 | } 252 | 253 | ul { list-style-type: square; } 254 | ul ul { list-style-type: disc; } 255 | ul ul ul { list-style-type: circle; } 256 | ul ul ul ul { list-style-type: disc; } 257 | 258 | ul li { 259 | list-style: square; 260 | margin: 0.1em 0em 0.6em 0; 261 | padding: 0 0 0 0; 262 | line-height: 140%; 263 | } 264 | 265 | ol li { 266 | margin: 0.1em 0em 0.6em 1.5em; 267 | padding: 0 0 0 0px; 268 | line-height: 140%; 269 | list-style-type: decimal; 270 | } 271 | 272 | li ul li { 273 | font-size: 85%; 274 | font-style: italic; 275 | list-style-type: disc; 276 | background: transparent; 277 | padding: 0 0 0 0; 278 | } 279 | li li ul li { 280 | font-size: 85%; 281 | font-style: normal; 282 | list-style-type: circle; 283 | background: transparent; 284 | padding: 0 0 0 0; 285 | } 286 | li li li ul li { 287 | list-style-type: disc; 288 | background: transparent; 289 | padding: 0 0 0 0; 290 | } 291 | 292 | li ol li { 293 | list-style-type: decimal; 294 | } 295 | 296 | 297 | li li ol li { 298 | list-style-type: decimal; 299 | } 300 | 301 | /* 302 | setting class="outline on ol or ul makes it behave as an 303 | ouline list where blocklevel content in li elements is 304 | hidden by default and can be expanded or collapsed with 305 | mouse click. Set class="expand" on li to override default 306 | */ 307 | 308 | ol.outline li:hover { cursor: pointer } 309 | ol.outline li.nofold:hover { cursor: default } 310 | 311 | ul.outline li:hover { cursor: pointer } 312 | ul.outline li.nofold:hover { cursor: default } 313 | 314 | ol.outline { list-style:decimal; } 315 | ol.outline ol { list-style-type:lower-alpha } 316 | 317 | ol.outline li.nofold { 318 | padding: 0 0 0 20px; 319 | background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.5em; 320 | } 321 | ol.outline li.unfolded { 322 | padding: 0 0 0 20px; 323 | background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.5em; 324 | } 325 | ol.outline li.folded { 326 | padding: 0 0 0 20px; 327 | background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.5em; 328 | } 329 | ol.outline li.unfolded:hover { 330 | padding: 0 0 0 20px; 331 | background: transparent url(../graphics/fold.gif) no-repeat 0px 0.5em; 332 | } 333 | ol.outline li.folded:hover { 334 | padding: 0 0 0 20px; 335 | background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.5em; 336 | } 337 | 338 | ul.outline li.nofold { 339 | padding: 0 0 0 20px; 340 | background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.5em; 341 | } 342 | ul.outline li.unfolded { 343 | padding: 0 0 0 20px; 344 | background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.5em; 345 | } 346 | ul.outline li.folded { 347 | padding: 0 0 0 20px; 348 | background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.5em; 349 | } 350 | ul.outline li.unfolded:hover { 351 | padding: 0 0 0 20px; 352 | background: transparent url(../graphics/fold.gif) no-repeat 0px 0.5em; 353 | } 354 | ul.outline li.folded:hover { 355 | padding: 0 0 0 20px; 356 | background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.5em; 357 | } 358 | 359 | /* for slides with class "title" in table of contents */ 360 | a.titleslide { font-weight: bold; font-style: italic } 361 | 362 | /* 363 | hide images for work around for save as bug 364 | where browsers fail to save images used by CSS 365 | */ 366 | img.hidden { display: none; visibility: hidden } 367 | div.initial_prompt { display: none; visibility: hidden } 368 | 369 | div.slide { 370 | visibility: visible; 371 | position: inherit; 372 | } 373 | div.handout { 374 | border-top-style: solid; 375 | border-top-width: thin; 376 | border-top-color: black; 377 | } 378 | 379 | @media screen { 380 | .hidden { display: none; visibility: visible } 381 | 382 | div.slide.hidden { display: block; visibility: visible } 383 | div.handout.hidden { display: block; visibility: visible } 384 | div.background { display: none; visibility: hidden } 385 | body.single_slide div.initial_prompt { display: block; visibility: visible } 386 | body.single_slide div.background { display: block; visibility: visible } 387 | body.single_slide div.background.hidden { display: none; visibility: hidden } 388 | body.single_slide .invisible { visibility: hidden } 389 | body.single_slide .hidden { display: none; visibility: hidden } 390 | body.single_slide div.slide { position: absolute } 391 | body.single_slide div.handout { display: none; visibility: hidden } 392 | } 393 | 394 | @media print { 395 | .hidden { display: block; visibility: visible } 396 | 397 | div.slide { page-break-after: always; } 398 | 399 | div.slide pre { font-size: 60%; padding-left: 0.5em; } 400 | div.toolbar { display: none; visibility: hidden; } 401 | div.slidy_toc { display: none; visibility: hidden; } 402 | div.background { display: none; visibility: hidden; } 403 | 404 | div.slide { page-break-before: always } 405 | 406 | /* :first-child isn't reliable for print media */ 407 | div.slide.first-slide { page-break-before: avoid } 408 | 409 | div#pagewidth { 410 | display: inline ; 411 | } 412 | } 413 | 414 | -------------------------------------------------------------------------------- /slidy2/styles/w3c-blue.css: -------------------------------------------------------------------------------- 1 | /* w3c-blue.css 2 | 3 | Copyright (c) 2005-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved. 4 | W3C liability, trademark, document use and software licensing 5 | rules apply, see: 6 | 7 | http://www.w3.org/Consortium/Legal/copyright-documents 8 | http://www.w3.org/Consortium/Legal/copyright-software 9 | */ 10 | body 11 | { 12 | margin: 0 0 0 0; 13 | padding: 0 0 0 0; 14 | width: 100%; 15 | height: 100%; 16 | color: black; 17 | background-color: white; 18 | font-family: "Gill Sans MT", "Gill Sans", GillSans, sans-serif; 19 | font-size: 14pt; 20 | } 21 | 22 | div.slide.titlepage { 23 | text-align: center; 24 | } 25 | 26 | div.slide.titlepage h1 { 27 | padding-top: 40%; 28 | } 29 | 30 | div.slide { 31 | z-index: 20; 32 | margin: 0 0 0 0; 33 | padding: 0; 34 | border-width: 0; 35 | top: 0; 36 | bottom: 0; 37 | left: 0; 38 | right: 0; 39 | line-height: 100%; 40 | background-color: transparent; 41 | } 42 | 43 | div.background { 44 | z-index: 1; 45 | position: absolute; 46 | vertical-align: bottom; 47 | left: 0; 48 | right: 0; 49 | top: 0; 50 | bottom: auto; 51 | height: 3.8em; /*4.1em; */ 52 | padding: 0 0 0 0.2em; 53 | margin: 0 0 0 0; 54 | border-width: 0; 55 | background-color: #121220; /* #728ec2; */ 56 | } 57 | 58 | div.background img { 59 | height: 4em; 60 | } 61 | 62 | /* this rule is hidden from IE which doesn't support + selector */ 63 | div.slide + div[class].slide { page-break-before: always;} 64 | 65 | div.slide h1 { 66 | /*padding-left: 12em; */ 67 | padding-right: 3em; 68 | padding-top: 0.1em; 69 | margin-bottom: 0.8em; 70 | margin-top: 0.9em; /* -0.05em; */ 71 | margin-left: 0; 72 | margin-right: 0; 73 | min-height: 2.3em; 74 | color: white; 75 | height: 2.2em; 76 | font-size: 140%; 77 | line-height: 1.1em; 78 | text-align: center; 79 | } 80 | 81 | div.slide h1 a { 82 | color: white; 83 | text-decoration: none; 84 | } 85 | 86 | div.slide h1 a:link { 87 | color: white; 88 | text-decoration: none; 89 | } 90 | 91 | div.slide h1 a:visited { 92 | color: white; 93 | text-decoration: none; 94 | } 95 | 96 | div.slide h1 a:hover { 97 | color: white; 98 | text-decoration: underline; 99 | } 100 | 101 | div.slide h1 a:active { 102 | color: red; 103 | text-decoration: underline; 104 | } 105 | 106 | #head-icon { 107 | margin-top: 0.5em; 108 | margin-bottom: 0; 109 | margin-left: 0;/* 110 | margin-right: 1em; 111 | background: #121220; 112 | border-width: 0; 113 | height: 3em; 114 | max-width: 3em;*/ 115 | z-index: 2; 116 | float: left; 117 | } 118 | 119 | #head-logo { 120 | margin: 0; 121 | margin-top: 0.25em; 122 | padding-top: 0.25em; 123 | padding-bottom: 0.2em; 124 | padding-left: 0; 125 | padding-right: 0; 126 | height: 3.2em; 127 | width: 4.8em; 128 | float: right; 129 | z-index: 2; 130 | background: #121220; 131 | } 132 | 133 | #head-logo-fallback { 134 | margin: 0; 135 | padding: 0; 136 | margin-top: -0.8em; 137 | width: 4.8em; 138 | float: right; 139 | z-index: 2; 140 | } 141 | 142 | /* the next two classes support vertical and horizontal centering */ 143 | div.vbox { 144 | float: left; 145 | height: 40%; 146 | width: 50%; 147 | margin-top: -240px; 148 | } 149 | div.hbox { 150 | width:60%; 151 | margin-top: 0; 152 | margin-left:auto; 153 | margin-right:auto; 154 | height: 60%; 155 | border:1px solid silver; 156 | background:#F0F0F0; 157 | overflow:auto; 158 | text-align:left; 159 | clear:both; 160 | } 161 | 162 | /* styling for named background */ 163 | div.background.slanty { 164 | z-index: 2; 165 | bottom: 0; 166 | height: 100%; 167 | background: transparent; 168 | } 169 | 170 | div.background.slanty img { margin-top: 4em; width: 100%; height: 80% } 171 | 172 | /* the following makes the pre background translucent */ 173 | /* opacity is a CSS3 property but supported by Mozilla family */ 174 | /* filter is an IE specific feature that also requires width */ 175 | div.slide.slanty pre { 176 | width: 93%; /* needed for IE filter to work */ 177 | opacity: .8; 178 | filter: alpha(opacity=80); 179 | } 180 | 181 | img.withBorder { 182 | border: 2px solid #c60; 183 | padding: 4px; 184 | } 185 | 186 | li pre { margin-left: 0; } 187 | 188 | @media print { pre { font-size: 60% } } 189 | 190 | blockquote { font-style: italic } 191 | 192 | img { background-color: transparent } 193 | 194 | p.copyright { font-size: smaller } 195 | 196 | .center { text-align: center } 197 | .footnote { font-size: smaller; margin-left: 2em; } 198 | 199 | a img { border-width: 0; border-style: none } 200 | 201 | a:visited { color: navy } 202 | a:link { color: navy } 203 | a:hover { color: red; text-decoration: underline } 204 | a:active { color: red; text-decoration: underline } 205 | 206 | a {text-decoration: none} 207 | .navbar a:link {color: white} 208 | .navbar a:visited {color: yellow} 209 | .navbar a:active {color: red} 210 | .navbar a:hover {color: red} 211 | 212 | ul { list-style-type: square; } 213 | ul ul { list-style-type: disc; } 214 | ul ul ul { list-style-type: circle; } 215 | ul ul ul ul { list-style-type: disc; } 216 | li { margin-left: 0.5em; margin-top: 0.5em; } 217 | li li { font-size: 85%; font-style: italic } 218 | li li li { font-size: 85%; font-style: normal } 219 | 220 | div dt 221 | { 222 | margin-left: 0; 223 | margin-top: 1em; 224 | margin-bottom: 0.5em; 225 | font-weight: bold; 226 | } 227 | div dd 228 | { 229 | margin-left: 2em; 230 | margin-bottom: 0.5em; 231 | } 232 | 233 | 234 | p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table { 235 | margin-left: 1em; 236 | margin-right: 1em; 237 | } 238 | 239 | p.subhead { font-weight: bold; margin-top: 2em; } 240 | 241 | div.cover p.explanation { 242 | font-style: italic; 243 | margin-top: 3em; 244 | } 245 | 246 | 247 | .smaller { font-size: smaller } 248 | 249 | td,th { padding: 0.2em } 250 | 251 | ul { 252 | margin: 0.5em 1.5em 0.5em 1.5em; 253 | padding: 0; 254 | } 255 | 256 | ol { 257 | margin: 0.5em 1.5em 0.5em 1.5em; 258 | padding: 0; 259 | } 260 | 261 | ul { list-style-type: square; } 262 | ul ul { list-style-type: disc; } 263 | ul ul ul { list-style-type: circle; } 264 | ul ul ul ul { list-style-type: disc; } 265 | li { margin-left: 0.5em; margin-top: 0.5em; } 266 | li li { font-size: 85%; font-style: italic } 267 | li li li { font-size: 85%; font-style: normal } 268 | 269 | 270 | ul li { 271 | list-style: none; 272 | margin: 0.1em 0em 0.6em 0; 273 | padding: 0 0 0 40px; 274 | background: transparent url(../graphics/bullet.png) no-repeat 5px 0.3em; 275 | line-height: 140%; 276 | } 277 | 278 | /* workaround IE's failure to support background on li for print media */ 279 | @media print { ul li { list-style: disc; padding-left: 0; background: none; } } 280 | 281 | ol li { 282 | margin: 0.1em 0em 0.6em 1.5em; 283 | padding: 0 0 0 0px; 284 | line-height: 140%; 285 | } 286 | 287 | li li { 288 | font-size: 85%; 289 | font-style: italic; 290 | list-style-type: disc; 291 | background: transparent; 292 | padding: 0 0 0 0; 293 | } 294 | li li li { 295 | font-size: 85%; 296 | font-style: normal; 297 | list-style-type: circle; 298 | background: transparent; 299 | padding: 0 0 0 0; 300 | } 301 | li li li li { 302 | list-style-type: disc; 303 | background: transparent; 304 | padding: 0 0 0 0; 305 | } 306 | 307 | /* rectangular blue bullet + unfold/nofold/fold widget */ 308 | 309 | /* 310 | setting class="outline on ol or ul makes it behave as an 311 | ouline list where blocklevel content in li elements is 312 | hidden by default and can be expanded or collapsed with 313 | mouse click. Set class="expand" on li to override default 314 | */ 315 | 316 | ol.outline li:hover { cursor: pointer } 317 | ol.outline li.nofold:hover { cursor: default } 318 | 319 | ul.outline li:hover { cursor: pointer } 320 | ul.outline li.nofold:hover { cursor: default } 321 | 322 | ol.outline { list-style:decimal; } 323 | ol.outline ol { list-style-type:lower-alpha } 324 | 325 | ol.outline li.nofold { 326 | padding: 0 0 0 20px; 327 | background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.3em; 328 | } 329 | ol.outline li.unfolded { 330 | padding: 0 0 0 20px; 331 | background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.3em; 332 | } 333 | ol.outline li.folded { 334 | padding: 0 0 0 20px; 335 | background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.3em; 336 | } 337 | ol.outline li.unfolded:hover { 338 | padding: 0 0 0 20px; 339 | background: transparent url(../graphics/fold.gif) no-repeat 0px 0.3em; 340 | } 341 | ol.outline li.folded:hover { 342 | padding: 0 0 0 20px; 343 | background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.3em; 344 | } 345 | 346 | ul.outline li.nofold { 347 | padding: 0 0 0 52px; 348 | background: transparent url(../graphics/bullet-nofold-dim.gif) no-repeat 5px 0.3em; 349 | } 350 | ul.outline li.unfolded { 351 | padding: 0 0 0 52px; 352 | background: transparent url(../graphics/bullet-fold-dim.gif) no-repeat 5px 0.3em; 353 | } 354 | ul.outline li.folded { 355 | padding: 0 0 0 52px; 356 | background: transparent url(../graphics/bullet-unfold-dim.gif) no-repeat 5px 0.3em; 357 | } 358 | ul.outline li.unfolded:hover { 359 | padding: 0 0 0 52px; 360 | background: transparent url(../graphics/bullet-fold.gif) no-repeat 5px 0.3em; 361 | } 362 | ul.outline li.folded:hover { 363 | padding: 0 0 0 52px; 364 | background: transparent url(../graphics/bullet-unfold.gif) no-repeat 5px 0.3em; 365 | } 366 | 367 | li ul.outline li.nofold { 368 | padding: 0 0 0 21px; 369 | background: transparent url(../graphics/nofold-dim.gif) no-repeat 5px 0.3em; 370 | } 371 | li ul.outline li.unfolded { 372 | padding: 0 0 0 21px; 373 | background: transparent url(../graphics/fold-dim.gif) no-repeat 5px 0.3em; 374 | } 375 | li ul.outline li.folded { 376 | padding: 0 0 0 21px; 377 | background: transparent url(../graphics/unfold-dim.gif) no-repeat 5px 0.3em; 378 | } 379 | li ul.outline li.unfolded:hover { 380 | padding: 0 0 0 21px; 381 | background: transparent url(../graphics/fold.gif) no-repeat 5px 0.3em; 382 | } 383 | li ul.outline li.folded:hover { 384 | padding: 0 0 0 21px; 385 | background: transparent url(../graphics/unfold.gif) no-repeat 5px 0.3em; 386 | } 387 | 388 | img { 389 | image-rendering: optimize-quality; 390 | } 391 | 392 | img.withBorder { 393 | border: 2px solid #c60; 394 | padding: 4px; 395 | } 396 | 397 | div.header { 398 | position: absolute; 399 | z-index: 2; 400 | left: 0; 401 | right: 0; 402 | top: 0; 403 | bottom: auto; 404 | height: 2.95em; 405 | width: 100%; 406 | padding: 0 0 0 0; 407 | margin: 0 0 0 0; 408 | border-width: 0; 409 | border-style: solid; 410 | background-color: #005A9C; 411 | border-bottom-width: thick; 412 | border-bottom-color: #95ABD0; 413 | } 414 | 415 | div.footer { 416 | position: absolute; 417 | z-index: 80; 418 | left: 0; 419 | right: 0; 420 | top: auto; 421 | bottom: 0; 422 | height: 3.5em; 423 | margin: 0; 424 | font-size: 80%; 425 | font-weight: bold; 426 | padding-left: 1em; 427 | padding-right: 0; 428 | padding-top: 0.3em; 429 | padding-bottom: 0; 430 | color: #003366; 431 | background-color: #95ABD0; 432 | } 433 | 434 | /* this is a hack to hide property from IE6 and below */ 435 | div[class="footer"] { 436 | position: fixed; 437 | } 438 | 439 | #hidden-bullet { 440 | visibility: hidden; 441 | display: none; 442 | } 443 | 444 | div.slide.cover { 445 | color: white; 446 | background-color: #121220; 447 | padding-top: 0; 448 | padding-right: 0; 449 | padding-left: 3em; 450 | height: 100%; 451 | } 452 | 453 | div.slide.cover h1 { 454 | margin: 0; 455 | padding: 0.5em; 456 | color: white; 457 | height: auto; 458 | } 459 | 460 | div.slide.cover h2 { 461 | color: white; 462 | } 463 | 464 | div.slide.cover a { 465 | color: white; 466 | } 467 | 468 | div.slide.cover a:visited { color: white } 469 | div.slide.cover a:link { color: white } 470 | div.slide.cover a:hover { color: yellow; text-decoration: underline } 471 | div.slide.cover a:active { color: yellow; text-decoration: underline } 472 | 473 | div.slide.cover a:hover, div.slide.cover a:active { 474 | color: yellow; text-decoration: underline; 475 | } 476 | 477 | div.slide.cover img.cover { 478 | margin: 0 0 0 0; 479 | float: right; 480 | padding-bottom: 4em; 481 | width: 50%; 482 | overflow: hidden; 483 | } 484 | 485 | div.slide.cover a:hover, div.slide.cover a:active { 486 | color: yellow; text-decoration: underline; 487 | } 488 | 489 | /* for Bert as an ardent user of the old W3C slidemaker tool */ 490 | 491 | div.comment { display: none; visibility: hidden } 492 | 493 | @media print { 494 | div.slide h1 { background: transparent; color: black } 495 | div.slide.cover { background: transparent; color: black } 496 | div.slide.cover h1 { background: transparent; color: black } 497 | div.comment { display: block; visibility: visible } 498 | } 499 | -------------------------------------------------------------------------------- /move_semantics.rst: -------------------------------------------------------------------------------- 1 | ======================================== 2 | Nim - Move semantics 3 | ======================================== 4 | 5 | 6 | Introduction 7 | ============ 8 | 9 | "Copying bad design is not good design." -- Nim's unofficial motto 10 | 11 | 12 | Introduction 13 | ============ 14 | 15 | "Copying bad design is not good design." -- Nim's unofficial motto 16 | 17 | - "Do not copy bad designs!" 18 | 19 | 20 | Introduction 21 | ============ 22 | 23 | "Copying bad design is not good design." -- Nim's unofficial motto 24 | 25 | - "Do not copy bad designs!" 26 | - "Recombine good bits from several sources!" 27 | 28 | 29 | Motivating example 30 | ================== 31 | 32 | .. code-block::nim 33 | :number-lines: 34 | 35 | var someNumbers = @[299_792_458, 25_813] 36 | 37 | someNumbers.add 137 38 | 39 | 40 | What happens in memory 41 | ====================== 42 | 43 | :: 44 | 45 | someNumbers 46 | ----------- 47 | 48 | Length: 2 +--------> 299_792_458 49 | Capacity: 2 | 25_813 50 | Data: -----------+ 51 | 52 | 53 | What happens in memory (2) 54 | ========================== 55 | 56 | :: 57 | 58 | someNumbers 59 | ----------- 60 | 61 | Length: 3 +---//---> 299_792_458 62 | Capacity: 4 | 25_813 63 | Data: -----------+ 64 | | 65 | +--------> 299_792_458 66 | 25_813 67 | 137 68 | 69 | 70 | 71 | Shallow copy, copy, move 72 | ======================== 73 | 74 | 75 | .. code-block::nim 76 | :number-lines: 77 | 78 | var someNumbers = @[299_792_458, 25_813] 79 | var other = someNumbers 80 | someNumbers.add 137 # other contains a dangling pointer? 81 | 82 | 83 | Shallow copy, copy, move (2) 84 | ============================ 85 | 86 | 87 | .. code-block::nim 88 | :number-lines: 89 | 90 | var someNumbers = @[299_792_458, 25_813] 91 | var other = someNumbers 92 | someNumbers.add 137 # other contains a dangling pointer? 93 | 94 | 95 | 1. Solution: Create a new sequence with the same elements. 96 | ("Deep" copy: C++98, Nim) 97 | 2. Solution: Use a pointer to a pointer. (Slower, more allocations.) 98 | 3. Solution: Disallow the assignment. 99 | 4. Solution: Use a GC mechanism to free the old block. 100 | 5. Solution: "Steal" the memory. **Move** the block. 101 | 102 | 103 | Explicit move 104 | ============= 105 | 106 | 107 | .. code-block::nim 108 | :number-lines: 109 | 110 | var someNumbers = @[299_792_458, 25_813] 111 | var other = move(someNumbers) 112 | # someNumbers is empty now. 113 | someNumbers.add 137 114 | 115 | assert someNumbers == @[137] 116 | 117 | 118 | Implicit move 119 | ============= 120 | 121 | 122 | .. code-block::nim 123 | :number-lines: 124 | 125 | var a = f() 126 | # can move f's result into a 127 | 128 | 129 | Implicit move (2) 130 | ================= 131 | 132 | 133 | .. code-block::nim 134 | :number-lines: 135 | 136 | var a = f(g()) # can move g's result into 'f' 137 | # can move f's result into a 138 | 139 | 140 | Implicit move (3) 141 | ================= 142 | 143 | 144 | .. code-block::nim 145 | :number-lines: 146 | 147 | var namedValue = g() 148 | var a = f(namedValue) # can move namedValue into 'f' 149 | # can move f's result into a 150 | 151 | 152 | Implicit move (4) 153 | ================= 154 | 155 | 156 | .. code-block::nim 157 | :number-lines: 158 | 159 | 160 | var x = @[1, 2, 3] 161 | var y = x # is last read of 'x', can move into 'y' 162 | var z = y # is last read of 'y', can move into 'z' 163 | 164 | 165 | 166 | Sink parameters 167 | =============== 168 | 169 | 170 | .. code-block::nim 171 | :number-lines: 172 | 173 | func put(t: var Table; key: string; value: seq[string]) = 174 | var h = hash(key) 175 | t.slots[h] = value # copy here :-( 176 | 177 | var values = @["a", "b", "c"] 178 | tab.put "key", values 179 | 180 | 181 | 182 | Sink parameters (2) 183 | =================== 184 | 185 | 186 | .. code-block::nim 187 | :number-lines: 188 | 189 | func put(t: var Table; key: string; value: ***sink*** seq[string]) = 190 | var h = hash(key) 191 | t.slots[h] = value # move here :-) 192 | 193 | var values = @["a", "b", "c"] 194 | tab.put "key", values # last use of 'values', can move 195 | 196 | 197 | Sink parameters (3) 198 | =================== 199 | 200 | 201 | .. code-block::nim 202 | :number-lines: 203 | 204 | func put(t: var Table; key: string; value: ***sink*** seq[string]) = 205 | var h = hash(key) 206 | t.slots[h] = value # move here :-) 207 | 208 | var values = @["a", "b", "c"] 209 | tab.put "key", values # not last use of 'values', cannot move 210 | echo values 211 | 212 | - Warning: "Passing a copy to a sink parameter." 213 | 214 | 215 | 216 | Sink parameters (4) 217 | =================== 218 | 219 | 220 | .. code-block::nim 221 | :number-lines: 222 | 223 | func put(t: var Table; key: string; value: ***sink*** seq[string]) = 224 | var h = hash(key) 225 | t.slots[h] = value # move here :-) 226 | 227 | var values = @["a", "b", "c"] 228 | echo values 229 | tab.put "key", values 230 | 231 | - Solution: Move code around. 232 | 233 | 234 | Sink: More examples 235 | =================== 236 | 237 | - A ``sink`` parameter is an optimization. 238 | - If you get it wrong, only performance is affected. 239 | 240 | .. code-block::nim 241 | :number-lines: 242 | 243 | func `[]=`[K, V](t: var Table[K, V]; k: K; v: V) 244 | 245 | func `==`[T](a, b: T): bool 246 | 247 | func `+`[T](a, b: T): T 248 | 249 | func add[T](s: var seq[T]; v: T) 250 | 251 | 252 | 253 | Sink: More examples (2) 254 | ======================= 255 | 256 | - A ``sink`` parameter is an optimization. 257 | - If you get it wrong, only performance is affected. 258 | 259 | .. code-block::nim 260 | :number-lines: 261 | 262 | func `[]=`[K, V](t: var Table[K, V]; k: ***sink*** K; v: ***sink*** V) 263 | 264 | func `==`[T](a, b: T): bool 265 | 266 | func `+`[T](a, b: T): T 267 | 268 | func add[T](s: var seq[T]; v: ***sink*** T) 269 | 270 | 271 | 272 | Getters: Lending a value 273 | ======================== 274 | 275 | 276 | .. code-block::nim 277 | :number-lines: 278 | 279 | func get[K, V](t: Table[K, V]; key: K): V = 280 | var h = hash(key) 281 | result = t.slots[h] # copy here? 282 | 283 | 284 | 285 | Getters: Lending a value (2) 286 | ============================ 287 | 288 | 289 | .. code-block::nim 290 | :number-lines: 291 | 292 | func get[K, V](t: Table[K, V]; key: K): V = 293 | var h = hash(key) 294 | result = move t.slots[h] # does not compile 295 | 296 | 297 | Getters: Lending a value (3) 298 | ============================ 299 | 300 | 301 | .. code-block::nim 302 | :number-lines: 303 | 304 | func get[K, V](t: ***var*** Table[K, V]; key: K): V = 305 | var h = hash(key) 306 | result = move t.slots[h] # does compile, but it's a destructive read! 307 | 308 | 309 | 310 | Getters: Lending a value (4) 311 | ============================ 312 | 313 | 314 | .. code-block::nim 315 | :number-lines: 316 | 317 | func get[K, V](t: Table[K, V]; key: K): ***lent*** V = 318 | var h = hash(key) 319 | result = t.slots[h] # "borrow", no copy, no move. 320 | 321 | 322 | 323 | Reference counting 324 | ================== 325 | 326 | - We have seen how to optimize away spurious copies. 327 | - The same principles apply to reference counting (= RC). 328 | - "Copy reference" ~ ``incRC(src); decRC(dest); dest = src`` 329 | - "Move reference" ~ ``dest = src`` 330 | - Led to the development of the ``--gc:arc`` mode. 331 | 332 | 333 | ARC 334 | ===== 335 | 336 | .. code-block::nim 337 | :number-lines: 338 | 339 | include prelude 340 | 341 | type 342 | Node = ref object 343 | le, ri: Node 344 | 345 | proc checkTree(n: Node): int = 346 | if n.le == nil: 1 347 | else: 1 + checkTree(n.le) + checkTree(n.ri) 348 | 349 | proc makeTree(depth: int): Node = 350 | if depth == 0: Node(le: nil, ri: nil) 351 | else: Node(le: makeTree(depth-1), ri: makeTree(depth-1)) 352 | 353 | 354 | ARC (2) 355 | ======= 356 | 357 | .. code-block::nim 358 | :number-lines: 359 | 360 | proc main = 361 | let maxDepth = parseInt(paramStr(1)) 362 | const minDepth = 4 363 | let stretchDepth = maxDepth + 1 364 | echo("stretch tree of depth ", stretchDepth, "\t check:", 365 | checkTree makeTree(stretchDepth)) 366 | let longLivedTree = makeTree(maxDepth) 367 | var iterations = 1 shl maxDepth 368 | for depth in countup(minDepth, maxDepth, 2): 369 | var check = 0 370 | for i in 1..iterations: 371 | check += checkTree(makeTree(depth)) 372 | echo iterations, "\t trees of depth ", depth, "\t check:", check 373 | iterations = iterations div 4 374 | 375 | main() 376 | 377 | 378 | Manual memory management 379 | ======================== 380 | 381 | .. code-block::nim 382 | :number-lines: 383 | 384 | include prelude 385 | 386 | type 387 | Node = ptr object 388 | le, ri: Node 389 | 390 | proc checkTree(n: Node): int = 391 | if n.le == nil: 1 392 | else: 1 + checkTree(n.le) + checkTree(n.ri) 393 | 394 | proc makeTree(depth: int): Node = 395 | result = cast[Node](alloc(sizeof(result[]))) 396 | if depth == 0: 397 | result.le = nil; result.ri = nil 398 | else: 399 | result.le = makeTree(depth-1) 400 | result.ri = makeTree(depth-1) 401 | 402 | proc freeTree(n: Node) = 403 | if n != nil: 404 | freeTree(n.le); freeTree(n.ri); dealloc(n) 405 | 406 | 407 | Manual memory management (2) 408 | ============================ 409 | 410 | .. code-block::nim 411 | :number-lines: 412 | 413 | proc main = 414 | let maxDepth = parseInt(paramStr(1)) 415 | const minDepth = 4 416 | let stretchDepth = maxDepth + 1 417 | let stree = makeTree(stretchDepth) 418 | echo("stretch tree of depth ", stretchDepth, "\t check:", 419 | checkTree stree) 420 | let longLivedTree = makeTree(maxDepth) 421 | var iterations = 1 shl maxDepth 422 | for depth in countup(minDepth, maxDepth, 2): 423 | var check = 0 424 | for i in 1..iterations: 425 | let tmp = makeTree(depth) 426 | check += checkTree(tmp) 427 | freeTree(tmp) 428 | echo iterations, "\t trees of depth ", depth, "\t check:", check 429 | iterations = iterations div 4 430 | freeTree(longLivedTree); freeTree(stree) 431 | 432 | main() 433 | 434 | 435 | Benchmark: Throughput 436 | ===================== 437 | 438 | ============================== ============== ============= 439 | Memory management strategy Time Peak Memory 440 | ============================== ============== ============= 441 | mark&sweep GC 17s 588.047MiB 442 | deferred refcounting GC 16s 304.074MiB 443 | Boehm GC 12s N/A 444 | ARC **7.8s** 740.715MiB 445 | manual memory management 6.75s 473.195MiB 446 | ============================== ============== ============= 447 | 448 | 449 | 450 | Benchmark: Latency 451 | ================== 452 | 453 | 454 | ============================== ========= ============== ============= 455 | Memory management strategy Latency Total Time Peak Memory 456 | ============================== ========= ============== ============= 457 | deferred refcounting GC 0.0356ms 0.314s 300MiB 458 | ARC 0.0106ms 0.254s 271MiB 459 | ============================== ========= ============== ============= 460 | 461 | 462 | .. 463 | "Shipping soon", available in 'nim devel'. Already working 464 | for some people. 465 | Nimph success story. (--> 100K LOC project working with it) 466 | 467 | 468 | 469 | Custom containers 470 | ================= 471 | 472 | - Custom destructors, assignments and move optimizations. 473 | - Files/sockets etc can be closed automatically. (See C++, Rust.) 474 | - Enable composition between specialized memory management solutions. 475 | 476 | 477 | Destructors 478 | =========== 479 | 480 | .. code-block::nim 481 | :number-lines: 482 | 483 | type 484 | myseq*[T] = object 485 | len, cap: int 486 | data: ptr UncheckedArray[T] 487 | 488 | proc `=destroy`*[T](x: var myseq[T]) = 489 | if x.data != nil: 490 | for i in 0..= x.cap: resize(x) 536 | x.data[x.len] = y 537 | inc x.len 538 | 539 | proc `[]`*[T](x: myseq[T]; i: Natural): lent T = 540 | assert i < x.len 541 | x.data[i] 542 | 543 | proc `[]=`*[T](x: var myseq[T]; i: Natural; y: sink T) = 544 | assert i < x.len 545 | x.data[i] = y 546 | 547 | 548 | 549 | Object pooling 550 | ============== 551 | 552 | .. code-block::nim 553 | :number-lines: 554 | 555 | include prelude 556 | 557 | type 558 | NodeObj = object 559 | le, ri: Node 560 | Node = ptr NodeObj 561 | 562 | PoolNode = object 563 | next: ptr PoolNode 564 | elems: UncheckedArray[NodeObj] 565 | 566 | Pool = object 567 | len: int 568 | last: ptr PoolNode 569 | lastCap: int 570 | 571 | 572 | Object pooling (2) 573 | ================== 574 | 575 | .. code-block::nim 576 | :number-lines: 577 | 578 | proc `=`(dest: var Pool; src: Pool) {.error.} 579 | 580 | proc `=destroy`(p: var Pool) = 581 | var it = p.last 582 | while it != nil: 583 | let next = it.next 584 | dealloc(it) 585 | it = next 586 | p.len = 0 587 | p.lastCap = 0 588 | p.last = nil 589 | 590 | 591 | Object pooling (3) 592 | ================== 593 | 594 | .. code-block::nim 595 | :number-lines: 596 | 597 | proc newNode(p: var Pool): Node = 598 | if p.len >= p.lastCap: 599 | if p.lastCap == 0: p.lastCap = 4 600 | elif p.lastCap < 65_000: p.lastCap *= 2 601 | var n = cast[ptr PoolNode](alloc(sizeof(PoolNode) + p.lastCap * sizeof(NodeObj))) 602 | n.next = nil 603 | n.next = p.last 604 | p.last = n 605 | p.len = 0 606 | result = addr(p.last.elems[p.len]) 607 | inc p.len 608 | 609 | 610 | Object pooling (4) 611 | ================== 612 | 613 | .. code-block::nim 614 | :number-lines: 615 | 616 | proc checkTree(n: Node): int = 617 | if n.le == nil: 1 618 | else: 1 + checkTree(n.le) + checkTree(n.ri) 619 | 620 | proc makeTree(p: var Pool; depth: int): Node = 621 | result = newNode(p) 622 | if depth == 0: 623 | result.le = nil 624 | result.ri = nil 625 | else: 626 | result.le = makeTree(p, depth-1) 627 | result.ri = makeTree(p, depth-1) 628 | 629 | 630 | 631 | Object pooling (5) 632 | ================== 633 | 634 | .. code-block::nim 635 | :number-lines: 636 | 637 | proc main = 638 | let maxDepth = parseInt(paramStr(1)) 639 | const minDepth = 4 640 | let stretchDepth = maxDepth + 1 641 | var longLived: Pool 642 | let stree = makeTree(longLived, stretchDepth) 643 | echo("stretch tree of depth ", stretchDepth, "\t check:", 644 | checkTree stree) 645 | let longLivedTree = makeTree(longLived, maxDepth) 646 | var iterations = 1 shl maxDepth 647 | for depth in countup(minDepth, maxDepth, 2): 648 | var check = 0 649 | for i in 1..iterations: 650 | var shortLived: Pool 651 | check += checkTree(makeTree(shortLived, depth)) 652 | echo iterations, "\t trees of depth ", depth, "\t check:", check 653 | iterations = iterations div 4 654 | 655 | main() 656 | 657 | 658 | Benchmark: Throughput 659 | ===================== 660 | 661 | ============================== ============== ============= 662 | Memory management strategy Time Peak Memory 663 | ============================== ============== ============= 664 | mark&sweep GC 17s 588.047MiB 665 | deferred refcounting GC 16s 304.074MiB 666 | Boehm GC 12s N/A 667 | ARC 7.8s 740.715MiB 668 | manual memory management 6.75s 473.195MiB 669 | object pooling **2.4s** 251.504MiB 670 | ============================== ============== ============= 671 | 672 | 673 | .. 674 | - Channel. 675 | - Areas where it's benefitial 676 | - Talk about the danger of "move only" types. 677 | 678 | 679 | .. 680 | Multi threading 681 | =============== 682 | 683 | - Explain "reference counting" 684 | -- "counting" --> "control" 685 | -- "reference" --> "aliases" 686 | --> "reference counting" is "alias control" 687 | --> a graph is "isolated" when no external references 688 | exist. 689 | --> connection to trial deletion 690 | 691 | "Using Nim as the better C++" 692 | 693 | Write barrier for atomic reference counting: 694 | 695 | assign(value): 696 | if value: incRef(value) 697 | tmp = value 698 | atomicSwap(root.ref, tmp) 699 | if tmp != nil and decRef(tmp) == 0: 700 | free(tmp) 701 | 702 | 703 | 704 | Summary 705 | ======= 706 | 707 | - Move semantics mostly work under the hood. 708 | - ``sink`` and ``lent`` annotations are optional. 709 | - Lead to incredible speedups and algorithmic improvements. 710 | - Make Nim faster and "deterministic". 711 | - New strategy improves: 712 | 713 | - throughput 714 | - latency 715 | - memory consumption 716 | - threading 717 | - ease of programming 718 | - flexibility / composition 719 | 720 | 721 | 722 | Happy hacking! 723 | ============== 724 | 725 | Source code available under https://github.com/araq/fosdem2020. 726 | 727 | ============ ================================================ 728 | Website https://nim-lang.org 729 | Forum https://forum.nim-lang.org 730 | Github https://github.com/nim-lang/Nim 731 | IRC irc.freenode.net/nim 732 | ============ ================================================ 733 | 734 | -------------------------------------------------------------------------------- /slidy2/Overview.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 7 | HTML Slidy 8 | 9 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 |
    25 | 26 |
    27 | slanted W3C logo 28 |
    29 |
    30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | Cover page images (keys)
    45 |

    HTML Slidy: Slide Shows in HTML and XHTML

    46 | 47 |

    Dave Raggett, 48 | <dsr@w3.org>
    49 |
    50 |
    51 |
    52 |
    Hit the space bar or swipe left for next slide

    53 |
    54 | 55 |
    56 |

    Slide Shows in HTML and XHTML

    57 | 58 | 107 | 108 | 118 |
    119 | 120 |
    121 |

    For handouts, its often useful to include extra notes using a 122 | div element with class="handout" following each slide, as in:

    123 | 124 |
    125 | <div class="slide"> 
    126 |  ... your slide content ...
    127 | </div>
    128 | 
    129 | <div class="handout">
    130 |  ... stuff that only appears in the handouts ...
    131 | </div>
    132 | 
    133 |
    134 | 135 |
    136 |

    What you need to do

    137 | 138 | 171 | 172 |
    173 | <?xml version="1.0" encoding="utf-8"?>
    174 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    175 |  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    176 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 
    177 | <head> 
    178 |   <title>Slide Shows in XHTML</title> 
    179 |   <meta name="copyright" 
    180 |    content="Copyright &#169; 2005 your copyright notice" /> 
    181 |   <link rel="stylesheet" type="text/css" media="screen, projection, print" 
    182 |    href="http://www.w3.org/Talks/Tools/Slidy2/styles/slidy.css" /> 
    183 |   <script src="http://www.w3.org/Talks/Tools/Slidy2/scripts/slidy.js" 
    184 |    charset="utf-8" type="text/javascript"></script> 
    185 |   <style type="text/css"> 
    186 |     <!-- your custom style rules --> 
    187 |   </style> 
    188 | </head>
    189 | <body>
    190 |    ... your slides marked up in XHTML ...
    191 | </body>
    192 | </html>
    193 | 
    194 |
    195 | 196 |
    197 |

    To get the W3C Blue Style

    198 | 199 |

    The head element should include the following link to the style 200 | sheet:

    201 | 202 |
    203 | <link rel="stylesheet" type="text/css" media="screen, projection, print"
    204 |  href="http://www.w3.org/Talks/Tools/Slidy2/styles/w3c-blue.css" /> 
    205 | 
    206 | 207 |

    The body element's content should start with the following 208 | markup:

    209 | 210 |
    211 | <div class="background"> 
    212 |   <img id="head-icon" alt="graphic with four colored squares"
    213 |     src="http://www.w3.org/Talks/Tools/Slidy2/graphics/icon-blue.png" /> 
    214 |   <object id="head-logo" title="W3C logo" type="image/svg+xml"
    215 |     data="http://www.w3.org/Talks/Tools/Slidy2/graphics/w3c-logo-white.svg"><img
    216 |    src="http://www.w3.org/Talks/Tools/Slidy2/graphics/w3c-logo-white.gif" 
    217 |    alt="W3C logo" id="head-logo-fallback" /></object>
    218 | </div> 
    219 | 
    220 | 221 |

    This adds the logos on the top left and right corners of the 222 | slide.

    223 | 224 |

    You are of course welcome to create your own slide designs. 225 | You can provide different styles and backgrounds for 226 | different slides (more details later).

    227 | 228 |

    Use the meta element with name="copyright" 229 | for use in the slide show footer:

    230 | 231 |
    232 | <meta name="copyright" 
    233 | content="Copyright &#169; 2005-2009 W3C (MIT, ERCIM, Keio)" /> 
    234 | 
    235 |
    236 | 237 |
    238 |

    Upgrading from previous versions of Slidy

    239 | 240 | 264 |
    265 | 266 |
    267 |

    To use it off-line

    268 | 269 | 304 |
    305 | 306 |
    307 |

    Timing Your Presentation

    308 | 309 | 322 | 323 | 324 |
    325 | 326 |
    327 |

    Generate a Title Page

    328 | 329 |

    If you want a separate title page with the W3C blue style, the 330 | first slide should be as follows:

    331 | 332 |
    333 | <div class="slide cover"> 
    334 |  <img src="http://www.w3.org/Talks/Tools/Slidy2/graphics/keys.jpg" 
    335 |   alt="Cover page images (keys)" class="cover" /> 
    336 |  <br clear="all" />            
    337 |  <h1>HTML Slidy: Slide Shows in XHTML</h1> 
    338 |  <p><a href="http://www.w3.org/People/Raggett/">Dave Raggett,</a> 
    339 |  <a href="mailto:dsr@w3.org">dsr@w3.org</a></p> 
    340 | </div> 
    341 | 
    342 | 343 |

    The w3c-blue.css 345 | style sheet looks for the classes "slide" and "cover" on div 346 | and img elements using the CSS selector div.slide.cover

    347 | 348 |

    This technique can be used to assign your slides to different 349 | classes with a different appearence for each such class.

    350 | 351 |

    Slidy also allows you to use different background markup for 352 | different slides, based upon shared class names, as in "foo" below. 353 | Backgrounds without additional class names are always shown except 354 | when the slide isn't transparent. You may need to tweak your 355 | custom style sheet.

    356 | 357 |
    358 | <div class="background foo">
    359 |    ... background content ...
    360 | <div>
    361 | 
    362 | ...
    363 | 
    364 | <div class="slide foo">
    365 |    ... slide content ...
    366 | <div>
    367 | 
    368 |
    369 | 370 |
    371 |

    Incremental display of slide contents

    372 | 373 |

    For incremental display, use class="incremental", for 374 | instance:

    375 | 376 | 383 | 384 |

    which is marked up as follows:

    385 | 386 |
    387 | <ul class="incremental"> 
    388 |   <li>First bullet point</li> 
    389 |   <li>Second bullet point</li> 
    390 |   <li>Third bullet point</li> 
    391 | </ul> 
    392 |  
    393 | <p class="incremental">which is marked up as follows:</p> 
    394 |  
    395 | <pre class="incremental"> 
    396 |  ... 
    397 | </pre> 
    398 | 
    399 | 400 |
    401 |

    An element is incrementally revealed if its parent element has 402 | class="incremental" or if itself has that attribute. Text nodes are 403 | not elements and are revealed when their parent element is revealed. 404 | You can use class="incremental" on any element except for <br />. 405 | Use class="non-incremental" to override the effect of setting the 406 | parent element's class to incremental.

    407 | 408 |

    Note: you will see a red asterisk on the left of the toolbar 409 | when there is still something more to reveal.

    410 |
    411 |
    412 | 413 |
    414 |

    Create outline lists with hidden content

    415 | 416 |

    You can make your bullet points or numbered list items 417 | into outlines that you can expand or collapse

    418 | 419 | 453 | 454 |
    455 | <ol class='outline'>
    456 |   <!-- topic 1 starts collapsed -->
    457 |   <li>Topic 1
    458 |     <ol>
    459 |         <li>subtopic a</li>
    460 |         <li>subtopic b</li>
    461 |     </ol>
    462 |   </li>
    463 |   <!-- topic 2 starts expanded -->
    464 |   <li class="expand">Topic 2
    465 |     <ol>
    466 |         <li>subtopic c</li>
    467 |         <li>subtopic d</li>
    468 |     </ol>
    469 |   </li>
    470 | </ol>
    471 | 
    472 |
    473 | 474 | 475 |
    476 |

    Make your images scale with the browser window size

    477 | 478 |

    For adaptive layout, use percentage widths on images, together 479 | with CSS positioning:

    480 | 481 | 485 | 486 |
    487 | <div class="slide"> 
    488 |   <h1>Analysts - "Open standards programming will become 
    489 |   mainstream, focused around VoiceXML"</h1> 
    490 |   <!-- use CSS positioning and scaling for adaptive layout --> 
    491 |   <img src="trends.png" width="50%" style="float:left" 
    492 |    alt="projected growth of VoiceXML" /> 
    493 | 
    494 |   <blockquote style="float:right;width: 35%"> 
    495 |     VoiceXML will dominate the voice environment, due to its 
    496 |     flexibility and eventual multimodal capabilities 
    497 |   </blockquote><br clear="all" /> 
    498 |  
    499 |   <p style="text-align:center">Source Data Monitor, March 
    500 |   2004</p> 
    501 | </div> 
    502 | 
    503 | 504 |

    To work around a CSS rendering bug in IE relating 505 | to margins, you can set display:inline on floated elements.

    506 |
    507 | 508 |
    509 |

    Incremental display of layered images

    510 | 511 |

    These can be marked up using CSS relative positioning, e.g.

    512 | 513 |
    514 | <div class="incremental" 
    515 |  style="margin-left: 4em; position: relative"> 
    516 |   <img src="graphics/face1.gif" alt="face" 
    517 |    style="position: static; vertical-align: bottom"/> 
    518 |   <img src="graphics/face2.gif" alt="eyes" 
    519 |     style="position: absolute; left: 0; top: 0" /> 
    520 |   <img src="graphics/face3.gif" alt="nose" 
    521 |     style="position: absolute; left: 0; top: 0" /> 
    522 |   <img src="graphics/face4.gif" alt="mouth" 
    523 |     style="position: absolute; left: 0; top: 0" /> 
    524 | </div> 
    525 | 
    526 | 527 |

    You should also use transparent GIF 528 | images to avoid the IE/Win bug for alpha channel in PNG. A fix is 529 | expected in IE 7. A work around is 531 | available on skyzyx.com. My thanks to ACID2 for the 533 | graphics.

    534 | 535 |
    537 538 | eyes nose 541 | mouth
    543 |
    544 | 545 |
    546 |

    How to center content vertically and horizontally

    547 |
    548 |
    549 |

    Within the div element for your slide:

    550 |
    551 | <div class="vbox"></div>
    552 | <div class="hbox">
    553 | Place the content here
    554 | </div>
    555 | 
    556 |

    and style it with the following:

    557 |
    558 | div.vbox {
    559 |   float: left;
    560 |   height: 40%; width: 50%;
    561 |   margin-top: -220px;
    562 | }
    563 | div.hbox {
    564 |   width:60%;  margin-top: 0;
    565 |   margin-left:auto; margin-right:auto;
    566 |   height: 60%;
    567 |   border:1px solid silver;
    568 |   background:#F0F0F0;
    569 |   overflow:auto;
    570 |   text-align:left;
    571 |   clear:both;
    572 | }
    573 | 
    574 | 575 |

    The above styling is included in w3c-blue.css, 576 | which is designed to be used with slidy.css, but you 577 | are encouraged to develop your own style sheet with your own look and feel.

    578 |
    579 |
    580 | 581 |
    582 |

    Include SVG Content

    583 | 584 |

    Inclusion of SVG content can be done using the object element, 585 | for example:

    586 | 587 |
    Indian Office logo
    591 | 592 |

    has been achieved by:

    593 | 594 |
    595 | <object data="graphics/example.svg" type="image/svg+xml" 
    596 |   width="50%" height="10%" title="Indian Office logo"> 
    597 |     <img src="graphics/example.png" width="50%" 
    598 |           alt="Indian Office logo" /> 
    599 | </object> 
    600 | 
    601 | 602 |

    This ensures that the enclosed png is displayed when the browser 603 | has no plugin installed or can't display SVG directly. Providing 604 | such a fall back is very important! Don't forget the alt text for 605 | people who can't see the image.

    606 | 607 |

    However, there are caveats, see the next slide!

    608 |
    609 | 610 |
    611 |

    Caveats with SVG+object

    612 | 613 |

    Adobe has recently withdrawn support for its SVG Viewer, so you are 614 | recommended to consider alternatives. 616 | If you still using the Adobe SVG viewer you should be aware of bugs 617 | when using the it with IE, Namely:

    618 | 619 | 644 |
    645 | 646 |
    647 |

    Additional Remarks

    648 | 649 | 713 |
    714 | 715 |
    716 |

    Localization and automatic translation

    717 | 718 |

    Slidy now includes support for localization

    719 | 720 | "es":this.strings_es, 721 | "ca":this.strings_ca, 722 | "cs":this.strings_cs, 723 | "nl":this.strings_nl, 724 | "de":this.strings_de, 725 | "pl":this.strings_pl, 726 | "fr":this.strings_fr, 727 | "hu":this.strings_hu, 728 | "it":this.strings_it, 729 | "el":this.strings_el, 730 | "jp":this.strings_ja, 731 | "zh":this.strings_zh, 732 | "ru":this.strings_ru, 733 | "sv":this.strings_sv 734 | 735 | 748 |
    749 | // for each language there is an associative array
    750 |   strings_es: {
    751 |     "slide":"pág.",
    752 |     "help?":"Ayuda",
    753 |     "contents?":"Índice",
    754 |     "table of contents":"tabla de contenidos",
    755 |     "Table of Contents":"Tabla de Contenidos",
    756 |     "restart presentation":"Reiniciar presentación",
    757 |     "restart?":"Inicio"
    758 |   },
    759 |   help_es:
    760 |     "Utilice el ratón, barra espaciadora, teclas Izda/Dcha, " +
    761 |     "o Re pág y Av pág. Use S y B para cambiar el tamaño de fuente.",
    762 | 
    763 | 764 |

    Note: Slidy now works with current slides translated into French. Use 766 | right mouse button to open frame without Google header. To disable 767 | automatic translation of the content of particular elements add 768 | class="notranslate", see breaking the language barrier.

    769 |
    770 | 771 |
    772 |

    Future Plans

    773 | 774 |

    Recent additions have included a table of contents, and a way to 775 | hide and reveal content in the spirit of outline lists. The 776 | script has been rewritten to make it easier to combine with other 777 | scripts, e.g. for UI controls, and support swipes for navigation on 778 | touch screen devices. Further work is anticipated on the 779 | following:

    780 | 781 | 819 | 820 |

    If you have comments, suggestions for improvements, or would 821 | like to volunteer your help with further work on Slidy, 822 | please contact Dave Raggett <dsr@w3.org>

    825 |
    826 | 827 |
    828 |

    Acknowledgements

    829 | 830 | 855 | 856 |

    Note that while Slidy and 857 | S5 were developed independently, both support the use of the 858 | class values "slide" and "handout" for div elements. Slidy doesn't 859 | support the "layout" class featured in S5 and Opera Show, but 860 | instead provides a more flexible alternative with the "background" 861 | class, which enables different backgrounds on different slides.

    862 |
    863 | 864 |
    865 |

    Acknowledgements

    866 | 867 |

    The following people have contributed localizations:

    868 | 869 | 885 | 886 |

    The following people have contributed bug reports:

    887 | 888 | 906 | 907 |

    Douglas Crockford for jsmin 909 | which was used to minify the script before compressing it with gzip.

    910 |
    911 | 912 | 913 | -------------------------------------------------------------------------------- /nimdoc.out.css: -------------------------------------------------------------------------------- 1 | /* 2 | Stylesheet for use with Docutils/rst2html. 3 | 4 | See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to 5 | customize this style sheet. 6 | 7 | Modified from Chad Skeeters' rst2html-style 8 | https://bitbucket.org/cskeeters/rst2html-style/ 9 | 10 | Modified by Boyd Greenfield and narimiran 11 | */ 12 | 13 | :root { 14 | --primary-background: #fff; 15 | --secondary-background: ghostwhite; 16 | --third-background: #e8e8e8; 17 | --border: #dde; 18 | --text: #222; 19 | --anchor: #07b; 20 | --anchor-focus: #607c9f; 21 | --input-focus: #1fa0eb; 22 | --strong: #3c3c3c; 23 | --hint: #9A9A9A; 24 | --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN4AAAA9CAYAAADCt9ebAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgW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y0myNbNTPHPjxT5m0GTN15A/zVFiI+HKYzgc/ydMlrRfgmQWuYn0F91xJEQYxVuDnMcOrQAWJi2EI72ErQviwqLEQpQ+5XBEIqzi3YWLwF+BMiMcjshEqYR1Gdk1KmxBsaR9SQviSDdRFK8fxVU+YliWZmcbcq7vSFoQR/qJWvuxD0WgLDYoSzPzAqowtjVhORwDhEaKru4GPoliGgcyy4Hj0DLT4TBCo9WO88jQ8Bns97lLghvRTOfqqDiMYqrM+HyUYdBtaLykeRmlK12C9rQOh1FM1vd/HqUIzaT5e+LVoh/VxByHShs6HFaw0VjjHhTxP5d0LT+fRnu5q3HuAodlbHW02Q5cDByM+sw1642cRylCx6PeZiuTFScUFxK+f19QovaRS+t4tsasxhvABbZbSfUCV6CM7qtQl6Fm4E1U22UqcAYqvZ42fgJMxH6vdYc5nkBlSW6Pq4fbS6hb6jg0u9yGug7FyS5U1+UcVBbwbFSuMM1sQ1bXK4A9CcviqM0e9H80HdUxCpwIa4McygA/GfgAcCJqmGKKXUixupEv7nHsLc2agWNQ0d9OzC+PHNHIo1XeLCoe8kkqXiUtwKFoWXoEKqk3BpWLaC8cXsV8HT1J+tFTZKvn+DMqFZi1knvtyKg1O2lBHADcCVxEedNSAP4HJcsr0NNWHVUAAAAASUVORK5CYII="); 25 | 26 | --keyword: #5e8f60; 27 | --identifier: #222; 28 | --comment: #484a86; 29 | --operator: #155da4; 30 | --punctuation: black; 31 | --other: black; 32 | --escapeSequence: #c4891b; 33 | --number: #252dbe; 34 | --literal: #a4255b; 35 | --raw-data: #a4255b; 36 | } 37 | 38 | [data-theme="dark"] { 39 | --primary-background: #171921; 40 | --secondary-background: #1e202a; 41 | --third-background: #2b2e3b; 42 | --border: #0e1014; 43 | --text: #fff; 44 | --anchor: #8be9fd; 45 | --anchor-focus: #8be9fd; 46 | --input-focus: #8be9fd; 47 | --strong: #bd93f9; 48 | --hint: #7A7C85; 49 | --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEU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Vlubm7bXF1dgcFgABqNNvruglwuh7t374JMJoOOjo7P79y5I+ru7m7q7e1tXQi7MzOh8PIv4pCw2DdaWtte37Au7aPIyCWAxWABjUbPif9HCMbjURtKiaQBfvr5zH9evlJ0uLQ4r/nJMXNiZTIRrMAlJAcHB18HBweWo6Mjy8rKajeJRAJLS0uwtLQECwsLoFAogMfjAYvFgpmZ2XNXMyqVCoaHh2FoaAiGh4cfvwYGBqCvrw+6u7vfvnfvXlNvb29rT09Pq0QsUM7S6c4rNqS/lrZ5U+YPRBKR9M7u9xwqBUUvtNAudH766XSLE8PR49ixE78/8tVnX403Zk7fUR46NUUAIPIPCMdTKJTdNjY2QKPRgE6nA51OB1tbWyCRSIDD4YBAIAAejwcCgfDYUajVakGlUoFarQadTvfY79HX1wf9/f0gl8tBLpfDvXv3HvXw+dxQPYYXMj+d+P7Mmzv+5OHr6/OJWq1GBHeB09TcUiKuq/coKS3/eqIx/wPkiIXC3w6YjAAAAABJRU5ErkJggg=="); 50 | 51 | --keyword: #ff79c6; 52 | --identifier: #f8f8f2; 53 | --comment: #6272a4; 54 | --operator: #ff79c6; 55 | --punctuation: #f8f8f2; 56 | --other: #f8f8f2; 57 | --escapeSequence: #bd93f9; 58 | --number: #bd93f9; 59 | --literal: #f1fa8c; 60 | --raw-data: #8be9fd; 61 | } 62 | 63 | .theme-switch-wrapper { 64 | display: flex; 65 | align-items: center; 66 | 67 | em { 68 | margin-left: 10px; 69 | font-size: 1rem; 70 | } 71 | } 72 | .theme-switch { 73 | display: inline-block; 74 | height: 22px; 75 | position: relative; 76 | width: 50px; 77 | } 78 | 79 | .theme-switch input { 80 | display: none; 81 | } 82 | 83 | .slider { 84 | background-color: #ccc; 85 | bottom: 0; 86 | cursor: pointer; 87 | left: 0; 88 | position: absolute; 89 | right: 0; 90 | top: 0; 91 | transition: .4s; 92 | } 93 | 94 | .slider:before { 95 | background-color: #fff; 96 | bottom: 4px; 97 | content: ""; 98 | height: 13px; 99 | left: 4px; 100 | position: absolute; 101 | transition: .4s; 102 | width: 13px; 103 | } 104 | 105 | input:checked + .slider { 106 | background-color: #66bb6a; 107 | } 108 | 109 | input:checked + .slider:before { 110 | transform: translateX(26px); 111 | } 112 | 113 | .slider.round { 114 | border-radius: 17px; 115 | } 116 | 117 | .slider.round:before { 118 | border-radius: 50%; 119 | } 120 | 121 | html { 122 | font-size: 100%; 123 | -webkit-text-size-adjust: 100%; 124 | -ms-text-size-adjust: 100%; } 125 | 126 | body { 127 | font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; 128 | font-weight: 400; 129 | font-size: 1.125em; 130 | line-height: 1.5; 131 | color: var(--text); 132 | background-color: var(--primary-background); } 133 | 134 | /* Skeleton grid */ 135 | .container { 136 | position: relative; 137 | width: 100%; 138 | max-width: 1050px; 139 | margin: 0 auto; 140 | padding: 0; 141 | box-sizing: border-box; } 142 | 143 | .column, 144 | .columns { 145 | width: 100%; 146 | float: left; 147 | box-sizing: border-box; 148 | margin-left: 1%; 149 | } 150 | 151 | .column:first-child, 152 | .columns:first-child { 153 | margin-left: 0; } 154 | 155 | .three.columns { 156 | width: 19%; } 157 | 158 | .nine.columns { 159 | width: 80.0%; } 160 | 161 | .twelve.columns { 162 | width: 100%; 163 | margin-left: 0; } 164 | 165 | @media screen and (max-width: 860px) { 166 | .three.columns { 167 | display: none; 168 | } 169 | .nine.columns { 170 | width: 98.0%; 171 | } 172 | body { 173 | font-size: 1em; 174 | line-height: 1.35; 175 | } 176 | } 177 | 178 | cite { 179 | font-style: italic !important; } 180 | 181 | 182 | /* Nim search input */ 183 | div#searchInputDiv { 184 | margin-bottom: 1em; 185 | } 186 | input#searchInput { 187 | width: 80%; 188 | } 189 | 190 | /* 191 | * Some custom formatting for input forms. 192 | * This also fixes input form colors on Firefox with a dark system theme on Linux. 193 | */ 194 | input { 195 | -moz-appearance: none; 196 | background-color: var(--secondary-background); 197 | color: var(--text); 198 | border: 1px solid var(--border); 199 | font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; 200 | font-size: 0.9em; 201 | padding: 6px; 202 | } 203 | 204 | input:focus { 205 | border: 1px solid var(--input-focus); 206 | box-shadow: 0 0 3px var(--input-focus); 207 | } 208 | 209 | select { 210 | -moz-appearance: none; 211 | background-color: var(--secondary-background); 212 | color: var(--text); 213 | border: 1px solid var(--border); 214 | font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; 215 | font-size: 0.9em; 216 | padding: 6px; 217 | } 218 | 219 | select:focus { 220 | border: 1px solid var(--input-focus); 221 | box-shadow: 0 0 3px var(--input-focus); 222 | } 223 | 224 | /* Docgen styles */ 225 | /* Links */ 226 | a { 227 | color: var(--anchor); 228 | text-decoration: none; 229 | } 230 | 231 | a span.Identifier { 232 | text-decoration: underline; 233 | text-decoration-color: #aab; 234 | } 235 | 236 | a.reference-toplevel { 237 | font-weight: bold; 238 | } 239 | 240 | a.toc-backref { 241 | text-decoration: none; 242 | color: var(--text); } 243 | 244 | a.link-seesrc { 245 | color: #607c9f; 246 | font-size: 0.9em; 247 | font-style: italic; } 248 | 249 | a:hover, 250 | a:focus { 251 | color: var(--anchor-focus); 252 | text-decoration: underline; } 253 | 254 | a:hover span.Identifier { 255 | color: var(--anchor); 256 | } 257 | 258 | 259 | sub, 260 | sup { 261 | position: relative; 262 | font-size: 75%; 263 | line-height: 0; 264 | vertical-align: baseline; } 265 | 266 | sup { 267 | top: -0.5em; } 268 | 269 | sub { 270 | bottom: -0.25em; } 271 | 272 | img { 273 | width: auto; 274 | height: auto; 275 | max-width: 100%; 276 | vertical-align: middle; 277 | border: 0; 278 | -ms-interpolation-mode: bicubic; } 279 | 280 | @media print { 281 | * { 282 | color: black !important; 283 | text-shadow: none !important; 284 | background: transparent !important; 285 | box-shadow: none !important; } 286 | 287 | a, 288 | a:visited { 289 | text-decoration: underline; } 290 | 291 | a[href]:after { 292 | content: " (" attr(href) ")"; } 293 | 294 | abbr[title]:after { 295 | content: " (" attr(title) ")"; } 296 | 297 | .ir a:after, 298 | a[href^="javascript:"]:after, 299 | a[href^="#"]:after { 300 | content: ""; } 301 | 302 | pre, 303 | blockquote { 304 | border: 1px solid #999; 305 | page-break-inside: avoid; } 306 | 307 | thead { 308 | display: table-header-group; } 309 | 310 | tr, 311 | img { 312 | page-break-inside: avoid; } 313 | 314 | img { 315 | max-width: 100% !important; } 316 | 317 | @page { 318 | margin: 0.5cm; } 319 | 320 | h1 { 321 | page-break-before: always; } 322 | 323 | h1.title { 324 | page-break-before: avoid; } 325 | 326 | p, 327 | h2, 328 | h3 { 329 | orphans: 3; 330 | widows: 3; } 331 | 332 | h2, 333 | h3 { 334 | page-break-after: avoid; } 335 | } 336 | 337 | 338 | p { 339 | margin-top: 0.5em; 340 | margin-bottom: 0.5em; 341 | } 342 | 343 | small { 344 | font-size: 85%; } 345 | 346 | strong { 347 | font-weight: 600; 348 | font-size: 0.95em; 349 | color: var(--strong); 350 | } 351 | 352 | em { 353 | font-style: italic; } 354 | 355 | h1 { 356 | font-size: 1.8em; 357 | font-weight: 400; 358 | padding-bottom: .25em; 359 | border-bottom: 6px solid var(--third-background); 360 | margin-top: 2.5em; 361 | margin-bottom: 1em; 362 | line-height: 1.2em; } 363 | 364 | h1.title { 365 | padding-bottom: 1em; 366 | border-bottom: 0px; 367 | font-size: 2.5em; 368 | text-align: center; 369 | font-weight: 900; 370 | margin-top: 0.75em; 371 | margin-bottom: 0em; 372 | } 373 | 374 | h2 { 375 | font-size: 1.3em; 376 | margin-top: 2em; } 377 | 378 | h2.subtitle { 379 | text-align: center; } 380 | 381 | h3 { 382 | font-size: 1.125em; 383 | font-style: italic; 384 | margin-top: 1.5em; } 385 | 386 | h4 { 387 | font-size: 1.125em; 388 | margin-top: 1em; } 389 | 390 | h5 { 391 | font-size: 1.125em; 392 | margin-top: 0.75em; } 393 | 394 | h6 { 395 | font-size: 1.1em; } 396 | 397 | 398 | ul, 399 | ol { 400 | padding: 0; 401 | margin-top: 0.5em; 402 | margin-left: 0.75em; } 403 | 404 | ul ul, 405 | ul ol, 406 | ol ol, 407 | ol ul { 408 | margin-bottom: 0; 409 | margin-left: 1.25em; } 410 | 411 | li { 412 | list-style-type: circle; 413 | } 414 | 415 | ul.simple-boot li { 416 | list-style-type: none; 417 | margin-left: 0em; 418 | margin-bottom: 0.5em; 419 | } 420 | 421 | ol.simple > li, ul.simple > li { 422 | margin-bottom: 0.25em; 423 | margin-left: 0.4em } 424 | 425 | ul.simple.simple-toc > li { 426 | margin-top: 1em; 427 | } 428 | 429 | ul.simple-toc { 430 | list-style: none; 431 | font-size: 0.9em; 432 | margin-left: -0.3em; 433 | margin-top: 1em; } 434 | 435 | ul.simple-toc > li { 436 | list-style-type: none; 437 | } 438 | 439 | ul.simple-toc-section { 440 | list-style-type: circle; 441 | margin-left: 1em; 442 | color: #6c9aae; } 443 | 444 | 445 | ol.arabic { 446 | list-style: decimal; } 447 | 448 | ol.loweralpha { 449 | list-style: lower-alpha; } 450 | 451 | ol.upperalpha { 452 | list-style: upper-alpha; } 453 | 454 | ol.lowerroman { 455 | list-style: lower-roman; } 456 | 457 | ol.upperroman { 458 | list-style: upper-roman; } 459 | 460 | ul.auto-toc { 461 | list-style-type: none; } 462 | 463 | 464 | dl { 465 | margin-bottom: 1.5em; } 466 | 467 | dt { 468 | margin-bottom: -0.5em; 469 | margin-left: 0.0em; } 470 | 471 | dd { 472 | margin-left: 2.0em; 473 | margin-bottom: 3.0em; 474 | margin-top: 0.5em; } 475 | 476 | 477 | hr { 478 | margin: 2em 0; 479 | border: 0; 480 | border-top: 1px solid #aaa; } 481 | 482 | blockquote { 483 | font-size: 0.9em; 484 | font-style: italic; 485 | padding-left: 0.5em; 486 | margin-left: 0; 487 | border-left: 5px solid #bbc; 488 | } 489 | 490 | .pre { 491 | font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; 492 | font-weight: 500; 493 | font-size: 0.85em; 494 | color: var(--text); 495 | background-color: var(--third-background); 496 | padding-left: 3px; 497 | padding-right: 3px; 498 | border-radius: 4px; 499 | } 500 | 501 | pre { 502 | font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; 503 | color: var(--text); 504 | font-weight: 500; 505 | display: inline-block; 506 | box-sizing: border-box; 507 | min-width: 100%; 508 | padding: 0.5em; 509 | margin-top: 0.5em; 510 | margin-bottom: 0.5em; 511 | font-size: 0.85em; 512 | white-space: pre !important; 513 | overflow-y: hidden; 514 | overflow-x: visible; 515 | background-color: var(--secondary-background); 516 | border: 1px solid var(--border); 517 | -webkit-border-radius: 6px; 518 | -moz-border-radius: 6px; 519 | border-radius: 6px; } 520 | 521 | .pre-scrollable { 522 | max-height: 340px; 523 | overflow-y: scroll; } 524 | 525 | 526 | /* Nim line-numbered tables */ 527 | .line-nums-table { 528 | width: 100%; 529 | table-layout: fixed; } 530 | 531 | table.line-nums-table { 532 | border-radius: 4px; 533 | border: 1px solid #cccccc; 534 | background-color: ghostwhite; 535 | border-collapse: separate; 536 | margin-top: 15px; 537 | margin-bottom: 25px; } 538 | 539 | .line-nums-table tbody { 540 | border: none; } 541 | 542 | .line-nums-table td pre { 543 | border: none; 544 | background-color: transparent; } 545 | 546 | .line-nums-table td.blob-line-nums { 547 | width: 28px; } 548 | 549 | .line-nums-table td.blob-line-nums pre { 550 | color: #b0b0b0; 551 | -webkit-filter: opacity(75%); 552 | text-align: right; 553 | border-color: transparent; 554 | background-color: transparent; 555 | padding-left: 0px; 556 | margin-left: 0px; 557 | padding-right: 0px; 558 | margin-right: 0px; } 559 | 560 | 561 | table { 562 | max-width: 100%; 563 | background-color: transparent; 564 | margin-top: 0.5em; 565 | margin-bottom: 1.5em; 566 | border-collapse: collapse; 567 | border-color: var(--third-background); 568 | border-spacing: 0; 569 | font-size: 0.9em; 570 | } 571 | 572 | table th, table td { 573 | padding: 0px 0.5em 0px; 574 | border-color: var(--third-background); 575 | } 576 | 577 | table th { 578 | background-color: var(--third-background); 579 | border-color: var(--third-background); 580 | font-weight: bold; } 581 | 582 | table th.docinfo-name { 583 | background-color: transparent; 584 | } 585 | 586 | table tr:hover { 587 | background-color: var(--third-background); } 588 | 589 | 590 | /* rst2html default used to remove borders from tables and images */ 591 | .borderless, table.borderless td, table.borderless th { 592 | border: 0; } 593 | 594 | table.borderless td, table.borderless th { 595 | /* Override padding for "table.docutils td" with "! important". 596 | The right padding separates the table cells. */ 597 | padding: 0 0.5em 0 0 !important; } 598 | 599 | .first { 600 | /* Override more specific margin styles with "! important". */ 601 | margin-top: 0 !important; } 602 | 603 | .last, .with-subtitle { 604 | margin-bottom: 0 !important; } 605 | 606 | .hidden { 607 | display: none; } 608 | 609 | blockquote.epigraph { 610 | margin: 2em 5em; } 611 | 612 | dl.docutils dd { 613 | margin-bottom: 0.5em; } 614 | 615 | object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { 616 | overflow: hidden; } 617 | 618 | 619 | div.figure { 620 | margin-left: 2em; 621 | margin-right: 2em; } 622 | 623 | div.footer, div.header { 624 | clear: both; 625 | text-align: center; 626 | color: #666; 627 | font-size: smaller; } 628 | 629 | div.footer { 630 | padding-top: 5em; 631 | } 632 | 633 | div.line-block { 634 | display: block; 635 | margin-top: 1em; 636 | margin-bottom: 1em; } 637 | 638 | div.line-block div.line-block { 639 | margin-top: 0; 640 | margin-bottom: 0; 641 | margin-left: 1.5em; } 642 | 643 | div.topic { 644 | margin: 2em; } 645 | 646 | div.search_results { 647 | background-color: antiquewhite; 648 | margin: 3em; 649 | padding: 1em; 650 | border: 1px solid #4d4d4d; 651 | } 652 | 653 | div#global-links ul { 654 | margin-left: 0; 655 | list-style-type: none; 656 | } 657 | 658 | div#global-links > simple-boot { 659 | margin-left: 3em; 660 | } 661 | 662 | hr.docutils { 663 | width: 75%; } 664 | 665 | img.align-left, .figure.align-left, object.align-left { 666 | clear: left; 667 | float: left; 668 | margin-right: 1em; } 669 | 670 | img.align-right, .figure.align-right, object.align-right { 671 | clear: right; 672 | float: right; 673 | margin-left: 1em; } 674 | 675 | img.align-center, .figure.align-center, object.align-center { 676 | display: block; 677 | margin-left: auto; 678 | margin-right: auto; } 679 | 680 | .align-left { 681 | text-align: left; } 682 | 683 | .align-center { 684 | clear: both; 685 | text-align: center; } 686 | 687 | .align-right { 688 | text-align: right; } 689 | 690 | /* reset inner alignment in figures */ 691 | div.align-right { 692 | text-align: inherit; } 693 | 694 | p.attribution { 695 | text-align: right; 696 | margin-left: 50%; } 697 | 698 | p.caption { 699 | font-style: italic; } 700 | 701 | p.credits { 702 | font-style: italic; 703 | font-size: smaller; } 704 | 705 | p.label { 706 | white-space: nowrap; } 707 | 708 | p.rubric { 709 | font-weight: bold; 710 | font-size: larger; 711 | color: maroon; 712 | text-align: center; } 713 | 714 | p.topic-title { 715 | font-weight: bold; } 716 | 717 | pre.address { 718 | margin-bottom: 0; 719 | margin-top: 0; 720 | font: inherit; } 721 | 722 | pre.literal-block, pre.doctest-block, pre.math, pre.code { 723 | margin-left: 2em; 724 | margin-right: 2em; } 725 | 726 | pre.code .ln { 727 | color: grey; } 728 | 729 | /* line numbers */ 730 | pre.code, code { 731 | background-color: #eeeeee; } 732 | 733 | pre.code .comment, code .comment { 734 | color: #5c6576; } 735 | 736 | pre.code .keyword, code .keyword { 737 | color: #3B0D06; 738 | font-weight: bold; } 739 | 740 | pre.code .literal.string, code .literal.string { 741 | color: #0c5404; } 742 | 743 | pre.code .name.builtin, code .name.builtin { 744 | color: #352b84; } 745 | 746 | pre.code .deleted, code .deleted { 747 | background-color: #DEB0A1; } 748 | 749 | pre.code .inserted, code .inserted { 750 | background-color: #A3D289; } 751 | 752 | span.classifier { 753 | font-style: oblique; } 754 | 755 | span.classifier-delimiter { 756 | font-weight: bold; } 757 | 758 | span.option { 759 | white-space: nowrap; } 760 | 761 | span.problematic { 762 | color: #b30000; } 763 | 764 | span.section-subtitle { 765 | /* font-size relative to parent (h1..h6 element) */ 766 | font-size: 80%; } 767 | 768 | span.DecNumber { 769 | color: var(--number); } 770 | 771 | span.BinNumber { 772 | color: var(--number); } 773 | 774 | span.HexNumber { 775 | color: var(--number); } 776 | 777 | span.OctNumber { 778 | color: var(--number); } 779 | 780 | span.FloatNumber { 781 | color: var(--number); } 782 | 783 | span.Identifier { 784 | color: var(--identifier); } 785 | 786 | span.Keyword { 787 | font-weight: 600; 788 | color: var(--keyword); } 789 | 790 | span.StringLit { 791 | color: var(--literal); } 792 | 793 | span.LongStringLit { 794 | color: var(--literal); } 795 | 796 | span.CharLit { 797 | color: var(--literal); } 798 | 799 | span.EscapeSequence { 800 | color: var(--escapeSequence); } 801 | 802 | span.Operator { 803 | color: var(--operator); } 804 | 805 | span.Punctuation { 806 | color: var(--punctuation); } 807 | 808 | span.Comment, span.LongComment { 809 | font-style: italic; 810 | font-weight: 400; 811 | color: var(--comment); } 812 | 813 | span.RegularExpression { 814 | color: darkviolet; } 815 | 816 | span.TagStart { 817 | color: darkviolet; } 818 | 819 | span.TagEnd { 820 | color: darkviolet; } 821 | 822 | span.Key { 823 | color: #252dbe; } 824 | 825 | span.Value { 826 | color: #252dbe; } 827 | 828 | span.RawData { 829 | color: var(--raw-data); } 830 | 831 | span.Assembler { 832 | color: #252dbe; } 833 | 834 | span.Preprocessor { 835 | color: #252dbe; } 836 | 837 | span.Directive { 838 | color: #252dbe; } 839 | 840 | span.Command, span.Rule, span.Hyperlink, span.Label, span.Reference, 841 | span.Other { 842 | color: var(--other); } 843 | 844 | /* Pop type, const, proc, and iterator defs in nim def blocks */ 845 | dt pre > span.Identifier, dt pre > span.Operator { 846 | color: var(--identifier); 847 | font-weight: 700; } 848 | 849 | dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier, 850 | dt pre > span.Operator ~ span.Identifier, dt pre > span.Other ~ span.Identifier { 851 | color: var(--identifier); 852 | font-weight: inherit; } 853 | 854 | /* Nim sprite for the footer (taken from main page favicon) */ 855 | .nim-sprite { 856 | display: inline-block; 857 | width: 51px; 858 | height: 14px; 859 | background-position: 0 0; 860 | background-size: 51px 14px; 861 | -webkit-filter: opacity(50%); 862 | background-repeat: no-repeat; 863 | background-image: var(--nim-sprite-base64); 864 | margin-bottom: 5px; } 865 | 866 | span.pragmadots { 867 | /* Position: relative frees us up to make the dots 868 | look really nice without fucking up the layout and 869 | causing bulging in the parent container */ 870 | position: relative; 871 | /* 1px down looks slightly nicer */ 872 | top: 1px; 873 | padding: 2px; 874 | background-color: var(--third-background); 875 | border-radius: 4px; 876 | margin: 0 2px; 877 | cursor: pointer; 878 | font-size: 0.8em; 879 | } 880 | 881 | span.pragmadots:hover { 882 | background-color: var(--hint); 883 | } 884 | span.pragmawrap { 885 | display: none; 886 | } 887 | 888 | span.attachedType { 889 | display: none; 890 | visibility: hidden; 891 | } --------------------------------------------------------------------------------