<    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 28 29  
30
00:02 MotherFlojo joined
00:04 <notriddle> The JavaScript code needs to call into the Rust code at some point, though...
00:04 <notriddle> You can't write everything-everything in JavaScript.
00:05 <notriddle> Oh, oops, wrong channel.
00:05 hotpancakes joined
00:05 <notriddle> Sorry.
00:16 PaReeOhNos joined
00:18 hotpancakes joined
00:21 iFire joined
00:28 codestorm joined
00:48 jkreeftmeijer joined
00:49 codestorm joined
00:51 whharris joined
00:51 nighty-- joined
01:01 hotpancakes joined
01:03 steffkes joined
01:07 j0ni joined
01:09 codestorm joined
01:10 racycle joined
01:17 InternetFriend joined
01:17 claudevandort joined
01:23 hotpancakes joined
01:24 namidark joined
01:26 <namidark> I'm trying to rewrite a toy app in Elixir/Phoenix/Ecto - I've got my models setup and I can display the simple CRUD stuff, but I'm trying to replicate this query over but not getting anywhere ( https://gist.github.com/joshrendek/0212d911726ffc10a84612e31119a0df ) - any tips/pointers?
01:27 hotpancakes joined
01:32 griffinbyatt joined
01:39 tomterl joined
01:45 Cohedrin joined
01:46 hotpancakes joined
01:50 jkreeftmeijer joined
01:54 mika__ joined
02:12 sfbw joined
02:18 MotherFlojo joined
02:38 bionj joined
02:38 wong2 joined
02:54 whharris joined
02:54 griffinbyatt joined
02:57 meandi_2 joined
03:00 nomicflux joined
03:04 steffkes joined
03:04 steffkes joined
03:16 harfangk joined
03:31 Sgeo joined
03:35 codestorm joined
03:41 sevenseacat joined
03:49 codestorm joined
03:52 jkreeftmeijer joined
03:53 Cohedrin joined
03:57 stevecohen joined
04:01 targaf joined
04:20 justicefries joined
04:53 jkreeftmeijer joined
05:05 jkreeftmeijer joined
05:05 steffkes joined
05:05 steffkes joined
05:08 jkreeftmeijer joined
05:11 jkreeftm_ joined
05:23 griffinbyatt joined
05:28 toastytheog joined
05:29 <toastytheog> hello
05:34 whharris joined
05:40 wsieroci joined
05:56 sfbw joined
06:02 codestorm joined
06:04 gvaughn joined
06:13 nahtnam joined
06:17 Ioyrie joined
06:18 Cohedrin joined
06:20 proteusguy joined
06:24 griffinbyatt joined
06:28 gmcabrita joined
06:39 jkreeftmeijer joined
06:41 jkreeftm_ joined
06:52 tuacker joined
06:56 codestorm joined
06:57 zvrk joined
06:59 sfbw joined
07:00 sfbw_ joined
07:05 jkreeftmeijer joined
07:06 steffkes joined
07:06 steffkes joined
07:08 ffi_merlin joined
07:14 bionj joined
07:19 milad joined
07:24 griffinbyatt joined
07:44 dastagg joined
07:47 MotherFlojo joined
07:51 codestorm joined
07:51 craigp joined
07:52 jeznet3 joined
07:52 tuacker1 joined
07:52 gvaughn joined
07:54 ffi_merlin joined
07:54 josevalim joined
08:02 sfbw joined
08:05 jkreeftmeijer joined
08:05 justicefries left
08:11 toastytheog joined
08:17 milad joined
08:20 whharris joined
08:20 nd__ joined
08:25 griffinbyatt joined
08:29 stephen_m joined
08:34 codestorm joined
08:36 LangeOortjes joined
08:38 jkreeftmeijer joined
08:52 steffkes joined
08:57 milad joined
08:57 milad joined
09:02 PaReeOhNos joined
09:03 sfbw joined
09:05 icanhazbroccoli1 joined
09:07 jkreeftmeijer joined
09:11 Guest67_ joined
09:12 meh` joined
09:15 imush joined
09:21 whharris joined
09:26 griffinbyatt joined
09:28 codestorm joined
09:41 gvaughn joined
09:48 MotherFlojo joined
09:49 embik joined
09:52 josevalim joined
09:55 imack joined
09:55 imush joined
09:56 imush joined
09:56 milad joined
10:03 sfbw joined
10:06 lexmag joined
10:08 _eagle joined
10:11 MotherFlojo joined
10:19 milad joined
10:21 Ilyes512 joined
10:22 codestorm joined
10:24 hbraun joined
10:27 griffinbyatt joined
10:31 Gasher joined
10:36 Ven joined
10:36 Ilyes512 joined
10:40 egis joined
10:44 nighty-- joined
10:48 JuanMiguel joined
10:51 jeznet3 joined
10:51 icanhazbroccoli joined
10:53 steffkes joined
10:57 Tidur joined
11:01 meh` joined
11:03 squallstter joined
11:04 sfbw joined
11:08 milad joined
11:09 Alex____ joined
11:09 <Alex____> Guys, I'm new to Phoenix/Elixir and I hope you'll be able to help me with one problem. I have a table with a :string id and I want to create a relation with another table # roles migration create table(:roles, primary_key: false) do add :id, :string, primary_key: true add :name, :string end # roles model @primary_key {:id, :string, []} @derive {Phoenix.Param, key: :id} schema "roles" do field :name, :string has_man
11:15 Ilyes512 joined
11:16 codestorm joined
11:18 toastytheog joined
11:28 griffinbyatt joined
11:28 milad joined
11:29 gvaughn joined
11:32 <Alex____> Solved the problem, thanks
11:35 milad joined
11:37 griffinbyatt joined
11:41 bturnbull joined
11:42 sfbw joined
11:44 whharris joined
11:47 griffinb_ joined
11:49 icanhazbroccoli joined
12:04 cristianR_ joined
12:11 codestorm joined
12:11 nd__ joined
12:15 MaSven joined
12:20 epochwolf joined
12:21 sfbw joined
12:37 rranelli joined
12:42 icanhazbroccoli joined
12:46 nomicflux joined
12:51 maxbeizer joined
12:53 steffkes joined
12:53 steffkes joined
12:59 JEG2 joined
13:02 milad joined
13:02 milad joined
13:05 maxbeizer joined
13:06 ikcerog joined
13:07 wong2 joined
13:13 dimitarvp joined
13:14 sfbw joined
13:18 gvaughn joined
13:37 whharris joined
13:39 cevado joined
13:42 bpmcd joined
13:47 jschneck joined
13:50 InternetFriend joined
13:57 superherointj joined
13:57 meh` joined
13:59 codestorm joined
14:05 InternetFriend joined
14:06 coatezy joined
14:07 racycle joined
14:13 cdg joined
14:16 codestorm joined
14:16 gvaughn joined
14:17 gvaughn_ joined
14:26 lexmag joined
14:28 gokr joined
14:30 pesnk joined
14:31 JuanMiguel joined
14:32 chrismccord joined
14:36 <cristianR_> Hello
14:36 wong2 joined
14:37 <cristianR_> Do you know if there is a way to enforce an exponential backoff restart policy to a supervisor?
14:39 <JEG2> @cristianR_ There's not.
14:40 <JEG2> @cristianR_ This may help you: https://github.com/appcues/gen_retry
14:41 refriedchicken66 joined
14:41 meh` joined
14:42 <cristianR_> JEG2: Thanks, I would probably end up moving the code in the init function of the childs to a helper function and uses GenRetry to do the initialization
14:43 hotpancakes joined
14:44 <JEG2> cristianR_: Cool. I hope it helps.
14:46 MotherFlojo joined
14:52 fxn joined
14:52 d10n-work joined
14:53 <fxn> why does Elixir ship with Unix and .bat executables, but only one of them has a PowerShell version? https://github.com/elixir-lang/elixir/tree/master/bin
14:54 steffkes joined
14:57 wong2 joined
14:58 pedrosnk joined
14:58 pedrosnk left
15:00 Ilyes512 joined
15:01 <Ilyes512> lol
15:02 <Ilyes512> i wrote a question down here and fallowed up with like 8 more lines over 40+ minutes before I noticed I wasn't connected to the channel/server -.-
15:02 <Ilyes512> in the end I found out the answer my self :P
15:11 superherointj left
15:14 bigkevmcd joined
15:15 whharris joined
15:15 kblake joined
15:16 Ilyes512 joined
15:17 Ilyes512 joined
15:23 stevecohen joined
15:26 hotpancakes joined
15:26 milad joined
15:33 hotpancakes joined
15:33 m_m joined
15:35 whharris joined
15:39 cevado joined
15:45 tuacker joined
15:46 racycle joined
15:47 imack joined
15:54 amclain joined
15:55 davidw joined
16:05 kblake joined
16:05 rschmukler joined
16:08 mika__ joined
16:09 kblake joined
16:10 kblake joined
16:10 ZippoWeb joined
16:12 kblake_ joined
16:15 kblake joined
16:17 rschmukler joined
16:21 hotpanca_ joined
16:24 codestorm joined
16:25 jeramyRR joined
16:26 whharris joined
16:26 flaviodesousa joined
16:30 cevado joined
16:33 Theophane joined
16:38 stephen_m joined
16:41 toastytheog joined
16:42 codestorm joined
16:43 pesnk joined
16:44 refriedchicken joined
16:47 milad joined
16:48 stevecohen joined
16:48 meh` joined
16:51 rschmukl_ joined
16:54 <toastytheog> hello
16:55 steffkes joined
16:55 steffkes joined
16:55 mika__ joined
16:56 ejpcmac joined
17:04 <Nicd-> hello toastytheog
17:09 nbg joined
17:15 whharris joined
17:17 smferris joined
17:20 <ejpcmac> Hello! Does Phoenix.ConnTest.get/3 is intended to work with a session attached to the `conn`?
17:22 <ejpcmac> I’m trying to use it in tests, and it does not work: when I inspect the `conn` right before calling get/3, there is the session information, but when I inspect the `conn` in the called controller, it is not present. What am I missing? (Both the test and the controller pass through the :browser pipeline)
17:24 <ciawal> how are you creating the conn with the session?
17:24 maxbeizer joined
17:25 <ejpcmac> I pass the test conn through the :browser pipeline : conn |> bypass_through(MyApp.Web.Router, :browser) |> get("/")
17:25 <ejpcmac> and then I add my session info with put_session
17:27 meh` joined
17:28 <ejpcmac> And then pipe it into get/3, and the session parameters I’ve put with put_session are not there (but if I inspect just before the get/3, in the test case, they are there)
17:29 <ciawal> https://gist.github.com/ciaran/49b474646a80642b8065389c198adfe1
17:29 <ciawal> here’s the helper I use
17:31 <ejpcmac> Oh, thanks! It works!
17:31 <ejpcmac> I did not `send_resp/2` after putting some session parameters
17:31 Cohedrin joined
17:33 icanhazbroccoli joined
17:43 cevado joined
17:44 stevecohen joined
17:50 codestorm joined
17:54 racycle joined
17:58 m_m joined
18:02 bungoman_ joined
18:03 <Zarathu> does anyone else use apns4ex, or some apple push notification library? I'm getting this infinite loop: https://i.imgur.com/NsnFXmY.png
18:03 <Zarathu> it's driving me nuts
18:10 <Zarathu> nvm, fixed ;x
18:16 NeverDie joined
18:20 <micmus> I think I found something wired - quote(do: unquote(:foo)()) correctly gives {:foo, _, []}, but passing unquote(:foo)() to a macro makes the macro receive {{:unquote, _, [:foo]}, _, []} as argument. Is this intended?
18:20 <micmus> Shouldn't it also be {:foo, _, []}?
18:24 refriedchicken joined
18:29 AlexS joined
18:32 <ejpcmac> Is it possible to use a fonction plug from another module, or do I need to convert it to a module plug?
18:33 whharris joined
18:33 <ljarvis> ejpcmac: try it
18:36 lexmag joined
18:38 <ejpcmac> ljarvis: I can call the the other module’s function plug in a local function which I can plug, but I can’t figure how to plug directly the MyModule.my_plug/2
18:38 <Ioyrie> ejpcmac: i suppose you can always import your module then function plug
18:39 <ljarvis> ejpcmac: right, you can't do that because functions aren't first-class, so you have to use an intermediate function. I would just use a module plug or import the module
18:41 <ejpcmac> I tried to import the module, but I get a compilation error saying from an random view that MyApp.Web.Router.Helpers is not loaded
18:42 <ejpcmac> I suspect imports I have in the module to do a mess
18:44 codestorm joined
18:46 <ejpcmac> Ok, it seems Elixir does not like import loops. I was importing Router.Helpers in the module. Using an alias instead has solved the problem :)
18:47 Ilyes512 joined
18:48 Aslan joined
18:49 josevalim joined
18:54 cevado joined
18:56 steffkes joined
18:58 MotherFlojo joined
18:59 gokr joined
19:07 <asonge> ejpcmac: circular deps are bad :)
19:10 ctp joined
19:10 pcre joined
19:11 <ejpcmac> asonge: Yes, I know. This is interesting because yesterday I was trying to figure the reason why I feel not comfortable with import, versus alias. Now I know: it can lead to unexpected problems.
19:11 <asonge> ejpcmac: even if you don't use imports and everything compiles, circular dependencies between modules are usually a code smell.
19:11 <asonge> just FYI
19:11 m_m joined
19:12 smferris joined
19:12 <asonge> (also, i tend to have very restrictive imports, and almost always use only: [], unless the module has a very tight set of functions)
19:13 smferris joined
19:13 milad joined
19:15 jbomo joined
19:16 <ejpcmac> But in my case I don’t see how to avoid this circular dependency: the plug is used in the router to perform an authorization check, and if it fails, it performs a redirect to an address I get from a Router.Helpers.xxx_path, which needs the Router to exist.
19:18 <ejpcmac> Otherwise yes, I understand this is a bad practice, and I’ll try to do my best to avoid such situations. (I think it’s my third week into Elixir, so I still have a lot to learn, try to write better code, etc…)
19:18 squallstter joined
19:22 m_m joined
19:23 stevecohen joined
19:25 hashpuppy joined
19:28 milad joined
19:28 josevalim_ joined
19:29 <asonge> that sounds fine. but the reason you ran into an issue is because import and use also require a module, which is a compile-time dependency
19:29 <asonge> glad you resolved it though.
19:35 <ejpcmac> asonge: Thank you for advice!
19:36 rschmukler joined
19:38 codestorm joined
19:40 wsieroci joined
19:44 kblake joined
19:46 kblake joined
19:47 kblake_ joined
19:49 kblake joined
19:49 dastagg joined
19:50 kblake_ joined
19:51 kblake joined
19:52 kblake_ joined
19:53 smferris joined
19:54 milad joined
19:55 ejpcmac left
19:55 egis joined
19:57 stephen_m joined
20:00 milad joined
20:01 marcdel joined
20:03 <mrus> Does anyone here have experience with Maru (https://github.com/elixir-maru/maru) and its params? Trying to have `requires :myjsonproperty, type: Map` in order to get an JSON object that could contain *anything*, unfortunately the params object I get from Maru has "myjsonproperty" set to %{}.
20:07 codestorm7 joined
20:08 codestorm joined
20:16 smferris joined
20:17 asabil joined
20:21 kvbx joined
20:23 <kvbx> Hi, is there a function to find out if a map is a subset of another map? Like pattern matching %{foo: "foo"} = %{foo: "foo", bar: "bar"} but with variables?
20:31 stevecohen joined
20:34 m_m joined
20:36 refriedchicken joined
20:40 refriedchicken66 joined
20:46 <mrus> kvbx: shouldn't it be possible to compare using foo_variable.__struct__ == Foo ?
20:47 <mrus> (if your maps are structs at least)
20:48 refriedchicken joined
20:50 <OliverMT> kvbx: yes, %{foo: ^value_holding_previous_foo} = other_map
20:51 <OliverMT> or rather, the foo you want to make sure is in the map
20:51 <OliverMT> cant be used in function guards if thats your aim
20:57 steffkes joined
21:00 cdg joined
21:03 codestorm joined
21:03 sfbw joined
21:06 jeramyRR joined
21:12 <kvbx> mrus: Wouldn't that just check if I've got a %Foo{}?
21:12 <kvbx> I think I've got to write some more about the problem.
21:13 <kvbx> Suppose i've got a list of Todo structs, which have keys :text and :completed.
21:14 <kvbx> Now I'd like to filter them. I could use Enum.filter(todolist, &match?(pattern, &1))
21:15 <kvbx> If I could supply a variable 'pattern'.
21:16 <kvbx> Maybe I'd like to get all completed todos, with a pattern %{completed: true}
21:16 teepark_ joined
21:17 <kvbx> But the pin (^) operator behaves different than a literal pattern.
21:17 <kvbx> OliverMT: I don't know beforehand which keys are supplied.
21:29 maxbeizer joined
21:31 josevalim joined
21:36 gokr joined
21:38 cdg joined
21:41 rschmukler joined
21:46 marr joined
21:53 Raticide left
21:57 codestorm joined
22:09 cevado joined
22:11 pcre joined
22:12 jeramyRR joined
22:13 cevado joined
22:19 jeramyRR joined
22:29 mika__ joined
22:41 cdg_ joined
22:51 codestorm joined
22:58 steffkes joined
23:06 <Aslan> JOIN
23:08 coatezy joined
23:17 hashpuppy joined
23:23 mika__ joined
23:30 TinkerTyper joined
23:33 nomicflux joined
23:36 griffinbyatt joined
23:37 bturnbull joined
23:42 ultralazer joined
23:42 kronicdeth joined
23:45 codestorm joined
23:47 stevecohen joined
23:48 bpmcd joined
23:50 <ultralazer> Hello
23:58 chrismccord joined