« Back to channel list

#ruby - 16 December 2015

« Back 1 day Forward 1 day »
[00:00:15] acovrig: jhass: yea, I would trust the code, but I updated my gist (https://gist.github.com/acovrig/57d58cdc924b8086733d) with output.txt and my current parse.rb
[00:00:57] jhass: acovrig: that be the no or 1 child td case
[00:01:05] jhass: whatever comes first
[00:01:40] ta: has joined #ruby
[00:01:42] jhass: well, nvm it must be the only 1 case
[00:02:04] jhass: though that would fail on the [1] too
[00:02:20] jhass: sure line 12 is still line 12 in your gist?
[00:02:40] shevy: jhass have you been coding anything interesting in crystal as of late?
[00:03:40] Bellthoven: has joined #ruby
[00:03:49] jhass: shevy: p.jhass.eu was still the last thing
[00:04:14] jhass: acovrig: doc.xpath('//table[@id="ctl00_ContentPlaceHolder1_GridView1"]/tr').each_with_object(Hash.new(0)) {|row, counts| counts[row.xpath(".//td").count] += 1 }
[00:04:16] jhass: => {24=>2, 0=>1, 11=>50}
[00:04:28] jhass: that HTML is crazy, random divs in the middle of the <tr>
[00:04:52] idefine: has joined #ruby
[00:05:28] acovrig: jhass: yea??? I was looking at it in Chrome???s inspector, and was wondering why I was getting the pagination given it was clearly not in that table; then I looked at the SC and it was in the table :/
[00:06:11] jhass: yeah inspectors show the parsed DOM tree, often misleading as to the actual source
[00:08:02] solocshaw: has joined #ruby
[00:08:24] skcin7: has joined #ruby
[00:10:20] Ropeney: has joined #ruby
[00:11:10] B1n4r10: has joined #ruby
[00:11:11] colleenmcguckin: has joined #ruby
[00:13:58] Uptime: has joined #ruby
[00:14:54] charliesome: has joined #ruby
[00:15:00] nateberkopec: has joined #ruby
[00:17:15] drys: has joined #ruby
[00:18:56] colleenmcguckin: has joined #ruby
[00:19:46] f00bar-32: has joined #ruby
[00:21:21] baweaver: has joined #ruby
[00:21:56] houhoulis: has joined #ruby
[00:22:57] jbrhbr: has joined #ruby
[00:24:43] astrobunny: has joined #ruby
[00:26:04] bithon: has joined #ruby
[00:26:11] bithon: has joined #ruby
[00:26:45] jun_: has joined #ruby
[00:29:38] bigmac: has joined #ruby
[00:29:47] hxegon: TFW you have no choice but to dive into somebody's gross repo
[00:31:54] hxegon: "why is the gemfile in the spec folder?" "Is this copy-pasted?"
[00:32:09] SCHAAP137: has joined #ruby
[00:32:20] ascarter: has joined #ruby
[00:32:45] hxegon: "Why does every other line have a long comment?" The answers, I may never know.
[00:33:17] hxegon: "how did this get 86 stars"
[00:35:47] pika_pika: has joined #ruby
[00:36:21] jbrhbr: has joined #ruby
[00:37:45] blub: hi shevy
[00:38:53] Drakevr: has joined #ruby
[00:42:46] hxegon: "why wont this mofo merge any of the clearly necessary PRs?"
[00:42:47] CloCkWeRX: has joined #ruby
[00:45:10] hxegon: "is that why there are 71 forks?"
[00:47:41] ramortegui: has joined #ruby
[00:48:52] stannard: has joined #ruby
[00:50:48] postmodern: has joined #ruby
[00:51:54] hahuang65: has joined #ruby
[00:52:59] pawnbox: has joined #ruby
[00:53:00] jbrhbr: has joined #ruby
[00:53:29] howdoicomputer: has joined #ruby
[00:53:37] mary5030: has joined #ruby
[00:56:22] ascarter: has joined #ruby
[00:57:07] charliesome: has joined #ruby
[00:57:33] Mia: has joined #ruby
[00:57:33] Mia: has joined #ruby
[00:58:11] TomPeed: has joined #ruby
[00:59:12] ruid: has joined #ruby
[00:59:13] ruid: has joined #ruby
[01:00:54] bbert: has joined #ruby
[01:00:54] bbert: has joined #ruby
[01:01:02] DLSteve: has joined #ruby
[01:03:15] beast: has joined #ruby
[01:03:27] Axy: has joined #ruby
[01:03:28] Axy: has joined #ruby
[01:04:39] howdoicomputer: has joined #ruby
[01:04:45] atomical: has joined #ruby
[01:06:31] tvon: has joined #ruby
[01:07:05] jackjackdripper1: has joined #ruby
[01:09:23] Yzguy: has joined #ruby
[01:16:20] Azure: has joined #ruby
[01:19:20] devbug: has joined #ruby
[01:20:37] Mia: has joined #ruby
[01:20:37] Mia: has joined #ruby
[01:22:41] pawnbox: has joined #ruby
[01:24:02] baweaver: has joined #ruby
[01:24:21] seitensei: has joined #ruby
[01:25:00] NeverDie: has joined #ruby
[01:25:04] RegulationD: has joined #ruby
[01:26:10] rgtk: has joined #ruby
[01:27:09] jun_: has joined #ruby
[01:29:56] lemur: has joined #ruby
[01:31:19] B1n4r10: has joined #ruby
[01:34:04] iWaffles: has joined #ruby
[01:35:34] n0xff: has left #ruby: ()
[01:35:44] ornerymoose: has joined #ruby
[01:40:09] B1n4r10: has joined #ruby
[01:42:03] rsc___: has joined #ruby
[01:44:28] Nanuq: has joined #ruby
[01:46:04] nocd: has joined #ruby
[01:48:18] Scripore: has joined #ruby
[01:48:21] jun_: has joined #ruby
[01:49:04] idefine: has joined #ruby
[01:49:30] Scripore: has joined #ruby
[01:50:39] nettoweb: has joined #ruby
[01:50:51] atomical: has joined #ruby
[01:52:35] pawnbox: has joined #ruby
[01:55:10] B1n4r10: has joined #ruby
[01:57:06] Bloomer: has joined #ruby
[01:59:20] devoldmx: has joined #ruby
[01:59:27] jun_: has joined #ruby
[02:00:50] idefine: has joined #ruby
[02:05:40] stevemackinnon: has joined #ruby
[02:06:11] Vitor: has joined #ruby
[02:07:38] pleiosaur: has joined #ruby
[02:08:52] arescorpio: has joined #ruby
[02:09:38] goodcodeguy: has joined #ruby
[02:10:20] Respek: has joined #ruby
[02:13:19] goodcodeguy: has joined #ruby
[02:13:28] nertzy: has joined #ruby
[02:13:29] B1n4r10_: has joined #ruby
[02:14:20] hectortrope: has joined #ruby
[02:15:46] Feyn: has joined #ruby
[02:18:34] bronson: has joined #ruby
[02:23:35] BSaboia: has joined #ruby
[02:23:50] elavee: has joined #ruby
[02:24:16] elavee: is anyone here using .rbenv? and does .rbenv have to be in ~/.rbenv ?
[02:26:13] jun_: has joined #ruby
[02:26:34] saddad: has joined #ruby
[02:27:16] jun_: has joined #ruby
[02:28:16] cdnsteve: has joined #ruby
[02:30:20] Yzguy: has joined #ruby
[02:31:40] elavee: has left #ruby: ()
[02:32:37] pawnbox: has joined #ruby
[02:34:01] bronson: has joined #ruby
[02:40:01] bb010g: has joined #ruby
[02:40:10] wolffles: has joined #ruby
[02:46:10] Mark-6ma: has joined #ruby
[02:47:32] dlitvak: has joined #ruby
[02:48:01] Bloomer: has joined #ruby
[02:52:03] malconis: has joined #ruby
[02:53:16] snguyen: has joined #ruby
[02:53:22] ur5us: has joined #ruby
[02:53:30] malconis: has joined #ruby
[02:54:23] rubio: has joined #ruby
[02:54:27] TomPeed: has joined #ruby
[02:54:50] nerium: has joined #ruby
[02:58:56] phantummm: has joined #ruby
[03:00:17] colleenmcguckin: has joined #ruby
[03:00:28] moeabdol: has joined #ruby
[03:00:58] dlitvak: has joined #ruby
[03:02:29] pawnbox: has joined #ruby
[03:04:53] idefine: has joined #ruby
[03:06:03] KIKKES: has joined #ruby
[03:07:29] KIKKES: has left #ruby: ()
[03:10:32] ohaibbq: has joined #ruby
[03:13:08] atomical: has joined #ruby
[03:15:52] kyke: has joined #ruby
[03:16:17] kyke: does ruby let you make your own http requests?
[03:16:37] idefine: has joined #ruby
[03:18:00] Radar: kyke: yes
[03:18:31] kyke: what is a good implementation or would that be considered plagiarism?
[03:19:24] Radar: kyke: !g ruby http
[03:19:31] Radar: Oh, right #ruby.
[03:19:40] Radar: "ruby http" would be some good googling terms
[03:19:45] Radar: httparty is one of my favourite libraries
[03:19:50] kyke: why is the bot failing?
[03:19:59] Radar: Because helpa is muted in this channel.
[03:20:12] Radar: To stop it conflicting with the official bot, rubber
[03:20:15] jackjackdripper: has joined #ruby
[03:20:15] Radar: ... ruboto.
[03:21:27] jhass: heh, httparty is my least favorite
[03:24:57] Arnvald: has joined #ruby
[03:25:54] iateadonut: has joined #ruby
[03:26:50] rgtk: has joined #ruby
[03:26:53] Anderson69s: has joined #ruby
[03:28:19] blackgoat: has joined #ruby
[03:29:17] Nanuq: has joined #ruby
[03:29:58] danielpclark: has joined #ruby
[03:30:20] howdoicomputer: has joined #ruby
[03:30:41] baweaver: has joined #ruby
[03:33:22] dlitvak: has joined #ruby
[03:33:51] hahuang65: has joined #ruby
[03:34:13] mary5030: has joined #ruby
[03:34:15] jackjackdripper: has joined #ruby
[03:34:30] ur5us: has joined #ruby
[03:36:20] revengeofbigd: has joined #ruby
[03:45:17] douglass1: has left #ruby: ()
[03:46:20] baweaver: has joined #ruby
[03:49:05] solocshaw: has joined #ruby
[03:51:26] floatingpoint: has joined #ruby
[03:53:02] dlitvak: has joined #ruby
[03:54:19] spt0: has joined #ruby
[03:59:55] phantummm: has joined #ruby
[04:00:08] devoldmx: has joined #ruby
[04:02:01] ornerymoose: has joined #ruby
[04:02:24] kies: has joined #ruby
[04:02:53] stannard: has joined #ruby
[04:04:08] calderonroberto: has joined #ruby
[04:07:37] jgpawletko: has joined #ruby
[04:08:27] celly: has joined #ruby
[04:08:57] jbrhbr: has joined #ruby
[04:10:47] RobertBirnie: has joined #ruby
[04:11:00] zast: has joined #ruby
[04:12:02] pawnbox: has joined #ruby
[04:13:22] shiru: has joined #ruby
[04:13:51] braincrash: has joined #ruby
[04:15:51] nerium: has joined #ruby
[04:16:40] devbug: has joined #ruby
[04:17:56] wolffles: has joined #ruby
[04:18:40] pawnbox: has joined #ruby
[04:18:51] lessless: has joined #ruby
[04:19:07] lessless: is it possible to simplify this code: def self.perform(inviter:, organization:, invitee_email:)
[04:19:07] lessless: new(inviter: inviter, organization: organization, invitee_email: invitee_email)
[04:19:48] lessless: something like arguments in JS, or clever use of the splat operator?
[04:20:31] beast: has joined #ruby
[04:20:57] Bloomer: has joined #ruby
[04:21:38] atomical: has joined #ruby
[04:25:21] gix: has joined #ruby
[04:26:29] pawnbox_: has joined #ruby
[04:27:52] bronson: has joined #ruby
[04:28:00] TOTENSIEDIEJUDEN: has joined #ruby
[04:28:01] boshhead: has joined #ruby
[04:28:41] yeticry: has joined #ruby
[04:29:18] Mr_Psmith: has joined #ruby
[04:30:31] Mr_Psmith: Hi friends; I am a python and Go programmer. A graduate student asked me to help with her ruby script. To do this I need to figure out how to drop back into the REPL (Irb) after running the script AND be able to inspect values. So far I can do irb -r ./script.rb or from the irb> load ???./script.rb??? but in neither case can I inspect variables in scope fo the script. Help!
[04:33:01] jhass: ?pry Mr_Psmith
[04:33:01] ruboto: Mr_Psmith, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
[04:33:30] jhass: !ban TotenSieDieJuden !T 1w bad nick
[04:33:33] ChanServ: +b TotenSieDieJuden!*@*
[04:33:34] ChanServ: ChanServ kicked TotenSieDieJuden: bad nick
[04:33:50] mozzarella: what does it mean?
[04:34:03] Mr_Psmith: mozzarella: Something like Kill the Jews
[04:34:13] ellisTAA: has joined #ruby
[04:34:20] astrobun_: has joined #ruby
[04:34:29] ellisTAA: what is the most efficient way to extract the 56% from this string ???Up to 56% Off Fitness Classes at Yubalance???
[04:34:37] jhass: lessless: you could do **kwargs on both, that would add a level of stacktrace on invalid args
[04:35:05] jhass: ellistaa: extracted = "56%"
[04:35:22] ellisTAA: jhass: but i wont always know what the percent is
[04:35:49] jhass: ellistaa: I'm only working from the sample input you've given
[04:35:52] ellisTAA: i thought maybe i could somehow use regex but that didn???t seem to work
[04:36:22] mozzarella: >> 'Up to 56% Off Fitness Classes at Yubalance'[/\d+%/]
[04:36:25] ruboto: mozzarella # => "56%" (https://eval.in/485951)
[04:37:47] ellisTAA: mozzarella: what is that? looks like a regex but i haven???t seen that syntax
[04:38:02] jhass: &ri String#[]
[04:38:03] `derpy: method `String#[]`: Element Reference --- If passed a single +index+, returns a substring of one cha??? ??? http://rubydoc.info/stdlib/core/String#%5B%5D-instance_method
[04:39:08] ellisTAA: cool thanks
[04:40:13] chouhoulis: has joined #ruby
[04:42:09] Contigi: has joined #ruby
[04:42:35] lessless: jhass, thanks!
[04:46:54] astrobun_: has joined #ruby
[04:47:06] Bloomer: has joined #ruby
[04:49:28] mallu: has joined #ruby
[04:50:17] mallu: what is that method for repeating whatever you pass n times?
[04:50:34] astrobun_: has joined #ruby
[04:50:35] dionysus69: has joined #ruby
[04:50:44] mallu: lets say I want to repeat 'hi' 4 times
[04:50:55] mallu: hi.times(4)?
[04:51:01] jhass: >> "hi" * 4 # ?
[04:51:02] ruboto: jhass # => "hihihihi" (https://eval.in/485953)
[04:51:46] giftgas: has joined #ruby
[04:51:47] ChanServ: +b *!*@172.56.31.130
[04:51:47] ChanServ: ChanServ kicked giftgas: bad nick
[04:51:58] mallu: jhass: thanks
[04:54:05] wolffles: is there a method that you can use on arrays to compare two values?
[04:54:24] jhass: >> ["a"] == ["a"] # ?
[04:54:25] ruboto: jhass # => true (https://eval.in/485954)
[04:54:30] hahuang65: has joined #ruby
[04:54:54] kies: has joined #ruby
[04:56:08] jhass: wolffles: ^ if not please clarify
[04:56:15] mallu: has joined #ruby
[04:57:07] berserk_ren: has joined #ruby
[04:57:10] dlitvak: has joined #ruby
[04:57:19] Bloomer: has left #ruby: ()
[04:58:04] wolffles: (two_sum([1, 3, 5, -3]) I need to make a method where a pairs sum is = 0 ??? i made a method but its 17 lines long just wondering if, there is a built in method for arrays
[04:58:22] ur5us: has joined #ruby
[04:58:22] wolffles: (two_sum([1, 3, 5, -3]) == [1,3] is the answer
[04:58:37] jhass: you mean [1, -3]?
[04:59:07] wolffles: [1,3] is array position so 3,-3
[04:59:42] astrobun_: has joined #ruby
[05:00:44] hagabaka: has joined #ruby
[05:01:08] jhass: >> numbers = [1, 3, 5, -3]; pair = numbers.combination(2).find {|a, b| a+b == 0 }; pair.map {|number| numbers.index(number) }
[05:01:09] ruboto: jhass # => [1, 3] (https://eval.in/485967)
[05:01:12] msankhala: has joined #ruby
[05:01:18] jhass: would be my quick first shot
[05:01:24] floatingpoint: what's the best way to be able to run a ruby file directly (e.g. ruby some_file.rb) but also be able to include its methods elsewhere
[05:01:56] astrobun_: has joined #ruby
[05:02:02] jhass: floatingpoint: not generally done in the ruby community, but you can check whether $0 is the file
[05:03:04] floatingpoint: why isn't it done in the ruby community
[05:03:21] jhass: most people just prefer to have bin/foo and lib/foo.rb
[05:03:41] jhass: to keep library code library code and runtime code runtime code
[05:03:47] djbkd: has joined #ruby
[05:04:06] jhass: often bin/foo is even just setting up load path and something like require "foo/cli"; Foo::Cli.new(ARGV)
[05:04:12] jhass: which makes testing a piece of cake
[05:04:26] jhass: since your bin/ is just trivial code you don't need to test
[05:05:45] astrobun_: has joined #ruby
[05:07:50] ellisTAA: i have a string that looks like this ??? hello world ??? what???s the best way to get rid of this?
[05:09:17] lxsameer: has joined #ruby
[05:09:19] jhass: I got rid of your string
[05:09:40] jhass: well it might be foo = nil too
[05:09:47] jhass: you're rather vague on what you want
[05:09:51] ellisTAA: sorry i meant, how to get rid of superfluous white space
[05:09:55] jhass: &ri String#strip
[05:09:57] `derpy: method `String#strip`: Returns a copy of str with leading and trailing whitespace removed. " hello ".st??? ??? http://rubydoc.info/stdlib/core/String#strip-instance_method
[05:10:21] ellisTAA: jhass: awesome
[05:10:56] yfeldblum: has joined #ruby
[05:12:39] floatingpoint: yo, does the initialize method work with default value (e.g. def initialize(somevar=20) ... )
[05:14:06] ur5us: has joined #ruby
[05:14:25] ruboto: Why don't you try it and see for yourself?
[05:15:31] dfinninger: has joined #ruby
[05:15:41] yfeldblum: has joined #ruby
[05:18:54] hagabaka: yay I made the leaderboard
[05:21:02] wolffles: jhass: thanks for the help, had to tweak to include Nil but its much, much cleaner than my original.
[05:21:06] AnoHito: has joined #ruby
[05:21:09] cassioscabral: has joined #ruby
[05:23:14] floatingpoint: i love it when people say TIAS. IT IS LITERALLY MY FAVORITE THING IN THE WORLD BECAUSE I LOVE TO WASTE MY TIME ASKING A QUESTION ONLY TO BE TOLD TO TRY IT MYSELF. I CLEARLY WOULDN'T HAVE DECIDED TO ASK IN THIS CHANNEL BECAUSE IT WOULD BE SIGNIFICANTLY QUICKER THAN WRITING A BUNCH OF THROWAWAY CODE TO TEST A CONCEPT THAT COULD BE ADDRESSED IN MERE SECONDS BY ASKING SOMEONE. I ALSO LOVE HOW SOME PEOPLE GO OUT OF THEIR WAY TO TELL ME TO TRY
[05:23:14] floatingpoint: IT MYSELF BECAUSE THEY ARE SO CLEARLY IRKED THAT SOMEONE IS ASKING A QUESTION ABOUT A FACENT OF A LANGUAGE IN THAT LANGUAGE'S COMMUNITY CHANNEL. CLEARLY, THE POINT OF THE CHANNEL IS NOT TO DISCUSS RUBY AND ASSIST THOSE IN LEARNING ABOUT THE LANGUAGE IN THE MOST EFFICIENT MANNER POSSIBLE. RATHER, AS WE ALL KNOW, SOFTWARE ENGINEERS DO ENJOY BEING AS INEFFICIENT AS POSSIBLE, SO THE MOST LOGICAL ANSWER TO A QUERY ABOUT RUBY WOULD BE TO TAKE
[05:23:15] floatingpoint: ONE'S OWN TIME TO TELL SOMEONE TO WRITE A BUNCH OF THROWAWAY CODE INSTEAD OF TAKING TWO SECONDS TO ANSWER SAID QUESTION. OH WAIT, THAT'S A BUNCH OF BULLSHIT, AND SO IS IT WHEN SOMEONE SAYS TIAS BECAUSE THEY DO NOT HAVE THE MATURITY AND/OR SOCIAL MANNERISMS TO ANSWER A QUESTION PLAINLY OR IGNORE IT ENTIRELY.
[05:23:29] bithon: wow calm down there cowboy
[05:23:41] bithon: put that gun away, nobody has to get hurt
[05:24:18] cassioscabral: has joined #ruby
[05:24:33] crdpink2: has joined #ruby
[05:25:06] nkwsy: has joined #ruby
[05:26:22] techsethi: has joined #ruby
[05:27:42] rgtk: has joined #ruby
[05:27:48] ruboto: How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
[05:28:21] devoldmx: has joined #ruby
[05:28:37] DavidDudson: has joined #ruby
[05:29:31] Radar: wow, looks like I missed some #goodtimes
[05:30:05] Nilium: ACTION looks up
[05:30:26] floatingpoint: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[05:31:58] jhass: fun fact: typing that up took them longer than it would have to test it in irb/pry
[05:33:07] colegatron: has joined #ruby
[05:34:05] wolffles: is (my_string = String.new) the same exact thing as (my_string = ??????) ?
[05:35:13] jhass: literally nobody does the former, so it's rather irrelevant, but I would assume so
[05:36:15] RobertBirnie: has joined #ruby
[05:36:28] wolffles: true if they are the same quotes would be the obvious choice
[05:36:58] lyoshajapan: has joined #ruby
[05:41:31] chouhoulis: has joined #ruby
[05:46:21] haraoka: has joined #ruby
[05:47:17] arooni: has joined #ruby
[05:48:25] nkwsy: has joined #ruby
[05:52:11] ur5us: has joined #ruby
[05:53:57] cwong_on_irc: has joined #ruby
[05:58:18] howdoicomputer: has joined #ruby
[05:58:43] sgambino: has joined #ruby
[06:01:12] DavidDudson: has joined #ruby
[06:02:11] techsethi: has joined #ruby
[06:03:52] darkf: has joined #ruby
[06:05:07] DavidDudson: has joined #ruby
[06:06:00] ledestin: has joined #ruby
[06:07:41] seitensei: has joined #ruby
[06:08:44] djbkd: has joined #ruby
[06:10:32] nerium: has joined #ruby
[06:12:04] techsethi: has joined #ruby
[06:17:59] mary5030: has joined #ruby
[06:18:15] idefine: has joined #ruby
[06:19:27] anekos: has joined #ruby
[06:20:59] blackgoat: has joined #ruby
[06:21:04] nerium: has joined #ruby
[06:21:37] B1n4r10: has joined #ruby
[06:21:58] pabs: has joined #ruby
[06:23:50] rgtk: has joined #ruby
[06:24:28] elifoster: has joined #ruby
[06:24:36] chipotle: has joined #ruby
[06:25:03] jun_: has joined #ruby
[06:26:47] nbdy: has joined #ruby
[06:27:25] pawnbox: has joined #ruby
[06:28:51] rsc___: has joined #ruby
[06:29:09] AnoHito: has joined #ruby
[06:29:15] trwyth: has joined #ruby
[06:29:31] codecop: has joined #ruby
[06:31:07] aganov: has joined #ruby
[06:31:58] nerium: has joined #ruby
[06:36:54] SOLDIERz: has joined #ruby
[06:37:31] trautwein: has joined #ruby
[06:39:06] steffkes: has joined #ruby
[06:39:07] steffkes: has joined #ruby
[06:39:33] ur5us: has joined #ruby
[06:40:09] CloCkWeRX: has joined #ruby
[06:42:12] chouhoulis: has joined #ruby
[06:42:34] nerium: has joined #ruby
[06:42:45] kies: has joined #ruby
[06:43:34] solars: has joined #ruby
[06:44:43] jun_: has joined #ruby
[06:44:45] colegatron: has joined #ruby
[06:45:22] yardenbar: has joined #ruby
[06:47:19] gizless: has joined #ruby
[06:48:12] tagrudev: has joined #ruby
[06:48:52] Pupp3tm4st3r: has joined #ruby
[06:49:45] zapata: has joined #ruby
[06:50:24] skade: has joined #ruby
[06:51:19] last_staff: has joined #ruby
[06:59:03] howdoicomputer: has joined #ruby
[07:01:19] ellisTAA: what would be the best way to chop off ???HOT CHIP (xxxxx)??? the parentheses & what???s inside of them? xxx is meant to represent unknown text
[07:02:05] elifoster: ellistaa: So you only want "HOT CHIP"?
[07:02:10] elifoster: I'm kind of confused by your question.
[07:02:10] ellisTAA: elifoster: yep
[07:02:20] Kamilion: has joined #ruby
[07:02:29] ellisTAA: yeah sorry that was worded poorly
[07:02:41] ellisTAA: i want to chop off the parentheses & whatever is in them
[07:02:59] elifoster: ellistaa: gsub!(/\(\.+\)/, '') is one way
[07:03:14] elifoster: That's how I'd do it, at least. I'm sure there are other ways.
[07:03:38] ellisTAA: elifoster: didn???t know u could throw in a regex like that
[07:03:44] ellisTAA: thanks for the help
[07:04:26] elifoster: ellistaa: You could also do it with string[/[^\(]+/], but that will get everything before the first parantheses
[07:04:36] elifoster: so if you have "HOT CHIP (xxx) HOT CHIP" it would only get the first HOT CHIP
[07:04:54] ellisTAA: ah ok yeah ill use the regex
[07:05:18] elifoster: ellistaa: See the docs for gsub http://ruby-doc.org/core-2.2.0/String.html#method-i-gsub-21
[07:06:08] darkxploit: has joined #ruby
[07:07:56] skweeke3: has joined #ruby
[07:10:36] seitensei: has joined #ruby
[07:10:37] seitensei: has joined #ruby
[07:12:53] howdoicomputer: has joined #ruby
[07:13:14] sigurding: has joined #ruby
[07:14:22] ur5us: has joined #ruby
[07:15:36] mahk: has joined #ruby
[07:16:22] jun_: has joined #ruby
[07:22:39] ur5us: has joined #ruby
[07:23:06] mahk: has joined #ruby
[07:24:28] anisha: has joined #ruby
[07:28:25] go|dfish: has joined #ruby
[07:29:14] aufi: has joined #ruby
[07:29:28] claw: has joined #ruby
[07:32:44] gizmore: has joined #ruby
[07:33:31] skcin7: has joined #ruby
[07:34:00] gizmore|2: has joined #ruby
[07:34:28] ur5us: has joined #ruby
[07:35:50] ss_much: has joined #ruby
[07:37:06] firstdayonthejob: has joined #ruby
[07:39:22] techsethi: has joined #ruby
[07:42:57] chouhoulis: has joined #ruby
[07:43:12] lyoshajapan: has joined #ruby
[07:43:28] bmalum: has joined #ruby
[07:43:35] rakm: has joined #ruby
[07:44:07] troulouliou_div2: has joined #ruby
[07:44:36] rakm: hi, i've gotten a sqlite3 database of icons, and presumably images are stored in this db as a blob field. i'm trying to read this with the ruby client and the file is coming out as corrupted. on the insert side, i see some code that does `s/1/12/g` and `s/\0/11/g`. anyone know why that would be?
[07:45:09] rakm: also possible that i'm trying to read the data wrong, or that the blob doesn't have what i think it has. using this method to read: http://zetcode.com/db/sqliteruby/images/
[07:46:19] juddey: has joined #ruby
[07:46:32] cpup: has joined #ruby
[07:47:10] pawnbox: has joined #ruby
[07:48:00] janelleb: has joined #ruby
[07:49:29] jas02: has joined #ruby
[07:50:17] tomaz_b: has joined #ruby
[07:52:56] davedev24: has joined #ruby
[07:55:54] andikr: has joined #ruby
[07:56:12] jbrhbr: has joined #ruby
[07:57:01] blackgoat: has joined #ruby
[08:00:12] rsc___: has joined #ruby
[08:00:53] Andy01012016: has joined #ruby
[08:01:54] gizmore: has joined #ruby
[08:01:56] gizmore: has joined #ruby
[08:02:02] certainty-web: has joined #ruby
[08:05:34] yfeldblum: has joined #ruby
[08:10:25] B1n4r10: has joined #ruby
[08:11:38] mahk: has joined #ruby
[08:13:31] djbkd: has joined #ruby
[08:13:36] TomyWork: has joined #ruby
[08:14:23] solars: has joined #ruby
[08:15:43] vondruch: has joined #ruby
[08:16:28] pawnbox: has joined #ruby
[08:17:12] devbug_: has joined #ruby
[08:20:39] Veejay: Hello everyone, generally speaking, is Net::HTTP the most memory efficient way to make HTTP requests in Ruby?
[08:22:10] j416: Net::HTTP is in standard library and is a common thing to use; I would be surprised if that is implemented in a memory-clumsy way, but this is ruby and if performance is of great concern you may want to consider a different language
[08:22:36] Veejay: I'm using a queue and a bunch of threads for parallel file copy operations from a Rackspace container to another Rackspace container (currently using Fog to do so). I'm thinking of ditching Fog altogether and executing the HTTP Copy operations myself and I was looking for the barest solution
[08:22:43] agent_white: has joined #ruby
[08:23:06] Veejay: j416: Thanks
[08:23:42] j416: I have not used Fog, I don't know if it has performance issues
[08:24:21] Veejay: j416: Not it does per se, but it has a tendency to be an all-encompassing solution for all things cloud ???
[08:24:21] Balzrael: has joined #ruby
[08:24:39] Veejay: Handling all different cloud providers, etc.
[08:24:47] msankhala: has joined #ruby
[08:24:50] steffkes: has joined #ruby
[08:24:50] steffkes: has joined #ruby
[08:24:52] rgtk: has joined #ruby
[08:24:53] Veejay: It doesn't exactly qualify as "lean"
[08:24:56] devoldmx: has joined #ruby
[08:24:56] baweaver: has joined #ruby
[08:26:05] j416: Veejay: I'm not sure what you're doing, but if performance is a problem and the only thing you're doing is copying stuff from one place to the other in a parallel manner, it sounds to me like Go could be a nice fit.
[08:26:32] Hounddog: has joined #ruby
[08:26:33] kp666: has joined #ruby
[08:26:41] juddey: has joined #ruby
[08:27:00] Veejay: Alright, thanks a lot
[08:27:11] j416: Go handles concurrency nicely (and can do threads, which ruby can't), and it has good support for HTTP
[08:27:31] j416: just a thought.
[08:27:54] ljarvis: wat? ruby can't do threads?
[08:28:21] j416: surprise surprise! :D
[08:30:10] madcodes: has joined #ruby
[08:31:02] Polysics: has joined #ruby
[08:31:27] j416: MRI runs on a single core, and even as though some implementations support real threading, gems that you may be using may not be built with concurrency in mind, since ruby is not a language generally seen as something you would do multi-threaded multi-core development in
[08:32:46] j416: so I suppose if you're very careful, it might work???.
[08:33:01] huyderman: has joined #ruby
[08:34:05] Veejay: j416: Threads actually have an extremely positive impact on performance in our use case
[08:34:12] edwinvdgraaf: has joined #ruby
[08:34:13] j416: (and, I didn't come here to bash on ruby, ruby is a great language in many ways, and _shouldn't_ be good at everything, or it wouldn't be a great language anymore)
[08:34:31] Veejay: Because the Rackspace Cloud Files API handles concurrent requests nicely
[08:34:33] ljarvis: so "ruby can't do threads" is actually absolutely incorrect
[08:34:40] Veejay: But it's memory that is killing us
[08:34:49] j416: Veejay: if the CPU usage is your bottleneck, then MRI ruby threads won't help, but if disk IO is the problem, maybe it will
[08:34:57] j416: I'm speculating.
[08:34:59] Veejay: j416: It's memory
[08:35:18] ljarvis: don't get me wrong, I'm all about the right tool for the job and Ruby doesn't always fit, but lets not throw around buzz statements
[08:35:28] j416: ljarvis: buzz?
[08:35:37] Veejay: ljarvis: I agree, Ruby does threads fine
[08:35:51] ljarvis: yes, it's like saying ruby doesn't scale
[08:36:03] j416: Veejay: in that case, maybe threads are not your solution to performance, but a tool to get a nicer implementation?
[08:36:24] j416: ljarvis: I didn't come here to start a flame war, so please don't interpret it that wya.
[08:36:52] j416: if you think ruby threads are awesome, use them
[08:37:29] Veejay: j416: Threads give us a x15 speedup VS serial operations in this case
[08:37:56] ljarvis: I didnt' say they were awesome (I generally think they're not) so I probably agree, I just didn't like "can do threads, which ruby can't" is all
[08:38:01] j416: Veejay: nice! so CPU is not the issue, but rather HTTP request handling
[08:38:36] j416: Veejay: I suppose.
[08:39:05] ascarter: has joined #ruby
[08:39:34] j416: Veejay: back to the original question -- I don't know if bare Net::HTTP will give you a lot of performance boost, maybe it will, but a wild guess is that you won't see another 15x increase
[08:40:35] ljarvis: I concur with ^ and would say the library you use is very unlikely to be the bottleneck to http performance
[08:40:50] j416: Veejay: I would do any or all of: 1) look at the implementation of fog and see if it looks good for your use-case; 2) build your own maybe-faster version; 3) build the thing in a language built for what you are doing
[08:41:13] ljarvis: fog is a monster, but it uses excon underneath for http connections
[08:41:42] vasilakisFiL: has joined #ruby
[08:41:56] vasilakisFiL: hey.. would that make sense somewhere? h = {lambda { puts 'hey' } => lambda { puts "hello world"}}
[08:41:57] j416: Veejay: or 4) accept what you have :)
[08:42:12] vasilakisFiL: how can I access the key ?
[08:42:30] ljarvis: Veejay: no
[08:42:31] j416: vasilakisfil: what is your use-case for it?
[08:42:36] ljarvis: vasilakisfil: no
[08:42:48] joonty: has joined #ruby
[08:43:03] vasilakisFiL: I have a use case in combination with https://github.com/fl00r/pickup
[08:43:33] vasilakisFiL: to generate random keys
[08:43:43] chouhoulis: has joined #ruby
[08:43:47] vasilakisFiL: but obviously that's not how it's meant to be used
[08:44:23] dlitvak: has joined #ruby
[08:45:08] j416: vasilakisfil: >> foo = -> { puts 'foo' }; h = { foo => -> { puts 'bar' } }; h[foo].call
[08:45:18] j416: hm how do I trigger the thing
[08:45:20] Veejay: ljarvis: Regarding Excon, not sure I understand... Do you mean it's a good thing it uses Excon, or like "it's a behemoth, but oh well what're you gonna do, it uses Excon..."
[08:45:26] j416: >> foo = -> { puts 'foo' }; h = { foo => -> { puts 'bar' } }; h[foo].call
[08:45:27] ruboto: j416 # => bar ...check link for more (https://eval.in/486043)
[08:45:31] c0m0: has joined #ruby
[08:45:32] j416: vasilakisfil: ^
[08:46:06] j416: Veejay: but I'm not sure why you would want to use a lambda as a key
[08:46:43] Veejay: Cause it's there?
[08:47:01] ljarvis: Veejay: good question. I don't really think excon is any better/worse than net/http. The API is a bit nicer probably, and for picking a http library that + features you require should be important things because performance shouldn't be
[08:47:04] Veejay: Hilarity ensues
[08:47:46] akahn: has joined #ruby
[08:49:33] curses: has joined #ruby
[08:53:02] agent_white: has joined #ruby
[08:53:39] jackjackdripper1: has joined #ruby
[08:53:44] snowy: has joined #ruby
[08:54:35] wmdrossard: has joined #ruby
[08:56:28] skade: has joined #ruby
[08:57:01] krz: has joined #ruby
[08:59:42] mary5030: has joined #ruby
[08:59:51] rsc___: has joined #ruby
[09:01:07] coderhut: has joined #ruby
[09:02:02] skade: has joined #ruby
[09:02:56] mikecmpbll: has joined #ruby
[09:05:34] edwinvdgraaf: has joined #ruby
[09:06:50] psye: has joined #ruby
[09:09:03] djbkd: has joined #ruby
[09:11:11] monthy: has joined #ruby
[09:11:31] chthon: has joined #ruby
[09:13:15] seitensei: has joined #ruby
[09:13:16] seitensei: has joined #ruby
[09:13:43] HowardwLo: has joined #ruby
[09:13:45] HowardwLo: has left #ruby: ()
[09:14:12] madcodes: has joined #ruby
[09:15:28] rsc___: has joined #ruby
[09:16:41] cazzoduro: has joined #ruby
[09:17:55] vondruch: has joined #ruby
[09:19:26] _main_: has joined #ruby
[09:20:27] CloCkWeRX: has joined #ruby
[09:20:28] CloCkWeRX: has left #ruby: ()
[09:20:34] LightStalker: has joined #ruby
[09:21:09] tomphp: has joined #ruby
[09:22:34] pawnbox: has joined #ruby
[09:22:38] webus: has joined #ruby
[09:24:40] trwyth: has joined #ruby
[09:25:41] devoldmx: has joined #ruby
[09:25:50] webus: has joined #ruby
[09:25:56] tulak: has joined #ruby
[09:27:04] Anderson69s: has joined #ruby
[09:27:12] skade: has joined #ruby
[09:27:46] senayar: has joined #ruby
[09:27:47] senayar: has joined #ruby
[09:29:04] jun_: has joined #ruby
[09:39:24] kies: has joined #ruby
[09:40:42] dmolina: has joined #ruby
[09:42:01] howdoicomputer: has joined #ruby
[09:42:37] yes`r: has joined #ruby
[09:42:41] marr: has joined #ruby
[09:44:27] chouhoulis: has joined #ruby
[09:45:03] spacemud: has joined #ruby
[09:45:25] elifoster: Veejay: If we're still talking about http libraries, I would heavily suggest HTTPClient. I haven't really read that conversation too much, but it's been perfect for all of my web api accessing/http needs.
[09:45:58] elifoster: I found performance boosts when using it, but I can't really say why as I haven't read the code for it or Net/HTTP.
[09:50:26] romain_t: has joined #ruby
[09:50:57] baweaver: has joined #ruby
[09:53:01] blaxter: has joined #ruby
[09:53:26] _main_: has joined #ruby
[09:54:31] roshanavand: has joined #ruby
[09:54:42] rodfersou: has joined #ruby
[09:58:15] SCHAAP137: has joined #ruby
[09:59:08] B1n4r10: has joined #ruby
[09:59:44] mark3: has joined #ruby
[10:00:32] djbkd: has joined #ruby
[10:00:53] Juanchito: has joined #ruby
[10:01:25] Veejay: elifoster: I'm currently using RestClient
[10:02:01] Veejay: I tried reducing the number of threads and ditching Fog, the impact on memory use is huge (at the expense of some speed, but that's OK)
[10:02:17] elifoster: I have no experience with RestClient.
[10:02:27] elifoster: There are a number of gems I use that use it, but I've never personally used it.
[10:04:05] benhuda: has joined #ruby
[10:05:03] siddharth: has joined #ruby
[10:08:05] phantummm: has joined #ruby
[10:10:17] azgil: has joined #ruby
[10:11:01] howdoi: has joined #ruby
[10:11:21] CloCkWeRX: has joined #ruby
[10:13:38] nettoweb: has joined #ruby
[10:15:43] FooMunki: has joined #ruby
[10:18:01] rsc___: has joined #ruby
[10:18:03] Hounddog: has joined #ruby
[10:18:18] djbkd: has joined #ruby
[10:21:07] sgambino: has joined #ruby
[10:21:18] Peg-leg: has joined #ruby
[10:23:23] Hounddog: has joined #ruby
[10:25:38] rgtk: has joined #ruby
[10:26:04] symm-: has joined #ruby
[10:26:26] jschmid: has joined #ruby
[10:27:08] roshanavand: has joined #ruby
[10:28:48] tvw: has joined #ruby
[10:29:44] platzhirsch: has joined #ruby
[10:30:04] rdark: has joined #ruby
[10:30:14] agent_white: has joined #ruby
[10:31:01] nfk|laptop: has joined #ruby
[10:31:42] SHyx0rmZ: has joined #ruby
[10:33:37] astrobun_: has joined #ruby
[10:34:53] blaxter: has joined #ruby
[10:37:42] yos7ph: has joined #ruby
[10:39:59] solars: has joined #ruby
[10:43:51] cdnsteve: has joined #ruby
[10:44:00] DaniG2k: has joined #ruby
[10:45:15] chouhoulis: has joined #ruby
[10:46:50] ruby-lang510: has joined #ruby
[10:49:10] ruby-lang510: Hi all. Learning some ruby. I'm loading a file irb -r ./filename.rb so I can poke around ruby methods on my class instance. But it keeps throwing back NameError: undefined local variable or method `sample_instance' for main:Object
[10:49:49] DaniG2k: ruby-lang510: you have a variable sample_instance somewhere in filename.rb that is undefined
[10:50:01] DaniG2k: check that file for "sample_instance"
[10:50:07] ruby-lang510: It needs me to create an instance again new_instance = Class.new
[10:50:28] smactive: has joined #ruby
[10:50:41] shevy: ruby-lang510 you need to use other ways to make it persistent
[10:50:50] ruby-lang510: DaniG2k: Its defined. sample_instance = Class.new works
[10:51:05] ruby-lang510: just doesn't persist in irb
[10:51:18] sameerynho: has joined #ruby
[10:52:03] jhass: ruby-lang510: that's expected, top level local variables are private to the file
[10:52:49] ruby-lang510: So just create an instance again in rib?
[10:53:10] startupality: has joined #ruby
[10:53:25] jhass: better yet just assign the variable inside irb, not your file
[10:54:00] f4cl3y: has joined #ruby
[10:55:02] roshanavand: has joined #ruby
[10:55:03] cassioscabral: has joined #ruby
[10:56:47] Averna: has joined #ruby
[10:56:50] phantummm: has joined #ruby
[10:58:22] romain_t: has joined #ruby
[10:58:46] ruby-lang510: jhass: Thanks. Another thing. Within irb, why does Custom_Class.methods(false) with one custom method, return an empty array?
[10:59:13] ta: has joined #ruby
[10:59:40] jhass: you want MyClass.instance_methods(false) or MyClass.new.methods(false)
[10:59:41] devbug: has joined #ruby
[11:00:45] coderhut: has joined #ruby
[11:01:08] ruby-lang510: Interesting. Student.instance_methods(false) returns the right array. Student.new.methods(false) returns empty array
[11:01:26] oddmunds: has joined #ruby
[11:03:04] brixen: has joined #ruby
[11:03:06] jhass: uh right, my bad
[11:03:16] jhass: .methods(false) only returns an objects singleton methods
[11:04:19] ruby-lang510: why can't i can instance_methods on the instance variable though?
[11:05:40] Anderson69s: has joined #ruby
[11:06:34] Paradox: has joined #ruby
[11:06:53] jhass: because your instance variable does not point to a class or module object but most likely an instance of it
[11:07:39] ruboto: Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
[11:09:59] blaxter: has joined #ruby
[11:10:01] dionysus69: has joined #ruby
[11:10:04] DaniG2k: i wonder why the Rails guys decided to use byebug by default instead of pry
[11:10:12] livcd: has joined #ruby
[11:10:38] idefine: has joined #ruby
[11:11:08] ruby-lang510: Taking a look
[11:12:31] Averna: has joined #ruby
[11:13:41] plsk: has joined #ruby
[11:14:14] seitensei: has joined #ruby
[11:14:15] seitensei: has joined #ruby
[11:14:17] platzhirsch: DaniG2k: byebug is different to pry I believe
[11:14:19] CloCkWeRX: has joined #ruby
[11:14:42] platzhirsch: While byebug is a debugger, pry is more a runtime/evaluation console
[11:14:44] jhass: they do different things, yeah
[11:14:48] jhass: hence there's a pry-byebug
[11:14:49] platzhirsch: can be combined though
[11:15:14] trwyth: has joined #ruby
[11:16:06] DaniG2k: didn't know that
[11:16:22] DaniG2k: i always used pry as a debugger
[11:17:14] Averna: has joined #ruby
[11:18:34] brixen: has joined #ruby
[11:19:04] Mark-6ma: has joined #ruby
[11:20:01] xlogic: has joined #ruby
[11:20:27] rickmasta: has joined #ruby
[11:21:56] The_Phoenix: has joined #ruby
[11:23:17] jhass: DaniG2k: so just install pry-byebug and you get break point and stuff
[11:23:33] jhass: pry-stack_explorer is worth a look too
[11:23:35] toretore: has joined #ruby
[11:26:03] vasilakisfil_: has joined #ruby
[11:26:30] devoldmx: has joined #ruby
[11:29:13] yorickpeterse: Does the MRI C API provide a way to get the class name of an object without allocating any new objects?
[11:29:13] prestorium: has joined #ruby
[11:29:17] kobain: has joined #ruby
[11:29:18] zotherstupidguy: has joined #ruby
[11:29:26] yorickpeterse: rb_class2name and the likes allocate new VALUEs, which fucks up things during a GC run
[11:29:47] zotherstupidguy: is there a simpler api gem than grape?
[11:31:32] heftig: has joined #ruby
[11:32:29] lxsameer: has joined #ruby
[11:33:57] roshanavand: has joined #ruby
[11:35:24] roshanavand: has joined #ruby
[11:35:57] nfk|laptop: has joined #ruby
[11:37:44] Mon_Ouie: has joined #ruby
[11:39:49] astrobun_: has joined #ruby
[11:40:01] skade: has joined #ruby
[11:41:13] dlitvak: has joined #ruby
[11:44:00] howdoicomputer: has joined #ruby
[11:44:14] diegoviola: has joined #ruby
[11:45:19] astrobun_: has joined #ruby
[11:45:57] chouhoulis: has joined #ruby
[11:46:00] FooMunki: has joined #ruby
[11:47:54] jas02: has joined #ruby
[11:47:56] B1n4r10: has joined #ruby
[11:53:51] nettoweb: has joined #ruby
[11:54:39] toomus: has joined #ruby
[11:55:07] tulak: has joined #ruby
[11:55:49] dlitvak_: has joined #ruby
[11:56:17] shevy: 8 days to go until the new ruby
[11:58:50] roshanavand: has joined #ruby
[11:58:54] msankhala: has joined #ruby
[12:01:08] roshanav_: has joined #ruby
[12:01:27] arup_r: has joined #ruby
[12:04:10] ruby-lang557: has joined #ruby
[12:04:35] jdm: has joined #ruby
[12:05:18] wmdrossard: has joined #ruby
[12:05:33] ruby-lang655: has joined #ruby
[12:05:39] skade: has joined #ruby
[12:06:21] blaxter: has joined #ruby
[12:06:44] ruby-lang655: am using "data=system 'mycommand'" to run a system command and store the result in the 'data' variable. Problem is "puts data" is returning false and not the output of mycommand - any help / pointers?
[12:07:39] jhass: ruby-lang655: that's what system does. Use backticks to capture the output or yet better tell us what the command is and there's a chance you won't have to run it like that at all
[12:08:24] ruby-lang655: hey jhass command is openssl ciphers \'LOW:aNull:eNULL\' | sed -e \'s/,/ /g\', getting a list of weak ciphers etc that I want to loop through in an array
[12:08:32] ruby-lang655: (cheers for response)
[12:08:45] skade: has joined #ruby
[12:08:45] jhass: mh, let's dig a bit
[12:09:14] jhass: OpenSSL::Cipher.ciphers gives the full list for starters
[12:10:25] ruby-lang655: cool didn't know that, now looking to see if it can identify null / weak ciphers
[12:11:00] llakjy: has joined #ruby
[12:12:16] spt0: has joined #ruby
[12:13:52] krz: has joined #ruby
[12:14:49] c355E3B: has joined #ruby
[12:16:45] bigkevmcd: has joined #ruby
[12:17:07] moeabdol: has joined #ruby
[12:17:17] quazimodo: has joined #ruby
[12:18:35] cassioscabral: has joined #ruby
[12:18:49] Peg-leg: has left #ruby: ()
[12:19:17] jhass: I can't even find the C API for this :/
[12:19:36] cornerma1: has joined #ruby
[12:22:56] rgtk: has joined #ruby
[12:23:36] chipotle: has joined #ruby
[12:24:03] roshanavand: has joined #ruby
[12:25:53] kobain: has joined #ruby
[12:26:09] sigurding: has joined #ruby
[12:27:13] techsethi: has joined #ruby
[12:27:55] jhass: >> require "openssl"; ctx = OpenSSL::SSL::SSLContext.new; ctx.ciphers = "LOW:aNull:eNULL"; ctx.ciphers.map(&:first).join(", ")
[12:27:56] ruboto: jhass # => "ADH-DES-CBC-SHA, EDH-RSA-DES-CBC-SHA, EDH-DSS-DES-CBC-SHA, DES-CBC-SHA, DES-CBC-MD5, NULL-SHA, NULL ...check link for more (https://eval.in/486121)
[12:28:09] jhass: ^ ruby-lang655
[12:28:28] radgeRayden_: has joined #ruby
[12:28:28] radgeRayden: has joined #ruby
[12:28:30] astrobun_: is there a way i can install ruby using a script on a server
[12:28:35] astrobun_: like just one particular version
[12:28:46] astrobun_: because rvm isnt doing it for me
[12:28:52] astrobun_: i still keep getting ruby command not found
[12:28:56] astrobun_: in the same script
[12:29:00] astrobun_: its driving me insaaaane
[12:29:07] ruboto: We can't help you without your code, please post it to https://gist.github.com
[12:29:08] astrobun_: even doing a multi user install sucks
[12:29:32] astrobun_: its basically
[12:29:39] astrobun_: rvm use 2.0 --default
[12:29:57] astrobun_: bash somescript_that_uses_ruby.sh
[12:30:03] astrobun_: and then bam ruby: command not found
[12:31:04] jhass: rvm use 2.0 has no output?
[12:31:15] jhass: ruby works in the same shell afterwards?
[12:32:07] dlitvak: has joined #ruby
[12:34:15] astrobun_: that is exactly correct
[12:34:18] astrobun_: i am very stumped
[12:34:29] astrobun_: i tried putting shit in the /etc/profile and sourced it
[12:34:32] astrobun_: but it does not work
[12:34:40] jhass: astrobu__: dunno, try using rvm do 2.0 ruby whatever in your script
[12:34:44] jhass: better anyhow
[12:35:07] astrobun_: tahts too half-assed. im trying the ruby-install script now
[12:35:12] astrobun_: maybe that will work
[12:35:18] astrobun_: i just need a systemwide install of ruby 2.0
[12:35:22] jhass: well it's RVMs recommend way to script
[12:35:34] astrobun_: ok then ill forget about rvm
[12:35:38] astrobun_: i dont REALLY need to use rvm
[12:35:43] astrobun_: i just need to use ruby 2.0
[12:36:01] astrobun_: ilets see if ruby-install works
[12:36:05] astrobun_: if it does im just gonna use that
[12:36:20] astrobun_: im afraid rbenv might just lead me down the same path of grief
[12:37:47] dlitvak_: has joined #ruby
[12:37:55] jhass: looked at chruby yet?
[12:38:26] techsethi: has joined #ruby
[12:38:26] rgtk: has joined #ruby
[12:38:30] jhass: but yeah, ruby-install or ruby-build into /usr/local or /opt/ruby + some $PATH munging should be good enough
[12:39:22] ruby-lang547: has joined #ruby
[12:39:31] cassioscabral: has joined #ruby
[12:39:35] astrobun_: yeh you're right
[12:39:42] astrobun_: i can see why some people dont like ruby
[12:39:50] astrobun_: its not for any good reason. i use ruby a lot
[12:40:04] jhass: you didn't try to deploy Go or python or complex perl yet :P
[12:40:05] astrobun_: but this time i actually have to guarantee that it will deploy into a few distros
[12:40:18] astrobun_: well, i will be dockering those
[12:40:19] ruby-lang547: hey everyone I have a strange problem. I have three rails api app running in passenger behind an LB... They all should have the same settings.
[12:40:34] jhass: ?passenger
[12:40:34] ruboto: I don't know anything about passenger
[12:40:34] astrobun_: i just need to ruby here because my base scripts require
[12:40:46] ruby-lang547: on one node each rails instance uses 2gb of memory
[12:40:54] jhass: !fact mk passenger Please join #passenger for help with it.
[12:40:55] ruboto: jhass, I will remember that passenger is Please join #passenger for help with it.
[12:40:59] ruby-lang547: its like garbage collection does not kick in until the app runs out of memory
[12:42:12] ruby-lang547: I did what I could but I don't have any experience with ruby garbage collection
[12:42:30] sdothum: has joined #ruby
[12:43:36] jhass: see above
[12:44:12] jhass: iirc they're europe based so might be lunch time for them, stick around in #passenger for an hour or two
[12:45:11] senayar: has joined #ruby
[12:45:12] roshanavand: has joined #ruby
[12:45:41] krz: has joined #ruby
[12:45:51] Bish: hi, kinda stupid question: what would be an easy way to "sign" small amounts of data, which is not cracked as easily?
[12:46:10] jhass: Bish: JWS perhaps?
[12:46:26] Bish: please specify
[12:46:34] cassioscabral: has joined #ruby
[12:46:39] ruby-lang547: https://gist.github.com/bjenkins100/4a95091ca7a0513e5024
[12:46:45] ruby-lang547: thats my gist
[12:46:45] jhass: Signed JSON Web Tokens
[12:46:49] chouhoulis: has joined #ruby
[12:47:24] jhass: ruby-lang547: are you willfully ignoring me or something?
[12:47:38] Bish: funny, tha's like 100% i was thinking about
[12:48:17] ruby-lang547: But passenger is not using the memory rack/rails is
[12:48:53] ruby-lang547: But I will be working with the passenger team also
[12:49:07] shredding: has joined #ruby
[12:49:16] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[12:49:29] jhass: either way, this is the least best channel ;)
[12:49:42] roshanavand: has joined #ruby
[12:49:57] ruby-lang547: where do I get help with ruby garbage collection?
[12:50:03] wmdrossard: has joined #ruby
[12:50:19] Ishido: has joined #ruby
[12:50:58] jhass: http://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production goes somewhat into it though it changed with 2.2 a bit too again
[12:51:24] jhass: https://engineering.heroku.com/blogs/2015-02-04-incremental-gc/
[12:52:07] ruby-lang547: so I worked through this the best I could (http://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production)
[12:52:14] ornerymoose: has joined #ruby
[12:52:32] techsethi: has joined #ruby
[12:53:03] Bish: still i would love to know, how would i actually sign just a string, so it's not as easily cracked?
[12:53:24] ruby-lang547: the difference I saw was that on the working node the garbage collection kicked in newobj
[12:54:10] ruby-lang547: on the problem node gc_by malloc
[12:54:56] NeverDie: has joined #ruby
[12:55:29] skade: has joined #ruby
[12:55:39] ruby-lang547: I will work through this post and report back (2015-02-04-incremental-gc)
[12:55:43] monthy: has joined #ruby
[12:55:58] jhass: Bish: are you sure you understand what signing is? What are you trying to achieve?
[12:57:05] jhass: signed cookies or what?
[12:57:16] jhass: what's your threat model?
[12:57:41] colegatron: has joined #ruby
[12:59:23] Scripore: has joined #ruby
[12:59:48] PedramT: has joined #ruby
[13:00:32] senayar: has joined #ruby
[13:00:32] senayar: has joined #ruby
[13:01:17] Bish: jhass: i want bas64encoded data in a link, i don't want others to be able to create those links
[13:01:24] symm-: has joined #ruby
[13:01:31] troulouliou_div2: has joined #ruby
[13:01:33] triangles: has joined #ruby
[13:01:39] jhass: fair enough
[13:02:00] Bish: and it's an interesting topic, i think
[13:02:17] jhass: Bish: step one: get a private key: OpenSSL::PKey::RSA.new(2048)
[13:02:29] roshanavand: has joined #ruby
[13:02:33] jhass: store it somewhere, to read it again simply pass it to .new instead of a number
[13:02:45] pika_pika: has joined #ruby
[13:02:56] SenpaiSilver: has joined #ruby
[13:03:14] Bish: yeah i am aware of rsa, but i don't know how i would use it to sign data
[13:03:21] jhass: Bish: next up sign something with it, signature = pkey.sign(OpenSSL::Digest::SHA256.new, url)
[13:03:34] Bish: wow, it's that easy?
[13:04:28] jhass: generate your token, eg token = Base64.urlsafe_encode64("#{url}\0#{signature}")
[13:04:37] jhass: now to verify it
[13:04:49] Bish: i got it, thanks ;)
[13:05:01] Bish: if i knew i'd be that easy, i would've found out myself
[13:05:07] jhass: url, signature = token.split("\0", 1)
[13:05:26] startupality: has joined #ruby
[13:05:31] Bish: but if i do
[13:05:33] jhass: pkey.public_key.verify(OpenSSL::Digest::SHA256.new, signature, url)
[13:05:40] Bish: pkey.sign i get "ArgumentError: Private key is needed."
[13:05:46] joonty: has joined #ruby
[13:05:52] jhass: er plus Base64.urlsafe_decode64 I missed
[13:05:59] Bish: while pkey is a private key
[13:06:29] Ropeney: has joined #ruby
[13:06:52] jhass: it's not then, sorry but you messed up somewhere already :P
[13:07:49] synthroid: has joined #ruby
[13:07:55] jespada: has joined #ruby
[13:08:13] phantummm: has joined #ruby
[13:08:29] benhuda: has joined #ruby
[13:08:32] jhass: also note that the signature is quite big, in theory URLs are limited to 255 chars
[13:08:58] jhass: most applications allow more these days, but you have no guarantees above that
[13:09:12] kimegede: has joined #ruby
[13:10:32] roshanav_: has joined #ruby
[13:12:07] Bish: urls are limited to 255 chars? last time i checked the rfc says 4k
[13:12:08] solars: has joined #ruby
[13:12:13] spiman: has joined #ruby
[13:12:53] Bish: ofc that's crazy but never seen it fail
[13:12:56] cassioscabral: has joined #ruby
[13:13:20] sameerynho: has joined #ruby
[13:15:03] seitensei: has joined #ruby
[13:18:48] Bish: how do i get all the stuff inside a module?
[13:19:01] filipechagas: has joined #ruby
[13:19:31] jhass: easiest and most readable? devdocs.io or pry's ls
[13:19:45] jas02: has joined #ruby
[13:19:52] Bish: just want to know which methods to call
[13:20:28] jhass: use the ones that do what you want
[13:21:23] dlitvak: has joined #ruby
[13:23:05] ornerymoose: has joined #ruby
[13:23:44] cassioscabral: has joined #ruby
[13:23:49] Bish: constants it is
[13:24:20] Bish: there is nothing smaller than sha256?
[13:25:22] atumzin: has joined #ruby
[13:25:23] atumzin: has joined #ruby
[13:25:57] FastJack: has joined #ruby
[13:26:32] jokester: has joined #ruby
[13:26:54] jmonreal: has joined #ruby
[13:26:58] jmonreal: good day everyone
[13:27:15] Bish: i can use md5 to sign data? man i really need to recheck my hash knowledge :D
[13:27:18] Bish: jmonreal: hi
[13:27:28] devoldmx: has joined #ruby
[13:28:08] techsethi: has joined #ruby
[13:28:15] jmonreal: If I develop a script which uses certain ruby gems, that need to be installed before running the script, what's the best way to do it?
[13:28:39] Bish: jmonreal: create a gemfile and install them with bundler?
[13:28:47] Yiota: has joined #ruby
[13:29:00] atumzin: has joined #ruby
[13:29:01] atumzin: has joined #ruby
[13:29:03] jmonreal: gemfile? and that file has the gems needed?
[13:29:24] Bish: yeah in that file you list the gems your package needs
[13:29:40] jhass: Bish: if you want it secure you shouldn't use anything less than SHA256
[13:29:44] jmonreal: http://bundler.io/v1.5/gemfile.html
[13:29:47] jmonreal: like that example
[13:29:56] jmonreal: thanks Bish
[13:29:58] jhass: MD5 and SHA1 are both considered broken these days
[13:30:01] Bish: jhass: well it's not a nuclear winter happening if someone cracks it, but still, that's stupid either way
[13:30:13] Bish: will result in pretty long urls
[13:30:15] pawnbox: has joined #ruby
[13:30:18] jhass: but their digests won't be shorter
[13:30:24] Bish: yeah i see
[13:30:48] jmonreal: Bish: and what should be the name of the gemfile and extension
[13:30:48] jhass: Bish: base64 inflates by a third, you could try urlencoding the url and using a hexdigest for example
[13:30:52] d0nn1e: has joined #ruby
[13:31:00] Bish: no problem jmonreal, in case you have a rails application: rails creates a gemfile which you can read for example
[13:31:09] jhass: Bish: eh, nvm on the last one, had a brainfart there I guess
[13:31:58] ornerymoose_: has joined #ruby
[13:32:01] Bish: jmonreal: well it's Gemfile i think, not sure though, never used them
[13:32:33] jhass: jmonreal: just run bundle init
[13:33:10] cassioscabral: has joined #ruby
[13:33:15] shevy: I just looked at the tab here and for a second I thought that jhass wrote "run bundle shit"
[13:33:38] dfinninger: has joined #ruby
[13:33:39] mblagden: has joined #ruby
[13:33:39] Bish: we are harsh here in #ruby
[13:34:43] sgambino: has joined #ruby
[13:35:53] Bish: wat... yesterday i was hating sequel for not having .where!, why does it!?
[13:36:09] Bish: i never seen that in the docs, but autocompletion of pry just told me
[13:36:13] znz_jp: has joined #ruby
[13:36:13] Bish: am i crazy?
[13:36:42] B1n4r10: has joined #ruby
[13:36:54] Bish: well yes
[13:37:02] Bish: i even read the code, i never seen it
[13:37:18] agent_white: Why would it?
[13:37:42] Bish: https://github.com/jeremyevans/sequel/search?utf8=%E2%9C%93&q=%22def+where%21%22&type=Code <= i don't get it.
[13:37:43] pawnbox: has joined #ruby
[13:37:53] Bish: agent_white: because table = table.xyz looks ugly
[13:38:26] roshanavand: has joined #ruby
[13:38:38] Bish: but i don't understand why it has
[13:38:41] agent_white: But... I dun get why do that either... I'd think you'd be collecting a set?
[13:38:53] Bish: agent_white: yeah and you might want to add filters to that set
[13:39:10] Bish: and add another filter.. and another
[13:39:17] weemsledeux: has joined #ruby
[13:39:20] jhass: Bish: $ foo.where!
[13:39:21] shevy: Bish hmm I did not see a where! method
[13:39:28] scepticulous: has joined #ruby
[13:39:40] agent_white: But... admins = Users.where(admin: true), not users = Users.where(admins:true_
[13:39:42] Bish: yeah, i don't see it either anywhere, but that jeremy is sneaky
[13:39:53] dlitvak_: has joined #ruby
[13:39:58] Bish: agent_white: and what about the users of age 20 ?
[13:40:06] jhass: Bish: $ being the pry alias for show-source
[13:40:18] agent_white: Users.where(age > 20) ?
[13:40:19] Bish: jhass: thank you, you're my hero of the day
[13:40:32] startupality: has joined #ruby
[13:41:11] goodcodeguy: has joined #ruby
[13:41:21] vasilakisFiL: has joined #ruby
[13:41:27] quazimodo: has joined #ruby
[13:41:32] Bish: mod.class_eval("def #{meth}!(*args, &block); mutation_method(:#{meth}, *args, &block) end", __FILE__, __LINE__)
[13:41:44] Rodya_: has joined #ruby
[13:41:57] Bish: sneaky jeremy.. crazy dude.
[13:42:01] jmonreal: jhass: bundle init? that would create the template file?
[13:42:09] Bish: jmonreal: exactly
[13:42:09] jhass: ruby-lang655: ever saw my follow up?
[13:42:19] jhass: jmonreal: indeed
[13:42:22] agent_white: Bish: Funny you mention that, I've been learning Sequel the past few days :)
[13:42:27] jmonreal: jhass Bish how do I install bundle?
[13:42:33] jhass: gem install bundler
[13:42:37] Bish: agent_white: the guy who wrote it is a genius imho, it's great, keep using it
[13:42:37] vasilakisFiL: do lamdas return objects or something else ?
[13:42:37] jmonreal: jhass: thanks
[13:42:54] yorickpeterse: hm, TIL ObjectSpace.each_object can sorta run in the background on MRI
[13:42:54] jhass: vasilakisfil: they return instances of the class Proc
[13:42:56] Bish: agent_white: at first i was like "no this is crazy, why would you do that", but its great
[13:43:03] yorickpeterse: I figured it would simply pause all threads, doesn't appear to be the case
[13:44:13] agent_white: Bish: Only issue I've had with it was setting up an "inherited" callback in the model class. I'm not experience enough to fix the issue, but it was getting called twice (I think Sequel::Model was being called along-side my main-child model)
[13:44:14] Bish: jhass: super interesting that the $ prefix outputs the line where theses methods get added dynamcially, isn't it?
[13:44:44] jhass: Bish: the magic is in Method#source_location
[13:44:46] howdoicomputer: has joined #ruby
[13:44:51] techsethi: has joined #ruby
[13:44:59] Bish: agent_white: well i never did such special stuff to it, never used models, even though i should've
[13:45:33] Bish: but using strings as ruby code feels dirty
[13:45:50] agent_white: Bish: Well worth it, even just empty ones like class Foo << Sequel::Model; end; ... just for having the accessors already setup.
[13:46:10] Bish: at some point, i will have to use them, yes
[13:46:23] agent_white: Though, the thing that bugs me is that you can set validators in the model... as well as primary keys, etc... so... do I set them up when I create the table? Or just in the model? etc.
[13:46:43] Bish: when started the probject i naviely tried to do it generic, but it f* me in the *, and now im writing classes for each special case
[13:46:47] agent_white: Not too much a fan of that (or rather the documentation not addressing it)
[13:47:22] Bish: yeah that really feels weird, i think those get only evaluated when u insert/update data
[13:47:27] Jackneill: has joined #ruby
[13:47:28] chouhoulis: has joined #ruby
[13:47:37] jmonreal: jhass Bish, after intalling the gem I still can't run bundle, is there a path that I need to add to PATH env?
[13:47:51] kp666: has joined #ruby
[13:47:54] jhass: jmonreal: if so gem install should have you informed so
[13:48:20] jhass: jmonreal: post your gem env output to gist, the gem install bundler output too if you still have it
[13:48:46] jmonreal: jhass: I had to export my .gem/ruby/......./bin
[13:49:48] aspire: has joined #ruby
[13:50:11] agent_wh1te: has joined #ruby
[13:50:34] agent_wh1te: Bish: So far though, I've really just used the model for helpers... like "last_name = f_name + l_name", etc. :P
[13:50:39] jmonreal: and then to install the gems listed on the Gemfile? bundle install ?
[13:51:19] nateberkopec: has joined #ruby
[13:53:26] jmonreal: that worked
[13:53:27] agent_white: has joined #ruby
[13:53:27] roshanav_: has joined #ruby
[13:53:36] _stu_: has joined #ruby
[13:53:37] kalopsian: has joined #ruby
[13:53:43] baweaver: has joined #ruby
[13:54:02] TomPeed: has joined #ruby
[13:54:03] ramortegui: has joined #ruby
[13:54:36] steffkes: has joined #ruby
[13:54:37] steffkes: has joined #ruby
[13:54:47] AugustoC: has joined #ruby
[13:57:08] platzhirsch: has left #ruby: ()
[13:58:29] Bish: agent_white: have you ever tried using .where with a block? that shit is magic
[13:58:47] Rodya_: has joined #ruby
[13:59:18] agent_white: Bish: Not yet! I've been using Sequel for... a little over a couple days ;)
[13:59:19] xlogic: has joined #ruby
[13:59:24] agent_white: I'll need to try it though!
[13:59:28] skade: has joined #ruby
[13:59:57] Bish: agent_white: you can "call" mysql "functions" in ruby, like they were ruby, i was like wuuaaat is happening
[14:00:07] Bloomer: has joined #ruby
[14:00:14] Bish: but only to find out, there are better ways to do it
[14:00:37] Bish: still pretty impressive use of blocks / missing_method
[14:00:42] Encapsulation: has joined #ruby
[14:02:05] brendan-: has joined #ruby
[14:06:46] stannard: has joined #ruby
[14:07:11] nettoweb: has joined #ruby
[14:08:25] roshanavand: has joined #ruby
[14:08:32] rsc___: has joined #ruby
[14:09:33] cassioscabral: has joined #ruby
[14:11:20] cout: has joined #ruby
[14:11:23] ruby-lang655: thanks jhass, soz was afk for ages
[14:11:56] jhass: >> require "openssl"; ctx = OpenSSL::SSL::SSLContext.new; ctx.ciphers = "LOW:aNull:eNULL"; ctx.ciphers.map(&:first).join(", ") # ruby-lang655
[14:11:57] ruboto: jhass # => "ADH-DES-CBC-SHA, EDH-RSA-DES-CBC-SHA, EDH-DSS-DES-CBC-SHA, DES-CBC-SHA, DES-CBC-MD5, NULL-SHA, NULL ...check link for more (https://eval.in/486191)
[14:16:18] LightStalker: has joined #ruby
[14:17:14] steffkes: has joined #ruby
[14:18:31] uris: has joined #ruby
[14:20:05] jmonreal: has joined #ruby
[14:20:52] cdg: has joined #ruby
[14:21:22] B1n4r10: has joined #ruby
[14:21:56] cassioscabral: has joined #ruby
[14:22:16] aryaching: has joined #ruby
[14:22:51] cdnsteve: has joined #ruby
[14:23:27] CloCkWeRX: has joined #ruby
[14:24:10] neonalpine: has joined #ruby
[14:25:11] idefine: has joined #ruby
[14:25:33] techsethi: has joined #ruby
[14:26:39] dsdeiz: has joined #ruby
[14:26:44] sepp2k: has joined #ruby
[14:27:26] devgiant: has joined #ruby
[14:28:02] Bish: can i actually move into modules like pry does with cd?
[14:28:14] smactive: has joined #ruby
[14:28:28] yardenbar: has joined #ruby
[14:28:44] djbkd: has joined #ruby
[14:30:14] jhass: Foo.instance_eval { you_made_it_inside! }
[14:30:20] apeiros: module Foo; ???you're moved into Foo here???; end
[14:30:25] Bish: yeah well, i knew about that one :D
[14:30:29] apeiros: jhass: wouldn't module_eval make more sense?
[14:30:46] apeiros: also see module_exec (and instance_exec)
[14:30:50] jhass: apeiros: I was generalizing to something like cd does so it works for instances too
[14:31:28] apeiros: yeah, but with instance_eval, it'll work differently than cd
[14:32:10] apeiros: prime example being `def` adding to the singleton_class instead of the module
[14:33:19] Couch: has joined #ruby
[14:33:50] arup_r: has joined #ruby
[14:34:12] norm: has joined #ruby
[14:34:19] dfinninger: has joined #ruby
[14:34:58] norm: is there a way for Gemfile to specify a gem via :path (:path => ???../gem-name???) in development, but pull from rubygems in production?
[14:35:17] norm: i tried using groups, but bundler complains that i???m specifying two different sources for the same gem, even if i exclude one of the groups
[14:35:17] alphaatom: has joined #ruby
[14:36:03] jhass: Norm: I wish but I don't think so
[14:36:26] jhass: you have to keep it around as a stash or so
[14:36:30] jhass: git stash -p might help
[14:36:47] freerobby: has joined #ruby
[14:37:11] norm: jhass: gotcha thanks
[14:37:49] kgirthofer: has joined #ruby
[14:38:09] havenwood: Norm: You could try running a local Gemstash in dev: https://github.com/bundler/gemstash#readme
[14:38:22] agent_wh1te: has joined #ruby
[14:38:50] malconis: has joined #ruby
[14:38:53] agent_white: has joined #ruby
[14:39:40] malconis: has joined #ruby
[14:39:54] jhass: mmh, can that build gems on the fly?
[14:39:58] jhass: that'd be cool
[14:40:02] idefine: has joined #ruby
[14:40:28] dsdeiz: has joined #ruby
[14:43:01] nertzy: has joined #ruby
[14:45:25] krz: has joined #ruby
[14:45:33] cdnsteve: has joined #ruby
[14:45:56] CloCkWeRX: has left #ruby: ()
[14:46:04] RegulationD: has joined #ruby
[14:47:15] dlitvak: has joined #ruby
[14:47:22] Papierkorb: Is there a gem or code which elevates permissions of my process using PolicyKit/PolKit?
[14:47:38] goodcodeguy: has joined #ruby
[14:47:54] beast: has joined #ruby
[14:48:14] chouhoulis: has joined #ruby
[14:48:49] SolarSailor: has joined #ruby
[14:50:19] babblebre: has joined #ruby
[14:51:45] rsc___: has joined #ruby
[14:51:53] shevy: I should create a gem called TrojanHorse!
[14:52:19] Papierkorb: shevy: what I wrote yesterday could be used as keylogger. so there's that.
[14:52:30] cassioscabral: has joined #ruby
[14:53:14] roshanavand: has joined #ruby
[14:56:18] fullofcaffeine: has joined #ruby
[14:57:01] cassioscabral: has joined #ruby
[14:57:52] greister: has joined #ruby
[14:58:04] mary5030: has joined #ruby
[14:58:07] atomical_: has joined #ruby
[14:59:33] pandaant: has joined #ruby
[15:00:44] mary5030: has joined #ruby
[15:01:06] chouhoulis: has joined #ruby
[15:01:55] radgeRayden: has joined #ruby
[15:01:56] radgeRayden_: has joined #ruby
[15:03:28] vasilakisFiL: another issue having lambdas/procs as hash key is that hash.max fails
[15:04:31] Bish: why would someone do that :o
[15:04:56] davedev24: has joined #ruby
[15:06:21] devbug: has joined #ruby
[15:07:34] sucks: has joined #ruby
[15:07:58] Bloomer: has joined #ruby
[15:08:39] atomical: has joined #ruby
[15:08:48] rippa: has joined #ruby
[15:08:49] senayar^: has joined #ruby
[15:08:52] agent_wh1te: has joined #ruby
[15:09:08] jhass: vasilakisfil: Hash is not a 2 pair tuple store, if you don't need the logic [[a0, b0], [a1, b1], ...] is often the saner structure
[15:09:14] devgiant: has joined #ruby
[15:09:21] jhass: "the logic" = lookup by key
[15:09:23] triangles2: has joined #ruby
[15:09:47] vasilakisFiL: I agree but I use it in combination with https://github.com/fl00r/pickup
[15:11:06] momomomomo: has joined #ruby
[15:12:48] bigmac: has joined #ruby
[15:13:42] Jardayn: has joined #ruby
[15:13:46] roshanavand: has joined #ruby
[15:15:27] dlitvak_: has joined #ruby
[15:16:01] seitensei: has joined #ruby
[15:16:22] AustinMatherne: has joined #ruby
[15:17:00] grill: has joined #ruby
[15:17:18] shevy: finally we can have fish ponds
[15:17:33] gregf_: >> h = { "1" => ->(){ "foo" }, "-1" => ->(){ "bar"}, "2" => proc { "baz" } }; [ h.max_by{ |k,_| k }.to_a.last.() ]
[15:17:34] ruboto: gregf_ # => ["baz"] (https://eval.in/486227)
[15:18:21] jhass: gregf_: as *keys*
[15:18:27] whippythellama: has joined #ruby
[15:18:32] iateadonut: has joined #ruby
[15:19:13] axl_: has joined #ruby
[15:19:15] gregf_: jhass: i know. but i wonder why one would use a lambda/proc as a key :|
[15:19:35] jhass: I don't want to imagine
[15:19:39] gregf_: and to add insult to injury... try and sort it
[15:19:47] dfinninger: has joined #ruby
[15:21:33] Renich: has joined #ruby
[15:21:51] arup_r: has joined #ruby
[15:21:54] kies^: has joined #ruby
[15:22:28] shevy: what happened!
[15:22:30] shevy: jhass is getting old
[15:22:35] shevy: in the old days he would have curiously asked WHY
[15:23:06] jhass: you only let yourself get hurt ever so often
[15:23:08] techsethi: has joined #ruby
[15:23:18] _stu_: has joined #ruby
[15:23:23] jhass: (especially by the same person ... :P)
[15:23:40] kirun: has joined #ruby
[15:24:25] agent_white: has joined #ruby
[15:24:54] dhollinger: has joined #ruby
[15:25:51] yes`r: has joined #ruby
[15:26:16] PedramT: has joined #ruby
[15:26:18] Bish: dynamcially created procs and their results?
[15:26:35] Bish: *imagines*
[15:27:08] shevy: code running solely on procs
[15:27:09] shevy: and steroids
[15:27:56] PedramT: has left #ruby: ()
[15:27:56] havenwood: shevy: https://gist.github.com/tomstuart/1466504#file-gistfile1-rb-L51
[15:28:01] devoldmx: has joined #ruby
[15:28:58] TheMoonMaster: has joined #ruby
[15:29:13] nkwsy: has joined #ruby
[15:29:22] Bish: offtopic: is there a tool that creates ERM from existing mysql tables?
[15:29:41] znz_jp: has joined #ruby
[15:29:45] Bish: hope it is not as offtopic, since there might be a gem
[15:30:28] techsethi: has joined #ruby
[15:30:41] momomomomo: has joined #ruby
[15:32:23] shevy: havenwood that reminds me how much I dislike ->
[15:32:43] shevy: that is really a long line of code too
[15:33:56] Bish: what is ->?
[15:34:24] shevy: the hell operator
[15:34:26] zotherstupidguy: whats the encoding of .rb file?
[15:35:12] Bish: shevy: what does it do?
[15:35:13] phantummm: has joined #ruby
[15:35:33] shevy: Bish we must guard this knowledge so that not a new generation of ruby users will start to use it
[15:36:16] benhuda: has joined #ruby
[15:36:23] Bish: the guardians of the operators, makes a horrible movie title
[15:37:10] eam: -> is gross
[15:37:21] eam: everyone knows that -> should be the method dispatch operator
[15:37:23] shevy: zotherstupidguy default should be some UTF ... UTF-8 I think, you can use a # comment to indicate another default though
[15:37:52] shevy: zotherstupidguy for binary you could use # Encoding: ASCII-8BIT
[15:38:30] rrichardsr3: has joined #ruby
[15:38:41] roshanav_: has joined #ruby
[15:39:11] akem: has joined #ruby
[15:40:06] p0wn3d_: has joined #ruby
[15:41:14] akem: has joined #ruby
[15:41:20] govg: has joined #ruby
[15:42:31] icarus_: has joined #ruby
[15:42:39] Elysia: has joined #ruby
[15:42:54] jun_: has joined #ruby
[15:42:59] lxsameer: has joined #ruby
[15:43:00] lxsameer: has joined #ruby
[15:44:00] antgel: has joined #ruby
[15:44:19] aramiscd: has joined #ruby
[15:44:43] SenpaiSilver: has joined #ruby
[15:45:05] cdnsteve: has joined #ruby
[15:45:33] howdoicomputer: has joined #ruby
[15:47:41] KrzaQ: Can I pass something akin to C's function pointer in a nicer way than :symbol and send(:symbol, args...)?
[15:48:14] jhass: KrzaQ: you could pass a Method instance around, not sure if that's any "nicer"
[15:48:21] jhass: KrzaQ: also consider public_send
[15:48:38] sankaber: has joined #ruby
[15:49:02] skade: has joined #ruby
[15:49:11] agent_wh1te: has joined #ruby
[15:49:53] sankaber: has joined #ruby
[15:49:54] KrzaQ: It still doesn't feel like passing a function around. I guess that's the ruby way and I'll have to get used to it
[15:50:21] jhass: KrzaQ: it might just be because "passing a function around" isn't all that a common thing to do
[15:50:43] jhass: first of all because Ruby has no functions, only methods, blocks & Procs
[15:50:44] KrzaQ: I agree that blocks solve most of the use cases
[15:50:57] jhass: yes, those solve 80%
[15:51:19] KrzaQ: But I didn't want to put it all in a block here: https://github.com/KrzaQ/AdventOfCode/blob/master/day16/main.rb
[15:51:24] jhass: another 15% is solved by -> {}, lamdba {}, proc {}
[15:51:34] Icey: http://pastebin.ubuntu.com/14051350/
[15:51:42] Bish: what does -> dooo
[15:51:50] Icey: any ideas why the public archive for downloading ruby is coming back with a 503?
[15:52:11] dorei: has joined #ruby
[15:52:13] jhass: Bish: stabby lambda literal, it's essentially the same as lambda
[15:52:27] ruboto: jhass # => #<Proc:0x40b18074@/tmp/execpad-f8e98d5f9a10/source-f8e98d5f9a10:2 (lambda)> (https://eval.in/486231)
[15:53:07] jhass: Icey: looks like it's down
[15:53:18] akem: has joined #ruby
[15:53:23] Icey: intermittently jhass, about half of the time it works
[15:53:26] roshanavand: has joined #ruby
[15:53:47] Icey: I'm writing some code that users will be able to deploy Ruby onto a machine with and it keeps hitting a 503 when doing a HEAD
[15:53:56] RegulationD: has joined #ruby
[15:53:58] jhass: uh, 2.2.4 came out?
[15:54:00] Icey: sometimes for the last few days
[15:54:08] codecop: has joined #ruby
[15:54:15] Icey: so backends are failing to deliver on 2.2.0 -_- ?
[15:54:45] baweaver: has joined #ruby
[15:55:02] jhass: update time!
[15:56:07] zotherstupidguy: shevy interesting read http://blog.zachallett.com/base64-decode64-does-bad-things-if-you-are-expecting-utf-8-encoded-strings/
[15:56:21] SolarSailor: has joined #ruby
[15:57:41] jhass: zotherstupidguy: not all that surprising given base64 reason d'etre
[15:58:40] cassioscabral: has joined #ruby
[15:59:08] spt0: has joined #ruby
[15:59:19] RobertBirnie: has joined #ruby
[16:01:19] jpank: has joined #ruby
[16:01:26] arup_r: has joined #ruby
[16:02:29] [Butch]: has joined #ruby
[16:03:35] nerium: has joined #ruby
[16:05:07] rickmasta: has joined #ruby
[16:05:33] roshanavand: has joined #ruby
[16:07:16] rdavila: has joined #ruby
[16:08:43] roshanavand: has joined #ruby
[16:10:20] Scripore: has joined #ruby
[16:11:23] Scripore: has joined #ruby
[16:11:53] idefine: has joined #ruby
[16:13:36] treehug88: has joined #ruby
[16:14:54] dfinninger: has joined #ruby
[16:16:48] shevy: zotherstupidguy not affecting me!
[16:18:51] shevy: encodings for regexes still confuse me
[16:21:11] nateberkopec: has joined #ruby
[16:21:18] techsethi: has joined #ruby
[16:21:28] blackjid: has joined #ruby
[16:22:04] pwnd_nsfw: has joined #ruby
[16:23:23] BTRE: has joined #ruby
[16:23:24] roshanav_: has joined #ruby
[16:23:35] agent_white: Regexes confuse me in general. :(
[16:23:51] shevy: they can become quite complicated
[16:24:28] shevy: It always takes my brain more brain-power to figure out what is going on in a regex
[16:24:51] emrox: has joined #ruby
[16:25:04] mark3: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PONG :hitchcock.freenode.net")
[16:25:30] cdnsteve: has joined #ruby
[16:26:36] hobodave: has joined #ruby
[16:29:02] tulak: has joined #ruby
[16:31:09] nofxx: has joined #ruby
[16:32:44] dstarh: has joined #ruby
[16:33:15] dfinninger: has joined #ruby
[16:34:14] techsethi: has joined #ruby
[16:36:03] agent_wh1te: has joined #ruby
[16:37:02] agent_white: has joined #ruby
[16:40:45] phantummm: has joined #ruby
[16:41:22] SolarSailor: has joined #ruby
[16:44:14] sphex: has joined #ruby
[16:45:07] akem2: has joined #ruby
[16:46:59] momomomomo: has joined #ruby
[16:47:29] spt0: has joined #ruby
[16:48:30] baweaver: has joined #ruby
[16:51:12] sigurding: has joined #ruby
[16:52:51] agent_white: has joined #ruby
[16:52:58] akem: has joined #ruby
[16:54:38] cwong_on_irc: has joined #ruby
[16:55:20] cpup: has joined #ruby
[16:55:47] Peteykun: has joined #ruby
[16:56:52] jbrhbr: has joined #ruby
[16:56:56] cdnsteve: has left #ruby: ()
[16:57:47] idefine: has joined #ruby
[16:58:37] msankhala: has joined #ruby
[16:58:50] synthroid: has joined #ruby
[17:00:17] weemsledeux: has joined #ruby
[17:00:21] agent_white: has joined #ruby
[17:00:30] akem: has joined #ruby
[17:00:49] st1gma: has joined #ruby
[17:00:50] hxegon: has joined #ruby
[17:04:34] FernandoBasso: has joined #ruby
[17:06:13] devbug: has joined #ruby
[17:07:08] rickmasta: has joined #ruby
[17:07:10] pawnbox: has joined #ruby
[17:07:49] wolffles: has joined #ruby
[17:08:13] startupality: has joined #ruby
[17:08:40] akem: has joined #ruby
[17:09:39] platzhirsch: has joined #ruby
[17:09:57] Hanmac: has joined #ruby
[17:10:05] platzhirsch: >> Time.parse('2015-06-09 17:10:16.039')
[17:10:06] ruboto: platzhirsch # => undefined method `parse' for Time:Class (NoMethodError) ...check link for more (https://eval.in/486283)
[17:10:21] jackjackdripper: has joined #ruby
[17:10:27] ljarvis: require 'time'
[17:10:32] FernandoBasso: has joined #ruby
[17:10:32] ljarvis: then open irb and use that for testing ;)
[17:10:34] s00pcan: has joined #ruby
[17:10:50] platzhirsch: >> require 'time'; Time.parse('2015-06-09 17:10:16.039')
[17:10:51] ruboto: platzhirsch # => 2015-06-09 17:10:16 +0000 (https://eval.in/486284)
[17:10:58] ljarvis: well one out of two isn't bad
[17:10:59] vdamewood: has joined #ruby
[17:11:07] AntKnee: has joined #ruby
[17:11:29] platzhirsch: Interesting.. for me it returns +0100 well
[17:11:35] platzhirsch: how can I make it interpret it as UTC?
[17:11:46] platzhirsch: Except concatenating " UTC" to it
[17:12:18] akem: has joined #ruby
[17:12:26] mg^: I like Date better
[17:12:34] mary5030: has joined #ruby
[17:12:47] mg^: >> require 'date'; Date.parse('next friday')
[17:12:48] ruboto: mg^ # => #<Date: 2015-12-18 ((2457375j,0s,0n),+0s,2299161j)> (https://eval.in/486285)
[17:12:52] dfinninger: has joined #ruby
[17:13:15] platzhirsch: mg^: why are you pointing to my messages with ^ ?
[17:13:23] ljarvis: platzhirsch: just add the UTC if you want Time.parse
[17:13:33] mary5030: has joined #ruby
[17:13:39] platzhirsch: ljarvis: any other method? I guess it's the only way
[17:13:41] mg^: no matter how many people say that, I am not taking my hat off :-)
[17:13:50] ljarvis: platzhirsch: or use activesupport
[17:13:58] platzhirsch: ActiveSupport's available
[17:14:06] ljarvis: go for that, then
[17:14:20] akem2: has joined #ruby
[17:14:35] platzhirsch: Time.zone = 'UTC'; Time.zone.parse you mean?
[17:15:02] rickmasta: has joined #ruby
[17:15:22] amclain: has joined #ruby
[17:16:55] seitensei: has joined #ruby
[17:17:20] TomyLobo: has joined #ruby
[17:17:24] devbug: has joined #ruby
[17:17:42] rickmasta: has joined #ruby
[17:18:39] akem: has joined #ruby
[17:19:16] platzhirsch: thanks ljarvis :)
[17:21:27] wmdrossard: has joined #ruby
[17:21:37] yardenbar: has joined #ruby
[17:23:33] afisher: has joined #ruby
[17:25:18] ChameleonSix: has joined #ruby
[17:25:24] ChameleonSix: I need help on ruby
[17:25:36] ChameleonSix: How do i add a hash inside the array that is in the hash
[17:25:43] ChameleonSix: grocery_list = { 'title' => 'Grocery List', 'items' => [] }
[17:25:51] ChameleonSix: how do i add a hash into that array
[17:26:16] akem: has joined #ruby
[17:26:22] jhass: what did you try and what error did you get?
[17:26:35] ChameleonSix: I dont know what to try
[17:26:46] ChameleonSix: It can be used "" because it is a string
[17:26:47] gizmore: grocery_list["items"].push({})
[17:27:28] gizmore: this will add a hash as first item in "items"
[17:27:55] ChameleonSix: Im doing ruby tutorials right now
[17:28:01] ChameleonSix: I will stay here if i need some help
[17:28:06] ChameleonSix: I wont do single line lols
[17:28:27] idefine: has joined #ruby
[17:28:39] CrazyEddy: has joined #ruby
[17:28:46] devoldmx: has joined #ruby
[17:29:06] galeido: has joined #ruby
[17:29:06] galeido: has joined #ruby
[17:29:21] ChameleonSix: Anyway what are ruby blocks used for
[17:29:48] ljarvis: what tutorial are you using?
[17:29:50] jhass: I'm sure your tutorial explains that much better than what we can reasonably type up here
[17:30:02] ljarvis: ^ that's where I was going too
[17:30:03] ChameleonSix: Is it any good?
[17:30:11] ljarvis: I don't know what you're talking about
[17:30:11] hxegon: >> [1, 2, 3].map do |i| i + 1 end
[17:30:14] ruboto: hxegon # => [2, 3, 4] (https://eval.in/486293)
[17:30:37] ljarvis: ChameleonSix: what is Tree house? maybe you could share a link...
[17:31:03] dfinninger: has joined #ruby
[17:31:17] ChameleonSix: https://teamtreehouse.com/home
[17:31:21] wolffles: i cant seem to push a formula ( 2 ** i ) << array [ i ] ??? also using i =+ 1
[17:31:24] akem2: has joined #ruby
[17:31:27] ChameleonSix: I have a habit of saying lol
[17:31:56] jhass: wolffles: wrong way around?
[17:31:59] goodcodeguy: has joined #ruby
[17:32:02] hxegon: ChameleonSix, +=
[17:32:13] jhass: wolffles: array[i] << 2**i
[17:32:28] B1n4r10: has joined #ruby
[17:33:10] ChameleonSix: I got another question
[17:33:17] ChameleonSix: How do i count items in the array
[17:33:23] jhass: ChameleonSix: no need to announce it, just ask
[17:33:29] ljarvis: ChameleonSix: try it?
[17:33:30] jhass: &ri Array#size
[17:33:31] `derpy: method `Array#size`: Returns the number of elements in +self+. May be zero. [ 1, 2, 3, 4, 5 ].length ??? ??? http://rubydoc.info/stdlib/core/Array#size-instance_method
[17:33:54] ljarvis: irb is your friend whilst learning Ruby
[17:33:59] ChameleonSix: hmm i will try
[17:34:00] hxegon: ChameleonSix, I suggest trying irb and google before asking questions here
[17:34:07] ChameleonSix: google is shit
[17:34:07] BSaboia: has joined #ruby
[17:34:17] akem: has joined #ruby
[17:34:30] hxegon: ChameleonSix, no. It's how I learned programming, so for sure you're doing something wrong
[17:34:35] ljarvis: google is better than any other web search engine for finding stuff, so I don't think that's accurate
[17:34:59] wolffles: so this is my code (i = 0
[17:35:00] wolffles: while i < 100; array[i] << 2**i; i += 1 end) im getting undefined method << for nil:NIlClass
[17:35:01] apeiros: if google is shit, then use whichever search engine you consider not shit
[17:35:17] ChameleonSix: .push and unshift are used to add
[17:35:19] hxegon: wolffles, try eval.in or gist for multiline code
[17:35:19] eam: "they're all shit" is a reasonable and consistent opinion
[17:35:25] apeiros: wolffles: because array[i] is nil
[17:35:28] ChameleonSix: I didnt say all
[17:35:57] apeiros: wolffles: think about it - why should array[i] be anything but nil? you initialize array as an empty array???
[17:36:16] wolffles: just to define a variable i thought you could do that
[17:36:27] hxegon: ChameleonSix, there is a reason the word 'google' means 'use a search engine', but if you have a problem with it just use bing.
[17:36:39] apeiros: wolffles: sure. but all it does is create an empty array.
[17:36:50] mrbignum: has joined #ruby
[17:36:54] apeiros: so again, what value did you expect to be at array[i]?
[17:37:26] ChameleonSix: I cant complete a tutorial
[17:37:29] ChameleonSix: can someone help me?
[17:37:30] wolffles: i just needed a place holder so that array[i] << 2**i can push into
[17:37:48] hxegon: ChameleonSix, don't ask to be helped, ask the questions directly.
[17:37:52] ChameleonSix: Using the loop construct, add the current value of number to the numbers array. Inside of the loop, add 1 to the number variable. Use the break keyword to exit the loop once the numbers array has 3 items.
[17:37:58] ChameleonSix: i should use the while loop
[17:38:02] eam: wolffles: do you mean array << 2**i ?
[17:38:04] ChameleonSix: I mean it is the best for this
[17:38:15] ChameleonSix: while array.lenght <= 3
[17:38:15] eam: wolffles: why are you trying to shovel it into array[i] ?
[17:38:31] toretore: ChameleonSix, that won't make use of the break keyword
[17:38:39] toretore: you need an infinite loop
[17:38:54] hxegon: ChameleonSix, while true I think
[17:38:57] toretore: there are two main ways to do that: loop{} and while(true){}
[17:38:59] wolffles: its so i can just have an array for the powers of 2
[17:39:09] dotix: has joined #ruby
[17:39:10] eam: wolffles: you want to shovel onto just "array"
[17:39:11] hxegon: ChameleonSix, ljarvis has it
[17:39:20] idefine: has joined #ruby
[17:39:24] akem: has joined #ruby
[17:39:40] ljarvis: wolffles: "apeiros> so again, what value did you expect to be at array[i]?" -- it is important that you answer this imo
[17:39:46] eam: wolffles: what you're doing is dereferencing the array index at array[i], which is nil, and shoveling onto nil -- which is why you get that error
[17:39:54] toretore: wolffles, you have to understand what `array[i] <<` means
[17:40:05] ChameleonSix: can i paste my code somewhere
[17:40:06] toretore: and why it's not `array[i] =`
[17:40:12] hxegon: ChameleonSix, gist
[17:40:13] wolffles: i see push changes the spot it pushes into an array cuz it just adds on to it
[17:40:14] ChameleonSix: it isnt working
[17:40:19] eam: wolffles: array[i] << val would be used in a two-dimensional array situation
[17:40:19] wolffles: i was confused thanks all
[17:40:20] hxegon: ChameleonSix, or eval.in
[17:40:31] ljarvis: ChameleonSix: you dont have to write sec all the time, people will wait
[17:40:47] toretore: ?spacenotenter
[17:40:47] ruboto: I don't know anything about spacenotenter
[17:40:52] wolffles: ive never used eval.in no idea what it does
[17:40:54] toretore: you're useless ruboto
[17:41:00] ruboto: here's your pizza: ????
[17:41:09] ChameleonSix: <script src="https://gist.github.com/anonymous/1db4ac4f3edab3b15706.js"></script>
[17:41:15] toretore: thanks for the 01F355
[17:41:25] ChameleonSix: https://gist.github.com/anonymous/1db4ac4f3edab3b15706
[17:41:41] ljarvis: ChameleonSix: you have a loop inside a loop. I don't think you need that do you?
[17:41:51] dionysus69: has joined #ruby
[17:41:56] ljarvis: ok so you can remove the inside while loop
[17:41:59] toretore: ChameleonSix, in general, programming is a lot about thinking. thinking first, then writing
[17:42:06] toretore: you write first and then think
[17:42:18] kristianpaul: has left #ruby: ()
[17:42:48] rakm: has joined #ruby
[17:43:13] ChameleonSix: i get the error
[17:43:14] ChameleonSix: The length of the `numbers` array was not 3.
[17:43:25] akem2: has joined #ruby
[17:43:26] SolarSailor: has joined #ruby
[17:43:27] soahccc: toretore: Hehe true. My family doesn't understand when I'm sitting somewhere looking holes into the air and they ask me what I'm doing and my response is just: "working" :)
[17:45:19] akem: has joined #ruby
[17:46:17] howdoicomputer: has joined #ruby
[17:46:35] hxegon: wolffles, you write your code in the box, hit submit and you are at a page which evaluates that code. so it's like a gist, but you can see what stack traces or output it has
[17:47:42] hxegon: wolffles, yes?
[17:47:52] ruby-lang776: has joined #ruby
[17:47:58] wolffles: i cant google fast enough :[
[17:48:17] pdoherty: has joined #ruby
[17:48:22] ljarvis: http://gist.github.com
[17:48:35] ChameleonSix: https://gist.github.com/anonymous/34d63d538517b739c15c
[17:48:36] hxegon: GOOGLE FASTER NURD /jk
[17:48:39] ChameleonSix: why isnt this working
[17:48:54] wolffles: ahh this is cool
[17:49:03] ljarvis: ChameleonSix: "isn't working" isn't a very conclusive error
[17:49:16] ChameleonSix: i mean it prints the error
[17:49:18] ChameleonSix: in the tutorial
[17:49:28] ljarvis: ChameleonSix: please wait more than 3 seconds for someone to answer before starting with "anyone?"
[17:49:59] ljarvis: I don't know what the question is, so can't really help
[17:50:01] akem: has joined #ruby
[17:50:09] hxegon: ChameleonSix, your expecting an error? what error are you expecting?
[17:50:19] ruby-lang968: has joined #ruby
[17:50:22] eytanfb: has joined #ruby
[17:50:40] joonty: has joined #ruby
[17:50:43] nertzy: has joined #ruby
[17:50:43] wolffles: yay i solved my problem
[17:50:59] ruby-lang776: http://pastebin.com/0sBCrcXR is listing low and null ciphers via openssh however I can't figure out how to iterate through the ciphers (in check_for?) as an array, can anyone help?
[17:50:59] ruboto: ruby-lang776, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[17:51:03] hxegon: wolffles, :D
[17:51:47] jhass: ruby-lang776: don't join them when you want them separate
[17:51:51] jhass: that was just for the demo
[17:52:06] wolffles: just testing <script src="https://gist.github.com/anonymous/edeb1ca3d7cce7b6cb6c.js"></script>
[17:52:18] ruby-lang776: soz ruboto ;)
[17:52:51] wolffles: my link doesn???t seem to work
[17:53:01] ljarvis: https://gist.github.com/anonymous/edeb1ca3d7cce7b6cb6c
[17:53:34] wolffles: oh it works for you?
[17:53:41] jhass: ruby-lang776: also the begin rescue is just added by the bot to be able to show any error message, don't port it into your real code
[17:53:52] hxegon: wolffles, if you take the .js off the end and ignore the script tag
[17:53:55] mrtomme: has joined #ruby
[17:54:06] yardenbar: has joined #ruby
[17:54:14] ljarvis: also pretty sure power of 2 check could be x & (x???1) == 0
[17:54:41] berserk_ren: has joined #ruby
[17:55:22] akem: has joined #ruby
[17:55:52] hxegon: ChameleonSix, the more you know about programming, the more you know you don't know anything about programming :)
[17:56:11] wolffles: ljarvis: im trying to make sense of what you said
[17:56:26] apeiros: hah! I check topic and somebody already updated for the new ruby version. nice work! :D
[17:56:33] apeiros: thanks @ jhass
[17:56:48] ljarvis: wolffles: n = 16; n & (n-1) == 0
[17:56:54] ljarvis: >> n = 16; n & (n-1) == 0
[17:56:54] apeiros: ACTION 2h late :-S
[17:56:55] ruboto: ljarvis # => true (https://eval.in/486333)
[17:57:48] dsdeiz: has joined #ruby
[17:57:53] wolffles: oh derp thats cool
[17:58:00] wolffles: much easier than mine
[17:58:08] wolffles: and eval.in is cool!
[17:58:36] hxegon: wolffles, yeah it is
[17:59:12] arup_r: has joined #ruby
[17:59:35] colleenmcguckin: has joined #ruby
[18:00:07] howdoicomputer: has joined #ruby
[18:01:31] ChameleonSix: how do i assign a value to a method
[18:01:48] jbrhbr: has joined #ruby
[18:02:02] hakunin_: has joined #ruby
[18:02:13] hxegon: >> def val; 1; end # ChameleonSix
[18:02:14] ruboto: hxegon # => :val (https://eval.in/486349)
[18:02:26] hxegon: >> def val; 1; end; val # ChameleonSix oops
[18:02:27] ruboto: hxegon # => 1 (https://eval.in/486354)
[18:02:39] zast: has joined #ruby
[18:02:46] Dimik: has joined #ruby
[18:02:56] ChameleonSix: i mean def width(x)
[18:03:11] ChameleonSix: that is calling
[18:03:23] hxegon: not sure what you're trying to do here ChameleonSix
[18:03:24] steffkes: has joined #ruby
[18:03:24] steffkes: has joined #ruby
[18:03:37] hfp: Hi all, I have a module whose private methods I'd like to test. I saw that you can use :send for objects to reach private methods but will it also work for a module? A module has no instance so on what do I call the send method?
[18:04:02] ChameleonSix: can i paste the tutorial text
[18:04:05] ChameleonSix: im confused with it
[18:04:12] hxegon: ChameleonSix, no, gist it.
[18:04:25] hfp: >> def width(size); size; end; width(50) # ChameleonSix
[18:04:26] ruboto: hfp # => 50 (https://eval.in/486361)
[18:04:35] ChameleonSix: https://gist.github.com/anonymous/1b453f991608cbfe7944
[18:04:56] ruby-lang968: ChameleonSix YOU can assign default values to a method
[18:05:18] ChameleonSix: there is no default
[18:05:31] dfinninger: has joined #ruby
[18:05:39] hfp: ChameleonSix: I think they mean to put the result of `get_answer()` into a variable
[18:05:50] ruby-lang968: are you not writing the code?
[18:06:19] hfp: so something like `answer = get_answer()`. Then your `answer` variable will hold whatever get_answer() returned and you can then parse it further
[18:06:24] ChameleonSix: https://gist.github.com/anonymous/270caa8b2c56f5defbc2
[18:06:38] ChameleonSix: it doesnt pass
[18:06:51] mikecmpbll: has joined #ruby
[18:07:20] KrzaQ: Let's say I want to override method_missing for Hash, so that if the has has_key? method_name it returns its value, but otherwise retains the standard behaviour. I know how to do the former, but not the latter
[18:07:59] ChameleonSix: it should say answer = get_answer()
[18:08:10] nateberkopec: has joined #ruby
[18:08:12] yqt: has joined #ruby
[18:08:14] soahccc: KrzaQ: super?
[18:08:25] jhass: KrzaQ: also OpenStruct
[18:08:46] KrzaQ: soahccc: I'm a ruby noob with some spotty knowledge, so my questions may seem stupid, but I usually get by
[18:09:16] soahccc: KrzaQ: but yeah tampering with Hash is generally not a good idea :9
[18:09:36] jhass: hfp: the module doesn't call these private methods from public methods?
[18:09:50] jhass: hfp: if you use .send in a test you're most likely doing it wrong
[18:10:38] KrzaQ: soahccc: this is for 1-line scripts for advent of code :P
[18:10:43] KrzaQ: jhass: thanks, looks nice
[18:10:52] hxegon: has joined #ruby
[18:11:00] ChameleonSix: https://gist.github.com/anonymous/89ded21db6d1718dead5
[18:11:06] ChameleonSix: why does this show an error
[18:11:37] ChameleonSix: it print the number 6 right?
[18:11:38] adaedra: what error?
[18:11:38] atomical_: has joined #ruby
[18:11:48] ChameleonSix: i should be greater than 5
[18:11:55] ChameleonSix: when i use the until loop
[18:12:01] adaedra: It prints nothing, as you don't print anything.
[18:12:06] KrzaQ: jhass: I don't suppose require 'ostruct' would add to_ostruct method to Hash?
[18:12:21] adaedra: Also, if you put an extension in gist, you'll have syntax coloring.
[18:12:39] ChameleonSix: but it does something inside
[18:12:54] jhass: KrzaQ: given there's no "class Hash" in https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb, no
[18:13:15] ChameleonSix: Im a ruby genius
[18:13:38] hxegon: slow down kanye :)
[18:13:47] adaedra: Again with the lols? Stop it.
[18:13:49] KrzaQ: jhass: ok, thank you
[18:13:54] soahccc: KrzaQ: https://gist.github.com/2called-chaos/d47d959efbd1f53ce6c3#file-transformator-rb-L13
[18:13:59] ChameleonSix: do...while is a js loop?
[18:14:05] startupality: has joined #ruby
[18:14:49] adaedra: What does js has to do with any of this
[18:15:01] ChameleonSix: I just wondered
[18:15:04] ChameleonSix: they are connected
[18:15:08] ChameleonSix: Everything is connected
[18:16:43] kalopsian: has joined #ruby
[18:17:03] hxegon: ChameleonSix, while that is true, please keep #ruby to ruby topics and not metaphysical observations.
[18:17:34] hxegon: that would be ##metaphysical-rebooted-v2
[18:17:42] ChameleonSix: I cant get the hang of array iteration
[18:17:57] KrzaQ: thanks soahccc
[18:18:01] hxegon: ChameleonSix, what are you trying to do to the elements?
[18:18:01] ChameleonSix: array.each do |item|
[18:18:07] ChameleonSix: what does | | mean
[18:18:14] adaedra: block parameters.
[18:18:14] ChameleonSix: when something is in it
[18:18:55] ChameleonSix: array.each do |item| puts "The current array item is: #{item}" end
[18:19:01] ChameleonSix: this will list through all items?
[18:19:03] poguez_: has joined #ruby
[18:19:06] ChameleonSix: and print them
[18:19:20] adaedra: well, did you try?
[18:19:32] soahccc: ChameleonSix: http://mixandgo.com/blog/mastering-ruby-blocks-in-less-than-5-minutes
[18:19:40] adaedra: trying is the best way to see what it does.
[18:21:43] howdoicomputer: has joined #ruby
[18:22:05] kerframil: has joined #ruby
[18:22:07] eytanfb: has joined #ruby
[18:22:54] ChameleonSix: i understand this
[18:22:59] ChameleonSix: blocks work with everything
[18:23:07] ChameleonSix: I mean iteration is used for hashes also
[18:23:08] shevy: every method in ruby can accept a block
[18:23:23] juddey: has joined #ruby
[18:23:24] adaedra: not all of them use the block tho.
[18:23:44] ChameleonSix: Im not that noobish
[18:23:45] shevy: you know a lot already
[18:24:51] pawnbox: has joined #ruby
[18:26:03] ChameleonSix: i feel smarter
[18:26:15] ChameleonSix: Can you help me about something little more complex?
[18:26:17] NeverDie: has joined #ruby
[18:26:28] ChameleonSix: I dont have an idea how to define it
[18:26:47] jhass: ChameleonSix: next meta question will get you kicked, the one after muted for an hour
[18:26:57] ChameleonSix: I dont want that
[18:27:08] ChameleonSix: How do i make a ruby script that opens my browser(firefox)
[18:27:19] havenwood: ChameleonSix: What OS/distro?
[18:27:22] ChameleonSix: it might be a stupid question
[18:27:27] ljarvis: http://stackoverflow.com/questions/152699/open-the-default-browser-in-ruby
[18:27:36] jhass: system("firefox")
[18:27:39] ljarvis: it's not a stupid question, which is why it's a very popular google search
[18:28:05] shevy: ChameleonSix come to linux man
[18:28:07] devbug_: has joined #ruby
[18:28:09] adaedra: jhass: too bad it's system-dependant.
[18:28:12] ChameleonSix: I got it on laptop
[18:28:15] ChameleonSix: cant game on linux
[18:28:16] shevy: ChameleonSix you can set the xorgbuffer and open into a firefox tab
[18:28:42] ChameleonSix: how do i know how to call the web browser
[18:28:47] ChameleonSix: webbrowser for example
[18:28:57] ChameleonSix: how do i do the same with notepad?
[18:28:59] shevy: jhass showed you how it works
[18:29:00] medvedushka: has joined #ruby
[18:29:03] shevy: quit being such a noob
[18:29:04] mary5030: has joined #ruby
[18:29:40] jhass: ChameleonSix: you next question must show that you did you research prior asking it
[18:29:48] axl_: has joined #ruby
[18:29:51] ChameleonSix: i duckducked it
[18:29:52] shevy: you can use cygwin/msys on windows too so commandline should work. no idea if you can manipulate the buffer on windows from the commandline though
[18:30:23] momomomomo: has joined #ruby
[18:30:30] adaedra: shevy: you don't have an even more complicated answer...?
[18:30:56] kadoppe: has joined #ruby
[18:30:59] ljarvis: pass the buffer to the gibson via telnet
[18:31:14] BSaboia: has joined #ruby
[18:31:27] djbkd: has joined #ruby
[18:31:34] shevy: adaedra it's very trivial, I am sorry that you don't understand it but with hard work you may be able to
[18:31:56] ljarvis: shots fired
[18:32:19] hahuang65: has joined #ruby
[18:32:33] Emmanuel_Chanel: has joined #ruby
[18:32:42] akem: has joined #ruby
[18:32:48] wildlander: has joined #ruby
[18:32:49] BSaboia: has joined #ruby
[18:32:59] ChameleonSix: hmm i cant understand this isnt working
[18:33:01] Emmanuel_Chanel: has joined #ruby
[18:33:14] hxegon: ChameleonSix, well,
[18:33:16] ChameleonSix: I need to link the cmd and ruby?
[18:33:21] baweaver: has joined #ruby
[18:33:30] hxegon: ChameleonSix, obviously the solution is to delete System32
[18:33:31] adaedra: ChameleonSix: did you at least open ljarvis's link?
[18:33:35] shevy: ChameleonSix what is not working with jhass' example
[18:33:35] djbkd: has joined #ruby
[18:33:45] medvedushka: /msg nickserv help
[18:34:01] ckrailo: has joined #ruby
[18:34:02] knowtheory: has joined #ruby
[18:34:21] akem2: has joined #ruby
[18:34:41] adaedra: ChameleonSix: then you've got multiple solutions to work with.
[18:34:42] pdoherty: has joined #ruby
[18:35:01] tAn: has joined #ruby
[18:35:02] kalopsian: has joined #ruby
[18:35:09] ChameleonSix: some ruby programs dont need an end?
[18:35:25] ljarvis: ChameleonSix: jhass warned you
[18:35:50] atmosx: Say I want to create a list with all possible permutations of a word. What is the logic behind it? I'm thinkin about it: 1) turn word into array, 2) move 1st char one position to the left, 3) save new array to an array of arrays (matrix), 4) repeat for new array (recursively). Is that it?!
[18:36:12] adaedra: atmosx: there's Array#permutations otherwise.
[18:36:30] akem: has joined #ruby
[18:36:36] atmosx: adaedra: I need to understand the process, not just create a permutation
[18:36:57] atmosx: adaedra: I feel like I'm missing something.
[18:37:07] shevy: there is a new ruby?
[18:37:10] framling: has joined #ruby
[18:37:24] atmosx: shevy: crystal?
[18:37:28] Macaveli: has joined #ruby
[18:37:32] hxegon: shevy, it just fixes a security issue with fiddle
[18:38:09] aibot: has joined #ruby
[18:38:17] shevy: aaaah ok... thought it was early xmas ... ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.xz
[18:38:31] hxegon: atmosx, does crystal have type inference?
[18:38:32] akem: has joined #ruby
[18:39:17] atmosx: hxegon: I have no idea, I just know it exists and that it's pretty similar to ruby, ping jhass he'll know.
[18:39:34] ljarvis: atmosx: the best way to put it is "from left to right, generate all permutations of the rest of the elements until you get to the end"
[18:39:39] ljarvis: hxegon: yes it does
[18:39:48] hxegon: ljarvis, :D
[18:39:59] atmosx: ljarvis: okay, thanks. I'll try to implement a dummy vesion see how it goes.
[18:40:36] ljarvis: atmosx: maybe take a look to see what the ruby C code does too, there are different algorithms I guess
[18:40:46] jhass: hxegon: it does
[18:41:21] ChameleonSix: jhass you are a genius
[18:41:25] ht__: has joined #ruby
[18:41:27] hxegon: I'll check it out, check check check it out
[18:42:24] hxegon: ChameleonSix, we actually took a vote and decided to refer to jhass as 'senpai', please respect the room rules :\
[18:42:34] jbrhbr: has joined #ruby
[18:42:36] ruboto: jhass is anybody. They're a member of the op staff in #ruby, contributor to ruboto and ruby-community.com
[18:42:49] ruboto: I don't know anything about ljarvis
[18:42:53] ljarvis: DAMN RIGHT
[18:43:00] InvGhost: has joined #ruby
[18:43:29] adaedra: !fact add ljarvis I know everything about ljarvis
[18:43:31] ruboto: adaedra, I will remember that ljarvis is I know everything about ljarvis
[18:43:49] roshanavand: has joined #ruby
[18:43:59] jherm: has joined #ruby
[18:44:02] ChameleonSix: ruboto is that thing on android
[18:44:10] ChameleonSix: why do half commands dont work there?
[18:44:29] platzhirsch: has left #ruby: ()
[18:44:36] hxegon: #ot ChameleonSix
[18:44:42] ChameleonSix: no root permission?
[18:44:44] hxegon: ?ot ChameleonSix
[18:44:44] ruboto: ChameleonSix, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[18:45:17] ruboto: I don't know anything about baweaver
[18:45:18] Nvp: has joined #ruby
[18:45:18] psye: has joined #ruby
[18:45:22] robbyoconnor: has joined #ruby
[18:45:36] ruboto: I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
[18:46:00] hxegon: ruboto is the king of the north
[18:46:05] Nvp: hey, there has been a lot of talk of Crystal lately, and how it's 25 times faster than ruby, and has 90% ruby syntax compatibility. What does this mean for the future of ruby? Will the ruby eventually adopt crystal and optionally become compilable?
[18:46:30] ljarvis: nvp: no to the second question
[18:46:42] adaedra: nvp: they're still two different things
[18:46:46] ljarvis: nvp: and probably nothing to the first question
[18:46:48] shevy: nvp just as any other language, it's a different one
[18:46:50] medvedushka: ruboto a bot, but talking like a human. Turing should be happy,lol
[18:46:59] JCOE: has joined #ruby
[18:47:00] ljarvis: crystal just borrows lots of Ruby's syntax, that's really it
[18:47:11] ht__: has joined #ruby
[18:47:29] ljarvis: it's actually too similar to Ruby for me, but it is very nice
[18:47:33] jherm: I'm having a strange problem. I'm looking at erb usage examples online and for some reason, even when I "require 'erb'", I get a NameError when I reference Erb. Anyone have any ideas?
[18:47:36] SirFunk: Anyone use any good self-hosted solutions for collecting metrics in ruby? (Things like requests/sec and request durations?)
[18:47:37] eam: many, many languages are 25 times faster than ruby
[18:47:48] shevy: exactly 25 times!
[18:48:15] ljarvis: jherm: it's ERB
[18:48:19] medvedushka: where all these sites on assembler
[18:48:28] jherm: wow, derp
[18:49:59] jherm: ijarvis: thank you very much!
[18:50:08] ljarvis: it's an L, but you're welcome :)
[18:50:39] jherm: Erb, ERB, ijarvis, ljarvis, same thing
[18:50:41] baweaver: iJarvis - Apple AI
[18:50:56] shiver: has joined #ruby
[18:51:03] ljarvis: where is inkjet when you need him
[18:51:04] eam: shevy: but on the 26th time they're slower :(
[18:51:05] hxegon: gnu plus marvel
[18:52:00] kgirthofer: has joined #ruby
[18:52:01] ChameleonSix: I feel so smart when i know ruby
[18:52:59] yorickpeterse: ljarvis: /nick iJarvis
[18:53:28] hxegon: >> (1..10).inject([]) { |mem, i| mem += i } # ChameleonSix how does this work
[18:53:29] idefine: has joined #ruby
[18:53:29] ruboto: hxegon # => no implicit conversion of Fixnum into Array (TypeError) ...check link for more (https://eval.in/486377)
[18:53:40] baweaver: not well apparently
[18:53:44] hxegon: Ahhhh, I am the one who is stuuuuuuuup
[18:54:05] crankharder: has joined #ruby
[18:54:09] adaedra: I think you're looking for <<.
[18:54:09] hxegon: >> (1..10).to_a.inject([]) { |mem, i| mem += i } # ChameleonSix how does this work
[18:54:10] ruboto: hxegon # => no implicit conversion of Fixnum into Array (TypeError) ...check link for more (https://eval.in/486378)
[18:54:16] jhass: hxegon: looks like you wanted each_with_object
[18:54:16] ChameleonSix: in range from 1 to 10
[18:54:37] ChameleonSix: hmm mem ,i defines a key and value of the hash
[18:54:40] jmonreal: has joined #ruby
[18:54:48] baweaver: ChameleonSix: nope
[18:54:55] baweaver: memo and iterator
[18:55:27] baweaver: inject is also known as reduce, which is known as foldLeft in functional languages
[18:55:48] baweaver: you're passing a piece of state through a function that's getting folded onto
[18:55:52] shredding: has joined #ruby
[18:56:07] baweaver: >> (1..5).reduce(0) { |m, i| m + i }
[18:56:08] colleenmcguckin: has joined #ruby
[18:56:08] ruboto: baweaver # => 15 (https://eval.in/486379)
[18:56:08] hxegon: >> (1..10).inject { |mem, i| mem += i }
[18:56:10] ruboto: hxegon # => 55 (https://eval.in/486380)
[18:56:19] jhass: hxegon: no need for the =
[18:56:26] baweaver: the return of each function is the new value of the memo
[18:56:34] baweaver: until the last, when the memo is returned.
[18:56:47] baweaver: memo, accumulator, state, take your pick of name.
[18:57:10] ht__: has joined #ruby
[18:57:56] hxegon: and 0 in baweaver's example is the initial value of m
[18:58:10] baweaver: otherwise it's the first value of the collection
[18:58:18] colegatron: has joined #ruby
[18:59:02] firstdayonthejob: has joined #ruby
[18:59:18] lemur: has joined #ruby
[18:59:20] hxegon: >> (1..5).reduce { |m, i| m + i }
[18:59:21] ruboto: hxegon # => 15 (https://eval.in/486381)
[18:59:24] baweaver: http://baweaver.com/blog/2015/06/20/a-functional-programming-primer-for-spark/
[18:59:38] baweaver: it's in Scala / Python but gives a general overview of FP like that
[18:59:39] akem: has joined #ruby
[18:59:39] hxegon: didn't know that baweaver
[18:59:48] baweaver: most of the same can be done in ruby
[18:59:59] baweaver: (of _that_ part of Scala)
[19:00:10] fmcgeough: has joined #ruby
[19:00:39] baweaver: and now meeting time!
[19:02:02] SolarSailor: has joined #ruby
[19:03:05] RegulationD: has joined #ruby
[19:03:13] tomphp: has joined #ruby
[19:03:46] akem: has joined #ruby
[19:04:32] hobodave: has joined #ruby
[19:04:47] hxegon: ACTION thinks we had a collective brainfart because noone suggested...
[19:05:00] hxegon: >> (1..10).reduce(&:+)
[19:05:01] ruboto: hxegon # => 55 (https://eval.in/486382)
[19:05:02] baweaver: has joined #ruby
[19:05:17] dfinninger: has joined #ruby
[19:05:30] adaedra: There's even shorter.
[19:05:32] ruboto: adaedra # => 55 (https://eval.in/486383)
[19:05:46] hxegon: even shorter than that
[19:06:11] jhass: >> 11.times.inject(:+)
[19:06:11] ruboto: jhass # => 55 (https://eval.in/486384)
[19:06:50] hxegon: you don't have to use the &?
[19:06:58] jhass: not for inject/reduce
[19:06:59] dlitvak: has joined #ruby
[19:07:07] adaedra: &ri Array#inject
[19:07:09] `derpy: method `Enumerable#inject`: Combines all elements of enum by applying a binary operation, specified by a blo??? ??? http://rubydoc.info/stdlib/core/Enumerable#inject-instance_method
[19:07:28] adaedra: See, block or symbol.
[19:08:54] agent_white: I understand (5..10).inject(:+)
[19:09:13] agent_white: But 5.times.inject(:+), or 11 as said above.
[19:09:28] adaedra: &ri Fixnum#times
[19:09:29] `derpy: method `Integer#times`: Iterates the given block +int+ times, passing in values from zero to int - 1. If??? ??? http://rubydoc.info/stdlib/core/Integer#times-instance_method
[19:10:20] adaedra: since it gives you an Enumerator, you can chain with inject.
[19:10:28] agent_white: adaedra: Ah I see :) Same premise.
[19:11:09] ht__: has joined #ruby
[19:11:09] agent_white: >> 5.times.inject(:+) == (1..4).inject(:+)
[19:11:10] ruboto: agent_white # => true (https://eval.in/486385)
[19:11:12] SolarSailor: has joined #ruby
[19:11:39] agent_white: >> 5.times.inject(:+) == (1...4).inject(:+)
[19:11:40] ruboto: agent_white # => false (https://eval.in/486386)
[19:11:47] jhass: ?experiment
[19:11:47] ruboto: Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[19:12:04] agent_white: jhass: I know :) Wasn't going to get carried away, just those two.
[19:12:10] Madhur_: has joined #ruby
[19:12:14] agent_white: Anyways, that is what confused me. I see now.
[19:12:31] adaedra: It's not exactly the same tho. See with *.
[19:13:17] calderonroberto: has joined #ruby
[19:13:38] agent_white: I will check it out.
[19:13:45] colleenmcguckin: has joined #ruby
[19:14:07] fantazo: has joined #ruby
[19:14:32] pawnbox: has joined #ruby
[19:15:23] RobertBirnie: has joined #ruby
[19:15:30] rdavila: has joined #ruby
[19:15:49] rismoney1: has joined #ruby
[19:17:11] ht__: has joined #ruby
[19:17:16] codeurge: has joined #ruby
[19:17:33] djbkd: has joined #ruby
[19:17:54] elifoster: has joined #ruby
[19:18:12] diegoviola: I'm using CSV to parse some code like this: 200~https://gist.github.com/a0e7e54969f1764d5679
[19:18:43] diegoviola: I need to be able to group different rows into different array of hashes
[19:19:11] jhass: &ri Enumerable#group_by
[19:19:13] `derpy: method `Enumerable#group_by`: Groups the collection by result of the block. Returns a hash where the keys are ??? ??? http://rubydoc.info/stdlib/core/Enumerable#group_by-instance_method
[19:19:30] diegoviola: how can I get all rows that match /foo/ from row['bar']?
[19:19:38] diegoviola: jhass: is that for me?
[19:19:42] _djbkd: has joined #ruby
[19:19:45] momomomomo: has joined #ruby
[19:19:51] adaedra: I think so.
[19:20:29] agent_white: That's pretty neat.
[19:20:57] jherm: has joined #ruby
[19:21:01] skade: has joined #ruby
[19:21:21] `derpy: New, new...
[19:21:49] RegulationD: has joined #ruby
[19:22:51] framlinqp: has joined #ruby
[19:23:02] spider-mario: has joined #ruby
[19:23:08] shevy: hmm a gem fails, native build
[19:23:11] shevy: line that errors is: have_header( "st.h" )
[19:23:53] trav408: has joined #ruby
[19:25:33] dfinninger: has joined #ruby
[19:27:01] shevy: include/ruby-2.2.0/ruby/st.h
[19:27:11] ht__: has joined #ruby
[19:28:13] last_staff1: has joined #ruby
[19:28:27] howdoicomputer: has joined #ruby
[19:28:51] eytanfb: has joined #ruby
[19:29:28] DotKite: has joined #ruby
[19:29:38] chouhoul_: has joined #ruby
[19:29:39] devoldmx: has joined #ruby
[19:29:39] CrazyEddy: has joined #ruby
[19:30:26] chouhoul_: has joined #ruby
[19:32:16] DotKite: what is the most idiomatic way to search a 2-d array for a specific value and return the coords?
[19:32:22] roshanavand: has joined #ruby
[19:32:36] DotKite: efficiency is not super important
[19:33:32] eam: >> [*"a".."z"].find_index "n" # and it's perfectly efficient
[19:33:33] ruboto: eam # => 13 (https://eval.in/486388)
[19:33:42] eam: oh wait, you said 2d
[19:34:14] eam: I'd wrap that in each_with_index
[19:34:32] cornerma1: has joined #ruby
[19:34:36] arup_r: has joined #ruby
[19:35:12] ht__: has joined #ruby
[19:35:25] DotKite: eam, thanks i'll try it out
[19:36:05] dlitvak: has joined #ruby
[19:36:29] dfinninger: has joined #ruby
[19:37:01] eam: DotKite: you can always break from an each()
[19:37:01] Suntzu: has joined #ruby
[19:38:24] akem: has joined #ruby
[19:38:34] dfinninger: has joined #ruby
[19:39:51] tulak: has joined #ruby
[19:40:15] eam: >> [[1,2,3],[*"a".."z"]].each_with_index { |o,i| j = o.find_index "n"; break [i,j] if j }
[19:40:16] ruboto: eam # => [1, 13] (https://eval.in/486389)
[19:41:02] kristianpaul: has joined #ruby
[19:41:10] ht__: has joined #ruby
[19:41:38] kristianpaul: is okay to add an authentication token with the add_field methon for a http post request?
[19:41:51] Radar: kristianpaul: is that a Rails question?
[19:42:05] akem: has joined #ruby
[19:42:07] shevy: yay finally it worked \o/ ... ruby 2.2.4p230 (2015-12-16 revision 53155)
[19:42:17] kristianpaul: Radar: isa ruby question
[19:42:26] adaedra: not answering.
[19:42:42] nofxx: shevy, just arrived in arch too!
[19:42:46] eam: it's ok with me, but I know nothing about rails
[19:42:58] marsjaninzmarsa: has joined #ruby
[19:43:15] adaedra: kristianpaul: you may want to add a little bit of context. Libraries, maybe a bit of code
[19:43:21] dlitvak: has joined #ruby
[19:43:39] n008f4g_: has joined #ruby
[19:43:46] shevy: nofxx nice
[19:44:01] shevy: nofxx right now I am trying to find out if the only thing that changed was fiddle, or if anything else changed in addition to that
[19:44:03] hansolodiesinthe: has joined #ruby
[19:44:46] droidburgundy: has joined #ruby
[19:44:48] kristianpaul: adaedra: just http
[19:44:54] shevy: nagachika said there are some other bugfixes too https://www.ruby-lang.org/en/news/2015/12/16/ruby-2-2-4-released/
[19:45:02] kristianpaul: well the context is easy, i have this tool call grafana
[19:45:37] kristianpaul: http://docs.grafana.org/reference/http_api/#dashboard-from-json-file
[19:45:48] kristianpaul: and i'm just trying to push that json
[19:45:51] hansolodiesinthe: has left #ruby: ()
[19:46:02] colleenmcguckin: has joined #ruby
[19:46:05] kristianpaul: with curl i easy but i'm still getting the details together with ruby
[19:47:01] kgirthofer: hey all - I have some issue. When I run a command that I wrote in ruby, it works fine locallay as bundle exec, but when I run it as a gem I get a check_version_conflict for json. It says it can't activate version 1.8.3 because version 1.7.7 is arleady activated. When i check the gemspec of the application I can see it's looking for 1.7.7, and when
[19:47:01] kgirthofer: I do a gem list I can see I only have 1.8.1 and 1.7.7 installed
[19:47:04] treehug88: has joined #ruby
[19:47:08] kristianpaul: http://pastebin.com/raw/hvWRTqEd adaedra
[19:47:08] ruboto: kristianpaul, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[19:47:23] adaedra: You can address the whole channel, not just me
[19:47:55] kristianpaul: i think thats a fact
[19:48:26] jhass: kristianpaul: json is in stdlib these days, are you sure you need to depend on a specific version? (or at all, since as said stdlib)
[19:48:33] jhass: kgirthofer: ^ sorry
[19:48:36] cassioscabral: has joined #ruby
[19:49:27] kgirthofer: yea there are other parts of the application that require it
[19:49:54] jhass: kgirthofer: I'm not asking whether you need it. I'm asking why you need that specific version
[19:51:07] jhass: kgirthofer: and if the answer is "I don't" I'm asking why you list it as dependency still since it's a stdlib for a long time
[19:53:37] Emmanuel_Chanel: has joined #ruby
[19:55:28] Mon_Ouie: has joined #ruby
[19:56:10] jessemcgilallen: has joined #ruby
[19:57:11] ht__: has joined #ruby
[19:57:31] nettoweb: has joined #ruby
[19:57:39] wldcordeiro: has joined #ruby
[20:01:05] anisha: has joined #ruby
[20:02:29] jbrhbr: has joined #ruby
[20:02:35] dfdfdf: has joined #ruby
[20:02:59] CrazyEddy: has joined #ruby
[20:06:10] malconis: has joined #ruby
[20:06:22] gregf: has joined #ruby
[20:07:42] radgeRayden_: has joined #ruby
[20:07:44] radgeRayden__: has joined #ruby
[20:08:14] AnoHito: has joined #ruby
[20:08:43] ledestin: has joined #ruby
[20:09:40] StevenXL: has joined #ruby
[20:09:40] StevenXL: has joined #ruby
[20:11:05] vcoinminer_: has joined #ruby
[20:13:40] skade: has joined #ruby
[20:13:45] sgambino: has joined #ruby
[20:15:57] leat: has joined #ruby
[20:16:22] bb010g: has joined #ruby
[20:16:52] Lewix: has joined #ruby
[20:17:48] Lewix: / [[{name: "Test"},{name: "test2"}],[{name: "fr"}], [{name: "A"}, {name: 'b'}, {name: 'c'}] =====> into ["Test", "test2", "fr", "A", "b" ,"c"]
[20:18:16] baweaver: has joined #ruby
[20:19:14] hobodave: has joined #ruby
[20:19:25] jhass: Lewix: .flatten.map {|h| h[:name] }
[20:19:51] Lewix: jhass: I could have bet you were gonna suggest to do it with reduce
[20:19:58] Wompy: has joined #ruby
[20:20:12] jhass: I don't see how that would make any sense
[20:21:30] diegoviola: not sure how to use group_by to filter stuff in a hash
[20:21:55] Lewix: jhass: if you didnt use flatten..it could have make sense
[20:22:08] jhass: Lewix: not really
[20:22:53] jhass: Lewix: .flat_map {|people| people.map {|person| person[:name] } }
[20:24:53] cjbottaro: has joined #ruby
[20:25:25] Lewix: jhass: ok you won, I can't prove my point. sheesh too many days with javascript and I forgot how sweet ruby is, I needed the inspiration for js
[20:26:07] baweaver: shenanigans?
[20:26:19] Lewix: what's a shenanigans?
[20:27:00] jhass: Lewix: for what it's worth, each_with_object([]) {|people, names| names.concat people.map {|person| person[:name] } } would be the proper solution to what you probably were thinking of with reduce, though that's just reimplementing flat_ma
[20:27:04] jhass: *flat_map
[20:29:12] baweaver: I've used compact_map before (implemented with reduce) quite a bit.
[20:30:14] PedramT: has joined #ruby
[20:30:41] devbug: has joined #ruby
[20:32:00] Lewix: jhass: your each_with_object seems to return something different ,
[20:32:13] Lewix: names.concat people.map {} ?
[20:32:46] imperator: has joined #ruby
[20:33:01] dustinr: has joined #ruby
[20:33:31] dustinr: >> "I HATE NIGGERS".times(999999)
[20:33:32] ruboto: dustinr # => undefined method `times' for "I HATE NIGGERS":String (NoMethodError) ...check link for more (https://eval.in/486411)
[20:33:33] atomical: has joined #ruby
[20:33:43] dustinr: >> "I HATE NIGGERS" * 9999999
[20:33:44] ruboto: dustinr # => failed to allocate memory (NoMemoryError) ...check link for more (https://eval.in/486412)
[20:33:44] freerobby: has joined #ruby
[20:33:50] dustinr: >> "I HATE NIGGERS" * 999
[20:33:51] ruboto: dustinr # => "I HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI ...check link for more (https://eval.in/486413)
[20:34:03] dustinr: >> "I HATE NIGGERS " * 999
[20:34:04] ruboto: dustinr # => "I HATE NIGGERS I HATE NIGGERS I HATE NIGGERS I HATE NIGGERS I HATE NIGGERS I HATE NIGGERS I HATE NI ...check link for more (https://eval.in/486415)
[20:34:28] dustinr: >> "8=======D " * 999
[20:34:29] ruboto: dustinr # => "8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D ...check link for more (https://eval.in/486417)
[20:34:38] blackgoat: has joined #ruby
[20:34:41] _stu_: has joined #ruby
[20:34:42] dustinr: >> "8=======D " * 123412351235412341234135
[20:34:44] ruboto: dustinr # => bignum too big to convert into `long' (RangeError) ...check link for more (https://eval.in/486418)
[20:34:53] dustinr: >> "8=======D " * 9999999
[20:34:54] ruboto: dustinr # => failed to allocate memory (NoMemoryError) ...check link for more (https://eval.in/486419)
[20:34:58] GinoManWorks: well....... ummmmmmm
[20:35:00] dustinr: >> "8=======D " * 9999
[20:35:01] ruboto: dustinr # => "8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D ...check link for more (https://eval.in/486421)
[20:35:10] dustinr: >> "JOIN THE KLAN " * 9999
[20:35:11] ruboto: -o ruboto
[20:35:11] ruboto: dustinr, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
[20:35:16] Lewix: well well I'm never going to Sweden
[20:35:21] havenwood: !kick dustinr
[20:35:22] ruboto: ruboto kicked dustinr:
[20:35:22] ruboto: -o ruboto
[20:35:26] dustinr: has joined #ruby
[20:35:40] ruboto: -o ruboto
[20:35:41] dustinr: nigger bitch cunt
[20:35:42] PedramT: /msg NickServ VERIFY REGISTER PedramT eqswyfrliqag
[20:35:44] pglombardo: has joined #ruby
[20:35:51] ChanServ: +o havenwood
[20:35:53] ChameleonSix: https://gist.github.com/anonymous/64d4e7c77eb0c3d85492
[20:35:57] ChameleonSix: what is wrong with this code
[20:36:02] Lewix: ACTION is laughing that racism is going strong..even on irc
[20:36:14] dustinr: fuckingnigger
[20:36:15] Radar: gtfo plz.
[20:36:22] dustinr: fuck off nigger lover
[20:36:27] dustinr: fuck off and get aids faggot
[20:36:45] GinoManWorks: havenwood +b dustinr?
[20:36:50] ChanServ: +b dustinr!*@*
[20:36:50] ChanServ: ChanServ kicked dustinr: is banned from this channel
[20:36:52] havenwood: GinoManWorks: Already done.
[20:36:58] Radar: Ban list is already full.
[20:37:04] Radar: Added to akick instead.
[20:37:11] ChameleonSix: Can anyone help me please
[20:37:14] ChameleonSix: https://gist.github.com/anonymous/64d4e7c77eb0c3d85492 what is wrong
[20:37:17] Radar: ChameleonSix: no, nobody can hep you.
[20:37:32] Radar: ChameleonSix: Because you haven't provided enough information.
[20:37:35] postmodern: has joined #ruby
[20:37:38] Radar: https://gist.github.com/anonymous/64d4e7c77eb0c3d85492#file-test-L2 I bet this line is wrong.
[20:37:40] ur5us: has joined #ruby
[20:37:43] GinoManWorks: ChameleonSix: Because you have asked the wrong questions young padawan
[20:38:11] ChameleonSix: i have the link
[20:38:19] Radar: ChameleonSix: What is "gest"?
[20:38:23] ChameleonSix: Fill out the parse_answer method to return the answer passed in. If the kind is "number", convert answer to an integer using the to_i method before returning it.
[20:38:23] fullofcaffeine: has joined #ruby
[20:38:28] jackjackdripper: has joined #ruby
[20:38:29] ChameleonSix: it should do this
[20:38:37] Radar: ChameleonSix: Stop. Answer the question.
[20:38:52] Lewix: by the way jhass thanks
[20:39:12] GinoManWorks: I was going to ask about where the settings were that gem uses to compile native extensions....
[20:40:13] ChameleonSix: What do you mean?
[20:40:28] Lewix: so aggressive
[20:40:34] Radar: ChameleonSix: Don't spam the channel, thanks.
[20:40:35] Lewix: ChameleonSix: check your spelling
[20:40:48] Radar: ChameleonSix: I literally mean "what is gest"? gest isn't defined within that context
[20:41:08] ht__: has joined #ruby
[20:41:17] ChameleonSix: I didnt realize
[20:41:19] ChameleonSix: sorry im tired
[20:41:29] Lewix: ACTION likes the sound of Mr Radar
[20:41:35] jackjackdripper: has joined #ruby
[20:41:46] dlitvak: has joined #ruby
[20:41:46] baweaver: also, easy on the enter key
[20:41:52] ChameleonSix: but the code says error in the tutorial
[20:42:21] Radar: ChameleonSix: Second warning: please don't spam the channel.
[20:42:28] Radar: ChameleonSix: On the 3rd warning, you will be muted for a day.
[20:43:10] roshanavand: has joined #ruby
[20:43:57] AKASkip: has joined #ruby
[20:44:22] ruby-lang529: has joined #ruby
[20:44:33] havenwood: ruby-lang529: hi
[20:44:40] blub: hi ruby lang 5 29
[20:44:54] Emmanuel_Chanel: has joined #ruby
[20:44:56] ruby-lang529: can someone help me :( I can't extract my data using ruby
[20:45:04] devbug: has joined #ruby
[20:46:20] blub: sounds like you're in the wrong channel then
[20:46:21] lemur: has joined #ruby
[20:46:31] tinyhippo: has joined #ruby
[20:46:41] ChameleonSix: How do i execute ruby code on my webpage
[20:46:44] Radar: ChameleonSix: Oh my fucking god.
[20:46:53] ChameleonSix: This isnt spamming
[20:47:01] Radar: -q not_corki!*@*
[20:47:09] havenwood: !kick ChameleonSix http://ruby-community.com/pages/user_rules#rule_2_7
[20:47:09] Radar: ChameleonSix: Quie.t
[20:47:10] ruboto: ruboto kicked ChameleonSix:
[20:47:10] ruboto: -o ruboto
[20:47:29] ChameleonSix: has joined #ruby
[20:47:51] FernandoBasso: has joined #ruby
[20:48:30] platzhirsch: has joined #ruby
[20:48:32] tinyhippo: ACTION raises his eyebrow
[20:48:51] Radar: ChameleonSix: Please don't put people's names on a single line without any other messages. It's really annoying.
[20:48:59] Radar: ChameleonSix: Look at Sinatra or Ruby on Rails.
[20:50:10] Musashi007: has joined #ruby
[20:51:09] blackgoat: has joined #ruby
[20:51:40] Radar: -bbbb JamesArlen!*@* ikeie!*@* Hoosier_Daddy!*@* kefh!*@*
[20:52:00] tubbo: Radar: 99% sure those are the ?guys guys
[20:52:12] Radar: tubbo: Trying to free up some space in the banlist.
[20:52:18] tubbo: there's a limit?
[20:53:05] Radar: And we've crossed it because of chanserv's akick stuff.
[20:53:08] ht__: has joined #ruby
[20:53:25] tubbo: that's pretty lame
[20:53:52] pawnbox: has joined #ruby
[20:54:12] imperator: I think I need sleep: https://gist.github.com/djberg96/e08ba8bd9bef29a822ee
[20:54:27] jhass: note quiet and ban list count together into one limit
[20:54:30] ruboto: Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[20:54:38] tubbo: imperator: agreed
[20:54:40] yalue: has joined #ruby
[20:54:46] ChameleonSix: Does anyone know something about ERB
[20:54:56] tubbo: imperator: look at ln3 and ln12 again
[20:54:57] Radar: imperator: constant is STUFF, but ref to the constant is Stuff.
[20:54:58] tubbo: ChameleonSix: no
[20:55:04] tubbo: ChameleonSix: it is a mystery
[20:55:13] tubbo: ERB stands for Ehhhh Really Bruh?
[20:55:18] GinoManWorks: So anyways, can anyone help me; I'm not even sure I'm asking the question right: how does gem know what compiler to use and the build environment settings and such for native extensions?
[20:55:34] Radar: ChameleonSix: http://ruby-community.com/pages/user_rules#rule_2_2
[20:55:42] Radar: ChameleonSix: Rule warning #1. 3 rule warnings and it's a ban.
[20:55:49] hxegon: has joined #ruby
[20:56:02] Radar: GinoManWorks: I believe it's configured in the gem, but don't ask me where because I don't know.
[20:56:03] jhass: Radar: feel free, we're way beyond that
[20:56:09] Radar: jhass: :)
[20:56:23] imperator: tubbo, oops fixed, same result
[20:56:42] Radar: imperator: steps to reproduce kthx
[20:56:59] jhass: GinoManWorks: the gem may overwrite it but most are sane enough to respect the CC/CXX environment variables
[20:57:15] jhass: GinoManWorks: after all, all the build process does is to "just" generate and run a Makefile
[20:57:35] GinoManWorks: so if you're on windows and have the DevKit installed and configured properly?
[20:58:02] jhass: I'm avoiding getting familiar with the windows build environment as long as I can
[20:58:31] DifferentLambda: has joined #ruby
[20:58:42] ChanServ: -o havenwood
[20:59:11] ht__: has joined #ruby
[20:59:47] tubbo: GinoManWorks: have you checked out any examples of projects with native extensions?
[20:59:54] havenwood: imperator: works on my machine (with STUFF/Stuff fixed)
[20:59:57] tubbo: reading through a few extconf.rb's really helped me understand it
[21:00:04] tubbo: imperator: issue might be the order in which you're loading
[21:00:30] tubbo: oh wait n/m
[21:00:41] goodcodeguy: has joined #ruby
[21:00:45] dlitvak: has joined #ruby
[21:01:10] hobodave: has joined #ruby
[21:02:03] imperator: i may be going insane
[21:02:13] imperator: i do not know what is happening
[21:02:13] GinoManWorks: tubbo: I haven't yet, i was asking more in the context of public gems that have a native extension component
[21:02:26] GinoManWorks: not my own native extension buildling
[21:02:33] dfinninger: has joined #ruby
[21:03:23] skade: has joined #ruby
[21:03:46] havenwood: imperator: ruby -Ilib -rbar.rb lib/bar/baz.rb #=> 7
[21:04:06] havenwood: imperator: (with dir structure as you have it and Ruby 2.2.4)
[21:04:29] havenwood: Though same on 1.9, 2.0 and 2.1
[21:05:50] djbkd: has joined #ruby
[21:06:03] psye: has joined #ruby
[21:06:12] chipotle: has joined #ruby
[21:06:48] eytanfb: has joined #ruby
[21:07:08] ht__: has joined #ruby
[21:07:14] cassioscabral: has joined #ruby
[21:07:15] imperator: wtf is happening here then
[21:09:28] gimmi45: has joined #ruby
[21:10:21] imperator: ok, got it worked out
[21:10:21] devbug: has joined #ruby
[21:10:22] cdg: has joined #ruby
[21:10:29] Rojo: has joined #ruby
[21:10:38] howdoicomputer: has joined #ruby
[21:11:30] cdg: has joined #ruby
[21:13:19] JStoker: has joined #ruby
[21:13:33] EvilJStoker: has joined #ruby
[21:15:58] djbkd: has joined #ruby
[21:16:15] [Butch]: has joined #ruby
[21:16:38] moeabdol: has joined #ruby
[21:18:17] bogn: has joined #ruby
[21:18:55] pika_pika: has joined #ruby
[21:19:44] Scripore: has joined #ruby
[21:20:41] bogn: has joined #ruby
[21:23:44] pawnbox: has joined #ruby
[21:25:35] bronson: has joined #ruby
[21:25:52] ramfjord: has joined #ruby
[21:27:00] yfeldblum: has joined #ruby
[21:27:35] yfeldblum: has joined #ruby
[21:27:58] bogn: has joined #ruby
[21:29:57] aspire: has joined #ruby
[21:30:15] wolffles: has joined #ruby
[21:30:17] devoldmx: has joined #ruby
[21:31:13] momomomomo: has joined #ruby
[21:31:40] baweaver: has joined #ruby
[21:32:35] Rojo: has joined #ruby
[21:32:56] Wompy: has joined #ruby
[21:33:32] Wompy: has joined #ruby
[21:33:42] sdwrage: has joined #ruby
[21:34:38] Frem: has joined #ruby
[21:34:54] rdavila: has joined #ruby
[21:35:19] nettoweb: has joined #ruby
[21:37:22] kalopsian: has joined #ruby
[21:37:29] slawrence00: has joined #ruby
[21:37:35] akaiiro: has joined #ruby
[21:37:39] nettoweb: has joined #ruby
[21:39:20] d5sx43: has joined #ruby
[21:39:20] bronson: has joined #ruby
[21:39:29] moeabdol1: has joined #ruby
[21:40:05] nettoweb: has joined #ruby
[21:40:30] bronson: has joined #ruby
[21:42:25] nettoweb: has joined #ruby
[21:42:50] dfinninger: has joined #ruby
[21:42:55] idefine: has joined #ruby
[21:43:44] smactive: has joined #ruby
[21:44:01] tds5016: has joined #ruby
[21:44:17] sigurding: has joined #ruby
[21:44:55] tds5016: Hey. Question... can someone help me figure out how I'd use split to get "a:b:c\:d" to be ['a', 'b', 'c:d']
[21:45:09] tds5016: I'm pretty sure I need to use a regex negative look behind, but I've not had any luck yet.
[21:46:23] baweaver: cheap: substitute the escaped, split, resub
[21:46:45] baweaver: either that or a not
[21:46:51] tds5016: baweaver: I might be dumb, but can you give an example?
[21:47:11] blackmesa: has joined #ruby
[21:48:03] tds5016: a:b:c\\:d".split /(?<!\\):/
[21:48:09] tds5016: ["a", "b", "c\\:d"]
[21:48:15] tds5016: that's as close as I've been able to get.
[21:48:15] adaedra: >> "a:b:c\:d".replace('\:', '$').split(':').map { |e| e.replace('$', ':') }
[21:48:16] ruboto: adaedra # => wrong number of arguments (2 for 1) (ArgumentError) ...check link for more (https://eval.in/486536)
[21:48:57] tds5016: the thing is I can't guarantee the string won't have $
[21:48:58] adaedra: Ah ok, String#replace is totally not what I was thinking about.
[21:49:15] adaedra: Is there something it can't has?
[21:49:16] tds5016: so I don't think that solution would work :-/.
[21:49:23] tds5016: nope. It could have anything.
[21:49:40] tds5016: basically I need it to work the same way as escape characters normally do :-/.
[21:49:41] otherj: has joined #ruby
[21:49:46] baweaver: yeah, looks like negative lookaround
[21:49:50] baweaver: http://stackoverflow.com/questions/406230/regular-expression-to-match-line-that-doesnt-contain-a-word
[21:49:59] baweaver: I just don't remember that syntax for the life of me.
[21:50:14] tds5016: yeah; baweaver above is as close as I could get... I'm not sure how else to fix it :-/.
[21:50:24] colleenmcguckin: has joined #ruby
[21:50:27] Zarthus: try #regex, some pretty smart guys in there
[21:50:31] rgtk: has joined #ruby
[21:50:52] adaedra: Zarthus: you say that because we aren't smart?
[21:51:08] BubonicPestilenc: has joined #ruby
[21:51:13] Zarthus: as far as regexes go I haven't been astounded here yet - ruby itself? sure ;)
[21:51:39] triangles2: has joined #ruby
[21:51:42] BubonicPestilenc: there is short: .map(&:tmp) => .map { |o| o.id }
[21:52:01] BubonicPestilenc: .map(&:tmp) => .map { |o| o.tmp }
[21:52:15] shevy: there you go!
[21:52:15] adaedra: Do you have a question?
[21:52:18] BubonicPestilenc: but are there something like: .map(?) => .map { |o| o["tmp"] }
[21:52:25] ljarvis: BubonicPestilenc: no
[21:52:29] luckyme: has joined #ruby
[21:52:30] baweaver: could make one
[21:52:31] BubonicPestilenc: just to confirm that :D
[21:52:34] ljarvis: but shouldn't
[21:52:47] jhass: >> "a:b:c\\:d".split(/:(?<!\\)/) # tds5016
[21:52:48] ruboto: jhass # => ["a", "b", "c\\", "d"] (https://eval.in/486537)
[21:52:52] BubonicPestilenc: i know, justto check stdlib functions :D
[21:53:00] jhass: >> "a:b:c\\:d".split(/(?<!\\):/) # tds5016
[21:53:01] ruboto: jhass # => ["a", "b", "c\\:d"] (https://eval.in/486538)
[21:53:03] BubonicPestilenc: tyvm, <3 ruby-lang :D
[21:53:55] shevy: we are the #ruby !
[21:54:07] adaedra: >> def key(n); proc do |e| e[n] end; end; [{ "hello" => "world" }].map(&key("hello"))
[21:54:08] ruboto: adaedra # => ["world"] (https://eval.in/486539)
[21:54:09] jhass: tds5016: I suppose this is actually confusing about the difference between "\:" and "\\:"
[21:54:09] shevy: jhass has chopped away #ruby-lang
[21:54:14] adaedra: mh, late already.
[21:54:20] jhass: (vs '\:')
[21:54:50] jhass: *confusion
[21:54:53] tds5016: jhass: what should it look like?
[21:55:40] jhass: >> [":", "\:", "\\:", '\:', "\:" == ":", "\\:" == '\:'] # tds5016
[21:55:41] ruboto: jhass # => [":", ":", "\\:", "\\:", true, true] (https://eval.in/486542)
[21:55:41] tds5016: what I did was as close as I could get :-/.
[21:55:51] Ox0dea: has joined #ruby
[21:56:19] nunchuck: has joined #ruby
[21:56:55] tds5016: jhass: yeah, I'm screwing something up.
[21:57:25] colleenmcguckin: has joined #ruby
[21:58:36] Sdwrage_: has joined #ruby
[21:58:41] yqt: has joined #ruby
[21:59:42] smactive: has joined #ruby
[21:59:47] bronson: has joined #ruby
[22:00:23] tjohnson: has joined #ruby
[22:00:50] djbkd: has joined #ruby
[22:03:47] dotix: has joined #ruby
[22:03:48] dotix: has joined #ruby
[22:04:43] minimalism: has joined #ruby
[22:04:47] tomphp: has joined #ruby
[22:05:14] zeroDivisible: has joined #ruby
[22:08:24] dlitvak: has joined #ruby
[22:09:05] jbrhbr: has joined #ruby
[22:09:13] Ox0dea: has joined #ruby
[22:10:09] ruu_: has joined #ruby
[22:10:40] platzhirsch: has joined #ruby
[22:13:55] firstdayonthejob: has joined #ruby
[22:14:04] xlogic: has joined #ruby
[22:18:38] i: has joined #ruby
[22:23:00] dfinninger: has joined #ruby
[22:23:28] codeurge: has joined #ruby
[22:23:38] DavidJone: has joined #ruby
[22:26:03] tulak: has joined #ruby
[22:26:30] Wompy: has joined #ruby
[22:27:09] colleenmcguckin: has joined #ruby
[22:27:46] moeabdol: has joined #ruby
[22:31:42] replay: has joined #ruby
[22:34:07] dorei: rex/racc is the ruby way for lexers/parsers ?
[22:34:21] last_staff: has joined #ruby
[22:34:27] davedev24: has joined #ruby
[22:35:43] Ox0dea: dorei: https://github.com/mjackson/citrus is pretty nice.
[22:37:20] dlitvak: has joined #ruby
[22:37:48] dorei: thanx Ox0dea
[22:38:00] Ox0dea: dorei: Sure thing.
[22:38:51] arooni: has joined #ruby
[22:40:36] dfinninger: has joined #ruby
[22:42:03] dfinning_: has joined #ruby
[22:43:19] ramfjord: has joined #ruby
[22:44:06] dfinning_: has joined #ruby
[22:46:13] seitensei: has joined #ruby
[22:46:13] seitensei: has joined #ruby
[22:48:59] znz_jp: has joined #ruby
[22:49:58] zenlot1: has joined #ruby
[22:51:07] berserk_ren: has joined #ruby
[22:52:23] Wompy: has joined #ruby
[22:52:48] nofxx: what a boring thing to 'model' ... work hours. I thinking a 7 day array, containing an array with arbitrary ranges... [ [7..10, 13..17 ... kind boring for half hour stuff. Maybe use float... there's Date but there's no Hour. Any better ideas?
[22:53:11] edwinvdgraaf: has joined #ruby
[22:53:29] pawnbox: has joined #ruby
[22:53:41] dorei: nofxx: maybe u should avoid floats and count minutes
[22:53:53] druonysus: has joined #ruby
[22:53:54] druonysus: has joined #ruby
[22:53:56] nofxx: dorei, that's a better idea. ty
[22:54:31] Ox0dea: Why not seconds?
[22:55:06] nofxx: ah, no need.... at most it's a we close at 11:30 thing
[22:55:10] kalopsian: has joined #ruby
[22:55:12] Ox0dea: There's no such thing as "too granular". :P
[22:55:56] CloCkWeRX: has joined #ruby
[22:56:49] edwinvdgraaf: has joined #ruby
[22:57:41] drptbl: has joined #ruby
[22:59:25] baweaver: has joined #ruby
[23:00:28] ruid: has joined #ruby
[23:01:47] cassioscabral: has joined #ruby
[23:02:02] pwnd_nsfw: has joined #ruby
[23:02:51] rdavila: has joined #ruby
[23:03:29] s00pcan: has joined #ruby
[23:04:09] drptbl: has joined #ruby
[23:04:20] atomical: has joined #ruby
[23:05:17] Wompy_: has joined #ruby
[23:07:23] shevy: Ox0dea there is ruby 2.2.4 ! \o/
[23:07:33] shevy: you broke it :D
[23:07:48] shevy: or norc ... with Fiddle
[23:09:11] djbkd: has joined #ruby
[23:11:15] wolffles: can you push a hash into an array?
[23:11:40] j416: wolffles: yes?
[23:11:54] jbrhbr: has joined #ruby
[23:12:01] j416: >> [{foo: :bar}]
[23:12:02] ruboto: j416 # => [{:foo=>:bar}] (https://eval.in/486604)
[23:13:06] j416: >> [].push(foo: :bar)
[23:13:07] ruboto: j416 # => [{:foo=>:bar}] (https://eval.in/486605)
[23:13:15] tomphp: has joined #ruby
[23:13:49] s00pcan: has joined #ruby
[23:14:28] banister: has joined #ruby
[23:14:31] Dimik: has joined #ruby
[23:17:01] akem: has joined #ruby
[23:17:36] p337r: has joined #ruby
[23:17:56] bronson: has joined #ruby
[23:19:09] shevy: hmm quick question... I distribute a tutorial in the form of a standalone .cgi file
[23:19:23] shevy: I have directories in the base level of that gem called ... bin/ lib/ doc/ test/
[23:19:47] shevy: should I put this into doc/ - and if not, should I use a separate directory and which way to call it then? cgi/ or www/ or something else?
[23:23:36] SCHAAP137: has joined #ruby
[23:26:18] ornerymoose: has joined #ruby
[23:26:24] znz_jp: has joined #ruby
[23:27:53] Musashi007: has joined #ruby
[23:28:27] codeurge: has joined #ruby
[23:31:01] devoldmx: has joined #ruby
[23:31:32] shaileshg: has joined #ruby
[23:32:30] eytanfb: has joined #ruby
[23:32:50] eytanfb: has joined #ruby
[23:35:01] akem2: has joined #ruby
[23:36:00] gizless: has joined #ruby
[23:36:17] Alayde: has joined #ruby
[23:36:30] Alayde: has left #ruby: ()
[23:36:38] blackmesa: has joined #ruby
[23:37:15] skcin7: has joined #ruby
[23:37:40] jawa_: has joined #ruby
[23:37:41] drptbl: has joined #ruby
[23:40:28] weemsledeux: has joined #ruby
[23:42:04] InvGhost: has joined #ruby
[23:42:59] znz_jp: has joined #ruby
[23:43:46] rdavila: has joined #ruby
[23:47:06] akem: has joined #ruby
[23:50:01] dfinninger: has joined #ruby
[23:50:28] dfinninger: has joined #ruby
[23:50:47] htmldrum: has joined #ruby
[23:51:04] jessemcgilallen: has joined #ruby
[23:51:04] znz_jp: has joined #ruby
[23:51:13] douglass1: has joined #ruby
[23:53:28] banister: has joined #ruby
[23:53:55] howdoicomputer: has joined #ruby
[23:54:43] znz_jp: has joined #ruby
[23:55:54] SPEARCHUCKERTOM: has joined #ruby
[23:55:57] pdoherty: has joined #ruby
[23:56:14] akem2: has joined #ruby
[23:56:21] SPEARCHUCKERTOM: why won't niggers become good niggers and start acting like uncle toms instead of the hood trash they are?
[23:56:58] ruboto: fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, workmad3, miah, Coraline, drbrain, zenspider, slyphon, rubyhacker1, Aria, ljarvis, baweaver, Adaedra
[23:57:10] davedev24: has joined #ruby
[23:57:15] havenwood: demophoon: thanks
[23:57:29] ChanServ: +o havenwood
[23:58:18] havenwood: -b *!*@172.56.31.130
[23:58:57] Musashi007: has joined #ruby
[23:59:40] xybre: Do non-trolls use the web interface?
[23:59:42] dlitvak: has joined #ruby
[23:59:51] akem: has joined #ruby