<    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:02 inspecteh_deck joined
00:03 cemilowski joined
00:06 chriswarren joined
00:08 nahtnam joined
00:12 hexus0 joined
00:15 jdqx joined
00:18 scarfacedeb joined
00:22 inspecteh_deck joined
00:23 therealwardo joined
00:24 chriswarren joined
00:29 strykerkkd joined
00:34 chriswarren joined
00:34 gvaughn_ joined
00:35 gvaughn__ joined
00:36 jkraus joined
00:43 gvaughn_ joined
00:51 rschmukler joined
00:52 chriswarren joined
00:52 <ivan> advocacy idea: given how similar a lot of Elixir is to Clojure, do an Elixir-for-Clojurists for a function mapping
01:00 <asonge> messing with xmerl is such a PITA...
01:02 chriswarren joined
01:02 rschmukler joined
01:03 cemilowski left
01:05 jkreeftmeijer joined
01:05 jkreeftmeijer joined
01:10 NeverDie joined
01:10 chriswarren joined
01:12 jkreeftmeijer joined
01:12 <iFire> what public - opensource projects are you guys working on? I'm looking for complete examples.
01:13 <iFire> Preferably something I can run an a app.
01:13 <iFire> ivan: look into lisp for erlang
01:13 <iFire> theoretically it should be callable from elixir
01:13 <iFire> as erlang functions
01:13 Machete joined
01:13 rschmukler joined
01:16 MarioBranco joined
01:22 chrismccord joined
01:26 rschmukler joined
01:28 chriswarren joined
01:33 steffkes joined
01:33 steffkes joined
01:38 jerel joined
01:38 chriswarren joined
01:42 wtetzner joined
01:46 zv joined
01:49 jbranchaud joined
01:51 rschmukler joined
01:56 chriswarren joined
01:59 jerel joined
02:07 <ivan> why does this hang forever? does porcelain not close the input? Porcelain.exec("cat", [], in: "hello\n")
02:09 <ivan> (not using the goon driver)
02:14 chriswarren joined
02:14 <ivan> I am just trying to send some stdin into a program if there is a better way to do that
02:19 scarfacedeb joined
02:20 <ivan> oh uh "Caveat: when using Porcelain.Driver.Basic, it is not possible to indicate the end of input. You should stop the process explicitly using stop/1." http://porcelain.readthedocs.io/en/v2.0/index.html#Porcelain.Process.send_input/2
02:20 <ivan> I guess the default in: "" works because of that
02:20 <Radar> iFire: https://github.com/radar/logs.ex
02:20 <ivan> er, nope
02:20 <Radar> iFire: That powers logs.ryanbigg.com
02:20 rschmukler joined
02:25 gradenb joined
02:26 <ivan> https://github.com/alco/porcelain/issues/37
02:30 tomterl joined
02:30 chrismccord joined
02:31 WeGi joined
02:32 chriswarren joined
02:34 jbranchaud joined
02:35 jbrancha_ joined
02:36 justicefries joined
02:37 raycoll joined
02:41 jbranchaud joined
02:45 hipertracker joined
02:47 jbranchaud joined
02:50 chriswarren joined
02:51 cmk_zzz joined
02:52 chriswarren joined
02:53 chriswarren joined
02:59 racycle joined
02:59 rschmukler joined
03:00 chriswarren joined
03:03 robinsjdotcom joined
03:08 alex88 joined
03:08 <alex88> hello everyone, someone has an idea on what could be this error? https://gist.github.com/alex88/5351fe918ef951663ad54e98af5967fe#file-start_log
03:08 jbranchaud joined
03:08 <alex88> basically I run the distillery release using a docker image, then I copy the tar file on a new docker image and build it
03:09 <alex88> however trying to run the newly created image it generates that error
03:13 bitmod joined
03:22 refriedchicken joined
03:34 steffkes joined
03:37 jkreeftmeijer joined
03:38 raycoll joined
03:46 chriswarren joined
03:47 sivsushruth joined
03:50 griffinbyatt joined
03:50 sivsushruth joined
03:53 rschmukler joined
03:53 ignacio_ joined
03:58 hexus0 joined
03:59 amosbird joined
03:59 <amosbird> hi
03:59 <amosbird> what place in elixir in compared to scala, rust and go?
04:02 <ivan> well, elixir is dynamically typed compared to those, but there are a lot of other things
04:03 chriswarren joined
04:05 <ivan> amosbird: my super short summary is "very functional with immutable data structures like Clojure, with access to Erlang libraries and its concurrency model"
04:07 <amosbird> ivan: thanks
04:16 rschmukler joined
04:17 hipertracker joined
04:19 scarfacedeb joined
04:23 hexus0 joined
04:24 bitmod joined
04:28 wickedwil joined
04:28 <wickedwil> hello
04:29 rschmukler joined
04:45 rschmukler joined
04:47 therealwardo joined
04:50 chriswarren joined
04:50 bungoman_ joined
04:59 rschmukler joined
05:00 chriswarren joined
05:01 arathunku joined
05:18 <iFire> How does elixir compare against rust?
05:19 <iFire> Rust seems to be very unstable but I haven't used it.
05:19 scarfacedeb joined
05:22 <Havvy> iFire: I think they complement each other.
05:22 <iFire> I mean why not just use a c extension in erlang or use whatever exists for concurrency on rust
05:23 <Havvy> There's no analog for the supervision tree in Rust right now.
05:24 <Havvy> And C has a lot of undefined behaviour that makes using it hard.
05:24 <Havvy> Also, even if there were supervision trees in Rust, they wouldn't be as easy to use as they are in Elixir.
05:25 <Havvy> Rust isn't unstable at all.
05:25 <Havvy> What gave you the idea that it was?
05:28 <iFire> Havvy: They always seem to be changing language mechanics
05:28 <iFire> The gist I got was it got even more convoluted with every revision
05:28 <Havvy> Not in the stable releases, which have been coming since almost two years ago now.
05:29 <iFire> didn't elixir release 3 years ago?
05:29 <* iFire> wikipedias
05:30 <Havvy> iFire: Sounds about right.
05:30 <iFire> First appeared 2011; 6 years ago
05:30 <iFire> oh
05:30 <iFire> First appeared 2010; 7 years ago
05:30 <iFire> for rust
05:30 acscherp joined
05:33 <iFire> Havvy: Got any toys in rust? I want to see a rust example.
05:33 <Nicd-> iFire: what sets Elixir apart from others is BEAM. you cannot directly compare any language that doesn't run on BEAM
05:34 <iFire> Nicd-: yeah. I'm already sold on the erlang vm languages.
05:34 <Havvy> iFire: https://github.com/BurntSushi/ripgrep is a good largish example.
05:34 <Havvy> And https://github.com/servo/servo of course.
05:35 steffkes joined
05:35 <iFire> ha that critical article is true, you really need to recreate the module import tree in rust
05:36 <iFire> Nicd-: I should try playing with the sdl2 implementation in erlang, I'm sure someone has tried making a game on the BEAM.
05:37 <Havvy> iFire: There's talk about making `mod foo` implicit, but it's controversial.
05:37 chriswarren joined
05:38 <Havvy> iFire: One of the nice things about Rust though, is that we get documentation that looks like this: https://doc.rust-lang.org/1.4.0/std/primitive.f64.html
05:38 gvaughn joined
05:39 hipertracker joined
05:39 jkreeftmeijer joined
05:39 <iFire> Havvy: I don't see how that's better than https://hexdocs.pm/db_connection/DBConnection.html#functions
05:40 <Havvy> Elixir does just as well.
05:41 <iFire> it's an improvement over c++ though
05:42 <iFire> doxygen is a standard tool there
05:54 chriswarren joined
06:01 Sgeo joined
06:03 chriswarren joined
06:06 dec0n joined
06:13 chriswarren joined
06:18 milad joined
06:22 Cohedrin joined
06:24 voltone joined
06:34 rschmukler joined
06:38 m_m_ joined
06:45 craigp joined
06:45 icanhazbroccoli joined
06:48 meandi_2 joined
06:50 chriswarren joined
06:53 tomaz_b joined
06:58 chriswarren joined
06:59 samof76 joined
07:03 hipertracker joined
07:04 proteusguy joined
07:07 imack joined
07:15 kyrix joined
07:16 chriswarren joined
07:20 qqwy joined
07:21 <bcardarella> Is there a way to determine at run-time if a function will pattern match on a given set of args?
07:22 <bcardarella> without calling the function
07:23 tuacker joined
07:26 l14n joined
07:26 chriswarren joined
07:27 gvaughn joined
07:27 <nyaray> I have this simple app that I've written as elixir scripts that I string together with require and am going to create a phoenix site for it
07:28 <nyaray> basically you have a textarea
07:28 <nyaray> and once you stop writing I imagine using a channel to update some div with the result of processing the content
07:28 <nyaray> .. in the textarea
07:30 <qqwy> bcardarella: I think that's going to be very difficult, unless you write another function that happens to have the same function clauses and call that one
07:31 <qqwy> Maybe that could be done by a macro...? It's not going to be very pretty either way though =/
07:32 <qqwy> The easiest thing to do, if you have access to the original function, is to add an extra boolean parameter that switches between running the function and performing a dry run
07:34 squallstter joined
07:35 robinsjdotcom joined
07:36 steffkes joined
07:36 steffkes joined
07:36 dani0_ joined
07:36 <nyaray> Wow by description was crap... What are the concepts I should read up on to get a process per connected browser, where the process just receives a long string, runs it through a function and then responds with the result?
07:37 <nyaray> My*
07:40 jkreeftmeijer joined
07:41 <Nicd-> nyaray: phoenix already does that
07:41 <Nicd-> you can just write a JSON API with Phoenix
07:41 <Nicd-> each request is run in its own process
07:44 cemilowski joined
07:47 execb5 joined
07:48 nd__ joined
07:49 tuacker1 joined
07:49 acscherp joined
07:53 milad joined
07:55 <nyaray> For some reason I thought that I needed a websocket between the front end and back end
07:55 <nyaray> Nicd-: thanks for pointing that out :
07:55 <nyaray> :)
07:55 <Nicd-> if you do need, Phoenix has that too
08:01 scarfacedeb joined
08:02 chriswarren joined
08:07 jkreeftmeijer joined
08:08 Guest67_ joined
08:11 hipertracker joined
08:11 dignifiedquire joined
08:11 ZippoWeb2 joined
08:11 stephen_m joined
08:11 m_m_ joined
08:16 stephen_m joined
08:17 colrack joined
08:17 arathunku joined
08:17 <nyaray> yeah, but, as you stated, that's not necessary
08:18 imack joined
08:18 <nyaray> I must've been watching too many tech talks... haha
08:21 PaReeOhNos joined
08:23 mark_66 joined
08:24 gokr joined
08:27 samof76 joined
08:32 mattyw joined
08:39 nanohest joined
08:40 chriswarren joined
08:42 vmoravec joined
08:43 laut joined
08:46 v0j joined
08:46 dani0_ joined
08:51 hexus0 joined
08:55 acscherp joined
08:57 chriswarren joined
09:04 Cohedrin joined
09:09 smoak joined
09:14 nanohest joined
09:15 chriswarren joined
09:15 gvaughn joined
09:21 marr joined
09:24 dani0_ joined
09:24 chriswarren joined
09:28 Tetiana joined
09:30 robinsjdotcom joined
09:36 steffkes joined
09:36 scarfacedeb joined
09:42 chriswarren joined
09:46 fxn joined
09:47 Tetiana joined
09:50 lt_kaopude joined
09:52 <lt_kaopude> hello, anyone who known how to use :crypto.sign function with rsa algorithm and sha256 digestType?
09:52 chriswarren joined
10:01 craigp joined
10:01 v0j joined
10:01 chriswarren joined
10:07 craigp joined
10:09 <voltone> lt_kaopude: use :public_key.sign(msg, :sha256, priv_key)
10:09 <voltone> do yourself a favour and avoid doing public key crypto directly with the primitives in :crypto
10:13 <lt_kaopude> voltone: thank you very much, i am new to elixir, i try but get no function matching in :public_key.sign/3?
10:13 <lt_kaopude> do i need to load any module before using it?
10:13 dani0_ joined
10:13 <voltone> you probably tried to pass in the key in PEM or DER format
10:13 <voltone> decode it first to an internal Erlang structure
10:14 <voltone> using pem_decode and pem_entry_decode, if your key is in PEM format
10:15 <lt_kaopude> voltone: much thanks, i will try it.
10:16 jkreeftmeijer joined
10:17 jkreeftmeijer joined
10:17 lexmag joined
10:19 chriswarren joined
10:25 robinsjdotcom joined
10:25 scarfacedeb joined
10:25 <lt_kaopude> voltone: thanks, it works.
10:25 <voltone> yay
10:29 chriswarren joined
10:31 ZippoWeb joined
10:32 bigkevmcd joined
10:35 samof76 joined
10:43 <sudobangbang> b ink
10:43 <sudobangbang> ups, sorry ;)
10:46 gmcabrita joined
10:46 teddysmoker joined
10:46 chriswarren joined
10:54 milad joined
10:59 Sgeo joined
10:59 MarioBranco joined
11:04 Tetiana joined
11:04 gvaughn joined
11:05 pcre joined
11:08 jkreeftmeijer joined
11:12 nanohest joined
11:14 chriswarren joined
11:24 jkreeftmeijer joined
11:24 Tetiana joined
11:29 steffkes joined
11:29 steffkes joined
11:32 chriswarren joined
11:34 robinsjdotcom joined
11:41 steffkes joined
11:43 chriswarren joined
11:47 Tetiana joined
11:51 rschmukler joined
11:57 craigp joined
12:00 chriswarren joined
12:00 zetashift joined
12:04 cristianR_ joined
12:05 dani0_ joined
12:07 steffkes joined
12:07 steffkes joined
12:11 craigp_ joined
12:12 dani0_ joined
12:16 jkreeftmeijer joined
12:16 nomicflux joined
12:17 jeznet2 joined
12:18 chriswarren joined
12:23 nanohest joined
12:26 jbranchaud joined
12:27 chriswarren joined
12:32 jkraus joined
12:36 rschmukler joined
12:37 chriswarren joined
12:41 robinsjdotcom joined
12:46 chriswarren joined
12:46 rschmukler joined
12:50 dani0_ joined
12:52 proteusguy joined
12:52 gvaughn joined
12:55 chriswarren joined
12:55 steffkes joined
12:55 steffkes joined
13:01 robinsjdotcom joined
13:02 ramortegui joined
13:03 jbranchaud joined
13:04 dani0_ joined
13:05 execb5 joined
13:09 robinsjdotcom joined
13:13 chriswarren joined
13:15 c137 joined
13:16 hbraun joined
13:17 jkreeftmeijer joined
13:22 LangeOortjes joined
13:29 jbranchaud joined
13:29 dimitarvp joined
13:31 rschmukler joined
13:33 kansi joined
13:33 nepiktaz joined
13:33 jesuis joined
13:35 <jesuis> hee guys, i have a strange thing going on with Phoenix, at random moments i get an error;
13:35 <jesuis> [error] #PID<0.1672.0> running Lisable.Endpoint terminated Server: xxx.dev:4000 (http) Request: GET /projects?page=2 ** (exit) an exception was raised: ** (UndefinedFunctionError) function Xxx.Endpoint.call/2 is undefined (module Xxx.Endpoint is not available)
13:35 <jesuis> the whole server seems to crach
13:35 <jesuis> [error] #PID<0.1672.0> running Xxx.Endpoint terminated
13:36 <jesuis> after a refresh everything is working fine again
13:37 <Nicd-> while you are developing?
13:37 <jesuis> yes
13:37 CvRoques1 joined
13:37 <jesuis> many times at random moments
13:37 <Nicd-> maybe you wrote an error to the code and it doesn't compile, then it will crash
13:38 <Nicd-> then it will recompile when you refresh
13:38 <jesuis> most of the time i didn't change anything
13:39 alex88 joined
13:41 <jesuis> when i screw things up, phoenix is giving me more polite errors, this one is coming from cowboy or plug i think ..
13:42 maxbeizer joined
13:42 <ciawal> I get this sometimes when I make a syntax error
13:42 gvaughn joined
13:42 <jesuis> ok
13:42 <ciawal> as Nicd- says I think it's just autocompile causing the endpoint to fail
13:42 <ciawal> just don't make any syntax errors and the problem will stop :P
13:43 <jesuis> :) i was worried that this error can occur in prod
13:43 <jesuis> then i don't make anymore syntax errors ;)
13:44 nepiktaz joined
13:44 ignacio_ joined
13:44 Tetiana joined
13:48 proteusguy joined
13:50 dani0_ joined
13:54 <steffkes> now might be a better time to ask a question i've already tried late on friday night to saturday: was anyone able to get a setup running where you recompile a elixir app running in a remote shell? and yes, that would be on docker, but i'm pretty sure it's not fully related to the question
13:56 Machete joined
13:57 scarfacedeb joined
13:59 chriswarren joined
14:05 chriswarren joined
14:07 harfangk joined
14:11 cdg joined
14:12 chriswar_ joined
14:15 rschmukler joined
14:22 <hmans> Hm, is the current context generator in 1.3-rc ignoring config :phoenix, :generators, binary_id: true?
14:23 <gazler> hmans: It is fixed in master I believe.
14:23 <hmans> gazler \o/ thanks
14:24 <barttenbrinke> I am trying to dry up this file. I've created a macro but that makes things completely unreadable. Has anyone got any suggestions?
14:24 <barttenbrinke> https://www.irccloud.com/pastebin/5zBNu9rR/
14:25 jkraus_ joined
14:25 <gazler> barttenbrinke: move the duplication of the wheres out into functions.
14:26 rschmukler joined
14:26 <barttenbrinke> gazler: Yeah, but I can't, becaus of the rt naming
14:26 <barttenbrinke> gazler: Yeah, but I can't, because of the item naming, right?
14:26 <gazler> Name isn't relevant, only order.
14:26 <gazler> where([rt], rt.role_id... would also work with where([foobar], foobar.role_id...
14:27 <barttenbrinke> gazler: Yeah, but if you look closely, it is different for each method: role_id, right_id, et cetera
14:27 <gazler> barttenbrinke: https://hexdocs.pm/ecto/Ecto.Query.API.html#field/2
14:27 MarioBranco joined
14:28 <gazler> You dynamically change that if required.
14:28 <barttenbrinke> gazler: Let me try that :)
14:29 cdg joined
14:32 <gazler> You could alias Shield.Backend.Translation.TaskTranslation too.
14:32 <gazler> and alias the Repo.
14:32 <barttenbrinke> gazler: The bigger the project, the less I use Alias. And as this project has 4 repos, I'm not aliassing them :)
14:33 <gazler> You don't have to alias, it is a lot of noise without it imo though.
14:33 chriswarren joined
14:34 <barttenbrinke> gazler: I get unbound name "table" in where?
14:34 <barttenbrinke> https://www.irccloud.com/pastebin/bBhFkjJp/
14:34 rushsteve1 joined
14:34 <barttenbrinke> So the macro doesn't support dynamic tables I guess?
14:34 <gazler> barttenbrinke: You still need `[table]` as the first arg
14:35 <gazler> The 2nd arg should be an atom though.
14:35 <gazler> I'd pass :task_id instead of "task" as the item arg.
14:37 c137 joined
14:37 <barttenbrinke> gazler: somehow I can't get field to work
14:38 <gazler> Can you gist what you have please?
14:38 <barttenbrinke> https://www.irccloud.com/pastebin/dwEXMXT2/
14:38 <gazler> What's the error?
14:40 <barttenbrinke> gazler: It is working :)
14:40 <barttenbrinke> gazler: Thanks for the help!
14:41 racycle joined
14:41 <gazler> No problem. I'd still alias. :)
14:43 rushsteve1 joined
14:44 dani0_ joined
14:46 craigp_ joined
14:47 arathunku joined
14:49 ignacio_ joined
14:49 LangeOortjes joined
14:52 <barttenbrinke> gazler: I just renamed 900 modules in this project. Alias is not the solution o_O
14:52 <gazler> barttenbrinke: alias is local to the module.
14:52 <gazler> Well, it is local to the scope actually.
14:53 <gazler> If you put `alias Shield.Backend.CustomerRepo` at the top of your module, you can just do CustomerRepo.one and CustomerRepo.all
14:53 <barttenbrinke> gazler: I know, but stuff is allready in all the wrong places, and now NOT aliassing is helping the other devs see the issue more clearly :)
14:53 <barttenbrinke> gazler: I am consulting on this Elixir project where 4 full time rails devs have learned Elixir :)
14:57 ctp joined
15:00 cemilowski joined
15:00 jerel joined
15:01 LangeOortjes joined
15:07 chrismccord joined
15:10 fantomik joined
15:14 cdg_ joined
15:19 jkraus joined
15:20 therealwardo joined
15:20 johnbat26 joined
15:21 benji joined
15:21 sfbw joined
15:22 josevalim joined
15:24 jkraus joined
15:26 rushsteve1 left
15:30 drincruz joined
15:33 execb5 joined
15:38 <m1dnight_> Hey guys. Im playing around with umbrella projects and for some reason my child projects will not start.
15:38 <m1dnight_> I don't get any compilation errors either.
15:39 <m1dnight_> What coul dbe wrong? I followed the tutorial, kind of
15:44 <ciawal> that's really not enough info ;)
15:45 <tristan__> how are you starting the applications
15:49 raycoll joined
15:50 amclain joined
15:51 imack joined
15:53 jkraus joined
15:54 davidw joined
15:56 jkraus_ joined
15:56 hexus0 joined
16:02 laut joined
16:04 MarioBranco joined
16:05 dani0_ joined
16:06 montanonic joined
16:07 vhf left
16:08 drincruz joined
16:09 MarioBranco joined
16:12 racycle joined
16:13 MarioBranco joined
16:18 meandi_2 joined
16:20 jkreeftmeijer joined
16:22 scarfacedeb joined
16:22 dani0_ joined
16:24 achauvin joined
16:25 jkreeftmeijer joined
16:28 jkreeftmeijer joined
16:35 <Ankhers> If I have some string, "YYYY-MM-DD", how can I convert that to a DateTime assuming the beginning of the day and in a timezone that I also know?
16:36 <laut> Ankhers: there is no time in that string. Only a date
16:36 tuacker joined
16:36 <Ankhers> laut: I know. That is why I said assuming the beginning of the day, I.E., hour: 0, minute: 0, second: 0.
16:36 griffinbyatt joined
16:37 greengriminal joined
16:40 <laut> Ankhers: If you use the Calendar library (https://hex.pm/packages/calendar) you can use the function Calendar.DateTime.from_date_and_time_and_zone/3
16:42 <laut> Ankhers: example: Calendar.DateTime.from_date_and_time_and_zone(Date.from_iso8601!("2017-01-01"), {0, 0, 0}, "Etc/UTC")
16:43 <Ankhers> laut: Thanks!
16:43 <laut> Note that in some time zones on some days midnight does not exist!
16:43 markh joined
16:44 scarfacedeb joined
16:45 <laut> In future versions of Elixir there will likely be more functionality for creating DateTimes with the standard library.
16:47 steffkes joined
16:48 rschmukler joined
16:48 craigp_ joined
16:53 <johnhamelink> Anyone here got much experience with Verk? I'm having a problem where its basically taking my entire website down when I put jobs in it
16:54 Guest67_ joined
16:54 inoas joined
16:56 therealwardo joined
16:57 maxbeizer joined
16:59 rschmukler joined
17:02 raycoll joined
17:03 gokr joined
17:05 therealwardo joined
17:05 meh` joined
17:09 scarfacedeb joined
17:11 robinsjdotcom joined
17:13 montanonic joined
17:13 craigp_ joined
17:13 rschmukler joined
17:14 drincruz joined
17:19 drincruz joined
17:21 l14n joined
17:23 rschmukler joined
17:24 hahuang62 joined
17:27 cemilowski joined
17:28 gabrielsch joined
17:29 <gabrielsch> hey guys I'm having some trouble to implement many_to_many in ecto/phoenix
17:29 execb5 joined
17:29 <gabrielsch> I have "city" and "products"
17:29 <gabrielsch> "city" has_many "products"
17:29 <gabrielsch> and they'll be linked through a relation table
17:29 <gabrielsch> how do I set the ecto relationships to achieve it?
17:30 jkraus joined
17:30 jbranchaud joined
17:35 inspecteh_deck joined
17:36 Cohedrin joined
17:37 jkraus joined
17:40 scarfacedeb joined
17:42 bitmod joined
17:42 <sorentwo> gabrielsch: The docs walk you through it pretty throughly https://hexdocs.pm/ecto/Ecto.Schema.html#many_to_many/3
17:43 <gabrielsch> thanks sorentwo, just figured it out
17:43 <gabrielsch> do I have to use build_assoc/cast_assoc in the changeset?
17:44 <m1dnight_> I'll show the relevant pieces in a minute. Just got home from work.
17:44 <m1dnight_> sorry about the delay
17:48 scarfacedeb joined
17:49 scarfacedeb joined
17:54 craigp_ joined
17:58 milad joined
18:03 steffkes joined
18:03 steffkes joined
18:03 rschmukler joined
18:07 raycoll joined
18:08 robinsjdotcom joined
18:09 v0j_ joined
18:10 dani0_ joined
18:14 raycoll joined
18:16 hahuang62 joined
18:16 LangeOortjes joined
18:19 ZippoWeb joined
18:19 raycoll joined
18:21 racycle joined
18:22 inoas joined
18:28 luke_nukem joined
18:28 TarVanimelde joined
18:31 lexmag joined
18:32 steffkes joined
18:32 steffkes joined
18:33 wsieroci joined
18:34 fxn joined
18:36 chrismccord joined
18:36 travis-ci joined
18:36 <travis-ci> elixir-lang/elixir#14007 (master - b8b8e4c : Gal Tsubery): The build passed.
18:36 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/99e44a181fb3...b8b8e4cd62f8
18:36 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/213524230
18:36 travis-ci left
18:39 <gabrielsch> can I pass an array of ids to a cast_assoc (many_to_many) relation?
18:39 <gabrielsch> I'm having the "products: is invalid" errors
18:39 <gabrielsch> and my input is products: [ 1, 2, 3]
18:39 <josevalim> gabrielsch: no, you need to pass a map of parameters
18:39 <josevalim> if you want to pass structs, use Repo.all(...) to find them and then put_assoc
18:40 <josevalim> the what's new in ecto 2.0 book has many examples on this
18:40 <gabrielsch> I see josevalim, what would be a map of parameter?
18:40 jbranchaud joined
18:40 <josevalim> it could even be
18:40 <josevalim> [%{id: 1}, %{id: 2}, %{id: 3}]
18:40 <gabrielsch> ah, I see
18:40 <josevalim> but that only works for existing data
18:40 <josevalim> i mean, data that is already associated
18:41 <gabrielsch> sure, actually it needs to exist
18:42 travis-ci joined
18:42 <travis-ci> elixir-lang/elixir#14008 (master - 26ccbf3 : Eksperimental): The build passed.
18:42 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/b8b8e4cd62f8...26ccbf3b98f8
18:42 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/213524876
18:42 travis-ci left
18:42 <gabrielsch> josevalim: should it be post_assoc or cast_assoc?
18:43 <gabrielsch> with cast_assoc, it asks to send all of my struct params (which I think it's for creating new associations)
18:43 <gabrielsch> but I just want to associate them
18:46 milad joined
18:49 maxbeizer joined
18:49 nanohest joined
18:49 nd___ joined
18:50 travis-ci joined
18:50 <travis-ci> elixir-lang/elixir#14009 (master - 9d8ae7d : Gal Tsubery): The build passed.
18:50 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/26ccbf3b98f8...9d8ae7d287b2
18:50 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/213528807
18:50 travis-ci left
18:50 wsieroci joined
18:52 inspecteh_deck joined
18:54 sportman joined
18:57 threedee joined
18:58 achauvin joined
19:00 acscherp joined
19:03 egis joined
19:04 gokr joined
19:06 nd__ joined
19:11 DTZUZU joined
19:12 hexus0 joined
19:19 hexus0 joined
19:21 m_m_ joined
19:22 m_m_ joined
19:29 <steffkes> hm, i'm filtering a map (which contains a propery date, based on the fact if the given date is after today or not). so after that i'd like to loop over the filtered map .. until there it's fine. what i don't get .. if i'd modified the original map for the elements that are not filtered out .. how to go with this? if i Enum.map over the filtered list .. that's not what i want. iterating over the
19:29 <steffkes> original list isn't really a good thing either .. or is it?
19:29 therealwardo joined
19:30 <steffkes> i could probably merge them together, after iterating over the filtered map .. no?
19:33 <rschmukler> has anybody run into a "no function clause matching in IO.chardata_to_string/1" when running `mix hex.publish` before? Full stacktrace: https://gist.github.com/rschmukler/dc91e582076647946dcb2d45e8b8bf4e
19:34 <rschmukler> Looks like opts[:sparse] or opts[:dest] are nil....
19:34 griffinbyatt joined
19:34 milad joined
19:34 <ericmj> rschmukler: what does your mix.exs file look like?
19:34 griffinbyatt joined
19:35 <rschmukler> ericmj: https://github.com/urbint/rox/blob/master/mix.exs
19:36 hexus0 joined
19:37 Machete joined
19:37 <ericmj> rschmukler: does mix deps.get work?
19:37 <rschmukler> ericmj: yessir
19:38 <ericmj> that’s werid
19:38 <rschmukler> I'm on 1.4 so maybe 1.4.1 fixed something... I'll try upgrading first
19:38 MarioFlach joined
19:38 <egis> Hello. When I'm starting a module ExampleModule in Application (with Supervisor.Spec.worker/3) my ExampleModule.start_link should return what exactly? {:ok, pid}? Can't find anything in docs or am reading wrong documentation.
19:38 <ericmj> It looks like you need to set :dest if you need :sparse
19:39 <ericmj> oh
19:39 <ericmj> :dest is not set in this case
19:39 <rschmukler> Oh because I'm using `sparse` for my rustler_mix task?
19:39 <ericmj> nah, it’s a hex bug
19:39 <ericmj> sort of
19:39 <ericmj> rschmukler: but you cant publish packages with git dependencies anyway
19:40 <rschmukler> Ah. I would have thought that perhaps mix.lock kept track of the SHA for you or something
19:40 <rschmukler> I can probably pin it, provided rustler has published lately
19:40 <ericmj> mix.lock keeps track of the SHA. that’s not the issue
19:41 <ericmj> hex only allows you to depend on other hex packages
19:41 <rschmukler> Fair enough. Let me see if I can pin it
19:41 <ericmj> what do you mean by pin it?
19:42 <rschmukler> ie. use a hex-published version
19:42 <rschmukler> I didn't because hansihe hadn't published some fixes that I was relying on
19:42 <rschmukler> But it looks like he has now, so I should be good
19:43 <hansihe> Just ping me if you need anything to be done. Is it fine?
19:43 <rschmukler> It is fine, thank you! Sorry for triggering a notification haha
19:43 <hansihe> No problems :)
19:44 inspecteh_deck joined
19:46 icanhazbroccoli joined
19:46 hexus0 joined
19:49 <schaary> does somebody has some experience with elixir, ssh and the SSHex Package?
19:49 <ericmj> rschmukler: can you open an issue on hex with the error and your mix.exs file?
19:50 <rschmukler> ericmj: The error went away by specifying the hex based dependency instead. If git-based deps aren't allowed in Hex libraries then is the error that there should be a better error message?
19:51 <ciawal> a little, schaary
19:51 <rschmukler> (Happy to open, just want to clarify)
19:51 <ericmj> rschmukler: yes, you are supposed to see a message telling you that git deps are not allowed
19:51 travis-ci joined
19:51 <ericmj> rschmukler: thank you
19:51 <travis-ci> elixir-lang/elixir#14015 (master - d3f1fff : Eksperimental): The build passed.
19:51 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/9d8ae7d287b2...d3f1fff8a9d0
19:51 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/213546131
19:51 travis-ci left
19:52 <schaary> ciawal: I use SSHex to click some buttons on a remote machine.
19:52 inoas joined
19:53 <schaary> And today - by some accident - I needed to click the button more than 7.000 times
19:54 <schaary> and I got the feeling, that SSHex doesn't close the connection
19:54 <schaary> So I ran out of resources ...
19:55 <schaary> do you know a way to close the connection to a remote machine with SSHex?
19:56 <schaary> I can't find out, how and when SSHex closes the connection to the remote machine
19:56 MarioEIU joined
19:59 kyrix joined
20:00 bhahn joined
20:02 <ciawal> I guess you can just use :ssh.close schaary
20:02 <schaary> ciawal:
20:02 rschmukler joined
20:02 <hahuang62> :q
20:02 milad joined
20:03 <schaary> ciawal: thank - have you got similar issues?
20:03 <ciawal> no
20:03 hahuang65 joined
20:04 inspecteh_deck joined
20:06 arathunku joined
20:06 <schaary> ciawal: thank you very much - I'm going to try it out
20:07 ignacio_ joined
20:07 hahuang65 joined
20:08 squallstter joined
20:14 laut joined
20:17 hahuang65 joined
20:18 inspecteh_deck joined
20:21 amargherio joined
20:22 <MarioFlach> Hello, I'm trying to implement my own defdelegate macro to work with a GenServer. Basically, I get another module functions and generate the same function for my server module.
20:22 <MarioFlach> https://github.com/almightycouch/musiccast/blob/master/lib/musiccast/network/entity.ex#L41
20:23 <MarioFlach> Everything works quiet good but I would like to use the same arguments as in the original function.
20:24 <MarioFlach> I have problems with Code.get_docs/2, depending on the compile order, it returns nil or the correct results.
20:25 montanonic joined
20:25 rschmukler joined
20:25 <MarioFlach> I also tried with Code.ensure_loaded/1 and Code.ensure_compiled/1 without success.
20:28 The-Kid joined
20:29 <MarioFlach> The code did work before, but only when the delegated module was compile before the other module.
20:29 blambi joined
20:30 inspecteh_deck joined
20:34 jbranchaud joined
20:37 <wwwd> I have "field :disabled, Ecto.DateTime, default: " in my schema. I am trying to set it to a value like epoch() or nil so I can then set it if and when the owener is in fact disabled. I have tried manually setting it to 1970-01-01. I have tried using Timex.Date.epoch(). And a few other things I've found via google. Anyone know how I can do this?
20:38 wsieroci joined
20:38 <laut> wwwd: which version of Ecto are you using?
20:41 bhahn joined
20:41 <wwwd> laut: phoenix_ecto 3.0
20:42 MarioBranco joined
20:43 bitmod joined
20:46 <micmus> If you're using ecto 2.1, forget about the Ecto.Date* types, unless you're working with a legacy app that uses them
20:46 <laut> wwwd: if you use phoenix_ecto 3.0.1 or higher you can use Ecto 2.1. Ecto 2.1 lets you use the native Elixir types
20:47 <micmus> ^ this means all ecto, elixir stdlib, timex, calendar, ... can freely interoperate
20:48 <wwwd> Actually, I think I am. My declaration is atually "~>3.0" which I believe uses the latest stable above 3...correct?
20:50 <laut> wwwd: check your mix.lock file to see the version used
20:50 <Nicd-> ~> 3.0 basically means 3.x
20:50 <Nicd-> I think
20:50 <micmus> or mix.deps | grep ecto
20:50 <micmus> mix deps | grep ecto
20:53 <wwwd> So I'm using phoenix_ecto 3.2.3.
20:58 inspecteh_deck joined
20:58 ignacio_ joined
20:59 <laut> wwwd: if you look at which Ecto version you are using it is probably 2.1.x then
21:01 <wwwd> Yep, ecto 2.1.4.
21:03 <laut> Ecto.DateTime is deprecated and it sounds like you would want to use utc_datetime instead. See this https://github.com/elixir-ecto/ecto/blob/v2.1.4/CHANGELOG.md#integration-with-elixir-13-calendar-types
21:04 <laut> wwwd: also for your use case using "nil" sounds like a better idea than having 1970-01-01 00:00:00 meaning "not disabled"
21:05 <wwwd> My first attempt was "field :disabled, Ecto.DateTime: default: nil". It threw an error.
21:06 bhahn joined
21:06 <laut> because of the comma after Ecto.DateTime?
21:07 milad joined
21:07 <ciawal> colon
21:08 wsieroci joined
21:11 <wwwd> Actually, no...thats wrong. it still put "2012-01-01 00:00:00" in the disabled field...and now I am totally confused because I did not even notice the date is 2012.
21:14 markh joined
21:14 <ciawal> is the field set to non-null in the db?
21:15 bhahn joined
21:17 PaReeOhNos joined
21:19 inspecteh_deck joined
21:21 steffkes joined
21:21 steffkes joined
21:22 smt joined
21:25 gazler_ joined
21:25 acscherp joined
21:33 Machete joined
21:34 smt_ joined
21:35 dch_ joined
21:35 bronson joined
21:40 tetiana joined
21:40 LangeOortjes joined
21:46 inspecteh_deck joined
21:53 chriswar_ joined
21:53 chriswarren joined
21:54 chriswarren joined
21:55 trevoke joined
21:55 chriswarren joined
21:56 chriswarren joined
21:57 chriswarren joined
21:57 chriswarren joined
21:59 strykerkkd joined
22:02 bhahn joined
22:04 Duckily joined
22:05 klltkr joined
22:05 bhahn joined
22:06 <trevoke> Hi everyone, what are the tradeoffs in running a single Registry (or a few Registries) vs. many Registries? I've found that right now, due to using via_tuples on kinds of processes that each had their set of ids, I've been creating one Registry per kind of process. Now I'm looking at what it would mean for multiple kinds of processes under a single key, for instance, and I'm wondering if I should keep on starting a single Re
22:06 <trevoke> purpose or if "a god Registry" is an acceptable idea... I'm aware this is a strangely open question, so I can provide more details on my specific scenario if you're interested...
22:08 therealwardo joined
22:11 threedee joined
22:16 bhahn joined
22:19 <wwwd> ciawal: Not null is default isn't it?
22:24 griffinbyatt joined
22:25 chriswarren joined
22:25 hexus0 joined
22:28 hexus0 joined
22:29 hahuang65 joined
22:34 chriswarren joined
22:35 bhahn joined
22:41 ZippoWeb joined
22:43 sekjun9878 joined
22:43 sekjun9878 joined
22:43 chriswarren joined
22:49 jkreeftmeijer joined
22:51 dch_ joined
22:53 Cohedrin joined
22:56 <asonge> trevoke: this might have as much to do with usage patterns as anything else.
22:56 <asonge> something that gets a lot of traffic and would require partitions to "scale" would be good in its own registry, but if you can't ever envision overloading the registry before other things give out, might as well just share a single registry for that.
22:57 <asonge> given that you can "hide" registry details behind API functions, i don't know if it's that important to solve until you run into a problem
22:58 chriswarren joined
23:00 <trevoke> I'm building a MUD-style game, so a lot of processes will be going to a Registry to find the processes they need to talk to (e.g. a location has a bunch of ids, I need to send a message to all of these to figure out... Something location-wide)
23:00 MaybeDragon joined
23:01 <asonge> i'd be wary of feedback loops if you're splitting up something like game state into actors that can themselves generate events...
23:02 <trevoke> Yeah, already ran into that :p
23:02 <trevoke> I'm following the erlmud document which was instrumental in teaching me about some of the implementation boundaries of sync/async
23:03 <trevoke> Frankly I don't even know what it means to overload the registry, or how quickly I would overload the system with too many registries
23:03 <asonge> this might be a little to vague/SICP-ish, but be aware that you might just be implementing mutation and late name binding in erlang/elixir
23:03 <asonge> oh, so one of the features of the registry is that it allows you to selectively address processes
23:04 <asonge> the default process naming is 1) atoms only 2) only 1 process per name.
23:05 <trevoke> (I'll look into mutation / late name binding)
23:05 <asonge> but if you keep asking the same process for a name->process mapping, you can run out of capacity on the lookup
23:07 chriswarren joined
23:07 <trevoke> Which means really "there's only so many lookups the registry can do at any given time" ?
23:07 <asonge> yeah
23:07 <asonge> partitions spread that out
23:08 <trevoke> *nod* Okay, that makes sense so far
23:15 <trevoke> If you're referring to mutation in the sense of "data changes" then certainly I have processes who are only responsible for holding data which changes over time... And as far as late / dynamic binding, that might be true, but.. It's all mostly message-passing, I *will* be tying up the system with specs and Behaviours
23:16 chriswarren joined
23:20 robinsjdotcom joined
23:21 bungoman joined
23:23 bhahn joined
23:24 <trevoke> asonge: if you want to take a look at the possibly overcomplicated codebase (simplification is a work in progress), it's over here: https://github.com/trevoke/dwarlixir
23:25 chriswarren joined
23:25 jbranchaud joined
23:26 alex88_ joined
23:28 Reshi joined
23:29 fnux joined
23:29 travis-ci joined
23:29 <travis-ci> elixir-lang/elixir#14017 (master - 37896aa : Michał Muskała): The build passed.
23:29 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/d3f1fff8a9d0...37896aaa3e7f
23:29 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/213630412
23:29 travis-ci left
23:33 hahuang65 joined
23:34 chriswarren joined
23:40 alex88 joined
23:42 smt joined
23:44 chriswarren joined
23:44 montanonic joined
23:46 jeregrine joined
23:47 hahuang65 joined
23:51 DLSteve joined
23:53 meh` joined
23:53 chriswarren joined
23:53 sekjun9878 joined
23:53 sekjun9878 joined
23:54 ignacio_ joined
23:59 steffkes joined
23:59 dimitarvp joined