« Back to channel list

#elixir-lang - 05 May 2019

« Back 1 day Forward 1 day »
[00:02:00] griffinbyatt: has joined #elixir-lang
[00:09:23] tnez: has joined #elixir-lang
[00:15:12] duoi: has joined #elixir-lang
[00:16:13] sms: has joined #elixir-lang
[00:23:56] orbyt_: has joined #elixir-lang
[00:39:53] griffinbyatt: has joined #elixir-lang
[00:43:02] haste: has joined #elixir-lang
[00:56:06] griffinbyatt: has joined #elixir-lang
[01:06:43] carldd: has joined #elixir-lang
[01:11:14] orbyt_: has joined #elixir-lang
[01:23:06] ariedler: has joined #elixir-lang
[01:27:12] orbyt_: has joined #elixir-lang
[01:28:01] griffinbyatt: has joined #elixir-lang
[01:58:01] tomterl: has joined #elixir-lang
[02:44:38] also_uplime: is it possible to pattern match a dictionary, but still get the whole dictionary? something like: def myfunc(%myhash{ foo: :bar }) do stuff_with myhash end
[02:53:50] chrismccord: also_uplime : myfunc{%Thing{foo: :bar } = thing), do:
[03:10:50] tnez: has joined #elixir-lang
[03:20:31] carldd: has joined #elixir-lang
[04:20:33] Saukk: has joined #elixir-lang
[04:38:49] wsieroci: has joined #elixir-lang
[05:19:53] gde33: has joined #elixir-lang
[05:29:07] voltone: has joined #elixir-lang
[05:40:10] bionj: has joined #elixir-lang
[06:10:01] gvaughn: has joined #elixir-lang
[06:20:31] Avinash: has joined #elixir-lang
[06:48:23] iamvery: has joined #elixir-lang
[07:12:35] lexmag: has joined #elixir-lang
[07:18:37] shiro[cloud]: has joined #elixir-lang
[07:18:44] wonko77: has joined #elixir-lang
[07:18:56] lexmag: has joined #elixir-lang
[07:21:31] gvaughn: has joined #elixir-lang
[07:32:39] serafeim: has joined #elixir-lang
[07:32:53] serafeim: hello! is there something like python's cookiecutter for elixir ?
[07:34:15] serafeim: i've created a skeleton project with user auth, permissions, pagination, filtering and various other stuff that i'll want to re-use in other projects
[07:35:15] serafeim: i work in a public sector org where we are building a lot of different small projects to cover the need of various directorates so re-using things is really important to me
[07:35:44] serafeim: i know i could copy and paste but i'd really like something better because of all the AppName and AppNameWeb changes i'd need to make
[07:42:15] lexmag: has joined #elixir-lang
[07:43:46] serafeim: l o l sunday seems like a *bad day* for such conversations :>
[07:46:37] squall: has joined #elixir-lang
[07:49:01] __charly__: has joined #elixir-lang
[07:54:46] serafeim: has joined #elixir-lang
[07:57:10] dysfun: it's a very good day to talk to yourself
[07:59:36] serafeim: ha ha ha yes
[08:00:08] serafeim: i've found this: https://github.com/pragdave/mix_generator which seems more or less like what i'll need
[08:00:31] dysfun: no idea tbh
[08:00:42] dysfun: i'm quite content to just do it the normal way
[08:01:07] serafeim: dysfun this depends on how many new projects you start
[08:01:20] dysfun: probably more than you :)
[08:01:29] serafeim: if it's one per 5 years then yes doing it manually is good. if it's one per month then meh
[08:01:44] dysfun: i just want shit to work and i know a way
[08:01:56] serafeim: also it depends on the boilerplate you want
[08:02:16] dysfun: boilerplate? i don't want that
[08:02:33] serafeim: well i want it. all my projets have some (A LOT) of common functionality
[08:02:38] dysfun: only boilerplate i usually have is the phoenix one, and well that can generate that
[08:03:09] serafeim: i've got a cookiecutter for django: https://github.com/spapas/cookiecutter-django-starter and i'd like something similar with phoenix
[08:03:40] dysfun: yes, i understand you want it. i just don't think i'm going to be much help
[08:11:11] proteusguy: has joined #elixir-lang
[08:11:34] mahmudov: has joined #elixir-lang
[08:16:56] PragTob: has joined #elixir-lang
[08:18:52] kyrylo: has joined #elixir-lang
[08:25:46] lexmag: has joined #elixir-lang
[08:28:39] proteusguy: has joined #elixir-lang
[08:35:24] gvaughn: has joined #elixir-lang
[08:43:20] proteusguy: has joined #elixir-lang
[09:14:30] proteus-guy: has joined #elixir-lang
[09:16:10] lpil: serafeim rebar3 has project templating built in. It's literally just templates so there's no reason why you'd need to use rebar3 rather than mix afterwards
[09:17:02] serafeim: lpil: you mean this: https://www.rebar3.org/docs/using-templates ? thanks i'll take a look
[09:17:49] lpil: And there's always `cp` and `sed` :D
[09:19:00] serafeim: lpil yes and I guess that since i'll use templates I could also use the cookiecutter library (it's in python but it just consumes text templates )
[09:19:22] lpil: That sounds good
[09:20:44] serafeim: yeh i hadn't thought it like this... I also took a look at the phx.new and it also uses a bunch of eex templates: https://github.com/phoenixframework/phoenix/tree/fe8679fd9a1824bb53f5a712a1bdb88eb5b2dab9/installer/templates/phx_single
[09:22:40] lpil: I've always just taken an existing project and deleted the bits I don't want. Feel like I get less bitrot that way
[09:23:04] lpil: dysfun: You make a project every 6.5 minutes as far as I can tell, do you reuse anything?
[09:23:22] dysfun: i frequently copy and paste the bits i want
[09:23:42] dysfun: when you have enough projects, it's more a matter of finding it :)
[09:24:25] dysfun: and you know, quite often i'll write a library to abstract it...
[09:25:11] dysfun: (why aren't you hacking idris-erlang with me?!)
[09:25:43] dysfun: (idris-elixir is now a thing and i'm rewriting the whole kaboodle)
[09:26:56] proteus-guy: has joined #elixir-lang
[09:41:00] hrubi: has joined #elixir-lang
[09:52:03] tutti: has joined #elixir-lang
[10:10:36] nickjj: has joined #elixir-lang
[10:25:03] iamvery: has joined #elixir-lang
[10:28:33] serafeim: has joined #elixir-lang
[10:31:11] lexmag: has joined #elixir-lang
[10:38:03] nox: dysfun: "cp ../$previous_project/LICENSE* ." Been there done that :D
[10:38:22] dysfun: heh, ikr?
[10:42:21] lexmag: has joined #elixir-lang
[10:47:01] josevalim: Wait, why do you need idris-elixir if you have idris-erlang?
[10:48:10] dysfun: well i decided i wanted to diverge heavily from it, and using elixir makes my job easier in some ways
[10:48:15] lexmag: has joined #elixir-lang
[10:48:31] dysfun: (for example i can generate a <> b to concat binaries)
[10:50:14] dysfun: but if i'm going to be truly honest, i got really fucked off at erlc yesterday for not telling me *why* it failed to compile
[10:53:10] gvaughn: has joined #elixir-lang
[10:53:16] dysfun: and then i remembered why it wasn't so hard for me to convert to using elixir instead of erlang normally
[10:53:55] lexmag: has joined #elixir-lang
[10:54:21] dysfun: so yeah, i need to do it because you massively improved the debugging experience. are you happy?
[10:59:23] lpil: dysfun Doesn't <<X, Y>> concat binaries in Erlang?
[10:59:30] lexmag: has joined #elixir-lang
[10:59:36] lpil: I forget, I've been using iolists lately
[11:00:36] dysfun: yes, but it happens to be more convenient for all operators to be infix
[11:00:48] lpil: Fair enough
[11:00:54] dysfun: i think it's <<X/binary, Y/binary>> actually
[11:01:17] lpil: ah yes, I think you're right.
[11:01:20] dysfun: and therein lies another annoyance - uppercase/lowercase identifiers
[11:02:57] dysfun: anyway, the annoyances were piling up
[11:03:10] dysfun: like using list strings
[11:03:13] dysfun: ACTION facepalms
[11:04:21] iamvery: has joined #elixir-lang
[11:05:19] lpil: Can't you just always use <<"string">>? That's what Gleam does
[11:05:39] dysfun: along with changing the stdlib, yes
[11:05:55] dysfun: and indeed before i just decided to rewrite in elixir, that's what it was going to do
[11:06:04] dysfun: for elixir, not in elixir - it's in haskell
[11:06:34] lpil: I figure you'd need to wrap the stdlib anyway so Idris knows how to speak it?
[11:06:48] dysfun: yeah, there are various ways to do it
[11:07:01] dysfun: however, like i said, i wanted to diverge
[11:07:10] dysfun: i just had a rather neat idea and i'm going to see how it works out
[11:07:27] lpil: I look forward to seeing how it develops :)
[11:07:35] lpil: more types for all
[11:07:42] dysfun: idris-elixir is really quite a limited binding
[11:07:49] dysfun: doesn't even support maps
[11:07:56] dysfun: er idris-erlang
[11:09:16] netrino: has joined #elixir-lang
[11:14:41] iamvery: has joined #elixir-lang
[11:19:59] iamvery: has joined #elixir-lang
[11:35:29] medzin: has joined #elixir-lang
[11:38:37] iamvery: has joined #elixir-lang
[11:41:22] nox: 12:50 <dysfun> but if i'm going to be truly honest, i got really fucked off at erlc yesterday for not telling me *why* it failed to compile
[11:41:29] nox: Feel free to carry to completion my diagnostics stuff. :P
[11:45:50] iamvery: has joined #elixir-lang
[11:54:33] iamvery: has joined #elixir-lang
[11:56:09] Sgeo_: has joined #elixir-lang
[11:58:26] lexmag: has joined #elixir-lang
[12:07:26] iamvery: has joined #elixir-lang
[12:10:35] gvaughn: has joined #elixir-lang
[12:13:15] lexmag: has joined #elixir-lang
[12:15:02] iamvery: has joined #elixir-lang
[12:23:43] iamvery: has joined #elixir-lang
[12:24:30] josevalim: dysfun: nice, thanks for the explanation :)
[12:25:33] lexmag: has joined #elixir-lang
[12:27:56] lexmag: has joined #elixir-lang
[12:28:01] nickjj: has there been any thought to adding a flag to hex.outdated which would not only list the updates but also update all of the packages to their latest version in the user's mix.exs file?
[12:29:02] nickjj: use case: a while back i had a project i hadn't touched in a while and i found myself wanting to update every single package, so i ran hex.outdated and manually bumped 12 or so packages, would have been neat if the cmd had an option to do that automatically
[12:29:39] nox: nickjj: What if there were breaking changes?
[12:30:01] nickjj: maybe even something like --prompt-for-update , which presents a list of updates (as it does now) with a y/n where the user can agree to have the changes take effect
[12:30:44] nickjj: nox, then it should be on the user to fix their code base as needed -- the same thing if the auto-update didn't take effect (they would still have updated the packages manually and needed to fix any breaking changes)
[12:31:33] nox: I am not sure I understand why you want to update all the versions automatically.
[12:31:49] nox: If there were no breaking changes, it doesn't matter if your package depends on 1.0.3 or 1.2.0,
[12:31:52] nickjj: it just saves a few minutes of having to copy / paste the versions from hex.outdated into my mix file
[12:32:01] nox: if there were breaking changes, surely you don't want to do the 12 bumps all at once.
[12:34:37] nickjj: i think a user who wants to do that type of update will do it no matter what, i just saw it as a potential win to save time
[12:35:10] benwilson512: nickjj: this is hard for the same reason a `mix hex.add` is hard
[12:35:11] nickjj: but yeah maybe it's a little too cute because there would be 2 types of potential update strategies, one that takes your version locks into account and one that goes straight to the latest
[12:35:14] benwilson512: `mix.exs `is code not data
[12:36:03] dysfun: nah, bodging it with a regex is easy :p
[12:36:09] nickjj: benwilson512, it's a list of maps right?
[12:36:25] dysfun: nickjj: yeah, once you've read the code and evaluated it to get them
[12:36:27] benwilson512: nickjj: it's a function
[12:36:30] nox: nickjj: So you always bump things even if they don't need to be bumped?
[12:36:35] nox: Am trying to understand that use case.
[12:36:44] greengriminal: has joined #elixir-lang
[12:36:52] benwilson512: nickjj: mix.exs is an elixir module with elixir functions. changing values inside that is non trivial because the deps list can be built dynamically
[12:36:53] nickjj: nox, not always, this was a very specific use case which i guess isn't too common
[12:37:00] nox: If I have a dependency and I started using it when it was at version 1.0.2, and they release 1.1.0, it doesn't matter if I bump it in my own project.
[12:37:10] nox: Do you do such bumps anyway?
[12:37:11] lexmag: has joined #elixir-lang
[12:37:32] dysfun: i'll quite often try to keep us up to date
[12:37:41] nox: Are we talking about bumps in a lock file,
[12:37:45] dysfun: but i won't just apply all of them automatically
[12:37:49] nox: or bumps in the package description?
[12:37:54] nickjj: nox, i mean bumping the dependency in mix.exs
[12:38:07] nickjj: for top level packages that your project uses
[12:38:52] nox: So then you need to release a new version of your package with a new version number, even though nothing changed and downstream could have used 1.1.0 on their own?
[12:39:10] nickjj: my update strategy really depends on the application (is it running in production or still being developed? mission critical or side project?) but generally i'm with dysfun in that for active projects i do try to stay somewhat up to date but i don't go crazy auto-bumping for the heck of it
[12:39:21] iamvery: has joined #elixir-lang
[12:40:02] nickjj: usually i'll go a couple of months without touching anything and then see what changed -- if it's a mission critical production app i would carefully evaluate changelogs and do things one at a time but in other cases i would go nuts and update everything and do error based development until it's fixed
[12:40:54] nox: Interesting. In general I bump stuff in package descriptions only if I do need something new in one of the dependencies, or that dependency got a new major version and I have code to change.
[12:44:24] nickjj: yeah, it really depends, it's not a huge deal in either way, i was just looking for ways to potentially save time
[12:49:53] nox: nickjj: I had to look up what's mix.exs given I don't actually Elixir stuff anyway, so really I was just being curious.
[12:51:03] iamvery: has joined #elixir-lang
[12:56:14] uranoss: has joined #elixir-lang
[12:56:15] medzin: has joined #elixir-lang
[12:59:23] lexmag: has joined #elixir-lang
[13:02:51] iamvery: has joined #elixir-lang
[13:05:23] lexmag: has joined #elixir-lang
[13:11:01] lexmag: has joined #elixir-lang
[13:14:01] dysfun: nox: it's like a cargo.toml except you have to evaluate it
[13:14:18] dysfun: which is great and terrible
[13:14:52] dysfun: (as ever)
[13:15:24] gvaughn: has joined #elixir-lang
[13:15:24] serafeim: has joined #elixir-lang
[13:16:15] lexmag: has joined #elixir-lang
[13:29:45] markmm: has joined #elixir-lang
[13:44:55] lexmag: has joined #elixir-lang
[13:50:29] lexmag: has joined #elixir-lang
[13:51:44] mahmudov: has joined #elixir-lang
[13:57:16] DTZUZO: has joined #elixir-lang
[13:59:32] fastfresh: has joined #elixir-lang
[14:07:50] PragTob: has joined #elixir-lang
[14:23:44] markmm: has joined #elixir-lang
[14:34:46] lexmag: has joined #elixir-lang
[14:51:05] lexmag: has joined #elixir-lang
[14:51:25] iamvery: has joined #elixir-lang
[14:56:32] iamvery: has joined #elixir-lang
[15:01:36] ariedler: has joined #elixir-lang
[15:02:13] lexmag: has joined #elixir-lang
[15:03:36] gvaughn: has joined #elixir-lang
[15:04:30] iamvery: has joined #elixir-lang
[15:09:42] lexmag: has joined #elixir-lang
[15:10:34] gausby_: :math.log2/1 seems to throw an error on integers bigger than 1024 bits. It is calling into a C function, so is this number architecture dependent ?
[15:10:46] iamvery: has joined #elixir-lang
[15:11:13] kyrylo: has joined #elixir-lang
[15:15:16] lexmag: has joined #elixir-lang
[15:16:13] MuffinPimp: has joined #elixir-lang
[15:20:55] lexmag: has joined #elixir-lang
[15:26:46] lexmag: has joined #elixir-lang
[15:31:56] Nicd-: gausby_: the docs say, "As these are the C library, the same limitations apply."
[15:32:10] lexmag: has joined #elixir-lang
[15:32:49] gausby_: Okay; I am not a C expert, so I don't know. That is why I asked
[15:33:26] Nicd-: I assume that means they are just wrappers for the underlying C lib math calls
[15:33:48] Nicd-: for Linux/glibc that would be http://man7.org/linux/man-pages/man3/log2.3.html so they would take in doubles I guess
[15:37:46] lexmag: has joined #elixir-lang
[15:40:28] gausby_: ok, I guess it will be the same for all architectures…but I'll make it a configuration option in the odd chance someone will actually use my library and hit a problem on a non 64 bit system :)
[15:41:06] gvaughn: has joined #elixir-lang
[15:46:20] jeffweiss: has joined #elixir-lang
[15:49:04] mahmudov: has joined #elixir-lang
[15:51:02] jmcgnh: has joined #elixir-lang
[15:55:08] jmcgnh: has joined #elixir-lang
[15:55:10] tnez: has joined #elixir-lang
[15:59:03] Saukk: has joined #elixir-lang
[15:59:34] jmcgnh: has joined #elixir-lang
[16:02:34] jmiven: has joined #elixir-lang
[16:04:09] wsieroci: has joined #elixir-lang
[16:05:55] lexmag: has joined #elixir-lang
[16:07:10] jmcgnh: has joined #elixir-lang
[16:09:56] wsieroci: has joined #elixir-lang
[16:15:38] jmcgnh: has joined #elixir-lang
[16:27:31] jmcgnh: has joined #elixir-lang
[16:32:03] jeffweiss: has joined #elixir-lang
[16:32:47] jmcgnh: has joined #elixir-lang
[16:56:12] __charly__: has joined #elixir-lang
[16:59:25] iamvery: has joined #elixir-lang
[17:01:28] asabil: has joined #elixir-lang
[17:09:44] hypercore: has joined #elixir-lang
[17:09:55] hypercore: any live view devs here?
[17:22:27] gde33: has joined #elixir-lang
[17:30:53] jeffweiss: has joined #elixir-lang
[17:48:55] iamvery: has joined #elixir-lang
[18:02:16] jmcgnh: has joined #elixir-lang
[18:05:43] __charly__: has joined #elixir-lang
[18:07:44] iamvery: has joined #elixir-lang
[18:10:42] laut: has joined #elixir-lang
[18:21:23] jmcgnh: has joined #elixir-lang
[18:27:26] kyrylo: has joined #elixir-lang
[18:33:20] jmcgnh: has joined #elixir-lang
[18:33:38] orbyt_: has joined #elixir-lang
[18:37:31] lexmag: has joined #elixir-lang
[18:39:39] jmcgnh: has joined #elixir-lang
[18:43:41] iamvery: has joined #elixir-lang
[18:44:32] jmcgnh: has joined #elixir-lang
[18:49:38] mahtob: has joined #elixir-lang
[18:52:52] iamvery: has joined #elixir-lang
[18:56:35] Jetimon: has joined #elixir-lang
[18:58:14] hypercore: i think live view might be interfering with the loading of other js libraries. I'm not getting any errors, but one of my js libraries isn't rendering the selected element when i use live view, not sure why
[18:59:31] hypercore: i should add it's only occuring with this one particular library, doesn't seem to affect others
[19:01:28] jmcgnh: has joined #elixir-lang
[19:02:35] ariedler: has joined #elixir-lang
[19:04:58] iamvery: has joined #elixir-lang
[19:05:24] hypercore: found out exactly what's causing it, the "liveSocket.connect()" in my app.js file
[19:09:39] hypercore: if i wrap it in a setTimeout(..., 1000) function, my select library renders normally for 1 second, then it breaks (no errors in console though)
[19:15:23] ankhers: hypercore: What is the lib that is breaking?
[19:20:50] codevictory: has joined #elixir-lang
[19:24:01] fastfresh: has joined #elixir-lang
[19:43:30] iamvery: has joined #elixir-lang
[19:51:11] RandyT: has joined #elixir-lang
[19:51:12] RandyT: has joined #elixir-lang
[19:52:00] markmm: has joined #elixir-lang
[19:53:33] asabil: has joined #elixir-lang
[20:01:45] iamvery: has joined #elixir-lang
[20:02:06] jmcgnh: has joined #elixir-lang
[20:04:23] RandyT: has joined #elixir-lang
[20:04:23] RandyT: has joined #elixir-lang
[20:04:53] RandyT: has joined #elixir-lang
[20:04:53] RandyT: has joined #elixir-lang
[20:06:54] jmcgnh: has joined #elixir-lang
[20:07:09] markmm: has joined #elixir-lang
[20:08:18] asabil: has joined #elixir-lang
[20:09:24] RandyT: has left #elixir-lang: ()
[20:09:56] mahmudov: has joined #elixir-lang
[20:18:05] orbyt_: has joined #elixir-lang
[20:23:06] iamvery: has joined #elixir-lang
[20:33:33] iamvery: has joined #elixir-lang
[20:39:39] iamvery: has joined #elixir-lang
[20:44:12] iamvery: has joined #elixir-lang
[20:58:06] asabil: has joined #elixir-lang
[21:00:13] iamvery: has joined #elixir-lang
[21:01:23] asabil: has joined #elixir-lang
[21:03:53] ariedler: has joined #elixir-lang
[21:04:50] asabil: has joined #elixir-lang
[21:13:31] Or1on: has joined #elixir-lang
[21:14:42] ur5us: has joined #elixir-lang
[21:14:49] iamvery: has joined #elixir-lang
[21:15:40] __charly__: has joined #elixir-lang
[21:18:19] pera: has joined #elixir-lang
[21:20:36] hypercore: has joined #elixir-lang
[21:24:55] iamvery: has joined #elixir-lang
[21:26:28] asabil: has joined #elixir-lang
[21:31:20] iamvery: has joined #elixir-lang
[21:32:01] hypercore: Ankhers: is it something specific about how the library initializes the elements?
[21:32:33] hypercore: i'm guessing so, because libraries like autocomplete.js work fine
[21:33:03] hypercore: actually it's probably about live view refreshing the template or something
[21:33:30] hypercore: most likely this happens when i run liveSocket.connect()
[21:34:09] hypercore: come to think of it the other libraries aren't used in this particular .leex template
[21:38:34] iamvery: has joined #elixir-lang
[21:44:25] iamvery: has joined #elixir-lang
[21:45:49] wonko77: has joined #elixir-lang
[21:49:30] iamvery: has joined #elixir-lang
[22:04:18] orbyt_: has joined #elixir-lang
[22:06:34] GGMethos: has joined #elixir-lang
[22:20:05] asabil: has joined #elixir-lang
[22:24:17] nickjj: if you wanted to access a module's attribute, is creating a function to expose it the way to go?
[22:24:34] nickjj: this is related to wanting to test a regex i have as a module attribute
[22:31:08] harrow: has joined #elixir-lang
[22:40:41] mog: is there a good way to stream all contents from an ets table?
[22:45:12] wach_4_snek: has joined #elixir-lang
[23:04:48] ariedler: has joined #elixir-lang
[23:28:20] iamvery: has joined #elixir-lang
[23:35:40] asabil: has joined #elixir-lang
[23:36:13] craigp_: has joined #elixir-lang
[23:40:54] orbyt_: has joined #elixir-lang
[23:45:43] hypercore: is there a way i can reload a script in a live view template that would normally go in app.js on every validation event? i think the problem is that my initiation script in app.js works on first render, but when a validation happens (and even when liveSocket.connect() runs for the first time), this script needs to be run again but it's not
[23:45:50] hypercore: am i missing something obvious here?