<    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 _3_0 31
00:09 rschmukler joined
00:10 cschneid_ joined
00:20 rschmukler joined
00:29 m_m joined
00:35 laut joined
00:44 proteusguy joined
00:45 Duckily joined
00:50 talklittle joined
00:51 zabirauf_ joined
00:55 siruf joined
00:57 klltkr joined
01:00 cschneid_ joined
01:01 jmiven joined
01:02 cschneid_ joined
01:09 rschmukler joined
01:09 raycoll joined
01:16 refriedchicken66 joined
01:17 jimmyrcom_ joined
01:20 refriedchicken joined
01:21 montanonic joined
01:22 hexus0 joined
01:22 steffkes joined
01:22 steffkes joined
01:24 chriswarren joined
01:32 chrismccord joined
01:37 gopalindians joined
01:47 namelos joined
01:48 yifwang joined
01:51 MotherFlojo joined
01:58 bilal80 joined
01:59 cschneid_ joined
02:02 rschmukler joined
02:12 ignacio_ joined
02:22 racycle joined
02:23 zabirauf joined
02:23 wtetzner joined
02:25 zabirauf joined
02:28 Tetiana joined
02:30 tomterl joined
02:32 m_m joined
02:40 wong2 joined
02:43 hahuang65 joined
02:47 raycoll joined
02:51 oetjenj joined
02:52 chriswarren joined
02:54 espam joined
02:55 cschneid_ joined
03:01 <ivan> bitwalker: I fixed your transpose but I think the edit is going to get rejected, any chance you want to update your answer? http://stackoverflow.com/review/suggested-edits/15574251
03:01 <ivan> I could post a new answer but people will keep copying crashing code out of the accepted answer
03:02 Machete joined
03:13 luke_nukem joined
03:16 luke_nukem joined
03:17 <Radar> ivan: I may be able to do it.
03:17 <Radar> (because of my high so rep)
03:18 <ivan> cool I hope your actions don't cause some kind of epic drama
03:18 <Radar> Me too :D
03:19 jerel joined
03:19 <Radar> ivan: looks like your edit is controversial because it changes the intent of the original answer... SIGH.
03:19 <ivan> I just want there to be less buggy code in the world
03:20 <ivan> stackoverflow is stopping me from achieving my dreams
03:20 <Radar> ivan: I think you should undelete your answer then.
03:20 <Radar> and probably bitwalker should then delete theirs.
03:20 <ivan> undeleted
03:20 <Radar> Upvoted.
03:21 <Radar> ivan: What about this comment? http://stackoverflow.com/questions/23705074/is-there-a-transpose-function-in-elixir/23706084#comment72875882_23706084
03:21 <Radar> ivan: Which version of Elixir are you trying it on?
03:21 <ivan> Radar: I think the commenter misunderstood which answer I was referring to
03:21 <ivan> I was referring to the answer and not the comment-answer
03:22 <ivan> I test on master but I'm sure it's the same with an older version
03:22 <Radar> I can confirm that bitwalker's answer does appear to recurse forever.
03:23 <Radar> However, if that suggestion was instead `def transpose([]), do: []` then it doesn't. I prefer your solution tbh.
03:23 steffkes joined
03:23 steffkes joined
03:24 <ivan> yeah I prefer to write real recursive functions only when composition of the existing stuff can't do it
03:35 jbranchaud joined
03:38 MotherFlojo joined
03:47 chriswarren joined
03:48 zabirauf joined
04:01 hahuang65 joined
04:15 ignacio_ joined
04:34 m_m joined
04:35 jbranchaud joined
04:44 chriswarren joined
04:48 josevalim joined
04:51 chriswarren joined
04:52 Guest_ joined
04:53 markh joined
04:56 nomicflux joined
04:56 cschneid_ joined
04:59 gvaughn joined
05:00 arathunku joined
05:00 chriswarren joined
05:00 nepiktaz joined
05:03 nepiktaz joined
05:14 Tetiana joined
05:14 proteusguy joined
05:18 chriswarren joined
05:24 steffkes joined
05:28 chriswarren joined
05:33 ignacio_ joined
05:33 MotherFlojo joined
05:36 jbranchaud joined
05:43 jerel joined
05:46 chriswarren joined
05:49 wtetzner joined
05:56 chriswarren joined
06:00 griffinbyatt joined
06:02 nahtnam joined
06:07 dec0n joined
06:11 icanhazbroccoli joined
06:22 m_m joined
06:33 squallstter joined
06:34 chriswarren joined
06:36 ignacio_ joined
06:41 chriswarren joined
06:47 gvaughn joined
06:49 meandi_2 joined
06:59 imack joined
07:02 griffinbyatt joined
07:02 Tetiana joined
07:07 hexus0 joined
07:07 laut joined
07:11 zabirauf joined
07:12 hipertracker joined
07:15 jkreeftmeijer joined
07:16 icanhazbroccoli joined
07:25 steffkes joined
07:25 steffkes joined
07:27 robinsjdotcom joined
07:27 chriswarren joined
07:28 nanohest joined
07:29 tomaz_b joined
07:33 bigkevmcd joined
07:36 dani0_ joined
07:37 jbranchaud joined
07:38 chriswarren joined
07:40 cschneid_ joined
07:47 chriswarren joined
07:50 tuacker joined
07:50 gokr joined
07:52 colrack joined
07:58 johanw joined
07:59 m_m joined
08:00 mark_66 joined
08:05 acscherp joined
08:05 chriswarren joined
08:11 mattyw joined
08:15 arathunku joined
08:15 shadowjack joined
08:24 chriswarren joined
08:27 vmoravec joined
08:29 Tetiana joined
08:29 Guest67_ joined
08:36 gvaughn joined
08:37 ignacio_ joined
08:38 jbranchaud joined
08:46 dani0_ joined
08:47 <hmans> What is up, my lovely Elixir friends
08:49 wtetzner joined
08:53 craigp joined
08:56 dani0_ joined
08:58 MotherFlojo joined
09:01 stephen_m joined
09:02 chriswarren joined
09:02 griffinbyatt joined
09:05 NeverDie joined
09:12 tetiana joined
09:14 scarfacedeb joined
09:26 steffkes joined
09:27 tomfbiz joined
09:28 <tomfbiz> hello, I'm new to elixir/Phoenix (coming from a RoR background). I'm writing my first website, and I'm wondering if Model functions should return a query or a result?
09:30 <tomfbiz> In other words should queries get executed in the model or the controller? I've seen that in the generated code, the controller calls repo.all.
09:30 <tomfbiz> (also is this a good place for this question?)
09:30 <Nicd-> this is a good place :)
09:31 <Nicd-> note that in the latest phoenix (1.3 is in release candidate phase) there are no more models, there are just schemas and contexts
09:32 <Nicd-> I would take a look at the 1.3 way of doing things and seeing if you like it
09:32 Tetiana joined
09:32 <tomfbiz> That's interesting -- I'll need to read up on that, thanks.
09:32 <Nicd-> unfortunately I can't mention a specific tutorial/guide because I haven't started with 1.3 yet myself
09:33 <Nicd-> been caught up in other stuff
09:33 <Nicd-> but I hope someone else can help or you can find by googling
09:37 <tomfbiz> Thanks, Nickd
09:37 adgtl joined
09:38 robinsjdotcom joined
09:38 <Nicd-> anyway welcome to Elixir :) and don't hesitate to ask about things
09:39 chriswarren joined
09:39 <OliverMT> anyone got a guide on making libs with their own supervision tree laying around?
09:40 <OliverMT> basically a genserver in the lib
09:40 colrack joined
09:44 <smeevil> o/
09:46 chriswarren joined
09:48 teacup-on-rc joined
09:49 <Nicd-> I should learn the new 1.3 schema/context stuff
09:49 <Nicd-> it seems really fancy
09:50 tomfbiz joined
09:50 marr joined
09:53 <OliverMT> I am very ambivalent about it
09:53 <OliverMT> been enforcing a strict anemic controller using services since day 1
09:54 <OliverMT> contexts is *almost* that, but still different enough that we would have to refactor a lot
09:54 <Nicd-> mine is just a mess
09:54 <Nicd-> huge models and controllers
09:54 <Nicd-> views are empty :D
09:54 <OliverMT> I am no fan of views
09:54 <OliverMT> if you run a pure api you need a view very rarely
09:54 <OliverMT> just json() your returned data
09:55 <Nicd-> I render with EEx
09:55 <OliverMT> in eex its very nice imo
09:55 <OliverMT> so your templates dont get riddled with too much php
09:55 <OliverMT> :D
09:57 mark_66 joined
10:02 flaviodesousa joined
10:03 griffinbyatt joined
10:04 chriswarren joined
10:05 proteusguy joined
10:06 <hmans> Nicd, don't read too much into the changes, they're mostly a suggestion on how to structure an app, not a requirement. And it's not that big a change from before. "no more models, only schemas" = they're mostly the same thing.
10:06 arquebus joined
10:07 <hmans> The biggest difference is that you're asked to put most (or all) of the code that interacts with the schemas into separate modules that represent a specific concern of your app (= those new contexts)
10:07 <hmans> ie., Blog.load_posts instead of Post.load_all
10:08 <hmans> The statement that Phoenix 1.3 is making about application structure is very sane, though (ie., here's your application's domain code, and over there's all the web specific stuff)
10:14 chriswarren joined
10:15 dani0_ joined
10:24 kansi joined
10:24 gvaughn joined
10:25 milad joined
10:30 Tetiana joined
10:34 <stephen_m> had to take a break from a project i was working on for 4 months and now I come back to it - uh oh! 1. update new elixir, clear warnings. 2. update deps. 3. migrate to new modules in phoenix and design separations.
10:34 <stephen_m> Still it's kinda fun.
10:37 harfangk joined
10:38 ignacio_ joined
10:40 jbranchaud joined
10:41 Reshi joined
10:41 lexmag joined
10:44 <Reshi> Hi, I am exploring using multiple ecto repos in a phoenix app, a different repo based on the user performing a request at the endpoint. The number of repos (based on user's organization) is fixed. I was wondering if spawning multiple Endpoint supervisors (in the application.ex), each using a different Repo module would be a good idea?
10:44 <Reshi> All Endpoint functionality is identical, except for the Repo.
10:45 <Reshi> But then am I limited on ports or can I use a router scope
10:47 Ven joined
10:49 milad joined
10:52 chriswarren joined
10:59 MotherFlojo joined
10:59 qqwy joined
11:00 <qqwy> Greetings!
11:00 scarfacedeb joined
11:01 dani0_ joined
11:02 <qqwy> What is the procedure to add deprecation warnings in the Elixir-Lang codebase?
11:02 <qqwy> Is there an example somewhere that I can copy for my Pull Request?
11:03 <gazler> qqwy: https://github.com/elixir-lang/elixir/blob/master/lib/elixir/pages/Deprecations.md
11:03 <qqwy> Thank you!
11:05 coatezy joined
11:06 <gazler> qqwy: You can search the PRs for deprecate too. Here's an example https://github.com/elixir-lang/elixir/pull/5039/files
11:07 gmcabrita joined
11:07 robinsjdotcom joined
11:14 zetashift joined
11:18 mozzarella joined
11:27 steffkes joined
11:28 chriswarren joined
11:39 dani0_ joined
11:43 scarfacedeb joined
11:50 Tetiana joined
11:51 cristianR_ joined
11:55 coatezy joined
11:55 cemilowski joined
12:02 dani0_ joined
12:05 chriswarren joined
12:13 gvaughn joined
12:16 milad joined
12:22 nomicflux joined
12:24 <shadowjack> Why can't I use expressions when I specify binary size? In Erlang, I could
12:28 <benwilson512> shadowjack: you can?
12:28 <benwilson512> y = 2; <<x :: binary-size(y), rest :: binary>> = "hello"
12:30 <shadowjack> Not really. Only variables and integer constants. Even 2+2 fails.
12:32 <benwilson512> ah you want to have a function call inside the pattern itself
12:32 espam joined
12:32 travis-ci joined
12:32 <travis-ci> elixir-lang/elixir#13987 (master - 52f6cb1 : Andrea Leopardi): The build passed.
12:32 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/c0427947e099...52f6cb18aabd
12:32 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/212963482
12:32 travis-ci left
12:33 <shadowjack> Yes, seems natural for me (coming from erlang).
12:33 <benwilson512> if I had to guess that was rejected because function calls are generally not permitted inside most other patterns
12:33 <benwilson512> but I can't say I know the origins of that choice off hand
12:34 <ciawal> I do find this a little restrictive
12:34 <ciawal> you have to read pascal strings in 2 steps for example
12:36 jkreeftm_ joined
12:37 ctp joined
12:39 <nox> shadowjack: What?
12:39 <nox> Erlang doesn't allow it in patterns either.
12:39 <nox> Only in expressions.
12:40 ignacio_ joined
12:41 dimitarvp joined
12:42 chriswarren joined
12:43 Tetiana joined
12:44 espam_ joined
12:45 <shadowjack> nox: 1> <<X:(8*4), _/binary>> = <<"hello world">>.
12:45 <shadowjack> <<"hello world">>
12:45 <shadowjack> 2> X.
12:46 <shadowjack> 1751477356
12:46 <nox> That's a constant expression.
12:46 <nox> And that's not a function call.
12:47 <benwilson512> right and in Elixir there isn't a special case for the constant expression, it's just treated as a function call
12:47 <shadowjack> I did not ask for function calls. But Elixir does not allow constant expressions.
12:48 <benwilson512> FWIW you can use module attributes for those, which is often best cause it gives you a way to name the value
12:48 <benwilson512> so for example
12:49 <benwilson512> https://www.irccloud.com/pastebin/F0pFI5Y3/
12:49 <benwilson512> edited w/ an actual expression
12:50 robinsjdotcom joined
12:51 <shadowjack> Yes I know but if I have 20 fields to parse it does not seem very convinient.
12:53 <benwilson512> why do you need 20 constant expressions?
12:53 rodolfojcj joined
12:53 <OliverMT> a module attribute does not have to be at the top
12:53 <OliverMT> I find it very documentating (made that word up right now) to have those attrs right above the func that uses it
12:53 <OliverMT> alongside any @doc
12:54 <benwilson512> yup
12:54 <shadowjack> if I write 3*8+2 it's pretty self-documenting. And name of the field is in the variable.
12:56 <OliverMT> I meant more that it documents what those bits are
12:57 <OliverMT> and yes, that is true about it being in variable
12:57 <OliverMT> I'm just trying to defend elixirs honor here!
12:57 <benwilson512> it's a fair question, given that you can do it in erlang
12:57 <OliverMT> (I totally agree this probably should be fixed if possible)
12:57 <benwilson512> I'm not sure what the underlying reason is
12:57 <benwilson512> probably best to try the mailing list or forum
12:57 <benwilson512> since there's not that many people who would have been around when that decision was made
12:58 <gazler> The code is at https://github.com/elixir-lang/elixir/blob/master/lib/elixir/src/elixir_bitstring.erl
12:58 <gazler> The validation for it is https://github.com/elixir-lang/elixir/blob/master/lib/elixir/src/elixir_bitstring.erl#L171
12:58 <nox> benwilson512: What does 3 *1 compile to in Elixir?
12:59 <nox> gazler: Oh ok it's Elixir itself which rejects the code?
12:59 <gazler> Yeah
12:59 execb5 joined
13:00 MotherFlojo joined
13:01 sivsushruth joined
13:02 <shadowjack> it's in validate_spec_arg
13:02 <nox> gazler linked that.
13:02 <gazler> Originally introduced in https://github.com/elixir-lang/elixir/commit/4cd14e133489c90feee9b1da1fa3a98bb0e13fa6#diff-9e5386060c092258bf1534c0044a2949R206
13:03 <benwilson512> yeah that was a while ago
13:03 <gazler> Oh wait, it goes back further.
13:04 <gazler> I think it is https://github.com/elixir-lang/elixir/commit/26204441bbe705b2b984397d70c6080657461d16
13:04 <gazler> Related issue https://github.com/elixir-lang/elixir/issues/421
13:05 <drewolson> benwilson512 can you help me with a quick absinthe question?
13:05 <benwilson512> drewolson: fire away!
13:05 <drewolson> i'm trying to use the `batch` function and i'm seeing weird behavior https://gist.github.com/drewolson/116d671d0fe38068a8d4b12b7cb86a84
13:06 <drewolson> my `by_post_ids` function is getting an empty array as the first argument, and a random char as the second
13:06 <drewolson> e.g. 'M'
13:06 <drewolson> am i using it totally wrong?
13:06 <benwilson512> well, if it's just a basic ecto association I'd recommend leveraging https://github.com/absinthe-graphql/absinthe_ecto
13:07 <benwilson512> we can dig into what's going wrong of course
13:07 <drewolson> cool, i'll take a look. i added my repo, i'm just curious if i'm misusing the batch function.
13:07 <benwilson512> one sec let me check the docs
13:08 <benwilson512> been a while since I used its api
13:08 <benwilson512> so I'm not sure I'd be placing these functions in the Repo itself
13:09 <benwilson512> also https://gist.github.com/drewolson/116d671d0fe38068a8d4b12b7cb86a84#file-repo-ex-L8
13:09 <drewolson> It's a strict specific repo
13:09 <benwilson512> why would Repo.all be returning tuples?
13:09 ZippoWeb joined
13:09 <drewolson> Yeah that's wrong 😀
13:10 <benwilson512> you likely want omething like |> Enum.group_by(&(&1.post_id))
13:10 <drewolson> Agreed.
13:10 <benwilson512> there's also no real need to wrap it in an `{:ok` tuple at the bottom of that function
13:10 <drewolson> That said the args it's called with still seem wrong
13:10 <benwilson512> since it's never gonna be anything other than a map
13:11 <benwilson512> post_ids ?
13:11 <benwilson512> well keep in mind that 'M' is just the same as [77]
13:11 <benwilson512> so if you had a post id that was 77 it's working as intended
13:11 <drewolson> 😐 you're right
13:11 <drewolson> Thanks
13:11 <benwilson512> no worries!
13:12 espam joined
13:13 maxbeizer joined
13:17 jbranchaud joined
13:17 scarfacedeb joined
13:18 chriswarren joined
13:20 <drewolson> All working now
13:20 teddysmoker joined
13:21 <shadowjack> it worth inspecting everythink with "i" in iex. Did you know that iex will display atom :"Elixir.Aaa" as Aaa ?
13:22 <benwilson512> yes
13:23 <benwilson512> that's cause all elixir modules are atoms that start with :"Elixir."
13:23 <benwilson512> Foo is an alias for the atom :"Elixir.Foo"
13:24 <benwilson512> this ensured that Elixir could use whatever names it wanted in the standard library without colliding with Erlang
13:24 <benwilson512> and that Elixir libraries could use whatever names they wanted without colliding with the breadth of existing erlang libraries
13:24 espam joined
13:28 steffkes joined
13:28 <harfangk> is it possible to send http post request within iex?
13:29 <ciawal> of course
13:29 <ciawal> you can run any code you want
13:29 <benwilson512> harfangk: with no dependencies there's http://erlang.org/doc/man/httpc.html which is built in
13:29 <benwilson512> if you're in a mix project with dependencies you'll want httpoison / hackney
13:29 <harfangk> ah okay thank you
13:30 <harfangk> i will try httpc since it's just for doctest
13:30 <nox> httpc is sad.
13:30 <harfangk> how sad is httpc sad
13:30 <nox> Can't follow a redirect where the URL has a fragment.
13:30 <nox> So pretty sad.
13:30 <harfangk> indeed that's sad sad
13:31 <nox> Discovered that by feeding it a SO permalink.
13:31 <benwilson512> I would avoid doing http requests in a doctest
13:34 <harfangk> cn you tellm e why should i avoid it?
13:35 <benwilson512> it can be difficult to assert on the results as they're quite likely to change
13:35 <harfangk> ah true
13:36 <benwilson512> so for example doing a request to Google returns a date header that will be a different value every time
13:36 <benwilson512> doctests work best for pure examples where the inputs and outputs are simple and easily controlled
13:38 <harfangk> well that answers one of the other questions i had about testing
13:38 <harfangk> now to figure out how to put handle_cast to test...
13:38 <harfangk> that doesn't involve :timer.sleep(n)
13:40 <micmus> harfangk: the trick is to synchronise the state with a call, after doing casts
13:41 josevalim joined
13:41 <micmus> since messages are processed sequentially, getting a response on a later call, guarantees all previous casts are processed
13:42 <harfangk> this particular cast involves updating an ETS table so i don't know how i would make that explicit call
13:43 <micmus> you'd want to do whatever in that call - just to guarantee all the messages are processed
13:44 <micmus> If you don't have anything appropriate, you could consider using :sys.get_state, that comes from GenServers being special OTP processes, and is a synchronous operation, so will have the same effect of bringing the system to a stable point
13:44 robinsjdotcom joined
13:46 <harfangk> so it's like a built-in call that i could use as a last-ditch effort
13:47 <harfangk> send a cast message, then send a call message, and when that call message returns check the state of the process i want
13:47 <micmus> yeah
13:49 <harfangk> thank you! i will digging into this more :)
13:50 pesnk joined
13:55 chriswarren joined
14:02 scarfacedeb joined
14:03 travis-ci joined
14:03 <travis-ci> elixir-lang/elixir#13989 (master - 605a804 : Andrea Leopardi): The build passed.
14:03 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/52f6cb18aabd...605a804dc789
14:03 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/212989985
14:03 travis-ci left
14:03 ignacio_ joined
14:05 josevalim joined
14:07 <Ankhers> Does anyone know if Arc supports uploading a base64 string of an image?
14:08 <gazler> Ankhers: https://github.com/stavro/arc/issues/118
14:09 <Ankhers> gazler: Thanks. Don't know why I couldn't find that...
14:09 jerel joined
14:11 alex88 joined
14:14 gvaughn joined
14:20 <drewolson> benwilson512 is batching + pagination a thing people do / something the absinthe ecto package handles?
14:20 <drewolson> seems like it would be complicated
14:21 robinsjdotcom joined
14:21 wong2 joined
14:21 vifino joined
14:26 nurey joined
14:29 Ven joined
14:31 superherointj joined
14:32 travis-ci joined
14:32 <travis-ci> elixir-lang/elixir#13990 (master - 99e44a1 : José Valim): The build passed.
14:32 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/605a804dc789...99e44a181fb3
14:32 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/213001336
14:32 travis-ci left
14:35 dani0_ joined
14:36 racycle joined
14:44 v0j joined
14:44 rschmukler joined
14:45 DeadTrickster joined
14:46 hxegon joined
14:48 jkreeftmeijer joined
14:53 chrismccord joined
14:54 dani0_ joined
14:58 <superherointj> %{AAA => "bbb"} # Which sort of value is AAA in this example?
14:58 <superherointj> What is the type of AAA?
14:58 <gazler> atom
14:58 <superherointj> iex(6)> table[:AAA] #
14:58 <superherointj> nil
14:59 <superherointj> Shouldn`t it work?
14:59 <gazler> table[:"Elixir.AAA"]
14:59 <gazler> table[AAA] will work though
14:59 <superherointj> Thanks.
14:59 <superherointj> table[AAA] works yes.
14:59 <superherointj> That is the thing I wasnt understanding.
15:00 <superherointj> For maps key should I give preference to a certain type for indexing?
15:00 MotherFlojo joined
15:01 <superherointj> Between atom and string, does it matter?
15:03 <Nicd-> atoms are usually used if you know the keys beforehand
15:03 <superherointj> I know them.
15:04 <Nicd-> but they are not garbage collected so don't generate atoms from unbounded input
15:04 <superherointj> Atom stays forever?
15:04 arathunku joined
15:04 <Nicd-> yes
15:04 hdiogenes joined
15:04 <Nicd-> and the atom table has a max size
15:04 montanonic joined
15:09 <superherointj> Has anyone here come from Node.JS?
15:09 Cohedrin joined
15:10 <superherointj> I was doing Node.JS and using lots of docker to do microservices. At some point I thought that was a hack. I was calling ¨external functions¨ that were being kept on containers. So It felt like I was using IT to solve a Dev problem.
15:11 maxbeizer joined
15:11 <superherointj> That´s how I got interested in Elixir.
15:11 <superherointj> I´m not very experienced in Dev. So, I always wonder If I am doing the right thing.
15:12 <superherointj> I have been rebuilding the stuff I build my whole life.
15:12 <superherointj> As time goes by it collapses.
15:12 hexus0 joined
15:13 <benji> Such is the path to enlightenment.
15:14 <superherointj> What got you interested in Elixir/Erlang?
15:14 <shadowjack> Curiosity
15:15 <superherointj> Which part you found curious?
15:16 <shadowjack> superherointj: myself
15:16 <superherointj> Humm...
15:17 <v0j> just tried it recently... and fell in love with pattern matching. :)
15:17 <v0j> i am from php (yii2 and laravel) though
15:18 cdg joined
15:18 <v0j> i am still thinking if i shoudl do my personally fully with phoenix, or maybe angualr + phoenix
15:19 <superherointj> I am not sure if I will use Phoenix because that seems a framework not a http server.
15:19 <shadowjack> If you need just http server, use cowboy - it's web server underneath Phoenix.
15:19 dani0_ joined
15:20 robinsjdotcom joined
15:20 <superherointj> And I dislike some design decisions from my past experience. As I come from Node.JS, I am used to React, Redux style apps. Where the app isn´t html templates but an actual app.
15:20 Tetiana joined
15:20 <shadowjack> But I do not know why would you want pure http server.
15:20 raycoll joined
15:20 <superherointj> I have been doing some trivial things with Plug.
15:20 jkreeftmeijer joined
15:20 <shadowjack> superherointj: in phoenix your app is besides phoenix.
15:20 <superherointj> I´m really new to Elixir. I will probably say stupid things.
15:20 <shadowjack> and it's certainly not just templates.
15:21 <superherointj> I am used to node.js express.
15:22 <shadowjack> Phoenix is based on plug library, small composable plugins which are composed into pipelines.
15:22 scarfacedeb joined
15:22 <shadowjack> rendering is usual MVC.
15:22 <superherointj> So templates can be disabled?
15:23 <shadowjack> you can route any url to your custom handling code.
15:23 <chrismccord> superherointj views render data. HTML is one kind
15:23 <shadowjack> It's common to build API on Phoenix, when no HTML is involved.
15:23 <chrismccord> superherointj also, templates are just function calls on their views, so if you render json, it's just `de render("whatever.json", assigns), do: %{...+`
15:25 <shadowjack> Phoenix is not PHP ;)
15:25 celyr joined
15:26 <v0j> so far (still halfway reading the "guides" section), i see best practices that we apply on a php project that are built into the default structure of phoenix
15:27 <v0j> imagine, we have to import 3rd party library to implement "presentation" layer which i think resembles the "view" in phoenix.
15:27 rschmukler joined
15:27 scarfacedeb joined
15:27 <v0j> hopefully i could convince more devs to shift here in our city. lol
15:29 steffkes joined
15:29 steffkes joined
15:29 threedee joined
15:31 Ven joined
15:33 execb5 joined
15:33 rschmukler joined
15:38 marr123 joined
15:39 <Nicd-> v0j: what city?
15:39 <v0j> davao city, philippines. :)
15:40 <Nicd-> hello from Finland!
15:41 <v0j> atm, i am working as frontend dev (angular 2) where our backend api is being implemented using phoenix (first time i heard from their team). :)
15:41 <Nicd-> nice, I wish I could use Elixir at work
15:41 <v0j> that team is from hyderabad, india..they told me they are the first devs to be using that in their area. :D
15:42 <v0j> oh were far apart. :)
15:43 <v0j> oh we're far apart. :)
15:43 Cohedrin joined
15:44 <v0j> we need more advocates and evangelist of elixir! :)
15:44 <Nicd-> yes!
15:44 <Nicd-> I'm setting up a meetup in my city
15:44 Stratus3D joined
15:44 <v0j> cool!
15:44 <v0j> hoping to do one.. in the future. :)
15:45 <v0j> actually when i feel confident i could answer even basic questions from audiences. haha
15:46 snappy_ joined
15:47 scarfacedeb joined
15:48 <snappy_> Hey, I was just reading the elixir introduction to macros and have a question. Why does the following evaluate to "hello(:world)" and not ":hello(:world)"? https://gist.github.com/anonymous/b405a9840a32c2760faf220917fe19e3
15:50 <gazler> snappy_: Because :hello(:world) isn't a valid function call. Function names are treated as atoms in the ast.
15:51 <gazler> https://github.com/elixir-lang/elixir/blob/master/lib/elixir/pages/Syntax%20Reference.md#the-elixir-ast
15:51 amclain joined
15:53 <shadowjack> 16 march there was an Elixir meetup in Moscow - pretty nice, around 40 people attended. Some are using in production.
15:53 <Nicd-> we have 8 interested peopled now
15:54 davidw joined
15:54 <Nicd-> considering Moscow has 3 times as many people as my country, I think that scales nicely :D
15:55 nurey joined
15:55 <nox> Nicd-: Where are you from
15:55 <nox> ?
15:55 <shadowjack> We have >300 people in russian elixir chat, but I think most are just interested.
15:56 <Nicd-> nox: Tampere, Finland
15:56 <nox> Nicd-: Nice.
15:57 <Nicd-> http://trelixir.fi/ :)
15:58 <micmus> I was this weekend at a ruby conference http://www.wrocloverb.com/ and during the "Ruby vs Elixir" panel (where I defended our honor 😜), when asked who tried elixir, 3/4 of the audience raised hands
15:58 <nox> Why would someone do a versus of that?
15:59 <micmus> They always try to stir things up during the panels, the discussion was IMHO pretty nice and factual
16:00 <nox> micmus: Classic scum rubyist MO!!1!
16:00 <* nox> hides in a corner.
16:02 Guest___ joined
16:03 wong2 joined
16:04 sid_fules joined
16:04 jbranchaud joined
16:05 oopsydanger joined
16:07 hexus0 joined
16:07 tuacker joined
16:08 fxn joined
16:08 hexus0 joined
16:09 Antiarc joined
16:13 tetiana_ joined
16:14 solatis joined
16:15 Machete joined
16:18 refriedchicken joined
16:21 racycle joined
16:21 oborot joined
16:24 chrismccord joined
16:25 Tetiana joined
16:51 scarfacedeb joined
16:55 scarfacedeb joined
16:59 inspecteh_deck joined
17:02 MotherFlojo joined
17:02 markh joined
17:03 refriedchicken joined
17:05 superherointj joined
17:10 m_m_ joined
17:11 jkraus joined
17:12 Tetiana joined
17:13 raycoll joined
17:13 wsieroci joined
17:14 laut joined
17:15 execb5 joined
17:17 <chrismccord> micmus interesting. How'd the panel discussion go in general?
17:17 rschmukler joined
17:18 hahuang65 joined
17:22 rodolfojcj joined
17:26 hahuang61 joined
17:28 <harfangk> i found it interesting that poland seems to have a significant presence of ruby developers
17:29 stephen_m joined
17:29 <harfangk> their presence seem more pronounced than in other european countries
17:29 steffkes joined
17:29 steffkes joined
17:30 robinsjdotcom joined
17:31 MotherFlojo joined
17:31 maxbeizer joined
17:34 refriedchicken66 joined
17:39 gokr joined
17:43 montanonic joined
17:47 rschmukler joined
17:47 MotherFlojo joined
17:47 <micmus> harfangk: maybe we're just noisy :P
17:47 <harfangk> haha maybe that's the case
17:47 <harfangk> still i'm envious
17:48 <harfangk> ruby is minuscule in korea
17:49 <micmus> that might be also because there's a lot of dev shops in Poland, where western Europe outsources development
17:50 <micmus> chrismccord: overall, the feeling was that there are different use cases. Ruby is great for apps where you don't need a lot of users to make money, and advantages of using Elixir are not as big
17:50 <micmus> But there are more and more applications where you make far less on a single user, so you need more scalability & power
17:52 <micmus> I also made argument that a lot of values you can see in Phoenix, and other "core" Elixir projects are aligned with what is happening in the "alternative" ruby space - mainly dry-rb & trailblazer
17:52 hahuang62 joined
17:52 <micmus> I'm actually writing an article summarizing my thoughts after the panel, and afterparty discussions over beer. That should be a bit more coherent :P
17:53 <harfangk> that'd be an interesting post to read
17:53 <harfangk> i might ask your permission to translate it into korean later
17:55 <micmus> https://www.amberbit.com/blog/2017/3/7/elixir-different-kind-of-promises/ is also a great article in the similar sentiment
17:56 <micmus> (actually, the author - Huber was with me at the panel)
17:56 <micmus> s/Huber/Hubert
17:56 raycoll joined
17:57 <micmus> There were couple people I talked with that are using Elixir, but most of them weren't doing regular web with it
18:01 pk2004 joined
18:03 inspecteh_deck joined
18:04 jbranchaud joined
18:04 Tetiana joined
18:04 cdg joined
18:05 jerel joined
18:07 lexmag joined
18:15 rschmukler joined
18:15 josevalim joined
18:15 hexus0 joined
18:18 dani0_ joined
18:19 hexus0 joined
18:19 jkreeftmeijer joined
18:20 JuanMiguel joined
18:20 Uniaika joined
18:21 jbranchaud joined
18:23 wwwd joined
18:26 Stratus3D joined
18:30 wsieroci joined
18:35 squallstter joined
18:41 rschmukler joined
18:43 chrismccord joined
18:46 acscherp joined
18:51 klltkr joined
18:52 nd___ joined
18:53 rschmukler joined
18:56 sergio_101 joined
18:57 ZippoWeb joined
18:59 MotherFlojo joined
19:01 racycle joined
19:01 tetiana joined
19:02 wsieroci joined
19:03 marr joined
19:08 arathunku joined
19:08 hexus0 joined
19:11 hexus0 joined
19:19 inspecteh_deck joined
19:21 rschmukler joined
19:28 dimitarvp` joined
19:31 steffkes joined
19:31 rschmukler joined
19:34 zetashift joined
19:34 jkreeftmeijer joined
19:40 rschmukler joined
19:44 <Nicd-> how do you deal with tests that define modules?
19:44 <Nicd-> do you need to rename the module in every test to avoid the "redefining module" arguments?
19:47 chrismccord joined
19:47 qqwy joined
19:50 chriswarren joined
19:53 MasterNayru joined
19:56 cdg joined
19:57 cdg joined
19:57 TarVanimelde joined
19:58 add^_ left
19:59 kyrix joined
20:00 luke_nukem joined
20:00 dch_ joined
20:02 icanhazbroccoli joined
20:02 milad joined
20:05 super joined
20:06 CvRoques joined
20:06 <ciawal> Nicd-: example?
20:07 <Nicd-> https://gist.github.com/Nicd/b76bb9d380458f41ca179affd4b53d38
20:08 craigp joined
20:08 <Nicd-> there's another question too regarding that file :) in the third test foo and bar are run in an async task, so their self() points to the wrong process. I cannot pass arguments to them. how do I have them send the message to the test runner process? all I can think of is to register the test runner with a name and send to that in the functions
20:08 <ciawal> oh manually defined?
20:09 <ciawal> yeah you will, but you can name them according to the test
20:11 <craigp> anyone used msgpack with elixir, or msgpack-rpc between elixir services and services in other languages?
20:34 irclogger_com joined
20:34 Topic for
20:34 wycats joined
20:36 apotry joined
20:38 craigp joined
20:40 lagbox joined
20:43 montanonic joined
20:46 jkraus joined
20:47 Machete joined
20:48 wallyd joined
20:48 jkraus joined
20:51 milad joined
20:51 milad joined
20:51 <hahuang61> thanks
20:56 flopsec joined
20:56 icanhazbroccoli joined
20:57 mrx1 joined
21:00 jkraus joined
21:03 milad joined
21:06 jkreeftmeijer joined
21:09 cdg joined
21:10 rschmukler joined
21:10 cdg joined
21:10 inspecteh_deck joined
21:16 PaReeOhNos joined
21:18 wsieroci joined
21:20 inspecteh_deck joined
21:23 ZippoWeb2 joined
21:25 glasz joined
21:26 ephe_meral joined
21:26 ignacio_ joined
21:26 Guest67_ joined
21:28 Guest67_ joined
21:30 gazler_ joined
21:31 steffkes joined
21:31 steffkes joined
21:33 milad joined
21:34 chriswarren joined
21:34 rschmukler joined
21:38 tetiana joined
21:49 rschmukler joined
21:49 inspecteh_deck joined
21:50 m_m_ joined
21:53 Machete joined
21:54 racycle joined
21:56 markh joined
21:57 chriswarren joined
21:59 rschmukler joined
22:00 Reshi joined
22:02 PaReeOhNos joined
22:02 chriswarren joined
22:03 chriswarren joined
22:04 chriswarren joined
22:04 chriswarren joined
22:05 chriswarren joined
22:06 lixmon joined
22:06 <Reshi> Can I start multiple Endpoint supervisor each using a different Repo config? A user should be served on the process which connects to the users's org db.
22:06 chriswarren joined
22:06 <Reshi> Or will I be limited in ports and its better to do a multi-instance deploy ?
22:06 <Reshi> Oh I am sorry, this channel is not for phoenix right?
22:07 <lixmon> Reshi: I just joined but this is phoenix framework channel aswell
22:07 <lixmon> Reshi: what db are you using?
22:07 <Reshi> Postgres. Exploring other options other than using postgres schema prefixes
22:07 <lixmon> Reshi: Exactly so am I
22:08 <lixmon> I was told about some other new non-relational databases, as promised by performance increases but if there is no relation its all rubbish
22:09 DavidElias joined
22:09 <lixmon> Reshi: There is one called Neo4j that is supported by Elixir
22:09 <lixmon> https://github.com/florinpatrascu/movies_elixir_phoenix
22:10 inspecteh_deck joined
22:10 cryptomata joined
22:11 <Reshi> lixmon: we are probably going to stick with with postgres, but neo4j looks good!
22:11 <asonge> Reshi: i don't think that anything is tied to repo implicitly, and you might be mixing up state and behavior?
22:12 <asonge> you might just need to write a function that returns the right repo to execute functions against
22:14 <Reshi> asonge: that's what I am currently leaning towards. Have set of ecto repo supervisors start with the application. And then choose the Repo module dynamically once the user is identified. Would that incur any performance penalties?
22:15 <asonge> Reshi: a single function call isn't all that heavy. it might cost you *slightly* in terms of static analysis or something like that.
22:16 <asonge> Reshi: you might write a plug that stores a more portable "app context" on the connection, and then use that to execute against, that way you can keep the conn-specific stuff in the controller, and just recreate the context on elixir shell to get the same behavior.
22:16 zetashift joined
22:17 pchittum joined
22:17 mysiticity joined
22:17 klltkr joined
22:20 brycek joined
22:21 inspecteh_deck joined
22:23 ignacio_ joined
22:26 Haydos joined
22:26 Haydos joined
22:27 rschmukler joined
22:28 hipertracker joined
22:30 nurey joined
22:38 buhman joined
22:38 <buhman> why does it make sense for module names to be both modules and atoms?
22:40 <ivan> aren't they just atoms to the user?
22:43 <ciawal> ^
22:44 <alisdair> it makes sense because the underlying implementation works that way
22:47 <bcardarella> with a guard is there a way to do a negated member check? I can do: `def foo(a) when a in [:a, :b, :c] do` but not `def foo(a) when a not in [:a, :b, c:] do`
22:48 rschmukler joined
22:51 <gazler_> bcardarella: doesn't when not a in [...]
22:51 <gazler_> work?
22:51 <bcardarella> yeah that worked
22:51 <gazler_> I am sure there was a fix on master for allowing the other order. Can't find it just now though.
22:54 <ivan> buhman: Module is :"Elixir.Module"
22:54 <ivan> iex(2)> :"Elixir.Module"
22:54 <ivan> Module
22:57 Machete joined
22:59 hexus0 joined
23:00 inspecteh_deck joined
23:00 wycats joined
23:00 flopsec joined
23:00 pchittum joined
23:00 brycek joined
23:02 ignacio_ joined
23:04 jkreeftmeijer joined
23:05 PaReeOhNos joined
23:07 execb5 joined
23:08 <buhman> alisdair: just because erlang modules are atoms you mean?
23:08 <alisdair> buhman: yeah
23:08 <buhman> why not just use the atom syntax for all module names then?
23:10 <alisdair> you can
23:10 <alisdair> Module is just sugar so it gets namespace to elixir and you don't need to do stuff like `:elixir_lists`
23:11 <gazler_> bcardarella: https://github.com/elixir-lang/elixir/pull/5620
23:13 DLSteve joined
23:15 <bcardarella> nice :)
23:17 montanonic joined
23:21 colrack joined
23:21 inspecteh_deck joined
23:23 bitmod joined
23:23 griffinbyatt joined
23:27 fraknot joined
23:29 Duckily joined
23:30 codestorm7 joined
23:32 steffkes joined
23:32 smoak joined
23:33 fraknot left
23:41 inspecteh_deck joined
23:43 NeverDie joined
23:48 chriswarren joined
23:50 nomicflux joined
23:52 meh` joined