<     May 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:02 cevado joined
00:08 rkazak joined
00:13 InternetFriend joined
00:15 Reshi joined
00:18 mika__ joined
00:19 sunaku joined
00:19 Siyo joined
00:19 Siyo joined
00:30 nighty-- joined
00:33 PaReeOhNos joined
00:44 InternetFriend joined
00:53 superherointj joined
00:53 <superherointj> Just figured out what I was getting wrong. And it was on the client sad. Unbelievable. This one of those moments I feel really stupid.
00:53 <superherointj> *s/sad/side
00:56 cevado joined
01:00 tonyc joined
01:09 Cohedrin joined
01:15 cschneid_ joined
01:17 sunaku joined
01:17 chrismccord joined
01:18 ssswitch joined
01:18 <ivan> hmm I thought the web/ directory was going away but mix phoenix.new still creates one
01:18 <chrismccord> ivan `mix phx.new`
01:18 <chrismccord> `phoenix.*` tasks are deprecated
01:18 <ivan> aha thank you
01:28 sevenseacat joined
01:34 cdg joined
01:38 tomterl joined
01:44 PaReeOhNos joined
01:44 mika__ joined
01:45 isubasti joined
01:48 sunaku joined
01:50 Reshi joined
01:50 Cohedrin joined
01:50 cevado joined
01:58 srxa_ joined
02:03 bratsche joined
02:13 elgenie joined
02:22 Cohedrin joined
02:37 wong2 joined
02:45 cevado joined
02:59 bobbobbins joined
03:02 <bobbobbins> hey, I'm new to elixir & phoenix and I'm trying to create a plug that will just test for a valid url, otherwise send the user to the 404 page. If I send a 404 response in the plug, I'm getting a response already sent error, but I can't figure out how to point the plug to the 404 fallback controller. What is the best way to do this?
03:03 notdaniel joined
03:11 m1dnight1 joined
03:30 sfbw joined
03:33 <asonge> bobbobbins: welcome. to answer your question, you need to instruct the conn to halt (Plug.Conn.halt/1, or just halt(conn) if Plug.Conn functions are already imported)
03:33 <asonge> if you want to point the plug to the 404 fallback controller, though, you can also just like, call the function
03:34 <asonge> plugs are just functions, so you can just call them. there's no globals magic or wiring behind the scenes
03:34 <asonge> the magic is where you put the plugs in the router, as that's a little dsl, but that's not much.
03:39 cevado joined
03:41 bobbobbins joined
03:42 <bobbobbins> asonge: thank you...that makes sense. I guess I'm used to a little more behind the scenes shenanigans, this is more straight forward
03:43 akeating joined
03:51 harfangk joined
03:53 larshesel joined
03:53 sunaku joined
03:57 elgenie joined
04:04 Na joined
04:06 __charly__ joined
04:22 refriedchicken joined
04:26 srxa joined
04:33 cevado joined
04:43 OtherAllan joined
04:46 sunaku joined
04:52 sunaku joined
04:55 wsieroci joined
04:58 sunaku joined
05:00 cemilowski joined
05:00 smt_ joined
05:03 craigp joined
05:05 sunaku joined
05:08 wsieroci_ joined
05:17 dec0n joined
05:17 gvaughn joined
05:21 sunaku joined
05:24 tuacker joined
05:25 meandi_2 joined
05:25 srxa joined
05:27 cevado joined
05:28 sunaku joined
05:32 sunaku joined
05:39 elgenie joined
05:45 wsieroci joined
05:49 <pufuddled> What applications need to be started before a phoenix channel broadcast can be sent without crashing?
05:54 dch_ joined
05:55 cemilowski joined
05:56 notdaniel joined
05:58 Tica2 joined
06:01 icanhazbroccoli joined
06:02 sfbw joined
06:02 zodiak__ joined
06:05 zodiak__ joined
06:12 wsieroci joined
06:14 elgenie joined
06:16 bobbobbi_ joined
06:18 l14n joined
06:21 justelex_ joined
06:22 cevado joined
06:30 <asonge> pufuddled: you can look it up with something like `:application.get_key(:phoenix_pubsub, :applications)`
06:30 <asonge> pufuddled: `ensure_all_started` is good if you're running a test.
06:34 Ven joined
06:37 hbraun joined
06:43 mattyw joined
06:45 Guest67 joined
06:49 <nyaray> is there a convenient way of starting my project without starting the project specific applications?
06:49 <nyaray> I just want my modules to be available but not start to try to grab ports
06:49 acscherp joined
06:51 <nyaray> what I'm trying to do is just get a shell up where I can call Poison.decode to get some data from json objects I've hoarded :P
06:52 <asonge> nyaray: the way phoenix does this is by having the server start that grabs a port be a separate task, and you add it back in to the app based on a config value
06:53 Guest67 joined
06:56 <nyaray> A mix task?
06:59 <asonge> yes, you can add custom mix tasks and when you want to start up the full server, you add that to `iex -S mix`. with phoenix, it's `iex -S mix phoenix.server`, you can do this with whatever is grabbing ports for you...or have a mix config that sets some flag to not add in the server to the supervisor
06:59 <Nicd-> nyaray: use --no-start
07:00 <asonge> (and TIL there's a flag)
07:00 sfbw joined
07:02 <nyaray> :D
07:05 flaviodesousa joined
07:05 gvaughn joined
07:08 griffinbyatt joined
07:17 mark_66 joined
07:32 zv joined
07:32 PaReeOhNos joined
07:32 ariejan joined
07:33 squallstter joined
07:38 josevalim joined
07:38 cemilowski joined
07:40 peterpp joined
07:42 cemilowski1 joined
07:43 codestorm joined
07:44 Cohedrin joined
07:47 mozzarella joined
07:48 cemilowski joined
07:51 bobbobbins joined
07:52 inoas joined
07:54 proteusguy joined
07:56 <smeevil> o/
08:00 ktec joined
08:01 sfbw joined
08:01 zodiak_ joined
08:05 zodiak_ joined
08:07 Guest67 joined
08:10 ur5us joined
08:11 griffinbyatt joined
08:15 nhooyr joined
08:15 elgenie joined
08:16 teacup-on-rc joined
08:20 akeating joined
08:27 justelex_ joined
08:29 marr joined
08:31 harfangk joined
08:32 craigp joined
08:33 isubasti joined
08:36 harfangk joined
08:37 stephen_m joined
08:37 codestorm joined
08:42 Cohedrin joined
08:45 pesnk joined
08:51 nbg joined
08:54 gvaughn joined
09:02 pota joined
09:02 isubasti joined
09:03 sfbw joined
09:04 lexmag joined
09:04 cevado joined
09:11 griffinbyatt joined
09:12 gmcabrita joined
09:21 liuzhoou joined
09:23 isubasti joined
09:28 cmk_zzz joined
09:29 liuzhoou joined
09:40 justelex_ joined
09:44 isubasti joined
09:46 aedigix joined
09:49 gvaughn joined
09:50 Ioyrie joined
09:54 mika__ joined
09:57 stephen_m joined
09:58 cevado joined
10:04 sfbw joined
10:04 isubasti joined
10:10 cschneid_ joined
10:12 griffinbyatt joined
10:16 elgenie joined
10:17 nhooyr joined
10:19 returntrip joined
10:19 mika__ joined
10:22 bigkevmcd joined
10:24 <gazler> Is there a standard way of ensuring that a repeated crash in a single simple_one_for_one worker doesn't kill the supervisor? Put a supervisor in front of each worker?
10:25 isubasti joined
10:25 nighty-- joined
10:27 <cmk_zzz> gazler: For this use case I generally write my own "supervisor" (a gen_server) which has a better restart policy than the normal supervisor. Even if you put a supervisor in front of the worker if it repeatable crashes it is going to burn through that one as well
10:27 <gazler> The other thing I can think of is to change the restart strategy to temporary and implement my own restart logic.
10:29 <cmk_zzz> the question is why your simple_one_for_one worker is crashing?
10:29 <cmk_zzz> sometimes the best thing is to just let everything crash
10:29 <gazler> Yeah, not in this case. It is for APNS notifications, there is a persistent HTTP/2 connection per worker. Sometimes they disconnect repeatedly and can't reconnect for a short while.
10:30 <gazler> So I probably want some sort of back off period.
10:31 <cmk_zzz> gazler: For similar cases I've used a gen_server which controls the workers and restart them with exponential backoff. Then you can also give proper error message to users of the API when the connection is down
10:31 <gazler> cmk_zzz: Yeah, that sounds like a good approach. The existing approach is quite naive just to get it working.
10:33 <gazler> cmk_zzz: Thanks for the advise, I'll give this a go.
10:33 l33n joined
10:44 <ciawal> can I get the current Logger level somehow?
10:44 <gazler> ciawal: Logger.level
10:45 <ciawal> wow I looked in the tab complete list specifically for that and didn't see it
10:45 <ciawal> thanks
10:45 jkreeftm_ joined
10:46 isubasti joined
10:53 cevado joined
10:53 papachan joined
11:04 sfbw joined
11:06 isubasti joined
11:07 owickstrom joined
11:09 tuacker joined
11:11 dimitarvp joined
11:15 cevado joined
11:20 griffinbyatt joined
11:37 <fishcakez> gazler: the more common pattern is start these workers under a temporary simple one for one in another app or at the top/earlier in the current supervision. Then an owning process starts the connection under that supervisor. Crash the owner if anything too unexpected happens but don't for a closed connection, also the connection would need to close when its
11:37 <fishcakez> owner does. This separates the supervision to a supervisor. Unexpected crashes would then still crash the processes using the connection.
11:37 gvaughn joined
11:37 <fishcakez> perhaps not a more common pattern but a more OTP principled style
11:37 akeating joined
11:39 <gazler> fishcakez: Thanks for the input, that's a good idea.
11:39 fmcgeough joined
11:40 <gazler> I think in this particular case, some form of back-off is desirable in the case there is some sort of networking issue.
11:40 sfbw joined
11:42 <fishcakez> I wasnt saying not to do backoff, just that separate that from supervision
11:43 <fishcakez> I would probably use Connection for the owner, and handle backoff there, and start the connection in connect/2, and stop in disconnect/2
11:47 jkreeftmeijer joined
11:53 cristianR_ joined
11:58 jkreeftm_ joined
12:00 superherointj joined
12:03 bobbobbins joined
12:10 cschneid_ joined
12:17 jerel joined
12:18 elgenie joined
12:29 pesnk joined
12:32 mattyw joined
12:44 aedigix joined
12:46 returntrip joined
12:48 jkreeftmeijer joined
12:52 Nicd- joined
12:54 akeating joined
13:00 ramortegui joined
13:03 cdg joined
13:03 mmonkey joined
13:10 JEG2 joined
13:10 sfbw joined
13:18 ssswitch joined
13:19 mika_ joined
13:19 elgenie joined
13:26 isubasti joined
13:27 kronicdeth joined
13:35 chrismccord joined
13:37 permalac joined
13:39 tuacker joined
13:41 gvaughn joined
13:42 permalac joined
13:43 permalac joined
13:44 permalac joined
13:44 papachan joined
13:58 cemilowski joined
13:59 tuacker1 joined
14:01 nighty-- joined
14:02 ktec joined
14:05 jleon joined
14:07 lexmag joined
14:08 <jleon> Hey guy, I had a question about Logger in elixir, is there anyway to get rid of the the extra 'new line' in the console output? I see this in my plug module and this example output: https://pastebin.com/MbgVKhBG
14:10 ppatrik joined
14:11 aedigix joined
14:12 lexmag joined
14:13 jerel joined
14:13 maxbeizer joined
14:22 rkazak joined
14:31 proteusguy joined
14:38 smetana joined
14:39 kronicdeth joined
14:44 superherointj joined
14:45 MarioBranco joined
14:46 dj_goku joined
14:46 dj_goku joined
14:48 __charly__ joined
14:56 MarioBranco joined
14:57 karmajunkie joined
15:02 <Nicd-> I would also like to know if it's possible :)
15:04 dimitarvp` joined
15:04 hashpuppy joined
15:05 codestorm joined
15:08 cschneid_ joined
15:10 meh` joined
15:11 akeating joined
15:11 kradnl joined
15:13 cevado joined
15:20 elgenie joined
15:24 pesnk joined
15:25 wong2 joined
15:27 tuacker joined
15:27 kradnl joined
15:29 justelex_ joined
15:30 icecreamcohen joined
15:30 akeating joined
15:31 refriedchicken joined
15:32 <drewolson> are module names (or any TitleCase identifier) really just atoms under the covers?
15:32 <notriddle> Yes.
15:33 codestorm joined
15:35 intermo[m] joined
15:36 <Nicd-> drewolson: Foo == :"Elixir.Foo"
15:38 <drewolson> Nicd-: yes, i just discovered this in iex. thanks.
15:38 <Nicd-> :)
15:38 <drewolson> Nicd-: does this mean that module definition places the functions into some kind of environment keyed by the module's atom name?
15:39 <Nicd-> it places them into a module called :"Elixir.Foo" if your module is Foo
15:41 ejpcmac joined
15:42 isubasti joined
15:47 bobbobbins joined
15:47 kradnl joined
15:49 zodiak_ joined
15:51 zodiak_ joined
15:56 mika_ joined
15:58 isubasti joined
15:58 davidw joined
16:00 amclain joined
16:00 <Tica2> shell history support merged into otp/master
16:02 <Nicd-> nice
16:04 kronicdeth joined
16:13 akeating_ joined
16:14 isubasti joined
16:14 bobbobbins joined
16:18 <ciawal> oh great
16:18 <icecreamcohen> yay!
16:20 Tidur joined
16:22 refriedchicken joined
16:23 codestorm joined
16:23 codestorm joined
16:24 josevalim_ joined
16:28 jeffweiss joined
16:29 guacamole joined
16:29 isubasti joined
16:31 griffinbyatt joined
16:34 dj_goku joined
16:38 cevado joined
16:45 isubasti joined
16:48 kradnl joined
16:50 rozap joined
16:55 msantos joined
16:58 srxa joined
16:59 kradnl joined
17:00 isubasti joined
17:04 <superherointj> Tica2, just read a complain about this lack of ¨shell history support¨ TODAY. QUite interesting.
17:06 MarioBranco joined
17:07 returntrip joined
17:08 <manukall> wow. how long can i expect to wait for a stable release with shell history now?
17:08 nbg joined
17:16 isubasti joined
17:16 OtherAllan joined
17:19 icanhazbroccoli joined
17:21 sunaku joined
17:22 elgenie joined
17:26 srxa_ joined
17:26 rozap joined
17:27 Cohedrin joined
17:29 codestorm joined
17:30 cschneid_ joined
17:30 nbg joined
17:30 kradnl joined
17:30 akeating joined
17:31 isubasti joined
17:32 griffinbyatt joined
17:43 icanhazbroccoli joined
17:44 isorehalav joined
17:45 icanhazbroccoli1 joined
17:45 isorehalav joined
17:47 isubasti joined
17:47 rozap joined
17:47 kradnl joined
17:51 notdaniel joined
18:02 isubasti joined
18:03 <kronicdeth> The ranch docs for ranch:start_listener talk about setting the max number of connections (and it defaults to 1024), but I can't recall that being set for any of the Phoenix benchmarking blogs. Is it just set to infinity in some of the Phoenix or Plug code? Where is that done?
18:07 hahuang65 joined
18:14 wwwd` joined
18:18 isubasti joined
18:22 dj_goku joined
18:22 dj_goku joined
18:24 cschneid_ joined
18:31 Uniaika joined
18:32 griffinbyatt joined
18:33 mika_ joined
18:33 justelex joined
18:34 isubasti joined
18:36 rozap joined
18:38 <wwwd`> I have two seperate but connected questions. First, I am getting ready to start a project. I want to use Phoenix and Elm. Since we are right at the cusp of the change from Phoenix 1.2 to 1.3, how much risk am I incuring by just going ahead and building the project in 1.3? Second, I have read The Elixir and Elm Tutorial and watched Chris McCord's Lonestar talk on Phoenix 1.3. Is anyone aware of any other sources to understand the change
18:38 <wwwd`> from models to contexts? I've read and watched several things Fowler and Evans on Bounded Context. Is this what is being advocated in 1.3 or are the contexts in Phoenix more limited in scope?
18:40 <Nicd-> I liked this one: http://michal.muskala.eu/2017/05/16/putting-contexts-in-context.html
18:40 <Nicd-> if it has any new information for you
18:40 <wwwd`> I have not seen it so I will take a look. Thanks!
18:44 bobbobbins joined
18:47 gvaughn_ joined
18:49 isubasti joined
18:52 zv joined
18:55 rkazak joined
18:56 icanhazbroccoli joined
18:56 srxa joined
19:00 gvaughn_ joined
19:00 <micmus> Thanks, Nicd- :)
19:01 cevado joined
19:05 isubasti joined
19:15 maxbeizer joined
19:17 srxa_ joined
19:20 wsieroci joined
19:20 isubasti joined
19:22 ktec left
19:24 elgenie joined
19:29 rozap joined
19:33 Cohedrin joined
19:34 cevado joined
19:35 griffinbyatt joined
19:36 isubasti joined
19:38 aedigix joined
19:38 cemilowski joined
19:40 aedigix joined
19:44 RexM joined
19:48 squallstter joined
19:49 MotherFlojo joined
19:50 __charly__ joined
19:51 jordan0day joined
19:51 isubasti joined
19:52 maxbeizer joined
20:03 srxa joined
20:07 isubasti joined
20:11 dj_goku joined
20:11 dj_goku joined
20:12 junsuijin joined
20:13 cdg joined
20:15 miwa joined
20:20 __charly__ joined
20:21 gazler_ joined
20:22 isubasti joined
20:26 nbg joined
20:30 superherointj joined
20:36 davidw joined
20:36 cevado joined
20:38 gvaughn_ joined
20:42 ur5us joined
20:43 hahuang65 joined
20:48 superherointj joined
20:58 cemilowski1 joined
20:59 srxa joined
20:59 sfbw joined
21:01 sfbw_ joined
21:06 karmajunkie joined
21:08 marr joined
21:09 inoas joined
21:14 ionas joined
21:17 dj_goku joined
21:17 dj_goku joined
21:22 stephen_m joined
21:25 jdqx joined
21:25 jerel joined
21:26 elgenie joined
21:28 dj_goku joined
21:28 dj_goku joined
21:33 jmiven joined
21:36 griffinbyatt joined
21:39 dj_goku joined
21:41 returntrip joined
21:48 dj_goku joined
21:48 dj_goku joined
21:54 icanhazbroccoli1 joined
21:56 fowlduck joined
21:57 dj_goku joined
22:02 sfbw joined
22:05 RexM joined
22:07 superherointj joined
22:08 fmccann joined
22:11 rodolfojcj joined
22:12 <superherointj> Hi. I need to do oAuth2 for Facebook login. Which library is best for this?
22:14 <benwilson512> https://hex.pm/packages?_utf8=%E2%9C%93&search=oauth&sort=downloads
22:14 hahuang65 joined
22:14 <benwilson512> I'd go with the one that has nearly 200k downloads
22:15 <superherointj> Makes sense.
22:17 meh` joined
22:25 cevado joined
22:25 codestorm joined
22:35 rodolfojcj joined
22:35 RexM_ joined
22:37 griffinbyatt joined
22:42 seaword joined
22:42 seaword joined
22:44 <seaword> I have a few structs for common model data that I use across a bunch of tests and are repeated within each file. Where is the best place to define these? test_helper.exs?
22:46 isubasti joined
22:52 elgenie joined
22:54 dimitarvp joined
22:55 srxa joined
22:57 isubasti joined
22:58 fmccann joined
23:03 sfbw joined
23:04 isubasti joined
23:08 cschneid_ joined
23:11 srxa_ joined
23:12 Fire-Dragon-DoL joined
23:13 srxa joined
23:16 isubasti joined
23:17 __charly__ joined
23:19 jerme_ left
23:19 cevado joined
23:22 isubasti joined
23:27 isubasti_ joined
23:34 cschneid_ joined
23:35 ssswitch joined
23:36 jhack joined
23:36 jhack joined
23:45 dj_goku joined
23:47 <asonge> seaword: you can have a test support folder with a module to group like functions
23:49 <seaword> asonge: thanks. I've gone with a file under test/support containing these common functions. I'll turn it into a folder if this file grows and would be better split into several files.