« Back to channel list

#RubyOnRails - 29 August 2018

« Back 1 day Forward 1 day »
[00:00:05] SteenJobs: has joined #RubyOnRails
[00:23:25] LiftLeft2: has joined #RubyOnRails
[00:24:32] spohnz: has left #RubyOnRails: ("Leaving channel")
[00:34:51] DTZUZO: has joined #RubyOnRails
[00:41:05] LiftLeft2: has joined #RubyOnRails
[00:45:48] LambdaSource: has joined #RubyOnRails
[00:54:49] quazimodo: has joined #RubyOnRails
[00:56:34] lxsameer: has joined #RubyOnRails
[00:59:57] apeiros: has joined #RubyOnRails
[01:07:24] sevenseacat: has joined #RubyOnRails
[01:14:55] uks: has joined #RubyOnRails
[01:19:38] hays: has joined #RubyOnRails
[01:22:23] russt: has joined #RubyOnRails
[01:22:52] \13k: has joined #RubyOnRails
[01:27:17] bswinnerton: has left #RubyOnRails: ("The Lounge - https://thelounge.chat")
[01:28:20] uks: has joined #RubyOnRails
[01:29:25] spectra: has joined #RubyOnRails
[01:29:32] apeiros: has joined #RubyOnRails
[01:44:18] apeiros: has joined #RubyOnRails
[01:53:53] Avon: has joined #RubyOnRails
[01:55:56] Ropeney: has joined #RubyOnRails
[01:56:58] LiftLeft2: has joined #RubyOnRails
[01:57:18] knight33: has joined #RubyOnRails
[01:57:43] SteenJobs: has joined #RubyOnRails
[01:58:12] jhass: has joined #RubyOnRails
[01:59:17] apeiros: has joined #RubyOnRails
[02:10:29] Dimik: has joined #RubyOnRails
[02:14:18] apeiros: has joined #RubyOnRails
[02:29:22] apeiros: has joined #RubyOnRails
[02:30:15] cschneid_: has joined #RubyOnRails
[02:42:55] tomaw: has joined #RubyOnRails
[02:46:27] Alchemical: has joined #RubyOnRails
[02:53:30] tjbp: has joined #RubyOnRails
[02:53:31] CheckYourSix: has joined #RubyOnRails
[02:55:41] Fire-Dragon-DoL: has joined #RubyOnRails
[02:58:58] michael_mbp: has joined #RubyOnRails
[02:59:22] apeiros: has joined #RubyOnRails
[03:00:17] rodd: has joined #RubyOnRails
[03:02:47] sevenseacat: what libraries are people using to add 2fa support to their apps? considering https://github.com/tinfoil/devise-two-factor
[03:12:06] sevenseacat: https://github.com/heapsource/active_model_otp also seems to be a thing
[03:13:35] braincras: has joined #RubyOnRails
[03:14:47] sevenseacat: anyone have experience with one or the other?
[03:14:48] pipework: It's not the same vein, but konghq's api gateway has plugins for it.
[03:19:55] knight33: has joined #RubyOnRails
[03:30:49] darkhanb: has joined #RubyOnRails
[03:31:22] apeiros: has joined #RubyOnRails
[03:42:17] Radar: sevenseacat: we rolled our own at Marketplacer and my advice is: don't do that. Use something people have already builtr.
[03:42:41] Radar: Either that, or copy exactly what GitHub does because their flow around that is really awesome.
[03:42:46] sevenseacat: yeah i'm running with the devise one for now, will see how it goes
[03:46:41] apeiros: has joined #RubyOnRails
[03:49:30] Saukk: has joined #RubyOnRails
[03:56:52] sevenseacat: there are some things about it already that I don't like
[03:57:10] sevenseacat: eg. entering otp value as part of the signin form
[04:01:26] apeiros: has joined #RubyOnRails
[04:15:58] tdy: has joined #RubyOnRails
[04:22:27] apeiros: has joined #RubyOnRails
[04:30:38] Radar: Not as a separate step?
[04:31:49] Radar: Goes against the usual flow that I see. It also would break compatibility with 1pw. 1pw copies the OTP code to the clipboard after a successful sign-in.
[04:46:35] amincd: I'm getting this SQL exception when I try to create a record through the console: ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table.. but when I do the same query that the logs shows produced the failure when initiated from rails console, using dbconsole, it works. Any idea what could be causing the discrepancy?
[04:46:58] Radar: amincd: computers usually do not lie. The table probably does not exist.
[04:47:25] Radar: _usually_
[04:54:08] apeiros: has joined #RubyOnRails
[05:01:32] apeiros: has joined #RubyOnRails
[05:02:39] baweaver: So what's the general opinion on GraphQL?
[05:02:56] baweaver: Reading through it it seems like just as much, if not more boilerplate.
[05:03:49] Radar: ACTION comforts GraphQL "don't listen to the bad man" 
[05:04:12] baweaver: Considering my first instinct is macro generation, that's a very wise thing to tell it :)
[05:04:29] Radar: baweaver: I like it for its ability to do multiple queries in the same view, and also that I can fetch exactly the fields that I want
[05:04:29] baweaver: Will go off and build something right quick in it
[05:04:56] baweaver: Remember when I was asking about ElasticSearch and Ransack earlier?
[05:05:02] Radar: baweaver: the gnarliest graphql query that I've written looks like this: https://github.com/radar/twist-v2/blob/master/frontend/src/modules/app/components/book/chapter/container.js#L5-L56
[05:05:16] Radar: baweaver: yeah I remember that
[05:05:24] beholders_eye: has joined #RubyOnRails
[05:05:25] baweaver: The backstory then
[05:05:33] pipework: baweaver: People wanted to do two things that are worth doing, 'graph queries' (sorta) and use a single entrypoint where the payload contains the whole of the information rather than HTTP which includes routing.
[05:05:44] baweaver: Found out we have an application that basically made its own version of GraphQL for infrastructure
[05:05:46] pipework: So for me, it's some opinions on top of two worthwhile things.
[05:05:57] baweaver: N+100 queries all the things
[05:06:23] baweaver: includes recursive relations to machines and hardware among other fun things
[05:06:49] baweaver: Now comes my favorite part: they told me to make it go away :D
[05:06:49] pipework: Is there an SSH-graphql library yet? :p
[05:07:24] baweaver: Well, more accurately co-architect it to help level up another team member
[05:07:44] baweaver: Ah! Right. I hadn't mentioned fun things yet either.
[05:07:52] baweaver: Got promoted to effectively Staff Engineer :D
[05:08:00] Radar: baweaver: congrats :)
[05:08:09] baweaver: Danke danke
[05:08:26] Radar: baweaver: sounds like it could be a good application for graphql. GraphQL's just a neat layer between some external API and your internal API. Your fields can be resolved using REST APIs or... really anything that code can do.
[05:08:49] Radar: I like that GraphQL isn't particularly tied to any DB backend arch
[05:09:01] baweaver: Yeah, basically query against a potential labyrinth of ops data.
[05:09:13] baweaver: The original was an intern project that grew
[05:09:15] Radar: What are you currently using to talk to the servers to find out that info?
[05:09:42] Radar: Guessing that maybe the servers provide their own APIs that provide requested info as its requested?
[05:09:53] baweaver: That's a good question
[05:10:02] baweaver: one I haven't fully investigated yet
[05:10:08] baweaver: but I have a fear that a lot of it is manual
[05:10:33] baweaver: considering sparse validations on fields and a lot of MAC addresses that are wrong around
[05:11:04] Radar: https://gist.github.com/radar/df8638034c1a458805c11ca005675007 <- I'm thinking that you're writing queries like this
[05:11:04] baweaver: Yep, so the fun begins
[05:11:44] baweaver: Though at that rate I'd almost tell them to use OsQuery instead: https://osquery.io/
[05:11:45] Radar: And so I'd imagine that hitting a HTTP endpoint on that server that's returning a big JSON blob of data. But then you could split that down to have different endpoints for each little bit of data.
[05:12:21] Radar: wow osquery looks nice :D
[05:12:22] baweaver: I'm hoping that I see it just caches or interfaces with something like that.
[05:12:31] baweaver: But I don't think I'm that lucky :P
[05:12:53] Radar: if it's an intern project then it's probably one new way of getting the data for each different point.
[05:13:02] baweaver: https://github.com/vilterp/osquery-graphql
[05:13:10] Radar: I'd start there. How does the data get _out_ of the machine?
[05:13:12] baweaver: Hrm, that's a bit old
[05:13:18] baweaver: Indeed indeed
[05:13:27] Radar: baweaver: p.s. my invoice is already on its way to you
[05:13:45] baweaver: I'd only glanced long enough to see they'd basically used every metaprogramming trick in the book to make a smart api query layer.
[05:13:58] rootsudo: has joined #RubyOnRails
[05:15:29] Radar: baweaver: and this is why they've made you head janitor
[05:15:49] baweaver: Radar: payment sent
[05:15:51] Radar: Oh wow you've actually paid my invoice for once!
[05:16:36] baweaver: Mostly because I have a habit for killing monsters
[05:17:58] baweaver: It's quite fun
[05:21:19] orbyt_: has joined #RubyOnRails
[05:26:59] za1b1tsu_: has joined #RubyOnRails
[05:40:36] ariedler: has joined #RubyOnRails
[05:52:27] reber: has joined #RubyOnRails
[05:58:46] FastJack: has joined #RubyOnRails
[05:59:26] nemesit: has joined #RubyOnRails
[06:04:40] sandstrom: has joined #RubyOnRails
[06:05:25] rootsudo: has joined #RubyOnRails
[06:13:20] psychoslave_: has joined #RubyOnRails
[06:13:57] Dbugger: has joined #RubyOnRails
[06:16:24] wethu: has joined #RubyOnRails
[06:16:34] za1b1tsu_: has joined #RubyOnRails
[06:19:11] snickers: has joined #RubyOnRails
[06:21:33] LambdaSource: has joined #RubyOnRails
[06:34:27] baweaver: Oi, what's this?: resolve -> (obj, args, ctx) { Link.all }
[06:34:35] baweaver: Passing a lambda there is silly
[06:34:51] baweaver: resolve { |obj, args, ctx| Link.all }
[06:35:04] baweaver: Makes it easier to read multilines too.
[06:37:13] srinidhi: has joined #RubyOnRails
[06:42:30] Tempesta: has joined #RubyOnRails
[06:46:14] Aherin: has joined #RubyOnRails
[06:52:00] nemesit: has joined #RubyOnRails
[06:54:44] tbuehlmann: baweaver: using a lambda/proc isn't the recommended way anymore, iirc. I think they changed to using methods, like here: https://github.com/rmosolgo/graphql-ruby/blob/fd8c87ab458921aa9d50c8ceb46c8be97e32cbfe/guides/getting_started.md#build-a-schema
[06:54:57] Radar: ^ tbuehlmann's right
[06:55:14] Radar: It's so much more sensible to use methods
[06:55:17] baweaver: Is it just me or does it just feel really verbose for what you get?
[06:55:28] Radar: baweaver: the method one or the lambda one?
[06:55:53] baweaver: Each mutation requires an explicit file, same with each query type
[06:56:14] baweaver: I just wonder if there's a way to potentially do this smarter
[06:56:23] baweaver: Convention over configuration wise
[06:56:25] Radar: Yes, but there's isn't much cruft there. It's good how the separation keeps each query / mutation isolated from each other
[06:56:52] Cork: is there a way to get the rails built in action xml parser to keep the attribute for tags?
[06:56:55] baweaver: True, but let's say one could reasonably imply a set of queries and mutations from the presence of things
[06:57:38] Cork: i get <Document><Amt Ccy="EUR">10</Amt></Document> => {"Document" => { "Amt" => "10" }}
[06:57:50] baweaver: ACTION hasn't really used the XML parser
[06:57:59] Radar: Cork: what's the code you're using to parse that XML?
[06:58:32] Cork: Radar: the built in rails requrest parser
[06:58:42] Cork: the data ends up in params in the action method
[06:58:51] Radar: Cork: OK. How can I see what you're seeing then? Do you have some code I could plug into my Rails app to see this problem?
[06:59:44] Cork: Radar: curl -k -i -H "content-type: application/xml" -X POST -d ' <Document><Amt Ccy="EUR">10</Amt></Document>' "https://localhost:8080/endpoint"
[06:59:49] eckhardt: has joined #RubyOnRails
[06:59:54] Cork: and params has what i showed up there
[07:01:15] Cork: Radar: it _MIGHT_ be actionpack-xml_parser, i wans't the one setting up this part of the project
[07:01:30] Radar: Cork: I will know in a moment :)
[07:04:17] Radar: Cork: I can't make standard Rails do this parsing. I suspect it is actionpack-xml_parser.
[07:04:46] Radar: yes, can reproduce it with actionpack-xml_parser
[07:05:13] Radar: Cork: That begs the question: why are you submitting XML documents in the Year Of Our Lord Twenty-Eighteen?
[07:05:13] baweaver: Radar: what if you downcase Ccy?
[07:05:28] Radar: baweaver: same diff
[07:05:35] Cork: baweaver: will try, though i don't control the poster
[07:05:44] baweaver: Eh, stupid regex parsers sometimes.
[07:05:48] Radar: Cork: You poor soul.
[07:06:01] Cork: i hate xml
[07:06:03] sevenseacat: what format are you expecting?
[07:06:38] Radar: Cork: Your best bet then would be to do `request.raw_post` to get at the raw XML. I do not think you'll have a happy time with actionpack-xml_parser here.
[07:06:48] ariedler: has joined #RubyOnRails
[07:06:55] baweaver: ACTION makes a note to make GraphQL for Ruby simpler after he finishes all the other random projects
[07:07:29] Cork: Radar: was afraid of that, you happen to know of a parser that can handle attributes and doesn't require a full dom and walking?
[07:07:36] Radar: Cork: Nokogiri?
[07:07:50] Cork: ya, that is the dom and walking i was thinking of :)
[07:08:04] Radar: There's also https://gitlab.com/yorickpeterse/oga
[07:08:38] Radar: Cork: Are you getting a slab of XML that's longer than this one line? Is that why you're asking about that?
[07:09:25] Cork: Radar: ya, this is just a one tag of the 50+ * transactions xml i will be getting
[07:09:59] Radar: Cork: Well, you're going to get the whole slab whatever way you go. You could possibly build a SAX parser that would read only the relevant data from the XML.
[07:10:03] Cork: (this is bank payments the bank pushed to the service)
[07:10:20] sevenseacat: the only format I can think of would be { Document: { Amt: { Ccy: EUR, value: 10 } } } or something like that
[07:10:33] Cork: sevenseacat: ya
[07:10:36] Radar: sevenseacat: spot on
[07:10:38] sevenseacat: and I don't think parsers are that clever
[07:10:53] eckhardt: has joined #RubyOnRails
[07:11:11] sevenseacat: given the possible conflict between 'value' and a possible attribule named value
[07:11:15] Radar: Cork: Try reading it with regular Nokogiri and see how you go. I recommend that because Nokogiri's already going to come with Rails (because it's used by Rails itself), so it's worth a shot to do that.
[07:11:19] Radar: sevenseacat: _value ;)
[07:11:23] Radar: or __________value
[07:11:28] Cork: Radar: ya, on it thx
[07:11:34] Radar: ACTION is a real programmeer
[07:11:44] Radar: off to the real programmers meetup tonight. byeee
[07:13:44] Cork: interesting actionpack-xm_parser uses Hash.from_xml and... https://github.com/rails/rails/issues/588
[07:13:48] Cork: oh well... :)
[07:15:01] baweaver: Shy of shimming it with Nokogiri and hot-writing the params I'm not thinking of a good way to do it.
[07:16:16] psychoslave: has joined #RubyOnRails
[07:16:40] baweaver: Walk all Amt nodes and rewrite them to either: 1) be in an array OR 2) concat amt and ccd `amt-eur: 10`
[07:16:55] rootsudo: has joined #RubyOnRails
[07:17:34] Cork: hmm you have a point there actually, i could use nokogiri to parse out the Ccy attributes and store them separately
[07:17:41] rootsudo: has joined #RubyOnRails
[07:17:50] Cork: would be double parsing but it wouldn't be too uggly...
[07:18:30] lxsameer: has joined #RubyOnRails
[07:22:36] gambl0re: has joined #RubyOnRails
[07:22:44] sandstrom: has joined #RubyOnRails
[07:24:11] za1b1tsu_: has joined #RubyOnRails
[07:25:04] Sylario: has joined #RubyOnRails
[07:27:50] thetechfreak: has joined #RubyOnRails
[07:37:47] hahuang65_: has joined #RubyOnRails
[07:57:08] lexileo: has joined #RubyOnRails
[07:57:32] mikecmpbll: has joined #RubyOnRails
[07:59:19] tdy: has joined #RubyOnRails
[07:59:59] desperek: has joined #RubyOnRails
[08:24:18] LiftLeft2: has joined #RubyOnRails
[08:32:35] srinidhi: has joined #RubyOnRails
[08:47:31] uks: has joined #RubyOnRails
[08:47:36] uksio: has joined #RubyOnRails
[08:57:54] srinidhi: has joined #RubyOnRails
[08:57:58] za1b1tsu_: has joined #RubyOnRails
[09:07:51] LiftLeft2: has joined #RubyOnRails
[09:08:04] ariedler: has joined #RubyOnRails
[09:17:26] sevenseacat: has joined #RubyOnRails
[09:35:32] DTZUZO: has joined #RubyOnRails
[09:50:23] mauro1254: has joined #RubyOnRails
[09:51:58] za1b1tsu_: has joined #RubyOnRails
[09:55:22] bijan_: has joined #RubyOnRails
[09:59:38] quazimodo: has joined #RubyOnRails
[10:07:19] gregf_: has joined #RubyOnRails
[10:15:49] beholders_eye: has joined #RubyOnRails
[10:34:04] roshanavand: has joined #RubyOnRails
[10:36:28] sunya7a: i use image_tag to refer to load an image in my view which is working in development. In production however, the image is not loaded and I get a routing error. I have precompiled my assets and I see the file in quesiton with its fingerprint in the public/assets folder. additionally when I inspect the html on the page it uses /images/image_file as source without the fingerprint. Could anyone point me to a resource that might help resolve this. I
[10:37:33] Aherin_: has joined #RubyOnRails
[10:40:39] tbuehlmann: the public_file_server is disabled by default for production, so files from the public directory are not served. maybe that?
[10:40:59] nemesit: has joined #RubyOnRails
[10:43:53] sunya7a: I just tried switching it both ways and it still won't load. My understanding is that when you precompile the assets are placed in public/assets. my stylesheets and js are loading correctly so it seems that this is correct. only images are problematic
[10:45:57] sunya7a: i suspect it has something to do with how i'm loading the image. as i said i use image_tag helper...is this not the correct use?
[10:46:12] tbuehlmann: in what directory (under app) is your image located and how do you reference it via image_tag?
[10:46:36] lankanmon: has joined #RubyOnRails
[10:47:14] sunya7a: I placed it in app/assets/images/brand.png and I reference it with image_tag('brand')
[10:47:16] lessless_: has joined #RubyOnRails
[10:47:41] lessless_: hi people is rails_pjax still maintained?
[10:48:46] tbuehlmann: sunya7a: sounds good to me
[10:52:05] sunya7a: tbuehlmann: i believe this is right...i wonder if it's because my image_tag is nested inside a button_tag...maybe rails is having trouble adding the fingerprint?
[10:52:29] sunya7a: tbuehlmann: i will just putting it plainly on the page
[10:55:11] ariedler: has joined #RubyOnRails
[10:57:02] sunya7a: tbuehlmann: that didn't work either...it still just references the simple path like this <img src="/images/brand" alt="Brand"> ... how do i tell image_tag to use the fingerprinted version?
[11:02:31] sunya7a: tbuehlmann: I found the problem...it's as simple as keeping the file extension =(
[11:02:36] sunya7a: tyvm for listening
[11:08:02] lessless_: has joined #RubyOnRails
[11:10:31] tbuehlmann: sunya7a: I was about mentioning it but the docs say it's valid to not have it :¿
[11:10:50] tbuehlmann: nope, I'm just blind, my bad
[11:18:22] bijan_: has joined #RubyOnRails
[11:48:48] sonOfRa: has joined #RubyOnRails
[12:06:32] knight33: has joined #RubyOnRails
[12:16:01] Ergo: has joined #RubyOnRails
[12:22:13] sunya7a: tbuehlmann: well...to be fair...it does work in development...it just broke in production
[12:28:19] sonOfRa: has joined #RubyOnRails
[12:35:11] ariedler: has joined #RubyOnRails
[12:40:46] fmcgeough: has joined #RubyOnRails
[12:58:02] tycoon177: has joined #RubyOnRails
[13:03:26] lessless_: has joined #RubyOnRails
[13:07:33] bijan_: has joined #RubyOnRails
[13:10:16] quazimodo: has joined #RubyOnRails
[13:16:31] sevenseacat: has joined #RubyOnRails
[13:23:03] bijan_: has joined #RubyOnRails
[13:31:52] ule: has joined #RubyOnRails
[13:34:21] bijan_: has joined #RubyOnRails
[13:45:47] bijan_: has joined #RubyOnRails
[13:47:51] anubhav996: has joined #RubyOnRails
[13:55:18] bijan_: has joined #RubyOnRails
[14:04:11] lomex: has joined #RubyOnRails
[14:05:50] roshanavand: has joined #RubyOnRails
[14:15:18] work_: has joined #RubyOnRails
[14:19:24] za1b1tsu_: has joined #RubyOnRails
[14:23:03] knight33: has joined #RubyOnRails
[14:23:18] Ergo: has joined #RubyOnRails
[14:33:09] KeyJoo: has joined #RubyOnRails
[14:35:18] bijan_: has joined #RubyOnRails
[14:39:44] chouhoulis: has joined #RubyOnRails
[14:41:45] roshanavand: has joined #RubyOnRails
[14:44:03] sandstrom: has joined #RubyOnRails
[14:45:05] orbyt_: has joined #RubyOnRails
[14:46:20] bijan_: has joined #RubyOnRails
[14:46:35] IanMalcolm: has joined #RubyOnRails
[14:48:58] IanMalcolm: hey guys, I'm wondering if there's any way to remove the nokogiri dependency from Rails
[14:50:54] knight33: has joined #RubyOnRails
[14:51:00] sandstrom: has joined #RubyOnRails
[14:54:17] lessless_: has joined #RubyOnRails
[14:55:26] bijan_: has joined #RubyOnRails
[14:55:27] mostlybadfly: has joined #RubyOnRails
[15:04:52] [Butch]: has joined #RubyOnRails
[15:19:41] tjbp: has joined #RubyOnRails
[15:35:48] bijan_: has joined #RubyOnRails
[15:47:14] bijan_: has joined #RubyOnRails
[15:47:33] rootsudo: has joined #RubyOnRails
[15:50:22] GodFather: has joined #RubyOnRails
[15:50:48] eddof13: has joined #RubyOnRails
[15:57:38] za1b1tsu_: has joined #RubyOnRails
[16:01:13] dionysus69: has joined #RubyOnRails
[16:01:34] bijan_: has joined #RubyOnRails
[16:06:43] conta2: has joined #RubyOnRails
[16:10:45] dionysus69: is it common practice to run some rails service with jruby whichever require concurrency? but the main version of ruby would be MRI for rails app server
[16:12:50] Sylario: I reinstalled my rails env on a new dev machine. Having problems with running the app, i did a bundle exec rake assets:precompile
[16:13:02] Sylario: I have a one line error : sh: 1: prune: not found
[16:14:55] bijan_: has joined #RubyOnRails
[16:17:34] pipework: dionysus69: 'common' is an interesting word to use.
[16:18:00] ivanskie: has joined #RubyOnRails
[16:19:31] IanMalcolm: has joined #RubyOnRails
[16:21:11] darkhanb: has joined #RubyOnRails
[16:23:33] bijan_: has joined #RubyOnRails
[16:26:16] dionysus69: pipework: :D I mean, I should be able to avoid 7 processes and use 7 threads instead
[16:26:43] dionysus69: and most of even medium sized applications might need such ability
[16:27:30] havenwood: IanMalcolm: There's been discussion of modularizing Loofah so it can use Oga, but nobody has done the substantial work to make it happen.
[16:27:33] pipework: dionysus69: Having mri in front and then another rails/ruby service in jruby that's making the best use of threads without a gvl that's running elsewhere is a valid use of SOA separation, though as for people using mri in the 'frontend' and jruby in the back, not sure.
[16:28:21] pipework: dionysus69: You should look at ruby on graal if you have some time.
[16:29:49] havenwood: pipework: <3 TruffleRuby
[16:29:54] havenwood: JRuby also works great with Graal and invoke dynamic.
[16:30:00] dionysus69: do you mean MRI in front as in MRI running another JRuby process?
[16:30:47] pipework: dionysus69: no, have you worked with SOA architectures before?
[16:32:07] pipework: dionysus69: They would talk over a communication mechanism, from IPC, files (lol Unix), to sockets. You have separate processes, often not in the same kernel process tree.
[16:32:28] havenwood: Here're some gists that show JRuby on Graal with pure Ruby implementations of hashing algos: https://gist.github.com/havenwood/f415fe6b775f0809041127f3132cf6a8
[16:32:37] lomex: has joined #RubyOnRails
[16:33:00] pipework: havenwood: I've been using graal with --native-image and --polyglot for fun lately.
[16:33:09] havenwood: pipework: Nice
[16:33:28] havenwood: pipework: It's fun calling JS/Python/Fortran/etc functions from Ruby \o/
[16:33:38] bijan_: has joined #RubyOnRails
[16:33:53] pipework: havenwood: tbh... I call everything from Imba
[16:34:03] dionysus69: so which one is more supported and bug free? and has better performance, Graal or Jruby?
[16:34:17] pipework: dionysus69: LOL. You'll find the world tends to use MRI.
[16:34:28] havenwood: dionysus69: JRuby is production ready. TruffleRuby isn't yet.
[16:34:44] pipework: As in docs, community, awareness. Every rubyist has awareness of MRI.
[16:34:56] havenwood: dionysus69: JRuby works well with Graal though too.
[16:35:12] pipework: dionysus69: However, between the two I'd definitely pick JRuby with graal enabled.
[16:35:35] pipework: Java8+ is necessary.
[16:36:00] dionysus69: haven mentioned Cruby too, how does that "compete" against jruby?
[16:36:27] havenwood: dionysus69: CRuby is what they call "MRI" these days. It's the reference implementation.
[16:36:55] dionysus69: aa I see, I didn't know the main implementation was also called Cruby
[16:36:55] havenwood: dionysus69: http://blog.headius.com/2018/07/running-jruby-on-graal-jit.html
[16:37:33] bijan__: has joined #RubyOnRails
[16:37:35] dionysus69: ok I guess I have lots of reading to do :D
[16:37:49] dionysus69: thanks pipework havenwood
[16:39:39] havenwood: Here's a talk where headius talks about Graal without Truffle: https://www.youtube.com/watch?v=4vxIncIm2D4
[16:40:36] havenwood: I was proud he showed code from my digest-sip_hash gem. A silly gem, but somebody needed to make a command line siphash, right?
[16:41:34] havenwood: dionysus69: no prob! you might want to take a look at the parallel gem: https://github.com/grosser/parallel
[16:42:06] dionysus69: thumbs up :P
[16:43:31] havenwood: I might should revive ifuture ¯\_(ツ)_/¯ I deprecated it when rob pulled iprocess, but he's released another gem along the same lines: https://github.com/havenwood/ifuture#ifuture
[16:44:55] havenwood: I guess parallel gem has those bases covered until Ruby 3. ;-)
[16:45:42] troys: has joined #RubyOnRails
[16:45:48] havenwood: It's surprisingly little code to do inter-process communication.
[16:46:53] bijan_: has joined #RubyOnRails
[16:51:04] bijan__: has joined #RubyOnRails
[16:52:02] eckhardt: has joined #RubyOnRails
[16:52:18] dionysus69: is redis that fast, that it could handle inter process comm?
[16:53:45] havenwood: dionysus69: I think I had the default as a unix socket. I just added redis support. But sure, redis is fast.
[16:54:25] orbyt_: has joined #RubyOnRails
[16:55:26] lessless_: has joined #RubyOnRails
[16:56:25] dionysus69: so I looked at the parallel gem and it is pretty much makes ruby concurrent doesn't it? so ruby 3.0 just includes this gem in core code?
[16:57:31] havenwood: dionysus69: No, Ruby 3 as planned will have something new called Guilds (it might be renamed).
[16:57:46] havenwood: dionysus69: Guilds won't be bound by the GVL.
[16:58:11] havenwood: dionysus69: It'll be a lock-per-guild, rather than a global lock.
[16:58:27] havenwood: dionysus69: So threads within a guild will act the same as they do now.
[16:58:40] havenwood: dionysus69: But multiple guilds can run on separate cores.
[16:59:14] dionysus69: pretty much makes it thread safe, I suppose performance hit isn't that much
[16:59:53] havenwood: dionysus69: Yup, it avoids the weight of forking. You're just threading, and limiting memory access to within-guild.
[17:03:54] bijan_: has joined #RubyOnRails
[17:04:22] tdy: has joined #RubyOnRails
[17:05:34] pipework: I don't use redis, the last time was way back with resque and that was because the team thought it was the best thing to go with and I cared very little.
[17:16:20] bijan_: has joined #RubyOnRails
[17:21:14] bijan__: has joined #RubyOnRails
[17:23:30] armyriad: has joined #RubyOnRails
[17:31:25] bntzio: has joined #RubyOnRails
[17:37:11] LambdaSource: has joined #RubyOnRails
[17:40:31] bntzio: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[17:43:51] dviola: has joined #RubyOnRails
[17:45:11] mostlybadfly: has joined #RubyOnRails
[17:50:16] Aherin: has joined #RubyOnRails
[17:58:07] conta2: has joined #RubyOnRails
[18:02:39] Aherin: has joined #RubyOnRails
[18:03:04] newton: has joined #RubyOnRails
[18:19:37] hahuang65_: hmm is there a way to save some array to memory temporarily outside the context of an instance, and then clear it when done?
[18:21:30] hahuang65_: maybe Thread.current
[18:26:31] tdy: has joined #RubyOnRails
[18:32:07] srinidhi: has joined #RubyOnRails
[18:33:30] sandstrom: has joined #RubyOnRails
[18:38:21] MasterAsia: hahuang65_, What are you trying to do
[18:40:21] LambdaSource: has joined #RubyOnRails
[18:41:23] hahuang65_: i've got this terrible recursive function I'm trying to refactor. In some cases, it infinitely recurses. So I'm just trying to keep a store of the stuff that's already been processed.
[19:02:09] amperry: has joined #RubyOnRails
[19:02:49] tdy: has joined #RubyOnRails
[19:02:53] amperry: hi folks, can anyone tell me why this works: <%= link_to "Monthly Charges", "/monthly_charges_report?format=pdf", start_date: start_date, end_date: end_date, target: 'blank' %>
[19:03:40] amperry: but this doesn't: <%= link_to "Monthly Charges", "/monthly_charges_report", format: 'pdf', start_date: start_date, end_date: end_date, target: 'blank' %>
[19:04:04] mikecmpbll: has joined #RubyOnRails
[19:04:34] ellcs: has joined #RubyOnRails
[19:09:22] sandstrom: has joined #RubyOnRails
[19:13:10] gambl0re: has joined #RubyOnRails
[19:16:13] KeyJoo: has joined #RubyOnRails
[19:30:02] bijan_: has joined #RubyOnRails
[19:40:30] tdy: has joined #RubyOnRails
[19:47:09] ellcs: has joined #RubyOnRails
[19:47:30] dionysus69: hahuang65_: keep that temporary array in redis then
[19:48:05] pipework: hahuang65_: Take the SICP course, all will be illuminated when you learn about recursion in scheme.
[19:49:45] lomex: has joined #RubyOnRails
[20:01:19] nashant: has joined #RubyOnRails
[20:03:44] akaiiro: has joined #RubyOnRails
[20:06:23] reber: has joined #RubyOnRails
[20:07:52] rootsudo: has joined #RubyOnRails
[20:19:56] blackmesa: has joined #RubyOnRails
[20:24:54] hahuang65_: pipework: lol
[20:25:01] hahuang65_: dionysus69: yeah Redis might be a good candidate
[20:27:50] hahuang65_: dionysus69: the downside of using redis means it's a lot of network calls
[20:32:15] lexileo: has joined #RubyOnRails
[20:32:49] tdy: has joined #RubyOnRails
[20:32:51] nashant: Hey all. I'm pulling my hair out over how to get this working. I've got a guest_events table with id, guest_id, event_id and response. I have a multiple select in a form which I want to take response as the selected value. Currently if I deselect events then they get deleted, I want it to set response false instead. This is a very much simplified version of what I have: https://gist.github.com/nashant/8a7e4e1dfc290561f9c6f04923
[20:39:57] bijan_: has joined #RubyOnRails
[20:42:12] amincd: nashant: the link isn't working for me
[20:43:30] nashant: amincd: Is there a prefered pastebin?
[20:44:13] bijan__: has joined #RubyOnRails
[20:48:27] bijan_: has joined #RubyOnRails
[20:49:28] ur5us: has joined #RubyOnRails
[20:52:13] amincd: nashant: you could make a gist, just make sure the link works
[20:54:55] dionysus69: hahuang65_: it's better than database at least :)
[20:55:54] nashant: amincd: If I click on it it works :/
[20:56:17] amincd: did you make it public?
[20:56:44] amincd: can you open it while using Chrome in incognito mode?
[20:56:58] bijan_: has joined #RubyOnRails
[21:00:18] nashant: Yup. Incognito is fine
[21:18:38] amincd: I'm definitely getting a 404
[21:23:17] Inside: has joined #RubyOnRails
[21:24:06] Inside: Heyo~ design question. I've got a 'Component' class and a 'Family' class. Components can be long to specific families, etc.
[21:24:26] Inside: I want some Families to be hardcoded because some portions of the application need them to exist
[21:24:54] Inside: but otherwise I want the rest of the families to be CRUD-able
[21:25:18] Inside: Is the a way to take ActiveModel and make some values be in the database and the rest as a constants? :D
[21:44:00] knight33: has joined #RubyOnRails
[21:53:37] agent_white: has joined #RubyOnRails
[22:01:58] snickers: has joined #RubyOnRails
[22:07:28] lankanmon: has joined #RubyOnRails
[22:27:15] wethu: has joined #RubyOnRails
[22:32:58] chouhoulis: has joined #RubyOnRails
[22:40:01] Radar: Inside: sounds like you'd want to set them up in seeds.rb, and then have some sort of "readonly" flag on them.
[22:40:06] Radar: Or some way of making them special.
[22:49:53] akaiiro: has joined #RubyOnRails
[22:55:23] ivanskie: has joined #RubyOnRails
[22:59:26] knight33: has joined #RubyOnRails
[23:04:37] brent__: has joined #RubyOnRails
[23:18:05] quazimodo: has joined #RubyOnRails
[23:22:21] samort7: has joined #RubyOnRails
[23:53:30] pipework: Inside: How often will these hard-coded ones be used? Every request that deals with families and componets? Knowing this may help you choose where to handle persisting and possibly caching the values.
[23:55:16] massover: has joined #RubyOnRails
[23:56:11] Scient: has joined #RubyOnRails
[23:58:19] massover: simply adding 'rails_admin' to my Gemfile and doing a bundle install results in a RuntimeError https://dpaste.de/ZHcC
[23:59:46] massover: can anyone lend a suggestion of what I need to do to use that gem?
[23:59:47] pipework: massover: Are you using the latest rails_admin? I'll try to see if they might just be out of date and modifying frozen values.