<    April 2017    >
Su Mo Tu We Th Fr Sa  
 2  3  4  5  6  7  8  
 9 10 11 12 13 14 15  
16 17 18 19 20 21 22  
23 24 25 26 27 28 29  
00:17 samgranieri joined
00:20 griffinbyatt joined
00:28 steffkes joined
00:28 steffkes joined
00:28 Thinh joined
00:30 hahuang61 joined
00:31 msantos joined
00:31 cschneid_ joined
00:32 fowlduck joined
00:37 racycle joined
00:40 nighty-- joined
00:45 bionj joined
01:13 polymetis joined
01:14 harfangk joined
01:20 polymetis joined
01:21 sevenseacat joined
01:32 jkreeftmeijer joined
01:33 fowlduck joined
01:39 tomterl joined
01:49 polymetis joined
01:56 duane joined
02:11 polymetis joined
02:11 proteusguy joined
02:14 duane joined
02:29 steffkes joined
02:31 hahuang61 joined
02:32 nkantar joined
02:34 nkantar left
02:34 fowlduck joined
02:38 junsuiji1 joined
02:41 ludat joined
02:43 wong2 joined
02:54 griffinbyatt joined
02:55 meandi_2 joined
03:13 cschneid_ joined
03:17 jerel joined
03:24 iFire joined
03:25 <ludat> hi everyone, I want to make a websockets server but I don't think I fit into the phoenix model of sockets, what's the most popular websocket lib for plug?
03:33 jkreeftmeijer joined
03:34 griffinbyatt joined
03:35 fowlduck joined
03:38 kblake joined
03:42 nomicflux joined
03:46 ctp joined
03:50 raycoll joined
03:53 <cmk_zzz> ludat: I don't think you need a library for that. WebSockets are easily handled with the underlying cowboy http server. Here is a gist showing it (which I found and haven't tried). https://gist.github.com/alanpeabody/4fae12b420fb50376af4
03:54 <cmk_zzz> cowboy's own documentation may be useful as well but it is in erlang.
03:57 <ludat> cmk_zzz, thanks! I saw that example but I didn't realize cowboy could handle websockets (it seems so obvious now)
04:16 sfbw joined
04:30 steffkes joined
04:30 steffkes joined
04:32 hahuang61 joined
04:34 jkreeftmeijer joined
04:35 fowlduck joined
04:36 ctp joined
04:41 m1nted joined
04:42 peterpp joined
04:47 am55 joined
04:50 milad joined
04:57 raycoll joined
05:00 jmcintosh joined
05:05 dec0n joined
05:09 josevalim joined
05:13 kblake joined
05:16 sfbw joined
05:27 jmcintosh joined
05:28 codestorm joined
05:36 fowlduck joined
05:40 proteusguy joined
05:42 bitshift joined
05:52 gvaughn joined
05:59 duane joined
06:02 JoelMcCracken joined
06:14 vmoravec joined
06:22 codestorm joined
06:24 bionj joined
06:31 steffkes joined
06:33 hahuang61 joined
06:36 jkreeftmeijer joined
06:36 jkreeftmeijer joined
06:37 steffkes joined
06:37 bungoman joined
06:37 fowlduck joined
06:41 franco joined
06:43 tuacker joined
06:44 elixir-lang617 joined
06:48 fantasticsid joined
06:52 gvaughn joined
06:52 franco joined
06:54 bigkevmcd joined
07:03 duane joined
07:05 nd__ joined
07:13 franco joined
07:14 ZippoWeb joined
07:15 m00dy joined
07:16 m00dy joined
07:16 codestorm joined
07:21 cemilowski joined
07:23 jkreeftmeijer joined
07:26 dignifiedquire joined
07:28 mark_66 joined
07:28 milad joined
07:29 truami joined
07:38 gokr joined
07:38 fowlduck joined
07:41 steffkes joined
07:41 dani0_ joined
07:43 asabil joined
07:47 meh` joined
07:48 codestorm joined
07:51 tuacker1 joined
07:56 stephen_m joined
08:03 vmoravec joined
08:04 meh` joined
08:07 mattyw joined
08:07 akeating joined
08:21 dk001 joined
08:22 <dk001> Hi, is there a way to prevent iex/phoenix server from truncating long error messages? It sometimes is impossible to see the stack trace at the bottom.
08:23 flaviodesousa joined
08:27 marr joined
08:30 akeating joined
08:31 PaReeOhNos joined
08:31 ZippoWeb2 joined
08:32 Guest67 joined
08:34 hahuang61 joined
08:36 akeating joined
08:37 pimz joined
08:38 pimz joined
08:39 fowlduck joined
08:39 <stephen_m> dk001 - yes
08:39 flaviodesousa|2 joined
08:39 <stephen_m> in the logger config.... truncate: (4096 * 16),
08:41 <stephen_m> config :logger, truncate: (4096 * 16) <-- number of bytes
08:42 <stephen_m> sorry... i thought you meant the logger....
08:42 <stephen_m> the stacktrace - is a different config
08:42 <stephen_m> getting it now
08:42 codestorm joined
08:43 <stephen_m> `config :phoenix, :stacktrace_depth, 20`
08:48 codestorm joined
08:53 gvaughn joined
09:04 elixir-lang426 joined
09:05 duane joined
09:07 MaSven joined
09:09 dani0_ joined
09:10 akeating joined
09:10 Ven joined
09:12 <smeevil_> o/
09:17 m00dy joined
09:18 akeating joined
09:19 m00dy joined
09:26 m00dy joined
09:30 dani0_ joined
09:38 Ven_ joined
09:39 m00dy joined
09:39 fowlduck joined
09:42 codestorm joined
09:46 bitmod joined
09:46 Ven_ joined
09:49 Guest67 joined
09:50 gmcabrita joined
10:05 steffkes joined
10:05 steffkes joined
10:16 teacup-on-rc joined
10:16 lexmag joined
10:21 squallstter joined
10:27 Ven joined
10:29 asabil joined
10:34 dani0_ joined
10:34 hahuang61 joined
10:36 codestorm joined
10:40 fowlduck joined
10:41 gvaughn joined
10:45 Ven_ joined
10:46 m00dy joined
10:46 cschneid_ joined
10:48 Siyfion joined
10:49 nighty-- joined
10:50 m00dy joined
10:55 m00dy joined
10:57 <antipax> anyone familiar with the `erts_code_purger` process and why it might be killing my ExUnit test processes only when running tests in an umbrella?
10:58 jkreeftmeijer joined
10:59 <antipax> https://www.irccloud.com/pastebin/DycxtDkg/
10:59 <antipax> kinda, uh, weird
11:00 jkreeftmeijer joined
11:00 <antipax> fishcakez: any chance you could take a look at this? maybe you're familiar with the messages/state tuple and know where it could be coming from, I'm totally stuck :(
11:03 cevado joined
11:04 <fishcakez> antipax: if i had to guess the parent of those supervisors is getting killed
11:04 <fishcakez> and that sends a exit signal with reason :killed to the child, which makes the child supervisor exit with reason :killed
11:04 <fishcakez> maybe you have a supervisor set as a worker?
11:05 <fishcakez> or set a non infinity timeout
11:05 <fishcakez> or store an anonymous fun in a supervisor and reload code
11:06 <antipax> ok thanks. the weird thing is I've identified one test case such that if I remove the file it works, and it all runs just fine when you run it from the project directory
11:06 <antipax> so must be something different about how it's run when it's in the umbrella
11:06 <fishcakez> oh this is in tests
11:06 <antipax> yep
11:07 <antipax> and when i traced the kills they came from a process called "erts_code_purger" so I am guessing some module is getting reloaded somewhere, I just can't figure out where or why it only happens in the umbrella
11:07 <fishcakez> so thsoe processes are started by test processes and the test is getting killed?
11:07 <antipax> "mix test" just stops
11:07 <fishcakez> do you have 2 test case modules named the same?
11:07 <antipax> let me check
11:07 <antipax> pretty sure I checked that
11:08 <fishcakez> ugh but that should about redefining
11:08 <antipax> yeah, not the case
11:09 <fishcakez> can't you trace erts_code_purger to see what the mod is?
11:10 <antipax> good idea, let me try that
11:10 m00dy joined
11:11 griffinbyatt joined
11:12 griffinbyatt joined
11:12 <antipax> fishcakez: this appears relevant: {purge,elixir_compiler_38,<0.36.0>,#Ref<>}
11:14 <antipax> ok, I think I've tracked it down to the fact that some of the tests mock File and it doesn't like that
11:15 <antipax> and it's killing a compiler process which is in the process of reading a source file, presumably
11:15 <antipax> when it un-mocks File
11:15 <antipax> these tests are old and bad, I will rewrite them
11:15 Ven_ joined
11:15 <antipax> thanks for the suggestion to trace erts_code_purger, didn't think of that :)
11:15 <antipax> once again you save my bacon fishcakez :)
11:18 <fishcakez> antipax: oh it seems like a compiler issue where we think we can purge but we cant :S
11:18 <antipax> fishcakez: so it's not all my fault? :D
11:19 <fishcakez> well I didnt say it wasn't :P
11:19 <antipax> hahaha
11:19 <antipax> would be pretty funny if i wrote bad compiler code that came back and bit me :P
11:20 <fishcakez> tbh if you mock File you deserve what you get
11:23 <fishcakez> antipax: if you can open issue with minimal case then we can either lambaste you or fix the bug ;)
11:23 <antipax> oh... I agree 100%
11:23 <antipax> this is some of the earliest Elixir code I ever wrote
11:23 <antipax> I think finding a minimal case might be tough
11:24 <antipax> it is already kinda heisenbug-y
11:24 jkraus joined
11:26 Henk_ joined
11:27 <Henk_> can anybody show some awesome work done on a site with elixir?
11:28 <josevalim> antipax: hrm
11:28 <josevalim> we build modules and clean them up on module definition
11:29 <josevalim> but something seems to be holding to the compiler module
11:29 <josevalim> theoretically the only way to do that is if you are spawning processes while compiling
11:29 <smeevil_> Could someone tell me if this ecto fragment will open a door for sql injection ? where([e], ilike(e.title, ^"%#{query}%")) , i would expect something more along the lines of where([e], ilike(e.title, ["%?%", ^query]))
11:30 <josevalim> smeevil: no, if you are using ^, it cannot
11:30 <josevalim> the worst is that you can have a like injection
11:30 <josevalim> so if the user pass a wildcard *, it will match any character
11:30 codestorm joined
11:30 <josevalim> antipax: or you spawn a process during compilation that has a reference to an anoymous function
11:30 <josevalim> something like this
11:30 <smeevil_> josevalim: thanks :) could you point me to some docs that explain why pinning prevents injection ?
11:31 <josevalim> antipax: defmodule Foo do spawn_link(fn -> ... end) end
11:31 <josevalim> and that spawn_link stays around forever
11:31 <josevalim> smeevil_: because we used parameters, that's what we send
11:31 <josevalim> "SELECT * FROM foo WHERE id = ?"
11:31 <josevalim> and then we send the parameters on the side
11:31 <smeevil_> ah ! so its abstracted on a higher lever. thanks !
11:32 <smeevil_> s/lever/level/
11:32 <josevalim> so there is no way to inject anything because we never interpolate anything
11:41 harfangk joined
11:41 fowlduck joined
11:46 franco joined
11:46 ddrmanxbxfr joined
11:49 dani0_ joined
11:52 manukall joined
11:54 m00dy joined
11:55 Ven joined
11:56 m00dy joined
11:58 sfbw joined
12:00 cristianR_ joined
12:01 <m00dy> Nicd-: Hi my friend
12:03 duane joined
12:04 jkreeftmeijer joined
12:05 <antipax> josevalim: hm, I don't think we spawn any processes during compilation
12:05 <antipax> definitely not in the test case that was producing the issue
12:05 <antipax> I think it was due to the mocking of File, I think that's the purged module that is causing the kills
12:06 <antipax> thanks for taking a look :)
12:07 <antipax> I just got back from lunch and finished updating the tests to no longer mock File, and it works just fine now
12:07 <antipax> other than that the file is unchanged
12:07 <antipax> these tests are from before you wrote that article about why mocks are not necessary, btw :D
12:08 steffkes joined
12:08 steffkes joined
12:14 sfbw joined
12:15 <Nicd-> hello m00dy! :) how are you?
12:15 <m00dy> I'm fine
12:15 <m00dy> what about you ?
12:16 <Nicd-> pretty good, got a new version of my site pushed on the weekend and have a clear path for future development. also LAN party starting on thursday!
12:16 Ven_ joined
12:16 <ciawal> i60?
12:16 <Nicd-> no, just me and my friends at home :)
12:17 <ciawal> aw
12:19 samgranieri joined
12:23 bungoman joined
12:24 codestorm joined
12:25 <tuacker1> there is no way to generate a public/private key pair in erlang/elixir outside of calling out to something like openssl correct?
12:26 sfbw joined
12:28 cristianR_ joined
12:29 m00dy joined
12:30 gvaughn joined
12:30 sfbw joined
12:36 hahuang61 joined
12:41 m00dy joined
12:42 fowlduck joined
12:45 duane joined
12:45 akeating joined
12:47 harfangk joined
12:50 Ven_ joined
12:51 jerel joined
12:55 meh`_ joined
12:56 akeating joined
12:59 <PaReeOhNos> am I right in thinking that in order to use gen_tcp to connect to an SSL encrypted endpoint, I need to use :ssl.connect to upgrade the connection after?
13:02 griffinbyatt joined
13:04 ramortegui joined
13:04 cmn left
13:16 Ven joined
13:17 johnstorey joined
13:18 codestorm joined
13:18 maxbeizer joined
13:21 ramortegui joined
13:22 sfbw joined
13:23 sfbw joined
13:24 claudevandort joined
13:26 dimitarvp joined
13:27 ludat joined
13:30 io_bora joined
13:30 the_voice_ joined
13:33 JEG2 joined
13:33 jkreeftmeijer joined
13:36 wong2 joined
13:40 dani0_ joined
13:43 fowlduck joined
13:43 rschmukler joined
13:45 wong2 joined
13:46 IRCFrEAK joined
13:47 meh` joined
13:48 IRCFrEAK left
13:54 ctp joined
13:57 akeating joined
13:59 steffkes joined
14:01 gvaughn joined
14:03 griffinbyatt joined
14:04 kblake joined
14:06 <m1dnight_> Is anyone aware of libraries in Elixir or Erlang to discover bluetooth LE devices?
14:10 akeating joined
14:12 raycoll joined
14:12 chavito joined
14:13 codestorm joined
14:18 akeating joined
14:19 wsieroci joined
14:19 m00dy joined
14:30 craigp_ joined
14:33 m00dy joined
14:37 hahuang61 joined
14:37 jkreeftmeijer joined
14:37 cdg joined
14:37 <drewolson> anyone know if there's an official graphql irc channel on freenode? the obvious guesses don't seem to have many / any users
14:39 <dongo> iFire: alright so I solved my ogg vorbis comment parsing problems. Did not have to use the library you mentioned. I completely missed the fact that some values are to be interpreted as little-endian (big is defaulr)
14:40 cevado joined
14:40 cdg joined
14:40 <stephen_m> I'm just in the google groups - is there some way to mark a topic as unread?
14:41 racycle joined
14:42 cevado joined
14:43 fowlduck joined
14:43 io_bora joined
14:52 codestorm joined
14:55 chrismccord joined
14:57 codestorm777 joined
14:58 cemilowski joined
15:00 <asonge> drewolson: i think the graphql community is all on their own slack
15:00 <asonge> the slack channel there was on from day 1.
15:01 <drewolson> asonge yes, so i'm finding. i'm joining it now
15:02 meh` joined
15:03 jkreeftmeijer joined
15:04 griffinbyatt joined
15:04 kblake joined
15:06 drincruz joined
15:08 cschneid_ joined
15:08 amargherio joined
15:09 nd___ joined
15:10 gregman_ joined
15:12 m00dy joined
15:16 dani0_ joined
15:17 cevado joined
15:19 m00dy joined
15:23 polymetis joined
15:23 cdg_ joined
15:23 polymetis joined
15:24 Siyfion joined
15:25 tuacker joined
15:25 hxegon joined
15:25 <micmus> lexmag: it's a long shot but maybe you have the benchmarks from mapset introduction somewhere? https://github.com/elixir-lang/elixir/pull/3258
15:30 fhoffmann joined
15:32 <lexmag> micmus: do you mean the actual code used in testing?
15:33 jkreeftmeijer joined
15:33 <micmus> lexmag: yeah, that's why I said it's a long shot since it was 2 years ago
15:35 <lexmag> micmus: it still could possibly live in some gist, I'll check
15:36 <lexmag> micmus: seems I don't have it, not in branches, not in gists
15:36 <micmus> lexmag: no worries, thanks anyway :)
15:37 <lexmag> micmus: do you want to resurrect HashSet? :)
15:38 <micmus> lexmag: no, I'm looking for comparisons of MapSet with :ordsets, :sets & :gb_sets and that would give me some baseline to start
15:38 <lexmag> I see
15:44 fowlduck joined
15:44 potatosalad joined
15:44 nd__ joined
15:45 milad joined
15:45 milad joined
15:49 steffkes joined
15:50 amargherio joined
15:50 m00dy joined
15:53 smt_ joined
15:53 amclain joined
15:56 bitmod joined
15:58 m00dy joined
16:00 dignifiedquire joined
16:02 davidw joined
16:07 griffinbyatt joined
16:07 rschmukler joined
16:09 kblake joined
16:12 rschmukler joined
16:13 io_bora joined
16:13 Uniaika joined
16:14 racycle joined
16:17 m00dy joined
16:18 amargherio joined
16:20 cschneid_ joined
16:20 mattyw joined
16:21 meh` joined
16:28 cevado joined
16:28 m00dy joined
16:31 ejpcmac joined
16:34 jkreeftmeijer joined
16:36 kblake joined
16:38 hahuang61 joined
16:40 m00dy joined
16:42 chrismccord joined
16:42 <ejpcmac> Hi ! I’m working on a phoenix webapp where users can register to events. Events can have multiple possible dates, so the users must provide their availability for all the dates. I’m storing the availabilities as a map, like %{"2017-04-10 20:00" => "yes", "2017-04-11 18:00" => "no"} and the form asks the users to provide them through a table of radio buttons (one row per possible date, and the yes/maybe/no columns).
16:43 <ejpcmac> I’m trying to figure how to map the radio buttons to the changeset in a clean way.
16:45 <ejpcmac> Currently I can map them with the `name` attribute of radio_button, and set unrevelent radio button ids, but if the form has an error, the values of the buttons are not mapped back.
16:45 fowlduck joined
16:47 akeating joined
16:48 akeating_ joined
16:49 codestorm joined
16:49 imush joined
16:49 cdg joined
16:53 ctp joined
16:54 NeverDie_ joined
16:59 io_bora joined
17:00 MaSven joined
17:00 refriedchicken joined
17:01 refriedchicken joined
17:01 potatosalad joined
17:03 JuanMiguel joined
17:04 jeffweiss joined
17:08 mwbrown joined
17:11 <meh`> with Ecto.Changeset is there a way to validate a value and convert it to some other value if it validates?
17:11 rschmukler joined
17:13 lexmag joined
17:22 <chrismccord> meh` you can use prepare_changes
17:22 <chrismccord> and put the value if the received change.valid? is true
17:22 <benwilson512> or possibly a custom type?
17:23 <meh`> I am using a custom type, but I guess I'm doing it wrong
17:23 <meh`> I have a thing that can be either :inactive | :active | :suspended, but it's an integer in the database, but the incoming params would have a string as value instead of an atom
17:24 io_bora joined
17:25 nd__ joined
17:25 <meh`> I'm kind of confused as to what cast/load/dump should do actually
17:25 cevado joined
17:25 rschmukler joined
17:29 <meh`> http://sprunge.us/gBYN does this look correct?
17:29 <chrismccord> meh` For these cases I would use prepare_changes, or a generic function. In the latter case, you'd need to check for validity first, then put_change the the value
17:30 <chrismccord> a custom type should work as well tho
17:30 <meh`> chrismccord, I use that type in quite a few tables, that's why I made a custom type
17:30 <chrismccord> meh` gotcha, sounds reasonable
17:30 <meh`> I'm just not sure I got the differences between cast/load/dump are, correct me if I'm wrong:
17:30 <chrismccord> meh` : looks correct to me at a glance
17:31 <meh`> - cast: kind of like type cohercion when getting the value into the schema
17:31 <meh`> - load: stuff coming from the database, convert back to what you want
17:31 <meh`> - dump: stuff going into the database, convert to native type
17:32 <chrismccord> 👍🏻
17:32 <meh`> cool, thanks :)
17:33 <ciawal> is there an intended way to check if an ecto association is loaded other than using match?(%Ecto.Association.NotLoaded{}, _) ?
17:33 <ciawal> it feels so dirty
17:33 <benwilson512> ciawal: are you loading it if it isn't loaded?
17:33 <ciawal> no
17:33 <benwilson512> what is the logic?
17:34 <ciawal> json encoding of a model
17:34 <ciawal> I include a related model if loaded, and if not I don't
17:35 <benwilson512> ah
17:35 <ciawal> oh https://hexdocs.pm/ecto/Ecto.html#assoc_loaded?/1
17:35 <ciawal> I swear I've looked before and not found this
17:35 dani0_ joined
17:36 PaReeOhN_ joined
17:43 codestorm joined
17:45 fowlduck joined
17:46 hahuang61 joined
17:46 rschmukler joined
17:47 dani0_ joined
17:48 Gasher joined
17:52 bionj joined
17:56 mattyw joined
18:02 <meh`> another stupid ecto question, let's say in the params on top of the various fields I have an `"event" => 1` and I have a `belongs_to :event` and 1 is the id of that event, wat do
18:02 <meh`> cast_assoc is whining that I need a changeset/2
18:04 <meh`> but I'm not even sure it would do what I ned
18:05 dani0_ joined
18:07 uamana joined
18:07 rodolfojcj joined
18:08 griffinbyatt joined
18:10 steffkes joined
18:14 m00dy joined
18:14 wsieroci joined
18:15 rschmukler joined
18:15 bionj_ joined
18:17 MotherFlojo joined
18:18 bitmod joined
18:19 MotherFl1 joined
18:35 io_bora joined
18:36 jkreeftmeijer joined
18:37 rubyred joined
18:37 codestorm joined
18:40 uamana joined
18:41 josevalim joined
18:44 rschmukler joined
18:46 fowlduck joined
18:47 io_bora joined
18:59 initbit joined
18:59 kyrix joined
19:00 rschmukler joined
19:04 d10n-work joined
19:07 rschmukler joined
19:15 codestorm joined
19:25 MaSven joined
19:25 dani0_ joined
19:29 bionj joined
19:29 io_bora joined
19:34 JuanMiguel joined
19:37 cemilowski joined
19:40 drincruz joined
19:44 duane joined
19:47 fowlduck joined
19:56 gokr joined
20:00 cdg joined
20:02 bungoman joined
20:03 milad joined
20:05 rschmukler joined
20:06 josevalim joined
20:07 <benwilson512> sounds like you really want an "event_id" param and then to just include it in the `cast/3` list
20:07 kblake joined
20:09 codestorm joined
20:11 griffinbyatt joined
20:14 drincruz joined
20:14 steffkes joined
20:14 steffkes joined
20:15 rschmukler joined
20:17 fxn joined
20:20 hxegon joined
20:26 rschmukler joined
20:27 io_bora joined
20:31 bionj joined
20:33 milad joined
20:34 io_bora joined
20:35 sfbw joined
20:36 sfbw joined
20:36 cemilowski joined
20:37 jkreeftmeijer joined
20:38 io_bora joined
20:38 fxn joined
20:40 CapNemo joined
20:47 aedigix joined
20:48 fowlduck joined
20:48 lt_kaopude joined
20:51 io_bora_ joined
20:51 aedigix joined
20:53 aedigix joined
20:57 io_bora joined
21:02 rschmukler joined
21:03 codestorm joined
21:04 aedigix joined
21:06 vmoravec joined
21:09 io_bora joined
21:11 ZippoWeb2 joined
21:12 griffinbyatt joined
21:12 aedigix joined
21:13 io_bora joined
21:18 refriedchicken joined
21:23 PaReeOhNos joined
21:23 hxegon joined
21:23 refriedchicken66 joined
21:29 refriedchicken joined
21:29 Uniaika joined
21:33 rschmukler joined
21:33 dylan joined
21:38 rschmukler joined
21:39 Uniaika joined
21:40 chrismccord joined
21:44 jeffweiss joined
21:46 am55 joined
21:47 racycle joined
21:49 fowlduck joined
21:58 codestorm joined
22:09 jkreeftmeijer joined
22:12 griffinbyatt joined
22:15 steffkes joined
22:15 steffkes joined
22:15 jeffweiss joined
22:39 Guest67 joined
22:49 fowlduck joined
22:52 codestorm joined
23:02 am55 joined
23:06 gvaughn joined
23:10 s`_ joined
23:11 jkreeftmeijer joined
23:13 griffinbyatt joined
23:24 DLSteve joined
23:38 rodolfojcj joined
23:38 s` joined
23:43 Ioyrie joined
23:45 potatosalad joined
23:46 codestorm joined
23:47 potatosalad joined
23:47 <Radar> I have a process which is importing a bunch of "invitation events". These "invitation events" link to segments and to link the invitation to the segment, I'm looking the segment up in the database. The issue is a lot of the invitations have the same segments. I am trying to reduce the amount of database queries by storing the segments in a GenServer.
23:47 <Radar> I am concerned that this approach may lead to a lot of memory being used for a large amount of segments.
23:49 potatosalad joined
23:50 <Radar> We already do something like this with questions: https://gist.github.com/radar/50deb6beef200a208a3ed880e8ce7e88
23:50 fowlduck joined
23:51 <Radar> Is this a good approach?
23:54 <asonge> Radar: well, you're doing some unnecessary work, you can return the replies from the case statement, and that way you only run Map.put in the case where there's no value
23:55 <asonge> Radar: and it should work pretty well after that, but an ets table might be better...you can read form an ets table and then call into the gen_server if you miss the cache
23:56 griffinbyatt joined