<style type="text/css"> * { tab-size: 4; } /* Resets & overrides */ .reveal dl { display: block; } .reveal pre { width: auto; box-shadow: none; } .reveal pre code { width: auto; max-height: initial; } .reveal blockquote { width: auto; } .reveal .slides .pdf-page { pointer-events: initial; } .reveal .slides { text-align: left; } /* Font style defs */ html, .reveal { font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; } .reveal pre code { font-family: "PTM55F", "Monaco", monospace; } /* Color defs */ .reveal pre code { background: #2d2d2d; } /* Backgrounds */ .reveal .slide-background-content { background-color: #222; } .reveal .first .slide-background-content { background-color: #222; } .reveal section { background-color: #333; background-size: cover; background-image: url(https://slides.hb.bizmrg.com/tarantool/dark/page.png); } .reveal .slides section h1, .reveal .slides section h2, .reveal .slides section h3, .reveal .slides section h4, .reveal .slides section h5, .reveal .slides section h6{ background: rgba(0,0,0,0.25); } /* Font-sizes */ html { font-size: 32px; } .reveal { font-size: 1rem; } .reveal .slides section h1, .reveal .slides section h2, .reveal .slides section h3, .reveal .slides section h4, .reveal .slides section h5, .reveal .slides section h6{ font-size: 40px; } /* .reveal .slides section h1 { font-size: 42px } .reveal .slides section h2 { font-size: 40px } .reveal .slides section h3 { font-size: 38px } .reveal .slides section h4 { font-size: 36px } .reveal .slides section h5 { font-size: 34px } .reveal .slides section h6 { font-size: 32px } */ .reveal pre { font-size: 24px; line-height: 1.11; } .reveal pre code { font-size: inherit; } .reveal blockquote { font-size: 28px; } /* Paddings */ .reveal .slides section { width: 960px; height: 540px; } .reveal .slides > section, .reveal .slides > section > section { padding: 20px; } .reveal .slides > section > section { margin: 0 -20px; } .reveal .slides section h1, .reveal .slides section h2, .reveal .slides section h3, .reveal .slides section h4, .reveal .slides section h5, .reveal .slides section h6{ margin: -5px -20px 15px -20px; padding: 5px 20px; } .reveal dl { margin: 0; } .reveal dd { margin-bottom: 0.25em; } .reveal pre { margin: 10px -20px 20px -20px; padding: 0; } .reveal pre code { padding: 10px 20px; } .reveal blockquote { margin: 20px -20px 20px -20px; padding: 0; } .reveal blockquote > p { margin: 0 0 0 40px; padding: 0 0 0 5px; } /*** Helpers ***/ .reveal .slides section.center.present { display: grid !important; align-items: center; } .lr { display:grid; grid-gap: 0 50px; grid-template-columns: 1fr 1fr; } section.only-code pre { position: absolute; top: 10px; bottom: 10px; left: 0; right: 0; margin: 0; } section.only-code pre code { height: 100%; } /*** Modding ***/ .reveal .slides section .fragment.current-only { opacity: 1; visibility: visible; display: none; } .reveal .slides section .fragment.current-only.current-fragment { display: block; } .reveal .slides section li.fragment.current-only.current-fragment { display: list-item; } .reveal .slides section span.fragment.current-only.current-fragment { display: inline; } .reveal .slides section .fragment.visible-blurred { opacity: 1; visibility: visible; filter: blur(2px); } .reveal .slides section .fragment.visible-blurred.visible { filter: none; } .reveal .slides section .fragment.visible-blurred.visible.current-fragment { filter: none; text-shadow: 2px 2px #676767; } /*** Stylings ***/ dd { font-style: italic; } dd * { font-style: initial; } .reveal pre code { overflow: hidden; } .reveal blockquote > p { border-left: solid #333 10px; } .reveal .slides section { overflow: hidden; } section.first *[data-title] { position: absolute; left : 0; bottom: 0px; } .reveal .slides section.first h1 { margin-top: 25px; background: none; } .reveal .slides section.first h2 { background: none; } section.first .author { position: absolute; left : 20px; bottom: 20px; } </style> <!-- .slide: class="first" --> # Title slide ## Slides main subtitle <address class="author"> Mons <br/> Well Known Solutions </address> --- # Theme1 title h1 ## Theme1 title h2 ### Theme1 title h3 #### Theme1 title h4 Common text `some_function` other text Common text Common text ---- ## Go down We need to go deeper * List item * List item * Subitem * Subitem * List item ---- ## ... and down deeper... deeper... deeper... deeper... deeper... deeper... deeper... deeper... deeper... deeper... deeper... deeper... deeper... > We need to go deeper > We need to go deeper --- <div class="lr"> <div class="fragment" data-fragment-index="1"> ```lua function sample() print "Lua" end ``` </div> <div class="fragment" data-fragment-index="2"> ``` function sample() print "Lua" end ``` </div> </div> # Show code fragments... <div class="lr"> <div class="l fragment" data-fragment-index="3"> ```lua function sample() print "Lua" end ``` </div> <div class="r fragment" data-fragment-index="1"> ```lua function sample() print "Lua" end ``` </div> </div> ```lua tarantool> box.space.tester:auto_increment{'Fld#1', 'Fld#2'} --- - [1, 'Fld#1', 'Fld#2'] ... ``` --- # Just 2-col code, no fragments <div class="lr"> ```lua function sample() print "Lua" end ``` ``` function sample() print "Non-highlighted" end ``` </div> <div class="lr"> # aaaa # bbb </div> --- # Code Slide PTM55 ```lua tarantool> box.space.tester:auto_increment{'Fld#1', 'Fld#2'} --- - [1, 'Fld#1', 'Fld#2'] ... tarantool> box.space.tester:auto_increment{'Fld#3'} --- - [2, 'Fld#3'] ... tarantool> box.space.tester:auto_increment{'Fld#3'} --- - [2, 'Fld#3'] ... ``` [PTM55 Font](https://hb.bizmrg.com/slides/fonts/PTM55F.ttf) --- <!-- .slide: class="only-code" --> ```lua tarantool> box.space.tester:auto_increment{'Fld#1', 'Fld#2'} --- - [1, 'Fld#1', 'Fld#2'] ... tarantool> box.space.tester:auto_increment{'Fld#3'} --- - [2, 'Fld#3'] ... tarantool> box.space.tester:auto_increment{'Fld#1', 'Fld#2'} --- - [1, 'Fld#1', 'Fld#2'] ... tarantool> box.space.tester:auto_increment{'Fld#3'} --- - [2, 'Fld#3'] ... ``` --- # Fragmented bullets * List item 1 <!-- .element: class="fragment" --> * List item 2 <!-- .element: class="fragment" --> * List item 3 <!-- .element: class="fragment" --> --- # Reverse fragmented bullets * List item 3 <!-- .element: class="fragment" data-fragment-index="4" --> * List item 2 <!-- .element: class="fragment" data-fragment-index="3" --> * List item 1 <!-- .element: class="fragment" data-fragment-index="2" --> --- # Fragmented with replacement > We could use replacing fragments > (by adding class `current-only`): * Some fragment 1 <!-- .element: class="fragment current-only" --> * Some fragment 2 <!-- .element: class="fragment current-only" --> * Some fragment 3 <!-- .element: class="fragment current-only" --> --- # Code Highlight > To highlight code part, use HTML markup `<pre><code class="hljs">` and `<mark>` for highlighting ```lua function sample() <mark>print "Lua"</mark> # no highlight end ``` <pre><code class="lua hljs">function sample() print <mark>"Lua"</mark> <mark>print "Lua"</mark> <mark class="line"> print "Lua"</mark> end </code></pre> --- # Code Highlight <pre><code class="hljs html raw">&lt;pre>&lt;code class="lua hljs">function sample() &lt;mark>print "Lua"&lt;/mark> end &lt;/code>&lt;/pre></code></pre> will render into <pre><code class="lua hljs">function sample() <mark>print "Lua"</mark> end </code></pre> --- # Highlights Text could be fragmentarely highlighted with <span class="fragment highlight-red">highlight-red</span>, <span class="fragment highlight-green">highlight-green</span> and <span class="fragment highlight-blue">highlight-blue</span> Also highlight may be temporary with <span class="fragment highlight-current-red">highlight-current-red</span>, <span class="fragment highlight-current-green">highlight-current-green</span> and <span class="fragment highlight-current-blue">highlight-current-blue</span> <div class="fragment"> ```html <span class="fragment highlight-red">highlight-red</span> <span class="fragment highlight-current-red"> highlight-current-red</span> ``` </div> --- <!-- .slide: class="only-code" --> <!-- Code block fragmented --> <pre class="stretch"><code> function get_all_factors(number) <span class="fragment highlight-current-red" data-fragment-index="1"> <span class="fragment highlight-current-green" data-fragment-index="2">--[[</span>-- Multiline comments <span class="fragment current-only" data-fragment-index="2">(only those are required)</span> --<span class="fragment highlight-current-green" data-fragment-index="2">]]</span>-- </span> local factors = {}<span class="fragment highlight-current-red" data-fragment-index="1"></span> <span class="fragment highlight-current-green" data-fragment-index="3">for</span> possible_factor=1, math.sqrt(number), 1 do local remainder = number % possible_factor if remainder == 0 then <span class="fragment visible-blurred" data-fragment-index="4"> local factor, factor_pair = possible_factor, number/possible_factor table.insert(factors, factor) if factor ~= factor_pair then table.insert(factors, factor_pair) end </span> end <span class="fragment highlight-current-green" data-fragment-index="3">end</span> <span class="fragment current-only" data-fragment-index="3"><i> -- end of for loop</i></span> table.sort(factors) return factors end<span class="fragment highlight-current-green" data-fragment-index="4"></span> </code></pre> --- <!-- .slide: class="center" --> > All those things was done by hands --- <!-- .slide: class="center" --> ```lua function test() print "Lua" end ``` ```lua function test() print "Lua" end ``` --- | Ограничение | Значение | |------------------------------|--------------------------------| | Соединений | определяется OC | | Размер спейса | `memtx_memory` | | Обновлений тапла | 4000 (`BOX_UPDATE_OP_CNT_MAX`) | | Пользователей | 32 (`BOX_USERS_MAX`) | | Длина имен | 65000 (`NAME_MAX`) | | Реплик | 32 (`VCLOCK_MAX`) | --- # Условные переменные `fiber.cond()` : Создание новой условной переменной ```lua condition = fiber.cond() ``` `cond:wait()` : Перевод файбера в режим ожидания <div> <pre><code>racer = function() <span class="fragment highlight-current-red" data-fragment-index="1">condition:wait()</span> print("Fiber "..fiber.self().id().." passed") end </code></pre> </div> Note: - `fiber.cond()` Создание новой условной переменной. Возвращает `cond_object`. - `cond_object:wait([timeout])` Перевод файбера в режим ожидания, пока другой файбер не выполнит `cond_object:signal()` или `cond_object:broadcast()` от той же переменной. --- # Условные переменные - `fiber.cond()` Создание новой условной переменной ```lua lpad condition = fiber.cond() ``` - `cond:wait()` Перевод файбера в режим ожидания <div> <pre><code class="hljs" data-trim>racer = function() <span class="fragment highlight-current-red" data-fragment-index="1">condition:wait()</span> print("Fiber "..fiber.self().id().." passed") end </code></pre> </div> --- # 3 code blocks ```lua= racer = function() condition:wait() print("Fiber "..fiber.self().id().." passed") end ``` ```lua= racer = function() condition:wait() print("Fiber "..fiber.self().id().." passed") end ``` ```lua= racer = function() condition:wait() print("Fiber "..fiber.self().id().." passed") end ``` > To do numerated code block, set `=` after language
{"metaMigratedAt":"2023-06-15T03:39:46.722Z","metaMigratedFrom":"YAML","title":"Tarantool Dark Template","breaks":true,"description":"View the slide with \"Slide Mode\".","slideOptions":"{\"theme\":\"dark\",\"transition\":\"none\",\"backgroundTransition\":\"none\",\"width\":960,\"height\":540,\"margin\":0}","contributors":"[{\"id\":\"a0a8bc96-cb96-423a-bc3a-047e002864e2\",\"add\":25947,\"del\":13799}]"}
    1501 views
   Owned this note