« Back to channel list

#elixir-lang - 09 July 2019

« Back 1 day Forward 1 day »
[00:01:24] Disorganized: has joined #elixir-lang
[00:09:48] lauromoura__: has joined #elixir-lang
[00:13:42] jeffweiss: has joined #elixir-lang
[00:14:59] Exuma: has joined #elixir-lang
[00:15:23] Exuma: how do i use lock: "FOR UPDATE" with multi/
[00:19:14] w09x: has joined #elixir-lang
[00:20:23] w09x: If I have a variable that is either an array or nil, is there a way to cast that variable so that it is always the array or an empty array?
[00:22:11] Exuma: better question, how do I get the record back on constraint violation instead of returning ID
[00:22:57] josevalim: w09x: List.wrap
[00:23:12] ariedler: half way through typing and josevalim beats me to it lol
[00:23:18] josevalim: it does a bit more, but it may be enough
[00:23:23] josevalim: otherwiise write a small function that does it
[00:24:20] w09x: josevalim thanks, and thanks for all your work, absolutely loving Phoenix.
[00:24:49] ariedler: Exuma: there is no way to do that in 1 sql command AFAIK
[00:35:04] icecreamcohen: has joined #elixir-lang
[00:35:08] alexband: has joined #elixir-lang
[00:56:09] jeffro_: has joined #elixir-lang
[01:04:13] bturnbull: has left #elixir-lang: ()
[01:05:46] kriwil: has joined #elixir-lang
[01:12:27] tomterl: has joined #elixir-lang
[01:23:26] duane: has joined #elixir-lang
[01:28:33] jeffweiss: has joined #elixir-lang
[01:30:31] lessless: has joined #elixir-lang
[01:30:39] cmk_zzz: when building a phoenix release for various platforms should I rm -rf ./assets/node_modules?
[01:30:39] cmk_zzz: I am also rm -rf _build. Don't know if neither is needed. I build the different platforms in docker and unsure of best approach. I could start with a clean git repo for each build. Then I don't need to rm anything
[01:33:56] drrty: has joined #elixir-lang
[01:34:30] gausby_: has joined #elixir-lang
[01:37:15] jeffro_: has joined #elixir-lang
[01:37:58] comboy: has joined #elixir-lang
[01:54:55] theWhisper__: has joined #elixir-lang
[01:56:12] pera: has joined #elixir-lang
[02:03:14] ariedler: has joined #elixir-lang
[02:06:01] jeffweiss: has joined #elixir-lang
[02:09:25] theWhisper__: has joined #elixir-lang
[02:15:28] theWhisper__: has joined #elixir-lang
[02:23:59] Disorganized: has joined #elixir-lang
[02:25:36] Saukk: has joined #elixir-lang
[02:27:49] jeffro_: has joined #elixir-lang
[02:27:55] wormwood: has joined #elixir-lang
[02:32:02] wormwood: if I have a bunch of modules that implement the same couple of functions, what would be the best way to refactor something like that?
[02:32:56] ankhers: wormwood: The same function definition, or the same function name?
[02:33:48] wormwood: Ankhers: same definition
[02:34:33] ankhers: Put it in another module. Then all of your current modules can call the function from that one.
[02:38:26] DTZUZO: has joined #elixir-lang
[02:39:34] mdbm: has joined #elixir-lang
[02:40:40] ankhers: wormwood: Maybe not a new module, but one that makes sense for all of your others to be calling from.
[02:42:55] foggyboi: has joined #elixir-lang
[02:49:46] lessless: has joined #elixir-lang
[02:57:22] cmk_zzz: how are you handling version in mix.exs? Manually set it? Or derived it from elsewhere like a git tag?
[02:58:20] jeffweiss: has joined #elixir-lang
[03:09:09] jeffweiss: has joined #elixir-lang
[03:14:23] jeffweiss: has joined #elixir-lang
[03:28:05] gvaughn: has joined #elixir-lang
[03:46:13] Exuma: has joined #elixir-lang
[03:51:24] jeffweiss: has joined #elixir-lang
[03:58:45] Disorganized: has joined #elixir-lang
[04:05:38] jeffro_: has joined #elixir-lang
[04:09:53] alexband: has joined #elixir-lang
[04:36:44] serafeim: good morning could anybody take a look at this question: https://elixirforum.com/t/create-dynamic-bindings-for-where-clause/23797 TIA
[04:40:24] jeffro_: has joined #elixir-lang
[04:47:26] gvaughn: has joined #elixir-lang
[04:53:32] Phylock: has joined #elixir-lang
[05:05:32] feld: has joined #elixir-lang
[05:08:15] ur5us: has joined #elixir-lang
[05:11:51] za1b1tsu: has joined #elixir-lang
[05:15:56] za1b1tsu: has joined #elixir-lang
[05:19:20] ur5us: has joined #elixir-lang
[05:20:44] ur5us: has joined #elixir-lang
[05:27:51] jeffro_: has joined #elixir-lang
[05:29:19] voltone: has joined #elixir-lang
[05:47:14] proteusguy: has joined #elixir-lang
[06:16:39] micmus: has joined #elixir-lang
[06:19:54] purebadger: has joined #elixir-lang
[06:21:41] tuacker: has joined #elixir-lang
[06:24:13] iFire: has joined #elixir-lang
[06:36:22] sangoma: has joined #elixir-lang
[06:48:19] josevalim: serafeim: perry responde is correct
[06:48:36] josevalim: You want to use named bindings
[06:48:55] josevalim: from Post, as: :posts
[06:49:00] josevalim: And then later
[06:49:25] josevalim: where([posts: p], p.is_public)
[06:56:45] DTZUZO: has joined #elixir-lang
[07:06:25] ur5us: has joined #elixir-lang
[07:10:10] flaviodesousa: has joined #elixir-lang
[07:13:17] PragTob: has joined #elixir-lang
[07:14:55] purebadger: has joined #elixir-lang
[07:23:27] mdbm: has joined #elixir-lang
[07:28:35] jeffro_: has joined #elixir-lang
[07:29:46] gvaughn: has joined #elixir-lang
[07:37:06] serafeim: josevalim: i am aware of named bindings but how can it solve my problem ?
[07:37:33] josevalim: serafeim: why it doesn't solve your problem?
[07:38:00] josevalim: if you know you want to use binding for "posts", then you do `where([posts: p], p.foo == 1)`
[07:38:05] josevalim: if the binding itself is dynaimc, you can do
[07:38:06] serafeim: josevalim: i want to do something like `foo = *VARIABLE*` and then `where([foo: f], f.is_public). i want the binding to be assigned through a variable
[07:38:25] josevalim: `where([{^binding, table}], table.foo == 1)`
[07:38:31] serafeim: i don't know a priori which is the name of the binding; i want it to be configurable
[07:38:41] josevalim: `where([{^binding, table}], field(table, ^field) == ^value)`
[07:38:58] iamvery: has joined #elixir-lang
[07:39:36] serafeim: hmmm can you clarify a little more ? in the query you mention `table` can be a variable ? and also `binding` is a variable ?
[07:39:59] serafeim: i guess `table` doesn't need to be a variable, it is the name of the binding i want to use there
[07:40:53] serafeim: so i can do `binding = "koko"` `field = "foo"` `value = "bar"` and then `where([{^binding, c}], field(c, ^field) == ^value)` ?
[07:41:03] serafeim: will this work with strings or I need atoms ? or something else ?
[07:42:15] serafeim: hm, ok i'll check it out thanks
[07:44:51] lexmag: has joined #elixir-lang
[07:47:55] serafeim: josevalim: yes !!! this https://dpaste.de/AmLk works ! thank you so much !
[07:48:22] josevalim: binding and fields have to be atoms
[07:48:31] josevalim: please post the reply in the forum for the future :)
[07:48:42] serafeim: yes of course i'll do it right now
[07:49:58] BeerLover: has joined #elixir-lang
[08:19:00] BeerLover: has joined #elixir-lang
[08:20:59] optikfluffel: has joined #elixir-lang
[08:21:55] CornishPasty: Is there any way to make ecto connect to multiple mysql hosts, in order to facilitate HA/failover?
[08:23:14] dysfun: ecto can connect to multiple db hosts, but it won't just "do" HA for you
[08:25:08] CornishPasty: So we'd have to implement HA/failover within our app?
[08:26:15] dysfun: if you want to do it by connecting to multiple database servers, yes
[08:26:20] dysfun: or outsource it to a proxy of some kind
[08:26:30] dysfun: which could run on each machine even
[08:27:14] CornishPasty: Mmh fair enough
[08:27:33] CornishPasty: I already thought this was the case, I just wanted to double check
[08:27:34] CornishPasty: Thanks dysfun
[08:27:52] dysfun: i don't know a proxy to recommend btw, i'm a postgres user
[08:28:11] CornishPasty: Yeah, if I was using postgres I'd probably use pgbouncer
[08:29:03] Ove_: Is there a way to force ipv4 lookups only?
[08:29:13] dysfun: for what?
[08:29:18] Ove_: For an elixir application
[08:29:54] dysfun: there is no global switch, but each place you do a dns lookup, you can make it request ipv4 only
[08:30:05] dysfun: if the libraries you're using for that permit it
[08:31:38] dysfun: looks like you have to disable the kernel ipv6 module to make it not try
[08:31:54] Ove_: Doesnt seem to work with docker.
[08:32:07] Ove_: The host has ipv6 disabled.
[08:32:23] Ove_: But network interfaces still get created with ipv6 enabled.
[08:32:24] dysfun: what is it you're doing where it's getting an ipv6 address?
[08:33:35] Ove_: Trying to spin up a container and elixir applications seems to try to do both ipv4 and ipv6 lookups together with musl.
[08:33:49] dysfun: oh, it's not your codebase?
[08:33:58] Ove_: In a way it is
[08:34:03] Ove_: But I do ops.
[08:34:14] Ove_: It's for $work.
[08:34:50] dysfun: i think you're going to have to get the developer to be more careful about ipv6 as a configuration option
[08:35:36] Ove_: What happens is that musl will try to resolve ipv6 and ipv4 at the same time. But doesnt return a record until ipv6 times out.
[08:35:54] Ove_: So I am looking for a way to disable ipv6 completely in the app.
[08:36:06] dysfun: disabling it completely in the os should do that
[08:36:16] Ove_: And convincing service owners to change to a docker image with glibc is not a fight I am willing to take.
[08:36:29] Ove_: The thing is that disabling it in the os doesn't help.
[08:36:45] dysfun: is this a musl thing then?
[08:37:09] dysfun: sorry, no idea
[08:37:24] dysfun: musl does have its quirks
[08:37:49] dysfun: maybe there are options you can build it with
[08:38:29] dysfun: but i'd definitely expect if ipv6 was disabled, it wouldn't wait ages
[08:38:46] dysfun: if you're sure it is, that sounds like a musl bug
[08:50:32] m1dnight_: has joined #elixir-lang
[08:57:40] lexmag: has joined #elixir-lang
[09:10:01] lexmag: has joined #elixir-lang
[09:12:03] mdbm: has joined #elixir-lang
[09:17:09] d0zingcat: has joined #elixir-lang
[09:18:07] gvaughn: has joined #elixir-lang
[09:19:59] lexmag: has joined #elixir-lang
[09:29:29] jeffro_: has joined #elixir-lang
[09:37:07] lexmag: has joined #elixir-lang
[09:38:32] helaoban: has joined #elixir-lang
[09:39:43] serafeim: I want to domething like this `fragment("extract (year from ?) = ?", ^(field_name|>to_string), ^value)` but I get the following error: `ERROR 42725 (ambiguous_function) function pg_catalog.date_part(unknown, unknown) is not unique`
[09:39:55] serafeim: and it also says ` hint: Could not choose a best candidate function. You might need to add explicit type casts.`
[09:39:58] serafeim: any ideas ?
[09:48:41] serafeim: got it ! here's how it should e written: `fragment("extract (year from ?) = ?", field(t, ^field_name), ^value)`
[10:00:06] BeerLover: has joined #elixir-lang
[10:02:54] jeffweiss: has joined #elixir-lang
[10:24:45] voltone: has joined #elixir-lang
[10:25:29] jeffro_: has joined #elixir-lang
[10:30:13] voltone: has joined #elixir-lang
[10:39:58] purebadger: has joined #elixir-lang
[10:44:39] voltone: has joined #elixir-lang
[11:00:54] iamvery: has joined #elixir-lang
[11:06:17] dsr3: has joined #elixir-lang
[11:06:23] gvaughn: has joined #elixir-lang
[11:14:54] jeffweiss: has joined #elixir-lang
[11:33:09] drincruz: has joined #elixir-lang
[11:45:48] davicta: has joined #elixir-lang
[11:52:15] nextloop_: has joined #elixir-lang
[11:52:24] afk|dbarrett: has joined #elixir-lang
[11:56:03] dbarrett: has joined #elixir-lang
[11:58:14] davic: has joined #elixir-lang
[12:00:55] iamvery: has joined #elixir-lang
[12:01:27] lexmag: has joined #elixir-lang
[12:01:30] lucus16: has joined #elixir-lang
[12:01:30] pmarreck: has joined #elixir-lang
[12:01:30] kzemek: has joined #elixir-lang
[12:01:30] dnyy: has joined #elixir-lang
[12:01:30] Scorchin: has joined #elixir-lang
[12:01:30] asonge: has joined #elixir-lang
[12:01:30] bytesighs: has joined #elixir-lang
[12:01:30] benwilson512: has joined #elixir-lang
[12:01:30] Guest82928___: has joined #elixir-lang
[12:01:30] chazlever: has joined #elixir-lang
[12:01:30] benoitc: has joined #elixir-lang
[12:01:30] CornishPasty: has joined #elixir-lang
[12:01:30] sickill: has joined #elixir-lang
[12:01:30] lackac: has joined #elixir-lang
[12:01:30] fishcakez: has joined #elixir-lang
[12:01:30] boeg: has joined #elixir-lang
[12:01:30] josevalim: has joined #elixir-lang
[12:01:30] ryanwinchester: has joined #elixir-lang
[12:01:30] zkat: has joined #elixir-lang
[12:01:31] elskwid_: has joined #elixir-lang
[12:01:31] OvermindDL1: has joined #elixir-lang
[12:01:31] andersh_: has joined #elixir-lang
[12:01:31] Blkt: has joined #elixir-lang
[12:01:31] yrashk: has joined #elixir-lang
[12:01:31] rfv: has joined #elixir-lang
[12:01:31] Brend: has joined #elixir-lang
[12:01:31] rvirding: has joined #elixir-lang
[12:01:31] obfusk: has joined #elixir-lang
[12:01:31] whatyouhide: has joined #elixir-lang
[12:01:31] adulteratedjedi: has joined #elixir-lang
[12:01:31] jameshaydon: has joined #elixir-lang
[12:01:31] Guest94108_____: has joined #elixir-lang
[12:01:31] fowlduck: has joined #elixir-lang
[12:01:31] eproxus: has joined #elixir-lang
[12:01:31] reem____: has joined #elixir-lang
[12:01:31] FMJz___: has joined #elixir-lang
[12:01:31] dignifiedquire: has joined #elixir-lang
[12:01:31] manveru: has joined #elixir-lang
[12:01:31] dch: has joined #elixir-lang
[12:01:32] ericmj: has joined #elixir-lang
[12:01:32] CARAM_______: has joined #elixir-lang
[12:01:32] gonz_: has joined #elixir-lang
[12:01:32] tvon: has joined #elixir-lang
[12:01:32] sinni800: has joined #elixir-lang
[12:01:32] Isilkor: has joined #elixir-lang
[12:02:01] hypercore: has joined #elixir-lang
[12:03:52] targaf: has joined #elixir-lang
[12:08:41] jeffro_: has joined #elixir-lang
[12:13:37] wormwood: has joined #elixir-lang
[12:22:01] zica: has joined #elixir-lang
[12:32:07] isHavvy: has joined #elixir-lang
[12:34:26] PragTob: has joined #elixir-lang
[12:35:37] duane: has joined #elixir-lang
[12:54:46] gvaughn: has joined #elixir-lang
[12:55:51] jeffro_: has joined #elixir-lang
[13:08:53] svennidal: has joined #elixir-lang
[13:13:03] lexmag: has joined #elixir-lang
[13:14:47] duane: has joined #elixir-lang
[13:22:42] nickjj: how do you guys use pattern matching when you have multiple optional arguments? i'm having difficulty figuring out how i should refactor this function to be less riddled with conditions while still having 2 optional args https://gist.github.com/nickjj/5933336ac9975f18d81fc4827a70f065
[13:23:40] gamache: nickjj: there really isn't a better way afaik
[13:25:00] nickjj: gamache, thanks, guess i'll run with it, it's funny how out of place multiple conditions look when you're not used to seeing them
[13:30:42] Saukk: has joined #elixir-lang
[13:30:54] jeffro_: has joined #elixir-lang
[13:35:26] warmwaffles: has joined #elixir-lang
[13:39:27] mdbm: has joined #elixir-lang
[13:40:57] alexband: has joined #elixir-lang
[13:41:17] lexmag: has joined #elixir-lang
[13:44:00] jeffro_: has joined #elixir-lang
[13:46:02] ankhers: nickjj: I commented on your gist for how I would have written it. Not sure if you will consider it to be better or not.
[13:48:46] nickjj: hmm, that's potentially an improvement, at least it names what the enums are doing
[13:50:24] ankhers: This is generally my preferred approach to conditionals, i.e., making a function for them.
[13:52:34] nickjj: putting :hello on its own line is cool too, i didn't think about that
[13:53:38] ankhers: When it makes sense to, I start my pipes with a value. I think the only exception to that would be a 0-artity function.
[13:54:24] serafeim: nickjj: the problem i had yesterday (with the dynamic query) was actually resolved! here's how it should be implemented: https://elixirforum.com/t/create-dynamic-bindings-for-where-clause/23797/7
[13:55:58] nickjj: i think i'll roll with your approach, it is a few more lines of code but it's also more readable and maybe if i ever use a DB backed value, your solution is slightly more adaptable to change
[13:56:34] nickjj: suddenly those maybe_* functions just become composed queries
[13:57:44] nickjj: serafeim, i'll have to keep that in mind for future queries
[14:00:27] jeffro_: has joined #elixir-lang
[14:00:30] jeffweiss: has joined #elixir-lang
[14:04:44] DTZUZO: has joined #elixir-lang
[14:07:27] gvaughn: has joined #elixir-lang
[14:14:10] wsieroci: has joined #elixir-lang
[14:15:28] jeffro_: has joined #elixir-lang
[14:16:50] peel: has joined #elixir-lang
[14:39:36] purebadger: has joined #elixir-lang
[14:40:38] Phylock: has joined #elixir-lang
[14:59:03] nineczar: has joined #elixir-lang
[15:01:29] nickjj: i couldn't find a discussion of this online, but why isn't `pattern: "**/*"` the default for hello_web.ex when you use Phoenix.View? are nesting partials inside of sub-folders considered a bad idea?
[15:01:57] lexmag: has joined #elixir-lang
[15:02:22] chrismccord: nickjj not considered a bad idea, but can be problematic so we don't think it's the best default
[15:03:05] chrismccord: for example you may nest another view under that namespace and now you have two views compiling the templates, which will likely error
[15:03:06] nickjj: do you have any examples of when it would become problematic? just so i have a better idea of what to watch out for
[15:03:56] chrismccord: user/profile/foo.html.eex
[15:04:27] chrismccord: User.ProfileView will be comppiling foo.html.eex as expected
[15:04:37] chrismccord: but now your UserView will also compiled profile/foo.html.eex
[15:04:59] nickjj: in that example User.ProfileView is optional right?
[15:05:03] chrismccord: which may work (surprising and redudant), or will compile error because you are calling functions on ProfileView which don't exist in UserView
[15:05:20] chrismccord: in that example, you "naturally" nest a sub view
[15:05:42] nickjj: oh, in my case i was just looking to clean up having a bunch of partial sitting in a templates/ directory
[15:05:43] chrismccord: but then things blow up because your parent view starts compiling the nested templates
[15:06:17] nickjj: _payment_gateway_stripe.html , _payment_gateway_paypal.html vs payments_gateways/_stripe.html , stuff like that
[15:06:26] chrismccord: the splat can be used just fine, but that's why we think it should be opt-in rather than default
[15:17:17] jsehop98: has joined #elixir-lang
[15:31:33] tuacker: has joined #elixir-lang
[15:47:27] icecreamcohen: has joined #elixir-lang
[15:49:44] Sgeo_: has joined #elixir-lang
[15:51:05] DTZUZO: has joined #elixir-lang
[15:56:43] icecreamcohen: has joined #elixir-lang
[15:57:01] drrty: has joined #elixir-lang
[16:02:18] voltone: has joined #elixir-lang
[16:11:38] warmwaffles: I'm curious, how reliable is the erlang smtp module?
[16:14:13] icecreamcohen: whatyouhide: A while ago, you asked about the mint database driver I was workin on; I submitted two PRs if you’re still interested in checking it out.
[16:16:32] voltone: has joined #elixir-lang
[16:20:45] orbyt_: has joined #elixir-lang
[16:23:04] OvermindDL1: warmwaffles: What do you mean 'reliable'? SMTP is an ancient simple protocol, it's so not complicated that it is pretty easy to write your own SMTP library.
[16:24:35] serafeim: OvermindDL1 actually you can use telnet to quickly test an SMT server
[16:24:45] dysfun: yeah, except the bits servers speak between themselves in the wild
[16:24:52] OvermindDL1: Yep, that's how simple it is
[16:25:21] OvermindDL1: I've sent many-o'-emails in the past via just telnet to an SMTP server, lol
[16:25:32] serafeim: i use it all the time to show off to colleagues by sending mail from primeminister@government.gr to them :>
[16:25:58] OvermindDL1: Crappy email server if it doesn't use signatures to confirm emails are authentic before passing them to the user. ;-)
[16:26:09] OvermindDL1: Assuming the `government.pr` domain has DKIM and such signatures
[16:26:16] OvermindDL1: If not, well their fault, lol
[16:26:50] serafeim: OvermindDL1: l o l well even if it has the mail will probably arrive to them and most users will be phished
[16:27:12] OvermindDL1: Not if the domain has things like DKIM and SPWhatever set up
[16:27:24] OvermindDL1: Then the mail server will only accept mails from a restricted set of IP's as defined in the domain record
[16:27:45] OvermindDL1: If the domain hasn't set up those fields properly though, then their loss, easy to phish
[16:28:20] serafeim: OvermindDL1: i'm talking about telneting to a random open SMTP server and sending from there using the @government.gr (or whatever) domain
[16:28:37] serafeim: there are a lot of SMTP servers in the open that allow it
[16:28:59] serafeim: and the mail will probably arrive to its destination (albeit marked as spam or phising etc)
[16:29:00] OvermindDL1: Sure, they may pass it on, but the user mail server likely won't accept it if the domain you are trying to fake has the security fields setup on it
[16:29:17] OvermindDL1: Depending on how the domain setup the fields then the mail server may outright reject it
[16:29:22] serafeim: it all depends upong the cfg :)
[16:29:45] OvermindDL1: And if a government domain isn't set up right or the receiving mail server isn't set up right, well... the fault of either party then. ^.^
[16:29:58] warmwaffles: OvermindDL1, was thinking about using it for a project to receive emails and do stuff with them
[16:30:42] OvermindDL1: warmwaffles: Works just fine for that but it does know nothing about DKIM or anything else so you won't have any security on those, it will just 'accept anything', so if you want validation then you need to do it above that
[16:30:47] Sgeo__: has joined #elixir-lang
[16:30:59] OvermindDL1: Honestly if you want validation you should run a real server for that and just have your application get the mails from it
[16:31:07] OvermindDL1: But for something simple, just smtp receiving, it's fine
[16:31:58] serafeim: receive emails and do stuff for them is imap/pop3 not smtp
[16:33:14] serafeim: at least that's the usual thing; configure an account to auto-download mails using pop3 and start workflows depending on their contents
[16:33:40] OvermindDL1: IMAP/POP3 is how you connect 'to' another SMTP server to acquire the emails it's received
[16:33:46] OvermindDL1: SMTP is what does the actual receiving
[16:34:05] serafeim: OvermindDL1: yes i agree but your app will use IMAP / POP3
[16:34:30] serafeim: i guess most probably it will use POP3
[16:34:49] OvermindDL1: Not if your app 'is' the SMTP server. ;-)
[16:35:09] OvermindDL1: As stated though, I recommend an external SMTP server that will actually perform the security checks
[16:35:10] jeffro_: has joined #elixir-lang
[16:35:15] serafeim: hm ok i haven't ever heard of that :)
[16:35:21] OvermindDL1: I prefer IMAP over POP3, greater control
[16:36:09] warmwaffles: was just thinking about doing a stupid bug tracker that handled emails and threads them
[16:36:29] warmwaffles: sounded like an interesting idea in my head
[16:37:16] jeffweiss: has joined #elixir-lang
[16:39:09] aalmazan: has joined #elixir-lang
[16:39:21] voltone: has joined #elixir-lang
[16:39:52] warmwaffles: https://github.com/Vagabond/gen_smtp
[16:39:57] warmwaffles: looks like it does dkim
[16:40:42] OvermindDL1: Ooo it does DKIM at least? Nice
[16:41:00] warmwaffles: yea looks interesting. Pretty clean api.
[16:43:49] OvermindDL1: Hmm, no SPF or DMARC it seems though
[16:44:29] OvermindDL1: SPF is the big one to know the sender is who they claim
[16:44:42] foggyboi: has joined #elixir-lang
[16:44:44] OvermindDL1: You could always implement that manually I guess
[16:45:05] OvermindDL1: And need that for DMARC too, soo...
[16:45:06] warmwaffles: yea, yet another layer of security that will be superceded my something else
[16:45:28] OvermindDL1: SPF, DKIM, and DMARC are complimentary, they each secure different parts
[16:45:32] OvermindDL1: Any server should use all 3
[16:48:13] alexband: has joined #elixir-lang
[16:53:38] warmwaffles: OvermindDL1, DMARC is mostly dns yea?
[16:55:08] OvermindDL1: SPF is a public/private key signature, DKF is a domain txt field that specifies which IP's are allowed to send email with this domain in the 'FROM:' field, and DMARC is what to do when either of those fail, in quick summary
[16:55:27] warmwaffles: yea just went down the wikipedia rabbit hole
[17:02:37] Disorganized: has joined #elixir-lang
[17:06:44] feld: has joined #elixir-lang
[17:15:25] whatyouhide: icecreamcohen: nice! wait, submitted PRs where?
[17:15:35] icecreamcohen: to the db library.
[17:15:42] icecreamcohen: I didn’t write the whole thing
[17:15:48] icecreamcohen: though… I might redo it.
[17:16:00] whatyouhide: icecreamcohen: you got links?
[17:16:10] icecreamcohen: I do. https://github.com/appodeal/clickhousex/pull/10
[17:16:13] DTZUZO: has joined #elixir-lang
[17:16:16] icecreamcohen: That just adds mint support
[17:16:31] icecreamcohen: There’s another PR that implements binary match context optimizations.
[17:16:42] icecreamcohen: https://github.com/appodeal/clickhousex/pull/11
[17:16:50] whatyouhide: sweet, great work icecreamcohen
[17:16:52] icecreamcohen: Which is much more extensive
[17:16:54] whatyouhide: thanks for following up with this <3
[17:17:05] icecreamcohen: Mint was great
[17:17:20] icecreamcohen: It really simplified the supervision tree and worked much better with DBConnection
[17:17:33] icecreamcohen: prior, they were using HTTPoison, which had hackney underneath
[17:22:11] alexband: has joined #elixir-lang
[17:24:25] icecreamcohen: Unfortunately, the team that runs that repo isn’t very responsive. I fear the project might be dead
[17:35:06] serafeim: is anybody using gmailbox ? it seems that it uses gen_smtp that was mentioned earlier
[17:46:03] voltone: has joined #elixir-lang
[17:50:37] zica: has joined #elixir-lang
[17:58:23] voltone: has joined #elixir-lang
[18:03:50] hypercore: has joined #elixir-lang
[18:03:57] hypercore: anyone deploying apps using dokku?
[18:06:57] dsr8: has joined #elixir-lang
[18:09:04] absolutejam1: has joined #elixir-lang
[18:09:47] absolutejam1: if I'm looking at using phoenix live view, what's the norm for creating custom components like in vue.js?
[18:10:53] absolutejam1: the examples so far look like they just render html as strings, which means I can just use my own funcs/templates right?
[18:11:13] absolutejam1: literally just started looking at it instead of js for this small project
[18:11:51] Sgeo_: has joined #elixir-lang
[18:13:27] absolutejam1: got 'em -> https://blog.danielberkompas.com/2017/01/17/reusable-templates-in-phoenix/
[18:18:28] purebadger: has joined #elixir-lang
[18:35:48] jeffro_: has joined #elixir-lang
[18:39:04] erickgnavar: has joined #elixir-lang
[18:46:05] mdbm_: has joined #elixir-lang
[18:47:30] lexmag: has joined #elixir-lang
[18:51:22] mdbm__: has joined #elixir-lang
[18:55:20] mahmudov: has joined #elixir-lang
[19:01:52] benwilson512: absolutejam1: the main difference between a simple render call and a render_live call is whether the thing you're calling render with gets its own state or not
[19:02:11] benwilson512: with a basic render call, which has been around forever, it's basically just a function call that takes some input and returns static output
[19:02:48] benwilson512: render_live spawns a whole dedicated live view at that point in the page, which can then operate independently of the parent view, and dynamically renders its internal contents
[19:04:37] squalloster: has joined #elixir-lang
[19:06:32] Disorganized: has joined #elixir-lang
[19:12:05] Exuma: has joined #elixir-lang
[19:12:17] Exuma: what is a one liner to push a value to a list in a map, at a key... but if the key doesnt exist create a new empty list with that item in it
[19:14:02] benwilson512: Exuma: Map.update/4
[19:14:16] benwilson512: Map.update(map, key, [value], &[value | &1])
[19:14:34] Exuma: awesome thank youooooo
[19:20:21] hypercore: benwilson512, i'm getting "** (Mix) Could not invoke task "distillery.release": 1 error found!" when i try to deploy, have you seen this before?
[19:22:12] serafeim: let's say i create a release in WSL. can this release then run on linux ?
[19:24:16] alexband: has joined #elixir-lang
[19:28:46] gamache: serafeim: I wouldn't count on it -- releases built on Linux don't work on every Linux distro. For instance, releases I built on Ubuntu wouldn't work on Amazon Linux
[19:29:13] gamache: I think it's a library version/dynamic linking issue, but I never dug too deep into root causes
[19:29:36] serafeim: gamache: oh ok thanks
[19:29:41] icecreamcohen: has joined #elixir-lang
[19:30:51] purebadger: has joined #elixir-lang
[19:31:45] serafeim: so i guess i need to have a clone of my prod env in order to build the releases there ?
[19:32:29] hypercore: has joined #elixir-lang
[19:32:38] hypercore: benwilson512: sorry, got disc
[19:32:41] hypercore: *disconnected
[19:33:12] serafeim: gamache: i found this in the docs: To deploy straight from a host to a separate target without cross-compilation, the following must be the same between the host and the target: Target architecture (e.g. x86_64 vs ARM) + Target Vendor+OS (e.g. Windows, Linux, Darwin/macOS) + Target ABI (e.g. musl, gnu)
[19:36:35] hypercore: should i use elixir 1.8 perhaps?
[19:37:30] serafeim: gamache: based on that info it is really strange that Ubuntu built releases don't work on Amazon Linux releases :|
[19:38:00] serafeim: i.e i guess both Ubuntu and Amazon linux are x86 + Linux + libc
[19:38:15] serafeim: i mean gnu libc
[19:41:59] hypercore: anyone know?
[19:46:29] mspo: libc versions?
[19:49:39] OliverMT: has joined #elixir-lang
[19:49:43] glasz: has joined #elixir-lang
[19:51:17] Sgeo__: has joined #elixir-lang
[19:52:56] serafeim: in the docs it doesn't mention that the version is also improtant :|
[19:53:39] serafeim: this is what it says ` If you are building on a MacBook (x86_64-apple-darwin) and trying to deploy to a typical Ubuntu machine (x86_64-unknown-linux-gnu), the release will not work. Instead you should build the release on a x86_64-unknown-linux-gnu host. `
[19:54:51] serafeim: it doesn't say `x86_64-unknown-linux-gnu-libc6`, it just says `x86_64-unknown-linux-gnu`. of course from my experience i'd guess that the libc version is probably also important
[19:55:36] tristanm_: libc and openssl
[19:56:44] serafeim: what does it have to do with it ?
[19:57:48] icecreamcohen: has joined #elixir-lang
[19:58:01] tristanm_: if you include crypto in your release it'll need a compatible openssl installed
[19:59:09] serafeim: tristan__: why should i include crypto ? you mean configure cowboy to use SSL ?
[20:01:52] hypercore: has joined #elixir-lang
[20:01:57] hypercore: sorry got disconnected again
[20:02:13] hypercore: if you responded i probably didn't see it
[20:02:45] serafeim: hypercore: to avoid disconnects i recommend trying an on line irc client like kiwiirc or irccloud
[20:03:21] serafeim: another releases question. i just tar the directory created an scp it to my prod server ?
[20:04:30] hypercore: serafeim: i do sometimes, but most of the time i prefer using my terminal
[20:07:18] hypercore: where is everyone today btw?
[20:08:36] drincruz: has joined #elixir-lang
[20:15:23] tristanm_: i use a terminal on a tiny scaleway instance for irc
[20:15:57] serafeim: tristan__: you can install weechat there and add a relay to connect through glowing-bear if you want
[20:16:00] tristanm_: depending on the datacenter you can get them for under 2 bucks
[20:16:20] serafeim: https://www.glowing-bear.org
[20:20:01] ebb: +1 for glowing bear on the desktop
[20:20:18] ebb: for Android I use the beta/development version of weechat-android
[20:27:12] MuffinPimp: has joined #elixir-lang
[20:29:39] hypercore: why am i getting this error when i run "mix edeliver build release"? -> https://paste.ubuntu.com/p/vsysQVN9XR/
[20:29:47] hypercore: (elixir 1.9)
[20:31:35] purebadger: has joined #elixir-lang
[20:34:58] foggyboi: has joined #elixir-lang
[20:36:38] jeffro_: has joined #elixir-lang
[20:39:43] hypercore: lol what a dumb reason for this error
[20:39:55] hypercore: figured it out lads, all good now
[20:42:53] icecreamcohen: has joined #elixir-lang
[21:14:55] ur5us: has joined #elixir-lang
[21:21:26] Disorganized: has joined #elixir-lang
[21:25:16] wormwood: In a scenerio with pipes, how would you implement something like unix's tee to the stdout? For example: "Hello World" |> &(IO.puts &1) |> String.downcase would print "Hello World" and return "hello world"
[21:25:30] squalloser: has joined #elixir-lang
[21:26:45] Disorganized: has joined #elixir-lang
[21:29:50] wormwood: nm ... IO.inspect :)
[21:29:54] wormwood: "It’s important to note that [IO.inspect/2] returns the given item unchanged. This makes it
[21:29:57] wormwood: possible to “spy” on values by inserting an IO.inspect/2 call almost anywhere
[21:34:20] wsieroci: has joined #elixir-lang
[21:38:10] conceivably: has joined #elixir-lang
[21:50:57] benwilson512: wormwood: yeah IO.inspect is extremely useful because of that
[22:10:17] duane: has joined #elixir-lang
[22:15:32] squalloser: has joined #elixir-lang
[22:27:50] wsieroci: has joined #elixir-lang
[22:36:27] harfangk: has joined #elixir-lang
[22:37:30] jeffro_: has joined #elixir-lang
[22:43:32] Disorganized: has joined #elixir-lang
[22:48:54] lexmag: has joined #elixir-lang
[23:03:42] Exuma: has joined #elixir-lang
[23:03:46] jeffro_: has joined #elixir-lang
[23:21:25] wsieroci: has joined #elixir-lang
[23:25:01] squallster: has joined #elixir-lang
[23:45:32] griffinbyatt: has joined #elixir-lang
[23:47:06] Disorganized: has joined #elixir-lang
[23:51:35] Disorganized: has joined #elixir-lang