<    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:19 ikcerog joined
00:19 CapNemo joined
00:21 nomicflux joined
00:26 luke_nukem joined
00:30 bontaq joined
00:32 gvaughn_ joined
00:33 vicsy joined
00:33 <vicsy> hi
00:36 vicsy left
00:37 luke_nukem joined
00:38 wtetzner joined
00:41 bungoman joined
00:42 charlenopires joined
00:47 nomicflux joined
00:54 sfaxon joined
00:54 rschmukler joined
00:55 gvaughn_ joined
00:58 <cmk_zzz> Can I have a different name of the primary_key in ecto and still have autogenerate? I've managed to have a different name but must manually insert the id. my schema has @primary_key{:myid, :id, [autogenerate: true]}
01:05 io_bora joined
01:05 <cmk_zzz> I guess I need to fix the migration to insert a sequence and then autoincrement it somehow
01:07 raycoll joined
01:07 shymega joined
01:08 gvaughn_ joined
01:14 Lyubo1 joined
01:17 charlenopires joined
01:18 charlenopires joined
01:18 <cmk_zzz> found it. I had to use type of :serial instead of :id in the migration
01:19 charlenopires joined
01:19 charlenopires joined
01:20 charlenopires joined
01:21 sevenseacat joined
01:23 miwa joined
01:30 wwwd joined
01:34 io_bora joined
01:34 jeffweiss joined
01:39 <wwwd> smeevil: I have a question re: our conversation the other night. Do you have time.
01:39 tomterl joined
01:40 io_bora joined
01:45 nighty- joined
01:49 rschmukler joined
01:55 hipertracker joined
02:01 montanonic joined
02:01 hugo` joined
02:15 io_bora joined
02:15 chavito joined
02:45 raycoll joined
02:58 racycle joined
03:02 mrogne left
03:13 vendethiel- joined
03:24 slackbotgz joined
03:37 rschmukler joined
03:49 chrismccord joined
03:55 justicefries joined
03:59 Dakora joined
04:08 Blkt joined
04:09 <Dakora> chrismccord: so now that we have contexts, the default generators are playing it basic with tables, such as my context of Users having users, which turns into users_users for the table name. how extensive would the changes be to de-duplicate this?
04:09 <chrismccord> Dakora a Users context likely doesn't make sense
04:10 <chrismccord> Users.User is certainly not what you want. I think we actually raise in this case on the latest rc
04:10 <chrismccord> think carefully about that boundary in your system, there is definitely a better name there and scope for that part of your app
04:10 refriedchicken joined
04:10 <Dakora> the way my structure is laid out i actually have a quite a bit under my users' cotnext
04:10 <chrismccord> what is there?
04:11 <chrismccord> I would probably name it `Accounts`
04:11 <Dakora> okay that does sound a bit better for some things
04:12 <Dakora> my system separate emails from physical "accounts" as it were, since they can have multiple addresses per account, and verification is generally done before an account is created
04:12 <Dakora> how should i go about naming the general "account" entry for the account? i.e. what stores their password, name etc?
04:13 <Dakora> Accounts>Details are something?
04:13 <Dakora> or*
04:16 <Dakora> i can't really think of a good root level model name for Accounts come to think of it. Details, Information(s), Logins, just don't seem to *flow* as well as Account
04:16 <Dakora> but that leads me back to Accounts_accounts again
04:17 <Dakora> unfortunately the articles i'm basing off of here about the new update has contexts along the line of Users
04:17 <fishcakez> gazler: i think it makes sense for someone wanting to use cowboy 2 to make a cowboy2 hex package if maintainers of cowboy package won't push prerelease
04:18 <fishcakez> Cowboy 2 is likely to be in pretty release for quite a while and you offer nothing to back up your recommendation
04:20 <fishcakez> It's likely that someone starting to use cowboy in Erlang is going to pick up 2 and ppl will want to try http2
04:20 <Dakora> chrismccord: is there a general name scheme for the root level model in use among the phoenix community?
04:20 <Dakora> i can't seem to find any of the articles discussing 1.3 now
04:20 <chrismccord> Dakora : Account.Identity ?
04:21 <Dakora> hmm
04:22 <Dakora> it seems to be the best fit currently :P thanks chrismccord
04:22 <chrismccord> for idenity based auth, I use that naming
04:22 <chrismccord> it gives you things like multiple identities pointing to the same user, ie authetnicating via email+pass, twitter, fb, random oauth
04:22 <Dakora> chrismccord: would it be taboo to not have the context pluralized? Accounts doesn't flow well with some of the names
04:23 <fishcakez> gazler: i think it is unfortunate not to push the cowboy pretty releases because elixir/erlang is far behind on http2 and not publishing reduces barrier to entry. It doesn't matter for plug because of semver.
04:23 <Dakora> but Account does flow with all of them
04:23 <chrismccord> Dakora : not at all, name it however you like
04:23 <fishcakez> s/pretty/pre
04:23 <chrismccord> Dakora : context is literally just a well-named module so name it the best for your application
04:23 <chrismccord> not conventions to follow there other than "name it well" :D
04:23 <chrismccord> no*
04:24 <Dakora> sounds good to me :D
04:24 jeffweiss joined
04:27 gvaughn joined
04:30 <fishcakez> gazler: (note i have vested interested in publishing package using cowboy 2 pre release​ as dep so would likely publish cowboy2 next week)
04:31 io_bora joined
04:31 jkreeftmeijer joined
04:33 <Dakora> chrismccord: what about context boundaries for various "tokens" that apps use, like email verification, api login, password resets? i'm generally thinking of these all as "tokens" right now, but it seems kludgy both ways of implementing it (Account>Token or Tokens>Identity)
04:35 <Dakora> having a general Tokens context seems the least kludgy right now, and saves me from having to separate account identities and emails into their own contexts (as well as not needing a kludge for api tokens)
04:35 <chrismccord> Dakora : It's tough to say without a full picture of your app, but something like `Account.reset_password(token, new_pass: ..., new_pass_conf: ...)`
04:36 <chrismccord> Same thing as Account.authenticate(...)
04:36 <Dakora> so instead of having separate tables for tokens, just have a field on the applicable resource?
04:36 <chrismccord> I don't see a need for a sep boundary
04:36 <Dakora> well except for api tokens
04:36 <chrismccord> Dakora : you can have a separate token table
04:36 <Dakora> that's kind of a special case
04:37 <chrismccord> API tokens still are backed by some account, no?
04:37 <Dakora> i originally designed around a unified token table but that ruled out being able to use inter-table references
04:37 Ninja3047 joined
04:37 <chrismccord> that's fine, the table is an impl detail
04:37 <Dakora> along the lines of resource id, token type, etc
04:38 <chrismccord> but the api boundaries that access that table should be well defined
04:38 <Dakora> ok i think i've got something here: a seperate tokens thinger in the account context for api tokens, and a field for identities and emails
04:39 <chrismccord> If you feel there is a Tokens boundary, that's fine too, and there's nothing wrong with the Account boundary calling into it
04:39 <Dakora> that would properly couple tokens with their resources without having to unncessarily cross boundaries for related things
04:40 raycoll joined
04:42 harrow joined
04:42 ivan joined
04:43 io_bora joined
04:44 nextloop joined
04:52 io_bora joined
05:01 io_bora joined
05:03 griffinb_ joined
05:09 dec0n joined
05:15 qq joined
05:15 ciawal joined
05:25 meandi_2 joined
05:26 rschmukler joined
05:29 chrismccord joined
05:30 io_bora joined
05:31 dylan1 joined
05:32 alakra joined
05:33 jkreeftmeijer joined
05:33 C0deMaver1ck joined
05:33 utkarsh joined
05:33 kennyp joined
05:34 chrismccord joined
05:34 shamanime joined
05:34 meredith joined
05:34 webnanners joined
05:34 vnz joined
05:34 vnz joined
05:35 machuga joined
05:35 amontalenti joined
05:39 gokr joined
05:42 chrismccord joined
05:52 icanhazbroccoli joined
05:56 montanonic joined
05:57 tofutoon joined
05:58 gvaughn joined
05:58 wsieroci joined
05:59 jkreeftmeijer joined
06:09 cemilowski joined
06:09 chrismccord joined
06:09 proteusguy joined
06:09 cemilowski left
06:11 io_bora joined
06:12 m_m joined
06:20 rschmukler joined
06:21 Duckily joined
06:22 vendethiel joined
06:26 l14n joined
06:31 arquebus joined
06:31 SouvikB joined
06:31 carterparks joined
06:33 chrisarcand joined
06:33 abort joined
06:34 Haydos joined
06:34 Haydos joined
06:35 io_bora joined
06:38 griffinb_ joined
06:39 <nyaray> is there something like erlang's io_lib.format/2 in elixir? I can't find it and would like to have a term printed in a ... eh... recursively readable way. currently, IO.inspect only gives like one or two levels of readability before squashing things together
06:45 tuacker joined
06:46 craigp_ joined
06:48 gokr joined
06:48 luke_nukem joined
06:48 akeating joined
06:53 imack joined
06:56 milad joined
07:01 io_bora joined
07:03 chuff joined
07:05 Guest67_ joined
07:06 milad joined
07:14 mattyw joined
07:14 cemilowski joined
07:15 rschmukler joined
07:15 vmoravec joined
07:17 tofutoon left
07:18 myers joined
07:19 marr joined
07:19 io_bora joined
07:20 m_m joined
07:21 nd__ joined
07:24 flaviodesousa joined
07:25 chrismccord joined
07:27 stephen_m joined
07:29 ZippoWeb joined
07:30 mark_66 joined
07:38 io_bora joined
07:38 sevenseacat joined
07:39 griffinb_ joined
07:39 mcspud joined
07:45 io_bora joined
07:46 gmcabrita joined
07:47 gvaughn joined
07:50 tuacker1 joined
07:54 io_bora joined
07:58 tonini joined
08:03 io_bora joined
08:04 colrack joined
08:09 ejpcmac joined
08:16 io_bora joined
08:22 m_m joined
08:27 io_bora joined
08:27 <tonini> Morning :) Alchemist v1.8.2 is OUT! Small Bugfix and Enhancement Version. https://github.com/tonini/alchemist.el/releases/tag/v1.8.2
08:36 io_bora joined
08:40 griffinb_ joined
08:42 pHcF joined
08:49 <OliverMT> I am having a GenSever.abcast stall
08:49 <OliverMT> I am calling a genserver in a handle_in
08:49 <OliverMT> and the request times out
08:50 <OliverMT> there is nothing else but the genserver call (which succeeds)
08:52 PaReeOhNos joined
08:53 akeating joined
08:54 io_bora joined
08:56 craigp_ joined
09:00 dani0_ joined
09:00 lexmag joined
09:03 rschmukler joined
09:11 thepreacher joined
09:12 josevalim joined
09:14 hbraun joined
09:16 akeating joined
09:21 dani0_ joined
09:23 marr joined
09:24 io_bora joined
09:25 HansTrashy joined
09:26 beatpanic joined
09:28 embik joined
09:29 <HansTrashy> Hi, can someone help me with cloning a nested structure in ecto?
09:29 vmoravec joined
09:30 prose[m] joined
09:30 hexkey[m] joined
09:30 m3tti[m] joined
09:30 dp[m] joined
09:30 M107262[m] joined
09:30 TheGillies joined
09:30 logos[m] joined
09:30 notriddle joined
09:30 seequ_ joined
09:30 mindflayer[m] joined
09:30 nolan_d joined
09:30 OAK0[m] joined
09:30 malteof[m] joined
09:30 uhoreg joined
09:30 wilo[m] joined
09:30 spawnthink[m] joined
09:30 technikhil[m] joined
09:30 M-Quora joined
09:30 M-nickgal joined
09:31 <HansTrashy> When i delete the id in the root element, it gets cloned, but all children are then associated to the new cloned root element and all associations from the old element are gone
09:32 <HansTrashy> Do i need to delete all ids in the nested structure, or is there a better way to achieve this?
09:35 gvaughn joined
09:39 m_m joined
09:42 io_bora joined
09:45 <asonge> HansTrashy: sooo, you might be confused about what ecto actually is. are you setting the value of the struct of the id to nil?
09:46 <HansTrashy> asonge: i only found this stackoverflow post http://stackoverflow.com/questions/38117448/clone-an-ecto-record-with-embeds-and-associated-records
09:46 <HansTrashy> and tried it that way, that somewhat works, but not for the nested elements
09:47 <HansTrashy> and it doesnt feel right\
09:47 <asonge> HansTrashy: oh, you need to go through and remove all the ids of the associated stuff...
09:47 <asonge> and you're right. it doesn't feel right because it's kinda a semantic violation.
09:48 hipertracker joined
09:48 <HansTrashy> asonge: yea, i thought there would be a way to achieve this with changesets
09:48 <asonge> i bet what happened was that ecto changed under the hood to use replace into, rather than clearing id's on associated data itself.
09:49 <asonge> (associated data inserts are one of the hackier aspects, imho)
09:49 <asonge> if i knew right off-hand where this logic was, i'd look it up to confirm...
09:49 <* asonge> tries quickly
09:50 mpsag joined
09:52 nbg joined
09:52 stephen_m joined
10:11 chuff joined
10:11 <HansTrashy> asonge: it obiously does not work the way i expected it to https://pastebin.com/ebtiCKnF
10:12 <HansTrashy> still adds the nested elements to the new cloned one
10:13 <asonge> i wonder if there's some internal piece of data in the struct that keeps its relation in order to support ids. you may just want to copy all the relevant fields from each of the preloaded structs.
10:13 <asonge> in order to support changin ids*
10:13 <asonge> *changing
10:14 <asonge> ecto is a really large library, so it's one of the few libraries that you need to be really familiar with in order to poke into :/
10:15 <asonge> an ecto expert will probably be around shortly
10:15 <HansTrashy> asonge: https://pastebin.com/sQkXnyv2
10:15 <HansTrashy> there, thats the struct after if modified it
10:16 <HansTrashy> im just questioning myself if no one else has run into this problem when cloning with ecto
10:17 <HansTrashy> or if there is an obvious way to do it and i just dont see it :)
10:17 <HansTrashy> but thanks for your help anyways
10:18 ctp joined
10:24 <gazler> sasajuric: I'm glad that https://github.com/Aircloak/phoenix_gen_socket_client is adapter based.
10:24 <asonge> HansTrashy: if you're doing a lot of cloning, it is worth questioning whether you should be using an embed instead
10:24 <sasajuric> gazler: Happy to hear :-) Do you have some other ws client you use?
10:24 <gazler> I'll probably make an h2 adapter from https://github.com/VoiceLayer/phoenix_http2_client
10:24 <asonge> (particularly if you can normalize stuff in code, because you can add indexes in postgres on top of json fields...)
10:25 <sasajuric> gazler: Ah, that sounds cool! Let me know if you're missing something in our code.
10:27 <HansTrashy> asonge: nah, its just this one structure i want to copy, maybe i will just end up creating changesets for each nested element and use ecto multi to clone the whole thing in one step
10:29 <gazler> sasajuric: Shame I didn't see your library 16 days ago, though!
10:29 <sasajuric> gazler: haha, did you write your own?
10:30 <gazler> sasajuric: Nah, I just hacked something together quickly on top of chatterbox to test the server implementation.
10:30 <m1dnight_> Is Blake Williams here by any chance? The developer of the slack package.
10:31 <sasajuric> gazler: Are you working on HTTP2 support for phoenix?
10:31 shadowjack joined
10:32 <gazler> sasajuric: I've made a start https://github.com/VoiceLayer/phoenix_cowboy2/commit/604f6e853716d6227b6945898442998349d6d981
10:32 <gazler> Bidirectional streams won't work in the browser though. :(
10:36 <sasajuric> gazler: Looks cool! You might keep out on changes to the transport abstraction, that has been pending for more than a year. José mentioned he might continue the work on that.
10:37 <sasajuric> https://github.com/sasa1977/phoenix/pull/1
10:37 <gazler> sasajuric: Great! Constant changes from both Phoenix and Cowboy! :)
10:38 <sasajuric> hehe
10:38 <gazler> Oh yeah, I remember this PR.
10:38 <sasajuric> Jose mentioned he'll do that work after 1.3, so you should be fine for a while
10:38 <gazler> It's not even worth considering until Cowboy 2 is out anyway.
10:39 <gazler> https://github.com/elixir-lang/plug/issues/258#issuecomment-274052599 - There's a few things to do for that
10:43 <m1dnight_> Im using an elixir library and i think it has a bug. I would like to fix it but I would like some help to get me started. Is that okay to ask for in an issue?
10:43 <gazler> m1dnight_: Depends on the library.
10:44 <m1dnight_> It's the slack api library. It breaks down every N weeks.
10:44 <m1dnight_> Because I _guess_ it doesn't understand some message coming from slack
10:44 <gazler> If it is an actual bug then you should raise an issue.
10:46 <gazler> Usually the author will specify in the README.md/ISSUE_TEMPLATE.md if they want something different (which Elixir, Ecto and Phoenix all do).
10:47 <m1dnight_> hrm its not specified
10:47 <m1dnight_> I'll give it a shot to see if I can discover more information. The tough thing is that it only happens after a few days/weeks
10:47 <gazler> Raising an issue is a good idea so that if anyone else encounters it, then they know they aren't alone.
10:47 griffinb_ joined
10:49 <OliverMT> I am getting timeout event triggered on a message on phoenix
10:49 <OliverMT> even if my network tab webrtc frame overview shows a non timeout message
10:50 cemilowski joined
10:51 rschmukler joined
10:53 jkreeftmeijer joined
10:54 <m1dnight_> the generic error is "State machine #<pid> has terminated" but I have no idea how I can find out which module that state machine is.
10:55 <m1dnight_> https://github.com/BlakeWilliams/Elixir-Slack/issues/120 <- this is the error im talking about currently, btw
10:55 v0j joined
11:01 nighty- joined
11:04 dani0_ joined
11:05 cemilowski left
11:07 lexmag joined
11:13 lt_kaopude joined
11:13 m_m joined
11:19 ejpcmac left
11:24 gvaughn joined
11:27 <OliverMT> m1dnight_: sasl logger
11:27 <OliverMT> it will show you when processes go down and up and often why
11:28 rschmukler joined
11:37 meh` joined
11:45 proteusguy joined
11:50 cristianR_ joined
11:51 akarambir joined
11:56 flopsec joined
11:56 mcspud joined
11:59 hipertracker_ joined
12:01 jkreeftmeijer joined
12:01 hipertracker_ joined
12:01 asabil joined
12:03 jkreeftmeijer joined
12:06 mark_66 joined
12:13 fernandomm joined
12:17 <HansTrashy> asonge: hey, if you are interested how i solved the whole thing: https://pastebin.com/mmJJkzPK doesnt feel really great, but at least it works
12:21 dideler joined
12:22 dideler joined
12:34 hipertracker joined
12:34 beilabs_ joined
12:35 griffinb_ joined
12:37 <benwilson512> why are you cloning stuff?
12:37 <benwilson512> or is `clone` a noun?
12:38 beilabs joined
12:39 <HansTrashy> the protocols are used for weekly meetings
12:39 <HansTrashy> and each week the protocol should only be modified
12:39 nomicflux joined
12:43 hipertracker joined
12:43 <benwilson512> right I see I guess I'm trying to figure out what the `clone_topics` is doing
12:44 <benwilson512> how does it differ from just `protocol.topics` ?
12:44 robinsjdotcom joined
12:46 m_m joined
12:49 hashpuppy joined
12:54 <HansTrashy> benwilson512: its missing the relation stuff thats in protocol.topics
12:55 <benwilson512> I see, so you're doing that to get rid of a key?
13:00 <ciawal> what's the secret to bailing out of an iex instruction when you've messed up the syntax
13:00 <ciawal> without quitting iex
13:01 <micmus> I think #iex:break
13:01 <micmus> but I always forget
13:01 <benwilson512> micmus: likewise.
13:02 <ciawal> seems like it should be one of the ^C options
13:02 <micmus> I tend to go to the Ctrl-G menu and interrupting the shell
13:02 <benwilson512> IIRC that drops down to a low level erlang thing
13:02 <benwilson512> ah yeah ctrl g is super useful
13:02 <micmus> Ctrl-G; i; c; will interrupt the shell and reconnect to it
13:03 <micmus> ; is enter
13:03 milad joined
13:03 <ciawal> ah nice
13:03 <ciawal> I didn't know about Ctrl-g
13:04 <ciawal> there's no feedback when you use i which is odd
13:04 PaReeOhNos joined
13:04 Or1on joined
13:04 <micmus> yeah, it shows when you reconnect, though
13:07 jkreeftmeijer joined
13:07 v0j joined
13:10 ikcerog joined
13:11 sfbw joined
13:12 gvaughn joined
13:13 inoas joined
13:14 bin7me[m] joined
13:16 rschmukler joined
13:25 superherointj joined
13:27 ramortegui joined
13:28 chuff joined
13:39 cemilowski joined
13:39 griffinb_ joined
13:45 cemilowski joined
13:50 gvaughn joined
13:51 v0j joined
13:52 rschmukler joined
13:56 cemilowski joined
14:01 threedee joined
14:02 robinsjdotcom joined
14:04 jkreeftmeijer joined
14:06 PaReeOhNos joined
14:08 robinsjdotcom joined
14:09 threedee joined
14:11 harfangk joined
14:12 maxbeizer joined
14:15 josevalim joined
14:15 <gazler> fishcakez: I just stumbled upon your message about cowboy 2, was it related to that github issue?
14:16 jerel joined
14:18 <gazler> Specifically this for those playing along at home https://github.com/ninenines/cowboy/issues/1146
14:19 jkreeftmeijer joined
14:20 cdg joined
14:24 cdg joined
14:25 m_m joined
14:28 livz joined
14:30 cemilowski left
14:33 mcspud joined
14:33 Tallys__ joined
14:36 jschneck joined
14:41 rschmukler joined
14:44 racycle joined
14:48 v0j joined
14:49 Guest67_ joined
14:49 amclain joined
14:51 PaReeOhNos joined
14:54 <jschneck> fishcakez I just want to make it known that I am present and also question-less
15:03 cdg joined
15:09 mitchellhenke joined
15:13 v0j joined
15:17 PaReeOhNos joined
15:21 raycoll joined
15:22 nope3000 joined
15:26 chrismccord joined
15:26 <fishcakez> gazler: yes but WiFi wouldn't load github to reply there.
15:30 <gazler> Classic WiFi.
15:31 <gazler> I hadn't really considered the dependency as an issue. Most people who require GitHub dependencies specify it in the readme.
15:35 dani0_ joined
15:35 jarray52 joined
15:36 InternetFriend joined
15:37 tuacker joined
15:37 jkreeftmeijer joined
15:38 jarray52 left
15:41 griffinb_ joined
15:43 meh` joined
15:48 hipertracker joined
15:50 rschmukler joined
15:53 InternetFriend joined
15:59 chuff joined
16:00 jeffweiss joined
16:03 Guest67_ joined
16:03 <fishcakez> gazler: i want hex dep so i can publish on hex, with cowboy2 as dep of dep
16:04 m_m joined
16:04 <gazler> fishcakez: I understand that. I was just saying that often when that's not possible people specify the github path in the installation instructions.
16:05 <fishcakez> gazler: but versions are released
16:05 <fishcakez> And git dep won't work
16:05 chriswar_ joined
16:06 <fishcakez> For using the lib it will be dep of dep, so if you don't publish, i have no choice but to publish cowboy2
16:06 jkreeftmeijer joined
16:06 <gazler> That's what I mean, most people in that case will specify to include the git dependency in the installation instructions.
16:07 chriswa__ joined
16:08 <gazler> So it'd say add `[{:fishcakez_stuff, "> 0.0.0}, {:cowboy, github: "ninenines/cowboy", tag: "2.0.0-pre.7"}]` to your mix.exs
16:08 <gazler> I'm not saying that's what you should do btw. Just that I have seen others do it.
16:10 <fishcakez> gazler: ok but that doesn't work for hex
16:10 <fishcakez> I don't understand why you won't publish prereleases
16:10 <gazler> fishcakez: I know. That's why it includes the dependency from github.
16:11 <fishcakez> The author of the lib recommends it for new projects
16:11 <fishcakez> Because of semver it will work perfectly
16:13 ikcerog joined
16:14 <gazler> I don't mind pushing a pre-release if there's a need. Yesterday was the first time someone asked. Your use case is the first without a simple workaround.
16:17 elixir12932 joined
16:18 <gazler> fishcakez: It might not work though.
16:19 <gazler> https://github.com/ninenines/cowboy/blob/master/rebar.config#L2 it depends on cowlib master
16:19 <elixir12932> New to elixir, but I just came across one unexpected thing that makes me so happy: I don't have to require files as one does in ruby in order to use a function defined in another file. Holy shit this is wonderful.
16:19 <elixir12932> Is this simply a benefit of a compiled language?
16:23 shankardevy joined
16:23 racycle joined
16:27 <fishcakez> gazler: ah ffs loic
16:27 <fishcakez> gazler: ok it seemed like you were saying you weren't going to
16:27 <benwilson512> elixir12932: welcome! sorta, `mix` is Elixir's build tool and it's handling a lot of that for you behind the scenes
16:28 <benwilson512> elixir12932: basically in a mix project it knows to just build and load everything inside the `lib` directory
16:28 <benwilson512> fishcakez: what's up?
16:28 <elixir12932> benwilson512: yeah, it's just so much more straightforward than say, ruby
16:29 <benwilson512> elixir12932: I agree, mix is a breeze to use
16:29 <benwilson512> you also never end up with the whole "version BLAH of some gem has been activated, but it says version FOO in gemfile"
16:29 <micmus> I'd say it's primarily thanks to separating the structure of code as source files, from structure of code at runtime
16:29 <micmus> at runtime you have modules - it doesn't matter in which file they are defined
16:30 <fishcakez> benwilson512: i wanted to publish a graphql only webserver that uses cowboy 2 stream handlers to manage phases and only do concurrency with batching
16:31 <benwilson512> fishcakez: oh cool, you going forward with that
16:31 <fishcakez> But it's very much work in progress as only had 4 hour on it so far
16:31 <fishcakez> Just to experiment, it should be much faster than using plug on cowboy2
16:32 <benwilson512> very cool
16:32 <benwilson512> do you know anything about the relative performance of cowboy2 vs elli?
16:33 <gazler> benwilson512: Surely the answer to that is it depends. That's always the answer.
16:33 <fishcakez> Well Elli will be much faster than plug on cowboy2 for http1 but once your plugs do enough work it shouldn't matter
16:33 MaSven joined
16:33 <benwilson512> yea fair
16:33 <fishcakez> Plug is way more overhead than elli
16:34 <benwilson512> so what does cowboy2 + graphql get you vs cowboy2 + plug + graphql
16:34 <benwilson512> just the removal of the plug overhead?
16:34 <fishcakez> Plug gives suboptimal concurrency
16:34 <benwilson512> ah interesting
16:34 <fishcakez> If you want to call it overhead yes
16:34 <fishcakez> On cowboy 2
16:35 <shankardevy> trying to follow this official guide on running migrations from a distillery release: https://hexdocs.pm/distillery/running-migrations.html#content
16:35 <micmus> From related things: I'm working on a generic type + validations lib hoping to define a low-level lib that could be later used by ecto, and maybe absinthe too - I don't like it that those libs do very similar things (when it comes to data conformance) in slightly different ways
16:36 mcspud joined
16:36 <shankardevy> my release doesn’t have the migration files in priv
16:36 <micmus> and that you have to repeat the definitons over & over again
16:37 <shankardevy> so even thought the migration task says it’s is already up, tables don’t get created. Should I follow additional steps in getting the migrations files into my release?
16:38 <shankardevy> bitwalker: could you pls throw some light if you are available?
16:40 <fishcakez> benwilson512, gazler: ofc cowboy2 is infinitely faster for http2
16:40 <fishcakez> But if you want max performance in cowboy 2 for http1 you need to use different API
16:41 <benwilson512> fishcakez: is that API compatible with how Absinthe works?
16:41 <fishcakez> benwilson512: i think i added one small feature to pipeline phase returns
16:41 griffinb_ joined
16:41 <benwilson512> awesome, I'm excited to see what this looks like
16:42 <fishcakez> But batching doesn't do concurrency yet
16:42 <fishcakez> Er
16:42 <fishcakez> Concurrent streams
16:43 <benwilson512> are you trying to return partial results?
16:43 jschneck joined
16:44 chuff joined
16:45 <fishcakez> benwilson512: it is more to get plugins controlling concurrency, not cowboy or plug
16:45 <benwilson512> ah interesting
16:45 <bitwalker> shankardevy: if the files are in priv, then they absolutely should be in the release, priv is copied entirely
16:45 <fishcakez> I haven't got that far yet tho
16:46 <fishcakez> And for http1 it won't pay overhead price of http2 that plug has to
16:48 <shankardevy> bitwalker: I see the migration files in my release directory, but not in the .tar.gz compressed file
16:49 <shankardevy> I thought .tar.gz is the only needed file that I can copy to the server
16:50 <bitwalker> it is, what version of distillery are you using? I can do some testing to try and reproduce
16:50 montanonic joined
16:51 <shankardevy> bitwalker: version "1.3.1"
16:52 <benwilson512> shankardevy: where are you looking inside the tar.gz?
16:53 <benwilson512> if you start your app in console and do `Path.join([:code.priv_dir(:my_app), "repo", "migrations"]) |> File.ls!` what do you get?
16:55 <shankardevy> bitwalker: sorry to bother. looks like I did something wrong.
16:55 <bitwalker> shankardevy: I checked out 1.3.1 and built a release of a test app with files in priv (including nested directories), and the release tarball contains everything in priv
16:55 <bitwalker> shankardevy: no worries :)
16:55 <shankardevy> I am able to see the priv files
16:55 <shankardevy> benwilson512: thanks for the help. the files are very much there!
16:56 <benwilson512> shankardevy: no worries!
16:59 Or1on joined
17:01 <shankardevy> bitwalker: I am able to reproduce the issue again. Maybe it’s not a bug but I wanted to share with you. When I use docker to generate my release, I don’t get the priv directory contents in my release
17:03 <shankardevy> my docker file is: https://gist.github.com/shankardevy/dabaab5cd8347d7875df81ed1f257c0a
17:04 <shankardevy> and I generate the release using the command
17:04 <shankardevy> docker run -v $PWD/releases:/app/releases build-elixir /bin/bash -c "export MIX_ENV=prod && mix release --env=prod"
17:05 mcspud joined
17:05 <shankardevy> my .dockerignore file had `priv` in it ;-)
17:06 <bitwalker> ah :) yeah I've done that before, I should've asked!
17:09 bitmod_ joined
17:09 <bitmod_> can someone explain the difference between a traditional ORM and Ecto?
17:15 <benwilson512> bitmod_: well to start with, Elixir does not have objects, so there's some major differences to start with there
17:15 <benwilson512> perhaps more usefully though
17:15 <benwilson512> Ecto functionality can be sort of broadly broken up into two categories: query interface, and changesets
17:16 <benwilson512> querying with Ecto is a lot more like using an SQL DSL than an ORM
17:16 wsieroci joined
17:16 <benwilson512> the DSL gives you composability that can be difficult to achieve if just doing bare SQL strings
17:16 <asonge> benwilson512: hate to turn this into the spanish inquisition, but also migrations
17:17 <benwilson512> asonge: there's quite a few other categories yea
17:17 <benwilson512> it'd probably be best to say that I'm gonna focus on two categories :p
17:17 cd-rum joined
17:17 <benwilson512> for the purposes of illustration
17:17 <asonge> yeah
17:18 <asonge> but, i agree with everything so far as well
17:18 krigare[m] joined
17:18 <benwilson512> bitmod_: in any case the querying pattern follows a common functional programming pattern where the DSL is ultimately just about building and transforming a pure data structure: an %Ecto.Query{} struct
17:18 <benwilson512> this query, like SQL itself, can touch multiple tables and return multiple kinds of data
17:19 <benwilson512> you pass that query to your Repo, which is the thing that actually runs it against the database and returns you results
17:19 <micmus> bitmod_: it's a hard question and a bit of a hot topic. But I would personally say that the biggest difference is that the aim of ORMs is to abstract the database, while the aim of Ecto is to make working with your database of choice easier, so it's much harder to use it without knowing your database well, but you can more easily use more advanced database
17:19 <micmus> features. I heard stories about whole apps being built and the decision which database to use was left for the very end (using hiber... cough... nate...) - this is something that sounds completely ridiculous with ecto.
17:20 <benwilson512> micmus: great points
17:20 <bitmod_> benwilson512, micmus: that makes things a little clearer, thanks
17:21 <bitmod_> also, what's the benefit of using Ecto vs native SQL?
17:21 <bitmod_> (better phoenix integratoin i'm assuming, but how exactly?)
17:21 <benwilson512> bitmod_: as I hinted at a bit, raw SQL strings don't compose well cause you just have to string concat
17:21 <benwilson512> and when you're doing a lot of string concat it's easy to accidentally do sql injection
17:22 jkreeftmeijer joined
17:22 rschmukler joined
17:24 dimitarvp joined
17:24 <micmus> yeah, using ecto query syntax makes it impossible to introduce sql injection vectors in the generated queries
17:25 <bitmod_> ah ok, understood
17:25 <asonge> there's also type coercion available, and a clean place for database data to convert to elixir-friendly datastructures
17:26 <asonge> (and that can also be extended)
17:28 montanonic joined
17:29 Ioyrie joined
17:31 refriedchicken joined
17:31 Duckily joined
17:33 m_m joined
17:34 gvaughn_ joined
17:35 shankardevy joined
17:36 rschmukler joined
17:37 <alisdair> bitmod_: i was an ecto hater who is now all in with ecto
17:38 <alisdair> the benefit of using ecto for me is in changesets which present a uniform interface to data validation/input errors
17:38 <shankardevy> bitmod_: for me ORM includes business logic + database records. Ecto is pure management of data inside any storage
17:39 <bitmod_> yeah at the moment due to not understanding it too well i'm annoyed as it seems a lot more complicated than say Django's ORM, but once i understand how it works and perhaps more importantly WHY, i'm sure i'll come to appreciate it
17:40 maxbeizer joined
17:40 <benwilson512> bitmod_: from what I've heard it's a lot more like Django's ORM than say ActiveRecord
17:41 <benwilson512> but I'm not super familiar with Django so I could be wrong
17:42 griffinb_ joined
17:44 jparise joined
17:47 <Ioyrie> alisdair: what did you hate about ecto before then?
17:48 <alisdair> Ioyrie: i didn't like how much it abstracted the database
17:48 <alisdair> i wasn't comfortable with letting ecto pick my schema and handle my relations/references
17:48 <alisdair> but then i figured out how schemaless queries work and i learned to like it a lot more
17:53 mcspud joined
17:54 marten_ joined
17:54 joaomdmoura___ joined
17:54 Scorchin_ joined
17:54 filozof_ joined
17:54 wangbus_ joined
17:54 yolev_ joined
17:54 ckrailo_ joined
17:54 dvim_ joined
17:54 rvirding_ joined
17:55 besc_ joined
17:55 mroth_ joined
17:55 l1x_ joined
17:55 unrahul_ joined
17:55 tonytony1an joined
17:56 danmcclain_ joined
17:56 btyler joined
17:57 dch_ joined
17:57 chazlever_ joined
17:57 icanhazbroccoli joined
17:57 ignacio_ joined
17:58 strmpnk_ joined
17:58 chrismccord joined
17:59 seungha_________ joined
17:59 noplamodo joined
18:00 hexkey[m] joined
18:00 technikhil[m] joined
18:00 imack joined
18:01 askatasuna joined
18:01 meh` joined
18:01 gen_ale_drinker joined
18:01 elasticdog joined
18:02 ctp joined
18:02 hipertracker joined
18:18 <asonge> just to chime in way late here, django's ORM is a lot more complicated if you ever had to deal with using meta classes to tweak things...
18:18 InternetFriend joined
18:20 aeliton joined
18:22 gvaughn_ joined
18:22 squallstter joined
18:25 jkreeftmeijer joined
18:28 jeznet3 joined
18:30 ZippoWeb joined
18:33 robinsjdotcom joined
18:35 wsieroci joined
18:37 icanhazbroccoli joined
18:43 griffinb_ joined
18:44 hahuang65 joined
18:48 milad joined
18:54 rschmukler joined
18:59 kyrix joined
19:00 dani0_ joined
19:04 lexmag joined
19:04 hipertracker joined
19:05 mitchellhenke joined
19:06 hahuang61 joined
19:08 rschmukler joined
19:09 hahuang65 joined
19:09 mcspud joined
19:14 hahuang61 joined
19:19 jkreeftmeijer joined
19:22 jschneck joined
19:23 Duckily joined
19:24 m_m joined
19:26 montanonic joined
19:27 elixir-lang541 joined
19:27 <elixir-lang541> f
19:27 <elixir-lang541> f
19:27 <elixir-lang541> f
19:27 <elixir-lang541> f
19:27 <elixir-lang541> f
19:27 <elixir-lang541> f
19:27 <elixir-lang541> f
19:27 <elixir-lang541> f
19:27 <elixir-lang541> f
19:27 <elixir-lang541> iex
19:27 <elixir-lang541> iex -S mix
19:35 dani0_ joined
19:37 maxbeizer joined
19:43 refriedchicken66 joined
19:44 j0nii joined
19:49 lessless joined
19:49 mitchellhenke joined
19:50 ctp joined
19:51 griffinb_ joined
19:53 <gamache> Does anyone else find Elixir 1.4 compile times to be noticeably longer than 1.2 or 1.3?
19:55 eproxus joined
19:55 jlpeters joined
19:55 sa1 joined
19:55 aaronjensen joined
19:56 dani0_ joined
20:04 <micmus> gamache: I experienced slow compiles because of a bad erlang install, but other than that not really
20:06 mitchellhenke joined
20:07 griffinbyatt left
20:07 griffinbyatt joined
20:09 dani0_ joined
20:09 aeliton joined
20:12 hipertracker joined
20:12 rschmukler joined
20:13 rschmukler joined
20:14 hq1 joined
20:14 hq1 joined
20:14 milad joined
20:15 Uniaika joined
20:17 luke_nukem joined
20:17 cdg joined
20:20 robinsjdotcom joined
20:23 <gamache> hm ok, thanks micmus
20:23 lehoff joined
20:24 duane joined
20:25 cd-rum joined
20:25 meandi joined
20:30 NeverDie joined
20:32 <duane> is there a way to conditionally ignore a plug? i want to ignore a plug if a specific param is included for any action in a controller.
20:43 lmarlow joined
20:46 tolerablyjake joined
20:48 Lyubo1 joined
20:51 alakra joined
20:53 ikcerog joined
20:56 dch_ joined
21:00 <stephen_m> Anyone here know the inner workings of Code.eval_string?
21:01 milad joined
21:01 milad joined
21:09 fernandomm joined
21:12 hahuang61 joined
21:16 ikopico joined
21:17 mischov joined
21:18 PaReeOhNos joined
21:18 cd-rum joined
21:23 PaReeOhN_ joined
21:23 dch_ joined
21:24 chriswar_ joined
21:30 mischov joined
21:38 rschmukler joined
21:41 duane joined
21:43 jeregrine joined
21:44 PaReeOhNos joined
21:47 vircung joined
21:47 mlitwiniuk joined
21:48 askatasuna joined
21:49 rschmukler joined
21:53 PaReeOhNos joined
21:55 PaReeOhN_ joined
21:58 chriswarren joined
22:04 nd__ joined
22:05 io_bora joined
22:09 InternetFriend joined
22:09 dani0_ joined
22:12 jkreeftmeijer joined
22:12 icapurro_ joined
22:15 robinsjdotcom joined
22:21 Chezzel joined
22:24 jeregrine joined
22:37 mitchellhenke joined
22:37 [4ZM] joined
22:41 rschmukler joined
22:53 griffinbyatt joined
23:01 hipertracker joined
23:02 phansch joined
23:03 mcspud joined
23:03 ctp joined
23:07 DeadTrickster joined
23:11 m_m joined
23:13 jkreeftmeijer joined
23:15 dani0_ joined
23:21 jschneck joined
23:25 dormiens joined
23:29 josevalim joined
23:30 tolerablyjake joined
23:31 griffinbyatt joined
23:45 jeregrine joined
23:52 hipertracker joined
23:54 travis-ci joined
23:54 <travis-ci> elixir-lang/elixir#14127 (master - 63cea4f : Michał Muskała): The build passed.
23:54 <travis-ci> Change view : https://github.com/elixir-lang/elixir/compare/8f78ed51f822...63cea4f396cf
23:54 <travis-ci> Build details : https://travis-ci.org/elixir-lang/elixir/builds/216983676
23:54 travis-ci left
23:57 rschmukler joined
23:59 Ioyrie joined