« Back to channel list

#elixir-lang - 02 July 2019

« Back 1 day Forward 1 day »
[00:17:46] lauromoura__: has joined #elixir-lang
[00:21:34] orbyt_: has joined #elixir-lang
[00:50:21] Ryanar: has joined #elixir-lang
[00:56:03] Disorganized: has joined #elixir-lang
[01:01:40] dsr: has joined #elixir-lang
[01:15:01] jeffweiss: has joined #elixir-lang
[01:19:29] tomterl: has joined #elixir-lang
[01:20:56] dsr[m]: has left #elixir-lang: ("User left")
[01:25:20] dsr7: has joined #elixir-lang
[01:42:21] deesar: has joined #elixir-lang
[01:45:05] mdbm_: has joined #elixir-lang
[02:25:35] duane: has joined #elixir-lang
[02:30:10] Adkron: has joined #elixir-lang
[02:36:14] ariedler: has joined #elixir-lang
[02:51:20] adkron_: has joined #elixir-lang
[02:56:30] Adkron: has joined #elixir-lang
[03:07:36] NightMonkey: has joined #elixir-lang
[03:15:46] jeffweiss: has joined #elixir-lang
[03:55:10] NightMonkey: has joined #elixir-lang
[04:18:42] mtot: has joined #elixir-lang
[04:32:04] gvaughn: has joined #elixir-lang
[04:37:18] ariedler: has joined #elixir-lang
[05:00:30] jeffweiss: has joined #elixir-lang
[05:06:04] proteusguy: has joined #elixir-lang
[05:08:47] ananth99: has joined #elixir-lang
[05:15:56] foggyboi: has joined #elixir-lang
[05:26:08] voltone: has joined #elixir-lang
[05:26:59] siwatpru: has joined #elixir-lang
[05:30:19] purebadger: has joined #elixir-lang
[05:37:43] purebadger: has joined #elixir-lang
[05:45:58] serafeim: good morning
[05:49:02] purebadger: has joined #elixir-lang
[05:50:54] purebadger: has joined #elixir-lang
[06:06:46] jeffweiss: has joined #elixir-lang
[06:06:59] siwatpru: has joined #elixir-lang
[06:30:45] jeffro_: has joined #elixir-lang
[06:36:16] sangoma: has joined #elixir-lang
[06:38:03] ariedler: has joined #elixir-lang
[06:38:50] purebadger: has joined #elixir-lang
[06:41:13] gvaughn: has joined #elixir-lang
[06:42:17] blassin2: has joined #elixir-lang
[06:42:57] tuacker: has joined #elixir-lang
[06:44:27] tomaz_b: has joined #elixir-lang
[06:48:24] jeffweiss: has joined #elixir-lang
[07:00:32] dsr: has joined #elixir-lang
[07:09:39] meimeix: has joined #elixir-lang
[07:12:50] tuacker: has joined #elixir-lang
[07:35:02] PragTob: has joined #elixir-lang
[07:37:13] ur5us: has joined #elixir-lang
[07:38:45] iamvery: has joined #elixir-lang
[08:02:26] tgrk: has joined #elixir-lang
[08:07:46] sirn: has joined #elixir-lang
[08:08:41] mtot: has joined #elixir-lang
[08:08:59] sirn: has joined #elixir-lang
[08:22:12] wonko7: has joined #elixir-lang
[08:24:09] lexmag: has joined #elixir-lang
[08:30:39] gvaughn: has joined #elixir-lang
[08:38:51] ariedler: has joined #elixir-lang
[08:56:00] lpil: has joined #elixir-lang
[08:58:35] ur5us: has joined #elixir-lang
[09:07:30] ur5us: has joined #elixir-lang
[09:07:51] rkleef: has joined #elixir-lang
[09:23:56] Cthalupa: has joined #elixir-lang
[09:35:38] lexmag: has joined #elixir-lang
[09:39:20] lexmag: has joined #elixir-lang
[09:44:12] jeffro_: has joined #elixir-lang
[09:54:02] tuacker: has joined #elixir-lang
[10:02:10] deesar: has joined #elixir-lang
[10:26:52] wojnar: has joined #elixir-lang
[10:28:18] voltone: has joined #elixir-lang
[10:34:30] lpil: has joined #elixir-lang
[10:40:51] purebadger: has joined #elixir-lang
[10:42:49] voltone: has joined #elixir-lang
[10:50:52] griffinbyatt: has joined #elixir-lang
[10:55:08] ariedler: has joined #elixir-lang
[11:00:41] iamvery: has joined #elixir-lang
[11:01:46] tuacker: has joined #elixir-lang
[11:10:22] tutti: has joined #elixir-lang
[11:39:36] juba: has joined #elixir-lang
[11:53:13] felipevolpone: has joined #elixir-lang
[11:53:22] felipevolpone: has joined #elixir-lang
[12:06:37] vieira: has joined #elixir-lang
[12:29:27] symb0l: has joined #elixir-lang
[12:35:51] tallysmartins_: has joined #elixir-lang
[12:43:37] tutti: has joined #elixir-lang
[12:48:18] jeregrine: has joined #elixir-lang
[12:48:27] inhortte1: has joined #elixir-lang
[13:18:27] duane: has joined #elixir-lang
[13:27:25] iFire: has joined #elixir-lang
[13:42:04] BitBot: has joined #elixir-lang
[13:48:27] jeregrine: ericmj you did a really good Job of explaining mint and your decisions in that devchat podcast.
[13:52:24] jeregrine: I don't often enjoy programming podcasts
[13:53:35] jeffro_: has joined #elixir-lang
[13:55:31] gvaughn: has joined #elixir-lang
[13:56:44] ericmj: that's great to hear, I am glad it helped explain things
[13:57:33] paxis: has joined #elixir-lang
[13:58:24] ericmj: https://devchat.tv/elixir-mix/emx-058-mint-library-with-eric-meadows-j%C3%B6nsson-andrea-leopardi/
[13:58:56] paxis: has joined #elixir-lang
[13:59:46] fyuuri: has joined #elixir-lang
[14:00:57] fyuuri: Hi :). Is there a reason why a Registry can not be registered at another Registry? Registries can only take atoms as names.
[14:01:12] drincruz_: has joined #elixir-lang
[14:10:04] lauromoura_: has joined #elixir-lang
[14:14:10] jeffro_: has joined #elixir-lang
[14:14:24] aalmazan: has joined #elixir-lang
[14:15:22] mrus: has joined #elixir-lang
[14:18:10] lauromoura_: has joined #elixir-lang
[14:20:55] lauromoura: has joined #elixir-lang
[14:25:41] Saukk: has joined #elixir-lang
[14:26:15] gvaughn: has joined #elixir-lang
[14:27:42] za1b1tsu: has joined #elixir-lang
[14:28:27] lexmag: has joined #elixir-lang
[14:29:20] greengriminal: has joined #elixir-lang
[14:33:25] mrus: has joined #elixir-lang
[14:36:02] gamache: fyuuri: it's because internally, Registry information is stored in ETS tables, and the name of the registry is used to identify the tables
[14:36:47] mrusme: has joined #elixir-lang
[14:45:21] fyuuri: gamache: thank you :) Will I suffer from performance loss if I put all processes in one registry?
[14:46:19] fyuuri: I Have a supervision tree containing dynamic supervisors and thought of putting the children of each dynamic supervisor in a separate registry.
[14:49:17] gamache: Each registry is also a supervisor, so there is a potential impact of having so many processes starting and stopping that the supervisor can't keep up with its message log.... at least that is my guess
[14:51:10] gamache: But that is an exotic scenario
[14:51:44] lexmag: has joined #elixir-lang
[14:53:15] fyuuri: Does the registry supervise all registered processes?
[14:53:34] benwilson512: fyuuri: it monitors, it does not supervise them
[14:53:41] lexmag: has joined #elixir-lang
[14:54:09] benwilson512: fyuuri: you really just need one registry for all of those, registries are sharded, they'll handle the load fine
[14:54:10] fyuuri: So it makes sense to have a supervision tree and and a single registry to register all workers and supervisors in that tree?
[14:54:20] fyuuri: thank you very much!
[14:55:06] fyuuri: I thought that splitting registries might achieve higher degrees of parallelism
[14:55:22] nox: Shameless plug https://twitter.com/rustlab_conf/status/1144879749455654912
[14:56:06] fyuuri: Just for my understanding: If I use a single registry, what is the advantage over just using :atoms as names? Is there more to than :atoms not being garbage collected?
[14:56:23] rawtaz: nox: why post rust stuff in an elixir channel?
[14:56:47] nox: Because I obviously don't have anything about Elixir to post.
[14:57:27] fyuuri: Both of these languages are amazing :).
[14:58:54] benwilson512: fyuuri: registries split internally
[14:59:07] benwilson512: to achieve optimal parallelism
[14:59:33] fyuuri: benwilson512: Does the global space not split? I mean if I just use name: :atom
[15:00:00] benwilson512: that's sort of an apples and oranges thing
[15:00:26] fyuuri: hum.. OK. I think I am still missing something.
[15:00:45] benwilson512: if you have a bunch of processes you want to name dynamically, you don't want to name them with atoms
[15:00:49] benwilson512: because atoms aren't GCed
[15:00:51] fyuuri: What is the advantage of using a single registry over just using atom names?
[15:01:02] fyuuri: just this.
[15:01:13] benwilson512: well and Registry allows you to add metadata to the registration
[15:01:25] fyuuri: Ah! To each registred process?
[15:01:30] fyuuri: thank you so much!
[15:01:35] fyuuri: that clarified a lot!
[15:01:39] benwilson512: you can think of it like a KV store where a given KV pair is also linked to a process
[15:01:57] fyuuri: I will put that into my notes :).
[15:05:55] mrus: has joined #elixir-lang
[15:21:09] za1b1tsu_: has joined #elixir-lang
[15:22:29] Phylock: has joined #elixir-lang
[15:24:51] orbyt_: has joined #elixir-lang
[15:26:22] tuacker: has joined #elixir-lang
[15:27:07] drrty: has joined #elixir-lang
[15:36:40] warmwaffles: has joined #elixir-lang
[15:43:10] nickjj: with ecto, if you wanted a read-only attribute in a changeset that's only changeable for tests, what's the best way of going about that?
[15:43:25] nickjj: would you code a MIX_ENV check in your changeset to only cast that attrib for tests?
[16:03:30] Zarathu: nickjj: what's your idea of read-only?
[16:03:39] Zarathu: you just wouldn't pass it as a param to cast()
[16:04:22] Zarathu: if you want to pass it as a param to cast(), in your module def, you could: if Mix.env() === :test do; @fields ~w(ro_field)a; else; @fields ~w(other_field)a; end
[16:04:23] felipevolpone: has joined #elixir-lang
[16:10:54] nickjj: yeah non-castable, but the thing that's read-only is very important so i'd like to test it when it's either X or Y -- but it needs to be castable in order to modify it for a test
[16:11:20] nickjj: it feels really dirty to modify the main code execution for tests tho
[16:11:44] felipevolpone: has joined #elixir-lang
[16:16:18] lucus16: has joined #elixir-lang
[16:17:49] lucus16: Should mix.lock be committed for libraries? My understanding is that they should not be because non-libraries determine the versions of every transitive dependency themselves
[16:18:34] Disorganized: has joined #elixir-lang
[16:21:14] Czen: has joined #elixir-lang
[16:24:08] sangoma: has joined #elixir-lang
[16:24:36] pera: has joined #elixir-lang
[16:24:53] ericmj: lucus16: mix.lock is used by developers of the library – not consumers of the library
[16:25:04] ericmj: you should commit it so all devs get the same version
[16:25:14] lucus16: ok, thanks
[16:39:11] edwinbalani: has joined #elixir-lang
[16:40:14] duane: has joined #elixir-lang
[16:42:21] proteusguy: has joined #elixir-lang
[16:42:56] purebadger: has joined #elixir-lang
[16:45:43] edwinbalani: has joined #elixir-lang
[16:48:11] m1dnight_: has joined #elixir-lang
[16:51:42] squalloser: has joined #elixir-lang
[17:02:35] lexmag: has joined #elixir-lang
[17:05:27] inerkick: has joined #elixir-lang
[17:07:34] assemblyman: has joined #elixir-lang
[17:16:22] foggyboi: has joined #elixir-lang
[17:29:54] Disorganized: has joined #elixir-lang
[17:32:21] inerkick: has joined #elixir-lang
[17:45:40] lexmag: has joined #elixir-lang
[17:49:23] tuacker: has joined #elixir-lang
[17:49:32] pera: has joined #elixir-lang
[17:52:24] duane: has joined #elixir-lang
[18:01:55] dsr: has joined #elixir-lang
[18:02:07] SirFunk: has joined #elixir-lang
[18:14:16] absolutejam1: has joined #elixir-lang
[18:52:36] Disorganized: has joined #elixir-lang
[18:56:05] laut: has joined #elixir-lang
[19:04:55] orbyt_: has joined #elixir-lang
[19:06:42] orbyt_: has joined #elixir-lang
[19:06:49] Disorganized: has joined #elixir-lang
[19:19:53] lexmag: has joined #elixir-lang
[19:22:26] lexmag: has joined #elixir-lang
[19:23:57] tutti: has joined #elixir-lang
[19:58:42] jeffro_: has joined #elixir-lang
[20:03:01] deesar: has joined #elixir-lang
[20:11:52] wxyzzyrd: has joined #elixir-lang
[20:20:40] pera: has joined #elixir-lang
[20:22:22] Disorganized: has joined #elixir-lang
[20:30:42] greengriminal: has joined #elixir-lang
[20:35:07] quazimodo: has joined #elixir-lang
[20:46:53] mahmudov: has joined #elixir-lang
[20:48:31] orbyt_: has joined #elixir-lang
[20:56:43] dgarwood: has joined #elixir-lang
[20:57:59] jeffro_: has joined #elixir-lang
[21:18:18] ur5us: has joined #elixir-lang
[21:19:00] absolutejam1: has joined #elixir-lang
[21:21:40] lao-tzu: has joined #elixir-lang
[21:23:03] absolutejam2: has joined #elixir-lang
[21:28:56] Disorganized: has joined #elixir-lang
[21:31:41] absolutejam1: has joined #elixir-lang
[21:34:17] aksu: has joined #elixir-lang
[21:49:07] josevalim: tristan__: are you using erl_tidy or erl_prettyptr?
[21:52:19] tristanm_: josevalim: "using", neither. but I took erl_tidy out of otp to create 'rebar3 format' https://github.com/tsloughter/erl_tidy/
[21:52:57] josevalim: tristan__: why did you take it out?
[21:54:20] tristanm_: iterate on it faster and then send it back
[21:55:05] quazimodo: has joined #elixir-lang
[21:55:35] hyerpcore: has joined #elixir-lang
[21:55:54] hyerpcore: anyone implemented a comment system?
[21:56:05] hypercore: what's the best way of doing this?
[21:56:44] tristanm_: josevalim: I never worked on it though, been trying ot get someone to pick it up and drive it forward and then we submit it back to OTP. I don't remember what is still missing/buggy
[21:57:23] ankhers: hypercore: define best? I think Disqus is easy to setup and use.
[21:57:38] josevalim: tristan__: i am planning to get it out of OTP
[21:58:23] tristanm_: josevalim: completely out? why?
[21:58:28] hypercore: Ankhers: i was thinking more of an implemented-in-elixir version
[21:58:51] hypercore: Disqus gives me no possibility of customization
[21:59:07] ankhers: hypercore: What are your requirements?
[22:00:07] hypercore: Ankhers: haven't really thought about it all that deeply, just want to create a commenting system for a community website
[22:00:23] josevalim: tristan__: well, it started with the module igor, which is awkward
[22:00:35] josevalim: and then erl_tidy is considered to be igor's sibling
[22:00:46] josevalim: so i am like "sure, why not?!"
[22:00:48] hypercore: just the standard stuff, users can leave comments on a product page, can reply to other users' comments, etc
[22:02:06] josevalim: tristan__: but in a nutshell, i don't think we can remove syntax_tools out of otp, but i think we can shrink it
[22:02:50] ankhers: hypercore: Anonymous comments? Or only from users that are logged in?
[22:03:52] hypercore: Ankhers: only logged in users
[22:04:07] hypercore: trying to see if i can find a good example
[22:04:09] tristanm_: josevalim: might be a good canidate for their first moving of some shit to hex and out of otp
[22:04:29] tristanm_: well I guess they did split out some shit, but not ot hex yet
[22:04:39] hypercore: Ankhers: maybe HN/reddit style comments
[22:04:46] josevalim: tristan__: yeah, exactly. but it would even be better if they don't maintain it IMO
[22:04:51] ankhers: Okay. Then at the very least, you will need one table with id, user_id, assoc_id, parent_id and comment. Where assoc_id is the id of the thing you are commenting on.
[22:05:20] josevalim: but i am not the one to make those calls :D i even sound entitled saying so
[22:05:39] josevalim: but i think reducing otp's footprint is generally seen as a positive thing?
[22:05:48] tristanm_: completely agree there
[22:06:12] tristanm_: I just want someone to actually maintain it, hehe. we could use a working formatter
[22:08:01] orbyt_: has joined #elixir-lang
[22:09:11] hypercore: Ankhers: make sense, thanks!
[22:10:07] hypercore: Ankhers: also, does it make sense to store a Notification (e.g. what you find on youtube or facebook) in the database, like you would a regular schema?
[22:10:30] ankhers: I don't use facebook or youtube, so I don't really know what you mean by that.
[22:10:33] hypercore: or is something like redis (or another piece of software) better for this
[22:10:46] hypercore: Ankhers: ok say youtube then
[22:11:13] hypercore: like if you get a comment on your channel, or a new video comes out from someone you're subscribed to, you get a notification
[22:19:12] hypercore: woops, missed the youtube part in "i dont use ..."
[22:19:33] hypercore: maybe reddit?
[22:35:31] Disorganized: has joined #elixir-lang
[23:05:58] Ryanar: has joined #elixir-lang
[23:07:03] mahtob: has joined #elixir-lang
[23:20:39] Zarathu: nickjj: checking the mix env in the module definition itself is perfectly fine
[23:20:48] Zarathu: (this is super late, whoops)
[23:20:50] lao-tzu: has joined #elixir-lang
[23:21:34] Zarathu: i wouldn't check Mix.env() in the body of a function though. first because Mix isn't available in a compiled release, but also it's inefficient to keep checking it after the module has been compiled/loaded
[23:46:23] mahmudov: has joined #elixir-lang
[23:50:22] ankhers: hypercore: Sorry for the delay. I guess it really depends. I would probably just build the notification system into postgres, especially if you are not currently using anything else. Mainly because I have more experience with pg than anything else.
[23:53:07] rawtaz: Ankhers: would you use it as a message queue somehow or just poll the database for new notifications?
[23:54:21] ankhers: It depends on my requirements. If my application is mostly static, I would just query the database for new notifications on page reload. However, if it is very dynamic, I would probably use something that isn't pg.
[23:54:24] ankhers: rawtaz: ^^
[23:55:57] ankhers: At least for the notification part. I might still hold the actual comments in pg.
[23:56:15] ankhers: But Phoenix also makes it easy enough via channels to send notifications when things happen.
[23:56:19] ankhers: So who knows.
[23:59:59] nickjj: Zarathu, thanks, i didn't think checking the mix env would be common practice