These are chat archives for rust-lang/rust

20th
Dec 2017
Judson Lester
@nyarly
Dec 20 2017 03:35
You could loop until time...
Tarık Binar
@ttarikbnr
Dec 20 2017 05:09
i want to use a rlib for static linking but i couldnt find an example which shows how to use rlib for that.
Tarık Binar
@ttarikbnr
Dec 20 2017 05:14
what should be in build.rs?
Moggers
@Moggers
Dec 20 2017 05:27
I tried loop until time but it seems like std::time::Instant isn't giving me accurate enough times to do PWM with
Peter Atashian
@retep998
Dec 20 2017 07:11
Instant is as accurate as the OS is able to provide
if it's not accurate enough, then there's not much Rust can do about it
Moggers
@Moggers
Dec 20 2017 07:30
how is software PWM usually done?
Peter Atashian
@retep998
Dec 20 2017 07:50
Usually at the driver level
Exactly how precise do you need your times to be?
Fra ns
@snarf95_twitter
Dec 20 2017 08:32
Is this possible but in some other form: my_data[1..-1]? It basically in my head means that it should create a slice from index 1 thru index len() - 1
Michal 'vorner' Vaner
@vorner
Dec 20 2017 08:33
@snarf95_twitter AFAIK Rust doesn't support that (maybe because it can lead to stupid errors?) and you have to write my_data[1..my_data.len() - 1]
Fra ns
@snarf95_twitter
Dec 20 2017 08:34
okay got it :)
Judson Lester
@nyarly
Dec 20 2017 18:24
@snarf95_twitter Can't youmy_data[1..] ?
(Doesn't work for -2 but for the more common "the tail of the list..." usage)
Alkis Evlogimenos
@alkis
Dec 20 2017 20:53
rustup seems broken in windows:
error: could not create link from 'C:\Users\alkis\.cargo\bin\rustup.exe' to 'C:\Users\alkis\.cargo\bin\rustc.exe'
info: backtrace:
...
I tried reinstalling it, removing .cargo/bin to no avail. Any hints on how to unwedge this?