« Back to channel list

#elixir-lang - 04 April 2019

« Back 1 day Forward 1 day »
[00:06:06] FatalNIX: nageV:oh neat
[00:19:15] thomasross_: has joined #elixir-lang
[00:23:34] orbyt_: has joined #elixir-lang
[00:32:29] markh: has joined #elixir-lang
[00:34:24] lizzin: has joined #elixir-lang
[00:39:48] orbyt_: has joined #elixir-lang
[01:07:10] carldd: has joined #elixir-lang
[01:15:10] tomterl: has joined #elixir-lang
[01:19:49] sevenseacat: has joined #elixir-lang
[01:40:08] lauromoura[m]: has joined #elixir-lang
[01:54:29] ur5us: has joined #elixir-lang
[02:00:34] ur5us: has joined #elixir-lang
[02:04:34] duane: has joined #elixir-lang
[02:06:11] tomterl: has joined #elixir-lang
[02:08:16] KeyJoo: has joined #elixir-lang
[02:08:38] lizzin: has joined #elixir-lang
[02:25:05] ariedler: has joined #elixir-lang
[02:38:02] Cthalupa: has joined #elixir-lang
[03:09:34] craigp_: has joined #elixir-lang
[03:18:18] christhekeele: has joined #elixir-lang
[03:19:31] ariedler: has joined #elixir-lang
[03:21:22] Saukk: has joined #elixir-lang
[03:21:34] carldd: has joined #elixir-lang
[03:26:36] syndikate: Hey, can someone help me understand this further? https://elixirschool.com/en/lessons/basics/functions/#default-arguments
[03:27:27] syndikate: Specifically clearing this error - definitions with multiple clauses and default values require a header
[03:27:51] syndikate: So when I define a header method, it does not have a definition so how does elixir know what to return?
[03:34:59] starbelly: https://www.irccloud.com/pastebin/uBydtpj9/
[03:35:38] craigp: has joined #elixir-lang
[03:35:43] tomterl: has joined #elixir-lang
[03:38:38] syndikate: starbelly, is there more to that shared text/
[03:38:58] starbelly: No, but I can share another example...
[03:44:28] starbelly: https://www.irccloud.com/pastebin/AKU7MIlz/
[03:48:14] starbelly: and if we just wrote that as one function, or basically what the multi heads get compiled to it would look like...
[03:48:20] starbelly: https://www.irccloud.com/pastebin/tBtcKq2G/
[03:48:52] starbelly: Also, we don't have methods in elixir or erlang... ofc I understood what you meant :)
[03:49:07] starbelly: I hope that helps.
[03:49:23] syndikate: Oh, okay so when you have multiple heads, internally it will have a case for arguments and return them and there will be a case for nil? Am I right?
[03:49:42] starbelly: Right, so the last clause will match anything
[03:49:58] starbelly: which would be not good if it wasn't a string :) but for example purposes, it's fine
[03:50:19] syndikate: Okay, I got one more silly question
[03:51:58] syndikate: I am trying to wrap my head around this since I am coming from a non functional background. Here is how my brain visualises it - if there are multiple function definitions with different arguments, the language will pick the definition with the matching argument
[03:52:15] syndikate: So, when I think of it that way - the header function has no definition
[03:53:01] syndikate: And suppose I have two other methods definitions as well. Now, when I pass nil arguments, the language would essentially know what to give for default values, but how does it know which definition to pick?
[03:56:04] starbelly: if you passed in nil it would "fall through" to the last clause
[03:56:30] starbelly: likewise if you passed it anything except one of those hardcoded names
[03:58:06] starbelly: but as stated, it doesn't know what to pick, it literally gets compiled to case expression, as in example 2 and the logic therein decides what 's what
[03:58:18] starbelly: but going back to the elixirschool example...
[04:01:21] syndikate: Okay, yeah I got that how that case statement would work. I am wondering when the function gets compiled and it has a case statement based on the arguments, what is the RHS of it? Is it function definition?
[04:02:21] starbelly: it supplies a default... this ends up as another multi-head, and in turn ends up as a function with case expression in it
[04:02:34] starbelly: https://www.irccloud.com/pastebin/Rdck41Zv/
[04:02:38] starbelly: Something like ^
[04:02:57] starbelly: mind the typos :)
[04:03:36] syndikate: OH! So the language knows the header is just to fill in the default values and calls the case again with the default values and starts the chain again
[04:04:10] starbelly: All just a good bit of syntactic sugar
[04:04:22] syndikate: Oh man! Okay! Thanks a lot!
[04:04:26] syndikate: Yeah, this was driving me crazy
[04:04:34] starbelly: n/p, glad to help
[04:04:47] Nicd-: in fact what default arguments do is define a function with a lower arity that calls the "main" function
[04:04:53] syndikate: Is that bit what you said, in the docs somewhere?
[04:05:25] Nicd-: `def hello(foo, bar \\ 1)` will result in a function definition `def hello(foo), do: hello(foo, 1)`
[04:05:52] starbelly: it's sort of covered here https://elixir-lang.org/getting-started/modules-and-functions.html
[04:06:48] syndikate: Okay, I think it's not that explicit
[04:06:56] syndikate: Well, maybe it's because am way too beginner
[04:07:33] syndikate: For some odd reason this reminded me of Rails magic and when you figure how some of the "magic" happens :D
[04:07:37] starbelly: Well, maybe there needs to be docs that go deeper too... it's always possible as well there is a doc somewhere I'm not familiar with that does in fact go into more detail.
[04:08:07] syndikate: Yeah, I want to know where I can get these info. It will be a good read. Doc/book.
[04:08:16] syndikate: A bit more of the language details
[04:08:26] starbelly: http://erlang.org/doc/reference_manual/functions.html <--- to go very deep :)
[04:08:51] starbelly: Nicd-: probably has some good suggestions on reading materials I imagine
[04:09:25] starbelly: Elixir in Action is good I hear, but not sure if it touches on that stuff...
[04:09:41] starbelly: Metaprogramming in Elixir probably does
[04:10:16] Nicd-: when you learn more about how Elixir works, then the default arguments make sense to you
[04:10:36] starbelly: mmmhmm, I'd ease into it
[04:10:41] Nicd-: the header function's job is only to be a single place where you put the default arguments and attach any @doc, @spec annotations
[04:11:26] Nicd-: otherwise you would have to choose which function body to attach them to (or repeat them many times) and that would not be ideal
[04:12:26] Nicd-: I don't really know good reading materials as I don't read that many books on programming. I own Elixir in Action for example but still have yet to read it :D
[04:12:53] starbelly: yeah, the only things I can think of that go into this sort of stuff is all erlang
[04:12:55] starbelly: https://learnyousomeerlang.com/syntax-in-functions
[04:13:11] starbelly: but that won't make sense to you right now, perhaps
[04:13:37] starbelly: You will learn erlang along the way, best to just stay on your current path probably.
[04:18:40] griffinbyatt: has joined #elixir-lang
[04:18:46] starbelly: I would add... you're naturally going to want to map language X to Elixir/Erlang ... it's natural, but try not to. If you can remind yourself to "let go" and learn a new, all the better your adventure will be. As an example: A common pitfall for those coming from an OO background is to try map objects to processes... you don't want to do that :)
[04:19:06] starbelly: So I say... Welcome to the BEAM! Forget everything you thought you knew! And enjoy it :)
[04:19:11] starbelly: night people
[04:31:59] lizzin: has joined #elixir-lang
[04:32:02] syndikate: Alright, Okay I will justly the abstractions be for now. Thanks starbelly and Nicd-
[04:35:14] mbuf: has joined #elixir-lang
[04:58:34] voltone: has joined #elixir-lang
[05:04:39] gvaughn: has joined #elixir-lang
[05:29:32] craigp: has joined #elixir-lang
[05:35:19] Cthalupa: has joined #elixir-lang
[05:43:09] voltone: has joined #elixir-lang
[05:45:49] __charly__: has joined #elixir-lang
[05:59:54] mdbm: has joined #elixir-lang
[06:13:54] voltone: has joined #elixir-lang
[06:18:43] ur5us: has joined #elixir-lang
[06:24:41] DeadZen: has joined #elixir-lang
[06:33:06] netrino: has joined #elixir-lang
[06:38:04] craigp: has joined #elixir-lang
[07:00:15] gvaughn: has joined #elixir-lang
[07:20:48] ariedler: has joined #elixir-lang
[07:29:47] proteusguy: has joined #elixir-lang
[07:35:07] PragTob: has joined #elixir-lang
[07:37:46] k1nd0f: has joined #elixir-lang
[07:38:03] ur5us: has joined #elixir-lang
[07:39:52] DarkSeid: has joined #elixir-lang
[08:10:09] Cthalupa: has joined #elixir-lang
[08:18:18] DarkSeid: has joined #elixir-lang
[08:19:52] 17WAB98BO: has joined #elixir-lang
[08:21:44] gvaughn: has joined #elixir-lang
[08:24:46] tgrk: has joined #elixir-lang
[08:24:47] ur5us: has joined #elixir-lang
[08:34:16] ur5us: has joined #elixir-lang
[08:38:48] kyrylo: has joined #elixir-lang
[08:49:04] vali: has joined #elixir-lang
[09:03:52] wonko7: has joined #elixir-lang
[09:22:10] ariedler: has joined #elixir-lang
[09:27:00] lexmag: has joined #elixir-lang
[10:08:09] leftoverlambda: has joined #elixir-lang
[10:13:32] lexmag: has joined #elixir-lang
[10:16:12] gvaughn: has joined #elixir-lang
[10:37:06] mdbm: has joined #elixir-lang
[10:52:31] gvaughn: has joined #elixir-lang
[10:55:09] ariedler: has joined #elixir-lang
[11:04:35] k1nd0f: has joined #elixir-lang
[11:27:21] kapil____: has joined #elixir-lang
[11:31:46] drincruz: has joined #elixir-lang
[11:51:51] voltone: has joined #elixir-lang
[11:56:14] tnez: has joined #elixir-lang
[11:58:31] k1nd0f: has joined #elixir-lang
[12:03:12] DTZUZO: has joined #elixir-lang
[12:10:24] Sgeo_: has joined #elixir-lang
[12:11:12] gvaughn: has joined #elixir-lang
[12:17:37] ariedler: good morning/afternoon everyone!
[12:21:32] kawen: has joined #elixir-lang
[12:33:42] Nicd-: good time of day to you too, ariedler
[12:34:09] Nicd-: have a nice DateTime.utc_now()
[12:44:16] Liothen-: has joined #elixir-lang
[12:48:20] InfinityFye: has joined #elixir-lang
[12:48:52] Liothen: has joined #elixir-lang
[12:49:28] Liothen: has joined #elixir-lang
[12:51:55] marciol: has joined #elixir-lang
[12:58:15] DarkSeid: has joined #elixir-lang
[12:58:39] ariedler: haha nice Nicd-
[13:03:16] duane: has joined #elixir-lang
[13:15:03] duane: has joined #elixir-lang
[13:16:39] lauromoura_: has joined #elixir-lang
[13:18:15] k1nd0f: has joined #elixir-lang
[13:24:55] drincruz: has joined #elixir-lang
[13:25:53] serafeim: has joined #elixir-lang
[13:45:58] leftoverlambda: has joined #elixir-lang
[14:03:10] gvaughn: has joined #elixir-lang
[14:03:35] drincruz: has joined #elixir-lang
[14:23:42] drincruz: has joined #elixir-lang
[14:39:38] edw: Is there a comprehensive guide to Elixir's treatment of whitespace? I just got bitten by a missing newline parsing issue.
[14:40:15] benwilson512: edw: what did you run into?
[14:41:03] edw: In this anon fn def:
[14:41:21] edw: https://www.irccloud.com/pastebin/w343Cuae/
[14:41:51] Pzzn_: has joined #elixir-lang
[14:41:54] edw: I had the sleep(1) right after the arrow.
[14:42:03] voltone: has joined #elixir-lang
[14:42:04] edw: And Elixir Did Not Like That.
[14:42:17] edw: With a space, of course.
[14:42:44] edw: I.e. `count -> sleep(1)\n. {[inspect…`
[14:43:14] edw: And no period. (Thanks, text completions.)
[14:43:26] benwilson512: edw: that's definitely weird, the problem happens before the sleep
[14:44:40] benwilson512: oh you mean you had
[14:44:41] benwilson512: https://www.irccloud.com/pastebin/eoi5jWPF/
[14:45:12] edw: Yes, and with a space between `->` and `sleep(1)`.
[14:45:13] benwilson512: what do you mean "did not like that" exactly?
[14:46:19] edw: Let me compile it again and see what I get…
[14:46:25] benwilson512: I don't get any errors I don't expect (no function defined sleep/1)
[14:47:19] edw: That's a snippet from a larger file—from _Programming Elixir ≥ 1.6_.
[14:48:03] benwilson512: what elixir version are you on? `elixir --version`
[14:48:13] benwilson512: I'm just trying to reproduce the problem you ran into
[14:49:26] edw: I ran `mix format` on the file and now it works with the problem I has.
[14:49:30] edw: s/has/had/
[14:50:02] Sgeo__: has joined #elixir-lang
[14:50:03] edw: In general the whitespace magic gets on my nerves because I don't know exactly what the rules are.
[14:50:16] nox: Hey, you people, do you have mapfoldreduce stuff in Elixir lang?
[14:50:19] nox: I have a naming question.
[14:50:32] edw: All that stuff is there.
[14:50:44] benwilson512: edw: I'm still not clear on what situation you ran into that was ambiguous...
[14:51:23] benwilson512: edw: can you show me the code you wrote that produced a surprising error such that I can copy and paste it and get the same error?
[14:51:53] edw: benwilson512: I'm working on that. I ran mix format on the file and the ambiguousness disappeared.
[14:51:58] nox: benwilson512: What does it do, and how is it called?
[14:52:12] nox: benwilson512: Is it a lazy adapter thing? Does it immediately return a folded result and a new collection?
[14:52:20] edw: nox: All that stuff is in Enum. Or you can use comprehensions.
[14:52:26] benwilson512: nox: ah, depends
[14:52:41] benwilson512: there is a protocol for collections that describes enumerating them: Enumerable
[14:52:54] benwilson512: then the Enum module consumes enumerables eagerly so Enum.map / Enum.reduce is eager
[14:52:55] edw: The docs to Elixir are pretty good, I've found, nox. As is the tutorial.
[14:53:06] benwilson512: and then the Stream module does so with the same inputs lazily
[14:53:18] benwilson512: Enum contains various manual optimizations for list inputs
[14:53:20] wsieroci: has joined #elixir-lang
[14:53:26] edw: Ambiguity, even.
[14:53:33] benwilson512: since the BEAM isn't fancy enough to do unwrap the abstractions
[14:53:54] nox: benwilson512: How do you lazily mapfold?
[14:54:10] edw: There are streams, nox.
[14:54:17] benwilson512: edw: we generally tolerate nox's RTFM questions cause he makes low level beam contributions every so often ;)
[14:54:42] benwilson512: nox: I'm not sure there are any proper lazy folds actually
[14:54:49] nox: benwilson512: Aw, thank you. Younger me would have bragged about it, but I appreciate edw trying to help.
[14:54:52] edw: If you want to port the Erlang VM to the Apple II let me know.
[14:55:05] nox: benwilson512: Ok, so I still don't have a name for my stupid method in Rust land, hah. :D
[14:55:06] griffinbyatt: has joined #elixir-lang
[14:55:14] benwilson512: you can `enumerable |> Stream.map(& &1 * 2) |> Enum.reduce`
[14:55:24] nox: benwilson512: I wrote a thing like http://erlang.org/doc/man/lists.html#mapfoldl-3 but for parallel iterators in Rustg,
[14:55:25] benwilson512: which will compose a lazy map on the enumerable and then eagerly fold
[14:55:31] nox: the name includes 3 verbs and I hate it.
[14:55:31] drewolson: nox: scan might be kind of what you want?
[14:55:44] drewolson: it's a lazy collection of the states of the accumulator during a fold
[14:55:44] edw: benwilson51, thanks for the enlightenment re: nox.
[14:56:08] nox: drewolson: Mmh…
[14:56:24] micmus: nox: you could leverage the zf alias for mapfold and call your function pzf :P
[14:56:26] nox: drewolson: That kinda sounds like it's on the right track indeed.
[14:56:26] drewolson: https://hexdocs.pm/elixir/Stream.html#scan/3
[14:56:32] benwilson512: nox: Flow is a parallel iterator type thing and it just does
[14:56:34] benwilson512: https://www.irccloud.com/pastebin/ppWB3hvr/
[14:56:56] nox: micmus: Ah ah, it would be going full circle.
[14:57:52] edw: benwilson512: Regarding the Elixir lexer/parser, what magic does it perform with respect to whitespace? Does it do any? It's been ten years since I wrote any Python and I don't want to limit the number of million dollar whitespace errors I perpetrate.
[14:57:58] nox: micmus: https://github.com/erlang/otp/commit/3ac04f901ecfb3fed128759964ccc54fa4ee7b2a#diff-5d256e57b809edcc27cbc2526f8ef0f5 :D
[14:58:17] benwilson512: edw: whitespace is not significant outside of obvious stuff like `foobar` and `foo bar` are differnet
[14:58:18] edw: Er, _do_ want to limit.
[14:58:28] nox: micmus: Wait never mind, I brainfarted. That was filter_map hah.
[14:59:45] nox: drewolson: Was there precedent in other ecosystems for that 'scan' name?
[15:00:19] nox: Because scan_collect_into_vec somewhat sounds better than mapfold_collect_into_vec, kinda.
[15:01:17] edw: benwilson512: That cannot be true. Consider:
[15:01:18] benwilson512: nox: is there a reason that shouldn't be .scan(fun).collect<Vec> or w/e the exact syntax?
[15:01:26] edw: https://www.irccloud.com/pastebin/dAGMSdHx/
[15:01:26] proteusguy: has joined #elixir-lang
[15:01:50] lizzin: has joined #elixir-lang
[15:02:06] edw: https://www.irccloud.com/pastebin/KBavbqp2/
[15:02:13] drewolson: nox: many MLs use scan as well
[15:02:28] edw: The first compiles. The second does not. The only difference is all the whitespace has been normalized to single spaces.
[15:02:28] drewolson: https://hoogle.haskell.org/?hoogle=scanl
[15:02:53] benwilson512: edw: I suppose what I meant is that indentation is not significant
[15:03:03] nox: benwilson512: Yes, collecting into a vec in rayon has a fast path where it will pass around mutable references to uninitialised (god I hate spelling that word) memory from the result vec, you don't want to expose those parts and you don't want users having to work with that plumbing.
[15:03:21] nox: benwilson512: It's a bit weird, for sure.
[15:03:36] benwilson512: edw: the only rule I know off hand is that expressions need to be separated by either a new line or `;`
[15:03:42] nox: drewolson: Hack, thanks.
[15:03:45] benwilson512: I don't recall where I learned that osrry
[15:03:45] nox: Ack* wtf
[15:03:52] edw: OK, so \n = ';'
[15:04:53] edw: Unless it doesn't.
[15:05:08] benwilson512: edw: sounds right
[15:05:33] benwilson512: edw: https://hexdocs.pm/elixir/master/syntax-reference.html#content
[15:05:40] nox: drewolson: I'm blind. https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.scan :)
[15:05:56] drewolson: nox: yeah i was about to type "wait doesn't rust have this?"
[15:06:06] nox: drewolson: Well it doesn't have mapfold!
[15:06:31] drewolson: the correct snobby response is "who needs map if you have fold"
[15:06:36] nox: My fav part of it all is that I'm having fun deep into rayon's plumbing to… handle absolutely-positioned elements in our layout engine.
[15:07:01] nox: A Web implementor has to find fun in the non-fun parts of their work.
[15:07:10] drewolson: it's true, all of it
[15:07:43] edw: benwilson512: OMG thank yes this is the document I've been searching for.
[15:07:53] benwilson512: edw: sorry it didn't spring to mind earlier!
[15:07:54] edw: s/yes/you/
[15:08:04] nox: drewolson: Your snobby response sounds like it deserves a mandatory reference to https://maartenfokkinga.github.io/utwente/mmf91m.pdf
[15:08:26] drewolson: this looks great and i have never read it and will read it now.
[15:08:34] nox: drewolson: Have fun, it's pretty cool.
[15:09:15] drewolson: i recently read https://mitpress.mit.edu/books/little-typer and it blew my mind
[15:09:17] nox: drewolson: Given those people named some operations bananas and barbed wire and whatnot, I somehow low-key thing I should just name my fancy operation 'baguette'.
[15:14:56] davidw: has joined #elixir-lang
[15:18:14] dysfun: nox: you called it 'baguette', didn't you?
[15:18:42] nox: dysfun: Ah ah. No, but I’ll probably mention baguettes in a test.
[15:19:24] nox: (Grep for emmental if you have an erlang/otp working tree around.)
[15:23:23] kapil____: How to create nested form in phoenix. i read this guide: https://gist.github.com/mjrode/c2939ee7786b157aab131761c8fb89a9
[15:24:31] kapil____: its working, but is there any other way in frontend?
[15:27:54] drincruz: has joined #elixir-lang
[15:29:28] ejpcmac: Haha, excellent nox : https://github.com/erlang/otp/blob/1129d7b6c997df31a5b0855f55b1f1c37e3bd155/lib/stdlib/test/ets_SUITE.erl#L2371
[15:30:14] nox: ejpcmac: Best test in the entire repo. :P
[15:37:10] orbyt_: has joined #elixir-lang
[15:40:12] DTZUZO: has joined #elixir-lang
[15:47:31] Cthalupa: has joined #elixir-lang
[15:52:52] Phylock: has joined #elixir-lang
[16:33:51] cschneid: has joined #elixir-lang
[16:43:26] __charly__: has joined #elixir-lang
[16:54:55] wsieroci: has joined #elixir-lang
[17:05:19] squall: has joined #elixir-lang
[17:08:29] DarkSeid: has joined #elixir-lang
[17:12:02] Saukk: has joined #elixir-lang
[17:35:49] lizzin: has joined #elixir-lang
[17:42:17] Saukk: has joined #elixir-lang
[17:53:37] lexmag: has joined #elixir-lang
[17:53:42] assemblyman: has joined #elixir-lang
[18:00:19] Czen: has joined #elixir-lang
[18:02:56] Jam666: has joined #elixir-lang
[18:09:04] marciol: has joined #elixir-lang
[18:09:23] lizzin_: has joined #elixir-lang
[18:26:23] orbyt_: has joined #elixir-lang
[18:33:21] netrino: has joined #elixir-lang
[18:34:05] wonko7: has joined #elixir-lang
[18:37:53] nox: benwilson512, drewolson: I ended up using my damn bad name https://github.com/rayon-rs/rayon/pull/652
[18:51:09] elixir-lang569: has joined #elixir-lang
[18:53:25] alexruf: has joined #elixir-lang
[19:08:34] nineczar: has joined #elixir-lang
[19:50:24] work_: has joined #elixir-lang
[19:53:20] dysfun: nox: no, that would be calling it 'nox'
[20:00:05] orbyt_: has joined #elixir-lang
[20:04:08] kyrylo: has joined #elixir-lang
[20:08:34] lewis2: has joined #elixir-lang
[20:19:05] aalmazan: has joined #elixir-lang
[20:34:04] d10n-work: has joined #elixir-lang
[20:35:07] euphidime: has joined #elixir-lang
[20:39:36] lizzin: has joined #elixir-lang
[21:03:13] ur5us: has joined #elixir-lang
[21:07:32] toure: has joined #elixir-lang
[21:21:02] lostinio: has joined #elixir-lang
[21:22:02] lizzin_: has joined #elixir-lang
[21:34:21] Zarathu: if I have CMS.list_posts() in some controller, and an Authorizer module that checks to see if the given user has access to view the post in question, where would I check that?
[21:34:48] Zarathu: should the controller filter the posts before it returns them, or should CMS.list_posts accept a %User{} and make the call to Authorizer?
[21:35:41] Zarathu: kinda feels like it's not really in the domain of the CMS context to check for permissions. could be wrong tho
[21:36:16] orbyt_: has joined #elixir-lang
[21:36:35] lostinio: Hello guys! I'm an Erlanger (almost 5 years) but next my project decided to implement in Elixir. Could you please give me some practical advises or links.
[21:36:57] lostinio: 1. Is it a good practice to place many modules in one file? So what is a good naming convention for these files?
[21:37:15] lostinio: 2. Should I store all my structs in one separate file, or in file I use them?
[21:37:29] lostinio: 3. I use structs as types for protocols. Should I keep structs definitions and protocols definitions in one file?
[21:40:27] Jam666: has joined #elixir-lang
[21:58:09] torwegia: has joined #elixir-lang
[21:59:29] orbyt_: has joined #elixir-lang
[22:14:51] __charly__: has joined #elixir-lang
[22:15:05] lizzin: has joined #elixir-lang
[22:17:39] frowning: has joined #elixir-lang
[22:24:28] josevalim: lostinio: welcome
[22:24:37] frowning: hi, i am new. i installed last verions of elixir, erlang, phoenix. but i have failed to create a new phoenix project. (cause : cowlib (hex pachage) the dependency does not match the requirement "~> 2.7.2", got "2.7.0"). how can i fix it?
[22:24:43] josevalim: We generally prefer one module per file
[22:25:09] josevalim: Structs are defined with the modules that use them, typically
[22:25:15] ericmj: frowning: it's a temporary issue, add `{:cowlib, "2.7.0", override: true}` to your mix.exs file
[22:25:51] josevalim: ericmj: why is it happening?
[22:26:07] ericmj: josevalim: cowlib was published with incorrect .app file
[22:26:12] josevalim: Cowlib 2.7.2 has an important fix
[22:26:28] ericmj: hopefully 2.7.3 will be released tomorrow with a fix
[22:26:28] josevalim: Was gazler pinged?
[22:26:46] josevalim: Or was it in the GitHub source side of things?
[22:26:50] ericmj: essen and gazler has been pinged
[22:26:55] ericmj: issue on the github side
[22:26:58] frowning: ericmj: thanks
[22:27:42] lizzin_: has joined #elixir-lang
[22:27:57] ericmj: frowning: happy to help, you should be able to remove the manual cowlib override tomorrow
[22:29:00] lostinio: josevalim: thank you
[22:31:47] craigp: has joined #elixir-lang
[22:36:32] lostinio: josevalim: But if I have many structs around 20 and every struct should be defined in own module isn't it a mess to define 20 files, one for every struct?
[22:39:41] netrino: has joined #elixir-lang
[22:45:29] netrino_: has joined #elixir-lang
[22:47:15] drincruz: has joined #elixir-lang
[22:55:47] k1nd0f: has joined #elixir-lang
[22:55:49] ariedler: has joined #elixir-lang
[23:14:13] craigp: has joined #elixir-lang
[23:18:30] Sgeo_: has joined #elixir-lang
[23:35:29] orbyt_: has joined #elixir-lang
[23:45:42] Cthalupa: has joined #elixir-lang