<    April 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
00:01 brohith joined
00:09 jkreeftmeijer joined
00:12 meandi_2 joined
00:17 rschmukler joined
00:20 brohith joined
00:24 icapurro joined
00:28 rozap joined
00:34 larshesel joined
00:36 mhutter joined
00:41 codestorm joined
00:41 Cohedrin joined
00:48 steffkes joined
00:48 steffkes joined
01:00 nighty-- joined
01:00 codestorm joined
01:04 duane joined
01:05 brohith joined
01:09 jkreeftmeijer joined
01:11 nahtnam joined
01:12 <cmk_zzz> I'm trying to use phoenix 1.3 (https://github.com/phoenixframework/archives/raw/master/phx_new.ez of today). $ mix phx.new play $ cd play $ mix phx.gen.html Accounts User users name:string $ mix test -> This fails with lib/play/web/controllers/user_controller.ex:21: undefined function user_path/3
01:12 <cmk_zzz> seems to me all is not well with the generators?
01:13 <cmk_zzz> or am I using the wrong version?
01:14 <laut> @cmk_zzz Did the generator tell you to add something to routes.ex ?
01:14 m1dnight_ joined
01:15 Sentreen left
01:17 <cmk_zzz> laut: it sure did. But I ignored that
01:17 <cmk_zzz> now I am getting further
01:18 <laut> cool, I thought it might be that
01:18 <cmk_zzz> pretty obscure. I've tried searching for the _path function every where. I couldn't quite find where it was generated. I see that the resources macro probably does that
01:24 <laut> @cmk_zzz so did you add it to routes, and did it work?
01:24 <cmk_zzz> laut: Anything else that needs to be done? I run into a runtime error: function UserController.init/1 is undefined (module UserController is not available)
01:24 <cmk_zzz> laut: yes, when I added it to routes.ex it compiles but ^
01:25 duane joined
01:25 <laut> maybe you need to specify to full name
01:25 <laut> e.g. AppName.UserController
01:26 <cmk_zzz> laut: yes
01:26 <cmk_zzz> I was blindly copy and pasting what the generator told me. Using full name gets me further :)
01:27 <cmk_zzz> still more errors though
01:27 <cmk_zzz> flash not fetched, call fetch_flash/2
01:28 <cmk_zzz> I know I should probably try to understand the error here before asking.
01:30 <chrismccord> cmk_zzz : the generator said to add it to your ":browser scope". Did you add it there?
01:31 <chrismccord> or did you add it as a root-level route outside of a scope?
01:31 <chrismccord> you need to place the `resources "/users", UserController` inside the `scope "/", MyApp, do pipe_through :browser ....`
01:32 <chrismccord> if you place it outside there, or in a different scope, you need to give it the alias
01:33 <cmk_zzz> chrismccord: yes, I failed again. I put it in the wrong place.
01:34 <cmk_zzz> everything is working now (except my reading skills)
01:39 tomterl joined
01:41 akeating joined
01:43 Ioyrie joined
01:47 Cohedrin joined
02:01 nii236 joined
02:09 brohith joined
02:17 sfbw joined
02:23 r00tl3ss joined
02:33 webdev007 joined
02:50 steffkes joined
02:52 rschmukler joined
02:53 wong2 joined
03:01 <Radar> I'm running an event importer which hits the database a lot for the same kind of record (a question with a "survey_id" and a "uuid" field). I was thinking to store these in Elixir processes to speed up lookups, but I don't want these processes hanging around for too long after they're last used. Is there a way to kill / automatically "expire" these processes?
03:05 <Radar> This might be a classic case of Doing It Wrong™
03:05 duane joined
03:06 r00tl3ss joined
03:10 <cmk_zzz> Radar: For these thing I generally use ets as a cache. The entry has an expiry field. All writes go through a gen_server (for serialization), all reads directly to ets. The gen_server periodically iterates the entire ets table and removes expired entries. You can use processes as well. If not too many you can use one process per key and simply have a timeout in the process after which you kill the process (This is implemented in Erlang and OTP in act
03:10 <Radar> cmk_zzz: Oh neat :) I will have to take a look at that,.
03:10 jkreeftmeijer joined
03:12 <cmk_zzz> Radar: Doing it in processes is a good example of using lots of components of OTP (supervisors, gen_servers, simple_one_for_one process, lookup-registry)
03:17 duane joined
03:19 milmazz joined
03:20 <brohith> bitwalker: Sorry for responding late but I get errors saying "duplicate_modules" when I override poison encoders and compile with exrm
03:24 r00tl3ss joined
03:42 chrismccord joined
03:46 rschmukler joined
04:12 jkreeftmeijer joined
04:37 sfbw joined
04:48 gvaughn joined
04:50 steffkes joined
04:50 steffkes joined
05:11 craigp joined
05:19 whharris joined
05:29 nolan330 joined
05:32 <nolan330> hey guys, if two maps are expected to have a large percentage of their keys in common, is the most efficient way to merge them via Maps.merge? or is it worth using Maps.keys |> MapSet.new or something
05:34 rschmukler joined
05:37 sfbw joined
05:38 icanhazbroccoli joined
05:38 r00tl3ss joined
05:38 mhutter joined
05:40 Cohedrin joined
05:44 steffkes joined
05:47 jimmyrcom joined
05:55 cemilowski joined
05:55 Cohedri__ joined
06:04 cemilowski joined
06:11 <whodidthis> how does the load_from_system_env thingie work? im trying to `MIX_ENV=prod mix phoenix.server` with no port defined and no error is thrown. Even if I do PORT=4000 it does not appear to use it and i have no idea what port the app is using :thinking:
06:13 jkreeftmeijer joined
06:15 vmoravec joined
06:15 jkreeftmeijer joined
06:16 jkreeftm_ joined
06:18 voltone joined
06:20 <whodidthis> oh right, using 1.3 template with 1.2 is bad :see_no_evil:
06:24 josevalim joined
06:24 Cohedrin joined
06:29 rschmukler joined
06:36 gvaughn joined
06:38 sfbw joined
06:40 tuacker joined
06:42 colrack joined
06:48 wsieroci joined
06:48 PaReeOhNos joined
06:50 duane joined
06:51 gokr joined
06:53 mhutter joined
06:57 mhutter` joined
07:00 sfbw joined
07:00 PaReeOhNos joined
07:06 jkreeftmeijer joined
07:08 jkreeftm_ joined
07:10 josevalim joined
07:10 jkreeftmeijer joined
07:17 bigkevmcd joined
07:17 milad joined
07:17 imack joined
07:18 milad joined
07:26 Cohedrin joined
07:27 jkreeftm_ joined
07:27 milad joined
07:29 dastagg joined
07:29 hbraun joined
07:30 mark_66 joined
07:33 ZippoWeb joined
07:40 nd___ joined
07:41 marr joined
07:42 asabil joined
07:43 stephen_m joined
07:44 jeznet2 joined
07:45 steffkes joined
07:45 steffkes joined
07:49 asabil joined
07:52 Guest67 joined
07:53 craigp joined
07:55 codestorm joined
07:59 Ayey_ joined
07:59 mhutter joined
07:59 mhutter` joined
08:01 sfbw joined
08:09 steffkes joined
08:09 steffkes joined
08:11 akeating joined
08:12 cemilowski joined
08:12 Ayey_ joined
08:16 ctp joined
08:16 sevenseacat joined
08:17 mhutter joined
08:17 rschmukler joined
08:18 wsieroci joined
08:25 gvaughn joined
08:28 steffkes joined
08:28 steffkes joined
08:29 mattyw joined
08:38 duane joined
08:40 marr joined
08:40 hbraun joined
08:46 ivan_ joined
08:51 josevalim joined
08:56 jkreeftmeijer joined
08:58 mhutter joined
09:01 lexmag joined
09:03 sfbw joined
09:05 jkreeftm_ joined
09:09 <whodidthis> how can i give env variables to distillery-built release? something like `DB_USER=myuser myapp/bin/myapp console`
09:12 rschmukler joined
09:18 <whodidthis> ook just realized how it works
09:19 mhutter joined
09:24 mhutter` joined
09:24 arquebus joined
09:33 <m1dnight_> hey guys, when I tryu to spawn an iex session with *name* (not sname) it crashes on my linux server
09:34 <m1dnight_> Im guessing it can not resolve my hostname or something? (it works fine on osx)
09:34 <m1dnight_> what exactly should I check to see if it can resolve its own hostname?
09:35 <m1dnight_> so when I run it on my server it shows me hostname.vub.ac.be (which is the domain for my university)
09:35 <m1dnight_> but on the server it crashes with this error:
09:36 <m1dnight_> http://termbin.com/0f44
09:40 cemilowski joined
09:44 codestorm joined
09:46 charleso joined
10:02 gokr joined
10:02 jkreeftmeijer joined
10:06 codestorm joined
10:07 Ayey_ joined
10:08 ZippoWeb joined
10:14 gvaughn joined
10:14 dimitarvp joined
10:14 rschmukler joined
10:18 Antiarc joined
10:25 rschmukler joined
10:25 robinsjdotcom joined
10:26 duane joined
10:29 gmcabrita joined
10:33 <OliverMT> anyone got a theory why our genserver wont restart after a Task.async_stream times out and crashes it?
10:38 rschmukler joined
10:39 jkreeftmeijer joined
10:39 ctp joined
10:40 codestorm joined
10:44 jkreeftm_ joined
10:45 inoas joined
10:48 kansi joined
10:51 <* kansi> says hi
10:52 <kansi> i am trying to use elixometer/exometer to gather stats and send them to influxdb
10:53 <kansi> i keep getting the following error ` InfluxDB reporter got trouble when looking [:erlang, :memory] metric's tag: :not_found`
10:54 <kansi> btw this is my subscribers config `{:exometer_report_influxdb, [:erlang, :memory], :total , 1_000, true}`
10:55 <kansi> the error is coming from here https://github.com/travelping/exometer_influxdb/blob/master/src/exometer_report_influxdb.erl#L134
10:55 <kansi> but i don't understand where to add tags so that it can find the same
10:56 <ivan_> TIL you have to pass ecto |> select([m, t, c, u] variables in the same order as the joins (??)
11:00 <ivan_> I thought they would be filled in by variable name or something
11:04 sfbw joined
11:11 voltone joined
11:11 pcre joined
11:15 MarioBranco joined
11:17 robinsjdotcom joined
11:20 Srdjab joined
11:21 voltone joined
11:22 <ljarvis> can anyone recommend an xml parsing library? seems like there's quite a few, most wrap erlsom or xmerl. Wondering if there's any suggestions from experience
11:22 jkreeftmeijer joined
11:25 jkreeftm_ joined
11:27 craigp joined
11:27 hbraun joined
11:28 jkreeftmeijer joined
11:29 beatpanic joined
11:29 povilas joined
11:30 Xikeon joined
11:30 jkreeftm_ joined
11:32 milad joined
11:34 codestorm joined
11:35 <m1dnight_> I keep getting timeouts when I want to start a slave with inet bootloaders
11:35 <m1dnight_> I can ssh from one machine to another, ping eachother and the hostnames all resolve to proper ips
11:35 <m1dnight_> can anyone give me some pointers on troubleshooting this
11:35 <m1dnight_> ?*
11:35 Siyfion joined
11:40 mhutter joined
11:40 jkreeftmeijer joined
11:43 mpsag joined
11:44 bturnbull joined
11:46 NeverDie_ joined
11:47 sfbw joined
11:51 <benwilson512> ljarvis: sweet_xml has a nice API
11:52 wong2 joined
11:52 cemilowski joined
11:53 NeverDie joined
11:54 akeating joined
11:55 ZippoWeb joined
11:57 akeating_ joined
11:58 jkreeftm_ joined
12:00 MarioBranco joined
12:00 watersoul joined
12:02 gvaughn joined
12:03 MarioBranco joined
12:05 watersoul joined
12:10 watersoul joined
12:12 cristianR_ joined
12:12 sfbw joined
12:15 aribao joined
12:15 watersoul joined
12:16 ZippoWeb joined
12:18 ZippoWeb joined
12:20 duane joined
12:20 watersoul joined
12:21 sfbw joined
12:24 mika__ joined
12:25 ZippoWeb joined
12:25 watersoul joined
12:27 <m1dnight_> hey guys, if I want to pass an ip to :slave.start, what format does it need to have?
12:27 <m1dnight_> I have tried :"10.0.0.1", "10.0.0.1", {10,0,0,1}
12:27 <m1dnight_> but none of them work.
12:27 <m1dnight_> I know in Erlang it should be of the form "10.0.0.1"
12:29 codestorm joined
12:29 <OliverMT> benwilson512: allright, I think I need to go watch that video of your presentation now
12:29 <OliverMT> or... is that the one with the really crappy audio?
12:32 d10n-work joined
12:40 gazler joined
12:46 akeating joined
12:47 pbogut joined
12:55 steffkes joined
12:55 steffkes joined
12:56 akeating joined
13:04 nighty-- joined
13:19 <asonge> m1dnight_: erlang "foo" is elixir 'foo' (erlang strings are known as character lists in elixir)
13:22 codestorm joined
13:23 cdg joined
13:24 jimmyrcom joined
13:26 jkreeftmeijer joined
13:27 <m1dnight_> okay, gotcha
13:27 <m1dnight_> thanks
13:27 <m1dnight_> Im still fighting with these damn slaves
13:28 <m1dnight_> epmd: Thu Apr 20 15:19:45 2017: ** sent PORT2_RESP (error) for "slave"
13:28 <m1dnight_> This does mean that the request is not sent, right?
13:28 <m1dnight_> If I'm not mistaken the (error) should be(ok)?
13:29 jadlr joined
13:36 <barttenbrinke> Hey, I've got a weird issue. I'm starting a Supervisor with some children and I pass one of them a callback method.
13:37 <barttenbrinke> When I call the method I get "Module not available"
13:38 JEG2 joined
13:39 smt joined
13:39 <m1dnight_> Are the supervisors on the same machine?
13:39 rschmukler joined
13:41 bturnbull joined
13:42 bpmcd joined
13:42 <barttenbrinke> yes
13:42 <barttenbrinke> It is an Umbrella app
13:43 <barttenbrinke> I can call the method from the commandline and it is passed to the Genserver from the Supervisor, so it "exists"
13:44 <barttenbrinke> worker(Cortex.Nucleus.HealthCheck, [&Cortex.Endpoint.broadcast_health_change_callback/2]),
13:44 <barttenbrinke>
13:44 jkreeftmeijer joined
13:47 Gasher joined
13:47 <barttenbrinke> Hmm, do I need to call Apply Or should .call work too?
13:48 <asonge> barttenbrinke: how are you calling the function?
13:48 <asonge> (you shouldn't need apply, and there is no ".call", these aren't objects)
13:49 whharris joined
13:49 <barttenbrinke> I was using callback.(args)
13:50 <barttenbrinke> I am now testing apply(callback, args)
13:51 hbraun joined
13:53 akeating joined
13:55 <barttenbrinke> The testrun is about 10 mins :(
13:58 icapurro joined
14:01 <asonge> you know you can run a specific test file and then run only the tests under a line of code in that file, right?
14:03 chrismccord joined
14:03 <barttenbrinke> asonge: Yeah, but that doesn't trigger the error :)
14:06 mhutter joined
14:06 maxbeizer joined
14:07 cemilowski joined
14:14 meh` joined
14:14 jkreeftm_ joined
14:15 jkreeftmeijer joined
14:16 pesnk joined
14:17 codestorm joined
14:17 cevado joined
14:18 <ljarvis> benwilson512: thanks, sweet_xml looks decent and it seems like a great example of how easy it is to just directly wrap xmerl
14:24 akeating joined
14:25 wsieroci joined
14:26 <asonge> heh, "how easy it is to just directly wrap xmerl"
14:26 <asonge> xmerl is..."fun".
14:26 <m1dnight_> I've got it working for some reason. I don't know why though :')
14:28 <ljarvis> asonge: I guess I haven't yet had enough exposure to have an opinion yet. You don't like it?
14:37 truami joined
14:38 josevalim joined
14:40 sid_fules joined
14:42 meh` joined
14:42 oestrich joined
14:45 harfangk joined
14:45 brohith joined
14:50 sid_fules joined
14:53 mozzarella joined
14:54 rschmukler joined
14:57 maxbeizer joined
14:57 <ljarvis> except.. wow it's slow compared to erlsom
14:59 junsuiji1 joined
15:01 robinsjdotcom joined
15:03 rschmukler joined
15:05 <asonge> ljarvis: "don't like" is such a weird concept when you've worked with something complicated that you don't want to even try to replace and you can respect the work but still be frustrated with just about...everything.
15:09 brohith joined
15:09 <ljarvis> interesting
15:10 Ayey_ joined
15:10 hxegon joined
15:11 <ljarvis> I guess it might be a while until there's a pure Elixir XML parsing library :)
15:12 robinsjdotcom joined
15:14 whharris joined
15:16 jkreeftmeijer joined
15:21 ramortegui joined
15:21 bturnbull joined
15:21 tuacker joined
15:29 <Guest67> Hi
15:29 <Guest67> We are trying to implement https://tus.io/protocols/resumable-upload.html
15:29 <Guest67> Whit phoenix
15:30 <Guest67> But we found phoenix router seems it doesn't support HEAD method
15:31 <Nicd-> it should? https://hexdocs.pm/phoenix/Phoenix.Router.html#head/4
15:31 <Guest67> GET and HEAD methods are pretty similar
15:31 <Nicd-> it even supports arbitrary HTTP verbs
15:32 <Guest67> but very convinient implementing this protocol
15:32 <Guest67> Ummm
15:33 <Guest67> Well it seems it take HEAD as GET
15:33 <Guest67> get "/umedia/:uuid", UppyArc, :head
15:33 <Guest67> this route works
15:33 <Guest67> when browser sends a HEAD method
15:33 <Guest67> head "/umedia/:uuid", UppyArc, :head
15:34 <Guest67> [info] HEAD /pharc/umedia/521847164_b1d9ca7b-056d-46e6-94a4-cb742e1e9244
15:34 <Guest67> [debug] ** (Phoenix.Router.NoRouteError) no route found for GET /pharc/umedia/521847164_b1d9ca7b-056d-46e6-94a4-cb742e1e9244 (Rumbl.Router)
15:35 <Nicd-> can you gist your whole router and the controller?
15:35 <Guest67> Sure, in a minute
15:36 <Guest67> is a test project prtty messy, but public
15:38 rodolfojcj joined
15:39 <Guest67> https://github.com/taorg/rumbl/blob/develop/web/router.ex
15:39 <Guest67> https://github.com/taorg/rumbl/blob/develop/web/controllers/uppy_controler.ex
15:39 whharris joined
15:41 codestorm joined
15:41 codestorm joined
15:43 <Nicd-> are you sure that output is just from the HEAD request? how do you send it?
15:43 <Nicd-> btw your app is vulnerable to path traversal attacks and you're using _params a bit funnily
15:44 jkreeftmeijer joined
15:44 <Guest67> yea, is a test prj to later integrate
15:44 <Guest67> just testing
15:45 <Nicd-> also I don't think a HEAD request can return content? (the "OK")
15:45 <Guest67> head method is send by a js client
15:45 <Nicd-> or rather it's not allowed
15:46 <Guest67> HEAD does not have content
15:46 <Guest67> yes
15:46 <Guest67> https://uppy.io/examples/dashboard/
15:46 <Guest67> I know
15:46 chrismccord joined
15:47 <Guest67> But what fails is router
15:48 <Guest67> it doesnt take HEAD
15:48 robinsjdotcom joined
15:51 <Nicd-> sorry, I don't have any idea :/
15:54 whharris_ joined
15:56 <Guest67> Thx a lot anyway
15:56 <Guest67> It's weird nobody complains before about it
15:56 <Nicd-> let me test
15:57 <Guest67> Sure
15:57 <Guest67> Please
15:57 <Guest67> :)
15:58 davidw joined
16:02 ejpcmac joined
16:06 amclain joined
16:09 <Nicd-> aha
16:09 <Nicd-> !
16:09 <Nicd-> it's this: https://hexdocs.pm/plug/Plug.Head.html
16:09 <Nicd-> you have Plug.Head most likely in your endpoint configuration
16:12 pesnk joined
16:16 rschmukler joined
16:16 cevado joined
16:17 <Guest67> :)
16:17 steffkes joined
16:17 <Guest67> Great
16:17 <Guest67> Thanx a lot
16:18 ejpcmac joined
16:18 toastytheog joined
16:19 <Guest67> Thak you Nicd-
16:19 <Guest67> XD
16:19 <Nicd-> np :)
16:21 <Guest67> https://github.com/phoenixframework/phoenix/issues/347
16:21 <Guest67> Bit strange, anyway Ill test it right now
16:21 <Nicd-> it's default because I think most don't need to deal with HEAD requests
16:22 <Guest67> Yea HEAD is not a very common method
16:23 duane_ joined
16:24 <targaf> I'm building a phoenix app that is used to launch "jobs" on the server which usually consist of passing parameters to a jar. I'm planning to use a separate module and genserver to spin off System.cmd calls. Does anyone see anything in that plan that they would recommend against?
16:26 mika__ joined
16:29 arquebus joined
16:31 <OliverMT> will jobs run concurrently?
16:32 <OliverMT> just make sure your exec wont bring down the genserver if something goes boo boo
16:34 ZippoWeb joined
16:34 <whodidthis> what does "enif_send: called from non-scheduler thread on non-SMP VM, Aborted" mean, am i missing something
16:34 nbg joined
16:36 barg joined
16:41 <whodidthis> ill try with -smp on
16:44 akeating joined
16:46 codestorm joined
16:48 jeffweiss joined
16:49 akeating joined
16:50 gvaughn joined
16:50 akeating joined
16:50 dimitarvp joined
16:53 greengriminal joined
16:56 MaSven joined
16:56 jkreeftmeijer joined
16:59 meandi joined
16:59 rozap joined
17:06 chrismccord joined
17:07 mika__ joined
17:07 Ayey_ joined
17:27 sid_fules joined
17:30 Cohedrin joined
17:37 pesnk joined
17:37 sid_fules joined
17:41 akeating joined
17:42 ejpcmac1 joined
17:42 imack joined
17:49 elgenie joined
17:54 nd___ joined
17:57 sid_fules joined
17:57 meandi joined
17:58 squallstter joined
17:59 cemilowski joined
17:59 vaultin joined
18:00 loocash joined
18:00 <loocash> Hi, what's the easiest way to upgrade elixir from version 1.3.3 to 1.4?
18:01 <loocash> on ubuntu
18:01 <OliverMT> either use asdf
18:01 <OliverMT> or erlang solutions (if their 1.4 is out yet)
18:01 <Guest67> https://www.erlang-solutions.com/resources/download.html
18:02 <Guest67> I used this and works great
18:02 <Guest67> elixir -v
18:02 <Guest67> Erlang/OTP 19 [erts-8.3] [source-d5c06c6] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
18:02 <Guest67> Elixir 1.4.1
18:03 <Guest67> cat /etc/debian_version
18:03 <Guest67> stretch/sid
18:03 craigp joined
18:03 <Nicd-> I build from source :P
18:03 <Guest67> :)
18:03 <loocash> Thanks guys
18:12 Gouda joined
18:12 <Gouda> Hey folks o/
18:13 <Nicd-> hello Gouda
18:13 <Nicd-> are you cheese?
18:13 <Gouda> :x Maybe
18:13 <Nicd-> sentient cheese, hmm
18:14 <whodidthis> what's the final answer on how do i get [smp:4:4] happening when running my distillery release
18:14 whharris joined
18:15 <Gouda> So I'm looking at this code sample from Dave Thomas' talk Transforming Programming, and I really want to implement it on my own as I am learning Elixir, but I'm stuck.
18:15 <whodidthis> something like `PLEASE_START_SMP=yes sh my_release.run console`
18:16 bigkevmcd joined
18:20 steffkes joined
18:20 steffkes joined
18:27 rschmukler joined
18:29 <Gouda> Would anyone be able to help me with that?
18:32 <benwilson512> Gouda: just post the code
18:32 <benwilson512> using gist or pastebin
18:37 <Gouda> https://gist.github.com/jaredmanning/cb0dc86c8d2f63a1414c4a1ca75743c2 I got this from the slide, but I'm not sure where to implement the last part that is outside of the module. I have a separate Lights module that seems to work fine when poking at it in iex.
18:38 m_m_ joined
18:39 <benwilson512> what is this supposed to do?
18:39 <benwilson512> is this for nerves?
18:39 refriedchicken joined
18:40 gem joined
18:41 <Gouda> it's a model of a keypad lock on a door, and given the correct code 1-3-1 it will unlock the door and turn the Light green. According to Dave Thomas, the last line of the bit that's outside of the module is the whole state machine of the program. The talk can be seen here https://www.youtube.com/watch?v=A76hM3MpEKo
18:41 <benwilson512> hm
18:41 hbraun joined
18:43 <Gouda> I don't know if I'm supposed to have the :stdio and on part in a separate module, or if that's something I should put into iex, or what. I'm still learning ':)
18:43 <benwilson512> ah hm yeah without having seen the talk it's a bit hard to advise
18:43 <benwilson512> does dave have the code up in his github maybe?
18:44 <Gouda> I've looked but can't find it anywhere.
18:44 <Gouda> Let me double check
18:44 targaf joined
18:45 sid_fules joined
18:46 powelljf3 joined
18:50 MotherFlojo joined
18:52 meandi joined
18:53 sid_fules joined
18:56 smt_ joined
18:58 jkreeftmeijer joined
19:00 cevado joined
19:03 <vaultin> i think this should do it: https://gist.github.com/Vaultin/4dfbe7dcc06c0a67bae36a5b61fe27b3
19:04 <vaultin> also still learning, so no guarantee
19:06 Gouda joined
19:08 Ayey_ joined
19:11 elgenie joined
19:11 targaf joined
19:11 vaultin_ joined
19:13 sid_fules joined
19:15 suck joined
19:15 targaf joined
19:18 laut joined
19:19 vaultin joined
19:19 blow_ joined
19:20 cevado joined
19:21 rschmukler joined
19:23 Ayey_ joined
19:28 <Ilyes512> is it possible to change the config on runtime?
19:29 <Ilyes512> ie from inside a module in the lib folder
19:30 drincruz joined
19:30 ramortegui joined
19:31 rschmukler joined
19:31 <benwilson512> yes
19:31 <benwilson512> Application.put_env(:my_app, :some_key, some_value)
19:32 NeverDie_ joined
19:32 <Ilyes512> ow i thought that would change the env and that config is something seperate that loads from config once when the app loads. I will try it out :)
19:33 mika__ joined
19:33 <benwilson512> er
19:34 <benwilson512> sorry that is correct
19:34 <benwilson512> all that will do is change the config while the app is running
19:34 <benwilson512> if you stop the app
19:34 <benwilson512> and then start it again
19:34 <benwilson512> it'll load the original config
19:35 targaf joined
19:35 inoas joined
19:37 <Ilyes512> i do want a non permanent. I want to set bcrypt to a lower round when I use the seeder module. so it should be temp. I will try it out after eating something :p
19:38 brohith joined
19:39 brohith joined
19:40 <brohith> bitwalker ping
19:41 thewoolleyman joined
19:41 <brohith> does anyone have tips on how to go about overriding Poison's DateTime and NaiveDateTime encoders?
19:42 <brohith> I need to format the date to ISO extended for an API requirement
19:44 Ayey_ joined
19:44 vmoravec joined
19:46 sid_fules joined
19:47 asabil joined
19:49 vaultin joined
19:50 <Ankhers> brohith: Can you not just re-implement Poison.Encoder for those types?
19:55 maxbeizer joined
19:57 meandi joined
19:57 wsieroci joined
19:58 sid_fules joined
19:59 <Exagone313> Hi, why would you recommend me to start to make a small HTTP server (that would run behind nginx) as an Elixir beginner? I don't know if I start to look at Phoenix or if I begin without a framework (this is for testing purpose, not a full project, and I prefer to start from a lower level than a framework to understand more how something is made). Thanks for your help.
19:59 maxbeizer_ joined
20:00 PaReeOhNos joined
20:01 jkreeftmeijer joined
20:03 <chrismccord> Exagone313 if you want to start lower level, knock yourself out
20:04 <chrismccord> you can use cowboy directly (http server), unless you meant implementing an actual http server yourself
20:05 <Exagone313> no, I prefer to use a library, not dealing with sockets
20:05 <Exagone313> ok, I'll one of the HTTP server library
20:06 <Exagone313> use*
20:06 <ultra|lazer> I think Phoenix is pretty newbie friendly
20:06 <ultra|lazer> There's a decent course on udemy about elixir+phoenix
20:06 <Ioyrie> Exagone313: cowboy and plug is probably all you want to play with
20:06 <Exagone313> I will buy the book about Phoenix, but later
20:11 <ultra|lazer> https://www.udemy.com/the-complete-elixir-and-phoenix-bootcamp-and-tutorial/
20:11 <ultra|lazer> Good intro
20:12 hahuang65 joined
20:12 jkreeftmeijer joined
20:13 codestorm joined
20:15 whharris joined
20:16 vaultin joined
20:16 <Exagone313> at that price I prefer to buy an ebook at pragprog
20:17 <ultra|lazer> I got it for 5 dollars, it's udemy, everything is always on sale
20:20 elgenie joined
20:20 <ultra|lazer> ¯\_(ツ)_/¯
20:21 steffkes joined
20:23 <brohith> Ankhers: That's what I'm currently doing but then I can't create a release. exrm and distillery both spit out a "Duplicate Modules" error
20:23 jkreeftmeijer joined
20:23 Jonwel joined
20:24 icecreamcohen joined
20:25 <Ankhers> brohith: I just did with within iex and it only appears to be a warning for me.
20:25 <Ankhers> Could be different for a release though. Do you have the flag that turns warnings into errors enabled?
20:27 whharris joined
20:30 <brohith> yeah it's different for release
20:30 sid_fules joined
20:30 <brohith> I do not have the flag that turns warnings into errors enabled
20:31 <brohith> I really don't want to fork Poisons lol
20:32 ejpcmac1 left
20:34 jkreeftmeijer joined
20:35 vaultin joined
20:35 Cohedrin joined
20:42 Gouda joined
20:45 jkreeftmeijer joined
20:52 gem joined
20:54 douglascorrea joined
20:56 jkreeftmeijer joined
20:56 codestorm joined
21:00 sid_fules joined
21:01 nd___ joined
21:02 jkreeftmeijer joined
21:09 sfbw joined
21:09 smferris joined
21:12 ZippoWeb joined
21:13 jkreeftmeijer joined
21:15 Ilyes512 joined
21:17 nolan330 joined
21:21 <nolan330> hey everyone! have a question about maps--if I expect two maps to have many overlapping keys, is it best to just Map.merge, or first Map.split, then Map.merge with the remainder?
21:21 sid_fules joined
21:21 brohith joined
21:23 jkreeftmeijer joined
21:24 <ljarvis> nolan330: do you want the second map to replace any duplicate keys in the first one?
21:26 <nolan330> its fine if they do replace the keys in the first, but from reading the docs it seems like that would be a lot of copying--I expect that if an object has the same key in both maps, the value is the same
21:26 <nolan330> it is a strange case where the maps are expected to be the same or mostly similar, but may have diverged
21:27 <nolan330> and was wondering if it would make a big difference to handle it specially given that heuristic
21:28 whharris joined
21:29 ikcerog joined
21:29 <nolan330> cant seem to find the right spot in the erlang code where maps.merge is implemented
21:31 dastagg joined
21:31 <nolan330> oh, think i found it
21:34 jkreeftmeijer joined
21:36 strykerkkd joined
21:42 RexM joined
21:42 <nolan330> anyone have any ideas? It's seeming like Maps.split is O(n) and happens in one pass, but cant really decipher whats happening in the merge bif
21:44 asabil joined
21:44 jkreeftmeijer joined
21:46 lexmag_ joined
21:46 codestorm joined
21:46 robinsjdotcom joined
21:46 codestorm joined
21:48 sid_fules joined
21:49 jkreeftmeijer joined
21:49 jkreeftmeijer joined
21:49 toastytheog joined
21:50 jkreeftmeijer joined
21:51 jkreeftmeijer joined
21:51 jkreeftmeijer joined
21:52 jkreeftmeijer joined
21:53 jkreeftmeijer joined
22:00 Ayey_ joined
22:01 <asonge> nolan330: i don't think there's a defined or expected complexity for map merges
22:02 <asonge> nolan330: though i can join the hunt with you for a few minutes.
22:02 <asonge> i've been enjoying reading erlang source a lot lately.
22:03 <nolan330> yeah, ive been having some fun
22:03 <nolan330> learning about it
22:03 sid_fules joined
22:03 <nolan330> going to put a question up on SO and try to reason about it. let me know if you guys find, discover, learn anything interesting
22:04 <nolan330> will post a link to the question when I post it
22:04 junsuijin joined
22:04 <asonge> nolan330: i'm betting it's not documented because it's not yet optimized, so there's no promises.
22:04 <nolan330> i see i see
22:05 wsieroci_ joined
22:05 <nolan330> it definitely won't be a huge difference at the scale im working at. but it sparked curiosity
22:05 <nolan330> and now i just want to know
22:05 duane joined
22:05 <asonge> nolan330: it's in here, though: https://github.com/erlang/otp/blob/3202e753383d495bce8008721e94428788d4f400/erts/emulator/beam/erl_map.c
22:05 <nolan330> yeah have been looking at that
22:06 <asonge> looking at hashmap_merge now, that's going to be for the larger maps
22:06 <nolan330> theres just a lot there, haha
22:06 <nolan330> right
22:06 <nolan330> the main question is whether or not the scan to find the difference is worth skipping overwriting the identical entries
22:08 <asonge> what you mean?
22:08 <asonge> oh, deep equality to avoid the merge
22:08 robinsjdotcom joined
22:09 sfbw joined
22:10 <asonge> nolan330: https://github.com/erlang/otp/blob/3202e753383d495bce8008721e94428788d4f400/erts/emulator/beam/erl_map.c#L1322-L1325 that comment seems relevant?
22:11 <nolan330> yeah that section is totally relevant
22:11 <nolan330> so i think it does compare nodes of the tree before merging
22:11 <nolan330> at least it looks like it per https://github.com/erlang/otp/blob/3202e753383d495bce8008721e94428788d4f400/erts/emulator/beam/erl_map.c#L1274
22:13 <asonge> yeah, and i found sp->mix denotes if the subtrees are identical, or A has only unique, or B has only unique, or both sides have unique
22:13 <nolan330> it *feels* like maps does the right thing for merges, and avoids copying
22:13 <asonge> well, i don't think it's going to copy the value ever.
22:13 <nolan330> without first needing to split
22:13 <nolan330> or rather overwrite it unnecessarily
22:13 <asonge> it might have to reconstruct the tree
22:14 <asonge> but the value will never be copied. it's keeping one of them (or the other)
22:14 <nolan330> ok, thats good.
22:14 <nolan330> i think ill just go ahead with a simple Maps.merge
22:14 <asonge> iirc, all erlang terms are pointers into the heap
22:15 <asonge> even shared binaries, which are a pointer into the heap, and that value contains a pointer to the shared binary heap
22:15 <nolan330> yeah, i think im just having trouble reading it meaningfully between the c code and the implications of the dereferencing in beam
22:15 icecreamcohen joined
22:15 <nolan330> apologies for the silly questions--new to reading bifs
22:16 <asonge> np
22:16 <asonge> but basically, unless you send a message (or store something in ets or something), the erlang terms don't get copied
22:17 <nolan330> beautiful
22:17 <nolan330> then i think its 100% the right call to just Maps.merge
22:17 <nolan330> which is how one might hope it works, so thats good
22:18 <asonge> (i could be wrong about this, but like, i'm 95% sure)
22:18 Ayey_ joined
22:18 <nolan330> im good with that interval. thanks so much for your help
22:18 pranz1 joined
22:19 m_m joined
22:20 PaReeOhNos joined
22:21 duane joined
22:22 steffkes joined
22:26 jkreeftmeijer joined
22:27 Ilyes512 joined
22:32 whharris joined
22:32 jkreeftmeijer joined
22:33 sid_fules joined
22:35 rozap joined
22:39 josevalim joined
22:44 Cohedrin joined
22:44 jkreeftmeijer joined
22:45 steffkes joined
22:46 davidkuhta joined
22:50 jkreeftmeijer joined
22:52 robinsjdotcom joined
22:53 codestorm joined
22:55 Guest38642 joined
23:01 hahuang65 joined
23:01 sid_fules joined
23:01 codestorm joined
23:01 jkreeftmeijer joined
23:06 Cohedrin joined
23:06 elgenie joined
23:08 maxbeizer joined
23:10 sfbw joined
23:12 jkreeftmeijer joined
23:15 rozap joined
23:16 lexmag_ joined
23:19 refriedchicken joined
23:22 jkreeftmeijer joined
23:23 RexM joined
23:29 siel_ joined
23:31 maxbeizer joined
23:32 sid_fules joined
23:33 jkreeftmeijer joined
23:35 robinsjdotcom joined
23:38 elgenie joined
23:38 mika__ joined
23:39 toastytheog joined
23:40 icecreamcohen joined
23:41 sfbw joined
23:43 jkreeftmeijer joined
23:48 PaReeOhNos joined
23:53 brohith joined
23:54 jkreeftmeijer joined
23:55 sfbw joined
23:59 rschmukler joined