« Back to channel list

#ruby - 29 March 2017

« Back 1 day Forward 1 day »
[00:00:15] blackmes1: has joined #ruby
[00:03:11] noob: has left #ruby: ("Leaving")
[00:05:06] pwnd_nsfw`: has joined #ruby
[00:07:51] charliesome: has joined #ruby
[00:08:04] chouhoulis: has joined #ruby
[00:10:25] bkxd: has joined #ruby
[00:11:24] rakm: has joined #ruby
[00:11:37] ineb: what mechanism gives me the #<Pathname:/tmp> representation here? how can i change it to #<MyClass:/tmp>? https://paste.xinu.at/BwWAo8/
[00:12:13] matthewd: ineb: That's #inspect
[00:13:41] username2: has joined #ruby
[00:17:43] ineb: matthewd: so i came up with https://paste.xinu.at/De1/ yet initialize still gives me Pathname#inspect
[00:18:37] matthewd: Simple debugging would confirm whether your method is getting called
[00:19:18] Gaelan: has joined #ruby
[00:20:33] patarr: has joined #ruby
[00:23:38] tolerablyjake: has joined #ruby
[00:24:59] blackmesa: has joined #ruby
[00:30:42] Vile`: has joined #ruby
[00:32:44] __Yiota: has joined #ruby
[00:32:57] patarr: has joined #ruby
[00:34:04] dionysus69: has joined #ruby
[00:34:28] __Yiota: has joined #ruby
[00:35:57] ineb: matthewd: iam unable to figure out the issue. i may ask another time and leave it as is right now. altough a wrong #inspect is propably an express train to bugs
[00:35:58] LuckyABA: has joined #ruby
[00:36:18] roamingdog: has joined #ruby
[00:36:33] matthewd: What have you tried?
[00:39:36] ineb: what is there to try? patching Pathnames #inspect did the trick but otherwise i was unable to make it call my MyClass#inspect on initilization
[00:40:05] Robtop__: has joined #ruby
[00:40:26] matthewd: Put a puts or raise inside your method to check whether it's getting called, or make it return a test string
[00:40:34] ineb: its not getting called
[00:40:47] matthewd: How have you determined that?
[00:42:44] c0dy: has joined #ruby
[00:43:06] ineb: matthewd: yes
[00:43:45] matthewd: "yes" is not an answer to a "how" question
[00:44:05] ineb: oh, by whatever you said.
[00:44:09] ineb: or pry session
[00:44:44] aeontech: has joined #ruby
[00:45:46] GSilva: has joined #ruby
[00:46:31] matthewd: Oh, pry is new information. pry doesn't [directly] use inspect.
[00:48:49] ineb: oh i see, irb behaves different
[00:51:04] Rodya_: has joined #ruby
[00:51:38] Channel6: has joined #ruby
[00:51:41] ineb: it can be an issue with pry, i will inspect it further and maybe open an issue
[00:52:13] matthewd: It's a known and intended behaviour of pry
[00:52:22] karmatr0n: has joined #ruby
[00:52:48] gdonald: has joined #ruby
[00:54:40] patarr: has joined #ruby
[00:55:09] ineb: you think its intended to send #inspect to the delegatee class instead to the delegator?
[00:55:25] ineb: in my case use Pathname#delegate instead of MyClass#delegate
[00:55:34] ineb: errr inspect
[00:55:37] matthewd: As I said, pry is not calling inspect
[00:55:49] matthewd: From memory, I think it calls pretty_print
[00:58:37] ineb: ill go and ask in #pry
[01:01:09] GodFather: has joined #ruby
[01:01:09] GodFather_: has joined #ruby
[01:06:15] ixti: has joined #ruby
[01:07:47] Jameser: has joined #ruby
[01:11:26] bkxd: has joined #ruby
[01:11:54] jusa: has joined #ruby
[01:12:22] vondruch: has joined #ruby
[01:12:48] [k-: has joined #ruby
[01:13:39] jenrzzz: has joined #ruby
[01:14:29] bmurt: has joined #ruby
[01:15:09] s2013: has joined #ruby
[01:17:31] agent_white: has joined #ruby
[01:18:08] Mia: has joined #ruby
[01:24:12] Kallis: has joined #ruby
[01:24:34] knight33: has joined #ruby
[01:29:12] rakm_: has joined #ruby
[01:31:07] [k-_: has joined #ruby
[01:35:23] willardg: has joined #ruby
[01:36:51] ahuman: has joined #ruby
[01:37:17] __Yiota: has joined #ruby
[01:41:52] Didac: has joined #ruby
[01:42:10] minimalism: has joined #ruby
[01:49:46] patarr: has joined #ruby
[01:53:47] montanonic: has joined #ruby
[01:55:32] gusrub: has joined #ruby
[01:56:51] zapata: has joined #ruby
[01:59:32] montanonic: has joined #ruby
[02:00:53] Gaelan: Any way to read a null-terminated array with ffi?
[02:01:35] d^sh: has joined #ruby
[02:05:35] libastral: has joined #ruby
[02:07:56] hutch34_: has joined #ruby
[02:11:17] TheMoonMaster: has joined #ruby
[02:16:24] aeontech: has joined #ruby
[02:17:25] __Yiota: has joined #ruby
[02:23:26] Verity: people don't have as many issues with ruby as they do with python
[02:26:55] Nuck: has joined #ruby
[02:35:20] greenhat: has joined #ruby
[02:37:09] rakm: has joined #ruby
[02:37:12] JoshL: has joined #ruby
[02:38:37] D9: has joined #ruby
[02:41:27] xnxq: has joined #ruby
[02:41:30] nertzy: has joined #ruby
[02:41:41] enterprisey: has joined #ruby
[02:42:34] bheesham: has joined #ruby
[02:47:51] xnxq: has joined #ruby
[02:47:51] Gaelan: has joined #ruby
[02:48:23] Channel6: has joined #ruby
[02:51:16] karmatr0n: has joined #ruby
[02:52:25] krzysztoff: has joined #ruby
[02:55:14] futilegames: has joined #ruby
[02:56:04] Jayson_Virissimo: has joined #ruby
[02:56:18] nekomune: has joined #ruby
[02:57:13] bkxd: has joined #ruby
[03:03:29] nertzy: has joined #ruby
[03:03:52] Autolycus: has joined #ruby
[03:04:59] davorb: has joined #ruby
[03:06:20] bpmedley: has joined #ruby
[03:12:27] Gaelan: has joined #ruby
[03:15:31] gix: has joined #ruby
[03:15:58] gsingh93: has joined #ruby
[03:21:39] marcdel: has joined #ruby
[03:22:07] daed: has joined #ruby
[03:22:54] vcavallo: has joined #ruby
[03:27:12] cahoots: has joined #ruby
[03:31:32] A124: has joined #ruby
[03:37:12] __Yiota: has joined #ruby
[03:39:04] astrobunny: has joined #ruby
[03:41:03] Gaelan: has joined #ruby
[03:41:49] jane_booty_doe: has joined #ruby
[03:44:29] bazzy: has joined #ruby
[03:46:36] TheWhip: has joined #ruby
[03:47:34] gdonald: has joined #ruby
[03:49:45] ozcanesen: has joined #ruby
[03:51:22] karmatr0n: has joined #ruby
[03:57:03] djbkd: has joined #ruby
[04:00:48] Verity: >> "str".bytes.map{ |b| out << b.to_s }
[04:00:49] ruby[bot]: Verity: # => undefined local variable or method `out' for main:Object (NameError) ...check link for more (https://eval.in/763193)
[04:01:36] Verity: >> out = ''; "str".bytes.map{ |b| out << b.to_s }
[04:01:37] ruby[bot]: Verity: # => ["115116114", "115116114", "115116114"] (https://eval.in/763194)
[04:01:41] Verity: why is that the result?
[04:01:49] Verity: I just want one string
[04:02:13] marcdel: has joined #ruby
[04:02:32] _djbkd: has joined #ruby
[04:02:37] matthewd: &ri Enumerable#map
[04:02:37] `derpy: http://ruby-doc.org/core-2.4.0/Enumerable.html#method-i-map
[04:07:00] nofxxx: has joined #ruby
[04:08:16] Verity: doesnt seem like there is a lot of info there
[04:08:19] Verity: abpout map
[04:08:54] matthewd: There isn't a lot to say about it ¯\_(ツ)_/¯
[04:10:17] pjaspers: has joined #ruby
[04:11:58] s2013: has joined #ruby
[04:12:27] __Yiota: has joined #ruby
[04:12:31] havenwood: >> 'str'.bytes.join # Verity
[04:12:32] ruby[bot]: havenwood: # => "115116114" (https://eval.in/763198)
[04:13:47] matthewd: Verity: map is important. Take the time to play with it and understand it.
[04:13:51] havenwood: Verity: I'd suggest experimenting with #each and #map in irb or pry. It's worth reading up and developing a firm understanding of these essential methods.
[04:14:19] Verity: ok, I will definitely do that then
[04:15:23] bheesham: has joined #ruby
[04:15:27] Gaelan: has joined #ruby
[04:16:52] Gaelan: has joined #ruby
[04:17:02] moei: has joined #ruby
[04:18:59] Autolycus: has joined #ruby
[04:25:24] TheWhip: has joined #ruby
[04:31:35] bokayio: has joined #ruby
[04:33:17] kegster: has joined #ruby
[04:34:03] renchan: has joined #ruby
[04:34:48] xnxq: has joined #ruby
[04:36:09] chaos95: has joined #ruby
[04:43:03] bkxd: has joined #ruby
[04:43:28] aeontech: has joined #ruby
[04:44:22] krzysztoff: has joined #ruby
[04:46:05] naturehack: has joined #ruby
[04:47:24] tolerablyjake: has joined #ruby
[04:49:26] xall: has joined #ruby
[04:52:06] karmatr0n: has joined #ruby
[04:53:45] armyriad: has joined #ruby
[04:53:50] enterprisey: has joined #ruby
[05:03:34] nadir: has joined #ruby
[05:10:19] dminuoso: ACTION has stopped using things like #each
[05:10:29] dminuoso: They just lead to silly programming. :o)
[05:13:07] karmatr0n: has joined #ruby
[05:17:39] enitiz: has joined #ruby
[05:18:53] patarr: has joined #ruby
[05:20:25] jsilver: has joined #ruby
[05:21:31] jsilver: is there anything like faraday I can use to HTTP upload a file... but with a callback for upload chunks so I can make a progressbar?
[05:23:17] cahoots: has joined #ruby
[05:26:03] TomyLobo2: has joined #ruby
[05:27:47] willardg: has joined #ruby
[05:30:38] TheWhip: has joined #ruby
[05:31:28] grillon: has joined #ruby
[05:31:42] ahuman: has joined #ruby
[05:34:39] raspado: has joined #ruby
[05:35:29] JoshS: has joined #ruby
[05:37:32] Nahra`: has joined #ruby
[05:39:10] havenwood: jsilver: It can be done with net/http manually or mechanize and rest-client are net/http wrappers that have added streaming uploads. Or http.rb, httpclient, excon, em-http-request, and curb all implement streaming uploads.
[05:39:31] tAn: has joined #ruby
[05:43:23] jsilver: do you know how to do it with http.rb
[05:43:28] jsilver: i'd rather use http.rb than anything
[05:44:55] karmatr0n: has joined #ruby
[05:45:26] havenwood: jsilver: i was just having second thoughts about whether excon and http.rb actually support upload streaming too, and was wondering if typohoeus does too (the others i listed above do)
[05:45:32] havenwood: lemme confirm
[05:50:13] jsilver: i'd prefer http.rb, it seems to support it but docs seem thin
[05:50:35] havenwood: jsilver: yeah, it looks like my list above is correct, but the docs are better for other libs
[05:53:42] havenwood: jsilver: https://github.com/excon/excon#chunked-requests
[05:55:09] Sp4rKy: has joined #ruby
[05:55:20] MasterNayru: has joined #ruby
[05:56:06] xMopxShell: has joined #ruby
[05:56:08] ByronJohnson: has joined #ruby
[05:57:23] genta: has joined #ruby
[05:57:37] BabyMario: what's better about libs written in ruby, vs c++?
[05:57:38] jsilver: looks good
[05:57:43] jsilver: i don't love having 25 http clients
[05:57:44] BabyMario: (I read the http.rb documentation)
[05:57:57] iamayam: has joined #ruby
[05:57:57] havenwood: jsilver: aye, i'd be tempted to figure it out with HTTP.rb too
[05:57:58] jsilver: c++ libs are faster
[05:58:00] havenwood: jsilver: https://github.com/excon/excon#chunked-requests
[05:58:02] jsilver: ruby libs are more readable
[05:58:08] havenwood: jsilver: oops, I meant to link: https://github.com/nahi/httpclient/blob/51012cff4aeff3e2bfbb747c8cf9b3de17d9e0d6/lib/httpclient.rb#L119-L128
[05:58:08] jsilver: havenwood I saw
[05:58:14] agent_white: BabyMario: What is better on a hike, heels or socks?
[05:58:32] havenwood: but you probably also saw
[05:58:44] havenwood: agent_white: socks
[05:58:54] jsilver: httpclient doesnt look to support it
[05:59:05] BabyMario: agent_white: for some reason, that question leaves me perplexed
[05:59:08] havenwood: jsilver: it does!
[05:59:14] agent_white: Well. Sometimes. Mostly they don't match cause I can't find the sibling
[05:59:25] jsilver: i cant tell from that code lol
[05:59:36] havenwood: jsilver: oh, you mean http.rb
[05:59:50] jsilver: the client doesn't matter, i just want the same easy syntax open-uri has
[05:59:58] havenwood: jsilver: yeah, the docs don't give enough clues
[06:00:01] jsilver: open-uri has nice callbacks for downloading with open()
[06:00:17] jsilver: im doing some edge stuff with serverside downloading + action cable updating client side progressbar
[06:00:31] havenwood: httpclient or excon maybe?
[06:00:33] havenwood: both are top-notch pure ruby implementations
[06:00:36] jsilver: download progress works, upload doesnt since faraday didnt have progress
[06:00:58] havenwood: jsilver: maybe it's way-too-much but refile supports streaming upload and progress is an option
[06:01:01] jsilver: i just need a simple syntax let get("/thing", :progress_proc => -> (blah)
[06:01:17] havenwood: it includes sinatra as a dep to handle the streaming ;-P
[06:01:26] jsilver: i'd like to avoid WayTooMuch but sometimes it's ok
[06:01:30] jsilver: lol sinatra rather not lol
[06:01:33] havenwood: but these days sinatra tends to be a dep of one or another rails gems already
[06:01:36] jsilver: already running rails
[06:01:43] jsilver: oh i see, whys that
[06:02:12] havenwood: jsilver: see if you're already using it?: grep sinatra Gemfile.lock
[06:02:55] havenwood: jsilver: it's a dep of resque and various other gems, often for the streaming support
[06:02:58] jsilver: nope i'm not
[06:03:01] jsilver: my dependencies are pretty sane
[06:03:06] TheWhip: has joined #ruby
[06:03:11] jsilver: i'm not a typical enterprisey app
[06:03:41] jsilver: yeah no rescue here
[06:03:55] jsilver: no jobs, no db, no users, no caching, etc
[06:04:12] jsilver: i get the job done while avoiding enterprise bloatware lol
[06:05:45] jsilver: ive worked on a lot of bad rails apps
[06:06:41] havenwood: BabyMario: Try implementing the same non-trivial thing in both and see how they feel?
[06:09:38] minimalism: has joined #ruby
[06:11:14] username1: has joined #ruby
[06:11:17] BabyMario: havenwood: yeah, I get that ruby is a nicer language, but if you're just using a lib; not writing it, does it matter?
[06:11:17] username1: has joined #ruby
[06:11:37] enterprisey: has joined #ruby
[06:11:40] havenwood: BabyMario: Depends on what you're doing. It can.
[06:11:51] jsilver: if you need to change the lib it matters
[06:13:07] BabyMario: yeah okay, I guess it also matters when installing the lib sometimes, less portable
[06:13:23] jsilver: just use what is fast and works
[06:13:32] jsilver: C++ can edited too
[06:16:47] naprimer: has joined #ruby
[06:18:44] Arpanet69: has joined #ruby
[06:21:59] jsilver: havenwood: it looks like excon only provides streaming responses, this is a post i'm doing
[06:22:37] havenwood: jsilver: look at that "Chunked Requests" portion
[06:22:48] havenwood: jsilver: it's a post of a chunker lambda
[06:22:56] havenwood: Excon.post('http://geemus.com', :request_block => chunker)
[06:23:01] jsilver: i saw that
[06:23:10] jsilver: doesn't look like the lambda takes the proper parameters to make the calculation tho
[06:23:16] jsilver: i need bytes transferred and bytes total
[06:23:51] havenwood: you do as many chunks as you want - though it's not quite pretty like streaming
[06:24:37] jsilver: oh i see it's every 1mb out of the total size
[06:26:17] jsilver: actually no
[06:26:30] jsilver: the chunker function provides the upload data
[06:26:37] jsilver: am i being stupid
[06:26:48] jsilver: nvm i think i can do it
[06:28:41] bkxd: has joined #ruby
[06:30:20] bronson: has joined #ruby
[06:33:11] aganov: has joined #ruby
[06:38:29] govg: has joined #ruby
[06:40:35] jsilver: i just found this https://github.com/ggiamarchi/ruby-uploader
[06:41:10] maattdd: has joined #ruby
[06:53:08] aufi: has joined #ruby
[06:55:49] mark_66: has joined #ruby
[07:03:12] fmartingr: has joined #ruby
[07:03:44] pulkit4tech: has joined #ruby
[07:05:04] jaruga: has joined #ruby
[07:05:17] andikr: has joined #ruby
[07:07:44] conta: has joined #ruby
[07:09:40] snickers: has joined #ruby
[07:10:11] TomyWork: has joined #ruby
[07:10:36] jgnagy: has joined #ruby
[07:10:54] esObe_: has joined #ruby
[07:11:46] brent__: has joined #ruby
[07:13:08] pwnd_nsfw: has joined #ruby
[07:13:15] montanonic: has joined #ruby
[07:16:00] tvw: has joined #ruby
[07:18:24] nlvkjq: has joined #ruby
[07:19:41] patarr: has joined #ruby
[07:20:38] Sp4rKy: has joined #ruby
[07:27:05] Qchmqs: has joined #ruby
[07:29:49] _djbkd: has joined #ruby
[07:31:01] nobitanobi: has joined #ruby
[07:34:27] Jameser`: has joined #ruby
[07:37:35] ddffg: has joined #ruby
[07:39:11] last_staff: has joined #ruby
[07:39:38] doublemalt_: has joined #ruby
[07:43:21] gdonald: has joined #ruby
[07:44:51] llaine: has joined #ruby
[07:45:07] tAn: has joined #ruby
[07:51:19] aufi: has joined #ruby
[07:52:01] nowhere_man: has joined #ruby
[07:52:13] dionysus69: has joined #ruby
[07:53:01] igniting: has joined #ruby
[07:53:39] esObe_: has joined #ruby
[07:57:08] jdm: has joined #ruby
[08:04:23] burgestrand: has joined #ruby
[08:06:00] xall: has joined #ruby
[08:07:08] jsrn_: has joined #ruby
[08:08:02] kazo: has joined #ruby
[08:10:43] mikecmpbll: has joined #ruby
[08:13:01] marr: has joined #ruby
[08:14:11] deviation: has joined #ruby
[08:14:54] spicerack: has joined #ruby
[08:16:03] pwnd_nsfw`: has joined #ruby
[08:16:04] burgestrand: has joined #ruby
[08:16:27] BTRE: has joined #ruby
[08:18:24] armyriad: has joined #ruby
[08:22:16] iMadper: has joined #ruby
[08:22:16] iMadper: has joined #ruby
[08:27:20] jane_booty_doe: has joined #ruby
[08:28:10] spicerack: has joined #ruby
[08:29:01] jsilver: has joined #ruby
[08:29:07] jsilver: yo havenwood you still here
[08:29:37] bkxd: has joined #ruby
[08:29:45] jsilver: using fileupload library, i am able to do progress stuff with chunking. but i'm sending the data wrong. i think i need to use this some how http://realityforge.org/code/rails/2006/03/02/upload-a-file-via-post-with-net-http.html to upgrade https://github.com/ggiamarchi/ruby-uploader
[08:29:59] cfec0b8d: has joined #ruby
[08:30:20] jsilver: it wants the data to come from a form, not a straight up upload
[08:31:57] Jameser: has joined #ruby
[08:32:59] jenrzzz: has joined #ruby
[08:33:25] maloik: has joined #ruby
[08:35:02] tomphp: has joined #ruby
[08:35:10] jeyraof^mbpr: has joined #ruby
[08:42:00] tvw: has joined #ruby
[08:44:26] eb0t: has joined #ruby
[08:44:45] meshsmith: has joined #ruby
[08:46:11] eblip: has joined #ruby
[08:46:36] Silthias: has joined #ruby
[08:47:55] Arpanet69: has joined #ruby
[08:48:33] martin430: has joined #ruby
[08:52:16] govg: has joined #ruby
[08:53:21] lxsameer: has joined #ruby
[08:54:23] vondruch: has joined #ruby
[09:00:26] Beams: has joined #ruby
[09:01:40] jusa: has joined #ruby
[09:02:36] naprimer: has joined #ruby
[09:05:32] davorb: has joined #ruby
[09:06:14] username1: has joined #ruby
[09:08:30] fxa90id: has joined #ruby
[09:11:16] jgnagy: has joined #ruby
[09:18:51] mim1k: has joined #ruby
[09:20:34] patarr: has joined #ruby
[09:21:44] pulkit4tech: has joined #ruby
[09:28:38] adaedra: >> [1, 2].inject:+
[09:28:39] ruby[bot]: adaedra: # => 3 (https://eval.in/763416)
[09:30:16] martin430: has left #ruby: ()
[09:31:06] deviation: has joined #ruby
[09:36:20] raspado: has joined #ruby
[09:37:06] herwin: and exactly what is wtf about that?
[09:39:28] adaedra: I would have expected it to raise error (missing space between inject and :+)
[09:39:43] doublemalt_: has joined #ruby
[09:41:35] biberu: has joined #ruby
[09:43:12] rgr: has joined #ruby
[09:44:31] GodFather_: has joined #ruby
[09:44:34] GodFather: has joined #ruby
[09:46:38] jusa: has joined #ruby
[09:48:00] certainty: has joined #ruby
[09:59:52] opus: has joined #ruby
[10:00:32] workmad3: has joined #ruby
[10:14:07] ferr1: has joined #ruby
[10:14:16] camilasan: has joined #ruby
[10:15:49] etehtsea: has joined #ruby
[10:17:40] ar1a: has joined #ruby
[10:18:07] ar1a: :/ hey guys, i have this problem. I'm getting this error when i execute a simple script game.rb:23:in `<main>': undefined method `+@' for nil:NilClass (NoMethodError)
[10:18:11] cajone: has joined #ruby
[10:18:16] ar1a: but the line is just "end", closing off an else statement
[10:18:49] tobiasvl: ar1a: paste the code at https://gist.github.com
[10:19:47] elomatreb: +@ is the unary plus, that's a little strange
[10:21:18] ar1a: tobiasvl: kk gimme a sec
[10:21:29] ar1a: https://ptpb.pw/x1EE.rb
[10:22:25] elomatreb: There is no ++ in Ruby, use `+= 1` instead
[10:22:26] tobiasvl: ar1a: the error is in line 14, tries++
[10:23:05] tobiasvl: it says the error is at line 23 because it thinks you're trying to do tries + +(result of if/else)
[10:23:10] tobiasvl: which is also where the unary + comes from
[10:24:22] ar1a: Guess the number between 1 and 100!
[10:24:23] ar1a: You got it! Congratulations Aria! It took you 1 tries.
[10:30:21] bkxd: has joined #ruby
[10:32:16] fxa90id: has joined #ruby
[10:32:20] Guest41456: has left #ruby: ("Leaving")
[10:46:54] Fernando-Basso: has joined #ruby
[10:47:13] bkxd: has joined #ruby
[10:49:14] Fernando-Basso: has joined #ruby
[10:58:00] bkxd: has joined #ruby
[10:59:00] awk: has joined #ruby
[11:01:57] maattdd: has joined #ruby
[11:02:09] awk: Hi, I was wondering if anyone could help. This ruby script, https://pastebin.com/WUQPyApM runs and tails a file trying to find a string, the problem is it's to slow and misses the line, yet if I use tail -f /path/to/file/blah.log | grep whatIneed it works... So in bash I have done this https://pastebin.com/NrMDvzer which also works... Please can someone advise what I can do to have ruby read this as I don't wan
[11:02:10] ruby[bot]: awk: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/cffc2208e100548a565589fde4f2cc1e
[11:02:11] ruby[bot]: awk: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[11:02:15] awk: t to use bash
[11:02:21] Hanmac: has joined #ruby
[11:02:26] awk: erp, sorry
[11:05:29] matthewd: awk: "the problem is it's to slow and misses the line"
[11:05:34] matthewd: Which one is it?
[11:06:09] rgr_: has joined #ruby
[11:06:17] cfec0b8d: has joined #ruby
[11:07:10] thadtheman: has joined #ruby
[11:07:17] potatoe: has joined #ruby
[11:07:40] potatoe: hello guys, I'm getting this error ERROR: Could not find a valid gem 'logstash-core-event-java' (>= 0) in any repository even though the gem exists on rubygems
[11:07:42] potatoe: any idea why?
[11:08:15] matthewd: potatoe: As the name suggests, the gem is only available for jruby
[11:08:19] xall_: has joined #ruby
[11:08:34] potatoe: matthewd should I install that seperately?
[11:09:43] potatoe: and matthewd I've installed jruby and I still cant install it
[11:09:49] matthewd: I'd suggest following the install instructions for logstash.. afaik they don't recommend installing it as a gem anyway
[11:10:11] GodFather: has joined #ruby
[11:10:12] potatoe: matthewd but the installation for logstash doesn't actually work for its plugins
[11:10:20] matthewd: You'd need to be installing gems into jruby, not your default system ruby
[11:10:47] potatoe: this is the error: Make sure that `gem install logstash-core-event-java -v '5.0.2'` succeeds before bundling
[11:11:39] ar1a: has left #ruby: ()
[11:12:14] jgnagy: has joined #ruby
[11:13:04] awk: matthewd: sorry to sound stupid, what are you meaning... that ruby script I run with /path/to/file 'CoreConfigurationService STARTING'
[11:13:25] awk: It sometimes catches it, and sometimes it doesn't, but tail -f /path/to/file | grep 'CoreConfigurationService STARTING' gets it each time
[11:13:48] cajone: has joined #ruby
[11:13:57] matthewd: awk: My question was mostly what "too slow" means here, to you
[11:15:08] matthewd: awk: There's a difference between what this does and what tail -f does, which seems like it could be relevant, so I'm trying to understand more context
[11:15:56] awk: matthewd: I'm watching a logfile, and when I get an entry i'm looking for in the logfile, I'm then happy to move to another systemd process I need to run
[11:16:18] awk: So it's a startPost step on a startup service
[11:16:54] awk: Service starts, then kicks off this script to wait for the entry, if it doesnt display that log entry then there is problems elsewhere (DB related), if it gets the response its good to move to the next service
[11:17:04] matthewd: tail -f outputs the last 10 lines of the file
[11:18:20] matthewd: If the event happens before your script runs, tail will find it if it gets lucky (nothing else has logged > 10 lines); the ruby script seeks to the end of the log, so has no such luck-buffer
[11:20:54] matthewd: (in case that was too subtle: "This is a flawed design, because it relies on ~winning a race to notice the event. If you need it to work reliably, you should do something else.")
[11:21:52] patarr: has joined #ruby
[11:23:36] awk: matthewd: got it... thanks..
[11:24:05] DaveTaboola: has joined #ruby
[11:27:19] jaruga: has joined #ruby
[11:29:35] doublemalt_: has joined #ruby
[11:37:01] conmaxo: has joined #ruby
[11:37:58] milardovich: has joined #ruby
[11:40:24] JeanCarloMachado: has joined #ruby
[11:40:37] infernix: has joined #ruby
[11:43:41] DaveTaboola: has joined #ruby
[11:44:04] brent__: has joined #ruby
[11:45:06] conmaxo: has left #ruby: ("Leaving")
[11:47:23] yasu: has joined #ruby
[11:48:36] hutch34_: has joined #ruby
[11:49:49] jusa: has joined #ruby
[11:54:15] thadtheman: has joined #ruby
[11:54:25] synthroid: has joined #ruby
[12:01:01] HoierM: has joined #ruby
[12:01:02] User458764: has joined #ruby
[12:04:01] Elenaltarien: has joined #ruby
[12:05:29] synthroid: has joined #ruby
[12:10:29] xall_: has joined #ruby
[12:11:18] brent__: has joined #ruby
[12:12:34] thadtheman: has joined #ruby
[12:17:07] antgel: has joined #ruby
[12:19:16] alibby1: has joined #ruby
[12:19:38] patarr: has joined #ruby
[12:19:56] deduped: has joined #ruby
[12:21:12] dionysus69: has joined #ruby
[12:21:25] mim1k: has joined #ruby
[12:22:27] swills: has joined #ruby
[12:23:04] gnufied: has joined #ruby
[12:25:49] Guest96: has joined #ruby
[12:26:37] Silthias1: has joined #ruby
[12:27:54] nowhere_man: has joined #ruby
[12:29:27] bauruine: has joined #ruby
[12:35:02] xenops: has joined #ruby
[12:36:29] aupadhye: has joined #ruby
[12:37:35] yurikoles: has joined #ruby
[12:38:04] mim1k: has joined #ruby
[12:42:33] darix: havenwood: https://bugs.ruby-lang.org/issues/13376
[12:42:41] darix: havenwood: seems a good candidate to cause 2.3.4
[12:44:59] meshsmith: has joined #ruby
[12:45:51] Jameser: has joined #ruby
[12:46:10] leito: has joined #ruby
[12:47:34] DaveTaboola: has joined #ruby
[12:48:32] milardovich: has joined #ruby
[12:48:46] milardovich: has joined #ruby
[12:50:43] milardovich: has joined #ruby
[12:51:21] jelle1: has joined #ruby
[12:51:41] jelle1: has left #ruby: ()
[12:53:52] bauruine: has joined #ruby
[12:56:51] yurikoles: has joined #ruby
[12:57:32] zel: has joined #ruby
[12:57:36] ramortegui: has joined #ruby
[12:58:26] j3ll3: has joined #ruby
[13:00:40] j3ll3: has left #ruby: ()
[13:00:53] raz: has left #ruby: ("*fump*")
[13:01:31] mim1k: has joined #ruby
[13:04:38] sofubi: has joined #ruby
[13:06:11] Terens: has joined #ruby
[13:06:42] duckpupp1: has joined #ruby
[13:11:19] username1: has joined #ruby
[13:11:20] username2: has joined #ruby
[13:12:04] charliesome: has joined #ruby
[13:12:43] jgnagy: has joined #ruby
[13:16:37] milardovich: has joined #ruby
[13:16:42] nOwz: has joined #ruby
[13:17:27] milardovich: has joined #ruby
[13:19:47] csk: has joined #ruby
[13:27:03] DLSteve: has joined #ruby
[13:29:58] hs366: has joined #ruby
[13:30:39] millerti: has joined #ruby
[13:35:48] chouhoulis: has joined #ruby
[13:37:41] DLSteve: has joined #ruby
[13:37:43] raspado: has joined #ruby
[13:37:57] GSilva: has joined #ruby
[13:39:14] gigetoo: has joined #ruby
[13:39:16] certainty: has joined #ruby
[13:42:48] gdonald: has joined #ruby
[13:43:05] haylon: has joined #ruby
[13:43:18] jrafanie: has joined #ruby
[13:44:19] ddffg: has joined #ruby
[13:45:35] Jameser`: has joined #ruby
[13:45:41] GodFather: has joined #ruby
[13:45:55] mim1k: has joined #ruby
[13:46:47] jgpawletko: has joined #ruby
[13:47:26] croberts: has joined #ruby
[13:50:55] charliesome: has joined #ruby
[13:52:38] yasu: has joined #ruby
[13:52:56] Rodya_: has joined #ruby
[13:55:37] Jameser: has joined #ruby
[13:56:33] gbfrow: has joined #ruby
[13:58:23] bkxd: has joined #ruby
[14:00:02] chouhoulis: has joined #ruby
[14:02:28] mim1k: has joined #ruby
[14:03:26] cdg: has joined #ruby
[14:07:14] cdg: has joined #ruby
[14:10:34] nobitanobi: has joined #ruby
[14:10:49] NL3limin4t0r: has joined #ruby
[14:16:47] LyndsySimon: Rubocop complains when I have more than five parameters for a method, but I often have more than five optional parameters passed in as an options hash. I prefer to explicitly write those options out now as named parameters, and am refactoring some of my old code to reflect that. Is it idiomatic Ruby to have a long list of named, optional parameters for a
[14:17:50] __Yiota: has joined #ruby
[14:18:08] LyndsySimon: I'm specifically talking about helpers in Rails, by the way. I use them to abstract out complex things like creating an HTML table of data. Lots of parameters in that case means I get to use a consistent interface for generating the table in my views.
[14:18:18] darix: LyndsySimon: i think hash to carry long options are more common
[14:18:19] yasu: has joined #ruby
[14:18:27] griffindy: has joined #ruby
[14:18:40] patarr: has joined #ruby
[14:18:46] LyndsySimon: darix: I agree that it's more common; I'm eschewing it because named parameters have better IDE support.
[14:19:29] mim1k: has joined #ruby
[14:19:48] snickers: has joined #ruby
[14:22:23] gsnedders: has joined #ruby
[14:23:01] yasu: has joined #ruby
[14:24:42] gsnedders: has left #ruby: ()
[14:24:49] naprimer: has joined #ruby
[14:26:00] adavia: has joined #ruby
[14:28:50] milardovich: has joined #ruby
[14:28:51] daveomcd: has joined #ruby
[14:29:03] chouhoul_: has joined #ruby
[14:34:25] s2013: has joined #ruby
[14:34:50] aryaching: has joined #ruby
[14:35:03] xall_: has joined #ruby
[14:36:41] ekinmur: has joined #ruby
[14:36:42] troulouliou_div2: has joined #ruby
[14:38:24] ldnunes: has joined #ruby
[14:39:09] alibby: has joined #ruby
[14:40:10] milardovich: has joined #ruby
[14:41:05] kent\n: has joined #ruby
[14:42:30] ozcanesen: has joined #ruby
[14:43:17] milardov_: has joined #ruby
[14:43:40] choke: has joined #ruby
[14:43:56] shinnya: has joined #ruby
[14:45:24] jgpawletko: has joined #ruby
[14:48:22] szulak: a quote from "Humble Little Ruby Book" made my day... "Firstly, if it is querying an attribute, it should end in a question mark; for example, if you were to write a method to get the number of French military victories, you could do something like France.has_military_victories?. This would, of course, return false."
[14:48:31] szulak: about methods naming.
[14:49:18] etehtsea: has joined #ruby
[14:49:41] xall: has joined #ruby
[14:50:41] asdf234: has joined #ruby
[14:52:21] centrx: has joined #ruby
[14:52:21] centrx: has joined #ruby
[14:53:22] sepp2k: has joined #ruby
[14:54:23] JeanCarloMachado: has joined #ruby
[14:55:33] antoniobeyah: has joined #ruby
[14:57:03] jrafanie: has joined #ruby
[14:57:38] llaine_: has joined #ruby
[15:00:59] polishdub: has joined #ruby
[15:01:13] VladGh: has joined #ruby
[15:01:15] et09: has joined #ruby
[15:02:58] et09: i have [1,2,3,4]. i want to say, please execute ->(x){x**2 == 9} and return the x**2 for the first match (or whatever computation). i.e., please return the return value of lambda x of enumerable y that is truthy
[15:03:10] et09: is there a non-manual way to do that
[15:03:20] VladGh: has joined #ruby
[15:04:35] psychicist__: has joined #ruby
[15:04:35] haylon: has joined #ruby
[15:04:44] hxegon: >> [1, 2, 3, 4].find { |n| n**2 == 9 } # et09
[15:04:58] hxegon: ACTION kicks ruby[bot]
[15:05:12] cdg_: has joined #ruby
[15:05:12] Papierkorb: >> [1,2,3,4].lazy.map{|x| x ** 2}.find{|x| x == 9} # et09
[15:05:13] ruby[bot]: Papierkorb: # => 9 (https://eval.in/763743)
[15:05:16] VladGh: has joined #ruby
[15:05:33] et09: lazy! omg
[15:05:45] et09: when did they add that
[15:05:58] Papierkorb: depends if you need it, for such a small set, it adds more complexity that's worth
[15:06:05] Papierkorb: lazy has been with us for some time now
[15:06:08] davorb: has joined #ruby
[15:06:15] hxegon: >> [1, 2, 3, 4].find { |n| n**2 == 9 } # et09
[15:06:16] et09: it's doing a database query for each member, in my actual case
[15:06:17] ruby[bot]: hxegon: # => 3 (https://eval.in/763745)
[15:06:31] et09: trying to resolve a polymorphic association on a list of objects
[15:06:34] et09: in priority
[15:06:45] et09: hxegon: trying to avoid the double-query
[15:08:03] mim1k: has joined #ruby
[15:09:02] joneshf-laptop: has joined #ruby
[15:09:25] benlieb: has joined #ruby
[15:09:43] rippa: has joined #ruby
[15:10:59] Papierkorb: et09: you shouldn't do that, instead, query all at once if you need almost all OR write a WHERE clause which finds the correct item if you're looking for exactly one or two
[15:11:27] Papierkorb: et09: a good ol' JOIN might already help too
[15:11:29] ResidentBiscuit: has joined #ruby
[15:11:48] et09: you're probably right
[15:11:54] hxegon: why not just .lazy.find?
[15:12:23] Papierkorb: hxegon: database queries? that's a premier way of producing n+1 queries
[15:13:02] djbkd: has joined #ruby
[15:13:03] et09: this query would prob never exceed 2ms
[15:13:07] patarr1: has joined #ruby
[15:13:24] Papierkorb: 2ms here, 2ms there ...
[15:13:27] et09: although uh, the list is prioritized
[15:13:41] jgnagy: has joined #ruby
[15:13:45] et09: so it'd have to order and then limit...
[15:14:03] Papierkorb: That's the job of a database
[15:14:10] et09: Papierkorb: and a max base set of length 3
[15:17:46] infernix: has joined #ruby
[15:17:48] doublemalt_: has joined #ruby
[15:18:16] igniting: has joined #ruby
[15:22:41] Rodya_: has joined #ruby
[15:23:03] flying: has joined #ruby
[15:24:15] burgestrand: has joined #ruby
[15:30:02] mim1k: has joined #ruby
[15:30:18] brent__: has joined #ruby
[15:31:21] djbkd: has joined #ruby
[15:31:39] milardovich: has joined #ruby
[15:32:23] dionysus70: has joined #ruby
[15:38:09] amclain: has joined #ruby
[15:38:31] montanonic: has joined #ruby
[15:39:25] jrafanie: has joined #ruby
[15:39:31] boombox_: has joined #ruby
[15:42:34] willardg: has joined #ruby
[15:42:51] mim1k: has joined #ruby
[15:43:04] username1: has joined #ruby
[15:43:15] username2: has joined #ruby
[15:43:29] jgnagy: has joined #ruby
[15:43:47] raspado: has joined #ruby
[15:44:57] milardovich: has joined #ruby
[15:45:07] raspado_: has joined #ruby
[15:45:13] govg: has joined #ruby
[15:51:15] Jayson_Virissimo: has joined #ruby
[15:51:30] leito: has joined #ruby
[15:52:18] rakm: has joined #ruby
[15:52:48] TomyWork: has joined #ruby
[15:53:21] hxegon: has joined #ruby
[15:53:53] GSilva: has joined #ruby
[15:55:41] planigan: has joined #ruby
[15:58:35] inerkick: has joined #ruby
[15:59:20] nOwz: has joined #ruby
[16:01:42] hndk: has joined #ruby
[16:02:05] [Butch]: has joined #ruby
[16:02:32] jge: has joined #ruby
[16:02:42] jge: hey all
[16:04:24] jge: trying to get ruby install in ubuntu server, which is not allowed to connect out to the internet except ubuntu repos.
[16:04:29] armyriad: has joined #ruby
[16:05:29] jge: so I went with installing from source, however, I'm running into an issue on my last step (installing bundler) I do "gem install bundler" but then of course that fails since it tries to connect to rubygems.org
[16:05:55] jge: any other way do install bundler without using gem command?
[16:06:13] jge: or im pretty much screwed at this point..
[16:06:27] baweaver: few options
[16:06:37] baweaver: gem install --local /path/to/bundler.gem
[16:06:57] baweaver: gem sources -a https://your.internal.gemserver.com
[16:07:54] havenwood: jge: Or you can `bundle package` on a system that has internet and ship that package of pre-downloaded gems.
[16:07:55] baweaver: https://github.com/rubygems/rubygems-mirror
[16:08:45] havenwood: jge: But you're not screwed, lots of options!
[16:09:15] jge: thank goodness for this community ;)
[16:09:41] jge: I'm not familiar with ruby apps
[16:10:00] jge: following this doc http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Ubuntu_step_by_step
[16:10:15] jge: sounds like gem install --local could be easier?
[16:11:02] jge: any benefit of doing a 'bundle package' ?
[16:11:06] SesMan: has joined #ruby
[16:11:18] jge: or same result
[16:14:30] xall: has joined #ruby
[16:21:15] bmurt: has joined #ruby
[16:21:23] MittelDank: has joined #ruby
[16:24:04] kus_ubuntui686: has joined #ruby
[16:25:15] tolerablyjake: has joined #ruby
[16:26:49] Doow: has joined #ruby
[16:32:44] gusrub: has joined #ruby
[16:32:47] saltsa: has joined #ruby
[16:34:58] chouhoulis: has joined #ruby
[16:36:13] sarbs: has joined #ruby
[16:36:56] SeepingN: has joined #ruby
[16:37:12] pilne: has joined #ruby
[16:44:14] cahoots: has joined #ruby
[16:44:35] Rodya_: has joined #ruby
[16:45:24] patarr: has joined #ruby
[16:46:52] marr: has joined #ruby
[16:49:59] agent_white: has joined #ruby
[16:51:43] agent_white: Mornin' folks
[16:54:11] bkxd: has joined #ruby
[16:55:21] skweek: has joined #ruby
[16:55:44] nadir: has joined #ruby
[16:57:03] gdonald: has joined #ruby
[16:59:53] xzhao: has joined #ruby
[17:02:24] xzhao: has joined #ruby
[17:03:08] montanonic: has joined #ruby
[17:04:34] blackpajamas: has joined #ruby
[17:05:35] benlieb: has joined #ruby
[17:05:42] mostlybadfly: has joined #ruby
[17:09:22] polar_ice: has joined #ruby
[17:09:41] gusrub: has joined #ruby
[17:09:45] centrx: Agent has arrived
[17:09:53] centrx: Secret surveillance commencing
[17:11:07] patarr: has joined #ruby
[17:12:15] polar_ice: Is there an idiomatic way to get the result of sending the same message to an object multiple times? i.e., "a".next.next.next.next
[17:13:29] centrx: polar_ice: [:next, :next, :next].each { |method_name| a.send(method_name) }
[17:14:29] baweaver: no no no no
[17:14:42] baweaver: send can be slow
[17:15:12] polar_ice: Something *like* this: (1..10).reduce("a") {|a,_| a.next}
[17:15:15] baweaver: 3.times { value.next }
[17:16:40] synthroid: has joined #ruby
[17:18:27] gusrub: has joined #ruby
[17:20:34] Rodya_: has joined #ruby
[17:23:11] polar_ice: has left #ruby: ()
[17:23:54] mim1k: has joined #ruby
[17:24:30] pupsicle: has joined #ruby
[17:31:03] SeepingN: has joined #ruby
[17:31:31] gusrub: has joined #ruby
[17:31:31] cahoots: has joined #ruby
[17:31:48] certainty: has joined #ruby
[17:40:44] marxarelli: has joined #ruby
[17:42:34] montanonic: has joined #ruby
[17:45:15] cfec0b8d: has joined #ruby
[17:49:36] pwnd_nsfw: has joined #ruby
[17:50:52] kirun: has joined #ruby
[17:51:58] jusa: has joined #ruby
[17:56:43] rahul_bajaj: has joined #ruby
[17:59:41] planigan: has joined #ruby
[18:00:50] skweek: has joined #ruby
[18:01:39] rakm_: has joined #ruby
[18:01:41] rgtk: has joined #ruby
[18:02:41] mikecmpbll: has joined #ruby
[18:04:17] jamesaxl: has joined #ruby
[18:05:22] nOwz: has joined #ruby
[18:06:31] polishdub: has joined #ruby
[18:09:32] miah: has joined #ruby
[18:09:59] skweek: has joined #ruby
[18:11:11] jenrzzz: has joined #ruby
[18:17:36] futilegames: has joined #ruby
[18:17:46] jrafanie: has joined #ruby
[18:17:51] xenops: has joined #ruby
[18:21:06] ChanServ: +o havenwood
[18:21:25] ChanServ: -o havenwood
[18:22:34] TomyLobo2: has joined #ruby
[18:25:30] snockerton: has joined #ruby
[18:28:56] jenrzzz: has joined #ruby
[18:29:44] patarr: has joined #ruby
[18:34:46] jrafanie: has joined #ruby
[18:43:28] planigan: has joined #ruby
[18:44:49] tvw: has joined #ruby
[18:45:09] rakm: has joined #ruby
[18:50:28] renchan: has joined #ruby
[18:51:54] nOwz: has joined #ruby
[18:53:19] IRCFrEAK: has joined #ruby
[18:53:31] preyalone: has joined #ruby
[18:55:12] IRCFrEAK: has left #ruby: ()
[18:56:24] planigan: has joined #ruby
[18:57:29] jrafanie: has joined #ruby
[18:59:41] centrx: has joined #ruby
[18:59:42] centrx: has joined #ruby
[19:02:37] nowhere_man: has joined #ruby
[19:03:24] benlieb: has joined #ruby
[19:03:35] futilegames: has joined #ruby
[19:04:28] planigan: has joined #ruby
[19:05:29] electrostat: has joined #ruby
[19:05:40] davorb: has joined #ruby
[19:07:36] IRCFrEAK: has joined #ruby
[19:10:06] IRCFrEAK: has left #ruby: ()
[19:11:26] planigan: has joined #ruby
[19:15:33] camonz: has joined #ruby
[19:19:31] planigan: has joined #ruby
[19:20:16] chrisgopher: has joined #ruby
[19:20:51] AndBobsYourUncle: has joined #ruby
[19:20:58] skweek: has joined #ruby
[19:21:32] LyndsySimon: I'm going through a static analysis report, and am confused. It says that passing a user-supplied value to `ActiveRecord::Base.find` is a SQL injection vuln. I can't figure out any way that's possible. Anyone have an opinion on this?
[19:21:52] psychicist__: has joined #ruby
[19:22:06] LyndsySimon: The line that's raising the warning is: `@my_object = MyObject.find(params[:id])`
[19:22:13] LyndsySimon: Seems like pretty standard stuff to me.
[19:25:22] goldpank: has joined #ruby
[19:25:52] centrx: LyndsySimon: yeah it's probably just wrong
[19:26:11] foxness: has joined #ruby
[19:26:28] DLSteve: has joined #ruby
[19:27:06] LyndsySimon: centrx: It seems odd, because the report is from a big-name security vendor. Why would they not be able to handle literally the first case that's used in the Rails tutorial?
[19:27:42] centrx: Maybe their analysis doesn't take ActiveRecord into account?
[19:27:49] goldpank: has left #ruby: ()
[19:29:17] LyndsySimon: That appears to be the case, it's just really odd. Saying "No, this is fine" when the entity we're paying to do analysis as part of an audit says there is an issue gives me heartburn.
[19:30:01] dionysus69: has joined #ruby
[19:30:23] centrx: LyndsySimon: That's the way it is. Sometimes things will be flagged that maybe you should look into, but you decide they are okay.
[19:30:48] centrx: LyndsySimon: Other things will need to be remediated. Other things won't be flagged at all. No one ever gets 100% on a first assessment/audit
[19:30:49] nobitanobi: has joined #ruby
[19:31:09] LyndsySimon: True. I guess it's better to be "fail-safe" on a first pass.
[19:32:04] daivyk: has joined #ruby
[19:32:12] bmurt: has joined #ruby
[19:33:10] centrx: LyndsySimon: false positives better than false negatives
[19:34:42] maattdd: has joined #ruby
[19:34:54] milardovich: has joined #ruby
[19:40:36] futilegames: has joined #ruby
[19:40:57] _I_R_C_F_R_E_A_K: has joined #ruby
[19:42:37] benlieb: has joined #ruby
[19:43:43] futilegames_: has joined #ruby
[19:44:22] milardovich: has joined #ruby
[19:48:29] enterprisey: has joined #ruby
[19:48:48] jphase: has joined #ruby
[19:50:05] psychicist__: has joined #ruby
[19:50:44] _I_R_C_F_R_E_A_K: has left #ruby: ()
[19:52:20] cdg: has joined #ruby
[19:52:20] jrafanie: has joined #ruby
[19:52:42] grillon: has joined #ruby
[19:53:10] Rodya_: has joined #ruby
[19:53:15] agent_white: has joined #ruby
[19:55:19] bkxd: has joined #ruby
[19:56:05] sonOfRa: has joined #ruby
[19:58:24] s2013: has joined #ruby
[20:02:05] Eiam: has joined #ruby
[20:02:51] jrafanie: has joined #ruby
[20:07:28] muelleme_: has joined #ruby
[20:08:02] millerti: has joined #ruby
[20:08:58] jge: Ok so I'm using bundle install, bundle package then transfer to machine that's offline to install gems.. thing is that every time I do this, some other gem dependency comes up and I have to do this repeatedly for I don't know how many times.. what would be a faster way as this is a real PITA
[20:09:31] jge: someone suggested earlier to set up an offline mirror but how much space would this take?
[20:10:18] havenwood: jge: you can just mirror the gems you use
[20:10:28] havenwood: jge: you don't have to mirror the whole of rubygems
[20:10:44] havenwood: jge: http://guides.rubygems.org/run-your-own-gem-server/
[20:10:55] daivyk: has joined #ruby
[20:11:05] jge: havenwood: how would I find out which gems I use? I've already done it for whatever is on Gemfile but my plugins (for Redmine app) appearently require additional ones
[20:11:25] workmad3: has joined #ruby
[20:11:28] baweaver: Gemfile.lock
[20:11:38] havenwood: jge: bundle show
[20:12:41] jge: Ok got it, let me try that
[20:12:43] jge: thanks all
[20:15:47] gheegh: has joined #ruby
[20:16:19] jenrzzz: has joined #ruby
[20:16:48] br0d1n: has joined #ruby
[20:17:19] montanonic: has joined #ruby
[20:18:22] gheegh: hey guys.. i've got a question. i'm using this gem: https://github.com/robmiller/ruby-wpdb (gives you access to a wordpress database). it configures the DB with a WPDB.init class method.. that seems to be "globalish".. I'm trying to copy between two sites (hence two differently configured WPDB's) and its not letting me to it.. then one initializes, it overwrites the "init" of the previous one..
[20:19:04] gheegh: i tried cloning into a variable and freezing. .but that doesn't seems to work.. any other suggestions, other than re-writing it?
[20:20:15] milardovich: has joined #ruby
[20:21:23] knight33: has joined #ruby
[20:22:01] daivyk: has joined #ruby
[20:23:53] bmurt: has joined #ruby
[20:25:11] planigan: has joined #ruby
[20:25:43] xychix: has joined #ruby
[20:27:02] xychix: Any security minded ruby devvers here? I've got a almost finished exploit Pull request for metasploit. It needs some finishing off (~3 hours for devver with experience). PM me and you might get a change to be co-author on a MSF module ;) credits for life!
[20:28:58] hxegon: gheegh: My only idea is Classname.clone to another constant, but I'm not sure if that would work
[20:29:41] Scient: has joined #ruby
[20:30:01] dminuoso: hxegon: I'd be careful with that. Cloning such abstract objects might backfire because it will not be a deep copy.
[20:30:16] marxarelli: has joined #ruby
[20:31:47] Dfoolz: has joined #ruby
[20:31:49] snapcase: has joined #ruby
[20:39:14] ozcanesen: has joined #ruby
[20:41:36] llaine_: has joined #ruby
[20:42:53] jrafanie: has joined #ruby
[20:43:03] j2k: has joined #ruby
[20:46:34] jrafanie: has joined #ruby
[20:47:11] gizmore: has joined #ruby
[20:49:25] jdm: has joined #ruby
[20:54:40] gheegh: hxegon: yeah, that didn't work.
[20:54:46] gheegh: first thing I tried
[20:55:12] gheegh: I'm going to rewrite it I guess.
[20:56:38] Rodya_: has joined #ruby
[20:57:18] psychicist__: has joined #ruby
[20:57:33] duderonomy: has joined #ruby
[21:01:05] daivyk: has joined #ruby
[21:01:13] soud: has joined #ruby
[21:01:15] jusa: has joined #ruby
[21:02:12] rakm: has joined #ruby
[21:02:20] duderono_: has joined #ruby
[21:02:26] jdm: has joined #ruby
[21:02:26] jenrzzz_: has joined #ruby
[21:03:01] duderono_: has joined #ruby
[21:03:40] jdm: has joined #ruby
[21:04:06] nOwz: has joined #ruby
[21:04:46] Didac: has joined #ruby
[21:05:04] jrafanie: has joined #ruby
[21:06:01] montanonic: has joined #ruby
[21:06:15] davorb: has joined #ruby
[21:07:38] jrafanie: has joined #ruby
[21:10:31] brent__: has joined #ruby
[21:15:53] jrafanie: has joined #ruby
[21:17:52] brent__: has joined #ruby
[21:19:45] tAn: has joined #ruby
[21:19:55] eba: has joined #ruby
[21:20:43] eba: When ever I try to run my code it say that the variable is incorrect on line 23 https://pastebin.com/mJgnUJpe
[21:20:45] ruby[bot]: eba: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/f23aa89d2777efd81f5f377055bbcabf
[21:20:45] ruby[bot]: eba: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[21:23:19] tenderlo_: has joined #ruby
[21:24:05] balo: has joined #ruby
[21:25:42] rob_: has joined #ruby
[21:27:00] cahoots: hi, is there a way to search for a string in a file that may have newline characters in it, and return the line where it starts?
[21:27:41] hxegon: cahoots: as in return any line where a string is matched?
[21:28:01] cahoots: hxegon, get the line of each occurrence
[21:28:13] pupsicle: cahoots: File.readlines("path/to/file.txt").select { |line| line =~ /pattern/ }
[21:28:24] pupsicle: http://stackoverflow.com/questions/6002868/finding-lines-in-a-text-file-matching-a-regular-expression
[21:28:24] cahoots: pupsicle, the string may have newlines
[21:28:39] cahoots: we can't split on the newline char
[21:28:40] Didac: has joined #ruby
[21:29:04] pupsicle: cahoots: what do you mean you can't split on newline char? Is this a homework question?
[21:29:09] JeanCarloMachado: has joined #ruby
[21:29:17] havenwood: cahoots: File.readlines doesn't split by default, it leaves newlines in place.
[21:29:49] havenwood: cahoots: Each line, with whatever line ending it has.
[21:29:59] cahoots: maybe split is the wrong word, but readlines won't allow me to match multi-line strings
[21:30:24] havenwood: cahoots: so you need to match content across lines, but find the line it started on?
[21:30:31] cahoots: havenwood, yes
[21:30:50] havenwood: cahoots: what have you tried so far?
[21:30:56] cahoots: havenwood, crying
[21:31:06] Azure: has joined #ruby
[21:32:03] mim1k: has joined #ruby
[21:32:42] cahoots: sadness-driven development
[21:33:17] blackwind_123: has joined #ruby
[21:33:29] hxegon: It's actually Tears Driven Development, common mistake cahoots
[21:33:41] rhyselsmore: has joined #ruby
[21:35:27] cahoots: ah of course
[21:36:15] havenwood: >> example = "one line\ntwo lines\nred line\nblue line"; match_position = example =~ /lines\nred/; example[0, 13].count("\n") # cahoots
[21:36:16] ruby[bot]: havenwood: # => 1 (https://eval.in/763884)
[21:37:02] cahoots: yeah, we hoping for something more efficient that's not super nitty gritty. that's ok
[21:37:02] havenwood: err, i mean:
[21:37:13] havenwood: >> example = "one line\ntwo lines\nred line\nblue line"; match_position = example =~ /lines\nred/; example[0, match_position].count("\n") # cahoots
[21:37:14] ruby[bot]: havenwood: # => 1 (https://eval.in/763885)
[21:37:50] havenwood: cahoots: Simpler than counting the lines up to the matched position?
[21:38:37] havenwood: cahoots: Are you worried that it'll be slow or take too much memory or?
[21:39:33] cahoots: havenwood, worried on slowness, it has to a lot of searches on a large code base
[21:39:46] cahoots: grep can do it well enough, was just curious for a ruby alternative that was idiomati
[21:40:02] ozcanesen: has joined #ruby
[21:40:29] Lildirt: has joined #ruby
[21:42:08] milardovich: has joined #ruby
[21:42:56] snockerton: has joined #ruby
[21:48:23] meshsmith: has joined #ruby
[21:48:46] millerti: has joined #ruby
[21:51:02] johnzorn: has joined #ruby
[21:52:49] benlieb: has joined #ruby
[21:53:03] bazzy: has joined #ruby
[21:54:05] raspado: has joined #ruby
[21:56:10] bkxd: has joined #ruby
[22:00:26] nfsnobody: has joined #ruby
[22:00:30] ruby[bot]: has joined #ruby
[22:00:31] ChanServ: +o ruby[bot]
[22:00:39] milardovich: has joined #ruby
[22:05:57] JeanCarloMachado: has joined #ruby
[22:08:04] blackwind_123: has joined #ruby
[22:12:43] muelleme_: has joined #ruby
[22:12:43] milardovich: has joined #ruby
[22:14:56] yehowyada: has joined #ruby
[22:16:24] JeanCarloMachado: has joined #ruby
[22:19:11] mim1k: has joined #ruby
[22:22:39] hutch34_: has joined #ruby
[22:26:41] dar123: has joined #ruby
[22:28:24] nobitanobi: has joined #ruby
[22:32:10] BubonicPestilenc: has joined #ruby
[22:33:27] JeanCarloMachado: has joined #ruby
[22:34:56] gloscombe_: has joined #ruby
[22:44:07] jenrzzz: has joined #ruby
[22:44:07] jenrzzz: has joined #ruby
[22:44:09] krzysztoff: has joined #ruby
[22:45:45] Rodya_: has joined #ruby
[22:48:17] t-recx: has joined #ruby
[22:48:54] charliesome: has joined #ruby
[22:49:48] s2013: has joined #ruby
[22:53:45] HillBill1999: has joined #ruby
[22:54:20] HillBill1999: What kind of projects are you most impressed with?
[22:54:33] adam12: HillBill1999: in what sense?
[22:54:56] HillBill1999: If I was to get a job
[22:55:06] Radar: Depends on the company I would say.
[22:55:30] HillBill1999: But ruby is only used for websites right?
[22:55:32] Radar: If you were applying at the company I work for (Culture Amp) having an app which took in survey responses would definitely be beneficial to your application process :)
[22:55:36] bougyman: HillBill1999: no.
[22:55:43] HillBill1999: All companies use ruby to make sites no?
[22:55:46] bougyman: I use ruby every day and I never touch teb programming.
[22:56:05] bougyman: I use it for infrastructure automation. oh, and as a dhcp server.
[22:56:15] Radar: HillBill1999: No, there are plenty of other languages out there that people use to build websites. PHP, ASP.NET, Elixir...
[22:56:42] bougyman: replacing system adminstrators with code.
[22:56:46] SeepingN: we got a young'n
[22:56:57] volty: has joined #ruby
[22:58:33] adam12: bougyman: You're using it for DHCP?
[22:58:41] bougyman: adam12: hahaha, yeah.
[22:58:49] bougyman: it outperforms ISC.
[22:58:50] adam12: bougyman: I threatened doing that. Is it OSS?
[22:58:56] adam12: I'm using ISC right now, but the reloads suck.
[22:58:59] bougyman: unfortunately.
[22:59:07] adam12: I wanted something I could hook any kind of backend to - http, etc.
[22:59:13] bougyman: this is distributed, multi-master with a shared db behind it.
[22:59:16] adam12: Since I already store mac+ip assignments in a database.
[22:59:26] bougyman: but nodes can operate (giving out already-seen leases) even if disconnected from the db.
[22:59:33] adam12: Yeah - I was thinking something very similar.
[22:59:57] adam12: I ended up building a tiny roda app to manage the dhcpd.conf file, but it's meh.
[23:00:04] adam12: (the app is fine, managing the conf file is meh)
[23:00:59] jusa: has joined #ruby
[23:01:47] benlieb: has joined #ruby
[23:04:44] nOwz: has joined #ruby
[23:05:48] davorb: has joined #ruby
[23:05:51] chouhoul_: has joined #ruby
[23:06:59] chouhoul_: has joined #ruby
[23:07:12] JeanCarloMachado: has joined #ruby
[23:08:04] ledestin: has joined #ruby
[23:09:01] chouhoulis: has joined #ruby
[23:09:49] gigetoo: has joined #ruby
[23:10:57] Trynemjoel: has joined #ruby
[23:11:27] chouhoul_: has joined #ruby
[23:13:31] CloCkWeRX: has joined #ruby
[23:13:46] muelleme_: has joined #ruby
[23:14:02] enterprisey: has joined #ruby
[23:17:25] milardovich: has joined #ruby
[23:22:29] milardovich: has joined #ruby
[23:22:31] charliesome: has joined #ruby
[23:22:46] milardovich: has joined #ruby
[23:23:33] cyphase: has joined #ruby
[23:26:55] bkxd: has joined #ruby
[23:30:29] Tharbakim: has joined #ruby
[23:30:56] erlend: has joined #ruby
[23:34:00] erlend: has joined #ruby
[23:36:19] pwnd_nsfw`: has joined #ruby
[23:42:49] cyphase: has joined #ruby
[23:44:38] GodFather: has joined #ruby
[23:46:19] skord: has joined #ruby
[23:46:41] Rodya_: has joined #ruby
[23:51:47] kristofferR: has joined #ruby
[23:52:25] cahoots: hi, i want to do a gem install without sudo, but i get problems. any ideas? https://gist.github.com/michaeleiselsc/7610cd3c343f74cfd0a4b43f3b7dfca9
[23:52:40] Radar: cahoots: what operating system?
[23:52:45] cahoots: Radar, osx
[23:52:59] Radar: cahoots: Follow this guide: http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you
[23:54:03] cahoots: Radar, i'm looking for something that won't need any sudo, that i can run on a fleet of remote machines without needing to update each one. any ideas?
[23:54:22] Radar: cahoots: Are all the remote machines Mac?
[23:54:28] cahoots: Radar, yes
[23:55:10] Radar: cahoots: I know there's jamf to manage a whole suite of machines, but that might be overkill for this particular instance.
[23:55:24] cyphase: has joined #ruby
[23:55:43] cahoots: Radar, yeah we might have jamf, but going through IT is a pain
[23:55:50] snickers: has joined #ruby
[23:57:26] BabyMario: has joined #ruby
[23:58:08] cahoots: i tried a --local install, also no dice
[23:58:35] adam12: What about --user?
[23:58:56] adam12: Or am I imagining that as a real option. LOL.
[23:59:25] adam12: s/--user/--user-install
[23:59:29] Radar: I think the best option would be to somehow install chruby + ruby-install on those remote machines and install gems as per the regular way.
[23:59:34] Radar: `gem install fastimage`.