« Back to channel list

#elixir-lang - 20 March 2019

« Back 1 day Forward 1 day »
[00:03:52] orbyt_: has joined #elixir-lang
[00:09:39] jeffro: has joined #elixir-lang
[00:25:00] jeffro: has joined #elixir-lang
[00:25:00] kaylined: has joined #elixir-lang
[00:40:37] jeffro: has joined #elixir-lang
[00:56:14] Sgeo: has joined #elixir-lang
[01:00:53] kapil____: has joined #elixir-lang
[01:05:57] carldd: has joined #elixir-lang
[01:08:17] sevenseacat: has joined #elixir-lang
[01:20:19] sterl: has joined #elixir-lang
[01:20:34] sterl: has joined #elixir-lang
[01:20:53] jeffro: has joined #elixir-lang
[01:24:43] sms: I'm creating a login attempt counter
[01:26:08] sms: Going to use an Agent to keep track of attempts
[01:26:36] sms: But I want it to expire after 15 mins if they reached their limit
[01:27:17] sms: Should I use a task to keep track of the timing as well
[01:27:27] sms: Or is a Genserv better off for this
[01:36:06] mahmudov: has joined #elixir-lang
[01:59:31] orbyt_: has joined #elixir-lang
[02:16:49] ariedler_: has joined #elixir-lang
[02:31:04] jeffro: has joined #elixir-lang
[02:31:05] jeffro: has joined #elixir-lang
[02:32:18] cmk_zzz: is it possible to run elixir from command line? Like erlang escript? I don't want to create a mix project or anything just conceptually do: elixir myfile.ex[s]
[02:33:24] tomterl: has joined #elixir-lang
[02:34:08] sevenseacat: that will work fine
[02:34:56] cmk_zzz: hah :D It works if you spell elixir right
[02:38:23] work_: has joined #elixir-lang
[02:41:37] jeffro: has joined #elixir-lang
[02:51:47] jeffro: has joined #elixir-lang
[03:01:53] jeffro: has joined #elixir-lang
[03:02:00] Saukk: has joined #elixir-lang
[03:12:04] jeffro: has joined #elixir-lang
[03:20:21] carldd: has joined #elixir-lang
[03:21:15] Nikkel: has joined #elixir-lang
[03:22:11] jeffro: has joined #elixir-lang
[03:32:18] jeffro: has joined #elixir-lang
[03:42:53] jeffro: has joined #elixir-lang
[03:50:43] notzmv: has joined #elixir-lang
[03:52:59] jeffro: has joined #elixir-lang
[04:03:07] jeffro: has joined #elixir-lang
[04:05:44] standoo: has joined #elixir-lang
[04:12:36] Ninja3047: has joined #elixir-lang
[04:13:16] jeffro: has joined #elixir-lang
[04:17:39] drewolson: has joined #elixir-lang
[04:23:25] jeffro: has joined #elixir-lang
[04:33:34] jeffro: has joined #elixir-lang
[04:43:05] harfangk: has joined #elixir-lang
[04:44:04] jeffro: has joined #elixir-lang
[04:51:09] Devalo: has joined #elixir-lang
[04:54:12] jeffro: has joined #elixir-lang
[05:04:27] jeffro: has joined #elixir-lang
[05:08:13] mbuf: has joined #elixir-lang
[05:14:30] jeffro: has joined #elixir-lang
[05:24:38] jeffro: has joined #elixir-lang
[05:26:50] rck_: has joined #elixir-lang
[05:34:46] jeffro: has joined #elixir-lang
[05:35:34] toothfairy__: has joined #elixir-lang
[05:45:22] jeffro: has joined #elixir-lang
[05:55:30] jeffro: has joined #elixir-lang
[06:05:38] jeffro: has joined #elixir-lang
[06:15:46] jeffro: has joined #elixir-lang
[06:18:21] ariedler_: has joined #elixir-lang
[06:25:53] jeffro: has joined #elixir-lang
[06:29:56] Devalo: has joined #elixir-lang
[06:36:02] jeffro: has joined #elixir-lang
[06:40:51] Devalo: has joined #elixir-lang
[06:46:34] jeffro: has joined #elixir-lang
[06:56:41] jeffro: has joined #elixir-lang
[07:04:50] craigp_: has joined #elixir-lang
[07:06:50] jeffro: has joined #elixir-lang
[07:16:59] jeffro: has joined #elixir-lang
[07:22:33] hahuang6|: has joined #elixir-lang
[07:27:10] jeffro: has joined #elixir-lang
[07:37:18] jeffro: has joined #elixir-lang
[07:42:37] standoo: has joined #elixir-lang
[07:43:37] craigp_: has joined #elixir-lang
[07:47:50] jeffro: has joined #elixir-lang
[07:57:58] jeffro: has joined #elixir-lang
[08:08:09] jeffro: has joined #elixir-lang
[08:08:17] netrino: has joined #elixir-lang
[08:16:22] lexmag: has joined #elixir-lang
[08:18:15] jeffro: has joined #elixir-lang
[08:20:19] kansi: has joined #elixir-lang
[08:22:32] PragTob: has joined #elixir-lang
[08:28:23] jeffro: has joined #elixir-lang
[08:38:30] jeffro: has joined #elixir-lang
[08:38:43] DarkSeid: has joined #elixir-lang
[08:40:07] iFire: has joined #elixir-lang
[08:41:20] craigp_: has joined #elixir-lang
[08:42:20] ur5us: has joined #elixir-lang
[08:49:04] jeffro: has joined #elixir-lang
[08:59:13] jeffro: has joined #elixir-lang
[09:00:01] bingobingolotto: has joined #elixir-lang
[09:00:39] ur5us: has joined #elixir-lang
[09:06:47] maddybutt: has joined #elixir-lang
[09:09:19] jeffro: has joined #elixir-lang
[09:11:15] wonko7: has joined #elixir-lang
[09:15:31] garazdawi: has joined #elixir-lang
[09:17:54] neozor: has joined #elixir-lang
[09:19:31] jeffro: has joined #elixir-lang
[09:29:40] jeffro: has joined #elixir-lang
[09:34:21] Middernacht: has joined #elixir-lang
[09:35:24] craigp_: has joined #elixir-lang
[09:39:44] jeffro: has joined #elixir-lang
[09:44:50] standoo: has joined #elixir-lang
[09:47:37] dps: has joined #elixir-lang
[09:49:53] hypercore: has joined #elixir-lang
[09:50:19] jeffro: has joined #elixir-lang
[10:00:25] jeffro: has joined #elixir-lang
[10:05:03] zakora___: has joined #elixir-lang
[10:10:34] jeffro: has joined #elixir-lang
[10:19:09] DarkSeid: has joined #elixir-lang
[10:20:01] ariedler_: has joined #elixir-lang
[10:20:46] jeffro: has joined #elixir-lang
[10:20:53] siwatpru: has joined #elixir-lang
[10:30:54] jeffro: has joined #elixir-lang
[10:35:14] craigp_: has joined #elixir-lang
[10:41:02] jeffro: has joined #elixir-lang
[10:47:13] harfangk: has joined #elixir-lang
[10:48:24] tnez: has joined #elixir-lang
[10:51:32] jeffro: has joined #elixir-lang
[10:53:04] InfinityFye: has joined #elixir-lang
[11:01:43] jeffro: has joined #elixir-lang
[11:04:05] hindenbug[m]: has joined #elixir-lang
[11:04:45] zakora___: Any idea on how should I populate fake data into my test database when running "mix test" in a Phoenix application?
[11:11:50] jeffro: has joined #elixir-lang
[11:12:59] harfangk: has joined #elixir-lang
[11:18:53] toothfai1y__: has joined #elixir-lang
[11:21:59] jeffro: has joined #elixir-lang
[11:23:54] ariedler_: has joined #elixir-lang
[11:25:44] InfinityFye: has joined #elixir-lang
[11:32:10] jeffro: has joined #elixir-lang
[11:38:40] bingobingolotto: has joined #elixir-lang
[11:42:06] ankhers: zakora___: Generally you would insert the data that each test needs at the start of each test.
[11:42:16] jeffro: has joined #elixir-lang
[11:43:44] zakora___: Ankhers: I see. In case I need a common set of data for many tests, can I put them in "setup_all"?
[11:46:12] ankhers: zakora___: I'm not going to lie, I don't know how ecto's sandboxes would work in a scenario like that.
[11:46:53] zakora___: Ankhers: no problem, thanks for the advice.
[11:52:49] jeffro: has joined #elixir-lang
[12:02:56] jeffro: has joined #elixir-lang
[12:05:58] dysfun: what's the easiest way of pushing onto the *end* of a list? and to hell with performance
[12:08:20] dysfun: if anyone else had said that, i'd take it as an answer but i'm never sure if you're just being funn
[12:09:03] nox: Nah, it's the actual answer.
[12:09:56] nox: http://erlang.org/doc/man/lists.html#append-2
[12:10:15] ankhers: Unless improper lists are an option.
[12:10:17] nox: The pencil icon next to the function signature may be the most useless feature I've ever seen.
[12:10:33] nox: Ankhers: Wouldn't have said "push" if that was the case.
[12:10:47] dysfun: yeah, not sure how improper lists help with an append
[12:10:57] ankhers: It becomes O(1)
[12:11:07] ankhers: Doesn't it?
[12:11:16] nox: You still have to reach the damn end.
[12:11:18] dysfun: you definitely cannot append to a list in O(1)
[12:11:36] ankhers: [ foo | 1 ] Doesn't traverse foo.
[12:11:43] dysfun: that's a prepend
[12:11:52] ankhers: 1 in this case is what you are appending.
[12:11:59] nox: That makes a new cell where the head is foo and 1 is the tail, that's not appending in any way.
[12:12:03] nox: That's redefining appending.
[12:12:08] nox: The only way to have O(1) append is to write body-recursive list-building functions in a VM with TCMCO, which BEAM doesn't have.
[12:12:30] nox: Tail Call Modulo Cons Optimisation
[12:12:35] dysfun: yeah, a O(1) append is totally impossible in elixir
[12:12:41] dysfun: on a list
[12:13:04] jeffro: has joined #elixir-lang
[12:13:07] dysfun: or indeed on any singly linked list
[12:13:19] dysfun: because first you must traverse to the end
[12:14:08] nox: ACTION goes out.
[12:14:37] ankhers: It's not technically appending, no. But It still provides a list where the last element is the new element. You are still able to traverse the improper list to go through every element in the previous list.
[12:15:22] dysfun: i do not want a new structure, i want to retain the previous structure, just with an extra item at the end
[12:16:39] PragTob: has joined #elixir-lang
[12:23:14] jeffro: has joined #elixir-lang
[12:23:21] danecando: has joined #elixir-lang
[12:26:34] manveru: anyone know why dialyzer runs the compilation for all deps every single time i modify a file in lib?
[12:31:36] lauromoura: has joined #elixir-lang
[12:33:20] jeffro: has joined #elixir-lang
[12:34:32] manveru: actually, it's `mix compile` that does it, just not sure why
[12:38:30] gvaughn: has joined #elixir-lang
[12:43:30] jeffro: has joined #elixir-lang
[12:54:04] jeffro: has joined #elixir-lang
[12:57:30] duane: has joined #elixir-lang
[13:01:51] ariedler_: has joined #elixir-lang
[13:04:12] jeffro: has joined #elixir-lang
[13:14:21] jeffro: has joined #elixir-lang
[13:15:28] knack: has joined #elixir-lang
[13:22:00] Moondhum: has joined #elixir-lang
[13:24:25] jeffro: has joined #elixir-lang
[13:24:32] lnikkila: has joined #elixir-lang
[13:31:44] hypercore: has joined #elixir-lang
[13:34:34] jeffro: has joined #elixir-lang
[13:44:43] jeffro: has joined #elixir-lang
[13:45:29] Sionide21: sms: You probably want a GenServer. Task and Agent are both just special cases of GenServer. Task is for *only* behavior and Agent is for *only* state. Since you want state *and* behavior, you don't fall into either of those special cases
[13:52:17] gvaughn: has joined #elixir-lang
[13:55:15] jeffro: has joined #elixir-lang
[13:55:33] ariedler_: has joined #elixir-lang
[13:58:12] gvaughn: has joined #elixir-lang
[13:58:36] bingobingolotto: has joined #elixir-lang
[14:05:23] jeffro: has joined #elixir-lang
[14:06:16] NeilCarvalho: has joined #elixir-lang
[14:06:46] 7JTABDJ9G: has joined #elixir-lang
[14:18:06] jeffro: has joined #elixir-lang
[14:21:06] DarkSeid: has joined #elixir-lang
[14:26:44] hypercore: guys how should i store a Product price if it varies for different currencies? e.g. $200 in USD, 350 euro in euro, 300 GBP in GBP etc
[14:27:33] dysfun: is it the same amount, just in different currencies?
[14:28:37] dysfun: i.e. is the difference purely presentational
[14:30:37] hypercore: dysfun: it's different amounts in different currencies
[14:30:52] dysfun: and is this post or pre tax?
[14:31:05] hypercore: e.g. if 1 USD = 1.5 GBP, then a product might have a price of $200 USD and 100 GBP
[14:31:13] hypercore: dysfun: post
[14:32:18] nox: Something is fucked up if it costs $200 or €350 though.
[14:32:25] dysfun: and are you aware that the taxes chargeable may vary based on territory, not just currency?
[14:36:17] hypercore: dysfun: yeah
[14:37:14] hypercore: just wondering more about how you would implement the simplified version, i.e. storing a price of n_x for a currency of n_y for a product X
[14:37:27] hypercore: nox: just an example to illustrate the relationship
[14:38:56] dysfun: the simple version requires a nother table that links to both the product and the currency
[14:39:10] dysfun: or a jsonb column or similar performing such a mapping (but that's not so nice)
[14:41:32] nineczar: has joined #elixir-lang
[14:51:04] Guest56342_: has joined #elixir-lang
[14:52:02] hypercore: dysfun: what's the problem with a jsonb field?
[14:54:36] Guest56342_: has left #elixir-lang: ()
[14:54:57] ariedler_: has joined #elixir-lang
[14:56:00] lauromoura_: has joined #elixir-lang
[15:15:53] sergio_101: has joined #elixir-lang
[15:17:23] sergio_101: has joined #elixir-lang
[15:19:15] DarkSeid: has joined #elixir-lang
[15:20:13] sergio_101: has joined #elixir-lang
[15:28:34] toothfairy__: has joined #elixir-lang
[15:33:41] toothfai1y__: has joined #elixir-lang
[15:37:49] za1b1tsu: has joined #elixir-lang
[15:50:37] neozor: has joined #elixir-lang
[15:54:46] ariedler_: has joined #elixir-lang
[15:55:28] assemblyman: has joined #elixir-lang
[16:00:25] ariedler_: has joined #elixir-lang
[16:06:51] orbyt_: has joined #elixir-lang
[16:13:57] ariedler_: has joined #elixir-lang
[16:22:41] nickjj_: has joined #elixir-lang
[16:25:33] ariedler_: has joined #elixir-lang
[16:32:44] Phylock: has joined #elixir-lang
[16:39:36] aalmazan: has joined #elixir-lang
[16:49:57] ariedler_: has joined #elixir-lang
[16:50:15] greengriminal: has joined #elixir-lang
[16:53:06] ariedler_: has joined #elixir-lang
[16:56:56] za1b1tsu: has joined #elixir-lang
[16:57:49] DarkSeid: has joined #elixir-lang
[17:00:51] torwegia: has joined #elixir-lang
[17:01:08] Saukk: has joined #elixir-lang
[17:02:44] jeffro: has joined #elixir-lang
[17:10:13] greengriminal: has joined #elixir-lang
[17:20:49] neozor: has joined #elixir-lang
[17:23:38] danecando: has joined #elixir-lang
[17:26:38] wsieroci: has joined #elixir-lang
[17:28:52] jeffro: has joined #elixir-lang
[17:29:12] schainks: has joined #elixir-lang
[17:32:37] samrose: has joined #elixir-lang
[17:34:40] mahmudov: has joined #elixir-lang
[17:48:43] assemblyman: has joined #elixir-lang
[17:58:29] Devalo: has joined #elixir-lang
[18:02:54] phantummm: has joined #elixir-lang
[18:05:07] benwilson512: do you actually need different prices per currency?
[18:05:28] benwilson512: vs a canonical price in currency X and then the other prices are X * exhange rate
[18:06:16] thurloat: benwilson512 i know some people do this so they can reach different regions more effectively with pricing. i.e. if you're paying in certain currencies, and visiting from some less-developed country the product is actually cheaper
[18:06:22] thurloat: usually for digital products
[18:09:50] Nicd-: also you take $1 from the US users and 1 € from the EU users, it seems the norm is :P
[18:10:07] Nicd-: the Steam way
[18:12:30] NeilCarvalho: has joined #elixir-lang
[18:13:54] assemblyman: has joined #elixir-lang
[18:15:21] lauromoura: has joined #elixir-lang
[18:18:56] work_: has joined #elixir-lang
[18:20:05] dysfun: benwilson512: i did actually ask that :)
[18:20:21] dysfun: hypercore: well you won't get all the nice stuff like enforcing foreign keys and such
[18:20:51] dysfun: basically, your data could be complete shit and you wouldn't even know
[18:24:41] lexmag: has joined #elixir-lang
[18:27:46] orbyt_: has joined #elixir-lang
[18:31:06] sasajuric: has joined #elixir-lang
[18:31:09] laut: has joined #elixir-lang
[18:31:13] ahills: has joined #elixir-lang
[18:31:35] jeffro: has joined #elixir-lang
[18:31:42] brenda: has joined #elixir-lang
[18:31:53] Paradox: has joined #elixir-lang
[18:32:08] Ninja3047: has joined #elixir-lang
[18:32:25] PragTob: has joined #elixir-lang
[18:32:57] billstclair: has joined #elixir-lang
[18:33:00] manveru: has joined #elixir-lang
[18:33:01] adulteratedjedi: has joined #elixir-lang
[18:33:02] chewbranca: has joined #elixir-lang
[18:33:19] TechDragon: has joined #elixir-lang
[18:33:26] burbas: has joined #elixir-lang
[18:33:29] tnez: has joined #elixir-lang
[18:34:33] DukeDave: has joined #elixir-lang
[18:34:36] BBHoss: has joined #elixir-lang
[18:34:40] jhill: has joined #elixir-lang
[18:34:45] rvirding: has joined #elixir-lang
[18:34:48] termos: has joined #elixir-lang
[18:34:58] chazlever: has joined #elixir-lang
[18:35:04] msch: has joined #elixir-lang
[18:35:12] zkat: has joined #elixir-lang
[18:35:18] jevy: has joined #elixir-lang
[18:37:54] netrino: has joined #elixir-lang
[18:39:31] squall: has joined #elixir-lang
[18:39:56] Fire-Dragon-DoL: has joined #elixir-lang
[18:39:59] davisp: has joined #elixir-lang
[18:40:02] ericmj: has joined #elixir-lang
[18:40:37] ytruly: has joined #elixir-lang
[18:40:42] ericentin: has joined #elixir-lang
[18:40:42] gen_ale_drinker: has joined #elixir-lang
[18:40:42] bgmarx: has joined #elixir-lang
[18:40:43] bytesighs: has joined #elixir-lang
[18:40:46] marceldegraaf_: has joined #elixir-lang
[18:40:46] dignifiedquire_: has joined #elixir-lang
[18:40:46] christhekeele: has joined #elixir-lang
[18:41:08] yurrriq: has joined #elixir-lang
[18:42:09] danmcclain_: has joined #elixir-lang
[18:42:17] rfv: has joined #elixir-lang
[18:42:21] josevalim: has joined #elixir-lang
[18:44:01] ryanwinchester: has joined #elixir-lang
[18:44:01] za1b1tsu: has joined #elixir-lang
[18:44:42] asonge: has joined #elixir-lang
[18:44:45] wojtekmach: has joined #elixir-lang
[18:44:45] jeregrine: has joined #elixir-lang
[18:45:04] nyaray: has joined #elixir-lang
[18:45:32] bcardarella: has joined #elixir-lang
[18:45:33] HalcyonicStorm: has joined #elixir-lang
[18:45:52] strmpnk: has joined #elixir-lang
[19:06:52] kapil____: has joined #elixir-lang
[19:18:43] NyanNyan: has joined #elixir-lang
[19:24:51] ericmj: Nicd-: it usually works out the same when you take sales tax / VAT into account
[19:30:26] DarkSeid: has joined #elixir-lang
[19:38:11] davidw: has joined #elixir-lang
[19:38:15] davidw_: has joined #elixir-lang
[19:40:37] assemblyman: has joined #elixir-lang
[19:40:41] standoo: has joined #elixir-lang
[19:45:39] paxis: has joined #elixir-lang
[19:54:22] sms: Sionide21: Alright that's sort of what I figured. I was thinking I'd just have a Task watch over the Agent and do all the timing related stuff
[19:54:30] sms: But yeah probably a little convoluted
[19:59:30] markh: has joined #elixir-lang
[19:59:43] craigp_: has joined #elixir-lang
[19:59:56] Devalo: has joined #elixir-lang
[20:02:57] Sentreen: has joined #elixir-lang
[20:03:00] netrino_: has joined #elixir-lang
[20:03:29] ayr-ton: has joined #elixir-lang
[20:04:21] netrino__: has joined #elixir-lang
[20:09:21] Devalo: has joined #elixir-lang
[20:11:19] madd: has joined #elixir-lang
[20:12:50] Ove_: has joined #elixir-lang
[20:13:32] ur5us: has joined #elixir-lang
[20:14:37] ayr-ton: has joined #elixir-lang
[20:15:21] hahuang65_: has joined #elixir-lang
[20:15:49] assemblyman: has joined #elixir-lang
[20:23:38] hahuang65: has joined #elixir-lang
[20:26:31] jeffro: has joined #elixir-lang
[20:30:35] Sentreen: has joined #elixir-lang
[20:38:10] askatasuna: has joined #elixir-lang
[20:39:02] hirjonica: has joined #elixir-lang
[20:44:31] Sentreen: has joined #elixir-lang
[20:50:11] craigp_: has joined #elixir-lang
[20:50:23] Sentreen: has joined #elixir-lang
[20:51:41] Sentreen: has joined #elixir-lang
[20:55:41] ariedler_: has joined #elixir-lang
[21:05:44] Sentreen: has joined #elixir-lang
[21:10:30] torwegia: has joined #elixir-lang
[21:11:14] Devalo: has joined #elixir-lang
[21:12:01] Sentreen: has joined #elixir-lang
[21:14:32] ariedler_: has joined #elixir-lang
[21:15:25] Sentreen: has joined #elixir-lang
[21:16:22] Sentreen: has joined #elixir-lang
[21:20:31] Sentreen: has joined #elixir-lang
[21:21:18] wonko7: has joined #elixir-lang
[21:23:42] tpl: has joined #elixir-lang
[21:37:11] Sentreen: has joined #elixir-lang
[21:40:40] klltkr: has joined #elixir-lang
[21:44:55] Devalo: has joined #elixir-lang
[21:51:18] griffinbyatt: has joined #elixir-lang
[22:01:05] ariedler_: has joined #elixir-lang
[22:13:33] Sentreen: has joined #elixir-lang
[22:14:58] Sentreen: has joined #elixir-lang
[22:20:19] jeffro: has joined #elixir-lang
[22:34:43] Sentreen: has joined #elixir-lang
[22:49:44] craigp_: has joined #elixir-lang
[22:56:58] sms: I can use Process functions on Tasks right?
[22:57:14] sms: Actually I guess that wouldn't be hard to test my bad
[22:58:05] jblaisdell: has joined #elixir-lang
[22:58:52] danecando: has joined #elixir-lang
[22:59:58] josevalim: sms: task has a PID field
[23:01:23] sms: Yeah same thing basically right
[23:03:37] netrino: has joined #elixir-lang
[23:06:07] tpl: has joined #elixir-lang
[23:10:49] jeffro: has joined #elixir-lang
[23:11:22] Ove_: has joined #elixir-lang
[23:12:13] NeilCarvalho: has joined #elixir-lang
[23:13:42] jblaisdell: has joined #elixir-lang
[23:24:24] lauromoura: has joined #elixir-lang
[23:28:11] rawtaz: has joined #elixir-lang
[23:33:00] Sgeo: has joined #elixir-lang
[23:38:13] jeffro: has joined #elixir-lang
[23:53:30] jeffro: has joined #elixir-lang