<    April 2017    >
Su Mo Tu We Th Fr Sa  
 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  
00:07 mika__ joined
00:08 kronicdeth joined
00:24 wpcarro joined
00:37 rozap joined
00:38 wpcarro joined
00:40 PaReeOhNos joined
00:41 samsch joined
00:42 meandi joined
00:45 griffinbyatt joined
00:45 evax joined
00:46 Cohedrin joined
00:47 kronicdeth joined
00:48 cevado joined
00:53 wpcarro joined
00:56 nighty-- joined
00:57 meandi_2 joined
00:57 Cohedri__ joined
00:59 watersoul_ joined
00:59 danneu_ joined
00:59 codestorm joined
01:00 ivan_ joined
01:00 hq1 joined
01:00 hq1 joined
01:01 knight- joined
01:01 baweaver joined
01:01 dmilith joined
01:02 cschneid_ joined
01:03 vircung joined
01:04 sevenseacat joined
01:07 teepark joined
01:10 rschmukler joined
01:13 nomicflux joined
01:13 joshp joined
01:14 riddle joined
01:14 cschneid_ joined
01:15 joshp left
01:15 joshp joined
01:16 joshp left
01:19 Confiks joined
01:20 steffkes joined
01:20 steffkes joined
01:26 Cohedrin joined
01:26 Ioyrie joined
01:28 refriedchicken joined
01:35 rkazak joined
01:37 mika__ joined
01:39 tomterl joined
01:41 whharris joined
01:42 cevado joined
01:49 ikopico joined
01:52 kronicdeth joined
01:53 codestorm joined
02:02 PaReeOhNos joined
02:02 cschneid_ joined
02:02 codestorm joined
02:05 rschmukler joined
02:15 wpcarro joined
02:18 r00tl3ss_ joined
02:24 r00tl3ss joined
02:25 wpcarro joined
02:34 phansch joined
02:34 askatasuna joined
02:36 cevado joined
02:40 griffinbyatt joined
02:45 wpcarro joined
02:55 cschneid_ joined
02:56 bloosi joined
02:58 cschneid_ joined
03:04 brguy joined
03:05 wpcarro joined
03:14 Sgeo_ joined
03:16 wpcarro joined
03:17 elgenie joined
03:22 steffkes joined
03:22 steffkes joined
03:24 PaReeOhNos joined
03:30 lixmon joined
03:31 cevado joined
03:33 squallstter joined
03:36 harfangk joined
03:39 arpunk joined
03:41 codestorm joined
03:41 griffinbyatt joined
03:43 Tica2 joined
03:43 akeating joined
03:45 adgtl joined
03:46 arpunk joined
03:53 rschmukler joined
03:53 larshesel joined
04:01 gem joined
04:04 <bcardarella> with edeliver if I made a bad deploy can I just deploy over that same version?
04:04 <bcardarella> or am I required to bump the version?
04:09 mika__ joined
04:11 wpcarro joined
04:16 dj_goku joined
04:20 jeffweiss joined
04:25 cevado joined
04:30 robinsjdotcom joined
04:32 r00tl3ss joined
04:41 elgenie joined
04:47 rschmukler joined
04:52 <Radar> I have some supervisors setup in my application which are responsible for starting processes that fetch events. These events are typically noisy. How can I make it so that during the tests these supervisors are not started automatically?
04:54 PaReeOhNos joined
04:57 rschmukler joined
05:19 cevado joined
05:23 steffkes joined
05:26 refriedchicken joined
05:33 elgenie joined
05:35 cschneid_ joined
05:39 imack joined
05:40 gvaughn joined
05:42 mika__ joined
05:43 griffinbyatt joined
05:45 nd___ joined
05:52 Machete joined
05:55 codestorm joined
05:55 Cohedrin joined
05:59 wpcarro joined
06:05 PaReeOhNos joined
06:06 milad joined
06:07 robinsjdotcom joined
06:08 craigp joined
06:09 gem joined
06:10 Havvy joined
06:13 voltone joined
06:16 m_m joined
06:17 jkreeftmeijer joined
06:19 m_m_ joined
06:31 tuacker joined
06:33 Lyubo1 joined
06:33 milad joined
06:36 Cohedrin joined
06:39 kau joined
06:44 griffinbyatt joined
06:44 vmoravec joined
06:49 InternetFriend joined
06:53 Cohedrin joined
06:54 wpcarro joined
06:57 gokr joined
06:59 InternetFriend joined
07:03 fhoffmann joined
07:06 landongn_ joined
07:06 codestorm joined
07:07 cevado joined
07:08 asabil joined
07:08 <landongn_> hey all, qq. I'm a bit of a novice still; I'm trying to render a view in phoenix where the structure is %{foo: bar, baz: [a: b, c: d]}. I need to strip some of the metadata from the struct returned by ecto before I can serialize it, since it's throwing an exception. What's the appropriate way to handle this? My thought was to create a List, and use foo = [foo | baz] while enumerating, but nothing is being appended into the list.
07:09 <landongn_> relevant gist: https://gist.github.com/anonymous/ff9d09f3c2c79d0bc8ef5249bb15b61c
07:15 m_m joined
07:17 nd___ joined
07:17 julienfayad joined
07:23 mattyw joined
07:23 nd___ joined
07:23 steffkes joined
07:23 steffkes joined
07:24 PaReeOhNos joined
07:27 josevalim joined
07:27 ZippoWeb3 joined
07:28 gvaughn joined
07:29 colrack joined
07:30 Cohedrin joined
07:32 stephen_m joined
07:32 zetashift joined
07:35 ultralazer joined
07:36 asabil joined
07:40 PaReeOhNos joined
07:42 <bcardarella> @josevalim ping
07:42 <josevalim> bcardarella: hey!
07:42 <josevalim> whats up?
07:44 <bcardarella> do applications have to be loaded in order to access their config var in prod?
07:44 <bcardarella> with Application.get_env
07:45 griffinbyatt joined
07:46 gmcabrita joined
07:48 <bcardarella> @josevalim this is for an app that has been compiled and deployed. I am running into an issue with sys.config values not available at that point but available local
07:49 <josevalim> yes the application has to be loaded
07:49 InternetFriend joined
07:49 <josevalim> although I think sys.config values will be there since the beginning
07:51 wpcarro joined
07:52 cemilowski joined
07:53 <bcardarella> I've been using a config var for an application that doesn't exist. I have some libs that I am going to extract out. It hasn't been an issue but those specific config vars aren't available after deploy
07:56 akeating joined
07:58 Guest67_ joined
07:59 steffkes joined
07:59 steffkes joined
07:59 ZippoWeb3 joined
07:59 inoas joined
08:01 akarambir joined
08:01 codestorm joined
08:01 Cohedrin joined
08:02 cevado joined
08:12 <OliverMT> ecto outputs this (verbatim) "must be greater than %{number}"
08:12 <OliverMT> is it my changeset view that isnt doing the right thing or what?
08:12 <OliverMT> using validate_number
08:14 mark_66 joined
08:15 Guest67__ joined
08:17 <bcardarella> OliverMT: what is it you want?
08:17 <OliverMT> it should say the number specified in my greater_than
08:17 <OliverMT> |> validate_number(:lithostrat_order, greater_than: 0)
08:18 <OliverMT> lithostrat_order":[ "must be greater than %{number}" ]
08:18 <sevenseacat> you're not formatting the errors correctly
08:18 <sevenseacat> when you output them
08:18 <sevenseacat> see Ecto.Changeset.traverse_errors/2
08:19 <OliverMT> aha, as I suspected
08:21 tomku joined
08:22 <OliverMT> this codebase is phoenix 1.0 or even earlier I think
08:22 <OliverMT> havent used a validator relying on translation of errors until now :D
08:23 <OliverMT> we use error_code_strings_like_this_bla_bla and do i18n of errors clientside in most our projects
08:31 hbraun joined
08:34 cschneid_ joined
08:45 griffinbyatt joined
08:46 wpcarro joined
08:48 yourname_ joined
08:51 flopsec joined
08:55 codestorm joined
08:56 cevado joined
08:59 ZippoWeb joined
09:02 lexmag joined
09:02 rschmukler joined
09:07 marr joined
09:17 gvaughn joined
09:17 bigkevmcd joined
09:18 craigp joined
09:23 codestorm joined
09:23 milad joined
09:24 elgenie_ joined
09:28 milad joined
09:30 squallstter joined
09:32 <nox> How are things going here?
09:34 milad joined
09:34 mika__ joined
09:36 jeffweiss joined
09:39 <Nicd-> very well, nox, how about you?
09:39 <nox> Nicd-: You judge. https://github.com/servo/servo/pull/16609
09:40 <Nicd-> I have no idea what's going on
09:41 <nox> Nicd-: Supporting height: 3 on rainy Tuesdays.
09:41 steffkes joined
09:41 steffkes joined
09:41 <Nicd-> then make it render as height: 3vw >:)
09:42 <nox> Nicd-: Nah, as 3px.
09:42 <Nicd-> boring
09:42 <nox> Nicd-: What if I told you a dimension token (i.e. <number><unit>) was a color?
09:42 <nox> Nicd-: https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk
09:43 <nox> color: 34ab
09:44 akarambir joined
09:44 <Nicd-> but what color is 34ab? it's not 3/6 long
09:46 griffinbyatt joined
09:46 <nox> Nicd-: It's #0034ab
09:47 <Nicd-> nooooooo
09:48 <micmus> That's why we can't have nice things :P
09:50 cevado joined
09:52 codestorm joined
09:53 <nox> micmus: It's that or the Web breaks, unfortunately. :(
10:02 l14n joined
10:11 gvaughn joined
10:20 codestorm joined
10:21 robinsjdotcom joined
10:24 steffkes joined
10:32 <OliverMT> benwilson512: have you guys toyed around with aws iot (managed mqtt) yet?
10:33 wpcarro joined
10:42 ZippoWeb joined
10:44 <OliverMT> is there a way to "optionally" construct a map literal?
10:44 <OliverMT> ideally I'd be able to do if foo = "something" do foo: "bar", baz: "boo" end
10:44 <OliverMT> and end up with a map that has the extra keys foo and bar with those values
10:44 <OliverMT> its for optional selects based on query type in ecto
10:45 cevado joined
10:45 <OliverMT> in hibernate it was great to be able to send the query delegate down into an if and get a optional return
10:47 griffinbyatt joined
10:47 <ciawal> not sure what you mean that's different there
10:47 <ciawal> you'd just return %{foo: … baz: }
10:47 <ciawal> no?
10:48 nighty-- joined
10:49 <OliverMT> I mean inside the literal
10:49 codestorm joined
10:49 <OliverMT> dynamic ecto is... not where it needs to be yet
10:50 <OliverMT> because its so hard to reference stuff back and forth if you use the api piping
10:50 rschmukler joined
10:51 hbraun joined
10:53 <OliverMT> ok, not hard, but its very hard once you have optional joins as well
10:53 <OliverMT> since if you need an optional where you need to know (and write out the permutations for) all the various combos of where in the query list the thing you want the where on
10:53 <nox> Do you people use 2FA?
10:53 <OliverMT> nox: about to start using AWS Cognito
10:53 <nox> I've just switched to using Duo Mobile instead of SMS or my Yubikey,
10:53 <nox> best decision.
10:53 <OliverMT> just because 2FA
10:53 <OliverMT> oh, you mean as a consumer
10:54 <nox> Yes.
10:54 <nox> OliverMT: I had a iPhone 4 until last week.
10:54 <OliverMT> only on my master accounts, google, apple and microsoft :D
10:54 <nox> Finally bought a new one, so many differences.
10:54 <nox> OliverMT: Started using 2FA as a consumer because it's mandatory at Mozilla,
10:54 <OliverMT> 7?
10:54 <nox> so then I went like "why not everywhere".
10:54 <nox> OliverMT: Yeah, red.
10:55 <OliverMT> I think the samples on ecto macro api are a bit lightweight
10:55 <OliverMT> the sample code
10:55 <OliverMT> "users"
10:55 <OliverMT> |> where([u], u.age > 18)
10:55 <OliverMT> |> select([:name])
10:55 <OliverMT> will only work in the very most trivial case of just a single binding
10:56 <OliverMT> if you try that with two bindings in the list it will just read .name from the first one without saying anything
10:57 r00tl3ss joined
10:58 <ivan_> https://hexdocs.pm/ecto/Ecto.Query.html#select/3-expressions-examples
10:58 <OliverMT> they also show just a single binding :)
10:58 <OliverMT> this has changed around in ecto 2 I think
10:58 <ivan_> you can just pass in all the bindings in the same order as the joins, right?
10:58 <OliverMT> this is looking a lot more promising than the last time I looked
10:58 <OliverMT> yes but what if you have varying amount of bindings ivan
10:58 <ivan_> I guess you're hosed then
10:58 <OliverMT> like you optionally join 3,4 or 5 tables
10:59 <OliverMT> you'd have to set up a pattern matcher or something for all three permutations
10:59 <ivan_> that behavior surprised me, I was hoping Ecto would pass in tables by the names of the variables
10:59 <OliverMT> actually, that wont work either, unless the [c] has any kind of atom you can match on
11:00 <OliverMT> I am still hand building postgresql queries using postgrex directly in a large query builder part of this ap
11:00 <OliverMT> p
11:00 cemilowski joined
11:00 <OliverMT> https://gist.github.com/olivermt/0b45ae7ca52f145ceffca21c00e7f899
11:00 <OliverMT> I have a long term goal of translating that to ecto queries, but it's a ways off yet
11:01 <nox> OliverMT: I'm pissed off at the absence of a jack plug,
11:01 <OliverMT> nox: I'm pure BT all the way
11:01 <nox> OliverMT: but OTOH I'm happy I'll have security updates for years.
11:01 <OliverMT> and I use the lightning earplugs that came with if I need it
11:01 <nox> OliverMT: I've been told BT doesn't work very well in transports.
11:02 <OliverMT> which transports?
11:02 <nox> Crowded subways and buses.
11:02 <OliverMT> aha
11:02 <OliverMT> I havent noticed, but I dont really live any where metropolic though
11:02 <nox> If that's not true, I think I'll try to get a QC35 from Moz,
11:02 <OliverMT> used my bose qc35s just fine on the airplane though
11:02 <OliverMT> and airport
11:02 <OliverMT> got three trips coming up, one of which to italy next months
11:02 <nox> though with Bose apparently eavesdropping...
11:03 <OliverMT> I'll let you know if I notice any tomfoolery
11:03 <OliverMT> only if you install the app :P
11:03 <nox> Oh.
11:08 cevado joined
11:14 elgenie joined
11:15 akeating joined
11:17 akeating_ joined
11:17 codestorm joined
11:21 MarioBranco joined
11:22 asabil joined
11:26 tomikeska joined
11:35 asabil joined
11:36 kronicdeth joined
11:36 zetashift joined
11:38 cristianR_ joined
11:46 codestorm joined
11:47 griffinbyatt joined
11:48 asabil joined
12:00 gvaughn joined
12:02 wpcarro joined
12:06 nomicflux joined
12:08 akeating joined
12:10 <benwilson512> OliverMT: nah none of our stuff uses mqtt
12:10 <benwilson512> we do relatively little live data actually
12:11 <benwilson512> and as little actual hardware as possible
12:11 <benwilson512> we're more on the data management and analytics side
12:11 <OliverMT> ok
12:11 <benwilson512> we are moving to ECS though
12:11 <OliverMT> this aws iot thing looks super great as a managed HA mqtt
12:11 <benwilson512> honestly I'd do K8 but I don't want to manage that on AWS, and GCE doesn't have a production ready RDS yet
12:11 <OliverMT> making a chat engine on top of this to power something like discord is almost easy
12:12 <OliverMT> benwilson512: we're hiring someone to set it up for us :D
12:12 <OliverMT> we can most likely sell all the templating and documentation on to you guys for a symbolic sum if you want to, if we dont just opensource the whole thing
12:13 <OliverMT> basically setting up a forward rolling blue/green deploy
12:13 <benwilson512> oh very cool, I might take you up on that at some point later this year
12:13 <OliverMT> I started looking at it and quickly realized that my time would be a lot more worth doing other stuff
12:13 <benwilson512> yeah
12:13 <OliverMT> K8 on aws is great btw
12:13 <OliverMT> coreos supports it directly
12:13 <OliverMT> just need to have a bit of know-how to get the initial cluster up
12:14 <benwilson512> yeah USING kubernetes is fine, setting up kubernetes clusters can be a nightmare
12:14 <OliverMT> thats what coreos does
12:14 <benwilson512> last time I tried it on AWS I was having to reason through subnet ip routing rules
12:14 <OliverMT> using one of the two aws libs
12:14 <benwilson512> and was like ".... no"
12:14 <OliverMT> you just grant it IAM roles and they do the rest
12:14 <OliverMT> more or less
12:14 codestorm joined
12:14 <OliverMT> BUT I want someone who knows their shit to set it up properly
12:14 <benwilson512> yea
12:14 <OliverMT> instead of getting up a template and then run around like headless chicken when something fails
12:14 <OliverMT> D
12:14 <OliverMT> :D
12:14 <benwilson512> ECS is good enough for us for now
12:14 <benwilson512> OliverMT: yup that's precisely where I ended up
12:15 <OliverMT> ECS is great if you dont do websockets
12:15 <OliverMT> with connection draining before moving to next host etc
12:15 <benwilson512> it doesn't support websockets?
12:15 <OliverMT> we dont want to simply just shut down all sockets and make the herd thunder on
12:15 <benwilson512> ahhhh connection draining
12:15 <benwilson512> yeah for us that's fine
12:15 <OliverMT> we want to mark a host as soon to go down
12:15 <OliverMT> then programmatically disconnect people to make them reconnect on newer nodes
12:15 <benwilson512> kubernetes makes that easy eh?
12:16 elgenie joined
12:16 <OliverMT> they take care of marking nodes at least
12:16 akeating joined
12:16 <OliverMT> still need to solve some stuff on the phoenix end
12:16 <OliverMT> but tbh, I'm looking into ditching phoenix channels in its entirety and just going straight up mqtt on aws iot
12:16 <benwilson512> gotcha
12:16 <OliverMT> we're hitting a lot of bugs and it is stuff you need to do correct
12:16 <OliverMT> I love phoenix for crud and non-standard stuff like mocking LDAP
12:17 <benwilson512> our use of websockets is mostly just to live update some content on certain web pages
12:17 <benwilson512> so disconnects and reconnects are fine
12:17 <benwilson512> graphql subscriptions style
12:17 <OliverMT> yeah, we have to have distributed state and all such
12:17 <OliverMT> then its a lot easier to just use mqtt where you can have information about amount of subscribers on a topic and whatnot
12:17 <OliverMT> we are/were planning to use phoenix.presence
12:17 <benwilson512> interesting, I don't honestly know a lot about mqtt
12:17 <benwilson512> any good resources?
12:18 <OliverMT> its basically just phoenix channels
12:18 <OliverMT> topics and subscriptions
12:18 <OliverMT> but there is a sql like layer on top in aws iot
12:18 <OliverMT> where you can call other services
12:18 <OliverMT> using aws lambda etc
12:18 <OliverMT> and you POST to a rest interface from phoenix
12:18 <OliverMT> to send messages
12:18 <OliverMT> so phoenix gets reduced to a house keeper, leaving aws iot to do the heavy lifting on the realtime
12:19 <OliverMT> the numero uno sole reason for us: nodes go back to being stateless
12:19 <benwilson512> interesting, i'll take a look. what state were you handling before, just the presence stuff or more?
12:19 <OliverMT> after 3 years of java stateful crap we finally made the leap to stateless infrastructure.. then one year after moving to elixir I end up having to worry about cluster state :D
12:19 <OliverMT> we have stuff like for a given video URI you can only have one listener active at a given time
12:19 <OliverMT> that listener spreads information out to subscribers on websockets
12:20 <OliverMT> the listener is a web connection to a commercial service
12:20 <OliverMT> so basically aggregation to save connections to the commercial platform
12:20 <benwilson512> gotcha
12:21 Scramblejams joined
12:21 <benwilson512> we're pretty stateless ourselves, although we've got some genservers w/ timers that go off if we haven't heard from certain things in X amount of time. they're expendable though because the data itself is off node, so we can always rebuild from that
12:22 <OliverMT> we can reset our state as well
12:22 <OliverMT> but its a lot of work keeping track of all this
12:22 <benwilson512> makes sense
12:22 <benwilson512> my concern with lambda is difficulty testing or running in dev
12:22 <OliverMT> yeah
12:22 <OliverMT> lambda is purely a pass-through to rest for us
12:23 <OliverMT> I'm looking at hooking mqtt up directly in the phoenix nodes as well
12:23 <OliverMT> to not need lambda
12:23 <OliverMT> for non-time-sensitive stuff the very best thing is mqtt -> sqs -> poll from elixir
12:23 <OliverMT> with fifo and read-exactly-once semantics
12:23 <OliverMT> more or less bullet proof
12:24 <benwilson512> yeah I've been looking into CQRS / ES stuff
12:24 <benwilson512> push events into queues, pulling them off, that kinda thing
12:25 <benwilson512> SQS API is a but crufty but
12:25 ultralazer joined
12:25 <benwilson512> the service has reasonably nice properties.
12:25 <benwilson512> gotta run, chat later!
12:30 <OliverMT> benwilson512: allright, see you later :
12:30 <OliverMT> :)
12:31 akeating joined
12:32 asabil joined
12:35 ZippoWeb joined
12:35 cschneid_ joined
12:40 ctp joined
12:43 codestorm joined
12:46 dimitarvp joined
12:47 wpcarro joined
12:48 sfbw joined
12:48 griffinbyatt joined
12:49 jkreeftm_ joined
12:53 chrismccord joined
12:54 smt__ joined
12:55 akeating joined
12:57 gem joined
12:59 rschmukler joined
13:00 ramortegui joined
13:03 Liothen joined
13:09 bitmod joined
13:09 bitmod joined
13:10 akeating joined
13:10 akeating_ joined
13:10 steffkes joined
13:10 steffkes joined
13:11 codestorm joined
13:13 kronicdeth joined
13:23 mingerz joined
13:23 cdg joined
13:26 MarioBranco joined
13:26 cevado joined
13:30 bpmcd joined
13:35 cschneid_ joined
13:36 Bounga joined
13:37 robinsjdotcom joined
13:38 rschmukler joined
13:38 jleon joined
13:40 kmz joined
13:43 wpcarro joined
13:43 gvaughn joined
13:44 cdg_ joined
13:46 bitmod joined
13:49 cdg joined
13:49 griffinbyatt joined
13:50 cdg_ joined
13:50 hashpuppy joined
13:52 whharris joined
13:55 rschmukler joined
14:02 kansi joined
14:02 wpcarro joined
14:04 <kansi> hi, can anybody suggest the a suitable way to store phoenix logs to files ? something other than the file backend plugin for Logger module
14:05 <chrismccord> kansi what issues are you having with the logger file backend?
14:05 codestorm joined
14:08 <kansi> they project says it doesn't handle log rotation, so wondering what people use in production
14:10 <gazler> https://github.com/bleacherreport/plug_logger_json and some sort of logstash/kibana is good (logz.io or https://logit.io/)
14:10 <gazler> It becomes even more useful if you have more than 1 server.
14:12 <kansi> this seems promising, thx
14:13 <gazler> https://github.com/bitwalker/exrm/issues/221 is worth reading if you are using releases too.
14:14 <gazler> run_erl (used in releases) does log rotation.
14:15 <benwilson512> kansi: alternatively, use releases and run your application under Systemd
14:16 <benwilson512> then it's just a totally ordinary system log
14:16 <benwilson512> and can be handled via any number of the gazillion system log options
14:16 <benwilson512> I suppose you could use systemd w/o releases but, always use releases ;)
14:21 seanclayton joined
14:22 <kansi> benwilson512: i do use releases for deploying, i am new to this so don't know much about configuring logs
14:29 asabil joined
14:30 ZippoWeb joined
14:32 jkreeftmeijer joined
14:38 MononcQc joined
14:40 egis joined
14:43 akeating joined
14:44 justelex joined
14:44 squallstter joined
14:46 jimmyrcom joined
14:46 hxegon left
14:48 akeating joined
14:49 marcdel joined
14:50 griffinbyatt joined
14:50 jeznet2 joined
14:53 wpcarro joined
14:53 rschmukler joined
14:59 NeverDie joined
14:59 tuacker joined
14:59 Guest29 joined
15:00 codestorm joined
15:02 luminarys joined
15:03 chrismccord joined
15:04 ikcerog joined
15:07 wpcarro joined
15:08 akeating joined
15:09 dustinfarris joined
15:09 chrismccord joined
15:10 akeating joined
15:10 akeating joined
15:11 rschmukler joined
15:13 aedigix joined
15:14 NeverDie joined
15:18 ZippoWeb joined
15:20 rschmukler joined
15:20 akeating joined
15:21 cschneid_ joined
15:25 akeating joined
15:29 elixir1298 joined
15:30 <elixir1298> Hey quick question. Does ecto process joins in-db or in-application?
15:31 gem joined
15:32 <ivan> elixir1298: it generates SQL with the right JOINs, of course
15:32 <elixir1298> ivan: cool, just double checking!
15:32 MoRaLeS joined
15:33 <MoRaLeS> ciaoo
15:33 <MoRaLeS> 8-)
15:35 icecreamcohen joined
15:41 rschmukler joined
15:41 NeverDie joined
15:44 cevado joined
15:45 NeverDie joined
15:46 jerel joined
15:47 JEG2 joined
15:49 josevalim joined
15:51 griffinbyatt joined
15:53 rozap joined
15:55 NeverDie joined
15:55 steffkes joined
15:55 Nicd- joined
15:55 wsieroci joined
15:57 wpcarro joined
15:58 cfreeze joined
15:59 <cfreeze> What could cause :gen_tcp to deliver a result as a charlist when I set in options to deliver as a binary and for most other types of packets it receives a binary?
16:00 <cfreeze> The specific use case is I am sending "i0" and it is receiving 'i0'
16:01 jkreeftmeijer joined
16:01 amclain joined
16:03 meandi joined
16:04 davidw joined
16:10 ctp joined
16:11 wpcarro joined
16:12 meandi_2 joined
16:16 dberkom joined
16:17 mika__ joined
16:23 cemilowski joined
16:24 codestorm joined
16:25 cdg joined
16:26 nbg joined
16:27 harfangk joined
16:32 drincruz joined
16:32 jkreeftmeijer joined
16:32 dberkom joined
16:36 <cfreeze> Also, what could cause :inet.setopts to permanently block?
16:36 Machete joined
16:38 meh` joined
16:39 wpcarro joined
16:41 dberkom joined
16:43 jeffweiss joined
16:46 refriedchicken joined
16:49 akeating joined
16:50 wpcarro joined
16:50 jkreeftmeijer joined
16:51 akeating_ joined
16:51 griffinbyatt joined
16:53 asabil joined
16:55 cevado joined
16:59 keathley joined
17:02 craigp joined
17:02 wpcarro joined
17:04 keathley joined
17:05 mika__ joined
17:06 cdg_ joined
17:09 vmoravec joined
17:11 mika__ joined
17:12 asabil joined
17:13 cdg joined
17:15 luminarys joined
17:19 Machete joined
17:19 codestorm joined
17:19 laut joined
17:21 gvaughn joined
17:23 subetei joined
17:23 chrismccord joined
17:26 Bounga joined
17:26 bpmcd joined
17:29 Bounga joined
17:31 <jer> does it make sense to write something like: with {:error, reason} <- Thing.do_stuff(), do: Logger.error("Some error: #{inspect reason}") or is there a more idiomatic way i should write this, if i only care about the error case and want to ignore the ok case?
17:31 Cohedrin joined
17:33 whharris joined
17:34 wsieroci joined
17:34 cristianR_ joined
17:35 embik joined
17:37 gvaughn joined
17:38 NeverDie joined
17:40 ZippoWeb joined
17:49 <asonge> micmus: ping
17:52 griffinbyatt joined
17:52 jkreeftmeijer joined
17:53 MarioBranco joined
17:56 steffkes joined
18:00 lexmag joined
18:01 msantos joined
18:03 meh`_ joined
18:03 lexmag joined
18:04 OtherAllan joined
18:05 akeating joined
18:06 dch_ joined
18:06 universa1 joined
18:06 akeating joined
18:07 zv joined
18:08 cdg joined
18:09 <micmus> asonge: pong
18:09 <asonge> micmus: don't really like to participate in mailing lists, but have a suggestion on migrating erlang sets
18:09 <micmus> asonge: shoot :)
18:10 <asonge> micmus: whatever datatype you take in, you spit that same one back out. make a function to create a new set dict, and then make the old set emit a deprecation warning for a year, then eventually make the branch for old sets emit warnings on every call...
18:10 <asonge> so no implicit conversion at first
18:10 <asonge> then implicit conversion
18:11 <asonge> then again, i don't know if you can runtime emit deprecation warnings
18:11 <micmus> I'm not sure what's the erlang policy on deprecations :( I don't think it's stated explicitly anywhere
18:12 <asonge> sticking a 2 on the end doesn't always denote very well how easy it is to transition to a "new api" :/
18:12 <micmus> But that could work. The least disruptive would be to provide a separate module and eventually deprecate the old one, but having 5 set modules seems ridiculous
18:12 <asonge> i completely agree
18:13 <asonge> i bet the only reason people might rely on inner structure for sets would be guard functions :/
18:13 codestorm joined
18:13 <asonge> erm, guards on functions*
18:15 <asonge> micmus: but also, it might still be useful to have enough of the old sets code to do a transparent upgrade to mapsets for data at rest. that's just plain convenient. it makes it clear that it's a successor.
18:15 <asonge> even if you do "sets2" and eventually delete sets in 2 years.
18:17 icanhazbroccoli joined
18:18 siruf joined
18:20 nd___ joined
18:22 <asonge> micmus: here's where stuff gets deprecated in the compiler, i believe https://github.com/erlang/otp/blob/746e7ac3262747204c2d26bac94d748c38c16076/lib/stdlib/src/otp_internal.erl
18:28 edmz joined
18:34 zetashift joined
18:38 cdg_ joined
18:42 codestorm joined
18:48 <josevalim> does anyone know which tools we have in otp related to documentation?
18:49 <josevalim> i know about edoc. but there is something else that converts the .xml in otp itself to multiple formats. is it something exclusive to OTP itself or is it general purpose?
18:49 ctp joined
18:52 stephen_m joined
18:53 griffinbyatt joined
18:53 jkreeftmeijer joined
19:03 craigp joined
19:10 lexmag joined
19:10 codestorm joined
19:22 Machete joined
19:28 asabil joined
19:28 Guest67 joined
19:29 l14n_ joined
19:31 cmk_zzz joined
19:32 josevalim_ joined
19:34 icecreamcohen joined
19:41 asabil joined
19:43 Bounga joined
19:44 dustinfarris joined
19:44 cevado joined
19:45 whharris_ joined
19:49 <vhf> I spent a bunch of time figuring out basic stuff: using supervised tasks with agents for background jobs in a phoenix 1.3 app.
19:49 <vhf> So I documented what I did, since it took me a while and it's only a few lines of code.
19:50 <vhf> I'd be super grateful if someone would tell me if it's the right approach.
19:50 <dch_> vhf: share away
19:50 <vhf> Here's the example https://github.com/vhf/foo-supervised-task-agent
19:50 <vhf> only one relevant commit, this one https://github.com/vhf/foo-supervised-task-agent/commit/4f14d1f2f3e3397316f6631dc12f85cc7e864c4f
19:52 cevado joined
19:52 cdg joined
19:54 griffinbyatt joined
19:57 steffkes joined
19:57 cemilowski joined
20:04 mbwe joined
20:04 codestorm joined
20:04 craigp joined
20:07 Bounga` joined
20:07 m_m_ joined
20:08 milad joined
20:08 icecreamcohen_ joined
20:12 <Ankhers> vhf: Despite the fact that Foo.Task.PlusTwo and Foo.Task.TimesTwo depend on Foo.Task, they are not linked in any way. Foo.Task dies for any reason, it will start another set of PlusTwo and TimesTwo.
20:13 <Ankhers> I doubt that was your intention.
20:13 <Ankhers> I think anyways. I admit that I haven't used the task supervisor.
20:15 <vhf> Interesting, let me try
20:16 <vhf> Haha you're right Ankhers
20:16 <vhf> that's absolutely not the expect behaviour
20:16 <vhf> expected*
20:16 <vhf> How would you recommend to solve this?
20:17 <Ankhers> Create a proper supervision tree.
20:17 Bounga` joined
20:18 <vhf> Ankhers: using genserver?
20:18 <Ankhers> The dynamic supervision tree doesn't buy you anything in this specific case.
20:18 <Ankhers> You don't really need to use a genserver if you don't want to.
20:19 <vhf> Ok, then could you nudge me towards the right direction to create a proper supervision tree?
20:19 <Ankhers> Let me try to draw something out real quick.
20:20 squallstter joined
20:21 icecreamcohen joined
20:21 wsieroci joined
20:23 <OliverMT> where do I find documentation for the restart: keyword of supervisors?
20:23 <Ankhers> https://gist.github.com/ankhers/f52ada1e394739a9ddd1609e7d34d1e6 -- Something a little more like this.
20:24 <vhf> OliverMT: https://hexdocs.pm/elixir/Supervisor.Spec.html
20:24 <OliverMT> just found it
20:24 <OliverMT> as you linked
20:24 <OliverMT> hehe
20:25 <vhf> thanks Ankhers
20:25 <vhf> looks good
20:25 <vhf> let me try to implement this
20:25 rkazak joined
20:27 <vhf> Ankhers: what would Foo.Task be?
20:27 <vhf> in your example
20:27 <Ankhers> Your current Foo.Task module.
20:28 <Ankhers> Minus the calls to Foo.Task.PlusTwo and Foo.Task.TimesTwo
20:28 <vhf> I seee
20:30 Machete joined
20:31 <Ankhers> vhf: Let me know if you can't get it. I will try to throw a project up that does it.
20:35 <vhf> I tried Ankhers here's where I am so far https://github.com/vhf/foo-supervised-task-agent/commit/c24379935d230d97363741face725d05375f39b7
20:36 <vhf> it doesn't work yet, I'm pretty sure I'm missing some changes in the actual tasks, e.g. Task.PlusTwo
20:40 akeating joined
20:41 <Ankhers> vhf: You need to call the function start_link/0, not start/0.
20:42 <vhf> hmm yes Ankhers
20:42 <vhf> that raises this: (RuntimeError) attempted to call GenServer Foo.Task but no handle_call/3 clause was provided
20:44 <Ankhers> I would probably use a genserver instead of a Task for the TimesTwo and PlusTwo.
20:45 <Ankhers> Using a task doesn't buy you anything here.
20:45 wpcarro joined
20:45 <vhf> right
20:46 <OliverMT> I'd say that as a general rule, a genserver is better than agent
20:46 <OliverMT> unless you are doing a tutorial and just want to pass off some state
20:47 <vhf> I'm not doing a tutorial, I'm trying to learn and Agent seemed like a good way of keeping state somewhere
20:47 <vhf> I'm having a hard time understanding, tbh
20:48 <Ankhers> Which part?
20:48 Blkt joined
20:49 <vhf> Ankhers: the boilerplate, mostly
20:49 reset joined
20:49 <vhf> I mean, I don't know when I need a start_child or a start_link, etc
20:49 <vhf> I'm sure implementing what you showed here https://gist.github.com/ankhers/f52ada1e394739a9ddd1609e7d34d1e6 is easy when you're used to OTP
20:50 <vhf> and I'm trying to get there :)
20:50 <Ankhers> Do you want me to throw a quick project together that does what you are attempting to do?
20:51 <vhf> I'd love to, Ankhers !
20:53 mattyw joined
20:55 jkreeftmeijer joined
20:55 griffinbyatt joined
20:55 Guest67 joined
20:58 codestorm joined
20:59 m_m joined
21:00 wpcarro joined
21:10 craigp joined
21:11 icecreamcohen joined
21:14 mk[] joined
21:14 cemilowski joined
21:16 rozap joined
21:19 davidw joined
21:22 strykerkkd joined
21:28 <Ankhers> vhf: https://github.com/ankhers/supervisor_training -- This is similar to what you were after.
21:28 pramsky joined
21:29 NeverDie joined
21:29 pramsky left
21:29 pramsky joined
21:29 <mk[]> hey, everyone, websocket server suggestions?
21:29 <vhf> Thanks Ankhers !
21:30 <vhf> let me compare and understand now :)
21:30 <pramsky> hello everyone, any docs on backing up mnesia and restoring it to another node ?
21:31 <pramsky> just doing :mnesia.backup("/path/to/backup") fails
21:32 <mloy> mk[]: nginx + phoenix channels?
21:33 <mk[]> mloy: I'd prefer something that runs on BEAM, and avoid pheonix
21:34 <Ankhers> mk[]: https://github.com/ninenines/cowboy/tree/master/examples/websocket ?
21:34 <mk[]> I tried "socket" package (hex.pm), but it's unfinished, and client code didn't work
21:35 akeating joined
21:36 <mk[]> Ankhers: https://hex.pm/packages/web_socket looks good
21:37 <Ankhers> Any particular reason to avoid Phoenix though?
21:37 <mk[]> Ankhers: it's an overkill, I'm trying to build a backup tool similar to duplicity/rsync
21:37 <Ankhers> Fair enough.
21:38 <mk[]> I can use plain TCP, but websockets have nice extra goodies
21:41 steffkes joined
21:45 wpcarro joined
21:47 <vhf> Ankhers: this is amazing
21:47 <vhf> very good example
21:47 <vhf> thanks a bunch!
21:47 jeffweiss joined
21:48 <vhf> I had issues with Foo.Supervisor though, the init matches [] and the caller never passed this
21:48 <vhf> had to init(_) instead
21:49 <vhf> hmm nope never mind, it works with [], what did I do
21:49 <Ankhers> That should be the second argument from the start_link function in the same module.
21:50 <vhf> yes and that's the case!
21:50 <vhf> Weird, I don't know what I did
21:50 <vhf> long day I guess
21:51 <vhf> it's really interesting to learn from this kind of examples
21:51 <vhf> time to sleep though, thanks again :)
21:52 <Ankhers> No problem
21:52 codestorm joined
21:53 MarioBranco joined
21:56 griffinbyatt joined
21:56 jkreeftmeijer joined
22:02 fernandomm joined
22:04 jerel joined
22:06 whharris joined
22:08 dustinfarris joined
22:15 Machete joined
22:18 asabil joined
22:26 griffinbyatt joined
22:32 noel joined
22:33 elgenie joined
22:38 <drincruz> exit
22:39 mattyw_ joined
22:51 dustinfarris joined
22:52 noeljackson joined
22:52 edmz joined
23:03 rkazak joined
23:07 <rozap> what are the circumstances that a channel will exit in phoenix?
23:07 <rozap> 1) when the channel crashes 2) when the client leaves
23:08 johnhamelink joined
23:08 <rozap> i'm seeing a super weird behavior in our production env, where the phoenix.js is joining/leaving channels over and over, except it's never sending a leave message
23:09 <rozap> and i traced the erlang side and saw that the websocket process is doing a (<0.7095.1>) <0.21893.2> ! {'$gen_cast',close}
23:09 <rozap> so it's actually closing the channel, but the websocket process (0.7095.1 in this case) is never receiving a message that is telling it to close the channel
23:10 alxzu joined
23:10 <alxzu> hi there, I'm facing a problem with postgres config
23:11 <rozap> the other thing is that i'm only seeing this behavior when a client has many many channels (like 500 of them) open
23:12 mozzarella joined
23:13 whharris joined
23:20 wpcarro joined
23:23 cdg joined
23:27 griffinbyatt joined
23:35 jhack joined
23:38 mika__ joined
23:40 sfbw joined
23:41 codestorm joined
23:56 Cohedrin joined
23:57 cschneid_ joined
23:57 jkreeftmeijer joined