« Back to channel list

#elixir-lang - 24 April 2019

« Back 1 day Forward 1 day »
[00:00:01] craigp: has joined #elixir-lang
[00:05:47] sparogy: has joined #elixir-lang
[00:13:52] gde33: has joined #elixir-lang
[00:19:22] proteusguy: has joined #elixir-lang
[00:26:44] zigpaw: has joined #elixir-lang
[00:33:50] ariedler: has joined #elixir-lang
[00:44:27] Sentreen: has joined #elixir-lang
[00:45:22] KJF: has joined #elixir-lang
[00:46:42] sentreen_: has joined #elixir-lang
[00:51:48] manjaroi3: has joined #elixir-lang
[00:56:11] lauromoura_: has joined #elixir-lang
[01:03:22] laut: has joined #elixir-lang
[01:04:22] helpa: has joined #elixir-lang
[01:06:43] carldd: has joined #elixir-lang
[01:16:40] sevenseacat: has joined #elixir-lang
[01:36:59] Saukk: has joined #elixir-lang
[02:01:27] mahmudov: has joined #elixir-lang
[02:02:56] tomterl: has joined #elixir-lang
[02:09:09] infowolfe: has joined #elixir-lang
[02:09:09] infowolfe: has joined #elixir-lang
[02:34:42] sparogy: has joined #elixir-lang
[02:58:42] craigp: has joined #elixir-lang
[03:11:24] benwilson512: ctp: Map.merge with a merge function
[03:20:31] carldd: has joined #elixir-lang
[03:21:24] jeffro: has joined #elixir-lang
[03:37:09] gvaughn_: has joined #elixir-lang
[03:39:52] tomku: has joined #elixir-lang
[03:46:09] mbuf: has joined #elixir-lang
[04:01:16] kapil____: has joined #elixir-lang
[04:03:42] pera: has joined #elixir-lang
[04:04:10] mbuf: has joined #elixir-lang
[04:09:15] jeffro: has joined #elixir-lang
[04:33:10] Guest97: has joined #elixir-lang
[04:36:54] gvaughn: has joined #elixir-lang
[04:54:35] blahdodo: has joined #elixir-lang
[05:01:13] voltone: has joined #elixir-lang
[05:05:32] sparogy: has joined #elixir-lang
[05:20:00] jeffro: has joined #elixir-lang
[05:21:03] mdbm: has joined #elixir-lang
[05:37:18] gvaughn: has joined #elixir-lang
[05:41:24] zakora: has joined #elixir-lang
[05:57:13] lauromoura_: has joined #elixir-lang
[06:24:37] DTZUZO: has joined #elixir-lang
[06:26:20] mdbm_: has joined #elixir-lang
[06:51:08] gvaughn: has joined #elixir-lang
[06:53:21] mdbm_: when I run this:
[06:53:23] mdbm_: mix run -e "Issues.CLI.run([\"elixir-lang\", \"elixir\"])"
[06:53:27] mdbm_: I have the following error:
[06:53:39] mdbm_: 03:42:17.772 [error] Loading of c:/data/projects/elixir/issues/_build/dev/lib/issues/ebin/Elixir.Issues.GitHubIssues.beam failed: :badfile
[06:53:52] mdbm_: I'm total noob so it must be some stupid mistake ;(
[06:54:01] mdbm_: can anyone help? been stuck on this for so long
[06:59:53] josevalim: mdbm_: does it print anything more?
[07:01:50] josevalim: mdbm_: you can always try removing the _build directory and running `mix compile` again
[07:04:52] mdbm_: josevalim, https://pastebin.com/raw/MKVs7wSF
[07:04:52] Guest97: has joined #elixir-lang
[07:05:07] mdbm_: this is what prints when I just do compile
[07:05:19] josevalim: mdbm_: it seems to be a casing issue
[07:05:26] josevalim: maybe somewhere you write GitHub and another you write Github
[07:12:14] mdbm_: josevalim, thank you for helping out, that was it:) I can finally go on
[07:13:03] jeffro: has joined #elixir-lang
[07:15:00] erizawa: has joined #elixir-lang
[07:35:06] sparogy: has joined #elixir-lang
[07:38:31] orbyt_: has joined #elixir-lang
[07:45:03] lexmag: has joined #elixir-lang
[07:45:53] mdbm__: has joined #elixir-lang
[07:55:17] icanhazbroccoli: has joined #elixir-lang
[08:06:39] gvaughn: has joined #elixir-lang
[08:09:51] mdbm__: has joined #elixir-lang
[08:29:28] fredsir: has joined #elixir-lang
[08:30:51] mdbm_: has joined #elixir-lang
[08:51:22] mdbm_: has joined #elixir-lang
[09:05:49] kyrylo: has joined #elixir-lang
[09:07:15] Sentreen: has joined #elixir-lang
[09:18:22] mdbm__: has joined #elixir-lang
[09:21:13] gvaughn: has joined #elixir-lang
[09:23:27] lexmag: has joined #elixir-lang
[09:24:20] mdbm_: has joined #elixir-lang
[09:31:47] infowolfe: has joined #elixir-lang
[09:31:47] infowolfe: has joined #elixir-lang
[09:35:44] Cthalupa: has joined #elixir-lang
[09:37:57] ctp: Hi folks. I still struggle with merging two maps. Does someone has a hint for me? https://stackoverflow.com/questions/55826922/merging-elixir-maps
[09:42:49] Cthalupa: has joined #elixir-lang
[09:47:02] dysfun: ctp: pass a third argument which is a merging function
[09:47:13] dysfun: https://hexdocs.pm/elixir/Map.html#merge/3
[09:51:02] ctp: Hm, OK, I see this could help somehow, took a look at merge/3 yesterday, but how to actually concatenate those 2 lists just for the key c?
[09:51:51] dysfun: if k == c, do: v ++ v2, else: v2 ?
[09:53:37] Brenntron_: has joined #elixir-lang
[09:53:41] CornishPasty: has joined #elixir-lang
[09:54:11] tobias: has joined #elixir-lang
[09:54:50] harfangk: has joined #elixir-lang
[09:54:55] bryanjos: has joined #elixir-lang
[09:55:12] ctp: Aaaaaah, click :) You're my hero. Ofc :D
[09:55:52] hemulen_: has joined #elixir-lang
[09:56:41] Scorchin__: has joined #elixir-lang
[09:57:06] alisdair: has joined #elixir-lang
[09:57:16] lexmag: has joined #elixir-lang
[09:57:23] lackac: has joined #elixir-lang
[09:57:23] pmonson: has joined #elixir-lang
[09:57:24] cgbrewster: has joined #elixir-lang
[10:06:00] sparogy: has joined #elixir-lang
[10:06:38] lexmag: has joined #elixir-lang
[10:17:50] Ted19: has joined #elixir-lang
[10:21:38] serafeim: has joined #elixir-lang
[10:28:29] Notimik: has joined #elixir-lang
[10:31:05] Notimik: has joined #elixir-lang
[10:37:05] Guest97: has joined #elixir-lang
[10:37:24] gvaughn: has joined #elixir-lang
[10:40:59] griffinbyatt: has joined #elixir-lang
[10:41:34] craigp: has joined #elixir-lang
[10:53:10] voltone: has joined #elixir-lang
[11:02:20] lexmag: has joined #elixir-lang
[11:03:48] duaneb: has joined #elixir-lang
[11:04:50] lexmag: has joined #elixir-lang
[11:11:09] BitBot: has joined #elixir-lang
[11:15:22] mdbm__: has joined #elixir-lang
[11:27:54] 94KAAA8MN: has joined #elixir-lang
[11:33:38] voltone: has joined #elixir-lang
[11:41:53] duaneb: has joined #elixir-lang
[11:45:51] gvaughn: has joined #elixir-lang
[11:49:47] jeffro: has joined #elixir-lang
[11:54:16] netrino: has joined #elixir-lang
[12:01:12] mdbm: has joined #elixir-lang
[12:07:26] Guest97: has joined #elixir-lang
[12:08:33] tnez: has joined #elixir-lang
[12:24:23] lexmag: has joined #elixir-lang
[12:25:59] paxis: has joined #elixir-lang
[12:28:40] Jetimon: has joined #elixir-lang
[12:35:22] sparogy: has joined #elixir-lang
[12:42:25] MissingNoIOI: has joined #elixir-lang
[12:44:07] tomterl: has joined #elixir-lang
[12:46:25] brandfilt: has joined #elixir-lang
[12:51:31] duaneb: has joined #elixir-lang
[13:01:20] voltone: has joined #elixir-lang
[13:05:33] gvaughn: has joined #elixir-lang
[13:08:33] lexmag: has joined #elixir-lang
[13:14:05] Guest97: has joined #elixir-lang
[13:19:51] greengriminal: has joined #elixir-lang
[13:27:22] mdbm: has joined #elixir-lang
[13:30:54] voltone: has joined #elixir-lang
[13:40:54] lexmag: has joined #elixir-lang
[13:46:37] gvaughn: has joined #elixir-lang
[13:50:52] jeffro: has joined #elixir-lang
[13:55:40] Guest97: has joined #elixir-lang
[14:24:10] laut: has joined #elixir-lang
[14:31:13] wsieroci: has joined #elixir-lang
[14:36:41] mdbm_: has joined #elixir-lang
[14:37:09] Phylock: has joined #elixir-lang
[14:37:27] orbyt_: has joined #elixir-lang
[14:40:34] drewolson: is there a correct way to indicate "i don't intend to implement this protocol for other built-in types" that makes dialyzer happy?
[14:41:10] pera: has joined #elixir-lang
[14:47:46] mdbm__: has joined #elixir-lang
[14:49:21] nineczar: has joined #elixir-lang
[14:49:22] BitBot: has joined #elixir-lang
[15:00:10] linduxed: for Ecto, i've noticed that one can make a call to the Repo.transaction/2 callback without the last opts argument, essentially making it work like a transaction/1 (where the signature would have had "opts \\ []"). this is not documented here https://hexdocs.pm/ecto/Ecto.Repo.html#c:transaction/2
[15:00:23] linduxed: is this somehow intended?
[15:03:13] blahdodo: has joined #elixir-lang
[15:05:17] Guest97: has joined #elixir-lang
[15:40:01] gamache: linduxed: I think you are getting confused between the Ecto.Repo.transaction/2 callback spec, and its usage within an implementation of that behaviour like MyApp.Repo
[15:40:25] thomasross: has joined #elixir-lang
[15:41:07] linduxed: gamache: right, i'm referring to how it's used, like MyApp.Repo.transaction(fn -> :foo end)
[15:41:12] gamache: if you're implementing the behaviour, all you need to do is write the two-argument version, and end users can use the one-argument version automatically thanks to some plumbing the Ecto devs built
[15:41:32] gamache: so, yes, this is intended
[15:42:12] linduxed: do you happen to know where this plumbing is located in their code?
[15:42:21] linduxed: if not, then i'll find it myself
[15:46:29] gamache: it's in the `defmacro __using__` part of https://github.com/elixir-ecto/ecto/blob/v3.1.2/lib/ecto/repo.ex
[15:48:02] MissingNoIOI: has joined #elixir-lang
[15:48:33] linduxed: gamache: thank you!
[15:48:49] gamache: np, happy hacking!
[15:51:05] jeffro: has joined #elixir-lang
[15:55:07] duaneb: has joined #elixir-lang
[15:59:47] Guest97: has joined #elixir-lang
[16:26:38] duane__: has joined #elixir-lang
[16:29:47] Saukk: has joined #elixir-lang
[16:52:55] fredsir: has joined #elixir-lang
[16:54:50] duaneb: has joined #elixir-lang
[16:58:19] wsieroci: has joined #elixir-lang
[17:01:07] Guest97: has joined #elixir-lang
[17:07:53] _barcode_: has joined #elixir-lang
[17:28:25] jeffro: has joined #elixir-lang
[17:39:42] duaneb: has joined #elixir-lang
[17:50:31] duaneb: has joined #elixir-lang
[18:13:11] lexmag: has joined #elixir-lang
[18:25:47] brandfilt: has joined #elixir-lang
[18:29:11] netrino_: has joined #elixir-lang
[18:39:29] netrino: has joined #elixir-lang
[18:44:10] orbyt_: has joined #elixir-lang
[18:54:41] schainks: has joined #elixir-lang
[19:04:24] ariedler: has joined #elixir-lang
[19:28:47] orbyt_: has joined #elixir-lang
[19:30:14] nageV_: is there a way to disable :discard_threshold for Logger?
[19:31:32] nageV_: I want to turn off discarding altogether for some Flow instrumentation I'm doing (tracking the number of items going through my Flow over time)
[19:44:07] MissingNoIOI: has joined #elixir-lang
[19:45:37] orbyt_: has joined #elixir-lang
[19:53:15] squall: has joined #elixir-lang
[19:55:10] ariedler: has joined #elixir-lang
[19:55:40] greengriminal: has joined #elixir-lang
[20:03:17] greengriminal: has joined #elixir-lang
[20:07:33] rawtaz: oh no. just heard about Joe :<
[20:08:18] Randyr: has joined #elixir-lang
[20:17:52] kyrylo: has joined #elixir-lang
[20:33:45] gvaughn: has joined #elixir-lang
[21:06:10] Randyr: How do you people go about separating your web logic from your business logic in Phoenix contexts? I often end up with functions in my context that are still aware of things like pagination, preloads, etc. because these values are dependant on the controller.
[21:13:05] mk[]: Randyr: dependent how?
[21:14:07] Randyr: mk[]: The context still needs to understand the pagination scheme used in the controller, which relationships the user requested and should be preloaded, which filters should be applied, etc
[21:15:41] mk[]: Randyr: why not pass those as arguments to the context functions?
[21:15:48] revere: has joined #elixir-lang
[21:16:29] Randyr: mk[]: I do pass those as arguments, but it does mean that the contexts are aware of the web layer, which ideally it shouldn't (in my opinion).
[21:17:05] Randyr: Similarly, my controller should now be aware of the possible relationships on the schema that it might preload.
[21:17:23] mk[]: Randyr: pagination, preloads, and filters aren't web layer, they're "query layer"
[21:19:30] Randyr: mk[]: Yes, I agree, but take for example a JSON API. I can have `/users?include=posts&filter[name]=john`. I generally validate this before I pass it on onto the contexts.
[21:19:42] mk[]: Randyr: controllers usually authenticate, decode, and pass the values to the context/helper/service
[21:21:19] mk[]: Randyr: your controller then would call the validator, then if successful call the context
[21:23:13] Randyr: The validation of the query params like above happen in a plug for now, which is fine. But take for example the `?include=posts`. Posts in this case is a relationship on users. Since the validation happens in the controller, that means the controller is aware of the db relations.
[21:24:12] mk[]: take validation out of the controller then
[21:27:12] mk[]: put it into something like YourApp.UsersValidator
[21:36:38] greengriminal: has joined #elixir-lang
[21:49:25] starbelly: controller -> context -> pure data context -> back to context -> on to persistance, whatever
[21:50:33] starbelly: pure data context would no nothing except data in -> out, and contain your business rules
[21:50:39] starbelly: which includes validation
[21:50:42] starbelly: all IMO of course
[21:51:10] starbelly: ACTION also uses the word context loosely and doesn't subscribe to the term DDD 
[21:53:01] work_: has joined #elixir-lang
[21:57:14] mahmudov: has joined #elixir-lang
[22:02:27] sparogy: has joined #elixir-lang
[22:17:48] mdbm__: has joined #elixir-lang
[22:18:19] pera: has joined #elixir-lang
[22:23:12] mdbm_: has joined #elixir-lang
[22:34:23] paxis: has joined #elixir-lang
[23:05:08] helmut_1: has joined #elixir-lang
[23:05:44] helmut_1: has left #elixir-lang: ()
[23:18:47] Sgeo_: has joined #elixir-lang
[23:31:07] helmut_1: has joined #elixir-lang
[23:31:12] mdbm_: has joined #elixir-lang
[23:31:52] helmut_1: has left #elixir-lang: ()
[23:41:01] sparogy: has joined #elixir-lang
[23:45:33] gvaughn_: has joined #elixir-lang
[23:58:50] ariedler: has joined #elixir-lang