<    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 <asonge> i'm seeing a lot of notes in the erlang changelog for 19.3 about updates being applicable independently of other applications...are we about to see some erlang core applications move to hex in the next year?
00:01 hexus0 joined
00:02 chriswarren joined
00:03 <iFire> asonge: well removing barriers is good :)
00:04 <tristan__> asonge: that is the goal
00:06 stephen_m joined
00:07 scarfacedeb joined
00:09 Guedes joined
00:09 Guedes joined
00:11 chriswarren joined
00:12 rschmukler joined
00:12 r00tl3ss joined
00:12 PaReeOhNos joined
00:13 rozap joined
00:14 icecreamcohen joined
00:16 |1li joined
00:20 chriswarren joined
00:22 jerel joined
00:23 hexus0 joined
00:26 <tristan__> asonge: though I don't see what in the changelog you saw that led you to that
00:29 chriswarren joined
00:33 <asonge> tristan__: notes about pushing single app from the release...maybe they were always there but I never noticed? They were on each app
00:33 <fishcakez> asonge: since otp 18
00:33 <fishcakez> i think it is more about providing info so ppl can apply minimal changes
00:34 <tristan__> ah
00:34 <tristan__> yea
00:34 <tristan__> but yea, either way, plan is to publish to hex
00:37 jbranchaud joined
00:38 chriswarren joined
00:40 <iFire> so fishcakez is basically on american time
00:42 <fishcakez> iFire: stop stalking me *hides*
00:42 <iFire> :( but I wanted to ask questions at a reasonable hour :(
00:43 sfbw joined
00:45 wtetzner joined
00:47 chriswarren joined
00:52 cdg joined
00:55 zabirauf joined
00:56 proteusguy joined
00:57 chriswarren joined
01:01 rozap joined
01:03 cschneid_ joined
01:06 chriswarren joined
01:14 nbg joined
01:14 zabirauf joined
01:14 sfbw joined
01:14 PaReeOhNos joined
01:15 chriswarren joined
01:24 chriswarren joined
01:31 hotpancakes joined
01:31 hotpanca_ joined
01:31 <ivan> how do I configure ecto to use fewer connections? I think the default pool setup is setting up far more connections than I need
01:33 nighty- joined
01:33 chriswarren joined
01:33 chriswarren joined
01:37 <asonge> ivan: they don't really cost much of anything...they can help with latency
01:37 <ivan> asonge: postgresql has a default limit of 100 though
01:38 <ivan> I've already raised it but I'm curious about where to weave in the poolboy size option
01:39 <asonge> ivan: how many other apps are connecting? (There is a pool setting on the repo, btw, and that will be on each config separately)
01:40 <asonge> pool_size
01:40 <ivan> I was running 5 apps at the same time to debug something and was surprised when the 6th one blew up :-)
01:40 <ivan> thanks
01:41 <asonge> you can increase that number if you were not out of resources yet
01:41 <ivan> ok
01:41 <asonge> It is mostly a safety feature for accidentally dos'ing yourself
01:42 <asonge> (busy connections are obviously more of a problem than idle ones)
01:42 chriswarren joined
01:44 <asonge> if you start hanging on to transactions for a long period of time (like uploading a document to s3 during a transaction, or calling a slow api service...some people do this to keep the database really consistent), you might exhaust your pool
01:44 <asonge> and then each connection will queue up trying to check out a connection, and response times go up
01:46 <ivan> fortunately this is a command-line application that doesn't do any slow transactions
01:46 <ivan> but I will keep that in mind as I shrink my pools
01:47 chrismccord joined
01:48 jbranchaud joined
01:49 raycoll joined
01:51 icecreamcohen_ joined
01:51 nbg joined
01:51 chriswarren joined
01:52 <alisdair> ivan: i always run pgpool or pgbouncer in front on postgres, even if i don't need failover or routing
01:53 <ivan> pool_size worked :-)
01:53 <ivan> alisdair: why's that?
01:54 <alisdair> so i don't have to worry about pool size
01:54 <alisdair> they can handle way more than 100 connections
01:54 <alisdair> so you can have large pools at your app tier that get narrowed to less than 100 before hitting your db
01:57 rschmukler joined
02:00 chriswarren joined
02:03 john2x joined
02:05 jhack_ joined
02:09 chriswarren joined
02:18 nahtnam joined
02:19 chriswarren joined
02:23 rodolfojcj joined
02:27 cxadams joined
02:28 chriswarren joined
02:30 tomterl joined
02:33 rschmukler joined
02:37 chriswarren joined
02:39 john2x joined
02:39 meh` joined
02:42 jbranchaud joined
02:45 wong2 joined
02:46 chriswarren joined
02:48 r00tl3ss joined
02:51 hotpancakes joined
02:52 raycoll joined
02:55 chriswarren joined
02:59 scarfacedeb joined
03:04 chriswarren joined
03:13 PaReeOhNos joined
03:13 chriswarren joined
03:15 zabirauf joined
03:16 racycle joined
03:22 <asonge> anyone have any tips for handling erlang records that start with capital letters?
03:22 chriswarren joined
03:25 <asonge> oh wait, got it.
03:28 markh joined
03:29 vnz joined
03:29 vnz joined
03:30 codestorm joined
03:30 rschmukler joined
03:31 chriswarren joined
03:32 rodolfojcj joined
03:32 <alisdair> don't make records with capital letters?
03:33 codestorm777 joined
03:34 <asonge> there's a way around it, and it's not my fault.
03:34 <asonge> (i'm extracting asn1-generated syntax stuff from :public_key)
03:35 scarfacedeb joined
03:35 <alisdair> ah
03:35 <alisdair> record tags are just atoms, so 'Foo' should work
03:37 <asonge> i'm trying to leverage some of the pattern matching from the defrecord stuff
03:37 <asonge> since i'm going to be neck deep
03:37 <asonge> lots of nested records.
03:37 <asonge> there are 147 records in public_key, and i'll probably be using a few dozen?
03:41 chriswarren joined
03:41 hexus0 joined
03:44 rschmukler joined
03:49 chriswarren joined
03:52 raycoll joined
03:59 chriswarren joined
04:00 cschneid_ joined
04:07 scarfacedeb joined
04:08 chriswarren joined
04:09 icecreamcohen joined
04:11 jerel joined
04:12 <iFire> Any suggestions on how to combine many to many with on conflict?
04:15 PaReeOhNos joined
04:15 hexus0 joined
04:16 chriswarren joined
04:17 vendethiel joined
04:18 rschmukler joined
04:20 ctp joined
04:26 chriswarren joined
04:30 snappy_ joined
04:32 jbranchaud joined
04:32 <asonge> oh god, i just realized, my problem can be solved with using with...but in the opposite way most people use it
04:33 <asonge> stay in the with branch on error, anything that doesn't match is a success...
04:33 <asonge> (this makes sense, i swear)
04:33 jbranchaud joined
04:33 <snappy_> Hey everyone, I'm trying out Phoenix 1.3.rc-1 and have noticed something odd: when I create several resources within the same context, the "context"_test file only contains tests from the first generated resource, not all of them. Is this expected behavior?
04:35 chriswarren joined
04:38 <asonge> snappy_: hrm, i'm going to bet that probably yes, but it might need to be rethought (or not?), because the way code templates work, they don't replace existing files.
04:39 <asonge> (or at least from what i understand)
04:42 <snappy_> asonge: gotcha, yeah, it's just rather annoying.
04:43 Duckily joined
04:43 <asonge> yeah, it's worth bringing up later to important people. it might need to be thought about and possibly solved?
04:44 chriswarren joined
04:44 <chrismccord> snappy_ https://github.com/phoenixframework/phoenix/issues/2158
04:45 <chrismccord> I'm working on this as we speak
04:45 <snappy_> chrismccord: gotcha, thanks, Chris!
04:50 NeverDie joined
04:53 hahuang65 joined
04:53 chriswarren joined
04:53 raycoll joined
04:54 sebhoss joined
04:55 hahuang65 joined
04:56 scarfacedeb joined
04:59 vendethiel joined
05:00 pchittum joined
05:01 zabirauf joined
05:02 rschmukler joined
05:02 chriswarren joined
05:04 hahuang61 joined
05:06 hotpanca_ joined
05:07 sasajuric joined
05:11 chriswarren joined
05:12 rschmukler joined
05:12 gvaughn joined
05:21 chriswarren joined
05:29 chriswarren joined
05:38 aniketd joined
05:39 chriswarren joined
05:46 <kgkg_> hi everyone: I am trying to set up phoenix under WSL in Windows, and am following the guide on the site. Installing brunch seems to be the problem at the moment.
05:47 <kgkg_> I created a new project with: mix phoenix.new hellp_phoenix
05:47 arathunku joined
05:48 chriswarren joined
05:48 <kgkg_> It came back with an error to npm install brunch by hand: * error command failed to execute, please run the following command again after installation: "npm install && node node_modules/brunch/bin/brunch build"
05:49 <kgkg_> That doesn't work because at "node_modules/brunch/bin/brunch build" there's nothing. Should mix have put something there?
05:50 <Nicd-> mix doesn't do that, it's npm
05:50 <Nicd-> so you should try `npm install` in your project directory
05:51 willingc joined
05:57 chriswarren joined
05:57 willingc joined
06:00 codestorm joined
06:01 codestorm joined
06:03 hotpancakes joined
06:05 willingc joined
06:06 chriswarren joined
06:07 hotpancakes joined
06:08 PaReeOhNos joined
06:08 dec0n joined
06:15 chriswarren joined
06:16 hotpancakes joined
06:16 markh joined
06:17 refriedchicken joined
06:22 sfbw joined
06:25 hotpancakes joined
06:26 chriswarren joined
06:29 cschneid_ joined
06:29 <kgkg_> Nicd: thanks! I wasn't in the project directory. So simple.
06:35 chriswarren joined
06:37 codestorm joined
06:44 chriswarren joined
06:45 rschmukler joined
06:46 imack joined
06:52 icanhazbroccoli joined
06:53 chriswarren joined
06:53 DavidAntaramian joined
06:54 m_m joined
07:00 cmk_zzz joined
07:01 zabirauf joined
07:02 teadrop_ joined
07:02 chriswarren joined
07:05 tomaz_b joined
07:08 z1mvader joined
07:11 chriswarren joined
07:12 Cohedrin joined
07:18 gokr joined
07:20 nanohest joined
07:20 chriswarren joined
07:21 imack joined
07:22 zabirauf joined
07:22 icanhazbroccoli joined
07:23 sfbw joined
07:24 zabirauf joined
07:25 codestorm joined
07:26 scarfacedeb joined
07:27 scarfacedeb joined
07:28 hotpancakes joined
07:28 truami joined
07:29 chriswarren joined
07:31 l14n joined
07:36 nanohest joined
07:37 qqwy joined
07:37 <dch> asonge: post a snippet of your atypical with: usage I'm curious
07:38 <asonge> dch: it wasn't quite as backwards as i thought, but i just put the longest and most common path in the with
07:38 <dch> cool
07:38 <asonge> (still quite ugly, will gist in a sec)
07:39 chriswarren joined
07:39 <asonge> as i run into failure cases, i stick them in the else, but often just end up wrapping the steps... https://gist.github.com/asonge/8bb62efa4ef01dec34cba3152ec6d73c
07:39 <asonge> i might be able to just give up on the else by the time this is over
07:47 truami joined
07:48 chriswarren joined
07:49 dignifiedquire joined
07:53 acscherp joined
07:54 tuacker joined
07:54 scarfacedeb joined
07:57 chriswarren joined
08:03 fxn joined
08:03 fxn left
08:03 fxn joined
08:05 stephen_m joined
08:06 chriswarren joined
08:11 ZippoWeb2 joined
08:11 PaReeOhNos joined
08:11 Guest67_ joined
08:12 voltone joined
08:13 mattyw joined
08:14 ivan joined
08:15 chriswarren joined
08:16 mark_66 joined
08:17 arathunku joined
08:18 vmoravec joined
08:18 milad joined
08:18 hotpancakes joined
08:24 sfbw joined
08:24 pcre joined
08:26 r00tl3ss joined
08:26 chriswarren joined
08:32 steffkes joined
08:35 perkins left
08:35 chriswarren joined
08:37 cemilowski joined
08:40 l14n_ joined
08:42 josevalim joined
08:44 chriswarren joined
08:48 travis-ci joined
08:48 <travis-ci> elixir-lang/elixir#13919 (master - 6341164 : Boshan Sun): The build passed.
08:48 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/6d122fa35279...63411640d93e
08:48 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211657953
08:48 travis-ci left
08:53 acscherp joined
08:53 chriswarren joined
09:01 travis-ci joined
09:01 <travis-ci> elixir-lang/elixir#13920 (master - 7357f56 : Eksperimental): The build passed.
09:01 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/63411640d93e...7357f565267e
09:01 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211659770
09:01 travis-ci left
09:02 chriswarren joined
09:04 travis-ci joined
09:04 <travis-ci> elixir-lang/elixir#13921 (master - 7c9cb0d : eksperimental): The build passed.
09:04 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/7357f565267e...7c9cb0db81eb
09:04 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211660864
09:04 travis-ci left
09:05 PaReeOhNos joined
09:08 hotpancakes joined
09:11 r00tl3ss joined
09:11 chriswarren joined
09:14 travis-ci joined
09:14 <travis-ci> elixir-lang/elixir#13922 (master - a4545fb : Eksperimental): The build passed.
09:14 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/7c9cb0db81eb...a4545fb8e06b
09:14 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211661113
09:14 travis-ci left
09:15 Tetiana joined
09:17 mattyw joined
09:18 <ivan> josevalim: thank you for fixing that struct race condition, it was blowing up my builds every day and it would have taken me a day to set up a test case and I didn't have to
09:18 celyr joined
09:21 chriswarren joined
09:22 m_m joined
09:23 <micmus> josevalim: could you release 0.11.1 of flow? The 0.11.0 didn't list gen_stage as application dependency and it's tripping people when building releases. I was it's fixed in master.
09:23 <josevalim> ivan: glad to hear it is fixed
09:23 <josevalim> micmus: sure
09:24 <micmus> thanks
09:24 sfbw joined
09:27 travis-ci joined
09:27 <travis-ci> elixir-lang/elixir#13923 (master - 18757a8 : Gal Tsubery): The build passed.
09:27 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/a4545fb8e06b...18757a83f09e
09:27 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211661552
09:27 travis-ci left
09:30 chriswarren joined
09:34 dre___ joined
09:37 iwada joined
09:39 chriswarren joined
09:43 gvaughn joined
09:48 chriswarren joined
09:50 cschneid_ joined
09:54 markh joined
09:57 chriswarren joined
10:02 harfangk joined
10:04 HendrikPeter joined
10:06 chriswarren joined
10:12 cemilowski left
10:13 lexmag joined
10:14 scarfacedeb joined
10:15 chriswarren joined
10:16 AndriusBartulis left
10:16 TarVanim_ joined
10:24 chriswarren joined
10:25 scarfacedeb joined
10:25 Guedes joined
10:25 sfbw joined
10:25 Guedes joined
10:32 hbraun joined
10:33 chriswarren joined
10:36 Tetiana joined
10:41 marr joined
10:42 LangeOortjes joined
10:42 chriswarren joined
10:51 superherointj joined
10:51 chriswarren joined
10:53 cemilowski joined
10:56 blahdodo joined
11:00 chriswarren joined
11:03 l14n joined
11:09 chriswarren joined
11:14 gmcabrita joined
11:15 linduxed joined
11:15 <linduxed> hey guys! the 1.4 release deprecates `Float.to_string/2` and recommends using the erlang functions instead
11:15 <linduxed> are they functionally equivalent in 1.3 as well?
11:16 <linduxed> or would i break stuff by converting usage of Float.to_string/2 to :erlang.float_to_binary/2 when running elixir 1.3?
11:19 chriswarren joined
11:20 hotpancakes joined
11:24 <ciawal> I'm trying to set up an umbrella app with (only) a phoenix app inside, but when I run phoenix.server I get an error: ** (Mix) Could not start application server: could not find application file: server.app
11:24 <ciawal> anyone have any advice? I can’t find anything
11:26 LangeOortjes joined
11:28 chriswarren joined
11:30 nighty joined
11:31 gvaughn joined
11:34 HendrikP1 joined
11:37 chriswarren joined
11:37 PaReeOhN_ joined
11:40 kbot joined
11:46 chriswarren joined
11:49 sfbw joined
11:50 cristianR_ joined
11:52 sfbw joined
11:55 chriswarren joined
11:56 LangeOortjes joined
12:00 mattyw joined
12:02 mattyw joined
12:04 chriswarren joined
12:11 rschmukler joined
12:13 chriswarren joined
12:22 czeq joined
12:22 chriswarren joined
12:23 teddysmoker joined
12:24 benji joined
12:25 m_m joined
12:26 steffkes joined
12:26 steffkes joined
12:27 superherointj joined
12:28 gokr joined
12:28 <superherointj> I`m reading docs today. And something I didn´t understand was spawn_link. ¨Spawns the given function, links it to the current process and returns its PID.¨ Why does it matter? Would be nice if it had any hint on why linking matters.
12:29 <superherointj> So I googled.
12:29 <superherointj> Found this: http://eddwardo.github.io/elixir/links/2015/11/04/links-in-elixir/
12:29 <josevalim> superherointj: that's a good point. please open up an issue. we can add a section to the Process doc and explain links there.
12:30 willingc joined
12:31 chriswarren joined
12:32 milad joined
12:34 <superherointj> Also would be nice if there was an example for each command/function/routine. A collapsable example. One that wouldnt bloat docs but would let the reader peak and see some action.
12:36 rranelli joined
12:36 <superherointj> Docs is mostly principles. (That is a fine) But when it doubt a sample example helps. It just should be hidden and on request only. That would increase user experience.
12:38 <ciawal> often the docs for the base module include some examples and more detailed info
12:38 <ciawal> not sure if you are looking at iex or online
12:38 <superherointj> Website.
12:39 <superherointj> It should be: Example (on request) + Result shown.
12:39 <superherointj> Input Output like.
12:39 <micmus> Most docs have examples, but for some things it's hard to give a meaningful one
12:40 chriswarren joined
12:40 <micmus> e.g. for spawn_link I can't think of an example that wouldn't be trivial for a person who understands what the function does, and wouldn't leave a person who doesn't understand clueless at the same time...
12:43 <fxn> superherointj: there is some inherited Erlang terminology which you need get used to, and in my experience naming is in some cases not very intuitive, `linking` you need to learn, some APIs like `handle_info` do not convey a lot of meaning in the function name, etc.
12:47 gvaughn joined
12:49 <superherointj> How would you name `handle_info`?
12:49 chriswarren joined
12:50 <superherointj> It´s a trap question. Naming is hard. All programmers know it. :o)
12:50 gokr joined
12:52 <Havvy> superherointj: It's a hard problem. So actually sit down and think about it.
12:52 <Havvy> handle_out_of_band
12:53 <Havvy> handle_raw
12:53 <Havvy> handle_send
12:53 <fxn> superherointj: `handle_info` to me suggests asking the server for some kind of metadata about itself or something, rather than an endpoint for what it is
12:55 <fxn> superherointj: don't get me wrong, probably there is a historical reason for that name or whatever, but if you deal a little bit with Erlang you get the impression that intuitive naming is not strong there generally speaking
12:55 jbranchaud joined
12:56 <superherointj> If Elixir gets it right and does zero cost abstraction it will be fine.
12:57 <fxn> exactly, that is a contrast I have experienced, Elixir has excellent naming (for my taste), and then you see `handle_info`, and it is a WTF moment, and that happens when Erlang leaks
12:58 proteusguy joined
12:58 <superherointj> I personally don´t like the idea of letting Erlang leak. I´m not saying to prohibit it. But if one has to use Erlang that is a leak.
12:58 chriswarren joined
12:59 scarfacedeb joined
13:00 <superherointj> The philosophy of having to learn Erlang AND Elixir is not one that sounds great. Of course, right now Elixir isn´t very mature. But eventually as philosophy would be nice not wanting to have leaks.
13:00 hotpancakes joined
13:00 <Nicd-> there's a ton to implement if you never want to use Erlang though
13:00 <ciawal> you never have to write Erlang, to be clear
13:00 <Nicd-> and it's a big maintenance burden as well
13:00 <superherointj> I´m mostly talking on interface. Not internals.
13:00 <fxn> it is a fine balance, in general I believe the guideline is to not Elixirize Erlang, but to embrace and leverage it where the cost/benefit suggests doing so, josevalim right?
13:01 <ciawal> yeah I believe that's accurate
13:01 <Nicd-> ciawal: I mean using Erlang APIs
13:01 LangeOortjes joined
13:01 ramortegui joined
13:02 <josevalim> fxn: right. but you should be able to learn all of the primitives without having to resort to erlang
13:02 <josevalim> and linking is a primitive
13:03 <fxn> josevalim: but then as long as you have `GenServer`, the callbacks are going to be exposed as they are, instead of wrapped in alternative/modern names for example
13:03 <josevalim> yes, we rarely rename terminology
13:04 hbraun joined
13:05 Kero left
13:08 MarioBranco joined
13:08 chriswarren joined
13:12 embik joined
13:13 <stephen_m> for some reason, I had the idea in my head that mixed maps were not allowed in elixir. Eg %{test: "test", "tester" => "test"}. Anyone know why I might have this idea?
13:13 <stephen_m> are mixed maps allowed?
13:13 alex88 joined
13:14 <benwilson512> they are, but mixed map syntax
13:14 <benwilson512> so you can do
13:14 <benwilson512> %{:test => "test", "test" => "foo"}
13:14 <OliverMT> what the
13:14 <benwilson512> but you can't use BOTH the atom syntax short hand as well as the long form
13:14 <OliverMT> has this been disallowed before?
13:14 <benwilson512> always
13:14 <benwilson512> same with keywords
13:14 <OliverMT> I was also 99% sure that it wasnt allowed
13:14 <benwilson512> wait what?
13:14 <benwilson512> I mean
13:14 <OliverMT> ah ofc, short form and long form not allowed
13:14 Tetiana joined
13:15 <OliverMT> that means that short form always enforce atom keys
13:15 <benwilson512> right yeah
13:15 <OliverMT> since "foo": would mean :"foo" atom key
13:15 <benwilson512> at least once you start using them
13:15 <stephen_m> sorry, i meant %{:test => "test", "tester" => "test"}
13:15 <benwilson512> so with lists you can do
13:15 <benwilson512> %{:test => "test", "tester" => "test"} is perfectly legal
13:16 <stephen_m> i see.
13:16 <fxn> docs say you can mix, as long as atoms go to the end https://hexdocs.pm/elixir/Map.html
13:16 <stephen_m> thanks.
13:16 <stephen_m> benwilson512.
13:17 <fxn> see the second IEx example block
13:17 chriswarren joined
13:17 <benwilson512> yeah that's what I meant by "at least once you start"
13:17 <benwilson512> same with lists
13:17 <benwilson512> [:foo, :bar, baz: 1, qux: 2] is legal but [baz: 1, qux: 2, :foo, :bar] is illegal on the same principle
13:17 sfbw joined
13:19 ramortegui joined
13:19 LangeOortjes joined
13:26 LangeOortjes joined
13:26 chriswarren joined
13:27 hexus0 joined
13:34 LangeOortjes joined
13:35 chriswarren joined
13:44 chriswarren joined
13:48 acscherp joined
13:49 MarioBranco joined
13:50 wong2 joined
13:53 chriswarren joined
13:55 steffkes joined
13:56 <Ankhers> What is the current way to store datetime with timezone using ecto 2.0? I'm using Postgres if that makes a difference.
13:57 <acscherp> https://github.com/bitwalker/timex_ecto
13:59 <Ankhers> timex_ecto suggests needing to create a type within the database, but postgres supports datetime with timezone.
13:59 icecreamcohen joined
13:59 <micmus> timestamp with timezone doesn't actually store a timezone
14:00 arathunku joined
14:01 hotpancakes joined
14:02 chriswarren joined
14:05 <Ankhers> How about if I am fine with it being stored as UTC?
14:05 <benwilson512> then just use the `:datetime` type as the column type in your schema
14:05 <stephen_m> Ankhers - you could store as UTC in DB and convert to local timezone as required in the application.
14:11 smt_ joined
14:11 chriswarren joined
14:13 <Nicd-> of course, you need to be sure you're not going to need the offsets later. I do and I'm paying the price for not having them :P
14:14 <Ankhers> I have the offset stored elsewhere because of reasons.
14:20 chriswarren joined
14:21 hotpancakes joined
14:22 Guest42521 joined
14:25 cdg joined
14:27 m_m joined
14:28 racycle joined
14:29 oborot joined
14:29 chriswarren joined
14:36 keathley joined
14:37 laut joined
14:38 chriswarren joined
14:42 willingc joined
14:45 chrismccord joined
14:47 meh` joined
14:47 chriswarren joined
14:49 jschneck joined
14:49 <Speed> by the way, is irc more active or Slack?
14:49 <jschneck> Um, did 19.3 break httpc follow redirects? https://github.com/nerves-project/nerves/issues/96
14:49 <Speed> I prefer irc, but my timezone is kinda weird, so I tend to miss the main discussion times here
14:54 MarioBranco_2 joined
14:55 <jschneck> its strange, in OTP 19.3 using httpc I can't follow a github release link through to aws
14:55 <jschneck> but in 19.2 I can
14:57 chriswarren joined
14:57 <voltone> jschneck: httpc now adds the port number to the Host header on redirect
14:57 <voltone> according to the release notes
14:57 <voltone> looks like that breaks the S3 request signature
14:59 <micmus> yay! another issue with httpc...
14:59 <micmus> it seems they never end
14:59 <jschneck> voltone could you provide a link to where you found that
15:00 <jschneck> I am having trouble digging it up
15:00 <voltone> http://erlang.org/download/otp_src_19.3.readme
15:00 <voltone> jschneck: look for OTP-14097
15:00 <jschneck> ah yeah
15:00 <jschneck> thanks
15:00 <targaf> I noticed that Task.async_stream has an option to set max_concurrency. Is there a similar way to increase the number of workers/tasks being run when using Task.async?
15:00 <jschneck> so the only work around is to handle redirects myself
15:01 raycoll joined
15:02 <micmus> targaf: Task.async is starting just one process, so max_concurrency doesn't really make sense there
15:02 jerel joined
15:04 <targaf> micmus: This is a limit of understanding concurrency in elixir on my part, then. Is there a way to make a call to Task.async more "aggressive". Either by starting multiple processes or?
15:04 jdrab joined
15:04 cschneid_ joined
15:05 <micmus> targaf: you can call Task.async multiple times, if you want multiple processes started. That said, I'm not sure I understand what you're asking
15:06 chriswarren joined
15:06 <targaf> micmus: essentially, I'm parsing a csv into a stream and then looking to perform modifications on that stream concurrently. I'll throw up a gist
15:07 <targaf> micmus: it looks like this https://gist.github.com/spencermurray/ffef74a927bdd7d93e4c6e4ae32529bf
15:08 <targaf> what I'm looking to do is decrease the total run time as much as possible
15:10 cdg joined
15:11 dimitarvp joined
15:12 <Ankhers> targaf: Is there any reason you don't just use Task.async_stream/5?
15:13 <targaf> @ankhers, I attempted to switch my code over to that earlier but I'm flying and off internet and haven't had time to debug a syntax error I was getting constructing the call
15:13 maxbeizer joined
15:15 <micmus> targaf: in general your code will start a process for each row - the overhead of starting the process might be greater than the actual work it will perform
15:15 chriswarren joined
15:15 jbranchaud joined
15:15 <micmus> you can try chunking the work with Enum.chunk, and later using Enum.flat_map when awaiting the results.
15:16 <targaf> micmus: they're fairly "heavy calls" that involve calling an api and waiting and dealing with its response
15:16 <targaf> ok, I will look into that
15:16 <micmus> ah, for IO intensive stuff that might make sense
15:16 <micmus> but spawning all the calls at the same time, might not make the target service happy
15:16 <targaf> micmus: that was my next question :)
15:17 <micmus> (personal experience - my IP was banned from accessing a gov agency when I was scraping for data, exactly because of that)
15:17 <targaf> is there a way to limit it Task.async to a certain number of processes? So I can say do no more than 30 calls at a time or so
15:17 <micmus> Task.async_stream is the way
15:18 <targaf> Ok, I'll try and get my error sorted then.
15:19 <targaf> it's weird though, I'm specifying the call in what I think is the right way from the docs (Task.async_stream(ExternalMatch, :offline_match, [&1])) but I'm still getting an compile error for an unhandled &1 outside of capture
15:19 <Ankhers> CSV.decode(headers: true) |> Task.async_stream(ExternalMatch, :offline_match, []) # I believe this is what you want.
15:20 <Ankhers> You are getting that error because you are not inside a capture block. You have no `&` to start the anonymous function.
15:20 willingc joined
15:20 <targaf> ankhers: that worked, you're right. How is the arity of offline_match being specified there?
15:21 <targaf> is Task.async_stream inherently limited to calling 1 arity functions?
15:21 <Ankhers> Task.async_stream/5 passes each item from the enumerable into your function already. Anything you pass using `[]` are extra parameters.
15:21 <targaf> ah got it, that makes total sense
15:22 chriswarren joined
15:22 <Ankhers> The example in the docs `stream = Task.async_stream(collection, Mod, :expensive_fun, [])`.
15:22 <Ankhers> Of course, you are also free to change the max_concurrency option as you see fit.
15:23 <cristianR_> Hi
15:23 <Ankhers> cristianR_: Hi!
15:24 <cristianR_> In my Phoenix project I'm manually subscribing some gen_servers to some endpoint topics with MyApp.EndPoint.subscribe("topics")
15:24 <cristianR_> Should I manually unsubscribe them on get_server termination?
15:24 icecreamcohen joined
15:28 <targaf> this is working perfectly now. Thanks a ton ankhers and micmus
15:30 codestorm joined
15:30 <linduxed> what's the canonical way of expressing a full function name?
15:31 <voltone> jschneck: found the Erlang bug tracker issue for httpc that 19.3 is supposed to fix: https://bugs.erlang.org/browse/ERL-316
15:31 hotpancakes joined
15:31 <linduxed> in Ruby instance methods are referred to like `Fruit::Banana#rot` and class methods as `Fruit::Banana.preference_in_music`
15:32 <linduxed> is there some equivalent notation in Elixir for functions?
15:32 <Ankhers> linduxed: I guess it would be Module.fun/arity. So something like IO.puts/1.
15:32 <linduxed> Ankhers: ah, yes, i've seen this before!
15:32 <linduxed> thank you
15:42 davidw joined
15:44 aleandros_ joined
15:50 <dimitarvp> Guys, anyone has a rough idea when will Phoenix 1.3 come out?
15:51 <dimitarvp> I am about to start two Phoenix projects very soon. Would love to directly jump on it.
15:53 hotpancakes joined
15:54 amclain joined
15:54 zabirauf joined
15:54 travis-ci joined
15:54 <travis-ci> elixir-lang/elixir#13933 (master - a2735bb : Eksperimental): The build passed.
15:54 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/18757a83f09e...a2735bbf28d0
15:54 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211799296
15:54 travis-ci left
15:55 <benwilson512> dimitarvp: I'd jump into the RC then
15:55 <dimitarvp> benwilson512: is it guaranteed not to break API?
15:55 <dimitarvp> I mean, the functions won't change signatures/names?
15:56 <benwilson512> guaranteed? no, although the main phoenix api hasn't changed in a while honestly
15:56 <benwilson512> I would expect the changes from rc to final release to be very small, rc generally just means they're making sure there aren't any final issues
15:59 keathley joined
15:59 racycle joined
16:01 MarioBranco joined
16:01 rschmukler joined
16:02 Mario_Branco2 joined
16:03 <dimitarvp> benwilson512: Fair enough, thank you. I'll use RC1 then.
16:04 hexus0 joined
16:06 MarioBranco_2 joined
16:06 rozap joined
16:06 <linduxed> hey guys! the 1.4 release deprecates `Float.to_string/2` and recommends using the erlang functions instead
16:06 <linduxed> are they functionally equivalent in 1.3 as well?
16:07 <linduxed> whoops
16:07 <linduxed> bad copy paste :-/
16:08 steffkes joined
16:08 steffkes joined
16:08 <linduxed> i was going to ask whether Float.to_string/2 in elixir 1.3 is functionally equivalent to :erlang.float_to_binary/2
16:13 <alisdair> are `module` and `function` reserved words in elixir?
16:15 scarfacedeb joined
16:16 cemilowski joined
16:18 hotpanca_ joined
16:20 blambi joined
16:24 travis-ci joined
16:24 <travis-ci> elixir-lang/elixir#13935 (master - 1b4fb91 : Michał Muskała): The build passed.
16:24 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/fe283748b9e7...1b4fb917aa4b
16:24 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211809573
16:24 travis-ci left
16:25 zabirauf joined
16:26 <andman> linduxed: check out https://github.com/elixir-lang/elixir/blob/v1.3.4/lib/elixir/lib/float.ex#L225
16:27 <linduxed> andman: but what about this? https://github.com/elixir-lang/elixir/blob/v1.3.4/lib/elixir/lib/float.ex#L210
16:27 <linduxed> oh but wait, that's /1
16:27 <linduxed> not /2
16:28 m_m joined
16:28 jbranchaud joined
16:29 <andman> yeah I don't know about /1 but /2 seems to work the same, i.e. Float.to_string(3.1415, decimals: 2) simply calls :erlang.float_to_binary(3.1415, decimals: 2)
16:30 <linduxed> ok, thanks for bringing my eyes down by 15 lines :-P
16:31 hotpancakes joined
16:31 jeffweiss joined
16:32 Guedes joined
16:32 Guedes joined
16:33 tuacker joined
16:33 refriedchicken joined
16:34 execb5 joined
16:40 chriswarren joined
16:41 acscherp joined
16:41 <benwilson512> alisdair: they're reserved types in typespecs I think
16:41 <benwilson512> but not otherwise
16:44 colrack joined
16:47 hotpancakes joined
16:50 <cristianR_> anyone knows why the subscriptor process of a topic should prevent duplicate subscriptions to the same topic?
16:50 codestorm joined
16:52 travis-ci joined
16:52 <travis-ci> elixir-lang/elixir#13936 (master - 1a19645 : Eksperimental): The build passed.
16:52 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/1b4fb917aa4b...1a19645597dc
16:52 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211821457
16:52 travis-ci left
16:54 oborot joined
16:57 Tetiana_ joined
16:59 <linduxed> hey guys, this may be a question for the phoenix channel (which i don't know the name of), but here goes:
17:00 <linduxed> when upgrading to elixir 1.4, i've fixed pretty much all of the instances of deprecation warnings for missing trailing parentheses in my code, but whenever this kind of code happens:
17:00 <linduxed> use AppName.Web, :model
17:00 <linduxed> i get this error:
17:00 <linduxed> or warning, rather
17:01 <linduxed> warning: variable "__templates__" does not exist and is being expanded to "__templates__()"
17:01 <gazler> linduxed: This should be fixed on master https://github.com/phoenixframework/phoenix/commit/64908d34b0b5731a4ab9826f7953ccb6f6037c10
17:01 <linduxed> so this happens in every model. i'm assuming that this is caused by the phoenix library not being upgraded to the latest version. do you think i'm right about this?
17:02 <linduxed> gazler: ok, nice!
17:02 <linduxed> i'll upgrade phoenix then
17:02 <gazler> It should be fixed in 1.2.x
17:02 benji joined
17:02 <gazler> Where x > 0 :)
17:03 hahuang61 joined
17:05 jeffweiss joined
17:07 ZippoWeb2 joined
17:09 cemilowski1 joined
17:13 travis-ci joined
17:13 <travis-ci> elixir-lang/elixir#13938 (master - fc4dc4a : Eksperimental): The build passed.
17:13 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/1a19645597dc...fc4dc4ad9c23
17:13 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211829849
17:13 travis-ci left
17:16 <whodidth1s> can i alias core elixir modules to other names, or use them if i alias another module with the same name, e.g. alias Portal.Attachments.File
17:16 <gazler> whodidth1s: Not sure I understand the question. Aliases are local to their context.
17:16 <gazler> s/context/scope
17:17 <gazler> Ohh, wait, I understand the question now.
17:18 <fishcakez> to keep the code clear you likely want to do alias Portal.Attachements.File, as: AttachFile
17:18 <gazler> You can do it, I'd recommend aliasing yours to something else though. like alias Portal.Attachments.File, as: AttachmentFile
17:19 <whodidth1s> ok, i remember clojure had some trick for this so was just thinking
17:21 wsieroci joined
17:21 <gazler> whodidth1s: there's nothing stopping you doing it, it is more for readability. For example `alias String, as: File` will work, but I wouldn't do it.
17:25 dormiens joined
17:25 Cohedrin joined
17:27 wsieroci joined
17:29 travis-ci joined
17:29 <travis-ci> elixir-lang/elixir#13939 (master - c6766f4 : Gal Tsubery): The build passed.
17:29 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/fc4dc4ad9c23...c6766f4b2b6a
17:29 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211836180
17:29 travis-ci left
17:30 vmoravec joined
17:31 hotpancakes joined
17:39 hotpancakes joined
17:40 Cohedrin joined
17:52 <craigp> I’m constantly amazed at the interesting ways I can use Ecto that I hadn't thought of
17:52 <craigp> well done guys, seriously
17:53 <craigp> I'm more impressed every day that I use it
17:53 dustinfarris joined
17:53 <OliverMT> All deps lib/priv becomes merged right?
17:55 <alisdair> merged?
17:55 <alisdair> priv is per app
17:56 <OliverMT> Hmm
17:56 <OliverMT> With your apps lib priv i mean
17:56 <OliverMT> Or is that separate too?
18:01 scarfacedeb joined
18:04 <alisdair> each application in your project (either your own or those that are brought in as deps) has it's own priv dir
18:04 m_m joined
18:09 steffkes joined
18:09 steffkes joined
18:12 rschmukler joined
18:15 icecreamcohen joined
18:15 scarfacedeb joined
18:16 maxbeizer joined
18:16 steffkes joined
18:18 smt joined
18:19 rozap joined
18:24 hotpanca_ joined
18:25 zabirauf joined
18:26 zabirauf joined
18:27 willingc joined
18:33 hotpancakes joined
18:34 scarfacedeb joined
18:34 nahtnam joined
18:35 travis-ci joined
18:35 <travis-ci> elixir-lang/elixir#13941 (master - c47ddff : Andrea Leopardi): The build passed.
18:35 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/c6766f4b2b6a...c47ddffeddae
18:35 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/211858494
18:35 travis-ci left
18:38 tomaz_b joined
18:39 <OliverMT> anyone running in the ec2 container service btw?
18:40 <OliverMT> also, is there any speed difference between just doing mix phoenix.server and running an erlang release?
18:41 <OliverMT> http://engineering.pivotal.io/post/how-to-set-up-an-elixir-cluster-on-amazon-ec2/ found this if anyone interested
18:41 milad joined
18:41 <OliverMT> god damnit, misread for ec2
18:41 <tristan__> mix phoenix.server will load modules on demand and a release will load them at boot. so there isthat difference in any initial calls to functions
18:41 <OliverMT> *ecs
18:42 <OliverMT> I am not 100% happy with our rolling deploys using releases and aws codedeploy
18:42 <tristan__> and you likely want to customize the VM configuration, which maybe you can do with mix? but definitely can do with a release
18:42 <alisdair> i ran in ecs for a little while
18:42 <chrismccord> We've had reports of some users seeing perf hits when running as a release vs `mix phx.server`
18:42 <alisdair> but it's pretty bad
18:42 <OliverMT> it WORKS, but its very slow and slightly brittle
18:42 <chrismccord> but we've never pinpointed why. Something around vm args likely
18:42 <OliverMT> alisdair: what were the bad parts?
18:42 <chrismccord> but in general it should be 1:1
18:42 <OliverMT> chrismccord: which way?
18:42 <chrismccord> OliverMT : worse perf in a release
18:42 <alisdair> you have to write your own scheduler if you care about container placement
18:42 <chrismccord> OliverMT : but only a handful of reports
18:42 <tristan__> that makes no sense, haha
18:42 <OliverMT> alisdair: what does that mean in layman terms
18:43 <alisdair> OliverMT: don't use it if you care about where things run
18:43 <OliverMT> well, I need to be able to connect my nodes
18:43 <OliverMT> is that a no-go in ecs
18:43 <alisdair> it should work fine
18:43 <OliverMT> what do you mean "where things run" ?
18:43 <alisdair> ecs you have to create vms to host containers
18:44 <alisdair> if you care about things like 'i want three web containers spread over these three vms' then ecs is bad
18:44 <OliverMT> I thought the whole point of ecs was that you just hand it a docker file and it runs it for you
18:44 milad joined
18:44 <alisdair> no
18:44 <OliverMT> with elb + ecs
18:44 jeznet3 joined
18:44 <alisdair> once you have ecs setup it sort of works like that
18:45 <tristan__> i've heard nothing good about ecs
18:45 <alisdair> (but not really)
18:45 <tristan__> use kubernetes
18:45 <alisdair> yeah, i would go straight to k8s
18:45 <OliverMT> is that good for blue/green style deploys?
18:45 <OliverMT> ideally it spins up a new set of prod nodes, then shift the LB over there
18:45 <OliverMT> and spin down the old ones
18:45 <OliverMT> can kubernetes do that?
18:45 <alisdair> i don't do blue/green, so i don't know. but probably someone has written something about it
18:46 <OliverMT> what do you do for your deploy btw?
18:46 <OliverMT> do you move the repo onto the box or do you precompile in CI?
18:46 <tristan__> it is images, you deploy a image
18:46 <OliverMT> I like the idea that a "host" as we have it now is simply a box with awslogs and aws codedeploy installed
18:46 <OliverMT> the release brings in the rest
18:46 <OliverMT> ok, I'll go rtfm some now
18:46 <alisdair> i build artifacts on a ci thing, then do forward compatible rolling releases
18:46 <OliverMT> does this work on aws btw?
18:47 <alisdair> so i always have multiple versions of an app in production at once
18:47 <OliverMT> I have no desire to leave amazon
18:47 <alisdair> k8s? yeah. coreos have some decent tools. kubeup i think?
18:47 <OliverMT> rather, we're balls deep in any kind of aws service you can use :D
18:47 <tristan__> same. circleci builds a release then builds a docker image and publishes to gcr. k8s fetches that and does a rolling update
18:48 execb5 joined
18:48 luke_nukem joined
18:49 racycle joined
18:50 milmazz joined
18:53 carlosipe joined
18:53 tetiana joined
18:55 acscherp joined
19:00 codestorm joined
19:00 snappy_ joined
19:01 <OliverMT> cool
19:02 wsieroci joined
19:03 <snappy_> I'm playing around with phoenix 1.3.0.rc and I noticed that `assert %{id: id} = redirected_params(conn)` is added to the generated "creates resource and redirects" controller test. Why is this line needed? Thanks :)
19:03 <chrismccord> snappy_ : the next line in the test makes a get to the created resource to test that it was created
19:03 <chrismccord> so we lift the persisted id out of the path, then issue a get to the new resource
19:04 <chrismccord> so the testcase is a create + show in one
19:04 <OliverMT> chrismccord: I am getting hooked on template expansion for the generators and I am seeing a lot of common patterns here
19:04 <chrismccord> OliverMT wdym?
19:04 <OliverMT> chrismccord: how do you feel about pulling a lot of Mix.Phoenix stuff into a Mix.Phoenix.Task.Util style module
19:04 <OliverMT> and making it non-internal
19:05 <OliverMT> that way I could actually build a builder lib for this
19:05 <chrismccord> OliverMT : sounds like more code for me to support, so not thrilled about the idea on my first take :D
19:05 cemilowski left
19:05 <OliverMT> it's incredibly powerful to be able to quickly prototype in your own project style
19:05 <OliverMT> like one project we have a id based acl hierarchy so almost all our actions ahve a case AclService.can_access?(the_id, user_acls) do .. end
19:05 MotherFlojo joined
19:06 <snappy_> chrismccord: oh nice. thanks for clarifying. :)
19:06 <chrismccord> OliverMT : templates can be customized by adding a priv/phx.gen.html/ and so on to your project
19:06 <OliverMT> generating stuff like that when templating up stuff has saved me so much time now
19:06 <chrismccord> OliverMT : beyond that, I don't have any plans to opwn the generators up
19:06 <OliverMT> yes, but you explicitly said that is experimental
19:06 <chrismccord> folks can release their own generator libs to accomplish what they need
19:06 aleandros joined
19:06 <OliverMT> for now I duplicated your tasks into my own tasks so I could write more files etc
19:14 lexmag joined
19:14 rschmukler joined
19:23 proteusguy joined
19:25 willingc joined
19:30 rschmukler joined
19:31 arathunku joined
19:32 scarfacedeb joined
19:41 <OliverMT> is there something similar to remote_console from exrm/distillery without using those?
19:41 <OliverMT> I guess just iex --remsh ?
19:54 cdg joined
19:55 potatosalad joined
19:59 <Ankhers> is repo.hex.pm down?
19:59 kyrix joined
19:59 <ericmj> no?
20:00 <Ankhers> Must be local to me. I'm getting AccessDenied.
20:00 <ericmj> Ankhers: for what url?
20:00 <Ankhers> {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
20:00 <Ankhers> I got that.
20:00 <ericmj> probably a local issue
20:01 <ericmj> AccessDenied is probably because you dont have access to something
20:02 <barttenbrinke> So, how do I do sprintf like things in elixir? Like "Interpret %s" % "this" ?
20:02 <barttenbrinke> Because i cannot find that anywhere in the elixir-lang gettext docs
20:03 <smeevil> if you litterally want sprintf style : https://github.com/parroty/exprintf
20:03 <smeevil> otherwise :io.format
20:03 <barttenbrinke> Yeah, but gettext has to have some form of interpolation support for it to work: https://github.com/elixir-lang/gettext/blob/master/lib/gettext.ex#L253
20:03 <barttenbrinke> So I am missing something here :)
20:04 <smeevil> what do you want to format ?
20:04 <barttenbrinke> Ah, Elixir gettext requires named interpolations?
20:05 <smeevil> you mean gettext("hello %{name}", name: "smeevil") ?
20:05 <Ankhers> gettext("Iterpret %{some_key}, some_key: "this")
20:05 <Ankhers> too slow :(
20:05 <smeevil> :P
20:06 <barttenbrinke> Yes :)
20:07 <smeevil> but that has nothing to do with string formatting like sprintf... :P
20:08 ivan joined
20:09 <Ankhers> barttenbrinke: If you were not using gettext, you could also do something like "This is some #{variable}".
20:09 <OliverMT> tristan__: kubernetes looks cool indeed, been reading for an hour now
20:09 <barttenbrinke> Ankhers: Yes I know. I am a porting Rails gettext app to Elixir Phoenix Gettext and got confused along the way :)
20:09 <barttenbrinke> Ankhers: smeevil : Thanks!
20:10 <Ankhers> Gotcha.
20:10 <OliverMT> tristan__: do you genreally run staging and prod in the same kubernetes cluster? as different services
20:10 <OliverMT> or do you run separate kubernetes setups
20:11 <smeevil> my new favourite css dev trick : add `html {filter: invert(100%)}` happy eyes :)
20:14 cemilowski1 joined
20:18 <tristan__> OliverMT: separate. i'm on GKE so easy to bring up a new cluster
20:22 <OliverMT> GKE ?
20:22 <tristan__> google container engine
20:22 <benwilson512> if google had a production ready managed postgres a la RDS
20:22 <benwilson512> I'd probably use GKE
20:22 <benwilson512> as it is, in the middle of trying out ECS
20:23 <tristan__> they will have that soon
20:23 <benwilson512> yup
20:23 <tristan__> wouldn't waste time with ecs when you should be able to go google :)
20:23 steffkes joined
20:24 <OliverMT> we're too deep in s3 and friends
20:25 <OliverMT> whats the google s3?
20:25 <benwilson512> unfortunately we're having a lot of issues with our current deployment infrastructure and need to do _something_
20:25 <tristan__> cloud storage
20:25 wsieroci joined
20:25 <benwilson512> and I can't justify using Google's postgres right this second
20:25 <tristan__> benwilson512: but why ECS? even if you stay on AWS, i've heard nothing good about ECS
20:26 <OliverMT> coreos + kubernetes looks very pimp
20:26 <OliverMT> to use an eloquent term
20:26 <benwilson512> last time I tried kubernetes the setup effort was monsterous
20:26 <tristan__> OliverMT: and I think google cloud storage is georeplicated by default unlike s3
20:27 <benwilson512> we don't have a very large set of ops skills so I"m trying to find something more managed
20:27 <benwilson512> that will run some of our legacy rails stuff + our new elixir stuff
20:27 <OliverMT> this setup looks almost trivial
20:27 <OliverMT> the hardest part is moving the CI to pushing to kubernetes
20:27 <OliverMT> we're on circle, I think there are plugins for it
20:27 <tristan__> I just use kubectl from circle
20:27 <OliverMT> oh
20:28 <OliverMT> so circle builds the docker container, uploads to s3, then you deploy that s3 url with kubectl?
20:28 <tristan__> assuming it works with s3, yes
20:28 <tristan__> we use gcr
20:28 <OliverMT> whats your deploy time? right now a 3 node prod cluster with about 50mb tar file takes 3 minutes to deploy
20:28 <adamkittelson> benwilson512: have you used RDS btw?
20:29 <OliverMT> <-- used rds faithfully for years now
20:29 <OliverMT> currently at 0 seconds downtime
20:29 <tristan__> but after uploading the image to the registry it is just, 'kubectl set image ...'
20:29 <OliverMT> at about 6 years of accumulated usage
20:29 <OliverMT> been upgrading postgres versions without downtime as well
20:29 <OliverMT> except that postgrex doesnt handle postgres version changing
20:29 <OliverMT> so I had to restart the clusters :P
20:29 luke_nukem joined
20:29 <adamkittelson> OliverMT: how does it work downtime wise with the maintenance windows?
20:29 <OliverMT> it doesnt go "down"
20:29 <OliverMT> it flips the slaves around
20:30 <OliverMT> (if it needs to)
20:30 <OliverMT> I extremely rarely do anything in the rds console
20:30 <OliverMT> other than approve major version upgrades
20:30 <adamkittelson> what do you see application side when that happens, slow queries or anything along those lines?
20:30 inspecteh_deck joined
20:31 <OliverMT> not that I have noticed, we run enterprise apps exclusively
20:31 <OliverMT> almost no users on saturdays
20:31 <OliverMT> in any of our clients
20:32 <adamkittelson> gotcha
20:32 <OliverMT> enterprise is wrong word, I mean b2b
20:32 <OliverMT> I have zero modules called FactoryFactory
20:32 <OliverMT> ;)
20:34 <OliverMT> the bottom line is that unless you have a person employed to work with postgres
20:34 <OliverMT> there is absolutely no reason to run your own db in ec2
20:36 rschmukler joined
20:37 hexus0 joined
20:39 hexus0 joined
20:40 squallstter joined
20:42 hexus0 joined
20:44 Ioyrie joined
20:46 luke_nukem left
20:48 luke_nukem joined
20:48 rschmukler joined
20:49 hexus0 joined
20:49 milad joined
20:51 hexus0 joined
20:52 willingc joined
20:54 icanhazbroccoli joined
21:01 ep joined
21:02 <smeevil> @chrismccord not sure, but i think there is one thing missing in the 1.3 upgrade notes. in endpoint.ex where it configures Plug.Static i had to change the :from option which was `from: :my_app,` to `from: {:my_app, "assets"},`
21:03 <Ankhers> I have a query along the lines of https://gist.github.com/ankhers/2748305eae912e612011789e4662d445. Why do I need to actually preload the association? It works perfectly fine if I add `preload: :post`.
21:04 <Ankhers> smeevil: I never had to do that.
21:04 <smeevil> @chrismccord never mind what i said, it was a sidetrack that mislead me. sorry to bother
21:05 <smeevil> Ankhers yeah, you are right, it works as is :)
21:08 steffkes joined
21:08 steffkes joined
21:09 davidw joined
21:12 tomaz_b joined
21:15 Duckily joined
21:18 acscherp joined
21:21 m_m joined
21:26 cemilowski joined
21:31 zabirauf_ joined
21:32 sdrew joined
21:39 wtetzner joined
21:40 <ericmj> Ankhers: you have a syntax error in your query, you are missing the `:` after `join`
21:41 <ericmj> you also have a comma before `and` that you shouldn’t have
21:43 kevwil joined
21:44 luke_nukem joined
21:51 snappy_ joined
21:52 <snappy_> I'm getting the following compilation error in Phoenix 1.3.0.rc-1: `(CompileError) lib/typestop/web/controllers/post_controller.ex:21: undefined function post_path/3`
21:52 <snappy_> Any idea what this could be?
21:56 <snappy_> I mean, clearly the *_path helper isn't being defined properly, but any idea as to why?
21:57 rschmukl_ joined
21:59 <OliverMT> if have two ifs that are opposites in an eex template (I am overriding phoenix.gen.json).. my problem is that even if the if is NOT evaluated, it leaves all the whitespace it occupies, so my generated code has a lot of newlines
22:00 <josevalim> OliverMT: yes, Phoenix generators do not have trim mode enabled
22:00 <josevalim> snappy_: when you run the generators it says you should add something to your router....
22:00 <OliverMT> thats a param on the EEx call I guess
22:00 <josevalim> did you add that?
22:00 <josevalim> OliverMT: yes and it is probably too late to add that to v1.3
22:00 <OliverMT> its a trivial issue anyways, I dont generate more than a model or two a week :)
22:00 <josevalim> maybe part of the effort on v1.4
22:02 <snappy_> josevalim: Ahhh, I looked at this a million times but didn't catch it. Apparently I pluralized the controller name in the router. i.e. PostsController instead of PostController.
22:03 <snappy_> josevalim: thanks for making me look at it more closely :)
22:10 klltkr joined
22:11 hahuang65 joined
22:11 m_m joined
22:11 jbranchaud joined
22:12 chriswarren joined
22:12 hahuang65 joined
22:12 chriswarren joined
22:13 chriswarren joined
22:14 chriswarren joined
22:15 chriswarren joined
22:16 chriswarren joined
22:16 hahuang65 joined
22:17 sardaukar joined
22:18 jbranchaud joined
22:19 luke_nukem left
22:19 luke_nukem joined
22:19 <benwilson512> tristan__: do you have elixir clustering working on GKE?
22:21 icecreamcohen joined
22:23 <alisdair> i think he's using partisan/lasp-pg
22:24 steffkes joined
22:24 chriswarren joined
22:25 <benwilson512> alisdair: how do you deploy elixir on AWS?
22:25 <alisdair> ci creates a release via distillery, it gets uploaded to s3
22:26 <alisdair> then we have some magic that results in a web app that lets you deploy an arbitrary release to an autoscale group
22:26 <benwilson512> in house magic?
22:26 <alisdair> yeah
22:27 <alisdair> it's basically just a lambda triggered by the s3 upload that logs the release in dynamo and then a webapp that reads from that dynamo table and can update the parameters of a cloudformation stack
22:27 <benwilson512> yea
22:28 <alisdair> next time i need to write deploy stuff tho i'm moving to k8s ;)
22:28 <benwilson512> yea
22:28 losvedir joined
22:29 <OliverMT> stop it guys, I'm already convinced
22:29 <OliverMT> :D
22:29 <OliverMT> gonna try out k8s for one of our apps next week
22:29 <benwilson512> we aren't actually using that many AWS features at this point, mostly just RDS
22:29 <OliverMT> so my partner will stop whining about slow deploys
22:29 <OliverMT> I couldnt live without cloudwatch (awslogs)
22:29 <OliverMT> it's SO nice to have real time cloud logs built in
22:30 <OliverMT> you can use it external to aws, but then its very pricey in terms of data transfer I thin
22:30 <OliverMT> k
22:30 <alisdair> we use rds, redshift, dynamo, sqs, sns, ses, cloudwatch, lambda, kinesis, emr and probably a few things i'm forgetting
22:30 <alisdair> but k8s is pretty easy to deploy on aws
22:30 <OliverMT> are you going kops or coreos alisdair ?
22:30 <OliverMT> I *think* I'll go coreos
22:30 <OliverMT> I saw some guys had released a one click deploy using coreos as well
22:30 <alisdair> prob coreos? i already use it for a bunch of stuff
22:30 <OliverMT> I have zero experience with coreos
22:31 <OliverMT> barely know what it is..
22:31 <OliverMT> but the dashboard you can proxy through to your private computer seems very newbie friendly
22:31 <alisdair> we don't deploy our own stuff with docker/coreos, but we use a lot of services that it turns out it's easiest to deploy via coreos
22:31 <losvedir> silly little phoenix question i can't seem to find the answer to: is there a way in the path helper to attach an anchor/fragment? somethign like users_path(conn, :index, fragment: "why-join") => /users#why-join . rails has something like that although i can never remember if it's anchor: or fragment: in the path helper
22:31 <OliverMT> to toy around and understand the k8s clustering
22:31 <tristan__> benwilson512: erlang clustering, so yes
22:31 <OliverMT> good night
22:32 <benwilson512> tristan__: how does naming work in a containerized setup?
22:32 <benwilson512> presumably you don't use the ip of the actual server
22:33 <tristan__> benwilson512: for normal deployments (not statefulsets) it uses the IP of the pod
22:33 chriswarren joined
22:33 <tristan__> so each gets a unique IP
22:36 <tristan__> then use DNS for discovery
22:36 <tristan__> since kubernetessets that up automatically
22:36 <benwilson512> ah right i forgot k8s has its own networking system
22:42 tetiana joined
22:42 chriswarren joined
22:46 <losvedir> ah well, bummer. after looking through phoenix's route/helpers.ex file it doesn't look like it supports that
22:51 chriswarren joined
22:57 hahuang65 joined
22:59 <tuacker> losvedir: user_path(conn, :index, param: value) => /users?param=value. And since user_path just returns a string you can just do `user_path(…) <> "#myanchor"` => /users#myanchor if you need that
23:01 kbot joined
23:09 chriswarren joined
23:10 chriswar_ joined
23:13 <asonge> tristan__: you know much about resource binaries?
23:14 snappy_ joined
23:15 luke_nukem joined
23:15 <tristan__> asonge: not really
23:16 <snappy_> Hey everyone. I'm still a beginner to elixir, and I'm wondering if there would be a better way to write this piece of code without if statements: https://gist.github.com/anonymous/163dcaf5d7b9d88c40eabdd604ac0c7d
23:17 <asonge> snappy_: there's a great library that uses an ecto type for comeonin, which is a great hashing library that supports a lot of great stuff
23:18 <tristan__> sounds pretty great ;)
23:18 <asonge> tristan__: so, i'm think about how paranoid it's possible to be about private keys in an erlang app...
23:19 <ivan> snappy_: added a comment with a case expression
23:19 chriswarren joined
23:20 <asonge> and i want to use the resource binary from a nif to control having an unencrypted private key (including zero'ing out the memory when free'd, and also auditing how long they stay in memory after going through :crypto)
23:20 <ivan> snappy_: and I did it wrong; reverse the order of the two cases :/
23:20 <ivan> (fixed)
23:22 <snappy_> ivan: huh, would `password` pattern match on nil?
23:22 <ivan> snappy_: yeah it goes through the cases in the order written
23:22 <snappy_> ivan: gotcha
23:23 <snappy_> ivan: that could be a pretty serious auth mistake :P
23:23 <ivan> snappy_: github recently paid out ~$35,000 total for similar bugs
23:23 <snappy_> ivan: yowza
23:24 <ivan> using the wrong variable. signing a thing with the wrong secret.
23:25 <ivan> just incredibly dumb stuff that no one would spot reading the code
23:26 <tristan__> asonge: ah, intereting. do you *need* all that or just want it? :). heroku is doing private key usage in erlang, but changed it after I left. doesn't seem to have storage anymore https://github.com/heroku/snit
23:26 <tristan__> tho a versoin with storage is in one of he branches
23:27 <snappy_> ivan: I was face-palming at the hypothetical thought of making a mistake like that in a toy app. I can't imagine what it would feel like to make that mistake on github itself.
23:27 <asonge> tristan__: so, right now, i'm writing a key management library in elixir to just manage signing keys generically. the goal is after that's nice and easy to use, is to add support for x.509 certificates to nerves firmware.
23:28 <snappy_> ivan: and it's the sort of mistake anyone could make, in earnest, I suppose.
23:28 chriswarren joined
23:28 <ivan> yep
23:28 <asonge> tristan__: i want to structure things so that you have to spend effort to not obey best practices, including having someone in the org set up a root CA that they store encrypted, and unmounted, that's only used to sign intermediate CA's that people in the org use.
23:28 <tristan__> ah. cool
23:29 <asonge> my threat model says if a developer has a hacked machine, that at least the root ca can be accessed somewhere to sign new CA's and issue CRLs
23:29 <asonge> managing an entire infra for that is just a PITA, and the problem shouldn't involve an incantation of hand-rolled bash scripts around openssl, imho.
23:30 rschmukler joined
23:31 <asonge> but like, don't keep storage of root ca's online and plugged in. put it away on a $6 USB stick in a drawer if you're just one person, stick it on a couple and maybe stick them in a safe deposit box if you're an organization
23:31 <asonge> you can recover from any hack if you just keep the root CA offline.
23:35 sdrew joined
23:36 PaReeOhNos joined
23:37 oetjenj joined
23:37 chriswarren joined
23:40 sdrew joined
23:41 sdrew joined
23:42 jbranchaud joined
23:42 sdrew joined
23:43 sdrew joined
23:43 sdrew joined
23:44 cschneid_ joined
23:45 sillyotter joined
23:46 chriswarren joined
23:50 proteusguy joined
23:53 luke_nukem joined
23:53 hahuang65 joined
23:54 hahuang65 joined
23:55 chriswarren joined
23:55 inspecteh_deck joined