<     May 2017     >
Su Mo Tu We Th Fr Sa  
    1  2  3  4  5  6  
 7  8  9 10 11 12 13  
14 15 16 17 18 19 20  
21 22 23 24 _2_5 26 27  
28 29 30 31
00:00 craigger joined
00:01 <PeregrinePDX> Hmm no nevermind your app is named Test it looks like.
00:01 <bitmod> PeregrinePDX: test is the name of my application
00:01 <bitmod> yeah sorry it's a little confusing
00:01 <bitmod> PeregrinePDX: could it be a docker issue?
00:01 <bitmod> i.e. accessing postgres from inside docker is having issues?
00:01 <PeregrinePDX> Yeah, sorry you're beyond my phoenix, elixir knowledge and I don't use docker so I have no clue on the docker side of things.
00:02 <bitmod> PeregrinePDX: ok no worries man, appreciate the help regardless
00:02 <PeregrinePDX> So your postgres server is not inside docker container?
00:02 <bitmod> PeregrinePDX: no postgres is outside of docker (won't it lose its data if its in a container?)
00:03 <* PeregrinePDX> shrugs.
00:03 <PeregrinePDX> I don't know docker.
00:03 <PeregrinePDX> I found this maybe it helps. https://gist.github.com/averagehuman/fcabcd0847a36ced38a9
00:03 nhooyr joined
00:04 pbj joined
00:05 sunaku joined
00:06 nhooyr joined
00:07 nhooyr joined
00:09 <bitmod> PeregrinePDX: didn't work unfortunately, but thanks ;)
00:09 northfurr joined
00:09 <bitmod> ill check in #docker
00:09 chung joined
00:15 cschneid_ joined
00:19 elgenie joined
00:30 wpcarro joined
00:40 southpawlar joined
00:43 wpcarro joined
00:54 WhiskyRyan joined
01:03 pbj joined
01:16 rkazak joined
01:28 gvaughn__ joined
01:30 sfbw joined
01:36 griffinbyatt joined
01:36 cschneid_ joined
01:40 tomterl joined
01:56 __charly__ joined
02:02 elgenie joined
02:17 sfbw joined
02:20 r00tl3ss joined
02:24 cmk_zzz joined
02:26 northfurr joined
02:26 srxa joined
02:31 pbj joined
02:32 sunaku joined
02:50 jmcintosh joined
02:54 rkazak joined
02:54 sfbw joined
03:21 hugo_dc joined
03:24 northfurr joined
03:29 ssswitch joined
03:37 r00tl3ss joined
03:49 jmcintosh joined
04:02 elgenie joined
04:06 r00tl3ss joined
04:20 nii236 joined
04:26 mika_ joined
04:42 dysfigured joined
04:42 <dysfigured> fiddling around with elixir a bit, any good vim plugins i should check out?
04:52 <NightMonkey> dysfigured: syntastic has definitions for elixir, and there is vim-elixir, but I've not playwed with that too much yet.
04:52 nahtnam joined
04:54 <dysfigured> ah i've ditched syntastic for https://github.com/w0rp/ale it's async, so i can lint errors and such as i create them
04:54 <dysfigured> https://github.com/slashmili/alchemist.vim looks pretty sweet
04:55 sfbw joined
04:57 treaki_ joined
04:58 sfbw joined
05:06 srxa_ joined
05:13 dec0n joined
05:14 wsieroci joined
05:15 wsieroci_ joined
05:18 sfbw joined
05:22 r00tl3ss joined
05:23 gvaughn joined
05:25 <NightMonkey> dysfigured: Hey, Ale looks neat, thanks.
05:26 <dysfigured> it's super neat, i think having a tight feedback loop with your linter helps you write better [styled] code as a habit, rather than just because your linter made you clean it up later
05:26 <dysfigured> if it yells at you that xyz is bad as soon as you do it, you learn quicker that xyz is bad
05:27 sfbw joined
05:28 <NightMonkey> dysfigured: Yes, I could see how that could be helpful to have such a tight feedback loop. Plus, it is the first Vim plugin I've seen that has a section on reducing laptop power usage! ;)
05:39 sfbw_ joined
05:43 craigp joined
05:44 wsieroci joined
05:50 aniketd joined
05:51 griffinbyatt joined
05:54 wsieroci joined
05:58 craigp joined
06:01 r00tl3ss joined
06:03 proteus-guy joined
06:06 yourname joined
06:08 l14n joined
06:13 hakunin joined
06:17 bigkevmcd joined
06:18 gvaughn joined
06:19 arpunk1 joined
06:19 leons__ joined
06:19 adulteratedjedi joined
06:19 hakunin joined
06:19 srxa joined
06:20 proteusguy joined
06:20 jaydoane joined
06:20 r00tl3ss joined
06:21 CARAM__ joined
06:22 wpcarro joined
06:23 spawnthink[m] joined
06:24 Lex[m]1 joined
06:24 yourname joined
06:30 cemilowski joined
06:36 sunaku joined
06:44 __charly__ joined
06:46 imack joined
06:52 griffinbyatt joined
06:53 ZippoWeb joined
06:53 jkreeftmeijer joined
06:54 craigp joined
07:01 tuacker joined
07:03 iamvery joined
07:06 jkreeftmeijer joined
07:07 hbraun joined
07:08 jkreeftm_ joined
07:09 bigkevmcd joined
07:13 ejpcmac joined
07:13 ejpcmac left
07:16 cemilowski joined
07:18 mattyw joined
07:19 asabil joined
07:20 jkreeftmeijer joined
07:25 jkreeftmeijer joined
07:29 gazler joined
07:29 mark_66 joined
07:30 craigp joined
07:30 jkreeftmeijer joined
07:35 jkreeftmeijer joined
07:36 r00tl3ss joined
07:42 jkreeftmeijer joined
07:43 srxa_ joined
07:48 apotry joined
07:53 griffinbyatt joined
07:54 r00tl3ss joined
07:56 blahdodo joined
07:56 Guest67 joined
07:58 __0xAX joined
08:05 ZippoWeb joined
08:05 akeating joined
08:12 stephen_m joined
08:12 dec0n joined
08:13 Douman joined
08:15 PaReeOhNos joined
08:15 <Douman> Hello, started diving into elixir and im curious where to start with HTTP servering in Elixir?
08:16 <gazler> Douman: phoenix is the most popular framework.
08:16 <gazler> http://www.phoenixframework.org/
08:18 <Douman> hm... seems very high level, but thanks i'll take a look
08:18 HashNuke joined
08:19 <PaReeOhNos> Douman: If you want lower level then you could look at plug https://github.com/elixir-lang/plug That's what Phoenix uses internally
08:19 <gazler> Douman: If you just want a webserver then you have a few options in Erlang. Cowboy and Elli off the top of my head. There are others.
08:21 <Douman> aha thanks. I'm thinking to just play a bit with Elixir for now. It is a bit difficult to get used to used concepts
08:22 <Douman> something high level might hide lots of stuff i guess
08:23 akeating joined
08:24 Uniaika joined
08:24 josevalim joined
08:33 clemlais joined
08:35 wpcarro joined
08:36 gvaughn joined
08:36 flaviodesousa joined
08:39 gmcabrita joined
08:41 colrack joined
08:41 l14n_ joined
08:45 <Douman> can i specify cache location for Hex?
08:48 <gazler> Douman: I think you can use HEX_HOME to change from ~/.hex
08:48 <Douman> cool thanks
08:49 <gazler> It's not documented though, so not sure if it is officially supported.
08:49 <Douman> i'm surprised as usually such tools have something like that
08:51 akeating joined
08:52 <gazler> Douman: https://github.com/hexpm/hex is the repo. The docs from the site (https://hex.pm/docs/tasks) are at https://github.com/hexpm/hexpm/blob/master/lib/hexpm/web/templates/docs/tasks.html.eex if you want to PR it in.
08:54 griffinbyatt joined
08:56 inoas joined
08:57 <Douman> gazler: The problem is that i'm not sure it is suitable here as it is just mix interface to hex. Hex just doesn't have something like configuration docs
09:01 <Douman> what is strange i cannot find occurances of `HEX_HOME` in hexpm code
09:01 <gazler> Douman: check in hexpm/hex
09:02 <Douman> ah... tools is separated
09:02 <gazler> hex is the client, hexpm is the web application.
09:04 <Douman> found yeah... Well, i'm not sure where to put HEX_HOME when they got no docs for hex itself :D
09:04 <gazler> Douman: Right, so the docs for hex are on this page I think. https://hex.pm/docs/tasks
09:05 <gazler> HEX_API_URL is documented.
09:05 <Douman> yeah but it is for mix. The same need to be dobule-documented for rebar3
09:05 <gazler> I'd guess HEX_HOME would be documented in https://hex.pm/docs/tasks#hex_config if you were supposed to use it. I'd check with one of the maintainers.
09:06 <ericmj> Looks like the docs for HEX_HOME was lost when some docs were moved
09:06 eddd joined
09:06 <Douman> I'd think it would be better to have just list of environment variables that can affect hex tool
09:07 <Douman> since it is common for both mix and rebar3
09:07 <gazler> I don't think it applies for rebar.
09:07 <Douman> but rebar3 uses hex right?
09:07 <ericmj> yes, but they are different tools
09:08 <ericmj> so they might have different configs
09:08 <gazler> rebar3 uses hex.pm, but not the hex client.
09:08 <Douman> ah... rebar3 access hex.pm directly
09:08 <Douman> while mix uses hex cli
09:08 <Douman> rebar3 even have separate docs
09:10 <Douman> Why not to add mention of where hex stores its configuration here?
09:10 <Douman> https://hex.pm/docs/usage
09:12 marr joined
09:13 Cloudflare joined
09:15 asabil joined
09:20 <cmk_zzz> What is elixir's equivalent of a proplists? You still use proplists for erlang proplists?
09:21 <cmk_zzz> I tried Keyword but it doens't recognise single atom entities in the proplists
09:22 Uniaika joined
09:26 gmcabrita joined
09:27 <josevalim> cmk_zzz: we don't have an equivalent per se. if you literally have proplists, then i would recomend using the proplists module
09:29 <gazler> cmk_zzz: You can still do things like [:foo, bar: :baz] though, as long as the keyword list is last.
09:31 <cmk_zzz> josevalim: ok, thanks. I have some code in erlang library I want to use which uses proplists so perhaps I'll change that instead to return {:key, :true} values instead
09:31 <Douman> it seems dialyzer gets wrong deps path when you set MIX_HOME
09:31 jkreeftm_ joined
09:32 alisdair joined
09:32 sa1_ joined
09:32 <Douman> HEX_HOME*
09:32 fxn joined
09:33 <cmk_zzz> gazler: yes, but if I do things like Keywork.keys it crashes on those lists
09:35 asabil_ joined
09:37 <gazler> cmk_zzz: The downside of the proplist api is that it takes the list as the 2nd argument, so it doesn't pipe well.
09:38 <cmk_zzz> gazler: yes, that is one of its downsides:) that's why I was hoping for an elixir compatible improvement
09:39 <gazler> https://github.com/knrz/proplist "Is it any good? Yes."
09:40 <cmk_zzz> actually I can do proplists:unfold before returning to elixir and I have a Keyword compatible list
09:41 <cmk_zzz> gazler: except it doesn't actually support single atom values :)
09:42 <gazler> Heh, I didn't actually look at the code.
09:43 <cmk_zzz> yes, with a name like that you would think it would work
09:50 Uniaika joined
09:54 griffinbyatt joined
09:59 Uniaika joined
10:00 r00tl3ss joined
10:00 ramblinpeck joined
10:01 ariejan joined
10:03 lexmag joined
10:04 craigp joined
10:04 mika_ joined
10:07 lexmag_ joined
10:12 ishahnaz joined
10:12 akeating joined
10:18 kiltzman joined
10:18 elmcrest joined
10:20 asabil joined
10:24 akeating joined
10:32 r00tl3ss joined
10:35 ariejan joined
10:38 smeevil joined
10:44 <Douman> is there any tips on how to creates applications? i mostly seeing people using Supervisor.start_link
10:46 akeating_ joined
10:47 wpcarro joined
10:49 Benjojo joined
10:50 reem joined
10:53 kabisote joined
10:55 gvaughn joined
10:55 griffinbyatt joined
10:58 nhooyr joined
11:03 <nyaray> Douman: what do you mean?
11:04 <Douman> Well, i'm unsure how to organize application(not a library) code. All executables run in processes and there are many abstractions for this purpose (Task, GenServer and etc)
11:04 ariejan joined
11:05 <Douman> i'm searching examples of applications and most of them uses Supervisor.start_link for Application.start()
11:06 <Douman> In some cases these applications do not even have child processes to monitor
11:06 zv joined
11:07 sfbw joined
11:12 pbj joined
11:14 ishahnaz joined
11:14 clemlais joined
11:14 cemilowski joined
11:16 __vy joined
11:19 <nyaray> what do you mean by executables?
11:19 pbj joined
11:20 <nyaray> and.. re: the childless applications, could it be that they are just boilerplate from a generator that haven't been removed?
11:22 craigp joined
11:22 d10n-work joined
11:27 nii236 joined
11:29 cevado joined
11:30 <Douman> nyaray: by executables i mean code that is supposed to run on its own
11:30 <Douman> ah... mix new has several flags which includes --sup/--app
11:30 <Douman> maybe it is template
11:32 <nyaray> if there actually aren't children, it sounds like sloppy scaffolding, unless I'm unaware of a convention of spawning supervisors for the lulz :P
11:35 <Douman> yeah i was just surprised by that
11:42 DavidAntaramian joined
11:45 asabil joined
11:48 <nyaray> re: supervision trees... I think a good start is to try to encode your requirements/guarantees as supervisions as it, in part, will drive the design of your processes
11:48 <nyaray> like, if you have database workers, do you want them to always be able to connect on init or just to potentially hold a database connection?
11:49 <nyaray> if they're allowed to crash the whole system it means that you can't start when the database is not reachable
11:49 ZippoWeb joined
11:49 <nyaray> which, depending on what guarantees/definition of availability you want to provide, might be good or bad.
11:51 ariejan joined
11:52 <Douman> nyaray: well for now i want to make simple static file web server. Which basically is just on worker :)
11:52 <Douman> i'm noob at Elixir/Erlang stuff so anything more complex would be difficult :D
11:52 <Nicd-> you may want to look at how Plug.Static is made
11:52 jkreeftmeijer joined
11:53 <benwilson512> Douman: are you trying to implement this from scratch? or use existing libraries?
11:53 <Douman> i want to use some low level http libraries
11:53 <Douman> e.g. cowboy
11:53 <Douman> though it turns out there is builtin static file serve
11:53 <benwilson512> yeah
11:54 <gazler> https://github.com/IdahoEv/cowboy-elixir-example/blob/master/lib/cowboy_elixir_example.ex uses it from Elixir.
11:54 <nyaray> Nicd-, benwilson512 just swooped in and mentioned what I was going to point at, hah.
11:55 <nyaray> ... and gazler
11:55 <* nyaray> goes away
11:55 <gazler> nyaray: If you didn't take the time to type out that you were beaten by benwilson512 You'd have probably linked it faster. :)
11:56 jkreeftm_ joined
11:56 <Nicd-> nyaray: please don't go. the drones need you. they look up to you
11:56 <benwilson512> lol
11:59 <nyaray> hahah
11:59 <nyaray> dafuq? :P
11:59 <Nicd-> nyaray: https://www.youtube.com/watch?v=2FZNPxmTB4o
12:00 <nyaray> gonna have to check it later, no headphones on ATM
12:01 <Nicd-> it's just a voice clip from Sid Meier's Alpha Centauri saying the same thing
12:02 <Douman> btw erlang VM is usually utilizying all CPU cores?
12:03 pbj joined
12:03 <Nicd-> by default it starts one scheduler for each core
12:03 <Nicd-> for each virtual core that is
12:05 <Douman> umm... by default it can use all cores if it would need?
12:05 jkreeftmeijer joined
12:05 akeating joined
12:06 <Douman> it is just not clear when you say it starts one scheduler for each core :)
12:07 jkreeftm_ joined
12:07 <Nicd-> Erlang processes are distributed to all the schedulers automatically
12:08 <Nicd-> so each scheduler runs a process for a while and then switches to another
12:08 <Nicd-> simplified: processes will be evenly distributed across all cores automatically
12:09 <Nicd-> so your code won't be automatically distributed but if you start several processes they will run in parallel
12:09 <Douman> i see. then it means it will try to utilize all cores
12:09 <Douman> unless i'll use only few processes
12:10 griffinbyatt joined
12:14 ishahnaz joined
12:15 ZippoWeb joined
12:16 pbj joined
12:17 jkreeftmeijer joined
12:19 cemilowski joined
12:29 craigp joined
12:31 akeating joined
12:31 mattyw joined
12:34 celyr joined
12:35 jkraus joined
12:37 marr joined
12:41 pbj joined
12:42 sfbw joined
12:43 northfurr joined
12:47 akeating joined
12:51 tomtrick joined
12:51 akeating_ joined
12:59 wpcarro joined
13:04 ramortegui joined
13:12 ssswitch joined
13:13 gvaughn joined
13:13 mika_ joined
13:14 laut joined
13:14 griffinbyatt joined
13:17 dimitarvp joined
13:20 <Ankhers> Is it currently possible for an ecto adapter to create its own opts for the Ecto.Schema.field/3 macro?
13:21 fmcgeough joined
13:27 wpcarro joined
13:27 bitmod joined
13:28 <bitmod> has anyone managed to get elixir working in a docker container? i tried for hours yesterday, but every time i tried to run the container i got a "connection refused" Postgrex error, had no idea why
13:29 <Ankhers> bitmod: Can you post your docker file?
13:29 r00tl3ss joined
13:29 <bitmod> Ankhers: there's no dockerfile per say, that is to say i'm not sure where it's located, but i followed this guide: http://teamon.eu/2017/deploying-phoenix-to-production-using-docker/
13:31 <benwilson512> bitmod: I'm not sure I would follow that guide
13:31 <benwilson512> I don't see any value in hiding the actual docker file behind a mix command
13:31 <benwilson512> it sounds like a great way to have no idea what's going on
13:32 jimmyrcom_ joined
13:32 <bitmod> benwilson512: could you suggest a guide? i also tried this one (https://shovik.com/blog/8-deploying-phoenix-apps-with-docker) but got the some postgrex connection refused error
13:32 <benwilson512> ah ok i see what it's doing
13:32 <benwilson512> it looks like it handles having separate build and release images
13:32 <benwilson512> which is rather nice
13:33 <benwilson512> bitmod: are you trying to connect to postgres on the hsot machine?
13:33 <benwilson512> you'll need to bind the ports if so
13:33 r00tl3ss joined
13:33 patientplatypus joined
13:33 <patientplatypus> hi
13:33 <bitmod> benwilson512: yeah so i've got a DO droplet with docker and postgresql installed, and i want to connect my docker container to my postgres instance (which runs outside of dockere)
13:34 <benwilson512> bitmod: then yea your docker run command needs to include the `-p` stuff necessary to bind the external postgres port to the container port
13:34 <bitmod> benwilson512: how can i bind my ports?
13:34 wpcarro joined
13:34 <benwilson512> check the docker run docs, this is all 100% docker stuff
13:34 <benwilson512> nothing phoenix or elixir specific
13:35 <bitmod> ah ok
13:36 <bitmod> benwilson512: just to be clear, my app is in the container and postgres is running on my host machine
13:36 <benwilson512> yup
13:36 <benwilson512> no docker container has access to stuff on the host machine by default
13:36 maxbeizer joined
13:37 <Ankhers> bitmod: This is going to be a dumb question, but can you connect using that configuration on the command line or running the app on that machine outside of docker?
13:38 r00tl3ss joined
13:38 akeating joined
13:38 <bitmod> Ankhers: yeah, i can connect to postgres without issue from the host machine, it's only when trying to from within my phoenix container that the problem occurs
13:39 hashpuppy joined
13:40 <Ankhers> bitmod: Is that using the psql command line tool, or by running the app?
13:40 <benwilson512> something as simple as doing -p 5432:5432 may be enough
13:41 <Ankhers> That exposts that port though.
13:41 <Ankhers> s/exposts/exposes/
13:41 <bitmod> benwilson512: that gives "Error starting userland proxy: listen tcp bind: address already in use."
13:41 <benwilson512> ah right
13:41 <Ankhers> I
13:42 <benwilson512> that means the container will try to get to 5432
13:42 <benwilson512> bitmod: thanks for pointing out that library, it looks pretty cool actually, having the customize task gives you the actual dockerfiles
13:42 <Ankhers> I'm wondering if it is something with out postgres is setup. Presumably all requests from a docker container on the same host would come from, but I wonder if they don't?
13:42 <Ankhers> s/with out/with how/
13:42 <Ankhers> I am so bad at typing today...
13:43 <bitmod> benwilson512: my pleasure, it certainly makes the process a whole lot easier
13:43 <bitmod> Ankhers: honestly i'm not too sure, haven't used docker a whole lot
13:44 <Ankhers> Might be worth asking in #docker.
13:45 <Ankhers> bitmod: What is your postgres config?
13:45 <Ankhers> From elixir.
13:45 <Ankhers> Are you trying to contact localhost?
13:45 <Ankhers> I feel like you need to use instead.
13:46 <bitmod> Ankhers: is that in config/prod.exs under the url: or http: variables?
13:46 __charly__ joined
13:46 <Ankhers> Are you using ecto?
13:46 <Ankhers> Or raw postgrex?
13:47 <bitmod> Ankhers: ecto i assume, as i just created a new phoenix project
13:47 <bitmod> but the error is thrown by postgrex
13:47 gvaughn joined
13:47 <bitmod> "13:40:53.898 [error] Postgrex.Protocol (#PID<0.1207.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused"
13:48 gvaughn joined
13:48 <PeregrinePDX> bitmod, I think you need to tell postgres to listen on the docker bridge interface. Right now it only listens on lo
13:48 <PeregrinePDX> if at the command line on the host side if you run ifconfig what interfaces do you have?
13:48 cevado_ joined
13:49 <bitmod> docker0, eth0 and l0
13:49 <bitmod> *lo
13:50 <Ankhers> You are also telling postgrex to connect to localhost which means the container.
13:50 <PeregrinePDX> ah so yeah, you would need to tell postgres to listen on the docker0 ip address.
13:50 <Ankhers> bitmod: https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach might be useful.
13:51 <PeregrinePDX> and then you would tell your elixir app to use that same ip address for the database address
13:51 <PeregrinePDX> not localhost
13:51 <PeregrinePDX> I believe
13:51 <PeregrinePDX> And now to drive to work.
13:51 <Ankhers> PeregrinePDX: Hopefully it won't be as bad as mine.
13:52 pbj joined
13:53 gvaughn_ joined
13:54 scrmpy joined
13:55 <bitmod> guys i think i'll just run a postgres container as well, that should take all the difficulty out of solving this problem
13:55 <bitmod> don't know why i didn't just do that in the first place
13:56 <Ankhers> Just make sure you connect it to the host platform for storage.
13:56 <Ankhers> Don't want to accidentally lose your DB.
13:58 <scrmpy> how would you structure a "self-contained" ecto project? so other apps that use require it as a dependency, don't need to concern themselves with knowing or configuring ecto for that dependency?
13:58 ZippoWeb joined
13:58 <bitmod> Ankhers: will do ;)
13:58 <Ankhers> scrmpy: Put the configuration in the project. I currently have a couple of these.
13:58 tuacker1 joined
13:59 <Ankhers> Then the other project(s) don't even need a dep on ecto.
13:59 <scrmpy> yeh currently I've had to copy the config over, but it's not nice. so I can just initialise the config in the project itself, how do you do that?
14:00 <Ankhers> Just have a dev and prod config files, just like you would any other project.
14:01 <scrmpy> but they're not used by the parent project, unless I specifically import them into its own config
14:02 <Ankhers> You don't need to. When they are compiled, they are compiled with that configuration.
14:02 <scrmpy> are you building them as separate releases?
14:03 <scrmpy> since I just have it as a mix dependency, and the depedencies complain about not being configured if I simply compile them
14:03 nii236 joined
14:04 wpcarro joined
14:04 pbj joined
14:04 <Ankhers> No. It is a single release.
14:04 <scrmpy> also what do you do for starting the adapter and migrations. since I asked another question regarding that before, and was told it could lead to issues (regarding distribution) if you handle it in the application itself.
14:06 <Ankhers> I just run the migrations before deploying the app.
14:06 <Ankhers> Admittedly, this is on a greenfield project. So I am only adding tables / columns right now.
14:06 <scrmpy> I was hoping I could keep all of that hidden from the parent app requiring this project.
14:07 patientplatypus joined
14:07 <Ankhers> If you do not control the parent app, what benefit are you trying to get from this? I don't necessarily want someone to tell me what user and password I should set in my database.
14:07 <Ankhers> I should be configuring those things.
14:09 akeating joined
14:09 <Ankhers> Based on what you have said, I think you should pass the repo into the functions that need it.
14:09 <scrmpy> I own both, I'm just trying to workout a simpler way of structuring all of this. since if I change the datastore or were to do something as stop using elixir altogether for the project, I'd still like the projects that depend on it to be able to work regardless (just left with simple elixir API dependency), etc.
14:10 <scrmpy> instead of having to update all those other projects too
14:11 <Ankhers> So then I don't understand what issue you are having. For each database, you only have to migrate once before release.
14:12 <scrmpy> I have to include all of that in any projects that want to test with one of the dependencies
14:12 <scrmpy> whereas I'd rather just having to start the dependency and that be it
14:12 <Ankhers> That is all you have to do. But at some point when you upgrade your dep, you still need up migrate your app.
14:13 <Ankhers> http://blog.plataformatec.com.br/2016/04/running-migration-in-an-exrm-release/ -- There was this.
14:13 <Ankhers> I haven't done it. Nor do I care to with how easy migration is.
14:14 <scrmpy> I'm not using releases atm, which might be the problem?
14:14 <Ankhers> What are you currently doing for deployment?
14:14 <Ankhers> build + deployment?
14:14 <scrmpy> not deploying at all. simply development on my local machine and testing on same machine
14:15 <scrmpy> so I've just been using mix for everything
14:15 <Ankhers> Why don't you want to run `mix ecto.migrate` before deploying?
14:16 griffinbyatt joined
14:16 <scrmpy> I still have to configure the dependency specifically/start its adapter etc. that's all the stuff I'm wanting to see if I can avoid?
14:17 <Ankhers> But you only do that in the dependency. You don't do it for each parent app.
14:17 clemlais joined
14:17 <scrmpy> but the parent doesn't use the dependencies config, I have to import it.
14:18 <Ankhers> No you don't. The config inside the dep will still be compiled.
14:18 <Ankhers> Checkout the default output of mix phx.new --umbrella name
14:18 <Ankhers> It does this for you.
14:19 cbarratt joined
14:19 <Ankhers> Maybe it is only for umbrella apps though.
14:19 <scrmpy> but that's an umbrella. I'm meaning a completely separate dependency
14:19 <scrmpy> yeh umbrella apps can share the same configs
14:20 TarVanim_ joined
14:20 <Ankhers> Then you might not be able to in an umbrella. Any reason not to use one?
14:20 <Ankhers> Rather, only be able to in an umbrella.
14:21 <scrmpy> I may switch, was wanting to try and manage things separately though
14:21 <Ankhers> You could also just do what the umbrella does and import the config files. That would be a single line per project.
14:21 <scrmpy> yeh that's what I'm currently doing
14:21 <Ankhers> import_config "../apps/*/config/config.exs"
14:22 <Ankhers> Just change the path to your dep(s)
14:22 <scrmpy> however my test_helper I still need to specifiy the Ecto.Adapters.SQL.Sandbox.mode for the dependencies repo, start the adapter, migrate it, etc.
14:23 <scrmpy> ideally was hoping I could have it so my parent project that wants to test with a given dep, simply adds the dependency. and then in my test_helper I just ensure it was started.
14:23 wpcarro joined
14:23 j0ni joined
14:25 synProgrammer joined
14:25 <Ankhers> You may be able to provide a module / function that does that for you.
14:25 <scrmpy> one idea I have currently is maybe to just add some init code in my dep for when it's run in a test. and then that could handle the things I don't want to explicitly have to handle in my parent project
14:25 <scrmpy> you think that's the best option for this?
14:26 <Ankhers> Can't say for certain. I am using an umbrella for this because of the direct relationship.
14:26 rschmukler joined
14:27 <scrmpy> ah ok.
14:27 <scrmpy> I'll give it a try anyway and see what else comes up haha, cheers :)
14:28 <Ankhers> One thing to keep in mind, Elixir favours being a little bit more explicit instead of being magical.
14:28 <Ankhers> So you will write a little bit more code, but it is also usually very understandable what is happening within the system.
14:29 <scrmpy> yeh, I don't mind that when it comes to a release build/configuration. just wanting to avoid it for tests
14:29 pbj joined
14:31 pbj joined
14:31 cevado joined
14:31 cdg joined
14:33 ikcerog joined
14:34 heroiceric___ joined
14:35 synProgrammer joined
14:36 yt____ joined
14:47 pbj joined
14:49 gvaughn_ joined
14:54 yrashk joined
14:56 ZippoWeb joined
14:59 d10n-work joined
15:05 JEG2 joined
15:07 srxa joined
15:09 northfurr joined
15:10 franco joined
15:12 __charly__ joined
15:14 r00tl3ss joined
15:15 oohnoitz joined
15:16 voxxit joined
15:17 griffinbyatt joined
15:18 justelex joined
15:19 cschneid_ joined
15:19 M-nickgal joined
15:19 krigare[m] joined
15:22 cevado joined
15:31 icecreamcohen joined
15:37 rschmukler joined
15:38 edmz joined
15:38 ZippoWeb joined
15:40 pbj joined
15:41 pmarreck joined
15:42 rozap joined
15:44 rschmukler joined
15:44 hflw joined
15:44 r00tl3ss joined
15:45 caw joined
15:45 beatpanic joined
15:47 voxxit joined
15:47 tuacker joined
15:50 hexkey[m] joined
15:50 mindflayer[m] joined
15:50 M04n0[m] joined
15:50 m3tti[m] joined
15:50 dp[m] joined
15:50 M107262[m] joined
15:50 logos[m] joined
15:50 krigare[m] joined
15:50 uhoreg joined
15:50 notriddle joined
15:50 thurloat[m] joined
15:50 technikhil[m] joined
15:50 wilo[m] joined
15:50 bin7me[m] joined
15:50 iamd3vil[m] joined
15:50 OAK0[m] joined
15:50 fap[m] joined
15:50 nolan_d joined
15:50 spawnthink[m] joined
15:50 Lex[m] joined
15:50 M-nickgal joined
15:50 seequ_ joined
15:50 M-Quora joined
15:54 amclain joined
15:55 mloy joined
15:56 tazjin joined
16:05 the_voice- joined
16:06 kansi joined
16:06 bitwalker joined
16:07 gvaughn joined
16:08 gvaughn_ joined
16:08 lopex joined
16:13 josevalim joined
16:13 gvaughn joined
16:13 meandi_2 joined
16:14 gvaughn_ joined
16:17 franco joined
16:17 griffinbyatt joined
16:17 meh` joined
16:20 cevado joined
16:21 drincruz joined
16:22 kiliankoe joined
16:23 d10n-work joined
16:24 NeverDie joined
16:27 fernandomm joined
16:28 rkazak joined
16:29 srxa joined
16:30 lexmag joined
16:32 Ven joined
16:37 LastWhisper____ joined
16:42 jeffweiss joined
16:44 adulteratedjedi joined
16:46 josevalim_ joined
16:48 srxa joined
16:49 srxa joined
16:50 rschmukler joined
16:53 mika_ joined
16:55 refriedchicken joined
17:00 rschmukler joined
17:15 northfurr joined
17:17 PaReeOhNos joined
17:18 OtherAllan joined
17:18 griffinbyatt joined
17:19 <bitmod> where is everyone?
17:22 rschmukler joined
17:22 <LastWhisper____> ./wave
17:22 <Nicd-> bitmod: if you have a question, just ask
17:26 MrEggsalad joined
17:27 srxa joined
17:31 <bitmod> do we have some better documentation/guides on deploying phoenix using docker? having a lot of trouble, and there's hardly anything on the subject out there
17:31 imack joined
17:36 gen_ale_drinker joined
17:36 icanhazbroccoli joined
17:36 rschmukler joined
17:37 sunaku joined
17:37 akeating joined
17:38 sickill joined
17:41 Ven joined
17:41 pbj joined
17:44 <steffkes> bitmod: what did you try and how exactly does the trouble look like?
17:44 <steffkes> i didn't look for any tutorials, but i did sucessfully deployed a few plug based applications on docker already
17:50 PaReeOhNos joined
17:51 Vooch joined
17:52 ZippoWeb joined
17:53 lancetw joined
17:53 <bitmod> steffkes: tried following this guide, put the container in my DO droplet but then i get "connection refused" errors from Postgrex
17:53 <bitmod> and i've got no idea why, spent like a day trying to get this working
17:53 <bitmod> driving me nuts
17:53 mika_ joined
17:55 <PeregrinePDX> bitmod did you change your postgres to listen on the ip address for the docker interface?
17:55 <PeregrinePDX> and then restart your postgres?
17:56 <PeregrinePDX> You would also need to update you pg_hba.conf to allow connections from that network as well.
17:58 refriedchicken joined
17:59 <bitmod> PeregrinePDX: i gave up trying to do that, and instead tried to use a postgres container, which i hoped would sovle the networking issue, but it didn't
17:59 <PeregrinePDX> You have to tell docker to allow the 2 containers to talk to each other
17:59 <PeregrinePDX> Unless you put postgres in the same container as the elixir app
18:01 <bitmod> PeregrinePDX: should --link on one container be enough?
18:01 <* PeregrinePDX> shrugs.
18:01 <PeregrinePDX> I don't know much about docker.
18:01 <PeregrinePDX> Plus after you tell docker they can talk
18:02 <LastWhisper____> Do a lot of folks just use Elixir & Plug without all the overhead of Phoenix?
18:02 <PeregrinePDX> You'll also probably have to tell elixir to talk to something besides localhost
18:02 <asonge> LastWhisper____: some do. phoenix overhead is mostly conceptual, though.
18:02 <bitmod> PeregrinePDX: has no one written a guide on how to do this?
18:03 <PeregrinePDX> I wouldn't know. I don't use docker and I barely know elixir.
18:03 <LastWhisper____> true. Not dissing phoenix at all I am just taking it one step at a time. I just finished the David Thomas book on Programming in Elixir... trying to go one lib at a time :)
18:04 <asonge> LastWhisper____: phoenix is not that complicated either. by the time you add in a set of templates, and then add in ecto to do some database stuff, you're like, a lot of the way there.
18:05 <asonge> phoenix's router is slightly nicer, with plug you'd kinda have to reinvent what a controller is, and then if you wanted a view layer and/or a template layer, that's what phoenix gives you...though you *can* wire up EEx yourself (but you also need to make it escape html stuff)
18:05 <asonge> but if you need to do a small API, just do it in plug
18:05 <PeregrinePDX> bitmod maybe this https://semaphoreci.com/community/tutorials/dockerizing-elixir-and-phoenix-applications it looks sane to me but then again see the I don't know docker or elixir disclaimer.
18:05 <LastWhisper____> yeah right now I'm trying to write a small wrapper to touch my td ameritrade api endpoint
18:06 PaReeOhNos joined
18:06 <asonge> plug's abstraction is just beautifully simple, imho.
18:06 <sorentwo> asonge: You work with Absinthe a lot, right? Any chance you've upgraded to 1.3?
18:07 <asonge> i don't
18:07 hbraun joined
18:07 <asonge> i was interested in graphql very early on, but i don't work much with SPAs right now
18:07 <sorentwo> Hmm. Was it just GraphQL? I could swear I've seen you discuss it.
18:07 <sorentwo> That would be it then.
18:07 <asonge> i wrote an early parser for it, but absinthe is like, the whole thing.
18:08 <bitmod> PeregrinePDX: thanks, i'll check it out
18:09 PaReeOhNos joined
18:12 squallstter joined
18:12 icanhazbroccoli joined
18:19 griffinbyatt joined
18:20 WhiskyRyan joined
18:21 yolev_ joined
18:23 PaReeOhNos joined
18:24 sunaku joined
18:26 fmccann joined
18:27 <LastWhisper____> Do any of you guys work on strictly elixir full time? besides josevalim of course xD
18:28 rschmukl_ joined
18:29 Ilyes512 joined
18:34 cschnei__ joined
18:37 rvirding joined
18:38 wsieroci joined
18:41 Ven joined
18:43 <ciawal> on or with, LastWhisper____
18:45 rschmukler joined
18:48 <LastWhisper____> sorry, mostly with
18:48 <LastWhisper____> ciawal
18:48 Brend joined
18:49 rschmukl_ joined
18:50 Vooch joined
18:51 <ciawal> I believe there are plenty of people here using elixir fulltime, yes
18:52 <adamkittelson> glancing over the members list of the channel I think there are 4 or 5 of us just in the names that start with A
18:55 ariejan joined
18:59 ariejan joined
18:59 <alisdair> did you count me? i do elixir full time now
19:10 eddd joined
19:10 cevado joined
19:11 nicholaswyoung joined
19:11 MrEggsalad left
19:17 asabil joined
19:19 ishahnaz joined
19:20 griffinbyatt joined
19:20 LastContinue joined
19:20 ariejan joined
19:22 kiltzman joined
19:23 kiltzman joined
19:25 MotherFlojo joined
19:25 icanhazbroccoli joined
19:30 ariejan joined
19:31 mika_ joined
19:32 LastCont_ joined
19:35 asabil joined
19:38 pbj joined
19:38 northfurr joined
19:39 iFire joined
19:41 <tonyc> adamkittelson: HI
19:41 <tonyc> =]
19:45 <adamkittelson> hi tony, and yep I included you alisdair, not that i know where you're at specifically but I figured it'd be pretty likely
19:46 <tonyc> adamkittelson: booked for elixirconf?
19:47 <adamkittelson> nah not yet, planning on it though, we have an office in seattle so going to try to arrange it so we have work week there that week or the week after so those of us who want to go are more or less already in town
19:50 <tonyc> ahh yes yes
19:50 <tonyc> i am super close to pulling the trigger and booking stuff
19:51 jmiven joined
19:52 cemilowski joined
19:53 <adamkittelson> cool, should be good, they have been so far
19:53 PaReeOhNos joined
19:55 asabil joined
19:55 Ilyes512 joined
19:55 <tonyc> haven't been to a conf in a while
20:02 LastContinue joined
20:05 ishahnaz joined
20:06 ariejan joined
20:07 drincruz joined
20:09 eddd joined
20:10 asabil joined
20:10 travis-ci joined
20:10 <travis-ci> elixir-lang/elixir#14487 (master - fe8b277 : José Valim): The build passed.
20:10 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/7f3f33d1004e...fe8b277435ca
20:10 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/230099195
20:10 travis-ci left
20:11 cdg joined
20:13 <OliverMT> getting a lot of
20:13 <OliverMT> .22:13:21.869 [error] Postgrex.Protocol (#PID<0.322.0>) disconnected: ** (DBConnection.ConnectionError) owner #PID<0.491.0> exited while client #PID<0.493.0> is still running with: shutdown
20:14 <OliverMT> while doing async audit logging with a supervised task using start_child
20:14 <OliverMT> "Note that the spawned process is not linked to the caller, but only to the supervisor. "
20:14 <OliverMT> anyone got a clue whats going on?
20:15 <OliverMT> this is in the test phase btw, is it because the test itself shuts down the whole sandboxed thing?
20:20 synProgrammer joined
20:20 griffinbyatt joined
20:26 northfurr joined
20:32 elgenie joined
20:36 sfbw joined
20:41 asabil joined
20:43 PaReeOhNos joined
20:48 fmccann_ joined
20:49 LastContinue joined
20:51 chrismccord joined
20:56 cevado joined
21:02 ariejan joined
21:02 nhooyr joined
21:02 ariejan joined
21:04 DisruptiveNL joined
21:05 <benwilson512> OliverMT: fishcakez mentioned this at elixirconf, IIRC it's when you've got some process other than the test process that has a connection, and then the test process (which is the owner) dies
21:05 <benwilson512> buuut I don't recall the solution, other than explicitly killing or waiting on that other process
21:05 <benwilson512> before your test terminates
21:05 <OliverMT> the test passes
21:05 <OliverMT> so its just console noise
21:06 <OliverMT> so I dont really care
21:08 srxa joined
21:09 drincruz joined
21:11 asabil joined
21:17 fmccann joined
21:18 fmccann left
21:19 eddd joined
21:21 eddd joined
21:21 griffinbyatt joined
21:21 refriedchicken joined
21:27 maxbeizer joined
21:29 northfurr joined
21:35 fmccann joined
21:37 wsieroci joined
21:40 micmus joined
21:40 <jer> is there a really good way of appending to a file on disk in large chunks (few kilobytes) where i'm not constantly opening and closing the file all the time, and where i don't have all the data ahead of time? (It's coming in off a socket)
21:41 asabil joined
21:41 <jer> basically data comes in off a socket in chunks, i want to write that chunk to a file efficiently
21:41 <ivan> keep the handle open in an Agent?
21:48 sunaku joined
21:48 <fishcakez> OliverMT: wait for client to exit :)
21:48 northfurr joined
21:49 bcavileer joined
21:54 <jer> ivan, yeah that does work, just wasn't sure if there was a better way using File.stream! or something (given my data is actually a stream)
21:58 eddd joined
22:01 asabil_ joined
22:02 chazlever_ joined
22:04 mmcclure joined
22:04 wsieroci joined
22:06 refriedchicken joined
22:17 cemilowski joined
22:18 asabil joined
22:22 griffinbyatt joined
22:22 fmccann joined
22:24 sunaku joined
22:35 fmccann_ joined
22:35 northfurr joined
22:36 fmccann joined
22:45 ishahnaz joined
22:48 asabil joined
22:55 NeverDie joined
22:59 whatyouhide joined
22:59 EduardoBautista joined
23:01 cschneid_ joined
23:05 fmccann joined
23:06 ericmj joined
23:15 sebhoss joined
23:19 asabil joined
23:22 sunaku joined
23:23 griffinbyatt joined
23:25 avdi joined
23:31 cschneid_ joined
23:33 mika_ joined
23:35 northfurr joined
23:39 eddd joined
23:48 asabil joined
23:49 cmk_zzz joined
23:53 gyre007 joined
23:54 northfurr joined
23:55 sfbw joined