These are chat archives for rust-lang/rust

22nd
Nov 2016
LeRoyce Pearson
@Geemili
Nov 22 2016 04:32
I'm trying to use the reminisce library, but compiling it is failing with error: main function not found
Andrey Lesnikov
@ozkriff
Nov 22 2016 08:43
Krishna Bhogaonker
@00krishna
Nov 22 2016 15:37
@retep998 thanks for the tip. Yeah, this issue with calling C++ is not too surprising. I am trying to port some specific mathematical libraries over to rust. It is a pain to write all the wrappers, but hopefully the investment will pay off in the future. Hopefully C++ support will improve over time.
Iuri Matias
@iurimatias
Nov 22 2016 18:50
trying to convert list of strings to a floatlet v: Vec<&f64> = l.split(',').map(|s| s.parse::<f64>().unwrap()).collect::<Vec<&f64>>(); complains that the trait `std::iter::FromIterator<f64> is not implemented for std::vec::Vec<&f64> . Do I actually need to implement that trait, or is there a simpler way to do this?
Jonas Platte
@jplatte
Nov 22 2016 18:56
@iurimatias You probably just want to collect::<Vec<f64>>() without the reference (and leave out / change the type ascription as well)
Iuri Matias
@iurimatias
Nov 22 2016 18:58
@jplatte that worked, thank you
Daniel Brockman
@dbrock
Nov 22 2016 19:22

I'm a Rust noob and trying to make a simple program using some libraries; when I include a certain crate of dependencies that I need I get tons of errors like this:

error: macro undefined: 'warn!'
    --> target/debug/build/ethcore-db-a57ed8917bfb0c25/out/lib.rs:3106:25
     |
3106 |                         warn!(target : "ipc" ,
     |                         ^^^^
error: macro undefined: 'trace!'
    --> target/debug/build/ethcore-db-a57ed8917bfb0c25/out/lib.rs:1782:17
     |
1782 |                 trace!(target : "ipc" , "Invoking: open_default");
     |                 ^^^^^

it looks like an easy problem so I thought someone might know right away; google is not very helpful

Iuri Matias
@iurimatias
Nov 22 2016 19:23
ethereum? :)
Daniel Brockman
@dbrock
Nov 22 2016 19:23
yep :D
Ethereum is to Rust as Rails is to Ruby
should just rename Ethereum to Rust on Rails
Iuri Matias
@iurimatias
Nov 22 2016 19:24
it’s what sold me on rust as well