curl 'https://dlcdnets.asus.com/pub/ASUS/wireless/USB-BT400/DR_USB_BT400_1201710_Windows.zip' \
-o bt400-driver.zip
Driver & tools for bt400 can be found here
Plug device and do
// Modified by bryanchow for namespace control and higher compressibility | |
// See https://gist.github.com/1649353 for full revision history from original | |
/* | |
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined | |
* in FIPS 180-2 | |
* Version 2.2 Copyright Angel Marin, Paul Johnston 2000 - 2009. | |
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet | |
* Distributed under the BSD License | |
* See http://pajhome.org.uk/crypt/md5 for details. |
// Simple Scala-like for comprehension for rust | |
macro_rules! comp( | |
// base case, using "map" | |
(val $id:ident <- $expr:expr $(,if $cond:expr)* $(,let $assign_id:pat = $assign_val:expr)* ,yield $comp:expr) => | |
( | |
($expr)$(.filtered(|&$id| $cond))*.map(|&$id| { | |
$(let $assign_id = $assign_val;)* $comp | |
} | |
) |
#![feature(poll_map)] | |
use futures::{stream, StreamExt}; | |
use futures::{FutureExt, TryStreamExt}; | |
use std::env; | |
use tokio::sync::mpsc; | |
use tokio_postgres::{connect, NoTls}; | |
#[tokio::main] | |
async fn main() { | |
let connection_parameters = env::var("DBURL").unwrap(); |
curl 'https://dlcdnets.asus.com/pub/ASUS/wireless/USB-BT400/DR_USB_BT400_1201710_Windows.zip' \
-o bt400-driver.zip
Driver & tools for bt400 can be found here
Plug device and do
name: Security audit | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
paths: | |
- '**/Cargo.toml' | |
- '**/Cargo.lock' | |
jobs: | |
security_audit: |
Fibers are an abstraction over sequential computation, similar to threads but at a higher level. There are two ways to think about this model: by example, and abstractly from first principles. We'll start with the example.
(credit here is very much due to Fabio Labella, who's incredible Scala World talk describes these ideas far better than I can)
Consider the following three functions
First you need to install pandoc.
I used brew install pandoc
to install via Homebrew since I'm on a mac.
Make a slides.md
for your slides (or name it whatever you want!). I put images in an /images/
folder. You can see how links and images and all of that work from this sample:
version: "3.9" | |
services: | |
zookeeper: | |
restart: unless-stopped | |
image: ubuntu/zookeeper:latest | |
ports: | |
- "2181:2181" | |
kafka: |
What follows are some of my (very) rough thoughts on what we can and should do with respect to CPS transformation in Scala at the language level. I'll try to start with some motivation behind my thinking, as well as some rambling observations on the nature of the problem space, but don't expect too much coherence here. :-)
Async programming is hard.
Okay let's actually be more specific than that. High-performance I/O is hard. Signal multiplexing is a powerful technique for achieving high(er) performance I/O, particularly network I/O, but the tradeoff is that, in order to utilize it, the user-space programming model must allow for suspension and resumption of sequential continuations (often called "fibers" or "coroutines"). Achieving this type of programming model without significant tradeoffs in usability is what is exceptionally hard.
If that wasn't bad enough though, these problems are inextricably conflated with another set of problem spaces which are, themselves, very difficult. In