<    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 _2_8 29 30 31
00:01 <Snowy> Radar: DANG! Thanks for your help. TIL.
00:01 <Radar> Snowy: It breaks with the Repo.get because it's only at that point that it actually runs the query. Up until that point you're only building the Ecto query... it doesn't hit the database until you call a `Repo` function
00:03 <Snowy> That's gonna be a tough habit for me to break coming from a background in languages that allow swapping single and double quotes interchangeably with almost no consequence (Ruby, JS, PHP...)
00:03 <Snowy> Thanks again.
00:03 josevalim_ joined
00:05 hipertracker joined
00:08 io_bora joined
00:08 io_bora joined
00:09 haennar joined
00:10 jerme_ joined
00:10 MotherFlojo joined
00:11 montanonic joined
00:27 jhack joined
00:29 bvcosta joined
00:35 Scramblejams joined
00:39 systemfault joined
00:43 rschmukler joined
01:09 idahogray joined
01:13 rschmukler joined
01:16 PaReeOhNos joined
01:25 harfangk joined
01:26 rschmukler joined
01:33 rschmukler joined
01:34 jeffweiss joined
01:35 rschmukler joined
01:38 jschneck joined
01:45 r00tl3ss joined
01:48 rschmukler joined
01:51 Cohedrin_ joined
01:55 <alex88> hello everyone, any ecto devs here?
01:59 cdg_ joined
01:59 travis-ci joined
01:59 <travis-ci> elixir-lang/elixir#13678 (master - 3b6bdde : YurkoHoshko): The build passed.
01:59 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/7d1f0c95a284...3b6bdde527ce
01:59 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/206438108
01:59 travis-ci left
02:01 <* ivan> discovers :observer.start
02:04 craigl joined
02:09 <craiglyons`> What's the best way to do a bulk upsert for a list of changesets with Ecto? insert_all would do the trick if I could use changesets, which it seems I can't. Multi in a transaction seems like it may work, but also seems like I'm overcomplicating things.
02:13 allanmac_ joined
02:29 s` joined
02:32 wong2 joined
02:33 icecreamcohen joined
02:36 robinsjdotcom joined
02:39 chriswarren joined
02:41 tomterl joined
02:45 PaReeOhNos joined
02:48 marcdel joined
02:51 Sgeo_ joined
02:53 jerel joined
03:11 refriedchicken joined
03:24 justicefries joined
03:28 potatosalad joined
03:33 proteus-guy joined
03:34 sfbw joined
03:35 craiglyo` joined
03:36 elixir-lang386 joined
03:39 jerme_ left
03:41 raycoll joined
03:43 icecreamcohen joined
03:44 sfbw joined
04:00 gvaughn joined
04:10 wtetzner joined
04:11 karmajunkie joined
04:15 potatosalad joined
04:15 PaReeOhNos joined
04:29 craigp_ joined
04:50 gvaughn joined
04:53 zabirauf joined
04:53 zabirauf joined
05:00 rschmukler joined
05:02 nighty joined
05:14 rschmukler joined
05:19 dmilith joined
05:22 racycle_ joined
05:23 jeffweiss joined
05:27 systemfault joined
05:27 jdvs joined
05:28 pranz joined
05:28 marcdel joined
05:29 r00tl3ss joined
05:47 PaReeOhNos joined
05:51 rschmukler joined
05:53 refriedchicken joined
05:57 robinsjdotcom joined
06:03 hbraun joined
06:08 dec0n joined
06:13 potatosalad joined
06:16 rschmukler joined
06:17 icanhazbroccoli joined
06:17 <r00tl3ss> Halo!
06:19 <r00tl3ss> Is Master Jose around? Or anyone from Plataformatec? I saw the slides about working with Plataformatec...We're a small company in Malaysia, trying to build a CMMS (Computerised Maintenance Management Software). Currently I'm building it in Phoenix/Elixir/Postgres (I have a separate version with Neo4j, but that still requires a lot of work, so we're opting to build a fast initial version with Phoenix)
06:20 <r00tl3ss> Thing is, we don't exactly have cash, but are in dire need of expert help to expediate the development process, as it were
06:20 <r00tl3ss> How to?
06:20 <r00tl3ss> Flexcility.com
06:21 alexarnon joined
06:24 markholmes joined
06:38 voltone joined
06:43 danguita joined
06:43 zabirauf joined
06:44 zabirauf_ joined
06:44 haennar joined
06:54 sfbw joined
06:56 tomaz_b joined
06:58 zabirauf joined
07:01 <Nicd-> tried contacting them via their website?
07:11 Tica2 joined
07:16 PaReeOhNos joined
07:25 nanohest joined
07:26 Ghouli joined
07:27 hipertracker joined
07:27 icanhazbroccoli joined
07:30 haennar joined
07:42 rschmukler joined
07:42 refriedchicken joined
07:45 simonoram joined
07:45 jpterry joined
07:45 acscherp joined
07:55 sfbw joined
07:57 koneko joined
07:59 PaReeOhNos joined
07:59 koneko_ joined
08:03 tuacker joined
08:11 nd__ joined
08:12 mattyw joined
08:13 ZippoWeb joined
08:14 michael_mbp joined
08:15 Phoop joined
08:22 steffkes joined
08:22 steffkes joined
08:22 mark_66 joined
08:26 josevalim joined
08:33 <whodidthis> so does the embedded_schema thingie from lonestar chrisnote mean i have a regular schema that has all the database fields mapped, and then situational embedded_schemas with all currently necessary fields and virtual fields
08:33 tuacker joined
08:38 Guest67_ joined
08:53 thiagoalessio joined
08:59 flaviodesousa joined
08:59 zabirauf joined
09:00 willyk joined
09:00 flaviodesousa joined
09:01 <micmus> josevalim: did the plug vulns got CVE?
09:01 apotry joined
09:01 <josevalim> micmus: i am waiting for confirmation from the folks who reported it
09:01 <josevalim> but i am assuming it has not
09:01 <smeevil> o/
09:02 <micmus> ok
09:02 <josevalim> whodidthis: http://blog.plataformatec.com.br/2016/05/ectos-insert_all-and-schemaless-queries/?utm_source=elixir-status&utm_medium=social&utm_campaign=blog-post-promotion
09:02 <josevalim> whodidthis: the what's new in ecto 2.0 book contains further examples
09:03 simonoram joined
09:04 <voltone> josevalim: would you have a minute to review my analysis of the Plug issues?
09:04 <voltone> I sent a link to elixir-security this morning
09:07 <Phoop> In Ruby we have bundler audit, is there something like that for Elixir already?
09:07 <Phoop> Or maybe something in hex.pm itself
09:09 <ericmj> Phoop: hex will warn you if you use a package that has been retired due to security issues
09:09 <ericmj> but i dont think that’s the same thing as bundler audit
09:09 <Phoop> Oh! That is nice already :)
09:10 <ericmj> for example plug versions weren’t retired yesterday because the security issues were not critical
09:10 <josevalim> voltone: on it
09:10 <smeevil> there is https://beta.hexfaktor.org/ as well but that only keeps track of versions
09:11 MotherFlojo joined
09:11 vmoravec joined
09:12 <voltone> josevalim: thanks!
09:13 <ericmj> Iirc hexfaktor wanted to incorporate security checks
09:13 <ericmj> it is open source so you can contribute and start a discussion https://github.com/hexfaktor/hex_faktor_web
09:14 <micmus> I think a separate tool that could be incorporated by hex factor would be the best path, makes it composable
09:19 koneko joined
09:20 <r00tl3ss> Master Jose Valim! I sent an enquiry to Plataformatec via email
09:21 <r00tl3ss> I imagine you guys must cost a lot of dollars, but perhaps getting a foothold here in Asia might be a good idea and we can work something out ...or something...
09:21 <r00tl3ss> via the website, I meant
09:21 <r00tl3ss> I got an email from Plataformatec
09:22 robinsjdotcom joined
09:23 imack joined
09:27 <josevalim> ericmj: maybe i should use the hex notice API? is it available?
09:28 travis-ci joined
09:28 <travis-ci> elixir-lang/elixir#13680 (master - 6bb1037 : Gal Tsubery): The build passed.
09:28 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/3b6bdde527ce...6bb1037ec4b5
09:28 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/206531473
09:28 travis-ci left
09:28 <ericmj> josevalim: it is available but I don’t think you should in this case
09:30 rschmukler joined
09:35 DTZUZU joined
09:36 foli joined
09:42 haennar joined
10:01 lexmag joined
10:02 hbraun joined
10:08 MaSven joined
10:13 fckfreenode joined
10:14 Guest67_ joined
10:25 stephen_m joined
10:25 nighty joined
10:38 <fredsir> How do I go about running multiple versions of Phoenix on the same machine and preferably be able to switch back and forth. Here I'm thinking Phoenix 1.2 and 1.3?
10:38 <gazler> fredsir: The version of phoenix installed as an archive is only used for mix phoenix.new
10:39 <gazler> Once you have an application, it uses the version of phoenix specified in mix.exs
10:39 <gazler> So, it is only really an issue if you want to generate new projects with both 1.2 and 1.3
10:39 <fredsir> gazler, alright, so I could upgrade my local installation to 1.3 and reap the benefits of that, while continuing having 1.2 also working because they say 1.2 in mix.exs?
10:40 <gazler> fredsir: Exactly.
10:40 <fredsir> 1.2 projects working*
10:40 <fredsir> alright, thanks
10:40 <gazler> That said, 1.3 doesn't have any breaking changes.
10:40 <gazler> So if you have an existing 1.2 project, updating that project to 1.3 should still work.
10:41 <fredsir> I know, just watching the keynote by chris mccord from lonestarelixir right now and reading the links you sent me about 1.3 some days ago, but since this is a whole new project that will use 1.3, I think the right approach is the phoenix.new with 1.3 instead of 1.2 and then change things
10:41 <gazler> fredsir: Don't forget that the new generators are `mix phx.*` instead of `mix phoenix.*`
10:41 <gazler> That always trips me up!
10:41 <fredsir> right, thanks
10:44 <nox> gazler: Doesn't depending on Phoenix 1.2 mean Phoenix 1.3 can be used too?
10:44 <nox> Or mix doesn't allow such an update without an explicit bump in the manifest?
10:45 rorymckinley joined
10:45 <nox> "11:41 <gazler> fredsir: Don't forget that the new generators are `mix phx.*` instead of `mix phoenix.*`" What?
10:45 <gazler> nox: You mean like in semantic versioning? You need to explicitly update for that.
10:45 <nox> That's a breaking change.
10:45 <nox> Mix doesn't do semver? I'm quite disappointed.
10:45 <gazler> It's actually not, the mix phoenix.* stuff still works.
10:45 <nox> gazler: Ok.
10:46 <gazler> nox: It will, but you need to call mix deps.update or mix deps.unlock
10:46 <nox> gazler: Yeah that's fine.
10:47 <nox> gazler: If you don't have a Cargo.lock file in Rust land, cargo will fetch the highest semver-compatible version it can,
10:47 <nox> otherwise it will use the one in Cargo.lock until you explicitly run cargo update.
10:47 <gazler> Yeah, mix will do the same.
10:47 <nox> And if a crate author does a semver-breaking change,
10:47 <r00tl3ss> fredsir: I use this thing called kiex that manages my elixir versions, and I think in each kiex you can install specific phoenix versions
10:47 <nox> an angry nox will file an issue on their repos.
10:47 <r00tl3ss> does that sound like something reasonable? kiex
10:47 <gazler> nox: Is there anything to detect a breaking change?
10:48 <nox> gazler: My spider sense.
10:48 <gazler> That's one of the things I like from Elm.
10:48 <nox> gazler: Some people are working on that.
10:48 <nox> As a GSoC project IIRC.
10:48 <nox> gazler: Not sure I would trust it.
10:48 <nox> I keep finding ways to do semver-breaking changes.
10:49 <gazler> nox: It is probably more scalable than you trying to download all the packages (crates?) to try and break them.
10:49 <nox> gazler: No need,
10:49 <nox> gazler: I care only about the >300 crates used in Servo.
10:57 rschmukler joined
10:58 gmcabrita joined
11:05 <fredsir> r00tl3ss: thank you!
11:06 <r00tl3ss> fredsir: no worries! Hope that helped
11:06 <fredsir> Yeah Will try it later :)
11:08 simonoram joined
11:12 <OliverMT> we currently spend about 5 minutes of circle ci time to prep box to run our specific erlang and elixir versions, before we build javasccript and elixir stuff.. is that in line with the experience of other people in here?
11:15 travis-ci joined
11:15 <travis-ci> elixir-lang/elixir#13682 (master - c1ca6fb : Oskar Köök): The build passed.
11:15 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/6bb1037ec4b5...c1ca6fb8990d
11:15 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/206564074
11:15 travis-ci left
11:16 rorymckinley joined
11:18 inoas joined
11:18 robinsjdotcom joined
11:23 cristianR_ joined
11:24 <micmus> OliverMT: definitely not. We use circle too, and the whole build (compile for tests, run tests, compile for prod, build release & deploy) takes ~6 minutes
11:34 pcre joined
11:37 allanmacgregor joined
11:38 <OliverMT> you use asdf dont you+
11:38 <OliverMT> ?
11:38 <OliverMT> I was going to try circle 2.0 where you can make your own snapshots
11:38 <micmus> yup, we use asdf
11:39 <OliverMT> asdf can be cached to a greater degree than our use of erlang solution debs I guess
11:40 <micmus> you can cashe ~/.asdf - whole erlang & elixir are cached
11:41 <micmus> we tried debs too, but switched away exactly because it was slow
11:46 <nox> micmus: Slow for what?
11:46 <micmus> nox: to install from repo each time on CI
11:47 <nox> Oh.
11:50 <OliverMT> the slowness is mostly to purge the old erlangs installed because of rabbitmq service
11:50 <OliverMT> the actual update +install takes just a min or so
11:51 <OliverMT> then again, we dont pay by the minute on circle, so I dont *really* care if its 10 or 7 min to do a deploy
11:52 <micmus> It's just annoying when it's slow :P
11:52 bvcosta joined
11:54 acetoxy joined
11:56 koneko joined
11:56 juanjoc joined
11:58 voltone_ joined
11:58 craiglyo` joined
11:58 rhnonose joined
11:59 <craiglyo`> What's the best way to bulk upsert a list of changsets in ecto 2?
12:00 <craiglyo`> Repo.insert_all would work due to on_conflict, except it takes entities instead of changesets. Maybe multi insert_or_update? (I realize this isn't released yet)
12:00 bvcosta joined
12:00 <micmus> there's no bulk changeset API since it would be extremely tricky to reconcile with features like associations
12:01 <beatpanic[m]> hi, how are you communicating from elixir to python/ruby? I saw erlport, however it seems unmaintained. Should I try to play with erlport or there is another approach that you are using? TIA
12:01 mattyw joined
12:03 <craiglyo`> micmus: fair enough. I still want to run things through my changeset validations though, so maybe I'm best off modifying the changesets & using insert_all.
12:24 Uniaika joined
12:29 haennar joined
12:36 voltone joined
12:56 acscherp joined
12:57 Guedes joined
12:57 Guedes joined
12:57 koneko joined
12:57 sfbw joined
13:02 gvaughn joined
13:09 marr joined
13:10 robinsjdotcom joined
13:17 meh` joined
13:21 chrismccord joined
13:28 <barttenbrinke> OliverMT: You should care, as it means your dev has to context switch if something goes wrong.
13:30 wong2 joined
13:30 alex88 joined
13:31 <barttenbrinke> OliverMT: But 10 minutes is pretty quick compared to what I have seen at most companies :)
13:32 <* Ankhers> has been at a company where it took 2 months to deploy to production
13:34 potatosalad joined
13:36 harfangk joined
13:38 <nox> Context what?
13:39 <nox> The influence of context switching is way overrated IMO.
13:40 <Ankhers> I think context of developing something -> start deploy procedure -> continue developing -> find something wrong in 10-15 minutes with production -> go debug code -> put in a fix -> repeat
13:40 <nox> If you care about the sanity of your devs, why did they have to push in production to find out there was something wrong?
13:42 <barttenbrinke> nox: The test suite took almost as long.
13:42 <barttenbrinke> So the feedback cycle for devs is slow.
13:42 <nox> What about the test suite?
13:42 <nox> 10 minutes is slow?
13:43 <nox> It's only slow for an untested web app.
13:43 <barttenbrinke> For CI? Yes.
13:43 <nox> How is 10 minutes slow for CI? Do you only have a hello world test to run or what?
13:43 <barttenbrinke> IMHO.
13:43 <Ankhers> It depends on how big your application is.
13:45 <nox> Ankhers: I would say that if you have less than 10 minutes of testing, your app is trivial and the context switch doesn't matter at all.
13:47 <Ankhers> nox: While I generally agree that 10 minutes is not long at all. I think it depends on why the tests take 10 minutes. At the place I mentioned that took 2 months to deploy to prod, we had tests that called external services. Our tests took about 10ish minutes to run in parallel because of how many external service calls we had.
13:47 <barttenbrinke> Ankhers: For big applications I usually set up a multi-level test suite, where all quick tests run in the first step and the more complex ones run later, so that the feedback cycle for devs is kept as short as possible.
13:49 <nox> A Rust PR takes ~ 2.5 hours to land, a Servo PR takes 1 hour.
13:49 <nox> barttenbrinke: Yeah do tidy stuff etc ASAP and run all the tests only when trying to land a PR.
13:49 <nox> we do*
13:50 <Ankhers> And those are rather large projects. With that said, I'm sure the Rust and Servo projects don't have many (if any at all) tests that call external services. I'
13:50 <barttenbrinke> nox: Shopify ships to production within 10 minutes
13:50 <Ankhers> I'm just saying, if a test suite takes time because it needs to take time, that is fine. If the test suite is doing something stupid that is making it take extra time, clean that up because there is no reason for it.
13:51 <barttenbrinke> Ankhers: It also depends on the amount of devs working on it and the delivery requirements of the product.
13:51 <Ankhers> barttenbrinke: Is that 10 minutes from pressing deploy, or is that 10 minutes from code checkin?
13:51 <barttenbrinke> Faster is always better :)
13:52 <barttenbrinke> Ankhers: from code checkin
13:52 <nox> https://status.shopify.com :)
13:53 <barttenbrinke> Ankhers: Old blog post about this :) : https://engineering.shopify.com/227358148-automatic-deployment-at-shopify
13:54 yt____ joined
13:54 <barttenbrinke> If you're smaller than shopify, you should be able to do it in under 10 minutes :)
13:56 cfreeze joined
13:57 <cfreeze> I'm observing a situation where put_assoc/3 is returning a boolean. Is this expected behavior?
13:57 <nox> barttenbrinke: "Faster is always better", at my previous job we just didn't have tests. ( ._.)
13:58 <barttenbrinke> nox: In my first job, we just live edited the code on the server!
13:58 <barttenbrinke> Instant delivery to production!
13:59 mattyw joined
14:02 <nox> barttenbrinke: Too slow, still have to save the file.
14:03 <cfreeze> Ah, nevermind
14:04 willyk joined
14:07 chrismcc_ joined
14:08 maxbeizer joined
14:08 cristianR_ joined
14:08 chrismccord joined
14:11 gvaughn joined
14:20 smt_ joined
14:21 bvcosta joined
14:22 rschmukler joined
14:32 rschmukler joined
14:33 diaes256 joined
14:34 dimitarvp joined
14:34 <diaes256> Hi, i'm a magic unicorn that wants when i run 'mix test' uses my 'config/dev.exs' and not the default 'config/test.exs'. What kind of rainbows should i use?
14:36 <dimitarvp> diaes256: probably `MIX_ENV=dev mix test` ?
14:38 <PaReeOhNos> diaes256: alternative, you could include the dev config file into the test one if you don't mind it using the test one just for that
14:39 <diaes256> ohoo thanks! solved (:
14:39 craigger joined
14:40 <ciawal> I'd definitely opt for the second one
14:44 rschmukler joined
14:47 <diaes256> PaReeOhNos, ciawal : yehee.... i created a test_and_dev.exs with the common configuration that later i 'imported_config' from the respectives configs... to be honest... i feel smart xd
14:49 jerel joined
14:50 allanmacgregor joined
14:52 spinningtopsofdo joined
14:55 hbraun joined
14:56 MaSven joined
15:00 <ciawal> https://www.theregister.co.uk/2017/03/01/aws_s3_outage/
15:00 <ciawal> In fact, the five-hour breakdown was so bad, Amazon couldn't even update its own AWS status dashboard: its red warning icons were stranded, hosted on the broken-down side of the cloud.
15:00 <ciawal> heh
15:01 Guest67_ joined
15:03 nanohest joined
15:05 <tuacker> I have an endpoint that accepts urlencoded data (and it is working) .. but I'm a bit stumped how I'd send/setup conn to send urlencoded data in a test to my controller. Anyone got an example?
15:08 rhnonose joined
15:11 <ciawal> not quite sure what you mean
15:11 <ciawal> are you asking how to manually url encode stuff?
15:16 rschmukler joined
15:19 flopsec joined
15:20 rschmukler joined
15:23 r00tl3ss_ joined
15:24 <tuacker> ciwal: nevermind thanks … I've been going at this all wrong lol need to take a break
15:26 chriswarren joined
15:29 cdg joined
15:30 acscherp joined
15:31 wong2 joined
15:31 cdg joined
15:34 racycle_ joined
15:36 maxbeizer joined
15:36 hbraun_ joined
15:40 chrismccord joined
15:46 chrismcc_ joined
15:53 refriedchicken joined
15:54 chrismccord joined
15:55 icecreamcohen joined
15:55 chrismccord joined
15:55 acscherp joined
15:58 chriswarren joined
15:59 jparise joined
16:02 cdg joined
16:03 shadowjack joined
16:06 proteusguy joined
16:10 jerel joined
16:11 nanohest joined
16:12 rschmukler joined
16:17 <alisdair> can ecto do `UNION`?
16:17 <alisdair> it appears not, but maybe via fragments?
16:20 potatosalad joined
16:23 chrismcc_ joined
16:26 <benwilson512> alisdair: https://github.com/elixir-ecto/ecto/issues/1549
16:27 <benwilson512> may want to ask there what the status is
16:27 <alisdair> oh thanks
16:27 <alisdair> i looked for an issue but missed that one
16:28 chrismccord joined
16:32 <gazler> Is it me, or is GitHub's blue way brighter all of a sudden?
16:33 _Mzungu_ joined
16:34 Guedes joined
16:35 laut joined
16:36 tuacker joined
16:36 <PaReeOhNos> gazler: mm yeah you're right, does seem it
16:36 <ivan> gazler: yep
16:36 <gazler> Yeah, it is, I verified by checking an old tab, then looking at people go crazy on Twitter.
16:36 <ivan> designers designing
16:36 triangleman joined
16:37 <gazler> I've only just got used to the black header
16:37 <tuacker> I remember them saying when the black banner came that a few UI changes would be incoming
16:37 jparise joined
16:38 <ivan> I'm already applying a huge stylesheet to github
16:39 <triangleman> I started a small elixir release in a docker container and noticed that the beam process is using about 75M of memory... is that typical?
16:40 <tuacker> https://twitter.com/mdo/status/830138373230653440 <- "First of many iterative design changes coming."
16:41 <gazler> tuacker: They should just do it all at once. Then everyone would have their one rant about it and move on.
16:42 robinsjdotcom joined
16:42 <benwilson512> triangleman: what is your beam process doing?
16:43 <benwilson512> 75 mb isn't particularly alarming
16:43 refriedchicken joined
16:44 <triangleman> it's running a cowboy server with just a basic plug router, and a bamboo emailer process
16:44 <dimitarvp> triangleman: Maybe too much binaries (strings)?
16:44 <dimitarvp> That's why I kind of always lean to libraries that make heavy use of iolists
16:44 <benwilson512> triangleman: traffic level?
16:45 <benwilson512> triangleman: database access?
16:45 <triangleman> none at the moment...well, just me :)
16:45 <triangleman> no database
16:46 <triangleman> just listening for an http post and then sending an email
16:46 <tuacker> gazler: but this way you get a thousand tweets + hackernews post with every change, free marketing :D
16:50 <gazler> tuacker: Are you some sort of Bond villian?!
16:52 davidw joined
16:52 <tuacker> gazler: yup
16:55 rschmukler joined
16:56 <benoitc> hrm
16:56 <benoitc> ** (Mix) The task "hex.retire" could not be found
16:57 <benoitc> isn't it in latest 1.4 ?
16:57 <gazler> benoitc: It is provided by hex. You'll need to run `mix local.hex` first.
16:57 <benoitc> ah damn
16:57 <benoitc> thanks
17:00 amclain joined
17:01 racycle_ joined
17:03 wtetzner joined
17:05 jdvs joined
17:05 wsieroci joined
17:05 rschmukler joined
17:06 <gazler> benoitc: Was there something wrong with 1.6.6?
17:06 <benoitc> yes
17:06 <benoitc> a breaking change
17:07 <benoitc> that was breaking everyone
17:07 <benoitc> :)
17:07 <benoitc> i am pushing 1.7
17:07 Cohedrin joined
17:11 markholmes joined
17:12 <benoitc> https://hex.pm/packages/hackney
17:13 <benwilson512> benoitc: how does 1.7 handle headers?
17:15 josevalim joined
17:15 poptarts joined
17:15 rschmukler joined
17:16 <benoitc> benwilson512: how do you mean ?
17:16 <benoitc> 1.7 is fixing the current issue and many others
17:16 <benwilson512> ok
17:16 <benoitc> in headers handling
17:16 <benwilson512> so if I pass in a "host" header it won't add a duplicate "Host" header?
17:16 <benoitc> https://github.com/benoitc/hackney/commit/d6dc47912cfcdb6c17f364ddb126e077a969b43f
17:17 <benwilson512> cool
17:17 <benoitc> benwilson512: yes: https://github.com/benoitc/hackney/commit/3397b7657cc35fd5e0a23e2cd91680ee2b38de72
17:17 <benwilson512> thanks
17:17 <benwilson512> is that case sensitive?
17:17 <benoitc> no
17:18 <benwilson512> perfect
17:18 <poptarts> Hi all, I'm new to elixir and was wondering the following: I just saw the security announcement about Plug. Why is it that when I `mix deps.outdated` in my Phoenix project, everything is current? Does Phoenix hard code its deps?
17:18 <benoitc> everything is happening there now : https://github.com/benoitc/hackney/blob/master/src/hackney_headers_new.erl
17:18 <benoitc> once i will go to 2.0, headers returned will be more complex than a list
17:19 <benwilson512> poptarts: that only list deps you have in your mix.exs file
17:19 <benwilson512> poptarts: if you just mix deps.update plug it'll bump it
17:23 jeffweiss joined
17:24 <poptarts> benwilson512: thanks. that's kinda confusing, no?
17:26 <poptarts> benwilson512: given that phoenix is composed of various deps, if a dep is bumped wouldn't it be logical for `mix hex.outdated` to show that?
17:29 <micmus> poptarts: I think hex.outdated only shows direct dependencies
17:29 <micmus> hex.outdated --all will have everything
17:29 <micmus> including transitive deps
17:31 <alisdair> i think i am confused about ecto preloads
17:31 <poptarts> thanks :) didn't realize there was an --all flag
17:31 <alisdair> i am using schemaless queries, but i have a table that has fk constraints on another table's id
17:32 <alisdair> are preloads the way i'm supposed to get records with the child records inlined?
17:32 <alisdair> it seems like it doesn't work with schemaless queries
17:35 wsieroci joined
17:36 rhnonose joined
17:38 <micmus> alisdair: ecto doesn't retrieve any type data from the database - the code is considered authoritative source.
17:38 <micmus> preloads need associations to have the data about foreign keys
17:39 <micmus> We probably can make preloads work for schemaless in case of joins, but probably not without them
17:39 <micmus> we don't know what's the primary key, what are the foreign keys, etc
17:40 <alisdair> couldn't you do `preload(post.id, comments.post)` or similar?
17:40 <alisdair> where comments.post is a fk pointing to post.id?
17:46 hahuang65 joined
17:46 <vans163> damn.. is there a way to get logger to print to the process its called from, so group_leader workers?
17:46 <vans163> works*
17:46 <vans163> io redirection via group leader
17:47 <vans163> or maybe a way to set the output file of Logger dynamically on a per process basis?
17:47 montanonic joined
17:52 diaes256 joined
18:02 <vans163> think i need to do a replace "(Logger\..*) ", "IO.puts "
18:03 karmajunkie joined
18:05 gvaughn joined
18:05 steffkes_ joined
18:07 PaReeOhN_ joined
18:10 <ivan> woah :beam_lib.strip is making escripts ~36% the original size
18:12 Cohedrin joined
18:13 _Mzungu_ joined
18:17 meh` joined
18:19 <bcardarella> does Elixir 1.4 warn about module-level macros that don't have `( )`s?
18:23 montanonic joined
18:25 <chrismccord> bcardarella yes
18:25 <bcardarella> so you have to do like `import(Foo.Bar)` now?
18:25 <chrismccord> bcardarella : if they are wrapped by a parent macro, you could rewrite. null airty calls and avoid a warningm, but doing `foo_macro` inside. a module body will warn
18:25 <chrismccord> bcardarella : only null arity calls w/out parens warn
18:26 dch_ joined
18:26 <chrismccord> so `import Foo` remains valid
18:26 <bcardarella> ah ok
18:26 <bcardarella> that works nicely actually
18:27 <chrismccord> bcardarella : so things like ecto's `timestamps()` macro require parens now
18:27 <bcardarella> yeah, gets rid of the confusion if its a variable or no
18:27 <chrismccord> technically they could rewrite it since it's wrapped by a `schema` macro, but it's not worth the dance
18:27 <chrismccord> yup
18:27 <vans163> damn.. all the errors from the crash of a process are going to Logger by default. is there a way to make those print to the process that produced them?
18:27 <vans163> pretty much the same way erlang handles it
18:30 wsieroci joined
18:30 acscherp joined
18:31 steffkes joined
18:31 steffkes joined
18:32 ZippoWeb joined
18:37 <OliverMT> benwilson512: ping
18:41 <benwilson512> OliverMT: pong
18:42 jerel joined
18:42 wsieroci joined
18:42 <OliverMT> your s3 stuff.. is there anything wrong with using upload and download even for smaller objects?
18:42 <OliverMT> I like keeping the api so clean
18:43 <benwilson512> I don't think the upload API for example checks the size of the outgoing payload
18:43 <benwilson512> multipart uploads have to be at least 5mb
18:43 <OliverMT> ah of course
18:43 <OliverMT> or do they? I thought it only checked that the first N-1 chunks were at least 5mb
18:43 <OliverMT> it being aws cli
18:44 <OliverMT> I wonder if aws cli is doing something smart behind the scenes
18:44 <benwilson512> quite probably
18:44 <benwilson512> feel free to give it a shot, it should be pretty rapidly apparent if there's issues
18:44 <benwilson512> on the one hand I would be ok with making the API more generic in that sense
18:45 <benwilson512> but
18:45 cemilowski joined
18:45 <OliverMT> ideally .upload should understand what it gets and use multipart for stuff over 5mb and put_object for the rest
18:45 <benwilson512> the upload API is pretty generic, so placing the logic to do something like check file size or binary size
18:45 <benwilson512> can be tricky
18:45 <OliverMT> but with your new style using structs to execute, that is kinda hard to do
18:46 <OliverMT> as I dont quite know where I would place that
18:46 <benwilson512> it isn't about that
18:46 <benwilson512> it's about the fact that it takes a stream
18:46 <benwilson512> of chunks
18:46 <benwilson512> there may not be a file at all
18:46 icanhazbroccoli joined
18:46 <benwilson512> and it can't know the full file size until it's consumed the stream
18:46 <OliverMT> cant you just consume until you either reach 5mb or the stream ends?
18:47 <benwilson512> possibly. I'd need to reviewthe API, haven't looked at it in months
18:47 <benwilson512> if you want to take a shot at the PR go for it
18:47 <OliverMT> would you
18:47 <OliverMT> ok you answered before I was done asking
18:47 <OliverMT> :D
18:47 <OliverMT> I'll see, new baby last friday and working 12 hour days for crunch time delivery on friday
18:47 <OliverMT> will make myself a mental note and see if I can do it in march
18:47 <benwilson512> ah! congratulations!
18:47 <OliverMT> thanks
18:47 <benwilson512> I need to allocate some time to the ExAws PR backlog
18:47 <OliverMT> :)
18:48 <OliverMT> once I am done familiarizing with internals I can probably chip in there
18:48 <OliverMT> if you want help
18:57 vmoravec joined
19:00 r00tl3ss joined
19:01 cdg_ joined
19:03 MaSven joined
19:04 jparise joined
19:06 allanmac_ joined
19:06 montanonic joined
19:10 simonoram joined
19:10 <benwilson512> that would be greatly appreciated actually
19:11 samdvr joined
19:14 <OliverMT> hmm, did 1.4 change the compiler usage tracking?
19:14 <OliverMT> I have name as a param, and use it in "#{name} .. other stuff"
19:15 <OliverMT> and compiler says name is unused
19:15 sfbw joined
19:15 <OliverMT> lol, I had foo.name
19:16 Guedes joined
19:16 Guedes joined
19:20 <vans163> Is there a way to disable the Logger and have to go to the default erlang error handler?
19:21 <vans163> *and have errors go to the default erlang error_handler?
19:24 rschmukler joined
19:29 guacamol1 joined
19:31 maxbeizer joined
19:31 refriedchicken joined
19:32 Ilyes512 joined
19:33 Ilyes512 joined
19:34 Ilyes512 joined
19:35 Guest19319 joined
19:38 Ven joined
19:42 Or1on joined
19:45 montanonic joined
19:45 inoas joined
19:49 pcre joined
19:49 kiltzman joined
19:50 kiltzman joined
19:51 kiltzman joined
19:51 kiltzman joined
19:52 kiltzman joined
19:52 kiltzman joined
19:55 kubuntu_ joined
19:55 kubuntu_ joined
19:56 kubuntu_ joined
19:56 kubuntu_ joined
19:56 kubuntu_ joined
19:57 kubuntu_ joined
20:00 Guedes joined
20:02 allanmacgregor joined
20:02 cpgo joined
20:02 chriswarren joined
20:03 hbraun joined
20:07 squall joined
20:07 montanonic joined
20:10 inoas joined
20:15 lizzin_ joined
20:19 asd_ joined
20:23 icanhazbroccoli joined
20:29 <OliverMT> benwilson512: do you have a suggestion on where to debug when I am getting a 400 bad request with An error occurred when parsing the HTTP request
20:30 <OliverMT> I know I got the right bucket, I know I have a binary of a file content and I know I have a name that is not taken on the target
20:35 <OliverMT> debug_requests to the rescue
20:35 nanohest joined
20:35 jamenmarz joined
20:38 jrvl joined
20:39 rschmukler joined
20:44 mozzarella joined
20:44 montanonic joined
20:46 wsieroci joined
20:48 phansch joined
20:48 b14d3_ joined
20:48 gamache_ joined
20:48 freedrul1 joined
20:49 smt joined
20:49 <OliverMT> anyone got a clue? the debug data says right url for both region and bucket and the other headers look correct as well
20:50 samdvr joined
20:52 nonninz_ joined
20:53 vili_ joined
20:53 hipertracker joined
20:53 robinsjdotcom joined
20:57 thiagoalessio joined
20:58 machuga joined
21:00 cdg joined
21:02 chriswarren joined
21:05 haennar joined
21:14 wsieroci joined
21:18 karmajunkie joined
21:20 <benwilson512> OliverMT: what is the body of the response?
21:20 <benwilson512> oh
21:20 <benwilson512> that's it?
21:20 <benwilson512> what version of hackney/
21:22 hakunin joined
21:26 robertc joined
21:28 wsieroci joined
21:30 jparise joined
21:32 robinsjdotcom joined
21:37 io_bora joined
21:39 wtetzner joined
21:39 io_bora joined
21:45 Gringill joined
21:47 ipengineer joined
21:48 meze left
21:48 hahuang65 joined
21:49 montanonic joined
21:50 lucho joined
21:51 PaReeOhNos joined
21:51 PaReeOhNos joined
21:52 PaReeOhNos joined
21:53 PaReeOhNos joined
21:54 PaReeOhNos joined
21:54 lexmag joined
21:55 pbrooko joined
21:55 PaReeOhNos joined
21:55 PaReeOhNos joined
21:56 <Gringill> ping @bitwalker
21:56 <bitwalker> pong
21:56 PaReeOhNos joined
21:57 PaReeOhNos joined
21:57 <Gringill> Hey, seems like in distillery 1.2.0 the --profile option is broke. I believe the move to using strict here https://github.com/bitwalker/distillery/blob/1.2.0/lib/distillery/tasks/release.ex#L151 is the cause.
21:57 <Gringill> Since profile is not in the possible options, and strict is used, an error is raised.
21:58 io_bora joined
21:58 <Gringill> Or am I crazy :)?
21:58 <bitwalker> Gringill: I'll get that fixed ASAP, mind opening an issue here: https://github.com/bitwalker/issues?
21:58 <Gringill> Sure thing!
21:58 PaReeOhNos joined
21:58 <Gringill> bitwalker issues, heh
21:59 <bitwalker> amazing
21:59 <bitwalker> https://github.com/bitwalker/distillery/issues ;)
22:00 <tristan__> have any issues with bitwalker, open them on bitwalker's issue page
22:01 <bitwalker> talk about a dystopian future - a place where everyone has an issues tracker for their life
22:01 <Gringill> I was going to say, very impressive no issues were found
22:05 racycle_ joined
22:07 io_bora joined
22:08 bvcosta joined
22:12 cemilowski1 joined
22:12 acscherp joined
22:19 nanohest joined
22:25 montanonic joined
22:28 bvcosta joined
22:33 chrismccord joined
22:34 _Mzungu_ joined
22:34 markholmes joined
22:39 willyk joined
22:43 sumi joined
22:52 nd__ joined
22:55 rschmukler joined
22:56 ekmartin joined
22:57 willyk joined
22:57 spinningtopsofdo left
23:00 chriswarren joined
23:01 chriswarren joined
23:01 PaReeOhNos joined
23:02 chriswarren joined
23:02 chriswarren joined
23:03 chriswarren joined
23:03 <Quintasan> Hi, my application puts user-uploaded files under uploads/images/"#{UUID.uuid4()}". I'm trying to acces the files by http://localhost:4000/uploads/images/file_name but I'm getting NoRouteFound. I added plug Plug.Static, at: "/uploads", from: Path.expand("./uploads"), gzip: false to lib/myapp/endpoint.ex
23:04 <Quintasan> What am I doing wrong?
23:04 <benwilson512> plug static is for static files. files which are dynamically added via uploads are not static
23:04 chriswarren joined
23:05 chriswarren joined
23:05 <benwilson512> if you want to expose downloaded files like that, forward to a plug at the desired path in your router
23:05 <benwilson512> and use send_file in the plug
23:05 rschmukler joined
23:05 <hansihe> need some advice on implementing streams, wrote a little bit about my usecase here https://gist.github.com/hansihe/605652b55cbf8a4fc776df5c326fa707
23:06 chriswarren joined
23:06 <Quintasan> benwilson512: I see, generally how would you make user-uploaded images available?
23:06 <benwilson512> Quintasan: me specifically? S3
23:07 <Quintasan> benwilson512: I'd rather not use S3 for local development
23:07 <benwilson512> put the files on s3, store the path in your database, and then link the users to s3 in the UI. lowers your bandwidth, nice and durable store
23:07 montanonic joined
23:07 <benwilson512> storing on the app servers is an issue the moment you want more than one
23:07 <benwilson512> and for any production app, you want at least 2
23:08 <Quintasan> I do get that but this is a side project I'm doing and using S3 when I'm still doing things locally is a little bit...
23:08 <benwilson512> sure!
23:08 <benwilson512> for local stuff that's fine
23:09 <benwilson512> you just asked what I do "generally"
23:09 <benwilson512> if for a side project I wanted to serve files from the server
23:09 <benwilson512> in my router I would do
23:09 <benwilson512> forward "/files", FilePlug
23:09 <benwilson512> and then have a tiny plug that grabbed the rest of the path, looked up a file, and went from there
23:10 <benwilson512> you do have to be very careful with that kind of thing though. a classic security hack is to pass in like
23:10 <Quintasan> I'm kind of curious why Plug.Stactic doesn't pick that up then
23:10 <benwilson512> /files/../../../../../home/ubuntu/.ssh/password
23:10 <benwilson512> or whatever
23:10 <benwilson512> Quintasan: it builds a static list at compile time, it is expressly not built for this purpose
23:11 <benwilson512> you may want to check hex to see if there are any pre-made solutions
23:11 <benwilson512> there likely are
23:12 <Quintasan> I'm surprised since I found https://smashingboxes.com/blog/image-upload-in-phoenix/
23:12 chriswarren joined
23:12 <Quintasan> Which says it would work lol
23:12 <benwilson512> that is indeed unfortunate
23:13 <benwilson512> I don't believe it ever worked in prod mode
23:15 cemilowski1 joined
23:16 <carterparks> s3 is awesome
23:16 <carterparks> we found that out yesterday
23:19 <Quintasan> benwilson512: I did some digging and https://elixirforum.com/t/how-do-you-serve-uploaded-files/1403/11 directly contradicts what you said about Plug.Static
23:20 <benwilson512> so it does
23:20 <benwilson512> what am I getting it confused with?
23:20 <benwilson512> phoenix manifests?
23:20 <benwilson512> hmm
23:20 <Quintasan> Plus the code itself doesn't really do any "caching"
23:21 <Quintasan> Well, it still means I'm doing something wrong as this doesn't work lol
23:21 <benwilson512> heh
23:21 chriswarren joined
23:21 <benwilson512> well, not that I'm better informed, let me see what I can do to help
23:21 <benwilson512> *now
23:21 <benwilson512> so
23:21 <benwilson512> where do the files go when uploaded
23:22 <Quintasan> <project root>/uploads/images/<filename>
23:23 <Quintasan> lib/myapp/decoction.ex has plug Plug.Static, at: "/uploads", from: "/uploads", gzip: false right after the default Plug.Static, at: "/"
23:24 elixir-lang273 joined
23:26 rschmukler joined
23:26 <benwilson512> er so
23:26 <benwilson512> from: "/uploads" would imply the root of your hard drive
23:27 <Quintasan> ...
23:28 <Quintasan> This might be a problem
23:29 <Quintasan> Wait
23:29 <Quintasan> It doesn't make sense
23:29 <Quintasan> plug Plug.Static,
23:29 <Quintasan> at: "/", from: :decoction, gzip: false,
23:29 <Quintasan> only: ~w(css fonts images js favicon.ico robots.txt)
23:29 <Quintasan> oh
23:29 <Quintasan> Hmmm
23:30 chriswarren joined
23:31 laut joined
23:32 <Quintasan> benwilson512: I tried Path.expand("./uploads") but that didn't help. the request still gets routed to Phoenix
23:33 <benwilson512> try putting it prior to the other plug static
23:33 <benwilson512> from: :appname will expect it to be in priv/static/
23:34 <benwilson512> oh you know
23:34 <benwilson512> if you put the files in priv/static/uploads
23:34 <benwilson512> and then added uploads to the only list on the existing plug static
23:36 haennar joined
23:38 <Quintasan> Nope.
23:39 chriswarren joined
23:41 <Quintasan> %td= link("derp", to: static_path(@conn, Decoction.ImageUpload.url({image.image, image}, :original)))
23:41 <Quintasan> I did that to make sure I'm using the right url
23:42 Uniaika joined
23:42 montanonic joined
23:45 <Quintasan> Hmm, this is not going to fly when using Arc
23:46 <Quintasan> benwilson512: Oh, never mind. This works. It's just that Arc works in a strange way
23:47 <Quintasan> I thought the filename method is meant to override the filename to be stored (which it does). It also calls the same method when yielding an URL for the file.
23:47 <Quintasan> So if I'm using the UUID.uuid4() it will give me a different file name every time lol
23:49 <Quintasan> benwilson512: Thanks for your help
23:53 kiltzman joined
23:54 kiltzman joined
23:54 kiltzman joined
23:56 kiltzman joined
23:57 kiltzman joined
23:59 markh joined
23:59 codestorm joined