Skip to content

Commit

Permalink
Automated deployment: Fri Nov 27 12:29:50 UTC 2020 a5d98b5
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Nov 27, 2020
0 parents commit 9774d44
Show file tree
Hide file tree
Showing 74 changed files with 28,811 additions and 0 deletions.
294 changes: 294 additions & 0 deletions advanced-generics-bounds.html

Large diffs are not rendered by default.

518 changes: 518 additions & 0 deletions assignments/async-mailbox.html

Large diffs are not rendered by default.

1,015 changes: 1,015 additions & 0 deletions assignments/calc.html

Large diffs are not rendered by default.

810 changes: 810 additions & 0 deletions assignments/connected-mailbox.html

Large diffs are not rendered by default.

773 changes: 773 additions & 0 deletions assignments/durable-file.html

Large diffs are not rendered by default.

840 changes: 840 additions & 0 deletions assignments/fizzbuzz.html

Large diffs are not rendered by default.

689 changes: 689 additions & 0 deletions assignments/library-client.html

Large diffs are not rendered by default.

812 changes: 812 additions & 0 deletions assignments/multithreaded-mailbox.html

Large diffs are not rendered by default.

1,111 changes: 1,111 additions & 0 deletions assignments/redisish.html

Large diffs are not rendered by default.

873 changes: 873 additions & 0 deletions assignments/result-option-assignment.html

Large diffs are not rendered by default.

766 changes: 766 additions & 0 deletions assignments/simple-chat.html

Large diffs are not rendered by default.

736 changes: 736 additions & 0 deletions assignments/tcp-client.html

Large diffs are not rendered by default.

774 changes: 774 additions & 0 deletions assignments/tcp-echo-server.html

Large diffs are not rendered by default.

773 changes: 773 additions & 0 deletions assignments/terrarium-http.html

Large diffs are not rendered by default.

496 changes: 496 additions & 0 deletions assignments/terrarium-kv.html

Large diffs are not rendered by default.

788 changes: 788 additions & 0 deletions assignments/terrarium-serde.html

Large diffs are not rendered by default.

294 changes: 294 additions & 0 deletions async-await.html

Large diffs are not rendered by default.

319 changes: 319 additions & 0 deletions async-building-blocks.html

Large diffs are not rendered by default.

242 changes: 242 additions & 0 deletions async-component-interaction.html

Large diffs are not rendered by default.

231 changes: 231 additions & 0 deletions async-growth-handling.html
@@ -0,0 +1,231 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Async: Avoiding disaster and unbounded growth</title><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui" name="viewport"><link href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/css/reveal.css" rel="stylesheet"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/css/theme/simple.css" id="theme"><!--This CSS is generated by the Asciidoctor-Reveal.js converter to further integrate AsciiDoc's existing semantic with Reveal.js--><style type="text/css">.reveal div.right {
float: right;
}

.reveal .listingblock.stretch > .content {
height: 100%;
}

.reveal .listingblock.stretch > .content > pre {
height: 100%;
}

.reveal .listingblock.stretch > .content > pre > code {
height: 100%;
max-height: 100%;
}

/* tables */
table{border-collapse:collapse;border-spacing:0}
table{margin-bottom:1.25em;border:solid 1px #dedede}
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;text-align:left}
table tr th,table tr td{padding:.5625em .625em;font-size:inherit}
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
td.tableblock>.content{margin-bottom:1.25em}
td.tableblock>.content>:last-child{margin-bottom:-1.25em}
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}
table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}
table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}
table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}
table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}
table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}
table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}
table.frame-all{border-width:1px}
table.frame-sides{border-width:0 1px}
table.frame-topbot,table.frame-ends{border-width:1px 0}
.reveal table th.halign-left,.reveal table td.halign-left{text-align:left}
.reveal table th.halign-right,.reveal table td.halign-right{text-align:right}
.reveal table th.halign-center,.reveal table td.halign-center{text-align:center}
.reveal table th.valign-top,.reveal table td.valign-top{vertical-align:top}
.reveal table th.valign-bottom,.reveal table td.valign-bottom{vertical-align:bottom}
.reveal table th.valign-middle,.reveal table td.valign-middle{vertical-align:middle}
table thead th,table tfoot th{font-weight:bold}
tbody tr th{display:table-cell;line-height:1.6}
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{font-weight:bold}
thead{display:table-header-group}

