« Back to channel list

#elixir-lang - 20 April 2019

« Back 1 day Forward 1 day »
[00:25:13] Dakora: has joined #elixir-lang
[00:26:20] Dakora: chrismccord: interesting issue i have after upgrading to phx 1.4.3, cookies no longer get set on localhost. this *could* be a chromium issue, but the only mention of it i can find is from 2010
[00:27:07] Dakora: i was trying to figure out why the CSRF check was failing, there is just no cookie there. phoenix does send the set-cookie header so i'm not sure where to start looking at this
[00:28:54] Dakora: whoops. this is definitely a chromium issue then. works in Edge.
[00:32:45] Dakora: chrismccord: not sure if guys want to include a note about that in phoenix. cookies no longer get set on localhost in chromium. i've worked around it by directing a domain to localhost in my hosts file
[01:06:23] carldd: has joined #elixir-lang
[01:14:47] joshproehl: has joined #elixir-lang
[01:40:56] mat_bug: has joined #elixir-lang
[02:05:50] tomterl: has joined #elixir-lang
[02:27:26] mat_bug: has joined #elixir-lang
[02:49:32] laut: has joined #elixir-lang
[02:55:18] KeyJoo: has joined #elixir-lang
[02:57:12] duaneb: has joined #elixir-lang
[03:12:25] ariedler: has joined #elixir-lang
[03:22:29] carldd: has joined #elixir-lang
[03:50:20] josevalim: Dakora: I donโ€™t see them removing cookies from local host. It may be something like an invalid cookie or a cookie being too large?
[04:25:58] wsieroci: has joined #elixir-lang
[04:30:04] mat_bug: has joined #elixir-lang
[04:31:31] Saukk: has joined #elixir-lang
[04:35:51] proteusguy: has joined #elixir-lang
[04:48:37] gvaughn: has joined #elixir-lang
[04:53:43] kapil____: has joined #elixir-lang
[05:00:33] jfis: has joined #elixir-lang
[05:14:48] ariedler: has joined #elixir-lang
[05:41:35] iamvery: has joined #elixir-lang
[05:43:43] esainane: has joined #elixir-lang
[05:59:24] ailo_: has joined #elixir-lang
[06:19:21] craigp: has joined #elixir-lang
[06:32:00] mim7: has joined #elixir-lang
[06:56:37] proteusguy: has joined #elixir-lang
[07:07:14] LTheGreats: has joined #elixir-lang
[07:09:40] LTheGreats: has joined #elixir-lang
[07:12:01] mim7: has joined #elixir-lang
[07:15:33] ariedler: has joined #elixir-lang
[07:18:20] schakkis_: has joined #elixir-lang
[07:18:26] gvaughn: has joined #elixir-lang
[07:18:46] mat_bug: has joined #elixir-lang
[07:21:07] Liquid_X: has joined #elixir-lang
[07:21:57] rawtaz: has joined #elixir-lang
[07:34:28] jfis: has joined #elixir-lang
[07:43:15] rawtaz: has joined #elixir-lang
[07:47:07] wsieroci: has joined #elixir-lang
[07:55:27] squall: has joined #elixir-lang
[08:00:18] mat_bug: has joined #elixir-lang
[08:09:37] voltone: has joined #elixir-lang
[08:27:08] kyrylo: has joined #elixir-lang
[08:35:52] gvaughn: has joined #elixir-lang
[08:36:11] meatcar: has joined #elixir-lang
[08:36:11] meatcar: has joined #elixir-lang
[08:39:59] lexmag: has joined #elixir-lang
[08:41:22] mat_bug: has joined #elixir-lang
[09:09:51] voltone: has joined #elixir-lang
[09:16:22] ariedler: has joined #elixir-lang
[09:40:32] meatcar: has joined #elixir-lang
[09:40:32] meatcar: has joined #elixir-lang
[09:43:27] lexmag: has joined #elixir-lang
[09:50:23] iamvery: has joined #elixir-lang
[09:56:55] jeffro: has joined #elixir-lang
[10:01:53] voltone: has joined #elixir-lang
[10:02:52] umamaistempo: has joined #elixir-lang
[10:15:39] voltone: has joined #elixir-lang
[10:27:02] DanielI: has joined #elixir-lang
[10:27:20] gvaughn: has joined #elixir-lang
[10:36:23] DanielI: has joined #elixir-lang
[10:49:56] voltone: has joined #elixir-lang
[10:55:10] ariedler: has joined #elixir-lang
[11:01:17] Phylock: has joined #elixir-lang
[11:13:10] kyrylo: has joined #elixir-lang
[11:25:18] netrino: has joined #elixir-lang
[11:39:59] voltone: has joined #elixir-lang
[11:40:06] gvaughn: has joined #elixir-lang
[11:58:47] jeffro: has joined #elixir-lang
[12:02:55] GGMethos: has joined #elixir-lang
[12:28:18] helmut_1: has joined #elixir-lang
[12:30:57] helmut_1: has left #elixir-lang: ()
[12:58:27] gvaughn: has joined #elixir-lang
[13:32:10] craigp: has joined #elixir-lang
[13:59:40] jeffro: has joined #elixir-lang
[14:02:21] __charly__: has joined #elixir-lang
[14:10:39] benwilson512: https://twitter.com/FrancescoC/status/1119596234166218754 :(
[14:11:39] Ted: has joined #elixir-lang
[14:15:15] gvaughn: has joined #elixir-lang
[14:17:18] nickjj: wow that's horrible news... i just watched one of his talks the other day too, such a good presenter
[14:20:08] lpil: Really sad. The world has lost a lot today, he was brilliant
[14:21:31] elixir-lang011: has joined #elixir-lang
[14:28:16] DanielI: he really was brilliant, and his legacy will live on for many years to come
[14:29:54] mrus: Is there a way to specify a list of imports somewhere (e.g. config.exs oder mix.exs) and then have a function iterating over that list and importing the specified files during compile time?
[14:33:22] benwilson512: mrus: you can specify elixirc_paths as an option in your mix config
[14:33:50] benwilson512: elixirc_paths: ["lib", "some_other_path"]
[14:34:03] tnez: has joined #elixir-lang
[14:34:04] benwilson512: and then .ex files in some other path will be automatically compiled when you run with mix
[14:34:33] mrus: that's not exactly what I'm looking for
[14:35:18] benwilson512: mrus: what are you looking for?
[14:35:53] jeffro: has joined #elixir-lang
[14:39:26] mrus: benwilson512: well.. I'm looking for something I probably shouldn't be doing in first place. However, I see no other way. I'm using maru (`https://github.com/elixir-maru/maru`) to build a couple of API services. I want to have a shared library for those services where I pre-build basic components like the "MyApp.API" maru server and have the services rew-use them. Now, the problem seems to be that, in
[14:39:32] mrus: order to extend a Maru.Server with "resources" (endpoints basically), one needs to call "mount", which seems to be a macro that's run durin compile time. So, in order to allow each service that makes use of that shared library to mount its own endpoints, I somehow need a way to import the services' endpoints from within the shared library during compile time and have it mount them.
[14:39:38] mrus: </spam> sorry
[14:42:06] benwilson512: mrus: I'm not sure I'd have an actual server in the shared library
[14:42:11] benwilson512: but rather common parts
[14:42:17] benwilson512: and then each service has the root module
[14:42:24] benwilson512: and imports / `use`es the common parts
[14:42:43] benwilson512: parameterizing libraries at compilation time is tricky
[14:44:00] mrus: benwilson512: I see. The thing is, then every service would require a set of files, which only job it is to "use LibraryModule".
[14:44:13] mrus: So basically a lot of redudant code
[14:45:01] mrus: but I think you're right, this sounds like the best solution so far.
[14:45:04] lomex: has joined #elixir-lang
[14:45:27] mrus: i guess the main issue here is that Maru doesn't allow dynamically mounting post compile-time.
[14:45:54] mrus: or... it does, but the modules are not known to it.
[14:58:03] griffinbyatt: has joined #elixir-lang
[15:14:16] wsieroci: has joined #elixir-lang
[15:22:44] gvaughn: has joined #elixir-lang
[15:28:33] blahdodo: has joined #elixir-lang
[15:33:49] wsieroci: has joined #elixir-lang
[15:35:32] jeffro: has joined #elixir-lang
[15:51:34] snapet: has joined #elixir-lang
[15:54:39] lexmag: has joined #elixir-lang
[16:01:49] lexmag: has joined #elixir-lang
[16:06:58] __charly__: has joined #elixir-lang
[16:09:37] jeffro: has joined #elixir-lang
[16:32:06] Saukk: has joined #elixir-lang
[16:47:24] squall: has joined #elixir-lang
[17:22:07] alunduil: has joined #elixir-lang
[17:27:56] Nicd-: Goodbye, Joe :(
[18:02:57] duaneb: has joined #elixir-lang
[18:05:30] CornishPasty: Nicd-: sad times
[18:06:15] laut: has joined #elixir-lang
[18:13:34] jeffro: has joined #elixir-lang
[18:25:29] __charly__: has joined #elixir-lang
[18:25:44] Saukk: has joined #elixir-lang
[19:04:12] ailo_: has joined #elixir-lang
[19:12:30] serafeim: has joined #elixir-lang
[19:15:47] serafeim: hello, i'd like to chat a bit about the decision behind eex templates. it seems that they are closer to JSP or PHP than to Django templates. i.e it can execute arbitrary code in the templates
[19:16:04] serafeim: can anybody clarify a bit more ?
[19:20:02] mim7: has joined #elixir-lang
[19:28:08] __charly__: has joined #elixir-lang
[19:34:15] jeffro: has joined #elixir-lang
[19:41:33] weird_error: has joined #elixir-lang
[19:46:24] starbelly: serafeim: I'm not sure I follow ๐Ÿค” I've never seen a template that didn't allow you execute code in a template....
[19:47:01] starbelly: Also, eex is wildly different from the others in that it gets compiled to functions
[19:47:20] serafeim: starbelly, well it's not a good practice to allow arbitrary code execution in templates
[19:47:36] serafeim: this leads to atrocities like JSPs that contain a whole application with them
[19:48:07] starbelly: Yeah, that's not a problem I see with eex... but i mean, any one can abuse any tool.
[19:48:47] serafeim_: has joined #elixir-lang
[19:48:55] serafeim_: sorry got disconnected
[19:49:25] starbelly: You of course want to limit the logic or optimally have no logic in your templates, I think that's well understood by everyone.
[19:49:44] starbelly: Same for controllers, etc.
[19:50:00] serafeim_: starbelly, correct. that's why it felt strange to be able to do the <% do whatever you wish here %>
[19:50:22] griffinbyatt: It seems like your experience is with more restrictive environments
[19:50:31] griffinbyatt: with a web-specific context
[19:50:39] griffinbyatt: EEX templates != HTML templates
[19:50:47] starbelly: false constraints will not make better programmers, it just creates dogma
[19:50:54] starbelly: > EEX templates != HTML templates
[19:51:08] starbelly: They can be used for _anything_
[19:51:15] serafeim_: griffinbyatt, i have experience with more restrictive environements (django templates) and same restrictive ones (JSP/ PHP)
[19:51:34] serafeim_: well JSPs are also converted to Java classes
[19:52:18] starbelly: IMO, it's best not to assume the user is an idiot and put up walls to protect them... give them sharp tools, let them gauge their eyes out, and perhaps they will learn from that :) Even better, try to educate vs restrict.
[19:52:43] serafeim_: starbelly, i understand what you mean yes however if you have the power it is easy to abuse it
[19:53:04] starbelly: As it's always been with technology... double edged sword.
[19:53:05] serafeim_: there's the whole "with great power comes great responsibility" dogma
[19:53:20] starbelly: Hmmm that's more wisdom than dogma, no?
[19:53:37] serafeim_: starbelly, yes wrong choices of words
[19:54:25] starbelly: As a side note... the erlang way is to write non-defensive code
[19:54:37] serafeim_: however I still remember with horror back when I was a junior JSP developer my 1000 lines jsp that had the same 900 lines in their preamble in order to be able to call some web services
[19:54:50] starbelly: Yeahs, it's just completely different
[19:55:08] starbelly: Like not even apples and oranges... more like apples and elephants.
[19:55:43] griffinbyatt: You're missing the key point that EEX isn't just for HTML/web services
[19:55:53] raja: has joined #elixir-lang
[19:55:58] serafeim_: griffinbyatt, yes probably you are right I haven't seen other uses
[19:56:16] griffinbyatt: You're talking about a tool that's intended to be for *any kind* of template and wanting to restrict it
[19:56:28] serafeim_: and I presume that elixir programmers are not java programmers
[19:57:46] griffinbyatt: I think an argument could be made that web frameworks like Phoenix should use a more restrictive templating environment
[19:58:10] griffinbyatt: (I would disagree, but the argument could definitely be made)
[19:58:36] starbelly: Well it is restrictive in some ways... raw html as an example that hasn't been blessed
[19:58:40] griffinbyatt: But locking down eex doesn't make any sense, just because of what it is
[20:00:28] benwilson512: ah oops, backlog hadn't all loaded
[20:01:40] mozzarella: has joined #elixir-lang
[20:01:55] benwilson512: serafeim_: it's also worth viewing how EEX is used within Phoenix. The whole paradigm pushes you to write pure render functions. All the work is done in the controller, and then the resulting values are passed to the templates
[20:03:26] mozzarella: has joined #elixir-lang
[20:06:05] serafeim_: benwilson512, yes I've seen that. the data gathering seems to be done in the controllers and only some minor render modification in the views and the templates just display it
[20:08:05] mozzarella: has joined #elixir-lang
[20:19:19] serafeim__: has joined #elixir-lang
[20:24:41] Nicd-: having worked with Django templates, I'm glad EEx lets me do real work :P
[20:34:37] nox: starbelly: "Don't put up walls to protect user" is how we continue to use C and C++ though.
[20:35:32] netrino: has joined #elixir-lang
[20:37:42] starbelly: nox: Yeah... I mean, that's a bit diff though, no? I mean, you're more likely to make a horrible mistake in C... less likely in erlang or elixir, and it's not because walls are in place.
[20:38:13] starbelly: nox: Also, gonna work on beam-companies.org soon... will use cobalt :)
[20:39:50] nox: starbelly: Fair.
[20:40:57] starbelly: My main thing is... I don't like it when frameworks, whatever assume the user is an idiot... ignorant maybe? Yes. That's where education comes in and that's a community effort in a lot of ways.
[20:42:13] starbelly: I think if we do write libs and such with that assumption, we will all end up... well, in a proverbial sea of ignorance.
[20:45:49] starbelly: ACTION maybe expects too much sometimes
[20:46:23] phryxam: has joined #elixir-lang
[20:50:16] jeffro: has joined #elixir-lang
[21:08:29] craigp: has joined #elixir-lang
[21:10:42] gonz_: This depends entirely on the nature of the restriction, in my opinion.
[21:11:51] gonz_: What does it buy you elsewhere? Does it defend against something that's been proven to be too hard to handle and perhaps invites usage without considering the future?
[21:12:47] gonz_: There's no doubt in my mind that languages requiring annotations for side effects are better, for example
[21:14:30] gonz_: Restricting side effects to clearly annotated paths and having those annotations propagate pays off. It lets you design APIs with that in mind. You know there can be no side effects in closures you take as arguments because you didn't put that in the type.
[21:16:26] gonz_: With all this said I think macros are overblown as far as footguns go; people make disproportionally too much noise about them.
[21:19:31] starbelly: I think it all depends on your goals. No one is absolutely right nor wrong either. And that's just the cookie forever crumbles.
[21:19:53] starbelly: err /just/just how
[21:32:43] work_: has joined #elixir-lang
[21:45:02] Guest97: has joined #elixir-lang
[22:01:27] harrow: has joined #elixir-lang
[22:22:00] mim7: has joined #elixir-lang
[22:29:18] dkmueller: has joined #elixir-lang
[22:38:56] dkmueller: has joined #elixir-lang
[22:39:51] dkmueller: has joined #elixir-lang
[22:41:06] dkmueller: has joined #elixir-lang
[22:41:22] ailo_: has joined #elixir-lang
[22:51:05] jeffro: has joined #elixir-lang
[22:52:46] duaneb: has joined #elixir-lang
[22:58:07] mim7: has joined #elixir-lang
[22:58:25] wonko7: has joined #elixir-lang
[23:11:59] tnez: has joined #elixir-lang
[23:56:18] lexmag: has joined #elixir-lang