ざっと調べた。言語を実装する時に疑問に思う細かい部分はまだ拾いきれていない(探せばありそう)。
コルーチン内で別の関数を呼び出す場合、その関数の呼び出し中に現在のコルーチンをsuspend不可とする制限をもたせる(call stackが深い部分でsuspendを許可しない)。 その制限によって、コルーチンのsuspend時に関数のcall stackを全て保存する必要がなくなる。
ざっと調べた。言語を実装する時に疑問に思う細かい部分はまだ拾いきれていない(探せばありそう)。
コルーチン内で別の関数を呼び出す場合、その関数の呼び出し中に現在のコルーチンをsuspend不可とする制限をもたせる(call stackが深い部分でsuspendを許可しない)。 その制限によって、コルーチンのsuspend時に関数のcall stackを全て保存する必要がなくなる。
関連: RFC 2394
Sometimes it is really nice to just take a quick look at some data. However, when working on remote computers, it is a bit of a burden to move data files to a local computer to create a plot in something like R
. One solution is to use gnuplot
and make a quick plot that is rendered in the terminal. It isn't very pretty by default, but it gets the job done quickly and easily. There are also advanced gnuplot
capabilities that aren't covered here at all.
gnuplot
has it's own internal syntax that can be fed in as a script, which I won't get into. Here is the very simplified gnuplot
code we'll be using:
set terminal dumb size 120, 30; set autoscale; plot '-' using 1:3 with lines notitle
Let's break this down:
更新: | 2017-09-26 |
---|---|
作者: | @voluntas |
作者サイト: | http://voluntas.github.io/ |
バージョン: | 1.2.1 |
セッション日時: | 2017-09-24 14:20 - 15:00 |
セッション場所: | 5号館3F |
extern crate futures; | |
extern crate hyper; | |
extern crate env_logger; | |
#[macro_use] extern crate log; | |
extern crate tokio_core; | |
extern crate futures_cpupool; | |
use hyper::{Post, StatusCode}; | |
use hyper::header::ContentLength; | |
use hyper::server::{Http, Service, Request, Response}; |