« Back to channel list

#elixir-lang - 24 June 2019

« Back 1 day
[00:03:27] atk: has joined #elixir-lang
[00:04:05] Disorganized: has joined #elixir-lang
[00:08:21] Scramblejams: has joined #elixir-lang
[00:11:02] Disorganized: has joined #elixir-lang
[00:30:55] jeffweiss: has joined #elixir-lang
[00:48:09] jeffro: has joined #elixir-lang
[00:51:21] fishcakez: has joined #elixir-lang
[00:51:21] msch: has joined #elixir-lang
[00:51:22] jlpeters: has joined #elixir-lang
[00:51:22] fertapric: has joined #elixir-lang
[00:51:22] Nicd-: has joined #elixir-lang
[00:51:22] bphogan: has joined #elixir-lang
[00:51:22] lackac: has joined #elixir-lang
[00:51:22] sickill: has joined #elixir-lang
[00:53:20] spork: has joined #elixir-lang
[00:53:26] peel: has joined #elixir-lang
[00:53:32] strmpnk: has joined #elixir-lang
[00:53:33] CornishPasty: has joined #elixir-lang
[00:53:33] benoitc: has joined #elixir-lang
[00:53:34] Paradox: has joined #elixir-lang
[01:02:16] dsr: has joined #elixir-lang
[01:24:50] jeffro: has joined #elixir-lang
[01:26:52] cschneid_: has joined #elixir-lang
[01:27:54] tomterl: has joined #elixir-lang
[01:33:07] Disorganized: has joined #elixir-lang
[01:41:02] InternetFriend: has joined #elixir-lang
[01:48:07] jeffro: has joined #elixir-lang
[02:07:04] ariedler: hypercore: the feelz when you find a ticket that has been open for > 3 years; or has been closed
[02:13:59] sevenseacat: has joined #elixir-lang
[02:16:07] jeffro: has joined #elixir-lang
[02:21:10] ariedler: has joined #elixir-lang
[02:26:03] __charly__: has joined #elixir-lang
[02:57:31] hypercore: ariedler: lol to be fair the issue wasn't clearly resolved
[02:57:59] jeffweiss: has joined #elixir-lang
[03:06:12] Disorganized: has joined #elixir-lang
[03:15:01] cschneid_: has joined #elixir-lang
[03:18:34] uranoss: has joined #elixir-lang
[03:26:35] Scramblejams: has joined #elixir-lang
[03:30:06] foggyboi: has joined #elixir-lang
[03:42:28] InternetFriend: has joined #elixir-lang
[03:48:03] siwatpru: has joined #elixir-lang
[03:48:16] foggyboi: has left #elixir-lang: ()
[03:53:34] mdbm_: has joined #elixir-lang
[04:10:41] jeffweiss: has joined #elixir-lang
[04:11:04] InternetFriend: has joined #elixir-lang
[04:16:56] jeffro: has joined #elixir-lang
[04:18:53] cschneid_: has joined #elixir-lang
[04:23:59] mdbm__: has joined #elixir-lang
[04:39:13] proteusguy: has joined #elixir-lang
[04:48:02] voltone: has joined #elixir-lang
[05:00:49] jeffro: has joined #elixir-lang
[05:16:02] Sgeo: has joined #elixir-lang
[05:31:43] Sgeo_: has joined #elixir-lang
[05:32:23] sangoma: has joined #elixir-lang
[05:33:19] blassin2: has joined #elixir-lang
[05:39:33] cschneid_: has joined #elixir-lang
[05:41:42] notzmv: has joined #elixir-lang
[05:42:09] kaniini: has joined #elixir-lang
[05:47:06] esainane: has joined #elixir-lang
[05:48:27] serafeim: good morning
[05:52:34] serafeim: Nicd-: hey do you feel there wouild be any problems if I put my codestats key in my (public) VS Code settigns repo: https://github.com/spapas/vscode-settings ?
[05:53:36] Nicd-: Yes. And please ask on our project's channels in the future.
[05:54:03] serafeim: is it on freenet ?
[05:54:13] Nicd-: Check the site footer for links
[05:54:24] Nicd-: #codestats on this network
[06:02:19] wonko7: has joined #elixir-lang
[06:02:30] deesar: has joined #elixir-lang
[06:06:56] jeffweiss: has joined #elixir-lang
[06:07:36] chazlever_: has joined #elixir-lang
[06:07:37] euphidime_: has joined #elixir-lang
[06:07:37] robramsaynz_: has joined #elixir-lang
[06:07:37] ericentin_: has joined #elixir-lang
[06:07:46] smeevil__: has joined #elixir-lang
[06:07:52] Guest82928___: has joined #elixir-lang
[06:08:01] jpinnix_: has joined #elixir-lang
[06:08:02] benwilson512_: has joined #elixir-lang
[06:08:06] darach_______: has joined #elixir-lang
[06:08:07] scrogson_: has joined #elixir-lang
[06:08:07] jerme__: has joined #elixir-lang
[06:08:08] bytesighs_: has joined #elixir-lang
[06:08:10] asonge_: has joined #elixir-lang
[06:08:17] Scorchin_: has joined #elixir-lang
[06:08:20] akraut_: has joined #elixir-lang
[06:08:23] d10n-work_: has joined #elixir-lang
[06:08:25] dukedave_: has joined #elixir-lang
[06:08:27] dnyy_: has joined #elixir-lang
[06:08:27] affinespaces_: has joined #elixir-lang
[06:08:30] teadrop_____: has joined #elixir-lang
[06:08:47] gvaughn: has joined #elixir-lang
[06:09:00] Ankhers_: has joined #elixir-lang
[06:10:48] comboy: has joined #elixir-lang
[06:10:51] rawtaz_: has joined #elixir-lang
[06:11:04] pankracy: has joined #elixir-lang
[06:13:07] bodie__: has joined #elixir-lang
[06:13:36] chrismccord_: has joined #elixir-lang
[06:14:19] ambrosia_: has joined #elixir-lang
[06:14:23] kzemek_: has joined #elixir-lang
[06:14:26] Dawgora_: has joined #elixir-lang
[06:16:17] amitchellbullard: has joined #elixir-lang
[06:22:27] ariedler: has joined #elixir-lang
[06:22:37] Anders[m]: has joined #elixir-lang
[06:22:39] NicdW: has joined #elixir-lang
[06:23:20] tkarstens[m]: has joined #elixir-lang
[06:23:25] is0x3F: has joined #elixir-lang
[06:27:59] jeffweiss: has joined #elixir-lang
[06:33:06] tuacker: has joined #elixir-lang
[06:33:36] cschneid: has joined #elixir-lang
[06:37:33] ndee: has joined #elixir-lang
[06:41:42] ur5us: has joined #elixir-lang
[07:00:30] dsr: has joined #elixir-lang
[07:01:40] jeffro: has joined #elixir-lang
[07:04:26] gvaughn: has joined #elixir-lang
[07:10:15] Sgeo__: has joined #elixir-lang
[07:17:51] jeffweiss: has joined #elixir-lang
[07:38:22] absolutejam: has joined #elixir-lang
[07:39:16] iamvery: has joined #elixir-lang
[07:44:40] InternetFriend: has joined #elixir-lang
[07:46:12] kapilp: `|> Repo.preload(file_entities: :update_user)` how to order by `file_entities`?
[07:49:09] cschneid: has joined #elixir-lang
[07:52:50] gde33: has joined #elixir-lang
[08:16:30] mdbm__: has joined #elixir-lang
[08:41:39] ur5us: has joined #elixir-lang
[08:44:02] Gika: has joined #elixir-lang
[08:47:27] josevalim: kapilp: order what?
[08:48:20] dysfun: one assumes he'd like to apply an ORDER BY to the list of entries that will get preloaded
[08:48:38] dysfun: so that when he accesses them, they come out in a specific order
[08:48:40] wonko7: has joined #elixir-lang
[08:50:38] ur5us: has joined #elixir-lang
[08:52:39] gvaughn: has joined #elixir-lang
[09:01:04] deesar: has joined #elixir-lang
[09:02:31] jeffro: has joined #elixir-lang
[09:10:19] lexmag: has joined #elixir-lang
[09:17:12] Sgeo__: has joined #elixir-lang
[09:17:41] mdbm__: has joined #elixir-lang
[09:20:41] cschneid: has joined #elixir-lang
[09:22:52] mdbm_: has joined #elixir-lang
[09:53:53] PragTob: has joined #elixir-lang
[10:07:32] kapilp: order by `id` column
[10:12:56] mk[]: what do you use for performance monitoring and logging in Phoenix?
[10:13:03] w1gz: has joined #elixir-lang
[10:23:48] ariedler: has joined #elixir-lang
[10:25:28] jeffro: has joined #elixir-lang
[10:28:48] iamvery: has joined #elixir-lang
[10:35:52] ariedler: has joined #elixir-lang
[10:40:26] absolutejam: has joined #elixir-lang
[10:41:00] gvaughn: has joined #elixir-lang
[10:45:16] Czen: has joined #elixir-lang
[10:50:01] cschneid: has joined #elixir-lang
[11:01:39] dsr: has joined #elixir-lang
[11:02:18] iamvery: has joined #elixir-lang
[11:06:52] lessless: has joined #elixir-lang
[11:10:14] lemald: has joined #elixir-lang
[11:10:39] jeffweiss: has joined #elixir-lang
[11:12:16] absolutejam: has joined #elixir-lang
[11:14:53] wonko7: has joined #elixir-lang
[11:15:07] hypercore: has joined #elixir-lang
[11:21:07] tuacker: has joined #elixir-lang
[11:36:51] gvaughn: has joined #elixir-lang
[11:45:33] nickjj: if you wanted to call the same function in 2 controllers but you didn't want that function to be in a context since it depends on phoenix, where would you place that function?
[11:47:24] serafeim: i'd add a controller_helpers.ex file inside my _web/controllers/
[11:47:37] nickjj: for reference, this isn't a plug either, it's just something i want to do in both controllers but the thing i'm doing isn't related to either controller specifically
[11:48:27] nickjj: thanks, i was thinking something similar by having a utils.ex file in controllers/ but controller_helpers.ex sounds a lot better and follows the style of other similar files
[11:50:01] serafeim: no prob! i'm doing something similar with view_helpers.ex: https://github.com/spapas/phxcrd/blob/master/lib/phxcrd_web/views/view_helpers.ex to hold a bunch of useful global functions for views
[11:52:55] nickjj: serafeim, ah, i have a shared_view.ex doing something similar
[11:54:28] nickjj: but i think seeing your example really just made something click
[11:54:40] nickjj: _helpers.ex is really what it is, it's not a view
[11:55:03] nickjj: because i was struggling what the difference was between the 2, but now i see
[11:55:15] serafeim: nickjj: correct i think you should name it view_helpers or view_utils or something
[11:56:04] nickjj: the functions you have in _helpers.ex are being used in your templates , where as the _view.ex files are really rendering responses for a specific view?
[11:56:57] nickjj: perfect, thanks
[11:58:03] serafeim: i have included an `import xx.ViewHelpers` to my _web.ex so these are easily available to my templates: https://github.com/spapas/phxcrd/blob/master/lib/phxcrd_web.ex
[12:02:47] nickjj: so here's a fun question, taking this 1 step further, if you wanted to share a function between a controller and a channel , where would that go?
[12:03:13] nickjj: or live view for that matter
[12:04:49] Nicd-: in a helpers/utils file in the web app, on a level higher than controllers/channels
[12:05:11] serafeim: Nicd-: yes probably i'd do the same
[12:07:05] nickjj: thanks, this use case is for signing and verifying phoenix tokens -- Phoenix.Token is pretty short, but i'm reading certain things from env variables which makes the call kind of long (especially in case condition 1 liners in my controller)
[12:09:14] BeerLover: has joined #elixir-lang
[12:09:24] serafeim: hm from what I see i've just dumped `Phoenix.Token.verify` in my `user_socket.ex` and `Phoenix.token.sign` in the `layout\app.html.eex`
[12:09:37] serafeim: maybe it's no the best way to do it but i just use the defaults from what i see
[12:09:58] nickjj: i'm currently using phoenix token in my controllers too, because my authentication is done by magic links and phoenix.token handles the token in the link
[12:11:50] nickjj: so i wound up with this in an accounts context https://gist.github.com/nickjj/60992c76fe1c95a74ff1cdb168bd6fb5 , which now i'm seeing is a problem because it still depends on phoenix (i just got to the umbrella app part of the programming phoenix book and it hints that your non-web app shouldn't depend on phoenix)
[12:11:58] nickjj: and i 100% agree with that, even if i don't use umbrellas
[12:12:49] serafeim: nickjj: i think i had a discussion here before some days that the value of the salt you pass doesn't matter
[12:13:07] serafeim: but i can't really recall with whom and why
[12:13:15] nickjj: hmm, so it's safe to commit that salt to version control?
[12:13:41] serafeim: nickjj: actually it's safe to just use "user salt" for your token verification. at least that's what I remember
[12:14:15] serafeim: nickjj: it *does* seem strange though so don't take my word for it maybe somebody else can explain if that's the fact
[12:14:50] nickjj: i'm googling now and the general census seems to be that the salt value is app wide, but it doesn't mention whether or not it should be publicly available (think of an open source project for example)
[12:15:33] griffinbyatt: has joined #elixir-lang
[12:16:11] griffinbyatt: has joined #elixir-lang
[12:16:28] dysfun: no, you should protect it
[12:16:52] serafeim: dysfun: we are not talking about the signing salt
[12:16:53] dysfun: we use environment variables read at runtime through distillery
[12:17:04] dysfun: i know what you're talking about
[12:17:13] serafeim: dysfun: we are talking about the value you pass to the sign/verify token function
[12:17:19] dysfun: note that it's called a salt rather than a nonce
[12:17:36] nickjj: Phoenix.Token.sign(MyApp.Endpoint, "user salt", user_id) , from the docs
[12:17:54] nickjj: in my case, "user salt" is coming from an env variable that is then set in a config file -- so it's app wide but out of version control
[12:18:07] dysfun: that's fine
[12:19:31] cschneid: has joined #elixir-lang
[12:19:59] nickjj: but the interesting thing is https://elixirforum.com/t/phoenix-token-for-api-auth-salt-per-user-or-per-app/13361
[12:20:42] nickjj: some of those replies hint that maybe it's just a namespace and not really a traditional salt
[12:21:27] griffinbyatt: It's just used in key generation, not in the actual signing process
[12:21:36] jeffweiss: has joined #elixir-lang
[12:22:24] griffinbyatt: I think calling in "namespace" is probably equally confusing
[12:23:10] griffinbyatt: It's best practice not to re-use secrets in different contexts, so there is key generation functionality to generate different keys based on the same secret key base
[12:24:18] nickjj: what is a context in this case? would you be expected to use different values for generating an email auth token for a magic link vs. a channel auth token?
[12:24:28] nickjj: different "user salt" values i mean
[12:24:56] griffinbyatt: If you're using Phoenix.Token.sign, it would all be the same context
[12:25:10] griffinbyatt: DIfferent context would be an encryptor vs a signer
[12:25:33] nickjj: ok, so when in doubt keep doing what i'm doing -- since you probably can't go too wrong keeping it private in the end?
[12:25:58] mdbm_: has joined #elixir-lang
[12:25:59] griffinbyatt: Yeah, you can definitely keep it private
[12:26:19] jeffro: has joined #elixir-lang
[12:26:22] griffinbyatt: Unlike traditional "salts" it's not part of the output or anything
[12:27:49] proteusguy: has joined #elixir-lang
[12:32:26] serafeim: yes but would that be a problem if i just used "user salt" and put it on version control or even publish it on the internet ?
[12:32:41] serafeim: because i remembered from the discussion here that it wouldn't matter at all
[12:32:58] griffinbyatt: The salt does not need to be secret
[12:33:26] serafeim: cool that's what i remembered
[12:33:32] griffinbyatt: ACTION :thumbsup:
[12:36:11] nickjj: thanks, that's all clear
[12:36:13] BeerLover: has joined #elixir-lang
[12:36:52] nickjj: well, clear in the sense that either option is equally as safe, encryptor vs signer is black hole of wiki articles for another day hah a
[12:40:48] isHavvy: has joined #elixir-lang
[12:52:43] hypercore: has joined #elixir-lang
[12:56:55] samrose: has joined #elixir-lang
[13:01:02] jeffweiss: has joined #elixir-lang
[13:13:55] duane: has joined #elixir-lang
[13:18:22] keathley: josevalim: One of my services runs a nightly CI build using ecto master (amongst other things) and I think I just discovered a regression around the PARTITION syntax for postgres. I saw that there was some changes done to partition in ecto recently. Didn't know if you wanted me to open an issue and if so what repo it should be on.
[13:23:36] gvaughn: has joined #elixir-lang
[13:25:06] jeffro: has joined #elixir-lang
[13:36:09] gvaughn: has joined #elixir-lang
[13:47:03] drincruz: has joined #elixir-lang
[13:50:15] cschneid: has joined #elixir-lang
[13:55:07] jeffweiss: has joined #elixir-lang
[13:55:54] jeffweiss: has joined #elixir-lang
[13:57:17] kapilp: has left #elixir-lang: ()
[13:57:30] hypercore: has joined #elixir-lang
[14:00:38] mikker: has joined #elixir-lang
[14:01:19] BitBot: has joined #elixir-lang
[14:17:25] jeffro: has joined #elixir-lang
[14:18:33] jeregrine: has joined #elixir-lang
[14:19:52] josevalim: keathley: awesome ,please open up an issue in ecto
[14:19:57] josevalim: i can't migrate if necessary
[14:20:00] josevalim: errr, i can
[14:21:10] keathley: Cool will do
[14:38:40] m1dnight_: has joined #elixir-lang
[14:40:21] wsieroci: has joined #elixir-lang
[14:41:28] m1dnight1: has joined #elixir-lang
[14:49:00] m1dnight_: has joined #elixir-lang
[14:54:54] hypercore: has joined #elixir-lang
[14:59:12] cschneid: has joined #elixir-lang
[15:04:16] gvaughn: has joined #elixir-lang
[15:10:23] gvaughn: has joined #elixir-lang
[15:15:02] lexmag: has joined #elixir-lang
[15:16:44] tuacker: has joined #elixir-lang
[15:17:07] mdbm_: has joined #elixir-lang
[15:20:17] drrty: has joined #elixir-lang
[15:33:21] josevalim: tristan__: i don't know if you are notified when it goes from draft to reaedy for review, but this is good to go! https://github.com/howistart/howistart-hakyll/pull/5
[15:34:27] aalmazan: has joined #elixir-lang