<    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 _2_8 29  
00:01 marcdel joined
00:06 isubasti joined
00:07 <benwilson512> edmz: very strange
00:07 <benwilson512> what are the exact steps that you do to make it happen?
00:08 <edmz> benwilson512 : https://gist.github.com/edmz/0d4cf0f970153ff6671d6beca30bf2b6#file-post-requests-rb
00:08 <edmz> two consecutives posts
00:09 <edmz> i just compiled that app with MIX_ENV=prod on my box and no errors
00:09 <edmz> but on the production server I get that
00:09 <benwilson512> hm very strange, I would consider creating a forum post
00:09 <edmz> yeah, thats my plan
00:10 <edmz> but I need more evidence/data
00:10 <OliverMT> these alternative facts are more than enough for a forum post imo :)
00:10 <edmz> I will try to create a new phoenix project with the minimal code
00:10 <OliverMT> so go for it
00:11 <OliverMT> or if you can do minimmal project to checkout and reproduce thats even better
00:11 <edmz> yeah, that's my plan
00:13 <edmz> If I do HTTP requests instead of HTTPS (and thus skipping a load balancer) I get Status Code 505 instead of 400
00:13 sepow joined
00:13 <edmz> https://github.com/ninenines/cowboy/issues/768
00:14 griffinbyatt joined
00:15 <edmz> This comment in particular https://github.com/edgurgel/httpoison/issues/143#issuecomment-229804580
00:15 <edmz> "This may occur if you mix conn structs on Phoenix as well."
00:15 chrismccord joined
00:16 <edmz> but I don't quite get what he means by "mix conn structs"
00:16 fmcgeough joined
00:17 <edmz> I think I might know what is going on
00:19 ignacio_ joined
00:20 <edmz> (maybe not)
00:22 rschmukler joined
00:27 refriedchicken joined
00:28 <edmz> ok, progress! That comment might have solved it completely. I was calling read_body and then not using the mutated conn
00:28 <edmz> I was using a previous one
00:28 <edmz> (a conn that appeared before read_body)
00:34 <cmk_zzz> the phx.gen.html generates a controller whcih calls a function <%= schema.singular %>_path/3 i.e order_path(...) but this function or macro is never defined anywhere. This is with 1.3.0-rc.1
00:35 <Radar> cmk_zzz: This helper is automatically generated for you.
00:36 <Radar> cmk_zzz: See "helpers" section here: https://hexdocs.pm/phoenix/Phoenix.Router.html
00:36 <cmk_zzz> Radar: but the code fails to compile with undefined function order_path
00:36 <Radar> ah
00:36 <Radar> never mind me then
00:38 <cmk_zzz> This is from a fresh phoenix project. Just: $ mix phx.new project and $ mix phx.gen.html Sales Order orders ...fields... and $ mix phx.server
00:39 <cmk_zzz> Radar: at least I know then it is supposed to be generated for me
00:40 <edmz> OliverMT , benwilson512: thanks a lot again for your time, help and patience.
00:43 <iFire> fishcakez: are you around? I got one instance working, but I need to generalize it to n elements in a list
00:43 <iFire> recursion hurts :(
00:44 steffkes joined
00:45 MarioBranco joined
00:47 <iFire> benwilson512: you work on ecto?
00:50 gvaughn_ joined
00:54 <alisdair> cmk_zzz: re your earlier question, i strip my ecto structs of the `__struct__` and `__meta__` keys (and sometimes others) before returning them, and i also version them, so if a client requests v1.0 i return one set of fields and if they ask for 2.0 i return a potentially incompatible version
00:54 nighty-- joined
00:54 <alisdair> but i return maps, because writing getters/setters for everything is a pain
00:54 MarioBranco joined
00:55 <benwilson512> this iFire nah not even a little
00:56 sevenseacat joined
00:58 MarioBranco joined
01:00 <iFire> benwilson512: thank you, got it working :)
01:03 MarioBranco joined
01:10 korean-1 joined
01:13 sfbw joined
01:15 rschmukler joined
01:16 griffinbyatt joined
01:18 MarioBranco joined
01:19 milad joined
01:20 <iFire> How do I repeat something n times and add it to a list every repeat.
01:20 <benwilson512> iFire: example?
01:21 <iFire> fetch a number and a id from the database
01:21 <iFire> encode it as json
01:21 <iFire> ..
01:21 <iFire> fetch the num + id. save the object in a list. repeat saving n times
01:21 <iFire> encode list as json
01:22 <benwilson512> map over the list
01:22 <iFire> Repeat fetching the num + id and save it as a poison json struct list. Write the list to json.
01:23 <benwilson512> I mean obviously lists being immutable we can't append but mapping generally serves the same purpose
01:23 <iFire> they have Enum.map(1..q, fn _ -> ... end) in the example
01:23 <benwilson512> indeed
01:24 <iFire> not sure how to do the adding the things together part
01:24 <* iFire> looks at the return value of Enum.map
01:24 <benwilson512> try flat_map
01:24 <benwilson512> it flattens out a list
01:25 <benwilson512> so if each iteration returns a list
01:25 <benwilson512> you'll get just one list at the end
01:26 musicnode joined
01:26 <iFire> I guess the problem is I only get one element
01:27 <iFire> https://gist.github.com/fire/e87a59af3beb61a00ed8647e003e63f6
01:27 <iFire> what i have so far
01:29 <iFire> oh, q apparently was 1
01:29 <iFire> nevermind :)
01:32 <iFire> benwilson512: if you're wondering I'm implementing "Multiple queries test" https://www.techempower.com/benchmarks/#section=code&hw=ph&test=fortune
01:39 tomterl joined
01:41 myronmarston joined
01:41 fowlduck joined
01:46 rschmukler joined
01:47 isubasti joined
01:52 bitmod joined
01:55 jushur joined
02:04 universa1 joined
02:04 lehoff joined
02:05 refriedchicken joined
02:07 myronmarston joined
02:10 refriedchicken joined
02:12 nahtnam joined
02:12 fowlduck joined
02:14 sfbw joined
02:28 sfbw joined
02:29 jmcintosh joined
02:29 rschmukler joined
02:29 sfbw joined
02:33 sfbw_ joined
02:38 chrismccord joined
02:45 steffkes joined
02:46 griffinbyatt joined
02:58 chavito joined
03:04 kronicdeth joined
03:05 ignacio_ joined
03:07 milad joined
03:09 ctp joined
03:09 racycle joined
03:10 jmcintosh joined
03:13 fowlduck joined
03:13 fowlduck joined
03:26 duane joined
03:41 raycoll joined
03:49 rschmukler joined
03:52 sfbw joined
03:53 larshesel joined
03:57 fowlduck_ joined
03:59 laut joined
04:03 <z1mvader> Guys could you answer me a little question that i have on distributed systems?
04:04 jerel joined
04:06 milad joined
04:06 milad joined
04:10 colrack joined
04:25 <bbhoss> Hey folks, I'm playing around with phoenix HEAD and am getting the dreaded 23:25:16 - error: Compiling of js/socket.js failed. Error: Couldn't find preset "es2015" relative to directory "/Users/preston.marshall/phoenix" error
04:25 <bbhoss> any ideas? I've tried everything I've seen on GH issues to no avail
04:26 <sevenseacat> what version of npm/node/etc? from memory it was all relating to those
04:26 <bbhoss> I've tried adding that set to devDeps in package.json, updating brunch-babel, and some other things that didn't work
04:26 <bbhoss> whatever is the latest in homebrew
04:27 <bbhoss> node v7.8.0 and npm 4.2.0
04:30 <bbhoss> regular phoenix works fine, just the HEAD doesn't
04:46 cschneid_ joined
04:46 steffkes joined
04:52 sfbw joined
04:52 myronmarston joined
05:01 raycoll joined
05:03 myronmarston joined
05:05 dec0n joined
05:12 myronmarston joined
05:17 griffinbyatt joined
05:19 srxa joined
05:28 duane joined
05:30 akeating joined
05:30 harfangk joined
05:38 bionj joined
05:45 gvaughn joined
05:50 kblake joined
05:50 squallstter joined
05:53 meandi_2 joined
05:53 sfbw joined
06:00 bionj joined
06:05 manukall joined
06:08 storban joined
06:09 embik joined
06:12 icanhazbroccoli joined
06:15 imack joined
06:17 raycoll joined
06:18 griffinbyatt joined
06:22 harfangk joined
06:27 odogono joined
06:29 fowlduck joined
06:30 duane joined
06:38 InternetFriend joined
06:42 codestorm joined
06:43 tuacker joined
06:47 myronmarston joined
06:47 steffkes joined
06:55 sfbw joined
06:59 duane joined
07:00 kblake joined
07:00 sfbw joined
07:04 jkreeftmeijer joined
07:04 frefity joined
07:05 <iFire> morning fishcakez
07:07 <manukall> whatyouhide: ping
07:07 ZippoWeb joined
07:08 Guest67 joined
07:09 <gjaldon__> has anyone lookd into adding support for testing multiple Repos in Ecto using Sandbox?
07:15 vmoravec joined
07:16 akeating joined
07:19 bionj joined
07:20 pcre joined
07:25 steffkes joined
07:26 mattyw joined
07:27 isubasti joined
07:29 mark_66 joined
07:34 gvaughn joined
07:36 akeating joined
07:41 dani0_ joined
07:43 myronmarston joined
07:45 dani0_ joined
07:45 milad joined
07:46 asabil_ joined
07:49 cemilowski joined
07:50 raycoll joined
07:51 tuacker1 joined
08:03 asabil_ joined
08:11 akeating joined
08:11 asabil joined
08:12 akeating joined
08:13 inoas joined
08:13 flaviodesousa joined
08:14 m00dy joined
08:14 isubasti joined
08:14 srxa joined
08:14 m00dy joined
08:16 m00dy joined
08:19 frefity joined
08:21 marr joined
08:22 m00dy joined
08:23 <micmus> gjaldon__: in what sense? You should be able to checkout multiple connections from multiple repos
08:23 <micmus> or do you mean multiple repos referring to the same database?
08:23 isubasti joined
08:24 <gjaldon__> I mean multiple Repos referring to different dbs micmus
08:24 sfbw joined
08:24 <micmus> it should work to duplicate the setup for each repo
08:25 srxa joined
08:26 gregman_ joined
08:26 <gjaldon__> I tried checking out a different Repo in my conn_case (phoenix app) but I get an `{:error, :invalid_message}`. The other Repo is in a separate package
08:26 <gjaldon__> micmus: are you using Ecto sandbox with multiple repos in your tests?
08:27 <micmus> yeah, both need to be configured with the sandbox pool
08:31 stephen_m joined
08:31 vmoravec joined
08:33 akeating joined
08:34 <gjaldon__> I have the ff code in ConnCase setup and in config/test.exs micmus https://gist.github.com/gjaldon/3bc745ff71bf7a3fe3077b8d2a4403bc
08:34 akeating joined
08:35 <gjaldon__> I get an `{:error, :invalid_message}` on 2nd Sandbox.checkout/1 line
08:35 cemilowski left
08:39 <m00dy> Nicd-: Good morning
08:39 <micmus> gjaldon__: I also have setting up of the initial mode in test/test_helper.exs for both
08:39 <Nicd-> hello m00dy my Elixir friend
08:39 <Nicd-> what are you working on?
08:39 <micmus> Ecto.Adapters.SQL.Sandbox.mode(App.Repo, :manual)
08:40 <m00dy> Nicd-: I haven't switched to Elixir yet. I'm still on js
08:41 srxa_ joined
08:45 steffkes joined
08:45 steffkes joined
08:53 josevalim joined
09:01 lexmag joined
09:05 koneko joined
09:12 srxa joined
09:14 pcre joined
09:21 griffinbyatt joined
09:22 gvaughn joined
09:23 m00dy joined
09:32 m00dy joined
09:40 nighty-- joined
09:45 smt_ joined
09:46 m00dy joined
09:53 pat_js joined
09:54 <pat_js> Hello, I have a question regarding pattern matching.
09:55 <pat_js> Is there some kind of as-pattern like haskell's ‘@’ or sml's ‘as’?
09:55 <Nicd-> what would that do?
09:57 <pat_js> say you match a tuple, but want the tuple as well in the function. like this ‘tuple@{a,b}’
09:57 <Nicd-> you can do {a,b} = tuple
09:57 <Nicd-> like def foo({a, b} = tuple) do ... end
09:58 <pat_js> instead of fn (tuple) -> {a,b} = tuple; stuff_with(a,b,tuple) end
09:58 <pat_js> ah cool, thanks, that's what I was looking for.
09:58 <pat_js> nice, no new Operator, I like this concept.
10:00 jkreeftmeijer joined
10:05 m00dy joined
10:07 Guest24_ joined
10:07 k77 joined
10:11 greengriminal joined
10:15 cemilowski joined
10:18 kblake joined
10:22 griffinbyatt joined
10:22 m00dy joined
10:23 jkreeftmeijer joined
10:25 sfbw joined
10:28 mattyw joined
10:30 fowlduck joined
10:36 haste joined
10:39 robinsjdotcom joined
10:42 duane joined
10:47 IRCFrEAK joined
10:47 IRCFrEAK left
10:52 de-staat joined
10:52 <de-staat> Why is the abs/1 function in the Kernel module and not anywhere else?
10:53 <de-staat> Same goes for max/2, rem/2 etc.
10:53 <de-staat> Wouldn't it make more sense to have them in a Math module or the likes?
10:53 m00dy joined
10:53 steffkes joined
10:53 steffkes joined
10:54 <nox> de-staat: Because they are built-ins.
10:55 <de-staat> Ah
10:55 <de-staat> That makes sense I suppose, thanks
10:58 embik joined
11:07 jkreeftm_ joined
11:11 gvaughn joined
11:19 kblake joined
11:23 griffinbyatt joined
11:31 fowlduck joined
11:35 cemilowski joined
11:36 jeznet3 joined
11:37 hbraun joined
11:37 parisianSummer joined
11:40 milad joined
11:40 milad joined
11:46 jkreeftmeijer joined
11:49 jkreeftm_ joined
11:49 justincjohnson joined
11:53 miwa joined
11:57 rodolfojcj joined
11:58 gmcabrita joined
12:03 cristianR_ joined
12:04 JoelMcCracken joined
12:04 <josevalim> nox: do you remember how to run the dialyzer test suite?
12:04 <nox> Like any other test suite, no?
12:08 jerel joined
12:09 dani0_ joined
12:09 jadlr joined
12:13 hbs joined
12:15 ignacio_ joined
12:15 jeznet3 joined
12:17 srxa_ joined
12:24 griffinbyatt joined
12:24 hbraun joined
12:24 <jadlr> Hey everyone: GenStage question: what is the best way of writing a finite producer? e.g. emit 10 events and then signal that we're done. Just stop the producer?
12:26 <nox> josevalim: Did you manage?
12:26 <josevalim> yes :)
12:26 <josevalim> it was an issue with the plt building
12:26 <nox> Ok.
12:26 m00dy joined
12:28 m00dy joined
12:32 fowlduck joined
12:33 m00dy joined
12:33 robinsjdotcom joined
12:35 dani0_ joined
12:36 m00dy joined
12:36 m00dy joined
12:37 greengriminal joined
12:37 cristianR_ joined
12:39 m00dy joined
12:39 jeznet3 joined
12:44 fmcgeough joined
12:45 duane joined
12:49 jkreeftmeijer joined
12:50 m00dy joined
12:53 dimitarvp joined
12:56 akeating joined
12:58 cemilowski left
12:59 gvaughn joined
13:02 steffkes joined
13:04 akeating joined
13:05 justincjohnson joined
13:06 ariejan joined
13:06 maxbeizer joined
13:07 sfbw joined
13:09 am55 joined
13:14 jeznet3 joined
13:18 JEG2 joined
13:20 ikcerog joined
13:21 akeating joined
13:23 m00dy joined
13:24 akeating_ joined
13:25 griffinbyatt joined
13:25 m00dy joined
13:33 fowlduck joined
13:33 mattyw joined
13:35 gk_1wm_su joined
13:36 akeating joined
13:39 chrismccord joined
13:44 Cloudflare joined
13:44 Cloudflare joined
13:46 cevado joined
13:51 <josevalim> nox: do you know how to get the line number of a cerl node?
13:52 <nox> josevalim: Ask it gently.
13:52 <sevenseacat> lol
13:52 <nox> josevalim: Joke aside, it's in the attributes as usual.
13:52 <josevalim> we have cerl:get_ann/1 but it doesn't document how to get the line from the annotation
13:52 <nox> Oh.
13:52 <josevalim> it returns [80]
13:52 <nox> Let me check the documentation!
13:52 <josevalim> or [80,generated]
13:52 <nox> (Joking.)
13:52 <josevalim> i couldn't find the docs :(
13:52 <nox> josevalim: There is another function,
13:52 <nox> with arity 2,
13:52 <nox> to which you pass 'line'.
13:52 <nox> josevalim: I'm trolling about a past PR,
13:53 <nox> https://github.com/erlang/otp/pull/363
13:53 <josevalim> that would have helped me so much right now :(
13:54 smt joined
13:54 <nox> josevalim: Couldn't resist: https://github.com/erlang/otp/pull/363#issuecomment-292542601
13:54 <nox> josevalim: You could have opened the damn file though.
13:54 myronmarston joined
13:55 gvaughn joined
13:55 <nox> josevalim: Oh stuff changed.
13:56 <josevalim> nox: :P
13:56 <nox> josevalim: Isn't it just the same datatype as the one in the erl_anno module?
13:56 <josevalim> nothing documents it as such so I am unsure to assume so
13:56 <josevalim> :(
13:56 <nox> josevalim: Find it in the code?
13:57 <nox> josevalim: https://github.com/erlang/otp/blob/1526eaead833b3bdcd3555a12e2af62c359e7868/lib/compiler/src/core_scan.erl#L59
13:57 krelix joined
13:57 <nox> josevalim: Core Erlang scanner uses the erl_anno module,
13:58 <nox> josevalim: so I think it's pretty safe to assume what I just said.
13:59 ignacio_ joined
13:59 <josevalim> that doesn't make sense though
14:00 <josevalim> cerl:get_ann returns a list
14:00 <josevalim> such as [67]
14:00 <josevalim> and erl_anno is not a list
14:00 <josevalim> it is an int, tuple or list of tuples
14:00 <nox> What do you mean?
14:01 <nox> josevalim: The type annotations are wrong.
14:02 <nox> josevalim: [57] was already a legit annotation when I was doing column numbers and whatnot.
14:02 <josevalim> yes, this is what i see
14:02 <josevalim> {c_literal,[25],record}
14:02 <josevalim> but
14:02 <josevalim> erl_anno:line([25]).
14:03 <josevalim> returns undefined :(
14:03 <nox> Ah.
14:03 <nox> Ok.
14:03 <nox> josevalim: Then you need to find the bits that do the same thing but for cerl.
14:03 <nox> And also file a bug.
14:03 <josevalim> but i also see {var,[1205],'Reason'} in the erlang abstract format
14:03 <josevalim> :(
14:04 <nox> Ok then it's definitely an erl_anno bug.
14:04 <* nox> is a bit pissed off.
14:04 <gazler> nox: Those two statements reminded me of Erlang. (Ah. and Ok.)
14:04 <nox> IIRC some patches I did got postponed forever because "yadda yadda let's make erl_anno first".
14:04 <nox> And it turns out it's broken, great.
14:04 <JEG2> What's the place I should check to see what the current version of Elixir is?
14:05 <gazler> JEG2: You mean the latest release? Or the version you have installed?
14:05 <JEG2> gazler: The latest release.
14:06 <gazler> https://github.com/elixir-lang/elixir/releases ?
14:06 <JEG2> gazler: Thanks.
14:06 <gazler> You can use https://github.com/elixir-lang/elixir/releases.atom if you want to do it programatically
14:06 kronicdeth joined
14:07 <gazler> Or this one. https://github.com/elixir-lang/elixir/tags.atom
14:10 <z1mvader> guys is possible to run a single instance of BEAM over several machines?
14:11 <josevalim> z1mvader: no, that's not possible for anything
14:11 <josevalim> z1mvader: you can't have multiple machines sharing the same memory address by running a single instance
14:11 tuacker joined
14:11 <josevalim> each node needs to run its own instance and then they communicate to each other
14:12 Guest67 joined
14:13 <z1mvader> then if for example you want to spawn several threads over all the machines how would you do it?
14:14 <nox> z1mvader: Just have one Erlang node per machine over the network?
14:19 m00dy joined
14:19 oestrich joined
14:22 MotherFlojo joined
14:23 roperzh joined
14:25 myronmarston joined
14:27 m00dy joined
14:30 chavito joined
14:31 duane joined
14:33 racycle joined
14:33 fowlduck joined
14:33 cemilowski joined
14:35 cdg joined
14:36 <z1mvader> nox: yeah but then how you communicate between machines to work together
14:36 <nox> z1mvader: With the distribution protocol from Erlang. That's like a basic feature of Erlang, so I'm not sure what you are asking about.
14:37 <z1mvader> giving your answer, I'm asking for the basic features of erlang
14:37 hbs left
14:38 robinsjdotcom joined
14:39 akeating joined
14:40 <notriddle> http://elixir-lang.org/getting-started/mix-otp/distributed-tasks-and-configuration.html gives a pretty good overview of that.
14:43 <notriddle> Was this page hard-to-find?
14:46 keathley joined
14:47 ignacio_ joined
14:48 <nox> z1mvader: ^
14:51 cristianR_ joined
14:54 m00dy joined
14:55 jgpawletko joined
14:56 duane joined
14:57 <z1mvader> Didn't search it
14:58 jkreeftmeijer joined
15:00 cemilowski left
15:01 akeating joined
15:01 greengriminal joined
15:01 hahuang61 joined
15:02 steffkes joined
15:04 krelix joined
15:05 <sevenseacat> lol
15:05 krelix joined
15:06 cschneid_ joined
15:12 potatosalad joined
15:19 rschmukler joined
15:22 InternetFriend joined
15:23 m00dy joined
15:24 m00dy joined
15:26 griffinbyatt joined
15:29 MaSven joined
15:32 justincjohnson joined
15:33 danguita joined
15:34 wsieroci joined
15:34 fowlduck joined
15:37 m00dy joined
15:39 m00dy joined
15:41 myronmarston joined
15:42 bionj joined
15:44 ikcerog joined
15:47 racycle joined
15:53 potatosalad joined
15:54 davidw joined
15:56 amclain joined
15:56 justincjohnson joined
15:58 milad joined
16:00 m00dy joined
16:00 <iFire> fishcakez: ping!
16:06 bitmod joined
16:06 m00dy joined
16:07 storban joined
16:07 cevado joined
16:10 truami joined
16:10 cdg_ joined
16:11 <z1mvader> guyw have you ever checked the handbook of neuroevolution through erlang=
16:11 <z1mvader> ?
16:15 robinsjdotcom joined
16:16 marr joined
16:18 squallstter joined
16:20 dignifiedquire joined
16:22 asabil joined
16:23 jkreeftmeijer joined
16:24 dani0_ joined
16:25 proteus-guy joined
16:27 griffinbyatt joined
16:27 fowlduck joined
16:37 cevado joined
16:38 charlenopires joined
16:38 charlenopires joined
16:40 kiltzman joined
16:41 kiltzman joined
16:41 akeating joined
16:42 kiltzman joined
16:42 akeating_ joined
16:44 kiltzman joined
16:44 kiltzman joined
16:45 kiltzman joined
16:45 kiltzman joined
16:47 jkreeftmeijer joined
16:47 chrismccord joined
16:51 gvaughn_ joined
16:52 jgpawletko joined
16:54 truami joined
16:56 colrack joined
16:58 nepiktaz joined
17:00 refriedchicken joined
17:03 hahuang61 joined
17:03 steffkes joined
17:03 steffkes joined
17:05 tuacker joined
17:05 jerel joined
17:10 imush joined
17:14 nahtnam joined
17:14 cevado joined
17:14 mroth joined
17:15 justincjohnson joined
17:18 bananushka joined
17:19 dani0_ joined
17:21 <bananushka> Hey, I'm new to Elixir. I've done the KV project (from the getting started guide) and now I'm trying to do a different kind of project. I saw a tutorial for writing a simple terminal editor in C, and I was wondering how could I implement something like this in Elixir
17:21 <bananushka> (the tutorial I'm talking about is http://viewsourcecode.org/snaptoken/kilo/02.enteringRawMode.html)
17:22 <bananushka> And I'm having some difficulty understanding how certain low-level C functions map to Elixir
17:28 sfbw joined
17:31 icanhazbroccoli joined
17:37 cristianR_ joined
17:39 jeznet3 joined
17:41 danguita joined
17:44 kronicdeth joined
17:47 dani0_ joined
17:48 <NeverDie> Hey if anyone cares, there's an Elixir Discord server here: https://discord.gg/kceyHgm
17:51 colrack joined
17:59 sfbw joined
18:00 gokr joined
18:03 kblake joined
18:06 hotpancakes joined
18:06 gvaughn_ joined
18:07 hotpanca_ joined
18:09 icanhazbroccoli joined
18:13 josevalim_ joined
18:14 lexmag joined
18:19 MotherFlojo joined
18:21 hotpancakes joined
18:22 hotpancakes joined
18:25 steffkes joined
18:25 steffkes joined
18:27 hotpancakes joined
18:28 griffinbyatt joined
18:29 MotherFlojo joined
18:29 sfbw joined
18:35 hotpancakes joined
18:37 nepiktaz joined
18:41 greengriminal joined
18:41 hotpancakes joined
18:41 hotpancakes joined
18:48 jkreeftmeijer joined
18:52 <Nicd-> so many chat channels
18:56 wsieroci joined
18:58 jkraus joined
18:59 kyrix joined
19:00 hotpancakes joined
19:01 chrismccord joined
19:02 kblake joined
19:03 hahuang61 joined
19:08 duane joined
19:10 cdg joined
19:10 asabil joined
19:12 hotpanca_ joined
19:15 icanhazbroccoli joined
19:27 JuanMiguel joined
19:29 asabil joined
19:33 asabil joined
19:36 imush joined
19:38 <iFire> josevalim: do you know who worked on the ecto dsl parser?
19:38 <iFire> I have many trouble with it
19:39 duane joined
19:40 embik joined
19:40 <smeevil_> o/
19:41 myronmarston joined
19:42 asabil joined
19:46 pranz joined
19:46 chrismccord joined
19:47 sfbw joined
19:50 drincruz joined
19:52 hotpancakes joined
19:52 asabil joined
19:52 nepiktaz joined
19:55 myronmarston joined
19:58 asabil joined
20:03 enilsen16 joined
20:04 enilsen16 joined
20:05 kronicdeth joined
20:06 hotpancakes joined
20:07 io_bora joined
20:11 leons_ joined
20:12 io_bora joined
20:14 robinsjdotcom joined
20:18 myronmarston joined
20:19 wsieroci joined
20:21 meh` joined
20:23 pranz joined
20:26 hotpancakes joined
20:28 hotpanca_ joined
20:30 griffinbyatt joined
20:31 steffkes joined
20:31 steffkes joined
20:32 MotherFlojo joined
20:33 jkreeftmeijer joined
20:34 bionj joined
20:44 hotpancakes joined
20:48 kiltzman joined
20:53 dimitarvp joined
20:55 kronicdeth joined
21:02 drincruz joined
21:02 robinsjdotcom joined
21:04 hahuang61 joined
21:05 sfbw joined
21:09 duane joined
21:09 srxa joined
21:20 ignacio_ joined
21:20 drincruz joined
21:23 milad joined
21:29 hotpanca_ joined
21:31 griffinbyatt joined
21:36 wwwd joined
21:36 colrack joined
21:41 fowlduck joined
21:44 jkreeftmeijer joined
21:49 ZippoWeb joined
21:50 MotherFlojo joined
21:56 hashpuppy joined
22:02 kronicdeth joined
22:03 pankracy joined
22:15 justincjohnson joined
22:23 Ioyrie joined
22:27 jerel joined
22:32 griffinbyatt joined
22:32 steffkes joined
22:33 elixir9023 joined
22:33 <elixir9023> Hi! I've been writing elixir for a little while now and I'm still a little stymied at (what I thought) would be a big difference between functional vs non-functional programming.
22:34 <elixir9023> I came from ruby, but apart from pattern matching and BEAM processes, I can't say that functional programming is much of a revelation. Am I missing something?
22:35 <Nicd-> what did you expect to find?
22:36 <elixir9023> Nicd-: I was expecting it do be more radically different than programming as I was used to.
22:36 <elixir9023> *to be
22:36 <elixir9023> Nicd-: I know, I know that's vague.
22:37 <Nicd-> the difference is kind of big since you don't hide state in classes and objects
22:37 <Nicd-> instead you think in terms of data and functions that apply transformations on it
22:37 <elixir9023> Nicd-: But how's that different from adhering to, say, dependency injection in another language?
22:40 <Nicd-> even if you have DI, you still have state hidden in the object
22:40 <Nicd-> I mean, you can program in a functional style in an OO language but it doesn't come natural and the language may not make it easy
22:42 fowlduck joined
22:42 squallstter joined
22:45 <elixir9023> Nicd-: I guess you're right, ruby just seems like a pretty nice language to program in to begin with. It makes writing in a functional style fairly easy, I think.
22:46 <elixir9023> Nicd-: Perhaps I'd have a stronger reaction coming from a language like, say, Java.
22:46 jkreeftmeijer joined
22:46 <Nicd-> I haven't tried Ruby but from what I've heard, magic and hidden state is the prevailing style there :P
22:46 <elixir9023> Nicd-: Pattern matching, on the other hand, holy shit it's awesome.
22:47 <elixir9023> Nicd-: True, too much magic! That's the main thing I love about elixir. It's very easy to reason about.
22:48 <elixir9023> Nicd-: Wait, I guess I'm indirectly discovering the benefits of functional programming :P
22:48 <Nicd-> :)
22:48 <Nicd-> yeah unless you go macro happy, there's usually very little if any magic
22:49 <elixir9023> Nicd-: Yup, I will happily write more explicit code if it means that it's easier to reason about.
22:49 <Nicd-> explicit is better than implicit
22:51 <elixir9023> Nicd-: I think, coming from ruby land, implicit code is more fun to write, like you've solved a hard puzzle. But it sucks for every single person who uses your code.
22:51 MotherFlojo joined
22:51 <elixir9023> Nicd-: Hence why framework and library authors don't mind it, but end users pull their hair out in frustration.
22:52 truami joined
22:54 <dimitarvp> elixir9023: Surprised nobody mentioned immutability yet, that's one of the biggest differences between Ruby and Elixir.
22:55 <dimitarvp> you don't mutate variables in Erlang/Elixir, you get new copies with modifications applied (especially in the case of structures)
22:56 <asonge> there are also network effects from functional programs and pure functions. if a library doesn't maintain hidden state, the composition of your program with that library is far less complex.
22:57 <elixir9023> dimitarvp: True! Though I think elixir does a good job of hiding some of that "under the hood." Elixir makes re-binding seem possible, when in reality you're getting a whole new variable.
22:58 <dimitarvp> elixir9023: Yes and that's a huge advantage in terms of GC. Immutability makes a GC much simpler, more robust and VERY fast.
22:58 <dimitarvp> I wouldn't say Golang level of fast but much faster than Ruby's or Python's (hell, everything is faster than them though...)
22:58 <asonge> (there are also no cycles to figure out because there aren't cyclical references between pieces of data)
22:59 <dimitarvp> asonge: so true, and so liberating
22:59 <dimitarvp> elixir9023: I guess you not being very surprised by Elixir means Jose Valim did a very fine job of aiming the language at Rubyists :P
22:59 <asonge> elixir9023: it's weird, but thumbing through some bits of SICP (Structure and Interpretations of Computer Programming) can be a bit of a mind-shifter for actually seeing the semantic differences between different kinds of programming
23:00 <elixir9023> dimitarvp: Totally agree. The best-designed things rarely smack you with how great they are.
23:00 <asonge> it's MIT's old intro programming book, though it's based on scheme...MIT changed emphasis for beginner programming, so they abandoned the book...but it's a very interesting read.
23:00 <asonge> their take on what the tradeoffs are in OOP are pretty eye-opening.
23:00 <elixir9023> asonge: I have it on my bookshelf next to me! :)
23:00 <elixir9023> asonge: but I haven't read the whole thing yet.
23:00 <asonge> OOP containing an implicit model of time is a pretty interesting point
23:02 <dimitarvp> I think I've read about that, was it that OOP implies a linearly moving ahead time, and FP works with snapshots of moments in time?
23:02 <elixir9023> I did one semester of CS in college and found it pretty uninteresting. It seemed more like "let's jockey java around" but SICP seems actually fascinating.
23:03 <dimitarvp> you'd be lucky with Java, some universities still think PHP is the sh*t.
23:03 <elixir9023> dimitarvp: it could also be that I was 18 and thought I knew everything :P
23:04 <asonge> dimitarvp: yeah, that's some of it. but OOP has a concept of late binding, where a variable contains an object, and the object is the thing at the current time. you can't have an "old object", because the variable always has the current one.
23:05 <asonge> erlang/elixir has the same kind of thing in a process. if i pass you a process, that process's state is independent of time. when you send a message back, all you know is that one message you send arrives after another you send. that's it.
23:05 <asonge> but that said, when you *do* things with a process in elixir/erlang, you expect those semantics
23:05 hahuang61 joined
23:06 <asonge> you don't expect that you can cajole a process into a state where it's ready to react to you properly. people do that with objects by invoking methods in a particular way.
23:07 <asonge> you can think about this every time someone takes a lock to invoke several methods on an object to keep it safe in a multithreaded environment.
23:08 <asonge> you could totally program this way in elixir or erlang, but you'd get funny looks.
23:11 milad joined
23:11 duane joined
23:16 hotpancakes joined
23:17 myronmarston joined
23:26 jmcintosh joined
23:30 myronmarston joined
23:32 am55 joined
23:32 griffinbyatt joined
23:34 cschneid_ joined
23:37 hotpancakes joined
23:38 myronmarston joined
23:39 <iFire> asonge: nice to meet you from somewhere..
23:41 griffinb_ joined
23:42 fowlduck joined
23:48 <iFire> is there another way of writing ?) without breaking syntax hilighters
23:49 hotpanca_ joined
23:50 <ciawal> maybe you can use '('
23:52 chavito joined
23:53 guan joined