« Back to channel list

#ruby - 11 May 2016

« Back 1 day Forward 1 day »
[00:00:00] Cork: has joined #ruby
[00:01:47] chris349: Basically the ImageMagick package of my OS was updated and now the Ruby code does not run because it uses the rmagic gem.
[00:02:08] baweaver: try an uninstall/reinstall
[00:02:16] baweaver: I'd have to look for the force reinstall
[00:02:50] baweaver: http://stackoverflow.com/questions/12188833/how-to-reinstall-a-gem-using-bundler
[00:02:54] baweaver: that looks relevant
[00:04:25] chris349: Yea it seems to think its smarter than me, deleting the files and trying to bundle install again
[00:04:52] chris349: ... but gem uninstall didnt work
[00:05:08] yqt: has joined #ruby
[00:05:24] chris349: ... and gem update is reinstalling EVERYTHING. I hope it doesnt break something else
[00:05:37] baweaver: chris349 revert your Gemfile.lock
[00:05:52] baweaver: probably in some subtle annoying way you won't notice for a month
[00:06:49] deadhound: has joined #ruby
[00:06:53] RegulationD: has joined #ruby
[00:10:43] postmodern: how would you define a `hash` method for a tuple-like object?
[00:10:58] idefine: has joined #ruby
[00:11:30] CausaMortis: has joined #ruby
[00:13:48] bruno-: has joined #ruby
[00:15:41] ramfjord: has joined #ruby
[00:20:31] chris349: Its not regenerating all the files of the gem. Is there any command specifically to force reinstall one gem?
[00:25:23] ekinmur: has joined #ruby
[00:27:25] deadhound1: has joined #ruby
[00:27:26] tax: has joined #ruby
[00:29:29] jaguarmagenta: has joined #ruby
[00:29:37] deadhound: has joined #ruby
[00:29:55] tax: has joined #ruby
[00:30:14] Yiota: has joined #ruby
[00:30:22] electrostat: has joined #ruby
[00:30:29] pawnbox: has joined #ruby
[00:31:13] jhn: has joined #ruby
[00:31:53] chris349: I think bundle install is failing but there is no error. At the end it says Please report any bugs is that normal?
[00:33:51] skolman: has joined #ruby
[00:34:18] tax: has joined #ruby
[00:35:33] Ebok: has joined #ruby
[00:36:21] weemsledeux: has joined #ruby
[00:41:30] statelesscode: has joined #ruby
[00:41:57] crystal77: has joined #ruby
[00:42:12] jdawgaz: has joined #ruby
[00:42:59] idefine: has joined #ruby
[00:43:15] jobewan: has joined #ruby
[00:43:22] kareeoleez: has joined #ruby
[00:43:27] griffindy: has joined #ruby
[00:43:56] bruno-: has joined #ruby
[00:44:25] JoshGlzBrk: has joined #ruby
[00:45:39] astrobunny: has joined #ruby
[00:47:04] Ropeney: has joined #ruby
[00:48:35] crdpink: has joined #ruby
[00:53:35] bruno-: has joined #ruby
[00:54:46] whathappens: has joined #ruby
[00:55:55] ruby[bot]: -qq |2701!*@* *!*@gateway/web/irccloud.com/x-tkorgsukilkydniy
[00:58:44] idefine: has joined #ruby
[01:00:45] horaceheaven: has joined #ruby
[01:01:33] nerium: has joined #ruby
[01:03:17] Radar: ?gist chris349
[01:03:17] ruby[bot]: chris349: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[01:03:20] Radar: Show us the full output pleaes
[01:05:04] deadhound: has joined #ruby
[01:05:33] deadhound1: has joined #ruby
[01:06:32] jaguarmagenta: has joined #ruby
[01:08:12] Devalo: has joined #ruby
[01:08:18] quakephil_: has joined #ruby
[01:08:19] jancel: has joined #ruby
[01:09:12] stardiviner: has joined #ruby
[01:09:26] horaceheaven: has joined #ruby
[01:09:55] jenrzzz: has joined #ruby
[01:09:55] jenrzzz: has joined #ruby
[01:10:00] dvinciguerra: has joined #ruby
[01:10:34] sp4rrow: has joined #ruby
[01:11:12] kareeoleez: has joined #ruby
[01:12:23] whathapp_: has joined #ruby
[01:13:24] Musashi007: has joined #ruby
[01:13:29] rbennacer: has joined #ruby
[01:13:47] |ifei5g00d: has joined #ruby
[01:14:26] horaceheaven: has joined #ruby
[01:14:34] deadhound: has joined #ruby
[01:14:55] CloCkWeRX1: has joined #ruby
[01:19:01] idefine: has joined #ruby
[01:20:39] dopamean1: has joined #ruby
[01:20:39] freerobby: has joined #ruby
[01:21:16] horaceheaven: has joined #ruby
[01:22:23] elifoster: has joined #ruby
[01:23:26] horaceheaven: has joined #ruby
[01:26:22] bronson: has joined #ruby
[01:26:35] djbkd: has joined #ruby
[01:27:04] cdg: has joined #ruby
[01:27:27] horaceheaven: has joined #ruby
[01:29:42] kareeoleez: has joined #ruby
[01:29:56] |ifei5g00d: has joined #ruby
[01:31:30] horaceheaven: has joined #ruby
[01:31:46] Trynemjoel: has joined #ruby
[01:31:47] arescorpio: has joined #ruby
[01:35:06] |ifei5g00d: has joined #ruby
[01:35:09] electrostat: has joined #ruby
[01:36:36] whathappens: has joined #ruby
[01:38:59] kareeoleez: has joined #ruby
[01:39:00] horaceheaven: has joined #ruby
[01:39:27] karapetyan: has joined #ruby
[01:41:30] raeoks: has joined #ruby
[01:47:00] gregf: has joined #ruby
[01:50:10] chipotle: has joined #ruby
[01:52:48] idefine: has joined #ruby
[01:53:39] sharkman: has joined #ruby
[01:53:52] chopin: has joined #ruby
[01:54:13] sharkman: im trying to make a ruby program that talks to an API. and the API is giving me a feed that has a "last" variable with times that look like this 72392666
[01:54:29] sharkman: any idea what time that is? how i can translate it into something human readable
[01:55:40] ekinmur: has joined #ruby
[01:56:11] tatsuo: has joined #ruby
[01:57:11] kareeoleez: has joined #ruby
[01:57:24] workmad3: has joined #ruby
[01:57:31] Trynemjoel: has joined #ruby
[01:59:20] tatsuo_: has joined #ruby
[02:00:45] Radar: sharkman: is that an actual example or did you make itup
[02:00:48] jdawgaz: has joined #ruby
[02:00:49] Ebok: has joined #ruby
[02:00:56] sharkman: that number is real
[02:01:13] sharkman: i wonder if its time from a totally arbitrary clock they have and i just have to store the number they give me
[02:01:34] Radar: Do you have some other representation of that time on a non-API version?
[02:02:39] Radar: Does the "last" value increase on subsequent requests, or stay the same?
[02:03:40] Radar: sharkman: ^
[02:03:45] sharkman: it increases on each request
[02:03:59] sharkman: https://www.pinnaclesports.com/en/api/manual
[02:04:02] sharkman: its the last parameter
[02:04:25] sharkman: well, its given to the client under the variable last, and its supposed to be sent to the API with the variable name "since"
[02:05:40] Radar: What a weird attribute.
[02:06:40] Radar: It's in no format that I can recognise.
[02:06:41] sharkman: yeah. their documentation sucks. it just says to use the number received on the most recent request for LAST the next time you send a request under the SINCE parameter
[02:06:49] Trynemjoel: has joined #ruby
[02:10:50] LoneHermit: has joined #ruby
[02:15:12] kareeoleez: has joined #ruby
[02:16:14] zacstewart: has joined #ruby
[02:18:15] banister: has joined #ruby
[02:18:50] quakephil: has joined #ruby
[02:19:15] horaceheaven: has joined #ruby
[02:19:54] nando293921: has joined #ruby
[02:20:48] jdawgaz: has joined #ruby
[02:24:36] idefine: has joined #ruby
[02:24:53] danielpclark: has joined #ruby
[02:24:56] astrobunny: has joined #ruby
[02:28:35] rbennacer: has joined #ruby
[02:32:41] gregf: has joined #ruby
[02:33:20] kareeoleez: has joined #ruby
[02:34:45] blackgoat: has joined #ruby
[02:38:59] tAn: has joined #ruby
[02:40:11] bougyman: darix: woohoo!
[02:40:23] bougyman: got my full tree recursion down from 7.0 seconds to 3.0
[02:40:36] bougyman: this is awesome.
[02:40:51] bougyman: all those tcp setups/teardowns/binds added a ton of overhead.
[02:41:20] repel: has joined #ruby
[02:41:34] kkeuning: has joined #ruby
[02:41:48] jdawgaz: has joined #ruby
[02:42:02] postmodern: has joined #ruby
[02:42:33] kareeoleez: has joined #ruby
[02:43:19] kkeuning: has joined #ruby
[02:44:25] Yzguy: has joined #ruby
[02:50:15] jancel: has joined #ruby
[02:55:19] gregf: has joined #ruby
[02:57:52] karmatr0n: has joined #ruby
[02:59:13] SilverKey: has joined #ruby
[03:00:48] kareeoleez: has joined #ruby
[03:02:29] pawnbox: has joined #ruby
[03:04:32] jdawgaz: has joined #ruby
[03:06:03] noService: has joined #ruby
[03:07:53] zast: has joined #ruby
[03:09:46] Devalo: has joined #ruby
[03:10:06] zacstewart: has joined #ruby
[03:10:51] Xaitec: has joined #ruby
[03:11:26] zotherstupidguy: has joined #ruby
[03:12:54] braincrash: has joined #ruby
[03:13:09] whathappens: has joined #ruby
[03:16:34] karmatr0n: has joined #ruby
[03:17:33] GriffinHeart: has joined #ruby
[03:18:51] kareeoleez: has joined #ruby
[03:22:30] gix: has joined #ruby
[03:26:43] dh64: has joined #ruby
[03:27:42] diegoaguilar: has joined #ruby
[03:29:48] Eiam_: has joined #ruby
[03:31:42] wannabelife: has joined #ruby
[03:32:44] d0lph1n98: has joined #ruby
[03:33:09] Yiota: has joined #ruby
[03:34:48] bazzy: Is there a way to programatically correlate the following pattern:
[03:34:51] bazzy: c.user = config["user"]
[03:34:51] bazzy: c.realname = config["realname"]
[03:34:51] bazzy: c.server = config["server"]
[03:35:03] bazzy: we see the string is the same as the variable ...
[03:35:12] bazzy: I'd like to, if possible, not have to manually correlate the data
[03:35:19] danielpclark: has joined #ruby
[03:35:22] Radar: is it always the same?
[03:35:39] bazzy: if it wasn't, I don't think I could consider this as a solution ..
[03:35:55] bazzy: unfortunately, I can only say, "for now, yes"
[03:36:17] bazzy: It should be that way for a very long time AFAIK
[03:36:37] Radar: If it's a perfect 1-to-1 match then you can do this
[03:36:37] Radar: config.each { |k,v| c.send("#{k}=", v) }
[03:36:46] Radar: But if it's not, then you'll have to specify them manually as you have been doing.
[03:37:11] kareeoleez: has joined #ruby
[03:37:48] bazzy: it looks like my safest option is to stay manual .. I am noticing some discrepancies in the assignments
[03:38:38] bazzy: hm.. actually .. I see a way to separate the "discrepancy" options so that I can group the non-discrepancies into their own hash .. and be able to reap the benefits of automatic assignment there
[03:41:28] Radar: I think it would look too weird having some that are auto assigned and some that are manually assigned
[03:41:44] bazzy: no but it's actually categorical
[03:42:19] bazzy: I was mixing in a config.yml "subsection" options that are specific to a framework I'm using and options that are sort "extended" and only specific to me and my app
[03:42:32] hahuang61: has joined #ruby
[03:42:38] bazzy: I can dedicate a "sub-section" hash solely to the framework config options .. that will be the 1:1 mapped options for the framework
[03:43:33] bazzy: I see what you're saying .. but .. who wants to add 50+ config stanzas manually when I might not have to bother .. and if the proposed solution actually helps categorize my config options too?
[03:44:12] bazzy: I'm actually really interested in your opinion since I consider you a professional
[03:44:49] Radar: bazzy: I think this is one of those things where I would have to tinker around with it to determine what the right approach is.
[03:45:34] bazzy: I think it's safe to say that adding the "category" is the right step to take irregardless of whether I manually set the config variables or not :3
[03:46:13] bazzy: so Im definitely going to do that 1st
[03:47:31] joelwallis: has joined #ruby
[03:48:15] lxsameer: has joined #ruby
[03:48:46] JoshGlzBrk: has joined #ruby
[03:48:52] joelwallis: Hi. I'm working on a Rails app where I need to write a migration file for it. I'm using the add_column to add an integer column to postgres but I don't know how to declare it as an integer
[03:49:08] joelwallis: And since I'm new to Ruby I don't even know where to lookup for documentation
[03:49:32] kareeoleez: has joined #ruby
[03:49:59] Radar: ?rails joelwallis
[03:49:59] ruby[bot]: joelwallis: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[03:50:45] joelwallis: roger! ty for pointing out the correct channel
[03:50:49] joneshf-laptop: has joined #ruby
[03:52:31] kareeole_: has joined #ruby
[03:53:55] hk238: has joined #ruby
[03:55:09] fedexo: has joined #ruby
[03:56:25] LoneHerm_: has joined #ruby
[03:58:23] tmtwd: has joined #ruby
[03:58:27] CloCkWeRX: has joined #ruby
[04:04:00] GriffinHeart: has joined #ruby
[04:08:25] RegulationD: has joined #ruby
[04:08:33] Devalo: has joined #ruby
[04:10:31] moei: has joined #ruby
[04:10:45] noService: has joined #ruby
[04:16:49] droptone: Question: I'm attemping to search an array of hashes to see if specific elemtns within a given hash match any string within an array, as seen here: https://gist.github.com/anonymous/f30f757084bb961965f2093d40f5eda8
[04:20:14] bazzy: Radar, continuing our last discussion, would a string like "ssl.thing" also translate OK?
[04:20:23] pawnbox: has joined #ruby
[04:20:46] sp4rrow: has joined #ruby
[04:21:05] bazzy: Radar, if you've no interest in answering, I could just experiment ...
[04:21:49] GriffinHeart: has joined #ruby
[04:21:57] droptone: bazzy: Stack Overflow users usually answer questions within a couple hours if needed.
[04:22:14] ReK2: has joined #ruby
[04:22:14] ReK2: has joined #ruby
[04:26:00] havenwood: Or here is good but I don't understand the question. What's "ssl.thing" about?
[04:26:24] havenwood: ACTION reads scrollback
[04:27:20] astrobunny: has joined #ruby
[04:27:59] kgrz: has joined #ruby
[04:29:59] jenrzzz: has joined #ruby
[04:29:59] jenrzzz: has joined #ruby
[04:31:59] havenwood: it's pulling
[04:32:06] havenwood: takes a few
[04:32:13] havenwood: fixing permissions
[04:32:28] havenwood: 3min looping
[04:33:36] tatsuo: has joined #ruby
[04:44:48] danielpclark: has joined #ruby
[04:48:23] benlieb: has joined #ruby
[04:48:35] Ebok: has joined #ruby
[04:49:13] terminalrecluse: has joined #ruby
[04:49:40] shevy: has joined #ruby
[04:50:07] blackgoat: has joined #ruby
[04:51:06] CloCkWeRX: has joined #ruby
[04:54:12] havenwood: err, misstell >.>
[04:55:45] jancel: has joined #ruby
[04:57:02] pawnbox: has joined #ruby
[04:57:48] Musashi007: has joined #ruby
[04:57:53] hinbody: has joined #ruby
[04:59:01] tvw: has joined #ruby
[04:59:53] Devalo: has joined #ruby
[05:00:31] repel`: has joined #ruby
[05:01:36] dikaio: has joined #ruby
[05:02:52] jancel: has joined #ruby
[05:04:44] pawnbox_: has joined #ruby
[05:05:47] hahuang61: has joined #ruby
[05:10:18] dionysus69: has joined #ruby
[05:11:49] djellemah: has joined #ruby
[05:18:02] sauvin: has joined #ruby
[05:19:20] stryek: has joined #ruby
[05:19:27] ravishankarjha: has joined #ruby
[05:20:41] Ox0dea: has joined #ruby
[05:22:55] kareeoleez: has joined #ruby
[05:25:17] last_staff: has joined #ruby
[05:27:36] Ishido: has joined #ruby
[05:28:21] d0lph1n98: has joined #ruby
[05:29:04] mdw: has joined #ruby
[05:29:52] bronson: has joined #ruby
[05:31:48] skade: has joined #ruby
[05:31:51] Slackman1: has joined #ruby
[05:34:53] stardiviner: has joined #ruby
[05:35:36] bruno-: has joined #ruby
[05:37:06] tAn: has joined #ruby
[05:40:20] stryek: has joined #ruby
[05:46:08] kgrz: Just noticed a conditional in Rails source of the form `source[0] != ?/` I remember reading about the `?` long back in a Ruby reference book, but forgot what it does (apart from creating a string). Can't find documentation online. Anyone know it does internally?
[05:46:27] SuperLag: has joined #ruby
[05:46:58] Arcaire: kgrz: It's a single character string.
[05:47:17] isxek: has joined #ruby
[05:47:28] brent__: has joined #ruby
[05:47:37] moeabdol: has joined #ruby
[05:47:39] Arcaire: Depending on which version of Ruby you're on it'll either be an actual String or a Fixnum, as Ruby doesn't have a Character class.
[05:47:46] Arcaire: Fixnum is for 1.8 and below.
[05:48:19] Arcaire: This would be the same as of Ruby 1.9: source[0] != "/"
[05:48:32] Arcaire: And IIRC using that notation (?/ etc) is considered bad now.
[05:50:17] rodfersou: has joined #ruby
[05:50:46] ramfjord: has joined #ruby
[05:51:04] brent__: Hello. I'm trying to get a better understanding of factory methods
[05:51:06] brent__: https://gist.github.com/brentluna/34e3c44384d33dc5bf576dd1b943003f
[05:51:13] brent__: does this look like i'm using it correctly
[05:51:37] Oog: has joined #ruby
[05:52:09] brent__: can i call that instance variable inside the factory method?
[05:52:16] brent__: sorry *instance mthod
[05:55:54] danielpclark: has joined #ruby
[05:55:54] Arcaire: brent__: Try it and tell me.
[05:55:55] aufi: has joined #ruby
[05:56:06] ur5us: has joined #ruby
[05:56:11] brent__: writing the parse file now
[05:58:01] claw: has joined #ruby
[06:00:44] ausum_possum: has joined #ruby
[06:01:08] gz_rain: has joined #ruby
[06:01:22] noService: has joined #ruby
[06:01:52] Tichodroma: has joined #ruby
[06:01:59] kgrz: Arcaire: ah, thank you for the clarification. Do you know if this is documented somewhere? I tried to search the Ruby source code for it, but wasn't able to find it, but did notice its usage in many places
[06:02:23] kgrz: Will try it out again
[06:02:40] brent__: looks like i needed to make parse_file self.parse_file?
[06:03:02] Arcaire: brent__: Yes.
[06:03:16] Arcaire: kgrz: It will be somewhere, I don't know where off the top of my head.
[06:03:41] Arcaire: It's well documented enough for answers to be found on StackOverflow, so I'm sure it's in the stdlib docs somewhere.
[06:03:47] ferr: has joined #ruby
[06:03:54] codecop: has joined #ruby
[06:04:09] high: has joined #ruby
[06:05:19] Slackman1: has joined #ruby
[06:08:33] brent__: thanks Arcaire
[06:08:40] Arcaire: All good fam.
[06:09:17] brent__: i created a board instance w/ the Board::from_file
[06:09:25] brent__: i had a render method
[06:09:44] brent__: when i call the render method, afterwords, it still displays the board isntance
[06:10:12] brent__: so it lists it's instance variables, like @grid (which is long and ugly)
[06:10:24] brent__: how would i stop that
[06:10:55] Arcaire: That only happens in Pry.
[06:11:06] Arcaire: That's just because of, well, how that and any other REPL interpreter for Ruby works.
[06:11:27] brent__: okay, so no way to stop it from showing the object instance after calling a command?
[06:11:44] Arcaire: There probably is.
[06:11:54] bradleesand: has left #ruby: ()
[06:12:20] Arcaire: I don't know how, though.
[06:12:33] karmatr0n: has joined #ruby
[06:12:41] Arcaire: I remember having this conversation with someone maybe two weeks ago, actually.
[06:12:42] nicefoy2345: has joined #ruby
[06:12:45] Arcaire: They didn't want it gone but wondered what it was.
[06:12:59] Arcaire: If you run the thing as a script or application, that output won't happen.
[06:13:14] Arcaire: It's only because irb/pry are used very commonly to debug and that sort of output is helpful.
[06:13:32] nicefoy2345: Is Ruby dying? Is it worth learning?
[06:14:13] Arahael: Unfortunately, languages don't die.
[06:15:25] Hanmac: nicefoy2345: the rumor that ruby is dying is that what java wants you to think ;P
[06:15:37] droptone: If I want to execute a .each loop on an array, but skip the first index (index 0), is it best to use .each_with_index and then next if index == 0?
[06:15:55] droptone: or is there a better way to do that?
[06:17:15] Hanmac: droptone: yeah i think that might be the best way to do it
[06:17:42] czerasz: has joined #ruby
[06:17:42] Arcaire: droptone: array[1..-1].each
[06:17:52] stardiviner: has joined #ruby
[06:17:57] droptone: Arcaire: ty
[06:23:29] skol: has joined #ruby
[06:24:01] skol: has joined #ruby
[06:24:40] skol: has joined #ruby
[06:25:18] skol: has joined #ruby
[06:26:03] DoubleMalt: has joined #ruby
[06:26:31] firstdayonthejob: has joined #ruby
[06:27:03] brent__: legends never die
[06:29:05] Arahael: Cobol and Delphi are still going. :(
[06:29:09] droptone: Random epic statment
[06:29:57] Arcaire: COBOL and Delphi are very limited in their industries today though.
[06:29:58] Arcaire: Mostly banking.
[06:30:17] Arahael: Arcaire: Not mostly banking, no.
[06:30:32] jenrzzz: has joined #ruby
[06:30:32] Arcaire: Uh, sure thing.
[06:30:58] Arahael: I hear that there's a lot of Cobol in airlines.
[06:31:12] emilkarl: has joined #ruby
[06:31:34] droptone: My bank codes everything in the 1980s verson of logo
[06:32:16] Arcaire: wtf that's for education
[06:32:34] droptone: The web UI takes about 10 minutes to draw as the turtle moves around the screen
[06:32:42] Arcaire: oh you're kidding
[06:32:54] Arcaire: I've seen some weird stuff in my time so I wasn't sure outright if you were serious.
[06:33:21] skade: has joined #ruby
[06:33:43] Arahael: My bank used to use an on-screen randomised keyboard for "security" reasons.
[06:34:21] baweaver: arahael: Mainly RPG here for banks
[06:34:32] baweaver: COBOL for other industries
[06:34:36] Arahael: And literally insisted on an 8-char password, with uppercase, lowercase, symbols and numbers - and additionally, a character from each distinct row and column of the onscreen keyboard.
[06:34:46] Arahael: Which rather reduces the search scope.
[06:35:44] tax: has joined #ruby
[06:36:49] bruno-: has joined #ruby
[06:37:15] GriffinHeart: has joined #ruby
[06:37:16] jgt: has joined #ruby
[06:37:49] tAn: has joined #ruby
[06:38:21] johnDoe111: has joined #ruby
[06:39:34] GriffinHeart: has joined #ruby
[06:40:09] shmuli: has joined #ruby
[06:40:36] b|ackwolf: has joined #ruby
[06:42:21] Hanmac: have you guys seen the one episode from "Comunity" where the Boss get a new Operating System which does uses VirtualReality? i wouldnt be much surprised if such a thing really exist XD
[06:43:02] nobitanobi: has joined #ruby
[06:43:29] Arcaire: dudewhat.jpg
[06:44:05] jenrzzz: has joined #ruby
[06:44:40] Ch4rAss: has joined #ruby
[06:45:35] Hanmac: Arcaire: yeah he does use "bow and Arrow" to select a File inside the VR XD (he wanted to delete the file) and because it didnt work as he wanted, he does put the File under water until no bubbles are coming up.
[06:47:30] dopamean1: has joined #ruby
[06:47:50] mdw: has joined #ruby
[06:48:36] matp: has joined #ruby
[06:50:51] shmuli: has joined #ruby
[06:53:22] Musashi007: has joined #ruby
[06:56:57] edwinvdgraaf: has joined #ruby
[06:57:01] dopamean1: has joined #ruby
[06:57:55] armyriad: has joined #ruby
[06:58:05] Madmanden: has joined #ruby
[06:58:26] Caerus: ACTION greets #ruby
[06:59:54] brunto: has joined #ruby
[07:01:21] jaruga___: has joined #ruby
[07:02:19] armyriad: has joined #ruby
[07:02:23] Couch: has joined #ruby
[07:04:27] shmuli: has joined #ruby
[07:04:29] TomyWork: has joined #ruby
[07:04:46] danielpclark: has joined #ruby
[07:05:10] andikr: has joined #ruby
[07:05:30] aganov: has joined #ruby
[07:07:49] hk238: has joined #ruby
[07:08:38] ishe: has joined #ruby
[07:10:04] blaxter: has joined #ruby
[07:13:25] TvL2386: has joined #ruby
[07:13:41] karmatr0n: has joined #ruby
[07:17:55] antgel: has joined #ruby
[07:18:35] mozzarel1: has joined #ruby
[07:19:19] skade: has joined #ruby
[07:20:32] tatsuo: has joined #ruby
[07:24:11] Azure|dc: has joined #ruby
[07:24:13] dikaio: has joined #ruby
[07:24:49] Ch4rAss: has joined #ruby
[07:24:49] dionysus69: has joined #ruby
[07:28:50] last_staff: has joined #ruby
[07:29:08] apeiros: moin adaedra
[07:31:47] bronson: has joined #ruby
[07:32:37] djellemah_: has joined #ruby
[07:32:42] anisha: has joined #ruby
[07:32:58] Musashi007: has joined #ruby
[07:33:21] katija: has joined #ruby
[07:35:45] djellemah__: has joined #ruby
[07:40:43] mark_66: has joined #ruby
[07:42:06] trajing: has joined #ruby
[07:43:53] Synthead: has joined #ruby
[07:49:50] Musashi007: has joined #ruby
[07:51:41] vdamewood: has joined #ruby
[07:51:53] emilkarl: has joined #ruby
[07:53:04] finnnnnnnnnnn: has joined #ruby
[07:53:34] terlar: has joined #ruby
[07:56:38] bluOxigen: has joined #ruby
[08:00:44] tagaulap: has joined #ruby
[08:06:15] giz|work: has joined #ruby
[08:08:04] duncannz: has joined #ruby
[08:08:30] nhhc: has joined #ruby
[08:10:01] RegulationD: has joined #ruby
[08:11:28] b|ackwolf: has joined #ruby
[08:12:00] konsolebox: has joined #ruby
[08:14:05] the_drow: has joined #ruby
[08:14:41] karmatr0n: has joined #ruby
[08:14:59] b|ackwolf: has joined #ruby
[08:15:51] b|ackwolf: has joined #ruby
[08:16:16] drptbl: has joined #ruby
[08:18:06] solars: does anyone know why I get Illegal quoting in line 1. on https://gist.github.com/solars/3a4b88790fbe52ff94322979cc1f51d8 with CSV.read("report.csv", col_sep: ';', headers: true)?
[08:18:30] Synthead: has joined #ruby
[08:18:34] matp: has joined #ruby
[08:18:50] b|ackwolf: has joined #ruby
[08:20:40] hahuang61: has joined #ruby
[08:20:48] nobitanobi: has joined #ruby
[08:21:51] b|ackwolf: has joined #ruby
[08:22:24] _main_: has joined #ruby
[08:22:35] shevy: hmm we have .chop! ... but do we have a similar method for the start of a string? right now I use something like string[0,1] = '' to chop it off
[08:22:49] b|ackwolf: has joined #ruby
[08:23:51] apeiros: solars: that line works for me
[08:25:05] ur5us: has joined #ruby
[08:25:14] weckl: has joined #ruby
[08:25:36] BTRE: has joined #ruby
[08:25:56] solars: apeiros, really? http://csvlint.io/validation/5732ec146373766e4c00023d also reports a problem
[08:26:24] Ch4rAss: has joined #ruby
[08:26:26] solars: apeiros, did you call it in the same way?
[08:26:34] Shashikant86: has joined #ruby
[08:26:34] slackbotgz: has joined #ruby
[08:27:00] tildes: has joined #ruby
[08:28:20] marr: has joined #ruby
[08:30:00] jancel: has joined #ruby
[08:31:50] toretore: has joined #ruby
[08:32:21] Mon_Ouie: has joined #ruby
[08:34:14] troulouliou_div2: has joined #ruby
[08:36:24] kareeoleez: has joined #ruby
[08:37:14] kareeoleez: has joined #ruby
[08:38:48] djellemah_: has joined #ruby
[08:39:21] mdw: has joined #ruby
[08:39:45] solars: apeiros, how did you parse it?
[08:40:04] GriffinHeart: has joined #ruby
[08:40:30] shmuli: has joined #ruby
[08:42:20] kareeoleez: has joined #ruby
[08:43:04] ishe: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[08:44:08] Shashikant86: has joined #ruby
[08:44:10] ishe: has joined #ruby
[08:45:21] romain_t: has joined #ruby
[08:46:33] aupadhye: has joined #ruby
[08:48:24] rkoller: has joined #ruby
[08:49:06] ur5us: has joined #ruby
[08:51:28] jaruga___: has joined #ruby
[08:54:06] anisha: has joined #ruby
[08:55:28] Kitt3n: has joined #ruby
[08:55:44] rbr: has joined #ruby
[08:56:29] Macaveli: has joined #ruby
[08:58:37] tvw: has joined #ruby
[08:59:03] shmuli: has joined #ruby
[09:03:14] jaguarmagenta: has joined #ruby
[09:03:18] stardiviner: has joined #ruby
[09:06:15] Caerus: solars, the line passes for me too: CSV.read("gistfile1.txt", col_sep: ';', headers: true) returns: #<CSV::Table mode:col_or_row row_count:1>
[09:07:29] blackmes1: has joined #ruby
[09:08:25] workmad3: has joined #ruby
[09:08:34] shmuli: has joined #ruby
[09:11:13] snowy: has joined #ruby
[09:11:42] platzhirsch: has joined #ruby
[09:16:36] jwang: has joined #ruby
[09:16:43] solars: Caerus, apeiros it must be something with the file, I cannot explain this: https://gist.github.com/solars/acc08689df33e26c2882039b33f0cc68
[09:17:37] solars: content == str is false
[09:17:59] solars: both are strings
[09:20:03] Musashi007: has joined #ruby
[09:20:06] solars: content has size 22 str has size 21
[09:20:15] solars: any idea how I can find the difference?
[09:22:08] yfeldblum: has joined #ruby
[09:22:38] evidex: has joined #ruby
[09:23:04] Musashi007: has joined #ruby
[09:23:12] Hanmac: solars: you may compare content.bytes to str.bytes
[09:23:59] blackgoat: has joined #ruby
[09:24:33] shmuli: has joined #ruby
[09:26:02] solars: it was a BOM
[09:27:28] duderonomy: has joined #ruby
[09:27:48] ishe: has joined #ruby
[09:30:08] Caerus: CSV.parse("./gistfile1.txt", col_sep: ';', headers: true, encoding: Encoding::UTF_8) <-- this also passed
[09:30:24] raeoks: has joined #ruby
[09:30:50] astrobunny: has joined #ruby
[09:30:57] Caerus: oh, bom. glad you found it.
[09:31:26] Kitt3n: has joined #ruby
[09:31:53] igg: has joined #ruby
[09:32:36] Arahael: Weird though.
[09:32:43] Arahael: The UTF-8 BOM should be 3 bytes, not 1.
[09:33:37] bronson: has joined #ruby
[09:34:33] solars: not sure if .size counts bytes
[09:34:40] solars: or how that behaves
[09:35:18] araujo: has joined #ruby
[09:36:17] Caerus: solars, CSV.parse("./gistfile1.txt", col_sep: ';', headers: true, encoding: 'bom|utf-8') <-- this also passed
[09:36:19] bruce_lee: has joined #ruby
[09:36:47] adaedra: >> "åå".size
[09:36:48] ruby[bot]: adaedra: # => 3 (https://eval.in/568481)
[09:38:02] jokester: has joined #ruby
[09:39:02] Caerus: but ignoring the bom doesn't seem sane, could put you in a tight spot if it stops showing in the feed
[09:40:08] bruno-: has joined #ruby
[09:41:04] solars: Caerus, yep that's what I used now
[09:41:12] solars: I hate this bom stuff
[09:45:31] codecop: has joined #ruby
[09:49:22] the_drow: has joined #ruby
[09:49:44] mdw: has joined #ruby
[09:55:13] Tichodroma: has left #ruby: ()
[09:56:54] Macaveli: has joined #ruby
[09:58:24] mdw: has joined #ruby
[10:00:25] GriffinHeart: has joined #ruby
[10:01:01] apeiros: solars: meetings, sorry. I copy & pasted your csv and used `CSV.parse(raw, col_sep: ";")`
[10:01:16] apeiros: where `raw = %{…copy & paste here}`
[10:01:58] solars: apeiros, it was a BOM problem :/
[10:02:03] solars: thanks for the reply though
[10:02:10] rkoller_: has joined #ruby
[10:02:32] apeiros: solars: csvlint probably failed because the C in CSV stands for coma, not semicolon.
[10:02:58] apeiros: and with , as assumed delimiter, the data is indeed invalid
[10:03:04] karmatr0n: has joined #ruby
[10:03:43] blackgoat: has joined #ruby
[10:05:19] TwinkleHood: has joined #ruby
[10:06:04] TwinkleHood: I have a question.. is the docs for String#== lying? If i implement a class, defining to_str to return "x", and compare "x" to Newclass.new with ==, i get false?
[10:07:44] jraphael: has joined #ruby
[10:08:44] shevy: can you gist the code?
[10:09:05] d0lph1n98: has joined #ruby
[10:09:57] Guest9272: has joined #ruby
[10:10:20] the_drow: has joined #ruby
[10:11:05] solars: apeiros, yep youre right
[10:11:31] RegulationD: has joined #ruby
[10:12:30] TwinkleHood: has joined #ruby
[10:12:55] tatsuo: has joined #ruby
[10:14:22] TwinkleHood: https://gist.github.com/kholbekj/510a8a7cfd2b0ac2d8d1f787ae969113
[10:15:18] TwinkleHood: seems to contradict http://ruby-doc.org/core-2.2.3/String.html#method-i-3D-3D
[10:15:27] Ox0dea: twinklehood: Indeed it does.
[10:16:19] Ox0dea: A #to_str definition does let your object participate in String expressions, but #== is exempt.
[10:16:31] CoderPuppy: has joined #ruby
[10:16:38] Ox0dea: >> def (s = Object.new).to_str; 'bar'; end; 'foo' + s
[10:16:39] TwinkleHood: So not a ruby bug, but confused docs?
[10:16:39] ruby[bot]: Ox0dea: # => "foobar" (https://eval.in/568497)
[10:16:46] shevy: whoa the doc is weird there altogether
[10:17:01] TwinkleHood: They are indeed..
[10:17:27] shevy: Is the documentation for "str == obj" a copy/paste of "str === obj"? I am not sure if there is a difference in the docu there...
[10:17:51] TwinkleHood: It clearly states those two share implementation
[10:17:57] TwinkleHood: So i suppose that would be excused.
[10:18:32] TwinkleHood: However, the fact that thei're both wrong is of course unfortunate.
[10:18:36] shevy: weird... my brain would have told me that == would be different than === e. g. in case/when menu, === is used rather than ==
[10:18:39] shevy: haha yeah
[10:18:48] jancel: has joined #ruby
[10:18:58] TwinkleHood: Well, === would make sense if they indeed worked as described.
[10:19:11] TwinkleHood: But with === not allowing non-strings, i think that makes case handling a bit odd.
[10:19:22] ur5us: has joined #ruby
[10:19:35] Ox0dea: Huh? String#=== *is* String#==.
[10:20:19] Ox0dea: Case equality isn't odd once you understand it.
[10:20:48] Ox0dea: `case obj; when 'foo'; ...; when String; ...; end` will try to match a specific String first, then any.
[10:21:24] hahuang61: has joined #ruby
[10:21:44] TwinkleHood: Sure, what I'm saying is, I'd find it more useful if it did indeed coerce equality, as described
[10:22:16] TwinkleHood: so `case obj; when 'User#1333'#...` might match a user object with a to_str defined.
[10:22:38] TwinkleHood: Though idno, might be fugly anywho
[10:23:02] TwinkleHood: I'm just weirded out by the docs, not really my turf to suggest ruby lang improvements <3
[10:24:43] c355E3B: has joined #ruby
[10:25:31] jgt: has joined #ruby
[10:26:11] senayar: has joined #ruby
[10:27:05] shevy: oh there is a yellow box "Supplemental notes" there
[10:27:39] shevy: first time that I see such a box there
[10:30:11] Azure: has joined #ruby
[10:30:35] shevy: there also does not seem to be any indicator on the documentation what is an alias to another method
[10:31:04] shevy: So you have http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-map and http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-collect both showing the same source reference link under "view source"
[10:31:28] shevy: or rather the "click to toggle source"
[10:33:09] shevy: rb_define_method(rb_mEnumerable, "collect", enum_collect, 0);
[10:33:10] shevy: rb_define_method(rb_mEnumerable, "map", enum_collect, 0);
[10:33:15] TwinkleHood: uh oh, did i open a rabbithole?
[10:33:36] Ox0dea: That idiom usually connotes negatively, so no.
[10:34:07] shevy: twinklehood the ruby docs won't win a prize anyway
[10:34:45] shevy: one would have to come up with a better alternative. I am not sure how that alternative should be either
[10:34:52] TwinkleHood: Well, "Did I lead your attention on to a subject which may course a suprising amount of discoveries, which require attention" sounds so diplomatic.
[10:35:15] Ox0dea: It's also not what "rabbit hole" means.
[10:35:43] the_drow: has joined #ruby
[10:36:07] Arahael: Rabbit holes are to be _avoided_.
[10:36:20] Arahael: And they have no end. They're bottomless.
[10:36:40] Ox0dea: Bottom = Just Nothing
[10:36:50] Ox0dea: /part #shittyhaskell
[10:36:52] Arahael: Ox0dea: Bottom = undefined
[10:36:59] Ox0dea: arahael: See above. :P
[10:37:02] shevy: Maybe Bottom
[10:37:04] TwinkleHood: I'm painfully sorry about that, non-nativism showing.
[10:37:21] Arahael: Ox0dea: Sorry, I just hit _|_
[10:37:24] freerobby: has joined #ruby
[10:37:24] aagdbl: has joined #ruby
[10:37:36] shevy: hop hop to disconnect!
[10:42:40] gigetoo: has joined #ruby
[10:43:04] Xiti: has joined #ruby
[10:44:31] last_staff: has joined #ruby
[10:48:01] dvinciguerra: has joined #ruby
[10:51:26] jgt: has joined #ruby
[10:51:26] rubswax: has joined #ruby
[10:52:57] tvw: has joined #ruby
[10:53:59] the_drow: has joined #ruby
[10:57:51] blaxter: has joined #ruby
[10:58:07] giz|work: has joined #ruby
[10:59:21] siovene: has joined #ruby
[10:59:55] chipotle: has joined #ruby
[11:02:35] Yeomra: has joined #ruby
[11:03:58] skade: has joined #ruby
[11:04:01] jaguarmagenta: has joined #ruby
[11:04:12] jwang: has joined #ruby
[11:06:19] brunto: has joined #ruby
[11:06:51] GodFather: has joined #ruby
[11:07:35] gnufied: has joined #ruby
[11:07:54] duderono_: has joined #ruby
[11:13:49] the_drow: has joined #ruby
[11:13:49] munish: has joined #ruby
[11:14:44] johnmilton: has joined #ruby
[11:15:18] munish: has left #ruby: ()
[11:16:03] pandaant: has joined #ruby
[11:17:52] chipotle: has joined #ruby
[11:19:46] agit0: has joined #ruby
[11:20:14] crameth: has joined #ruby
[11:20:17] neanderslob_: has joined #ruby
[11:20:42] the_drow: has joined #ruby
[11:21:52] Vile`: has joined #ruby
[11:23:07] Icey: has joined #ruby
[11:25:21] umdstu: has joined #ruby
[11:26:35] pawnbox: has joined #ruby
[11:27:30] the_drow: has joined #ruby
[11:28:18] nobitanobi: has joined #ruby
[11:29:40] tatsuo: has joined #ruby
[11:31:41] freerobby: has joined #ruby
[11:31:54] ldnunes: has joined #ruby
[11:33:46] kam270: has joined #ruby
[11:34:05] WebDevB: has joined #ruby
[11:34:11] WebDevB: Hey guys, I'm looking for a ruby on rails dev for some ad-hoc work... It's will range from a couple of hours a month to a couple of days a month.
[11:34:17] WebDevB: Is anyone interested?
[11:35:19] the_drow: has joined #ruby
[11:35:29] bronson: has joined #ruby
[11:36:14] the_drow: has joined #ruby
[11:37:07] d0lph1n98: has joined #ruby
[11:37:29] Gasher: has joined #ruby
[11:37:33] noobsu: has joined #ruby
[11:38:39] TvL2386: has joined #ruby
[11:39:15] Mon_Ouie: has joined #ruby
[11:41:31] the_drow: has joined #ruby
[11:42:18] mdw: has joined #ruby
[11:42:28] the_drow: has joined #ruby
[11:45:34] kkeuning: has joined #ruby
[11:45:41] duderonomy: has joined #ruby
[11:47:19] kkeuning: has joined #ruby
[11:47:53] the_drow: has joined #ruby
[11:48:18] Yiota: has joined #ruby
[11:49:03] mar77i: has joined #ruby
[11:50:57] mar77i: hello #ruby. I have trouble running bundler on my ruby-2.3.1 installation. the error message I get is "Your Ruby version is 2.3.1, but your Gemfile specified 2.3.0" -- interestingly, though, trying to compile the ruby 2.3.1 package I found this in the output: "configure: ruby library version = 2.3.0", which I suspect is the source of this problem?
[11:51:42] mar77i: I figured this out after ruby -e "print Gem.user_dir" would also return 2.3.0, which seemed kind of funky.
[11:53:58] mar77i: I can't see any downstream instruction to create this discrepancy, though. could you enlighten a ruby illiterate in this regard?
[11:54:09] crameth: has joined #ruby
[11:54:13] nashant: has joined #ruby
[11:54:40] cpup: has joined #ruby
[11:54:47] nashant: Hey, what's wrong with this... $path = '/var/www/' + ($osfamily=='redhat' ? 'html/' : '' ) + 'index.html'
[11:55:13] the_drow: has joined #ruby
[11:57:01] wpp: has joined #ruby
[11:57:18] banister: has joined #ruby
[11:57:54] nadir: has joined #ruby
[12:01:00] aagdbl0: has joined #ruby
[12:01:01] Ox0dea: >> $path = '/var/www/' + ($osfamily=='redhat' ? 'html/' : '' ) + 'index.html'
[12:01:02] ruby[bot]: Ox0dea: # => "/var/www/index.html" (https://eval.in/568588)
[12:01:10] Ox0dea: nashant: Looks like you'll need to define "wrong".
[12:01:36] jespada: has joined #ruby
[12:02:48] the_drow: has joined #ruby
[12:03:01] crameth_: has joined #ruby
[12:03:36] mar77i: if you're going to append arbitrary paths there, you may want to resolve and/or remove ../ so that the path can't be escaped from. there may be a library function to do this kind of thing, too.
[12:03:47] ctp: has joined #ruby
[12:03:48] sepp2k: has joined #ruby
[12:04:20] Hanmac: has joined #ruby
[12:04:57] terlar: has joined #ruby
[12:05:09] synthroid: has joined #ruby
[12:05:21] nashant: 0x0dea: Fair enough, if it's not simple enough to spot immediately I can't be way off the mark! I'm just starting to play with puppet and $path is just a string to feed as a parameter. If $osfamily=='redhat' the string should be '/var/www/html/index.html', otherwise just '/var/www/index.html'
[12:05:41] nashant: but I'm getting a syntax error
[12:05:43] aagdbl: has joined #ruby
[12:05:53] sdothum: has joined #ruby
[12:05:59] crameth__: has joined #ruby
[12:06:28] Ox0dea: nashant: As demonstrated, your syntax error must be elsewhere.
[12:06:55] karapetyan: has joined #ruby
[12:07:39] nashant: 0x0dea: So that should be right? Hmm, maybe puppet can't do inline ternary string concat
[12:09:14] Ox0dea: nashant: It *is* right. You might be missing an `end` or something along those lines.
[12:09:28] the_drow: has joined #ruby
[12:09:29] araujo_: has joined #ruby
[12:10:20] chip_: has joined #ruby
[12:11:38] araujo_: has joined #ruby
[12:11:39] Fernando-Basso: has joined #ruby
[12:14:11] araujo_: has joined #ruby
[12:14:41] karmatr0n: has joined #ruby
[12:16:21] araujo_: has joined #ruby
[12:18:02] the_drow: has joined #ruby
[12:18:33] araujo_: has joined #ruby
[12:18:54] BlacksmithMetash: has joined #ruby
[12:20:03] mar77i: what could I be doing wrong with 2.3.1?
[12:20:35] araujo_: has joined #ruby
[12:21:39] GodFather: has joined #ruby
[12:21:42] jancel: has joined #ruby
[12:22:09] hahuang61: has joined #ruby
[12:24:07] kaffepanna: has joined #ruby
[12:27:23] the_drow: has joined #ruby
[12:27:37] Vile`: has joined #ruby
[12:31:25] Caerus: see ya later #ruby
[12:32:17] apeiros: mar77i: the project you use has a Gemfile which says the project requires ruby 2.3.0, and you use 2.3.1
[12:32:26] apeiros: so either update the Gemfile or use 2.3.0
[12:33:11] hk238: has joined #ruby
[12:33:19] apeiros: mar77i: http://bundler.io/v1.3/gemfile_ruby.html
[12:34:52] the_drow: has joined #ruby
[12:35:31] rkazak: has joined #ruby
[12:35:42] the_drow: has joined #ruby
[12:36:36] bronson: has joined #ruby
[12:38:22] mar77i: apeiros: how can I update the gemfile?
[12:39:40] vdamewood: has joined #ruby
[12:39:51] jhass: mar77i: $EDITOR Gemfile
[12:40:06] rbennacer: has joined #ruby
[12:41:10] rbennacer: has joined #ruby
[12:41:12] the_drow_: has joined #ruby
[12:41:56] JohnBat26: has joined #ruby
[12:41:57] rbennacer: has joined #ruby
[12:42:39] bruno-: has joined #ruby
[12:42:55] terlar: has joined #ruby
[12:44:11] skade: has joined #ruby
[12:44:23] djcp: has joined #ruby
[12:45:58] rbennacer: has joined #ruby
[12:46:50] nerium: has joined #ruby
[12:47:44] emirpasic: has joined #ruby
[12:49:42] the_drow: has joined #ruby
[12:50:10] ChiefAlexander: has joined #ruby
[12:53:57] giz|work: has joined #ruby
[12:54:57] chouhoulis: has joined #ruby
[12:55:07] tildes: has joined #ruby
[12:55:33] ramortegui: has joined #ruby
[12:56:14] the_drow: has joined #ruby
[12:56:18] vdamewood: has joined #ruby
[13:00:18] tatsuo: has joined #ruby
[13:01:58] d0nn1e: has joined #ruby
[13:02:51] laska: has joined #ruby
[13:02:57] mar77i: the gemfile appears to be a tarball. there is a .travis.yml
[13:04:22] the_drow: has joined #ruby
[13:04:29] mar77i: which mentions 2.3.0 under rvm:, but there's no other mention in the package.
[13:04:47] jaguarmagenta: has joined #ruby
[13:04:51] synthroid: has joined #ruby
[13:05:21] the_drow: has joined #ruby
[13:06:42] Dysp: has joined #ruby
[13:06:52] gregf: has joined #ruby
[13:07:13] apeiros: mar77i: no, the gemfile is not a tarball. no idea at what you're looking, but you're looking at the wrong file.
[13:07:48] apeiros: wherever you're running "bundle", in that directory, or in that project's root directory, there's a file named "Gemfile". that's the gemfile. hence the name.
[13:08:07] nobitano_: has joined #ruby
[13:08:50] Dysp: Hello there, people. I have an array containing different elements. How can I create a new variable for each element?
[13:09:09] nobitanobi: has joined #ruby
[13:09:34] Dysp: Here is what I have tried so far.. https://gist.github.com/Dysp/6000fa406728e3194e64036e6b32b5e6
[13:10:49] laska: why would you want to do this?
[13:11:11] the_drow_: has joined #ruby
[13:11:29] Dysp: Basicly I get an array with available sheets in the workbook. Afterwards I need to take the individual sheets and pull column 2 from them.
[13:12:06] Dysp: Returning a new array with the data I need.
[13:13:55] Dysp: So, returning each new array in a new individual object that I can run calculations on.
[13:14:32] laska: i dont quite get what exactly is going on, but sounds like you may just want to nest some iterations
[13:14:43] arpegius: has joined #ruby
[13:15:23] Dysp: Yeah, I can actually easily make it work just by doing that. But I am trying to learn good code practice and divide stuff up into functions/methods.
[13:15:46] Dysp: Dunno if it makes any sense to do it like I wanted to, but that was just the idea that I got.
[13:16:29] |2701: has joined #ruby
[13:16:31] jdawgaz: has joined #ruby
[13:17:07] Dysp: But eventually - at some point, I still need to define a variable which name is not predefined. How do I do that?
[13:18:04] mar77i: apeiros: the package I get does contain a file Gemfile in /usr/lib/ruby/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/templates, but that appears to be a sample file.
[13:19:31] mar77i: I just realized that the problem wasn't with the ruby-bundler package but with the thing the bundler should bundle.
[13:19:52] the_drow: has joined #ruby
[13:20:02] gregf: has joined #ruby
[13:20:21] solars: quick question, I'm processing gzipped csv files in a stream and want to separate opening them from processing the contents, is it a good practise to wrap it into a block like so: https://gist.github.com/solars/b18ead7ae64bb89e78fb8a8ca0b2ca96 ?
[13:20:46] mdw: has joined #ruby
[13:20:53] Dysp: For the sake of the question: I have an array with [x, y, z...]. How do I create a variable that holds each element? I mean finding the x element of the array and assigning it to a variable is pretty straight forward, if I beforehand know what to assign. But I don't. The array length varies.
[13:21:33] Dysp: "finding the nth element" would be a more proper description
[13:21:58] jhass: Dysp: replace_me_with_a_nice_name_describing_the_data = xlsx.sheets.map {|sheet| sheet.column(2) }
[13:22:55] jhass: n_th_element = array[n-1]
[13:23:31] Dysp: I think you are answering it the opposite way, so to say.
[13:24:07] Dysp: Say I want to define a variable from each element in the array.
[13:24:31] jhass: you never ever want to, you want to keep arrays or hashes if that desire comes to mind
[13:24:45] Dysp: [a, b, c] should become value1 = a, value2 = b, value3 = c
[13:27:58] the_drow_: has joined #ruby
[13:28:11] jhass: think a bit further, how would you later refer to the variable if you don't know its name?
[13:28:23] Dysp: True. True.
[13:28:34] the_drow_: has joined #ruby
[13:28:36] flashpoint9: has joined #ruby
[13:28:39] Dysp: I'll try to explain what I wanna do simplified, maybe you can help me figure out how to solve it.
[13:29:45] Ebok: has joined #ruby
[13:30:25] Dysp: I have an excel workbook with x amounts of sheets. In these sheets there are columns of data of which I wanna find the mean of. I need to pull these individual means and store them.
[13:31:08] malconis: has joined #ruby
[13:31:13] dvinciguerra: has joined #ruby
[13:31:18] tvw: has joined #ruby
[13:31:23] jhass: same column for all sheets?
[13:31:47] malconis: has joined #ruby
[13:33:07] jhass: data = xlsx.sheets.flat_map {|sheet| sheet.column(2) }; mean = data.sort[data.size/2] (well, gotta do the a+b/2 thing here to do it correctly but enough to show the idea)
[13:34:40] Dysp: Can you explain flat map?
[13:34:45] karmatr0n: has joined #ruby
[13:34:50] the_drow: has joined #ruby
[13:34:53] Dysp: To a 5 year old kid
[13:34:59] jhass: you got map?
[13:35:14] Dysp: Not really.
[13:35:35] jhass: >> [1, 2, 3].map {|n| n + 3 }
[13:35:36] ruby[bot]: jhass: # => [4, 5, 6] (https://eval.in/568696)
[13:35:47] nobitanobi: has joined #ruby
[13:35:54] jhass: take array, apply operation to each element, build new array from the results
[13:36:45] eljimbo: has joined #ruby
[13:37:10] jhass: flat_map is take array, apply operation to each element, operation should itself produce an array, concatenate elements of the individual result arrays into a single one
[13:37:31] jhass: >> [1, 2, 3].flat_map {|n| [n, n + 3] }
[13:37:32] ruby[bot]: jhass: # => [1, 4, 2, 5, 3, 6] (https://eval.in/568698)
[13:37:39] Dysp: That I could totally use.. Thank you.
[13:37:39] jhass: compared to
[13:37:49] tmtwd: has joined #ruby
[13:37:59] jhass: >> [1, 2, 3].map {|n| [n, n + 3] }
[13:38:00] ruby[bot]: jhass: # => [[1, 4], [2, 5], [3, 6]] (https://eval.in/568699)
[13:38:38] Dysp: So maps just makes arrays within the array?
[13:38:48] Dysp: based on the provided operation
[13:39:50] jhass: it doesn't flat out if the result of the operation is an array
[13:39:56] tatsuo: has joined #ruby
[13:40:36] Dysp: But I actually figured out my own problem - I think. Basicly my brain failed to realize the big picture with data storing
[13:40:52] Dysp: Thank you for your help
[13:41:31] roamingdog: has joined #ruby
[13:42:04] horaceheaven: has joined #ruby
[13:42:07] b|ackwolf: has joined #ruby
[13:44:11] skade: has joined #ruby
[13:44:36] VeryBewitching: has joined #ruby
[13:45:03] solars: can anyone tell me why I cannot correctly get rid of this BOM when using a gzipped file? https://gist.github.com/solars/a906ce5e5963a269c505069f20f4ad5e
[13:45:11] solars: I don't get it
[13:46:13] davedev24: has joined #ruby
[13:46:24] jobewan: has joined #ruby
[13:46:32] mdw: has joined #ruby
[13:46:33] Madmanden: has joined #ruby
[13:47:20] mdw: has joined #ruby
[13:47:54] Yeomra: has joined #ruby
[13:48:26] pawnbox: has joined #ruby
[13:49:53] pawnbox: has joined #ruby
[13:50:09] GinoManWorks: has joined #ruby
[13:50:11] smathy: has joined #ruby
[13:50:14] dikaio: has joined #ruby
[13:50:49] terlar: has joined #ruby
[13:50:51] laska: has joined #ruby
[13:51:06] jancel: has joined #ruby
[13:51:46] aegis3121: has joined #ruby
[13:52:28] iamvery: has joined #ruby
[13:52:44] GinoManWorks_: has joined #ruby
[13:54:04] karmatr0n: has joined #ruby
[13:57:57] no1stunna: has joined #ruby
[13:58:27] laska: has joined #ruby
[13:58:53] no1stunna: has left #ruby: ()
[13:59:03] no1stunna: has joined #ruby
[13:59:19] griffindy: has joined #ruby
[13:59:22] jzigmund: has joined #ruby
[14:02:38] dhollinger: has joined #ruby
[14:04:24] terlar: has joined #ruby
[14:04:30] agit0: has joined #ruby
[14:05:06] duoi: has joined #ruby
[14:05:18] diegoaguilar: has joined #ruby
[14:05:51] webus: has joined #ruby
[14:06:56] chouhoulis: has joined #ruby
[14:07:33] idle_task: has joined #ruby
[14:08:11] startupality: has joined #ruby
[14:08:59] marsjaninzmarsa: has joined #ruby
[14:09:45] fmcgeough: has joined #ruby
[14:11:28] Ebok: has joined #ruby
[14:12:35] SilverKey: has joined #ruby
[14:13:22] benlieb: has joined #ruby
[14:13:52] nerium: has joined #ruby
[14:14:23] cdg: has joined #ruby
[14:15:40] last_staff: has joined #ruby
[14:15:59] Ebok: has joined #ruby
[14:16:59] roshanavand: has joined #ruby
[14:17:57] Ebok: has joined #ruby
[14:19:32] astrobunny: has joined #ruby
[14:21:23] bruno-: has joined #ruby
[14:21:41] araujo: has joined #ruby
[14:22:51] hahuang61: has joined #ruby
[14:22:52] blackmes1: has joined #ruby
[14:24:16] laska: has left #ruby: ()
[14:24:20] laska: has joined #ruby
[14:24:49] Ch4rAss: has joined #ruby
[14:25:34] raldu: has joined #ruby
[14:25:37] LastWhisper____: has joined #ruby
[14:29:16] idefine: has joined #ruby
[14:30:44] diegoviola: has joined #ruby
[14:30:53] CausaMortis: has joined #ruby
[14:33:23] iamvery: has joined #ruby
[14:34:07] mattwashere: has joined #ruby
[14:37:44] jancel: has joined #ruby
[14:37:48] bronson: has joined #ruby
[14:38:11] Devalo: has joined #ruby
[14:39:48] [Butch]: has joined #ruby
[14:42:10] inukshuk_: has joined #ruby
[14:42:47] rbr: has joined #ruby
[14:43:58] benlieb: has joined #ruby
[14:44:59] lxsameer: has joined #ruby
[14:46:03] kareeoleez: has joined #ruby
[14:46:16] [Butch]: has joined #ruby
[14:46:26] isxek: has joined #ruby
[14:47:07] banister: has joined #ruby
[14:47:44] ChiefAlexander: has joined #ruby
[14:47:57] astrobunny: has joined #ruby
[14:48:01] kgrz: has joined #ruby
[14:48:15] rbr: has joined #ruby
[14:49:02] ItSANgo: has joined #ruby
[14:50:11] weemsledeux: has joined #ruby
[14:50:31] Dry_Lips: has joined #ruby
[14:50:31] Dry_Lips: has joined #ruby
[14:50:36] jaiks: has joined #ruby
[14:51:06] Devalo: has joined #ruby
[14:52:55] agent_white: has joined #ruby
[14:53:21] symm-: has joined #ruby
[14:53:43] mildfate: has joined #ruby
[14:55:35] mildfate: Hi all, I have a ruby on rails app with a page that's running very slow
[14:55:59] mildfate: What's a good way to find the cause of the slowness from the console?
[14:56:27] apeiros: ?rails mildfate
[14:56:27] ruby[bot]: mildfate: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[14:57:49] mustmodify_: has joined #ruby
[14:58:37] rippa: has joined #ruby
[15:01:12] freerobby: has joined #ruby
[15:01:39] bruno-: has joined #ruby
[15:04:58] iamvery: has joined #ruby
[15:05:34] jaguarmagenta: has joined #ruby
[15:05:57] Ch4rAss: has joined #ruby
[15:07:01] Madmanden: has joined #ruby
[15:08:12] bluOxigen: has joined #ruby
[15:10:57] mustmodify_: Why can't I pass a lambda into sort_by
[15:11:05] mustmodify: blah, nick changed
[15:11:20] laska: has joined #ruby
[15:11:38] apeiros: because it doesn't accept one
[15:11:47] mustmodify: I guess I had that coming.
[15:11:48] apeiros: use sort_by(&your_lambda) to convert the lambda to a block
[15:12:06] mustmodify: I tried that. Let me see ... maybe I was doing something else wrong.
[15:12:22] apeiros: well, can't tell from a "why can't I" question :-p
[15:12:36] Madmanden: has joined #ruby
[15:12:41] py4_: has joined #ruby
[15:12:43] mustmodify: apeiros: yep, you gave the correct answer to my poorly-worded question.
[15:12:44] mustmodify: @#$@# it worked the second time. Stupid thing hates me.
[15:13:05] apeiros: just hate it back harder
[15:13:05] RegulationD: has joined #ruby
[15:13:52] tatsuo: has joined #ruby
[15:14:18] gremax: has joined #ruby
[15:14:40] freerobby: has joined #ruby
[15:15:15] mustmodify: good thinking.
[15:15:49] preyalone: has joined #ruby
[15:16:15] synthroid: has joined #ruby
[15:16:16] crystal77: has joined #ruby
[15:16:25] hiddenloop: has joined #ruby
[15:17:24] chopin: has joined #ruby
[15:17:25] arpegius: has joined #ruby
[15:17:57] startupality: has joined #ruby
[15:19:24] araujo: has joined #ruby
[15:20:21] Madmanden: has joined #ruby
[15:21:41] freerobby: has joined #ruby
[15:22:16] freerobby1: has joined #ruby
[15:22:35] skade: has joined #ruby
[15:22:50] elifoster: has joined #ruby
[15:23:09] jaiks: has joined #ruby
[15:23:34] jhack: has joined #ruby
[15:23:54] tw1sted: has joined #ruby
[15:24:56] kareeole_: has joined #ruby
[15:25:27] papachan: has joined #ruby
[15:25:43] havenwood: good mornin'
[15:26:52] papachan: If i want to use SSL through Net Http client
[15:26:54] Mia: has joined #ruby
[15:26:55] Mia: has joined #ruby
[15:27:00] LastWhisper____: has joined #ruby
[15:27:12] papachan: i have to enforce use_ssl = true
[15:27:42] papachan: but it's using SSLv3 not TLS
[15:27:42] skade: has joined #ruby
[15:28:19] jhass: how do you assert that?
[15:28:36] kareeoleez: has joined #ruby
[15:29:07] chopin: has joined #ruby
[15:29:30] papachan: because i received alog from my project in production: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol
[15:30:23] jhass: SSLv2/v3 is SSLv3 or later, TLSv1.1 or later on recent Rubies
[15:31:10] papachan: well i imagine my problem its ruby version so
[15:31:14] mattwashere: has joined #ruby
[15:31:18] papachan: because i was managing 2.1.2 on this project
[15:31:34] papachan: and certainly it cannot compile with correct openssl
[15:32:14] mustmodify: has left #ruby: ()
[15:33:03] solocshaw: has joined #ruby
[15:35:13] jhass: why not upgrade to .9 / .10 ß
[15:35:22] The_Phoenix: has joined #ruby
[15:36:42] The_Phoenix: has joined #ruby
[15:36:51] papachan: jhass right now i am trying with 2.2.4
[15:37:00] jhass: why not 2.2.5?
[15:37:08] papachan: let me check that
[15:37:24] papachan: 2.2.5 is bringin better support with ssl?
[15:37:36] dikaio: has joined #ruby
[15:38:05] Madmanden: has joined #ruby
[15:38:22] The_Phoenix: has joined #ruby
[15:38:35] jhass: https://www.ruby-lang.org/en/news/2016/04/26/ruby-2-2-5-released/
[15:38:39] rodferso1: has joined #ruby
[15:38:58] papachan: oh. latest 26th april?
[15:39:10] blackmes1: has joined #ruby
[15:39:28] The_Phoenix: has joined #ruby
[15:39:57] py4_: has joined #ruby
[15:40:29] bruno-: has joined #ruby
[15:40:46] The_Phoenix: has joined #ruby
[15:41:17] whathappens: has joined #ruby
[15:42:58] hobodave: has joined #ruby
[15:43:24] whathappens: has joined #ruby
[15:44:11] jhass: btw see SSL_CTX_new(3) for what openssl means when it says SSLv23
[15:44:20] whathappens: has joined #ruby
[15:50:17] skade: has joined #ruby
[15:52:40] lxsameer: has joined #ruby
[15:53:18] SilverKey: has joined #ruby
[15:54:12] dANOKELOFF: has joined #ruby
[15:55:46] nobitanobi: has joined #ruby
[15:56:50] kgrz: has joined #ruby
[15:57:29] nobitano_: has joined #ruby
[15:57:36] amclain: has joined #ruby
[15:58:02] papachan: jhass, thats weird i dont see the 2.2.5 on rbenv list
[15:58:19] trabulmonkee: has joined #ruby
[15:58:47] aegis3121: Try updating ruby-build
[16:01:15] freerobby: has joined #ruby
[16:01:33] Contigi: has joined #ruby
[16:02:16] papachan: jhass, thanks
[16:02:43] nobitanobi: has joined #ruby
[16:03:54] codecop: has joined #ruby
[16:05:12] skolman_: has joined #ruby
[16:05:40] jackjackdripper: has joined #ruby
[16:05:48] whathapp_: has joined #ruby
[16:06:02] chip_: has joined #ruby
[16:08:40] rkoller: has joined #ruby
[16:11:46] laska: has joined #ruby
[16:12:30] shadeslayer: has joined #ruby
[16:13:46] nando293921: has joined #ruby
[16:15:10] jackjackdripper1: has joined #ruby
[16:18:14] Ch4rAss: has joined #ruby
[16:18:20] robbyoconnor: has joined #ruby
[16:18:48] nrd_pxs: has joined #ruby
[16:21:57] kgrz: has joined #ruby
[16:22:27] laska: has joined #ruby
[16:22:49] synthroid: has joined #ruby
[16:23:30] freerobby: has joined #ruby
[16:23:36] hahuang61: has joined #ruby
[16:25:20] Asher: has joined #ruby
[16:26:11] nobitano_: has joined #ruby
[16:26:58] dionysus69: has joined #ruby
[16:27:22] duoi: has joined #ruby
[16:27:52] kgrz: has joined #ruby
[16:30:12] kgrz: has joined #ruby
[16:31:14] jgt: has joined #ruby
[16:31:43] kgrz: has joined #ruby
[16:33:18] tatsuo: has joined #ruby
[16:34:00] [Butch]_: has joined #ruby
[16:34:19] kgrz: has joined #ruby
[16:34:58] kgrz: has joined #ruby
[16:35:48] kgrz: has joined #ruby
[16:37:19] kgrz: has joined #ruby
[16:38:39] jancel: has joined #ruby
[16:38:45] dfockler: has joined #ruby
[16:39:10] dikaio: has joined #ruby
[16:40:04] bronson: has joined #ruby
[16:42:20] blackmes1: has joined #ruby
[16:44:50] safetypin: has joined #ruby
[16:45:30] ChiefAlexander: has joined #ruby
[16:48:00] mattwashere: has joined #ruby
[16:48:24] agit0: has joined #ruby
[16:48:28] kobain: has joined #ruby
[16:48:45] rorra: has joined #ruby
[16:50:59] hk238: has joined #ruby
[16:52:16] nobitanobi: has joined #ruby
[16:52:22] RegulationD: has joined #ruby
[16:53:48] flashpoint9: has joined #ruby
[16:54:40] dikaio: has joined #ruby
[16:54:57] goodroot: has joined #ruby
[16:56:49] blackmes1: has joined #ruby
[16:57:51] rorra: has joined #ruby
[16:57:58] nobitanobi: has joined #ruby
[16:58:44] hahuang61: has joined #ruby
[16:59:23] symm-: has joined #ruby
[16:59:51] Ebok: has joined #ruby
[17:00:59] aegis3121: has joined #ruby
[17:01:26] sarbs: has joined #ruby
[17:01:42] Cohedrin: has joined #ruby
[17:04:07] mattwashere: has joined #ruby
[17:04:30] gizmore: has joined #ruby
[17:06:19] jaguarmagenta: has joined #ruby
[17:06:29] aegis3121: has joined #ruby
[17:06:51] djbkd: has joined #ruby
[17:08:01] lxsameer: has joined #ruby
[17:08:18] Sirecote: has joined #ruby
[17:08:27] blackmes1: has joined #ruby
[17:08:29] Yiota: has joined #ruby
[17:09:08] ctp: has joined #ruby
[17:09:16] chouhoulis: has joined #ruby
[17:11:21] QORRiE: has joined #ruby
[17:11:53] kgrz: has joined #ruby
[17:14:32] arpegius: has joined #ruby
[17:14:49] ledestin: has joined #ruby
[17:15:31] zacts: hi rubyists
[17:16:43] firstdayonthejob: has joined #ruby
[17:17:16] foobarbaz322: has joined #ruby
[17:17:17] jaruga____: has joined #ruby
[17:17:23] snowy: has joined #ruby
[17:17:27] ljames: has joined #ruby
[17:17:42] babblebre: has joined #ruby
[17:17:57] Devalo: has joined #ruby
[17:19:08] agentmeerkat: has joined #ruby
[17:19:39] CausaMortis: has joined #ruby
[17:23:14] sneakerhax: has joined #ruby
[17:24:58] diego1: has joined #ruby
[17:25:43] karapetyan: has joined #ruby
[17:27:58] Yiota: has joined #ruby
[17:29:08] PedramT: has joined #ruby
[17:30:41] jgt: has joined #ruby
[17:30:55] Eiam_: has joined #ruby
[17:31:42] malconis: has joined #ruby
[17:32:09] startupality: has joined #ruby
[17:32:33] chopin_: has joined #ruby
[17:33:05] freerobby: has joined #ruby
[17:33:11] malconis: has joined #ruby
[17:33:18] bmurt: has joined #ruby
[17:33:53] Musashi007: has joined #ruby
[17:35:11] LastWhisper____: has joined #ruby
[17:35:15] shinnya: has joined #ruby
[17:36:31] blackmes1: has joined #ruby
[17:37:02] jenrzzz: has joined #ruby
[17:37:02] jenrzzz: has joined #ruby
[17:39:00] last_staff: has joined #ruby
[17:40:36] PedramT: has joined #ruby
[17:42:25] bazzy: im trying to get involved in TDD in general.
[17:42:30] diego1: has joined #ruby
[17:43:21] bazzy: i program in several languages and hoping to translate what i learn now with ruby to eg. python or cpp
[17:43:30] jaiks: has joined #ruby
[17:44:49] bronson: has joined #ruby
[17:44:52] bazzy: i started comprehending rspec today ... and i am always considering the "abstraction" of a useful testing framework for any language (or at least from the ones i mentioned)
[17:45:39] ramfjord: has joined #ruby
[17:45:41] brunto: has joined #ruby
[17:45:45] bazzy: there seems to be a hurdle that i just have to jump over.. as far as taking example tutorials bit then applying it to my own practice.. large
[17:46:03] gigetoo: has joined #ruby
[17:46:17] bazzy: largely considering that a lot the codebases i maintain have pre-existing code that needs tests created for it...
[17:47:33] bazzy: so i almost need to a "2-pass" phase where first i write tests (somehow) for the pre-existing code, and then after that, write new code in a TDD style (tests first)
[17:48:15] bazzy: Does anyone have tips or advice for me?
[17:48:33] bazzy: i can summarize my interests
[17:49:36] aphprentice: has joined #ruby
[17:50:01] bazzy: i a multi-lingual programmer, who not only wants to TDD across languages, but is going to get started first with a project maintained in ruby. i appreciate unit testing and functional/integration tests (same thing)?
[17:50:09] noService: has joined #ruby
[17:50:42] A124: has joined #ruby
[17:50:47] bazzy: just wondering if people have tips other than me just "diving in" with rspec, which my plan is
[17:53:39] DanyC: has joined #ruby
[17:54:16] Don_John: has joined #ruby
[17:54:23] laska_: has joined #ruby
[17:55:25] blandflakes: has joined #ruby
[17:55:52] Ebok: has joined #ruby
[18:02:45] chouhoulis: has joined #ruby
[18:03:04] stannard: has joined #ruby
[18:03:04] soahccc: I have a string and I need to escape it so that I can parse it with optparse again like this: -o name="value" where value might contain quotes or backslashes. The input comes back as it is (there is no shell so shellescape doesn't work properly). What is the easiest way to achieve this?
[18:04:28] gigetoo: has joined #ruby
[18:04:37] apeiros: soahccc: optparse works on arrays, and it'd hence be shellsplit
[18:05:30] jancel: has joined #ruby
[18:06:08] JoshGlzBrk: has joined #ruby
[18:06:46] soahccc: apeiros: I'm afraid I didn't understand that. The problem is that shellescape for example escapes the = sign and it then comes back as "\=" since there is no shell to strip the backslash away
[18:07:19] apeiros: soahccc: how do you feed your string to optparse?
[18:08:03] Pumukel: has joined #ruby
[18:08:04] soahccc: apeiros: you mean how I get the args?
[18:08:24] soahccc: the array I put into parse! I mean
[18:08:27] apeiros: no. I mean how you "parse it with optparse again", as you phrased it
[18:09:05] apeiros: right, parse!. and as you just said, parse! takes an array, not a string. so you don't need to escape your string. you need to split it into an array.
[18:09:05] senayar: has joined #ruby
[18:09:09] apeiros: and shellsplit does that
[18:09:19] whathappens: has joined #ruby
[18:09:25] soahccc: apeiros: so I'm doing something like an IRC bot. I want to build a command you can paste as is but it comes back the same way (no special characters). That's where the args come from (parsing a log)
[18:09:58] whathapp_: has joined #ruby
[18:10:38] sumobob: has joined #ruby
[18:11:14] bluOxigen: has joined #ruby
[18:11:39] chouhoulis: has joined #ruby
[18:12:07] CrazyEddy: has joined #ruby
[18:12:44] CoderPuppy: has joined #ruby
[18:14:14] soahccc: apeiros: https://gist.github.com/2called-chaos/f6358e9cd70ce4790f4d4c16f3259db7
[18:14:56] soahccc: apeiros: the backslash before the = comes from my try with shellescape
[18:15:02] stannard: has joined #ruby
[18:15:48] Ishido: has joined #ruby
[18:15:57] soahccc: apeiros: and it could be e.g. "moep=something with spaces and "quotes" and \slashes" (raw value) so I need to escape \ and " am I right?
[18:16:08] idefine: has joined #ruby
[18:17:30] jenrzzz: has joined #ruby
[18:17:30] jenrzzz: has joined #ruby
[18:17:55] charliesome: has joined #ruby
[18:18:35] apeiros: within the array, you don't need to escape anything anymore. escaping is done so individual arguments are recognized correctly. which is what happens when you go from string to array.
[18:19:18] Yiota: has joined #ruby
[18:21:27] soahccc: apeiros: which array do you mean? The problem I have is with building a string that later can be parsed again where the value might contain any character (so I need to escape some characters)
[18:21:54] apeiros: which array: line 5
[18:22:13] apeiros: I somewhat get the vibe that you don't understand your own problem…
[18:22:18] soahccc: apeiros: that's just what I get (the exact same as the input just space-separated)
[18:22:54] apeiros: let me ask again: how do you go from your input string to that array in line 5?
[18:23:07] _blizzy_: has joined #ruby
[18:23:13] soahccc: apeiros: it's just a line_in_log.split(" ")
[18:23:25] apeiros: ok. then you did *not* read what I wrote.
[18:23:31] soahccc: apeiros: the double slash is just because of the inspect
[18:23:33] apeiros: use shellsplit. not split.
[18:23:52] jaiks: has joined #ruby
[18:24:20] sumobob: help I keep getting errors when trying to upgrade my ruby! I'm using rbenv and I keep getting "The Ruby yaml extension was not compiled."
[18:25:33] Coldblackice: has joined #ruby
[18:26:32] soahccc: apeiros: oh thanks, now I understand :) I had a brain fart there
[18:28:55] djbkd: has joined #ruby
[18:29:48] cpup: has joined #ruby
[18:29:50] ramfjord: has joined #ruby
[18:31:22] shevy: your naughty brain
[18:31:29] jenrzzz_: has joined #ruby
[18:33:19] blaxter: has joined #ruby
[18:34:37] postmodern: has joined #ruby
[18:36:39] Devalo: has joined #ruby
[18:38:11] freerobby: has joined #ruby
[18:38:19] djbkd: has joined #ruby
[18:38:25] jackjackdripper: has joined #ruby
[18:39:10] stannard: has joined #ruby
[18:39:14] shevy: sumobob you probably don't have libyaml http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz
[18:40:50] sumobob: brew installing it right now shevy
[18:41:34] jancel: has joined #ruby
[18:42:20] nankyokusei: has joined #ruby
[18:44:11] _biox: has joined #ruby
[18:44:26] jdawgaz: has joined #ruby
[18:44:50] _biox: Hello! I'm looking to learn ruby, and I read that "Learn to Program" by Chris Pine is a good place to start. Has anyone here had experience with that book?
[18:44:56] marxarelli: has joined #ruby
[18:45:29] pawnbox: has joined #ruby
[18:47:39] spider-mario: has joined #ruby
[18:48:25] djbkd: has joined #ruby
[18:50:00] yos7ph: has joined #ruby
[18:50:41] jhack: has joined #ruby
[18:51:06] aswen: has joined #ruby
[18:51:28] B1n4r10: has joined #ruby
[18:53:18] duncannz: has joined #ruby
[18:54:01] dreinull: has joined #ruby
[18:54:21] dreinull: is there a template converter that converts any given tilt/temple template to erb?
[18:55:49] noService: has joined #ruby
[18:57:07] Ebok: has joined #ruby
[18:57:23] apeiros: I think it'd require quite some desperation to write something like that
[18:58:50] stannard: has joined #ruby
[18:59:57] nobitanobi: has joined #ruby
[19:00:35] sumobob: shevy: same error even with a brew install libyaml
[19:00:54] Asher: has joined #ruby
[19:01:01] bruno-: has joined #ruby
[19:01:04] jdawgaz: has joined #ruby
[19:01:17] bmurt: has joined #ruby
[19:01:30] roshanavand: has joined #ruby
[19:01:39] dreinull: apeiros well…
[19:03:05] sumobob: heres a stack trace of my install and the error warnings http://pastebin.com/FA1wYQNk
[19:03:06] ruby[bot]: sumobob: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/6ef4c8998ba74e4d4c80b7a0d35ef65b
[19:03:07] ruby[bot]: sumobob: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[19:03:40] bluOxigen: has joined #ruby
[19:04:10] shmuli: has joined #ruby
[19:05:07] chouhoulis: has joined #ruby
[19:05:20] lxsameer: has joined #ruby
[19:06:44] Dry_Lips: has joined #ruby
[19:06:44] Dry_Lips: has joined #ruby
[19:07:58] CoderPuppy: has joined #ruby
[19:08:05] halfamind: has joined #ruby
[19:08:54] theRealAlexz: has joined #ruby
[19:08:58] slackbotgz: has joined #ruby
[19:09:28] sdothum: has joined #ruby
[19:09:48] Milos|Work: has joined #ruby
[19:10:17] halfamind: I have strings in a database, some of which report `encoding` of utf-8, but are actually utf-8-mac. Does anyone know how I can identify them?
[19:10:44] shevy: sumobob hmmm
[19:11:14] sumobob: trying to reinstall libyaml with --universal
[19:11:21] jwren: has joined #ruby
[19:11:23] sumobob: my ruby 2.1 runs fine haha
[19:11:42] shevy: I had precisely this error message too
[19:11:45] apeiros: halfamind: what's utf-8-mac supposed to be?
[19:11:50] shevy: however had I am using linux and directly from the source
[19:12:06] shevy: after I compiled libyaml into /usr as prefix, and recompiled ruby, it found the libyaml there and installed it
[19:12:32] apeiros: oh, perl module explains it - people who don't understand decomposition need a new name for it…
[19:13:22] sumobob: i could build it from source too
[19:13:35] apeiros: halfamind: do you really need to identify it? or do you just simply want to normalize them to "normal" utf-8 (quotes since it's all just normal utf-8 really)
[19:13:44] stannard: has joined #ruby
[19:13:52] lulzmachine_: has joined #ruby
[19:14:13] simon__: has joined #ruby
[19:14:21] simon__: Greetings ruby people!
[19:14:38] stannard: has joined #ruby
[19:15:23] simon__: So, I am just now diving into ruby. I am tryin to play with the API from Censys here. I am having issues priting the results of my queries but I suspect that my issues are very basic.
[19:15:46] Ebok: has joined #ruby
[19:16:15] simon__: For example: response = api.ipv4.search(query: 'dropbox.com') how do I print the results from that query? I've tried multiple things and the output I get is not the output I want. It looks like "#<CenSys::Search::IPv4:0x0000000260f548 @attributes={"ip"=>"199.47.217.68", "protocols"=>" for example.
[19:16:29] simon__: What I really want to do is proint the IP address, etc.
[19:17:10] shmuli: has joined #ruby
[19:17:24] djellemah: has joined #ruby
[19:17:28] jackjackdripper: has joined #ruby
[19:18:11] halfamind: apeiros: I think I need to identify them. In this case, I'm trying to clean up the strings so that they work for downloading from S3. str.encode('utf-8', 'utf-8-mac') makes strings usable *if* they're utf-8-mac, but otherwise breaks them. The problem is that both types report encoding of utf-8.
[19:18:57] apeiros: huh? given that both is technically utf-8, that sounds like a bug. how do you figure they are broken afterwards?
[19:19:00] noobsu: has joined #ruby
[19:20:15] simon__: Here's the code I am trying to write.
[19:20:16] simon__: http://pastebin.com/LVPA1s7X
[19:20:16] ruby[bot]: simon__: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/2921f81958d08c431ea14135a9a5607c
[19:20:18] ruby[bot]: simon__: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[19:20:20] jackjackdripper1: has joined #ruby
[19:20:52] halfamind: apeiros: Calling .encode('utf-8', 'utf-8-mac') on a UTF-8 string with multibyte characters appears to alter the string. At least, the length is shorter and character ordinals different.
[19:20:56] simon__: Any help would be great, here's the sample that I am working on. https://gist.github.com/2921f81958d08c431ea14135a9a5607c
[19:21:07] jackjackdripper: has joined #ruby
[19:21:15] apeiros: halfamind: yes, the different normalizations are reported differently by ruby. that's expected. that doesn't mean it is broken.
[19:21:37] GodFather: has joined #ruby
[19:21:46] apeiros: and yes, the different normalizations also consist of different "character fragments" (forgot the correct term)
[19:21:58] apeiros: so both is expected when transforming one to the other.
[19:22:04] halfamind: Sorry, I didn't mean the string is broken, just that the string no longer works for that S3-downloading purpose.
[19:22:17] dgncn: has joined #ruby
[19:22:17] apeiros: unicode equivalent symbol
[19:22:21] apeiros: damn safari
[19:22:25] apeiros: every. single. time.
[19:22:31] apeiros: halfamind: https://en.wikipedia.org/wiki/Unicode_equivalence
[19:23:13] simon__: Is there anyone that can help me out here? This is a really simple issue and I'm a total novice with ruby. Again, here's my terrible code: https://gist.github.com/2921f81958d08c431ea14135a9a5607c
[19:23:36] apeiros: halfamind: then s3 has a problem with utf-8. because .encode('utf-8', 'utf-8-mac') with a non utf-8-mac string will *not* modify it
[19:23:41] shevy: apeiros did you not complain about that symbol not so long ago :D
[19:23:42] p0p0pr37: has joined #ruby
[19:23:44] apeiros: at least not those I tried
[19:24:14] apeiros: I'd be interested in seeing an actual string which does get modified.
[19:24:21] simon__: ACTION cries like a three year old toddler
[19:24:22] hi: has joined #ruby
[19:24:58] apeiros: halfamind: re that link I gave you, "utf-8-mac" is really utf-8 in NFD instead of the more common NFC
[19:25:17] Guest74620: I just finished my ror online bootcamp
[19:25:42] apeiros: also "All these algorithms are idempotent transformations, meaning that a string that is already in one of these normalized forms will not be modified if processed again by the same algorithm."
[19:26:07] simon__: ACTION looks at apeiros 
[19:26:16] Guest74620: still not very knowledgeable, did you guys get internships when you first started?
[19:26:16] apeiros: which is why treating utf-8 as utf-8-mac and transcoding it to utf-8 will not modify the string (or shouldn't)
[19:26:41] apeiros: Guest74620: I never did an internship, no
[19:26:45] ramortegui: has joined #ruby
[19:26:53] nerium: has joined #ruby
[19:27:10] Guest74620: did you just walk into a job?
[19:27:25] apeiros: it was more like the job walking into me
[19:27:27] simon__: apeiros: can you take a look at my crap code and point out what I need to do to print the output the way that I am trying to print it?
[19:27:37] synthroid: has joined #ruby
[19:27:57] apeiros: simon__: do you know pry or irb?
[19:28:16] Guest74620: cool, I'm doing a few projects but I'm current;y looking for jobs
[19:28:42] halfamind: apeiros: here's a quick demo (Ruby 2.1.6): https://gist.github.com/joeyAghion/5049d99d9722108f16382d6ffa8edac9
[19:29:00] sumobob: shevy: I've downloaded the tar ball, ran a configure a make and a make install, how do I do that last step "ompiled libyaml into /usr as prefix"
[19:29:16] simon__: apeiros: I can't say that I know either. i am just now startign to learn on my own. Was a C/C++ developer for a while (about 10 years ago now). Decided that I wanted to try playing with ruby to build a basic OSINT tool.
[19:29:31] morochena: has joined #ruby
[19:29:38] apeiros: halfamind: "Báe".each_codepoint.map(&:to_i) is a reeeeally convoluted way of saying "Báe".codepoints
[19:29:48] simon__: apeiros: I pasted the code here https://gist.github.com/2921f81958d08c431ea14135a9a5607c for people to look at. What I want to do is print the ip and protocols" attributes.
[19:30:07] halfamind: Thanks I figured there must be a better way...
[19:30:10] simon__: apeiros: I don't need / want to do anything fancy, I'll get books and study myself :)
[19:30:11] apeiros: simon__: do this right now: `gem install pry pry-doc`, and then: `pry -r pp -r censys`
[19:30:20] apeiros: simon__: and then run your code in there. you'll be happy. trust me.
[19:30:29] |2701: has joined #ruby
[19:30:31] ixti: has joined #ruby
[19:30:36] simon__: I'm very curious
[19:30:38] apeiros: then when you have a single response, do `ls ipresponse` (for example)
[19:31:08] apeiros: pry (or for some people irb) is one of the most basic and most often used tool in the ruby world. it's must-have must-know.
[19:31:14] apeiros: second in line would be `ri`
[19:31:39] chipotle: has joined #ruby
[19:31:49] apeiros: halfamind: that looks correct and expected to me
[19:31:57] simon__: apeiros: ok so, now what?
[19:32:03] elifoster: has joined #ruby
[19:32:08] Guest74620: i was taught to use irb, but my mentor used pry and i thought it was sweet
[19:32:12] apeiros: simon__: run your code line by line
[19:32:14] apeiros: it's interactive ruby
[19:32:20] apeiros: and you can try around easily
[19:32:22] simon__: Ah yes, but the code runs.
[19:32:33] apeiros: and `ls somvar` will show you all methods of `somevar`
[19:32:45] isjaylee: has joined #ruby
[19:32:59] halfamind: apeiros: But you said ".encode('utf-8', 'utf-8-mac') with a non utf-8-mac string will *not* modify it" and that string is not utf-8-mac.
[19:32:59] simon__: apeiros: my issue is that I am not priting my output correctly. I am not selecting what I want to print properly. IIRC it should be something like puts results[ip] bu that fails
[19:33:06] Guest74620: apeiros are you a senior dev
[19:33:30] isjaylee: how would i upload a file's content via a post call (without actually having to create the file on my machine)?
[19:33:30] simon__: apeiros: I have the exact code here https://gist.github.com/anonymous/2921f81958d08c431ea14135a9a5607c/f4691f03545b5ffd4116524ce8078f40c1f56527
[19:33:54] chouhoul_: has joined #ruby
[19:33:56] apeiros: Guest74620: on paper, yes. otherwise: what's your definition?
[19:34:07] laska_: has left #ruby: ()
[19:34:10] Guest74620: making bank lol
[19:34:17] zeroDi: has joined #ruby
[19:34:31] toretore: apeiros: i don't think i've ever used ri :)
[19:34:45] apeiros: halfamind: yes, it is
[19:34:47] sumobob: its nice when u dont have an internet connection :)
[19:34:54] apeiros: halfamind: as said, utf-8-mac *is* utf-8
[19:35:20] apeiros: utf-8-mac is a fancy (or less nicely put: a *stupid*) way to say "utf-8 in NFD
[19:35:48] toretore: sumobob: you can do `gem server` too
[19:36:07] laska: has joined #ruby
[19:36:26] p0p0pr37_: has joined #ruby
[19:36:37] Guest74620: has anyone else used pundit?
[19:37:16] simon__: apeiros: pry isn't helpong me because this isn't a debug issue as much as it is an issue with me understanding how to print the values taht I want to print.
[19:37:24] apeiros: toretore: nooooo, u do wrong!
[19:37:39] simon__: apeiros: hence wny I posted my code https://gist.github.com/anonymous/2921f81958d08c431ea14135a9a5607c/f4691f03545b5ffd4116524ce8078f40c1f56527 so that people to tell mewhat I did wrong.
[19:37:44] apeiros: simon__: part of that is figuring how to get at the value and that is finding the right method
[19:37:45] weaksauce: has joined #ruby
[19:37:50] toretore: apeiros: but how do i click the links with ri??
[19:37:58] apeiros: simon__: and pry + experimentation will let you figure that easily
[19:37:59] sonikspin: has joined #ruby
[19:38:01] toretore: there are no colors
[19:38:28] apeiros: toretore: you've a colorless shell? (though I actually don't remember how to get ri to do colors, but I'm pretty sure it can do it)
[19:38:37] simon__: apeiros: I was hopeful that you'd "just have an answer" to my silly code
[19:38:52] isjaylee: can i upload a file via it's contents through an api without actually having to have that file on my machine?
[19:40:01] toretore: apeiros: yeah it probably can make colors, i just don't know as i've never used it
[19:40:08] yfeldblum: has joined #ruby
[19:40:10] halfamind: apeiros: OK I will read up on NFC/NFD. In case you know, can I easily identify which form a particular string uses?
[19:40:39] apeiros: halfamind: I think you could craft a regex. rails' mb_chars might have a method for it.
[19:40:51] laska: has left #ruby: ()
[19:40:52] simon__: apeiros: this assumes that i understand pry, which.. I don't
[19:40:59] laska: has joined #ruby
[19:41:17] apeiros: halfamind: nope, just checked, mb_chars doesn't have one to identify. only to transform.
[19:41:32] halfamind: …craft a regex" <—I was afraid of that!
[19:41:49] apeiros: simon__: pry will just execute your ruby code. try to not use a loop (as the loop will be evaluated completely)
[19:42:11] apeiros: i.e. everywhere where you'd use a loop, get a single value instead and then do what you'd do in the loop
[19:42:53] xall: has joined #ruby
[19:42:59] isjaylee: has left #ruby: ()
[19:43:26] simon__: apeiros: my code is so simple
[19:43:32] simon__: its about 5 lines
[19:45:20] jenrzzz: has joined #ruby
[19:45:23] simon__: apeiros: the output currently looks like this ">>> Page #1 / 10 ...
[19:45:27] simon__: #<CenSys::Search::Response:0x0000000349cae8>
[19:46:57] TomyLobo: has joined #ruby
[19:47:43] simon__: apeiros: here's my latest revision to the code https://gist.github.com/anonymous/a2b4d2ab05533e93d794f536a2e8a701 pry didn't produce any output for me.
[19:48:32] idefine: has joined #ruby
[19:50:33] deadhound: has joined #ruby
[19:50:41] apeiros: simon__: you rn the code until ipresponse = … just like in your code. then instead of .each_page, you need to find a method to get you the first page, and do `page = ipresponse.method_for_the_first_page` (might be .pages.first). then you do `ls page`. try to figure which method it might be
[19:51:01] apeiros: and no, I will not go through the docs for you to figure it out for you. sorry. I rather tell you how you can figure it yourself.
[19:51:08] yqt: has joined #ruby
[19:51:27] apeiros: you can use `? ipresponse.some_method` to get the documentation for that method
[19:51:35] apeiros: (directly within pry)
[19:51:49] simon__: apeiros: ah ha! Ok let me try that
[19:55:06] johnmilton: has joined #ruby
[19:55:57] lxsameer: has joined #ruby
[19:56:25] SilverKey: has joined #ruby
[19:57:04] simon__: apeiros: ok so I am starting to understand the logic here. I did an ls on ipresponse from within pry and see a load of methods. I also see a bunch of instance variables, etc. So, from this, how do I print the values that I am looking to print? Specifically, how do I select the IP and Proptocol?
[19:57:56] haxrbyte: has joined #ruby
[19:59:41] apeiros: simon__: you "navigate" through that datastructure until you get the plain ip address
[20:00:37] apeiros: that is: page = ipresponse.<get a page somehow>; result = page.<get a result somehow>; ip = result.<get ip somehow>
[20:00:57] GodFather: has joined #ruby
[20:01:10] apeiros: and usually you can easily figure how to get to the value you want by the names of the methods
[20:02:01] roshanavand: has joined #ruby
[20:02:18] simon__: apeiros: and where can I find some documentation on how to do that navigation?
[20:02:35] kirun: has joined #ruby
[20:02:40] apeiros: via ls and ?
[20:02:41] senayar: has joined #ruby
[20:02:49] apeiros: ls tells you which methods you can call on the object you have at hand
[20:02:59] apeiros: and in case the name is useless, ? gives you the docs
[20:03:51] stannard: has joined #ruby
[20:03:54] yfeldblum: has joined #ruby
[20:04:19] haxrbyte: has joined #ruby
[20:04:39] frem_: has joined #ruby
[20:05:44] jhack: has joined #ruby
[20:07:28] gizless: has joined #ruby
[20:08:00] Ch4rAss: has joined #ruby
[20:08:27] jaiks: has joined #ruby
[20:08:40] jhack: has joined #ruby
[20:08:52] jancel: has joined #ruby
[20:09:12] yqt: has joined #ruby
[20:10:40] pawnbox: has joined #ruby
[20:10:43] papachan: has joined #ruby
[20:10:50] weaksauce: has joined #ruby
[20:12:58] johnmilton: has joined #ruby
[20:13:02] cdg: has joined #ruby
[20:13:21] gizmore: has joined #ruby
[20:13:29] arpegius: has joined #ruby
[20:13:55] djbkd: has joined #ruby
[20:17:38] jaruga___: has joined #ruby
[20:17:46] halfamind: has joined #ruby
[20:17:57] halfamind: has joined #ruby
[20:17:57] snowy: has joined #ruby
[20:18:33] jhack: has joined #ruby
[20:19:43] blackgoat: has joined #ruby
[20:19:52] idefine: has joined #ruby
[20:20:23] stannard: has joined #ruby
[20:20:32] jhack_: has joined #ruby
[20:21:31] idefine: has joined #ruby
[20:21:59] rodfersou: has joined #ruby
[20:24:00] konr: has joined #ruby
[20:24:31] crash_ovride: has joined #ruby
[20:24:47] sumobob: how do you do strong params if your endpoint receives a json array?
[20:26:19] dreinull: has left #ruby: ("undefined")
[20:26:26] startupality: has joined #ruby
[20:27:04] idefine: has joined #ruby
[20:29:14] chipotle: has joined #ruby
[20:29:30] skade: has joined #ruby
[20:30:09] djbkd: has joined #ruby
[20:30:28] simon__: Still having all sorts of issues with getting this code to print correctly
[20:31:21] Milos|Work: has joined #ruby
[20:31:25] haxrbyte: has joined #ruby
[20:31:57] gizless: has joined #ruby
[20:32:03] Milos|Work: Having something like [{"name" => "Bob1", "email" => "bob@bob.com"}, {"name" => "Bob2", "email" => "bob2@bob2.com"}] how do I get a string of emails separated by commas?
[20:32:25] auxbuss: has joined #ruby
[20:33:47] simon__: Milos|Work: I'm having the same type of issue here
[20:37:47] renderful: has joined #ruby
[20:38:23] startupality: has joined #ruby
[20:38:27] go|dfish: Milos|Work: array_of_hashes.map { |h| h['email'] }.join(',')
[20:39:20] nando293921: has joined #ruby
[20:39:44] jancel: has joined #ruby
[20:40:50] bruce_lee: has joined #ruby
[20:40:50] bruce_lee: has joined #ruby
[20:41:47] lomex: has joined #ruby
[20:42:04] Milos|Work: go|dfish, just figured that out a minute ago thank you!
[20:46:03] Icey: has joined #ruby
[20:46:04] skade: has joined #ruby
[20:46:45] Pumukel: has joined #ruby
[20:46:58] dvinciguerra: has joined #ruby
[20:49:15] chipotle: has joined #ruby
[20:49:40] Guest43: has joined #ruby
[20:49:40] Guest43: has joined #ruby
[20:51:34] panpainter: has joined #ruby
[20:51:51] bronson: has joined #ruby
[20:51:58] dvinciguerra: has joined #ruby
[20:54:01] GodFather: has joined #ruby
[20:54:59] gizless: has joined #ruby
[20:58:20] stannard: has joined #ruby
[20:58:36] cpup: has joined #ruby
[20:59:37] papachan: has joined #ruby
[20:59:51] theRealAlexz: has joined #ruby
[20:59:51] theRealAlexz: has joined #ruby
[21:00:04] Eiam_: has joined #ruby
[21:00:06] bobbycvi: has joined #ruby
[21:01:56] simon__: can someone please help me
[21:01:59] simon__: I am having one hell of a time
[21:02:46] havenwood: simon__: What's the problem? What do you have and what do you want?
[21:03:42] simon__: havenwood: I'll publish to pastebin one moment
[21:04:38] adaedra: s/pastebin/gist/
[21:04:52] minimalism: has joined #ruby
[21:05:31] theRealAlexz: has joined #ruby
[21:05:40] sp4rrow: has joined #ruby
[21:05:46] simon__: havenwood: http://pastebin.com/70jq5JyC
[21:05:46] ruby[bot]: simon__: as I told you already, please use https://gist.github.com
[21:06:47] pwnd_nsfw: has joined #ruby
[21:06:51] anthony: has joined #ruby
[21:07:40] jaguarmagenta: has joined #ruby
[21:07:46] pwnd_nsfw: has joined #ruby
[21:07:55] simon__: havenwood: https://gist.github.com/anonymous/b20e9950a1fd7a2fa43fd1b70e8ba220
[21:08:04] simon__: havenwood: that is my code, I am new to ruby
[21:08:12] replay: has joined #ruby
[21:08:13] simon__: havenwood: just looking for OSINT reasons
[21:08:24] havenwood: simon__: if you name the gist `code_help.rb` it'll have nice syntax highlighting
[21:08:29] bmurt: has joined #ruby
[21:08:39] chouhoulis: has joined #ruby
[21:08:39] havenwood: simon__: and folk can clone it that way and run it
[21:08:40] simon__: havenwood: I will do that
[21:09:29] simon__: havenwood: https://gist.github.com/anonymous/864553fae701df583e24fbeefc170b1c
[21:09:34] havenwood: for future reference you can also add multiple files to a gist
[21:09:39] jancel: has joined #ruby
[21:09:49] simon__: havenwood: so, I understand the basic concept here. I do not understand how to get at the data that I want.
[21:10:02] Dimik: has joined #ruby
[21:10:15] havenwood: simon__: what does it currently pring?
[21:10:21] chrismytton: has joined #ruby
[21:10:22] tAn: has joined #ruby
[21:10:26] simon__: havenwood: i;ll show you a sample
[21:10:43] lancetw: has joined #ruby
[21:11:09] simon__: havenwood: lines similar to this: #<CenSys::Search::IPv4:0x00000001dc73b8> and it also prints the page / page number
[21:11:25] havenwood: simon__: add the desired and actual output to your gist
[21:11:28] jhill: has joined #ruby
[21:11:45] havenwood: i've got to relocate but a well formulated question is likely to get a response!
[21:12:08] simon__: let me rebud the gis with multiple files
[21:12:55] diegoviola: has joined #ruby
[21:13:35] gizmore: has joined #ruby
[21:14:18] linduxed: has joined #ruby
[21:14:32] ur5us: has joined #ruby
[21:15:40] CoderPuppy: has joined #ruby
[21:16:09] simon__: havenwood: https://gist.github.com/anonymous/946d96b6ce2e76c0b644e759bacc4883
[21:16:19] simon__: broken down into multiple files for ya
[21:16:29] skade: has joined #ruby
[21:17:16] havenwood: simon__: you can just: puts page
[21:17:18] Gasher: has joined #ruby
[21:17:29] havenwood: #puts does a newline for each element automagically
[21:17:34] havenwood: *just an aside
[21:18:02] simon__: havenwood: nope
[21:18:09] havenwood: really gotta relocate! i'll check back in later if you don't get a response
[21:18:27] simon__: havenwood: when I do puts page it just dumps more of the same garble
[21:18:31] simon__: havenwood: ok
[21:18:46] havenwood: simon__: you might show the #p output instead of #puts
[21:18:50] havenwood: #p is handy for debugging
[21:18:59] havenwood: i haven't had a chance to look closely
[21:19:02] idefine: has joined #ruby
[21:19:20] startupality: has joined #ruby
[21:19:23] havenwood: linger here, i bet you'll get an answer! thanks for making the gist nicer. :)
[21:19:33] chipotle: has joined #ruby
[21:19:44] nerium: has joined #ruby
[21:20:00] whathapp_: has joined #ruby
[21:20:31] snowy: has joined #ruby
[21:20:36] tomchapin: has joined #ruby
[21:20:58] GodFather: has joined #ruby
[21:21:01] whathappens: has joined #ruby
[21:21:41] theRealAlexz: has joined #ruby
[21:21:41] theRealAlexz: has joined #ruby
[21:22:09] simon__: Can someone please help me with this? https://gist.github.com/anonymous/946d96b6ce2e76c0b644e759bacc4883
[21:23:05] smathy: simon__, you're just printing out the objects, instead of calling whatever methods on them the API defines.
[21:23:06] kgrz: has joined #ruby
[21:23:34] tAn: has joined #ruby
[21:24:16] sonikspin: has joined #ruby
[21:24:24] simon__: smathy: si how do I callthe methods?
[21:25:01] simon__: I think I provided a list of them in the data
[21:25:05] smathy: simon__, well how did you work out how to print out the current page and total pages?
[21:25:18] simon__: smathy: I stole it from an example :)
[21:25:26] simon__: smathy: https://github.com/trailofbits/censys-ruby
[21:25:47] pawnbox: has joined #ruby
[21:26:11] simon__: smathy: what you said makes sense to me, but now I need to understand how to get to where I need to be. Specifically, how do I figure out what the methods are and how do I call them?
[21:26:31] simon__: smathy: like I said, new to ruby but I am a damn fast learner
[21:28:43] papachan: has joined #ruby
[21:28:55] simon__: smathy: any direction?
[21:29:25] smathy: simon__, unfortunately there's no docs, and it looks like it's been pulled from rubygems so it won't even generate any. So just look through the various classes.
[21:30:13] smathy: simon__, so you're printing `page` and that's an object, and there's a default stringifier for all ruby objects so they can always be printed.
[21:30:19] cpup: has joined #ruby
[21:30:27] mdw: has joined #ruby
[21:30:33] simon__: smathy: right that makes sense
[21:30:44] idefine: has joined #ruby
[21:30:44] simon__: smathy: what I want to print is different
[21:31:59] smathy: simon__, that's what that #<CenSys::Search::IPv4:0x00000001ccd3b8> is - basically the class and the unique id of that object.
[21:32:07] gizless: has joined #ruby
[21:32:19] smathy: simon__, if you want to pull out other data from that then you'll want to find methods for that class.
[21:32:30] simon__: smathy: Ok
[21:32:39] simon__: smathy: I have the code to the Search class
[21:32:57] jancel: has joined #ruby
[21:33:11] smathy: simon__, well that's not what's being returned.
[21:33:29] smathy: simon__, everything before the single colon and object id is the class name.
[21:33:35] gizmore|2: has joined #ruby
[21:33:51] simon__: smathy: so its CenSys::Search::IPv4
[21:33:52] smathy: simon__, and you can find all those files in the repo that you linked to above, under `lib`
[21:34:06] simon__: smathy: ok let me search
[21:36:13] simon__: smathy: would this be it (screen shot) https://www.dropbox.com/s/35oprqojspj7z23/Screenshot%202016-05-11%2017.35.59.png?dl=0
[21:36:27] jdawgaz: has joined #ruby
[21:37:09] simon__: smathy: ok so far I'm following
[21:37:17] simon__: smathy: so now what?
[21:37:32] smathy: simon__, so, `address` and `protocols` are both methods on the object you're currently printing.
[21:38:01] simon__: smathy: so in otherwords they are both functions on the object
[21:38:14] simon__: smathy: so how do I print their value?
[21:38:28] smathy: simon__, take a guess based on the other code you've seen and copied.
[21:39:15] simon__: smathy: puts page.protocol
[21:39:56] stannard: has joined #ruby
[21:39:58] smathy: simon__, try it.
[21:40:05] startupality: has joined #ruby
[21:40:36] simon__: smathy: ./censys.rb:20:in `block in <main>': undefined method `protocol' for #<CenSys::Search::Response:0x00000001e229c0> (NoMethodError)
[21:40:46] simon__: smathy: so that's a different class
[21:41:46] nando293921: has joined #ruby
[21:42:19] smathy: simon__, right, so was `page` what you were printing out?
[21:43:01] startupality: has joined #ruby
[21:43:36] simon__: smathy: this is starting to make sense
[21:44:11] simon__: smathy: so I am looking at the response class now
[21:44:15] simon__: it is different
[21:44:33] smathy: simon__, of course :) But you've gone one step in the wrong direction.
[21:44:44] simon__: smathy: it is here https://github.com/trailofbits/censys-ruby/blob/master/lib/censys/search/response.rb
[21:44:51] simon__: smathy: I have?
[21:44:54] smathy: simon__, yes.
[21:45:08] simon__: smathy: let me guess, I need to stick with the first method
[21:45:21] gizmore: has joined #ruby
[21:45:25] smathy: simon__, remember when we were talking about the output, ie. the #<CenSys::Search::IPv4:0x00000001cccfa8> ?
[21:45:41] smathy: simon__, what line of code in your program is responsible for that?
[21:46:49] simon__: smathy:line 11
[21:47:25] simon__: smathy: so I changed it to puts result.protocol
[21:47:51] smathy: simon__, right, so what variable is your CenSys::Search::IPv4 object in?
[21:48:07] smathy: Right, so now you have a different problem.
[21:48:22] simon__: it was in the protocol variable
[21:48:23] smathy: simon__, take a close look at the names of the methods on CenSys::Search::IPv4
[21:48:52] simon__: attributes?
[21:49:16] simon__: smathy: looking here just to be clear https://github.com/trailofbits/censys-ruby/blob/master/lib/censys/search/ipv4.rb
[21:49:29] smathy: Yes, look at the method names, the "functions" as you call them.
[21:49:48] simon__: address and protocols
[21:49:56] smathy: Right, and what are you trying to call?
[21:50:22] simon__: smathy: oh my
[21:50:36] simon__: smathy: you mean to tell me... this reminds me of c++ and the missing ;
[21:50:46] simon__: smathy: thank you!!!!
[21:51:22] simon__: smathy: so onemore question
[21:51:37] simon__: how do I print this side by side "IP" "Proto"
[21:51:50] simon__: I think I can figure it out
[21:52:57] smathy: simon__, at some point you'll want to head on over to https://www.ruby-lang.org/en/documentation/ and work through some of the material there.
[21:53:02] gooodroot: has joined #ruby
[21:53:38] simon__: smathy: for sure!
[21:54:29] simon__: smathy: so this is strange. protocls prints just fine, but addresses does not
[21:54:49] smathy: Look at the methods again.
[21:55:25] jgt: has joined #ruby
[21:56:05] simon__: smathy: when I look at the "data" I see this @attributes={"ip"=>"108.160.172.205", "protocols"=>["443/https"]}>,
[21:56:09] startupality: has joined #ruby
[21:56:22] bruno-: has joined #ruby
[21:56:26] smathy: simon__, yes, that's the internal instance variables of the object.
[21:56:28] simon__: smathy: when I look at the method I see def address
[21:56:40] smathy: simon__, right, so why would you try to call addresses ?
[21:56:41] simon__: smathy: but I also see an alias or something?
[21:56:59] smathy: simon__, yeah, ignore that for the time being.
[21:57:15] simon__: smathy: I am calling "puts result.address"
[21:57:30] simon__: and its not returning a single thing, just whitespace
[21:57:30] smathy: Cool, that should work (you said you were calling `addresses` before)
[21:57:41] smathy: Update your gist.
[21:57:41] simon__: smathy: ah ok my bad
[21:59:01] simon__: smathy: https://gist.github.com/anonymous/c026fdd8e870bf244a786af24f0a974c
[21:59:02] smathy: simon__, oh, wait a sec :) That code is buggy.
[21:59:17] simon__: smathy: go figure.
[21:59:22] smathy: It's returning @attributes['address'] where it should be returning @attributes['ip']
[21:59:45] simon__: so modify the class to say ip
[21:59:55] panpainter: has joined #ruby
[22:00:29] smathy: simon__, yeah, if you want, and/or submit a pull request to the author with the bugfix :)
[22:02:05] simon__: I fixed it
[22:02:13] simon__: smathy: ok
[22:02:19] smathy: It's a very new gem, with very light test coverage, this won't be the only bug you find :)
[22:02:25] simon__: smathy: so one last question now... how do I print this on one line?
[22:02:37] simon__: smathy: that's good by me, I like playing with new things
[22:02:48] smathy: Either using string interpolation or concatenation.
[22:03:31] arpegius: has joined #ruby
[22:04:11] simon__: something like " puts "IP Address:".result.address"Protocols"results.protocols"
[22:04:15] ftj: has joined #ruby
[22:05:06] smathy: simon__, if "something like" is at a very conceptual level yes, just google it.
[22:07:57] bronson: has joined #ruby
[22:09:08] halfamind: has joined #ruby
[22:09:23] jdawgaz: has joined #ruby
[22:11:02] kareeoleez: has joined #ruby
[22:11:03] benlieb: has joined #ruby
[22:14:06] goooodroot: has joined #ruby
[22:14:50] senayar: has joined #ruby
[22:15:24] ftj: has joined #ruby
[22:16:17] bruno-: has joined #ruby
[22:19:44] papachan: has joined #ruby
[22:21:11] nankyokusei: has joined #ruby
[22:22:16] bmurt: has joined #ruby
[22:22:49] replay: has joined #ruby
[22:24:03] jenrzzz: has joined #ruby
[22:24:03] jenrzzz: has joined #ruby
[22:24:06] ivanskie: has joined #ruby
[22:24:37] Madplatypus: has joined #ruby
[22:25:05] Yiota: has joined #ruby
[22:26:34] rkazak: has joined #ruby
[22:26:47] jancel: has joined #ruby
[22:26:51] halfamind: has joined #ruby
[22:27:14] halfamind1: has joined #ruby
[22:31:23] Yiota: has joined #ruby
[22:31:59] mtkd: has joined #ruby
[22:37:05] zenlot6: has joined #ruby
[22:37:18] Azure: has joined #ruby
[22:37:50] bmurt: has joined #ruby
[22:38:50] pawnbox: has joined #ruby
[22:41:06] idefine: has joined #ruby
[22:42:23] Rixius: has joined #ruby
[22:47:30] idefine_: has joined #ruby
[22:50:44] SilverKey: has joined #ruby
[22:51:25] Parko: has joined #ruby
[22:52:05] idletask: has joined #ruby
[22:54:05] Yiota: has joined #ruby
[22:55:15] Musashi007: has joined #ruby
[22:58:17] bmurt: has joined #ruby
[22:59:57] dfockler: has joined #ruby
[23:00:38] impermanence: has joined #ruby
[23:01:19] panpainter: has joined #ruby
[23:06:24] jgt: has joined #ruby
[23:08:30] BtcBen: has joined #ruby
[23:08:32] jaguarmagenta: has joined #ruby
[23:08:56] CoderPuppy: has joined #ruby
[23:10:33] BtcBen: has left #ruby: ()
[23:15:09] wspider: has joined #ruby
[23:15:34] Amnez777: has joined #ruby
[23:15:39] yxhuvud: has joined #ruby
[23:15:50] DEac-: has joined #ruby
[23:15:59] steve: has joined #ruby
[23:16:01] WebDawg: has joined #ruby
[23:17:02] fold4: has joined #ruby
[23:18:07] rbennacer: has joined #ruby
[23:19:16] millerti: has joined #ruby
[23:19:38] cpup: has joined #ruby
[23:20:26] gregf: has joined #ruby
[23:20:41] laska: has joined #ruby
[23:21:25] Azure: has joined #ruby
[23:27:11] eljimbo: has joined #ruby
[23:27:18] rbennacer: has joined #ruby
[23:27:21] jancel: has joined #ruby
[23:27:32] ramfjord_: has joined #ruby
[23:28:12] duoi: has joined #ruby
[23:28:14] zarubin: has joined #ruby
[23:28:14] pawnbox: has joined #ruby
[23:28:31] xlegoman: has joined #ruby
[23:30:30] GodFather: has joined #ruby
[23:34:05] helpa-bot: has joined #ruby
[23:37:02] imperman1nce: has joined #ruby
[23:37:03] gregf: has joined #ruby
[23:37:04] watersoul_: has joined #ruby
[23:37:06] zenlot6: has joined #ruby
[23:38:14] helpa: has joined #ruby
[23:38:59] idefine: has joined #ruby
[23:40:20] wrkrcoop: has joined #ruby
[23:40:29] wrkrcoop: is there any easy way to convert bytes to json?
[23:40:41] Sammichmaker: has joined #ruby
[23:41:26] rbennacer: has joined #ruby
[23:41:53] rkazak: has joined #ruby
[23:42:42] mar77i: has left #ruby: ()
[23:45:54] Arahael: wrkrcoop: Sure, you could base64 it.
[23:46:03] jolamb: has joined #ruby
[23:46:08] Arahael: wrkrcoop: And wrap it up in quotation marks.
[23:46:20] idefine: has joined #ruby
[23:47:01] cdg: has joined #ruby
[23:47:07] wrkrcoop: arahael: so i have the byets, then convert them to base64?
[23:47:43] Arahael: wrkrcoop: Sure.
[23:48:04] Arahael: wrkrcoop: Mind you, this is a tongue in cheek comment. It's an easy way, sure, but it's also a stupid way. For what purpsoe do you want it to be in json?
[23:48:15] Arahael: wrkrcoop: Why do you want it in json?
[23:48:19] Eiam_: has joined #ruby
[23:48:29] idefine: has joined #ruby
[23:48:29] Arahael: wrkrcoop: Once you have it in json, how should the data be used? What do the bytes mean?
[23:49:21] deadhound1: has joined #ruby
[23:49:39] wrkrcoop: arahael: well idk for some reason the data is coming in as bytes and i need to send it out as json
[23:49:51] deadhound1: has joined #ruby
[23:50:16] deadhound1: has joined #ruby
[23:50:32] deadhound1: has left #ruby: ()
[23:50:33] rbennacer: has joined #ruby
[23:51:11] Arahael: wrkrcoop: As a programmer, you should be more precise.
[23:51:15] stardiviner: has joined #ruby
[23:51:21] Arahael: wrkrcoop: Own your data. Own the problem, and solve it.
[23:51:24] skweek: has joined #ruby
[23:51:44] wrkrcoop: arahael: i haven’t been given the project yet so idk what the details are. thanks
[23:52:12] Arahael: So you have no specification. Wonderful.
[23:54:20] griffindy: has joined #ruby
[23:55:07] rbennacer: has joined #ruby
[23:55:38] karmatr0n: has joined #ruby
[23:57:36] CloCkWeRX: has joined #ruby
[23:58:38] Moosashi: has joined #ruby
[23:59:13] Vile`: has joined #ruby
[23:59:36] ensyde__: has joined #ruby