« Back to channel list

#RubyOnRails - 05 April 2019

Forward 1 day »
[02:29:48] helpa: has joined #RubyOnRails
[02:33:00] gimae: has joined #RubyOnRails
[02:34:34] gimae: Hi there. I'm developing an app that needs to do some background json schema validation. It would be great if I could use ActiveJob to keep it integrated with the rest of my Rails app. If it's a toss up between keeping it inside the ecosytem vs. doing it separately in say Python, is there an obvious choice?
[02:34:57] gimae: Don't know much about python vs ruby performance but it seems like there's pretty capable libs in each
[02:35:17] DTZUZO: has joined #RubyOnRails
[02:51:07] s00pcan: has joined #RubyOnRails
[02:59:46] NeXTSUN: has joined #RubyOnRails
[03:03:53] kvda: has joined #RubyOnRails
[03:07:55] pd09041999: has joined #RubyOnRails
[03:11:16] braincrash: has joined #RubyOnRails
[03:18:18] Momentum: has joined #RubyOnRails
[03:53:02] arescorpio: has joined #RubyOnRails
[04:14:57] Technodrome: has joined #RubyOnRails
[05:06:31] orbyt_: has joined #RubyOnRails
[05:23:08] kvda: has joined #RubyOnRails
[05:45:42] fragamus: has joined #RubyOnRails
[05:51:59] sidx64: has joined #RubyOnRails
[06:03:07] Xiti: has joined #RubyOnRails
[06:19:49] srinidhi: has joined #RubyOnRails
[06:23:07] ariedler: has joined #RubyOnRails
[06:26:36] MrCrackPotBuilde: hi im having a bit of trouble understanding a worker in an app. There is this line -- orders = ServiceOrder.where(status: "confirmed", service_time: 10.years.ago..8.hours.from_now) -- i know its createing a var/obj called orders equal to a service order obj where the status is confirmed and the service time is 10 years ago. But that last .8 hours from now does that say from ten years ago IN a hours from now??
[06:26:43] Dbugger: has joined #RubyOnRails
[06:28:30] MrCrackPotBuilde: then underneath is a loop taking order from orders and asking -- if order.service_time + order.duration.seconds < 8.hours.from_now -- is the sum of the two args less than 8 hours from now perform task
[06:29:17] MrCrackPotBuilde: or is the service time query asking for orders that are both 10 years ago and 8 hours from now ???
[06:30:25] dtzuzu: has joined #RubyOnRails
[06:31:57] helpa-bot: has joined #RubyOnRails
[06:34:27] helpa: has joined #RubyOnRails
[06:41:49] cgfbee: has joined #RubyOnRails
[06:51:58] dtzuzu: has joined #RubyOnRails
[07:00:50] v01d4lph4: has joined #RubyOnRails
[07:12:48] sidx64_: has joined #RubyOnRails
[07:13:38] prestorium: has joined #RubyOnRails
[07:15:44] sidx64: has joined #RubyOnRails
[07:18:17] helpa: has joined #RubyOnRails
[07:20:00] supergeek[m]: has joined #RubyOnRails
[07:21:36] snickers: has joined #RubyOnRails
[07:25:54] SanguineAnomaly: has joined #RubyOnRails
[07:33:30] v01d4lph4: has joined #RubyOnRails
[07:42:06] sidx64: has joined #RubyOnRails
[07:43:14] lxsameer: has joined #RubyOnRails
[07:43:20] dionysus69: I have some free time, does anyone have any project that would need contribution? plus I would like to gain experience in FOSS contribution flow
[07:45:40] phaul: has joined #RubyOnRails
[07:51:11] pd09041999: has joined #RubyOnRails
[07:53:53] pd09041999: has joined #RubyOnRails
[08:04:23] pd09041999: has joined #RubyOnRails
[08:04:28] kvda: has joined #RubyOnRails
[08:07:00] conta1: has joined #RubyOnRails
[08:07:16] pd09041999: has joined #RubyOnRails
[08:14:11] Ergo: has joined #RubyOnRails
[08:15:21] phaul: has joined #RubyOnRails
[08:23:58] ariedler: has joined #RubyOnRails
[08:27:49] jottr: has joined #RubyOnRails
[08:43:57] sidx64: has joined #RubyOnRails
[08:53:36] srinidhi: has joined #RubyOnRails
[09:00:10] hightower2: has joined #RubyOnRails
[09:18:56] pd09041999: has joined #RubyOnRails
[09:40:33] jottr_: has joined #RubyOnRails
[09:42:14] jottr: has joined #RubyOnRails
[09:49:05] pd09041999: has joined #RubyOnRails
[09:50:19] za1b1tsu: has joined #RubyOnRails
[09:55:35] sidx64: has joined #RubyOnRails
[10:00:45] DTZUZO: has joined #RubyOnRails
[10:01:30] Davey: has joined #RubyOnRails
[10:07:33] tjbp: has joined #RubyOnRails
[10:08:26] MrCrackPotBuilde: has joined #RubyOnRails
[10:11:23] sidx64_: has joined #RubyOnRails
[10:11:36] conta1: has joined #RubyOnRails
[10:20:58] mangold: has joined #RubyOnRails
[10:23:52] RiPuk: has joined #RubyOnRails
[10:24:48] ariedler: has joined #RubyOnRails
[10:38:49] RiPuk: has joined #RubyOnRails
[10:39:07] supergeek[m]: has joined #RubyOnRails
[10:47:52] AlHafoudh: has joined #RubyOnRails
[10:49:32] lankanmon: has joined #RubyOnRails
[10:52:34] pd09041999: has joined #RubyOnRails
[10:55:08] ariedler: has joined #RubyOnRails
[10:58:45] pd09041999: has joined #RubyOnRails
[11:02:12] mikecmpbll: has joined #RubyOnRails
[12:00:04] jhill: has joined #RubyOnRails
[12:07:37] DukeDave: has joined #RubyOnRails
[12:10:13] xco: has joined #RubyOnRails
[12:12:04] jhill: has joined #RubyOnRails
[12:20:58] pd09041999: has joined #RubyOnRails
[12:26:26] brendan-: has joined #RubyOnRails
[12:28:06] v01d4lph4: has joined #RubyOnRails
[12:28:07] pd09041999: has joined #RubyOnRails
[12:31:19] pd09041999: has joined #RubyOnRails
[12:38:38] pd09041999: has joined #RubyOnRails
[12:45:47] pd09041999: has joined #RubyOnRails
[13:07:42] dviola: has joined #RubyOnRails
[13:09:47] dviola: has joined #RubyOnRails
[13:44:24] tjbp: has joined #RubyOnRails
[13:45:46] pd09041999: has joined #RubyOnRails
[13:53:00] pd09041999: has joined #RubyOnRails
[14:01:26] pd09041999: has joined #RubyOnRails
[14:06:15] pd09041999: has joined #RubyOnRails
[14:13:20] snickers: has joined #RubyOnRails
[14:24:34] tjbp: has joined #RubyOnRails
[14:24:52] pd09041999: has joined #RubyOnRails
[14:30:34] kapil____: has joined #RubyOnRails
[14:52:48] shtirlic: has joined #RubyOnRails
[15:00:57] tdy: has joined #RubyOnRails
[15:24:46] tjbp: has joined #RubyOnRails
[15:31:23] shtirlic: has joined #RubyOnRails
[15:32:29] tjbp: has joined #RubyOnRails
[15:32:34] grvgr: has joined #RubyOnRails
[15:35:56] gambl0r3: has joined #RubyOnRails
[15:38:00] brendan-: has joined #RubyOnRails
[15:49:01] tjbp: has joined #RubyOnRails
[15:54:51] shtirlic: has joined #RubyOnRails
[16:09:51] mangold: has joined #RubyOnRails
[16:35:23] mangold: has joined #RubyOnRails
[16:52:50] shtirlic: has joined #RubyOnRails
[16:52:53] mangold: has joined #RubyOnRails
[16:57:43] orbyt_: has joined #RubyOnRails
[17:00:51] shtirlic: has joined #RubyOnRails
[17:02:52] orbyt_: has joined #RubyOnRails
[17:06:16] tdy: has joined #RubyOnRails
[17:07:25] dviola: has joined #RubyOnRails
[17:08:49] segy: has joined #RubyOnRails
[17:09:02] hightower2: has joined #RubyOnRails
[17:13:44] agent_white: has joined #RubyOnRails
[17:21:53] srinidhi: has joined #RubyOnRails
[17:23:31] conta2: has joined #RubyOnRails
[17:24:05] IGnorAND: Any english guru's online? "The alphabet used consists of ASCII letters a to z, inclusive, and is case insensitive." What does 'inclusive' mean in this case?
[17:25:36] havenwood: &>> ('a'..'z').exclude_end?
[17:26:12] havenwood: IGnorAND: That's ^ inclusive - it includes `z'.
[17:26:22] havenwood: &>> ('a'...'z').exclude_end?
[17:26:32] shtirlic: has joined #RubyOnRails
[17:27:27] havenwood: class Range; def inclusive?; !exclude_end? end end; ('a'..'z').inclusive?
[17:29:03] havenwood: IGnorAND: And here's a "fun" one - Range with indeterminate inclusion! https://gist.github.com/havenwood/bdc8b23f8ec374ec3e0c9a330ee30938
[17:31:38] wallace_mu: has joined #RubyOnRails
[17:32:50] havenwood: Does it include the end? Maybe!! ¯\_(ツ)_/¯
[17:34:01] IGnorAND: what does &>> mean?
[17:35:00] havenwood: IGnorAND: Asking the bot to evaluate.
[17:35:14] havenwood: ('a'..'z').exclude_end?
[17:35:52] havenwood: IGnorAND: An inclusive range just means it includes, rather than goes right up to but doesn't include, the range end item.
[17:36:15] havenwood: ('a'..'z').end #=> "z"
[17:42:02] LtHummus: has joined #RubyOnRails
[17:50:38] uks: has joined #RubyOnRails
[18:00:32] lxsameer: has joined #RubyOnRails
[18:21:47] sidx64: has joined #RubyOnRails
[18:26:00] sidx64_: has joined #RubyOnRails
[18:32:08] tdy: has joined #RubyOnRails
[18:59:08] mikecmpbll: has joined #RubyOnRails
[19:01:44] charnel: has joined #RubyOnRails
[19:02:02] orbyt_: has joined #RubyOnRails
[19:08:27] Terens: has joined #RubyOnRails
[19:15:54] catbusters: has joined #RubyOnRails
[19:22:41] catbusters: Why is Rails So. Damn. Slow. in development?
[19:23:03] catbusters: It's extremely frustrating having to wait 30+ second after each code change for the page to reload
[19:23:13] catbusters: I set `config.assets.debug = false`
[19:36:16] pd09041999: has joined #RubyOnRails
[19:48:07] eckhardt: has joined #RubyOnRails
[19:51:41] pro777: <catbusters> That seems unusual. You could try the rack-mini-profiler and see what's taking so long.
[19:52:22] catbusters: I'll try that Pro777. Been that experience with several Rails apps I've worked with though, some from scratch some inherited
[19:54:15] pro777: What web server are you running locally?
[19:55:39] catbusters: It's Puma by default right?
[19:55:48] catbusters: I haven't changed anything related to the web server
[19:58:05] pro777: Hmm, ok. That's weird.
[19:59:35] catbusters: And I don't get any performance issues in production mode
[19:59:52] catbusters: Been driving me nuts :/
[20:22:21] walidvb: has joined #RubyOnRails
[20:31:13] IGnorAND: havenwood: So some people would thing it would mean b - y inclusive if not described as a-z inclusive?
[20:31:40] IGnorAND: catbusters: 30 second is very long!
[20:32:26] IGnorAND: catbusters: try running production mode locally?
[20:32:40] IGnorAND: just to narrow dawn the cause
[20:32:41] catbusters: Yes, don't face the issues then
[20:32:51] catbusters: All config is default Rails config
[20:33:36] havenwood: catbusters: are you using Spring and Bootsnap?
[20:33:46] havenwood: catbusters: what Ruby are you using?
[20:33:58] catbusters: And yes on spring / bootsnap
[20:37:50] havenwood: catbusters: how long does a freshly generated Rails app take for you to: rails runner '0'
[20:39:04] havenwood: catbusters: I'm seeing it take about 500ms: https://gist.github.com/havenwood/fd1fa702692bd3e628c045e8c440c9aa
[20:40:20] catbusters: rails runner '0' just prints Running via Spring preloader in process 72148 and exits
[20:40:31] havenwood: IGnorAND: more often a-y
[20:40:45] havenwood: catbusters: yeah, it doesn't do anything
[20:41:06] catbusters: So how did you get the benchmark output?
[20:41:07] havenwood: catbusters: i just meant to check how long it takes to load Rails
[20:41:15] havenwood: catbusters: i used hyperfine
[20:41:23] havenwood: catbusters: you probably already have `time` installed
[20:41:42] havenwood: catbusters: time rails runner '0'
[20:42:03] IGnorAND: $ time rails runner '0'
[20:42:03] IGnorAND: Running via Spring preloader in process 73385
[20:42:03] IGnorAND: real 0m0.887s
[20:42:05] IGnorAND: user 0m0.531s
[20:42:07] catbusters: https://www.irccloud.com/pastebin/HWbBUN3y/
[20:42:07] IGnorAND: sys 0m0.196s
[20:42:10] havenwood: catbusters: or hyperfine is awesome, if you want a command-line benchmarking tool: https://github.com/sharkdp/hyperfine
[20:42:32] IGnorAND: catbusters: add time in front ;)
[20:42:53] catbusters: Yes I did that
[20:43:11] havenwood: catbusters: how long is it taking for a fresh app versus your slow app?
[20:43:17] catbusters: I'll try hyperfine
[20:44:47] catbusters: For fresh app https://www.irccloud.com/pastebin/ObVb6Yl5/
[20:45:09] catbusters: For slow app https://www.irccloud.com/pastebin/bEC5yIXf/
[20:45:25] catbusters: Doesn't look like this is the problem
[21:18:19] Terens: I want to get User's Vote for each Comment object. I did something like select('comments.*', 'votes.reaction as user_reaction').joins('votes on comment.id=votes.comment_id and votes.user_id=666)
[21:18:27] Terens: is there a better way ?
[21:23:10] catbusters: Comment.votes.where(user_id: 666) should work I guess
[21:48:39] Terens: this would return the votes only
[21:49:23] Terens: it wont return comments without votes probbaly
[21:52:53] xco: has joined #RubyOnRails
[21:56:07] Xiti`: has joined #RubyOnRails
[21:56:31] lxsameer: has joined #RubyOnRails
[21:58:02] darkphnx48: has joined #RubyOnRails
[21:58:37] salasrod_: has joined #RubyOnRails
[21:59:50] hellekin: has joined #RubyOnRails
[22:00:35] _Caerus: has joined #RubyOnRails
[22:01:57] Ropeney_: has joined #RubyOnRails
[22:02:13] oddie: has joined #RubyOnRails
[22:02:32] Linuus: has joined #RubyOnRails
[22:02:58] SloggerK: has joined #RubyOnRails
[22:04:34] bga57: has joined #RubyOnRails
[22:20:54] plantroon: has joined #RubyOnRails
[22:33:58] jhass: has joined #RubyOnRails
[23:32:30] NeXTSUN: has joined #RubyOnRails
[23:46:38] apparition: has joined #RubyOnRails