« Back to channel list

#elixir-lang - 07 May 2019

« Back 1 day Forward 1 day »
[00:01:16] jmcgnh: has joined #elixir-lang
[00:04:26] lauromoura: has joined #elixir-lang
[00:04:40] weird_error: has joined #elixir-lang
[00:06:05] craigp: has joined #elixir-lang
[00:20:37] jmcgnh: has joined #elixir-lang
[00:24:36] orbyt_: has joined #elixir-lang
[00:27:22] jmcgnh: has joined #elixir-lang
[00:33:40] jmcgnh: has joined #elixir-lang
[00:35:22] griffinbyatt: has joined #elixir-lang
[00:38:59] jmcgnh: has joined #elixir-lang
[00:42:21] jmcgnh: has joined #elixir-lang
[00:46:39] jmcgnh: has joined #elixir-lang
[00:53:11] jmcgnh: has joined #elixir-lang
[01:02:11] thomasross: has joined #elixir-lang
[01:05:34] carldd: has joined #elixir-lang
[01:06:21] jmcgnh: has joined #elixir-lang
[01:11:58] jnoon2: has joined #elixir-lang
[01:12:15] sevenseacat: has joined #elixir-lang
[01:16:03] jmcgnh: has joined #elixir-lang
[01:21:05] jmcgnh: has joined #elixir-lang
[01:28:49] pera: has joined #elixir-lang
[01:33:38] harfangk: has joined #elixir-lang
[01:47:00] KeyJoo: has joined #elixir-lang
[01:51:31] lauromoura: has joined #elixir-lang
[01:52:05] sparogy: has joined #elixir-lang
[01:55:19] tomterl: has joined #elixir-lang
[02:07:21] ariedler: has joined #elixir-lang
[02:08:00] Siyo: has joined #elixir-lang
[02:08:00] Siyo: has joined #elixir-lang
[02:10:59] notzmv: has joined #elixir-lang
[02:25:08] greengriminal: has joined #elixir-lang
[02:26:40] drincruz: has joined #elixir-lang
[02:28:41] uplime: has joined #elixir-lang
[02:35:30] uplime: has joined #elixir-lang
[02:38:53] iFire: has joined #elixir-lang
[02:57:46] griffinbyatt: has joined #elixir-lang
[03:17:26] Saukk: has joined #elixir-lang
[03:20:11] carldd: has joined #elixir-lang
[03:23:09] mdbm: has joined #elixir-lang
[03:51:05] fastfresh: has joined #elixir-lang
[03:59:17] iamvery: has joined #elixir-lang
[04:08:25] mbuf: has joined #elixir-lang
[04:22:49] sparogy: has joined #elixir-lang
[04:31:15] user2: has joined #elixir-lang
[04:53:50] proteusguy: has joined #elixir-lang
[04:59:56] mdbm: has joined #elixir-lang
[05:00:35] voltone: has joined #elixir-lang
[05:04:11] mdbm: why when I create an sha hash like this:
[05:04:13] mdbm: :crypto.hash_init(:sha) |> :crypto.hash_update("foo") |> :crypto.hash_final()
[05:05:11] mdbm: it results in non-printable characters (and thus it prints binaries)
[05:05:17] mdbm: <<11, 238, 199, 181, 234, 63, 15, 219, 201, 93, 13, 212, 127, 60, 91, 194, 117,
[05:05:17] mdbm: 218, 138, 51>>
[05:05:50] mdbm: when I create a hash from libraries from other languages, it results in a sequence of printable characters that I can store in db, right?
[05:06:26] Sgeo__: has joined #elixir-lang
[05:17:15] ur5us_: has joined #elixir-lang
[05:22:41] isHavvy: The printable characters that you can see is the conversion of the hash (a sequence of bytes) into a hexidecimal string.
[05:24:26] isHavvy: https://hexdocs.pm/elixir/Base.html#encode16/2
[05:25:55] mdbm: isHavvy, I didn't know that, thank you
[05:26:09] ur5us: has joined #elixir-lang
[05:27:47] isHavvy: Alternatively, don't encode it and store it in the database as a 20 byte binary. More space efficient.
[05:27:54] ur5us: has joined #elixir-lang
[05:30:49] gde33: has joined #elixir-lang
[05:31:22] nageV: has joined #elixir-lang
[05:33:00] ur5us_: has joined #elixir-lang
[05:41:40] mdbm: my GenServer callback "handle_cast" is not being called and I do not understand why:
[05:41:42] mdbm: https://pastebin.com/raw/k9zVTAHn
[05:42:15] mdbm: I have a function "store(hash, path)" which is called, IO.puts("Duper.Results.store") prints the log, but the cast doesn't work
[05:55:03] kapil____: has joined #elixir-lang
[05:55:05] Sgeo: has joined #elixir-lang
[06:06:15] gvaughn: has joined #elixir-lang
[06:07:37] l14n: has joined #elixir-lang
[06:20:31] mdbm: why wouldn't a cast work? :/
[06:22:37] Nicd-: are you sure the server is alive at that point?
[06:32:47] mdbm: Nicd-, why would it be stopped? how can I check it?
[06:33:07] Nicd-: I don't know why it would be stopped, I don't know your code
[06:33:08] netrino: has joined #elixir-lang
[06:33:45] Nicd-: unsure if a cast fails if the server is not running. might also be that it's stuck somewhere and not listening for messages
[06:34:03] Nicd-: you can open up observer if you are in iex and inspect the server status
[06:34:22] DTZUZO: has joined #elixir-lang
[06:37:36] DarkSeid: has joined #elixir-lang
[06:39:16] mdbm: Nicd-, thank you, I saw that my module was not inside "Applications" tab from observer
[06:39:28] mdbm: Nicd-, the module was not added into the supervisor...
[06:42:40] mdbm: Nicd-, can I ask you something else? I do this: Map.put(map, hash, [path | list]) and when I inspect the map IO.inspect(map) I have an empty map %{}
[06:42:51] mdbm: but I put a value in the map, so I don't get why it's empty
[06:43:07] Nicd-: values in Elixir are immutable
[06:43:20] Nicd-: so the Map.put returns a new copy but you did not bind it anywhere
[06:43:33] mdbm: Nicd-, omg!! right :/ bad habit
[06:46:51] ur5us: has joined #elixir-lang
[06:47:27] user2: has joined #elixir-lang
[06:49:16] hypercore: how can i serve a specific .js file? (and not the entire app.js)
[06:52:13] sparogy: has joined #elixir-lang
[07:04:43] Exuma: has joined #elixir-lang
[07:08:38] za1b1tsu: has joined #elixir-lang
[07:10:19] mdbm: what's the difference between kernel Functions and Kernel Guards?
[07:11:11] serafeim: has joined #elixir-lang
[07:13:52] gvaughn: has joined #elixir-lang
[07:18:43] serafeim: Hello I am using IEx.pry() to debug some phoenix controllers. notice I am using windows with iex --werl -S mix phx.server. in any case, it seems to be working so I can debug some things however after a little time (1 minute or so) the conneection is dropped with the following message ** (EXIT from #PID<0.458.0>) shell process exited with reason: sh
[07:19:05] serafeim: then I need to refresh the browser so that the IEx.pry is hit again :/
[07:19:17] serafeim: this is not nice for me
[07:19:34] PragTob: has joined #elixir-lang
[07:19:42] serafeim: because i may have added various aliases, or variables to the debug session and all is lost
[07:20:10] serafeim: is this a problem with IEX.pry or it is related to windows ? Or maybe i am doing something wrong ?
[07:31:26] lexmag: has joined #elixir-lang
[07:45:50] areski: has joined #elixir-lang
[07:46:15] areski: has joined #elixir-lang
[07:46:40] areski: has joined #elixir-lang
[07:49:54] mbuf: has joined #elixir-lang
[07:52:42] gvaughn: has joined #elixir-lang
[07:55:27] lexmag: has joined #elixir-lang
[08:02:08] lexmag: has joined #elixir-lang
[08:15:26] asabil: has joined #elixir-lang
[08:20:04] kyrylo: has joined #elixir-lang
[08:20:17] hypercore: has joined #elixir-lang
[08:27:46] serafeim: didn't get an answer so i'll ask again: I am using IEx.pry() to debug some phoenix controllers. notice I am using windows with iex --werl -S mix phx.server. in any case, it seems to be working so I can debug some things however after a little time (1 minute or so) the conneection is dropped with the following message ** (EXIT from #PID<0.458.0>) s
[08:27:46] serafeim: hell process exited with reason: shutdown
[08:28:06] serafeim: then I need to refresh the browser so that the IEx.pry is hit again :/ is this a problem with IEX.pry or it is related to windows ? Or maybe i am doing something wrong ?
[08:33:23] inoas: has joined #elixir-lang
[08:35:15] is0x3F: has joined #elixir-lang
[08:42:02] snapet_: has joined #elixir-lang
[08:44:50] wonko7: has joined #elixir-lang
[08:54:16] bind: has joined #elixir-lang
[08:58:11] lexmag: has joined #elixir-lang
[08:58:33] voltone: has joined #elixir-lang
[08:59:44] lexmag: has joined #elixir-lang
[09:02:17] areski: has joined #elixir-lang
[09:02:42] areski: has joined #elixir-lang
[09:03:07] areski: has joined #elixir-lang
[09:03:32] lpil: Perhaps there's a timeout somewhere in the Phoenix request stack that you're hitting Serafeim. Does it take the same amount of time every time?
[09:03:32] areski: has joined #elixir-lang
[09:03:57] areski: has joined #elixir-lang
[09:04:24] areski: has joined #elixir-lang
[09:04:31] serafeim: lpil yes I think its 1-2 minutes. i can see a bunch of stuff but then the session is lost
[09:04:46] serafeim: i haven't done anything special; i mostly use default things
[09:04:50] areski: has joined #elixir-lang
[09:05:15] areski: has joined #elixir-lang
[09:05:40] areski: has joined #elixir-lang
[09:06:01] gvaughn: has joined #elixir-lang
[09:06:05] areski: has joined #elixir-lang
[09:06:18] dysfun: plug timeout?
[09:06:32] areski: has joined #elixir-lang
[09:07:00] areski: has joined #elixir-lang
[09:07:27] areski: has joined #elixir-lang
[09:07:52] areski: has joined #elixir-lang
[09:08:17] areski: has joined #elixir-lang
[09:08:42] areski: has joined #elixir-lang
[09:09:07] areski: has joined #elixir-lang
[09:09:34] areski: has joined #elixir-lang
[09:10:00] areski: has joined #elixir-lang
[09:10:27] areski: has joined #elixir-lang
[09:10:52] areski: has joined #elixir-lang
[09:11:17] areski: has joined #elixir-lang
[09:11:42] areski: has joined #elixir-lang
[09:12:06] areski: has joined #elixir-lang
[09:12:32] areski: has joined #elixir-lang
[09:12:57] areski: has joined #elixir-lang
[09:13:22] areski: has joined #elixir-lang
[09:13:47] areski: has joined #elixir-lang
[09:14:12] areski: has joined #elixir-lang
[09:14:36] areski: has joined #elixir-lang
[09:15:02] areski: has joined #elixir-lang
[09:15:27] areski: has joined #elixir-lang
[09:15:51] areski: has joined #elixir-lang
[09:16:14] areski: has joined #elixir-lang
[09:16:39] areski: has joined #elixir-lang
[09:16:47] mdbm: I see this in some code sample:
[09:16:49] mdbm: def handle_cast(:done, _worker_count = 1) do
[09:17:01] mdbm: but what is " _worker_count = 1" used for?
[09:17:04] areski: has joined #elixir-lang
[09:17:29] areski: has joined #elixir-lang
[09:17:55] areski: has joined #elixir-lang
[09:18:20] areski: has joined #elixir-lang
[09:18:45] areski: has joined #elixir-lang
[09:19:10] areski: has joined #elixir-lang
[09:19:15] mdbm: my guess is that it's for matching 1 as the second argument, but he added a name (_worker_count) for the argument to increase readability?
[09:19:35] areski: has joined #elixir-lang
[09:19:52] Nicd-: yes, it's there for readability
[09:19:59] Nicd-: to denote what the value is meant to be
[09:20:02] areski: has joined #elixir-lang
[09:20:27] areski: has joined #elixir-lang
[09:20:51] areski: has joined #elixir-lang
[09:21:17] areski: has joined #elixir-lang
[09:21:41] areski: has joined #elixir-lang
[09:22:07] areski: has joined #elixir-lang
[09:22:18] hypercore: guys, how can i go about re-initializing a js-enhanced on after a dom change?
[09:22:25] sparogy: has joined #elixir-lang
[09:22:27] hypercore: really hitting a wall with this
[09:22:32] areski: has joined #elixir-lang
[09:22:55] areski: has joined #elixir-lang
[09:23:20] areski: has joined #elixir-lang
[09:23:44] areski: has joined #elixir-lang
[09:24:10] areski: has joined #elixir-lang
[09:24:28] mdbm: in this handle_cast, he does: System.halt(0) is this a good way to stop the system?
[09:24:32] mdbm: Nicd-, ^
[09:24:34] areski: has joined #elixir-lang
[09:24:43] Nicd-: check the docs
[09:25:01] areski: has joined #elixir-lang
[09:25:26] areski: has joined #elixir-lang
[09:25:51] areski: has joined #elixir-lang
[09:25:56] mdbm: Terminates the Erlang runtime system without properly shutting down applications and ports. Please see stop/1 for a careful shutdown of the system.
[09:25:58] mdbm: right...
[09:26:02] mdbm: dunno why he chose this function
[09:26:17] areski: has joined #elixir-lang
[09:26:40] areski: has joined #elixir-lang
[09:27:05] areski: has joined #elixir-lang
[09:27:30] areski: has joined #elixir-lang
[09:27:56] areski: has joined #elixir-lang
[09:28:21] areski: has joined #elixir-lang
[09:28:46] areski: has joined #elixir-lang
[09:29:00] Nicd-: where is that code from?
[09:29:07] Nicd-: maybe they don't need to do it carefully
[09:29:11] areski: has joined #elixir-lang
[09:29:36] areski: has joined #elixir-lang
[09:30:04] areski: has joined #elixir-lang
[09:30:29] areski: has joined #elixir-lang
[09:30:55] areski: has joined #elixir-lang
[09:31:22] areski: has joined #elixir-lang
[09:31:47] areski: has joined #elixir-lang
[09:32:10] areski: has joined #elixir-lang
[09:32:37] areski: has joined #elixir-lang
[09:33:00] areski: has joined #elixir-lang
[09:33:24] areski: has joined #elixir-lang
[09:33:50] areski: has joined #elixir-lang
[09:34:15] areski: has joined #elixir-lang
[09:34:40] areski: has joined #elixir-lang
[09:35:05] areski: has joined #elixir-lang
[09:35:30] areski: has joined #elixir-lang
[09:35:54] areski: has joined #elixir-lang
[09:36:17] areski: has joined #elixir-lang
[09:36:44] areski: has joined #elixir-lang
[09:37:09] areski: has joined #elixir-lang
[09:37:34] areski: has joined #elixir-lang
[09:38:00] areski: has joined #elixir-lang
[09:38:24] areski: has joined #elixir-lang
[09:38:47] areski: has joined #elixir-lang
[09:39:12] areski: has joined #elixir-lang
[09:39:37] areski: has joined #elixir-lang
[09:40:02] areski: has joined #elixir-lang
[09:40:27] areski: has joined #elixir-lang
[09:40:50] areski: has joined #elixir-lang
[09:41:17] areski: has joined #elixir-lang
[09:41:42] areski: has joined #elixir-lang
[09:42:07] areski: has joined #elixir-lang
[09:42:32] areski: has joined #elixir-lang
[09:42:55] areski: has joined #elixir-lang
[09:43:20] areski: has joined #elixir-lang
[09:43:45] areski: has joined #elixir-lang
[09:44:09] areski: has joined #elixir-lang
[09:44:34] areski: has joined #elixir-lang
[09:44:59] areski: has joined #elixir-lang
[09:45:24] areski: has joined #elixir-lang
[09:45:49] areski: has joined #elixir-lang
[09:46:15] areski: has joined #elixir-lang
[09:46:40] areski: has joined #elixir-lang
[09:47:05] areski: has joined #elixir-lang
[09:47:30] areski: has joined #elixir-lang
[09:47:55] areski: has joined #elixir-lang
[09:48:20] areski: has joined #elixir-lang
[09:48:47] areski: has joined #elixir-lang
[09:49:10] areski: has joined #elixir-lang
[09:49:19] vamsi: has joined #elixir-lang
[09:49:35] areski: has joined #elixir-lang
[09:50:00] areski: has joined #elixir-lang
[09:50:25] areski: has joined #elixir-lang
[09:50:50] areski: has joined #elixir-lang
[09:51:15] areski: has joined #elixir-lang
[09:51:15] vamsi: Hi, I am getting an error in a Phoenix App . I am getting no function clause matching in ProjWeb.UserController.sign_in/2
[09:51:27] vamsi: here is the code https://gist.github.com/vamsiautomatad/3c9235d459f6740a0a05da22d2081d4e
[09:51:40] areski: has joined #elixir-lang
[09:51:44] mdbm: Nicd-, Programming Elixir 1.6
[09:51:58] Nicd-: probably it's for just demonstrating
[09:52:05] areski: has joined #elixir-lang
[09:52:30] areski: has joined #elixir-lang
[09:52:43] Nicd-: vamsi: did you send the required data in the request?
[09:52:54] areski: has joined #elixir-lang
[09:53:17] areski: has joined #elixir-lang
[09:53:42] areski: has joined #elixir-lang
[09:54:07] areski: has joined #elixir-lang
[09:54:32] areski: has joined #elixir-lang
[09:54:55] areski: has joined #elixir-lang
[09:55:22] areski: has joined #elixir-lang
[09:55:47] areski: has joined #elixir-lang
[09:56:10] areski: has joined #elixir-lang
[09:56:35] areski: has joined #elixir-lang
[09:57:00] areski: has joined #elixir-lang
[09:57:25] areski: has joined #elixir-lang
[09:57:50] areski: has joined #elixir-lang
[09:58:16] areski: has joined #elixir-lang
[09:58:42] areski: has joined #elixir-lang
[09:59:10] areski: has joined #elixir-lang
[09:59:35] areski: has joined #elixir-lang
[10:00:00] areski: has joined #elixir-lang
[10:00:22] areski: has joined #elixir-lang
[10:00:46] areski: has joined #elixir-lang
[10:00:48] l14n_: has joined #elixir-lang
[10:01:11] areski: has joined #elixir-lang
[10:01:35] areski: has joined #elixir-lang
[10:02:00] areski: has joined #elixir-lang
[10:02:25] areski: has joined #elixir-lang
[10:02:50] areski: has joined #elixir-lang
[10:03:15] areski: has joined #elixir-lang
[10:03:37] areski: has joined #elixir-lang
[10:04:05] areski: has joined #elixir-lang
[10:04:30] areski: has joined #elixir-lang
[10:04:55] areski: has joined #elixir-lang
[10:05:18] areski: has joined #elixir-lang
[10:05:41] areski: has joined #elixir-lang
[10:06:08] areski: has joined #elixir-lang
[10:06:33] areski: has joined #elixir-lang
[10:06:52] vamsi: @Nicd yes
[10:06:57] areski: has joined #elixir-lang
[10:07:06] vamsi: I have sent the exact Json I need
[10:07:20] Nicd-: try adding a fallback clause
[10:07:22] areski: has joined #elixir-lang
[10:07:47] areski: has joined #elixir-lang
[10:07:47] Nicd-: something like `def sign_in(conn, params) do IO.inspect(params); send_resp(.....) end`
[10:08:04] Nicd-: that will then match and print out the params you got so you can see why they did not match
[10:08:11] areski: has joined #elixir-lang
[10:08:36] areski: has joined #elixir-lang
[10:09:00] areski: has joined #elixir-lang
[10:09:24] vamsi: @Nicd thanks for the reply, but I am relatively new to elixir. by fall back do you mean cond / case ? should I add it in the router ?
[10:09:25] areski: has joined #elixir-lang
[10:09:50] areski: has joined #elixir-lang
[10:10:15] areski: has joined #elixir-lang
[10:10:40] areski: has joined #elixir-lang
[10:10:48] Nicd-: no just write that function under your existing sign_in function
[10:10:57] Nicd-: it will act as a second clause for it
[10:11:07] areski: has joined #elixir-lang
[10:11:33] areski: has joined #elixir-lang
[10:11:51] Nicd-: in Elixir you can define many functions with the same name and just different parameters, then the first matching clause will be executed when the function is called
[10:11:58] areski: has joined #elixir-lang
[10:12:23] areski: has joined #elixir-lang
[10:12:50] areski: has joined #elixir-lang
[10:13:14] vamsi: @Nicd, ok, I understood what you meant now. I will try adding a sign_in function which takes wildcard params
[10:13:15] 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:52] vamsi: @Nicd there is a action_fallback AdvWeb.FallbackController in the controller .. does it matter ?
[10:14:53] areski: has joined #elixir-lang
[10:15:18] areski: has joined #elixir-lang
[10:15:33] vamsi: is there any way it's overriding ?
[10:15:42] areski: has joined #elixir-lang
[10:15:49] Nicd-: I've never used those. can you show the full error message you get and the full code you have?
[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:24] hypercore: did Ecto.Query.join get changed recently?
[10:17:27] vamsi: @Nicd : here is the full question I posted on stackoverflow https://stackoverflow.com/questions/56020117/poenix-no-function-clause-matching-in-projweb-usercontroller-sign-in-2
[10:17:48] areski: has joined #elixir-lang
[10:18:12] areski: has joined #elixir-lang
[10:18:38] areski: has joined #elixir-lang
[10:19:03] serafeim: i'll go the other way: is anybody using IEx.pry () ?
[10:19:03] areski: has joined #elixir-lang
[10:19:28] areski: has joined #elixir-lang
[10:19:47] Nicd-: vamsi: that does not contain the full code or the full error message
[10:19:53] areski: has joined #elixir-lang
[10:19:58] Nicd-: full means don't cut anything out unless it's a secret
[10:20:18] areski: has joined #elixir-lang
[10:20:45] areski: has joined #elixir-lang
[10:21:07] Nicd-: use gist.github.com or something
[10:21:12] areski: has joined #elixir-lang
[10:21:37] areski: has joined #elixir-lang
[10:22:02] areski: has joined #elixir-lang
[10:22:27] areski: has joined #elixir-lang
[10:22:53] areski: has joined #elixir-lang
[10:23:18] areski: has joined #elixir-lang
[10:23:22] gvaughn: has joined #elixir-lang
[10:23:43] areski: has joined #elixir-lang
[10:24:08] areski: has joined #elixir-lang
[10:24:20] vamsi: @Nicd here is gist https://gist.github.com/vamsiautomatad/56e15eecd4ceca10675758717bd5c0ad
[10:24:33] areski: has joined #elixir-lang
[10:24:54] serafeim: if you are not using IEx.pry() what are you using for debugging your phoenix controllers ?
[10:24:58] areski: has joined #elixir-lang
[10:25:23] areski: has joined #elixir-lang
[10:25:50] areski: has joined #elixir-lang
[10:26:15] areski: has joined #elixir-lang
[10:26:40] areski: has joined #elixir-lang
[10:27:05] areski: has joined #elixir-lang
[10:27:30] areski: has joined #elixir-lang
[10:27:53] areski: has joined #elixir-lang
[10:28:17] areski: has joined #elixir-lang
[10:28:42] areski: has joined #elixir-lang
[10:28:44] Nicd-: vamsi: from that you can see that the second argument was `%{}`
[10:28:50] Nicd-: an empty map, that's why it doesn't match
[10:28:55] Nicd-: how are you making the request?
[10:29:07] areski: has joined #elixir-lang
[10:29:32] areski: has joined #elixir-lang
[10:29:38] Nicd-: Serafeim: IO.inspect ;)
[10:29:57] areski: has joined #elixir-lang
[10:30:26] areski: has joined #elixir-lang
[10:30:51] areski: has joined #elixir-lang
[10:31:15] areski: has joined #elixir-lang
[10:31:24] hypercore: why are all of my queries breaking?
[10:31:30] hypercore: (after deps.update'ing)
[10:31:40] areski: has joined #elixir-lang
[10:32:07] areski: has joined #elixir-lang
[10:32:10] Nicd-: you updated to an incompatible version maybe
[10:32:18] Nicd-: or you just need to recompile and restart
[10:32:36] areski: has joined #elixir-lang
[10:33:01] areski: has joined #elixir-lang
[10:33:25] areski: has joined #elixir-lang
[10:33:50] areski: has joined #elixir-lang
[10:33:53] griffinbyatt: has joined #elixir-lang
[10:34:15] areski: has joined #elixir-lang
[10:34:41] areski: has joined #elixir-lang
[10:35:08] areski: has joined #elixir-lang
[10:35:24] hypercore: Nicd-: ok this is odd, when i run mix deps.compile, it starts compiling until it gets to cowby, then exits to shell with zero warnings/errors
[10:35:33] areski: has joined #elixir-lang
[10:35:46] Nicd-: rm -rf deps _build, then get deps and compile again
[10:35:54] Nicd-: that's what I usually do to fix those issues
[10:35:58] areski: has joined #elixir-lang
[10:36:23] areski: has joined #elixir-lang
[10:36:32] lpil: Hi gang. With the latest Ecto release it no longer always returns errors with fields that implement String.Chars, which breaks Phoenix. Is this an incorrect assumption in Phoenix's side, or is it a problem with Ecto?
[10:36:48] areski: has joined #elixir-lang
[10:37:15] areski: has joined #elixir-lang
[10:37:16] lpil: I'm leaning towards Ecto at the moment as I don't see how we could create human friendly error messages if the fields can't be turned into a string without the Inspect protocol
[10:37:42] areski: has joined #elixir-lang
[10:38:07] areski: has joined #elixir-lang
[10:38:21] vamsi: @Nicd I am using postman
[10:38:25] vamsi: and it's a valid json
[10:38:32] areski: has joined #elixir-lang
[10:38:57] areski: has joined #elixir-lang
[10:39:22] areski: has joined #elixir-lang
[10:39:47] areski: has joined #elixir-lang
[10:40:10] areski: has joined #elixir-lang
[10:40:37] areski: has joined #elixir-lang
[10:40:43] Nicd-: vamsi: it looks to me there is something wrong with the request
[10:41:02] areski: has joined #elixir-lang
[10:41:27] areski: has joined #elixir-lang
[10:41:51] Nicd-: for example this content-type header: `"content-type", "application/javascript"`
[10:41:52] areski: has joined #elixir-lang
[10:42:15] Nicd-: json should be `application/json`
[10:42:15] areski: has joined #elixir-lang
[10:42:35] hypercore: Nicd-: really strange, so i run "rm -rf deps _build; mix deps.get; mix deps.compile" and it works fine. Then i run "mix deps.compile" again and it stops at "Compiling cowboy"
[10:42:41] areski: has joined #elixir-lang
[10:43:03] Nicd-: hypercore: should it print something else?
[10:43:06] areski: has joined #elixir-lang
[10:43:11] asabil: has joined #elixir-lang
[10:43:26] hypercore: Nicd-: shouldn't it show "Compiling {x}" for where x = the set of all dependencies?
[10:43:31] areski: has joined #elixir-lang
[10:43:56] areski: has joined #elixir-lang
[10:44:20] areski: has joined #elixir-lang
[10:44:40] vamsi: @Nicd you are right
[10:44:46] areski: has joined #elixir-lang
[10:45:00] vamsi: changing the request header fixed the bug
[10:45:11] areski: has joined #elixir-lang
[10:45:26] Nicd-: hypercore: if it compiles cowboy last, then I would expect the output to end with `===> Compiling cowboy`
[10:45:35] areski: has joined #elixir-lang
[10:46:00] areski: has joined #elixir-lang
[10:46:04] hypercore: Nicd-: just uncertain because this is all mix deps.compile shows -> https://paste.ubuntu.com/p/yNW9WBqfvW/
[10:46:17] hypercore: instead of all the other packages i have
[10:46:25] areski: has joined #elixir-lang
[10:46:50] areski: has joined #elixir-lang
[10:46:52] Nicd-: maybe they were already compiled
[10:47:14] Nicd-: it's not going to compile things again if it detects they have already been compiled
[10:47:15] areski: has joined #elixir-lang
[10:47:23] hypercore: Nicd-: oh right, i thought it recompiles everything when i run that command
[10:47:38] Nicd-: use `--force` for that
[10:47:40] areski: has joined #elixir-lang
[10:47:44] serafeim: Nicd- l o l yes inspect is a solution however I don't like print-debugging because I don't have full control over my actions. on the other hand IEx.pry givesd me a session so I could do whatever I wished there
[10:47:52] hypercore: so yeah now i get "** (FunctionClauseError) no function clause matching in Ecto.Query.join/5 " on a function that has been working up until updating my deps
[10:48:05] hypercore: Nicd-: got it, will remember that
[10:48:05] areski: has joined #elixir-lang
[10:48:29] areski: has joined #elixir-lang
[10:48:55] areski: has joined #elixir-lang
[10:49:20] areski: has joined #elixir-lang
[10:49:45] areski: has joined #elixir-lang
[10:50:10] areski: has joined #elixir-lang
[10:50:32] Sgeo_: has joined #elixir-lang
[10:50:35] areski: has joined #elixir-lang
[10:51:00] areski: has joined #elixir-lang
[10:51:03] mat_bug: has joined #elixir-lang
[10:51:25] areski: has joined #elixir-lang
[10:51:49] areski: has joined #elixir-lang
[10:52:16] areski: has joined #elixir-lang
[10:52:40] areski: has joined #elixir-lang
[10:53:05] areski: has joined #elixir-lang
[10:53:27] za1b1tsu: can someone explain what the "namespace" in " use Phoenix.View, root: "lib/your_app_web/templates", namespace: "web"" is all about?
[10:53:30] areski: has joined #elixir-lang
[10:53:54] areski: has joined #elixir-lang
[10:54:19] areski: has joined #elixir-lang
[10:54:44] areski: has joined #elixir-lang
[10:55:06] ariedler: has joined #elixir-lang
[10:55:09] areski: has joined #elixir-lang
[10:55:35] areski: has joined #elixir-lang
[10:56:00] areski: has joined #elixir-lang
[10:56:25] areski: has joined #elixir-lang
[10:56:50] areski: has joined #elixir-lang
[10:57:15] areski: has joined #elixir-lang
[10:57:25] josevalim: that namespace doesn't make sense i think?
[10:57:33] josevalim: it should be something like namespace: YourAppWeb
[10:57:40] areski: has joined #elixir-lang
[10:57:43] josevalim: it is basically the name of the root where your views are defined
[10:58:06] areski: has joined #elixir-lang
[10:58:30] areski: has joined #elixir-lang
[10:58:32] _l14n_: has joined #elixir-lang
[10:58:55] areski: has joined #elixir-lang
[10:59:21] areski: has joined #elixir-lang
[10:59:25] hypercore: hey jose, tried updating my deps, but i think phoenix_live_view was up to date, and my ignored field was still updating in the changeset
[10:59:45] areski: has joined #elixir-lang
[11:00:09] hypercore: if it's working for everyone else though, could be some mistake on my end
[11:00:11] areski: has joined #elixir-lang
[11:00:15] josevalim: hypercore: so i am not sure what it may be
[11:00:35] areski: has joined #elixir-lang
[11:00:36] josevalim: keep in mind phx-ignore needs to guarantee that all parents are not removed either
[11:00:45] josevalim: if the whole parent for that thing is removed, then it will be removed too
[11:00:59] josevalim: lpil: github ui is broken, so I thought I would continue the discussion here
[11:01:01] areski: has joined #elixir-lang
[11:01:25] areski: has joined #elixir-lang
[11:01:50] areski: has joined #elixir-lang
[11:01:58] josevalim: lpil: i am wondering if we should change Phoenix to use getttext in there
[11:02:16] areski: has joined #elixir-lang
[11:02:40] areski: has joined #elixir-lang
[11:03:01] hypercore: i just had <input id="user_name" name="user[name]" phx-ignore=true>, as the direct child of my form_for function, so unless you're talking about the form_for element, it didn't have a parent element
[11:03:06] areski: has joined #elixir-lang
[11:03:30] areski: has joined #elixir-lang
[11:03:40] vamsi: @josevalim just wanted to say hello from india. been coding in OO since a decade . Elixir is making me to learn a lot of new stuff every day . Thanks
[11:03:54] areski: has joined #elixir-lang
[11:03:54] lpil: josevalim I was thinking that too
[11:04:15] josevalim: lpil: alternatively, we can do this:
[11:04:18] areski: has joined #elixir-lang
[11:04:18] josevalim: Regex.replace ~r/%\{(\w+)\}/, "foo %{omg} bar", fn _, key -> to_string(opts[String.to_atom(key)]) end
[11:04:18] lpil: But I can't check if phoenix always depends on gettext because it's down
[11:04:26] lpil: Github I mean 😅
[11:04:39] josevalim: lpil: someone just added a switch to disable gettext, so we would have to change that too
[11:04:43] areski: has joined #elixir-lang
[11:05:09] areski: has joined #elixir-lang
[11:05:22] josevalim: another option is to add anonymous function support to String.replace
[11:05:33] areski: has joined #elixir-lang
[11:05:36] lpil: To the error?
[11:05:59] areski: has joined #elixir-lang
[11:06:08] josevalim: lpil: someone added --no-gettext to phx.new
[11:06:24] areski: has joined #elixir-lang
[11:06:44] lexmag_: has joined #elixir-lang
[11:06:49] areski: has joined #elixir-lang
[11:07:13] areski: has joined #elixir-lang
[11:07:41] areski: has joined #elixir-lang
[11:07:41] lpil: It's a bit tricky to upgrade that code as it's written into the user's repo. Would we just update the generators and hope people find the new code somewhere?
[11:08:05] areski: has joined #elixir-lang
[11:08:17] josevalim: yeah, i know :(
[11:08:29] josevalim: on the positive side they will find it only if they use certain validations
[11:08:30] areski: has joined #elixir-lang
[11:08:37] lpil: What's the reason for not calling to_list on the enum?
[11:08:51] josevalim: ohhhhhhhhhhh
[11:08:52] lpil: Yeah it's been about a week and I'm the first reporter
[11:08:55] areski: has joined #elixir-lang
[11:09:03] josevalim: i see what you mean by calling to_list
[11:09:16] lpil: In the Ecto code
[11:09:23] areski: has joined #elixir-lang
[11:09:48] josevalim: the reason why i started the convo here is because i wanted to ask how that would help us in the first place, haha
[11:09:50] areski: has joined #elixir-lang
[11:10:15] areski: has joined #elixir-lang
[11:10:32] lpil: Is it clearer now? Call to_list on the enum so that it's always a list and thus implemented String.Chars. No change needed to Phoenix + user apps
[11:10:40] areski: has joined #elixir-lang
[11:10:52] lpil: Want me to do that?
[11:11:05] areski: has joined #elixir-lang
[11:11:10] josevalim: that would be great, i can ship a new release right after
[11:11:28] lpil: As soon as I can get back on github I'll do that
[11:11:30] areski: has joined #elixir-lang
[11:11:56] areski: has joined #elixir-lang
[11:12:20] lpil: Pesky software
[11:12:21] areski: has joined #elixir-lang
[11:12:46] areski: has joined #elixir-lang
[11:13:11] areski: has joined #elixir-lang
[11:13:35] areski: has joined #elixir-lang
[11:13:59] areski: has joined #elixir-lang
[11:14:02] josevalim: can you push? fetch?
[11:14:25] areski: has joined #elixir-lang
[11:14:33] josevalim: because i can't :(
[11:14:50] areski: has joined #elixir-lang
[11:15:11] lpil: I could a second ago but just lost it
[11:15:15] areski: has joined #elixir-lang
[11:15:19] josevalim: is it a ssh error?
[11:15:39] lpil: oh clone is working now
[11:15:40] areski: has joined #elixir-lang
[11:15:49] josevalim: The authenticity of host 'github.com (192.30.253.112)' can't be established.
[11:16:06] areski: has joined #elixir-lang
[11:16:30] areski: has joined #elixir-lang
[11:16:47] josevalim: ok, the key they show actually match the official ones from github :D
[11:16:55] lpil: Seems to be up for me now
[11:16:55] areski: has joined #elixir-lang
[11:17:20] areski: has joined #elixir-lang
[11:17:23] serafeim: yes gh also works fine for me
[11:17:45] areski: has joined #elixir-lang
[11:17:48] lpil: Huh. Does Ecto not use the formatter? I hit save and everything changed
[11:18:11] areski: has joined #elixir-lang
[11:18:32] DTZUZO: has joined #elixir-lang
[11:18:36] areski: has joined #elixir-lang
[11:19:00] areski: has joined #elixir-lang
[11:19:25] areski: has joined #elixir-lang
[11:19:50] areski: has joined #elixir-lang
[11:21:35] wonko7: has joined #elixir-lang
[11:21:44] dysfun: formatting *of* ecto code can be a bit lol
[11:24:40] wonko7: has joined #elixir-lang
[11:27:18] tnez: has joined #elixir-lang
[11:27:25] kyrylo: has joined #elixir-lang
[11:27:54] lpil: josevalim https://github.com/elixir-ecto/ecto/pull/2992
[11:29:27] gvaughn: has joined #elixir-lang
[11:31:30] josevalim: beautiful, thank you
[11:32:03] josevalim: lpil: yeah, i didn't get to run the formatter there yet
[11:32:34] josevalim: lpil: just to clarify, we will still get errors if you are validating inclusion in a list of atoms and similar
[11:32:39] josevalim: but i think that's a very remote possibility
[11:33:41] lpil: Oh yes good point
[11:33:54] lpil: Less likely though
[11:34:06] lpil: Seeing as changesets normally deal with user input
[11:45:45] josevalim: right, converting to atom BEFORE validating inclusion would be a mistake
[11:52:06] sparogy: has joined #elixir-lang
[12:02:58] greengriminal: has joined #elixir-lang
[12:06:30] za1b1tsu: Anybody used this library bettyblocks/liquid-elixir https://github.com/bettyblocks/liquid-elixir and worked with liquid templates?
[12:13:49] lpil: za1b1tsu Why not use EEx? :)
[12:15:12] za1b1tsu: lpil, chain of command :)
[12:17:40] lpil: Fair enough :)
[12:19:11] PragTob: has joined #elixir-lang
[12:29:05] ariedler: has joined #elixir-lang
[12:31:31] mdbm: has joined #elixir-lang
[12:33:18] uplime: does anyone have a good guide on network programming in elixir? ideally i'd also like to dive into ssl (in elixir), but just plain tcp/ssl is fine as well
[12:34:39] dysfun: if by network programming you mean tcp-level?
[12:35:01] dysfun: well i wrote a (rather nice imo) module that makes the standard gen_tcp a bit easier
[12:35:03] uplime: erm, just plain tcp/udp*
[12:35:13] dysfun: https://hexdocs.pm/bricks/readme.html
[12:35:35] dysfun: it's got quite a lot of introductory info
[12:35:47] uplime: thanks, I'll take a look at it
[12:38:25] voltone: has joined #elixir-lang
[12:38:43] dysfun: wow, i was quite thorough
[12:38:48] dysfun: no wonder it took so long
[12:43:06] gvaughn: has joined #elixir-lang
[12:43:40] drincruz: has joined #elixir-lang
[12:46:34] fastfresh: has joined #elixir-lang
[13:00:38] Sgeo__: has joined #elixir-lang
[13:01:21] sparogy: has joined #elixir-lang
[13:28:54] areski: has joined #elixir-lang
[13:29:20] areski: has joined #elixir-lang
[13:29:45] areski: has joined #elixir-lang
[13:30:10] areski: has joined #elixir-lang
[13:30:35] areski: has joined #elixir-lang
[13:31:00] areski: has joined #elixir-lang
[13:31:24] areski: has joined #elixir-lang
[13:31:50] areski: has joined #elixir-lang
[13:32:15] areski: has joined #elixir-lang
[13:32:40] areski: has joined #elixir-lang
[13:33:04] areski: has joined #elixir-lang
[13:33:30] areski: has joined #elixir-lang
[13:33:54] areski: has joined #elixir-lang
[13:34:20] areski: has joined #elixir-lang
[13:34:45] areski: has joined #elixir-lang
[13:35:09] areski: has joined #elixir-lang
[13:35:34] areski: has joined #elixir-lang
[13:43:34] benwilson512: is there a way to exclude modules from mix test --cover reports?
[13:58:00] Nicd-: benwilson512: no, you need to use a 3rd party cover tool
[13:58:17] gvaughn: has joined #elixir-lang
[13:58:27] Nicd-: I think I tried this: https://github.com/alfert/coverex
[13:58:34] Nicd-: but it gave different results from the default
[13:58:57] wsieroci: has joined #elixir-lang
[14:00:28] benwilson512: Nicd-: great, thanks!
[14:09:29] areski: has joined #elixir-lang
[14:09:54] areski: has joined #elixir-lang
[14:10:19] areski: has joined #elixir-lang
[14:10:44] areski: has joined #elixir-lang
[14:11:09] areski: has joined #elixir-lang
[14:11:30] warmwaffles: has joined #elixir-lang
[14:11:32] areski: has joined #elixir-lang
[14:11:47] gvaughn: has joined #elixir-lang
[14:11:55] areski: has joined #elixir-lang
[14:12:20] areski: has joined #elixir-lang
[14:12:45] areski: has joined #elixir-lang
[14:13:10] areski: has joined #elixir-lang
[14:13:34] areski: has joined #elixir-lang
[14:14:01] areski: has joined #elixir-lang
[14:14:26] areski: has joined #elixir-lang
[14:14:51] areski: has joined #elixir-lang
[14:15:16] areski: has joined #elixir-lang
[14:15:41] areski: has joined #elixir-lang
[14:16:07] areski: has joined #elixir-lang
[14:16:30] areski: has joined #elixir-lang
[14:16:55] areski: has joined #elixir-lang
[14:17:20] areski: has joined #elixir-lang
[14:17:45] areski: has joined #elixir-lang
[14:18:11] areski: has joined #elixir-lang
[14:18:37] areski: has joined #elixir-lang
[14:19:02] areski: has joined #elixir-lang
[14:19:27] areski: has joined #elixir-lang
[14:19:50] areski: has joined #elixir-lang
[14:20:15] areski: has joined #elixir-lang
[14:20:40] areski: has joined #elixir-lang
[14:21:07] areski: has joined #elixir-lang
[14:21:32] areski: has joined #elixir-lang
[14:21:57] areski: has joined #elixir-lang
[14:22:22] areski: has joined #elixir-lang
[14:22:47] areski: has joined #elixir-lang
[14:23:05] __charly__: has joined #elixir-lang
[14:23:10] areski: has joined #elixir-lang
[14:23:23] jmcgnh: has joined #elixir-lang
[14:23:35] areski: has joined #elixir-lang
[14:24:01] areski: has joined #elixir-lang
[14:24:26] areski: has joined #elixir-lang
[14:24:51] areski: has joined #elixir-lang
[14:25:15] areski: has joined #elixir-lang
[14:25:42] areski: has joined #elixir-lang
[14:26:05] areski: has joined #elixir-lang
[14:26:30] areski: has joined #elixir-lang
[14:26:55] areski: has joined #elixir-lang
[14:27:20] areski: has joined #elixir-lang
[14:27:45] areski: has joined #elixir-lang
[14:28:12] areski: has joined #elixir-lang
[14:28:37] areski: has joined #elixir-lang
[14:29:00] areski: has joined #elixir-lang
[14:29:25] areski: has joined #elixir-lang
[14:29:50] areski: has joined #elixir-lang
[14:30:17] areski: has joined #elixir-lang
[14:30:40] areski: has joined #elixir-lang
[14:31:05] areski: has joined #elixir-lang
[14:31:30] areski: has joined #elixir-lang
[14:31:52] areski: has joined #elixir-lang
[14:32:17] areski: has joined #elixir-lang
[14:32:42] areski: has joined #elixir-lang
[14:33:05] areski: has joined #elixir-lang
[14:33:30] areski: has joined #elixir-lang
[14:33:55] areski: has joined #elixir-lang
[14:34:20] areski: has joined #elixir-lang
[14:34:47] areski: has joined #elixir-lang
[14:35:10] areski: has joined #elixir-lang
[14:35:35] areski: has joined #elixir-lang
[14:36:00] areski: has joined #elixir-lang
[14:36:25] areski: has joined #elixir-lang
[14:36:47] areski: has joined #elixir-lang
[14:37:10] areski: has joined #elixir-lang
[14:37:35] areski: has joined #elixir-lang
[14:37:57] areski: has joined #elixir-lang
[14:38:22] areski: has joined #elixir-lang
[14:38:47] areski: has joined #elixir-lang
[14:39:12] areski: has joined #elixir-lang
[14:39:37] areski: has joined #elixir-lang
[14:40:05] areski: has joined #elixir-lang
[14:40:32] areski: has joined #elixir-lang
[14:40:57] areski: has joined #elixir-lang
[14:41:22] areski: has joined #elixir-lang
[14:41:47] areski: has joined #elixir-lang
[14:42:00] paxis: has joined #elixir-lang
[14:42:10] areski: has joined #elixir-lang
[14:42:16] jmcgnh: has joined #elixir-lang
[14:42:17] hypercore: has joined #elixir-lang
[14:42:32] areski: has joined #elixir-lang
[14:42:57] areski: has joined #elixir-lang
[14:43:24] areski: has joined #elixir-lang
[14:43:49] areski: has joined #elixir-lang
[14:44:09] paxis: has joined #elixir-lang
[14:44:14] areski: has joined #elixir-lang
[14:44:37] areski: has joined #elixir-lang
[14:45:02] areski: has joined #elixir-lang
[14:45:27] areski: has joined #elixir-lang
[14:45:52] areski: has joined #elixir-lang
[14:46:20] areski: has joined #elixir-lang
[14:46:45] areski: has joined #elixir-lang
[14:47:10] areski: has joined #elixir-lang
[14:47:34] areski: has joined #elixir-lang
[14:47:38] hypercore: anyone relatively good with javascript around?
[14:47:59] areski: has joined #elixir-lang
[14:48:25] areski: has joined #elixir-lang
[14:48:50] areski: has joined #elixir-lang
[14:49:34] areski: has joined #elixir-lang
[14:50:00] areski: has joined #elixir-lang
[14:50:24] areski: has joined #elixir-lang
[14:50:36] pera: has joined #elixir-lang
[14:50:51] areski: has joined #elixir-lang
[14:56:06] gamache: hypercore: *sigh* perhaps :)
[14:58:45] duaneb: has joined #elixir-lang
[15:00:47] hypercore: gamache: maybe it's not so much about js as i think, but my problem is this: i have a js-enhanced select element which is instantiated from app.js and is rendered in a .leex template. However every time the view is validated, my js-enhanced element breaks (i assume because the js that ran in app.js is not affecting the element anymore)
[15:01:09] hypercore: any ideas about how best to tackle this?
[15:03:53] gamache: That sounds pretty specific to how your app is structured.
[15:04:08] gamache: Most of the JS I write is for the backend, so I am not super up on browser-side stuff these days.
[15:05:01] Sgeo_: has joined #elixir-lang
[15:06:40] fastfresh: has joined #elixir-lang
[15:06:53] hypercore: gamache: no problem, yeah it seems to be a pretty specific problem (made worse by the fact it involves live view, which itself is relatively new)
[15:07:37] hypercore: there is a phx-ignore attribute, but it doesn't seem to do anything for me
[15:10:22] yrashk: has joined #elixir-lang
[15:11:22] russell: has joined #elixir-lang
[15:18:36] asabil: has joined #elixir-lang
[15:21:05] markmm: has joined #elixir-lang
[15:44:38] Sgeo__: has joined #elixir-lang
[15:59:06] lexmag: has joined #elixir-lang
[16:01:48] icecreamcohen: has joined #elixir-lang
[16:01:50] Phylock: has joined #elixir-lang
[16:11:00] drincruz: has joined #elixir-lang
[16:13:20] Exuma: has joined #elixir-lang
[16:29:35] gvaughn: has joined #elixir-lang
[16:30:08] ariedler: has joined #elixir-lang
[16:31:11] Sgeo_: has joined #elixir-lang
[16:33:26] Sgeo: has joined #elixir-lang
[16:34:43] gvaughn_: has joined #elixir-lang
[16:36:07] lexmag: has joined #elixir-lang
[16:48:14] jeffro_: has joined #elixir-lang
[17:06:55] hypercore: has joined #elixir-lang
[17:11:44] Saukk: has joined #elixir-lang
[17:15:35] gamache: I've been seeing some weird behavior running an Elixir project on a brand new Ubuntu 18.04 box today. Bits of my dependencies (so far, one in Mint and one in Elixir itself) are missing. I'm not doing anything weird. See this paste for an example. https://pastebin.com/pM20UeXC
[17:20:44] gamache: The error I pasted is just one example; the pattern is that I am missing a file that is 100% definitely supposed to be there. rm -rf'ing and reinstalling/rebuilding my project has helped both times.
[17:27:57] gamache: Nevermind, the answer is right in front of me.
[17:28:08] gamache: Yet again, ulimit punches me in the teeth
[17:29:04] benwilson512: gamache: emfile means too many open files
[17:29:10] voltone: has joined #elixir-lang
[17:29:46] benwilson512: that's an OS level error
[17:30:27] benwilson512: blah, buffer hadn't updated
[17:30:31] jnoon2: has joined #elixir-lang
[17:32:33] gamache: relevant: https://twitter.com/gamache/status/1101064537946636293
[17:33:06] drincruz: has joined #elixir-lang
[17:43:40] josevalim: tristan__: is there anything we are missing in comparison to common_test?
[17:47:18] tristanm_: josevalim: good question :). I don't know it well enough to say and haven't tried writing as complicated of tests yet with it.
[17:48:39] starbelly: tristan__: Don't know ex_unit you mean?
[17:50:31] starbelly: It's equivalent to eunit and so is nothing like ct afaik, though tbh I have never dug in the ExUnit code, so I can not say that 100%
[17:51:38] tristanm_: josevalim: does ex_unit have like data_dir and priv_dir? ct lets you have a specific directory of files you need for a suite in a data dir and you get a priv_dir during running of the suite, which is pretty useful
[17:52:03] josevalim: eunit and exunit are quite different though
[17:52:19] starbelly: josevalim: Well, they are more alike than ct, no?
[17:52:28] josevalim: tristan__: we don't but i create temporary directories when i need to?
[17:52:58] starbelly: That is to say, eunit and exunit are more akin to whitebox testing (but it doesn't _have_ to be that way) and ct is definitely blackbox
[17:53:30] gabrielpoca: has joined #elixir-lang
[17:53:33] starbelly: hmm blackbox and integration I suppose, but it's all perspective I guess
[17:54:09] za1b1tsu: has joined #elixir-lang
[17:55:01] tristanm_: josevalim: yea, that works, just easier to find after the fact and removes the need to create/track yourself. data_dir is similar in that sure you can just use any dir and figure out the path, but ?config(data_dir, Config) just makes it simpler
[17:55:44] starbelly: I would add while eunit and exunit are definitely for unit tests, ct can be used for unit tests but is first and foremost for blackbox and/or integration
[17:56:48] starbelly: I'm not entirely sure the elixir community at large would like ct though... I used to hate it, but I default it to now *shrug*
[17:57:31] josevalim: there are things i find bureaucratic on CT but there are some features we stole from it, such as log capturing
[17:58:10] josevalim: what is the difference between data_dir and tmp_dir? aren't they both temporary?
[17:58:34] tristanm_: I've made frequent use of groups too, and init_per_group/end_per_group which i haven't seen a parallel to in exunit. not sure how config works either? ct has the Config passed through. and ordering of tests like you can do with ct groups
[17:58:50] josevalim: tristan__: groups is describe + setup
[17:59:04] josevalim: we also have a context which is like config
[17:59:06] tristanm_: josevalim: a setup can be in describe?
[17:59:13] josevalim: tristan__: yes sir
[17:59:35] tristanm_: see, also just confusing to me since it isn't just functions but macros ;)
[17:59:56] tristanm_: and or a data_dir it already exists
[18:00:07] tristanm_: like https://github.com/erlang/rebar3/tree/master/test/rebar_pkg_SUITE_data
[18:00:24] tristanm_: https://github.com/erlang/rebar3/blob/master/test/rebar_pkg_SUITE.erl#L79
[18:00:49] josevalim: yeah, i don't see data_dir as an issue to be very honest
[18:00:57] josevalim: getting a fixture path is quite straight-forward
[18:01:05] josevalim: but i can see tmp_dir being handy
[18:01:57] tristanm_: getting a path is just annoying if you don't know where you are running from
[18:02:11] josevalim: mix test always runs from root, there is no other optiono
[18:02:14] josevalim: plus we have __DIR__
[18:02:40] tristanm_: and shit I don't use that often, but setting up nodes in a ct spec if nice when needed
[18:05:03] tristanm_: hm, does exunit come with surefire/junit xml output support?
[18:05:31] josevalim: iirc there is a formatter for that
[18:05:34] josevalim: a separate pkg
[18:06:05] netrino: has joined #elixir-lang
[18:07:17] starbelly: I think the reason a lot of people who favor ct over eunit are also afraid of side effects 🤔
[18:08:41] tristanm_: I get annoyed by eunit's macros, hehe
[18:09:03] starbelly: aye and your to blame for my new found love of CT
[18:09:05] tristanm_: sure, useful if you are using generators and shit. but when not using those it just gets confusing
[18:09:47] icecreamcohen: Does anyone know how to shut down phoenix channels / sockets from the server?
[18:10:13] icecreamcohen: I looked all over and can’t find anything concrete in the docs.
[18:15:19] starbelly: icecreamcohen: iirc you just broadcast :disconnect
[18:15:28] starbelly: to the socket that is
[18:15:53] icecreamcohen: doesn’t that require the client to be aware of that message?
[18:16:28] starbelly: `YourAppp.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})`
[18:16:37] starbelly: icecreamcohen: wdym?
[18:17:04] icecreamcohen: if I understand things correctly, the websocket client then needs to gracefully handle a “disconnect message"
[18:17:35] icecreamcohen: sorry a “disconnect” message
[18:17:40] starbelly: josevalim: What do you recommend for dealing with `can only preload sources with a schema`, getting that because of correlated sub-query
[18:17:51] icecreamcohen: but there’s no way to say: “close the socket right now”
[18:18:18] starbelly: icecreamcohen: I suppose you mean, it might re-connect?
[18:18:33] icecreamcohen: or it might send another message
[18:18:42] starbelly: yeah, I think you'd have to implement some logic on the client side, but I'm not 100% sure of that
[18:19:01] starbelly: if you're using phoenix channels js, then it may already have logic to deal with that
[18:19:12] icecreamcohen: It’s just odd that I can’t kill a connection on the server side. I’m sure there’s a reason, but the docs are thin
[18:19:22] icecreamcohen: I’m using phoenix channels
[18:19:31] icecreamcohen: but not channel.js
[18:19:39] starbelly: https://hexdocs.pm/phoenix/js/#socketdisconnect
[18:20:21] icecreamcohen: yeah, that’s client side though
[18:20:50] icecreamcohen: Ideally, I’d like to find out all connected channels and close all of them
[18:20:57] icecreamcohen: because the server is going down.
[18:21:34] starbelly: `YourAppp.Endpoint.broadcast("user_socket:#{user.id}", "disconnect", %{})` this disconnects server side, which I assume also sends a message to the client, in which it knows how to handle this this message, per the docs, but once again not 100%. It's been a minute since I worked with channels.
[18:22:02] starbelly: Have you tried?
[18:22:47] icecreamcohen: see the user id part?
[18:23:05] icecreamcohen: that implies that I’m disconnecting a specific user, no?
[18:23:32] icecreamcohen: I’m also not using the js client.
[18:24:04] starbelly: You want to shutdown an entire channel then?
[18:24:08] starbelly: or all channels
[18:24:24] Saukk: has joined #elixir-lang
[18:25:56] starbelly: I think phoenix already handles this?
[18:26:07] josevalim: icecreamcohen: do you want to shut down the node?
[18:26:36] josevalim: that's what happens when you shutdown the node, no?
[18:26:41] weird_error: has joined #elixir-lang
[18:27:01] icecreamcohen: well, I want to make sure all in-flight messages are handled and replied to as well.
[18:27:05] josevalim: starbelly: re:ecto, do you have an example? we probably can't do much if you have doing a query on a raw table
[18:27:11] josevalim: starbelly: we lack all of the information to do proper preloads
[18:27:32] icecreamcohen: maybe I’m barking up the wrong tree here.
[18:27:34] josevalim: icecreamcohen: I am not sure you can do that without client coordination
[18:27:49] josevalim: because a message can be in flight and it did not arrive at phoenix yet
[18:27:51] icecreamcohen: you have to tell the client to stop sending new stuff to you.
[18:28:23] josevalim: right. you can have all channels listening on one topic that you will use to shutdown
[18:28:55] josevalim: if you don't have a user_id, you can also make the topic on def connect in the socket be:
[18:28:57] icecreamcohen: ok, I was wondering if there was some magic somewhere
[18:29:00] josevalim: "my_app:shutdown"
[18:29:02] josevalim: and broadcast there
[18:29:07] josevalim: but that won't have coordination
[18:29:23] icecreamcohen: yeah, you won’t be guaranteed that all clients got the message
[18:30:03] josevalim: so it is something like, send all clients a message, wait some time, then shut down
[18:30:32] starbelly: josevalim: Right, I was just making sure there wasn't a better way now since the last I had to deal with this. That is, if I'm using a sub-query as a "pseudo table", i.e., `join: eh in fragment("select x from foo")`. In the past I would just select the data I needed and load it up manually into a struct or not at all, but once again just double checking.
[18:31:17] ariedler: has joined #elixir-lang
[18:32:17] josevalim: starbelly: can't you use our own subqueries?
[18:32:32] starbelly: josevalim: wdym?
[18:32:41] josevalim: ecto has subqueries, maybe you can use that?
[18:32:44] josevalim: then the composition should work
[18:32:57] josevalim: actually, i don't think we can preload from subqueries either
[18:33:25] voltone: has joined #elixir-lang
[18:33:28] starbelly: Yeah, I don't think so, which makes sense, as stated was double checking... being lazy too since you are around right now
[18:33:28] blahdodo: has joined #elixir-lang
[18:33:45] icecreamcohen: Thanks, starbelly and josevalim
[18:54:28] wsieroci: has joined #elixir-lang
[18:57:48] serafeim: has joined #elixir-lang
[18:58:23] serafeim: hello! do you know how can I make custom changeset error messages extractable for i18n ?
[18:58:32] serafeim: f.e I have this in my changeset: |> unique_constraint(:name, message: "The name exists!")
[18:59:04] greengriminal: has joined #elixir-lang
[18:59:10] serafeim: if I change it to |> unique_constraint(:name, message: gettext("The name exists!")) i see an "undefined function gettext" error :/
[19:00:29] serafeim: if i *don't* use the custom message then the strings are on priv/gettext/errors.pot. however i do want to use the custom error messages :<|
[19:00:34] Sgeo_: has joined #elixir-lang
[19:00:36] jnoon2: has joined #elixir-lang
[19:02:51] Nicd-: did you import the gettext function into that file?
[19:03:45] Nicd-: either import it or use YourApp.Gettext.gettext(...)
[19:04:11] serafeim: Nicd- no; i am not sure how to do that. when i use it in the other files (controllers, templates etc) it doesn't need importing
[19:04:31] Nicd-: Phoenix has probably helpfully imported it for you already
[19:04:33] Nicd-: in those files
[19:04:50] Nicd-: if you don't know how importing works, you should read the Elixir getting started guide that covers it
[19:05:24] serafeim: Nicd- i know how it works
[19:05:39] Nicd-: but you said "i am not sure how to do that"
[19:05:53] serafeim: ha ha ha ok sorry
[19:06:00] serafeim: i see it in the project_web.ex
[19:06:48] serafeim: it seems that phoenix imports that in the controller and the view
[19:07:03] serafeim: thanks it works now !
[19:07:43] weird_error: has joined #elixir-lang
[19:08:28] serafeim: Nicd- now that you are here, i've got another problem: i am using IEx.pry() and the debug session "disconnects" after 1-2 minutes. is this normal or related to my setup (using windows) ?
[19:08:42] Nicd-: no idea, I don't use pry
[19:08:50] serafeim: Nicd- what do you use ?
[19:08:56] Nicd-: I just print stuff
[19:08:57] serafeim: don't tell me IO.puts :|
[19:09:08] Nicd-: IO.inspect, better?
[19:09:13] serafeim: ha ha ha ha ha
[19:09:32] Nicd-: I just haven't had problems to need pry yet
[19:09:47] serafeim: i don't like printing. i am spoiled from debugging django with werkzeug
[19:13:45] serafeim_: has joined #elixir-lang
[19:16:35] shiro[cloud]: has joined #elixir-lang
[19:17:26] serafeim: has joined #elixir-lang
[19:24:17] jmcgnh: has joined #elixir-lang
[19:32:32] nickjj: speaking of printing and logging, has anyone else noticed unusual activity with logging in development with phoenix 1.4+? one where the logger will completely stop logging to stdout and the only way to get to resume logging is to restart the web server
[19:33:33] nickjj: can't iron out the exact cause, it's just like it gives up and dies (unrelated to the web server throwing an error)
[19:42:52] gvaughn: has joined #elixir-lang
[19:48:22] starbelly: josevalim: How would you feel about a section in Ecto docs titled "When to break convention". This subquery case I think is a good example.
[19:51:43] kyrylo: has joined #elixir-lang
[19:52:48] gvaughn_: has joined #elixir-lang
[20:02:40] serafeim: oh wel.. i see this comment in an SO question: "General advise: do not use if. Never ever. Use pattern matching."
[20:02:57] serafeim: from here: https://stackoverflow.com/questions/54311952/stuck-in-migrations-how-to-fix-io-chardata-to-string-1 // can somebody clarify pls ?
[20:06:05] kyrylo: has joined #elixir-lang
[20:06:19] za1b1tsu: has joined #elixir-lang
[20:35:09] inhortte1: has joined #elixir-lang
[20:49:39] aalmazan: has joined #elixir-lang
[20:54:57] icecreamcohen: has joined #elixir-lang
[21:06:53] jmcgnh: has joined #elixir-lang
[21:07:00] MononcQc: has joined #elixir-lang
[21:09:58] asabil: has joined #elixir-lang
[21:11:17] asabil_: has joined #elixir-lang
[21:13:15] ur5us: has joined #elixir-lang
[21:14:33] jnoon2: i have these all over my vscode and cant get rid of them (like every file, most functions): Function fetch_for_params/1 has no local returnElixirLS Dialyzer. ive learned to kind of ignore them but if anyone knows better would love to hear
[21:18:34] Sgeo__: has joined #elixir-lang
[21:18:58] griffinbyatt: has joined #elixir-lang
[21:24:57] jmcgnh: has joined #elixir-lang
[21:41:05] Sgeo_: has joined #elixir-lang
[21:41:22] benwilson512: nickjj: how are you doing logging? is this w/ releases and to the built in log file? mix phx.server?
[21:41:36] benwilson512: oh sorry you said development
[21:54:25] __charly__: has joined #elixir-lang
[22:00:57] griffinbyatt: has joined #elixir-lang
[22:08:18] nickjj: benwilson512, yeah this is purely development with the default phoenix logger configuration
[22:09:02] nickjj: if i start the server and start making various get/post requests to endpoints, it just eventually stops logging all output after a few requests
[22:09:44] nickjj: but i know the server is "seeing" everything because the pages load in a browser and if i change an eex template i see those changes
[22:13:25] ariedler: has joined #elixir-lang
[22:19:36] drincruz: has joined #elixir-lang
[22:31:11] Sgeo__: has joined #elixir-lang
[22:38:00] laut: has joined #elixir-lang
[22:38:12] Sgeo_: has joined #elixir-lang
[22:43:11] asabil: has joined #elixir-lang
[23:01:35] kyrylo_: has joined #elixir-lang
[23:42:35] icecreamcohen: has joined #elixir-lang
[23:45:45] ariedler: has joined #elixir-lang
[23:53:01] mahmudov: has joined #elixir-lang
[23:58:31] jeffweiss: has joined #elixir-lang