<    March 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:05 potatosalad joined
00:12 icecreamcohen joined
00:13 <carterparks> 6
00:14 myers joined
00:16 willyk joined
00:21 r00tl3ss joined
00:32 codestorm joined
00:33 montanonic joined
00:34 wtetzner joined
00:40 rschmukler joined
00:45 drjfreeze joined
00:48 segmond joined
00:51 shadowjack joined
00:56 rschmukler joined
00:59 alex88 joined
01:01 nighty joined
01:03 drjfreeze joined
01:05 raycoll joined
01:08 Guedes joined
01:08 Guedes joined
01:14 osieln joined
01:14 jparise joined
01:15 praveen joined
01:20 codestorm joined
01:28 drjfreeze joined
01:29 willyk joined
01:32 potatosalad joined
01:33 zabirauf joined
01:34 zabirauf_ joined
01:39 rschmukler joined
01:45 MotherFlojo joined
01:47 chrismccord joined
02:04 racycle joined
02:06 codestorm joined
02:12 kommen joined
02:19 r00tl3ss joined
02:26 systemfault joined
02:26 zabirauf joined
02:33 r00tl3ss joined
02:36 jeffweiss joined
02:39 laut joined
02:41 tomterl joined
02:45 FIFOd joined
02:50 zabirauf_ joined
02:51 sfbw joined
02:56 wilo- joined
02:57 marcdel joined
02:59 wilo- joined
03:07 wilo- joined
03:10 willyk joined
03:11 kanishka joined
03:15 wilo- joined
03:21 potatosalad joined
03:22 wilo- joined
03:25 MotherFlojo joined
03:27 cdg joined
03:28 rschmukler joined
03:28 wilo- joined
03:28 FIFOd joined
03:32 sahrizv joined
03:39 <proflonghair> bcardarella -> https://www.simonewebdesign.it/how-to-get-the-ast-of-an-elixir-program/
03:42 <proflonghair> `{:ok, ast} = Code.string_to_quoted(File.read!("lib/hello.ex"))`
03:45 zabirauf joined
03:46 wilo- joined
03:46 bungoman joined
03:47 wilo- joined
03:51 marcdel joined
03:52 icecreamcohen joined
03:55 willyk left
03:58 r00tl3ss joined
03:59 wilo- joined
03:59 ekmartin joined
04:02 zabirauf joined
04:16 codestorm joined
04:17 wtetzner joined
04:21 sfbw joined
04:31 marcdel joined
04:31 jeffweiss joined
04:36 icecreamcohen joined
04:42 willykaram joined
04:42 willykaram left
04:47 codestorm joined
04:59 Cloudflare joined
04:59 Cloudflare joined
05:00 chrismccord joined
05:14 alex88 joined
05:16 codestorm joined
05:16 rschmukler joined
05:18 myronmarston joined
05:20 pattyde joined
05:26 drjfreeze joined
05:28 myronmarston joined
05:30 zabirauf joined
05:30 r00tl3ss joined
05:30 zabirauf_ joined
05:31 LightningBolt joined
05:34 LightningBolt left
05:37 smt joined
05:48 kronicdeth joined
05:49 alexarnon joined
05:52 imack joined
05:53 codestorm777 joined
05:54 proteusguy joined
05:55 FIFOd joined
05:56 elixir-lang311 joined
05:58 r00tl3ss joined
06:00 r00tl3ss_ joined
06:06 Tica2 joined
06:08 dec0n joined
06:09 sfbw joined
06:12 wsieroci joined
06:13 kommen joined
06:13 zabirauf joined
06:15 kommen joined
06:18 zabirauf_ joined
06:19 zabirauf joined
06:22 raycoll joined
06:29 voltone joined
06:54 icanhazbroccoli joined
06:58 zabirauf joined
07:02 zabirauf_ joined
07:04 rschmukler joined
07:09 sfbw joined
07:11 gvaughn joined
07:14 shadowjack joined
07:30 treeman joined
07:36 cemilowski joined
07:36 sahrizv joined
07:36 zabirauf joined
07:37 proteusguy joined
07:37 achauvin joined
07:39 byte512 joined
07:46 bigkevmcd joined
07:48 codestorm joined
07:50 achauvin joined
07:55 tuacker joined
07:59 MotherFlojo joined
08:00 kommen joined
08:00 achauvin joined
08:00 kommen joined
08:02 zabirauf joined
08:09 ZippoWeb joined
08:15 m_m_ joined
08:18 <m_m_> Hi all. This day began with message: http://pastebin.com/2kv188UB any idea where I should start my bug search ?
08:20 codestorm joined
08:22 mark_66 joined
08:22 nithinbekal joined
08:25 gokr joined
08:26 drjfreeze joined
08:34 <celyr> it's monday after all (sorry no idea)
08:35 drjfreeze joined
08:43 alea12 joined
08:44 agit0_ joined
08:45 <m_m_> ok I've found it. It was WX lib from observer....uff...no my app :D
08:47 simonoram joined
08:48 <nyaray> m_m_: my (wild) guess is: 1) someone started observer or the debugger (or any other WX app), 2) something crashed, 3) the app started in 1 tries to allocate The Biggest String Ever™ to print the crash stack and finally, 4) good morning :)
08:49 sahrizv joined
08:52 rschmukler joined
08:59 <nyaray> m_m_: also, http://erlang.org/doc/apps/observer/crashdump_ug.html
09:00 gvaughn joined
09:01 teddysmoker joined
09:02 zabirauf joined
09:04 akarambir joined
09:05 lexmag joined
09:09 rikkus joined
09:09 rikkus joined
09:15 codestorm joined
09:15 vmoravec joined
09:18 Guest67_ joined
09:19 josevalim joined
09:22 inoas joined
09:23 nithinbekal joined
09:30 dec0n joined
09:38 cemilowski joined
09:41 achauvin joined
09:59 sahrizv joined
10:01 hbraun joined
10:02 zabirauf joined
10:09 codestorm joined
10:12 robinsjdotcom joined
10:13 Uniaika joined
10:18 nithinbekal joined
10:23 robinsjdotcom joined
10:24 stephen_m joined
10:26 Gk-1wm-su joined
10:26 Gk-1wm-su left
10:30 marr joined
10:31 nithinbekal joined
10:36 drjfreeze joined
10:36 nighty joined
10:37 flaviodesousa joined
10:38 simonoram joined
10:40 rschmukler joined
10:43 gmcabrita joined
10:43 cemilowski joined
10:48 codestorm joined
10:48 gvaughn joined
10:49 zabirauf joined
11:02 sahrizv joined
11:02 lexmag joined
11:03 nhooyr_ joined
11:04 <nhooyr_> does anyone know why the first answer is faster than the second at http://stackoverflow.com/a/36233169/4283659 ?
11:06 sumi joined
11:09 nithinbekal joined
11:10 robinsjd_ joined
11:13 <celyr> I guess because reversing a list is O(1) and also removing the head is. But removing the tail needs the list to be traversed ?
11:15 <nhooyr_> celyr: why is reversing a list O(1)?
11:15 <nhooyr_> shouldn't you have to traverse the entire list?
11:16 <Nicd-> lists:reverse is O(N), but it is implemented in C rather than in Erlang
11:16 <Nicd-> source: http://erlang.org/pipermail/erlang-questions/2007-October/030027.html
11:17 <nhooyr_> interesting.
11:17 <nhooyr_> thanks!
11:17 <nhooyr_> i'll stick with the second solution though because it's more clear and it only takes 0.1 more microseconds
11:18 <celyr> Nicd-, So list are internally rapresented as single linked list ?
11:18 <Nicd-> yes
11:19 <celyr> Nicd-, why not double ? All those operations would be O(1)
11:20 z1mvader joined
11:22 <micmus> celyr: an immutable double linked list is impossible
11:23 <micmus> A = [1]; B = [2 | A] - this would require copying whole A
11:25 <celyr> micmus, I'm thinking about it so my reasining may be wrong, I'm pretty sure that if they did this way there are reasons. But I also think that your explanation is only true if A is of 1 element. I think that with double linked list you would need to copy only 1 element more than with single linked list.
11:25 robinsjdotcom joined
11:27 <Nicd-> celyr: it would also use more memory that would go to waste in many cases
11:29 robinsjd_ joined
11:30 <celyr> Nicd-, Idk when I did my Alghoritms class a tradeoff of N pointers in memory for a general purpose algorithm was always considered a good tradeoff to make actually a lot of functions in Enum going from O(n) to O(1) but than it depends on the size of the lists and on how many of those functions are actually used...
11:32 <celyr> micmus, No I was wrong you need actually to copy the whole A you are right
11:33 <celyr> so it doesn't make sense anymore XD
11:33 <micmus> double linked list needs to modify elements in order to link them
11:33 <micmus> single linked list doesn't need to
11:34 <micmus> in general most functional languages have single linked list as the basic data structure
11:35 zabirauf_ joined
11:38 rikkus joined
11:42 codestorm joined
11:44 r00tl3ss joined
11:45 cristianR_ joined
11:46 zabirauf joined
11:47 harfangk joined
12:08 sahrizv joined
12:08 akarambir joined
12:09 Guedes joined
12:14 nithinbekal joined
12:21 robinsjdotcom joined
12:21 hbraun joined
12:25 rhnonose joined
12:29 rschmukler joined
12:29 dani0_ joined
12:29 m1dnight_ joined
12:31 akarambir joined
12:32 akarambir joined
12:36 codestorm joined
12:37 gvaughn joined
12:38 drjfreeze joined
12:42 codestorm joined
13:06 Or1on joined
13:11 robinsjdotcom joined
13:11 laut joined
13:13 rhnonose joined
13:14 <nyaray> micmus: don't immutable doubly linked list just imply that the whole structure needs to be copied when "modifying"? I mean, immutable doesn't imply that it's never copied.. or am I missing something?
13:15 josevalim_ joined
13:15 <micmus> nyaray: yeah, you could implement immutable double linked list if you copied everything with every modification. That doesn't sound practical, though
13:16 <nyaray> mm, not very practical
13:17 coatezy joined
13:19 smeade joined
13:21 alex88 joined
13:21 inoas joined
13:23 ciawal joined
13:24 sfbw joined
13:31 codestorm joined
13:34 <r00tl3ss> Hallo?
13:34 <r00tl3ss> iex(11)> [7, 8]
13:34 <r00tl3ss> '\a\b'
13:34 <r00tl3ss> What's this?
13:36 coatezy joined
13:37 <r00tl3ss> iex(21)> '\a\b' = [7,8]
13:38 <r00tl3ss> Can someone explain what's happening here?
13:38 <r00tl3ss> iex(22)> '\a\b' = [7,0]
13:38 <r00tl3ss> ** (MatchError) no match of right hand side value: [7, 0]
13:38 <r00tl3ss> iex(22)> '\a\b' = [7,8]
13:38 <r00tl3ss> '\a\b'
13:39 <r00tl3ss> Oh, char lists
13:39 <celyr> iex(3)> '\a\b' == [7, 8]
13:39 <celyr> true
13:40 <r00tl3ss> This seems like it might be confusing (in fact it is)
13:40 <r00tl3ss> should lists not be used to store numbers like this?
13:41 <celyr> [79. 79]
13:41 <celyr> [78, 79]
13:41 <celyr> XD
13:41 <r00tl3ss> It's the Ascii
13:41 <celyr> It looks like
13:42 <celyr> I guess that internally strings are lists
13:42 <voltone> r00tl3ss: it still is just a list of numbers, it's just the way iex displays them
13:42 <voltone> you can change it: IEx.configure inspect: [charlists: :as_lists]
13:43 <r00tl3ss> celyr: actually, strings in elixir use "double quotes" I do believe
13:43 <r00tl3ss> voltone: Thanks!
13:43 <laut> see http://elixir-lang.org/getting-started/binaries-strings-and-char-lists.html
13:44 <Nicd-> celyr: elixir strings are binaries, erlang "strings" (charlists) are lists of integers
13:44 <celyr> yeah right
13:44 alih_ joined
13:46 simonoram joined
13:47 dani0_ joined
14:01 dimitarvp joined
14:01 dani0_ joined
14:07 socketguru joined
14:09 <asabil> I am hitting a strange error with ecto sandbox
14:09 <asabil> ** (CaseClauseError) no case clause matching: {:error, :invalid_message}
14:09 <asabil> stacktrace:
14:09 <asabil> (db_connection) lib/db_connection/ownership.ex:58: DBConnection.Ownership.ownership_checkout/2
14:09 <asabil> (ecto) lib/ecto/adapters/sql/sandbox.ex:477: Ecto.Adapters.SQL.Sandbox.checkout/2
14:09 <asabil> any idea?
14:10 smeade joined
14:13 <fishcakez> asabil: it means poolboy is being started instead of sql sandbox
14:15 ramortegui joined
14:15 <asabil> I found the issue =_=, thanks fishcake, it was a stupid misconfiguration
14:16 <asabil> thanks :)
14:16 <iFire> morning fishcakez
14:16 <fishcakez> iFire: o/
14:16 lexmag joined
14:17 rschmukler joined
14:18 camcaine joined
14:18 mikebonar joined
14:19 <mikebonar> has anyone managed to get nerves running on rpi2?
14:19 inoas joined
14:23 sfbw joined
14:25 cdg joined
14:25 gvaughn joined
14:25 codestorm joined
14:27 sfbw joined
14:35 <OliverMT> how do I make a binary from an enumerable?
14:35 <OliverMT> lol
14:35 <OliverMT> I mean how do I make a binary into an enumerable?
14:35 <OliverMT> I have a big binary that I need to hand to a functio that takes an enum
14:36 <benwilson512> OliverMT: the main initial question is, what do you want to iterate by
14:36 <benwilson512> bytes? codepoints?
14:36 <OliverMT> bytes
14:36 <OliverMT> I am using your S3.upload actually
14:37 <OliverMT> but I already have the binary, so no need for the stream wrapper
14:37 <benwilson512> how large is the binary?
14:37 <OliverMT> more than 5mb
14:37 <benwilson512> gotcha
14:37 <OliverMT> that is the only param I go by
14:37 <OliverMT> so I was planning on binary -> to enum -> chunk by 5mb
14:37 <OliverMT> into a stream
14:39 drjfreeze joined
14:40 <OliverMT> actually, you already do Stream.with_index
14:40 <OliverMT> so I just need to give it an enum
14:41 <OliverMT> is this the one I want maybe? http://erlang.org/doc/man/erlang.html#binary_to_list-1
14:41 <harfangk> using binary comprehension to turn it into a list is the simple brutal way
14:41 <OliverMT> isnt that func I pasted a better way? :P
14:42 <harfangk> yeah i think it's the same thing
14:42 <harfangk> but then that whole binary-turned-into-list will be held in memory, right?
14:42 <benwilson512> well
14:42 <benwilson512> the most efficient way to do this is gonna be to compute a sequence of offsets
14:42 juhoh joined
14:42 <benwilson512> and then use binary_part to get parts of the binary that correspond to those offsets
14:43 <benwilson512> use the chunk_stream function found in ExAws.S3.Download
14:43 <OliverMT> I am already holding it in memory harfangk
14:44 meh` joined
14:44 <benwilson512> OliverMT: you'd be making a lot of garbage though
14:44 <OliverMT> I could just write it to a tmp file and use your functions
14:44 <benwilson512> if you went byte by byte
14:44 <OliverMT> and be done with it
14:44 <OliverMT> I'll do that instead :p
14:44 <benwilson512> you could but you don't need to
14:44 <benwilson512> so
14:44 <tuacker> I get a base64 encoded HMAC256 form a request. Is there a difference in speed if i do `Base.decode_64(request_sgnature) == :crypto.hmac(…)` OR `request_signature == :crypto.(..) |> Base.encode_64()`
14:45 <benwilson512> https://www.irccloud.com/pastebin/JqtHlAm0/
14:45 <benwilson512> OliverMT: ^
14:45 <tuacker> url_decode*
14:46 <benwilson512> tuacker: I don't know, you'll likely want to benchmark
14:46 <OliverMT> do I pipe that into .upload as first param then?
14:47 <benwilson512> OliverMT: I think so
14:52 quibstar joined
14:53 <quibstar> Has anyone started with Pheonix 1.3 yet?
14:55 Guest67_ joined
14:56 mikebonar joined
14:57 gvaughn joined
14:58 gvaughn_ joined
14:58 myronmarston joined
15:00 nanohest joined
15:00 juhoh joined
15:04 jschoolcraft joined
15:04 <juhoh> Hi, I installed 1.3.rc0 and when compiling I'm asked if I should install a local copy of rebar3. Will I have problems deploying if I want to use the rc version? Is there a release date for 1.3 already? Should I be developing my app on the rc version or revert to 1.2 and upgrade when 1.3 comes out?
15:06 m_m joined
15:07 <m_m> Hi all. Is there any possibility in elixir to view table in mnesia like tables in pgadmin for postgres ? (less or more). I need it for debug
15:13 potatosalad joined
15:13 raycoll joined
15:16 robinsjdotcom joined
15:17 simonoram joined
15:19 <laut> @juhoh it's ok to install rebar3. rebar3 will be the same no matter if you want to use phoenix 1.2 or 1.3
15:19 lexmag joined
15:20 codestorm joined
15:21 rschmukler joined
15:24 raycoll joined
15:26 <benwilson512> m_m: pretty sure that :observer provides an :ets table view
15:27 <benwilson512> which is where local mnesia copies will be held
15:27 drjfreeze joined
15:30 sfbw joined
15:31 dani0_ joined
15:33 rhnonose joined
15:34 wtetzner joined
15:36 imack joined
15:40 <bunzz> good mornin' ladies and gents
15:40 webdev007 joined
15:40 sid_fules joined
15:41 drjfreeze joined
15:43 dani0_ joined
15:48 dani0_ joined
15:50 hbraun joined
15:50 sfbw joined
15:54 racycle joined
15:59 icecreamcohen joined
15:59 fantomik_ joined
16:00 drjfreeze joined
16:03 <iFire> Anyone helpful with phoenix 1.3 questions?
16:03 rschmukler joined
16:03 <iFire> The problem is:
16:04 <iFire> scope "/admin", ExAdmin do
16:04 <iFire> but ExAdmin isn't on phoenix 1.3
16:04 <iFire> so it gives a
16:04 <iFire> function MyApp.Router.Helpers.admin_path/3 is undefined (module MyApp.Router.Helpers is not available)
16:07 myronmarston joined
16:07 dani0_ joined
16:11 vmoravec joined
16:11 <ciawal> you probably need to update the router helper module name
16:11 <ciawal> in the config
16:11 wtetzner joined
16:12 Scramblejams joined
16:14 codestorm joined
16:16 <iFire> I'll wait until 1.3 is more widespread
16:16 <iFire> before i do the /web change
16:16 gokr joined
16:19 Gringill joined
16:20 simonoram joined
16:20 cdg_ joined
16:24 tuacker joined
16:27 squalloser joined
16:32 PaReeOhNos joined
16:34 marcdel joined
16:36 <harfangk> in haskell multi-clause functions are just syntactic sugar for case. is this the same for elixir regarding its multi-clause functions and case?
16:38 raycoll joined
16:41 <micmus> yes
16:41 codestorm joined
16:42 <harfangk> thank you!
16:46 gazler joined
16:50 rikkus joined
16:50 rikkus joined
16:50 comboy joined
16:52 Exagone313 joined
16:58 davidw joined
17:01 refriedchicken joined
17:03 sahrizv joined
17:06 cdg joined
17:10 PaReeOhNos joined
17:11 fowlduck joined
17:14 refriedchicken joined
17:17 wsieroci joined
17:17 simonoram joined
17:19 <alisdair> sort of, a case clause and a function have different exceptions when they can't match
17:23 ipengineer joined
17:26 rschmukler joined
17:29 myronmarston joined
17:29 gokr joined
17:34 lsousa joined
17:36 rschmukler joined
17:37 MaSven joined
17:37 Ven joined
17:42 montanonic joined
17:43 Uniaika joined
17:43 racycle joined
17:45 cdg_ joined
17:45 rikkus joined
17:46 dani0_ joined
17:47 markholmes joined
17:47 smt joined
17:48 kommen joined
17:49 <pmarreck> iFire: if I'm starting a new phoenix project, will I have concerns if using 1.3? (maybe important things aren't yet compatible with it?)
17:51 rhnonose joined
17:52 davidw joined
17:54 cdg joined
17:54 <gazler> ericmj: ping
17:57 <gazler> ericmj: unping - I updated the issue on GitHub instead.
17:57 vcryan joined
17:58 <vcryan> Hi all, anyone else have issues with phoenix framework serving static assets after upgrading from plug 1.3.0?
18:01 robinsjdotcom joined
18:01 myronmarston joined
18:02 simonoram joined
18:03 <OliverMT> I have length: (200 * 1024 * 1024) in my Plug.Parsers, but still getting file too big with a 108mb file
18:03 <OliverMT> anyone got a clue?
18:07 Or1on joined
18:07 <OliverMT> length: 200_000_000 doesnt work either for what its worth
18:08 orca2585 joined
18:08 <fishcakez> it might be that bodies over 64mb dont work, depending how the receive is done
18:09 codestorm joined
18:09 <fishcakez> (when using identity transfer encoding)
18:09 <OliverMT> indeed
18:09 <OliverMT> postgresql at 63mb works
18:09 <OliverMT> what is this limit?
18:09 <OliverMT> is it some web standard?
18:09 <fishcakez> its limitation of internals in :gen_tcp
18:10 ZippoWeb joined
18:11 <OliverMT> is it non-trivial to increase?
18:12 <fishcakez> no idea if there is something you can change to make it work - except to receive in <64mb chunks, or use 0 as length of receive.
18:15 bvcosta joined
18:17 <OliverMT> 63mb can do as limit for now
18:17 <OliverMT> not sure if client needs bigger files tbh
18:17 cemilowski joined
18:18 <fishcakez> using chunked should get around it fwiw
18:18 raycoll joined
18:19 elixir9012 joined
18:19 <OliverMT> do I orchestrate that in frontend or backend?
18:19 <fishcakez> frontend
18:19 <OliverMT> ok
18:20 <elixir9012> Phoenix question: given that models and thus model tests have been deprecated, what's the preferred way to test resources?
18:21 <fishcakez> OliverMT: as along as individual chunks are < 64mb. other option is to patch cowboy to always use 0 recv - assuming this is actually the issue
18:21 <elixir9012> I see there's one auto-generated context test file, but that can't be right to test all resources...
18:27 <OliverMT> fishcakez: ok, will note it down in a long term issue if its a requirement, thansk!
18:27 kommen joined
18:28 nithinbekal joined
18:29 dch_ joined
18:33 <tuacker> Why does `:hackney.post(url, [{"Content-Type", "application/json"}], body, [])` set the content-type to 'application/json, application/json'? Just wondering if I misunderstand something about hackney/setting the content-type. I expected it to be just 'application/json'
18:36 <benwilson512> it's a bug
18:36 <benwilson512> 1.6.6 has been retired
18:36 <benwilson512> either upgrade to 1.7.X or downgrade to 1.6.5
18:36 jparise joined
18:37 <tuacker> ah thanks :D
18:38 Ven joined
18:40 markholmes joined
18:43 lexmag joined
18:46 edwinvdgraaf joined
18:47 mk[] joined
18:48 <mk[]> what's a good way to make text-based user interfaces (like ncurses) in elixir?
18:49 <Ankhers> mk[]: A quick search led me to https://github.com/jfreeze/ex_ncurses. I haven't used it though.
18:50 Guest64317 joined
18:50 <mk[]> oh, NIF for C. interesting
18:50 <mk[]> can C errors crash BEAM?
18:51 <OliverMT> Yes
18:51 <OliverMT> The entire beam
18:51 <OliverMT> Booooom :/
18:52 Cohedrin joined
18:53 sid_fules joined
19:03 codestorm joined
19:05 dani0_ joined
19:08 <OliverMT> benwilson512: I think you should add a little Logger.warn or something to compile of S3.Parsers or maybe add an else to https://github.com/CargoSense/ex_aws/blob/master/lib/ex_aws/s3/upload.ex#L40
19:08 codestorm joined
19:09 <OliverMT> I was debugging so hard before I suddenly saw that there was this Code. thing at the top for compiletime
19:09 <OliverMT> if sweetxml is not loaded, it just passes the {:ok ...} right through the with, which is what S3.upload(..) uses in its with
19:09 <benwilson512> ah
19:09 <OliverMT> making it sort of a false positive
19:10 <OliverMT> I was adding logger statements up the tree and didnt see that the code was not even loaded until I got to the parsers
19:10 <benwilson512> certainly internal functions that require it
19:10 <benwilson512> should make that more obvious
19:10 <OliverMT> I would say its almost a raise situation
19:10 <OliverMT> simply raise in that function if sweetxml is not loaded
19:10 <pmarreck> What do people use to send emails from an app (other than, I guess, talking directly to a mailserver using an account, which I've done in the past...)
19:11 <benwilson512> in that scenario raising is correct
19:11 <OliverMT> that function being the initialize
19:11 <benwilson512> but
19:11 <OliverMT> is the idea that parsers can be overloaded, is that why you did it this way?
19:11 <benwilson512> there are valid scenarios to not have sweet_xml, so I want to only raise when the operation can't continue w/o it
19:11 <benwilson512> if you're just doing like S3 put object or get object
19:11 <OliverMT> yes, thats why I say in the initialize function, that function literally cannot work without a parsed xml body
19:11 <benwilson512> right
19:12 <OliverMT> PR coming up on wednesday
19:17 <barttenbrinke> Am I the only one who frowned when Chris showed off action_fallback last week at lonestar?
19:19 <smeevil> barttenbrinke given that the world population is ~7.4 billion, it's highly probable that there where multiple people in the world frowning at exactly that moment.
19:19 <* smeevil> hids
19:19 <smeevil> hides even
19:20 <smeevil> but yes, i had the same feeling :)
19:20 <benwilson512> it's a limitation on how plug works
19:20 <benwilson512> I think
19:21 gokr joined
19:22 <mk[]> can phoenix be used without plug?
19:26 nanohest joined
19:26 <benwilson512> no
19:26 <benwilson512> phoenix is plug
19:26 <benwilson512> phoenix is a collection of plugs
19:27 codestorm joined
19:28 <mk[]> and a plug is an OTP application?
19:31 kommen joined
19:34 MotherFlojo joined
19:35 <benwilson512> yup
19:35 <benwilson512> plug is in essence an HTTP middleware library
19:36 cdg joined
19:40 <mk[]> what about websockets?
19:41 <benwilson512> phoenix talks directly to the underlying http server for that, which is cowboy
19:41 sri_ joined
19:47 <Nicd-> usually people ask if they can use Plug without Phoenix :)
19:48 alex88_ joined
19:49 alex88 joined
19:51 cemilowski joined
19:51 refriedchicken66 joined
19:53 <pmarreck> pretty much once a day to once a week for sure
19:53 hashpuppy joined
19:53 <pmarreck> "I don't want a humongous API layer like Rails"
19:54 apotry joined
19:54 <Nicd-> it's not a silly question
19:54 <pmarreck> "Imagine if Rails was just a collection of Rack middleware... Now you understand the Phoenix/Plug relationship"
19:54 fowlduck joined
19:55 simonoram joined
19:59 wilo joined
19:59 kyrix joined
20:01 rschmukler joined
20:07 alxnlssn joined
20:09 Ven joined
20:09 josevalim joined
20:10 MotherFl1 joined
20:11 paf__ joined
20:13 wsieroci joined
20:15 w-t-h_ joined
20:17 kommen joined
20:18 codestorm7 joined
20:21 myronmarston joined
20:22 PaReeOhNos joined
20:24 vendethiel joined
20:24 PaReeOhNos joined
20:25 PaReeOhNos joined
20:25 montanonic joined
20:27 squallstter joined
20:27 racycle joined
20:28 marciol joined
20:29 codestorm joined
20:32 kommen joined
20:34 superherointj joined
20:40 MotherFlojo joined
20:49 <Gringill> When a module implements functions to respect a behaviour it is using, are @specs automatically generated on compilation or is something like dialyzer smart enough to suss out that the function's spec IS the callback definition or neither? The alternative being copypasta'ing the callback definition and using it as the spec for the implemented functions.
20:51 <smeevil> Is it possible to add custom information to the debug log output of ecto, for example include the origin source line ? example : [debug] QUERY OK source="pictures" db=1.2ms decode=0.8ms file="/lib/managers/picture_managers.ex:12" , that would be great for finding out where a potential slow query might originate from
20:51 davidw joined
20:58 nanohest joined
20:58 markh joined
20:59 simonoram joined
21:00 <markh> i like httpoison's documentation: "You can also use the HTTPoison.Base module in your modules in order to make cool API clients or something"
21:02 josevalim joined
21:02 drincruz joined
21:06 kommen joined
21:13 sid_fules joined
21:17 Ven joined
21:17 myronmarston joined
21:19 myronmarston joined
21:19 montanonic joined
21:21 sschneider joined
21:22 <sschneider> Is there an elixir version of :erlang.monitor(:port, ...)?
21:22 <alisdair> :erlang.monitor(:port, ...)
21:23 codestorm joined
21:24 <sschneider> meant more along the lines of Process.monitor since there doesn't appear to be Port.monitor for some reason :)
21:25 Ven joined
21:29 <superherointj> Hi. I'm new to Elixir/Erlang. And I want to understand better what the philosophy of "Let it fail" means. I'm after a language that offers correctedness (code without or with LESS bugs) and scalability. Erlang offers scalability, but this "let it fail". Does it mean Types ain't that much important? Or something of minor importance / not considered seriously?
21:29 <superherointj> *correctness
21:30 <benwilson512> superherointj: this is a good question, and a common one
21:30 craigger joined
21:30 <benwilson512> there's a very good blog post on the issue that I will try to find
21:30 <benwilson512> superherointj: the short answer is no, the purpose of let it crash is not to enable sloppy code
21:33 NobbZ joined
21:33 <benwilson512> http://ferd.ca/the-zen-of-erlang.html would definitely be one good resource
21:33 <NobbZ> Hi there! Are there already guides for 1.3 available somewhere?
21:33 <benwilson512> unlikely, as it has not been released yet
21:33 <benwilson512> i assume you mean phoenix 1.3
21:34 <NobbZ> yeah, of course I do. Sorry for missing that this is the general elixir chat.
21:35 <NobbZ> I hoped that there is at least some markdown in a github repo or elsewhere that may get compiled into the guides after release
21:36 <superherointj> Right. How important are Types to Elixir? FP languages like Haskell, Idris that are known for better correctness make extensive and advanced (Dependent Types) use of Types. How important is this sort of thing to Elixir?
21:37 <superherointj> I'm not a very inteligent person and I wish I could shift the burden of thinking properly to the machine.
21:38 <NobbZ> You don't need to think about types that much, at least you have not to declare them. But this doesn't take the burden of thinking off of you
21:39 <superherointj> I have been using FlowType in JS and it has been delightful. I know this is still very simple thing. But I was surprised how many edge cases it caught that I didn't have to hunt for mistakes.
21:39 jparise joined
21:39 <NobbZ> You still need to think about the implementation of the algorithm, which is often much harder than the type
21:39 myronmarston joined
21:40 grzs joined
21:41 Uniaika joined
21:41 wtetzner joined
21:41 mmoll joined
21:44 milmazz joined
21:45 josevalim joined
21:47 _flow__ joined
21:47 grzs joined
21:47 <dnorris> ;
21:51 simonoram joined
21:55 Ven joined
21:56 PaReeOhNos joined
21:59 montanonic joined
21:59 tomaz_b joined
22:00 <tomaz_b> hi guys
22:00 <tomaz_b> anyone using kafka here?
22:01 <icecreamcohen> tomaz_b: We’re not using it directly, but I know someone who is if you need help…
22:02 <tomaz_b> i am pretty new to elixir and need to do some production code with combination to kafka and was just wondering if anybody here would be able to brainstorm with me
22:02 <tomaz_b> :)
22:02 <tomaz_b> but thanks for offer
22:03 <icecreamcohen> tomaz_b: are you on slack /
22:03 <tomaz_b> no?
22:03 <tomaz_b> why?
22:03 <tomaz_b> better there?
22:03 <icecreamcohen> not at all ;)
22:03 <icecreamcohen> but the guy who’s heavily using kafka is on slack.
22:03 <tomaz_b> a ok
22:03 <icecreamcohen> his name is dantswain on the elixir slack, and he’s a very nice guy.
22:04 <tomaz_b> just before I noticed how much RAM slack consumes
22:04 <tomaz_b> omg
22:04 <tomaz_b> ok... i might give him a knock
22:04 <icecreamcohen> mine is taking up 800mb.
22:04 <tomaz_b> f****
22:05 cemilowski joined
22:05 <icecreamcohen> I can only run 20 instances of it on my laptop.
22:06 <tomaz_b> :)
22:06 <tomaz_b> can i ask you some basics from elixir, which are still new to me
22:06 <tomaz_b> ?
22:06 <icecreamcohen> sure
22:06 sfbw joined
22:06 <icecreamcohen> I love answering questions
22:07 nithinbekal joined
22:08 <tomaz_b> so let say I have Kafka filling from Internet with huge amount of JSONs. What I have to do is take each JSON out, modify it a little bit, before that do a pattern maching ... since there are various JSON formats.. and post it with HTTP client to some remote API
22:08 refriedchicken joined
22:08 <tomaz_b> now to question in my head (well questionS) are ... ok. I need something that will run "forever". Probably GenServer
22:09 <icecreamcohen> sure; I’m building a very similar system.
22:09 <tomaz_b> But what then... I should probably grab a JSON... and somehow spawn a process and after that post it?
22:09 <icecreamcohen> the only diff is I don’t use kafka directly.
22:09 <tomaz_b> I still have problems with "to much legacy from OOP"
22:10 <tomaz_b> in my head
22:10 <icecreamcohen> have you considered using GenStage instead?
22:10 <icecreamcohen> (sorry to complicate things)
22:10 <icecreamcohen> but I think GenStage is built for flow processing like this.
22:10 <tomaz_b> No, because this is even less familiar to me
22:10 <icecreamcohen> sure
22:10 <tomaz_b> Ok... you will use it? since you said you are building similar thing?
22:11 <icecreamcohen> have you happened to read “learn you some erlang” ?
22:11 <icecreamcohen> yes, I’m heavily using genstage
22:11 <tomaz_b> no, I bought myself a whole Elixir library :D
22:11 <icecreamcohen> it has a very nice property of responding to demand. So, if the backend system slows down, so does the rest of the system.
22:11 <icecreamcohen> that means that it’s harder to overwhelm the backend system.
22:12 <tomaz_b> ok. let say that Kafka will have something like shared subscribtions... so I could potentialy run more than one service that would consume messages from kafka. Preferably one in each HA zone (AWS)
22:12 <icecreamcohen> Sure, we’re doing that too.
22:12 <tomaz_b> GenStage would be somehow "the main" process?
22:13 <tomaz_b> will this genstage than spawn "workers"
22:13 <icecreamcohen> So, a genstage process can be a producer, a consumer or both.
22:13 <tomaz_b> or will deal all within itself?
22:13 <icecreamcohen> You’d have a producer that reads from kafka, and a producer / consumer that transforms the data, and a consumer that sends it to the HTTP service.
22:14 <tomaz_b> yes this was something that buzzez me a lot. Basically producer in a sense to itself
22:14 <tomaz_b> aha...
22:14 <icecreamcohen> and you combine these three things into a flow
22:14 <tomaz_b> how would you response to high load. lets say that you notice, that can not perform as fast as data is comming to kafka
22:15 <icecreamcohen> In that case, you’d have to spawn more instances
22:15 <icecreamcohen> or increase the number of consumers
22:15 <tomaz_b> of genstage?
22:15 <tomaz_b> number of consumers... you mean parts of genstage?
22:16 <icecreamcohen> in this case, I’m hoping you’d tune your system so it maxes out cpu or network. If that’s true, you’d need to launch another server.
22:16 <icecreamcohen> yes
22:16 <icecreamcohen> so, all producers, consumers and producer/consumer are processes
22:16 <icecreamcohen> in the elixir sense.
22:16 <tomaz_b> ok
22:16 <icecreamcohen> In practice, you’d likely need to launch more servers if you’re not keeping up.
22:17 <icecreamcohen> FYI, our system can process about 40mb/s of data per server.
22:17 <tomaz_b> on aws?
22:17 <icecreamcohen> yes
22:17 <tomaz_b> what type of server do you have
22:17 <icecreamcohen> on c3.2xl
22:17 <tomaz_b> ok
22:18 <icecreamcohen> wer’re bottlenecked by our backends.
22:18 <tomaz_b> and you have this in multiple zones?
22:18 codestorm joined
22:18 <icecreamcohen> Yes
22:18 <icecreamcohen> I’m actually reading from SQS
22:18 <icecreamcohen> I suspect reading from kafka would be faster.
22:18 <tomaz_b> do you have this zones "connected" as unbrella app?
22:19 <tomaz_b> or as separate apps?
22:19 <icecreamcohen> I think you’re mixing terms here
22:19 grzs joined
22:19 <tomaz_b> i mean...
22:19 <tomaz_b> english is not my native... so i sometimes write totaly different what i mean
22:20 <tomaz_b> i mean... in each zone, on a server in that zone, you probably have same code.
22:20 _flow__ joined
22:20 <tomaz_b> you use zones for HA
22:20 <icecreamcohen> yes, each server runs the same code
22:20 <icecreamcohen> but they’re not connected to each other, nor are they umbrella apps.
22:21 <tomaz_b> ok
22:21 <tomaz_b> do you have elixir code deployed on a server ... or you use let say Docker for deploy/
22:21 <tomaz_b> ?
22:21 <icecreamcohen> so, right now we haven’t dockerized our elixir deploys
22:22 <tomaz_b> sorry for asking again... still have some (a lot) of gaps in my head
22:22 <icecreamcohen> no problem
22:22 <tomaz_b> this genstage...
22:22 <icecreamcohen> I’m here to help.
22:22 <tomaz_b> thanks a lot. I really appreciate this
22:22 <icecreamcohen> no problem.
22:22 <tomaz_b> let say you have quite decent server
22:23 <tomaz_b> how does this genstage scale
22:23 <icecreamcohen> honestly, it depends on your bottleneck.
22:23 codestorm joined
22:23 <tomaz_b> in a way .... that the throuput is increasing... but still not for new server
22:23 <icecreamcohen> I’ve found that GenStage has _never_ been a bottleneck for us.
22:23 <tomaz_b> but internally
22:24 <tomaz_b> does it creates new processes for handling the workload
22:24 <tomaz_b> or what?
22:24 <tomaz_b> like sidekiq or delayed jobs in ruby?
22:24 <tomaz_b> something like elixir Tasks?
22:25 <icecreamcohen> when you say “processes” do you mean O/S proceses or Elixir processes
22:25 <tomaz_b> can you suggest me any other source for learning GenStage, except that book for Erlang?
22:25 <tomaz_b> elixir proceeses
22:25 <icecreamcohen> I believe in GenStage, you’re in control of how many processes are spawned.
22:25 <tomaz_b> o really
22:25 <icecreamcohen> GenStage is an elixir concept; there’s no erlang equivalent.
22:25 <icecreamcohen> Yes, you size the stages yourself and tune them.
22:25 <tomaz_b> ok... and it is here to stay?
22:26 <icecreamcohen> Yes
22:26 <icecreamcohen> http://elixir-lang.org/blog/2016/07/14/announcing-genstage/
22:26 <tomaz_b> how do you change the sizing... when in production if you find out that you would need to modify it?
22:27 <icecreamcohen> So, the nice property of GenStage is that it responds to the throughput of the backend. I would hope you’d tune it so that each machine is working as hard as it can.
22:27 <icecreamcohen> I don’t have an answer to dynamically resizing workers. It’s possible, but ideally, you’d want them supervised.
22:28 <icecreamcohen> it’s a more advanced topic.
22:28 <tomaz_b> uff
22:28 <tomaz_b> so much to learn :)
22:28 <icecreamcohen> yeah, its a new system.
22:29 <icecreamcohen> we’re getting excellent utilization and efficiency. How much data are you getting?
22:30 <tomaz_b> well, i can't really tell, since we will be performing tests. But currently we serve 200 devices... from internet.... and will be performing tests for cca 15000 devices
22:31 <tomaz_b> the "front" part... or let say my endpoint is done in Go, which I wrote before my journey to Elixir
22:31 <icecreamcohen> Our site is handling events for roughly 180million users a month.
22:31 <tomaz_b> I fall of the chair ;)
22:31 <icecreamcohen> I can process the events easily on a single server
22:32 <icecreamcohen> in fact, a single server can handle 5-6x that traffic.
22:32 <tomaz_b> well... if it is good for you... than for sure it would work for me.
22:32 <icecreamcohen> kind of my point ;)
22:32 <tomaz_b> 5-6x of your traffic or mine
22:32 <icecreamcohen> We’re limited by our backends.
22:32 <tomaz_b> which is written in what?
22:33 <tomaz_b> SQS is XML, right?
22:33 montanonic joined
22:33 <icecreamcohen> Yes, which is one of the bottlenecks.
22:33 <icecreamcohen> our backends are written in Elixir, python and Java.
22:33 <tomaz_b> i have one side project, which will use SQS, ... which library / package you would suggest to me?
22:34 <icecreamcohen> I’m using ExAws. I wrote the SQS part of it.
22:34 <icecreamcohen> but I will warn you that for large documents, the parser is incredibly slow. It’s pluggable though, and you should test it.
22:35 <tomaz_b> ok, than it should be fine, since I believe my docs will be really small
22:35 <icecreamcohen> you’ll be fine then.
22:35 <icecreamcohen> our docs are 258k
22:35 <tomaz_b> in which timezone are you?
22:36 <tomaz_b> uf..
22:36 <icecreamcohen> US Pacific
22:36 <icecreamcohen> (256k)
22:36 <tomaz_b> a ok... i am from CET
22:36 kommen joined
22:37 <icecreamcohen> Anyhow, elixir is a good use case for reading from kafka and munging data.
22:37 <tomaz_b> can I get back with you after I jump to GenStage for advice or two, since our cases look pretty simliar
22:37 <tomaz_b> /
22:37 <tomaz_b> ?
22:37 <icecreamcohen> sure
22:37 <tomaz_b> really appreciate
22:38 <icecreamcohen> no problem.
22:38 <tomaz_b> ok, i need to go to horizontal state.... since it is quite late over here
22:38 <icecreamcohen> You’re kind of jumping into the deep end. You should read “learn you some erlang”’s OTP chapters
22:38 <icecreamcohen> to give you an idea of what GenServers are (which will make GenStage more understandable)
22:38 <tomaz_b> thank you again.... and tomorrow I will start with GenStage... need to find some proper tutorials
22:38 <icecreamcohen> —not that GenStage is hard.
22:39 <icecreamcohen> GenStage’s docs are very good as well.
22:39 <tomaz_b> I somehow played with GenServers, but the whole thing is still foggy.... I might really dig into that book.
22:40 <tomaz_b> bye icecreamcohen
22:41 <icecreamcohen> think of them as sort of like objects
22:41 <icecreamcohen> bye!
22:41 <tomaz_b> thanks!
22:41 <icecreamcohen> genservers encapsulate state.
22:41 <tomaz_b> will get back to you!
22:41 <icecreamcohen> np
22:41 myronmarston joined
22:45 Guedes joined
22:53 codestorm joined
22:57 travis-ci joined
22:57 <travis-ci> elixir-lang/elixir#13741 (master - 767f7ee : José Valim): The build passed.
22:57 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/517179f7da5c...767f7ee2bb3f
22:57 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/208389746
22:57 travis-ci left
23:04 daneel joined
23:04 daneel left
23:12 <OliverMT> benwilson512: I am getting raises on http_error for 404 without using request!
23:12 <OliverMT> is that bug or intentional?
23:13 jparise joined
23:24 rschmukler joined
23:30 PaReeOhNos joined
23:40 NeverDie joined
23:42 rschmukler joined
23:47 codestorm joined