This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use "net" | |
use "logger" | |
use "time" | |
actor Main | |
new create(env: Env) => | |
let auth = | |
try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actor Main | |
new create(env: Env) => | |
let chain = DivisibleFilter(2, Printer(env), env) | |
let g = Generator(1_000_000, chain) | |
actor Generator | |
var _i: I = 2 | |
let _max: I | |
let _next: Next | |
new create(max: I, next: Next) => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actor Main | |
new create(env: Env) => | |
let chain = DivisibleFilter(2, Printer(env), env) | |
let g = Generator(100000000, chain) | |
actor Generator | |
new create(max: I, next: Next tag) => | |
var i: I = 2 | |
while i <= max do | |
next.apply(i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait ExtendValues<T> { | |
fn extend_values<I>(&mut self, iter: I) | |
where | |
I: Iterator<Item = T>; | |
} | |
impl<K, V, E, T> ExtendValues<(K, E)> for HashMap<K, V> | |
where | |
K: Eq + std::hash::Hash, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use crate::common::*; | |
use serde::Deserialize; | |
pub fn decode(path: &str) -> Result<Vec<LatLonBox>> { | |
let f = std::fs::File::open(path)?; | |
let mut zip_archive = zip::ZipArchive::new(f)?; | |
let doc_file = zip_archive.by_name("doc.kml")?; | |
let doc: KmlDoc = serde_xml_rs::from_reader(doc_file)?; | |
Ok(doc | |
.document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use crate::common::*; | |
use serde::Deserialize; | |
pub fn decode(path: &str) -> Result<Vec<LatLonBox>> { | |
let f = std::fs::File::open(path)?; | |
let mut zip_archive = zip::ZipArchive::new(f)?; | |
let doc_file = zip_archive.by_name("doc.kml")?; | |
let doc: KmlDoc = serde_xml_rs::from_reader(doc_file)?; | |
Ok(doc | |
.document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use core::future::Future; | |
use std::collections::HashMap; | |
use std::default::Default; | |
use std::fmt::Debug; | |
use std::hash::Hash; | |
use tokio::sync::watch; | |
use tokio::sync::Mutex; | |
#[derive(Default)] | |
pub struct Group<K: Hash + Eq, V: Clone + Debug> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. | |
thread 'tokio-runtime-worker' panicked at 'gai background task failed: JoinError::Cancelled', /Users/anacrolix/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.13.1/src/client/connect/dns.rs:144:30 | |
stack backtrace: | |
0: 0x10979d6b5 - std::sys_common::at_exit_imp::push::h0636e6b5f7616352 | |
1: 0x1097c16a0 - core::fmt::ArgumentV1::show_usize::hca33af0aed7db5c5 | |
2: 0x10979900b - std::io::Write::write_fmt::he6837371b9a45188 | |
3: 0x10979f403 - std::panicking::default_hook::{{closure}}::h708e66cfeb0483ba | |
4: 0x10979f10a - std::panicking::default_hook::h39ea8ddf674c04ec | |
5: 0x10979facb - <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get::hf147e9d6b92d24d8 | |
6: 0x10979f659 - std::panicking::continue_panic_fmt::h2dfa3a5b90265361 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Microsoft will release a mainstream functional programming language. | |
Google will release their own language for development on Android. If they lose the Java court case, it will take off. | |
Google won’t lose the Java court case. | |
In 2014, Python 3000 will finally displace Python 2. | |
Hardware Transactional Memory will be released on chips in 2013. By 2015, it will be incorporated into most compilers and provide almost magical performance and correctness improvements on SMP. | |
http://www.h-online.com/newsticker/news/item/Processor-Whispers-About-Haskell-and-Haswell-1389507.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let result = handle!(result, err, { | |
error!("error receiving messages: {}", err); | |
continue; | |
}); | |
trace!("got message result"); | |
for msg in result.messages.unwrap_or_default() { | |
let body = msg.body.unwrap(); | |
let _delete = sqs | |
.delete_message(rusoto_sqs::DeleteMessageRequest { | |
queue_url: queue_url.to_owned(), |