#RubyOnRails - 05 April 2019
Forward 1 day »
[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
[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: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 ???
[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
[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:29:03] havenwood: IGnorAND: And here's a "fun" one - Range with indeterminate inclusion! https://gist.github.com/havenwood/bdc8b23f8ec374ec3e0c9a330ee30938
[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.
[19:23:03] catbusters: It's extremely frustrating having to wait 30+ second after each code change for the page to reload
[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
[20:31:13] IGnorAND: havenwood: So some people would thing it would mean b - y inclusive if not described as a-z inclusive?
[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:42:10] havenwood: catbusters: or hyperfine is awesome, if you want a command-line benchmarking tool: https://github.com/sharkdp/hyperfine
[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)