« Back to channel list

#elixir-lang - 31 March 2019

« Back 1 day Forward 1 day »
[00:07:12] thurloat: has joined #elixir-lang
[00:08:52] lexmag: has joined #elixir-lang
[00:09:33] mdbm: has joined #elixir-lang
[00:32:50] lexmag: has joined #elixir-lang
[00:37:48] lexmag_: has joined #elixir-lang
[00:49:49] lexmag: has joined #elixir-lang
[01:06:44] carldd: has joined #elixir-lang
[01:18:38] tomterl: has joined #elixir-lang
[01:55:34] Promasu: has joined #elixir-lang
[02:00:47] orbyt_: has joined #elixir-lang
[02:03:45] lexmag: has joined #elixir-lang
[02:07:56] lexmag: has joined #elixir-lang
[02:21:42] zigpaw: has joined #elixir-lang
[02:22:17] mdbm_: has joined #elixir-lang
[02:39:15] jeffro: has joined #elixir-lang
[02:42:04] orbyt_: has joined #elixir-lang
[02:45:31] thomasross_: has joined #elixir-lang
[02:50:33] griffinbyatt: has joined #elixir-lang
[02:51:17] orbyt_: has joined #elixir-lang
[03:21:07] carldd: has joined #elixir-lang
[03:28:49] nighty-: has joined #elixir-lang
[03:55:32] BBHoss: has joined #elixir-lang
[04:29:52] sevenseacat: has joined #elixir-lang
[04:30:16] wsieroci: has joined #elixir-lang
[05:00:14] ariedler: has joined #elixir-lang
[05:03:23] Saukk: has joined #elixir-lang
[05:20:25] __charly__: has joined #elixir-lang
[05:37:07] gvaughn: has joined #elixir-lang
[05:43:57] Devalo: has joined #elixir-lang
[05:59:34] __charly__: has joined #elixir-lang
[06:08:41] Devalo: has joined #elixir-lang
[06:28:01] squalloster: has joined #elixir-lang
[06:46:37] gvaughn: has joined #elixir-lang
[06:48:52] Devalo: has joined #elixir-lang
[07:01:31] ariedler: has joined #elixir-lang
[07:43:27] Devalo: has joined #elixir-lang
[07:49:29] jeffro: has joined #elixir-lang
[07:53:18] DTZUZO: has joined #elixir-lang
[08:07:00] gvaughn: has joined #elixir-lang
[08:13:29] Phylock: has joined #elixir-lang
[08:16:51] ur5us: has joined #elixir-lang
[08:23:20] Devalo: has joined #elixir-lang
[08:29:22] inhortte: has joined #elixir-lang
[08:40:09] jeffro: has joined #elixir-lang
[08:50:53] kyrylo: has joined #elixir-lang
[09:03:58] PragTob: has joined #elixir-lang
[09:06:17] Devalo: has joined #elixir-lang
[09:06:47] ur5us: has joined #elixir-lang
[09:12:34] lexmag: has joined #elixir-lang
[09:19:19] ur5us: has joined #elixir-lang
[09:21:00] ur5us: has joined #elixir-lang
[09:24:47] ur5us_: has joined #elixir-lang
[09:30:07] psy: has joined #elixir-lang
[09:37:41] inhortte: has joined #elixir-lang
[09:45:00] Devalo: has joined #elixir-lang
[09:47:01] manveru: anyone here played with phoenix liveview and tried passing a list of ints in phx-value? it arrives as a binary in my handler but i actually need integers...
[09:48:18] manveru: do i have to make them a binary and parse the ints out instead? tried pattern matching like `<<x, y>>`, but that fails for the numbers 11, 12, 13
[09:54:29] craigp_: has joined #elixir-lang
[09:56:17] Beam`: has joined #elixir-lang
[10:00:46] Jetimon: has joined #elixir-lang
[10:06:31] inhortte: has joined #elixir-lang
[10:14:26] netrino: has joined #elixir-lang
[10:20:27] Devalo: has joined #elixir-lang
[10:21:21] brono: has joined #elixir-lang
[10:28:55] ur5us: has joined #elixir-lang
[10:31:05] mahmudov: has joined #elixir-lang
[10:33:31] Devalo: has joined #elixir-lang
[10:34:08] Cthalupa: has joined #elixir-lang
[10:37:48] wsieroci: has joined #elixir-lang
[10:39:22] Devalo: has joined #elixir-lang
[10:55:07] ariedler: has joined #elixir-lang
[10:56:09] netrino: has joined #elixir-lang
[10:57:17] Devalo: has joined #elixir-lang
[11:00:01] vasilakisFiL: has joined #elixir-lang
[11:09:49] Devalo: has joined #elixir-lang
[11:10:44] Devalo: has joined #elixir-lang
[11:34:26] gvaughn: has joined #elixir-lang
[11:35:45] Devalo: has joined #elixir-lang
[11:44:48] Devalo: has joined #elixir-lang
[11:45:25] Devalo: has joined #elixir-lang
[11:48:33] craigp_: has joined #elixir-lang
[11:57:01] craigp_: has joined #elixir-lang
[11:58:49] shiro[cloud]: has joined #elixir-lang
[12:19:18] DTZUZO: has joined #elixir-lang
[12:44:10] alchemate: has joined #elixir-lang
[12:58:57] Devalo: has joined #elixir-lang
[13:12:42] lexmag: has joined #elixir-lang
[13:18:45] gvaughn: has joined #elixir-lang
[13:24:36] inhortte1: has joined #elixir-lang
[13:31:24] josevalim: You have to convert yourself
[13:31:35] josevalim: If you separate them by commas
[13:31:56] josevalim: Do a string.split and then map on the results calling String.to_integer
[13:34:21] wsieroci: has joined #elixir-lang
[13:49:06] lexmag: has joined #elixir-lang
[13:50:07] lexmag_: has joined #elixir-lang
[13:50:37] wsieroci: has joined #elixir-lang
[13:51:18] Devalo: has joined #elixir-lang
[13:56:40] orbyt_: has joined #elixir-lang
[14:04:07] Devalo: has joined #elixir-lang
[14:06:50] manveru: josevalim: might be nice to have an error for this case?
[14:07:17] manveru: not sure if that's easy to detect...
[14:07:30] manveru: but it confused the hell out of me :)
[14:07:39] josevalim: how could it error?
[14:10:40] manveru: when encoding for transfer, if i try to pass a list of ints?
[14:12:15] manveru: my approach was doing something like `def handle_event("click", [x, y], socket) do`, then i saw in the error that it tried to match it like `"value" => <<15, 8>>`, so instead i matched on `<<x, y>>`, which worked... except for the numbers 11, 12, and 13 :)
[14:13:28] manveru: i assume elixir is trying to do some magic there to figure out if it's a list or bitstring, and tbh, i'm still not sure how it does that
[14:15:22] manveru: ideally `phx-value` would encode into some kind of AST, so type isn't lost during the transfer :D
[14:15:49] tnez: has joined #elixir-lang
[14:17:50] manveru: also, in case you're interested, here's how i handled mouseover/mouseout, would be nice if `closestPhxBinding` was exported somewhere https://www.irccloud.com/pastebin/aZhn8Doi/app.js
[14:19:04] lpil: A list of ints is valid iodata so without a static type system I don't think Elixir would know when it needs to encode it as a list of ints rather than as iodata
[14:25:59] Devalo: has joined #elixir-lang
[14:26:37] lpil: has joined #elixir-lang
[14:27:00] manveru: lpil: i'm mostly wondering how this happened, i can't find a way to reproduce it in iex :(
[14:27:31] davidw: has joined #elixir-lang
[14:30:33] manveru: basically there must be some value that causes this to fail: `<<11,12>> = [11,12] |> List.to_string`
[14:31:42] gvaughn: has joined #elixir-lang
[14:33:23] lpil: manveru: Numbers over 128?
[14:34:06] manveru: i only have 0-19 though
[14:34:23] manveru: unless they somehow got combined into the same byte
[14:36:41] netrino: has joined #elixir-lang
[14:43:02] JuanMiguel: has joined #elixir-lang
[14:52:32] kyrylo: has joined #elixir-lang
[15:24:09] orbyt_: has joined #elixir-lang
[15:28:41] __charly__: has joined #elixir-lang
[15:42:57] gvaughn: has joined #elixir-lang
[15:48:33] iFire: has joined #elixir-lang
[15:49:54] hypercore: how can i import npm packages into my application with webpack?
[15:50:04] hypercore: it's not as simple as
[15:50:29] hypercore: it's not as simple as 'npm install'ing it and then "import xyz from 'xyz'" in app.js is it?
[15:50:50] umamaistempo: has joined #elixir-lang
[15:51:05] umamaistempo: Heyo everbody o/
[15:54:15] lpil: hypercore: Yup, that's it
[15:56:07] hypercore: lpil: hmm tells me it's undefined
[15:56:44] lpil: The module you're trying to import may not define a "default" value
[15:57:04] lpil: try import { nameOfAFunction } from "the-module"
[15:57:25] hypercore: lpil: i tried "import axios from 'axios'", shouldn't that work?
[15:57:48] lpil: Only if the module being imported defines a default export
[15:58:32] ariedler: has joined #elixir-lang
[15:58:58] hypercore: lpil: pretty sure it does -> https://github.com/axios/axios/blob/master/dist/axios.js
[16:02:36] lpil: https://github.com/axios/axios/blob/master/lib/axios.js
[16:02:50] lpil: It doesn't, it's using the outdated node specific exports syntax
[16:03:12] hypercore: lpil: oh ok
[16:03:38] lpil: So you'll need to import { default } from "axios"
[16:03:48] lpil: or import * as axios from axios
[16:06:01] lpil: has joined #elixir-lang
[16:06:37] hypercore: lpil: hmm i get 'unexpected keyword: default' for the first import statement, and 'axios not defined' for the second
[16:07:09] lpil: Sorry, should have been import * as axios from "axios"
[16:07:27] lpil: and I forgot that default was a keyword :)
[16:07:43] lpil: Not written any JS in 2 years
[16:08:32] lexmag: has joined #elixir-lang
[16:09:58] lpil: has joined #elixir-lang
[16:10:50] lexmag: has joined #elixir-lang
[16:11:01] lpil: has joined #elixir-lang
[16:11:58] hypercore: lpil: awesome, thanks! i think the problem was i was importing axios in app.js and expecting it to work in my component.js file (also imported in app.js)
[16:12:03] hypercore: guess that's not how js works :P
[16:12:39] lpil: Ah yes! You will need to import in each file that uses it
[16:12:46] lpil: A feature I quite like
[16:13:33] hypercore: yeah more explicit is probably better
[16:13:36] hypercore: thanks again :)
[16:20:27] lpil: Happy to help
[16:31:11] inhortte: has joined #elixir-lang
[16:31:53] thurloat: has joined #elixir-lang
[16:33:47] orbyt_: has joined #elixir-lang
[16:38:33] gvaughn: has joined #elixir-lang
[16:51:26] lpil: has joined #elixir-lang
[17:09:03] Devalo: has joined #elixir-lang
[17:15:11] wsieroci: has joined #elixir-lang
[17:30:38] lauromoura: has joined #elixir-lang
[17:36:43] Devalo: has joined #elixir-lang
[18:02:52] squalloster: has joined #elixir-lang
[18:08:55] Devalo: has joined #elixir-lang
[18:09:06] wsieroci: has joined #elixir-lang
[18:17:32] voltone: has joined #elixir-lang
[18:18:53] ariedler: has joined #elixir-lang
[18:36:17] mahmudov: has joined #elixir-lang
[19:03:01] wsieroci: has joined #elixir-lang
[19:08:07] Saukk: has joined #elixir-lang
[19:16:44] orbyt_: has joined #elixir-lang
[19:19:49] tnez: has joined #elixir-lang
[19:20:59] jeffro: has joined #elixir-lang
[19:31:20] griffinbyatt: has joined #elixir-lang
[19:41:16] Dawgora: has joined #elixir-lang
[19:56:52] wsieroci: has joined #elixir-lang
[20:09:44] jeffro: has joined #elixir-lang
[20:22:46] ur5us: has joined #elixir-lang
[20:22:58] ur5us: has joined #elixir-lang
[20:26:42] wsieroci: has joined #elixir-lang
[20:29:04] jeffro: has joined #elixir-lang
[20:33:40] Dakora: has joined #elixir-lang
[20:35:03] Dakora: howdy. i have a project with a dependency that calls modules in my project via a config value, however it's not able to find the module. is there something special i need to do to access parent project modules?
[20:39:34] Dakora: it doesn't seem to be a typo, and this somehow works for the dependency developer. https://gist.github.com/dabaer/f18207f237ec72fcff357b6222e1c2e5
[20:40:41] linduxed: how would one view the documentation for Kernel.SpecialForms.%/2 in iex?
[20:41:00] linduxed: i get "syntax error before: '%'"
[20:41:09] linduxed: probably due to it trying to parse the %
[20:42:20] fmcgeough: has joined #elixir-lang
[20:42:27] fmcgeough: has left #elixir-lang: ()
[20:42:44] fmcgeough: has joined #elixir-lang
[20:42:53] Dakora: linduxed: try `h Kernel.SpecialForms."%"/2`
[20:44:09] linduxed: Dakora: ah, that works. thank you!
[20:44:40] Dakora: no worries! special characters and capital in calls have to be wrapped before tapped
[20:44:47] linduxed: which, by the way, reminded me that this is not what i'm looking for: rem/2 is the function i'm looking for :-P
[20:50:37] antranigv: has joined #elixir-lang
[20:58:06] DarkSeid: has joined #elixir-lang
[21:54:05] __charly__: has joined #elixir-lang
[21:59:00] jeffro: has joined #elixir-lang
[22:08:04] ariedler: has joined #elixir-lang
[22:10:59] jeffro: has joined #elixir-lang
[22:39:47] orbyt_: has joined #elixir-lang
[22:47:24] jeffro: has joined #elixir-lang
[22:48:14] craigp_: has joined #elixir-lang
[23:00:26] sentreen_: has joined #elixir-lang
[23:04:02] Sentreen: has joined #elixir-lang
[23:25:43] jeffro: has joined #elixir-lang
[23:34:42] shritesh: has joined #elixir-lang
[23:47:45] __charly__: has joined #elixir-lang
[23:57:33] vhbueno: has joined #elixir-lang