<    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:04 <dimitarvp> oh well, Timex it is then.... `Timex.shift(Timex.now, seconds: my_seconds_amount)`, easy as hell.
00:11 samgranieri joined
00:13 jimmyrcom joined
00:17 kblake joined
00:43 codestorm joined
00:47 mika__ joined
00:49 griffinbyatt joined
00:59 jkreeftmeijer joined
01:03 milad joined
01:08 steffkes joined
01:08 steffkes joined
01:08 whharris joined
01:09 <asonge> dimitarvp: the reason for the third party libraries is that tz maintenance and other such things is should probably be done outside of core...the new datetime datastructures are there to make sure everything is compatible between the different libraries, so that's nice.
01:09 <asonge> if you just want seconds, you could do that easily with NaiveDateTime
01:09 <dimitarvp> asonge: I understand. I was simply wondering why what Timex is doing (fetching stuff from IANA and generating code) isn't in core. It's not like there are 50 competing IANAs out there. :P
01:10 <asonge> dimitarvp: sooooooooooo, generating code dynamically isn't going to be appropriate in all environments
01:11 <asonge> which makes inclusion in core problematic for that alone
01:11 <dimitarvp> oh well :(
01:11 <dimitarvp> I feel some of us have to start contributing and yes, that's 100% directed at me
01:11 <asonge> you could have another library that auto-rebuilds and releases a new version for every update to the timezone database
01:11 <dimitarvp> f.ex. I need a good HTTP Cache support library and right now I can't find any.
01:11 <dimitarvp> good opportunity to give back to the community, I feel.
01:11 <asonge> that version churn is *definitely* better left outside of core. there are like 8 or more updates to the tzdb every year
01:12 <dimitarvp> (yep, not disagreeing.)
01:12 <asonge> but yeah, nice thing about young language, still a lot of places to contribute meaningfully
01:13 <asonge> older languages mean a lot less opportunity to learn by contributing.
01:24 <sorentwo> dimitarvp: Not sure what level of HTTP cache support you're looking for, but I know that micmus has an etag library - https://github.com/michalmuskala/phoenix_etag
01:32 coatezy joined
01:39 tomterl joined
01:40 <dimitarvp> sorentwo: I am looking more like for caching addon on top of HTTP clients
01:40 codestorm joined
01:47 mika__ joined
01:50 griffinbyatt joined
01:53 mika__ joined
01:56 v0j joined
01:57 milad joined
02:00 mika__ joined
02:01 cemilowski joined
02:03 griffinbyatt joined
02:03 codestorm joined
02:03 wyzzard joined
02:05 racycle joined
02:12 TheNet joined
02:19 kblake joined
02:56 meandi_2 joined
03:00 jkreeftmeijer joined
03:01 sevenseacat joined
03:09 steffkes joined
03:18 harfangk joined
03:23 kblake joined
03:34 v0j joined
03:48 LastWhisper____ joined
03:55 jeramyRR joined
03:56 <jeramyRR> hi all
03:56 <jeramyRR> I'm trying to test a piece of code that raises a runtime error
03:56 <jeramyRR> i'm using assert_raise(RuntimeError, "the error message expects", function_that_raises_exception)
03:57 <jeramyRR> but it's not passing the test
03:58 <jeramyRR> I'm not exactly sure what I'm doing wrong
03:59 <jeramyRR> even this fails: assert_raise(RuntimeException, "This exception raised", fn -> raise "This exception raised" end)
04:05 <jeramyRR> Nevermind, figured it out. Have to pass my function with a function as so fn -> FunctionThatRaisesException() end
04:06 codestorm joined
04:06 thepreacher joined
04:11 wsieroci joined
04:17 griffinbyatt joined
04:18 wong2 joined
04:44 <iFire> asonge: you mean 4 updates to tzdb every month
04:49 codestorm joined
04:51 kblake joined
04:54 gokr joined
05:01 jkreeftmeijer joined
05:03 jeznet3 joined
05:04 v0j_ joined
05:09 steffkes joined
05:17 griffinbyatt joined
05:26 jeramyRR joined
05:48 whharris joined
05:50 Cohedrin joined
05:55 cemilowski joined
05:55 gvaughn joined
06:03 jkreeftmeijer joined
06:21 wsieroci joined
06:22 herman_ joined
06:23 ZippoWeb joined
06:48 agit0 joined
06:51 tuacker joined
06:55 jkreeftmeijer joined
06:57 jkreeftm_ joined
06:59 codestorm joined
07:10 steffkes joined
07:10 steffkes joined
07:12 wsieroci_ joined
07:19 griffinbyatt joined
07:24 milad joined
07:44 gvaughn joined
07:51 ZippoWeb joined
07:52 tuacker1 joined
07:52 coatezy joined
07:57 Gasher joined
08:04 wyzzard joined
08:08 mk[] joined
08:08 peterpp joined
08:15 <mk[]> I want to generalize a function call that looks like Client.blah where blah is get, post, put. should I use a macro?
08:16 junsuiji1 joined
08:20 griffinbyatt joined
08:27 <mk[]> oh, I suppose I can just pass &Client.blah/2, nevermind
08:32 stephen_m joined
08:34 ejpcmac joined
08:35 jkreeftmeijer joined
08:39 imush joined
08:40 jhack__ joined
08:56 steffkes joined
08:56 steffkes joined
09:01 josevalim joined
09:04 MotherFlojo joined
09:13 cemilowski joined
09:15 lexmag joined
09:17 gmcabrita joined
09:20 milad joined
09:21 griffinbyatt joined
09:21 dastagg joined
09:23 codestorm joined
09:25 embik joined
09:26 gokr joined
09:32 gvaughn joined
09:44 embik joined
09:47 MotherFlojo joined
09:56 milad joined
10:02 agit0 joined
10:13 PaReeOhNos joined
10:17 squallstter joined
10:18 codestorm joined
10:21 griffinbyatt joined
10:25 agit0 joined
10:32 ejpcmac joined
10:37 jkreeftmeijer joined
10:41 cemilowski joined
10:49 nd__ joined
10:49 ejpcmac left
10:57 steffkes joined
10:57 steffkes joined
11:03 mjanssen joined
11:12 codestorm joined
11:21 gvaughn joined
11:22 griffinbyatt joined
11:28 dimitarvp joined
11:31 wyzzard joined
11:34 codestorm joined
11:47 Guest_ joined
11:56 TheNet joined
12:00 MaSven joined
12:03 JoelMcCracken joined
12:08 codestorm joined
12:17 embik joined
12:18 griffinbyatt joined
12:20 <soud> I hope phoenix questions here are ok. I'm writing tests using ExMachina and I'm trying to create a test for inserting data. My test looks like this: https://bpaste.net/show/d6c3133c6429 . The only problem is that `params_with_assocs` doesn't create the `id` field, so the assertion fails. What's the best way to test a create here?
12:22 <asonge> soud: a common way to do this is to use some unique-ish params to select the row you just inserted back out, and then compare that
12:22 TheNet joined
12:23 <soud> asonge: yeah I was thinking of querying the database to get the last inserted post, but was hoping for a better method
12:23 <asonge> soud: if you want to test that the row in the db is what is rendered, you test that. if you want to test that the parameters you passed are reflected properly in the json object, you should test that. you're kinda trying to merge the two things.
12:23 <asonge> i think this might be less a testing issue and more defining what you actually *want* to test.
12:24 <soud> I see, I guess just testing a 201 response should be enough
12:24 <asonge> well, testing either of those things is not a bad idea.
12:24 <soud> but seperate
12:24 <asonge> (or both)
12:25 bturnbull joined
12:25 <asonge> you could easily loop over the post params, and check that for every key, assert that the values are the same
12:26 <soud> I actually like that
12:26 <asonge> the code reads like what you want, "every value i pass through is reflected in the result"
12:26 <asonge> and then assert that the id exists at all
12:29 <micmus> and you could wrap that in a nice function, e.g. assert_matches_params(inserted, params)
12:30 <asonge> micmus: were you one of the folks in that ruby vs elixir "fight" panel?
12:31 <asonge> (they didn't list the full names, just first names)
12:31 <micmus> asonge: yeah, I was
12:33 <asonge> you did pretty well. that thing got really awkward at times...discussing language concepts across communities is really hard for weird reasons
12:39 jkreeftmeijer joined
12:40 <dimitarvp> there was a "ruby vs elixir fight panel", really?
12:41 <asonge> dimitarvp: it was semi-useful. it was just a reflection about why and when a rubyist might use elixir. there was a lot of meta-talk about language PR and how to sell a language
12:41 <dimitarvp> asonge: I'd only listen to the last part
12:42 <dimitarvp> knowing how to "sell" a language is extremely useful skill, (1) for sales pitching in front of managers / business owners, and (2) for better understanding the core values of the language itself.
12:42 <dimitarvp> the rest is like..... pissing contest :(
12:42 <sevenseacat> it sounds interesting
12:42 <sevenseacat> hell yeah, found it
12:42 <asonge> i think there's generally a missing layer in discussions about programming languages...somewhere between narrow focuses on the semantics and implementation of a language and tehcnical features and selling a language's benefits and business use-case.
12:43 <dimitarvp> asonge: that's true. I think all devs must listen to and participate in such discussions every now and then, it gives you clarity.
12:43 <asonge> they touched on some of it, such as the way community values exist, but i wonder if there might be some usefulness in trying to articulate what the community seems to value
12:44 <micmus> they do "fight panels" every year at that conf, but they are not really fights. Although it felt like the ruby guys did try to taunt us pretty hard
12:44 <nox> What is "the rest"?
12:44 <nox> micmus: Tell me more.
12:44 <* nox> grabs popcorn.
12:44 <asonge> imho, ruby and python have nearly identical semantics, but their community values cause vastly different properties in how software is built
12:44 <micmus> I feel like the conversations I had at the after parties were much more useful
12:45 <nox> asonge: That's a bit of a too large generalisation, IMO. At that point you can put PHP in that bucket too.
12:45 <* sevenseacat> watching panel
12:45 <asonge> nox: maybe. php has some semantic weirdnesses that make it too...fundamentally different?
12:45 <asonge> the static scoping, for instance
12:45 <asonge> erm, not static scoping...it's just not lexical
12:46 <nox> asonge: So like in Python?
12:46 <asonge> i thought python's scoping was lexical?
12:46 <nox> There is much stuff similar to 'arguments' in JS that allows you to break stuff in very fancy ways.
12:47 <asonge> you can define functions in functions and refer to previous values in python. in php, you cannot.
12:47 <micmus> functions in functions is probably one of the features of python that I like the most
12:47 <nox> asonge: You can in lambdas.
12:48 <asonge> when php added closures, they added a "use" part of a function definition where you actually have to explicitly say what previous variables you want to carry over
12:48 <nox> Yes, like in C++.
12:48 <micmus> though not really different from assigning a fun to a variable in elixir/erlang
12:48 <nox> Explicit capturing.
12:49 imush joined
12:49 <asonge> anyway, i think that if python and ruby's differences come about from community values (what things are acceptable, how to structure libraries, what things might be considered "gross")
12:49 <nox> asonge: Anyway, what I meant about PHP and Python having similar silliness in scoping,
12:49 <nox> is that for example you can define a variable in a try and then access it afterwards outside the try, same for if etc.
12:50 <asonge> ah, i never know which languages have that weirdness in them.
12:50 <asonge> i always forget. that's probably a good thing.
12:50 <nox> asonge: Most of the dynamic ones AFAIK.
12:51 <micmus> nox: erlang has the same, doesn't it? Elixir does too, though it will warn about it now.
12:51 <nox> Erlang is saner.
12:51 <asonge> is that warning there for possibly making this not work in a 2.0 some day?
12:51 <micmus> it's planned for Elixir 2.0 for if/case etc to introduce a new scope
12:52 <nox> micmus: Erlang lets you use the variable afterwards only if it would have been defined in all code paths.
12:52 <asonge> ah, that's what i thought.
12:52 <nox> Elixir currently defaults to nil if not,
12:52 <nox> and in the future won't allow it at all IIRC.
12:52 <micmus> true
12:52 <dimitarvp> in my experience, 90% of the language wars are entirely meaningless. people from Haskell defending monads and maybes and when somebody says "look, we added them as well in a different form" and then the same old "not a true scottsman" circus begins
12:52 <dimitarvp> so really meh, I stopped watching those discussions
12:52 <dimitarvp> in the end, business goals are achievable by a plethora of languages / tech.
12:53 <nox> Yes.
12:53 <asonge> dimitarvp: even if you add the same things that exist in other languages, you're going to get hit with semantic differences, etc.
12:53 <nox> dimitarvp: There is a case where that is wrong.
12:53 <nox> dimitarvp: If one of the languages involved are C++, it is wrong to be on that side of the war.
12:53 <asonge> there is a sense in which sometimes adding a "feature" of another language as a library does real violence to the semantics :/
12:54 <asonge> nox: there's someone in a local developer meetup who is still (annoyingly) in a "C++ is functional, guys" stage, where C++ can do anything if you're just smart enough.
12:55 <asonge> (which is like, trivially true, but not true in any sense that's interesting)
12:55 <dimitarvp> asonge / nox: true, that's why I know a lot of languages. Recently, I found that for the work I want to do, Elixir is my best fit
12:55 <nox> asonge: The year is 2017, HN still argues that if you segfault in C++, you are a bad developer.
12:55 <asonge> *shrug*
12:55 <dimitarvp> I never spit at people who find C# immensely productive, because I know for a fact that .NET / JVM are awesome runtimes.
12:55 <nox> dimitarvp: And C# at least is memory-safe.
12:56 <asonge> dimitarvp: i really hope i'm not using elixir as my primary language in 20 years. it's great, it's my primary language now, but i hope the evolution of computer languages continue, and there's no way that elixir is going to be able to incorporate all the innovations.
12:56 Guest67 joined
12:57 <dimitarvp> nox: true
12:57 <dimitarvp> asonge: me too. It's my best fit right now and I really want to see it become better with time (or another better one replaces it)
12:57 <nox> asonge: RIIR
12:57 <dimitarvp> II kind of lost hope convincing people however. Most people are inertia creatures and I am not gonna waste my life trying to change core Homo Sapiens brain bugs.
12:58 steffkes joined
12:58 steffkes joined
12:58 <asonge> nox: RIIR?
12:58 <nox> Rewrite It In Rust, I was kidding.
12:58 <asonge> ah. rust is going to be really interesting though.
12:58 <dimitarvp> now let's fuel the flames: Rust is better than Golang, how exactly? :P
12:58 <dimitarvp> memory safety?
12:59 <nox> dimitarvp: My answer to that has 2 sides,
12:59 <nox> the pragmatic part is that I work on browsers, that browsers must embed JS, and having 2 GCs in a single system isn't a very good way to do things.
13:00 <dimitarvp> nox: huh? how is that relevant though?...
13:00 <nox> the language enthusiast part of the answer is that Go makes me feel like I'm dying of boredom.
13:00 <nox> dimitarvp: Do you know of any browser that is written in a GC'd language?
13:01 <nox> (Go is memory-safe too btw.)
13:01 <dimitarvp> nox: No. I know Firefox is gonna be rewriten in Rust but it doesn't have GC, right?
13:01 <nox> Yes.
13:01 <nox> No.
13:02 <nox> Firefox isn't going to get rewritten in Rust, don't quote me on this. It's going to include Rust components.
13:02 <dimitarvp> Go is memory safe but there are channel-related panics people argued shouldn't be panics... anyhow, off-topic.
13:02 <asonge> dimitarvp: Firefox is replacing parts of the browser with parts of servo
13:02 codestorm joined
13:02 <nox> It's Sunday and no one is asking questions. josevalim: feel free to chide me if we are indeed way too offtopic. :)
13:03 <dimitarvp> asonge: You are correct, sorry.
13:03 <nox> I shouldn't have to write if err != nil all the time to handle errors in 2017.
13:04 <nox> My biggest gripe with Go is the lack of enum, discriminated unions, algebraic data types, name the concept however you want.
13:04 <dimitarvp> nox: I guess the creators didn't like the alternatives. Probably being 100% clear that "here we can have an error" was their priority. Then again people can just skip checking for errors so I fail to see how that helped... :D
13:04 <nox> dimitarvp: Result<Success, Error>.
13:04 <asonge> yeah, go doesn't seem interesting to me in that it doesn't really offer many useful language innovations. it's a language engineered for certain things, but few of them seem human-friendly.
13:05 <asonge> it is a small language, though.
13:05 <dimitarvp> IMO Golang was supposed to be an iron-clad C/C++ replacement, but this is just a wild speculation from random observations.
13:05 <josevalim> nox: it is fine I think. but if someone asks a question you are all required to help them :P
13:05 MaSven joined
13:05 <nox> It's a language engineered for a big corp who wishes to be able to employ numerous employees.
13:05 <dimitarvp> josevalim: Count on that!
13:05 <nox> josevalim: Thanks! :)
13:05 <asonge> nox: so was erlang, lol
13:05 <nox> asonge: What?
13:06 <nox> dimitarvp: It was supposed to replace C++ but in the end most interest come from Python people, right?
13:06 <josevalim> nox: i think it is unfair to say it is about boredom though. the language can still have algebraic data types and be boring (considering that boring is a positive thing as many golangers consider)
13:06 <dimitarvp> No, I think Golang was a huge effort for a language to be least WTF as possible for anyone interested in lower-level programming (read: compiled, static types)
13:06 <nox> josevalim: True.
13:06 <asonge> whenever i read about erlang history, i see stuff about designing the language for the people that work there.
13:06 <nox> josevalim: I consider Erlang boring, but I'm not bored using Erlang,
13:06 <dimitarvp> nox: I honestly don't know. Is that really the case? :O
13:06 <nox> josevalim: I consider Go boring, and I feel bored using it.
13:06 <nox> dimitarvp: Yes.
13:07 <asonge> dimitarvp: the number of abstractions that are just not natural to Go is kinda a famous gripe.
13:07 <dimitarvp> nox: maybe because Pythonistas got fed up with working with "Python scientific libraries" which were just wrappers around a plethora of C++ libs?
13:08 <sevenseacat> as someone who is only dabbling in elixir for now, is it worth really looking into erlang? or wait until later?
13:08 <asonge> anyone here a regular go user? i wonder if go libraries are often easy to dive into for normal users.
13:08 <nox> asonge: https://github.com/BurntSushi/go-sumtype
13:08 <dimitarvp> josevalim: I use Golang for CLI tools and microservices and in that regard it being boring is an asset, in my eyes.
13:08 <asonge> sevenseacat: once you learn the semantics of elixir, the syntax isn't much of a stumbling block and you'll know most of it naturally.
13:08 <sevenseacat> asonge: cool :)
13:09 <dimitarvp> sevenseacat: it's mostly about syntax and only several language specifics, really.
13:09 <nox> sevenseacat: It's never a bad idea to learn other languages, and to learn about where your language of choice come from, but it's not like it's going to change your life.
13:09 <dimitarvp> basically just a case of "pick what you like"
13:09 <asonge> erlang is an even smaller language than elixir is.
13:09 <nox> dimitarvp: http://commandcenter.blogspot.it/2012/06/less-is-exponentially-more.html
13:09 gvaughn joined
13:10 <asonge> one thing i really appreciate about elixir and erlang is how easily i can understand almost all the community libraries
13:10 <josevalim> dimitarvp: right, that's what i mean. a language can have generics and algebraic data types and still be boring
13:10 <asonge> i think one might expect go to have the same property, but i'm not sure.
13:10 <josevalim> dimitarvp: i just don't want boring to be used as an excuse to not add very very very valid features
13:10 <sevenseacat> yeah I've started looking at open source elixir libraries much sooner than I did with ruby.
13:10 <nox> josevalim: It's harder to be boring in that case. :)
13:10 <nox> josevalim: But I got you.
13:10 <dimitarvp> josevalim: so agreed! =)
13:11 <dimitarvp> sorry, I am not interesting, I agree with good arguments, not a troll so discussions end quickly :D
13:11 <* dimitarvp> giggles
13:11 <nox> josevalim: I was just trying to be polite about Go, you know my tastes. :P
13:11 <dimitarvp> speaking of which, anyone knows a good HTTP caching layer on top of HTTPoison / HTTPotion / any Erlang/Elixir http client?
13:11 <dimitarvp> if not, I am definitely gonna write one.
13:12 <asonge> if it's not in hex, there's probably not one ready for general usage.
13:12 <dimitarvp> asonge: spent 2 hours last night to Google around (and look in `awesome-elixir` repo) so yeah, guess I am writing it.
13:13 <dimitarvp> and I agree, I also pick up Elixir and even Erlang libs muuuuuch quicker than any Ruby gem ever.
13:14 scrmpy joined
13:17 <scrmpy> I'm trying to reorganise a project moving 2 OTP apps into separate projects (either umbrella or separate repos), but I can't workout how to let mix handle the inter-dependency. as both apps talk to each other. any ideas how to go about doing it?
13:19 <dimitarvp> umbrella would be my choice for sure
13:20 <scrmpy> I can't workout how to get mix to allow the two apps to be dependencies of each other though
13:21 gvaughn joined
13:36 <scrmpy> oh never mind, just had a massive brain fart lol, don't know why I was doing that
13:52 <micmus> You can't have circular dependencies between applications in general
13:53 sfbw joined
13:53 <scrmpy> yeh, idk why I thought I needed the applications to specify each other as deps in my mix file. just looked at one of my other umbrella projects and realised my mistake lol
13:57 codestorm joined
14:03 proteusguy joined
14:10 Uniaika joined
14:11 Uniaika left
14:14 imush joined
14:16 egis joined
14:34 hashpuppy joined
14:40 jkreeftmeijer joined
14:45 wsieroci joined
14:51 codestorm joined
14:59 steffkes joined
14:59 steffkes joined
15:02 cemilowski joined
15:02 cemilowski left
15:02 wong2 joined
15:07 embik joined
15:09 racycle joined
15:36 milad joined
15:36 milad joined
15:38 wong2 joined
15:39 parisianSummer_ joined
15:42 raycoll joined
15:45 codestorm joined
15:45 tuacker joined
15:49 codestorm777 joined
15:51 dastagg joined
16:01 bturnbull joined
16:10 LastWhisper____ joined
16:18 codestorm joined
16:18 seancribbs joined
16:21 maxirater joined
16:22 meh` joined
16:22 icanhazbroccoli joined
16:26 cerulean joined
16:27 bturnbull joined
16:28 mika__ joined
16:39 claudevandort joined
16:42 jkreeftmeijer joined
16:57 milad joined
17:00 steffkes joined
17:07 icanhazbroccoli joined
17:09 <ivan> TIL File.regular? returns true for symlinks :/
17:13 colrack joined
17:14 <ivan> is that an Erlang bug? http://erlang.org/doc/man/file.html#read_file_info-1 lists type = device | directory | other | regular | symlink
17:15 <ivan> oh, you need file:read_link_info
17:20 wsieroci_ joined
17:28 Cohedrin joined
17:35 sevenseacat joined
17:42 MaSven joined
17:43 jkreeftmeijer joined
17:46 mbwe joined
17:51 elixir-lang756 joined
17:58 nomicflux joined
18:18 cerulean left
18:19 TarVanimelde joined
18:36 mika__ joined
18:38 <ivan> compiler is trying to make me go insane again
18:38 <ivan> ** (CompileError) lib/systemd.ex:159: Converge.FileMissing.__struct__/1 is undefined, cannot expand struct Converge.FileMissing
18:38 <ivan> it's there alright
18:40 <ivan> oh yeah it helps to compile your deps
18:42 Guest67 joined
18:42 MaSven joined
18:55 <mrus> Assuming there is a list like this: [{"a", "Jacob"}, {"b", "Tom"}, {"c", "Alice"}] Is there a smart way to get the value that's in the "c" item (-> "Alice")? Enum.at() isn't as the index is different every time.
18:56 MaSven joined
19:01 steffkes joined
19:01 steffkes joined
19:06 mk[] left
19:08 <micmus> mrus: List.keyfind
19:12 <mrus> micmus: thanks!
19:24 colrack joined
19:26 wsieroci joined
19:43 Cohedrin joined
19:44 jkreeftmeijer joined
20:01 kushal_kumaran joined
20:02 MotherFlojo joined
20:06 fhoffmann joined
20:07 milad joined
20:07 milad joined
20:08 gokr joined
20:11 sfbw joined
20:14 imush joined
20:20 whharris joined
20:40 josevalim joined
20:45 icanhazbroccoli joined
20:46 sfbw joined
20:52 pcre joined
20:55 dastagg joined
21:02 steffkes joined
21:03 colrack joined
21:08 imush joined
21:19 Cohedrin joined
21:24 jmcintosh joined
21:28 milad joined
21:31 praveen joined
21:46 jkreeftmeijer joined
21:52 Ilyes512 joined
21:55 sfbw joined
21:57 MaSven joined
22:04 MaSven joined
22:15 elixir9321 joined
22:18 <elixir9321> Hi everyone, I've been playing around with Elixir and Phoenix for a little while now and I'm wondering: What's the current consensus on the best OTP deployment? (Heroku is out as it can't do interprocess communication). How do containers fit in?
22:19 Theophane left
22:20 <elixir9321> Ansible, Terraform, Flynn, Docker, Capistrano, lxc, jails...it's all giving me a headache.
22:21 MotherFlojo joined
22:25 hotpancakes joined
22:26 <tristan__> assuming you need communication between nodes
22:26 namidar__ joined
22:34 hotpancakes joined
22:39 codestorm joined
22:46 MotherFlojo joined
22:47 jkreeftmeijer joined
22:51 Ilyes512 joined
22:55 <Ilyes512> hey guys does anyone have an example where you use unique_constraint with soft deleted records (ecto with a deleted_at timestamp?)
22:56 <Ilyes512> so the unique_constraint should only look at records where deleted_at is null. Also how do you handle edit's of unique
23:02 steffkes joined
23:04 bturnbull joined
23:12 sfbw joined
23:15 MotherFlojo joined
23:17 Ilyes512 joined
23:19 Guest62 joined
23:32 rschmukler joined
23:34 SvenMa joined
23:34 codestorm joined
23:37 mika__ joined
23:42 <asonge> Ilyes512: you can do a conditional unique index in an ecto migration. that should be all you need. you can use it like a normal unique index otherwise.
23:43 <Ilyes512> asonge yes i was looking at that right now but that would mean it will only work in postgresql (what I am using now)
23:43 <asonge> pretty much, yeah.
23:44 <Ilyes512> but would be awesome if there is a mysql solution as well
23:44 <asonge> it's up to the underlying db to support it, and i don't know if mysql does. i'll have to check.
23:44 <Ilyes512> mysql does not support constraint with "wheres"
23:45 <asonge> hrm, it seems that if you use a compound unique index in mysql, nulls are not duplicates, so you can do that. you may have to put conditional logic in the migration, though. i don't know of any examples of how to do that off-hand.
23:46 <asonge> (but i'd also point out that most apps do not support more than 1 db, ecto prefers to expose the semantics of your DB rather than impose some abstraction)
23:46 <Ilyes512> i think i will indeed just use postgresql and drop support for any other db
23:47 <asonge> what i mean by that, is that you may run into more scenarios like this
23:47 <asonge> but it's just way simpler and easier to understand.
23:50 nd__ joined