« Back to channel list

#elixir-lang - 13 April 2019

« Back 1 day Forward 1 day »
[00:01:01] ryanwinchester: I think the GenServer can only "do" one thing at a time. So, it has to wait for whatever you're "doing" to finish before it can handle the next message
[00:04:46] sms: Alright that's what I figured
[00:05:05] sms: I was just sort of assuming when I helped him though wanted to make sure I wasn't wrong on that
[00:11:44] wsieroci: has joined #elixir-lang
[00:15:51] Havvy: has joined #elixir-lang
[00:18:46] tobias: has joined #elixir-lang
[00:18:54] chewbranca: has joined #elixir-lang
[00:19:28] pmarreck: has joined #elixir-lang
[00:19:57] JSharp: has joined #elixir-lang
[00:20:23] FMJz_: has joined #elixir-lang
[00:24:35] sickill: has joined #elixir-lang
[00:24:52] hflw___: has joined #elixir-lang
[00:25:39] Brend: has joined #elixir-lang
[00:28:12] gonz_: has joined #elixir-lang
[00:29:13] bitwalker: has joined #elixir-lang
[00:29:55] pmarreck: has joined #elixir-lang
[00:30:28] Tobias|: has joined #elixir-lang
[00:30:44] carkmorwin: has joined #elixir-lang
[00:38:01] Net: has joined #elixir-lang
[00:40:04] chewbranca: has joined #elixir-lang
[00:40:20] Tobias|: has joined #elixir-lang
[00:40:20] ytruly: has joined #elixir-lang
[00:40:24] sickill: has joined #elixir-lang
[00:40:29] Net: has joined #elixir-lang
[00:40:33] m0lok: has joined #elixir-lang
[00:40:36] gonz_: has joined #elixir-lang
[00:40:47] JSharp: has joined #elixir-lang
[00:40:52] rvirding: has joined #elixir-lang
[00:40:58] pmarreck: has joined #elixir-lang
[00:41:12] bbielsa___: has joined #elixir-lang
[00:41:14] bitwalker: has joined #elixir-lang
[00:41:16] carkmorwin: has joined #elixir-lang
[00:41:17] gen_ale_drinker: has joined #elixir-lang
[00:42:14] reachfh: has joined #elixir-lang
[00:42:16] yrashk: has joined #elixir-lang
[00:42:36] mitchellhenke: has joined #elixir-lang
[00:43:03] adulteratedjedi: has joined #elixir-lang
[00:43:17] jetpack_joe: has joined #elixir-lang
[00:43:35] c355E3B: has joined #elixir-lang
[00:43:38] d10n-work: has joined #elixir-lang
[00:43:44] hflw___: has joined #elixir-lang
[00:44:05] hahuang65: has joined #elixir-lang
[00:45:17] RJ2: has joined #elixir-lang
[00:46:24] Brend: has joined #elixir-lang
[00:47:41] ariedler: has joined #elixir-lang
[00:48:21] wojtekmach: has joined #elixir-lang
[00:57:04] Tobias|: has joined #elixir-lang
[01:02:04] tobias: has joined #elixir-lang
[01:05:38] jeffro: has joined #elixir-lang
[01:05:45] wsieroci: has joined #elixir-lang
[01:06:39] carldd: has joined #elixir-lang
[01:10:24] cagomez: has joined #elixir-lang
[01:18:44] sms: ryanwinchester: So what if I'm using an agent in a controller, and two users call an iterator in the agent at the same time
[01:18:49] sms: Does one block the other?
[01:19:36] mim7: has joined #elixir-lang
[01:19:40] orbyt_: has joined #elixir-lang
[01:23:47] ryanwinchester: @sms pretty sure one will have to wait for the other to finish
[01:24:49] ryanwinchester: afaik each message is sent to the genserver processes mailbox, and the genserver will handle them only one at a time
[01:26:14] ryanwinchester: processed in the order in which they arrive
[01:28:07] sms: Ahh okay, so it basically handles the queue for you
[01:28:23] sms: Good to know
[01:29:22] k1nd0f: has joined #elixir-lang
[01:51:10] tomterl: has joined #elixir-lang
[01:57:21] ayr-ton: has joined #elixir-lang
[01:59:41] wsieroci: has joined #elixir-lang
[02:07:03] greengriminal: has joined #elixir-lang
[02:34:09] k1nd0f: has joined #elixir-lang
[02:38:40] tomku: has joined #elixir-lang
[02:48:33] ariedler: has joined #elixir-lang
[02:53:44] wsieroci: has joined #elixir-lang
[02:55:34] jeffro: has joined #elixir-lang
[02:59:27] Hawkheart: has joined #elixir-lang
[03:05:10] greengriminal: has joined #elixir-lang
[03:06:05] jeffro: has joined #elixir-lang
[03:10:10] mim7: has joined #elixir-lang
[03:19:34] gvaughn: has joined #elixir-lang
[03:21:02] carldd: has joined #elixir-lang
[03:34:24] lauromoura_: has joined #elixir-lang
[03:47:42] wsieroci: has joined #elixir-lang
[03:53:45] aalmazan: has joined #elixir-lang
[04:23:12] Saukk: has joined #elixir-lang
[04:41:43] wsieroci: has joined #elixir-lang
[04:49:31] ariedler: has joined #elixir-lang
[04:52:43] ryotsu: has joined #elixir-lang
[05:01:34] mim7: has joined #elixir-lang
[05:14:21] Lyubo1: has joined #elixir-lang
[05:24:45] tomterl: has joined #elixir-lang
[05:34:00] lomex: has joined #elixir-lang
[05:35:50] wsieroci: has joined #elixir-lang
[05:40:28] null__: has joined #elixir-lang
[05:47:36] lao-tzu: has joined #elixir-lang
[05:55:13] craigp: has joined #elixir-lang
[05:57:49] tomterl: has joined #elixir-lang
[06:15:41] wsieroci: has joined #elixir-lang
[06:18:47] asabil: has joined #elixir-lang
[06:24:33] gvaughn: has joined #elixir-lang
[06:28:14] greengriminal: has joined #elixir-lang
[06:38:11] huynhlv54: has joined #elixir-lang
[06:52:09] mim7: has joined #elixir-lang
[06:52:11] voltone: has joined #elixir-lang
[06:59:16] wsieroci_: has joined #elixir-lang
[06:59:41] craigp: has joined #elixir-lang
[07:01:29] PragTob: has joined #elixir-lang
[07:05:02] mdbm: has joined #elixir-lang
[07:06:44] voltone: has joined #elixir-lang
[07:38:15] gvaughn: has joined #elixir-lang
[07:44:10] polymetis: has joined #elixir-lang
[07:44:12] HalcyonicStorm: has joined #elixir-lang
[07:44:12] bitwalker: has joined #elixir-lang
[07:44:15] yurrriq: has joined #elixir-lang
[07:44:18] carkmorwin: has joined #elixir-lang
[07:44:19] jpinnix: has joined #elixir-lang
[07:44:58] lexmag: has joined #elixir-lang
[07:45:52] ctp: has joined #elixir-lang
[07:46:21] bbielsa___: has joined #elixir-lang
[07:47:11] peel: has joined #elixir-lang
[07:47:11] adulteratedjedi: has joined #elixir-lang
[07:47:14] bgmarx: has joined #elixir-lang
[07:47:15] Brenntron_: has joined #elixir-lang
[07:47:15] amitchellbullard: has joined #elixir-lang
[07:47:18] lackac: has joined #elixir-lang
[07:47:18] OliverMT: has joined #elixir-lang
[07:47:18] pmarreck: has joined #elixir-lang
[07:47:19] Paradox: has joined #elixir-lang
[07:47:19] CARAM_______: has joined #elixir-lang
[07:47:22] jameshaydon: has joined #elixir-lang
[07:47:22] reem___: has joined #elixir-lang
[07:47:35] DavidAntaramian: has joined #elixir-lang
[07:48:36] sasajuric: has joined #elixir-lang
[07:48:36] eproxus: has joined #elixir-lang
[07:48:37] bcardarella: has joined #elixir-lang
[07:48:39] FMJz_: has joined #elixir-lang
[07:48:43] alisdair: has joined #elixir-lang
[07:51:01] duoi: has joined #elixir-lang
[07:51:01] duoi: has joined #elixir-lang
[07:54:00] mcspud: has joined #elixir-lang
[07:58:26] zkat: has joined #elixir-lang
[07:58:59] ckrailo: has joined #elixir-lang
[07:59:00] ryanwinchester: has joined #elixir-lang
[07:59:03] Guest94108____: has joined #elixir-lang
[07:59:16] elskwid: has joined #elixir-lang
[08:02:20] ejpcmac: has joined #elixir-lang
[08:06:12] Phylock: has joined #elixir-lang
[08:15:38] lexmag: has joined #elixir-lang
[08:17:16] mim7: has joined #elixir-lang
[08:31:57] kapil____: has joined #elixir-lang
[08:34:33] lexmag: has joined #elixir-lang
[08:46:12] k1nd0f: has joined #elixir-lang
[08:55:30] gvaughn: has joined #elixir-lang
[09:08:21] asabil: has joined #elixir-lang
[09:12:31] mim7: has joined #elixir-lang
[09:15:26] squall: has joined #elixir-lang
[09:19:07] craigp: has joined #elixir-lang
[09:23:28] mim7: has joined #elixir-lang
[10:02:01] lexmag: has joined #elixir-lang
[10:04:34] lexmag: has joined #elixir-lang
[10:09:47] craigp: has joined #elixir-lang
[10:31:44] craigp: has joined #elixir-lang
[10:33:10] gvaughn: has joined #elixir-lang
[10:37:37] ejpcmac1: has joined #elixir-lang
[10:40:49] mim7: has joined #elixir-lang
[10:49:50] wsieroci: has joined #elixir-lang
[10:55:07] ariedler: has joined #elixir-lang
[11:04:37] ejpcmac: has joined #elixir-lang
[11:09:03] netrino: has joined #elixir-lang
[11:09:51] squall: has joined #elixir-lang
[11:14:12] wsieroci: has joined #elixir-lang
[11:20:13] craigp: has joined #elixir-lang
[11:34:31] sevenseacat: has joined #elixir-lang
[11:36:06] iamvery: has joined #elixir-lang
[11:40:50] nineczar: has joined #elixir-lang
[11:40:57] wsieroci: has joined #elixir-lang
[11:43:17] wsieroci: has joined #elixir-lang
[12:04:39] mim7: has joined #elixir-lang
[12:07:56] gvaughn: has joined #elixir-lang
[12:11:28] asabil: has joined #elixir-lang
[12:13:19] Sgeo__: has joined #elixir-lang
[12:17:03] mim7: has joined #elixir-lang
[12:19:44] proteusguy: has joined #elixir-lang
[12:20:58] mim7_: has joined #elixir-lang
[12:25:32] PragTob: has joined #elixir-lang
[12:27:44] asabil: has joined #elixir-lang
[12:28:01] craigp: has joined #elixir-lang
[12:31:52] voltone: has joined #elixir-lang
[12:42:29] voltone: has joined #elixir-lang
[12:43:55] greengriminal: has joined #elixir-lang
[12:44:57] squall: has joined #elixir-lang
[12:48:04] mim7: has joined #elixir-lang
[12:51:53] voltone: has joined #elixir-lang
[13:01:48] voltone: has joined #elixir-lang
[13:06:27] voltone: has joined #elixir-lang
[13:17:40] Avinash: has joined #elixir-lang
[13:29:12] nickjj: has joined #elixir-lang
[13:32:07] craigp: has joined #elixir-lang
[13:45:57] lauromoura_: has joined #elixir-lang
[13:53:12] mim7: has joined #elixir-lang
[14:42:35] asabil: has joined #elixir-lang
[14:43:59] voltone: has joined #elixir-lang
[14:44:28] greengriminal: has joined #elixir-lang
[14:54:12] craigp: has joined #elixir-lang
[15:02:14] proteusguy: has joined #elixir-lang
[15:02:36] voltone: has joined #elixir-lang
[15:09:12] tobias: I'm reading through https://hexdocs.pm/distillery/1.0.0/upgrades-and-downgrades.html and left wondering: Is there a way to maintain process state when performing a rolling (non-hot) upgrade to an application?
[15:10:07] asabil: has joined #elixir-lang
[15:13:16] gvaughn: has joined #elixir-lang
[15:15:39] tristanm_: put it in a database
[15:21:04] lexmag: has joined #elixir-lang
[15:31:13] tobias: tristan__: all right, thanks
[15:35:37] mahmudov: has joined #elixir-lang
[15:36:08] mim7: has joined #elixir-lang
[15:38:45] asabil: has joined #elixir-lang
[15:42:12] lexmag: has joined #elixir-lang
[15:44:42] proteusguy: has joined #elixir-lang
[15:44:51] lexmag: has joined #elixir-lang
[15:45:30] shiro[cloud]: has joined #elixir-lang
[15:48:29] asabil: has joined #elixir-lang
[15:54:47] lexmag: has joined #elixir-lang
[15:57:03] mdbm: has joined #elixir-lang
[16:00:57] craigp: has joined #elixir-lang
[16:01:33] squall: has joined #elixir-lang
[16:04:54] Phylock: has joined #elixir-lang
[16:09:53] lexmag: has joined #elixir-lang
[16:10:50] duaneb: has joined #elixir-lang
[16:15:21] orbyt_: has joined #elixir-lang
[16:26:24] proteusguy: has joined #elixir-lang
[16:27:21] shritesh: has joined #elixir-lang
[16:31:03] mim7: has joined #elixir-lang
[16:31:05] mim7: has joined #elixir-lang
[16:41:04] mim7_: has joined #elixir-lang
[16:45:51] Sgeo_: has joined #elixir-lang
[16:50:37] helpa: has joined #elixir-lang
[16:51:16] edmz: has joined #elixir-lang
[17:03:26] bingobingolotto: has joined #elixir-lang
[17:06:00] tristanm_: has joined #elixir-lang
[17:06:01] fmccann: has joined #elixir-lang
[17:06:02] dysfun: has joined #elixir-lang
[17:06:03] Reapster: has joined #elixir-lang
[17:06:06] Vircung: has joined #elixir-lang
[17:06:06] ephemeron: has joined #elixir-lang
[17:06:11] glasz: has joined #elixir-lang
[17:06:15] bodgix: has joined #elixir-lang
[17:06:32] bjorngi: has joined #elixir-lang
[17:06:39] mozzarella: has joined #elixir-lang
[17:06:52] lpvb: has joined #elixir-lang
[17:06:56] codewaffle: has joined #elixir-lang
[17:06:58] Ninja3047: has joined #elixir-lang
[17:06:59] kzemek: has joined #elixir-lang
[17:07:12] ankhers: has joined #elixir-lang
[17:08:04] Speed: has joined #elixir-lang
[17:10:04] Linuus: has joined #elixir-lang
[17:10:16] keno_: has joined #elixir-lang
[17:12:36] keno_: has joined #elixir-lang
[17:14:17] bingobin1olotto: has joined #elixir-lang
[17:15:11] bingobin1olotto: has joined #elixir-lang
[17:16:51] bingobin1olotto: has joined #elixir-lang
[17:17:30] nineczar: has joined #elixir-lang
[17:20:00] bingobingolotto: has joined #elixir-lang
[17:22:07] bingobingolotto: has joined #elixir-lang
[17:22:45] craigp: has joined #elixir-lang
[17:29:37] pera: has joined #elixir-lang
[17:34:44] hypercore: guys, what naming scheme should i use for 1. schemas, 2. static assets? e.g. if i have a product "apple iphone X", which has a column "product_image", what url should i get this product (e.g. example.com/{slug}) and what name should i give product_image in my s3 bucket?
[17:37:35] griffinbyatt: has joined #elixir-lang
[17:38:33] tnez: has joined #elixir-lang
[17:44:59] nineczar: has joined #elixir-lang
[17:45:05] squall: has joined #elixir-lang
[17:49:35] ariedler: has joined #elixir-lang
[17:49:46] k1nd0f: has joined #elixir-lang
[17:50:12] orbyt_: has joined #elixir-lang
[17:52:38] notzmv: has joined #elixir-lang
[17:56:52] mahmudov: has joined #elixir-lang
[18:06:16] teepark_: has joined #elixir-lang
[18:31:00] craigp: has joined #elixir-lang
[18:31:39] infowolfe: has joined #elixir-lang
[18:31:40] infowolfe: has joined #elixir-lang
[18:46:22] mahmudov: has joined #elixir-lang
[19:09:15] kyrylo: has joined #elixir-lang
[19:28:31] craigp: has joined #elixir-lang
[19:28:47] DTZUZO: has joined #elixir-lang
[19:29:41] orbyt_: has joined #elixir-lang
[19:37:55] DTZUZO: has joined #elixir-lang
[19:41:39] tomterl: has joined #elixir-lang
[19:46:12] k1nd0f: has joined #elixir-lang
[20:01:15] orbyt_: has joined #elixir-lang
[20:03:11] rhbvkleef: hypercore, I am not sure what information you require. Could you attempt to clarify your question? Also: if you are just asking for recommendations i.r.t. URL naming, this is not the proper place.
[20:03:39] k1nd0f: has joined #elixir-lang
[20:04:12] ejpcmac: has joined #elixir-lang
[20:08:06] craigp: has joined #elixir-lang
[20:52:14] k1nd0f: has joined #elixir-lang
[21:21:00] ariedler: has joined #elixir-lang
[21:22:11] Cthalupa: has joined #elixir-lang
[21:29:45] craigp: has joined #elixir-lang
[21:31:29] hypercore: rhbvkleef: maybe it's not relevent here, not sure what channel it would be relevant on though
[21:31:34] hypercore: i'll look elsewhere
[21:31:50] k1nd0f: has joined #elixir-lang
[21:34:15] Cthalupa: has joined #elixir-lang
[21:48:09] argoneus: has joined #elixir-lang
[21:52:16] skagerak: has joined #elixir-lang
[21:58:08] hypercore: how do i create a route/controller of format /products/:product_id/:product_slug
[21:59:35] skagerak: has joined #elixir-lang
[21:59:36] skagerak: has joined #elixir-lang
[22:00:45] ariedler: I would assume that exact syntax
[22:03:46] hypercore: ariedler: what about if i want /products/:id/:slug to redirect to the same page, no matter the value of :slug?
[22:04:06] ariedler: just ignore slug param in your controller
[22:08:22] hypercore: ariedler: hmm, in my case i don't have a slug field, i just want to use the product title, e.g. %{title: "Samsung Galaxy S10"} would use a slug of "samsung-galaxy-s10" (created in the controller)
[22:09:15] ariedler: hypercore: right, I understand that. in your router you have something like `get "/products/:id/:slug", ProductController, :show`
[22:09:27] ariedler: (I am assuming phoenix here)
[22:10:11] k1nd0f: has joined #elixir-lang
[22:11:32] ariedler: I would probably implement `product_path(conn, :show, product)` -> `product_path(conn, :show, product.id, product.title)`
[22:12:00] ariedler: you might want the product title to be dash-cased so apply the transformation there
[22:15:15] hypercore: ariedler: ah nice, yeah i think the issue is also using links. My old link code looked liked Routes.product_path(@conn, :show, @product.id), how would you adjust it?
[22:15:32] hypercore: should i create a "title_to_slug" function in ProductView?
[22:15:55] hypercore: e.g. Routes.product_path(@conn, :show, @product.id, title_to_slug(@product.title))
[22:16:22] ariedler: your old routes should have been `Routes.product_path(@conn, :show, @product)` right ?
[22:16:36] ariedler: cause you implemented Plug.Param for Product ?
[22:16:50] hypercore: ariedler: oh, no they were (@conn, :show, @product.id)... is that wrong?
[22:17:11] ariedler: if @product is just a regular ecto struct, then it should just have been `@product`
[22:17:21] hypercore: good to know :P
[22:17:21] ariedler: and it will auto-matically use the id
[22:20:44] ariedler: in your project_name.ex ; there is a `def view` right ?
[22:21:00] ariedler: (could be project_name_web.ex, I am forgetting all the conventions off the top of my head)
[22:22:20] hypercore: ariedler: yeah, in myapp_web.ex
[22:23:04] ariedler: you could import or alias another CustomRoutes or something like that, instead of transforming all your use of `product_path`
[22:24:00] ariedler: what does your `def view` look like
[22:24:36] ariedler: (or wrap Routes via an import)
[22:25:22] hypercore: ariedler: -> https://paste.ubuntu.com/p/wwxFv5RbnJ/
[22:25:25] hypercore: standard i think
[22:31:28] ariedler: let me try something on a new project lol
[22:31:43] hypercore: ariedler: thanks xD
[22:37:31] craigp: has joined #elixir-lang
[22:41:33] k1nd0f: has joined #elixir-lang
[22:50:29] ariedler: I was trying to make it so you could extend Helpers; but not sure if possible lol
[22:51:31] duaneb: has joined #elixir-lang
[22:53:25] hypercore: ariedler: works fine using the view function, but yeah not sure if this is the best way to do it :P
[22:53:51] ariedler: I know how I would do /product/502502-iphone-x-4g
[22:54:44] hypercore: ariedler: not /products/502502/iphone-x-4g?
[22:55:11] hypercore: i'm open to anything, have no idea what's the best method
[22:55:29] hypercore: stackoverflow uses that format, so i thought it might be good, that's the only reason
[22:58:21] blahdodo: has joined #elixir-lang
[22:58:56] ariedler: oh maybe I can impl protocol hmmm
[22:59:08] ariedler: but it is not clear lol
[23:04:09] ariedler: https://dpaste.de/bKBa
[23:04:26] ariedler: is what I tried, it works for the most part, obviously underscore is not what you want though :P
[23:05:06] ariedler: I aliased HelloWorldWeb.Routes as SlugRoutes inside `def view`
[23:05:34] whoops: has joined #elixir-lang
[23:09:10] ariedler: I think the thing is Phoenix.Param can't derive to two keys (where the keys we are thinking are slug and id)
[23:17:44] hypercore: hmm getting "product_slug_path/4 is undefined"
[23:18:20] blahdodo: has joined #elixir-lang
[23:18:49] ariedler: what does your route look like in router.ex ?
[23:19:12] k1nd0f: has joined #elixir-lang
[23:25:29] wyzzard: has joined #elixir-lang
[23:28:24] fmcgeough: has joined #elixir-lang
[23:35:46] hypercore: ariedler: get "/products/:id/:slug", ProductController, :show
[23:35:58] ariedler: that would define `product_path`
[23:36:27] ariedler: in my example I supported /products/:id (without slug) as a canonical path
[23:43:28] hypercore: ariedler: is MyappWeb.Router.Helpers.product_slug_path defined by phoenix?
[23:43:39] lauromoura_: has joined #elixir-lang
[23:43:46] hypercore: tried removing ../:slug, but didn't make a difference
[23:46:31] hypercore: ariedler: my bad, all good :)
[23:48:56] orbyt_: has joined #elixir-lang
[23:49:47] kyrylo: has joined #elixir-lang