<     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 25 26 27  
28 29 30 31
00:01 jkreeftmeijer joined
00:02 myronmarston joined
00:05 Cohedrin joined
00:17 ssswitch joined
00:19 cipher joined
00:20 <cipher> hey so I was wanting to write a mod_* handler for :httpd and then I was like def do(info): ... end and elixir was all like CompilationError ... missing terminator: end. :-(
00:20 jhack joined
00:20 jschneck joined
00:21 <icecreamcohen> makes sense
00:21 <cipher> so how do I write an httpd mod module in elixir?
00:22 <cipher> like this guy https://github.com/blackberry/Erlang-OTP/blob/master/lib/inets/src/http_server/mod_get.erl#L26
00:23 <icecreamcohen> do you want to serve http traffic?
00:23 <ivan> here is a programming secret
00:23 <ivan> github code search https://github.com/search?l=elixir&q=httpd+do&ref=searchresults&type=Code
00:23 <ivan> def unquote(:do)(data) do
00:26 <cipher> do you have to do that as a macro then because just s/def do(info) do/def unquote(:do)(info)/ didn't do the trick.
00:26 <cipher> tells me invalid syntax in def :do
00:27 <icecreamcohen> worked for me
00:28 <icecreamcohen> which elixir version?
00:28 <cipher> 1.4.2
00:29 <icecreamcohen> me too
00:30 <cipher> https://gist.github.com/anonymous/15f8de60737c28c8d7958ae3aca9678c
00:31 <icecreamcohen> def unquote(:do)(data)
00:31 <icecreamcohen> you didn’t specify the arglist
00:31 <cipher> oops!
00:31 <cipher> k that did it
00:32 <icecreamcohen> why not plug?
00:32 <cipher> thanks! next piece is how do i get :httpd to allow this ModGet2 as a mod module
00:32 <cipher> I was wanting a really stupid basic mocking mod module
00:32 <cipher> without any dependencies
00:35 <cipher> [:modules ModGet2] does the trick in the server config. woot easy enough. thanks again!
00:37 gvaughn_ joined
00:37 nighty-- joined
00:38 cemilowski1 joined
00:38 ekinmur joined
00:39 sfbw joined
00:43 jerel joined
00:45 isubasti joined
00:45 <cipher> this seems to be a good document for the question I had for future ref https://github.com/seven1m/30-days-of-elixir/blob/master/20-inets.exs
00:50 markw_ joined
00:56 rozap joined
01:01 klltkr joined
01:16 Ioyrie joined
01:17 elgenie joined
01:25 myronmarston joined
01:25 NeverDie joined
01:27 jschneck joined
01:31 mika_ joined
01:34 sunaku joined
01:37 ekinmur joined
01:39 tomterl joined
01:40 sfbw joined
01:54 Cohedrin joined
02:02 jkreeftmeijer joined
02:03 elgenie joined
02:05 definiv joined
02:07 flojo2 joined
02:09 Cohedrin joined
02:16 meh` joined
02:26 fhoffmann joined
02:32 xiengu joined
02:40 ekinmur joined
02:43 sfbw joined
02:53 mika_ joined
03:04 nForce joined
03:05 icecreamcohen joined
03:24 Oliphaunte joined
03:30 m00dy joined
03:33 myronmarston joined
03:55 sfbw joined
04:00 myronmarston joined
04:03 jkreeftmeijer joined
04:20 Oliphaunte joined
04:25 justelex_ joined
04:34 craigp joined
04:35 pota joined
04:38 fantomik joined
04:39 Oliphaunte joined
04:41 Cohedrin joined
04:43 squallstter joined
04:44 sfaxon joined
05:06 dec0n joined
05:06 elgenie joined
05:13 myronmarston joined
05:17 refriedchicken joined
05:20 samof76 joined
05:34 gvaughn joined
05:54 dignifiedquire joined
05:56 fabjan joined
05:58 InternetFriend joined
06:02 exadeci joined
06:04 imack joined
06:05 jkreeftmeijer joined
06:05 definiv joined
06:06 cschneid_ joined
06:07 samof76 joined
06:11 rkazak joined
06:13 cemilowski joined
06:16 jkreeftmeijer joined
06:19 ur5us joined
06:24 josevalim joined
06:28 myronmarston joined
06:29 gvaughn joined
06:32 myronmarston joined
06:32 proteus-guy joined
06:35 refriedchicken joined
06:35 proteus-guy joined
06:37 elgenie joined
06:40 ariejan joined
06:40 notdaniel joined
06:41 myronmarston joined
06:43 nd___ joined
06:49 samof76 joined
06:49 myronmarston joined
06:52 myronmarston joined
06:53 mirela666 joined
06:56 flaviodesousa joined
07:01 elgenie joined
07:02 myronmarston joined
07:02 akeating joined
07:10 micmus joined
07:10 jkreeftmeijer joined
07:11 Guest67 joined
07:12 mirela666 joined
07:22 zodiak joined
07:23 nbg joined
07:28 asabil joined
07:29 l14n joined
07:32 mattyw joined
07:34 ur5us joined
07:34 elixir-lang075 joined
07:36 zambal joined
07:41 tuacker joined
07:56 dec0n joined
07:56 akarambir joined
08:07 PaReeOhNos joined
08:08 leons joined
08:12 pufuddled joined
08:13 <pufuddled> @bitwalker : https://github.com/bitwalker/distillery/issues/117
08:14 <pufuddled> @bitwalker : The above was closed in November. I reproduced the issue and left a comment.
08:17 colrack joined
08:19 cemilowski joined
08:19 Ilyes512_ joined
08:20 <Ilyes512_> hey guys... how can I find out more about a specific plug that is used in phoenix? Like for instance "plug :accepts, ~w(html)"
08:20 <Ilyes512_> The plug is called :accepts? Where can I find the source and/or api doc?
08:21 isorehalav joined
08:22 lexmag joined
08:24 <Ilyes512_> << btw why is my name suffixed with a underscore :S
08:24 <Ilyes512_> ooh... wait I am probably also logged in at home :P
08:26 <Ilyes512_> Ah I found it at https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix/controller.ex#L1059
08:30 marr joined
08:34 Ven joined
08:38 proteus-guy joined
08:43 zambal_ joined
08:44 zambal_ joined
08:46 zambal_ joined
08:46 gvaughn joined
08:48 Ilyes512_ joined
08:49 zambal_ joined
08:50 zambal joined
08:51 Cohedrin joined
08:52 gazler joined
08:57 isorehalav joined
09:01 inoas joined
09:02 jkreeftmeijer joined
09:02 elgenie joined
09:05 definiv joined
09:11 ur5us joined
09:11 proteus-guy joined
09:20 aedigix joined
09:22 a_zane00 joined
09:22 aedigix joined
09:30 stephen_m joined
09:31 samof76 joined
09:33 proteus-guy joined
09:37 isorehalav joined
09:55 agit0 joined
09:59 InternetFriend joined
10:04 mika_ joined
10:05 treaki joined
10:06 Ilyes512_ joined
10:07 Ven joined
10:21 srxa joined
10:22 lexmag joined
10:23 samof76 joined
10:24 jkreeftmeijer joined
10:24 PaReeOhNos joined
10:25 lexmag joined
10:25 PaReeOhNos joined
10:27 treaki joined
10:28 Ilyes512_ joined
10:38 manukall joined
10:40 gmcabrita joined
10:42 nighty-- joined
10:42 ur5us joined
10:45 Ven_ joined
10:49 zambal joined
10:51 isorehalav joined
10:56 m00dy joined
11:00 samof76 joined
11:01 isorehalav joined
11:05 gvaughn joined
11:06 cschneid_ joined
11:06 dimitarvp joined
11:08 mika_ joined
11:18 cevado joined
11:20 sillyotter joined
11:23 isorehalav joined
11:25 cristianR_ joined
11:30 jkreeftmeijer joined
11:39 cemilowski joined
11:49 proteus-guy joined
11:53 <gazler> josevalim ericmj I've found a potential bug with Mix.Dep.Umbrella.loaded() and File.cd I've created a repo that shows the issue https://github.com/Gazler/deps_test I need to shoot off just now. I'll raise a proper issue when I get back.
11:54 <josevalim> gazler: awesome, please do so, thank you D
11:54 <josevalim> *:D
11:54 <gazler> josevalim: If you want to see it you can clone the repo and run `mix run deps.exs`
11:55 <ericmj> josevalim: i think it’s not supposed to work if you change dirs
11:56 <ericmj> no idea where /private comes from though
12:00 mika_ joined
12:01 InternetFriend joined
12:06 mika_ joined
12:08 isorehalav joined
12:08 gvaughn joined
12:08 mika__ joined
12:14 mika__ joined
12:18 sfbw joined
12:30 mattyw joined
12:32 justelex_ joined
12:32 pufuddled joined
12:34 Ven joined
12:34 srxa joined
12:34 jkraus joined
12:37 aeliton joined
12:37 isorehalav joined
12:39 jschneck joined
12:39 klltkr joined
12:40 samof76 joined
12:41 a_zane00 joined
12:41 <jer> i maintain a large set of data in memory at the moment; roughly 2000 items in a mapset. when that processes crashes for some reason, it dumps the whole of that state out. now the contents of the mapset are not important, since those are tracked elsewhere and easy to find. any way to omit that part of the state from my logging?
12:42 sevenseacat joined
12:49 clemlais joined
12:52 pratch joined
12:53 Ven_ joined
12:55 __charly__ joined
12:55 cemilowski joined
12:56 isorehalav joined
12:56 s_kilk joined
12:57 pratch joined
13:00 isorehalav joined
13:03 gvaughn joined
13:05 ramortegui joined
13:05 srxa joined
13:07 soud joined
13:07 kronicdeth joined
13:08 <soud> hi all, I have a model with a `parent_id` which refers to itself (for replying to a comment). I would like to embed this in the parent comment like so: https://bpaste.net/show/4b095d68808f . can't imagine how this would be achieved, anyoneone have any idea?
13:08 Ven_ joined
13:09 <soud> actually, it should read `replies: [...]`, because it can have multiple replies
13:10 ssswitch joined
13:10 fmcgeough joined
13:11 <soud> using postgresql if that's relevant
13:13 isorehalav joined
13:14 <gazler> ericmj: Was that message in response to what i was talking about?
13:15 <ericmj> gazler: yes, it was supposed to be to you, not jose
13:15 <ericmj> but please open an issue
13:15 <gazler> Ok. I have added an example that is perhaps a little more surprising.
13:16 <gazler> https://github.com/Gazler/deps_test/commit/cbd3c74d5086d29599f48d366da5716ec9e2c7e8
13:17 isorehalav joined
13:17 <ericmj> gazler: keep in mind this is private API also :)
13:17 cdg joined
13:18 <gazler> ericmj: Yeah, it's used by phoenix though, which is why I think it could be an issue.
13:18 <gazler> I'll add a way to replicate in phoenix in the issue.
13:18 <gazler> It could be fixed in phoenix too.
13:18 <ericmj> gazler: can you point me to the phoenix code?
13:18 <gazler> Ofc.
13:18 <gazler> https://github.com/phoenixframework/phoenix/blob/663d5f770ee490e05e444906d4eb23f5167e0cf1/lib/phoenix/code_reloader/server.ex#L111
13:19 <gazler> Maybe the deps should be cached on load?
13:20 <ericmj> code_reloader recompiles dependencies?
13:20 <ericmj> oh umbrella deps...
13:20 <ericmj> it should definitely be cached
13:21 <ericmj> calling loaded() can be pretty slow
13:21 <ericmj> loaded() traverses all deps and even runs Hex dependency resolution :)
13:22 <ericmj> gazler: so this can be an issue if the phoenix application changes cwd?
13:22 <ericmj> because phoenix itself doesn’t change cwd, right?
13:22 <gazler> So you can do this just now and it breaks. mix phx.new reloader_test --umbrella --no-ecto --no-brunch --no-html && cd reloader_test && iex -S mix phoenix.server && FIle.cd("/tmp")
13:23 jschneck joined
13:23 jkraus left
13:24 <ericmj> mix assumes no one changes directory :(
13:24 <ericmj> i dont know a good way to fix this
13:25 <gazler> I thought i'd be ok doing it inside a new process.
13:25 <gazler> I wasn't though.
13:25 <ericmj> gazler: because even if we “fixed” loaded() when you compile dependencies they will change directory
13:25 <ericmj> which will break the application if it assumes it is inside “/tmp"
13:25 <ericmj> because cwd is global for the VM
13:26 vircung joined
13:26 Ven_ joined
13:26 <ericmj> to fix this we would need to redesign mix so it doesn’t depend on a specific cwd
13:26 <ericmj> like rebar3 does
13:27 <ericmj> i wish cwd was specific to the current process
13:28 <gazler> ericmj: So I guess my only option just now is to shell out?
13:29 <ericmj> or raise if cwd is not what we expect
13:29 <ericmj> we should discuss in an issue to get more inputs, i may be missing something
13:30 lexmag joined
13:30 <gazler> https://github.com/elixir-lang/elixir/issues/6104
13:30 <gazler> I guess this is kind of a big deal. If a dependency called File.cd then it could break stuff.
13:31 <gazler> I guess I could spawn a new vm dynamically for my use case.
13:38 <josevalim> ericmj: wouldn't it work if we use full paths?
13:38 <ericmj> josevalim: yes, but that’s a major code change
13:38 <josevalim> why?
13:38 <josevalim> for umbrella deps we can just call Path.expand no?
13:38 <ericmj> because almost everything is relative paths now
13:39 <ericmj> we will likely also break user mix tasks that make assumptions about cwd
13:39 <gazler> Caching in phoenix code reload server works btw
13:39 <ericmj> i think some hex stuff would break for example
13:39 <josevalim> apparently we do call Path.expand
13:40 <josevalim> oh, I see the issue
13:40 <ericmj> stuff will definitely break if we stop doing File.cwd in Mix.Dep.in_dependency
13:40 <josevalim> that's now what i was proposing though
13:41 <josevalim> the issue is that Mix.Dep.Umbrella.loaded is not cached
13:41 <josevalim> so every time he calls it he gets a different result
13:41 <ericmj> that’s one of the issues
13:41 <josevalim> ericmj: if we fix that i assume everything else would work because we do File.cwd when compiling
13:41 isorehalav joined
13:41 <ericmj> right, so you will break the user application
13:41 <ericmj> because the application called File.cwd for a reason
13:42 <ericmj> File.cd*
13:42 <josevalim> right
13:42 <josevalim> I think this is a Phoenix bug rather
13:42 <ericmj> yes, i agree
13:42 <josevalim> because Phoenix is the one using Mix per request
13:42 <gazler> josevalim: I am pushing a fix.
13:42 <ericmj> but is there a fix for the phoenix issue?
13:43 <ericmj> i think phoenix should just raise if cwd is wrong
13:43 <ericmj> because there’s no good way of fixing it
13:43 <ericmj> until Elixir 2.0
13:43 <josevalim> gazler: does it work if you call Mix.Dep.Umbrella.cached() on the Phoenix side?
13:44 <gazler> josevalim: Yes.
13:44 <josevalim> gazler: keep in mind though .cached is on 1.4.0 only
13:45 <josevalim> so you will need to use function_exported? to check for it and fallback to loaded. and please leave a TODO so we remove the conditional logic once we depend on 1.4 only
13:45 <gazler> josevalim: Fetching the deps on load also works.
13:45 InternetFriend joined
13:46 <josevalim> gazler: don't fetch on load because it has consequences when serving multiple umbrellas
13:46 <josevalim> *mulitple apps in the umbrella
13:46 Ilyes512_ joined
13:47 <gazler> Github is sloooow
13:47 <ericmj> it may “work” but it will break the user code
13:47 <gazler> josevalim: So something like this won't do the trick? https://github.com/phoenixframework/phoenix/compare/master...Gazler:fix/cache-deps-reload-server?expand=1
13:47 <josevalim> ericmj: agreed. it will break any mix task or compiler that expects to be on CWD
13:48 akeating joined
13:48 isorehalav joined
13:48 <ericmj> i dont think it will break the tasks or compiler but rather break user code
13:48 <josevalim> gazler: it may fix this issue but i am almost certain it will introduce others
13:48 <josevalim> ericmj: which user code?
13:48 jerel joined
13:48 <josevalim> user code mostly don't assume directory structures because of _build
13:49 <ericmj> the code that changed cwd
13:49 <ericmj> this issue about users calling File.cd
13:49 <josevalim> gazler: https://github.com/phoenixframework/phoenix/compare/master...Gazler:fix/cache-deps-reload-server?expand=1#diff-627d49076c03a65473151dfc710d2d2eL111
13:49 <josevalim> that's the line that should change
13:49 <josevalim> you should call ".cached" instead of ".loaded"
13:49 fmccann joined
13:49 <josevalim> but because .cached is v1.4.0 only, you need the function_exported? check
13:49 <gazler> josevalim: I know. I had just pushed up the other change so that you could tell me why it wouldn't work. :)
13:50 gvaughn joined
13:50 <josevalim> oh, awesome :)
13:50 <josevalim> gazler: we weere used to do it on init afaik but we had to change it, i don't exactly recall the details
13:50 <ericmj> josevalim: user calls File.cd, phoenix reloader runs, in_dependency calls File.cd, user code breaks
13:50 <josevalim> ericmj: we always revert back to the previous dir
13:50 <ericmj> do we stop the application when code reloader runs?
13:50 <josevalim> we stop reqs
13:51 <josevalim> but this issue happens today
13:51 <josevalim> regardless of those changes
13:51 <ericmj> yes, that’s what i am saying. we cant fully fix it
13:53 <jschneck> Do doc tests default to running async? or is there a way to clean up after each one?
13:54 Ven joined
13:56 <jschneck> hurm, yeah it seems I am getting a race between two doc tests which talk to the same registry
13:56 <sevenseacat> I think doctests are only meant for simple little stuff, examples on how to use the code
13:56 <ericmj> jschneck: i would guess it follow the rules in the case where you call `doctest`
13:57 <jschneck> if I have use ExUnit.Case, async: false it seems to still async them
13:57 jkraus joined
13:59 tuacker1 joined
13:59 <ericmj> jschneck: that’s weird, i dont see any code that would indicate that
14:00 tuacker1 joined
14:01 jkraus left
14:02 jkreeftmeijer joined
14:02 srxa joined
14:03 <gazler> josevalim: https://github.com/phoenixframework/phoenix/blob/master/installer/templates/new/mix.exs#L11
14:03 <josevalim> for new apps only
14:03 <josevalim> phoenix as a runtime still supports 1.3
14:03 jschneck joined
14:04 <josevalim> that's how nice we are :)
14:04 <gazler> Haha, it makes testing a 1.3 umbrella trickier. I'll have to do it the old fashioned way.
14:04 myronmarston joined
14:06 <gazler> I say that, I can just change the applications list from a 1.4 generated applicatiom.
14:08 <jschneck> if I have use ExUnit.Case, async: false it seems to still async them
14:08 <jschneck> whops
14:08 <jschneck> up arrow'ed in the wrong window
14:08 Ilyes512_ joined
14:09 Ven_ joined
14:10 <gazler> josevalim ericmj interestingly, the Phoenix issue doesn't happen if I use the old mix.exs structure (with the applications list)
14:12 <gazler> Oh wait, false alarm. It still does. Just not on version 1.3
14:15 maxbeizer joined
14:19 Ven__ joined
14:20 isorehalav joined
14:25 myronmarston joined
14:25 <jschneck> another Q, How do I illustrate the use of the flush() helper in a doctest?
14:26 definiv joined
14:27 <jschneck> ah ha, nm, found it in the phoenix pubsub tests Process.info(self())[:messages]
14:29 np joined
14:40 jschneck joined
14:42 myronmarston joined
14:44 craigp joined
14:45 jschneck joined
14:48 jkreeftmeijer joined
14:49 aeliton joined
14:50 mirela666 joined
14:50 srxa joined
15:03 lexmag joined
15:10 icanhazbroccoli1 joined
15:14 asabil joined
15:16 cschneid_ joined
15:22 asabil joined
15:23 JEG2 joined
15:26 asabil joined
15:26 cevado joined
15:28 jschneck joined
15:31 wsieroci joined
15:34 rob joined
15:34 tuacker joined
15:34 jkreeftmeijer joined
15:35 <Guest38907> test 123
15:35 <Guest38907> ?
15:36 NeverDie joined
15:36 myronmarston joined
15:38 gvaughn joined
15:40 gvaughn_ joined
15:41 pratch joined
15:44 jkreeftmeijer joined
15:46 a_zane00 joined
15:47 pratch joined
15:50 sfbw joined
15:51 icecreamcohen joined
15:53 isorehalav joined
15:54 amclain joined
15:54 jkreeftmeijer joined
15:55 jeffweiss joined
16:00 dimitarvp` joined
16:01 Ilyes51__ joined
16:02 ikcerog joined
16:05 Ven joined
16:06 sfbw joined
16:06 wsieroci joined
16:07 justelex_ joined
16:10 squallstter joined
16:11 rozap joined
16:13 embik joined
16:13 meandi_3 joined
16:14 rkazak joined
16:17 justelex_ joined
16:18 srxa_ joined
16:22 gvaughn joined
16:22 jkreeftmeijer joined
16:22 gvaughn_ joined
16:23 aeliton joined
16:28 justelex_ joined
16:32 justelex_ joined
16:32 wsieroci joined
16:33 <notriddle> Given that rebar3 compiles all dependencies in prod mode, whether my main application is being built in prod or dev mode, how does Mix make sure that my deps are built without debug info when my app is built in prod but that they do have it in dev?
16:33 meh` joined
16:35 <tristan__> notriddle: why do you want to compile without debug info
16:35 <tristan__> you can just strip it afterwards
16:36 <notriddle> Do distillery and relx do that?
16:36 <tristan__> relx has the option to
16:36 <tristan__> {debug_info, strip}
16:37 gwn joined
16:38 justelex joined
16:39 cevado joined
16:40 fernandomm joined
16:42 <nox> MFW I go here to see what's going on in Elixir land,
16:42 <nox> and all I see is tristan__ from Erlang and notriddle from Rust. :P
16:42 <tristan__> haha
16:43 <notriddle> I've been writing way more Elixir code than Rust code lately.
16:43 <nox> notriddle: Nice!
16:43 <nox> josevalim: Ever thought of including shippai in the Elixir compiler directly btw?
16:44 refriedchicken joined
16:44 <notriddle> What's shippai?
16:44 <josevalim> i want to avoid changing core if we can
16:44 davidw joined
16:44 <notriddle> Oh, this. https://github.com/nox/shippai
16:44 <nox> notriddle: One of the few Core transforms that are useful, by yours truly. :)
16:44 <josevalim> nox: it was backwards incompatible right?
16:44 <nox> josevalim: How so?
16:44 <josevalim> for erlang
16:45 <josevalim> oh, it isn't
16:45 <nox> josevalim: I think farting in the wrong direction is considered backwards-incompatible by Ericsson, so...
16:45 justelex joined
16:45 <josevalim> nox: did you try adding it to erlang?
16:45 <nox> josevalim: The only issue that can arise is if you want to trigger an explicit GC,
16:45 nd___ joined
16:45 <nox> the function arguments, even if unused at this point in your code,
16:46 <* notriddle> guesses it's because farting in the wrong direction is considered backwards-incompatible by Ericsson.
16:46 <nox> they may be marked as live, because they may be passed to a subsequent raise call.
16:46 <cristianR_> Hi
16:46 <* notriddle> summarizes all this as "performance."
16:46 <nox> notriddle: I'm a bit fed up at them for reasons and I couldn't resist saying nonsensical things.
16:47 josevalim_ joined
16:47 <nox> josevalim: No, I am probably never going to try to add anything else to Erlang.
16:48 __charly__ joined
16:49 <notriddle> Adding the function arguments to Elixir's backtraces would be pretty nice. At least in debug mode.
16:52 <notriddle> Could we override `raise` instead? So that the function arguments show up even when the error is produced by a direct raise call?
16:53 nahtnam joined
16:55 <nox> notriddle: I chose not to do it for some reason.
16:56 <nox> notriddle: https://github.com/nox/shippai/blob/master/src/shippai_transform.erl#L54-L78
16:56 justelex joined
16:56 <nox> I transform only erlang:error({badrecord,_}),
16:57 <nox> because that call is most often generated by erlc and not user code.
16:57 <nox> (Because records don't even have their own opcode for raising on match failure, contrary to all the other erlc-generated raises.)
16:57 justelex_ joined
17:00 asabil joined
17:01 jschneck joined
17:02 justelex_ joined
17:02 stephen_m joined
17:03 <notriddle> That would be because match failure is one of the oldest erlc-generated raises?
17:04 PaReeOhNos joined
17:04 justelex_ joined
17:04 Cohedrin joined
17:05 <nox> notriddle: Yeah.
17:05 <nox> notriddle: I think they all were there since the beginning, or almost at least.
17:05 <nox> rvirding could confirm or infirm.
17:05 <nox> notriddle: And yeah you guessed it right, records landed way after that at least.
17:06 asabil joined
17:07 isorehalav joined
17:07 <notriddle> s/infirm/deny/ | https://www.merriam-webster.com/dictionary/infirm
17:07 <nox> notriddle: Thanks.
17:08 <nox> notriddle: I was thinking "that looks weird" but got lazy.
17:08 <notriddle> Meh. English is weird.
17:09 <notriddle> Though, in this case, having the opposite words (confirm or deny) sound and look nothing alike is probably for the best.
17:09 <notriddle> Same reason military radio always use "afirmative" and "negative" instead of "yes" and "no." They can tell them apart by just counting syllables.
17:10 justelex_ joined
17:11 Ven joined
17:11 <notriddle> It's the same reason I wish Elixirc had a warning for `{ "this is not a string": some_value }`
17:12 mika__ joined
17:13 <notriddle> Since atoms conventionally use single-quotes as in `{ 'this is not a string': some_value }`, it should probably suggest the version you probably intended: `{ "this is a string" -> some_value }`
17:13 <notriddle> s/->/=>/
17:14 <notriddle> ... and I forgot the percent sign at the beginning of all those map literals.
17:16 <nox> notriddle: I somewhat remember discussing this for hours with josevalim.
17:17 <nox> notriddle: Where do atoms use single-quotes in Elixir?
17:17 <nox> notriddle: I'm pretty sure I see :"foo" more often.
17:18 <notriddle> Maybe I'm reading the wrong code.
17:18 <notriddle> iex(1)> :"foo" == :'foo'
17:18 <notriddle> true
17:18 PaReeOhNos joined
17:23 Ven_ joined
17:24 jkreeftmeijer joined
17:25 OtherAllan joined
17:26 WhiskyRyan joined
17:26 myronmarston joined
17:27 karmajunkie joined
17:27 sunaku joined
17:29 craigp_ joined
17:29 wwwd joined
17:31 <nox> notriddle: Yeah both works,
17:31 justelex_ joined
17:31 <nox> I just mean that AFAIK, most code out there uses double quotes.
17:32 <nox> notriddle: I think the rationale is that "foo": looks like :"foo" and so it's ok.
17:32 <notriddle> I understand why the syntax is the way it is.
17:34 <notriddle> I'm just bitter about spending hours trying to figure out why I was decoding some JSON with Poison, but it wasn't matching the pattern I had set up for it. Admittedly, the fact that my brain was still thinking in JSON didn't help...
17:39 Ven_ joined
17:46 jkreeftmeijer joined
17:46 karmajun_ joined
17:47 JuanMiguel joined
17:53 __charly__ joined
17:53 Ven_ joined
17:57 srxa joined
18:01 notdaniel joined
18:03 __0xAX joined
18:06 myronmarston joined
18:09 WhiskyRyan joined
18:11 Ven joined
18:11 rozap joined
18:11 Liquid_X joined
18:12 srxa_ joined
18:14 aeliton_ joined
18:14 PaReeOhNos joined
18:16 mika__ joined
18:19 imack joined
18:21 Ven_ joined
18:22 mirela666 joined
18:22 meh` joined
18:26 wsieroci joined
18:28 mirela666 joined
18:28 Ven_ joined
18:31 fhdhsni joined
18:35 mirela666 joined
18:36 Ven_ joined
18:40 justelex_ joined
18:48 cevado joined
18:55 akeating joined
18:57 jkreeftmeijer joined
18:59 fxn joined
19:02 sunaku joined
19:05 <benwilson512> ok, so I have a list of DNS names as an environment variable, and I want these to be used as sync_nodes_optional
19:07 <benwilson512> trying to figure out how to set config in vm.args or something
19:09 Ven joined
19:10 <benwilson512> I suppose I could have a .config file and use sed but that seems... dirty
19:12 sunaku joined
19:13 <tristan__> benwilson512: that is what we do in the start script that comes with relx
19:14 srxa joined
19:16 froucoux joined
19:19 embik joined
19:21 cevado joined
19:23 <micmus> benwilson512: with distillery you could use REPLACE_OS_VARS
19:28 <benwilson512> micmus: what OS var can I put?
19:29 <tristan__> benwilson512: any
19:29 <tristan__> the release start scripts will replace os vars like ${VAR} in your configs
19:30 <micmus> it works both in vm.args and sys.config
19:31 <benwilson512> sorry what I mean is
19:31 <asonge> micmus: this is nice.
19:31 <asonge> TIL
19:31 <benwilson512> at the moment I have sync_nodes_optional: [:"sensetra@ip-172-31-37-78.ec2.internal", :"sensetra@ip-172-31-37-79.ec2.internal"],
19:31 <benwilson512> if I do sync_nodes_optional: "${blah}" that'l work?
19:31 kronicdeth joined
19:32 <tristan__> no, you'll get a string
19:32 <micmus> benwilson512: it's a simple textual substitution, so you could make it work
19:32 <benwilson512> oh cool
19:33 <benwilson512> so I could do
19:33 <benwilson512> sync_nodes_optional: [:"${blah}"]
19:33 <tristan__> yes
19:33 <benwilson512> nice
19:35 Ven_ joined
19:35 <tristan__> though, I've used it to put integers in vm.args...
19:35 <tristan__> so actually the list might work
19:36 <tristan__> but you aren't doing sys.config, so not sure
19:36 <tristan__> in sys.config it would not, in vm.args it would. this is an issue with systools
19:36 <micmus> the mix configs are translated to sys.config later on for the release
19:36 <tristan__> so depends on how distillery packages the config you are using
19:37 <tristan__> micmus: at run time? if so then it may work
19:37 <tristan__> sync_nodes_optional: ${blah}
19:37 <micmus> no, when it builds the release
19:37 <tristan__> that is, not with quotes
19:37 <tristan__> oh
19:37 <tristan__> then nevermind
19:37 <micmus> yeah, you'd probably need to add that manually to sys.config
19:39 tuacker joined
19:40 sfbw joined
19:46 justelex_ joined
19:49 griffinbyatt joined
19:50 sillyotter joined
19:52 nbg joined
19:53 <benwilson512> is there something like `-config kernel sync_nodes_optional ${blah}`
19:53 <benwilson512> cause then that'd be perfect
19:53 <benwilson512> I'm having trouble finding a reference on vm.args syntax
19:53 Ven_ joined
19:54 <asonge> benwilson512: it's a string that's just appended to the virtual machine args
19:54 <benwilson512> ah handy
19:56 lexmag joined
19:56 asabil joined
19:58 jkreeftmeijer joined
19:59 sillyotter joined
20:01 sillyotter joined
20:03 kronicdeth joined
20:08 meh` joined
20:08 sfbw_ joined
20:09 sfbw joined
20:13 <tristan__> benwilson512: you can configure any application config var from vm.args
20:14 <tristan__> -appname varname value
20:14 <benwilson512> ah nice, got a .config file i'm trying out at the moment, will do that if it doesn't work
20:14 <benwilson512> so in my case I could do like `-kernel sync_nodes_optiona 'foo', 'bar'` ?
20:15 <rvirding> nox notriddle : you have to be very careful making changes deep in the compiler. In some places it just "knows" what the machine expects and if you get it wrong the machine can behave strangely.
20:15 <tristan__> benwilson512: sort of:
20:15 cdg joined
20:15 <tristan__> erl -kernel sync_nodes_optional "[a, b]"
20:15 <tristan__> 1> application:get_env(kernel, sync_nodes_optional).
20:15 <tristan__> {ok,[a,b]}
20:15 <benwilson512> ahh nice that's perfect
20:16 <rvirding> I had some trouble with LFE in getting a match to generate a function clause error and not a case clause error.
20:17 cmk_zzz joined
20:17 <rvirding> Seems you needed the right annotations for it to do that.
20:17 <rvirding> It still generated an error but not the right one.
20:17 <rvirding> Took a while to find that.
20:21 codestorm joined
20:26 mattyw joined
20:27 sillyotter joined
20:27 sillyotter joined
20:31 maxbeizer joined
20:32 greengriminal joined
20:34 sillyotter joined
20:34 stuck_ joined
20:36 Tidur joined
20:38 sillyotter joined
20:39 Ven joined
20:42 <stuck_> I have a pattern matching error trying to call a phoenix controller from a test
20:42 <stuck_> https://pastebin.com/MuJz7wGf
20:45 nd___ joined
20:47 elgenie joined
20:48 <asonge> stuck_: can you post more of the stuff in the test in a gist? that info isn't quite enough. but i'm guessing the problem is probably in your controller. the single test itself is probably good with the controller action/function as well.
20:49 InternetFriend joined
20:55 myronmarston joined
20:55 jmill joined
20:57 <stuck_> asonge: https://gist.github.com/codestorm1/ecdb584f616cd7c83a196e04db96b59e
20:58 <asonge> stuck_: gist supports multiple files, btw (just waiting on the test now)
20:58 jeramyRR joined
20:59 <stuck_> ok, one minute
21:04 <stuck_> ok, asonge, updated
21:05 <asonge> oh, you're not using exunit, i'm gonna have to read some docs :)
21:05 <asonge> i think line 65 of the test might be your issue
21:06 klltkr joined
21:06 <stuck_> what do you see there?
21:07 <asonge> so, the pattern matching error might be the user_path pattern matching error, if you run phoenix.route, you'll see that the update action for user_path takes an id in the url
21:09 <asonge> even if the user_path matches and emits a url to request, the route in the router isn't going to match because there's no id in the url
21:09 <stuck_> ah, thanks, i think i get what you mean
21:09 Cohedrin joined
21:11 josevalim joined
21:19 Ven joined
21:24 sfbw joined
21:31 tonyc joined
21:31 <stuck_> hmm i figured the problem was that ID would be coming in via the URL, not params, but other verbs like delete have it as a param, so no idea what's up. I can't find anywhere user_path is actually created, just usages, maybe it's some phoneix magic?
21:36 josevalim joined
21:40 sfbw_ joined
21:41 sfbw__ joined
21:44 <asonge> stuck_: so, it depends on if the verb takes a body or not.
21:50 rkazak joined
21:59 jkreeftmeijer joined
22:00 klltkr joined
22:07 <Ankhers> stuck_: The user_path and other *_path functions come from your router. The router is a bunch of macros that, on compile, will create a module called MyApp.Web.Router.Helpers that will house the various *_path and *_url functions.
22:07 <Ankhers> And I missed that they left.
22:08 PaReeOhNos joined
22:09 <asonge> np :)
22:19 sixstone joined
22:28 __charly__ joined
22:29 cschneid_ joined
22:37 davidw joined
22:39 sfbw joined
22:49 <antipax> hey all, does anyone know if the :build_per_environment option for apps in umbrellas is supposed to result in a build-per-environment when compiling from the umbrella?
22:50 <antipax> I suppose that option probably only applies when the project is the one you are building, since config could change compilation for dependencies
22:51 <antipax> would be nice to mark mix projects as build per environment to say they are safe to reuse amongst mix envs
22:52 sfbw joined
22:54 <antipax> also I guess protocol consolidation could be affected? nm, sounds like it's probably a bad idea :)
22:56 PaReeOhNos joined
22:57 sfbw joined
22:58 wesleyjoliveira joined
22:59 srxa_ joined
23:01 fmcgeough joined
23:01 jkreeftmeijer joined
23:02 DeadTrickster joined
23:03 proteusguy joined
23:05 InternetFriend joined
23:16 jimmyrcom joined
23:18 greengriminal joined
23:20 Cohedrin joined
23:24 jkreeftmeijer joined
23:25 inoas joined
23:25 refriedchicken joined
23:29 jhack joined
23:29 jhack joined
23:32 sfbw joined
23:39 WhiskyRyan joined
23:47 myronmarston joined
23:48 Cohedrin joined
23:49 cemilowski joined
23:50 dimitarvp joined