<     May 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 _2_5 26 27  
28 29 30 31
00:07 jkreeftmeijer joined
00:08 codestorm joined
00:10 jcspencer joined
00:14 RexM_ joined
00:14 isubasti joined
00:17 jcspencer joined
00:17 jkreeftmeijer joined
00:20 codestorm joined
00:23 jcspencer joined
00:24 nighty-- joined
00:28 jkreeftmeijer joined
00:30 PaReeOhNos joined
00:32 jcspencer joined
00:34 jkreeftmeijer joined
00:37 jcspencer joined
00:38 squallstter joined
00:42 jcspencer joined
00:42 fhoffmann joined
00:44 jkreeftmeijer joined
00:46 RexM joined
00:47 jcspencer joined
00:48 cschneid_ joined
00:51 wilo joined
00:51 elgenie joined
00:53 jcspencer joined
00:54 jkreeftmeijer joined
00:55 NightMonkey joined
00:57 ssswitch joined
01:00 jkreeftmeijer joined
01:10 jkreeftmeijer joined
01:11 nomad joined
01:11 m00dy joined
01:16 nomad joined
01:19 jcspencer joined
01:21 jkreeftmeijer joined
01:22 sevenseacat joined
01:27 jkreeftmeijer joined
01:28 jcspencer joined
01:32 elgenie joined
01:33 jcspencer joined
01:35 notdaniel joined
01:37 jkreeftmeijer joined
01:38 tomterl joined
01:39 PaReeOhNos joined
01:40 m00dy joined
01:42 jcspencer joined
01:45 nomad joined
01:47 jkreeftmeijer joined
01:53 jkreeftmeijer joined
01:57 codestorm joined
02:03 jkreeftmeijer joined
02:04 proteusguy joined
02:06 nomad joined
02:14 jkreeftmeijer joined
02:19 jkreeftmeijer joined
02:30 jkreeftmeijer joined
02:31 nomad joined
02:33 __charly__ joined
02:34 wong2 joined
02:36 owickstrom joined
02:39 ssswitch joined
02:40 jkreeftmeijer joined
02:43 cschnei__ joined
02:45 nomad joined
02:45 willyk joined
02:46 jkreeftmeijer joined
02:47 PaReeOhNos joined
02:52 nomad joined
02:54 cschneid_ joined
02:56 jkreeftmeijer joined
02:59 willykaram joined
03:03 m00dy joined
03:04 Redrield joined
03:04 <Redrield> Does anyone have some recommendations for things I can make with elixir to motivate myself to actually learn the language
03:05 <Redrield> I found that without motivation I just stopped caring after a day of fiddling with it
03:05 <Redrield> if it matters, I'm not a complete novice to programming. I've worked with Kotlin, Rust, and Java in the past
03:05 <Redrield> Though I am fairly new to FP
03:06 <sevenseacat> well why are you trying to learn it
03:06 cschneid_ joined
03:06 <Redrield> I want to break in to FP
03:06 <Redrield> I have lots of friends who've worked with Haskell who recommend learning FP
03:06 jkreeftmeijer joined
03:06 <Redrield> And I want to get away from all the OO languages that I've worked with in the past
03:07 <Redrield> (Rust was my first language with absolutely no OO, everything else had it in some sense)
03:07 <sevenseacat> right, but what are you actually trying to achieve/build? without using the language in real-world situations, you won't really learn it
03:08 <Redrield> That was my problem last time. Most of the things that I need are done already. And the platforms I work on compose mainly of the JVM with some systems programming
03:09 <Redrield> I like networking, like making custom servers & clients and stuff like that
03:10 hahuang65 joined
03:11 cschneid_ joined
03:12 jkreeftmeijer joined
03:14 <alisdair> finagle but in elixir
03:22 jkreeftmeijer joined
03:33 proteusguy joined
03:33 jkreeftmeijer joined
03:39 jkreeftmeijer joined
03:49 jkreeftmeijer joined
03:54 PaReeOhNos joined
04:01 jkreeftmeijer joined
04:06 ur5us joined
04:06 ur5us_ joined
04:07 jkreeftmeijer joined
04:09 proteusguy joined
04:10 hahuang65 joined
04:17 jkreeftmeijer joined
04:22 cemilowski joined
04:38 elgenie joined
04:38 willyk joined
04:46 griffinbyatt joined
04:51 Lokathor joined
05:01 willykaram joined
05:01 PaReeOhNos joined
05:11 hahuang65 joined
05:13 gvaughn joined
05:19 meandi_2 joined
05:21 griffinbyatt joined
05:25 cschneid_ joined
05:32 Tica2 joined
05:33 jkreeftmeijer joined
05:34 jkreeftmeijer joined
05:36 <ivan> I've got a macro that expects a string, can I do run a Path.expand at compile-time to the string it expects, without writing a new macro?
05:36 <ivan> s/to the/to make the/
05:37 dec0n joined
05:40 <ivan> it would be convenient if there were a reader macro that would just evaluate something at compile-time :-)
05:41 <ivan> would remove the defmacro ceremony for the dumbest macros
05:45 jkreeftmeijer joined
05:49 <asonge> write a macro for that, then.
05:49 <* asonge> runs.
05:50 <asonge> ivan: honestly, if you need to lift a calculation out of a function, putting it in a module attribute moves it from runtime to compile time
05:51 <ivan> ah right thanks
05:53 codestorm joined
05:55 cemilowski joined
05:56 nd__ joined
05:56 srxa joined
06:03 PaReeOhNos joined
06:03 PSvils joined
06:07 codestorm joined
06:12 hahuang65 joined
06:12 arekinath joined
06:17 cemilowski joined
06:22 griffinbyatt joined
06:26 notdaniel joined
06:30 willykaram joined
06:41 m00dy joined
06:44 elgenie joined
06:45 tuacker joined
07:01 codestorm joined
07:01 gvaughn joined
07:03 cemilowski joined
07:04 m00dy joined
07:06 bin7me joined
07:06 m00dy joined
07:11 PaReeOhNos joined
07:13 hahuang65 joined
07:17 srxa_ joined
07:23 griffinbyatt joined
07:29 mark_66 joined
07:32 mattyw joined
07:33 Guest67 joined
07:35 m00dy joined
07:39 gregman_ joined
07:39 jcspencer joined
07:45 marr joined
07:47 ejpcmac joined
07:50 m00dy joined
07:54 nd__ joined
07:55 codestorm joined
07:56 gvaughn joined
07:58 akeating joined
08:05 stephen_m joined
08:09 PaReeOhNos joined
08:13 hahuang65 joined
08:15 Guest95 joined
08:16 <Guest95> hee guys, i have a question about @behaviour Ecto.Type. im using a custom Date Type for postgres. which is almost working perfectly
08:17 <Guest95> i can shoot in dates like "01/01/2018" and it casts nice, but in my phoenix forms there is still the ecto.date "01-01-2018"
08:18 willyk joined
08:19 <Guest95> how can i get my custom Ecto.Type to cast the form values to "--/--/----" instead of "01-01-2018"
08:21 ur5us joined
08:21 m00dy joined
08:21 <asonge> Guest95: you need to pass a custom date builder
08:22 <asonge> Guest95: https://hexdocs.pm/phoenix_html/Phoenix.HTML.Form.html#datetime_select/3-builder
08:23 codestorm joined
08:23 apotry joined
08:23 griffinbyatt joined
08:24 hbraun joined
08:26 m00dy joined
08:29 <Guest95> thanks asonge, i didn't found that one yet .. thanks
08:29 <asonge> Guest95: all the helper functions that phoenix defines are documented in phoenix_html, btw.
08:30 <asonge> feel free to hang out and ask if you get stuck again
08:31 m00dy joined
08:33 <Guest95> hmm asonge, the date_select is to much :) how do i do it with an text_input, instead of a date_select
08:35 m00dy joined
08:37 josevalim joined
08:39 <asonge> Guest95: so, when you fetch data out from the schema, it's in Ecto.DateTime?
08:39 <Guest95> asonge Ecto.Date
08:39 m00dy joined
08:39 <asonge> ah, yeah, sorry. Ecto.Date. but you have your own custom Date type?
08:40 <asonge> is it specified in the schema?
08:40 akeating joined
08:44 <Guest95> yes :) and nailed it :)
08:44 <Guest95> <%= text_input f, :start_at, class: "form-control", value: html_date(input_value(f, :start_at)) %>
08:46 <asonge> Guest95: to give you more context than you asked for, Ecto results from the Repo use the schema module to know which type to put in query results (since there are n ecto types for each database type)
08:46 <asonge> which is why it was coming back as Ecto.Date, and not your type
08:47 <asonge> (there's no magic, but just because you define a type, doesn't mean it automatically uses it)
08:47 willyk joined
08:47 akeating joined
08:48 <Guest95> thats why, i was looking for a function to_string or something which is maybe beeing called by the html template renderer or something
08:49 <craigp> anyone know if there's a way using Mock/meck to check the number of calls to the mocked function?
08:50 gvaughn joined
08:50 <Guest95> thanks for you help asonge
08:51 cemilowski1 joined
08:52 codestorm joined
08:52 m00dy joined
08:53 m00dy joined
08:59 DDR joined
09:04 nd__ joined
09:10 m00dy joined
09:14 hahuang65 joined
09:20 <barttenbrinke> Is there a hex package that does Apple/Google ical imports?
09:21 srxa joined
09:31 Tica2_ joined
09:31 cemilowski joined
09:31 srxa joined
09:32 bigkevmcd joined
09:33 psmmr joined
09:34 Guest95 joined
09:37 Tica2_ joined
09:39 m00dy joined
09:44 gvaughn joined
09:46 codestorm joined
09:57 <m00dy> Hi Guys
09:57 <m00dy> Have you ever read this ? https://www.reddit.com/r/elixir/comments/6c1vql/34_months_learning_elixir_and_what_got_done/
09:57 akeating joined
09:57 imranismail joined
10:00 <imranismail> Hello.
10:01 <imranismail> It seems that http://blog.plataformatec.com.br/2015/08/working-with-ecto-associations-and-embeds/ is outdated. I was stuck for a bit until I read the latest docs. Might wanna update it since it's one of the top result when you search for associaitons with ecto in google right now.
10:03 srxa_ joined
10:03 <OliverMT> imranismail: "Note: this article has been updated to Ecto 2.0 by using the new cast_assoc and cast_embed APIs."
10:03 <OliverMT> are you sure?
10:03 <OliverMT> whats wrong with it?
10:04 <imranismail> Yes, the *_many associations needs on_replace: :delete for the examples to work
10:04 akeating joined
10:07 Ven joined
10:08 <ivan> can I suppress a "warning: this check/guard will always yield the same result" when checking a @attribute?
10:09 akeating joined
10:09 <* ivan> tries moving it to a macro
10:11 <ivan> hurray, that does it
10:12 <ivan> hmm, I bet even moving to a function would work
10:14 noclck joined
10:15 hahuang65 joined
10:17 m00dy joined
10:20 awea joined
10:20 nighty-- joined
10:22 <awea> Hi there i'm currently trying to add a custom command to my release using Distillery (https://hexdocs.pm/distillery/running-migrations.html#custom-command). Actually I just have define a small module to output a string. But how can I make it accept arguments ? Example: _build/dev/rel/myapp/bin/myapp hello "test" ?
10:23 cschneid_ joined
10:25 griffinbyatt joined
10:26 mattyw joined
10:28 <awea> How module function args has to be called ? Something like this maybe: bin/myapp command Elixir.MyModule myfunc/2 ["arg1"] ?
10:29 srxa joined
10:30 mattyw joined
10:39 <awea> The bin output "command <mod> <fun> [<args..>] # execute the given MFA" as help but i don't understand how i'm suppose to give the argument
10:40 codestorm joined
10:44 leons joined
10:49 vmoravec joined
10:52 griffinbyatt joined
10:53 inoas joined
10:54 srxa joined
10:56 <asonge> awea: i would use the information from the error
10:56 <asonge> awea: try to invoke it with arguments and see if you get an error
10:56 <asonge> (if you can tell me the error, i'll help you figure it out)
10:57 cemilowski joined
10:58 <awea> thanks asonge, here what i get: https://gist.github.com/Awea/baeafce0a4ac2de118b047d9b33af911
10:59 <asonge> hrm, you might have to give me a minute to rtfm a bit more.
10:59 nivaldomjunior joined
11:00 <awea> sure, I see that my argument is absent from the error. I've tryed lot of method to call it and search through stack/issue to something like this but nothing show up :(
11:01 <asonge> well, you probably need to pass the arguments through in at least 2 places.
11:02 <asonge> awea: i don't think you can pass arguments without invoking `./foo_app command mod fun args` yourself.
11:03 <asonge> wait, i could be wrong.
11:03 srxa joined
11:04 <asonge> awea: pass arguments, and then try running `export` in the custom shell script part.
11:04 <asonge> the importfontspackages.sh or whatever
11:06 <asonge> that should show you all the variables you can play with. you might be able to just add "$ARGS"
11:08 <awea> okey
11:08 <asonge> awea: i think i'm mistaken, actually. i think distillery will need to be patched to pass arguments through.
11:09 m00dy joined
11:09 <awea> erf :( That's what I think at first
11:10 <asonge> it probably won't be hard.
11:11 <awea> I never read the code of Distillery, it's kind of magic for me but may be you're right
11:11 <asonge> i'm going through right now to see if i can get you a 1-liner
11:11 <awea> oh thanks ^^
11:14 <asonge> actually, no patch needed, just a little bit of hackery :D
11:15 <awea> lul
11:15 <asonge> awea: in your .sh file, put `shift` and then after that, on the line when you invoke your own command, add "$*" to the end, and it passes the commands through.
11:16 <asonge> shift gets rid of the command name, and then "$*" is shell-speak for args $1-$n, so it'll pass the arguments along
11:16 <asonge> (the command name is formerly in $1)
11:16 hahuang65 joined
11:18 webdev007 joined
11:18 cemilowski1 joined
11:19 akeating joined
11:19 <awea> asonge something like that https://gist.github.com/Awea/baeafce0a4ac2de118b047d9b33af911 ? I'm not sure
11:20 <asonge> awea: if you copypasta the line that invokes the task and put echo in front, see if the shell actually echos anything.
11:21 <asonge> also put `echo "Hello, world"` to make sure the release is including the new file
11:21 <asonge> (should get something out now)
11:21 cemilowski joined
11:22 <awea> I doest echo the correct command with my arg and a hello world too
11:22 jkreeftm_ joined
11:22 <awea> but the command fails
11:22 <awea> in fact if I directly call it like this: bin/fontstore command Elixir.Fontstore.ImportFontsPackageTask import "foo" it fails too
11:23 <asonge> give me the error for the second one
11:24 <awea> i have update the gist _build/dev/rel/fontstore/bin/fontstore command Elixir.Fontstore.ImportFontsPackageTask import "foo" ⮂
11:24 <awea> {"init terminating in do_boot",{undef,[{'Elixir.Fontstore.ImportFontsPackageTask',import,[],[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
11:24 <awea> Crash dump is being written to: erl_crash.dump...done
11:24 <awea> init terminating in do_boot (
11:24 <awea> sorry https://gist.github.com/Awea/baeafce0a4ac2de118b047d9b33af911
11:24 <asonge> oh, the $* needs to be in quotes, btw.
11:24 <asonge> and above each error, can you put the shell command you used to generate it?
11:25 <asonge> i can refresh when you're done now that i've opened it (instead of relying on irccloud preview)
11:27 <awea> sure
11:30 <awea> I've updated the gist
11:31 <asonge> do me a quick favor and add in `def import, do: import(:init.get_plain_arguments)`
11:32 <asonge> or rather `def import, do: IO.inspect(:init.get_plain_arguments())`
11:32 gvaughn joined
11:32 <asonge> see if you can get them printing, since the shell script doesn't have debug echo statements in it yet.
11:34 codestorm joined
11:42 <awea> asonge, sorry for the delay (shower time ^^). Where did I put `def import, do: IO.inspect(:init.get_plain_arguments())` ?
11:44 <asonge> awea: in the fontstore.importfontspackagetask module
11:44 <asonge> i think it always invokes with 0 arguments?
11:44 <asonge> (the function, i mean)
11:44 <asonge> it's up to you to fetch the arguments from the VM
11:45 <awea> you're right this ouput my argument
11:46 <awea> so my import/1 is never called ^^
11:46 <awea> Thanks asonge for the help :)
11:46 <asonge> awea: so, you can just use the /0 function to call the /1 function, also you might want to map from character lists to strings
11:46 <awea> I'm already doing that :D
11:47 <asonge> awesome, you're on your way then
11:47 <awea> May be a pull request on Distillery would be usefull to cover that topic
11:48 <asonge> yeah, add it in to the docs somehow
11:48 dustinfarris joined
11:49 <awea> I'll do it right after testing/commiting this
11:50 <asonge> awea: just making sure you know that you can leverage OptionParser as well for more complex stuff
11:51 <awea> asonge: Yeah thanks ^^ I already use it in a mix task
11:52 m00dy joined
11:54 srxa_ joined
11:55 mattyw_ joined
12:05 laut joined
12:09 cristianR_ joined
12:16 Guest95 joined
12:17 hahuang65 joined
12:18 <Guest95> i have a question about updating a nested list with structs, i have a %Project{} with many sorted steps [%Step{}, %Step{}]
12:18 <Guest95> now im finding the index of the old step to replace
12:18 <Guest95> index = Enum.find_index(project.steps, fn(s) -> s.id == old_step.id end)
12:18 <Guest95> and replace it with a new step
12:18 <Guest95> steps = List.replace_at(project.steps, index, step)
12:18 <Guest95> is this the way to go, of is there a better method to find an replace a struct in a list
12:19 <Nicd-> you could Enum.map and then replace the matching
12:19 proteusguy joined
12:19 <Nicd-> but of course it will go to the end of the Enum needlessly
12:19 <Nicd-> dunno if you can stop it
12:22 <OliverMT> Guest95: Enum.map
12:22 <OliverMT> oh, nicd said that as well
12:26 <Guest95> will try, maybe thats more elegant
12:27 <ciawal> is this an ecto assocation?
12:27 <asonge> Guest95: it might be worth it to have this in a map if it's going to be sparsely updated.
12:28 <asonge> lists are linked lists, and sparsely updating them isn't so nice.
12:28 <ciawal> that was my suggestion but I guess this is an ecto schema
12:28 <ciawal> but if so, maybe ecto should do this instead
12:29 codestorm joined
12:30 akeating joined
12:32 <OliverMT> is this linked with a belongs_to project in the step?
12:32 jkreeftmeijer joined
12:34 codestorm joined
12:36 mounibec joined
12:40 <Guest95> its just a defstruct
12:40 <Guest95> steps: []
12:41 akeating joined
12:41 wpcarro joined
12:47 vikr joined
12:50 m00dy joined
12:55 akeating joined
12:56 JEG2 joined
12:56 jkreeftm_ joined
12:56 m00dy joined
12:57 m00dy joined
12:58 kronicdeth joined
13:02 <m00dy> https://news.ycombinator.com/item?id=14392148
13:05 <nox> m00dy: Don't hotlink to HN items.
13:05 <nox> m00dy: Now if Elixir users upvote it from your link,
13:05 <nox> it won't get acknowledged as an upvote.
13:05 <m00dy> it's not my link actually
13:05 <m00dy> but, thanks for ack
13:05 <nox> From the link you pasted*
13:14 m00dy joined
13:15 kronicdeth joined
13:16 Guest67 joined
13:16 apotry joined
13:18 hahuang65 joined
13:21 m00dy joined
13:27 dimitarvp joined
13:28 codestorm joined
13:33 griffinbyatt joined
13:37 jordan0day joined
13:38 josevalim_ joined
13:43 jerme joined
13:43 akeating joined
13:45 maxbeizer joined
13:46 PaReeOhNos joined
13:47 <m1dnight1> hey guys, noob question about ecto: When I have a query like this: Karma |> Ecto.Query.update(inc: [karma: 1]) , how do I commit it?
13:48 <nox> m1dnight1: git commit
13:48 <* nox> hides.
13:48 <m1dnight1> s/it/it to the database/
13:48 <m1dnight1> Ambiguity is a pita ;p
13:49 asabil_ joined
13:50 <asonge> m1dnight1: https://hexdocs.pm/ecto/Ecto.Query.html#update/3
13:50 <nox> m1dnight1: Yet pretty good.
13:50 <nox> https://en.wikipedia.org/wiki/Pita
13:50 mounibec joined
13:50 <asonge> "In order for updates to be applied, Ecto.Repo.update_all/3 must be invoked."
13:50 <m1dnight1> Yeah, I was reading that, but it seems to be the same as udpate, no?
13:50 <m1dnight1> ill read it better, sec :p
13:51 cdg joined
13:51 <m1dnight1> ooh, the [] argument. I forgot that :)
13:51 <m1dnight1> thanks!
13:52 <m1dnight1> It's a bit weird that the [] signifies other changes, no?
13:53 <m1dnight1> Karma |> Ecto.Query.update_all(Karma, set: [karma: 1]) would be the same, right?
13:53 <m1dnight1> (modulo typos)
13:53 gvaughn joined
13:56 <asonge> m1dnight1: don't think so?
13:57 <asonge> m1dnight1: Ecto.Query.update_all(Karma, update: [karma: 1]) would be how it works, and all karma would be set to the number 1.
13:57 <asonge> errrm, no update: sorry
13:57 hbraun joined
13:57 <asonge> actually, this is all internal api, and i'm just going to shut up
14:00 jerel joined
14:03 patientplatypus joined
14:04 cdg joined
14:04 m00dy joined
14:07 m00dy joined
14:11 cemilowski joined
14:11 m00dy joined
14:11 jleon joined
14:13 wpcarro joined
14:16 __charly__ joined
14:17 m00dy joined
14:19 hahuang65 joined
14:19 jkreeftmeijer joined
14:22 proteusguy joined
14:22 codestorm joined
14:22 dustinfarris joined
14:23 cdg_ joined
14:28 codestorm joined
14:33 PSvils joined
14:33 Guest95 joined
14:34 griffinbyatt joined
14:35 Thinh joined
14:37 asabil joined
14:41 ssswitch joined
14:43 jcspencer joined
14:46 m00dy joined
14:48 Matsa joined
14:58 ssswitch joined
15:00 RexM joined
15:01 cschneid_ joined
15:02 mounibec joined
15:03 miwa joined
15:05 akeating joined
15:05 hashpuppy joined
15:08 Ven joined
15:09 miwa joined
15:12 m00dy joined
15:13 wsieroci joined
15:19 miwa joined
15:20 hahuang65 joined
15:22 codestorm joined
15:22 m00dy joined
15:26 Ven joined
15:26 rkazak joined
15:35 griffinbyatt joined
15:36 codestorm joined
15:37 tuacker joined
15:38 meh` joined
15:38 papachan joined
15:40 <jleon> Hello, I had a question about elixir/erlang's observer application. I can start the application with :observer.start, no problem. I can find processes that i create within the process list. How do i see the tree like structure of my applications in the Applications tab?
15:40 miwa joined
15:41 icecreamcohen joined
15:43 m00dy joined
15:46 m00dy_ joined
15:46 meh` joined
15:47 <josevalim> jleon: click in the Application tab and choose your application on the left side
15:47 Ven_ joined
15:47 <jleon> Ah i should mention i dont see it on the left hand side
15:47 hbraun joined
15:50 davidw joined
15:52 ejpcmac joined
15:53 akeating joined
16:01 <asonge> jleon: are you on the applications tab?
16:02 <jleon> Yes, I see things along the lines of cowboy, elixir, gproc, hex, logger, and a few other things. I would expect to see my defined application in this list as well
16:02 tuacker1 joined
16:03 tuacker joined
16:04 zv joined
16:07 <ericmj> your application should be in that list if it’s loaded and started
16:08 justelex joined
16:08 <jleon> Does i matter if i start it manually in iex?
16:18 refriedchicken joined
16:19 franco joined
16:20 hahuang65 joined
16:22 <asonge> it should appear shortly after being started if you start it with Application.ensure_all_started (or another :application or Application function)
16:22 dnyy joined
16:22 PSvils joined
16:25 <jleon> So i usually start the application first, and currently when i run Application.started_applications, i see the app in the given list. after being up for 20 mins, i will not see it in the list. If there a better way to confirm this?
16:27 <jleon> and with :application.ensure_started, i get status :ok
16:28 m00dy joined
16:32 <benwilson512> jleon: you're in a mix project yes?
16:33 <benwilson512> are you doing `iex -S mix`
16:34 <jleon> correct, i am using 'iex -S mix'
16:35 <ciawal> what's your application called?
16:35 griffinbyatt joined
16:36 <jleon> in this case it is :bittorrent_client, here is my project https://github.com/JulioDeLeon/bittorrent_client
16:36 <benwilson512> so
16:36 <benwilson512> you don't have an application callback specified in your mix.exs
16:37 wpcarro joined
16:37 <benwilson512> your application callback is not properly setup either
16:37 <benwilson512> you need a single top level supervisor under which the three processes you have there are started as children
16:37 <ciawal> fyi you don't need the `as` here: alias BittorrentClient.ServerSupervisor, as: ServerSupervisor
16:38 <benwilson512> jleon: I would consider going through the mix guides to become familiar with a proper application supervisor setup
16:40 rkazak joined
16:42 Ven joined
16:43 wpcarro joined
16:43 <jleon> for the `as` code, i was going playing with credo
16:44 jcspencer joined
16:47 codestorm joined
16:48 codestorm joined
16:49 Ven_ joined
16:51 hahuang65 joined
16:52 wpcarro joined
16:58 jkreeftmeijer joined
16:58 Ven_ joined
16:59 rozap joined
17:01 <PSvils> Hey guys! Wanted to re-ask, but not pester anyone - are there any image processing libraries in Elixir or Erlang for color palette extraction from images, and similar functions?
17:01 <PSvils> Specifically color processing, not image format processing, which is what I've mostly found.
17:02 <benwilson512> not that I know of, Elixir / Erlang is not generally used for computationally intensive tasks and image processing generally involves that
17:02 <benwilson512> however
17:02 <benwilson512> for super basic stuff
17:03 <benwilson512> if you're just walking through an image binary and editing rbg values it'd be reasonably easy to do manually I feel like
17:03 <benwilson512> depending on the image format
17:03 <PSvils> benwilson512: well I've heard of the awesome performance of Elixir, and need to combine the image color processing with an API back-end.
17:04 <PSvils> my natural approach is to structure everything around the same language.
17:04 <benwilson512> Elixir gets awesome performance at tasks built around concurrency
17:04 karmajunkie joined
17:04 <PSvils> I was just thinking about concurrency, that taking data from a 2d array (image pixels) would be nicely parallelizable.
17:05 <benwilson512> well parallelism and concurrency aren't quite the same thing
17:05 <benwilson512> but nonetheless
17:05 <PSvils> not sure how it all translates, just researching the options so far, but I have developer friends vouching fro Elixir, and from seeing Phoenix stuff, I'm a bit blown away :)
17:06 <benwilson512> image manipulation gets pretty complicated pretty fast, I feel like most folks use one of a handful of dedicated programs that have gone through all of that complexity. It's very easy to run other programs from elixir for the purposes of doing specific work
17:06 <benwilson512> so for example
17:06 <benwilson512> we do a lot of machine learning at cargosense, and that is all python
17:06 <benwilson512> but we have elixir doing all of the work around managing jobs, getting the data for the python script, and handling results
17:06 <benwilson512> my gut instinct would be to handle images the same way
17:07 <benwilson512> however a search on hex https://hex.pm/packages?_utf8=%E2%9C%93&search=image&sort=downloads
17:07 <ciawal> can you not call ffmpeg to do this?
17:07 <benwilson512> does turn up some results
17:07 <ciawal> or imagemagick
17:09 <PSvils> benwilson512: will have a look through those!
17:09 <PSvils> ciawal: I suppose I could, but the focus is on good color palette extraction from images, didn't know imagemagick might have had these features! will look at that too.
17:10 <PSvils> benwilson512: for what it's worth, I'm currently working with Python, and it has a lot of image processing libraries. I'm just not too enthusiastic about the performance!
17:11 <PSvils> From what I know about color palette extraction, it's basically a clustering algorithm over the color values.
17:11 <benwilson512> right, I suppose what I"m saying is that image processing is an area that benefits from a C like approach to manipulating data
17:12 <benwilson512> Elixir's approach to memory where ever process has its own heap gives you fantastic isolation characteristics
17:12 <benwilson512> but it means that there are some penalties to pay when it comes to raw processing power
17:12 OtherAllan joined
17:12 Ven_ joined
17:12 <benwilson512> you wouldn't build a physics engine in elixir for example
17:12 <benwilson512> python has its own slowness too, although a lot of python libraries are just thin wrappers over C
17:13 <benwilson512> we also rewrote a few algorithms in Rust which was fun
17:18 Ven joined
17:26 m00dy joined
17:27 Ven joined
17:38 nbg joined
17:40 griffinbyatt joined
17:42 ikcerog joined
17:42 kronicdeth joined
17:42 codestorm joined
17:44 patientplatypus joined
17:49 ur5us joined
17:51 rkazak joined
17:53 Ven_ joined
17:57 PaReeOhNos joined
17:58 m00dy joined
17:59 JEG2 joined
18:00 jerme joined
18:01 jerme joined
18:02 jleon joined
18:03 douglascorrea joined
18:04 srxa joined
18:04 rkazak joined
18:09 lexmag joined
18:11 jleon joined
18:20 JEG2 joined
18:27 Ven joined
18:28 karmajun_ joined
18:30 karmajunkie joined
18:36 codestorm joined
18:41 jleon joined
18:41 griffinbyatt joined
18:41 JEG2 joined
18:44 hbraun joined
18:46 jcspencer joined
18:46 elgenie joined
18:57 elgenie joined
19:02 PaReeOhNos joined
19:05 squallstter joined
19:07 wpcarro joined
19:08 jleon joined
19:10 Ven_ joined
19:11 codestorm joined
19:17 josevalim joined
19:19 wsieroci joined
19:28 mounibec joined
19:29 inoas joined
19:34 codestorm joined
19:40 rkazak joined
19:41 griffinbyatt joined
19:42 <barttenbrinke> I'm trying to restructure an app into an otp app, but I am running into the following issue: some applications (like gettext or ecto) are used by multiple apps. Should I put them in the Umbrella mix file or should I have mulitple?
19:43 cemilowski joined
19:45 <benwilson512> put them in each app's mix file
19:45 <benwilson512> do not use the umbrella mix file
19:45 <benwilson512> each application should enumerate all of its dependencies
19:46 craigger joined
19:56 <kronicdeth> Is there a supported way to do compile-time deprecation warnings the way Elixir does for the standard library? I get the impression that I shouldn't just start calling `:elixir_errors.warn` as it's more an implementation detail
19:58 maxbeizer joined
19:58 <ljarvis> kronicdeth: just do an IO.warn("foo", Macro.Env.stacktrace(__ENV__))
19:59 <kronicdeth> yeah, but that's going to triggered on every call, so get really noisy in production, won't it?
20:01 wpcarro joined
20:02 <kronicdeth> I suppose I'd need to turn the original signature into a macro, then have it call a new private version, just so the macro could call IO.warn only during compile-time
20:02 <kronicdeth> Does not seem great, but doable
20:03 <ljarvis> i've been leveraging macros for this myself too. But more often than not, I've only needed it inside __using__ so it'll only want once anyway
20:03 cdg joined
20:04 <barttenbrinke> benwilson512: Thanks, Will I have multiple instances of everything when I start the umbrella app, or will it understand there is allready an ecto running and use that one?
20:05 <benwilson512> well so
20:05 <benwilson512> there is only ever one instance of an application running at any given time
20:05 <benwilson512> however if you have an Ecto.Repo in multiple application supervision trees
20:05 <benwilson512> those will of course both be live
20:06 <barttenbrinke> Yeah, well that is wat causing the issue atm :)
20:07 <barttenbrinke> ArgumentError: (stdlib) :ets.lookup(Backend.Repo.Pool, #PID<0.72.0>)
20:07 <benwilson512> I mean in general I would not have multiple apps with a repo that is used on the same database with the same tables
20:07 <josevalim> the Repo is not started?
20:07 maxbeizer joined
20:07 <barttenbrinke> josevalim: Well yes in the backend.
20:07 <barttenbrinke> This a frontendtest
20:07 <josevalim> kronicdeth: yeah, maybe we need to have a built-in mechanism for this
20:08 <benwilson512> barttenbrinke: does the front end app have the backend app as a dependency?
20:08 <barttenbrinke> Ye
20:08 <barttenbrinke> Yes
20:08 <josevalim> barttenbrinke: you then need to move the repo to another app they can all depend on
20:08 <josevalim> or have separate repos
20:08 <benwilson512> er wait so you have the repo inside backend, front end depends on backend
20:08 <benwilson512> the backend repo should be started and available
20:09 <barttenbrinke> Yes, that is what I was expecting, but it isn't
20:09 jeffweiss joined
20:09 <barttenbrinke> Do I need to do something special to start them?
20:10 <barttenbrinke> I have them in the global config
20:10 <benwilson512> just so we're clear on some things, can you show me the backend app's application module?
20:11 <benwilson512> and also the front end app's mix.exs
20:11 marr joined
20:11 <kronicdeth> josevalim: I like that Exception.blame is finally happening. I recall us talking about it in front of the House of Blues at ElixirConf. Glad I wasn't the only one that wanted it.
20:11 <josevalim> kronicdeth: until 1 month ago it was really hard
20:11 <kronicdeth> So, what's in OTP 20 that makes it work?
20:11 <josevalim> and then a bunch of things happened that made it really easy!
20:12 <josevalim> the new :debug_info chunk
20:12 Ven joined
20:12 <josevalim> so we can store AST in Elixir in the beam file
20:12 <kronicdeth> well, I definitely need to integrate that into the IntelliJ Elixir debugger then
20:12 <josevalim> otherwise we would need to write an Erlang to Elixir translator
20:12 <barttenbrinke> benwilson512: There is an issue there :
20:12 <barttenbrinke> https://www.irccloud.com/pastebin/NtZDfi2d/
20:13 <kronicdeth> that had been my previous plan for the decompiler josevalim
20:13 <barttenbrinke> Which ones do I need to move :)?
20:13 <kronicdeth> Just having the AST for Elixir kinda takes the fun out of writing a decompile ;-)
20:13 <josevalim> kronicdeth: https://github.com/erlang/otp/pull/1367
20:13 <benwilson512> barttenbrinke: you don't have the :backend as a dependency of front end
20:13 <josevalim> it is the expanded AST though
20:13 <barttenbrinke> benwilson512: In deps()
20:14 <barttenbrinke> Is that not enough?
20:14 <benwilson512> no
20:14 <benwilson512> it needs to be on the applications list
20:14 <benwilson512> if you're pre 1.4
20:14 <benwilson512> if you're on 1.4 you can get rid of the whole applications list
20:14 <benwilson512> I'm not sure why you have any included applications
20:14 <barttenbrinke> Im on 1.3
20:15 <barttenbrinke> When did 1.4 came out :)?
20:15 <benwilson512> ok then you need it on the applications list
20:15 <benwilson512> uh
20:15 <benwilson512> last jan
20:15 <benwilson512> we're on 1.4.4 now
20:16 <benwilson512> your backend app is using the extra_applications notation which IIRC is 1.4 only
20:16 <barttenbrinke> You are talking Elixir or Phoenix here :)?
20:16 <benwilson512> Elixir
20:16 <barttenbrinke> 1.4
20:16 <benwilson512> ah
20:16 <benwilson512> on elixir 1.4 you don't need the applications list
20:16 <benwilson512> you only need extra_applications for things like logger and runtime tools
20:16 <barttenbrinke> Ok, but removing it does not give me backend :)
20:17 <benwilson512> one thing at a time
20:17 <benwilson512> can you show me the full mix.exs for your front end app now
20:17 <benwilson512> also I still need the actual application module of backend
20:17 <benwilson512> not the mix.exs
20:18 notdaniel joined
20:18 <barttenbrinke> benwilson512: It is working :)
20:18 <benwilson512> perfect
20:18 <barttenbrinke> Removing the applications list fixed it.. well now it crashes in a test :)
20:18 <barttenbrinke> Which is something I can solve I think :)
20:19 <barttenbrinke> I am refactoring this app into an umbrella... and the dependencies aint pretty :)
20:20 <Ilyes512> is there a library out there that uses a postgres table as a queue?
20:22 <Ilyes512> I basically want to port an app written in php (laravel) to elixir. In laravel i am using a queu using a rational db (mysql) and cronjob for running scheduled tasks. I think I can replace scheduled tasks with something like https://github.com/c-rack/quantum-elixir (or just native genserver using delayed messaging?).
20:23 <Ilyes512> at the moment I dont have any multiple nodes requirements which seems to be the hardest to cover (net split?)
20:25 <OliverMT> Ilyes512: you have exq that uses redis
20:25 <OliverMT> but its pretty trivial to implement yourslef using postgres and select .. for update
20:25 <benwilson512> there seems to be 2 different things you're talking about
20:25 <benwilson512> scheduled jobs vs job queues
20:26 <Ilyes512> yes i need both
20:26 <benwilson512> gotcha
20:26 <OliverMT> are you on aws Ilyes512 ?
20:26 <OliverMT> aws lambda cronjob events are awesome for scheduled stuff
20:26 <OliverMT> you completely move the responsibility for the cron stuff outside your app
20:26 <Ilyes512> it's not going to be hosted any time soon.
20:26 <Ilyes512> it still sort of a "learn" project
20:26 <benwilson512> quantum works fine for cron stuff
20:27 <Ilyes512> i am looking at this now for queue https://github.com/koudelka/honeydew
20:27 <benwilson512> I haven't found their global flag to work very well but if you're in a cluster you can just do
20:27 <Ilyes512> not really got a reason but I am want to see if i can prevent using redis
20:27 mounibec joined
20:27 <benwilson512> https://www.irccloud.com/pastebin/S5kSPhVf/
20:28 codestorm joined
20:28 <benwilson512> honeydew is pretty modular IIRC
20:28 <benwilson512> you could add a postgres backed queue I think
20:28 <benwilson512> I have a fully home grown thing cause a couple years ago exq and honeydew were both in not a great place
20:28 <kronicdeth> ljarvis: IO.warn worked great when called from in a macro. Thanks
20:29 <Ilyes512> i was also thinking about using some combo of :queue and postgres
20:30 <benwilson512> I wouldn't try to duplicate state in memory and the DB, keeping the two in sync is hard
20:30 <Ilyes512> yes mid sentence i was like... hmm what if it crashes will it be in sync :)
20:31 <kronicdeth> honeydew is such a gross concept when you learn where it comes from - it's aphid sugar poop that ants farm
20:32 <benwilson512> lol
20:32 <icecreamcohen> honey is just bee vomit
20:32 <benwilson512> I mean it's also a melon
20:32 <icecreamcohen> *just* a melon?
20:33 <rkazak> is elixir 1.5 going to be based on Erlang 20? if not when will that happen?
20:33 douglascorrea joined
20:33 <Ilyes512> ideally i want something very light weight and understandable. It not going to have a lot of queue items
20:33 <Ilyes512> 1.4.4 had some changes due to erlang 20 (in prep off)
20:34 <benwilson512> isn't 20 still in RC?
20:34 <Ilyes512> This version includes changes that make Elixir fully compatible with Erlang OTP 20-rc.1.
20:34 <Ilyes512> https://github.com/elixir-lang/elixir/blob/v1.4/CHANGELOG.md
20:38 jkreeftmeijer joined
20:39 <Ilyes512> btw the reason I need a queue is because I need to make multiple calls to external api's that is ratelimited. Do I really need a queue for this hmm?
20:39 <Ilyes512> multiple calls per item*
20:39 <Ilyes512> job*
20:40 <benwilson512> if you need to do multiple calls within a single job I'd just use a rate limiting library
20:40 <benwilson512> no point in queueing
20:41 <Ilyes512> but my problem is that it wont be persistant. I am not going to have 100% uptime (i will strive for it but probably wont)
20:42 griffinbyatt joined
20:42 <benwilson512> not sure I understand
20:42 <benwilson512> you'd enqueue the jobs
20:42 <benwilson512> in a persisted way
20:42 <benwilson512> but if you need to limit how much a given job while running hits an external API
20:43 <Ilyes512> well you said rate limiting library but you mean in combination with a (persistant) queue
20:43 <benwilson512> right yea
20:43 Siyo joined
20:43 Siyo joined
20:43 <Ilyes512> ah ok
20:44 laut joined
20:47 ejpcmac left
20:48 notdaniel joined
20:58 justelex joined
21:03 ur5us joined
21:08 notdaniel joined
21:13 Siyo joined
21:13 Siyo joined
21:17 maxbeizer joined
21:22 codestorm joined
21:24 justelex joined
21:32 PaReeOhNos joined
21:36 ssswitch joined
21:39 fantomik joined
21:43 griffinbyatt joined
21:49 jcspencer joined
21:57 pufuddled joined
22:01 rickyhan joined
22:16 codestorm joined
22:18 Ilyes512 joined
22:36 MarioBranco joined
22:40 jkreeftmeijer joined
22:44 griffinbyatt joined
22:44 refriedchicken joined
22:47 Cohedrin joined
22:50 PaReeOhNos joined
22:56 griffinbyatt joined
22:58 srxa_ joined
23:07 josevalim_ joined
23:11 codestorm joined
23:15 wpcarro joined
23:37 hashpuppy joined
23:40 srxa joined
23:43 wpcarro joined
23:47 m00dy joined
23:50 jcspencer joined
23:51 __charly__ joined
23:52 codestorm7 joined
23:53 jleon joined
23:55 isubasti joined