(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# psql -U postgres | |
psql (9.3.4) | |
Type "help" for help. | |
postgres=# CREATE FUNCTION insert_city(character varying) | |
postgres-# RETURNS void AS | |
postgres-# $BODY$ | |
postgres$# BEGIN | |
postgres$# INSERT INTO city("name") VALUES($1); | |
postgres$# END |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# PostgreSQL configuration tuning to improve tests performance of database interactions. | |
# Look for more detailed description in follow articles: | |
# - http://rhaas.blogspot.com/2010/06/postgresql-as-in-memory-only-database_24.html | |
# | |
# ATTENTION: | |
# Before appling those settings ensure that you have no important data in your cluster, because those settings | |
# could cause problems on your production database in case of appliance. | |
# | |
# Ensure follow settings have given values. |
The goal of this is to have an easily-scannable reference for the most common syntax idioms in Ruby and Rust so that programmers most comfortable with Ruby can quickly get through the syntax differences and feel like they could read and write basic Rust programs.
What do you think? Does this meet its goal? If not, why not?
Ruby:
futures-rs
is the library which will hopefully become a shared foundation for everything async in Rust. However it's already become renowned for having a steep learning curve, even for experienced Rustaceans.
I think one of the best ways to get comfortable with using a library is to look at how it works internally: often API design can seem bizarre or impenetrable and it's only when you put yourself in the shoes of the library author that you can really understand why it was designed that way.
In this post I'll try to put down on "paper" my understanding of how futures work and I'll aim to do it in a visual way. I'm going to assume you're already somewhat familiar with Rust and why futures are a useful tool to have at one's disposal.
For most of this post I'll be talking about how things work today (as of September 2017). At the end I'll touch on what's being proposed next and also make a case for some of the changes I'd like to see.
If you're interested in learning more ab
language: rust | |
rust: | |
- stable | |
install: | |
- rustup component add rustfmt-preview | |
- rustup component add clippy-preview | |
script: | |
- cargo fmt -- --check | |
- touch ./src/main.rs && cargo clippy -- -D warnings | |
- cargo test |
lazy_static! { | |
static ref GUARD: Mutex<Option<sentry::internals::ClientInitGuard>> = Mutex::new(None); | |
} | |
*GUARD.lock().unwrap() = Some(sentry::init(dotenv!("SENTRY_DSN"))); | |
sentry::integrations::panic::register_panic_handler(); | |
let next = panic::take_hook(); | |
panic::set_hook(Box::new(move |info| { |