<    April 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
00:09 Cohedrin joined
00:12 duane joined
00:18 rodolfojcj joined
00:21 hotpancakes joined
00:23 milad joined
00:28 Ayey_ joined
00:31 hotpancakes joined
00:32 MotherFlojo joined
00:37 Guest17_ joined
00:47 Cohedrin joined
00:53 Cohedrin joined
00:54 PaReeOhNos joined
01:03 maxirater joined
01:07 steffkes joined
01:12 dean____ joined
01:17 milad joined
01:20 Ayey_ joined
01:32 MotherFlojo joined
01:38 mika_ joined
01:39 tomterl joined
01:41 brohith joined
01:41 elbow-jason joined
01:42 <brohith> Do I need to build my release binary on the same OS as my deployment OS?
01:43 <brohith> I'm building on OSX and want to deploy on an Ubuntu server
01:44 <elbow-jason> hi everyone! I’m playing around with Phoenix Channels… I am using My.Endpoint.broadcas/3, but I can’t seem to trigger the handle_out callback. any suggestions?
01:57 Ayey_ joined
01:59 Cohedrin joined
02:04 PaReeOhNos joined
02:20 hotpancakes joined
02:22 Cohedrin joined
02:33 Ayey_ joined
02:39 gem joined
02:41 hotpancakes joined
02:45 alect joined
02:46 elbow-jason joined
02:46 alect joined
02:48 alect joined
02:58 elbow-jason joined
02:59 alect joined
03:02 Cohedrin joined
03:06 Cohedrin joined
03:08 duane joined
03:08 steffkes joined
03:08 steffkes joined
03:12 hotpancakes joined
03:13 hotpancakes joined
03:13 PaReeOhNos joined
03:15 dean____ joined
03:20 dj_goku joined
03:27 <emancu> Hello everyone! I have a question bout phoenix, ecto and nested relationships. Lets say: a Post has_many Comments and the Comment.changelog validates_required([:text, post_id]). The thing is, Ecto fails when I use `cast_assoc(:comments)` from Post because it says the `post_id` is not present (which is true). Should I remove the `post_id` from the validation_require list ?
03:28 dean____ joined
03:32 MotherFlojo joined
03:33 chrismccord joined
03:40 Cohedrin joined
03:43 InternetFriend joined
03:47 elbow-jason joined
03:56 hotpancakes joined
04:03 elbow-jason joined
04:14 nicholasthegr8t joined
04:16 whharris joined
04:19 refriedchicken joined
04:21 jeffweiss joined
04:26 refriedchicken joined
04:26 PaReeOhNos joined
04:37 elbow-jason joined
04:42 rschmukler joined
04:46 dean__ joined
04:58 hotpancakes joined
05:00 refriedchicken joined
05:07 codestorm joined
05:09 steffkes joined
05:09 steffkes joined
05:19 whharris joined
05:37 elbow-jason joined
05:38 dean__ joined
05:50 milad joined
05:55 cemilowski joined
06:00 ultra|lazer joined
06:02 wsieroci joined
06:09 hotpancakes joined
06:14 milad joined
06:28 RexM joined
06:30 dean__ joined
06:31 refriedchicken66 joined
06:33 refriedchicken joined
06:36 tuacker joined
06:38 PaReeOhNos joined
07:05 ZippoWeb joined
07:05 vaultin joined
07:07 dean__ joined
07:09 steffkes joined
07:15 Tica2 joined
07:15 milad joined
07:17 xsrsx joined
07:18 xsrsx joined
07:19 nd___ joined
07:26 <xsrsx> What is the best practise to update a value of a map within a map? I create my map with acc= Map.new acc = Map.put_new(acc, {year, month}, %{date: {year, month}, postings: 1, amount: amount})
07:26 <xsrsx> acc[{year, month}] = Map.update(acc[{year, month}], :amount, fn val -> if val +1 end) doesn't work
07:27 <xsrsx> It throws `** (CompileError) iex:22: cannot invoke remote function Access.get/2 inside match`
07:30 <Tica2> def update(map, ) First argument for Map.update is map
07:31 <Tica2> In your case is value from map Map.update(acc[{year, month}]
07:36 <xsrsx> This value is a map
07:36 <xsrsx> The update itself works, but I can save it to the same position in the map
07:36 <xsrsx> *can't
07:42 stephen_m joined
07:43 <tuacker> xsrsx: there is Kernel.update_in/3 => update_in(map, [{year, month}, :amount], fn val -> val + 1 end)
07:44 <tuacker> takes the map, then the path to traverse (in your case the {year, month} and then :amount, and a function with how to modify the value
07:45 <tuacker> you could also do `update_in(map[{year, month}][:amount], fn val -> val + 1 end)` if thats clearer
07:46 InternetFriend joined
07:48 asabil joined
07:49 nadim_ joined
07:51 josevalim joined
07:51 PaReeOhNos joined
07:53 agit0 joined
07:53 stephen_m joined
07:54 <xsrsx> Works like a charm. Thank you, was stuck on this for the whole night :)
07:56 dean__ joined
08:01 colrack joined
08:02 marr joined
08:03 cemilowski joined
08:06 agit0 joined
08:06 PaReeOhNos joined
08:13 agit0 joined
08:13 robinsjdotcom joined
08:13 robinsjdotcom joined
08:17 ultra|lazer joined
08:17 milad joined
08:24 Uniaika joined
08:27 hotpancakes joined
08:28 dean__ joined
08:37 dean__ joined
08:42 milad joined
08:47 craigp joined
08:52 agit0 joined
08:53 milad joined
08:54 Guest67 joined
08:55 m_m joined
08:56 m_m joined
09:00 agit0 joined
09:11 steffkes joined
09:11 steffkes joined
09:18 hotpancakes joined
09:30 Cohedrin joined
09:37 peterpp joined
09:38 milad joined
09:39 jkreeftmeijer joined
09:48 PaReeOhNos joined
09:50 jkreeftmeijer joined
10:01 milad joined
10:01 dastagg joined
10:04 icanhazbroccoli joined
10:06 jkreeftmeijer joined
10:10 hashpuppy joined
10:11 lexmag joined
10:12 ultra|lazer joined
10:20 MotherFlojo joined
10:25 dch_ joined
10:26 dimitarvp joined
10:27 nd___ joined
10:28 milad joined
10:31 MotherFlojo joined
10:33 wsieroci joined
10:39 nd___ joined
10:39 gmcabrita joined
10:41 squallstter joined
10:42 xsrsx joined
10:42 milad joined
10:44 milad joined
10:54 milad joined
10:54 milad joined
10:58 wsieroci joined
11:11 steffkes joined
11:26 ultra|lazer joined
11:34 cemilowski joined
11:37 jkreeftmeijer joined
11:47 Tica2 joined
11:48 InternetFriend joined
11:49 jkreeftmeijer joined
11:56 hotpancakes joined
11:58 PaReeOhNos joined
11:59 milad joined
12:01 wyzzard_ joined
12:08 dch_ joined
12:14 PaReeOhNos joined
12:27 proteusguy joined
12:29 cemilowski joined
12:31 dtusk joined
12:32 dtusk joined
12:34 cemilowski joined
12:36 ultra|lazer joined
12:36 jkreeftmeijer joined
12:45 hotpancakes joined
12:45 l14n joined
12:54 scrmpy joined
12:54 yial2 joined
12:56 <yial2> question regarding Phoenix "force_ssl" option - is it possible for a certain directory to be exception? For example, I want everything on the server to server through https beside static html files under "abc" directory
12:56 Ilyes512 joined
12:57 <Ilyes512> hey guys what frontend library are you using with elixir as the backend?
12:58 <Ilyes512> I am thinking about vuejs or react. I like vuejs, but i think react is more "functional" and so fits better with elixir? thought?
12:59 fernandomm joined
12:59 <Ankhers> Ilyes512: That is the great thing. You can just use Elixir as the backend and use anything you want as the front end. You don't even need to use Elixir to serve your frontent!
12:59 <Ankhers> s/frontent/content
13:00 <Ankhers> Wanted to say front end or content. Decided on both...
13:00 <Ilyes512> I know
13:00 <Ilyes512> I am not a rails dev so I am used to using whatever I want :P
13:00 <Ilyes512> but the question is what are you guys using.
13:01 <Ilyes512> I think react is a better fit then any of the other bigger frameworks like angular2+ and vuejs
13:01 <Ankhers> Well, I have one project using just es6. I have another where I am using Elm. And I am about to start a third, but we haven't decided what to use.
13:03 <Ilyes512> I am already using typescript in the backend (node) and typescript in the frontend with angular2. Laravel in the backend with vuejs in the front etc.
13:04 <Ilyes512> I never done any elixir projects with a frontend so that why I am thinking about what to choose
13:05 <Ilyes512> I like the graphql idea and because i thought react is more functional i think thats a good fit. I reserve Elm for later projects :)
13:05 <micmus> we have react, but we also have two separate teams for front- and back-end
13:06 <Ilyes512> we have fullstack teams on work but in this case this is for personal projects
13:06 <Ilyes512> dont use elixir (yet) for work :(
13:06 <Ilyes512> anyone here used vuejs?
13:07 ZippoWeb2 joined
13:07 <Ilyes512> its really awesome but it is a reactive framework and so things are not immutable. hmm Maybe I just need to toss a coin :P
13:12 sfbw joined
13:12 steffkes joined
13:12 steffkes joined
13:28 RexM joined
13:39 meh` joined
13:42 m_m joined
13:43 jkreeftmeijer joined
13:44 hotpancakes joined
13:46 hotpancakes joined
13:46 mitchellhenke joined
13:47 m_m_ joined
13:50 milad joined
13:53 r00tl3ss joined
13:55 <scrmpy> can you have an external project depend on a specific app in another umbrella project?
13:57 bturnbull joined
13:58 jeramyRR joined
14:01 xsrsx joined
14:02 rodolfojcj joined
14:05 dimitarvp` joined
14:05 Guest67 joined
14:06 PaReeOhNos joined
14:07 mitchellhenke joined
14:12 wsieroci joined
14:22 milad joined
14:22 <Ankhers> scrmpy: Kinda. You can use a file path to specify a dependency. You could also push that one app up to mix, assuming it isn't private.
14:24 <scrmpy> yeh playing around with path atm, are there any caveats/gotchas to that approach?
14:27 xsrsx joined
14:30 elbow-jason joined
14:39 icanhazbroccoli joined
14:39 dch_ joined
14:39 hotpancakes joined
14:41 agit0 joined
14:42 lexmag joined
14:44 hotpanca_ joined
14:45 <Ankhers> scrmpy: All developers need the same paths setup.
14:46 elbow-jason joined
14:46 <scrmpy> ok, that shouldn't be a problem (isn't intended to be put on hex)
14:49 InternetFriend joined
14:49 jeramyRR joined
14:50 <scrmpy> one issue I'm having with my test however is if project A depends on project B.B (relative path to it), but project B.A depends on A, and B.B doesn't depend on either. A works fine, but if I try and run the umbrella B it complains about differing dependencies. so in B I explcitly specify dependency B.B as "override: true". then that works fine.
14:50 <scrmpy> however then if I have project C that depends on A and B, it now complains about the same thing. only way to get C to work is to remove the override in project B. any ideas?
14:50 xsrsx joined
14:52 hotpancakes joined
14:54 <Ankhers> Sounds like you are not using umbrellas correctly.
14:54 <scrmpy> :( oh
14:55 <scrmpy> is that kind of relationship not possible with them?
14:55 wyzzard joined
14:56 <scrmpy> I know I can do it with regular projects, however would ideally like project B in that scenario to be an umbrella project
14:57 Trpger joined
14:58 Trpger left
14:59 <Ankhers> What is the purpose of B being an umbrella if nothing depends on eachother?
15:00 elbow-jason joined
15:00 <scrmpy> oh I want B.A to be the main app, and B.B to be an API to that app (essentially just a wrapper around the messages to send to it).
15:01 <scrmpy> it's essentially just so I can get around circular dependencies. but thought instead of having everything in separate projects, maybe combining the app and its api in an umbrella could be a simpler way to do it
15:05 whharris joined
15:08 <Ankhers> If you have circular dependencies, you are doing something wrong.
15:08 <elbow-jason> scrmpy: I use umbrellas for all my apps
15:09 <elbow-jason> I separate my umbrellaed apps into layers
15:09 <elbow-jason> such as… I have an umbrella called “Db” that is Ecto Models, and Repo
15:09 <elbow-jason> The Db layer does not know about any other layers
15:10 <elbow-jason> it sits off to the side and gets used by other apps
15:10 <elbow-jason> usually the web layer of my umbrellas is the most dependent...
15:10 <elbow-jason> it knows about everything
15:11 <scrmpy> Ankhers: the circular dependencies are just because I have numerous apps talking to each other, but to simplify inter-app communication I have wrappers for all those apps (so the actual messages being sent are hidden, and simple function endpoints are exposed instead). because of this I need to make the wrappers separate projects, so there's not circular dependencies (rather an app can just depend on another apps api project, and vice ver
15:11 <elbow-jason> as far as dependencies… I just make sure to loosen the requirements
15:12 <elbow-jason> such as {:httpoison, "~> 0.9.2 or ~> 10.0 or ~> 11.0"}
15:13 <scrmpy> elbow-jason: are any of your projects interconnected or are they all separate/self-contained and it's just the web endpoint that needs to bring them all together?
15:13 steffkes joined
15:14 <elbow-jason> most are independent
15:14 <elbow-jason> I usually have one stateless app called `utils` that houses my helper functions
15:14 <elbow-jason> all apps know about this app, but it’s only for changing the stucture of data, not for holding state
15:15 <elbow-jason> I wish I could draw a picture
15:15 <elbow-jason> :P
15:15 <scrmpy> lol
15:17 <elbow-jason> scrmpy: try to think of your app in layers
15:17 <elbow-jason> for instance… you may have three data stores…
15:18 <elbow-jason> a postgres, an elasticsearch, and a aws s3…. put each of these things in it’s own app
15:18 hotpancakes joined
15:18 <elbow-jason> these 3 data stores should not know about each other
15:18 <elbow-jason> so you build a central app with all the logic about how they should interact
15:19 <elbow-jason> then you put a phoenix project in an app and it uses the central app to serve content/api stuff
15:20 <elbow-jason> makes sense?
15:20 <scrmpy> my app isn't really a single app in the convential sense though, it's numerous apps (which may be on separate nodes or clusters of nodes, different configurations for handling failover applied to them, etc.)
15:20 <elbow-jason> this concept still applies for distributed apps
15:21 felideon joined
15:24 <scrmpy> I see, I'll definitely have to look into it more. I was under the assumption you couldn't configure how each internal individual application will be released/distributed if you were using an umbrella
15:24 adgtl joined
15:25 dastagg joined
15:25 hotpancakes joined
15:31 meandi joined
15:33 tuacker joined
15:34 TinkerTyper joined
15:36 gokr joined
15:40 <jeramyRR> Hi all, I'm running a bunch of concurrent processes to parse a binary file, but I'm not seeing any other cores being used other than the first
15:40 <jeramyRR> err, that should have said to parse a lot of binary files
15:40 <jeramyRR> not just one
15:41 <jeramyRR> One process per file, about 30 files. All my processes seem to be running from the 1st core
15:44 jkreeftmeijer joined
15:45 icanhazbroccoli joined
15:47 duane joined
15:50 <Ankhers> jeramyRR: Might be a couple dumb questions, but are the files small? Are you starting 1 process, waiting for the response, then starting another?
15:50 <jeramyRR> I'll create a gist of what I'm doing real quick
15:51 Guest67 joined
15:54 <jeramyRR> Ankhers: https://gist.github.com/jeramyRR/7c0d9d531174f8643b700032e8523b1e
15:55 bitmod joined
15:57 meh` joined
15:58 <jeramyRR> Ankers: I also added a screenshot of observer after running the commands in the gist
16:05 <Ankhers> How big are these files?
16:05 rs` joined
16:05 <jeramyRR> A few MBs
16:05 <jeramyRR> but once i get into real testing they will range from 1gb to about 20gbs each
16:07 <elbow-jason> jeramyRR: NitfParser.Worker.start_link <---
16:07 <elbow-jason> are you sure this is starting a different worker each time?
16:08 <jeramyRR> doh
16:08 <jeramyRR> thanks elbow-jason
16:08 <elbow-jason> :) np
16:08 <jeramyRR> wait
16:08 laut joined
16:08 <jeramyRR> I used NitfParser.Worker.start_link
16:09 <jeramyRR> I didn't name it
16:09 <elbow-jason> oh oh
16:09 <jeramyRR> and when I print out pids, I get a different one for all of them
16:09 <Ankhers> I'm pretty sure that does start a new worker each time. You can verify that by just printing though.
16:09 <elbow-jason> back to square one...
16:09 rs` joined
16:11 <Ankhers> It is possible that between the IO, the BEAM is just using the 1 core because it only needs to.
16:11 <elbow-jason> unlikely
16:12 meandi_2 joined
16:12 <jeramyRR> I added some output to the comments
16:12 <Ankhers> Agreed, but based on the code shown, there isn't anything obvious.
16:13 rs` joined
16:14 <Ankhers> Silly question, but why are you doing Enum.map 1..Enum.count(files) instead of just doing Enum.map files? You aren't using the number anyways...
16:15 <jeramyRR> good point
16:15 dignifiedquire joined
16:16 <Ankhers> In that map, if you use the files list, you could just manually zip it at the time of starting the workers instead of zipping after.
16:17 cfreeze joined
16:18 <cfreeze> What is the erlang module :gen?
16:18 <iFire> Anyone familiar with riak? I'm trying to access a strongly consistent key in a bucket and this fails.
16:18 <iFire> Riak.find(pid, "strongly_consistent", "test", "hello")
16:18 <cfreeze> As seen in fishcakez connection example https://github.com/fishcakez/connection/blob/master/lib/connection.ex
16:19 <iFire> Riak.Bucket.Type.list(pid, "strongly_consistent")
16:19 <iFire> {:ok, ["test"]}
16:19 elgenie joined
16:19 <iFire> Any suggestions?
16:19 hotpancakes joined
16:20 <cfreeze> "gen.erl implements the generic parts of gen_server" Oh i see, he uses it for the custom OTP behavior of his connection
16:21 <cfreeze> Someone please correct me if I am misunderstanding something
16:22 l14n_ joined
16:25 <jeramyRR> going to ask the slack channel to get more eyes on this
16:26 PaReeOhNos joined
16:27 vhf joined
16:28 bturnbull joined
16:28 <vhf> I'm using an agent in a phoenix 1.3 app and it works nicely. In application.ex I simply do worker(MyApp.MyAgent, [])
16:28 hotpancakes joined
16:28 <vhf> now I'm trying to add a new Agent, but only the first one starts
16:29 <vhf> I tried swaping the order: putting my new agent before the other one, same thing: only the first worker() starts
16:29 <vhf> any idea why?
16:31 hotpancakes joined
16:33 codestorm joined
16:33 wsieroci joined
16:33 dch_ joined
16:38 hotpancakes joined
16:38 Guest67 joined
16:39 <nox> There are more people on Slack than here? oO
16:40 <vhf> times are changing
16:41 hotpancakes joined
16:47 jkreeftmeijer joined
16:55 <codestorm> benwilson512: I wanted to hit you up about something if you're around
16:55 colrack joined
16:56 <mwbrown> Sgeo: I too got an AV warning and I checked my scrollback
16:57 <mwbrown> turns out there was a guy spamming join/quit and the quit message had a javascript tag in it that points to a malicious URL
16:57 vmoravec joined
16:57 <mwbrown> Nick was 'alect' if you feel like searching your logs
16:58 mika_ joined
17:06 whharris joined
17:08 <benwilson512> jeramyRR: your `def parse` is a synchronous call https://github.com/jeramyRR/NITFParser/blob/master/lib/nitf_parser/worker.ex#L10
17:08 <benwilson512> you aren't doing any async work
17:09 <jeramyRR> yep, @gregvaughn pointed that out to me on slack. I'm about to change it up so that I have a no_reply call, do the work, and then send the struct back to the from
17:10 <jeramyRR> either way though, i started all those workers and I would have thought that some of them would have been doing the work on another core regardless
17:10 hotpancakes joined
17:11 <benwilson512> it sounds like you really just want Task.async_stream
17:11 <benwilson512> or GenStage
17:11 <benwilson512> I mean implementing it yourself can be a handy learning experience but
17:12 <benwilson512> both of those tools will enable you to this in a much simpler way
17:13 <jeramyRR> hm
17:13 <jeramyRR> GenStage I haven't really looked at all that much
17:13 <benwilson512> for your particular purposes though
17:13 <jeramyRR> This is an example for an intro to Elixir talk I'm giving at work
17:13 <benwilson512> Flow would likely be enough
17:13 <benwilson512> ah
17:13 <jeramyRR> So I wanted to be able to explain everything
17:13 <benwilson512> gotcha
17:14 <benwilson512> based on your gist from earlier btw
17:14 <benwilson512> I think it could literally just be
17:14 <benwilson512> files |> Task.async_stream(&parse/1, max_concurrency: 8) |> Stream.run
17:14 <benwilson512> and you're done
17:14 steffkes joined
17:14 steffkes joined
17:14 <jeramyRR> really?
17:14 <jeramyRR> k, going to try that real quick
17:15 <benwilson512> well you'd want to make sure that the `parse` there was the regular parsing function, not a Worker.parse
17:15 <benwilson512> you wouldn't bother with the workers at all
17:15 <jeramyRR> k
17:15 <mrus> Does anyone know how to access the version defined in mix.exs inside my Elixir application?
17:15 <benwilson512> you'd use https://github.com/jeramyRR/NITFParser/blob/master/lib/nitf_parser/nitf_parser.ex#L50
17:15 icanhazbroccoli joined
17:17 <benwilson512> jeramyRR: for very large files you should consider using a stream
17:17 <benwilson512> instead of reading the whole file
17:18 <jeramyRR> Yeah getting to stream was going to be my next thing, but I'm only reading a very small part of the file atm and then closing it.
17:18 <benwilson512> gotcha
17:18 <jeramyRR> Unless File.open puts the whole thing in memory, but I don't think it does
17:18 <benwilson512> it does not no
17:18 <benwilson512> so you're fine
17:18 <jeramyRR> so I did Task.async... and I'm getting back an :ok
17:18 <benwilson512> ah sorry so
17:18 <benwilson512> Stream.run just returns OK
17:18 <codestorm> hi benwilson512. I wanted to kick around an idea for supporting rest and graphql if you have a few minutes
17:19 <jeramyRR> now i need to put it into something right
17:19 <benwilson512> jeramyRR: you probably want |> Enum.to_list or something
17:19 <benwilson512> codestorm: hey!
17:19 <benwilson512> fire away
17:19 <fishcakez> cfreeze: gen is undocumented module, it has helpers to build otp process. It's used in Connection to do non blocking connect without using messages
17:19 <fishcakez> At some point there is enter_loop to enter GenServer loop as normal
17:19 <cfreeze> Ah thanks for the clarification
17:19 <jeramyRR> benwilson512, just did that with Enum.into, but it's still only using one core
17:19 <benwilson512> can you post the code?
17:20 <codestorm> my company wants to support REST, with optional graphql as well
17:20 <jeramyRR> files |> Task.async_stream(&NitfParser.Parser2.parse/1) |> Enum.into([])
17:21 <codestorm> graphql is popular with the devs, on the surface, but to mitigate risk, REST is required
17:21 <jeramyRR> if i run it like 10 times in a row though i start to see a second core entering the mix
17:22 <benwilson512> jeramyRR: how many files are there?
17:22 <codestorm> so I was thinking that a cool way to manage this would be to have graphql on each service, then have a REST server that would speak to microservices over graphql
17:22 <benwilson512> and how much of it are you opening?
17:22 <jeramyRR> 41
17:22 <jeramyRR> opening up the first 500 bytes or so
17:22 <codestorm> so we get both, but only need graphql on the microservices
17:22 <benwilson512> oh
17:22 <benwilson512> jeramyRR: each process may be finishing so fast you never get to the second process
17:23 <benwilson512> codestorm: yeah so what some folks do is basically
17:23 <benwilson512> https://www.irccloud.com/pastebin/a81unRdz/
17:23 <codestorm> and I'm thinking the rest server could be very lightweight, and would really just map graphql requests inside rest controllers
17:23 <benwilson512> you could even have it in the same application if you're doing phoenix
17:23 <benwilson512> or as an umbrella
17:23 <benwilson512> and not incur additional HTTP overhead
17:24 <codestorm> that's kind of the reverse of people with legacy REST APIs putting a graphql server on the front end
17:24 <benwilson512> haha yeah
17:24 <codestorm> seem like you might even be able to make a declarative mapping
17:24 <codestorm> any thoughts on that?
17:25 <benwilson512> yeah one sec sorry
17:26 m_m joined
17:28 ZippoWeb2 joined
17:28 <codestorm> thanks for that, that could work.
17:28 <codestorm> I had something slightly different in mind,
17:29 <codestorm> having only REST on the front end server, then passing GQL messages to microservices over a bus or queue, to avoid HTTP overhead
17:31 <nox> Can't you do GraphQL queries over a WebSocket?
17:31 <benwilson512> yeah you can do them over basically anything
17:31 <benwilson512> the right choice here sorta depends on the relationship between the services really
17:31 <micmus> and now I broke the elixir compiler (only locally though). Yay me!
17:32 <micmus> And helpfully, I get no stacktrace :D
17:32 <micmus> I guess that's a punishment for breaking the compiler - no stacktraces for you!
17:33 <codestorm> benwilson512: have you heard of anyone doing what I'm suggesting? I'm wondering if there's already some open source code out there
17:34 <benwilson512> codestorm: I know that this stuff happens at the larger organizations using graphql but I think a lot of it is in house
17:34 <benwilson512> sorry on another call, one min
17:34 <codestorm> np
17:39 hotpancakes joined
17:40 <benwilson512> codestorm: back
17:40 <benwilson512> ok
17:40 <benwilson512> codestorm: so you're looking at having a graphql service in Elixir yes?
17:40 <benwilson512> and then separate rest services in... what?
17:40 <codestorm> yes, multiple services
17:40 <codestorm> Elixir
17:40 <benwilson512> ok
17:41 <benwilson512> and you definitely want to deploy these things as fully fledged separate services?
17:41 <benwilson512> vs just separate erlang application?
17:41 <codestorm> so, in the long run,
17:41 <codestorm> we'd like to use a message bus or similar for requests to services
17:42 <codestorm> so REST wouldn't make sense in that scenario
17:42 <benwilson512> I see
17:42 <benwilson512> so you may as well have the REST service hit the API the same way
17:42 <codestorm> so rather than having rest on each microservice, there would be a single REST gateway
17:42 <codestorm> exactly
17:43 <benwilson512> that definitely sounds like a good plan, but I'm afraid I don't have a lot to say WRT implementation
17:43 <benwilson512> I was chatting about a month or so ago with a company that was planning on doing something similar
17:43 <benwilson512> but I'm fuzzy on who that was
17:44 <benwilson512> on some level a lot of the architectural questions won't be that specific to graphql
17:44 <codestorm> ok, cool. Thanks for the feedback. It's helpful to know there's nothing widely used already to do this
17:45 <benwilson512> I suppose the main thing you would benefit from is the ability to generate the graphql queries you'd want coming from REST
17:45 <benwilson512> but honestly REST responses are pretty static so a static string document would likely work fine
17:45 <benwilson512> and then you encode any params as variables
17:46 <benwilson512> and then push both over whatever message bus you're using
17:46 <codestorm> yes, sounds good
17:47 <codestorm> one thing I want to avoid, is writing thick REST controllers, only to have them obsoleted once the message bus is in place
17:47 cemilowski joined
17:49 hotpancakes joined
17:50 jeramyRR joined
18:04 PaReeOhNos joined
18:09 wyzzard joined
18:09 squallstter joined
18:09 bturnbull joined
18:12 icanhazbroccoli joined
18:13 gem joined
18:21 colrack joined
18:22 wsieroci joined
18:23 ejpcmac joined
18:26 hotpancakes joined
18:26 hotpanca_ joined
18:28 nepiktaz joined
18:31 milad joined
18:32 icanhazbroccoli joined
18:46 dean_____ joined
18:47 hotpancakes joined
18:49 dean_____ joined
18:51 InternetFriend joined
18:54 <HalcyonicStorm> finally living the elixir life, friends
18:54 <HalcyonicStorm> it is a good day
18:56 jkreeftmeijer joined
18:57 Cohedrin joined
19:05 Ilyes512 joined
19:06 bturnbull joined
19:14 hotpancakes joined
19:15 steffkes joined
19:15 steffkes joined
19:19 wsieroci joined
19:19 whharris joined
19:22 hotpancakes joined
19:26 mitchellhenke joined
19:27 Stratus3D joined
19:33 liam_ joined
19:34 ultra|lazer joined
19:34 <ultra|lazer> Hey everyone
19:38 codestorm777 joined
19:38 Ioyrie joined
19:40 Ayey_ joined
19:42 sillyotter joined
19:47 cemilowski joined
19:54 hotpancakes joined
19:57 dean___ joined
19:57 jkreeftmeijer joined
20:03 wsieroci joined
20:03 PaReeOhNos joined
20:04 dean___ joined
20:04 milad joined
20:07 PaReeOhNos joined
20:10 jeramyRR joined
20:17 colrack joined
20:17 <ultra|lazer> anyone here familiar with Poison?
20:17 <ivan> you can just ask :-)
20:19 <ultra|lazer> ok
20:19 <ultra|lazer> I'm trying to encode a database result, and keep getting this error: unable to encode value: {nil, "users"}
20:19 <elbow-jason> tuples have no json equivalent
20:19 <elbow-jason> you must remove them or turn them too lists or maps
20:20 <ultra|lazer> it looks like a map when I inspect the result
20:20 <dch_> ultra|lazer: paste the result? it looks like a tupl ^^^
20:20 <elbow-jason> it’s an Ecto assoc not loaded right?
20:20 <ultra|lazer> yeah ecto assoc not loaded
20:20 <elbow-jason> one sec
20:22 <ultra|lazer> https://pastebin.com/aaH9qL90
20:22 <elbow-jason> ultra|lazer: @derive {Poison.Encoder, except: [:__meta__, :__struct__]}
20:22 <elbow-jason> put that into your model’s module and try it again
20:23 nd__ joined
20:23 <ultra|lazer> awesome, thank you elbow-jason
20:24 <elbow-jason> very welcome
20:24 <ultra|lazer> It didn't fix it, but i think it has given me enough clues to figure it out
20:25 <elbow-jason> oh one se
20:25 <ultra|lazer> I had this project set up on another computer, and for some reason when I moved it to this computer and started working on it, the database associations got messed up?
20:27 <elbow-jason> https://gist.github.com/elbow-jason/434b277ab0a8d8cbac48f1866972bad5
20:28 wyzzard joined
20:28 jeramyRR joined
20:28 <elbow-jason> ultra|lazer: that’ll turn any Ecto assoc not loaded into a `null` in the json
20:29 <elbow-jason> ultra|lazer: that’s the code I meant to give you in the first place :P
20:29 <ultra|lazer> ahh ok
20:30 RexM joined
20:50 duane joined
20:51 ejpcmac left
20:51 hotpancakes joined
20:53 willyk joined
20:53 willyk left
20:56 wsieroci joined
20:58 wsieroci_ joined
21:02 hotpancakes joined
21:05 dean___ joined
21:08 Cohedrin joined
21:11 m_m joined
21:14 josevalim joined
21:16 steffkes joined
21:16 steffkes joined
21:18 ekmartin joined
21:22 hotpancakes joined
21:27 Gasher joined
21:27 hotpancakes joined
21:29 Lykve joined
21:30 hotpanca_ joined
21:34 codestorm joined
21:37 gvaughn joined
21:38 rs` joined
21:39 wsieroci joined
21:41 gvaughn_ joined
21:42 Cohedrin joined
21:45 gvaughn_ joined
21:47 tuacker1 joined
21:58 jkreeftmeijer joined
21:59 elgenie joined
22:00 codestorm joined
22:01 tuacker joined
22:01 gvaughn joined
22:06 fernandomm joined
22:07 jeramyRR joined
22:09 gvaughn joined
22:15 siruf__ joined
22:38 nahtnam joined
22:40 Cohedrin joined
22:46 whharris joined
22:52 InternetFriend joined
22:55 shymega joined
22:59 Ayey_ joined
22:59 PaReeOhNos joined
23:00 jkreeftmeijer joined
23:02 colrack joined
23:05 jer joined
23:13 Ven joined
23:16 mika_ joined
23:17 steffkes joined
23:17 steffkes joined
23:18 ZippoWeb2 joined
23:19 MotherFlojo joined
23:25 mika_ joined
23:31 willyk joined
23:37 Ayey_ joined
23:38 codestorm joined
23:45 Ilyes512 joined
23:47 namidar__ joined
23:58 Ayey_ joined