.reveal table.grid-none th,.reveal table.grid-none td{border-bottom:0!important}

/* callouts */
.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]::after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}</style><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-1/css/all.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-1/css/v4-shims.min.css"><script>var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/css/print/pdf.css" : "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/css/print/paper.css";
document.getElementsByTagName( 'head' )[0].appendChild( link );</script><!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/lib/js/html5shiv.js"></script><![endif]--><link rel="stylesheet" href="slides.css"></head><body><div class="reveal"><div class="slides"><section class="title" data-state="title"><h1>Async</h1><h2>Avoiding disaster and unbounded growth</h2><div class="preamble"><div class="paragraph"><p><a href="./index.html">Table of Contents</a></p></div></div></section>
<section id="_information_gathering"><h2>Information gathering</h2><div class="paragraph"><p>Your project is dynamic:
* Make it traceable
* Constantly monitor</p></div></section>
<section id="_backpressure"><h2>Backpressure</h2><div class="paragraph"><p>Backpressure is the process of "pushing back" on producers that are to fast.</p></div>
<div class="paragraph"><p>This throttles the system, but allows it to not fail.</p></div></section>
<section id="_bounded_vs_unbounded_growth"><h2>Bounded vs. unbounded growth</h2><div class="ulist"><ul><li><p>bounded channels are predictable</p></li><li><p>unbounded are more dynamic</p></li><li><p>bounded provide backpressure</p></li><li><p>unbounded are useful if you know they are never beyond a certain size</p></li></ul></div></section>
<section id="_holding_state"><h2>Holding state</h2><div class="ulist"><ul><li><p>Tasks can hold state (erlang pattern)</p></li><li><p>Otherwise, Mutexes and RWlocks allow sharing</p></li></ul></div></section>
<section id="_dropping_futures"><h2>Dropping futures</h2><div class="ulist"><ul><li><p>Droping a futures means cancelling it</p></li><li><p>Be aware on what happens if is cancelled</p></li></ul></div></section>
<section id="_shutting_down"><h2>Shutting down</h2><div class="ulist"><ul><li><p>Make sure you handle signals centrally</p></li><li><p>Every component should subscribe to a cancel notification</p></li></ul></div></section>
<section id="_implementing_a_custom_future_pinning"><h2>Implementing a custom Future: Pinning</h2><div class="ulist"><ul><li><p>Futures are not allowed to move in Memory</p></li><li><p>The type that discribes that is called <code>Pin</code></p></li><li><p>Pinning is hard, but there&#8217;s support libraries</p></li></ul></div></section>
<section id="_the_poll_protocol"><h2>The poll protocol</h2><div class="paragraph"><p>Futures are <code>poll</code> based - that means they get asked if they are complete.</p></div>
<div class="ulist"><ul><li><p>This happens an infinite number of times, until they mark themselves complete</p></li><li><p>The process is optimised through the <code>Waker</code> type</p></li><li><p>Implemeting poll yourself is rather easy</p></li></ul></div></section></div></div><script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/lib/js/head.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/js/reveal.js"></script><script>Array.prototype.slice.call(document.querySelectorAll('.slides section')).forEach(function(slide) {
if (slide.getAttribute('data-background-color')) return;
// user needs to explicitly say he wants CSS color to override otherwise we might break custom css or theme (#226)
if (!(slide.classList.contains('canvas') || slide.classList.contains('background'))) return;
var bgColor = getComputedStyle(slide).backgroundColor;
if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {
slide.setAttribute('data-background-color', bgColor);
slide.style.backgroundColor = 'transparent';
}
})

