<    March 2017    >
Su Mo Tu We Th Fr Sa  
          1  2  3  4  
 5  6  7  8  9 10 11  
12 13 14 15 16 17 18  
19 20 21 22 23 24 25  
26 27 28 29 30 31
00:00 cschneid_ joined
00:04 pHcF joined
00:04 <tristan__> alisdair: you wont' be at EF, will you?
00:04 <alisdair> nope
00:04 <fishcakez> empex?
00:04 <alisdair> when is empex?
00:04 <alisdair> i might go to that
00:04 <tristan__> yea, I figure I'll never meet you or nox in real life
00:04 <fishcakez> late may?
00:05 <alisdair> oh, can't go late may. my girlfriend is on vacation and i don't think she wants to go to a conference ;)
00:05 <alisdair> tristan__: strange loop 2017
00:05 <fishcakez> 20th may iirc
00:05 <alisdair> i'll prob go to elixirconf in bellevue
00:06 <tristan__> assuming I'm still in San Diego I won't be able to make that. have to be in Chicago in August, not turning back around that quickly :)
00:06 <alisdair> i'm maybe moving to chicago
00:06 <fishcakez> its EEF now not EF :P
00:06 <tristan__> haha
00:06 vendethiel joined
00:06 chriswarren joined
00:06 <tristan__> if its EEF then I'm calling it ELAEF
00:06 <tristan__> erlang, lfe, alpaca, elixir factory
00:07 <tristan__> alisdair: lucky :(
00:07 <wsmoak> anyone around who can summarize the state of the Phoenix docs? gazler? I watched Chris' keynote at Lone Star Elixir and it sounded like 1.3 was almost done but not the docs.
00:07 <alisdair> i'm also maybe moving to detroit, so hold off on the 'lucky'
00:07 <tristan__> hah
00:08 <alisdair> wsmoak: i think the plan is to update the guides once 1.3 is out the door
00:08 <alisdair> i work with j14159, he's giving the alpaca talk at eef
00:08 rkazak_ joined
00:08 <wsmoak> The 1.3.0-rc.0 tag is still pointing at master of phoenix_guides... it should at least be pointed at a _branch before the framework is released.
00:08 kbot joined
00:09 PaReeOhNos joined
00:09 <wsmoak> ideally the docs go first, and the framework points at a release just like any other dependency, but I realize that's a lot to ask :)
00:10 Guedes joined
00:11 gvaughn joined
00:14 molloy joined
00:15 mysticjohn joined
00:15 chriswarren joined
00:20 <nox> tristan__: What's your state again?
00:21 MotherFlojo joined
00:21 wtetzner joined
00:21 <nox> I'll probably go to the SF workweek in June.
00:21 <nox> Though I'm still undecided.
00:21 <tristan__> california
00:21 <nox> tristan__: Far from SF?
00:22 <tristan__> yea
00:22 <tristan__> san diego, the southern most point
00:22 <fishcakez> nox: which dates?
00:22 <nox> fishcakez: https://wiki.mozilla.org/All_Hands/SanFrancisco
00:23 duane joined
00:24 chriswarren joined
00:24 <nox> tristan__: Nobody I know but you lives there.
00:25 <nox> Feels like the only chance for me to meet tristan__ is if France elects a far left wing president and he comes live here.
00:26 <tristan__> pssh, "elect", do it the right way and have a revolution
00:28 codestorm joined
00:29 <fishcakez> bring out the guillotine
00:29 <tristan__> for real
00:33 chriswarren joined
00:34 luke_nukem joined
00:40 execb5 joined
00:40 systemfault joined
00:42 chriswarren joined
00:43 chriswarren joined
00:46 rschmukler joined
00:47 am55_ joined
00:50 execb5 left
00:51 chriswarren joined
00:57 Guedes joined
00:57 Guedes joined
01:01 chriswarren joined
01:08 jbranchaud joined
01:09 nighty- joined
01:10 chriswarren joined
01:13 cschneid_ joined
01:19 chriswarren joined
01:22 wtetzner joined
01:22 codestorm joined
01:24 hotpancakes joined
01:25 myronmarston joined
01:28 coatezy joined
01:28 chriswarren joined
01:31 refriedchicken joined
01:31 zetashift joined
01:36 rschmukler joined
01:37 chriswarren joined
01:38 mitchellhenke joined
01:38 john2x joined
01:39 zabirauf joined
01:43 hahuang65 joined
01:44 am55_ joined
01:46 chriswarren joined
01:48 myronmarston joined
01:55 gvaughn joined
01:56 chriswarren joined
01:57 rschmukler joined
02:02 rschmukler joined
02:04 chriswarren joined
02:05 MotherFlojo joined
02:12 scrogson joined
02:13 PaReeOhNos joined
02:14 chriswarren joined
02:17 codestorm joined
02:17 g3funk joined
02:17 jdcauley joined
02:22 chriswarren joined
02:23 zabirauf joined
02:25 duane joined
02:27 hexus0 joined
02:30 tomterl joined
02:32 chriswarren joined
02:33 duane joined
02:33 chriswarren joined
02:33 zabirauf joined
02:34 zabirauf joined
02:37 wong2 joined
02:40 chrismccord joined
02:40 raycoll joined
02:42 wtetzner joined
02:43 hahuang65 joined
02:46 codestorm joined
02:47 bitshift joined
02:49 Ninja3047 joined
02:50 chriswarren joined
02:50 SirFunk joined
02:51 dmiller joined
02:57 rschmukler joined
02:59 chriswarren joined
03:05 jbranchaud joined
03:08 jbrancha_ joined
03:08 chriswarren joined
03:10 jbranchaud joined
03:10 raycoll joined
03:10 MotherFlojo joined
03:14 dilzio joined
03:15 PaReeOhNos joined
03:17 chriswarren joined
03:20 jigawatt joined
03:20 hotpancakes joined
03:26 chriswarren joined
03:26 duane joined
03:35 chriswarren joined
03:38 rkazak_ joined
03:41 codestorm joined
03:43 myronmarston joined
03:43 MotherFlojo joined
03:44 Arcsech joined
03:44 hahuang65 joined
03:44 chriswarren joined
03:52 zabirauf joined
03:54 chriswarren joined
04:03 chriswarren joined
04:06 rodolfojcj joined
04:08 r00tl3ss joined
04:09 cschneid_ joined
04:10 rschmukler joined
04:12 chriswarren joined
04:12 jbranchaud joined
04:12 racycle joined
04:13 Arcsech joined
04:16 rschmukler joined
04:21 chriswarren joined
04:23 rschmukler joined
04:32 chriswarren joined
04:34 rschmukler joined
04:35 Cohedrin joined
04:41 chriswarren joined
04:45 hahuang65 joined
04:46 duane_ joined
04:46 raycoll_ joined
04:50 chriswarren joined
04:59 chriswarren joined
05:05 rschmukler joined
05:07 jbranchaud joined
05:08 gvaughn joined
05:08 chriswarren joined
05:09 dilzio joined
05:17 chriswarren joined
05:17 PaReeOhNos joined
05:22 rschmukler joined
05:27 chriswarren joined
05:29 arathunku joined
05:31 milad joined
05:35 codestorm joined
05:35 chriswarren joined
05:45 chriswarren joined
05:45 hahuang65 joined
05:46 chriswar_ joined
05:52 zabirauf joined
05:53 zabirauf_ joined
05:54 chriswarren joined
05:55 cemilowski joined
06:03 chriswarren joined
06:07 dec0n joined
06:09 aniketd joined
06:12 chriswarren joined
06:14 voltone joined
06:20 PaReeOhNos joined
06:21 cemilowski joined
06:21 shmibs joined
06:21 chriswarren joined
06:26 rschmukler joined
06:30 codestorm joined
06:31 chriswarren joined
06:31 zabirauf_ joined
06:38 milad joined
06:39 chriswarren joined
06:46 l14n joined
06:47 l14n joined
06:47 hahuang65 joined
06:49 chriswarren joined
06:54 markh joined
06:58 chriswarren joined
07:00 shmibs joined
07:02 codestorm joined
07:07 josevalim joined
07:08 icanhazbroccoli joined
07:12 blahdodo joined
07:14 shmibs joined
07:15 dignifiedquire joined
07:16 chriswarren joined
07:21 vendethiel- joined
07:25 chriswarren joined
07:26 shmibs joined
07:26 cemilowski joined
07:27 m_m joined
07:28 vendethiel joined
07:29 gremly joined
07:32 hotpancakes joined
07:34 chriswarren joined
07:37 milad joined
07:43 shmibs joined
07:43 chriswarren joined
07:43 acscherp joined
07:44 vmoravec joined
07:44 josevalim_ joined
07:47 tuacker joined
07:48 hahuang65 joined
07:52 chriswarren joined
07:53 mark_66 joined
07:55 gokr joined
07:56 codestorm joined
07:58 ZippoWeb2 joined
07:58 imack joined
07:59 stephen_m joined
08:01 chriswarren joined
08:02 hexus0 joined
08:03 hotpancakes joined
08:10 milad joined
08:10 milad joined
08:11 chriswarren joined
08:12 milad joined
08:14 rschmukler joined
08:14 arathunku joined
08:18 m_m joined
08:20 chriswarren joined
08:21 mattyw joined
08:22 PaReeOhNos joined
08:30 PaReeOhNos joined
08:35 duane joined
08:38 chriswarren joined
08:39 akarambir joined
08:39 colrack joined
08:41 r00tl3ss joined
08:41 bitshift joined
08:43 teddysmoker joined
08:44 duane joined
08:47 zabirauf joined
08:47 chriswarren joined
08:49 hahuang65 joined
08:50 codestorm joined
08:56 chriswarren joined
09:05 chriswarren joined
09:06 MotherFlojo joined
09:08 rschmukler joined
09:12 nighty-_ joined
09:14 chriswarren joined
09:16 kbot joined
09:22 <barttenbrinke> Hey, is it possible to override methods that are imported with use command?
09:22 flaviodesousa joined
09:23 M-manveru left
09:23 <barttenbrinke> I am trying to overwrite the .all method for a Repo, so that I can enforce that the prefix option is set.
09:23 bolton left
09:23 karambirMatrix left
09:23 timmo left
09:23 chriswarren joined
09:25 Guest67_ joined
09:31 codestorm joined
09:32 chriswarren joined
09:35 Tetiana joined
09:39 r00tl3ss joined
09:40 r00tl3ss joined
09:41 chriswarren joined
09:46 scarfacedeb joined
09:48 marr joined
09:48 scarfacedeb joined
09:50 hahuang65 joined
09:51 chriswarren joined
09:53 john2x joined
09:55 fantomik joined
09:55 cemilowski joined
10:00 chriswarren joined
10:01 lexmag joined
10:03 rschmukler joined
10:03 hotpancakes joined
10:09 chriswarren joined
10:11 <Siyo> barttenbrinke, can't you use @schema_prefix in your schema?
10:12 <Siyo> or is that different
10:12 <Siyo> hm
10:12 <barttenbrinke> Siyo: No, because we have a database per customer, we set it for each request. But I want to have something in place to prevent a junior dev to break isolation by accident
10:13 <Siyo> ah
10:16 <Siyo> well I don't think you can unless it's defoverridable. Personally i would just wrap it
10:17 mattyw joined
10:18 chriswarren joined
10:18 embik joined
10:19 <nicholasruunu> barttenbrinke Generally when trying to guard your code from your own team, it's better to speak to them.
10:19 <barttenbrinke> nicholasruunu: True :)
10:20 <barttenbrinke> nicholasruunu: However, this difference between Repo.all and Repo.all(prefix:prefix) is a very small one with very big consequences. And I allready made that mistake twice.
10:20 gmcabrita joined
10:22 AndriusBartulis joined
10:25 gndm joined
10:25 codestorm joined
10:27 chriswarren joined
10:33 gvaughn joined
10:36 chriswarren joined
10:37 Tetiana joined
10:45 chriswarren joined
10:46 zabirauf joined
10:47 cemilowski joined
10:50 voltone joined
10:50 truami joined
10:51 hahuang65 joined
10:53 scarfacedeb joined
10:54 chriswarren joined
10:56 hotpancakes joined
10:58 <PaReeOhNos> Has anyone run into this issue when using distillery? https://gist.github.com/pareeohnos/d78f0c68ded9ae90adf1d7083e0d87bc
10:59 <OliverMT> you're french nox ?
11:00 <nox> Indeed.
11:00 <OliverMT> À tout le baguette
11:01 <OliverMT> what is a SF work week? gathering of servos?
11:02 <nox> OliverMT: All of Mozilla.
11:03 <OliverMT> cool
11:04 chriswarren joined
11:09 scarface_ joined
11:13 chriswarren joined
11:13 rschmukler joined
11:13 lexmag joined
11:16 Guedes joined
11:19 codestorm joined
11:22 chriswarren joined
11:30 <Nicd-> josevalim: is permission required to hold a free Elixir developer meetup?
11:30 <ciawal> yes
11:30 <ciawal> also you must mail $20 to this address
11:31 r00tl3ss joined
11:31 chriswarren joined
11:32 <OliverMT> I'm pretty sure you could even hold a Jose Valim Tribute Concert without getting permission
11:32 <Nicd-> but it's good to ask
11:33 <Nicd-> I'm not too knowledgeable on these things but I made this: http://trelixir.fi/
11:33 <Nicd-> note I'm not using the logo, but it would be nice to have peace of mind that I'm not doing anything else disallowed
11:33 <josevalim> nominative use is ok
11:34 <josevalim> you need to be able to refer to Elixir, sometimes even to the logo, to be able to express what it is about
11:34 <josevalim> but you can't modify it, use it for commercial purposes, etc, etc
11:34 am55_ joined
11:34 <Nicd-> ok, thanks :)
11:35 <* OliverMT> cancels his order of 2000 elixir tshirts from china
11:35 <OliverMT> was there merch for sale at last conf?
11:36 <micmus> only conf t-shirts at last eu conf
11:38 <OliverMT> this is pretty cool https://github.com/bitwalker/swarm
11:40 chriswarren joined
11:43 hotpancakes joined
11:46 <robotika> does anyone know of a guide to using custom Plug.Router?
11:47 <robotika> I have a particular URL structure I want to follow, and I think it might be the only way
11:48 <robotika> I'm playing around with it at the moment, but I'm not sure if it's possible to use a Controller to render the response
11:49 chriswarren joined
11:49 <ciawal> is there a naming convention for umbrella apps?
11:53 rschmukler joined
11:58 chriswarren joined
11:59 embik joined
11:59 shadowjack joined
12:02 <AndriusBartulis> So if I sold elixir logo stickers on etsy Im in trouble?
12:07 milad joined
12:07 chriswarren joined
12:09 <micmus> robotika: a controller is a plug, so you could call the controller from within your router
12:09 hbraun joined
12:09 jdrab joined
12:09 <micmus> Controller.call(conn, Controller.init(action))
12:10 <ciawal> I move my app into an umbrella, and deps.get took a different version of one of my dependencies
12:10 <ciawal> possibly a bug?
12:12 <robotika> micmus: ahh awesome, I'll give that a try
12:13 codestorm joined
12:15 hahuang65 joined
12:16 chriswarren joined
12:21 gvaughn joined
12:21 inoas joined
12:22 <Nicd-> AndriusBartulis: yes, the logo is copyrighted
12:23 <AndriusBartulis> Nicd-, I see. Good then that I am not selling Elixir logo stickers on Etsy :)
12:23 milad joined
12:23 milad joined
12:23 <Nicd-> suuuure you're not
12:26 chriswarren joined
12:27 nighty joined
12:28 cristianR_ joined
12:29 chrismccord joined
12:32 hotpancakes joined
12:34 chriswarren joined
12:42 scarfacedeb joined
12:44 chriswarren joined
12:45 MarioBranco joined
12:47 zabirauf joined
12:47 l14n joined
12:48 zabirauf joined
12:48 zabirauf joined
12:53 chriswarren joined
12:55 MarioBranco joined
12:55 zetashift joined
12:58 <nicholasruunu> No.
12:58 scarfacedeb joined
13:00 hotpancakes joined
13:01 ramortegui joined
13:02 chriswarren joined
13:02 rodolfojcj joined
13:03 rschmukler joined
13:05 cdg joined
13:06 mitchellhenke joined
13:07 elixir-lang951 joined
13:07 hotpancakes joined
13:07 codestorm joined
13:09 Ducky joined
13:09 Zor joined
13:11 drewolson joined
13:11 chriswarren joined
13:11 <Ducky> Hey guys, I have a question regarding converting a list to a map in elixir. Right now I have something like ["First:", " -Option for first", " -Second option for first", "Second:", " -First op..."] and would like to convert that into a map that looks sometihng like %{first: [" -First option..."]} Does anyone have an idea as to how I would do this?
13:12 <drewolson> Ducky: you could use `reduce`
13:13 <Ducky> So I just use the accumulator as the map and add to it?
13:13 <Nicd-> don't convert the keys to atoms unless you know they are from a fixed set btw
13:14 scarfacedeb joined
13:14 <Ducky> They are from a dynamic place. The keys are not always the same, and neither are the values
13:14 <benwilson512> right you'll want to avoid using atoms then, they are not garbage collected and essentially represent known programmer constant values
13:15 <benwilson512> although not always the same isn't the same as "from an unbounded set"
13:15 <drewolson> Ducky: https://gist.github.com/drewolson/8ca2c6c44c4189729d52fa80ae0f8a54
13:16 <Ducky> Yes okay
13:16 am55_ joined
13:16 <drewolson> Ducky: that handles multiple values per key
13:16 <Ducky> Wow, that's amazing. Thank you! Will try to use something liek this in my situation! :)
13:19 <drewolson> Ducky: if you don't have / care about dupes, this is easier https://gist.github.com/drewolson/94a1c5b376f9729d09d99c46c28f0033
13:20 <Nicd-> but that doesn't match the input
13:20 gokr joined
13:20 chriswarren joined
13:20 <Ducky> What if the chunk size differs, though?
13:20 <Nicd-> you'll have to reduce yourself
13:20 <Nicd-> without chunking
13:21 <drewolson> yep, that's correct
13:21 <drewolson> if you need to do complex matching, you'd reduce yourself
13:21 <drewolson> if you want to chuck on things that don't start with `-`, you could do that
13:21 <Ducky> Yes, that's what I'd like to do
13:21 <Ducky> Chunking on the non "-" ones
13:22 cristianR_ joined
13:22 <drewolson> one sec
13:23 <Ducky> Yes thank you :o
13:23 <Nicd-> it has already been 20 seconds
13:23 <benwilson512> drewolson: if we're golfing:
13:23 <benwilson512> https://www.irccloud.com/pastebin/BcFmOTR4/
13:23 <benwilson512> :p
13:23 <Nicd-> booo
13:24 jdrab joined
13:24 <drewolson> :)
13:29 hotpancakes joined
13:29 stephen_m joined
13:29 chriswarren joined
13:31 <drewolson> Ducky there's probably a better way, but this works https://gist.github.com/drewolson/42686276ef5109b4a4c141f171886869
13:32 <drewolson> now we just wait for my nerd snipe to get benwilson512 to write a better one
13:32 <Ducky> Dude, thank you so so much
13:32 <Ducky> you saved my butt xd
13:33 <Nicd-> drewolson: wouldn't it be better to pattern match in the fn?
13:33 <Nicd-> to get rid of the if-else
13:33 <drewolson> Nicd- yes but i was too lazy :)
13:33 <Ducky> :'))
13:33 <drewolson> also the pattern got weird because i was basically doing `"-" <> _ = v`
13:33 <drewolson> which almost seemed more complex than just doing the if
13:34 duane joined
13:34 <drewolson> there's probably a better way to represent the accumulator too, i'm sure
13:35 <Ducky> I mean, it seems good enough for me with the simple thing i have to do. So no worries xd
13:35 mitchellhenke joined
13:37 gokr joined
13:38 <drewolson> Nicd- here's the best i could come up with via matching https://gist.github.com/drewolson/e8732a9cc19bc2d0fd73dd09004f8acb
13:38 <drewolson> i'm not sure if i like it better
13:40 <Nicd-> https://gist.github.com/Nicd/50f7bfdc046944f2d359f1a7e64e645b
13:40 chriswarren joined
13:40 <drewolson> Nicd- yep, very similar. i considered that but i didn't like "re-adding" the -
13:40 <drewolson> either way works, though
13:40 <Nicd-> of course, the "-" in the output is probably redundant
13:40 <Nicd-> so you could drop it
13:41 gvaughn joined
13:45 sfbw joined
13:45 Tetiana joined
13:47 <OliverMT> I see we all have our pre-optimization pants on today
13:47 <OliverMT> :D
13:47 <gazler> I want to play https://gist.github.com/Gazler/35ddf681b401b7d45f8e0a95b140bf54
13:48 <drewolson> gazler ugh stop doing smart things like giving concepts names
13:48 <drewolson> it makes the code too readable
13:49 <OliverMT> I would say an Enum reduce with two function heads is more readable
13:49 chriswarren joined
13:49 <OliverMT> with the reduce target being {prev, %{}}
13:50 <drewolson> i did consider swapping the elements in my tuple
13:50 <drewolson> the map does feel more natural last, i think
13:50 <OliverMT> that is what drewolson had
13:50 <OliverMT> just backwards
13:50 <drewolson> yep :)
13:50 <OliverMT> yeah, modifier first man!!
13:50 <OliverMT> I actually had to re-read yours because it wasnt apparent that is what you had
13:50 <OliverMT> haha
13:51 jbranchaud joined
13:51 <drewolson> i put the map first because the "subject" seems to come first in all the standard elixir functions. but it felt off here.
13:52 <benwilson512> side note
13:52 <benwilson512> does the built in OptionParser not work here?
13:53 rschmukler joined
13:53 <OliverMT> I dont think it supports multiple flags
13:53 <OliverMT> and dont you need to give the flags up front?
13:53 <OliverMT> or is that only if you want type coercion/understanding
13:53 <OliverMT> *multiple flags for one input
13:53 <OliverMT> ..yes it does
13:53 <OliverMT> but yeah, need to give up front?
13:56 hotpancakes joined
13:58 chriswarren joined
13:59 maxbeizer joined
14:02 codestorm joined
14:04 hexus0 joined
14:05 chriswarren joined
14:06 <iFire> what's the computer science name I can google for the pattern of
14:06 am55_ joined
14:06 <iFire> def convert(_current, [opt | tail], acc) do
14:07 <iFire> the part with the acc
14:07 <gazler> recursion?
14:07 <iFire> well there's an accumlator and a end case
14:07 <benwilson512> tail recursive
14:07 <benwilson512> generally
14:08 <benwilson512> although it depends on the body of convert
14:08 <drewolson> yep, or "tail call optimization"
14:08 <drewolson> TCO for short
14:12 cschneid_ joined
14:14 cemilowski joined
14:15 mitchellhenke joined
14:15 refriedchicken66 joined
14:16 hahuang65 joined
14:16 cemilowski left
14:17 sfbw joined
14:18 racycle joined
14:19 duane joined
14:22 am55_ joined
14:23 craigp joined
14:24 superherointj joined
14:28 scarfacedeb joined
14:28 refriedchicken joined
14:31 am55_ joined
14:32 <scrogson> has anyone else experience an erlang release dying after startup with just printing: Killing
14:32 <scrogson> ?
14:32 <scrogson> https://gist.github.com/scrogson/fa7ab93ea840db8562d47a271208dc64
14:36 cdg joined
14:36 am55_ joined
14:36 hotpancakes joined
14:39 norbertka joined
14:40 RexM joined
14:41 FMJaguar_ joined
14:42 am55_ joined
14:42 bigkevmcd joined
14:43 alex88 joined
14:44 <beatpanic> scrogson: it's just a guess-- it might have been for some reason Killed by the Linux OOM killer? try to double check the kernel logs
14:45 <scrogson> beatpanic: thanks.
14:46 <scrogson> yep OOM
14:48 cschneid_ joined
14:49 cdg_ joined
14:50 jerel joined
14:53 am55_ joined
14:56 codestorm joined
14:59 scarfacedeb joined
15:02 wtetzner joined
15:06 czeq joined
15:13 rschmukler joined
15:13 hotpancakes joined
15:17 hahuang65 joined
15:18 travis-ci joined
15:18 <travis-ci> elixir-lang/elixir#13896 (master - 6d122fa : José Valim): The build passed.
15:18 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/3404a6fd1380...6d122fa35279
15:18 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211384888
15:18 travis-ci left
15:18 scarfacedeb joined
15:21 jadlr joined
15:22 codestorm joined
15:27 raycoll joined
15:32 bigkevmcd joined
15:35 franco joined
15:37 hotpancakes joined
15:39 cristianR_ joined
15:40 al-maisan joined
15:40 mozzarella joined
15:43 bitmod joined
15:44 amclain joined
15:45 jdrab joined
15:45 DeadTrickster joined
15:45 pankracy joined
15:46 harfangk joined
15:47 dustinfarris joined
15:47 ngr joined
15:47 kzemek joined
15:50 rozap joined
15:53 sfbw joined
15:55 nicholasruunu joined
15:55 davidw joined
15:56 Synecy joined
15:57 rschmukler joined
16:00 racycle joined
16:07 andman joined
16:07 rschmukler joined
16:09 scarfacedeb joined
16:10 rschmukler joined
16:10 icecreamcohen joined
16:11 aeliton joined
16:11 mattyw joined
16:12 hexus0 joined
16:13 Ioyrie joined
16:13 rschmukler joined
16:17 hotpancakes joined
16:17 hahuang65 joined
16:18 dimitarvp joined
16:21 hotpancakes joined
16:21 oborot joined
16:22 cdg joined
16:23 rschmukler joined
16:24 tuacker joined
16:26 laut joined
16:33 euphoriaa joined
16:35 <bitmod> what's the testing philosophy of elixir?
16:35 imack joined
16:36 <bitmod> i.e. is it an integral part of elixir's philosophy?
16:36 hahuang65 joined
16:36 refriedchicken joined
16:37 hotpancakes joined
16:37 rschmukler joined
16:37 josevalim_ joined
16:37 <drewolson> yes
16:37 johnstorey joined
16:40 threedee joined
16:43 rschmukler joined
16:48 markholmes joined
16:49 zabirauf joined
16:50 zabirauf_ joined
16:51 rschmukler joined
16:52 cdg_ joined
16:52 codestorm joined
16:53 strykerkkd joined
16:55 ZippoWeb2 joined
16:55 scarfacedeb joined
17:00 gvaughn_ joined
17:01 rschmukler joined
17:02 vmoravec joined
17:03 jeffweiss joined
17:07 shymega joined
17:07 Cthalupa joined
17:11 rschmukler joined
17:11 embik joined
17:12 gmcabrita joined
17:16 jbrancha_ joined
17:17 hexus0 joined
17:21 hexus0 joined
17:22 Uniaika joined
17:23 chrismccord joined
17:25 Cohedrin joined
17:28 cdg joined
17:30 <ciawal> I’m trying to move an existing phoenix app to be in a (new) umbrella app, I've followed some instructions to achieve this but when I now run mix phoenix.server from the umbrella app root I get this error:
17:30 <ciawal> ** (Mix) Could not start application server: could not find application file: server.app
17:30 <ciawal> anyone done this before who might know the cause?
17:31 Gasher joined
17:34 hotpancakes joined
17:35 hexus0 joined
17:35 guacamole joined
17:36 <ciawal> it also seems to be fully recompiling every time I run `mix`
17:39 jbranchaud joined
17:42 bitmod joined
17:47 codestorm joined
17:47 Gringill joined
17:57 wsieroci joined
18:00 betawaffle joined
18:00 <Gringill> ping bitwalker
18:00 <bitwalker> Gringill: pong
18:01 rschmukler joined
18:03 <Gringill> Hey man, question regarding conform. I have a number of keys that I want to transform. The transformation for each requires information from a file on disk. I would like to not have to re-read that file in each transform for each key. Do you have any advice as to what the best direction to take would be to solve this? It looks like I need some sort of
18:03 <Gringill> context that I can load this file into before any transformations occur and have it accesible to those transformations.
18:03 hahuang65 joined
18:03 superherointj joined
18:04 <Gringill> Haven't had to do something like this before so I am looking into plugins, overlays, etc. etc. for the first time and don't want to spin my wheels too much if it isn't possible / there is an easy way I am not thinking of.
18:05 deltawaffle left
18:06 <Gringill> If the transforms are guaranteed to occur in the order they are defined, I guess I could use a "dummy" key first to read in the file... feels a little dirty though :)
18:06 <bitwalker> Gringill: well, you could cheat a bit and read the file and stash it in ETS, basically have each transform call a function that either reads it from ETS, or creates the table, reads the file, and dumps it in ETS if the table doesn't exist yet
18:08 <Gringill> bitwalker: Mmm yeah that would work. I think I will give that a go.
18:08 <Gringill> bitwalker: Thanks!
18:08 <bitwalker> np :)
18:08 chriswar_ joined
18:11 hahuang61 joined
18:11 PaReeOhNos joined
18:14 rschmukler joined
18:17 jeffweiss joined
18:23 icanhazbroccoli joined
18:24 wsieroci joined
18:26 ZippoWeb2 joined
18:27 klltkr joined
18:38 hotpancakes joined
18:38 maxbeizer joined
18:40 squallstter joined
18:42 racycle joined
18:49 luke_nukem joined
18:49 acscherp joined
18:55 refriedchicken joined
18:59 <superherointj> Hi. I´m having trouble trying to do my first MongoDB connection in Elixir. I´m able to connect and get a PID. And then when I try to do Mongo.find() it errors. Code is here: https://gist.github.com/superherointj/19974800969b1a5237876908ff6cfa1d
19:00 <superherointj> ericmj, is here! O.o
19:00 <superherointj> What a small world. :)
19:01 <micmus> superherointj: you need to add mongodb to you applications list in mix.exs (or remove the list altogether if you're in 1.4 and rely on the application inference)
19:01 shadowjack joined
19:01 <micmus> the exact problem is - the mongodb application is not started
19:02 <micmus> (usually noproc exits are caused by something not being started)
19:02 hotpanca_ joined
19:02 <superherointj> [extra_applications: [:logger, :mongodb, :poolboy]] Should I remove these two items? (mongo+poolboy)
19:02 <micmus> how are you running the code?
19:03 <barttenbrinke> Is there a best practice of doing pagination in Phoenix? Because I am looking a Scrivener Hex Package and it puts the pagination logic in Repo, which I am not sure of is the right place.
19:03 icanhazbroccoli joined
19:04 <superherointj> mix run
19:05 <ericmj> barttenbrinke: i agree that it's not the right place to put it
19:05 <ericmj> I wish scrivener only composed on queries or possibly multi
19:05 <superherointj> https://gist.github.com/superherointj/499136653324437886986167f52f418f
19:05 <barttenbrinke> ericmj: Can you recommend something?
19:05 zabirauf_ joined
19:06 lexmag joined
19:06 arathunku joined
19:06 refriedchicken66 joined
19:08 <superherointj> micmus, I did try what you said but error didnt change. ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
19:09 <barttenbrinke> ericmj: Rummage looks ok: https://github.com/aditya7iyengar/rummage_phoenix
19:09 <superherointj> Can you give me feedback on my mix.exs posted above?
19:09 Tallys__ joined
19:10 maxxe joined
19:13 <micmus> superherointj: 20:02 <micmus> how are you running the code?
19:13 <superherointj> mix run
19:13 <superherointj> D:\dev\elixir\mongox>mix run
19:15 superherointj joined
19:16 <micmus> hmm... looks correct
19:16 markholmes joined
19:17 <micmus> superherointj: can you check what's the value of Application.started_applications() before calling mongo?
19:17 <superherointj> It seems I had a cache problem.
19:17 hotpancakes joined
19:18 <superherointj> This is not the first time it happens.
19:18 potatosalad joined
19:18 <superherointj> I did run `mix run` several times. But only when I changed source code it did recompile.
19:19 <superherointj> But still it errors.
19:19 <superherointj> https://gist.github.com/superherointj/ef305ce8c9b5dbf730cdc314ad577423
19:20 wsieroci joined
19:20 <micmus> superherointj: wait, you're calling the mongo functions at compile-time?
19:20 chrismccord joined
19:20 <micmus> this won't work, it needs to be at runtime, at compile-time only the compiler is running
19:21 <superherointj> So I should run application by ¨mix run¨?
19:21 <superherointj> *shouldn´t
19:22 PaReeOhNos joined
19:22 <superherointj> I´m not sure about the difference between runtime and compile time.
19:23 <micmus> basically runtime is inside modules, in the supervision tree of an OTP application
19:23 <superherointj> I am used to node.js which I just do ¨node xxx.js¨. So I thought i would do same. ¨mix run¨
19:23 <micmus> you can run scripts with mix run foo
19:23 <micmus> but you have the code in an .ex file
19:23 bitshift_ joined
19:23 <micmus> so it's being compiled
19:24 <micmus> and mongo is not available when compiling
19:24 <superherointj> How can I solve this?
19:24 <micmus> I'd recommend going through the Mix & OTP guide http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html
19:25 <micmus> superherointj: don't put the script-code in a file that is going to be compiled
19:25 <micmus> superherointj: by default lib/**/*.ex are compiled
19:26 <superherointj> Right, I will study more this.
19:26 <superherointj> Now I understand what is going wrong.
19:27 <superherointj> Before I thought it was a module issue.
19:28 hotpancakes joined
19:29 <superherointj> Thank you.
19:41 Arcsech joined
19:47 jerel joined
19:47 potatosalad joined
19:48 hotpancakes joined
19:49 rschmukler joined
19:49 wsieroci joined
19:50 rozap joined
19:51 hotpanca_ joined
19:56 icecreamcohen joined
19:56 Cohedri__ joined
19:58 hahuang65 joined
19:59 johnstorey joined
19:59 kyrix joined
20:01 hexus0 joined
20:04 hexus0 joined
20:07 m_m joined
20:07 MasterNayru joined
20:13 icanhazbroccoli joined
20:13 <barttenbrinke> Does Phoenix help the user somewhere with attribute protection? Or is that an issue the developer has to solve?
20:14 jbranchaud joined
20:14 <barttenbrinke> Because I am looking at pagination hex packages atm and most of them seem to ignore this as well.
20:14 <drewolson> barttenbrinke: what do you mean by attribute protection? mass assignment? injection?
20:14 zabirauf joined
20:14 <ericmj> what kind of attribute protection does pagination need?
20:15 <barttenbrinke> drewolson: Yeah, for example.
20:15 <barttenbrinke> ericmj: Well, limiting the fields it can search on for example.
20:15 juicegun joined
20:15 <ericmj> barttenbrinke: i dont think the paginator so concern itself about that
20:15 <barttenbrinke> ericmj: All paginators just take whatever the param hash says and exeute that.
20:15 <ericmj> Should*
20:16 <barttenbrinke> ericmj: True, but something in the stack should do that :)
20:16 <drewolson> barttenbrinke: that's not really true. my pagination library, for example, explicitly looks for only 3 keys in the params map.
20:16 <drewolson> barttenbrinke: ecto + changesets can help with mass assignment
20:16 <barttenbrinke> drewolson: Which one is that?
20:16 <drewolson> scrivener
20:16 <drewolson> and scrivener_ecto
20:16 <ericmj> barttenbrinke: yes, but the pagination doesn’t handle searching
20:16 <drewolson> ^ correct
20:17 <barttenbrinke> ericmj: drewolson True, but for example rummage does
20:17 <ericmj> that sounds bad
20:17 cdg joined
20:18 <drewolson> yes, it sure does :)
20:18 <drewolson> generally, ecto handles injection concerns quite nicely. changesets handle mass assignment quite nicely.
20:18 <drewolson> and if your tool builds on those things (like scrivener), you don't need to worry about them
20:19 <ericmj> oh dear https://github.com/aditya7iyengar/rummage_ecto/blob/master/lib/rummage_ecto/hooks/search.ex#L275
20:19 <drewolson> :|
20:19 <barttenbrinke> https://github.com/aditya7iyengar/rummage_ecto#examples
20:19 <drewolson> the API for rummage looks ... familiar
20:19 <ericmj> i was wondering how rummage went around ecto’s injection protection
20:19 icanhazbroccoli joined
20:20 <ericmj> i guess you can only do so much to protect people
20:20 <barttenbrinke> :)
20:20 <drewolson> barttenbrinke: scrivener, for example, just takes an ecto query and returns a "window" of it to the user
20:20 <drewolson> and ecto itself handles safely building that query
20:20 <barttenbrinke> drewolson: Ok, I'll try to implement that next :)
20:21 <drewolson> h/t ericmj :)
20:21 <barttenbrinke> drewolson: I'll need to implement searching but that should not be a problem.
20:21 <drewolson> barttenbrinke: depending on how complex it is, you may just be mapping user criteria to sql constraints.
20:22 <barttenbrinke> drewolson: When I looked at the examples, you get a bit worried: https://github.com/aditya7iyengar/rummage_ecto#examples
20:23 <ericmj> drewolson: what do you think about not adding functions to Repo with scrivener? instead do a more functional approach that composes on queries or possibly Multi?
20:23 <drewolson> ericmj i'd love to see some examples, i'm always open to changing the API
20:23 <drewolson> in a major version bump
20:23 <barttenbrinke> drewolson: ^^ That was the reason I skipped it and started to implement Rummage
20:24 <drewolson> barttenbrinke: it seems rummage also adds functions to the repo. the api looks very similar.
20:24 iFire joined
20:24 <ericmj> drewolson: let me throw together a proposal in an issue on scrievener
20:24 <drewolson> ericmj much appreciated
20:25 <drewolson> ericmj if i understand what you're suggesting, it should require a major version bump for scrivener but _probably_ not for the libs that implement the protocol
20:25 <drewolson> e.g. scrivener_ecto
20:25 <ericmj> i think so
20:25 <ericmj> or you can do it as an alternative api
20:25 <ericmj> and them remove the repo stuff later
20:25 <barttenbrinke> drewolson: Is scrivener_phoenix on the roadmap :)?
20:26 <drewolson> barttenbrinke scrivener_ecto is basically scrivener_phoenix
20:26 <micmus> So I was talking recently with the developer behind rummage to remove injecting functions https://github.com/aditya7iyengar/rummage_ecto/pull/36
20:26 <drewolson> unless i'm missing something
20:26 <micmus> I haven't really looked at other things it's doing
20:26 <micmus> injecting functions was the first one I saw
20:27 <drewolson> scrivener does already support being called this way https://github.com/drewolson/scrivener/blob/master/lib/scrivener.ex#L36-L38
20:27 <drewolson> it's just not documented
20:27 <barttenbrinke> drewolson: Ah, there is scrivener_html
20:27 <drewolson> not sure if that addresses your concerns ericmj ^
20:28 <drewolson> you can just ignore `use` and call those functions directly in a pipeline
20:28 <barttenbrinke> 👍🏼
20:29 <ericmj> drewolson: not fully, because you still couple pagination with the repo
20:29 <ericmj> but it’s halfway there
20:30 <drewolson> ericmj yes, that's fair. basically i'd return the query without executing it, right?
20:30 <drewolson> that would be quite an easy change, actually.
20:30 <drewolson> though it means the protocol would be looser
20:30 <ericmj> yes, or if you have to do multiple countries, like getting the number of pages and a specific page, you can use Ecto.Multi
20:30 <drewolson> right now the protocol specifies that a page is returned
20:31 <drewolson> whereas now it would dependent on the type input. but that's probably fine
20:31 <drewolson> e.g. a list returns a list, a query returns a query
20:31 hotpancakes joined
20:31 <ericmj> I think Scrievener.paginate can still be a public API
20:31 Havvy joined
20:32 <ericmj> but you should also get the option to not pass a repo and then run it later with a repo
20:32 <drewolson> yeah, ok, i like this. i'll wait for your issue.
20:32 <barttenbrinke> drewolson: Thanks for the work on Scrievener! I'll implement it tomorrow and see if I can help out with ericmj 's ticket.
20:32 <ericmj> basically it would return a data structure that you can later execute to get the results
20:32 <drewolson> barttenbrinke: np.
20:32 <drewolson> ericmj: yep, understood
20:34 wsieroci joined
20:43 solatis joined
20:46 qqwy joined
20:46 <qqwy> Good day! :-)
20:46 Accident joined
20:46 <drewolson> hello
20:49 <qqwy> I have a question about style while working on the elixir-lang project itself:
20:50 <qqwy> When should you pattern match directly, and when should you use the `struct.field` accessor syntax?
20:50 <qqwy> Does it matter from an efficiency point of view? Are there other reasons to pick one over the other?
20:50 johnstorey joined
20:51 hotpancakes joined
20:59 milad joined
21:00 <benwilson512> struct.field carries semantic value that is sometimes useful
21:00 <benwilson512> so for example if you say
21:00 <benwilson512> def send_message(to, from)
21:00 <benwilson512> to.number and from.number communicate clearly
21:00 rschmukler joined
21:01 <benwilson512> you could pattern match and have like
21:01 <benwilson512> %{number: to_number} but that can sound awkward sometimes
21:01 hashpuppy joined
21:04 milad joined
21:04 milad joined
21:05 colrack joined
21:07 luke_nukem joined
21:08 mattyw joined
21:10 iFire joined
21:10 tetiana joined
21:11 juicegun joined
21:12 PaReeOhNos joined
21:17 <qqwy> benwilson512: So you'd actually suggest to use `struct.field' more often?
21:17 <benwilson512> if by "more" you mean "more than pattern matching out stuff" I have no idea quantitatively
21:17 <qqwy> José gave as feedback on the PR that I'd opened to use pattern matching instead of field access, and I am wondering what the rationale is behind using one over the other in general
21:18 <qqwy> I guess in that case there were indeed multiple fields
21:18 <qqwy> so pattern matching might make more sense for that reason
21:18 <benwilson512> I'd say I use pattern matching more often
21:18 nanohest joined
21:18 <qqwy> but it does make code a lot longer, since you are indeed introducing new names for everything, just like `to_number' in the example
21:20 klltkr joined
21:22 Duckily joined
21:25 <qqwy> Thanks :-)
21:27 nry joined
21:27 nry joined
21:32 jmiven joined
21:37 josevalim_ joined
21:39 icecreamcohen joined
21:43 meh` joined
21:43 hotpanca_ joined
21:47 shadowshell joined
21:47 kbot joined
21:49 milad joined
21:54 johnstorey joined
21:55 klltkr joined
21:59 hotpancakes joined
22:02 chriswarren joined
22:03 chriswarren joined
22:04 chriswarren joined
22:05 cdg joined
22:07 hotpancakes joined
22:13 chriswarren joined
22:20 luke_nukem joined
22:22 chriswarren joined
22:26 rozap joined
22:31 chriswarren joined
22:32 icecreamcohen joined
22:34 zabirauf joined
22:36 johnstorey joined
22:37 Sgeo joined
22:37 klltkr joined
22:40 Guedes joined
22:40 Guedes joined
22:41 chriswarren joined
22:46 icecreamcohen joined
22:50 chriswarren joined
22:51 ep joined
22:55 markholmes joined
22:56 bungoman_ joined
22:56 hahuang65 joined
22:57 <markholmes> this might be a silly question, but i'm interested in the nerves project... i just don't know what to do with it. is there a list of things to do with it?
22:58 chriswarren joined
22:59 jhack joined
23:02 <Uniaika> markholmes: check their GH repos and their open issues, or contact them directly ;)
23:03 refriedchicken joined
23:03 <OliverMT> what do I do if a filename is using a long dash (utf8) and :zip takes a charlist
23:03 <iFire> Is there a good example of upsert
23:04 <OliverMT> I am getting badarg
23:04 <OliverMT> and a to_string on the charlist emits a black dot instead of the long dash
23:04 <iFire> I want to create or fetch a tag if the tag exists then insert the many_to_many in posts
23:05 <hahuang65> iFire: https://github.com/elixir-ecto/ecto/pull/1541
23:05 <hahuang65> assuming you're using Ecto.
23:06 <iFire> http://blog.plataformatec.com.br/2016/12/many-to-many-and-upserts/ is not detailed enough
23:06 PaReeOhNos joined
23:08 rkazak_ joined
23:08 chriswarren joined
23:13 cschneid_ joined
23:15 <hahuang65> iFire: how about the tests that are written for upsert?
23:15 <iFire> So what I want to do is check if a tag exists, if it doesn't exist, insert it, else insert the post with the atg
23:16 <hahuang65> iFire: also you might want to look at Ecto.Multi
23:16 <hahuang65> iFire: AFAIK, you cannot do an upsert across different tables
23:17 chriswarren joined
23:17 <hahuang65> Ecto.Multi might be more suited to your needs for this.
23:19 <hahuang65> iFire: you could use Ecto.Multi with an insert on your tag with the option for on_conflict: nothing, then as a second operation, insert into many_to_many
23:19 <iFire> but the documentation says that the on_conflict won't update the id
23:19 <iFire> in the struct of the tag
23:20 jeffweiss joined
23:20 <iFire> oh wait
23:20 <iFire> that works, I had the error in the invalid key
23:20 <hahuang65> ^_^
23:21 <iFire> have to use though on_conflict: [set: [name: name]], conflict_target: :name
23:21 <iFire> now to try it out
23:26 chriswarren joined
23:29 vendethiel- joined
23:31 rschmukler joined
23:31 hotpancakes joined
23:35 chriswarren joined
23:40 wtetzner joined
23:40 DLSteve joined
23:41 rschmukler joined
23:42 raycoll joined
23:42 sfbw joined
23:44 jamie_ca joined
23:44 chriswarren joined
23:53 chriswarren joined
23:58 rodolfojcj joined