« Back to channel list

#elixir-lang - 08 May 2019

« Back 1 day Forward 1 day »
[00:05:49] craigp: has joined #elixir-lang
[01:06:38] carldd: has joined #elixir-lang
[01:33:24] sevenseacat: has joined #elixir-lang
[01:37:23] jnoon2: i have module attributes that im currently duplicating in 2 files because they are used in guards in the files (when x in @myattr). is there a way to abstract these into one common file? I tried making a new module with them with functions to expose them, but then they cant be used in the guards from the other files
[01:40:43] ariedler: has joined #elixir-lang
[01:54:28] tomterl: has joined #elixir-lang
[01:56:18] ariedler: has joined #elixir-lang
[02:10:06] pera: has joined #elixir-lang
[02:10:54] uplime: I have a list of keyword lists that looks like this: args = [[type: :atom, val: 'n'], [type: :atom, val: 'm'], [type: :atom, val: 'o']]. Is there an easy way to turn that into %{ 'n' => 0, 'm' => 1, 'o' => 2 } ?
[02:16:46] uplime: i've got this right now, but it's pretty ugly https://clbin.com/F39Jz
[02:50:38] benwilson512: https://www.irccloud.com/pastebin/1HFsDOTV/
[03:00:25] uplime: ah, beautiful
[03:00:29] uplime: thanks again benwilson512
[03:18:56] duaneb: has joined #elixir-lang
[03:20:34] greengriminal: has joined #elixir-lang
[03:22:29] carldd: has joined #elixir-lang
[03:25:50] notzmv: has joined #elixir-lang
[03:27:33] __charly__: has joined #elixir-lang
[03:30:42] Saukk: has joined #elixir-lang
[03:38:09] juba: has joined #elixir-lang
[03:41:08] mbuf: has joined #elixir-lang
[03:49:12] mozzarella: has joined #elixir-lang
[03:56:34] ariedler: has joined #elixir-lang
[04:32:55] pera: has joined #elixir-lang
[04:57:52] gvaughn: has joined #elixir-lang
[05:06:56] za1b1tsu: has joined #elixir-lang
[05:07:06] lauromoura_: has joined #elixir-lang
[05:15:08] voltone: has joined #elixir-lang
[05:17:13] mbuf: has joined #elixir-lang
[05:53:10] kapil____: has joined #elixir-lang
[06:05:47] serafeim: has joined #elixir-lang
[06:05:59] serafeim: good morning
[06:09:22] gvaughn: has joined #elixir-lang
[06:36:25] proteusguy: has joined #elixir-lang
[06:44:40] mbuf: has joined #elixir-lang
[06:46:07] Tarsir: has joined #elixir-lang
[07:14:02] gvaughn: has joined #elixir-lang
[07:17:29] Tarsir: has joined #elixir-lang
[07:18:41] gabrielpoca: has joined #elixir-lang
[07:21:31] proteusguy: has joined #elixir-lang
[07:28:03] lexmag: has joined #elixir-lang
[07:40:56] kyrylo: has joined #elixir-lang
[07:49:00] jmcgnh_: has joined #elixir-lang
[07:49:47] jkva: has joined #elixir-lang
[07:51:46] jkva: Morning! I'm fairly new to Elixir, and I'm trying to understand its idioms better.
[07:53:02] jkva: Say I have a module, and its dependent functions all rely on common credentials, such as Some.Module.function("foo")
[07:54:18] jkva: And I would bind the result, e.g. `result = Some.Module.function("foo")` and hopefully be able to afterwards chain it e.g. `result.bar()`, `result.baz()`
[07:55:12] jkva: I imagine I could do that using a closure, which returns some form of MapList, with `[key] => fn` structure
[07:55:21] jkva: But that seems to defeat the idea of a Module
[07:55:31] jkva: So I'm probably not approaching this right
[07:55:35] Nicd-: feels like you are trying to do OOP in a functional language
[07:55:44] jkva: Doesn't it :) yeah
[07:55:53] jkva: And I'd love to learn the proper approach instead
[07:56:15] Nicd-: could you elaborate more on "common credentials"?
[07:56:29] Nicd-: what would `.bar()` and `.baz()` do?
[07:57:28] jkva: I'm trying to write a form of API client via `HTTPoison` and so I'd like to seed its routines `some_request`, `some_other_request` with proper credentials so I can provide a simple Module API that you only have to initialise once
[07:57:37] jkva: So the user doesn't have to provide their credentials each time
[07:58:22] ariedler: has joined #elixir-lang
[07:58:46] dysfun: just wrap it in a function?
[07:59:12] jkva: @dysfun how would that work in combination with an elixir module?
[07:59:50] dysfun: just create a function that returns the configuration you need
[08:00:07] dysfun: sorry, i have to dive onto a call now, but in general, if you want to reuse stuff, just wrap it in a function
[08:00:42] jkva: ACTION thinks
[08:00:45] sevenseacat: that doesn't seem like really helpful advice
[08:00:55] dysfun: incidentally, i know another jkva, but i guess that's now you
[08:01:14] jkva: dysfun unless you're techpractical
[08:01:16] dysfun: sevenseacat: i wish i had more time to go into it, but it's exactly what we do
[08:01:19] dysfun: jkva: i am
[08:01:25] jkva: Yeah same jkva
[08:01:25] dysfun: hello job
[08:01:35] dysfun: elixir! whatever next?
[08:01:40] jkva: I know right
[08:01:58] dysfun: when i get off my call i'll show you how we do it, although we dont do it with httpoison
[08:02:08] jkva: I love the language, have been reading Programming Elixir 1.6, but coming from non-functional apart from lots of Perl, some things elude me
[08:03:30] dysfun: heh, perl is functional if you ignore lots of it
[08:03:51] jkva: I understand how I can maintain state in a closure, that'd have been my first guess, but then I'd have to wrap the entire module in a closure and that seems the wrong approach
[08:04:19] dysfun: you don't maintain state, as such
[08:04:20] jkva: I mean in Perl I'd write a function that returns a hash with a bunch of subs, probably.
[08:04:23] dysfun: you pass the modified value around
[08:04:42] dysfun: (no idea how long i've got til the vidconf software starts working btw)
[08:08:10] dysfun: so it's been a while since i used httppoison, but iirc you can construct the request ahead of time and pass it
[08:08:21] dysfun: certainly we have an abstraction that permits this
[08:08:29] dysfun: (though ours uses hackney under the hood)
[08:09:30] jkva: In this case I'd need the arguments to construct part of the endpoint url, which I'd like to do only once ideally
[08:09:49] jkva: And I keep having the nagging feeling that Elixir's way of doing things isn't clicking for me yet
[08:10:38] dysfun: my call is on now, talk to you in an hour
[08:15:27] micmus: jkva: take a look at how ex_aws works - you split making requests in two parts - you first build a data structure that represents the request - including config, etc. Then you can execute this by passing it to a common request function
[08:15:47] micmus: For me that's very much the preferred way of doing API clients in Elixir
[08:15:49] jkva: micmus: will have a look, thanks
[08:22:47] jkva: Ah, this is very useful :)
[08:52:20] gvaughn: has joined #elixir-lang
[08:55:04] dysfun: jkva: ok i'm back if you're still stuck
[08:55:40] jkva: dysfun: digging through ex_aws by micmus advice, but wouldn't mind a chat if you have time
[08:56:13] dysfun: yes, i think if you catch me before i start working on idris-elixir, i have a few minutes
[09:02:18] ur5us: has joined #elixir-lang
[09:03:17] lexmag: has joined #elixir-lang
[09:12:25] ur5us: has joined #elixir-lang
[09:19:24] serafeim: is anybody using IEx.pry() for debugging phoenix ?
[09:20:57] CornishPasty: Serafeim: I have done
[09:21:09] svennidal: has joined #elixir-lang
[09:21:19] serafeim: CornishPasty did you experience any disconnects in your IEx.pry session ?
[09:21:27] CornishPasty: I think I did
[09:21:39] serafeim: CornishPasty because when I try it it disconnects after 1-2 minutes
[09:21:59] CornishPasty: Serafeim: in tests or normal?
[09:22:10] serafeim: in my development system
[09:22:25] serafeim: not in tests while running a controller though the browser
[09:23:27] CornishPasty: I believe it could be the HTTP timeout - https://www.poeticoding.com/dealing-with-long-running-http-requests-and-timeouts-in-phoenix/
[09:24:59] serafeim: CornishPasty thank you this is very interesting ! i'll try increasing the cowboy timeout
[09:25:11] CornishPasty: I'm not 100% positive that's what it is, but it could be
[09:28:08] serafeim: cross my fingers
[09:28:28] voltone: has joined #elixir-lang
[09:33:39] za1b1tsu: if anyone played arround with ex aws s3, S3.upload(file_stream, "my-bucket", "path/on/s3"), the path on s3 part means I can change the name of the file on s3? I am using Temp library for temporary files and it adds a suffix to my file
[09:35:40] areski: has joined #elixir-lang
[09:35:42] voltone: has joined #elixir-lang
[09:36:05] areski: has joined #elixir-lang
[09:36:30] areski: has joined #elixir-lang
[09:36:55] areski: has joined #elixir-lang
[09:37:20] areski: has joined #elixir-lang
[09:37:44] areski: has joined #elixir-lang
[09:38:11] areski: has joined #elixir-lang
[09:38:36] areski: has joined #elixir-lang
[09:39:01] areski: has joined #elixir-lang
[09:39:26] areski: has joined #elixir-lang
[09:39:51] areski: has joined #elixir-lang
[09:40:15] areski: has joined #elixir-lang
[09:40:41] areski: has joined #elixir-lang
[09:41:06] areski: has joined #elixir-lang
[09:41:31] areski: has joined #elixir-lang
[09:41:56] areski: has joined #elixir-lang
[09:42:21] areski: has joined #elixir-lang
[09:42:46] areski: has joined #elixir-lang
[09:43:11] areski: has joined #elixir-lang
[09:43:36] areski: has joined #elixir-lang
[09:44:01] areski: has joined #elixir-lang
[09:44:25] areski: has joined #elixir-lang
[09:44:50] areski: has joined #elixir-lang
[09:45:15] areski: has joined #elixir-lang
[09:45:40] areski: has joined #elixir-lang
[09:46:05] areski: has joined #elixir-lang
[09:46:28] areski: has joined #elixir-lang
[09:46:53] areski: has joined #elixir-lang
[09:47:21] areski: has joined #elixir-lang
[09:47:46] areski: has joined #elixir-lang
[09:48:11] areski: has joined #elixir-lang
[09:48:36] areski: has joined #elixir-lang
[09:49:02] areski: has joined #elixir-lang
[09:49:26] areski: has joined #elixir-lang
[09:49:52] areski: has joined #elixir-lang
[09:50:17] areski: has joined #elixir-lang
[09:50:42] areski: has joined #elixir-lang
[09:51:07] areski: has joined #elixir-lang
[09:51:31] areski: has joined #elixir-lang
[09:51:57] areski: has joined #elixir-lang
[09:52:21] areski: has joined #elixir-lang
[09:52:46] areski: has joined #elixir-lang
[09:53:11] areski: has joined #elixir-lang
[09:53:36] areski: has joined #elixir-lang
[09:54:01] areski: has joined #elixir-lang
[09:54:25] areski: has joined #elixir-lang
[09:54:50] areski: has joined #elixir-lang
[09:55:15] areski: has joined #elixir-lang
[09:55:40] areski: has joined #elixir-lang
[09:56:05] areski: has joined #elixir-lang
[09:56:30] areski: has joined #elixir-lang
[09:56:56] areski: has joined #elixir-lang
[09:57:14] hypercore: has joined #elixir-lang
[09:57:21] areski: has joined #elixir-lang
[09:57:45] areski: has joined #elixir-lang
[09:58:11] areski: has joined #elixir-lang
[09:58:35] areski: has joined #elixir-lang
[09:58:51] asabil: has joined #elixir-lang
[09:59:00] areski: has joined #elixir-lang
[09:59:18] ariedler: has joined #elixir-lang
[09:59:25] areski: has joined #elixir-lang
[09:59:50] areski: has joined #elixir-lang
[10:00:16] areski: has joined #elixir-lang
[10:00:40] areski: has joined #elixir-lang
[10:01:05] areski: has joined #elixir-lang
[10:01:10] ur5us: has joined #elixir-lang
[10:01:30] areski: has joined #elixir-lang
[10:01:55] areski: has joined #elixir-lang
[10:02:17] areski: has joined #elixir-lang
[10:02:42] areski: has joined #elixir-lang
[10:03:08] areski: has joined #elixir-lang
[10:03:33] areski: has joined #elixir-lang
[10:03:55] gvaughn: has joined #elixir-lang
[10:03:58] areski: has joined #elixir-lang
[10:04:23] areski: has joined #elixir-lang
[10:04:48] areski: has joined #elixir-lang
[10:05:11] areski: has joined #elixir-lang
[10:05:34] areski: has joined #elixir-lang
[10:05:59] areski: has joined #elixir-lang
[10:06:25] areski: has joined #elixir-lang
[10:06:49] areski: has joined #elixir-lang
[10:07:13] areski: has joined #elixir-lang
[10:07:41] areski: has joined #elixir-lang
[10:08:06] areski: has joined #elixir-lang
[10:08:33] areski: has joined #elixir-lang
[10:08:58] areski: has joined #elixir-lang
[10:09:23] areski: has joined #elixir-lang
[10:09:48] areski: has joined #elixir-lang
[10:10:13] areski: has joined #elixir-lang
[10:10:39] areski: has joined #elixir-lang
[10:11:06] areski: has joined #elixir-lang
[10:11:31] areski: has joined #elixir-lang
[10:11:56] areski: has joined #elixir-lang
[10:12:21] areski: has joined #elixir-lang
[10:12:48] areski: has joined #elixir-lang
[10:13:13] areski: has joined #elixir-lang
[10:13:38] areski: has joined #elixir-lang
[10:14:03] areski: has joined #elixir-lang
[10:14:28] areski: has joined #elixir-lang
[10:14:53] areski: has joined #elixir-lang
[10:15:18] areski: has joined #elixir-lang
[10:15:44] areski: has joined #elixir-lang
[10:16:08] areski: has joined #elixir-lang
[10:16:33] areski: has joined #elixir-lang
[10:16:58] areski: has joined #elixir-lang
[10:17:23] areski: has joined #elixir-lang
[10:17:48] areski: has joined #elixir-lang
[10:18:11] areski: has joined #elixir-lang
[10:18:36] areski: has joined #elixir-lang
[10:19:00] areski: has joined #elixir-lang
[10:19:25] areski: has joined #elixir-lang
[10:19:44] greengriminal: has joined #elixir-lang
[10:19:50] areski: has joined #elixir-lang
[10:20:15] areski: has joined #elixir-lang
[10:20:40] areski: has joined #elixir-lang
[10:21:06] areski: has joined #elixir-lang
[10:21:23] DTZUZO: has joined #elixir-lang
[10:21:33] areski: has joined #elixir-lang
[10:21:58] areski: has joined #elixir-lang
[10:22:23] areski: has joined #elixir-lang
[10:22:48] areski: has joined #elixir-lang
[10:23:13] areski: has joined #elixir-lang
[10:23:35] areski: has joined #elixir-lang
[10:24:00] areski: has joined #elixir-lang
[10:24:27] areski: has joined #elixir-lang
[10:24:44] lexmag: has joined #elixir-lang
[10:24:52] areski: has joined #elixir-lang
[10:25:17] areski: has joined #elixir-lang
[10:25:42] areski: has joined #elixir-lang
[10:26:07] areski: has joined #elixir-lang
[10:26:33] areski: has joined #elixir-lang
[10:27:00] areski: has joined #elixir-lang
[10:27:03] voltone: has joined #elixir-lang
[10:27:25] areski: has joined #elixir-lang
[10:27:48] lexmag: has joined #elixir-lang
[10:27:50] areski: has joined #elixir-lang
[10:28:15] areski: has joined #elixir-lang
[10:28:42] areski: has joined #elixir-lang
[10:29:05] areski: has joined #elixir-lang
[10:29:31] areski: has joined #elixir-lang
[10:29:56] areski: has joined #elixir-lang
[10:30:21] areski: has joined #elixir-lang
[10:30:46] areski: has joined #elixir-lang
[10:31:11] areski: has joined #elixir-lang
[10:31:35] areski: has joined #elixir-lang
[10:32:01] areski: has joined #elixir-lang
[10:32:26] areski: has joined #elixir-lang
[10:32:51] areski: has joined #elixir-lang
[10:33:16] areski: has joined #elixir-lang
[10:33:39] areski: has joined #elixir-lang
[10:34:03] areski: has joined #elixir-lang
[10:34:28] areski: has joined #elixir-lang
[10:34:53] areski: has joined #elixir-lang
[10:35:18] areski: has joined #elixir-lang
[10:35:43] areski: has joined #elixir-lang
[10:36:08] areski: has joined #elixir-lang
[10:36:33] areski: has joined #elixir-lang
[10:36:59] areski: has joined #elixir-lang
[10:37:27] areski: has joined #elixir-lang
[10:37:52] areski: has joined #elixir-lang
[10:38:17] areski: has joined #elixir-lang
[10:38:17] asabil: has joined #elixir-lang
[10:38:42] areski: has joined #elixir-lang
[10:39:09] areski: has joined #elixir-lang
[10:39:35] areski: has joined #elixir-lang
[10:39:59] areski: has joined #elixir-lang
[10:40:25] areski: has joined #elixir-lang
[10:40:49] areski: has joined #elixir-lang
[10:41:15] areski: has joined #elixir-lang
[10:41:40] areski: has joined #elixir-lang
[10:42:03] areski: has joined #elixir-lang
[10:42:30] areski: has joined #elixir-lang
[10:42:47] w09x: has joined #elixir-lang
[10:42:54] areski: has joined #elixir-lang
[10:43:19] areski: has joined #elixir-lang
[10:43:39] gabrielpoca: has joined #elixir-lang
[10:43:45] areski: has joined #elixir-lang
[10:44:10] areski: has joined #elixir-lang
[10:44:34] areski: has joined #elixir-lang
[10:44:59] areski: has joined #elixir-lang
[10:45:23] areski: has joined #elixir-lang
[10:45:49] areski: has joined #elixir-lang
[10:46:15] areski: has joined #elixir-lang
[10:46:40] areski: has joined #elixir-lang
[10:47:05] areski: has joined #elixir-lang
[10:47:30] areski: has joined #elixir-lang
[10:47:54] areski: has joined #elixir-lang
[10:48:19] areski: has joined #elixir-lang
[10:48:44] areski: has joined #elixir-lang
[10:49:09] areski: has joined #elixir-lang
[10:49:36] areski: has joined #elixir-lang
[10:50:02] areski: has joined #elixir-lang
[10:50:27] areski: has joined #elixir-lang
[10:50:52] areski: has joined #elixir-lang
[10:51:17] areski: has joined #elixir-lang
[10:51:42] areski: has joined #elixir-lang
[10:52:05] areski: has joined #elixir-lang
[10:52:30] areski: has joined #elixir-lang
[10:52:55] areski: has joined #elixir-lang
[10:53:20] areski: has joined #elixir-lang
[10:53:45] areski: has joined #elixir-lang
[10:54:11] areski: has joined #elixir-lang
[10:54:36] areski: has joined #elixir-lang
[10:55:01] areski: has joined #elixir-lang
[10:55:07] ariedler: has joined #elixir-lang
[10:55:26] areski: has joined #elixir-lang
[10:55:51] areski: has joined #elixir-lang
[10:56:16] areski: has joined #elixir-lang
[10:56:41] areski: has joined #elixir-lang
[10:57:06] areski: has joined #elixir-lang
[10:57:29] ur5us: has joined #elixir-lang
[10:57:31] areski: has joined #elixir-lang
[10:57:57] areski: has joined #elixir-lang
[10:58:24] areski: has joined #elixir-lang
[10:58:49] areski: has joined #elixir-lang
[10:59:14] areski: has joined #elixir-lang
[10:59:39] areski: has joined #elixir-lang
[11:00:52] areski: has joined #elixir-lang
[11:01:17] areski: has joined #elixir-lang
[11:01:42] areski: has joined #elixir-lang
[11:02:07] areski: has joined #elixir-lang
[11:02:32] areski: has joined #elixir-lang
[11:02:56] areski: has joined #elixir-lang
[11:03:23] areski: has joined #elixir-lang
[11:03:49] areski: has joined #elixir-lang
[11:04:14] areski: has joined #elixir-lang
[11:04:38] areski: has joined #elixir-lang
[11:05:03] areski: has joined #elixir-lang
[11:05:31] areski: has joined #elixir-lang
[11:05:56] areski: has joined #elixir-lang
[11:06:21] areski: has joined #elixir-lang
[11:06:46] areski: has joined #elixir-lang
[11:07:11] areski: has joined #elixir-lang
[11:07:38] areski: has joined #elixir-lang
[11:08:03] areski: has joined #elixir-lang
[11:08:28] areski: has joined #elixir-lang
[11:08:53] areski: has joined #elixir-lang
[11:09:18] areski: has joined #elixir-lang
[11:09:20] proteus-guy: has joined #elixir-lang
[11:09:41] areski: has joined #elixir-lang
[11:10:06] areski: has joined #elixir-lang
[11:10:31] areski: has joined #elixir-lang
[11:10:58] areski: has joined #elixir-lang
[11:11:23] areski: has joined #elixir-lang
[11:11:48] areski: has joined #elixir-lang
[11:12:13] areski: has joined #elixir-lang
[11:12:38] areski: has joined #elixir-lang
[11:13:01] areski: has joined #elixir-lang
[11:13:28] areski: has joined #elixir-lang
[11:13:45] tnez: has joined #elixir-lang
[11:13:46] griffinbyatt: has joined #elixir-lang
[11:13:53] areski: has joined #elixir-lang
[11:13:59] gvaughn: has joined #elixir-lang
[11:14:18] areski: has joined #elixir-lang
[11:14:43] areski: has joined #elixir-lang
[11:15:08] areski: has joined #elixir-lang
[11:15:33] areski: has joined #elixir-lang
[11:15:58] areski: has joined #elixir-lang
[11:16:23] areski: has joined #elixir-lang
[11:16:48] areski: has joined #elixir-lang
[11:17:13] areski: has joined #elixir-lang
[11:17:38] areski: has joined #elixir-lang
[11:17:46] gonz_: josevalim: Why are you editing posts from September last year, WTF?
[11:18:03] areski: has joined #elixir-lang
[11:18:11] gonz_: Did you run some kind of spelling fixer on past posts or are you going through them manually?
[11:18:18] josevalim: lol, did I?
[11:18:28] areski: has joined #elixir-lang
[11:18:37] gonz_: Yeah, I got a notification for a post that you edited yesterday, but the post is actually from Sep 18
[11:18:50] josevalim: sometimes someone likes a post, then i go read it again, and if there is a typo or something that is hard to understand I fix it
[11:18:53] areski: has joined #elixir-lang
[11:18:57] josevalim: i don't check the date, but i probably should, haha
[11:19:13] josevalim: but i don't change the meaning, if I do i leave an EDIT note
[11:19:21] areski: has joined #elixir-lang
[11:19:46] areski: has joined #elixir-lang
[11:20:11] areski: has joined #elixir-lang
[11:20:36] areski: has joined #elixir-lang
[11:21:01] areski: has joined #elixir-lang
[11:21:26] areski: has joined #elixir-lang
[11:21:51] areski: has joined #elixir-lang
[11:22:16] areski: has joined #elixir-lang
[11:22:40] josevalim: gonz_: I see, i removed a `'s` :D
[11:22:41] areski: has joined #elixir-lang
[11:23:06] areski: has joined #elixir-lang
[11:23:31] areski: has joined #elixir-lang
[11:23:56] areski: has joined #elixir-lang
[11:24:21] areski: has joined #elixir-lang
[11:24:21] gonz_: Yeah, yeah, I know
[11:24:25] gonz_: But just leave it, man :D
[11:24:46] areski: has joined #elixir-lang
[11:25:09] areski: has joined #elixir-lang
[11:25:35] areski: has joined #elixir-lang
[11:26:00] areski: has joined #elixir-lang
[11:26:25] areski: has joined #elixir-lang
[11:26:50] areski: has joined #elixir-lang
[11:27:15] areski: has joined #elixir-lang
[11:27:34] voltone: has joined #elixir-lang
[11:27:40] areski: has joined #elixir-lang
[11:28:05] areski: has joined #elixir-lang
[11:28:31] areski: has joined #elixir-lang
[11:28:55] areski: has joined #elixir-lang
[11:29:16] josevalim: well, sometimes i am explaining elixir concepts, or providing answers, i think being gramatically correct and clear is important
[11:29:20] areski: has joined #elixir-lang
[11:29:45] areski: has joined #elixir-lang
[11:30:10] areski: has joined #elixir-lang
[11:30:35] areski: has joined #elixir-lang
[11:31:01] areski: has joined #elixir-lang
[11:31:26] areski: has joined #elixir-lang
[11:31:51] areski: has joined #elixir-lang
[11:32:16] areski: has joined #elixir-lang
[11:32:41] areski: has joined #elixir-lang
[11:33:06] areski: has joined #elixir-lang
[11:33:20] drincruz: has joined #elixir-lang
[11:33:30] areski: has joined #elixir-lang
[11:33:52] areski: has joined #elixir-lang
[11:34:17] areski: has joined #elixir-lang
[11:34:42] areski: has joined #elixir-lang
[11:35:07] areski: has joined #elixir-lang
[11:35:34] areski: has joined #elixir-lang
[11:35:57] areski: has joined #elixir-lang
[11:36:24] areski: has joined #elixir-lang
[11:36:48] areski: has joined #elixir-lang
[11:37:13] areski: has joined #elixir-lang
[11:37:38] areski: has joined #elixir-lang
[11:38:03] areski: has joined #elixir-lang
[11:38:28] areski: has joined #elixir-lang
[11:38:54] areski: has joined #elixir-lang
[11:39:18] areski: has joined #elixir-lang
[11:39:43] areski: has joined #elixir-lang
[11:40:08] areski: has joined #elixir-lang
[11:40:33] areski: has joined #elixir-lang
[11:41:00] areski: has joined #elixir-lang
[11:41:24] areski: has joined #elixir-lang
[11:42:19] areski: has joined #elixir-lang
[11:42:44] areski: has joined #elixir-lang
[11:43:07] areski: has joined #elixir-lang
[11:43:33] areski: has joined #elixir-lang
[11:43:42] kkkkkkkksa: has joined #elixir-lang
[11:43:48] gonz_: Yeah, this wasn't that, though
[11:43:58] areski: has joined #elixir-lang
[11:44:05] gazler_: I did wonder why discourse bumped that post.
[11:44:23] areski: has joined #elixir-lang
[11:44:48] areski: has joined #elixir-lang
[11:45:02] josevalim: gonz_: sure, I am just explaining why I have the habit of doing so, that's all
[11:45:14] areski: has joined #elixir-lang
[11:45:35] josevalim: gazler_: wait, it bumps the whole thread again?
[11:45:40] areski: has joined #elixir-lang
[11:46:05] areski: has joined #elixir-lang
[11:46:30] areski: has joined #elixir-lang
[11:46:53] areski: has joined #elixir-lang
[11:47:07] gonz_: I think probably everyone who has an event connected to it somehow gets a bump
[11:47:18] gonz_: I got a "quoted you" bump
[11:47:18] areski: has joined #elixir-lang
[11:47:29] gonz_: But I'd assume it's like that for every trigger
[11:47:43] areski: has joined #elixir-lang
[11:48:08] areski: has joined #elixir-lang
[11:48:33] areski: has joined #elixir-lang
[11:48:58] areski: has joined #elixir-lang
[11:49:22] areski: has joined #elixir-lang
[11:49:45] gazler_: josevalim: It did, I can't find it now though.
[11:49:47] areski: has joined #elixir-lang
[11:49:51] Tarsir: has joined #elixir-lang
[11:50:06] josevalim: ugh, sorry then. i guess i will stop doing that
[11:50:12] areski: has joined #elixir-lang
[11:50:37] areski: has joined #elixir-lang
[11:50:39] lexmag: has joined #elixir-lang
[11:50:58] gazler_: https://meta.discourse.org/t/minor-editing-should-not-bump-the-topic/18840
[11:51:02] areski: has joined #elixir-lang
[11:51:18] gazler_: Ah, it is because it is an edit to the last post.
[11:51:28] areski: has joined #elixir-lang
[11:51:54] areski: has joined #elixir-lang
[11:52:03] asabil: has joined #elixir-lang
[11:52:15] gazler_: Most people don't have the ability to edit posts on the forum anyway.
[11:52:20] areski: has joined #elixir-lang
[11:52:45] areski: has joined #elixir-lang
[11:53:10] areski: has joined #elixir-lang
[11:53:35] areski: has joined #elixir-lang
[11:54:00] areski: has joined #elixir-lang
[11:54:11] josevalim: gazler_: i guess even less reasons for me to do so then
[11:54:17] gvaughn: has joined #elixir-lang
[11:54:55] areski: has joined #elixir-lang
[11:55:20] areski: has joined #elixir-lang
[11:55:27] gazler_: josevalim: Find some threads that you really liked and just edit the most recent post.
[11:55:45] areski: has joined #elixir-lang
[11:56:10] areski: has joined #elixir-lang
[11:56:35] areski: has joined #elixir-lang
[11:56:59] jegaxd26: has joined #elixir-lang
[11:57:00] areski: has joined #elixir-lang
[11:57:23] areski: has joined #elixir-lang
[11:57:49] areski: has joined #elixir-lang
[11:58:13] areski: has joined #elixir-lang
[11:58:38] areski: has joined #elixir-lang
[11:59:05] areski: has joined #elixir-lang
[11:59:30] areski: has joined #elixir-lang
[11:59:55] areski: has joined #elixir-lang
[12:00:20] areski: has joined #elixir-lang
[12:00:45] areski: has joined #elixir-lang
[12:01:08] areski: has joined #elixir-lang
[12:01:32] areski: has joined #elixir-lang
[12:01:57] areski: has joined #elixir-lang
[12:02:21] gazler_: josevalim: Will 1.9 officially support OTP 22?
[12:02:22] areski: has joined #elixir-lang
[12:02:45] areski: has joined #elixir-lang
[12:02:45] gazler_: https://hexdocs.pm/elixir/master/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp says 20-21
[12:03:10] areski: has joined #elixir-lang
[12:03:35] areski: has joined #elixir-lang
[12:04:00] areski: has joined #elixir-lang
[12:04:11] jkva: Is it considered an antipattern to store yet-to-be-interpolated string in config? As a string template of sorts?
[12:04:21] proteusguy: has joined #elixir-lang
[12:04:25] areski: has joined #elixir-lang
[12:04:52] areski: has joined #elixir-lang
[12:05:14] areski: has joined #elixir-lang
[12:05:40] areski: has joined #elixir-lang
[12:06:04] areski: has joined #elixir-lang
[12:06:29] areski: has joined #elixir-lang
[12:06:57] areski: has joined #elixir-lang
[12:07:20] areski: has joined #elixir-lang
[12:07:45] areski: has joined #elixir-lang
[12:08:10] areski: has joined #elixir-lang
[12:08:31] Nicd-: jkva: can you show a real use case?
[12:08:35] areski: has joined #elixir-lang
[12:09:00] areski: has joined #elixir-lang
[12:09:17] snapet: has joined #elixir-lang
[12:09:25] areski: has joined #elixir-lang
[12:09:50] areski: has joined #elixir-lang
[12:10:10] josevalim: gazler_: yes. we will also do a backport to v1.8 to make sure latest v1.8 supports latest 22
[12:10:11] jkva: Nicd: it was a bad idea.
[12:10:14] areski: has joined #elixir-lang
[12:10:39] areski: has joined #elixir-lang
[12:11:05] areski: has joined #elixir-lang
[12:11:29] areski: has joined #elixir-lang
[12:11:54] areski: has joined #elixir-lang
[12:12:19] areski: has joined #elixir-lang
[12:12:46] areski: has joined #elixir-lang
[12:13:12] areski: has joined #elixir-lang
[12:13:25] gazler_: josevalim: Cool, thanks.
[12:13:37] areski: has joined #elixir-lang
[12:13:55] josevalim: gazler_: right, we can't support what was not released yet :)
[12:14:01] areski: has joined #elixir-lang
[12:14:24] areski: has joined #elixir-lang
[12:14:50] areski: has joined #elixir-lang
[12:15:14] areski: has joined #elixir-lang
[12:15:40] areski: has joined #elixir-lang
[12:16:06] areski: has joined #elixir-lang
[12:16:30] areski: has joined #elixir-lang
[12:16:55] areski: has joined #elixir-lang
[12:17:20] areski: has joined #elixir-lang
[12:17:45] areski: has joined #elixir-lang
[12:18:09] areski: has joined #elixir-lang
[12:18:36] areski: has joined #elixir-lang
[12:19:01] areski: has joined #elixir-lang
[12:19:26] areski: has joined #elixir-lang
[12:19:41] Nicd-: can we get rid of areski? :D they fill my screen even though I have join/quits collapsed, they appear between every line
[12:19:51] areski: has joined #elixir-lang
[12:20:16] areski: has joined #elixir-lang
[12:20:43] areski: has joined #elixir-lang
[12:21:09] areski: has joined #elixir-lang
[12:21:34] areski: has joined #elixir-lang
[12:21:59] areski: has joined #elixir-lang
[12:22:24] areski: has joined #elixir-lang
[12:22:47] areski: has joined #elixir-lang
[12:23:10] CornishPasty: yeah it is quite annoying
[12:23:14] areski: has joined #elixir-lang
[12:23:39] areski: has joined #elixir-lang
[12:24:04] areski: has joined #elixir-lang
[12:24:29] areski: has joined #elixir-lang
[12:24:54] areski: has joined #elixir-lang
[12:25:19] areski: has joined #elixir-lang
[12:25:58] jegaxd26: has joined #elixir-lang
[12:26:14] areski: has joined #elixir-lang
[12:26:39] areski: has joined #elixir-lang
[12:27:04] areski: has joined #elixir-lang
[12:27:29] areski: has joined #elixir-lang
[12:27:54] areski: has joined #elixir-lang
[12:28:18] areski: has joined #elixir-lang
[12:28:44] areski: has joined #elixir-lang
[12:29:09] areski: has joined #elixir-lang
[12:29:34] areski: has joined #elixir-lang
[12:29:59] areski: has joined #elixir-lang
[12:30:24] areski: has joined #elixir-lang
[12:31:17] areski: has joined #elixir-lang
[12:31:43] areski: has joined #elixir-lang
[12:32:08] areski: has joined #elixir-lang
[12:32:33] areski: has joined #elixir-lang
[12:32:58] areski: has joined #elixir-lang
[12:33:22] areski: has joined #elixir-lang
[12:33:49] areski: has joined #elixir-lang
[12:34:14] areski: has joined #elixir-lang
[12:34:39] areski: has joined #elixir-lang
[12:35:04] areski: has joined #elixir-lang
[12:35:29] areski: has joined #elixir-lang
[12:36:26] areski: has joined #elixir-lang
[12:36:50] areski: has joined #elixir-lang
[12:37:15] areski: has joined #elixir-lang
[12:37:24] __charly__: has joined #elixir-lang
[12:37:40] areski: has joined #elixir-lang
[12:38:05] areski: has joined #elixir-lang
[12:38:31] areski: has joined #elixir-lang
[12:38:55] areski: has joined #elixir-lang
[12:39:20] areski: has joined #elixir-lang
[12:39:45] areski: has joined #elixir-lang
[12:40:10] areski: has joined #elixir-lang
[12:40:35] areski: has joined #elixir-lang
[12:41:02] areski: has joined #elixir-lang
[12:41:25] areski: has joined #elixir-lang
[12:41:50] areski: has joined #elixir-lang
[12:41:54] josevalim: i collapse those, what is happening?
[12:42:00] josevalim: the user is joining and coming back all the time?
[12:42:15] areski: has joined #elixir-lang
[12:42:40] areski: has joined #elixir-lang
[12:43:05] areski: has joined #elixir-lang
[12:43:30] areski: has joined #elixir-lang
[12:43:31] josevalim: By the Power of Chanserv
[12:43:36] ChanServ: +o josevalim
[12:43:55] areski: has joined #elixir-lang
[12:44:15] josevalim: ok, I have no idea what I do now, lol
[12:44:20] areski: has joined #elixir-lang
[12:44:45] areski: has joined #elixir-lang
[12:45:10] areski: has joined #elixir-lang
[12:45:35] areski: has joined #elixir-lang
[12:46:00] areski: has joined #elixir-lang
[12:46:25] areski: has joined #elixir-lang
[12:46:30] josevalim: Nicd-, CornishPasty: I don't see the user around. is it still happening?
[12:46:51] areski: has joined #elixir-lang
[12:47:02] josevalim: +b *!~areski@123.red-83-56-36.staticip.rima-tde.net
[12:47:07] josevalim: ok, i think I got it
[12:47:31] Nicd-: I would say yes https://usercontent.irccloud-cdn.com/file/WN70WlR6/Screenshot_20190508-154716.png
[12:47:52] Nicd-: Thanks :)
[12:48:02] josevalim: on the positive side, nobody will complain about the github logs anymore
[12:48:26] josevalim: has left #elixir-lang: ()
[12:48:31] josevalim: has joined #elixir-lang
[12:48:50] duaneb: has joined #elixir-lang
[12:50:17] Nicd-: GitHub logs?
[12:58:32] asabil: has joined #elixir-lang
[13:05:36] duaneb: has joined #elixir-lang
[13:13:25] asabil: has joined #elixir-lang
[13:13:27] josevalim: the commits and PRs and stuff
[13:13:33] josevalim: some people don't like that
[13:14:16] Nicd-: oh yeah I have those ignored
[13:14:34] Nicd-: I suppose I could have ignored areski too now that I think of it
[13:40:38] asabil: has joined #elixir-lang
[13:50:51] drincruz: has joined #elixir-lang
[13:56:47] gvaughn: has joined #elixir-lang
[13:57:13] wsieroci: has joined #elixir-lang
[14:02:50] __charly__: has joined #elixir-lang
[14:05:50] greengriminal: has joined #elixir-lang
[14:10:18] josevalim: micmus: the work of finding literals in the bytecode and making them point to certain addresses in memory is done when the beam is loaded?
[14:12:55] josevalim: hrm, I think the compiler generates the index of literals already?
[14:13:04] josevalim: so the loader only has to put them in an array
[14:13:20] josevalim: and the VM executes something like a get_literal instruction
[14:30:14] tnez: has joined #elixir-lang
[14:33:33] duaneb: has joined #elixir-lang
[14:35:53] kyrylo: has joined #elixir-lang
[14:42:06] josevalim: hi, it is me, José from the future: https://github.com/elixir-plug/plug/issues/837
[14:43:09] duaneb: has joined #elixir-lang
[14:44:17] micmus: josevalim: yeah, the compiler does it in a way that it emits {:literal, _} operands and then they are specially encoded in the beam files. The loader loads them in memory and sets the operands to the real address
[14:49:49] jeffro: has joined #elixir-lang
[14:50:52] jkva: Does `Enum` have a function to transform a Map into a subset k/v pair of that Map?
[14:51:14] benwilson512: jkva: you may want Map.take
[14:51:24] benwilson512: if you're simply looking to grab a subset of keys
[14:51:51] jkva: benwilson512: I was looking at that one, I must misunderstand the docs on it
[14:52:06] jkva: I'll read up on enumerables, thanks
[14:52:11] benwilson512: jkva: also possible that I'm missunderstanding your question too :)
[14:52:17] benwilson512: can you show an example input / output?
[14:52:52] jkva: `%{ :foo: 1, :bar: 2}` => `%{ :foo: 1 }`
[14:53:12] jkva: I'm _really_ new to Elixir ;)
[14:53:17] benwilson512: iex(1)> %{ foo: 1, bar: 2} |> Map.take([:foo])
[14:53:22] benwilson512: jkva: not a problem, and welcome!
[14:53:30] jkva: Ah that simple!
[14:54:01] benwilson512: yeah the whole "Enumerable.t" bit in the docs just means that the `[:foo]` arg doesn't need to be a list
[14:54:06] benwilson512: it can be any enumerable that contains keys
[14:54:09] benwilson512: so for example
[14:54:30] benwilson512: https://www.irccloud.com/pastebin/59fVemO9/
[14:54:49] benwilson512: here the second arg is a MapSet not a list, but since MapSet implements the enumerable protocol, that works too
[14:55:41] jkva: My first data was actually a list, but I could use `Enum.into()` to make a Map out of it, woo
[14:57:28] drincruz: has joined #elixir-lang
[15:00:26] ariedler: has joined #elixir-lang
[15:03:19] jkva: Man, function argument destructuring is lovely
[15:07:06] voltone: has joined #elixir-lang
[15:14:01] Phylock: has joined #elixir-lang
[15:19:20] nickjj: is there a more idiomatic way of setting a default string value to a schema attribute that might be nil? https://gist.github.com/nickjj/189397938981a934a2b34559eb08b4b8
[15:19:41] nickjj: the above functions but it looks a little weird to me but after experimenting a bit, that's the best i could come up with as an elixir beginner
[15:21:24] benwilson512: nickjj: `user |> Map.update!(:username, & &1 || "Anonymous" end)`
[15:21:38] benwilson512: oh you aren't changing the map
[15:21:40] benwilson512: then in that case just
[15:21:46] benwilson512: username = user.username || "Anonymous
[15:21:50] nickjj: yeah it's just for a preview feature
[15:22:38] nickjj: thanks, yeah that's a million times cleaner, i keep forgetting elixir supports || like that
[15:22:58] drincruz_: has joined #elixir-lang
[15:24:53] notzmv: has joined #elixir-lang
[15:29:01] icecreamcohen: has joined #elixir-lang
[15:41:45] aalmazan: has joined #elixir-lang
[15:43:12] halfbit: has joined #elixir-lang
[15:44:01] halfbit: I'm tempted to replace my cowboy 2 + jquery + erlang part of my overall erlang app with elixir, phoenix, and vue...
[15:44:13] halfbit: phoenix is still using cowboy 1 though right
[15:46:31] voltone: has joined #elixir-lang
[15:51:09] halfbit: oh looks like it can optionally use cowboy 2
[15:58:13] griffinbyatt: has joined #elixir-lang
[15:59:52] lexmag: has joined #elixir-lang
[16:18:43] Saukk: has joined #elixir-lang
[16:20:02] lauromoura_: has joined #elixir-lang
[16:27:40] jnoon2: has joined #elixir-lang
[16:29:47] icecreamcohen: has joined #elixir-lang
[16:31:29] DeadTrickster: has joined #elixir-lang
[16:38:22] jnoon2: i built a nif around some existing c++ code. the c++ function im calling into is expensive and takes ~250ms on the c++ side alone. does anyone know if nifs are loaded once and everything that calls the nif is on that nif's process' "stack"? im looking for ways to maybe have multiple "workers" that each load the nif
[16:38:33] lexmag: has joined #elixir-lang
[16:52:36] laut: has joined #elixir-lang
[17:03:53] paxis: has joined #elixir-lang
[17:06:17] OliverMT: jnoon2: what you want is called 'dirty scheduling' on a 'dirty nif'
[17:06:17] OliverMT: http://erlang.org/doc/man/erl_nif.html
[17:06:25] OliverMT: ctrl +f for "dirty" there and go read up :)
[17:06:55] OliverMT: if you dirty it up you should just be able to call it from different elixir processes and it should smp itself up as you'd expect naturally
[17:07:15] OliverMT: another commonly used workaround is to simply transform nif to a cli tool and call it through a Port
[17:08:33] griffinbyatt: has joined #elixir-lang
[17:13:57] serafeim: has joined #elixir-lang
[17:22:13] dysfun: i think i've found a bug in ecto :/
[17:22:39] wsieroci: has joined #elixir-lang
[17:30:15] jnoon2: OliverMT: excellent, thanks! ports do sound interesting for the particular problem, but im still learning. eventually id like to spin up a "render server" for each persistent channel connection. that would cut down a lot of the ~250ms on the c++ side for setup/teardown of one-off calls
[17:37:46] greengriminal: has joined #elixir-lang
[17:39:27] dysfun: when i insert a model with timestamps(type: :utc_datetime_usec), i get them back with usec precision, but when i then query for it, i get it back with the microseconds zeroed out
[17:39:56] dysfun: (recent postgres)
[17:40:06] benwilson512: dysfun: did you create the column with usec precision?
[17:40:41] dysfun: do you have to? isn't it the same underlying data type on the postgres end?
[17:42:28] benwilson512: hm, we use utc_datetime_usec and the datetimes I retrieve have non 0 usec values
[17:42:49] dysfun: there are no queries being issued between the create and retrieve
[17:43:22] dysfun: i can see the query is inserting them with full precision
[17:44:58] serafeim: usecs seem to be problematic: https://github.com/ZennerIoT/ex_audit/issues/14
[17:46:06] dysfun: that's a problem the other way
[17:48:10] work_: has joined #elixir-lang
[17:52:04] dysfun: aha, timestamp(0) with time zone
[17:53:40] antranigv: friends. why can't I remote_console when it's built for prod but works fine for dev?
[17:54:07] antranigv: I see a header, but no prompt :/
[17:56:29] dysfun: that wasn't it :/
[18:01:56] serafeim: has joined #elixir-lang
[18:05:40] mahmudov: has joined #elixir-lang
[18:10:01] jkva: Within a `Supervisor` I can find a child by its PID, but not by the custom `id` I gave the child in its spec, correct?
[18:11:57] dysfun: what do you mean find a child?
[18:13:20] jkva: A process managed by the supervisor.
[18:13:37] jkva: From the looks of it I can either use the `:global` registry or use my own
[18:14:02] jkva: ACTION goes afk for a bit
[18:14:16] dysfun: no, what do you mean find it
[18:15:17] wsieroci: has joined #elixir-lang
[18:28:57] dysfun: good news, it was micmus' fault
[19:02:19] ariedler: has joined #elixir-lang
[19:03:58] jkva: @dysfun look it up by something other than its `PID`. Looks like a `Registry` is the way to go
[19:04:39] kyrylo: has joined #elixir-lang
[19:06:20] netrino: has joined #elixir-lang
[19:18:01] za1b1tsu: has joined #elixir-lang
[19:33:11] duaneb: has joined #elixir-lang
[19:35:07] jeffro_: has joined #elixir-lang
[19:58:31] icecreamcohen: has joined #elixir-lang
[19:59:04] greengriminal: has joined #elixir-lang
[20:12:19] jeffweiss: has joined #elixir-lang
[20:13:39] thurloat8: has joined #elixir-lang
[20:14:14] raindrop: has joined #elixir-lang
[20:14:18] MuffinPimp: has joined #elixir-lang
[20:15:02] gazler__: has joined #elixir-lang
[20:15:11] Liru: has joined #elixir-lang
[20:15:27] cryptomata: has joined #elixir-lang
[20:15:30] samrose: has joined #elixir-lang
[20:17:37] Robdor: has joined #elixir-lang
[20:18:13] greengriminal: has joined #elixir-lang
[20:20:49] verto: has joined #elixir-lang
[20:23:24] LnL: has joined #elixir-lang
[20:23:25] fxer: has joined #elixir-lang
[20:23:25] fxer: has joined #elixir-lang
[20:23:48] tomku: has joined #elixir-lang
[20:24:07] lexmag: has joined #elixir-lang
[20:26:04] greengriminal: has joined #elixir-lang
[20:27:56] proteusguy: has joined #elixir-lang
[20:28:14] mahmudov: has joined #elixir-lang
[20:28:47] povilas: has joined #elixir-lang
[20:28:51] Guest99428: has joined #elixir-lang
[20:29:59] shiro[cloud]: has joined #elixir-lang
[20:31:44] greengriminal: has joined #elixir-lang
[20:46:11] craigp: has joined #elixir-lang
[20:46:50] mahtob: has joined #elixir-lang
[20:56:02] gamache: What are some reasons the BEAM would kill a GenServer unrequested?
[20:56:50] benwilson512: gamache: might be easier to work off of the logged message
[21:00:08] dysfun: jkva: sorry didn't see your highlight because you slack-style @-prefixed it
[21:00:16] gamache: 20:58:28.926 [error] GenServer #PID<0.244.25> terminating
[21:00:16] gamache: ** (stop) killed
[21:00:17] gamache: Last message: {:EXIT, #PID<0.13443.25>, :killed}
[21:00:30] dysfun: jkva: you can register with a name and then you will be able to look it up by name
[21:00:32] gamache: I wish I had more clues to give you
[21:00:58] dysfun: jkva: but names are really not designed for complex selection, they're just a shorthand
[21:01:01] jkva: dysfun: via `which_children` or so?
[21:01:20] jkva: I ended up using `:via` and a `Registry`, works well
[21:01:32] jkva: I mean, I had to have a mapping _somewhere_
[21:01:44] dysfun: which_children just returns a list though?
[21:01:55] jkva: dysfun: right, it's a question from my part
[21:02:08] dysfun: well which_children just lists the children
[21:02:19] dysfun: you can search that data via normal collection functions
[21:02:20] jkva: I figured perhaps I wasn't using it right
[21:02:32] dysfun: well normally we don't worry about finding particular children and such
[21:02:59] jkva: You don't? What's the recommended pattern for message dispatching to the proper process?
[21:03:01] dysfun: the concept of the global and local namespaces (global = per cluster, local = per node) is just registering processes under a given name for access by name instead of just by pid
[21:03:17] dysfun: well, normally we just register them as local or global names
[21:03:42] dysfun: but we don't ask the supervisor for them, if you just try to send a message to a name, it'll lookup the pid, or you can use whereis
[21:03:47] jkva: But I don't seem to get anything else than a `PID`
[21:04:12] jkva: So if I need to be sure that a particular process needs to get a message, I need some form of mapping of `my_id => PID`
[21:04:21] jkva: Which a Registry seems a good construction for
[21:05:03] dysfun: no, if you know when you build the app 'i will have a process doing x at name foo', you can just register it under the name foo
[21:05:19] dysfun: you only need something bigger if you need to depend on runtime data
[21:05:48] jkva: dysfun: I registered them under particular names first, but then I did not know how to address it
[21:05:59] jkva: for the `GenServer.call` calls
[21:06:18] dysfun: GenServer.call(:name, :whatever)
[21:06:53] dysfun: our docs suck, i know
[21:07:21] jkva: Well, at least I figured out how a registry works
[21:07:31] dysfun: they'll be useful at some point probably
[21:08:02] jkva: I can only hope :P
[21:08:25] dysfun: well you know, getting to grips with libraries is a skill in and of itself, good to have practice
[21:10:07] jkva: Yep. Struggling to get the lay of the land for this language will take a while. I recall learning Perl as a young nerdlet and just not understanding what any of it meant
[21:10:25] dysfun: heh, i sympathise
[21:10:31] jkva: Part of it is the "I know what I want to make, I just don't know the right approach in $lang"
[21:10:33] dysfun: even coming from erlang to elixir i had a few surprises
[21:10:46] dysfun: pure functions and not mutating things :)
[21:11:39] jkva: For instance I'd like to define a number of different events, e.g. `Close`, `Open`, `Pause` and match on those. In Scala I'd use Case Classes, and in Elixir I'd probably want to use a struct or something like it
[21:11:50] dysfun: you'd use a bunch of structs, yes
[21:12:00] jkva: Right, since they can structurally differ
[21:12:07] jkva: And they seem to have support for mandatory keys too
[21:12:22] dysfun: yes, that's the @enforce_keys we discussed earlier
[21:12:32] dysfun: that will stop you from filling out a struct with too little info
[21:12:39] jkva: Forgive me if I forgot a few things in the overload of information earlier today ;)
[21:13:23] dysfun: i do, of course
[21:16:48] jkva: ACTION heads off to bed, night folks
[21:26:07] ur5us: has joined #elixir-lang
[21:27:22] greengriminal: has joined #elixir-lang
[21:53:43] gvaughn: has joined #elixir-lang
[22:01:35] mozzarella: has joined #elixir-lang
[22:02:18] gvaughn_: has joined #elixir-lang
[22:03:34] __charly__: has joined #elixir-lang
[22:06:39] ariedler: has joined #elixir-lang
[22:29:07] greengriminal: has joined #elixir-lang
[22:46:20] icecreamcohen: has joined #elixir-lang
[23:07:26] pera: has joined #elixir-lang
[23:27:18] nickjj: is it standard for phoenix's tests to not reset your test database between runs?
[23:27:53] nickjj: currently with a default 1.4 set up if i run a test that adds something to my test db (what's configured in the test config), the next time i run mix test that existing data is still in the db which ultimately makes the 2nd run fail since data exists that shouldn't
[23:32:55] weird_error: has joined #elixir-lang
[23:34:39] weird_error: has joined #elixir-lang
[23:46:44] craigp: has joined #elixir-lang
[23:49:41] nickjj: false alarm, user error (as usual :D)
[23:56:54] benwilson512: nickjj: it isn't necessary since each test is in a transaction that is rolled back when the test finishes
[23:57:00] benwilson512: so nothing is ever committed
[23:58:10] nickjj: benwilson512, good to know, in my case i was doing something really stupid (things you do after you should have stopped programming 3 hours ago but got so happy progress was being made you powered onto what you would have started the next morning)