« Back to channel list

#elixir-lang - 18 May 2019

« Back 1 day Forward 1 day »
[00:07:46] __charly__: has joined #elixir-lang
[00:33:34] Adkron: has joined #elixir-lang
[00:36:22] orbyt_: has joined #elixir-lang
[00:43:01] benwilson512: uplime: you would reverse proxy
[00:44:23] icecreamcohen: has joined #elixir-lang
[00:45:08] starbelly: I have confusion about doing NIFs in Rust... for a specific case... if you're going to be wrapping C in Rust... is there a point?
[00:56:01] uplime: benwilson512: ok thanks
[01:06:47] benwilson512: starbelly: where does the C come from?
[01:07:02] benwilson512: the idea of a rust NIF is that the whole NIF is rust
[01:07:51] starbelly: Right. Well, when I started doing a few nifs, people suggested I do them in rust, but I said "But I'll be utilizing a C lib?"
[01:08:04] starbelly: In this case it was libsodium and libhydrogen
[01:08:15] starbelly: Anyway, the conversation above just re-jogged that thought
[01:10:22] starbelly: But I am quite curious where the rustler project is at now. I could just go look I guess, but that takes effort.
[01:12:09] starbelly: So I guess what I'm asking is, if you are going to be writing a nif to expose a lib in C, is there any point in doing it in rust? Obviously, I didn't see any, but I could have been wrong.
[01:13:03] benwilson512: starbelly: depends on how much rust code you end up writing
[01:13:10] starbelly: ACTION speaks entish, takes a long time to say something in entish 
[01:13:43] starbelly: benwilson512:Well, I guess my thought is if you have to `unsafe` all the things in order to make it work, then you lose all the safety of rust.
[01:14:35] starbelly: of course, if you just absolute hate C, then that's a reason I suppose
[01:14:48] starbelly: but then comes the question of performance
[01:15:45] benwilson512: starbelly: it depends on how many LOC of rust you end up writing
[01:15:53] benwilson512: if all you're doing is wrapping libsodium then yeah, no point
[01:16:12] benwilson512: if you're writing a non trivial amount of logic in rust, then you benefit from better guarantees about all of the non unsafe bits
[01:16:23] starbelly: Sure. I agree with that.
[01:28:37] orbyt_: has joined #elixir-lang
[01:40:05] warmwaffles: has joined #elixir-lang
[01:44:01] tomterl: has joined #elixir-lang
[02:03:36] kapilp: has joined #elixir-lang
[02:10:32] lanodan: has joined #elixir-lang
[02:32:27] qwexer: has joined #elixir-lang
[02:39:58] Adkron: has joined #elixir-lang
[02:47:20] pera: has joined #elixir-lang
[03:23:50] qwexer: has joined #elixir-lang
[03:37:53] proteusguy: has joined #elixir-lang
[04:16:55] Adkron: has joined #elixir-lang
[04:22:44] blahdodo: has joined #elixir-lang
[04:48:54] fastfresh: has joined #elixir-lang
[04:52:10] kaniini: has joined #elixir-lang
[04:56:01] tnez: has joined #elixir-lang
[05:06:07] voltone: has joined #elixir-lang
[05:11:16] scrogson: starbelly: rustler is still pretty active.
[05:12:14] wsieroci: has joined #elixir-lang
[05:13:35] scrogson: I need to add support for OTP 22 now. Will probably do that in the next couple of days.
[05:13:48] lauromoura_: has joined #elixir-lang
[05:37:31] kyrylo: has joined #elixir-lang
[06:01:27] gvaughn: has joined #elixir-lang
[06:08:11] lexmag: has joined #elixir-lang
[06:08:29] Exuma: has joined #elixir-lang
[06:11:56] Dawgora: has joined #elixir-lang
[06:23:36] Adkron: has joined #elixir-lang
[06:24:49] blahdodo: has joined #elixir-lang
[06:59:49] kyrylo: has joined #elixir-lang
[07:02:25] Phylock: has joined #elixir-lang
[07:09:23] wsieroci: has joined #elixir-lang
[07:20:05] gvaughn: has joined #elixir-lang
[07:22:58] squall: has joined #elixir-lang
[07:38:16] blahdodo: has joined #elixir-lang
[07:44:05] nickjj_: has joined #elixir-lang
[07:54:22] wsieroci: has joined #elixir-lang
[08:30:00] Adkron: has joined #elixir-lang
[08:42:53] gvaughn: has joined #elixir-lang
[08:46:59] Sgeo: has joined #elixir-lang
[08:52:18] Guest42: has joined #elixir-lang
[08:52:24] kapilp: has joined #elixir-lang
[09:16:29] snapet: has joined #elixir-lang
[09:50:28] Saukk: has joined #elixir-lang
[09:51:10] tutti: has joined #elixir-lang
[09:55:10] tnez: has joined #elixir-lang
[10:21:24] Sgeo_: has joined #elixir-lang
[10:26:52] gvaughn: has joined #elixir-lang
[10:35:26] nox: starbelly: You don't have to unsafe all the things doing a Rust NIF.
[10:36:05] josevalim: nox: a rust nif that wraps a C lib though?
[10:36:20] Adkron: has joined #elixir-lang
[10:37:47] nox: josevalim: The Rust wrapping code can make good use of TYPES to safely wrap the C thing.
[10:37:52] dysfun: josevalim: gotta be unsafe to be cool :p
[10:39:17] dysfun: nox: you mean apart from the c thing being written in c and c being terrible and potentially crashy and shit?
[10:39:51] nox: dysfun: Nah, to take an example, wrapping the NIF API to make sure a term doesn't outlive its env, using lifetimes.
[10:40:15] dysfun: (have you rewritten the BEAM in rust yet?)
[10:41:03] nox: dysfun: Nah, don't have enough time.
[10:41:18] nox: I have CSS floats to implement for Monday (self-imposed deadline) and my damn talk to prepare.
[10:41:33] dysfun: oh, is it that time again? poor audience
[10:41:40] mahmudov: has joined #elixir-lang
[10:41:43] nox: dysfun: Again?
[10:41:47] nox: I never did any talk ever.
[10:41:58] dysfun: you must have done
[10:41:59] nox: Except once in my univ I guess, but that wasn't a large conf.
[10:54:43] _barcode_: has joined #elixir-lang
[10:59:22] Guest42: has joined #elixir-lang
[11:11:13] lexmag_: has joined #elixir-lang
[11:14:24] Adkron: has joined #elixir-lang
[11:17:17] lexmag: has joined #elixir-lang
[11:30:28] Sgeo__: has joined #elixir-lang
[11:30:56] wsieroci: has joined #elixir-lang
[11:35:41] DTZUZO: has joined #elixir-lang
[11:40:07] lexmag: has joined #elixir-lang
[11:43:48] Gika: has joined #elixir-lang
[11:50:59] josevalim: i think there are 2 or 3 VM in rust at this point in different stages
[11:53:08] Sgeo_: has joined #elixir-lang
[11:53:20] lexmag: has joined #elixir-lang
[12:03:24] blahdodo: has joined #elixir-lang
[12:08:44] gvaughn: has joined #elixir-lang
[12:12:19] lauromoura: has joined #elixir-lang
[12:22:55] micmus: There are. I'm a bit disappointed though, that they all replicate the architecture of the BEAM exactly or as close as possible. I think it would be interesting to explore some different design trade-offs
[12:33:58] Sgeo__: has joined #elixir-lang
[12:39:08] kyrylo: has joined #elixir-lang
[12:42:17] dysfun: when i was considering it, there were a few tweaks i wanted to make
[12:42:42] dysfun: obviously there's a certain amount that must be maintained to *be* the BEAM, but there's plenty of flex
[12:58:28] Exuma: has joined #elixir-lang
[13:08:40] JuanMiguel: has joined #elixir-lang
[13:13:28] tallysmartins_: has joined #elixir-lang
[13:20:55] Adkron: has joined #elixir-lang
[13:27:28] Sgeo: has joined #elixir-lang
[13:35:25] harrow: has joined #elixir-lang
[13:47:13] gvaughn: has joined #elixir-lang
[13:53:30] Adkron: has joined #elixir-lang
[13:57:00] wsieroci: has joined #elixir-lang
[14:34:12] Sgeo: has joined #elixir-lang
[14:35:47] kyrylo_: has joined #elixir-lang
[14:51:01] wsieroci: has joined #elixir-lang
[14:56:06] lexmag: has joined #elixir-lang
[15:03:49] lexmag: has joined #elixir-lang
[15:04:43] weird_error: has joined #elixir-lang
[15:05:11] Sgeo_: has joined #elixir-lang
[15:05:31] __charly__: has joined #elixir-lang
[15:12:50] Exuma: has joined #elixir-lang
[15:13:24] wsieroci: has joined #elixir-lang
[15:14:13] Guest42: has joined #elixir-lang
[15:23:19] nox: josevalim: What we need in this world is more Erlang VMs in Rust than we have JSON parsers in Erlang.
[15:24:38] nox: micmus: BEAM makes very good design trade-offs though.
[15:25:00] nox: micmus: I'm definitely in that camp so I'm biased though, if nam ever becomes a thing it will be pretty similar to BEAM.
[15:28:50] gvaughn: has joined #elixir-lang
[15:45:15] tnez: has joined #elixir-lang
[15:47:49] blahdodo: has joined #elixir-lang
[15:50:17] gvaughn: has joined #elixir-lang
[15:52:00] oldnborg: has joined #elixir-lang
[16:00:57] Adkron: has joined #elixir-lang
[16:01:41] Sgeo: has joined #elixir-lang
[16:14:11] JuanMiguel: has joined #elixir-lang
[16:35:31] griffinbyatt: has joined #elixir-lang
[16:37:06] mahmudov: has joined #elixir-lang
[16:41:15] starbelly: scrogson: Cool. I keep meaning to do some rust, and really give rustler a go, but there's only so much time in a day of course. I am more motivated to go spelunking in the BEAM :)
[16:45:40] Adkron: has joined #elixir-lang
[16:48:42] fsdf: has joined #elixir-lang
[16:52:50] qwexer: has joined #elixir-lang
[16:54:12] Gika: has joined #elixir-lang
[16:59:08] kyrylo: has joined #elixir-lang
[17:11:39] orbyt_: has joined #elixir-lang
[17:14:02] lexmag: has joined #elixir-lang
[17:24:34] lexmag: has joined #elixir-lang
[17:37:57] BitBot: has joined #elixir-lang
[17:39:02] BitBot: has joined #elixir-lang
[17:39:28] BitBot: has joined #elixir-lang
[17:40:20] wsieroci: has joined #elixir-lang
[18:04:03] work_: has joined #elixir-lang
[18:05:18] wsieroci: has joined #elixir-lang
[18:24:25] ryotsu: has joined #elixir-lang
[18:27:01] __charly__: has joined #elixir-lang
[18:38:57] sinni800: what would be the best way to store database connection pools of some sort?
[18:39:10] sinni800: i use poolboy to make pools, but i need to store those pools by name... registry?
[18:39:29] sinni800: it's not a traditional mysql or postgre db, so i need a custom pool btw :)
[18:52:42] Adkron: has joined #elixir-lang
[18:55:42] josevalim: sinni800: yes, usually you start poolboy with a name
[18:55:56] josevalim: the built-in registry should be enough
[18:56:24] sinni800: right, but the names will be pretty dynamic, so it's probaly not such a good idea to use atoms
[18:56:32] sinni800: so i want to use the Registry module
[18:58:15] starbelly: Registry doesn't require using atoms for names, the key can be any erlang term
[19:24:27] josevalim: sinni800: that should work too!
[19:24:27] qwexer: does anyone have experience with receiving SMS? I have found a few libraries to send, but nothing on receiving
[19:30:38] mercxry: has joined #elixir-lang
[19:30:52] starbelly: qwexer: Do you mean acting as an sms gateway or handling a callback from a web api?
[19:31:47] qwexer: I am thinking of being able to facilitate receiving an sms, and return data by sending a response sms
[19:32:21] qwexer: maybe I need to use an SMS service to receive, hit a callback and then send the response myself?
[19:32:46] Cthalupa: has joined #elixir-lang
[19:32:48] starbelly: If you do not to become an SMS provider of some sort, that's what I'd recommend
[19:32:52] mercxry: Hye guys, I'm building an Ecto query and I need to check if a column of type json is not '{}', in sql it would be `column::text <> '{}'::text` but can't make it work with Ecto, any help?
[19:33:05] starbelly: qwexer: twillio's api is very nice
[19:33:15] qwexer: starbelly: thank you, I will look into that
[19:34:09] starbelly: mercxry: Use a fragment
[19:34:18] mercxry: (btw I'm using postgres)
[19:34:25] mercxry: starbelly: Sorry, what's a fragment?
[19:34:46] starbelly: mercxry: https://hexdocs.pm/ecto/Ecto.Query.API.html#fragment/1
[19:35:26] mercxry: Oh that's really good for what I need to do, thanks you very much!
[19:37:26] mercxry: It works perfectly :D
[19:46:41] Cthalupa: has joined #elixir-lang
[19:52:17] sinni800: josevalim: i dont know if this is a disingenious question, but is the Registry able to be read highly multithreaded? as i said, no idea if this is disingenious right now
[19:54:13] netrino: has joined #elixir-lang
[19:59:46] josevalim: sinni800: yes, it was designed for scalability
[19:59:59] josevalim: we did run benchmarks on machines with 40 cores and it had excellent perf
[20:00:39] josevalim: but you need to set the number of partitions
[20:00:47] josevalim: the default is 1, depending on your usage you may want to increase it
[20:01:00] josevalim: like one per core
[20:03:53] sinni800: does every partition share the contents pretty much?
[20:04:57] josevalim: no, we do some hashing
[20:07:06] sinni800: the amount of entries will actually be pretty limited, because i am talking about pools here. there will not be that many databases at one time
[20:16:43] iautom8things: has joined #elixir-lang
[20:16:44] BitBot: has joined #elixir-lang
[20:17:50] josevalim: yeah, so a single partition should be fine
[20:24:09] sinni800: i'll think about changing it later, if it gets too slow
[20:27:02] tutti: has joined #elixir-lang
[20:31:23] squall: has joined #elixir-lang
[20:52:37] jnoon2: has joined #elixir-lang
[20:59:28] Sgeo: has joined #elixir-lang
[20:59:43] Adkron: has joined #elixir-lang
[21:22:47] Sgeo_: has joined #elixir-lang
[21:27:40] Sgeo: has joined #elixir-lang
[21:31:19] notzmv: has joined #elixir-lang
[21:46:45] work_: has joined #elixir-lang
[22:05:01] Sgeo_: has joined #elixir-lang
[22:15:44] tutti: has joined #elixir-lang
[22:29:34] jnoon2: has joined #elixir-lang
[22:57:28] Guest42: has joined #elixir-lang
[23:07:46] Adkron: has joined #elixir-lang
[23:12:54] __charly__: has joined #elixir-lang
[23:15:42] griffinbyatt: has joined #elixir-lang
[23:18:51] jnoon2: has joined #elixir-lang
[23:32:36] starbelly: josevalim: Thanks for the binary optimizations in OTP 22 😁
[23:36:36] JuanMiguel: has joined #elixir-lang
[23:44:18] iautom8things: has joined #elixir-lang