« Back to channel list

#ruby - 25 April 2017

« Back 1 day Forward 1 day »
[00:00:39] Sweetlie: has joined #ruby
[00:07:11] soloscshaw: has joined #ruby
[00:07:17] raspado: has joined #ruby
[00:08:59] raspado: has joined #ruby
[00:09:39] milardovich: has joined #ruby
[00:12:32] enterprisey: has joined #ruby
[00:13:45] m13io: has joined #ruby
[00:18:23] Channel6: has joined #ruby
[00:23:39] Evesy: has joined #ruby
[00:24:02] Rodya_: has joined #ruby
[00:24:03] charliesome: has joined #ruby
[00:32:52] quuxman: has joined #ruby
[00:34:10] quuxman: Has anybody used Rails Admin? I'm trying to add a link to a foo_id field to the corresponding object in the views, and can't even figure out how to modify a view at all
[00:34:20] AndBobsYourUncle: has joined #ruby
[00:37:48] Channel6: has joined #ruby
[00:38:20] Guest96: has joined #ruby
[00:39:38] brent__: has joined #ruby
[00:45:44] duderonomy: has joined #ruby
[00:46:27] HoierM_: has joined #ruby
[00:48:38] aguynamedben: has joined #ruby
[00:49:02] rfoust: has joined #ruby
[00:50:46] Lucky_ABA: has joined #ruby
[00:56:35] havenwood: quuxman: I don't know Rails Admin. You might want to ask in the #RubyOnRails channel.
[00:57:13] havenwood: quuxman: It's popular enough there'll likely be some folk there using it.
[01:05:20] cam27: has joined #ruby
[01:06:45] xall: has joined #ruby
[01:07:52] soloscshaw: has joined #ruby
[01:07:58] JoshS: has joined #ruby
[01:08:52] Rodya_: has joined #ruby
[01:11:02] Vile`: has joined #ruby
[01:16:14] znz_jp: has joined #ruby
[01:22:23] xco: has joined #ruby
[01:23:43] xco: hi for those familiar with Rails on this line https://gist.github.com/siaw23/7318f46ae3f81bf9555c379af11b34bd#file-job-rb-L12 can i do ImageResponse.find(params[:’#{id}’]) because i do want the id from #process to be passed into the param. is this “acceptable”?
[01:24:17] bronson: has joined #ruby
[01:25:40] baweaver: xco: have you tried running that yet?
[01:26:00] baweaver: Also, #RubyOnRails may be a better channel
[01:26:55] baweaver: You seem to have a misunderstanding of what params are.
[01:27:49] xco: baweaver: well obviously. i came up with this one ImageResponse.find(params["{id}".to_sym]) instead
[01:28:17] baweaver: Line 11 passes an id
[01:28:30] xco: i just know params are part of a url sent by a user
[01:28:35] baweaver: anyways, skipping to Rails
[01:28:46] hutch34: has joined #ruby
[01:30:04] chouhoulis: has joined #ruby
[01:34:54] SleepySensei: has joined #ruby
[01:35:08] cam27: has joined #ruby
[01:36:21] milardovich: has joined #ruby
[01:36:47] gizmore|2: has joined #ruby
[01:38:11] brent__: has joined #ruby
[01:39:21] cschneid_: has joined #ruby
[01:41:23] adgtl: has joined #ruby
[01:43:13] Lord_of_Life: has joined #ruby
[01:45:11] redpants: has joined #ruby
[01:45:53] leito: has joined #ruby
[01:47:54] redpants: has joined #ruby
[01:47:54] m13io: has joined #ruby
[01:53:53] guybohner: has joined #ruby
[01:56:07] jusa: has joined #ruby
[02:03:38] charliesome: has joined #ruby
[02:05:21] libastral: has joined #ruby
[02:07:32] yehowyada: has joined #ruby
[02:07:48] yehowyada: has joined #ruby
[02:08:41] soloscshaw: has joined #ruby
[02:14:23] latemus: has joined #ruby
[02:20:23] genpaku: has joined #ruby
[02:22:17] SleepySensei: has joined #ruby
[02:26:33] enterprisey: has joined #ruby
[02:29:54] auzty: has joined #ruby
[02:30:44] AndBobsYourUncle: has joined #ruby
[02:35:25] cam27: has joined #ruby
[02:36:48] houhoulis: has joined #ruby
[02:38:43] SleepySensei: has joined #ruby
[02:42:23] jenrzzz: has joined #ruby
[02:42:23] jenrzzz: has joined #ruby
[02:44:43] Jameser: has joined #ruby
[02:44:58] AndBobsYourUncle: has joined #ruby
[02:47:09] TreyG: has joined #ruby
[02:47:23] milardovich: has joined #ruby
[02:48:25] shortdudey123: has joined #ruby
[02:49:52] cyphase: has joined #ruby
[02:51:24] Coldblackice: has joined #ruby
[02:57:45] PorcoRex: has joined #ruby
[02:58:21] bam__: has joined #ruby
[03:07:10] Silthias: has joined #ruby
[03:07:50] cam27: has joined #ruby
[03:09:26] soloscshaw: has joined #ruby
[03:11:32] electrostat: has joined #ruby
[03:14:35] xall: has joined #ruby
[03:16:08] m13io: has joined #ruby
[03:16:17] bam__: has joined #ruby
[03:16:50] patarr: has joined #ruby
[03:20:35] Rodya_: has joined #ruby
[03:22:04] hugo_dc: has joined #ruby
[03:23:15] Tempesta: has joined #ruby
[03:24:03] bam__: has left #ruby: ()
[03:24:46] astrobunny: has joined #ruby
[03:25:27] pickle_: has joined #ruby
[03:27:03] milardovich: has joined #ruby
[03:34:53] adgtl: has joined #ruby
[03:36:30] bam__: has joined #ruby
[03:36:44] Lord_of_Life: has joined #ruby
[03:36:57] armyriad: has joined #ruby
[03:40:13] __bam: has joined #ruby
[03:40:51] Koshian: has joined #ruby
[03:44:19] hndk: has joined #ruby
[03:46:44] jusa: has joined #ruby
[03:48:17] claw: has joined #ruby
[03:49:14] twistedpixels_: has joined #ruby
[03:52:49] gix: has joined #ruby
[03:53:49] brent__: has joined #ruby
[03:57:17] jusa: has joined #ruby
[03:58:29] cschneid_: has joined #ruby
[04:10:15] soloscshaw: has joined #ruby
[04:10:54] m13io: has joined #ruby
[04:11:52] mim1k: has joined #ruby
[04:15:42] raspado: has joined #ruby
[04:17:21] rakm: has joined #ruby
[04:19:26] pickle_: has joined #ruby
[04:21:16] Rodya_: has joined #ruby
[04:27:44] nofxxx: has joined #ruby
[04:27:51] mooser: has joined #ruby
[04:29:59] ger0: has joined #ruby
[04:32:14] jenrzzz: has joined #ruby
[04:33:29] renchan: has joined #ruby
[04:39:39] __Yiota: has joined #ruby
[04:42:47] dminuoso: apeiros: Oh interesting.
[04:42:49] dminuoso: apeiros: I have never seen that syntax before. :o
[04:42:59] dminuoso: ast>> { **b }
[04:43:00] ruby[bot]: dminuoso: I have parsed your code, the result is at https://eval.in/782175
[04:43:46] dionysus69: has joined #ruby
[04:48:31] m13io: has joined #ruby
[04:49:17] m13io: has joined #ruby
[04:51:07] m13io: has joined #ruby
[04:51:17] brent__: has joined #ruby
[04:52:11] nanoz: has joined #ruby
[04:53:02] m13io: has joined #ruby
[04:53:39] lassemaster: has joined #ruby
[04:57:53] Bock: has joined #ruby
[04:58:18] LACampbell: has joined #ruby
[05:00:19] LACampbell: I want to write a command line app that's cross platform. no gui, runs in the background. what are the options for deploying?
[05:00:43] dminuoso: LACampbell: What does command line mean?
[05:00:53] LACampbell: is this a trick question?
[05:01:05] dminuoso: Does it need any initial interactions? Or is it "start and forget" ?
[05:01:18] LACampbell: right! start and forget
[05:01:36] dminuoso: LACampbell: Is there chance of failure?
[05:01:48] dminuoso: Like, do you need a manager that restarts the service if need be?
[05:02:26] LACampbell: I haven't really thought about that
[05:03:00] LACampbell: well everything can fail
[05:03:01] dminuoso: LACampbell: until you do, https://github.com/thuehlinger/daemons this could be a viable option
[05:04:15] LACampbell: that looks cool
[05:04:37] LACampbell: but my concern is stuff like - interacting with the file system. I realise you have to pick and choose your own extensions
[05:04:50] dminuoso: LACampbell: What do you mean by that?
[05:05:08] LACampbell: well I only ever use ruby on unix like envrionments
[05:05:26] LACampbell: I actually have no idea how it works on windows
[05:07:09] toretore: has joined #ruby
[05:10:17] baweaver: Surprisingly just about the same
[05:10:26] JoshS: has joined #ruby
[05:11:25] soloscshaw: has joined #ruby
[05:11:48] muelleme_: has joined #ruby
[05:17:45] sspreitzer: has joined #ruby
[05:17:45] sspreitzer: has joined #ruby
[05:18:14] brent__: has joined #ruby
[05:18:16] latemus: has joined #ruby
[05:18:17] havenwood: LACampbell: Are you wanting to ensure that folk without Ruby can run your command line app?
[05:19:14] havenwood: LACampbell: Or just worried an appropriate Ruby might not be available?
[05:20:04] havenwood: LACampbell: I couldn't tell if your query was service manager related or if it was about proper Rubies being available to run the app
[05:20:41] havenwood: LACampbell: Anyhow, if you're looking to distribute Ruby with your app take a look at Traveling Ruby: https://phusion.github.io/traveling-ruby/
[05:20:46] havenwood: LACampbell: it's well done
[05:21:59] dminuoso: Listen to havenwood.
[05:22:28] dminuoso: They have not shared their booze cabinet with me, but travelingn ruby is pretty nifty stuff.
[05:22:43] dminuoso: Also I have no clue how these two are related.
[05:22:43] LACampbell: havenwood: all of the above! I will check it out right now
[05:23:21] Rodya_: has joined #ruby
[05:23:38] LACampbell: this looks amazing (assuming it works)
[05:24:30] metoo606: has joined #ruby
[05:24:39] metoo606: any one here
[05:24:42] havenwood: metoo606: yes
[05:24:51] havenwood: ?metasploit metoo606
[05:24:51] ruby[bot]: metoo606: Please join #metasploit for help with it.
[05:25:04] dminuoso: LACampbell: It does, depending on your dependencies it can be a bit of work to set up a bundle though.
[05:25:51] dminuoso: I had some difficulties with nokogiri, nothing major though.
[05:26:15] LACampbell: dminuoso: I'd expect anything with native extensions to be a pain
[05:26:28] metoo606: ok bro i wanna know how handler work in metaspliiy
[05:27:06] havenwood: metoo606: The #metasploit channel is best for Metasploit-related questions. Please hang out or visit us again when you have a Ruby-specific question.
[05:27:58] dminuoso: LACampbell: It's just that the prepackaged versions are not exactly up-to-date, so if you have some dependencies on relatively new packages it means extra work. But it's not a show stopper by any means.
[05:29:22] metoo606: but metasploit create by ruby
[05:30:01] metoo606: bro im ask this q in metasploit channel just now but no reply
[05:30:09] havenwood: metoo606: Ruby is a language. Metasploit is one of millions of programs written in Ruby. It has it's own channel, #metasploit.
[05:30:41] dminuoso: Literally millions!
[05:30:57] havenwood: dminuoso: I guess literally more than that. I'm not sure the unit.
[05:31:32] soloscshaw: has joined #ruby
[05:31:43] havenwood: Maybe just billions?
[05:31:44] pickle_: has joined #ruby
[05:31:47] SleepySensei: has joined #ruby
[05:32:03] dminuoso: We should count them.
[05:32:09] LACampbell: billions seems high
[05:32:11] dminuoso: You start, Ill take over when you reach half.
[05:32:26] havenwood: LACampbell: I have thousands. There are millions of Ruby programmers. I dunno.
[05:32:39] metoo606: bye but will back
[05:32:44] metoo606: has left #ruby: ()
[05:32:49] LACampbell: you've made thousnads of ruby programs? that's quite a lot
[05:32:58] LACampbell: are you counting scripts?
[05:33:10] dminuoso: A "script" *is* a program.
[05:33:20] baweaver: havenwood: Well I've made 10s of thousands
[05:33:40] dminuoso: ACTION points out the success rate of baweaver products
[05:33:56] baweaver: ACTION puts down hammer slowly
[05:34:50] LACampbell: dminuoso: well sure technically. but when I think program, I don't think of some sub 100 line thing I did in a rush
[05:35:01] havenwood: baweaver: I'd bet more. I'm sure you've written over 100k scripts.
[05:35:31] baweaver: If we're counting Nagios and Sensu checks as individual apps that probably boosts it a bit
[05:35:39] dminuoso: LACampbell: It doesn't matter whether we agree on a definition, but that we use the same one when talking about it.
[05:35:43] havenwood: Do we count each statement? Or need it be a file?
[05:36:02] dminuoso: LACampbell: So really the question becomes: What is your own definition of a program?
[05:36:05] baweaver: One contiguous piece of code with a single purpose
[05:36:20] baweaver: with *at least a single purpose
[05:36:23] LACampbell: it's not a real program until it's disappointed someone other than yourself
[05:36:33] dminuoso: LACampbell: A definition based on a line count seems overly arbitrary.
[05:36:44] havenwood: It's a program when it starts dreaming of one day responding to email.
[05:36:48] baweaver: It's crossing the line dminuoso
[05:37:29] dminuoso: baweaver: What is?
[05:37:40] baweaver: line count that is
[05:38:03] baweaver: ACTION rolls out of chair laughing
[05:38:13] dminuoso: I hope you hit your head.
[05:38:57] havenwood: "Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can." ~Zawinski's Law
[05:39:40] dminuoso: You know make me jealous that I dont know LISP. :(
[05:40:14] dminuoso: I should start with clojure or something
[05:40:36] baweaver: Only in LISP can you be a Schemer and a Racketeer and still expect Clojure
[05:41:00] dminuoso: So regarding that axe I mentioned..
[05:41:16] dminuoso: Any chance you will be visiting Germany any time soon?
[05:41:45] electrostat: has joined #ruby
[05:42:40] baweaver: Du hast Axt, ich habe Hammer.
[05:42:41] havenwood: it's fun you can use Clojure STM from JRuby
[05:42:48] cgfbee: has joined #ruby
[05:43:07] baweaver: Gehen Sie vor und machen Sie meinen Tag
[05:43:21] havenwood: <3 Rich Hickey talks
[05:43:42] LACampbell: havenwood: what do you love about them?
[05:43:49] dminuoso: baweaver: Is that from google translate?
[05:44:02] LACampbell: If he didn't have such thick lucious hair no one would listen to him
[05:44:26] havenwood: LACampbell: Clear thinking and reflection upon elegant design.
[05:44:27] baweaver: Nur mein schlechtes deutsches
[05:44:40] dminuoso: I should print that line out and pin it to the wall.
[05:44:56] baweaver: Sehr schlecht deutsch :D
[05:45:15] baweaver: It makes apeiros cry
[05:45:25] baweaver: and scared jhass off for months
[05:45:38] dminuoso: Speaking of which, where did jhass disappear to?
[05:45:42] dminuoso: Haven't seen him around in a few months
[05:45:43] havenwood: LACampbell: I like that they seldom apply only to the language at hand.
[05:46:02] havenwood: dminuoso: He has popped in and out in the last weeks.
[05:46:07] dminuoso: havenwood: Oh cool.
[05:46:13] LACampbell: havenwood: he doesn't get objects, and he wrote a derivative lisp. he's a good talker I guess
[05:46:16] dminuoso: havenwood: Guess his new gig in Berlin must keep him busy
[05:46:19] mooser: has joined #ruby
[05:59:34] EXCHGR: has joined #ruby
[06:01:33] Kilo`byte: has joined #ruby
[06:04:32] SleepySensei: has joined #ruby
[06:08:34] arvindsaik: has joined #ruby
[06:09:06] zapata: has joined #ruby
[06:12:21] mim1k: has joined #ruby
[06:12:32] muelleme_: has joined #ruby
[06:13:18] mooser: has joined #ruby
[06:14:12] Mortomes|Work: has joined #ruby
[06:21:22] pwnd_nsfw: has joined #ruby
[06:26:16] vali: has joined #ruby
[06:27:34] conta: has joined #ruby
[06:32:45] jenrzzz: has joined #ruby
[06:32:45] jenrzzz: has joined #ruby
[06:36:34] padi_: has joined #ruby
[06:36:45] Guest96: has joined #ruby
[06:37:25] osliusar: has joined #ruby
[06:39:46] Ishido: has joined #ruby
[06:39:55] cschneid_: has joined #ruby
[06:43:53] olehsliusar: has joined #ruby
[06:44:23] last_staff: has joined #ruby
[06:49:55] mim1k: has joined #ruby
[06:50:15] jamesaxl: has joined #ruby
[06:50:31] govg: has joined #ruby
[06:59:12] andikr: has joined #ruby
[07:02:02] biberu: has joined #ruby
[07:02:29] mooser: has joined #ruby
[07:02:46] jaruga: has joined #ruby
[07:04:00] twistedpixels_: has joined #ruby
[07:10:22] osliusar: has joined #ruby
[07:11:12] aufi: has joined #ruby
[07:16:00] antgel: has joined #ruby
[07:20:36] jusa: has joined #ruby
[07:21:35] mim1k: has joined #ruby
[07:22:13] mooser: has joined #ruby
[07:25:05] Rodya_: has joined #ruby
[07:25:29] rgr_: has joined #ruby
[07:28:06] govg: has joined #ruby
[07:29:03] mark_66: has joined #ruby
[07:32:18] marr: has joined #ruby
[07:32:19] anisha: has joined #ruby
[07:32:36] lhambley: has joined #ruby
[07:34:09] jenrzzz: has joined #ruby
[07:34:09] jenrzzz: has joined #ruby
[07:36:03] osliusar: has joined #ruby
[07:36:55] helpa: has joined #ruby
[07:37:46] Sembei: has joined #ruby
[07:38:25] Qchmqs: has joined #ruby
[07:40:01] aedorn_: has joined #ruby
[07:40:08] tw1sted: has joined #ruby
[07:40:31] nishiki_: has joined #ruby
[07:41:30] ejnahc_: has joined #ruby
[07:41:47] gigetoo: has joined #ruby
[07:41:59] pavelz: has joined #ruby
[07:42:05] fedruantine: has joined #ruby
[07:44:10] anisha_: has joined #ruby
[07:44:25] sagax_: has joined #ruby
[07:46:24] mooser: has joined #ruby
[07:46:43] olehsliusar: has joined #ruby
[07:46:53] muelleme_: has joined #ruby
[07:47:19] osliusar: has joined #ruby
[07:48:53] osliusar: has joined #ruby
[07:49:54] osliusar: has joined #ruby
[07:52:21] mim1k: has joined #ruby
[07:56:54] Arpanet69: has joined #ruby
[08:01:36] ferr: has joined #ruby
[08:01:59] seggy: has joined #ruby
[08:05:43] mikecmpbll: has joined #ruby
[08:07:16] lel: has joined #ruby
[08:08:28] mooser: has joined #ruby
[08:10:18] burger-time: has joined #ruby
[08:11:22] cgfbee: has joined #ruby
[08:13:10] Silthias1: has joined #ruby
[08:14:39] jenrzzz: has joined #ruby
[08:15:36] Beams: has joined #ruby
[08:16:10] Doow: has joined #ruby
[08:16:22] blackmesa: has joined #ruby
[08:16:48] jsrn_: has joined #ruby
[08:17:33] aufi: has joined #ruby
[08:20:59] rgtk: has joined #ruby
[08:24:08] mjora7: has joined #ruby
[08:26:05] Rodya_: has joined #ruby
[08:26:22] burgestrand: has joined #ruby
[08:26:23] Guest96: has joined #ruby
[08:30:58] avelldiroll: has joined #ruby
[08:32:18] govg: has joined #ruby
[08:34:25] esObe_: has joined #ruby
[08:37:09] osliusar: has joined #ruby
[08:37:21] axel_: has joined #ruby
[08:37:27] cschneid_: has joined #ruby
[08:38:00] naftilos76: has joined #ruby
[08:38:15] dionysus69: has joined #ruby
[08:41:12] aufi: has joined #ruby
[08:41:13] morfin: has joined #ruby
[08:41:54] morfin: if i get emails using imap.uid_search(['UNSEEN'] why can i get EOF?
[08:41:58] pickle_: has joined #ruby
[08:47:00] DARPA: has joined #ruby
[08:51:29] hui: has joined #ruby
[08:52:14] flying: has joined #ruby
[08:55:31] hui: has left #ruby: ()
[08:57:52] binaryplease: has joined #ruby
[08:58:33] pickle_: has joined #ruby
[09:01:22] patarr: has joined #ruby
[09:01:49] xenops: has joined #ruby
[09:02:24] pickle_: has joined #ruby
[09:02:36] _sfiguser: has joined #ruby
[09:06:54] osliusar: has joined #ruby
[09:09:08] nobitanobi: has joined #ruby
[09:11:26] eregon: has joined #ruby
[09:12:36] mim1k_: has joined #ruby
[09:18:38] mim1k: has joined #ruby
[09:18:42] unshadow: has joined #ruby
[09:21:19] jusa: has joined #ruby
[09:23:06] BTRE: has joined #ruby
[09:24:56] al2o3-cr: has joined #ruby
[09:25:05] lxsameer: has joined #ruby
[09:27:02] Rodya_: has joined #ruby
[09:29:00] yogg-saron: has joined #ruby
[09:29:44] sonOfRa: has joined #ruby
[09:32:01] workmad3: has joined #ruby
[09:32:30] yogg-saron: has joined #ruby
[09:35:30] chouhoulis: has joined #ruby
[09:39:09] blackmesa: has joined #ruby
[09:41:04] govg: has joined #ruby
[09:44:14] _bet0n: has joined #ruby
[09:44:15] _bet0n: has left #ruby: ()
[09:44:18] cgfbee: has joined #ruby
[09:44:27] bkxd: has joined #ruby
[09:48:09] _bet0n: has joined #ruby
[09:48:20] nobodyzxc: has joined #ruby
[09:51:10] _bet0n: Hello folks! String manipulation question coming.
[09:51:10] _bet0n: Is it somehow possible to move part of the string matched by regexp to another position in the same string? The position is not fixed but on it's start there is always "- "
[09:52:36] _bet0n: 254Z One Two Three - Not Important
[09:52:36] _bet0n: Regexp matches the "254Z"
[09:52:36] _bet0n: And I want to move it so the result will look like:
[09:52:36] _bet0n: One Two Three - 254Z Not Important
[09:56:43] dionysus69: has joined #ruby
[09:57:08] binaryplease1: has joined #ruby
[09:59:42] Silthias: has joined #ruby
[10:03:18] Silthias1: has joined #ruby
[10:05:34] universa1: gsub(/(\d+Z)(.+) - (.+)/, '\2 - \1 \3') ?!
[10:06:22] charliesome: has joined #ruby
[10:06:29] soloscshaw: has joined #ruby
[10:07:07] pickle_: has joined #ruby
[10:12:40] _bet0n: universa1: Thank you. :) Let me try it :)
[10:13:27] Guest96: has joined #ruby
[10:14:03] bathtub_shark: has joined #ruby
[10:14:09] Hanmac: has joined #ruby
[10:17:25] Silthias: has joined #ruby
[10:17:42] _bet0n: universa1: Just for clarification, you use parenthesis to group parts of the string and then you just change the order right?
[10:19:12] elomatreb: parentheses capture their content, and the backslashes with the number in the second pattern are the contents of the parentheses (capture group) with that index
[10:20:56] _bet0n: Thank you. It works like a charm :)
[10:27:37] Rodya_: has joined #ruby
[10:30:22] HoierM_: has joined #ruby
[10:34:26] psychicist__: has joined #ruby
[10:37:08] Silthias: has joined #ruby
[10:37:19] schickung: has joined #ruby
[10:37:30] GodFather: has joined #ruby
[10:39:38] blackmesa: has joined #ruby
[10:48:12] xco: has joined #ruby
[10:51:57] mradmacher: has joined #ruby
[10:53:13] jamesaxl: has joined #ruby
[10:58:19] Bratishka: has joined #ruby
[10:58:34] aupadhye: has joined #ruby
[10:59:37] Bratishka: The Ruby Way - is good book for beginner with some Python (without OOP) knowledge?
[11:00:17] lamerz: has joined #ruby
[11:01:00] Arpanet69: has joined #ruby
[11:02:00] patarr: has joined #ruby
[11:03:35] lamerz: Hi, I have a question: I'm trying to find out where self.simple.client.symlink() (in particular, this symlink function) comes from in this code: https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/admin/smb/samba_symlink_traversal.rb
[11:05:53] balo: lamerz: based on a quick search https://github.com/rapid7/metasploit-framework/search?utf8=%E2%9C%93&q=%22def+symlink%22&type=
[11:06:04] lamerz: I found it, haha. Not familiar with ruby
[11:06:11] balo: i guess it's lib/rex/proto/smb/client.rb#1786
[11:06:32] lamerz: Now it seems to be throwing out a null terminator after it's done
[11:06:38] balo: you were lucky it was not something dynamically defined :P
[11:06:40] nadir: has joined #ruby
[11:07:06] lamerz: Now I'm trying to figure out how this would work if I were to send it myself
[11:07:18] soloscshaw: has joined #ruby
[11:07:20] lamerz: Not sure if the null terminator is required per the spec, or if the exploit itself calls that
[11:08:36] lamerz: I suppose, maybe, I can reproduce it in python. shrug
[11:09:36] eb0t: has joined #ruby
[11:13:32] muelleme_: has joined #ruby
[11:13:58] GodFather_: has joined #ruby
[11:15:41] petruff: has joined #ruby
[11:16:34] tvw: has joined #ruby
[11:16:42] Verity: has joined #ruby
[11:18:14] lirammr: has joined #ruby
[11:18:19] lirammr: https://github.com/nvquanghuy/texpaste
[11:18:26] lirammr: can I write this in python instead ?
[11:18:30] lirammr: sorry I don't know ruby ?
[11:18:34] lirammr: but can I ?
[11:18:40] lirammr: A vry simple question
[11:19:01] lirammr: I think I will get confused if I learn both python and ruby as they are very similar
[11:19:35] lirammr: is anyone here?
[11:19:48] lirammr: comeon a ruby channel, and so fewe people ? How come
[11:19:58] lirammr: On python there are active users all the time
[11:22:15] jusa: has joined #ruby
[11:22:51] bkxd: has joined #ruby
[11:25:02] BTRE: has joined #ruby
[11:28:22] Rodya_: has joined #ruby
[11:30:07] starmix: well, yes you can
[11:32:14] blackmesa: has joined #ruby
[11:35:34] herwin: how would anyone know the answer to ``Can I'' ?
[11:36:46] olivier__: has joined #ruby
[11:39:23] starmix: maybe #python know the answer
[11:45:31] ldnunes: has joined #ruby
[11:46:30] apikey: has joined #ruby
[11:46:53] bkxd_: has joined #ruby
[11:47:03] Jameser: has joined #ruby
[11:47:09] dasher^0_o: has joined #ruby
[11:49:39] lirammr: so anything that I do in ruby, can be done in python too ?
[11:49:39] lirammr: anythingk ?
[11:50:00] lirammr: most things can't be done in C, as there are no good librarires for some things ?
[11:50:03] lirammr: herwin: starmix
[11:50:08] lirammr: and others too
[11:50:09] apikey: has joined #ruby
[11:50:47] cam27: has joined #ruby
[11:51:57] balo: lirammr: you are confusing two things: being able to do something (you can do anything in C) versus how easy or practical to do it
[11:52:24] sepp2k: has joined #ruby
[11:54:02] balo: anything you can do in ruby it's possible to do it in every other language. but you might need to write more code or implement things differently. python also has several web frameworks which can be a good start (django or flask for example). ask in the python channel for help, really
[11:59:55] synthroid: has joined #ruby
[11:59:56] Silthias1: has joined #ruby
[11:59:57] Ishido: has joined #ruby
[12:00:02] morfin: has joined #ruby
[12:00:18] morfin: is there "proper" JSON library in Ruby
[12:00:39] morfin: default one can't even parse 'null'
[12:00:48] bweston92: has joined #ruby
[12:01:19] morfin: when JSON.parse('null') in JS could do that, and JSON.parse('3.1415') would generate number etc
[12:03:11] blackmesa: has joined #ruby
[12:03:24] millerti: has joined #ruby
[12:03:34] olivier__: has joined #ruby
[12:04:13] SpComb: morfin: JSON.parse() and JSON.load() behave differently. JSON.parse expects a JSON object, whereas JSON.load will also parse scalars
[12:05:03] SpComb: not that the stdlib docs would actually tell you that
[12:07:34] SpComb: JSON.load() uses load_default_options which includes `quirks_mode: true`, and indeed, `JSON.parse('1', quirks_mode: true) => 1`
[12:08:00] SpComb: (the quirks_mode option is also undocumented in the stdlib docs)
[12:08:06] soloscshaw: has joined #ruby
[12:08:56] nobitanobi: has joined #ruby
[12:09:09] BTRE: has joined #ruby
[12:10:53] haypo: has joined #ruby
[12:14:54] govg: has joined #ruby
[12:20:45] Guest96: has joined #ruby
[12:22:49] _sfiguser: has joined #ruby
[12:23:27] dlitvak: has joined #ruby
[12:24:08] Abhijit: has joined #ruby
[12:25:10] olivier__: has joined #ruby
[12:25:18] TorMan[m]: has joined #ruby
[12:26:46] TorMan[m]: has left #ruby: ()
[12:27:39] Jameser: has joined #ruby
[12:29:03] Rodya_: has joined #ruby
[12:31:15] bkxd: has joined #ruby
[12:31:34] t-recx: has joined #ruby
[12:37:24] j2k: has joined #ruby
[12:37:34] xco: can this method be more elegant? https://gist.github.com/siaw23/ae6f6d874058a379a64e0d88c3a90ab9 i feel it’s too verbose
[12:39:15] blackmesa: has joined #ruby
[12:46:49] jphase: has joined #ruby
[12:50:14] houhoulis: has joined #ruby
[12:50:14] chouhoulis: has joined #ruby
[12:54:03] cschneid_: has joined #ruby
[12:55:35] anisha: has joined #ruby
[12:55:54] __urux__: has joined #ruby
[12:55:57] starmix: would that do the job https://gist.github.com/anonymous/b6257729f306a87c7c1ca7c251a8f6ce? Supposing that you can change TYPES
[12:56:35] starmix: altough the usage of a hash here might be overkill
[12:57:00] HoierM: has joined #ruby
[12:57:25] TinkerTyper: has joined #ruby
[12:58:25] mim1k: has joined #ruby
[12:58:30] brent__: has joined #ruby
[12:58:36] hashrocket: has joined #ruby
[13:03:30] ramortegui: has joined #ruby
[13:05:05] starmix: maybe this one then https://gist.github.com/anonymous/8ff8c829f0b0ff2bfc17782480c3e950
[13:06:52] schickung: has joined #ruby
[13:08:50] soloscshaw: has joined #ruby
[13:11:20] am55: has joined #ruby
[13:12:11] haypo: has left #ruby: ()
[13:14:27] jackrandom: has joined #ruby
[13:15:09] millerti: has joined #ruby
[13:15:16] cajone: has joined #ruby
[13:15:36] duckpuppy: has joined #ruby
[13:19:15] rfoust: has joined #ruby
[13:20:16] BTRE: has joined #ruby
[13:20:51] bkxd: has joined #ruby
[13:23:11] jusa: has joined #ruby
[13:24:30] xpitr: has joined #ruby
[13:24:45] beauby: has joined #ruby
[13:25:20] sepp2k: has joined #ruby
[13:27:16] mwlang: has joined #ruby
[13:27:35] xpitr: hi. this is pretty useless but i'm wondering: you can define arbitrary method names, using characters and their combinations not normally allowed. But can you call those methods without using send? eg. define_method(:"()))"){ }
[13:28:31] xpitr: how would you call such method? any way to abuse ruby to allow me calling it directly? :)
[13:29:57] Rodya_: has joined #ruby
[13:32:31] Guest96: has joined #ruby
[13:33:33] DLSteve: has joined #ruby
[13:34:28] valentinul: has joined #ruby
[13:35:07] Rodya_: has joined #ruby
[13:37:16] Ishido: has joined #ruby
[13:38:44] cajone: has joined #ruby
[13:39:03] DARPA: has joined #ruby
[13:40:21] cschneid_: has joined #ruby
[13:40:30] arooni: has joined #ruby
[13:41:13] darix: xpitr: i think send will be the only way
[13:43:01] gnufied: has joined #ruby
[13:43:52] oleo: has joined #ruby
[13:43:52] oleo: has joined #ruby
[13:47:27] jrafanie: has joined #ruby
[13:53:08] __Yiota: has joined #ruby
[13:59:11] mwlang: has joined #ruby
[13:59:14] noark9: has joined #ruby
[14:00:21] xpitr: hmh i was thinking of overriding symbol's to_s and then call it as: :"()))" (which will call send()) but maybe there is something better
[14:00:47] cdg: has joined #ruby
[14:05:46] chrisseaton: Why can't we define finalisers for symbols, now that symbols are subject to garbage collection?
[14:06:48] chrisseaton: And why can't we define finalisers for large (heap allocated) integers?
[14:07:31] VladGh: has joined #ruby
[14:07:37] patarr: has joined #ruby
[14:09:35] soloscshaw: has joined #ruby
[14:11:07] ResidentBiscuit: has joined #ruby
[14:11:13] darix: chrisseaton: why do you need it?
[14:12:10] chrisseaton: I'm doing some interop with native code, and want a native handle to refer back to symbols. I can't use _id2ref, as I want JRuby compatibility. So I build a map of object to handle, and I want to remove the entry in the map when the object is collected.
[14:12:18] chrisseaton: Ah! Maybe I should be use a weak reference instead.
[14:13:02] chrisseaton: Nope, you can't have weak references to symbols. Can't see why that is a rule either.
[14:18:13] VladGh_: has joined #ruby
[14:18:32] GodFather_: has joined #ruby
[14:18:33] GodFather: has joined #ruby
[14:18:33] griff: has joined #ruby
[14:18:39] __Yiota: has joined #ruby
[14:26:40] negatifze: has joined #ruby
[14:31:33] Toledo: has joined #ruby
[14:32:20] Jameser: has joined #ruby
[14:32:32] mikecmpbll: has joined #ruby
[14:34:03] DocWinter: has joined #ruby
[14:35:19] haylon: has joined #ruby
[14:40:06] antoniobeyah: has joined #ruby
[14:41:09] mzo: has joined #ruby
[14:41:48] Guest96: has joined #ruby
[14:42:04] sepp2k: has joined #ruby
[14:48:21] TomyLobo3: has joined #ruby
[14:49:24] theunraveler: has joined #ruby
[14:49:41] babblebre: has joined #ruby
[14:51:10] patarr1: has joined #ruby
[14:52:03] blackmesa: has joined #ruby
[14:52:24] noark9: has joined #ruby
[14:52:51] mikecmpbll: has joined #ruby
[14:53:13] negatifze: has joined #ruby
[14:53:47] raul7821: has joined #ruby
[14:56:48] rippa: has joined #ruby
[14:57:24] skweek: has joined #ruby
[15:01:01] Xiti: has joined #ruby
[15:01:08] mfaeh: has joined #ruby
[15:05:04] blackmes1: has joined #ruby
[15:05:20] ahrs: has joined #ruby
[15:05:40] cschneid_: has joined #ruby
[15:05:51] herwin: finalizers/weakrefs don't work on frozen objects, and symbols are frozen
[15:06:33] herwin: stumbled upon it last week
[15:07:16] boombox_: has joined #ruby
[15:09:01] choke: has joined #ruby
[15:09:13] tomphp: has joined #ruby
[15:09:23] pupsicle: has joined #ruby
[15:10:03] raul782: has joined #ruby
[15:10:20] soloscshaw: has joined #ruby
[15:10:27] beauby: has joined #ruby
[15:12:16] bascht1: has joined #ruby
[15:12:56] GSilva: has joined #ruby
[15:14:29] impermanence: has joined #ruby
[15:14:56] impermanence: Obviously I need to read more on 'next', but I'm confused as to why this never hits the last if statement (see below 'Current'): https://gist.github.com/jonassteinberg1/ddfc2a615392759b55d8d3efdbbe3667
[15:15:35] impermanence: counter is initialized outside the loop statement. that was left out of the gist.
[15:16:10] vali: has joined #ruby
[15:17:00] herwin: https://gist.github.com/qnet-herwin/a2f40cc4bc810c9e3ce1fac82cc4817e
[15:17:03] __urux__: has joined #ruby
[15:17:08] herwin: this is the version with syntax hilighting
[15:17:11] havenwood: impermanence: I'm pretty sure we've answered this exact question days ago.
[15:17:21] herwin: which makes the difference between lines 5 and 6 obvious
[15:17:39] patarr: has joined #ruby
[15:17:42] havenwood: impermanence: Still, `writer != 'writer'`.
[15:18:25] impermanence: I wasn't referring to that.
[15:18:31] impermanence: Maybe I'm confused.
[15:18:42] impermanence: If you look below, I was actually referring to a different Gist.
[15:18:59] impermanence: It was recommended to me to not start a new Gist for every question I have.
[15:19:29] impermanence: So now I just have a line that says "Current", lol.
[15:19:54] impermanence: And yes the open('writer', '') question was answered days ago.
[15:20:19] havenwood: impermanence: Aha. Yeah, it's best to start a new Gist for each question, but only one per question. You can edit a single Gist or add each file pertaining to the question.
[15:20:26] starmix: oh you can create a new file in that gist, could be less confusing I reckon :)
[15:20:32] havenwood: You aren't limited to a single file per Gist.
[15:20:48] impermanence: ah. I get the gist :)
[15:21:05] negatifze: has joined #ruby
[15:22:25] havenwood: impermanence: You'll have to define counter before you check its modulo.
[15:22:49] negatifze: has joined #ruby
[15:23:41] impermanence: havenwood: I left the initialized counter variable out of the Gist. But let me update it because I guess this is the problem.
[15:24:15] heftig: has joined #ruby
[15:24:15] Giphy[m]: has joined #ruby
[15:24:15] M107262[m]: has joined #ruby
[15:24:15] daveyboi[m]: has joined #ruby
[15:24:15] Tagami[m]: has joined #ruby
[15:24:15] KevinMGranger: has joined #ruby
[15:24:15] thulsa_legume[m]: has joined #ruby
[15:24:16] zenspider[m]: has joined #ruby
[15:24:16] jakebriggs[m]: has joined #ruby
[15:24:16] aviraldg: has joined #ruby
[15:24:16] travisr: has joined #ruby
[15:24:16] jonjits[m]: has joined #ruby
[15:24:16] dman[m]: has joined #ruby
[15:24:22] el_ocho[m]: has joined #ruby
[15:24:23] velu_aon[m]: has joined #ruby
[15:24:23] testnick[m]: has joined #ruby
[15:24:44] mim1k: has joined #ruby
[15:25:14] impermanence: havenwood: https://gist.github.com/jonassteinberg1/dfd4f25c0c679f8e4a5e7e3b48ac70e1
[15:25:45] havenwood: impermanence: That will print 1s and 0s. Is that not what you want?
[15:26:10] impermanence: havenwood: why doesn't it stop when counter == 10? It just goes forever, lol.
[15:26:34] apeiros: impermanence: because you skip the last part
[15:26:51] havenwood: impermanence: You're `next`ing if it's even.
[15:26:52] havenwood: impermanence: 10 is even.
[15:26:53] apeiros: next stops executing the loop and starts from the beginning of the loop again
[15:28:48] statelesscode: has joined #ruby
[15:29:12] impermanence: I think I'm nexting if it's odd, right?
[15:30:05] apeiros: then you add 1
[15:30:07] apeiros: then you next
[15:31:22] herwin: is there any specific reason that there is a next in that piece of code?
[15:33:45] impermanence: herwin: I mean I'm just learning so the book I'm reading is going over control flow and they introduce next as well. Each time I write my own code and much of the time its very newb. That's all.
[15:38:03] outreachdan: has joined #ruby
[15:38:49] shinnya: has joined #ruby
[15:41:00] apeiros: impermanence: I think herwin understands that it's newb code. but even when you're new, you probably thought something when you put a piece of code somewhere. and that's what herwin is asking for.
[15:41:14] apeiros: understanding your thought process helps us helping you
[15:44:14] herwin: and you learn a lot more from it than if we'd just fix your code without any explanation
[15:44:20] impermanence: apeiros: heh. k. All I was trying to do was use next to go back to loop beginning on odd.
[15:44:30] impermanence: herwin: totally.
[15:45:21] apeiros: ACTION afk
[15:46:44] negatifze: has joined #ruby
[15:47:47] haylon_: has joined #ruby
[15:49:29] binaryplease: has joined #ruby
[15:49:45] droidburgundy: has joined #ruby
[15:50:14] brent__: has joined #ruby
[15:50:52] synthroid: has joined #ruby
[15:51:20] username1: has joined #ruby
[15:52:19] soloscshaw: has joined #ruby
[15:52:45] juggler: has joined #ruby
[15:54:09] crazyphil: has joined #ruby
[15:56:43] crazyphil: ok, I'm trying to process a stream of json, and my issue is that the timestamp of each group of json is nested in one level, under a top level name that changes (there are about 100 top level names), is there some way I can "wildcard" the top level to extract my nested timestamp field without needing to know the top level field name?
[15:57:32] chouhoulis: has joined #ruby
[15:57:39] baweaver: You have a sample of the JSON you could put in a gist?
[15:57:42] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[15:57:54] crazyphil: yes I do, let me dump some
[15:58:05] chouhoulis: has joined #ruby
[15:58:20] amclain: has joined #ruby
[15:58:46] raspado: has joined #ruby
[16:00:38] crazyphil: https://gist.github.com/anonymous/42bddd8f305ffe7cac949d6c0654ad34
[16:00:47] crazyphil: so I put two sample json items in there
[16:00:52] crazyphil: each with different top level names
[16:01:07] crazyphil: but you can clearly see the nested timestamp field I'm trying to access
[16:01:21] nadir: has joined #ruby
[16:01:42] crazyphil: there are minimally 100 or so different top level field names
[16:02:41] baweaver: my_json.map { |hash| top_level = hash.find { |k,v| v.is_a?(Hash) }; top_level ? top_level['timestamp'] : default_value }
[16:02:57] baweaver: ah, not quite right
[16:03:06] yeticry: has joined #ruby
[16:03:09] GodFather_: has joined #ruby
[16:03:11] crazyphil: that's close, I just wasn't sure how to figure out the top level, without knowing the top level
[16:03:12] GodFather: has joined #ruby
[16:04:18] Arpanet69: has joined #ruby
[16:04:45] baweaver: [{a: {v:3}}, {b: 3}].map { |hash| top_level = hash.find { |(k,v)| v.is_a?(Hash) }; top_level&.last }
[16:04:46] marxarelli: has joined #ruby
[16:04:48] toretore: if you're certain that the keys will always be ['@version', 'type', x] then you can just discard the first two
[16:04:52] baweaver: >> [{a: {v:3}}, {b: 3}].map { |hash| top_level = hash.find { |(k,v)| v.is_a?(Hash) }; top_level&.last }
[16:04:53] ruby[bot]: baweaver: # => [{:v=>3}, nil] (https://eval.in/782587)
[16:05:23] baweaver: &. being the lonely op only usable in Ruby 2.4+
[16:05:32] tercenya: has joined #ruby
[16:05:36] baweaver: otherwise just use a ternary like the previous example to check it
[16:06:10] crazyphil: those will be the only 3 fields every time, type, @version, and some random top level field name
[16:07:27] haylon: has joined #ruby
[16:10:33] crazyphil: thank you baweaver
[16:11:24] DARPA: has joined #ruby
[16:11:32] gusrub: has joined #ruby
[16:13:44] Vingador: has joined #ruby
[16:14:20] tlaxkit: has joined #ruby
[16:15:36] millerti: has joined #ruby
[16:16:33] sandroqz: has joined #ruby
[16:23:29] muelleme_: has joined #ruby
[16:28:58] SeepingN: has joined #ruby
[16:29:44] mwlang: has joined #ruby
[16:30:49] pifon: has joined #ruby
[16:37:59] skweek: has joined #ruby
[16:38:45] teddysmoker: has joined #ruby
[16:45:18] cdg_: has joined #ruby
[16:45:51] gusrub: has joined #ruby
[16:46:04] mim1k: has joined #ruby
[16:52:14] cdg: has joined #ruby
[16:54:35] wkoszek2: has joined #ruby
[16:54:45] droidburgundy: has joined #ruby
[16:58:30] tomphp: has joined #ruby
[16:59:56] pilne: has joined #ruby
[17:00:27] mikecmpbll: has joined #ruby
[17:02:38] synthroid: has joined #ruby
[17:03:01] blackmesa: has joined #ruby
[17:03:48] mim1k: has joined #ruby
[17:03:51] mjuszczak: has joined #ruby
[17:08:10] droidburgundy: has joined #ruby
[17:09:15] pupsicle: has joined #ruby
[17:10:57] morfin: IMAP is so bad
[17:11:00] cdg: has joined #ruby
[17:11:08] morfin: i think only SMTP is worse
[17:12:01] skweek: has joined #ruby
[17:12:15] jaruga: has joined #ruby
[17:17:44] jusa: has joined #ruby
[17:19:58] grymmjack: has joined #ruby
[17:21:09] grymmjack: has joined #ruby
[17:21:28] Hobbyboy: has joined #ruby
[17:25:23] grymmjack: has joined #ruby
[17:26:43] grymmjack: has joined #ruby
[17:28:20] grymmjack: has joined #ruby
[17:29:26] cseder: has joined #ruby
[17:29:35] Alina-malina: has joined #ruby
[17:33:29] Alina-malina: has joined #ruby
[17:33:59] [Butch]: has joined #ruby
[17:34:01] hurricanehrndz: havenwood: Where you ever able to complete a pull request for the zypper support? PS Thank you so much for building that for me last time.
[17:34:28] synthroid: has joined #ruby
[17:34:30] havenwood: hurricanehrndz: You're welcome. Yeah, I just need to get an openSUSE VM up so I can test each Ruby engine.
[17:34:50] havenwood: Maybe I can do that today.
[17:34:56] hurricanehrndz: havenwood: awesome, thank you so much
[17:36:15] gusrub: has joined #ruby
[17:39:18] minimalism: has joined #ruby
[17:40:25] lhambley: has joined #ruby
[17:40:48] __Yiota: has joined #ruby
[17:41:02] synthroid: has joined #ruby
[17:42:08] jaruga: has joined #ruby
[17:44:15] GSilva: has joined #ruby
[17:44:58] olivier__: has joined #ruby
[17:46:19] brent__: has joined #ruby
[17:47:53] wkoszek2: has joined #ruby
[17:48:40] morfin: Net::IMAP after connecting does not update message uids?
[17:52:05] unshadow: has joined #ruby
[17:56:49] Guest96_: has joined #ruby
[17:56:49] olivier__: has joined #ruby
[17:58:29] apeiros: crazyphil: an alternative: `my_json.keys.map { |key| my_json.dig(key, 'timestamp') }` (add .compact if there's keys without a timestamp field)
[17:58:54] wkoszek2: has joined #ruby
[17:59:07] minimalism: has joined #ruby
[17:59:15] davidmichaelkarr: has joined #ruby
[17:59:30] tercenya: has joined #ruby
[18:00:01] cagomez: has joined #ruby
[18:00:30] misto: has joined #ruby
[18:00:55] SleepySensei: has joined #ruby
[18:01:31] cagomez: I'm trying to test a controller in rspec. I can test to see if a variable is assigned using `expect(assigns(:foo)).to not_be_nil` or similar. but how do I test the instance variables for `foo`? like `expect(:foo.somevar).to eq(1)`
[18:03:25] nobitanobi: has joined #ruby
[18:03:33] apeiros: baweaver just informed me that some top level values are not hashes. in that case:
[18:03:34] apeiros: data.values.grep(Hash).map { |v| v['timestamp'] }
[18:06:30] dionysus69: has joined #ruby
[18:06:56] tomphp: has joined #ruby
[18:11:05] dionysus69: has joined #ruby
[18:11:11] pskosinski: Anyone experienced that issue with pronto? https://paste.fedoraproject.org/paste/LgYlS7Fww0QG4RkzfKyUkF5M1UNdIGYhyRLivL9gydE=
[18:18:48] brent__: has joined #ruby
[18:18:49] Guest26966: has joined #ruby
[18:19:23] wkoszek2: has joined #ruby
[18:19:36] unshadow_: has joined #ruby
[18:19:50] patarr: has joined #ruby
[18:24:23] rgtk: has joined #ruby
[18:25:38] jrafanie: has joined #ruby
[18:28:53] patarr: has joined #ruby
[18:29:48] mim1k: has joined #ruby
[18:30:18] synthroid: has joined #ruby
[18:30:40] brent__: has joined #ruby
[18:30:40] tomphp: has joined #ruby
[18:30:43] mustmodify: has joined #ruby
[18:30:48] cdg_: has joined #ruby
[18:31:09] mustmodify: Fun fact of the day. I just wrote a method `seems_somewhat_legit?(params)`
[18:31:40] gusrub: has joined #ruby
[18:31:54] t-recx: can you more or less use it confidently?
[18:32:17] mustmodify: I mean, it solves the current issue. :)
[18:32:24] Papierkorb: 30% of the times, it works 100% of the times
[18:32:55] mustmodify: the next step would be to use captcha, but the users would not react well to that. So a basic check will have to do. :)
[18:33:25] Papierkorb: mustmodify: Although the method name does sound like it does some kind of unsufficient input validation..
[18:33:37] synthroid: has joined #ruby
[18:33:42] tomphp: has joined #ruby
[18:35:11] patarr: has joined #ruby
[18:35:18] yogg-saron: has joined #ruby
[18:36:29] postmodern: has joined #ruby
[18:36:55] whathappens: has joined #ruby
[18:37:36] rakm: has joined #ruby
[18:42:53] brent__: has joined #ruby
[18:49:03] mjuszczak: has joined #ruby
[18:49:54] jackrandom: has joined #ruby
[18:50:53] d10n-work: has joined #ruby
[18:51:12] jaruga: has joined #ruby
[18:52:06] rakm: has joined #ruby
[18:55:40] KCmetro: has joined #ruby
[18:57:30] olivier__: has joined #ruby
[18:57:32] cfec0b8d: has joined #ruby
[18:59:24] tercenya: has joined #ruby
[19:01:49] gusrub: has joined #ruby
[19:04:08] rakm: has joined #ruby
[19:08:00] unshadow: has joined #ruby
[19:09:30] synthroid: has joined #ruby
[19:12:10] patarr: has joined #ruby
[19:13:05] LACampbell: has joined #ruby
[19:14:59] qba73: has joined #ruby
[19:16:55] qba73: has joined #ruby
[19:19:57] Cohedrin: has joined #ruby
[19:20:17] phansch: has joined #ruby
[19:21:23] GodFather: has joined #ruby
[19:21:38] mjuhl: has joined #ruby
[19:22:06] patarr: has joined #ruby
[19:22:08] gix: has joined #ruby
[19:24:24] ski7777: has joined #ruby
[19:24:29] quuxman: has left #ruby: ()
[19:24:35] skweek: has joined #ruby
[19:25:37] olivier__: has joined #ruby
[19:26:16] mim1k: has joined #ruby
[19:29:17] pupsicle: has joined #ruby
[19:29:35] jenrzzz: has joined #ruby
[19:29:35] jenrzzz: has joined #ruby
[19:34:02] A124: has joined #ruby
[19:37:24] nobitanobi: has joined #ruby
[19:38:08] JoshS: has joined #ruby
[19:38:21] lxsameer: has joined #ruby
[19:43:15] patarr: has joined #ruby
[19:43:25] chouhoul_: has joined #ruby
[19:43:26] soloscshaw: has joined #ruby
[19:44:50] chouhoul_: has joined #ruby
[19:45:40] olivier__: has joined #ruby
[19:45:41] KCmetro_: has joined #ruby
[19:46:52] jolamb: has joined #ruby
[19:48:21] jenrzzz: has joined #ruby
[19:50:26] jolamb: with ruby-mri, can I specify a line of code to execute before the programfile? e.g. I have a script that's not using bundler, and which has a weird json requirement, so I'd like to run `gem 'json'
[19:50:46] jolamb: `gem 'json', '< 2.0'` that is
[19:51:45] dhollinger: has joined #ruby
[19:52:33] skweek: has joined #ruby
[19:55:46] blackmesa: has joined #ruby
[19:56:12] mim1k: has joined #ruby
[19:58:53] jhass: you could just init a Gemfile somewhere and bundle exec ruby it
[19:59:20] patr0clus: has joined #ruby
[20:00:42] gusrub: has joined #ruby
[20:00:53] jolamb: jhass: huh, good point
[20:01:52] quobo: has joined #ruby
[20:02:34] patarr: has joined #ruby
[20:08:02] mjuszczak: has joined #ruby
[20:11:02] jenrzzz: has joined #ruby
[20:15:40] mim1k: has joined #ruby
[20:16:38] synthroid: has joined #ruby
[20:19:13] Chymaster: has joined #ruby
[20:20:55] haylon_: has joined #ruby
[20:22:14] Chymaster: has left #ruby: ()
[20:23:21] jenrzzz: has joined #ruby
[20:23:21] jenrzzz: has joined #ruby
[20:23:48] rakm: has joined #ruby
[20:25:06] patarr: has joined #ruby
[20:27:47] mjuszczak: has joined #ruby
[20:28:54] rgr: has joined #ruby
[20:29:35] cdg: has joined #ruby
[20:32:02] synthroid: has joined #ruby
[20:32:23] jenrzzz: has joined #ruby
[20:32:49] dhollinger: has joined #ruby
[20:33:52] olivier__: has joined #ruby
[20:34:19] tercenya: has joined #ruby
[20:38:53] Verity: has joined #ruby
[20:38:59] Verity: does anyone know how to get packetfu working on windows?
[20:39:02] Verity: or should I switch to linux
[20:39:27] gusrub_: has joined #ruby
[20:40:50] havenwood: Verity: If you're on Windows 10 the Windows Subsystem for Linux works great with Ruby.
[20:41:14] Verity: I get all errors
[20:41:23] havenwood: Verity: I just walked someone through installing ruby-install/chruby then Rails on Win 10 and it went without a hitch.
[20:41:23] Verity: trying to install with gem
[20:41:35] Verity: ruby itself is ok but this gem is having issues
[20:42:06] havenwood: I'd like to say stick with Windows, since changing OSes can be jarring, but you'll have a better time on Linux or something unixy.
[20:42:25] jusa: has joined #ruby
[20:42:26] Verity: would it be as simple as gem install packetfu
[20:42:31] Verity: several checks fail on that
[20:42:47] Verity: I don't understand all of the errors
[20:43:01] gusrub: has joined #ruby
[20:43:02] Verity: I think I'll switch to opensuse
[20:44:36] soloscshaw: has joined #ruby
[20:45:12] havenwood: Verity: Use the latest master of ruby-install for openSUSE support. :-)
[20:45:56] havenwood: Verity: openSUSE support is minutes old: https://github.com/postmodern/ruby-install/commit/976baf1409e29a3e303d6da91c905bdf45e1b99c
[20:46:15] havenwood: hurricanehrndz: ^
[20:46:31] havenwood: hurricanehrndz: Thanks for helping me test. Tweaked the packages so each engine works and merged. :-)
[20:53:08] Verity: havenwood, any idea on a fix? I'd like to stick with windows if its possible but I'll switch if I have to. http://pastebin.com/WnJ0p3gq
[20:53:08] ruby[bot]: Verity: as I told you already, please use https://gist.github.com
[20:54:30] Verity: I think Im making protgress
[20:54:34] Verity: need a developer kit
[20:54:56] havenwood: Verity: It looks like you already have Dev Kit installed: "Temporarily enhancing PATH to include DevKit..."
[20:55:19] Verity: thats the ruby dev kit, I thionk I also needed the winpcap dev kit
[20:55:21] Verity: got it!!!!
[20:55:25] Verity: going to try packetfu again
[20:55:30] havenwood: Verity: aha
[20:55:38] Verity: it worked!!!!!
[20:56:02] Verity: now I just need to explain to my professor that I wont be using C# or C++, but instead ruby for this
[20:56:12] rakm_: has joined #ruby
[20:57:11] Eindoofus: has joined #ruby
[20:58:09] Eindoofus: hi, is it a bad idea to learn Ruby with this book? i should mention i already have an intermediate skills in Java:
[20:58:11] Eindoofus: https://www.amazon.com/Ruby-Way-Programming-Addison-Wesley-Professional/dp/0321714636
[20:58:59] tomphp: has joined #ruby
[21:01:33] baweaver: eindoofus see the channel topic
[21:01:38] baweaver: I put a book list up there :)
[21:01:50] baweaver: Ruby Way is a tome style, more for reference
[21:02:13] baweaver: you probably want something more like Eloquent Ruby which is entirely geared towards teaching programmers how to ruby like ruby people.
[21:02:24] Eindoofus: thanks baweaver
[21:03:42] Eindoofus: baweaver, looks like Eloquent Ruby is from 2011, is that ok? not sure how much has been added since
[21:03:58] baweaver: Yeah, it's still fine
[21:04:19] baweaver: There are some features added since then, but that book is more for the style of it than the fine details of syntax and new bits
[21:04:35] baweaver: really as long as you're reading against Ruby 2.x+ you'll be fine.
[21:07:35] cagomez: has joined #ruby
[21:08:20] aryaching: has joined #ruby
[21:09:12] duderonomy: has joined #ruby
[21:09:50] olivier__: has joined #ruby
[21:11:03] cam27: has joined #ruby
[21:14:14] __Yiota: has joined #ruby
[21:14:33] cagomez: def some_method(a, b, c=25); end;
[21:14:35] bernd27: has joined #ruby
[21:14:59] cagomez: if I have ^, can I call `some_method(a: 1, b:2)` and have c be the default value?
[21:15:31] baweaver: Look up kwargs in ruby
[21:15:49] baweaver: It'd actually be: method(a:,b:,c:25)
[21:16:41] JusticeFries: has joined #ruby
[21:19:53] Rodya_: has joined #ruby
[21:20:03] workmad3: has joined #ruby
[21:20:56] KCmetro: has joined #ruby
[21:23:22] chouhoulis: has joined #ruby
[21:23:53] patarr: has joined #ruby
[21:25:26] KCmetro_: has joined #ruby
[21:26:05] bernd9000: has joined #ruby
[21:28:39] tercenya: has joined #ruby
[21:30:30] dopamean_: has joined #ruby
[21:32:41] impermanence: has joined #ruby
[21:34:59] rgtk: has joined #ruby
[21:36:32] rizonz: I have some thing strange, in an if
[21:36:36] bsartek: has joined #ruby
[21:36:49] rizonz: damn where does it want a paste again ?
[21:36:54] havenwood: rizonz: gist.github.com
[21:36:58] patarr: has joined #ruby
[21:37:09] rizonz: https://gist.github.com/Yamakasi/71a9b3e563d596c72b52e8ed67d52dcc
[21:37:16] rizonz: that, how can that happen
[21:38:55] Immune: has joined #ruby
[21:39:28] rgr_: has joined #ruby
[21:40:29] quobo: has joined #ruby
[21:40:47] rizonz: is than an ruby issue ?
[21:44:58] soloscshaw: has joined #ruby
[21:48:26] patarr: has joined #ruby
[21:49:29] rizonz: havenwood: do you have a clue ?
[21:49:53] hxegon: rizonz: have you tried making the <% a <%= on line 3?
[21:50:25] mjuszczak: has joined #ruby
[21:50:28] rizonz: hxegon: yes does error
[21:50:53] baweaver: Why the - in there?
[21:51:23] rizonz: baweaver: to test if it did matter :)
[21:51:51] rizonz: I'm always fair
[21:52:22] baweaver: Try making a new block of `if true` and see if that behaves
[21:52:34] havenwood: rizonz: What is?: @host.architecture.class
[21:52:41] havenwood: Is it a String?
[21:52:47] baweaver: may also have a newline or space in it
[21:53:02] havenwood: rizonz: p @host.architecture
[21:53:05] rizonz: let me check if I can parse that
[21:53:39] baweaver: essentially object.tap { |v| puts v.inspect }
[21:53:46] havenwood: rizonz: https://ruby-doc.org/core/Kernel.html#method-i-p
[21:54:05] havenwood: rizonz: For debugging, rather than: puts #host.architecture.inspect # like baweaver said
[21:54:19] rizonz: I get Architecture out of that class
[21:54:35] baweaver: well, was more of saying that that was what `p` was doing behind the scenes
[21:55:36] rizonz: p gives me the same
[21:56:52] havenwood: rizonz: And what is?: @host.architecture.to_s
[21:57:27] patarr: has joined #ruby
[21:57:28] havenwood: rizonz: Take a look in Pry. You might want to `ls @host.architecture` and try various methods to see what the object has to say for itself.
[21:57:35] ruby[bot]: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[21:57:45] rizonz: havenwood: same, but there is a space behind it
[21:59:14] baweaver: cookie is mine today havenwood
[21:59:24] rizonz: found it, https://groups.google.com/forum/#!topic/foreman-users/Dz1k4CkdrSc
[21:59:30] havenwood: ?cookie baweaver
[21:59:30] ruby[bot]: baweaver: here's your cookie: 🍪
[21:59:45] rizonz: ACTION cookies havenwood baweaver 
[22:01:49] lele: has joined #ruby
[22:03:14] rizonz: guys I like to be hugged now like doggies do
[22:04:22] rizonz: ACTION tries to get his cookies back
[22:05:07] dlitvak: has joined #ruby
[22:05:09] mjuszczak: has joined #ruby
[22:05:54] mjuszczak: has joined #ruby
[22:06:27] brent__: has joined #ruby
[22:07:54] tvw: has joined #ruby
[22:09:17] KCmetro: has joined #ruby
[22:14:02] olivier__: has joined #ruby
[22:14:07] rgtk: has joined #ruby
[22:14:21] brent__: has joined #ruby
[22:20:06] patarr: has joined #ruby
[22:23:26] mjuszczak: has joined #ruby
[22:24:30] patr0clus: has joined #ruby
[22:29:35] KCmetro: has joined #ruby
[22:31:56] volty: has joined #ruby
[22:32:35] mjuszczak: has joined #ruby
[22:36:14] KCmetro: has joined #ruby
[22:37:41] GSilva: has joined #ruby
[22:40:22] patarr: has joined #ruby
[22:43:15] jusa: has joined #ruby
[22:45:18] mices: has joined #ruby
[22:45:47] soloscshaw: has joined #ruby
[22:50:12] bronson: has joined #ruby
[22:58:31] millerti: has joined #ruby
[23:01:02] olivier__: has joined #ruby
[23:01:18] Doow_: has joined #ruby
[23:02:16] blackmes1: has joined #ruby
[23:03:09] mices: how do i get a hash key from the known value
[23:03:09] gains: has joined #ruby
[23:05:36] gr33n7007h: mices: h.invert[v]
[23:07:40] gr33n7007h: i forget about Hash#key
[23:08:33] cagomez: I have an array of structs . what's a good way to search through my array for a struct with a specific attribute equaling a value i'm looking for?
[23:09:03] Radar: cagomez: Do you have an example of what these structs look like?
[23:10:06] cagomez: Radar: `DateAttr = Struct.new (:day, :foo)`. So I have an array of [DateAttr, DateAttr] and I need to find one such that DateAttr.foo = somevalue
[23:10:58] Cohedrin: has joined #ruby
[23:11:03] Radar: cagomez: To get the value of `foo` you'd just do DateAttr#foo, so if you have an array of DateAttrs...
[23:11:05] SeepingN: DateAttr.select {|x| x.foo == "value"} ?
[23:11:10] Radar: SeepingN: close
[23:11:31] whiteline: has joined #ruby
[23:11:32] SeepingN: will there only be 1?
[23:11:37] cagomez: yes SeepingN
[23:11:49] Radar: DateAttr is the struct, not the array
[23:11:57] dcunit3d: has joined #ruby
[23:12:01] Radar: >> DateAttr = Struct.new(:day, :foo); attrs = [DateAttr.new(1,2), DateAttr.new(3,4)]; attrs.detect { |a| a.foo == 4 }
[23:12:02] ruby[bot]: Radar: # => #<struct DateAttr day=3, foo=4> (https://eval.in/782744)
[23:12:30] SeepingN: er, yeah that
[23:13:58] gr33n7007h: neat thing with find/detect you can actually pass it a proc too
[23:15:19] patarr: has joined #ruby
[23:15:45] cschneid_: has joined #ruby
[23:18:56] brent__: has joined #ruby
[23:22:24] rgtk: has joined #ruby
[23:23:14] mjuszczak: has joined #ruby
[23:23:59] mjuszczak: has joined #ruby
[23:29:30] jenrzzz: has joined #ruby
[23:29:38] griff: has joined #ruby
[23:32:42] nowhereman: has joined #ruby
[23:33:57] beauby: has joined #ruby
[23:35:41] olivier__: has joined #ruby
[23:38:20] GSilva: has joined #ruby
[23:40:16] kith: has joined #ruby
[23:44:23] jarred_: has joined #ruby
[23:46:34] soloscshaw: has joined #ruby
[23:48:43] Hobbyboy: has joined #ruby
[23:52:42] jhack: has joined #ruby
[23:56:23] cagomez: has joined #ruby
[23:56:28] Vile`: has joined #ruby
[23:56:41] cschneid_: has joined #ruby
[23:57:40] cagomez: has joined #ruby
[23:58:17] cagomez: has joined #ruby
[23:59:53] friday: has joined #ruby