<    March 2017    >
Su Mo Tu We Th Fr Sa  
          1  2  3  4  
 5  6  7  8  9 10 11  
12 13 14 15 16 17 18  
19 20 21 22 23 24 25  
26 27 28 29 30 31
00:04 josevalim_ joined
00:10 craigp joined
00:10 celyr joined
00:11 scarfacedeb joined
00:13 nd__ joined
00:17 scarfacedeb joined
00:17 steffkes joined
00:17 steffkes joined
00:25 celyr joined
00:28 craigp_ joined
00:32 duane joined
00:35 meandi_2 joined
00:39 celyr joined
00:43 wwwd joined
00:51 griffinbyatt joined
00:52 celyr joined
00:54 duane joined
01:00 gvaughn joined
01:06 celyr joined
01:10 nighty- joined
01:12 cesarizu joined
01:17 genq joined
01:28 duane joined
01:28 racycle joined
01:30 craigp_ joined
01:33 celyr joined
01:44 Steve___ joined
01:45 rschmukler joined
01:47 celyr joined
01:47 jbranchaud joined
01:50 cryptomata joined
01:52 griffinbyatt joined
01:54 ignacio_ joined
01:55 rschmukler joined
01:56 jimt_ joined
02:02 celyr joined
02:02 celyr joined
02:03 mysiticity joined
02:10 craigp joined
02:13 <asonge> Nicd-: you can runtime: false that stuff now
02:14 griffinbyatt joined
02:15 celyr joined
02:15 celyr joined
02:18 steffkes joined
02:18 steffkes joined
02:20 duane joined
02:30 celyr joined
02:30 tomterl joined
02:35 weaksauce joined
02:44 celyr joined
02:44 raycoll joined
02:49 avidal joined
02:50 euphoriaa joined
02:50 proteusguy joined
02:50 willingc joined
02:53 Duckily joined
02:55 gvaughn joined
02:59 celyr joined
02:59 celyr joined
02:59 wtetzner joined
03:01 IRCFrEAK joined
03:03 marcdel joined
03:03 craigp_ joined
03:05 proteusguy joined
03:06 gvaughn joined
03:08 IRCFrEAK joined
03:18 IRCFrEAK joined
03:18 celyr joined
03:20 marcdel joined
03:22 osxi joined
03:22 IRCFrEAK left
03:27 jbranchaud joined
03:29 craigp joined
03:33 celyr joined
03:34 <Radar> I'm reading https://pragprog.com/titles/lhelph and in it they do this kind of string concatenation: "%{" <> string_body(board) <> "}"
03:34 <Radar> Is this preferred to string interpolation? "%{#{string_body(board)}}" ?
03:40 nomicflux joined
03:40 IRCFrEAK joined
03:41 IRCFrEAK left
03:48 rschmukler joined
03:51 <asonge> they're only slightly different, the <> is more primitive and doesn't do any type conversion stuff, interpolation runs to_string on stuff
03:53 <Radar> Thanks asonge
03:53 celyr joined
03:53 celyr joined
03:58 IRCFrEAK joined
04:00 IRCFrEAK left
04:04 craigp_ joined
04:09 jbranchaud joined
04:14 teamj joined
04:14 pHcF joined
04:17 craigp_ joined
04:18 scarfacedeb joined
04:18 steffkes joined
04:23 jbranchaud joined
04:25 IRCFrEAK joined
04:28 scarfacedeb joined
04:30 IRCFrEAK left
04:40 jerel joined
04:41 rschmukler joined
04:43 celyr joined
04:43 alex88 joined
04:44 wwwd joined
04:44 alex88_ joined
04:45 <Nicd-> asonge: what does that mean?
04:45 <asonge> what mean?
04:45 <Nicd-> runtime: false
04:45 <asonge> oh, don't include it in applications automatically
04:47 raycoll_ joined
04:47 <Nicd-> so it's only available in the tasks
04:47 <Nicd-> ?
04:47 <asonge> basically, it's not available in releases. you can use it from the shell just fine, but it won't be there if you build a release.
04:48 <Nicd-> ah
04:48 <Nicd-> guess that will be the eventual solution
04:48 <Nicd-> currently I'm not using releases
04:52 zabirauf joined
04:55 fernandomm joined
04:56 celyr joined
05:00 duane joined
05:02 nepiktaz joined
05:02 raycoll joined
05:06 rschmukler joined
05:09 hahuang61 joined
05:11 celyr joined
05:11 celyr joined
05:17 IRCFrEAK joined
05:19 <wwwd> Once again, totally stumped! Why does "pet_struct |> Repo.preload([:person]) |> Repo.insert(changeset)" Return "(FunctionClauseError) no function clause matching in Ecto.Repo.Schema.insert/4"? How is that 4 args and not 2? That is, when I do "pet_struct |> Repo.preload([:person]) it looks like I get 1 struct back, and my change set is also one object. So, what am I missing?
05:22 <Nicd-> probably internal call to the /4 function
05:23 montanonic joined
05:24 <Nicd-> hmm but insert takes "struct_or_changeset, opts" as arguments
05:24 <Nicd-> you're giving it "struct, changeset"
05:24 jbranchaud joined
05:25 sivsushruth joined
05:28 craigp_ joined
05:28 <wwwd> Hmm? So, I have a struct w/ relation to an owner, and params. I build a changeset. Then I want to insert it in the Repo with a preload of the owners. First, am I understanding this and second how do I set it up?
05:30 <Nicd-> how do you set the changeset variable?
05:31 <wwwd> And, if I do "Whodapet.Repo.preload([:person]) |> Whodapet.Repo.insert(changeset)" then I get back "Whodapet.Repo.preload/1 is undefined"
05:31 gvaughn joined
05:32 <wwwd> "changeset = Repo.changeset(struct, params)" if I remember correctly...I've been around this track a few times!
05:33 Duckily joined
05:34 <wwwd> No, sorry that's wrong. "Project.Pet.changeset(struct, params).
05:35 <Nicd-> why are ypu calling preload?
05:36 <wwwd> I'm trying to get my person_id on the pet that I am inserting in to the pets table.
05:36 CapNemo joined
05:36 <wwwd> Or, more accurately...because it seems like the thing to do! ;)
05:37 <Nicd-> preload loads the associated struct from the database
05:37 <Nicd-> you don't need that to insert afaik
05:38 <Nicd-> what is the actual thing you want to do? can you gist the whole operation (all the related lines9?
05:38 luke_nukem joined
05:39 rschmukler joined
05:39 <wwwd> Yep! Give me a couple minutes to get it all collected.
05:41 craigp joined
05:42 celyr joined
05:42 celyr joined
05:43 markh joined
05:50 cemilowski joined
05:53 cemilowski left
05:54 <wwwd> Nicd: https://gist.github.com/johnhitz/2739f5a64e909b9c06d1ff563d2214f3.
05:58 rschmukler joined
06:04 celyr joined
06:04 meandi_3 joined
06:05 <Nicd-> I do it like this:
06:05 <micmus> Wow, EEF videos from yesterday are already up
06:05 <Nicd-> Machine.changeset(%Machine{}, params)
06:05 <Nicd-> |> Changeset.put_change(:user_id, user.id)
06:06 <Nicd-> maybe not the best way but it works ¯\_(ツ)_/¯
06:06 craigp_ joined
06:06 <Nicd-> so you create a changeset from your struct, then you put the ID you want on it and then you can give that to Repo.insert
06:08 griffinbyatt joined
06:10 dec0n joined
06:12 Or1on joined
06:13 <Speed> distillery builds: we're having this umbrella app that has a "core" (90% of the code), then a few node types, each as a separate umbrella app with just a tiny bit of code
06:13 <Speed> api, server, client
06:13 <Speed> for the releases, I was thinking about building separate releases for each of the node types
06:13 <Speed> but that means more builds plus the packages become specific
06:14 <Speed> would it be possible/wise to just build it all into one release, then be able to specify the node type somehow when the release is started?
06:17 <wwwd> Looks better than what I have! ;) So, the user_id is not the same as the owner_id. I know, or atleast think I can put the user_id [reading about authenticatio in Programming Phoenix] in the conn.assign? Can I put the owner_id in the assign as well...and just out of curiosity how long does the conn.assign live? Also, can I remove things from the conn.assign once I am done with them?
06:18 Scramblejams joined
06:18 celyr joined
06:18 <asonge> wwwd: it lives as long as plugs keep passing the conn without modifying stuff...
06:19 steffkes joined
06:19 steffkes joined
06:20 <asonge> the execution model is basically 1 erlang process per connection, and it's just function calls, and the Repo checks a process out of the pool, and i think some of that might happen in a different process, but Repo calls are synchronous, so that doesn't really matter.
06:20 icanhazbroccoli joined
06:22 dec0n joined
06:26 <wwwd> So, it looks to me like I am building a new changeset in both the new action and the create action. If so, how do I pass my owner_id from one to the next?
06:30 steffkes joined
06:30 steffkes joined
06:33 celyr joined
06:34 luke_nukem joined
06:35 <asonge> i'm not 100% sure what you're doing...are you trying to insert associated data?
06:40 <wwwd> Yes!
06:42 <Nicd-> why do you have "new" and then "create", how are they different?
06:50 <wwwd> Unless I am completely lost, which well may be. The route get "/pets/new" calls the new action on the controller. The new action creates a changeset and calls render(conn, "new.html", changeset). The new.html calls action: pets_path(@conn, :create). Then the create action post "/pets" saves it to the database and redirects to pet_path(conn, :index) which shows a list of pets.
06:52 <wwwd> And, actually when I used "mix phoenix.gen.html" that is what it set up. Now what i want is to do the same thing with pets and their associated owner.
06:53 rschmukler joined
06:53 celyr joined
06:53 <Nicd-> ah, like that. but then you don't need to transfer anything from new to create
06:54 <Nicd-> all necessary things should come in the changeset from the form (and in the session if you need the user's data)
06:56 hahuang61 joined
06:57 craigp joined
06:59 m_m__ joined
06:59 <wwwd> But it is not the user that is needed. It is the owner. The user is a person who is sitting at the computer processing pets. The owner is a person standing on the other side of the counter waiting to get a reciept. But the owner is not signed in. The user creates an owner then creates a pet and then gives the owner a reciept. So, once the owner is created or pulled out of the database if they already exist, I need to hold onto the
06:59 <wwwd> owner_id until the whole process is complete! So far the only thing I can see is to stick the owner_id in the assign and then remove it later...if that is possible.
07:00 <asonge> wwwd: you need to pass that into a route, or have a dropdown with the owner id in the form.
07:00 griffinbyatt joined
07:01 <asonge> (you could also use a query param with the owner_id as well)
07:02 hbraun joined
07:03 duane joined
07:05 <wwwd> So, eventully what I want to do is have a new form. Once the form is submited I want to query the db. If the user exists I want to use that owner. If not I want to create the owner and move through my process. I don't want the user to have to jump throug hoops searching for the person they just created/found in the db. I want to make it nice and smooth. Create/find the owner. Use it until finished and move on.
07:06 <Nicd-> then put it in the URL
07:06 <Nicd-> in the path or as a query argument
07:06 <Nicd-> you could put it in the session if you didn't want it to be shown in the URL but then you need to manage its lifetime and clear it when you're done
07:07 <wwwd> So, I'm very new to Elixir and fairly new programming...so bear with me.
07:08 <wwwd> So in Programming Elixir they talk about the conn.assign. Is'nt that the session?
07:08 <Nicd-> no
07:08 <Nicd-> that's just a map of data that is valid for the duration of this request (it's passed from plug to plug)
07:09 <wwwd> Ah!
07:09 Guest67_ joined
07:09 <asonge> yeah, unless you do something to store data somewhere, each request is a separate process, and starts in from the router with a fresh conn
07:10 <asonge> there are plugs that will look at the cookie (or you can make one look up an auth token) and then attach session data to it, but that happens on a fresh connection every time
07:10 <asonge> (this is if you're not using websockets)
07:10 <wwwd> Got it!
07:10 <wwwd> That was not really clear.
07:10 <wwwd> So, can you tell me where I might read about the session...and how I access it?
07:10 <Nicd-> it might also be good to read about the basics of HTTP servers such as statelessness
07:11 <barttenbrinke> wwwd: http://www.phoenixframework.org/docs/sessions
07:11 <asonge> also, https://hexdocs.pm/plug/Plug.Session.html
07:11 <asonge> phoenix is actually a lot smaller than people think. a lot of the really important stuff is plug.
07:11 ZippoWeb2 joined
07:11 m_m joined
07:12 <wwwd> barttenbrinke & asonge...thank you very much.
07:13 <asonge> wwwd: just a quick question, are you new to programming in general, or to web programming, or just elixir?
07:13 <wwwd> And, for the record I do understand a bit about the session...just had not come accross it in the docs!
07:13 celyr joined
07:14 <wwwd> Two weeks with Elixir. Built one very small flask app and am fairly new to programming generaly!
07:15 <asonge> ah, good.
07:17 <asonge> you seem to be moving at a pretty good clip, elixir usually lures in more experienced coders (a lot of what makes it different is appealing to coders frustrated in other paradigms)
07:17 ZippoWeb joined
07:17 <asonge> good luck
07:19 <wwwd> Thanks! I'm gonna need it...I seem to have sold software I don't have and I have to put something functional together in fairly short order.
07:20 gvaughn joined
07:20 <wwwd> The session docs will be helpful!
07:20 <barttenbrinke> wwwd: Learning on the job is always a good way :)
07:21 <wwwd> Lol! I work best under presure...or only under presure...or something like that! ;)
07:22 craigp_ joined
07:24 <wwwd> I'm going to hit the hay! Thanks for all the help. Just talking about what I already know has helped a lot, and as I said the session info will be great. Have a great night!
07:25 m_m joined
07:26 craigp joined
07:26 jbranchaud joined
07:27 nanohest joined
07:32 Duckily joined
07:34 tuacker joined
07:36 fernandomm joined
07:36 celyr joined
07:39 cemilowski joined
07:41 nepiktaz joined
07:45 m_m joined
07:47 rschmukler joined
07:51 celyr joined
07:53 <barttenbrinke> Hey, Im porting a rails app, and it has stuff like = content_for :html_title, _("Manage users") sprinkeled randomly in it's views.
07:53 <barttenbrinke> Is there a nice way to do this in Phoenix?
07:53 <barttenbrinke> Or.. a better way to do this in Phoenix :)?
07:55 <Nicd-> what does it do?
07:56 <micmus> barttenbrinke: define a function on the view module, and call @view_module.foo(), you could additionally pass the template
07:56 <micmus> s/call/call from layout
07:56 <barttenbrinke> Yeah, but that would be top down, and the rails thing is doing it bottom up, which actually makes sense sometimes
07:57 <micmus> I'm not sure what you mean by that
07:57 <barttenbrinke> It would centralize all the exceptions though.. hmm I need to think about this :)
07:57 <micmus> you're still calling yield(:foo) from the layout
07:58 <micmus> so it's the layout controlling what it needs - the same here
07:59 tuacker1 joined
07:59 <barttenbrinke> With bottom-up I mean: In rails you have a partial view setting a HTML title for the layout view. Which is probably a bad Idea :)
07:59 harfangk joined
07:59 <harfangk> aa
07:59 <asonge> barttenbrinke: it's a bit more important in rails because they collapse views and templates.
08:00 <micmus> that won't be possible here, since a template is just a function once compiled
08:00 <barttenbrinke> micmus: Yes, that is what I meant when I said that Phoenix renders top down
08:00 <harfangk> is there a way to figure out to which module an imported function belongs to?
08:00 <barttenbrinke> harfangk: Stop using so much aliasses :)
08:01 <micmus> harfangk: my hack is to do IO.inspect(&foo/3) - prints fully qualified name
08:01 <harfangk> yes that's the source of problem, isn't it? haha
08:01 <asonge> harfangk: you can inspect a reference to it
08:01 <harfangk> aha inspect
08:01 <micmus> The general solution is inspecting the contents of __ENV__.functions
08:02 <harfangk> that's an incredibly versatile and useful function
08:02 <barttenbrinke> harfangk: Yeah, I stop using them when a project is getting too big.
08:02 <harfangk> like swiss knife
08:02 <barttenbrinke> micmus: That is a nice trick!
08:04 <harfangk> thank you :D
08:05 <harfangk> that solved my problem
08:05 Guest67__ joined
08:06 jkreeftmeijer joined
08:06 celyr joined
08:13 mattyw joined
08:19 dani0_ joined
08:20 celyr joined
08:21 steffkes joined
08:21 steffkes joined
08:29 mark_66 joined
08:30 lt_kaopude joined
08:31 jkreeftmeijer joined
08:31 ZippoWeb joined
08:32 sivsushruth joined
08:34 celyr joined
08:43 vmoravec joined
08:47 refriedchicken joined
08:47 dani0_ joined
08:48 celyr joined
08:57 hahuang61 joined
08:59 akeating joined
09:01 celyr joined
09:05 duane joined
09:08 gvaughn joined
09:09 Ven joined
09:13 jadlr joined
09:16 celyr joined
09:17 <tuacker1> barttenbrinke: just in case I wrote a post about how I render page titles depending on the controller action (https://markusbodner.com/2016/03/27/custom-titles-per-view-or-controller-actions-in-phoenix-framework/)
09:17 <tuacker> just note that was a year ago, early into my elixir career :D
09:18 <tuacker> (also ugh that was a year ago!?)
09:18 <barttenbrinke> tuacker: Thanks, I found that. It is probably the best way to centralize all the ugliness :P
09:19 <asonge> you could probably make it look really smooth if you use with
09:19 <tuacker> everything looks smooth with with
09:20 <tuacker> :D
09:20 <asonge> not everything. i've swapped some with stuff out because i made it horrible and confusing :)
09:20 <tuacker> (I think with wasn't a thing a year ago?)
09:20 <asonge> (i can ruin *everything*)
09:20 <tuacker> or just became a thing around that time
09:20 <asonge> yeah, it was really new a while ago, and with/else wasn't until 1.3
09:21 <asonge> it's also kinda advanced? i don't know how many beginners can grok it right.
09:21 steffkes joined
09:21 steffkes joined
09:21 <asonge> (funny how `with` usage is about as complicated as non-macro elixir gets, compared to things like generics)
09:24 <gazler> I think with looks confusing for the negative case. Like with {:error, :not_found} <- get_email_user() ...
09:26 <asonge> gazler: yeah, that's the stuff i started ripping out
09:26 <asonge> it was short, but it was not clear.
09:26 <OliverMT> make a without macro
09:26 <OliverMT> :D
09:26 <gazler> Solved.
09:27 jbranchaud joined
09:27 PaReeOhNos joined
09:28 <asonge> (also, found it useful to catch-all in else and raise something, because holy crap is it confusing to get {:ok, _} out of a `with` where it didn't match some more detailed match)
09:29 <jadlr> Hi all, I have a flow question: https://gist.github.com/jadlr/dfae407772813742920dfce0db2c7080
09:30 <jadlr> Why does this take 4s? And how do I make it take 1s?
09:30 <asonge> because max_demand/min_demand.
09:31 gmcabrita joined
09:31 <asonge> you have a lot of overhead to dispatch work, so it's batched up
09:31 <jadlr> so how would I set max/min in order to make it parallel? 1/1?
09:32 <asonge> well, 1-1 is 0, so not quite. i'm not 100% sure how to get things out 1 at a time. it's kinda trivial to do that kind of thing without flow.
09:33 <asonge> "The enumerable is consumed in batches, retrieving max_demand items the first time and then max_demand - min_demand the next times. Therefore, for streams that cannot produce items that fast, it is recommended to pass a lower :max_demand value as an option."
09:33 <jadlr> This is part of a larger flow. I just need parallelism within a small part (IO heavy)
09:34 <jadlr> I'm aware that this would be trivial using tasks.
09:35 <asonge> how is the io being partitioned?
09:35 <jadlr> it's a bunch of http reqs that I want to happen in parallel
09:36 <asonge> if you use max_demand: 2, min_demand: 1, it'll start with 2, and then ask for 1 at a time while it is processing the previous value
09:37 Tetiana joined
09:37 <jadlr> thanks! I'll try that.
09:38 <asonge> but i think you might want a lot more than the number of CPUs of workers
09:39 cemilowski left
09:40 celyr joined
09:40 celyr joined
09:40 stephen_m joined
09:40 <jadlr> indeed. I'm still in the process of finding out if flow is a good match for my problem
09:41 marr joined
09:42 <asonge> it probably is, it's just your test was a bit oversimplistic :P
09:44 ZippoWeb joined
09:44 <jadlr> absolutely :)
09:45 <linduxed> i would assume the answer is no, but is there some way to ping a running Phoenix app to figure out what version it runs?
09:45 <Nicd-> what version of what? phoenix?
09:46 <OliverMT> you can only get the cowboy version if you mean ping via http
09:46 <asonge> jadlr: add stages: 100, and it'll do 100 http requests at a time. one thing i would do, tbqh, is partition by domain beforehand. it might take slightly longer, but it would make sure there is only 1 request at a time to a domain.
09:46 <jadlr> asonge, adding '|> Flow.partition(stages: 6)' before the map makes it take 1s
09:47 <jadlr> that is the plan, I'm talking to different APIs with different rate limits
09:48 <jadlr> strange this is that with 5 stages it takes 2s. I really have to understand the whole max/min-demand and stages stuff :)
09:49 dani0_ joined
09:49 <asonge> jadlr: it's pretty simple. on startup, the consumer asks the producer for max_demand. when max_demand - min_demand == 0, it asks for min_demand more.
09:50 <asonge> erm, max_demand - min_demand == number of items left for the consumer to process*
09:50 <asonge> blah.
09:51 <jadlr> :) So in theory if max_demand >= 4 and stages = 4 it should only take 1s since everything runs in parallel
09:51 <asonge> no?
09:51 <asonge> (also, how many cores are you sitting on right now?)
09:52 <jadlr> 2cores 4 threads
09:53 <asonge> it should be starting 4 stages by default
09:53 <asonge> (unless you're turning of smp support or setting the number of erlang schedulers to something manually)
09:53 the_voice_ joined
09:54 scarfacedeb joined
09:55 <jadlr> Nope
09:57 <asonge> if you're using the partition, it's because the partitioner is dispatching them to 4 different stages
09:58 <jadlr> I updated the gist. This really confuses me.
09:59 dani0_ joined
09:59 <asonge> jadlr: side effects of phash, basically
10:00 <asonge> so, in line 8, 1 partition will get all 4 values (max_demand), and then dispatch them based on their phash to one of 4 schedulers based on what part of the hash space they map to
10:00 <jadlr> Ohhhh
10:00 <jadlr> That makes sense
10:01 <jadlr> So if the values wouldn't produce the same hash, i'd be fine
10:01 shadowjack joined
10:01 <asonge> right, partition is not round-robin, it's consistent-hash based
10:01 <jadlr> Got it! Thank you very much for the input asonge
10:03 <asonge> jadlr: `1..4 |> Enum.map(&{&1, :erlang.phash2(&1, _stages=4)})` tells you which # scheduler each number goes into
10:04 <asonge> (it should be, [{1,4},{2,0},{3,3},{4,3}], which means that 1 of them gets 2, which makes it take 2s)
10:05 <jadlr> would I be able to pass another dispatcher to partition?
10:06 shankardevy joined
10:06 <asonge> each partition is another set of stages
10:06 <jadlr> like GenStage.BroadcastDispatcher
10:06 qqwy joined
10:06 <asonge> broadcast repeats stuff across all stages, it's not a partitioner
10:07 <shankardevy> starting hound test, my page_source is always an blank html to whatever page I visit
10:08 <jadlr> oh ok
10:08 <shankardevy> I tried wallaby and I also get the same blank html. the page source is always “<html><head></head><body></body></html>”
10:08 <asonge> you can pass your own function to the partition function, and use that to spread work out
10:09 <shankardevy> is there any reason why phantomjs return this html no matter which page I try in my test?
10:09 celyr joined
10:09 <jadlr> I'll try that! thx
10:09 lexmag joined
10:10 <asonge> jadlr: the docs describe how to do this, btw.
10:11 <asonge> (this is where you rip the domain out of a url and then return the :erlang.phash2(domain, num_stages))
10:11 <shankardevy> in my hound test, I do ` navigate_to "/products”` and then ` IO.puts inspect(page_source)`. I don’t see the actual page source. any help? I am hitting this error for some time and can’t a solution. maybe I am missing something very simple but can’t find it.
10:12 <Nicd-> shankardevy: gist the code of the test
10:12 <asonge> shankardevy: i've never fooled with this, but do you know if the API is fully synchronous or if you have to wait?
10:12 <jadlr> Can you point me to where in the docs I can find that?
10:13 scarfacedeb joined
10:13 <asonge> https://hexdocs.pm/flow/Flow.html#partition/2 points to https://hexdocs.pm/gen_stage/0.11.0/GenStage.PartitionDispatcher.html
10:13 <jadlr> thanks!
10:14 <shankardevy> Nicd-: here is a gist https://gist.github.com/shankardevy/d5b7f376c87b9c373524294c6aad57f3
10:15 <Nicd-> page_source is a function?
10:15 <shankardevy> yes, it’s a function from `hound` package
10:16 scarfacedeb joined
10:18 <asonge> shankardevy: uh, i think the problem might be that you need to start the session in your test? not completely sure, though.
10:19 <asonge> shankardevy: put it in `setup do start_session end`
10:19 <asonge> (throw an :ok in there)
10:19 <shankardevy> asonge: let me try now
10:20 <sivsushruth> Any best practices for running cron for distributed systems ?
10:20 <sivsushruth> should the cookie be same as the rest of my phoenix apps ?
10:20 <asonge> shankardevy: if you put it there, i think it starts a session during compile in a compiler worker process, which dies. then when your code runs in the actual test, you're in another process.
10:20 <asonge> sivsushruth: there's a cron lib for elixir to keep stuff internal :)
10:20 <asonge> that way it's cross-platform and there's no extra operational overhead in editing crontab files
10:21 <asonge> sivsushruth: but if you want to run actual cron jobs, use a distribution (like distillery), which comes with a utility command to run things.
10:22 <sivsushruth> yes that is what I am using.
10:22 <sivsushruth> But i want to autoconnect to certain nodes so that cron can use phoenix pubsub etc
10:22 <sivsushruth> Is it good practice to directly connect cron node to a phoenix node
10:23 <asonge> depends?
10:23 <sivsushruth> or is it better to expose certain phoenix functions via an api
10:23 <sivsushruth> ?
10:23 <asonge> i mean, it sounds fine
10:23 <sivsushruth> I am using distillery escript to run crons, either long running using quantum elixir or short one using :erlang.apply
10:24 <shankardevy> asonge: silly me… I think the issue is with `server: true` in my test.exs
10:24 <shankardevy> I did change it now, I get a different error. at least a sign of something working in the right direction.
10:24 <sivsushruth> So are there any overheads or abnormal behaviour with ETS or other systems in a distributed environment when a node goes down etc ?
10:24 <asonge> ets is always local
10:24 <Nicd-> ETS is not distributed
10:25 <asonge> and some distributed apps kinda assume every node is the same, but most just look for the same distributed app on every node to talk to, if a node is missing it, it's fine. but there's also a "hidden" mode that can be useful for this.
10:25 <asonge> hidden nodes don't show up in nodes/0
10:26 <sivsushruth> aah got it
10:26 <sivsushruth> so what happens when a node goes down, as phoenix subsub uses ets I think
10:27 <sivsushruth> how will it ensure consistency ?
10:29 celyr joined
10:31 <asonge> sivsushruth: CRDTs :)
10:31 <asonge> it has a causation-tracking mechanism where it will filter, but not delete, users that are on nodes during a netsplit.
10:32 <sivsushruth> oh ok.
10:32 <asonge> there's some arbitrary "forever down" time, where if you have a netsplit for a few days, you can get inconsistent, but like...don't do that.
10:33 <asonge> nodes are tagged so that the same node rejoining after a restart looks unique, so old users don't just magically pop up back online
10:34 <asonge> (this might be getting replaced with a more systematically-tested subsystem at some point, but there have been very few bugs in the handrolled crdt)
10:36 DeadTrickster joined
10:37 shankardevy joined
10:42 dani0_ joined
10:48 <ivan> https://github.com/lasseebert/til good tips
10:48 celyr joined
10:48 cemilowski joined
10:51 <Nicd-> yesterday I got by SMS the boarding pass of someone called Ivan for a flight to Heathrow
10:51 <Nicd-> it wasn't you ivan, was it?
10:51 duane joined
10:52 <ivan> it was not
10:52 <Nicd-> oh good
10:52 cemilowski joined
10:55 shankardevy joined
10:57 gvaughn joined
10:58 hahuang61 joined
11:03 celyr joined
11:04 cemilowski joined
11:08 junsuijin joined
11:09 <barttenbrinke> Is there a way to check for empty string in a case statement guard?
11:10 <barttenbrinke> Because is_binary also accepts "" and is_nil doesn't
11:10 <barttenbrinke> Or can I use byte_size() == 0 ?
11:11 <Nicd-> can you use == ""?
11:12 <barttenbrinke> In a guard?
11:12 <Nicd-> yeah
11:13 nepiktaz joined
11:14 cemilowski left
11:15 <barttenbrinke> It accepts it, but the guard always returns false?
11:17 <barttenbrinke> Hmm, that might be for an unrelated reason :)
11:17 <Nicd-> seems to work fine for me: https://gist.github.com/Nicd/e65b30c2399abffa0d52e8b51bcfafde
11:21 <nyaray> why not just match on the empty string?
11:21 <ciawal> ^
11:22 <barttenbrinke> nyaray: I could, but then I'd have to pas a Tuple to the case statement, making it more ugly.
11:23 <nox> Mmh?
11:23 <nyaray> can you give us a snippet?
11:23 <barttenbrinke> Nicd-: The Guard is working correctly! Thanks
11:23 <barttenbrinke> https://www.irccloud.com/pastebin/MTYYqUCv/
11:23 <barttenbrinke> Naming People :)
11:24 <barttenbrinke> This is the official, Dutch, Government approved way (tm) :(
11:25 <Nicd-> looks like you need this: ™
11:25 <Nicd-> the first time is free :)
11:26 <ciawal> maybe try to parse to an int instead?
11:26 shankardevy joined
11:27 celyr joined
11:28 jbranchaud joined
11:40 stephen_m joined
11:41 celyr joined
11:42 Ven joined
11:44 <Nicd-> so I wrote some utilities to make Mix a frontend build tool: https://blog.nytsoi.net/2017/03/24/fbu-frontend-build-utilities
11:44 <Nicd-> not saying it's a good thing but it seems to work for me :) would appreciate all comments
11:44 dani0_ joined
11:54 griffinbyatt joined
11:54 inoas joined
11:55 scarfacedeb joined
11:55 griffinbyatt joined
11:55 celyr joined
11:55 celyr joined
11:56 griffinbyatt joined
11:56 execb5 joined
11:56 griffinbyatt joined
11:57 scarfacedeb joined
11:57 griffinbyatt joined
11:58 griffinbyatt joined
11:59 griffinbyatt joined
12:00 tomaz_b joined
12:02 nighty- joined
12:18 jkreeftmeijer joined
12:20 steffkes joined
12:20 steffkes joined
12:20 jkreeftmeijer joined
12:25 celyr joined
12:29 scarfacedeb joined
12:30 cemilowski joined
12:31 jkreeftmeijer joined
12:37 rranelli joined
12:42 scarfacedeb joined
12:42 jbranchaud joined
12:50 DeadTrickster joined
12:53 <craigp> hey all
12:53 <craigp> anyone know what would cause :appmon_info to crash (and what it actually is)?
12:53 <craigp> I see it pretty regularly
12:53 <craigp> GenServer :appmon_info terminating
12:54 <OliverMT> craigp: http://erlang.org/doc/apps/runtime_tools/
12:54 <OliverMT> thats where appmon_info comes from at least
12:55 duane joined
12:56 jbranchaud joined
12:58 DeadTrickster_ joined
12:58 hahuang61 joined
12:59 harfangk joined
13:01 ramortegui joined
13:02 <craigp> thanks
13:02 Or1on joined
13:03 akeating joined
13:03 celyr joined
13:03 jkreeftmeijer joined
13:10 sfbw joined
13:18 execb5 joined
13:22 nanohest_ joined
13:22 <hmans> Anyone here using Elm with a Phoenix 1.3-RC1 app?
13:23 jbranchaud joined
13:23 <gazler> hmans: Not personally, you may want to look at https://elixirforum.com/t/setup-for-elm-in-phoenix-1-3-0-rc-directory-structure/4156 though
13:24 <hmans> gazler: that's 100% what I'm looking for, thanks :-)
13:25 flaviodesousa joined
13:25 celyr joined
13:25 celyr joined
13:31 nanohest joined
13:33 josevalim joined
13:34 scarfacedeb joined
13:35 dimitarvp joined
13:40 chriswarren joined
13:41 rschmukler joined
13:43 <linduxed> isn't a line like "alias Something" pointless?
13:43 <linduxed> I mean, when it's not "Something.Banana.Foo", but just the single word "Something"
13:44 jkreeftmeijer joined
13:44 <linduxed> the rest of the code is using fuctions like "Something.foo(bar, baz)", and i think "Something" should already be accessible, right?
13:48 maxbeizer joined
13:49 akeating joined
13:50 <harfangk> yeah
13:50 ignacio_ joined
13:51 <harfangk> that alias is not gonna do anything
13:53 <linduxed> ok
13:53 <linduxed> then it was as i thought, thanks!
13:54 nanohest joined
13:55 ZippoWeb2 joined
13:56 dani0_ joined
13:57 nanohest joined
13:58 cemilowski left
13:59 ZippoWeb3 joined
14:00 DeadTrickster joined
14:00 griffinbyatt joined
14:00 Ven joined
14:00 jerel joined
14:00 chrismccord joined
14:01 akeating joined
14:04 gvaughn joined
14:10 rschmukler joined
14:15 racycle joined
14:16 Uniaika joined
14:17 jbranchaud joined
14:17 chriswarren joined
14:18 chriswar_ joined
14:19 wwwd joined
14:23 celyr joined
14:25 byte512 joined
14:27 rschmukler joined
14:28 alex88 joined
14:28 colrack joined
14:37 GeorgesLeYeti joined
14:37 <GeorgesLeYeti> Hi
14:38 <GeorgesLeYeti> I want to start learning elixir & phoenix lang. Which website do you advice me ?
14:39 <nox> GeorgesLeYeti: I approve of your nickname.
14:39 nanohest joined
14:39 <GeorgesLeYeti> nox, ty :D
14:39 <Uniaika> so do I
14:39 <linduxed> GeorgesLeYeti: look at the sidebar to the right here: https://www.reddit.com/r/elixir/
14:40 <linduxed> there's a Guides section and a Courses section
14:40 <linduxed> those should be helpful
14:40 <linduxed> the books listed there are also good
14:40 <Uniaika> GeorgesLeYeti: check Elixir School's website
14:40 <nox> GeorgesLeYeti: Even without your nickname though, I can fell your Frenchness from the space you put before your interrogation mark.
14:40 <nox> That being said, have fun learning the language.
14:40 <nox> s/fell/feel/
14:41 nanohest joined
14:42 <GeorgesLeYeti> Uniaika, & linduxed ty for you advices I ll check these sites
14:42 <Uniaika> de rien :)
14:42 <GeorgesLeYeti> nox, yes i have to confess :)
14:42 <nox> Ah ah.
14:43 celyr joined
14:43 <OliverMT> french people call a question mark "interrogation mark"?
14:44 <Uniaika> "point d'interrogation"
14:44 <Uniaika> indeed, OliverMT :D
14:44 <nox> OliverMT: I mixed the two.
14:44 <nox> You can say interrogation point,
14:44 <nox> or question mark.
14:45 <nox> Wikipedia says you can say "eroteme" too,
14:45 <nox> if you want to sound more photosynthesis.
14:45 <Uniaika> sexy.
14:47 <aeliton> I'll start to try sound more photosynthetic from now on.. lol
14:47 <ciawal> o_O
14:48 <ciawal> what is this, an irc channel for plants?
14:49 johanw joined
14:52 <nox> aeliton, ciawal: https://twitter.com/itswillyferrell/status/458039960164392960
14:53 mark_66 joined
14:55 steffkes joined
14:55 steffkes joined
14:55 rafaqueque joined
14:58 rafaqueque joined
15:00 hahuang61 joined
15:01 griffinbyatt joined
15:02 ignacio_ joined
15:02 celyr joined
15:07 sillyotter joined
15:10 DeadTrickster joined
15:12 scarfacedeb joined
15:12 <nyaray> barttenbrinke: were you working with iolists, when you posted that snippet earlier?
15:13 Ven joined
15:16 celyr joined
15:18 dani0_ joined
15:18 rschmukler joined
15:18 jmiven joined
15:21 <barttenbrinke> nyaray: iolists?
15:23 <nyaray> lists of integers (ascii codes), binaries and iolists
15:24 <nyaray> I thought you knew about them given that you return lists of what I assume to be strings
15:24 <nyaray> but then again, you might be joining them.
15:25 dvim joined
15:25 greengriminal joined
15:26 cdg joined
15:28 cemilowski joined
15:30 teddysmoker joined
15:33 montanonic joined
15:35 celyr joined
15:42 dimitarvp` joined
15:48 <nyaray> barttenbrinke: anyway, here's a suggestion that's been bothering me since lunch, haha https://gist.github.com/nyaray/a3705f2902ef30ffad60e1a7bf592e88
15:49 l14n joined
15:50 <nyaray> (I was in the middle of writing it down when a co-worker was ready to resume pair programming)
15:50 amclain joined
15:53 execb5 joined
15:55 celyr joined
15:55 davidw joined
15:57 Gasher joined
15:59 logos[m] joined
16:00 racycle joined
16:02 griffinbyatt joined
16:02 greengriminal joined
16:08 <wwwd> I'm use 'mix phoenix.gen.html Pet pets person_id:references:persons name:string species:string breed:string gender:string neuter:boolean dob:Ecto.DateTime.utc weight:integer microchip:string' but it is telling me '** (Mix) Unknown type `Ecto.DateTime.utc` given to generator'. Before I ran it with 'Ecto.DateTime' I used dob:datetime. That put the line 'field :dob, Ecto.DateTime' in my model and gave me a non-functional date picker like
16:08 <wwwd> 'Dob / / — :'. Can anyone tell me, what is the correct datetime format for this?
16:10 celyr joined
16:11 <wwwd> Also, the Ecto.DateTime type in my model is causing a Compilation error "** (ArgumentError) invalid type #Ecto.DateTime<2017-03-24 16:09:17> for field :dob"
16:12 <benwilson512> wwwd: just use the DateTime type
16:12 <wwwd> In the generator or the model? Or both?
16:13 <benwilson512> both, if you're on 1.4 it's best to just use the built in types
16:14 <wwwd> I thought the bult in type was 'utc_datetime' but both 'datetime' & 'utc_datetime' are '** (CompileError) web/models/pet.ex:10: undefined function utc_datetime/0'
16:15 burbas joined
16:15 <benwilson512> you don't want functions
16:16 <benwilson512> https://hexdocs.pm/ecto/Ecto.Schema.html#module-types-and-casting
16:16 <benwilson512> :utc_datetime
16:17 chriswarren joined
16:17 meh` joined
16:17 chriswarren joined
16:18 greengriminal joined
16:18 ZippoWeb2 joined
16:18 chriswarren joined
16:19 chriswarren joined
16:20 chriswarren joined
16:21 ZippoWeb3 joined
16:24 celyr joined
16:25 <wwwd> Sorry, new to elixir! Just out of curiosity...how would I tell the generator to use utc_datetime? It will accept 'dob:datetime' but not 'dob:utc_datetime'.
16:25 <benwilson512> I'm not sure sorry, I've never used the generators
16:25 shankardevy joined
16:27 chriswarren joined
16:27 <wwwd> Ok, thanks for your help!
16:28 tuacker joined
16:28 drincruz joined
16:29 <gazler> benwilson512: wwwd utc_datettime should be valid in the 1.3 generators https://github.com/phoenixframework/phoenix/blob/506ffb37a66813cc988a3618a0d48cec7a410e04/lib/mix/phoenix/schema.ex#L36
16:29 threedee joined
16:29 rschmukler joined
16:30 <wwwd> Thanks!
16:35 jbranchaud joined
16:40 jbranchaud joined
16:41 rokf joined
16:45 chriswarren joined
16:45 dani0_ joined
16:48 Ioyrie joined
16:48 celyr joined
16:52 DeadTrickster joined
16:54 chriswarren joined
16:55 celyr joined
16:55 steffkes joined
16:55 steffkes joined
16:57 squallstter joined
17:00 johnstorey joined
17:01 hahuang61 joined
17:03 griffinbyatt joined
17:03 greengriminal joined
17:06 akeating joined
17:09 akeating joined
17:13 aeliton joined
17:14 wsieroci joined
17:14 zv joined
17:15 celyr joined
17:18 TheFirstAvenger joined
17:20 <TheFirstAvenger> Running a simple Phoenix 1.3 app, put a js file in assets/static/js/ and the files are copied to priv/static correctly when I run in dev mode, but mix phx.digest does not copy them for prod
17:21 chriswarren joined
17:29 celyr joined
17:29 qqwy joined
17:29 cdg joined
17:29 alex88_ joined
17:30 <qqwy> Hey hey, everyone :-)
17:30 rozap joined
17:30 chriswarren joined
17:32 <rozap> any ecto folks around? i'm seeing really weird behavior - when this query is being interpreted it fails, but when compiled and run it succeeds..
17:33 <rozap> https://gist.github.com/rozap/ad1b63d074302c7600c2564b4e1af8fa
17:34 DeadTrickster joined
17:34 jbranchaud joined
17:34 <rozap> so it fails in my tests, and in the repl, but works fine in real life...
17:35 <rozap> it seems like somehow the subquery is getting reduced when it's compiled? or something?
17:35 ignacio_ joined
17:37 montanonic joined
17:37 <rozap> omg
17:38 <rozap> as per the laws of the universe, you need to ask a question in IRC before you realize you're being a massive idiot; ignore the issue i raised above
17:39 wtetzner joined
17:41 <benji> so true, rozap
17:42 hahuang61 joined
17:43 <nyaray> that's some true life wisdom right there
17:44 celyr joined
17:49 chriswarren joined
17:49 ZippoWeb3 joined
17:50 <vans163_> rozap: +1
17:58 celyr joined
17:59 rokf joined
18:00 chriswarren joined
18:00 osxi_ joined
18:02 steffkes joined
18:02 Haydos joined
18:02 Haydos joined
18:03 <Ioyrie> we all need to vocalize our idiocy to realize its absurdity
18:06 dani0_ joined
18:07 griffinbyatt joined
18:09 travis-ci joined
18:09 <travis-ci> elixir-lang/elixir#14064 (master - eb0f3ea : Eksperimental): The build passed.
18:09 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/97810dd836a9...eb0f3ea6eb0b
18:09 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/214747155
18:09 travis-ci left
18:11 nanohest joined
18:12 celyr joined
18:14 jbranchaud joined
18:15 icanhazbroccoli joined
18:16 execb5 joined
18:16 wwwd joined
18:17 jbrancha_ joined
18:18 ikcerog joined
18:18 dani0_ joined
18:19 <TheMoonMaster_> that retweet spam D:
18:19 <smeevil> o.O
18:20 elyxir joined
18:20 <elyxir> hi
18:21 <smeevil> o/
18:21 <elyxir> Would you guys please tell, why is many people care and like elixir so much? And how did elixir success in such small amount of time? All these books written about it.
18:24 <elyxir> You know what, I really have to try it by myself to see what heck it is. I am very excited, I will start from now on :)
18:24 TarVanim_ joined
18:25 <vans163_> elyxir: Its a parallel question as the dangers of dihydrogen monoxide. Its been around forever but only recently have we started to discover the dangers about it. https://www.lhup.edu/~dsimanek/dhmo.htm In the case of elixir replace occurances of dangers with benefits.
18:26 <andman> elyxir: https://ruby2elixir.github.io/posts/2015/12-29-what-makes-elixir-so-attractive-for-some-developers.html seems to be a nice compilation of answers to that question by various people
18:27 johnstorey joined
18:27 cdg joined
18:28 <smeevil> vans163_ aye more people need to be informed about dihydrogen monoxide, see https://www.facebook.com/TheMothershipofAllNerds/posts/224385681299675
18:28 johnstorey joined
18:28 <wwwd> So, added a person_id to my session with 'conn = put_session'. I know it is there because caused an "KeyError at POST /persons" with "IO.inspect(conn.person_id)". How do I use my person_id?
18:29 <wwwd> What is the "cookie" in "get(conn, cookie, opts) in https://hexdocs.pm/plug/Plug.Session.COOKIE.html#get/3?
18:29 celyr joined
18:29 celyr joined
18:30 <wwwd> Can I just say person_id = get(conn, cookie) and then use the var?
18:30 drincruz joined
18:30 greengriminal joined
18:31 refriedchicken joined
18:32 dani0_ joined
18:35 <Gasher> hi, is there no classic elsif in elixir?
18:36 jkreeftmeijer joined
18:36 <vans163_> Gasher: cond do .. end
18:37 <vans163_> but it wont be the same yea
18:37 <vans163_> you wont be able to evaluate functions in the cond
18:37 <micmus> cond or multiple pattern matching. Given how rarely if is used in elixir, elseif, would be very rare ;)
18:37 <micmus> vans163_: you will, cond allows for full boolean expressions
18:38 <Gasher> thanks
18:38 <wwwd> Elixir is so cool!
18:38 <micmus> vans163_: e.g. https://github.com/elixir-lang/elixir/blob/50293b46f13a86328f0ffabdcbb8592e29ac24c6/lib/mix/lib/mix/tasks/loadconfig.ex#L23
18:40 rschmukler joined
18:41 racycle joined
18:43 <vans163_> micmus: interesting.. is that an elixir only thing?
18:43 <vans163_> cond do :os.type() == {:unix,:linux} -> :'really?' end
18:43 <vans163_> afaik erlang cant do that.. unless it can and I never knew?
18:44 celyr joined
18:45 <micmus> vans163_: yes, that's elixir only. cond is a special construct
18:45 markh joined
18:46 <vans163_> micmus: really useful to know thanks
18:46 <micmus> it's useful sometimes
18:46 <micmus> case is generally preferred, though
18:46 <vans163_> sometimes for complex logic I find myself wanting it, often I notice with validators before writing to db
18:47 <vans163_> you need to do a bunch of checks and cases to protect vs spoofed packets
18:47 <vans163_> packets/requests
18:48 <vans163_> cond do valid_user(uuid) == false -> :fail_user_valid; valid_target(uuid_target) == false -> :fail_.. etc
18:48 <vans163_> in erlang you cant do that in the cond itself, so you need to write all the checks outside, then usually do an if and compare
18:49 JuanMiguel joined
18:50 travis-ci joined
18:50 <travis-ci> elixir-lang/elixir#14065 (master - f128d20 : Andrea Leopardi): The build passed.
18:50 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/eb0f3ea6eb0b...f128d209d0c7
18:50 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/214761005
18:50 travis-ci left
18:50 hxegon joined
18:51 drincruz joined
18:51 PaReeOhNos joined
18:52 PaReeOhNos joined
18:53 PaReeOhNos joined
18:54 PaReeOhNos joined
18:54 PaReeOhNos joined
18:55 mattyw joined
18:55 PaReeOhNos joined
18:55 lexmag joined
18:56 icanhazbroccoli joined
18:56 PaReeOhNos joined
18:57 PaReeOhNos joined
18:58 PaReeOhNos joined
18:58 celyr joined
18:58 PaReeOhNos joined
18:59 PaReeOhNos joined
18:59 travis-ci joined
18:59 <travis-ci> elixir-lang/elixir#14066 (master - 7615d42 : Andrea Leopardi): The build was broken.
18:59 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/f128d209d0c7...7615d420af1f
18:59 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/214764124
18:59 travis-ci left
19:00 PaReeOhNos joined
19:00 dp[m] joined
19:01 hendi joined
19:01 PaReeOhNos joined
19:01 zkat joined
19:01 Yonk_ joined
19:02 PaReeOhNos joined
19:02 sillyotter joined
19:02 PaReeOhNos joined
19:03 PaReeOhNos joined
19:04 mmun joined
19:04 PaReeOhNos joined
19:05 PaReeOhNos joined
19:05 fishcakez joined
19:06 PaReeOhNos joined
19:06 PaReeOhNos joined
19:07 PaReeOhNos joined
19:07 wsieroci joined
19:08 PaReeOhNos joined
19:09 PaReeOhNos joined
19:10 PaReeOhNos joined
19:10 PaReeOhNos joined
19:11 PaReeOhNos joined
19:12 rschmukler joined
19:12 PaReeOhNos joined
19:13 celyr joined
19:13 PaReeOhNos joined
19:14 luke_nukem joined
19:14 PaReeOhNos joined
19:15 PaReeOhNos joined
19:15 ignacio_ joined
19:16 PaReeOhNos joined
19:16 PaReeOhNos joined
19:17 johnstorey joined
19:17 PaReeOhNos joined
19:18 PaReeOhNos joined
19:19 PaReeOhNos joined
19:19 PaReeOhNos joined
19:20 PaReeOhNos joined
19:25 ikcerog joined
19:26 cdg joined
19:27 <cfk> anyone read the new book? https://elixirforum.com/t/new-pragprog-elixir-phoenix-book-out-today/4231
19:27 <cfk> or started
19:37 griffinbyatt joined
19:38 jkreeftmeijer joined
19:40 squallstter joined
19:42 celyr joined
19:43 execb5 joined
19:44 amosbird joined
19:44 rschmukler joined
19:47 davidw joined
19:50 foli joined
19:52 markh joined
19:56 nanohest joined
19:57 celyr joined
19:59 kyrix joined
19:59 <barttenbrinke> Is there a simple way to do parameter validation in a Phoenix update action in a Controller?
20:00 <barttenbrinke> Right now I match the params and then feed that to my manager
20:00 <barttenbrinke> But there must be a nicer way :)
20:08 steffkes joined
20:08 steffkes joined
20:08 execb5 joined
20:11 celyr joined
20:17 foli joined
20:21 PaReeOhNos joined
20:28 gvaughn_ joined
20:29 icanhazbroccoli joined
20:31 celyr joined
20:32 steffkes joined
20:32 steffkes joined
20:33 cdg joined
20:34 davidw joined
20:35 wtetzner joined
20:35 Guest67_ joined
20:36 ikcerog joined
20:37 icanhazbroccoli joined
20:37 griffinbyatt joined
20:38 jdqx joined
20:45 celyr joined
20:48 cdg joined
20:51 icanhazbroccoli joined
20:55 gvaughn_ joined
20:57 ramblinpeck joined
20:58 joshdholtz joined
21:02 <dongo> For some reason, "use strict"; is inserted at the top of all JS files in my Phoenix project. Is there any way to stop this?
21:04 griffinbyatt joined
21:05 celyr joined
21:16 Uniaika joined
21:23 montanonic joined
21:24 celyr joined
21:26 travis-ci joined
21:26 <travis-ci> elixir-lang/elixir#14069 (master - 6311c03 : Andrea Leopardi): The build was fixed.
21:26 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/7615d420af1f...6311c0313ea4
21:26 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/214807383
21:26 travis-ci left
21:32 <asonge> dongo: that's probably done by brunch, and it is not a bad idea.
21:34 <asonge> it lets the javascript VM in the browser make assumptions about your code that can make certain things into errors (prevents inadvertent creation of globals, prevents writing to read-only properties)
21:35 <beatpanic> cfk: yes, I read it
21:38 montanonic joined
21:39 celyr joined
21:39 celyr joined
21:40 <dongo> asonge: yeah I mean it's good and all, but brunch can't compile on of the deps I'm pulling in
21:41 <asonge> there's a process called vendoring or something (I don't really use brunch outside of the npm ecosystem)
21:48 jkreeftmeijer joined
21:49 ignacio_ joined
21:50 <cfk> beatpanic: is it any good?
21:53 celyr joined
22:03 lexmag joined
22:06 celyr joined
22:07 <beatpanic> cfk: for me personally, it's really worth to read . It is helping me to think about stateful processes with deps between them
22:07 chriswarren joined
22:07 chriswarren joined
22:08 chriswarren joined
22:09 chriswarren joined
22:10 chriswarren joined
22:11 markh joined
22:11 chriswarren joined
22:11 chriswarren joined
22:12 chriswarren joined
22:13 chriswarren joined
22:19 stephen_m joined
22:21 celyr joined
22:22 stephen_m joined
22:24 emerson joined
22:28 chriswarren joined
22:35 celyr joined
22:38 griffinbyatt joined
22:38 gokr joined
22:40 laut joined
22:46 chriswarren joined
22:48 NeverDie joined
22:53 Confiks joined
22:54 <Confiks> I see the Debian Jessie offers quite up to date version of Erlang. Does anybody know if it's necessary to use the Erlang Solutions repository, or would I be fine using the default Debian Jessie packages?
22:54 nahtnam joined
22:55 <iFire> Confiks: I think you should lock your Erlang to a version.
22:57 <benwilson512> Confiks: I would use asdf or kiex to install erlang / elixir, the linux package manager versions are generally not so great
22:57 <benwilson512> and rarely up to date
22:58 <Confiks> Alright, thanks
22:58 celyr joined
22:58 duane joined
23:03 <johnhamelink> What do you guys use for fixture data? I'm writing some tests for a service module which will require quite a lot of different records in the database, and the prep work before building the test is gonna be... laborious to say the least, lol.
23:05 chriswarren joined
23:06 <ciawal> I think there is ex_machina which seemed good for factory stuff
23:08 <Radar> Reading Functional Web Programming by Lance Halvorsen, and there's this code: https://gist.github.com/radar/7a52d081a70186fec26390f8ca342ad3. Why would he be using a case statement instead of an if one?
23:08 griffinbyatt joined
23:09 <johnhamelink> ciawal :: is building fixtures the correct way of thinking about solving this problem in Elixir?
23:12 <ciawal> I think that's really dependant on your situation rather than the language
23:12 wtetzner joined
23:14 chriswarren joined
23:16 vendethiel joined
23:18 chavito joined
23:22 MrBin joined
23:23 chriswarren joined
23:24 <Ankhers> Radar: Probably just a style preference.
23:26 <Ankhers> Radar: Some people seem to be quite averse to using `if` in Elixir.
23:27 gazler_ joined
23:32 <Radar> Ankhers: I think that's the case. `if` is really suitable here imo
23:32 <Radar> no pun intended.
23:32 celyr joined
23:32 <Ankhers> Radar: I agree. I use if in my own code for only true and false values. For everything else I use either cond or case.
23:32 <Ankhers> But to each their own I suppose.
23:33 sbs joined
23:34 <sbs> hello
23:36 dch_ joined
23:37 DLSteve joined
23:43 Gasher joined
23:47 celyr joined
23:51 jkreeftmeijer joined