These are chat archives for rust-lang/rust

27th
Sep 2018
Nathan Perkins
@NathanielPerkins
Sep 27 2018 01:47
Does anyone know if I can call python functions from rust, and have that be distributable as a self contained executable? Ie, without having to install python or whatever libraries used on the target system
Kelly Thomas Kline
@kellytk
Sep 27 2018 03:54
I'm working through a signature (type system) problem I'd appreciate help with https://ghostbin.com/paste/gy29a
matrixbot
@matrixbot
Sep 27 2018 04:14
bspeice Nathan Perkins (Gitter) It'd be absurdly difficult; You'd have to bundle the entire Python interpreter, plus whatever code you had (likely as a zip import) and load that.
Nathan Perkins
@NathanielPerkins
Sep 27 2018 04:14
Yeah I thought that'd be the case, but was just checking to see if it'd somehow been solved
thanks for getting back to me
matrixbot
@matrixbot
Sep 27 2018 04:15
bspeice You can use pyo3 to call Rust functions, but what you're talking about sounds crazy 😃
bspeice Kelly Thomas Kline (Gitter): Maybe try the actix gitter? They'd have more info there.
Kelly Thomas Kline
@kellytk
Sep 27 2018 04:27
Thanks @matrixbot I'll do that
Lyle Mantooth
@IslandUsurper
Sep 27 2018 11:21
I do wish Matrix had better integration with Gitter (and Slack) . . .
James McCoy
@jamessan
Sep 27 2018 12:25
It can, at least with Gitter. Not sure about Slack. It's possible to link your Gitter and Matrix accounts, so you appear seamlessly, instead of proxied by the bot
Lyle Mantooth
@IslandUsurper
Sep 27 2018 13:16
Huh. I'll have to see about that.
James McCoy
@jamessan
Sep 27 2018 13:22
I'm not sure it's cleanly exposed in a UI somewhere though. I had someone in the community send me a link to set it up
CorvusEtiam
@CorvusEtiam
Sep 27 2018 16:31

I have a bit of trouble with lifetimes on this [1] one. What would be proper lifetime parameters on this one to keep connection reference valid, there will be only one connection reference at time.

[1] https://gist.github.com/CorvusEtiam/32ec5bc84d2e8db53f6a7764059cc806

Thiez
@Thiez
Sep 27 2018 17:26
pub fn with<'a>(&self, connect : &'a Connection ) -> ConnectedInserter<'a> { ?
CorvusEtiam
@CorvusEtiam
Sep 27 2018 17:44
Thank you very much :)
Timothy Shoaf
@timshoaf
Sep 27 2018 17:47
Hello! Do we have default arguments? Or must we specify an Option<T> and force the user of the API to pass in a None?
Thiez
@Thiez
Sep 27 2018 18:02
We do not have default arguments.