<    April 2017    >
Su Mo Tu We Th Fr Sa  
 2  3  4  5  6  7  8  
 9 10 11 12 13 14 15  
16 17 18 19 20 21 22  
23 24 25 26 27 28 29  
00:04 bttf joined
00:07 jkreeftmeijer joined
00:10 rschmukler joined
00:23 rschmukler joined
00:24 jimt joined
00:28 codestorm joined
00:35 refriedchicken66 joined
00:37 codestorm joined
01:02 raycoll joined
01:03 nighty-- joined
01:03 wwwd joined
01:17 steffkes joined
01:17 steffkes joined
01:29 milad joined
01:32 ddevil joined
01:33 jimt_ joined
01:35 griffinbyatt joined
01:38 jimt joined
01:39 tomterl joined
01:40 cryptomata joined
01:46 cryptomata joined
01:50 chrismccord joined
01:53 seancribbs joined
01:55 sleepi joined
01:56 <sleepi> Hey does anyone have experience using browser sync with phoenix
02:00 icanhazbroccoli joined
02:03 raycoll joined
02:05 bionj joined
02:08 jkreeftmeijer joined
02:12 PhatLe joined
02:21 codestorm joined
02:24 fschuindt joined
02:26 bionj joined
02:31 kblake joined
02:34 wong2 joined
02:43 bambanx joined
02:45 jetpackjoe joined
02:49 griffinbyatt joined
02:56 meandi_2 joined
03:06 racycle joined
03:12 seancribbs joined
03:18 steffkes joined
03:20 raycoll joined
03:20 nomicflux joined
03:27 <hexkey[m]> I have a quick question: does anyone know if nerves works with the RPi Zero W?
03:28 <hexkey[m]> The docs say that it works with the vanilla version, but I'm not sure if that includes he Wireless one
03:28 <hexkey[m]> https://hexdocs.pm/nerves/targets.html
03:32 raycoll joined
03:36 isubasti joined
03:37 mk[] joined
03:38 <mk[]> what's a good way to implement long polling of a REST URL with GenServer?
03:39 <mk[]> i.e. make handle_call sleep for a second or so before recurring
03:39 raycoll joined
03:48 <micmus> mk[]: send yourself a delayed message with Process.send_after, most http libraries can work in a way that they will send message to the process once they have some data
03:49 <micmus> so you can see which one you'll get first
03:50 codestorm joined
03:50 griffinbyatt joined
03:51 <mk[]> micmus: thanks, I'll try that. There's pagination, so I just need to keep track of next_batch parameter
03:56 seancribbs joined
04:07 kblake joined
04:09 jkreeftmeijer joined
04:11 kblake_ joined
04:12 milad joined
04:13 nomicflux joined
04:19 gottcha joined
04:19 proflonghair joined
04:28 bionj joined
04:29 xuxu joined
04:29 xuxu left
04:46 dj_goku joined
04:51 griffinbyatt joined
04:57 jetpackjoe left
05:01 lalo2302 joined
05:01 <lalo2302> Hi!
05:02 <lalo2302> I have a question about the correct context basename in the generator
05:03 <lalo2302> I'm trying to fix issue #2240
05:05 <lalo2302> If I create a nested Context with a module name of "Site.Blog" should the basename be "site_blog"?
05:07 dec0n joined
05:11 Sgeo_ joined
05:19 steffkes joined
05:23 kblake joined
05:29 codestorm joined
05:30 imack joined
05:38 gvaughn joined
05:48 Cohedrin joined
05:52 tomaz_b joined
05:57 bionj joined
06:04 zvrk joined
06:09 meandi_2 joined
06:11 zvrk joined
06:11 jkreeftmeijer joined
06:16 m_m joined
06:30 icanhazbroccoli joined
06:34 teamj joined
06:36 dani0_ joined
06:41 bionj joined
06:44 squallstter joined
06:49 jkreeftmeijer joined
06:51 colrack joined
06:52 hellobo joined
06:52 <hellobo> timer
06:53 griffinbyatt joined
06:53 teamj joined
06:55 codestorm joined
07:09 ens_ joined
07:10 teamj joined
07:12 tuacker joined
07:13 teamj joined
07:16 refriedchicken joined
07:18 stephen_m joined
07:19 teamj joined
07:20 steffkes joined
07:25 MaSven joined
07:25 teamj_ joined
07:26 gvaughn joined
07:27 m_m joined
07:28 mark_66 joined
07:29 peterpp joined
07:33 colrack joined
07:39 nii236 joined
07:39 dastagg joined
07:47 <ivan> does anyone know why `rebar3 compile` in erlexec/ would work fine but cause a 100% CPU infinite loop in beam.smp when being built by mix?
07:49 <ivan> some kind of infinite loop that includes looking for deps/erlexec/_build/default/plugins/pc/rebar.lock.script. this will be fun.
07:50 codestorm joined
07:51 tuacker1 joined
07:56 griffinbyatt joined
08:11 <ivan> I uh upgraded rebar3 and it works now :/
08:29 eddd joined
08:30 asabil joined
08:31 the_voice- joined
08:33 robinsjdotcom joined
08:44 robinsjdotcom joined
08:44 codestorm joined
08:48 marr joined
08:51 milad joined
08:51 Mitkins joined
08:51 steffkes joined
08:51 steffkes joined
08:56 griffinbyatt joined
08:57 PaReeOhNos joined
08:57 gokr joined
08:59 josevalim joined
09:03 imush joined
09:05 mk[] left
09:06 MaSven joined
09:15 gvaughn joined
09:15 ZippoWeb joined
09:17 adgtl- left
09:20 codestorm joined
09:21 lexmag joined
09:32 cemilowski joined
09:35 Quanttek joined
09:50 dani0_ joined
09:57 griffinbyatt joined
09:58 nighty-- joined
10:00 gmcabrita joined
10:08 blahdodo joined
10:10 inoas joined
10:14 codestorm joined
10:18 pippo joined
10:18 <pippo> ciao
10:18 <pippo> !list
10:18 pippo left
10:19 exadeci joined
10:20 dani0_ joined
10:22 zvrk joined
10:26 milad joined
10:30 greengriminal joined
10:33 bturnbull joined
10:37 steffkes joined
10:38 cemilowski joined
10:48 nickjj joined
10:55 <mrus> Does anyone know of a quick way to extract an array containing only one property's value of an Map array containing multiple properties? e.g.: [%MyMap{one: "1", two: "2"}, %MyMap{...}, ...] -> ["1", "2", ...]
10:57 dani0_ joined
10:57 <mrus> Sorry, my example was broken: [%MyMap{one: "1", two: "bla", three: "bla"}, %MyMap{one: "2", two: "bla", three: "bla", ...}, ...] -> ["1", "2", ...]
10:58 griffinbyatt joined
10:58 <gazler> mrus: Maybe something like [%{one: "1", two: "2"}, %{three: "3"}] |> Enum.flat_map(&(Map.values(&1)))
10:59 <mrus> gazler: I only one the value of the property "one" to be precise.
10:59 <mrus> So, I want each Map's property :one extracted into a new array with only their values.
11:00 <gazler> Ohhh, [%{one: "1", two: "2"}, %{one: "2", three: "3"}] |> Enum.map(&(&1.one))
11:01 <mrus> gazler: wow, nice, thank you! :-)
11:01 <mrus> that's it
11:01 <mrus> what does the & do in there?
11:02 <gazler> mrus: It is the same as Enum.map(fn item -> item.one end)
11:02 <gazler> http://elixir-lang.org/getting-started/modules-and-functions.html#function-capturing
11:03 <mrus> cool, thanks
11:03 gvaughn joined
11:08 codestorm joined
11:14 sillyotter joined
11:26 griffinbyatt joined
11:26 Guest67 joined
11:31 sevenseacat joined
11:31 wyzzard joined
11:33 wyzzard joined
11:33 wyzzard left
11:34 wyzzard joined
11:34 <wyzzard> I have a really dumb phoenix/brunch question
11:34 <ivan> anyone have any idea why erlexec would apparently be getting an empty list for portexe? https://gist.github.com/ivan/69588aa92199525d6c75f5ebd3400c80
11:34 <ivan> Exe0 = proplists:get_value(portexe, Options, default(portexe)), <- in erlexec
11:35 <wyzzard> I have a js file with just “console.log("Logs to the console”);”
11:35 <wyzzard> In app.js I have written: import "web/static/js/logging.js”
11:36 <wyzzard> when I reload the page I don’t see anything in the console
11:36 <wyzzard> why does that not work?
11:41 <mrus> wyzzard: your babel.js is probably not transpiling
11:42 adgtl- joined
11:43 <wyzzard> mrus: Hmm I’m not seeing any error messages and the asset pipeline is usually pretty good at complaining
11:44 <wyzzard> Furthermore I am able to import modernizr and can confirm that works
11:44 <mrus> wyzzard: can you browse the compiled code for your string ("Logs to console")?
11:44 <mrus> it should be there, if transpiling worked
11:45 <wyzzard> require("web/static/js/logging.js");
11:45 <wyzzard> function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11:45 <wyzzard> });
11:45 <wyzzard> ;require.register("web/static/js/logging.js", function(exports, require, module) {
11:45 <wyzzard> "use strict";
11:45 <wyzzard> console.log("Logs to the console");
11:45 <wyzzard> });
11:45 <mrus> okay
11:46 <mrus> maybe try to execute the console.log statement inside of a function and call that function from within app.js?
11:47 <mrus> I don't really know how Phoenix structures its JS
11:47 <sevenseacat> i dont think there's anything phoenix-specific in the question
11:49 <wyzzard> sevenseacat: it’s definitely not understanding how brunch and phoenix are strcuturing js
11:49 <wyzzard> (Which has made me feel incredibly dumb)
11:50 <sevenseacat> phoenix has support for brunch. it also doesnt have anything brunch-specific in it
11:51 <mrus> Maybe something overwrites console.log?
11:53 <peterpp> what does the pipe operator do in the when clause here: def listen!(port) when port |> is_integer do
11:53 <sevenseacat> same thing it does anywhere else
11:53 <sevenseacat> passes the left as the first argument to the function on the right
11:54 <peterpp> when I pressed enter I though... oh man so obvious
11:54 <peterpp> thought
11:54 <peterpp> thanks though ;-)
11:54 <sevenseacat> np
11:56 milad joined
12:00 greengriminal joined
12:02 bionj joined
12:05 griffinbyatt joined
12:14 PaReeOhN_ joined
12:14 mika_ joined
12:17 dimitarvp joined
12:18 <wyzzard> Is there a tutorial for working with javascript with brunch, it’s been an hour and I cannot figure out how to hello world, which is embarassing
12:19 <gazler> wyzzard: I just tried with a brand new app and it worked as expected. Could you push your repo up on GitHub and I'll take a look.
12:23 <wyzzard> gazler: Tried with a brand new app, and that does work
12:23 <wyzzard> So I’m not crazy after all
12:24 <wyzzard> now I gotta figure out what the hell is going on here
12:25 <gazler> wyzzard: Try changing console.log to alert or something. See if it is being overridden.
12:31 imush joined
12:35 the_voice- joined
12:38 steffkes joined
12:41 ebanoid joined
12:50 <wyzzard> gazler: Found the source of my frustration, chrome was blocking JS
12:51 <wyzzard> Trying in another browser was the solution
12:51 <gazler> wyzzard: :(
12:51 <wyzzard> At least it was something dumb, and not me going crazy
12:52 <gazler> I have had it a few times where restarting chrome was the solution. Never seem to start with that though!
12:52 gvaughn joined
12:53 <PaReeOhN_> Is it possible at compile time to update a module attribute of a different module? e.g. if I `use` a module, I want the using module to register itself with the module it is using
12:56 milad joined
12:56 codestorm joined
12:59 arquebus joined
13:02 supergeek joined
13:05 arquebus joined
13:08 supergeek joined
13:09 bpmcd joined
13:17 milad joined
13:19 <iFire> Does the ecto tests actually execute the queries or is it just a syntax check?
13:22 sfbw joined
13:25 peterpp joined
13:25 bigkevmcd joined
13:33 milad joined
13:38 filozof joined
13:43 bionj joined
13:43 harfangk joined
13:44 cemilowski joined
13:47 potatosalad joined
13:50 codestorm joined
13:53 asabil joined
13:54 chrismccord joined
13:55 InternetFriend joined
13:55 <mrus> Could someone take a look at this piece of recursion I'm trying to get right please? https://pastebin.com/uxPgNUSx Not sure what I'm doing wrong, but Elixir keeps telling "%UndefinedFunctionError{arity: 1, exports: nil, function: :id, module: :ok, && reason: nil}"...
13:59 <ivan> mrus: what are you doing? is it something you can't do with Enum.map?
14:00 gvaughn joined
14:00 <mrus> ivan: I'm checking whether I have enough phone numbers available (basically a list containing strings). If that list is < 2, I need to purchase phone numbers, so I'm trying to recursively purchase 2 - available of phonenumbers.
14:01 <mrus> ivan: not sure how an Enum.map that does that could look.
14:03 <ivan> OK I'm halfway through understanding the logic here
14:03 <ivan> FYI
14:03 <ivan> iex(1)> [1,2,3] |> Enum.take(2)
14:03 <ivan> [1, 2]
14:04 <mrus> nice! thanks
14:05 <mrus> ivan: so, I basically just tried implemeting a similar approach that's being mentioned here: http://elixir-lang.org/getting-started/recursion.html#loops-through-recursion
14:05 <mrus> unfortunately I seem to have overseen something important
14:06 <ivan> can you paste the whole error somewhere?
14:07 <mrus> sure
14:07 <mrus> It's really just: %UndefinedFunctionError{arity: 1, exports: nil, function: :id, module: :ok, && reason: nil}
14:07 <mrus> Nothing more.
14:09 <ivan> that's a really strange thing to be seeing
14:10 <ivan> do you have a better error above that?
14:12 <mrus> Nope, no error above that one.
14:13 <mrus> It even compiles without errors, only a few unused vars warnings.
14:13 <ivan> is this being run in some phoenix context? maybe you'll get a better error at a REPL
14:13 <ivan> iex -S mix
14:14 <mrus> No, not using Phoenix at all, running it through iex -S mix
14:15 <mrus> Let me check if there is some other code that runs before that one which might cause the trouble..
14:15 <mrus> (but honestly, such error messages are what annoy me most with Elixir)
14:16 <sevenseacat> can we see the full log of what happens when you call the function? ie. copy and paste your iex session
14:17 LastWhisper____ joined
14:17 <sevenseacat> there's more code than you're showing, because there isn't even any public functions there
14:17 claudevandort joined
14:18 eddd joined
14:18 maxbeizer joined
14:19 eddd joined
14:19 <mrus> sevenseacat: of course there's more code, I wanted to concentrate on the recursion as I though that I would have done something wrong in there. Here's the output: https://pastebin.com/11LLzjQy
14:19 <mrus> but apparently the issue lies somewhere else if you people say the recursion looks fine, digging now.
14:19 <sevenseacat> well we can't see what you're calling or even if that code is running
14:20 <ivan> you could interactively test that function you wrote by changing the defp to a def and testing in the REPL
14:20 <mrus> I know :) if it was OSS code I'd have shown you all of it.
14:21 <mrus> ivan: good point.
14:24 griffinbyatt joined
14:25 <ivan> also: Stream.repeatedly(&purchase_any_phonenumber/0) |> Enum.take(n)
14:29 <ivan> does anyone else porcelain and erlexec? as far as I can tell I can't easily reproduce Porcelain out: {:file, Process.group_leader} behavior in erlexec (sending output directly to the terminal)?
14:29 <ivan> it's got a bunch of stdin and stdout options but none that seem to do that
14:31 bturnbull joined
14:31 <ivan> maybe I need to be handling messages that come from erlexec?
14:39 steffkes joined
14:39 steffkes joined
14:45 codestorm joined
14:49 dignifiedquire joined
14:49 bigkevmcd joined
14:54 kblake joined
14:58 racycle joined
15:04 raycoll joined
15:11 <ivan> hurray I figured out I can just pass a 3-arity function for erlexec stdout and stderr
15:15 codestorm joined
15:19 cdg joined
15:20 eddd joined
15:21 davidw joined
15:22 steffkes joined
15:23 peterpp joined
15:24 griffinbyatt joined
15:25 nomicflux joined
15:26 icecreamcohen joined
15:29 HalcyonicStorm joined
15:31 rschmukler joined
15:36 imack joined
15:36 bionj joined
15:39 tuacker joined
15:39 edmz joined
15:40 jparise joined
15:42 adam_ joined
15:45 milad joined
15:45 bionj joined
15:52 lexmag joined
15:56 icecreamcohen joined
15:56 icecreamcohen joined
15:57 snappy_ joined
15:58 <snappy_> I just came across this example code on Sasa Juric's blog: https://gist.github.com/anonymous/06ae2dd1d61fa43e978e367a569404c4 I'm confused about the dot notation on line 6. What's going on there?
15:58 amclain joined
15:58 <ljarvis> snappy_: which part? round.current_hand?
15:58 <snappy_> Yup.
15:58 <snappy_> Oh wait.
15:58 meh` joined
15:58 <snappy_> It's just accessing a key in a map, right?
15:59 <ljarvis> it's just a map :)
15:59 <ljarvis> yep
15:59 <snappy_> facepalm.
15:59 soro joined
15:59 <snappy_> I need more coffee.
15:59 <snappy_> And to learn elixir better, apparently :P
16:02 snappy_ joined
16:08 edmz_ joined
16:10 edmz joined
16:13 the_voice- joined
16:16 jeffweiss joined
16:18 racycle joined
16:19 <sorentwo> In that particular case it is a Struct, not a plain map, but it's still a map underneath.
16:25 griffinbyatt joined
16:30 potatosalad joined
16:30 jparise joined
16:30 ikanobori joined
16:33 mika_ joined
16:38 heroiceric___ joined
16:40 codestorm joined
16:42 edmz_ joined
16:47 milad joined
16:48 kblake joined
16:49 wsieroci joined
16:50 milad joined
16:55 steffkes joined
16:55 steffkes joined
17:00 cdg joined
17:14 gokr joined
17:18 refriedchicken joined
17:19 peterpp joined
17:19 <peterpp> do elixir developers use particular diagrams to capture the relationships between processes etc?
17:21 milad joined
17:22 mika_ joined
17:27 Cohedrin joined
17:29 todoroki joined
17:29 imack joined
17:34 codestorm joined
17:35 steffkes joined
17:41 tolerablyjake joined
17:47 claudevandort joined
17:53 <sorentwo> peterpp: If you mean for running systems, you can view a full tree in the observer's applications tab.
18:01 <peterpp> sorentwo, not necesarily for running systems
18:01 <peterpp> sorentwo, I am a diagram that generally captures what parts of the program interact with each other, maybe what kinds of messages get passed
18:02 <peterpp> just a high-level view of the program
18:02 <peterpp> *I mean..
18:03 bvcosta joined
18:04 chrismccord joined
18:05 josevalim joined
18:07 rschmukler joined
18:10 tolerablyjake joined
18:15 Quanttek joined
18:23 rschmukler joined
18:24 sfbw joined
18:25 tomaz_b joined
18:27 griffinbyatt joined
18:27 sfbw joined
18:28 codestorm joined
18:36 kblake joined
18:36 sfbw joined
18:38 sfbw_ joined
18:43 eddd joined
18:45 greengriminal joined
18:46 MononcQc joined
18:48 codestorm joined
18:56 z1mvader joined
18:59 kyrix joined
18:59 milad joined
19:00 imush joined
19:03 <gausby> peterpp: msc's are great at this https://en.wikipedia.org/wiki/Message_sequence_chart
19:04 milad joined
19:05 <gausby> there are a tool for creating them, but it takes some effort to implement. Jester Louis has a blog post about how it works from Erlang http://jlouisramblings.blogspot.dk/2011/10/using-event-tracer-tool-set-in-erlang.html
19:05 sfbw joined
19:06 sfbw joined
19:07 sfbw_ joined
19:08 sfbw joined
19:09 sfbw joined
19:11 sfbw joined
19:12 sfbw_ joined
19:13 sfbw joined
19:14 sfbw_ joined
19:15 sfbw joined
19:25 codestorm joined
19:27 sfbw joined
19:27 griffinbyatt joined
19:28 josevalim_ joined
19:30 <sorentwo> That's a good point. They make extensive use of them in "Erlang and OTP in Action"
19:35 rschmukler joined
19:46 dastagg joined
19:58 peterpp joined
19:59 steffkes joined
20:18 junsuijin joined
20:19 codestorm joined
20:27 kblake joined
20:28 griffinbyatt joined
20:32 chrismccord joined
20:37 milad joined
20:39 FifthWall joined
20:42 claudevandort joined
21:06 peterpp joined
21:11 <Quanttek> does escript by chance not support unicode? Whenever I 'IO.puts' any character not part of the english latin script, it get's completely garbled (be it emojis or äéâ)
21:11 chrismccord joined
21:12 <Quanttek> example: äöü results in ├ñ├Â├╝
21:13 maxbeizer joined
21:13 codestorm joined
21:15 sfbw joined
21:22 praveen joined
21:30 <PaReeOhN_> Don't suppose there's a way of getting the name of the function that invoked another function?
21:34 webdev007 joined
21:36 gokr joined
21:38 inoas joined
21:43 Quanttek joined
21:46 <alisdair> PaReeOhN_: how important is it? you can trigger an exception, call :erlang.get_stacktrace, then catch it and resume
21:47 <PaReeOhN_> alisdair: hmm seems a little nasty. I basically want to determine a different module based on the calling module, and an argument based on the calling function. Without explicitly passing those values. Kinda hard to explain :(
21:55 <PaReeOhN_> I was hoping I could use __CALLER__ in the function if I make it a macro but I'm getting an error about %Macro.Env being an invalid quoted expression
21:56 nickjj_ joined
21:58 codestorm7 joined
22:01 steffkes joined
22:01 steffkes joined
22:04 mika__ joined
22:07 codestorm joined
22:12 bvcosta joined
22:13 strykerkkd joined
22:16 kronicdeth joined
22:17 tomaz_b joined
22:17 <PaReeOhN_> ok managed to get it working via __CALLER__ and macros :D
22:20 jkreeftmeijer joined
22:26 <Quanttek> Adding to what I asked above: The terminal (cmder on win10; problem also persists in cmd.exe and powershell) does support unicode and I also don't get the usual UnicodeConversionError but this garbled stuff. Setting the terminal to codepage 65001 does work, but no non-elixir application showed any problems with supporting unicode before that
22:29 PaReeOhNos joined
22:30 PaReeOhNos joined
22:31 PaReeOhNos joined
22:32 PaReeOhNos joined
22:33 PaReeOhNos joined
22:33 PaReeOhNos joined
22:33 kblake_ joined
22:34 PaReeOhNos joined
22:35 Uniaika joined
22:35 m_m joined
22:58 maxbeizer joined
22:59 eddd joined
23:01 codestorm joined
23:02 warmwaffles joined
23:02 <warmwaffles> Anyone know where I can find docs for 1.3-rc1 ?
23:03 <warmwaffles> phoenix
23:03 <warmwaffles> nevermind, found it
23:04 junsuijin joined
23:13 <bokayio> Out of curiosity, does anyone knows why Enum does not implement the functions `first` and `last` but List does ? Basically, why List and Enum are not the same module ?
23:14 mika__ joined
23:18 kblake joined
23:24 <benwilson512> @bokayio Enum works with everything that implements the Enumerable protocol
23:24 <benwilson512> that includes maps, files, AWS buckets, all kinds of stuff
23:24 <benwilson512> List works on lists
23:25 <benwilson512> bokayio: first and last imply an order, and order is not something that enumerable items all have
23:25 <benwilson512> what does `some_map |> Enum.first` mean? maps have no real order
23:26 <bokayio> That makes sense! Thank you very much benwilson512!
23:27 <benwilson512> bokayio: happy to help
23:31 griffinbyatt joined
23:34 Cohedrin joined
23:36 PaReeOhNos joined
23:46 dimitarvp joined
23:50 griffinbyatt joined