// See https://github.com/hakimel/reveal.js#configuration for a full list of configuration options
Reveal.initialize({
// Display presentation control arrows
controls: true,
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: true,
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: 'bottom-right',
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'faded',
// Display a presentation progress bar
progress: true,
// Display the page number of the current slide
slideNumber: false,
// Control which views the slide number displays on
showSlideNumber: 'all',
// Push each slide change to the browser history
history: true,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Enable the slide overview mode
overview: true,
// Vertical centering of slides
center: true,
// Enables touch navigation on devices with touch input
touch: true,
// Loop the presentation
loop: false,
// Change the presentation direction to be RTL
rtl: false,
// Randomizes the order of slides each time the presentation loads
shuffle: false,
// Turns fragments on and off globally
fragments: true,
// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: false,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,
// Flags if we should show a help overlay when the questionmark
// key is pressed
help: true,
// Flags if speaker notes should be visible to all viewers
showNotes: false,
// Global override for autolaying embedded media (video/audio/iframe)
// - null: Media will only autoplay if data-autoplay is present
// - true: All media will autoplay, regardless of individual setting
// - false: No media will autoplay, regardless of individual setting
autoPlayMedia: null,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,
// Stop auto-sliding after user input
autoSlideStoppable: true,
// Use this method for navigation when auto-sliding
autoSlideMethod: Reveal.navigateNext,
// Specify the average time in seconds that you think you will spend
// presenting each slide. This is used to show a pacing timer in the
// speaker view
defaultTiming: 120,
// Enable slide navigation via mouse wheel
mouseWheel: false,
// Hides the address bar on mobile devices
hideAddressBar: true,
// Opens links in an iframe preview overlay
// Add `data-preview-link` and `data-preview-link="false"` to customise each link
// individually
previewLinks: false,
// Transition style (e.g., none, fade, slide, convex, concave, zoom)
transition: 'none',
// Transition speed (e.g., default, fast, slow)
transitionSpeed: 'default',
// Transition style for full page slide backgrounds (e.g., none, fade, slide, convex, concave, zoom)
backgroundTransition: 'fade',
// Number of slides away from the current that are visible
viewDistance: 3,
// Parallax background image (e.g., "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'")
parallaxBackgroundImage: '',
// Parallax background size in CSS syntax (e.g., "2100px 900px")
parallaxBackgroundSize: '',
// Number of pixels to move the parallax background per slide
// - Calculated automatically unless specified
// - Set to 0 to disable movement along an axis
parallaxBackgroundHorizontal: null,
parallaxBackgroundVertical: null,
// The display mode that will be used to show slides
display: 'block',

// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: 1920,
height: 1080,

// Factor of the display size that should remain empty around the content
margin: 0.1,

// Bounds for smallest/largest possible scale to apply to content
minScale: 0.2,
maxScale: 1.5,

// PDF Export Options
// Put each fragment on a separate page
pdfSeparateFragments: true,
// For slides that do not fit on a page, max number of pages
pdfMaxPagesPerSlide: 1,

// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/plugin/zoom-js/zoom.js', async: true },
{ src: 'https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.7.0/plugin/notes/notes.js', async: true },




],



});</script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/styles/idea.min.css"/><!-- This thing gets copy-pasted to the end of html with presentation-->
<!-- When https://github.com/asciidoctor/asciidoctor-reveal.js/issues/177 is fixed, we can move this to a custom template -->
<!-- FIXME: do we really need jquery here? -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script>
const buttons = '<button class="open-in-playground">RUN</button>\n';

function addButtons() {
$('pre code.language-rust').each(function (i, block) {
$(block).parent().prepend(buttons);
});
$('.open-in-playground').click(function () {
const code = $(this).siblings('code').text();
const baseUrl = 'https://play.rust-lang.org/?version=stable&code=';
const payload = encodeURIComponent(code);
const url = baseUrl + payload;
window.open(url, '_blank');
});
}

$(addButtons)
</script></body></html>

0 comments on commit 9774d44

Please sign in to comment.