« Back to channel list

#ruby - 06 January 2016

« Back 1 day Forward 1 day »
[00:00:01] Radar: is this some kind of joke?
[00:00:19] apeiros: (and a rationale is usually a good idea too, because the following will happen anyway)
[00:00:32] eam: Array.new(2).map { array[rand(array.length)] }
[00:00:33] Radar: >> 2.times.map { array[rand(array.length)] }
[00:00:34] ruboto: Radar # => undefined local variable or method `array' for main:Object (NameError) ...check link for more (https://eval.in/497890)
[00:00:38] Radar: ruboto: Shhh
[00:00:44] apeiros: eam: why map?
[00:00:48] Radar: array = [1,2,3,4,5]; 2.times.map { array[rand(array.length)] }
[00:00:51] apeiros: Array.new takes a block just fine
[00:01:01] apeiros: and Array.new(2) IMO communicates intent much better than 2.times.map
[00:01:02] Radar: >> array = [1,2,3,4,5]; 2.times.map { array[rand(array.length)] }
[00:01:03] ruboto: Radar # => [3, 3] (https://eval.in/497891)
[00:01:13] eam: apeiros: good point
[00:02:23] eam: what's the cleanest way to write: a = []; a.push a
[00:03:01] apeiros: I have nothing to offer beyond `a = []; a << a`
[00:03:20] Radar: eam: Ox0dea probably has a solution involving $
[00:03:37] eam: I have a deep seated dislike for using the bitshift operator in an overloaded fashion
[00:03:48] apeiros: Radar: eam asked for cleaner
[00:03:57] eam: I'll take $ solutions too
[00:04:22] eam: always welcome
[00:04:56] eam: does ruby maintain the $[ equiv?
[00:05:54] eam: (change arrays from being zero-indexed to $[ indexed)
[00:06:03] wolffles: thanks peeps
[00:08:05] wolffles: last question. when your reading ???Integer#times??? Returns the reciever ???what does the # stand for?
[00:08:21] Radar: instance method
[00:08:45] apeiros: :: would be used for class method
[00:11:27] crdpink: has joined #ruby
[00:11:29] crdpink: has left #ruby: ()
[00:14:06] pawnbox: has joined #ruby
[00:14:24] IlluminatiConfir: has joined #ruby
[00:14:46] Radar: Or Class.method
[00:14:56] IlluminatiConfir: How can I call a method inside a method
[00:15:03] Radar: IlluminatiConfir: What have you tried?
[00:19:56] CloCkWeRX: has joined #ruby
[00:21:02] Radar: other method()? what
[00:21:06] Ebok: You call methods inside methods all the time...
[00:21:21] Radar: LordOfAllLords: no fake code please
[00:21:28] LordOfAllLords: I am new to Ruby (and programming) I want to run another method
[00:21:45] Ebok: Be more specific
[00:22:10] Ebok: Give an example in English at the bear minimum
[00:22:28] shevy: the bear minimum! down with the bears!
[00:22:47] LordOfAllLords: I defined a method that askes for an action, than a method for said action asks for some information, stores it in a variable, and then I ant to go back to first method
[00:23:03] shevy: show code LordOfAllLords?
[00:23:20] Radar: LordOfAllLords: http://ruby-community.com/pages/user_rules#rule_1_4
[00:23:38] Radar: LordOfAllLords: Please provide the code for your problem.
[00:23:52] Ebok: How new are you to ruby?
[00:23:55] m1dnight_: has joined #ruby
[00:24:05] LordOfAllLords: Rader hold up a min.
[00:24:15] m1dnight_: How can I install ruby gems with ruby2.0? Im afraid to break stuff by resymlinking ruby to ruby2.0
[00:24:20] m1dnight_: and I need to install jekyll which requires 2.0
[00:24:21] LordOfAllLords: Pretty new, can do some basics
[00:24:27] Radar: m1dnight_: install with chruby.
[00:24:35] Radar: Whoops, ruby-install
[00:24:40] Radar: m1dnight_: What OS are you on?
[00:25:32] n_blownapart: has joined #ruby
[00:26:20] Coldblackice: has joined #ruby
[00:26:28] m1dnight_: ubuntu 14.04 (Server)
[00:26:47] Radar: m1dnight_: Yup, ruby-install will install Ruby for you.
[00:26:57] Radar: m1dnight_: https://github.com/postmodern/ruby-install
[00:26:58] kith: has joined #ruby
[00:27:17] DonOtreply: has joined #ruby
[00:28:04] freerobby: has joined #ruby
[00:29:31] m1dnight_: but does that allow me to install gems with the newest ruby?
[00:29:33] m1dnight_: Ill give it a shot
[00:30:27] baweaver: has joined #ruby
[00:30:30] LordOfAllLords: radar I just tried it again and it sems to be working, i'll implemet it into my code later and get back if it still dosent work
[00:30:38] Radar: LordOfAllLords: ok
[00:30:44] cmolenda: has joined #ruby
[00:30:45] Radar: m1dnight_: yes it does
[00:31:34] m1dnight_: Ill give it a shot, thanks
[00:32:42] haraigo: has joined #ruby
[00:32:55] Nahra```: has joined #ruby
[00:34:00] dfockler: has joined #ruby
[00:34:08] m1dnight_: Hmm, seems like the bin files are not being copied to /usr/local/bin
[00:34:50] Ox0dea: m1dnight_: Do you want to have multiple versions of Ruby installed?
[00:36:16] NoTroutAboutIt: has joined #ruby
[00:36:21] luckyme: has joined #ruby
[00:36:32] m1dnight_: Well, I just don't want to break stuff. That is all.
[00:36:46] m1dnight_: I just did `ruby-install --latest`, we'll see what happens.. I guess :p
[00:36:55] m1dnight_: I can always go back I think by chaning the symlink
[00:37:35] blackgoat: has joined #ruby
[00:37:39] mistermo_: has joined #ruby
[00:39:13] m1dnight_: Right, gitlab was the one that was acting up with some ruby versions. Let's see how it goes..
[00:40:49] kalopsian: has joined #ruby
[00:41:03] shevy: the cautious on tippy toes :D
[00:41:36] iateadonut: has joined #ruby
[00:43:34] colegatron: has joined #ruby
[00:45:02] karapetyan: has joined #ruby
[00:45:25] LordOfAllLords: has joined #ruby
[00:47:43] RegulationD: has joined #ruby
[00:48:00] weemsledeux: has joined #ruby
[00:51:55] blackgoat: has joined #ruby
[00:52:50] chouhoulis: has joined #ruby
[00:54:22] m1dnight_: I got it working!
[00:54:42] m1dnight_: I didnt have to use the ruby-install though. I had it installed and all, but it turned out I just had to point /usr/bin/gem to /usr/bin/gem2.0
[00:54:49] m1dnight_: not sure if I broke something important now..
[00:55:22] zotherstupidguy: has joined #ruby
[00:55:29] Radar: I have a CSV file which is this: https://gist.github.com/radar/3260e7a958044f10baea Is there something I can pass to CSV.parse to make it ignore the first line?
[00:55:50] Radar: That CSV was generated with CSV.generate, so I'm assuming CSV.parse has something to do that.
[00:57:00] Radar: Actually, it's generated by another library. Please ignore me :)
[00:57:28] luckyme: has joined #ruby
[00:58:40] ruby-lang427: has joined #ruby
[01:00:53] scottschecter: has joined #ruby
[01:00:58] pwnd_nsfw: has joined #ruby
[01:03:58] pawnbox: has joined #ruby
[01:03:58] cmolenda: Just in case it helps with whatever you end up doing, a very easy way to ignore the first element of an array (the first line of a file, if pulled in via CSV or readlines) is using a range of 1..-1. E.g. filearray[1..-1]
[01:04:21] Radar: cmolenda: Yeah, that's effectively what this library is doing
[01:04:35] Radar: it's the excel_csv gem. I was generating it with that gem, but trying to read it with the stdlib CSV
[01:05:42] SCHAAP137: has joined #ruby
[01:08:42] apeiros: Radar: still need a solution?
[01:08:47] Radar: na, got it
[01:09:25] zenlot2: has joined #ruby
[01:10:23] ur5us: has joined #ruby
[01:10:28] ta: has joined #ruby
[01:12:13] Ox0dea: >> [1,2,3].drop(1) # cmolenda
[01:12:14] ruboto: Ox0dea # => [2, 3] (https://eval.in/497904)
[01:12:44] Ox0dea: (For your bag of tricks.)
[01:13:08] apeiros: I wish drop(1) would return an Enumerator
[01:13:24] apeiros: or at least Enumerator#drop(1) would do that
[01:14:45] cmolenda: Huh, didn't even know drop was a method, thanks Ox0dea
[01:14:50] Ox0dea: Sure thing.
[01:15:03] Ox0dea: apeiros: That would require an implementation of Enumerator#prev, no?
[01:15:17] Ox0dea: It's essentially gotta invoke #next to perform the first step of the enumeration.
[01:15:26] Ox0dea: Which it would have to "rewind" to get you back to the start.
[01:15:38] Ox0dea: And I now realize there's Enumerator#rewind...
[01:15:51] DLSteve: has joined #ruby
[01:16:50] Ox0dea: Still, Enumerator#prev would be nice, but probably pretty crazy.
[01:16:53] apeiros: Ox0dea: no, it just needs to remember how many elements to skip
[01:16:58] apeiros: no need for #prev
[01:17:13] Ox0dea: Skipping doesn't work.
[01:17:21] Ox0dea: Enumerations can be stateful.
[01:17:43] apeiros: an example where it wouldn't work?
[01:18:05] Ox0dea: When the next value relies on some previous one and/or external state.
[01:18:34] apeiros: any concrete example? :)
[01:18:58] Ox0dea: How is that of any pertinence, though? It would obviously have to work in the general case to go into the language.
[01:19:01] apeiros: because frankly, I doubt you're right
[01:19:16] ruid: has joined #ruby
[01:19:16] ruid: has joined #ruby
[01:19:18] apeiros: [1,2,3].drop(1).other_enum should be just like [2,3].other_enum
[01:19:25] apeiros: state doesn't come into play
[01:19:58] Ox0dea: apeiros: https://eval.in/497905
[01:20:09] Ox0dea: How do you suppose "skipping" would work there?
[01:20:14] mjbjr: has joined #ruby
[01:20:15] nettoweb: has joined #ruby
[01:20:23] crystalmaiden: has joined #ruby
[01:20:34] stryek: has joined #ruby
[01:20:44] apeiros: e.drop(2).each would call .next twice before yielding
[01:20:52] Ox0dea: That's not "skipping".
[01:21:22] apeiros: that's text-book definition of skipping
[01:21:41] CloCkWeRX: has left #ruby: ()
[01:21:51] apeiros: even if you go all pedantic
[01:22:29] Ox0dea: apeiros: Consider an Enumerator that writes to a file in #next, for whatever reason.
[01:23:03] apeiros: that'd have weird effects with pretty many enumerator functions
[01:23:27] Ox0dea: Which ones come to mind?
[01:23:34] apeiros: as side effects in general would
[01:24:11] apeiros: and relatives
[01:24:13] apeiros: try rewind
[01:24:16] Ox0dea: But that Enumerators *can* have side effects is why Enumerator#drop can't Do the Right Thing in the general case.
[01:24:53] apeiros: if you arbitrarily define "the right thing", sure.
[01:25:02] apeiros: skipping is easily good enough.
[01:25:20] mary5030: has joined #ruby
[01:25:23] apeiros: and if you have side effects in such an enumerator and fail to read the docs - well, cry me a river.
[01:25:44] bkxd: has joined #ruby
[01:25:44] nettoweb: has joined #ruby
[01:25:45] Ox0dea: "Skip" and "ignore" don't strike me as even remotely synonymous, but okay.
[01:26:04] apeiros: that'd be because they aren't.
[01:26:17] Ox0dea: But you're using them synonymously?
[01:26:20] apeiros: ignoring has no relation to order.
[01:27:01] CloCkWeRX: has joined #ruby
[01:27:03] CloCkWeRX: has left #ruby: ()
[01:27:36] mjbjr: just did a fresh gentoo install of ruby... for gems, is the current best pactice to use 'gem install some_gem' or to use 'emerge some_gem' directly?
[01:27:42] Ox0dea: To "skip" the enumeration would (rather obviously) be to not do it; you're suggesting that Enumerator#drop could perform the enumeration and ignore its result/effects.
[01:28:40] Ox0dea: mjbjr: Does Portage repackage every single gem?
[01:29:24] guacamole: has joined #ruby
[01:30:04] guacamole: has joined #ruby
[01:30:16] apeiros: mjbjr: depends. as Ox0dea insinuates, you might not have the newest or all packages. otoh using gem will mean that you use two package managers. in most cases, using gem is probably less painful.
[01:32:33] MattV: has joined #ruby
[01:33:07] apeiros: Ox0dea: I find your notion of skipping broken. ary.each.drop(2) does in no way imply that the .each would *not* go over all elements. all it implies is that *after* the drop(2), you get 2 less from the *result*
[01:33:15] apeiros: so IMO your whole argument holds no water.
[01:33:25] mjbjr: apeiros: roger that, is there a 'gem cmd some_gem' where it will give me details about the gem without installing it? In the past the 'pg' gem had fallen behind the code in an 'emerge pg'.
[01:33:39] apeiros: it should neither be the aim, nor be expected to suppress iteration before the dropping.
[01:33:49] pawnbox: has joined #ruby
[01:33:51] astrobun_: has joined #ruby
[01:33:53] apeiros: mjbjr: gem help commands
[01:34:02] apeiros: I rarely use anything besides gem install, sorry.
[01:34:09] kfpratt: has joined #ruby
[01:34:22] guacamole: has joined #ruby
[01:34:24] Ox0dea: apeiros: Iteration and enumeration are subtly different things.
[01:34:31] mjbjr: apeiros: ok, good to know
[01:34:36] Ox0dea: A simple array can be indexed into; that just isn't true for an enumerator.
[01:34:46] apeiros: I think gem search -d does. but gem search does a wildcard search. if you want for the precise name, use '^name$'
[01:35:07] apeiros: Ox0dea: does not change a single thing about what I said.
[01:35:31] apeiros: the expression before can be a filter, a generator or an iterator. it does not matter.
[01:35:34] gregf: has joined #ruby
[01:35:39] Ox0dea: It'd just be weird for a "subtractive" operation like #drop to be stateful.
[01:35:54] apeiros: the expression before is not expected to not go through all values it enumerates.
[01:36:14] apeiros: Ox0dea: it's just as stateful as each_cons or each_slice.
[01:36:18] apeiros: not weird at all.
[01:36:32] apeiros: or .first(n) or .last(n)
[01:36:54] apeiros: .last(n) being a nice example of your way of thinking to utterly fail.
[01:37:41] apeiros: because that too will just iterate through all values, retaining n values. so if you expect that to not invoke the expression before it for all values for the first length-n items???
[01:38:16] Ox0dea: >> Enumerator.instance_methods.include? :last # apeiros
[01:38:17] ruboto: Ox0dea # => false (https://eval.in/497908)
[01:38:33] apeiros: bruh, do it right.
[01:38:52] pwnd_nsfw: has joined #ruby
[01:39:09] apeiros: oh, hah, right. Enumerable#last is a patch.
[01:39:18] Ox0dea: Because it doesn't belong.
[01:39:23] paradisaeidae: has joined #ruby
[01:39:44] Ox0dea: Enumeration != iteration. You have some reading to do, and that's a good thing.
[01:39:47] apeiros: only in your weird world where a subsequent expression must suppress what a previous expression does
[01:39:50] dlitvak: has joined #ruby
[01:39:53] apeiros: which makes zero sense.
[01:40:01] Ox0dea: My weird world... and Ruby.
[01:40:16] hewhomust: has joined #ruby
[01:41:34] Ox0dea: I mean, do you think I somehow managed to trick ruboto into responding `false` there?
[01:42:44] apeiros: any suggestions for said reading? which preferably contradicts anything I said???
[01:42:54] Ox0dea: apeiros: Why doesn't Enumerator have #last?
[01:43:12] apeiros: > Ox0dea: Enumeration != iteration
[01:43:12] Ox0dea: Is it because it can't be defined in the general case?
[01:43:45] apeiros: that's correct. an enumerator can be infinite. which would cause last(n) to not hold.
[01:43:58] BraddPitt: oops, sorry folks
[01:43:58] apeiros: guess what, there's other expressions for which that applies.
[01:44:06] apeiros: BraddPitt: fail 2?
[01:44:17] BraddPitt: new keyboard
[01:44:27] LordOfAllLords: What should I be researching if I want to store information using Ruby. I want to store a database with titles and contents. SQL?
[01:45:35] apeiros: Ox0dea: btw., I'm pretty sure an enumerator with a side effect fails the definition of an enumerator.
[01:46:04] Ox0dea: >> :Ruby == :Haskell
[01:46:05] ruboto: Ox0dea # => false (https://eval.in/497910)
[01:46:16] apeiros: Ox0dea: you can't have your cake and eat it too
[01:46:39] apeiros: on one hand you try to argue with purity, on the other hand you drop it the second it bites your argument
[01:47:54] aibot: has joined #ruby
[01:48:18] icarus: has joined #ruby
[01:49:13] Ox0dea: apeiros: I wasn't arguing for parity, but rather against *unintended* side effects.
[01:49:23] apeiros: I maintain: drop(n) does not have to change what the enumerator it is chained to does. it's effect is for the chain which follows. if you build an enumerator which has side-effects and need a construct to not execute the side-effects of the first N enumerations, drop(N) would be the wrong tool.
[01:49:34] LordOfAllLords: What should I be researching if I want to store information using Ruby. I want to store a database with titles and contents. SQL?
[01:50:06] Ox0dea: apeiros: Should there be Enumerator#skip?
[01:50:36] apeiros: Enumerable#skip. I see no reason to use a new name.
[01:50:52] apeiros: i.e. #drop returning an enumerator would suffice.
[01:51:58] apeiros: Ox0dea: another question: Should the current Enumerator#drop not execute the first N enumerations?
[01:55:02] krz: has joined #ruby
[01:55:48] apeiros: your argument implies that the current implementation of #drop is already broken.
[01:57:03] Ox0dea: apeiros: Looks "broken" to me: https://eval.in/497911
[01:57:30] nanoz: has joined #ruby
[01:57:34] Ox0dea: As you've suggested, it "should" return an Enumerator, but an appeal to generality decrees that it can't.
[01:57:51] apeiros: Ox0dea: is that a "yes, current drop is already broken"?
[01:58:02] apeiros: Ox0dea: Enumerator#to_a too, yes?
[01:58:10] apeiros: because that won't like your infinite enumerators either
[01:58:28] Ox0dea: All of the Enumerator methods that don't return Enumerators are "broken"; we agree on this point.
[01:58:39] apeiros: oh, no, we don't
[01:58:56] apeiros: I wouldn't want .first() return an enumerator. that makes no sense.
[01:59:04] apeiros: I do like .to_a on it.
[01:59:15] Ox0dea: I was overly inspecific, but I'd hoped you'd catch the gist.
[01:59:20] apeiros: just because there are cases where it *can't* work does not refute its utility.
[01:59:34] Ox0dea: Sure, and I maintain that #drop is such a case.
[01:59:42] apeiros: and a .last(n) is just as fine on Enumerator as a .to_a or a .drop
[01:59:48] apeiros: (in its current form)
[01:59:57] Ox0dea: Then why doesn't it exist?
[02:00:03] tenseiten: has joined #ruby
[02:00:06] apeiros: and changing .drop to return an Enumerator would not change anything about your previously cited issue.
[02:00:24] Ox0dea: How come Enumerator#last isn't a thing?
[02:00:25] apeiros: Ox0dea: why did Array#to_h not exist before 2.2?
[02:00:31] apeiros: it's a nonsensical question
[02:00:37] Ox0dea: apeiros: Could you show me your Enumerator#last patch?
[02:00:54] Ox0dea: Is it just `to_a[-1]`?
[02:00:55] apeiros: either nobody decided it should go in, or somebody expressly decided it was too much, or - but that I doubt - somebody decided it did not belong.
[02:01:13] apeiros: Ox0dea: mostly. it checks for .reverse_each to optimize.
[02:02:58] apeiros: great. seems I don't have that on my imac and my laptop is in the sleeping room. can't show you the code now. but the patch is indeed just a respond_to?(:reverse_each) -> reverse_each.first(n).reverse, else -> .each, accumulate n, shift/push until end
[02:04:02] pawnbox: has joined #ruby
[02:04:27] apeiros: oh, right, special case for no-arg
[02:04:51] apeiros: since that returns single element. there with .reverse_each it's .reverse_each do |x| return x end
[02:05:23] apeiros: and without reverse_each it's obviously just rv=nil; each do |x| rv = x; end
[02:05:49] apeiros: so your infinite enumerator wouldn't run out of memory from the to_a, it's just not halt
[02:05:50] govg: has joined #ruby
[02:06:58] rkazak: has joined #ruby
[02:06:59] yfeldblum: has joined #ruby
[02:11:34] NoTroutAboutIt: has joined #ruby
[02:11:39] luckyme: has joined #ruby
[02:12:39] Radar: How can I make this regex match only the first code block? http://rubular.com/r/CiUvEsGLkI
[02:12:49] Radar: it shouldn't be matching the title from the second code block
[02:15:51] apeiros: Radar: but your regex specifies "match {???} block, then match all lines which start with whitespace, then match first line which does not start with whitespace"
[02:15:52] weemsledeux: has joined #ruby
[02:16:06] apeiros: and the first line without whitespace is the second {???} block
[02:16:12] icarus: has joined #ruby
[02:16:17] Radar: apeiros: yeah
[02:16:27] apeiros: so I'm not quite sure what it is supposed to match
[02:16:33] Radar: I think I can get away with /^({[^}]*})$(\s{4}.*)/m
[02:16:45] Radar: apeiros: It should match the {title ... } and then the indented code block underneath it, and then stop
[02:16:56] apeiros: that I can show you :D
[02:18:26] avelldiroll: has joined #ruby
[02:19:10] ruby-lang134: has joined #ruby
[02:19:27] apeiros: http://rubular.com/r/CiUvEsGLkI
[02:19:36] Radar: Here's another example with some text following the codeblocks that shouldn't be matched: http://rubular.com/r/ZESMFS1BQy
[02:19:38] apeiros: one way, if all blocks are indented
[02:19:53] apeiros: it has more parens than necessary if you don't need the indented block in a match
[02:19:57] Radar: apeiros: that's the same URL that I gave you. You have to click the URL you generate.
[02:20:12] guacamole: has joined #ruby
[02:21:07] apeiros: hm, I copied too quickly http://rubular.com/r/a8uQPOF3Qh
[02:21:47] Ox0dea: Radar: http://rubular.com/r/GfSyp5rACB
[02:21:54] Radar: And it doesn't match text after the fact. Nice :)
[02:21:54] Ox0dea: Is that too brittle?
[02:22:08] Radar: Ox0dea: Yeah. Not always guaranteed to end in end
[02:22:17] Radar: These are code blocks from my book
[02:22:28] guacamole: has joined #ruby
[02:23:49] Scripore: has joined #ruby
[02:23:59] apeiros: ^({[^}]*})$\n((?:(?:(?=\s).*)\n?)*) if you don't want that newline in the second capture
[02:24:23] Ox0dea: apeiros: That catches the "Text goes here".
[02:24:45] Ox0dea: This boils down to matching properly nested parentheses, where ( = indent and ) = dedent.
[02:24:57] apeiros: did you??? try it?
[02:25:05] apeiros: or did you only prove it to match? :)
[02:25:09] Ox0dea: http://rubular.com/r/LtSIXfn0nt
[02:25:40] apeiros: what? http://rubular.com/r/KjVmKClDOx
[02:26:15] guacamole: has joined #ruby
[02:26:23] Ox0dea: apeiros is a strong, independent Rubyist who don't need no /m flag.
[02:26:23] bkxd: has joined #ruby
[02:26:24] apeiros: I fail to spot the difference :-S
[02:26:38] apeiros: yeah, I removed the m flag in mine.
[02:27:30] n0xff: has joined #ruby
[02:28:58] kfpratt: has joined #ruby
[02:31:03] crystalmaiden: has joined #ruby
[02:32:35] veg: has joined #ruby
[02:32:36] solocshaw: has joined #ruby
[02:32:46] howdoi: has joined #ruby
[02:32:51] Bloomer: has joined #ruby
[02:33:30] terminalrecluse: has joined #ruby
[02:35:26] bithon: has joined #ruby
[02:37:38] hahuang61: has joined #ruby
[02:38:03] BTRE: has joined #ruby
[02:39:16] mistermocha: has joined #ruby
[02:40:06] ixti: has joined #ruby
[02:41:06] mjbjr: has left #ruby: ("Leaving")
[02:43:16] kfpratt: has joined #ruby
[02:43:55] Radar: thanks apeiros
[02:44:28] Darmani: Ox0dea: Breh
[02:44:36] Radar: Tests all pass.
[02:44:36] Darmani: http://ideone.com/51ob1Q
[02:44:39] Radar: \o/ \o/ \o/
[02:44:43] Darmani: Why isn't this the same as this?
[02:44:47] veg: has joined #ruby
[02:44:51] Darmani: What am I missing here.
[02:44:52] Radar: Darmani: bro
[02:44:59] Radar: Darmani: The cool kids all use Gist to paste code
[02:45:15] Darmani: Gist is overrated
[02:45:18] Darmani: and I don't know how to use it =P
[02:45:23] Radar: ?gist-usage
[02:45:23] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[02:45:27] Radar: ruboto: you fail
[02:45:39] Radar: here is an illustrated guide to gist https://github.com/radar/guides/blob/master/using-gist.markdown
[02:45:58] Darmani: Can you just look at the code I posted? -__-
[02:46:05] Darmani: I don't care about that right now
[02:46:06] Radar: I have work to do
[02:47:44] woodruffw: has joined #ruby
[02:48:49] blub: my_alll? is any, not all
[02:49:06] RegulationD: has joined #ruby
[02:49:28] Darmani: blub: ok..
[02:49:33] Darmani: This logic is hurting my head T.T
[02:49:43] Ox0dea: Darmani: But... why? :<
[02:50:07] Darmani: I don't know... It just seems the same to me...
[02:50:26] Darmani: Unless I'm reading it wrong.
[02:50:28] Ox0dea: `false unless` is indeed the same as `true if`, which is not what you want. :P
[02:50:40] Darmani: It's not what I want??
[02:50:44] Darmani: What do I want.
[02:50:57] Ox0dea: One of these should be called #my_any?, right?
[02:50:59] Radar: probably false if
[02:51:03] Radar: or true unless
[02:51:33] Darmani: I haven't gotten there yet
[02:51:44] Darmani: I restarted to scratch to practice writing the logic.
[02:52:04] Ox0dea: Well, `false unless` == `true if`, but the semantics change in the context of an early return from a loop.
[02:52:13] bmurt: has joined #ruby
[02:52:23] blub: you might try unrolling it
[02:52:36] Ox0dea: So, yeah, the code's fine, but #my_alll? should be called #my_any?.
[02:52:47] Ox0dea: You won, but only accidentally.
[02:52:59] Darmani: Ox0dea: No waittt. Let me explain myself better.
[02:53:09] Ox0dea: I dare you.
[02:54:15] woodruffw: has joined #ruby
[02:54:31] Darmani: I know the code works with return false unless yield(i). I thought return true if yield(i) was the same thing. Ox0dea.
[02:54:44] Darmani: So I thought both of those versions of my_all would do the same thing.
[02:54:45] woodruffw: has joined #ruby
[02:54:50] Darmani: They should shouldn't they???
[02:54:54] Darmani: That's what I don't get.
[02:55:04] Ox0dea: It's the `return` that changes things.
[02:55:16] Darmani: Well what am I missing?
[02:55:29] Ox0dea: >> (1 if true) == (1 unless false)
[02:55:30] ruboto: Ox0dea # => true (https://eval.in/497913)
[02:55:57] shakes: has joined #ruby
[02:56:09] Ox0dea: #my_all? will bail early with `false` if any element fails to satisfy the predicate, which is good.
[02:56:34] Ox0dea: #my_alll? will win early with `true` as soon as if finds a matching element, so it should be called #my_any?.
[02:56:47] Ox0dea: *it finds
[02:56:47] Darmani: ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
[02:56:56] Ox0dea: That looks like grokking if I've ever seen it.
[02:56:58] Darmani: That's why.
[02:57:06] joonty: has joined #ruby
[02:57:18] Darmani: Can't believe I didn't notice that.
[02:57:36] Darmani: Ox0dea: Thank you sir. You are a god among men.
[02:58:14] Ox0dea: Darmani: That's the third time I've been told as much in as many IRC sessions.
[02:58:15] voodo: has joined #ruby
[02:58:22] Ox0dea: You blasphemers just need to stop.
[02:58:58] Darmani: Ox0dea: If you're serious I won't mention it again lol
[02:59:08] Ox0dea: Darmani: I fuckin' love it. :P
[02:59:15] Darmani: Lmaoo okay
[02:59:15] Ox0dea: Jokes aside, I'm glad I could help.
[02:59:18] Darmani: I can never tell with you
[02:59:22] Ox0dea: Me neither.
[02:59:32] Darmani: ACTION slaps Ox0dea
[02:59:36] guacamole: has joined #ruby
[02:59:59] Ox0dea: "That's gonna smart in the mornin'!"
[03:00:11] Darmani: who says that. ouch that smarts. lmao
[03:00:48] arescorpio: has joined #ruby
[03:00:49] Ox0dea: Oh, wow, I apparently got that from Jim Carrey in the Lemony Snicket movie.
[03:01:22] janebootydoe: has joined #ruby
[03:01:35] Darmani: Ox0dea: Jim Carrey would say something like that.
[03:01:37] Ox0dea: I'm sure I've seen it somewhere since for it to have gone into long-term.
[03:01:42] guacamole: has joined #ruby
[03:01:59] Darmani: It's one of those older expressions that don't exist anymore
[03:02:04] janebootydoe: has joined #ruby
[03:02:06] Darmani: like 'Darn tootin".
[03:02:18] Darmani: or.. "Cowabunga".
[03:02:19] govg: has joined #ruby
[03:02:30] janebootydoe: has joined #ruby
[03:03:26] finisherr: has joined #ruby
[03:03:59] Ox0dea: Darmani: So, uh, how's #my_reduce coming along?
[03:04:13] eam: gnarly colloquialisms buddy, don't get edged 'cause I'm weazin all your grindage just chill
[03:04:26] Ox0dea: Holy Clockwork Orange, Batman!
[03:04:27] renderful: has joined #ruby
[03:04:41] Darmani: Ox0dea: I'll get there eventually.
[03:04:52] Darmani: I'm kind of afraid to get there lol
[03:05:01] Ox0dea: What does that mean?
[03:05:46] Darmani: reduce, inject, those seem hard.
[03:06:02] hxegon: has joined #ruby
[03:06:27] Ox0dea: They're the same thing.
[03:06:45] Ox0dea: #inject is a holdover from a bygone era.
[03:07:07] Darmani: a bygone era.
[03:07:10] Ox0dea: Smalltalk.
[03:07:23] Ox0dea: Imagine if MapReduce had been called CollectInject.
[03:08:11] Hanmac: has joined #ruby
[03:08:12] shakes: has joined #ruby
[03:08:16] Ox0dea: Ruby was not born in a vacuum.
[03:08:30] Ox0dea: It takes inspiration from many other languages, Smalltalk second-chief among them.
[03:08:50] Darmani: Is this a lecture? Lol
[03:08:54] havenwood: Ox0dea: I think I'll drop my fancy preference for inject come to think of if.
[03:09:06] Ox0dea: Darmani: Do you want it to be?
[03:09:10] havenwood: Darmani: Yes. Listen closely so that you may learn!
[03:09:19] Darmani: Ox0dea god no lol
[03:09:37] Ox0dea: Hi, Zarthus.
[03:09:47] havenwood: Ox0dea: Reduce I will.
[03:09:51] Ox0dea: havenwood: Huzzah!
[03:09:55] Darmani: ACTION waves at Zarthus & havenwood
[03:09:58] Ox0dea: Reductions for the transducer god!
[03:10:28] havenwood: The One True Transducer.
[03:10:33] Ox0dea: A "transjector" sounds like it'd be dangerous.
[03:12:04] ellisTAA: has joined #ruby
[03:12:54] Darmani: https://www.youtube.com/watch?v=90mzH1kvznQ&ab_channel=BlondeThing @ Ox0dea
[03:13:11] porfa: has joined #ruby
[03:13:19] Ox0dea: Darmani: What do I do with this?
[03:13:40] Darmani: Well it's music.
[03:13:42] porfa: puts ???yo??? * 99
[03:13:43] ta: has joined #ruby
[03:13:44] Darmani: People typically listen to music.
[03:13:53] Ox0dea: Darmani: I prefer to feel it.
[03:14:01] Ox0dea: Will I feel this one?
[03:14:11] Darmani: Ox0dea: Lol that's up to you xD
[03:15:36] Ox0dea: > learn from the ones we hate the most
[03:15:42] Ox0dea: Should I make something of that?
[03:16:06] Darmani: Ox0dea: You could.
[03:16:18] Darmani: You said you wanted to feel =P
[03:16:25] Ox0dea: I'm feeling it now, Mr. Darmani.
[03:16:37] penne12: has joined #ruby
[03:16:38] Darmani: Ox0dea: Mission Accomplished
[03:16:45] freerobby: has joined #ruby
[03:17:04] blub: hi penne12
[03:17:12] Darmani: ACTION waves to penne12
[03:17:18] penne12: I feel popular
[03:17:38] Darmani: Or the people here are genuinely welcoming.
[03:17:42] Darmani: Which has nothing to do with you.
[03:17:52] penne12: Thanks, btw
[03:18:52] Ox0dea: > Hello, babies. Welcome to Earth. It's hot in the summer and cold in the winter. It's round and wet and crowded. At the outside, babies, you've got about a hundred years here. There's only one rule that I know of, babies ??? "God damn it, you've got to be kind."
[03:19:32] Darmani: Ox0dea: Is that a song?
[03:19:35] Ox0dea: Vonnegut.
[03:20:04] Darmani: ACTION is 22 years old
[03:20:09] Darmani: ACTION thinks that was before his time
[03:20:20] Nilium: You should read Vonnegut.
[03:20:50] Darmani: Oh that's an author?
[03:20:54] psye: has joined #ruby
[03:21:03] Nilium: Kurt Vonnegut, yes.
[03:21:08] Ox0dea: Darmani: They don't make you kids read Slaughterhouse-Five anymore?
[03:21:30] Darmani: With a title like that I can't imagine why xP
[03:21:40] Nilium: Every time I re-read that I'm amazed by how much of it I've forgotten
[03:21:53] Ox0dea: I read it in a sitting...
[03:22:38] Darmani: How does one change their nickname?
[03:22:42] Ox0dea: /nick ohai
[03:23:09] Majora: Oh it worked.
[03:23:09] Nilium: I wonder how long it'd take to do Gravity's Rainbow in a sitting and how many pillows I'd need to sit on
[03:23:19] Ox0dea: Nilium: You're crazy.
[03:23:24] Ox0dea: Pynchon is crazy.
[03:23:36] Majora: These are books I've never heard of....
[03:23:39] Majora: They must be old.
[03:23:47] Nilium: Pynchon's pretty famous.
[03:23:56] blub: you don't sound very literate
[03:24:02] d0nn1e: has joined #ruby
[03:24:30] Nilium: That doesn't seem like a nice thing to say.
[03:24:30] Majora: blub: I suppose not by your standards.
[03:24:44] Ox0dea: blub: http://i.imgur.com/7lZwLKc.jpg
[03:24:48] eam: littering is a crime
[03:24:57] Majora: bulb: Obviously since I haven't heard of any of these books I must not be very smart at all.
[03:25:05] Ox0dea: Just uncultured.
[03:25:19] Majora: Ox0dea: That I can handle =P
[03:25:52] govg: has joined #ruby
[03:26:01] terminal_: has joined #ruby
[03:29:14] agent_white: has joined #ruby
[03:32:54] thomcom: has joined #ruby
[03:32:56] krobzaur: has joined #ruby
[03:33:11] hxegon: has joined #ruby
[03:33:24] Majora: http://ideone.com/51ob1Q Ox0dea
[03:33:31] Majora: whyy is this happening.
[03:33:47] Ox0dea: Majora: Who're you and what have you done with Darmani?
[03:34:24] Darmani: Ox0dea http://ideone.com/51ob1Q
[03:34:26] Ox0dea: Majora: You're not defining #my_map in a way that it's accessible on Arrays.
[03:34:31] Ox0dea: Darmani: Same goes for you.
[03:34:40] Ox0dea: What's with the backslide?
[03:34:43] Ox0dea: agent_white: Ahoy!
[03:34:49] Darmani: ACTION waves to agent_white
[03:35:00] weemsledeux: has joined #ruby
[03:35:07] Darmani: Ox0dea: How do I fix this?
[03:35:17] Ox0dea: Majora: You were doing just fine before?
[03:35:30] Majora: yeah... but I don't remember how I did that.
[03:35:30] Ox0dea: This means you've pretty much just been typing rather than programming. :<
[03:35:39] Majora: that's not true -__-
[03:35:42] Ox0dea: It so is doe.
[03:35:50] Majora: I started rewriting all the methods from the beginning.
[03:35:59] Majora: to practice.
[03:36:06] Ox0dea: And you forget all that back there about modules and #include and the like?
[03:36:32] Majora: I supposed trying to figure out modules and just started writing the methods.
[03:37:13] blackgoat: has joined #ruby
[03:37:34] Ox0dea: Majora: As you have it, you'd need to say `my_map([1,2,3]) { |i| i == 2 }`, but Ruby is an object-oriented language.
[03:37:59] Ox0dea: Er, you'd also need to define #my_map to take a parameter, but don't do that.
[03:38:13] Majora: yeah. I didn't do that before.
[03:38:39] Ox0dea: That's because you put #my_foo in the right place such that it could be invoked on objects of the appropriate type.
[03:39:01] baweaver: has joined #ruby
[03:39:16] Majora: Ox0dea: I didn't? o.o
[03:39:44] sankaber: has joined #ruby
[03:40:29] Ox0dea: Seems it's high time you stuck a toe into the pOOl.
[03:41:04] Ox0dea: 0bject-0riented
[03:49:22] tmtwd: has joined #ruby
[03:50:24] crdpink: has joined #ruby
[03:51:14] NoTroutAboutIt: has joined #ruby
[03:51:50] AndChat|20400: has joined #ruby
[03:52:37] molay: has joined #ruby
[03:53:22] kfpratt: has joined #ruby
[03:53:51] molay: I'm stumped, I get this warning when I try to install gems "WARNING: You don't have /home/molay/.gem/ruby/2.3.0/bin in your PATH, gem executables will not run."
[03:53:52] pawnbox: has joined #ruby
[03:54:26] molay: help me #ruby, you're my only hope
[03:54:31] penne12: type `echo $PATH`
[03:56:19] molay: https://gist.github.com/holaymolay/d5ac5d8dadaded0647a8
[03:57:13] penne12: actually, can you type this instead: echo $PATH | ruby -e "puts STDIN.gets.chomp.split(\":\")"
[03:58:17] molay: https://gist.github.com/holaymolay/f2fd5a24e92c2f1b8f59
[03:59:32] molay: no, thank you
[03:59:53] molay: yeah, I've tried everything I could find
[04:00:11] molay: maybe some context might help?
[04:00:13] penne12: looks like you defiantly have /home/molay/.gem/ruby/2.3.0/bin on your PATH
[04:00:17] penne12: sure, molay
[04:00:28] molay: I did a clean install of linux mint
[04:00:43] penne12: how did you install ruby?
[04:00:44] molay: I installed ruby via apt-get... but realized it was version 1.9
[04:00:53] molay: so I uninstalled it
[04:01:01] molay: and built 2.3.0 from source
[04:01:33] molay: before my reinstall I had ruby 2.2
[04:01:43] molay: and installed that from a repository, everything worked fine
[04:02:01] mkosaki: has joined #ruby
[04:02:32] aadam21: has joined #ruby
[04:02:36] molay: I just can't seem to get my executable path to be used
[04:03:27] waka: has joined #ruby
[04:04:14] penne12: Im also stumped.
[04:04:23] penne12: Let me think
[04:04:36] Ox0dea: Looks like RVM has stricken again.
[04:04:56] molay: yeah i think i might have figured something out
[04:05:13] molay: i just ran gem install rubygems-update
[04:05:21] molay: and update_rubygems
[04:05:33] molay: now my - EXECUTABLE DIRECTORY: /usr/local/bin
[04:06:35] penne12: Are you using rvm?
[04:07:07] penne12: If so, you might want to look at this: https://rvm.io/integration/gnome-terminal
[04:07:50] mjuszczak: has joined #ruby
[04:08:01] mary5030: has joined #ruby
[04:08:23] molay: i'm using another terminal galled tilda
[04:08:24] pawnbox: has joined #ruby
[04:08:38] devbug: has joined #ruby
[04:08:43] mjuszczak: I'm trying to figure out if the file ".gitignore" contains a file, via Ruby. What's the best way to do this? Is there a simple way to parse the .gitignore file using ruby?
[04:09:23] molay: do you think I might be better off removing ruby and rvm completely and then reinstalling from a repo?
[04:10:21] phredus: has joined #ruby
[04:10:46] penne12: mjuszczak, can you use bash?
[04:11:11] mjuszczak: penne12: no reason why I can't shell out. Execute git check-ignore?
[04:11:13] penne12: You can pipe a file in "cat .gitignore | ruby yourfile.rb"
[04:11:28] penne12: I don't know if that's a good idea, though
[04:12:00] gix: has joined #ruby
[04:12:07] penne12: open the .gitignore file, it's seperated by newlines
[04:12:11] al2o3-cr: has joined #ruby
[04:12:38] penne12: you can use the file class
[04:13:35] arup_r: has joined #ruby
[04:14:11] mjuszczak: that'll work! Just wanted to make sure there wasn't something simple I was missing.
[04:16:03] Ox0dea: mjuszczak, penne12: .gitignore directives can contain special characters that you'd want to treat, well, specially.
[04:16:57] Ox0dea: There's the Shellwords standard library, but alas, no `Shellwords.shellexpand` method. :<
[04:17:26] mjuszczak: I'll just shell out to git check-ignore
[04:17:34] Ox0dea: Seems perfectly reasonable.
[04:17:59] Ox0dea: "Reinvent only that you would improve the wheel."
[04:18:19] terminalrecluse: has joined #ruby
[04:19:54] aadam21: has joined #ruby
[04:22:57] duncannz: has joined #ruby
[04:24:21] krz: has joined #ruby
[04:24:31] rkazak: has joined #ruby
[04:26:13] astrobun_: has joined #ruby
[04:26:23] agent_white: has joined #ruby
[04:27:13] bkxd: has joined #ruby
[04:27:55] zast: has joined #ruby
[04:28:49] Scripore: has joined #ruby
[04:29:18] joonty: has joined #ruby
[04:31:14] niftylettuce: has joined #ruby
[04:35:33] molay: Ox0dea: you made a remark about RVM earlier... would you advise against using it?
[04:35:40] bb010g: has joined #ruby
[04:36:19] ellisTAA: has joined #ruby
[04:36:47] Ox0dea: molay: I can only offer an outsider's perspective, but it seems to do more harm than good.
[04:37:13] Ox0dea: It sticks its fingers in too many cookie jars, but I suppose some people might prefer that.
[04:37:30] cmolenda: has joined #ruby
[04:37:47] molay: Ox0dea: oh ok.. so you're an outsider with regards to RVM or with regards to Ruby?
[04:38:56] Ox0dea: molay: RVM. :P
[04:38:57] akkad: has joined #ruby
[04:39:21] molay: Ox0dea: haha yeah figured. more curious what your answer was gonna be
[04:41:03] rrichardsr3: has joined #ruby
[04:41:14] skcin7: has joined #ruby
[04:41:23] Ox0dea: molay: I like simple things kept simple, and for that there's chruby.
[04:42:49] mistermocha: has joined #ruby
[04:45:33] molay: Ox0dea: me too.. I will check it out
[04:47:18] hxegon: has joined #ruby
[04:52:39] djbkd: has joined #ruby
[04:56:52] pawnbox: has joined #ruby
[04:57:03] ellisTAA: has joined #ruby
[04:59:00] greenhat: I used to manually compile rubies and manually update symlinks. Then I discovered RVM and it was great. Then bundler made most of RVM unnecessary for me and I switched to chruby and ruby-build and it is great.
[04:59:32] greenhat: I hope one day native OS packages will get their act together and I won't need any ruby version managers at all, and it will be great.
[05:00:15] Ox0dea: $ pacman -Si ruby | grep V
[05:00:17] Ox0dea: Version : 2.3.0-1
[05:00:19] Ox0dea: Just sayin'.
[05:01:54] greenhat: Yeah. Gentoo does a fair job too. But arch and gentoo are fairly niche :)
[05:02:23] greenhat: I do use the brightbox ppa in production.
[05:02:38] greenhat: I guess I should re-phrase that to "when osx gets its act together".
[05:06:10] makenoise: has joined #ruby
[05:09:53] pawnbox: has joined #ruby
[05:11:12] Melpaws1: has joined #ruby
[05:12:21] niotoan: has joined #ruby
[05:13:36] cscheib: has joined #ruby
[05:14:41] astrobun_: has joined #ruby
[05:15:51] kfpratt: has joined #ruby
[05:16:09] bestbrents: has joined #ruby
[05:16:52] ta: has joined #ruby
[05:17:19] UtkarshRay: has joined #ruby
[05:23:08] aadam21: has joined #ruby
[05:23:58] ceej: has joined #ruby
[05:24:31] darkf: has joined #ruby
[05:26:05] havenwood: greenhat: 2.3.0 on brew or macports already.
[05:28:09] havenwood: greenhat: Even fink too.
[05:28:23] BTRE: has joined #ruby
[05:30:58] havenwood: greenhat: OS X seems well covered.
[05:32:56] arup_r: has joined #ruby
[05:33:04] poguez_: has joined #ruby
[05:33:14] karapetyan: has joined #ruby
[05:34:10] djbkd: has joined #ruby
[05:35:42] ur5us: has joined #ruby
[05:39:54] fly5566: has joined #ruby
[05:41:20] jobewan: has joined #ruby
[05:43:50] drys: has joined #ruby
[05:45:00] yfeldblum: has joined #ruby
[05:45:40] LMity: has joined #ruby
[05:45:49] yfeldblum: has joined #ruby
[05:47:23] yes`r: has joined #ruby
[05:50:18] hxegon: has joined #ruby
[05:52:40] sigurding: has joined #ruby
[05:53:38] djbkd: has joined #ruby
[05:55:09] dlitvak: has joined #ruby
[05:56:25] pawnbox: has joined #ruby
[05:57:56] bkxd: has joined #ruby
[05:58:14] Palaver: has joined #ruby
[05:59:20] icarus: has joined #ruby
[05:59:46] govg: has joined #ruby
[06:02:52] astrobun_: has joined #ruby
[06:02:57] Feyn: has joined #ruby
[06:03:43] Feyn: has joined #ruby
[06:04:07] astrobun_: has joined #ruby
[06:06:33] rkazak: has joined #ruby
[06:07:49] darkf_: has joined #ruby
[06:07:54] LMity: has joined #ruby
[06:08:13] toretore: has joined #ruby
[06:08:13] Feyn: has joined #ruby
[06:10:15] mary5030: has joined #ruby
[06:12:53] govg: has joined #ruby
[06:16:22] astrobun_: has joined #ruby
[06:18:10] dionysus69: has joined #ruby
[06:19:08] astrobun_: has joined #ruby
[06:19:29] paradisaeidae: has joined #ruby
[06:24:53] krzkrz: has joined #ruby
[06:26:36] tubuliferous_: has joined #ruby
[06:28:04] aadam21_: has joined #ruby
[06:29:13] lacuna: has joined #ruby
[06:29:13] lacuna: has joined #ruby
[06:30:37] govg: has joined #ruby
[06:31:20] Ishido: has joined #ruby
[06:32:06] aganov: has joined #ruby
[06:32:17] viperman: has joined #ruby
[06:36:57] trautwein: has joined #ruby
[06:39:10] juddey: has joined #ruby
[06:39:24] symm-: has joined #ruby
[06:39:34] icarus: has joined #ruby
[06:41:06] mary5030: has joined #ruby
[06:42:19] lacuna: has joined #ruby
[06:42:38] jamw: has joined #ruby
[06:42:40] DonOtreply: has joined #ruby
[06:44:28] colegatron: has joined #ruby
[06:44:36] lacuna: has joined #ruby
[06:44:36] lacuna: has joined #ruby
[06:45:27] charliesome: has joined #ruby
[06:46:39] danielpclark: has joined #ruby
[06:46:47] lxsameer: has joined #ruby
[06:47:23] pawnbox: has joined #ruby
[06:47:35] haraigo: has joined #ruby
[06:48:23] dionysus69: has joined #ruby
[06:48:53] greenride: has joined #ruby
[06:49:09] dlitvak: has joined #ruby
[06:50:00] greenride: Are there any Ruby frameworks that use a persistent connection to push data to a web browser from a server? Ideally, the framework would be compatible with a Postgres database.
[06:50:45] RegulationD: has joined #ruby
[06:51:50] Ox0dea: greenride: Sounds like you want ActionCable.
[06:52:01] yardenbar: has joined #ruby
[06:53:06] greenride: Ox0dea: Cool! I didn't realize this was merged into Rails.
[06:53:15] n00bDev: has joined #ruby
[06:53:39] aadam21__: has joined #ruby
[06:53:39] greenride: Has anyone done load tests on the maximum number of open connections this can support?
[06:53:47] Ox0dea: I suspect somebody has.
[06:53:52] claw: has joined #ruby
[06:54:57] framling: has joined #ruby
[06:55:18] sigurding: has joined #ruby
[06:55:35] pawnbox: has joined #ruby
[06:58:43] choke: has joined #ruby
[07:02:26] radgeRayden: has joined #ruby
[07:05:59] aadam21_: has joined #ruby
[07:06:23] jas02: has joined #ruby
[07:09:49] SOLDIERz: has joined #ruby
[07:11:22] aadam21: has joined #ruby
[07:11:31] rkazak: has joined #ruby
[07:12:01] weemsledeux: has joined #ruby
[07:13:41] yfeldblum: has joined #ruby
[07:14:05] moei: has joined #ruby
[07:14:54] howdoi: has joined #ruby
[07:15:16] hahuang61: has joined #ruby
[07:15:24] ByronJoh1son: has joined #ruby
[07:15:40] ibouvousaime: has joined #ruby
[07:16:00] choke: has joined #ruby
[07:17:02] kies: has joined #ruby
[07:17:31] peeja: has joined #ruby
[07:18:06] startupality: has joined #ruby
[07:19:40] ta: has joined #ruby
[07:20:44] lxsameer: has joined #ruby
[07:21:49] ascarter: has joined #ruby
[07:22:10] claw: has joined #ruby
[07:22:29] viperman: has joined #ruby
[07:24:11] pawnbox: has joined #ruby
[07:25:20] domgetter: has joined #ruby
[07:26:56] symm-: has joined #ruby
[07:27:03] krzkrz: has joined #ruby
[07:28:44] bkxd: has joined #ruby
[07:29:38] bmalum: has joined #ruby
[07:29:59] rkazak: has joined #ruby
[07:31:19] govg: has joined #ruby
[07:33:31] Asher: has joined #ruby
[07:35:32] Dimik: has joined #ruby
[07:36:17] mdw: has joined #ruby
[07:37:42] firstdayonthejob: has joined #ruby
[07:38:23] bubbys: has joined #ruby
[07:41:10] rippa: has joined #ruby
[07:41:53] blub`: has joined #ruby
[07:42:56] skade: has joined #ruby
[07:43:09] dlitvak: has joined #ruby
[07:43:48] mdw: has joined #ruby
[07:45:12] gagrio: has joined #ruby
[07:47:49] sandstrom: has joined #ruby
[07:49:08] pawnbox: has joined #ruby
[07:52:03] roshanavand: has joined #ruby
[07:52:18] LMity: has joined #ruby
[07:52:23] ur5us: has joined #ruby
[07:52:48] roshanavand: has joined #ruby
[07:52:57] aufi: has joined #ruby
[07:54:21] allenn: has joined #ruby
[07:54:21] allenn: has joined #ruby
[07:55:07] juddey: has joined #ruby
[07:55:42] mary5030: has joined #ruby
[07:57:00] codecop: has joined #ruby
[07:57:05] lxsameer: has joined #ruby
[07:58:31] roshanavand: has joined #ruby
[07:58:45] ta: has joined #ruby
[07:58:56] Puffball: has joined #ruby
[07:59:35] roshanavand: has joined #ruby
[07:59:47] Coral: has joined #ruby
[08:00:22] pawnbox: has joined #ruby
[08:03:13] roshanavand: has joined #ruby
[08:03:14] Luke-Du: has joined #ruby
[08:07:16] kies: has joined #ruby
[08:09:57] gigetoo: has joined #ruby
[08:11:33] dn`: has joined #ruby
[08:13:06] justinmcp: has joined #ruby
[08:13:40] cornerman: has joined #ruby
[08:14:29] choke: has joined #ruby
[08:15:12] Glenny: has joined #ruby
[08:15:40] dlitvak: has joined #ruby
[08:16:26] joonty: has joined #ruby
[08:17:06] mark2: has joined #ruby
[08:19:35] justinmcp: has joined #ruby
[08:22:27] aadam21: has joined #ruby
[08:22:34] DoubleMalt: has joined #ruby
[08:23:24] TomyWork: has joined #ruby
[08:24:05] SCHAAP137: has joined #ruby
[08:25:54] choke_: has joined #ruby
[08:28:49] CloCkWeRX: has joined #ruby
[08:29:30] bkxd: has joined #ruby
[08:30:36] startupality: has joined #ruby
[08:30:48] pawnbox_: has joined #ruby
[08:31:44] dwfait: has joined #ruby
[08:33:06] shevy: yo Luke Duke
[08:33:21] choke: has joined #ruby
[08:35:17] brunto: has joined #ruby
[08:35:29] kies^: has joined #ruby
[08:38:18] sandstrom: has joined #ruby
[08:38:30] agent_white: I am moving today/tomorrow :)
[08:39:57] agent_white: No more anomalies/intermittent disconnects in internet usage.
[08:40:14] steffkes: has joined #ruby
[08:40:14] shevy: moving to?
[08:40:15] steffkes: has joined #ruby
[08:40:42] agent_white: The city :) I've been watching cows for 2 years. Back to watching humans!
[08:40:46] anisha: has joined #ruby
[08:42:40] Mia: has joined #ruby
[08:42:40] Mia: has joined #ruby
[08:42:43] yes`r: has joined #ruby
[08:42:49] charliesome: has joined #ruby
[08:44:48] azgil: has joined #ruby
[08:45:30] solars: has joined #ruby
[08:47:04] mistermocha: has joined #ruby
[08:47:13] icarus: has joined #ruby
[08:48:46] patchedmonkey: has joined #ruby
[08:49:38] blackmesa: has joined #ruby
[08:49:50] Hounddog: has joined #ruby
[08:51:32] RegulationD: has joined #ruby
[08:53:25] startupality: has joined #ruby
[08:54:20] baweaver: has joined #ruby
[08:56:47] agent_wh1te: has joined #ruby
[08:58:47] astrobun_: has joined #ruby
[08:59:40] thoma: has joined #ruby
[08:59:47] thoma: has left #ruby: ()
[09:03:29] TheHodge: has joined #ruby
[09:03:46] Marsupermammal: has joined #ruby
[09:05:46] _joes_: has joined #ruby
[09:06:15] einarj: has joined #ruby
[09:08:14] ibouvousaime: has joined #ruby
[09:09:35] karapetyan: has joined #ruby
[09:11:44] lkba_: has joined #ruby
[09:15:23] _joes___: has joined #ruby
[09:15:51] haraigoshi: has joined #ruby
[09:17:24] joonty: has joined #ruby
[09:20:00] timonv: has joined #ruby
[09:21:00] einarj: has joined #ruby
[09:23:31] bigkevmcd: has joined #ruby
[09:24:50] roshanavand: has joined #ruby
[09:26:27] timonv: has joined #ruby
[09:27:05] cmolenda: has joined #ruby
[09:27:14] kam270: has joined #ruby
[09:27:34] timonv: has joined #ruby
[09:29:18] charliesome: has joined #ruby
[09:31:00] timonv: has joined #ruby
[09:31:07] rdark: has joined #ruby
[09:32:35] rdark: has joined #ruby
[09:33:51] snowy: has joined #ruby
[09:34:57] SHyx0rmZ: has joined #ruby
[09:37:41] pandaant: has joined #ruby
[09:39:57] marr: has joined #ruby
[09:42:27] karapetyan: has joined #ruby
[09:43:35] icarus: has joined #ruby
[09:45:15] roshanavand: has joined #ruby
[09:46:13] n00bDev: has joined #ruby
[09:46:22] choke: has joined #ruby
[09:47:08] DEA7TH: has joined #ruby
[09:50:18] Jackneill: has joined #ruby
[09:53:02] tvw: has joined #ruby
[09:53:36] niemcu: has joined #ruby
[09:54:43] DoubleMalt: has joined #ruby
[09:55:20] aadam21: has joined #ruby
[09:55:29] baweaver: has joined #ruby
[09:56:01] lkba: has joined #ruby
[09:58:24] rodfersou: has joined #ruby
[09:59:16] icarus: has joined #ruby
[10:00:32] bubbys: has joined #ruby
[10:01:12] Coldblackice: has joined #ruby
[10:02:44] blackmesa: has joined #ruby
[10:02:54] yes`r: has joined #ruby
[10:06:04] roshanavand: has joined #ruby
[10:07:58] blackgoat: has joined #ruby
[10:09:17] lipoqil: has joined #ruby
[10:10:47] SenpaiSilver: has joined #ruby
[10:11:17] MyMind: has joined #ruby
[10:12:37] sigurding: has joined #ruby
[10:13:53] timonv: has joined #ruby
[10:13:59] jamw: has joined #ruby
[10:14:26] timonv: has joined #ruby
[10:16:52] timonv: has joined #ruby
[10:18:30] DoubleMalt: has joined #ruby
[10:19:23] huyderman: has joined #ruby
[10:21:38] arup_r: has joined #ruby
[10:26:44] xet7: has joined #ruby
[10:26:54] roshanavand: has joined #ruby
[10:27:31] Jet4Fire: has joined #ruby
[10:27:47] Scripore: has joined #ruby
[10:29:20] Xeago: has joined #ruby
[10:30:15] bkxd: has joined #ruby
[10:32:04] timonv: has joined #ruby
[10:33:23] timonv: has joined #ruby
[10:35:10] voodo: has joined #ruby
[10:37:13] sgambino: has joined #ruby
[10:37:57] timonv: has joined #ruby
[10:38:58] nerfando: has joined #ruby
[10:40:17] platzhirsch: has joined #ruby
[10:41:44] startupality: has joined #ruby
[10:42:41] roshanavand: has joined #ruby
[10:43:11] rdark: has joined #ruby
[10:43:52] cmolenda: has joined #ruby
[10:44:17] acalewin: has joined #ruby
[10:45:46] dorei: has joined #ruby
[10:46:56] Nahra```: has joined #ruby
[10:52:19] SenpaiSilver: has joined #ruby
[10:53:41] j2k: has joined #ruby
[10:55:31] DoubleMalt: has joined #ruby
[10:58:55] rrichardsr3: has joined #ruby
[10:59:43] Xeago: has joined #ruby
[10:59:46] j2k: has joined #ruby
[11:00:18] roshanav_: has joined #ruby
[11:01:09] rns: has joined #ruby
[11:02:04] yashinbasement: has joined #ruby
[11:04:37] silverdust: Using the String#slice how can I select from an index to the end of the string without specifying a number of characters
[11:05:33] silverdust: Like I thought for f = "crisp", f[1..] will give "risp"
[11:05:39] silverdust: but that's invalid
[11:05:57] yorickpeterse: >> "hello world"[2..-1]
[11:05:58] ruboto: yorickpeterse # => "llo world" (https://eval.in/498032)
[11:06:49] karapetyan: has joined #ruby
[11:07:53] joonty: has joined #ruby
[11:08:16] chussenot: has joined #ruby
[11:08:36] karapetyan: has joined #ruby
[11:11:31] bkxd: has joined #ruby
[11:12:19] FooMunki: has joined #ruby
[11:17:04] ascarter: has joined #ruby
[11:18:47] cmolenda_: has joined #ruby
[11:20:00] roshanavand: has joined #ruby
[11:21:10] arup_r: has joined #ruby
[11:21:32] pontiki: ACTION waves o/
[11:22:40] Xeago: has joined #ruby
[11:23:15] aadam21: has joined #ruby
[11:23:58] roshanavand: has joined #ruby
[11:25:29] DEA7TH: has joined #ruby
[11:32:43] karapetyan: has joined #ruby
[11:33:54] dangerousdave: has joined #ruby
[11:36:22] anisha_: has joined #ruby
[11:36:25] platzhirsch: has left #ruby: ()
[11:36:51] roobee: has joined #ruby
[11:37:24] Xeago: has joined #ruby
[11:38:01] dlitvak: has joined #ruby
[11:38:10] cmolenda: has joined #ruby
[11:38:10] roobee: Hello guys, this is a relatvely simple question, can anyone help me please? Here's the code (with explanation with what I get and what I want to get) thanks!
[11:38:12] roobee: http://codepad.org/Dcp1O0uB
[11:38:47] roshanav_: has joined #ruby
[11:41:12] roobee: anyone? :)
[11:44:32] canton7: you might have to wait longer than 3 minutes ;)
[11:44:55] sankaber: has joined #ruby
[11:46:36] dlitvak: has joined #ruby
[11:46:40] roobee: >canton7 I understand, not in a hurry anyway :)
[11:50:55] apeiros: roobee: you iterate over the whole text for each redacted word
[11:51:48] apeiros: roobee: you should have the text_words as the outer loop. and as the inner loop, you test whether you want to print the word, or redacted (which you'll have to do a bit differently from how you try now)
[11:53:31] FernandoBasso: has joined #ruby
[11:55:27] roobee: apeiros I don't know what an outer/inner loop is. Is that just the order they appear?
[11:56:16] _joes___: has joined #ruby
[11:56:19] cmolenda_: has joined #ruby
[11:56:26] niemcu: roobee: yes, basically.
[11:56:48] roobee: ok. thanks
[11:56:58] krzkrz: has joined #ruby
[11:57:45] baweaver: has joined #ruby
[11:58:49] apeiros: roobee: outer.each do |x| inner.each do |y| ???
[11:58:54] _joes_: has joined #ruby
[11:59:09] apeiros: if you'd properly indent, you'd see it visually too (yes, that's a hint with a sledge-hammer, take it :-p)
[11:59:15] m8: has joined #ruby
[11:59:44] niemcu: yes, and I'd call that pretty important point.
[12:00:06] c355E3B: has joined #ruby
[12:00:23] roobee: what identation rules did I break? I'm basically a 2-hour experience beginner, been writing on the codeacademy console
[12:01:19] BSaboia: has joined #ruby
[12:01:21] niemcu: anytime you open new block of code, you should indent.
[12:01:41] ibouvousaime: has joined #ruby
[12:02:08] niemcu: it helps understand what parts are responsible for specific things, and makes code a lot more readable
[12:02:42] niemcu: hint: you don't want this two ends in one column ;)
[12:03:55] roobee: well now I have 3 in one column, time to go fix that xD
[12:03:56] ascarter: has joined #ruby
[12:04:18] niemcu: definitely!
[12:05:09] roobee: oooh now I see the outer loops! thanks guys
[12:05:23] roobee: yes, it got 10 times easier
[12:05:37] DEA7TH: has joined #ruby
[12:06:46] phredus: has joined #ruby
[12:07:55] xet7: has joined #ruby
[12:08:19] roobee: I was thinking of assigning a variable to each array element but, before even knowing how to do that, I have no way of knowing how many elements the array will have. so that's not it :/
[12:10:50] dlitvak: has joined #ruby
[12:10:50] bob_f: Is there an equivalent short-hand to `a.map(:&method)` for hash access, i.e. a.map { |x| x["key"] } ?
[12:11:29] astrobun_: has joined #ruby
[12:13:31] bigkevmcd: has joined #ruby
[12:14:55] JamieD: has joined #ruby
[12:15:21] Phage: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[12:18:49] Kiedisticelixer: has joined #ruby
[12:19:49] roshanavand: has joined #ruby
[12:20:47] toretore: bob_f, http://www.rubydoc.info/stdlib/core/Hash#values_at-instance_method
[12:23:49] RegulationD: has joined #ruby
[12:24:45] Guest82: has joined #ruby
[12:25:35] Guest82: I am doing Ruby exercise
[12:25:41] Guest82: What this question means?
[12:25:42] Guest82: There is array of colours. $colours = (???black???, ???orange???, ???yellow???, ???white???, ???green???). Write
[12:25:43] Guest82: the output ???The grass is green???.
[12:26:07] nixmaniack: has joined #ruby
[12:26:08] nixmaniack: has joined #ruby
[12:26:18] ruby-lang801: has joined #ruby
[12:26:34] ruby-lang801: I am doing Ruby exercise
[12:26:40] ruby-lang801: What does this question means?
[12:26:42] pontiki: sounds like everyone is
[12:26:42] ruby-lang801: There is array of colours. $colours = (???black???, ???orange???, ???yellow???, ???white???, ???green???). Write the output ???The grass is green???.
[12:26:43] dlitvak: has joined #ruby
[12:27:43] toretore: ruby-lang801, link to excercise
[12:28:02] Guest82: its in PDF
[12:28:16] pontiki: that's not ruby syntax, either of you
[12:29:24] toretore: >> puts "The grass is green"
[12:29:25] ruboto: toretore # => The grass is green ...check link for more (https://eval.in/498048)
[12:29:48] Guest82: the questions are not must be in syntax
[12:30:35] blackmesa: has joined #ruby
[12:30:36] pawnbox: has joined #ruby
[12:30:42] Guest82: i dont get it ruboto
[12:30:56] pontiki: Guest82: have you read anything about ruby?
[12:31:01] Guest82: the question is write the output? first it gives array of colors
[12:31:08] Guest82: actually what the question wants?
[12:31:51] toretore: Guest82, we can't help without more information
[12:32:01] Guest82: ok i will give link
[12:32:08] prestorium: has joined #ruby
[12:32:13] niemcu: it wants you to write "The grass is <the fifth element of array>"
[12:32:37] krzkrz: has joined #ruby
[12:32:50] Guest82: ok niemcu, so the answer is like what ruboto gave?
[12:33:02] Guest82: toretore, this is the link
[12:33:06] Guest82: https://dl.dropboxusercontent.com/u/16501848/RoR%20Test.pdf
[12:33:10] Guest82: qestion number 3
[12:33:40] toretore: why ar eyou doing this excercise?
[12:33:52] niemcu: do you know what an array is?
[12:34:57] sigurding: has joined #ruby
[12:36:58] karapetyan: has joined #ruby
[12:37:13] nofxx: has joined #ruby
[12:37:13] nofxx: has joined #ruby
[12:38:55] gregf_: >> require "prime";p [*1..100].inject(0){ |s, v| Prime.prime?(v) ? s+v : s }
[12:38:56] ruboto: gregf_ # => 1060 ...check link for more (https://eval.in/498054)
[12:40:18] Kiedisticelixer: Q: In my game Im drawing five layers: 1 and 2 is map, 3 is player and 4 is map but above player. But I want my fog to be below the player but above the highest map layer, any ideas?
[12:40:21] icarus: has joined #ruby
[12:40:48] Kiedisticelixer: Im adjusting all with Z
[12:40:58] bob_f: toretore: Had to step out for a sec, thanks for the answer.
[12:41:10] domgetter: Kiedisticelixer: maintain an array of layers, and draw them in order every time
[12:43:02] dlitvak: has joined #ruby
[12:43:21] Kiedisticelixer: Aw, thats slightly beyond my expertise, but I will try, thank you
[12:44:23] domgetter: Kiedisticelixer: what library are you using to make a game? Or are you doing it from scratch in Ruby?
[12:44:30] karapetyan: has joined #ruby
[12:45:03] bluOxigen: has joined #ruby
[12:45:28] colegatron: has joined #ruby
[12:48:50] niemcu: interesting, never heard of that one
[12:50:33] kalopsian: has joined #ruby
[12:50:43] bluOxigen: has joined #ruby
[12:52:05] brunto: has joined #ruby
[12:53:41] mistermocha: has joined #ruby
[12:53:47] Kiedisticelixer: Ruby Game Scripting System,if you have heard of that
[12:54:05] bluOxigen: has left #ruby: ()
[12:54:08] leksster: has joined #ruby
[12:54:13] aadam21: has joined #ruby
[12:55:44] lidenbrock: has joined #ruby
[12:56:02] peeja: has joined #ruby
[12:56:03] dlitvak: has joined #ruby
[12:56:08] Mon_Ouie: has joined #ruby
[12:57:17] steerio: has joined #ruby
[12:57:26] steerio: hi, does anyone know where to find HTTP::Response::STATUS_CODES, which gem?
[12:57:44] steerio: it seems like reel somehow forgets to depend on it
[12:57:44] SCHAAP137: nokogiri maybe?
[12:58:34] steerio: nope, nokogiri is in my gemfile.lock
[12:58:45] steerio: and requiring it explicitly doesn't seem to define HTTP either
[12:59:05] nixmaniack: has joined #ruby
[12:59:40] steerio: weirdly enough, google is no help either
[13:00:10] DEA7TH: has joined #ruby
[13:00:42] niemcu: Rack::Utils module?
[13:01:01] jhass: how about the http gem?
[13:01:01] bob_f: steerio: Tried grepping your gems directory for "STATUS_CODES" ?
[13:01:07] jhass: let's ask omniref I guess
[13:01:10] steerio: jhass: yeah that's what I got
[13:01:28] steerio: so yeah, HTTP::Response exists, but HTTP::Response::STATUS_CODES (looked for by Reel) doesn't
[13:01:46] jhass: https://www.omniref.com/?utf8=%E2%9C%93&q=HTTP%3A%3AResponse%3A%3ASTATUS_CODES&commit=Search
[13:02:16] jhass: version conflict?
[13:02:21] steerio: apparently reel never bothered to update its deps, it depends on >=0.6, but we're now at http 1.0.1
[13:02:25] sankaber: has joined #ruby
[13:02:30] steerio: the proper dep would be <1
[13:02:42] steerio: i'll file a bug report there
[13:02:51] bob_f: Man I hate deps like that.
[13:03:12] steerio: latest commit May 2015, oh boy.
[13:03:24] ibouvousaime: has joined #ruby
[13:04:44] dlitvak: has joined #ruby
[13:04:46] steerio: time to fork :D
[13:05:41] adaedra: good idea, i'll spoon then.
[13:07:53] spooq|2: has joined #ruby
[13:07:57] bithon: has joined #ruby
[13:07:57] peeja: has joined #ruby
[13:08:17] bkxd_: has joined #ruby
[13:09:46] ibouvousaime: has joined #ruby
[13:10:18] dlitvak: has joined #ruby
[13:11:16] x-user: has joined #ruby
[13:12:12] snowy: has joined #ruby
[13:16:01] atmosx: has joined #ruby
[13:17:20] yes`r: has joined #ruby
[13:18:25] cmolenda: has joined #ruby
[13:19:31] webus: has joined #ruby
[13:21:39] RubieNewbie: has joined #ruby
[13:21:39] RubieNewbie: Replace this sentence into ifelse statements. ???I work from Mondays to Fridays if there is
[13:21:39] RubieNewbie: no public holidays???.
[13:21:56] RubieNewbie: Replace this sentence into ifelse statements. ???I work from Mondays to Fridays if there is
[13:21:57] RubieNewbie: no public holidays???.
[13:22:16] ljarvis: RubieNewbie: you've written that once already, please provide some context or give us the code you're trying
[13:22:29] ljarvis: since you are of course trying to write this yourself before asking for help
[13:22:56] apeiros: that sounds like homework?
[13:23:08] ljarvis: yeah assuming that too, lets see how the follow up looks
[13:23:36] apeiros: sure. the target is to get them to figure out how to do it themselves either way :)
[13:23:47] dlitvak_: has joined #ruby
[13:24:07] Jardayn: has joined #ruby
[13:24:15] ibouvousaime: has joined #ruby
[13:24:41] ixti: has joined #ruby
[13:24:48] rns: has joined #ruby
[13:25:07] solars: has joined #ruby
[13:25:56] shevy: has joined #ruby
[13:26:12] RubieNewbie: if Monday to Friday != Public Holiday
[13:26:12] RubieNewbie: puts "I work"
[13:26:25] RubieNewbie: is that correct?
[13:26:28] ljarvis: does it work?
[13:27:02] ljarvis: I don't actually understand the question, since it doesn't make any sense. You want to see if a specific week includes a public holiday, or?
[13:27:06] apeiros: RubieNewbie: is the result supposed to be ruby code or pseudo code?
[13:27:38] RubieNewbie: apeiros, the question is just that
[13:27:39] RubieNewbie: Replace this sentence into ifelse statements. ???I work from Mondays to Fridays if there is
[13:27:40] RubieNewbie: no public holidays???.
[13:27:59] RubieNewbie: it can be in ruby code (preferrable) or pseudo code
[13:27:59] apeiros: and from where do you have that question then?
[13:28:30] ljarvis: that's a ridiculous questions
[13:29:20] RubieNewbie: so my answer is wrong?
[13:29:44] ljarvis: RubieNewbie: read your answer out loud
[13:29:55] apeiros: I'd agree that the question is badly phrased. but trying to go with its spirit, I'd say your answer is wrong RubieNewbie
[13:29:56] Bish: hey, can rvm somehow set some ruby version default globally?
[13:29:59] ljarvis: "if monday to friday is not a public holiday" does that make any sense?
[13:30:03] Bish: i f* hate debian/ubuntu
[13:30:11] ljarvis: Bish: #rvm
[13:30:21] Bish: ljarvis: okay
[13:30:32] apeiros: Bish: define "globally". for your user, yes: rvm use X --default
[13:30:42] gregf: has joined #ruby
[13:30:52] RubieNewbie: another question i dont understand
[13:31:04] RubieNewbie: There is array of colours. $colours = (???black???, ???orange???, ???yellow???, ???white???, ???green???). Write
[13:31:05] RubieNewbie: the output ???The grass is green???.
[13:31:08] Bish: globally for one user? what is locally then? dafuq?
[13:31:13] ljarvis: we didn't get past the last question yet
[13:31:19] ljarvis: one question at a time
[13:31:33] ljarvis: the colours one actually makes sense
[13:31:42] ljarvis: but, that isn't Ruby, so..
[13:31:42] apeiros: "ruby preferably" but the example is non-ruby?
[13:32:05] apeiros: I'm inclined to say you're in the wrong channel and actually probably should better ask your classmates.
[13:32:43] apeiros: (not my opinion as an op, i.e. I won't moderate this)
[13:33:26] ljarvis: not yet, anyway :)
[13:35:16] rgtk: has joined #ruby
[13:36:50] rgtk: has joined #ruby
[13:37:53] bkxd: has joined #ruby
[13:38:52] roshanav_: has joined #ruby
[13:39:28] timonv1: has joined #ruby
[13:39:36] sandstrom: has joined #ruby
[13:40:48] rdavila: has joined #ruby
[13:40:52] choke: has joined #ruby
[13:41:32] timonv: has joined #ruby
[13:42:16] build22: has joined #ruby
[13:42:18] build22: has left #ruby: ()
[13:42:36] arup_r: has joined #ruby
[13:45:00] anisha_: has joined #ruby
[13:46:03] timonv: has joined #ruby
[13:46:53] platzhirsch: has joined #ruby
[13:51:30] blackmesa: has joined #ruby
[13:51:45] tvw: has joined #ruby
[13:53:19] dlitvak: has joined #ruby
[13:53:34] x-user: has joined #ruby
[13:56:15] x-user: has joined #ruby
[13:56:17] thevishy: has joined #ruby
[13:56:21] thevishy: anyone using fluentd here?
[13:56:40] choke: has joined #ruby
[13:57:30] pdoherty: has joined #ruby
[13:58:18] baweaver: has joined #ruby
[13:59:36] GarethAdams: has joined #ruby
[14:01:02] dstarh: has joined #ruby
[14:02:58] aryaching: has joined #ruby
[14:03:02] phredus: has joined #ruby
[14:04:55] Scripore: has joined #ruby
[14:05:01] ruboto: Just ask your question, if anyone has or can, they will respond.
[14:06:48] ta: has joined #ruby
[14:09:14] user083: has joined #ruby
[14:10:33] kies: has joined #ruby
[14:10:55] atomical: has joined #ruby
[14:11:51] dlitvak: has joined #ruby
[14:13:03] sdothum: has joined #ruby
[14:13:57] snowy: has joined #ruby
[14:15:40] JamieD: has joined #ruby
[14:15:52] Xeago: has joined #ruby
[14:18:07] apeiros: I think anyone uses inarticulated. But someone uses fluentd. ask someone.
[14:19:26] yoshyn: has joined #ruby
[14:19:50] ta0: has joined #ruby
[14:21:59] ellisTAA: has joined #ruby
[14:22:14] ibouvousaime_: has joined #ruby
[14:22:21] roshanavand: has joined #ruby
[14:23:39] futilegames: has joined #ruby
[14:23:40] snowy: has joined #ruby
[14:23:46] ruboto: I don't know anything about someone
[14:23:48] shevy: ?somebody
[14:23:48] ruboto: I don't know anything about somebody
[14:23:49] roshanav_: has joined #ruby
[14:23:51] shevy: hmmm weird
[14:23:53] shevy: who was jhass again?
[14:24:01] steerio: I am someone and I think anyone is just an innocent way of addressing a pool of people.
[14:24:05] ruboto: jhass is anybody. They're a member of the op staff in #ruby, contributor to ruboto and ruby-community.com
[14:24:06] aadam21: has joined #ruby
[14:24:19] ruboto: I know everything about ljarvis
[14:24:53] yoshyn: has left #ruby: ("Leaving...")
[14:25:14] RegulationD: has joined #ruby
[14:25:20] steerio: this could be extended, like, if someone's talking to themselves, it could be eigenone
[14:25:56] steerio: or to a group of people, that's multione. no, that's any-n.
[14:26:17] ljarvis: >> RUBY_VERSION
[14:26:19] ruboto: ljarvis # => "2.2.0" (https://eval.in/498134)
[14:26:22] ljarvis: apeiros: how longggg
[14:27:24] thevishy: I am just thinking if fluentd only accepts JSON
[14:27:26] aegis3121: has joined #ruby
[14:27:52] ziyadb: has joined #ruby
[14:28:08] thevishy: someone is an expert, anyone can be an expert!
[14:29:11] RubieNewbie: has joined #ruby
[14:29:16] FooMunki: has joined #ruby
[14:30:21] Bish: why the f is it so hard to get a ruby2+ working on ubuntu, what did they smoke?! ( not a real question, just mad ).
[14:30:27] mic_e: has joined #ruby
[14:30:47] ljarvis: its not hard
[14:30:53] slackbotgz: has joined #ruby
[14:31:04] ljarvis: install chruby, ruby-install, build ruby 2, point chruby at it
[14:31:15] DoubleMalt: has joined #ruby
[14:31:16] Bish: how is it not hard!? standard is 1.9, if you install 2.0 GREAT the binaries just lay there
[14:31:25] Bish: oh great whe have "update alternatives" which never works
[14:31:28] TomPeed: has joined #ruby
[14:31:38] ljarvis: why even use aptitude?
[14:31:54] ljarvis: build it yourself if the package manager doesn't work
[14:32:01] ljarvis: this is difficult if you make it difficult
[14:32:03] Bish: because what else is there? i never liked ubuntu, but every mf uses it on his servers for some reason
[14:32:16] Bish: well, i feel like, it could get worse if i install stuff around the package manager
[14:32:27] Bish: it makes it untidy and unreliable
[14:32:29] RubieNewbie: has joined #ruby
[14:32:31] kgirthofer: has joined #ruby
[14:32:41] ljarvis: I disagree
[14:33:02] Bish: well i have no clue what other sh* ubuntu does, maybe it walks over the files it does who knows what with it
[14:33:05] ljarvis: many package managers aren't great. The Ruby code is provided to you by the Ruby authors. Just build it yourself
[14:33:18] Bish: how can you be sure, if you install ruby with make install, it won't get overwritten by some update
[14:33:23] ljarvis: Bish: stop with this language please, even if it's not explicit, it's not welcome here
[14:33:25] smactive: has joined #ruby
[14:33:35] Lloyd: just make your own package and install it through apt
[14:33:40] Lloyd: then you don???t need to worry
[14:33:42] ljarvis: Bish: you get to decide those things as you're building it, though
[14:34:10] Bish: yeah learn how to build packages for the package manager i hate
[14:34:17] ljarvis: i.e install it into ~/ruby if you want
[14:34:19] Bish: im pretty sure i would lose my mind if i did that
[14:34:43] Bish: ljarvis: i did this with rvm, but now i want to use it with sudo, and hell breaks loose
[14:34:45] ljarvis: yeah I wouldn't recommend using apt if you don't like it, so I recommend building yourself or using a third party tool which is built to save you from these kind of scenarios
[14:35:02] ljarvis: why the heck would you use it with sudo?
[14:35:14] ljarvis: also, I strongly discourage use of rvm
[14:35:26] Bish: yeah i will never use it again, its crap
[14:35:33] Bish: sorry for language
[14:35:35] Bish: didn't think
[14:35:39] atmosx: ljarvis: rvm discourages sudo too heh
[14:35:42] ljarvis: so, to reiterate; install chruby
[14:35:48] chipotle: has joined #ruby
[14:35:49] Lloyd: I view rvm as a development tool, not for use in production
[14:35:56] Bish: aehh thing is, i wanted ruby to handle bounces from postfix
[14:36:00] ljarvis: atmosx: yeah that's not a problem I have with it :)
[14:36:10] Bish: which worked juuuuust fine, on a decent distribution
[14:36:19] atmosx: ljarvis: I'm quite with rvm but I don't wanna change the topic of the conversation :-P
[14:36:23] duckpuppy: has joined #ruby
[14:36:47] Bish: (postfix usually usese "nobody" to execute the script.. which worked fine on my machine because ruby management is much better,)
[14:37:03] ljarvis: what machine is that?
[14:37:15] ljarvis: ah, gentoo <3
[14:37:16] malconis: has joined #ruby
[14:38:00] atmosx: I wonder if anyone is using gentoo in production servers
[14:38:05] ljarvis: I did a 14 hour stage-1 install back when I was young enough to not have to work for a living
[14:38:08] Bish: i did/done htat
[14:38:17] ljarvis: anyway we're going offtopic a bit now :)
[14:38:48] bkxd: has joined #ruby
[14:39:08] thevishy: Can anyone who uses fluentd in here - please tell me if I could load normal logs? Or do I need to JSONify it?
[14:39:16] Bish: atmosx: but after a while.. i got sick of the installation routine :D, but ljarvis is right, kinda offtopic, but they have been the best servers there are i loved them like my childs
[14:39:41] Bish: .oO(i don't have children)
[14:39:48] gusTester: has joined #ruby
[14:39:55] atmosx: ljarvis: I used gentoo as my desktop OS for like 5 years
[14:40:02] krobzaur: has joined #ruby
[14:40:09] freerobby: has joined #ruby
[14:40:15] atmosx: Bish: I can imagine heh
[14:40:24] ljarvis: yeah me too, maybe longer
[14:43:02] atmosx: ljarvis: and what OS you using now as desktop?
[14:43:53] Bish: http://stackoverflow.com/a/21067059 <= now this is just crazy, why would i not use linux from scratch if i have to do this to get a not even new version of ruby to run
[14:44:02] Bish: sorry, i gonna stop now.
[14:44:40] ljarvis: atmosx: OSX
[14:45:00] hxegon: has joined #ruby
[14:45:04] sgambino: has joined #ruby
[14:45:06] atmosx: ljarvis: me too
[14:45:13] Lloyd: the brightbox ruby ppa is opinionated
[14:45:14] ibouvousaime_: has joined #ruby
[14:45:41] roshanavand: has joined #ruby
[14:46:14] whippythellama: has joined #ruby
[14:46:51] babblebre: has joined #ruby
[14:48:16] jmignault: has joined #ruby
[14:50:05] x-user: has joined #ruby
[14:50:38] haylon: has joined #ruby
[14:51:10] marcoecc: has joined #ruby
[14:51:15] nixmaniack: has joined #ruby
[14:51:18] timonv: Would advise for production usage to just compile from source
[14:52:36] weemsledeux: has joined #ruby
[14:53:20] roshanavand: has joined #ruby
[14:53:26] ellisTAA: has joined #ruby
[14:55:28] sankaber: has joined #ruby
[14:56:43] phreakocious: has joined #ruby
[14:56:47] bigkevmcd: has joined #ruby
[14:57:02] mistermocha: has joined #ruby
[14:57:32] Bish: ACTION downloads a ubuntu server iso, burns it to a dvd, and burns it in his oven
[14:59:50] houhoulis: has joined #ruby
[15:00:34] Scripore: has joined #ruby
[15:01:37] kobain: has joined #ruby
[15:03:05] TomPeed: has joined #ruby
[15:03:55] ubear: has joined #ruby
[15:04:08] tjohnson: has joined #ruby
[15:04:26] slackbotgz: has joined #ruby
[15:04:52] Bish: woop woop got ruby 2.0 running, welcome to 2013
[15:04:54] sergey_makagon: has joined #ruby
[15:05:11] aadam21: has joined #ruby
[15:06:51] aspire: has joined #ruby
[15:07:16] chouhoulis: has joined #ruby
[15:08:58] chipotle: has joined #ruby
[15:11:50] dlitvak: has joined #ruby
[15:11:55] brunto: has joined #ruby
[15:13:59] penne12: has joined #ruby
[15:14:38] sumark: has joined #ruby
[15:15:10] Frem: has joined #ruby
[15:16:41] Scripore: has joined #ruby
[15:16:49] bubbys: has joined #ruby
[15:16:57] sergey_makagon: has joined #ruby
[15:19:01] havenwood: Bish: https://www.brightbox.com/blog/2016/01/06/ruby-2-3-ubuntu-packages/
[15:19:39] lacuna: has joined #ruby
[15:19:49] nug: has joined #ruby
[15:19:51] Bish: havenwood: thank you, will maybe try it in future installations
[15:20:19] SenpaiSilver: has joined #ruby
[15:20:22] havenwood: Bish: Brightbox makes nice Ruby packages and keep them pretty up-to-date with latest stable.
[15:21:13] havenwood: Bish: Ah, it was already mentioned. I'm too late!
[15:21:37] havenwood: ruby-install --latest ruby :D
[15:22:03] roshanavand: has joined #ruby
[15:22:19] cold_zero: has joined #ruby
[15:23:05] mary5030: has joined #ruby
[15:23:49] cold_zero: Hi. I need help with OptionParser. Could someone help me, please?
[15:24:38] dlitvak_: has joined #ruby
[15:24:46] havenwood: cold_zero: Say more?
[15:25:18] karapetyan: has joined #ruby
[15:25:23] cold_zero: I try to take list of files that I want to exclude from search like this
[15:25:24] gheegh: has joined #ruby
[15:25:24] cold_zero: opts.on('-e', '--exclusion file1,file2,file3', Array, "Specify files that will be ingnored during search") do |list|
[15:25:34] ryotarai: has joined #ruby
[15:25:47] cold_zero: and I have to provide them as file1,file2,file3
[15:25:50] cold_zero: as arguments
[15:26:11] Marsupermammal: has joined #ruby
[15:26:28] cold_zero: I'd like to know is it possible to have spaces after comma or even eliminate commas entirely, but preserve spaces
[15:26:58] Bish: and how do i tell ruby to use global gems on ubuntu?
[15:26:58] kalopsian: has joined #ruby
[15:27:26] thevishy: has joined #ruby
[15:28:42] troulouliou_div2: has joined #ruby
[15:29:29] FooMunki: has joined #ruby
[15:29:42] Bish: since without environment ruby doesn't seem to know, sigh
[15:30:11] lacuna: has joined #ruby
[15:30:11] lacuna: has joined #ruby
[15:30:25] PaulCapestany: has joined #ruby
[15:30:43] havenwood: cold_zero: Slop is simpler to use (but yeah, not in stdlib): https://github.com/leejarvis/slop#arrays
[15:31:03] havenwood: Bish: How'd you install Ruby? Where'd you install it to?
[15:31:05] gheegh: hey all, i've got an activerecord object.. that i'm trying to set some values on, but it doesn't seem to let me.. here's the gist of what i'm trying to do.. https://gist.github.com/wflanagan/9de9b7160b6bfddd0ab3
[15:31:19] cold_zero: havenwood: thank you. Do you think it will help me with my case?
[15:31:31] Bish: havenwood: i just used brightbox ppa, to install it
[15:31:38] havenwood: cold_zero: I think it would, at least I'd have an easier time using slop.
[15:31:43] Bish: i installed both global gem(with root) and locally (with --user-install)
[15:31:54] cold_zero: havenwood: thank you :-)
[15:32:03] Bish: which actually works, but not if i do a "sudo" ( im not actually using sudo, postfix invokes the script as the right user )
[15:32:12] Bish: which seems in resulting ruby not to know where to find gems
[15:32:17] mrtomme: has joined #ruby
[15:33:13] emilianork: has joined #ruby
[15:33:35] Ebok: gheed: did you add the eval method to the class Agent?
[15:33:48] Ebok: Agent doesnt appear to have the eval method, so I'm just wondering
[15:33:50] havenwood: Bish: Hrm, that's odd. At least I'd have expected just switching to the Brightbox package with ruby-switch then using sudo to suffice: https://www.brightbox.com/docs/ruby/ubuntu/#switching-the-default-ruby-version
[15:34:05] havenwood: Bish: Do you have --user-local set in a gemrc or something?
[15:34:10] mistermocha: has joined #ruby
[15:34:24] havenwood: Bish: You could always use chruby to keep gem bin/ in PATH with your RUBY_ env vars set correctly!
[15:34:35] havenwood: That's pretty much all chruby does. :)
[15:34:51] havenwood: emilianork: hi
[15:35:39] Bish: havenwood: i don't have a .gemrc
[15:35:44] PaulCape_: has joined #ruby
[15:35:51] Bish: can i tell ruby to use the global gem thingie?
[15:36:09] Ebok: Er.. I mispelled his name
[15:36:16] havenwood: Bish: Did you switch to your Brightbox Ruby with ruby-switch or you only have one Ruby installed?
[15:36:39] Ebok: gheegh: I dont see the #eval method declared without your new Object Agent
[15:36:56] mary5030: has joined #ruby
[15:37:08] gheegh: I thought eval was a part of the base class in ruby ?
[15:37:47] Ebok: I've never used it, so, I suspect it's time to go find out
[15:37:50] Bish: havenwood: i only have one ruby installed
[15:38:30] dlitvak: has joined #ruby
[15:38:44] gheegh: Ebok: Maybe I need instance_eval?
[15:38:48] havenwood: Bish: Wait, I'm confused. You want non-sudo to install to a system location?
[15:39:01] havenwood: Bish: Or it's sudo that's not properly installing to the system location?
[15:39:04] baweaver: has joined #ruby
[15:39:14] havenwood: if (( UID != 0 )); then
[15:39:16] Bish: i install gems with root, and i cannot simply require them as user
[15:39:24] Bish: that's the issue i am having
[15:39:32] bkxd: has joined #ruby
[15:39:37] Bish: even though Gem.default_dir="/var/lib.."
[15:39:54] Ebok: Honestly, gheegh, I've been learning code for 2 months. I'm not entire sure ^_^. You'r right though, it is within the Object class.
[15:39:55] Bish: well, i see what the reason is
[15:40:13] futilegames: has joined #ruby
[15:40:17] platzhirsch: has left #ruby: ()
[15:40:38] thevishy: has left #ruby: ("WeeChat 1.4-rc1")
[15:40:57] Bish: fml.. rvm wrote Gem.dir
[15:41:27] ibouvousaime_: has joined #ruby
[15:42:01] havenwood: ACTION goes in search of coffee
[15:42:52] cold_zero: havenwood: one more question about "slop". Do you know is it possible to specify possible types of value provided for flags. For example for "-e" flag I can provide list of files like "file1 file2 file3" or REGEX like "*.txt"
[15:43:08] chouhoulis: has joined #ruby
[15:43:35] Bish: it's still not working jesus christ
[15:43:57] kies^: has joined #ruby
[15:44:12] hakunin: has joined #ruby
[15:44:54] aegis3121: cold_zero: the docs appear to suggest yes, sort of.
[15:45:10] aegis3121: I think if you're looking for a custom option (i.e. one that accepts both), you'd need to make...your own custom option class, as it suggests.
[15:45:17] cold_zero: aegis3121: thank you :)
[15:45:31] snowy: has joined #ruby
[15:45:49] roshanav_: has joined #ruby
[15:48:03] marcoecc: has joined #ruby
[15:48:37] Bish: havenwood: well thank you, you helped alot
[15:49:20] domgetter: has joined #ruby
[15:51:18] sankaber: has joined #ruby
[15:51:56] s00pcan: has joined #ruby
[15:52:54] catphish: has joined #ruby
[15:52:57] arup_r: has joined #ruby
[15:53:08] psye: has joined #ruby
[15:53:34] catphish: i have a really silly question, how do i send data using UDPSocket? the documentation talks about #send, but #send has a totally different meaning (it tries to call a method)
[15:53:39] gusTester: has joined #ruby
[15:53:47] snowy: has joined #ruby
[15:54:02] ellisTAA: has joined #ruby
[15:54:21] dlitvak: has joined #ruby
[15:55:13] dhollinger: has joined #ruby
[15:55:17] jgpawletko: has joined #ruby
[15:55:22] treehug88: has joined #ruby
[15:55:44] rrichardsr3: has joined #ruby
[15:56:38] karapetyan: has joined #ruby
[15:56:51] catphish: never mind, #send works
[15:56:59] Bish: >> UDPSocket.new.send "hi",0,"127.0.0.1",4000
[15:57:00] ruboto: Bish # => uninitialized constant UDPSocket (NameError) ...check link for more (https://eval.in/498178)
[15:57:20] FooMunki: has joined #ruby
[15:57:28] rrichardsr3: has joined #ruby
[15:58:20] adaedra: You have to require socket, Bish. But I don't think eval.in will let you socket like that.
[15:58:23] adaedra: By the way
[15:58:25] adaedra: >> RUBY_VERSION
[15:58:26] catphish: Bish: i did exactly that, but i ignored the uninitialized constant error, and tried to call "send" on nil, which confused me because stupidity :)
[15:58:26] ruboto: adaedra # => "2.2.0" (https://eval.in/498179)
[15:59:24] rippa: has joined #ruby
[15:59:31] Yiota: has joined #ruby
[16:01:53] marcoecc: has joined #ruby
[16:05:02] Zarthus: Should I report this segfault?
[16:05:02] Zarthus: https://ideone.com/jluEsq || https://eval.in/498185
[16:05:21] Zarthus: the assumption is 'yes', but maybe the response is 'you're doing it wrong'. In either case, I figure segfaults are never desired.
[16:08:35] Marsupermammal: has joined #ruby
[16:09:50] JazzyVariable227: has joined #ruby
[16:10:39] futilegames: has joined #ruby
[16:11:01] ellisTAA: has joined #ruby
[16:11:07] thisistesting: has joined #ruby
[16:11:09] PaulCapestany: has joined #ruby
[16:11:53] sandstrom: has joined #ruby
[16:13:28] celly: has joined #ruby
[16:13:43] Zarthus: i reported it anyways, figured it'll be closed if they consider it normal behaviour
[16:14:27] RegulationD: has joined #ruby
[16:15:23] ellisTAA: has joined #ruby
[16:15:54] jackjackdripper: has joined #ruby
[16:15:59] jobewan: has joined #ruby
[16:16:56] dlitvak: has joined #ruby
[16:17:42] weemsledeux: has joined #ruby
[16:18:00] apeiros: Zarthus: segfaults are always bugs
[16:18:11] apeiros: no pure ruby code should produce a segfault
[16:18:29] Zarthus: yeah, that was my thinking.
[16:18:32] apeiros: so reporting it was the proper course of action :)
[16:19:06] Zarthus: I figured if it wasn't expected behaviour a threadingerror would probably be thrown instead.
[16:19:30] cschneid_: has joined #ruby
[16:19:43] Zarthus: I actually came across it whilst debugging, exiting early by just printing some output xP
[16:20:03] r0bby_: has joined #ruby
[16:21:59] bensarz: has joined #ruby
[16:23:21] agentmeerkat: has joined #ruby
[16:24:03] shinnya: has joined #ruby
[16:24:34] sepp2k: has joined #ruby
[16:25:05] lucasb: has joined #ruby
[16:25:41] dlitvak: has joined #ruby
[16:26:43] mistermocha: has joined #ruby
[16:28:35] scampbell: has joined #ruby
[16:28:57] mistermocha: has joined #ruby
[16:29:09] tvw: has joined #ruby
[16:30:23] ESpiney: has joined #ruby
[16:30:45] Yiota: has joined #ruby
[16:30:47] lxsameer: has joined #ruby
[16:30:47] lxsameer: has joined #ruby
[16:33:01] Xeago: has joined #ruby
[16:35:29] FernandoBasso: has joined #ruby
[16:37:08] mjuszczak: has joined #ruby
[16:37:52] krzkrz: has joined #ruby
[16:38:41] lacuna: has joined #ruby
[16:38:42] lacuna: has joined #ruby
[16:39:36] sandstrom: has joined #ruby
[16:40:32] symm-: has joined #ruby
[16:42:13] MattV: has joined #ruby
[16:42:30] podman: has joined #ruby
[16:43:40] dlitvak: has joined #ruby
[16:44:20] krzkrz: has joined #ruby
[16:44:36] Guest32319: has joined #ruby
[16:46:23] BSaboia: has joined #ruby
[16:49:18] [Butch]: has joined #ruby
[16:50:15] fwes: has joined #ruby
[16:51:06] jbrhbr: has joined #ruby
[16:54:02] uris: has joined #ruby
[16:56:35] mary5030: has joined #ruby
[16:56:54] dlitvak: has joined #ruby
[16:57:05] nixmaniack: has joined #ruby
[16:57:06] nixmaniack: has joined #ruby
[16:57:53] ibouvousaime_: has joined #ruby
[17:02:18] luckyno7: has joined #ruby
[17:03:06] lurch_: has joined #ruby
[17:03:15] DonOtreply: has joined #ruby
[17:03:33] Macaveli: has joined #ruby
[17:06:30] celly: has joined #ruby
[17:07:44] Scripore: has joined #ruby
[17:09:09] finisherr: has joined #ruby
[17:10:21] aggiejosh06: has joined #ruby
[17:10:26] karapetyan: has joined #ruby
[17:10:33] mjuszczak: has joined #ruby
[17:11:25] pietr0: has joined #ruby
[17:11:36] dlitvak: has joined #ruby
[17:12:01] lacuna: has joined #ruby
[17:12:01] lacuna: has joined #ruby
[17:13:22] amclain: has joined #ruby
[17:13:31] yardenbar: has joined #ruby
[17:14:05] rgtk: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[17:15:21] choke: has joined #ruby
[17:17:20] TomyLobo: has joined #ruby
[17:17:26] d0nn1e: has joined #ruby
[17:18:29] azggil: has joined #ruby
[17:18:53] choke_: has joined #ruby
[17:20:35] JazzyVariable227: has joined #ruby
[17:21:04] choke__: has joined #ruby
[17:22:31] huyderman: has joined #ruby
[17:23:17] choke: has joined #ruby
[17:23:19] Xeago: has joined #ruby
[17:25:13] sameerynho: has joined #ruby
[17:25:38] dlitvak_: has joined #ruby
[17:26:36] choke_: has joined #ruby
[17:27:02] FernandoBasso: has joined #ruby
[17:28:06] ellisTAA: has joined #ruby
[17:28:58] govg: has joined #ruby
[17:28:58] choke__: has joined #ruby
[17:29:28] bluOxigen_: has joined #ruby
[17:30:06] DoubleMalt: has joined #ruby
[17:30:49] dionysus69: has joined #ruby
[17:31:03] choke: has joined #ruby
[17:31:53] CorySimmons: has joined #ruby
[17:32:47] ellisTAA: can somenoe help me understand what this is saying http://postimg.org/image/dzn0nnomd/
[17:35:00] jpfuentes2: has joined #ruby
[17:35:58] domgetter: ellistaa: they want you to add up bits in an array. but they want you to modify each one before you add it up. the modification is "the bit value (0 or 1) multiplied by -2 raised to where the bit is in the array (its index)"
[17:36:34] ascarter: has joined #ruby
[17:36:38] domgetter: so [1, 0, 1] would be 1*(-2)^(0) + 0*(-2)^(1) + 1*(-2)^(2)
[17:36:47] ellisTAA: dogmetter: but whats with the ???for i = 0 N-1??? doesn???t that mean i is always the length of the array?
[17:36:59] cschneid_: has joined #ruby
[17:37:00] domgetter: you can see that the power I'm raising -2 by is increasing for every bit
[17:37:18] domgetter: up to the length of the array minus one, yes
[17:37:53] domgetter: i in that case is whatever index we're at for that bit
[17:37:56] ellisTAA: ok i was squaring it based on the length of the array minus 1 not the index value
[17:37:56] DoubleMalt: has joined #ruby
[17:38:14] domgetter: you can see that for the second bit in my 101 example, that we raise to 1 since 1 is the second index of an array
[17:38:28] rontec76: has joined #ruby
[17:38:57] dlitvak: has joined #ruby
[17:39:17] wldcordeiro: has joined #ruby
[17:39:25] domgetter: of course, that's only half the problem. the other thing is that they want you to spit out negative numbers?
[17:39:27] troulouliou_div2: has joined #ruby
[17:39:33] celly: has joined #ruby
[17:39:33] ta: has joined #ruby
[17:39:51] baweaver: has joined #ruby
[17:40:01] rontec76: has left #ruby: ()
[17:40:21] bkxd: has joined #ruby
[17:41:25] mattrse: has joined #ruby
[17:41:26] ronplastic: has joined #ruby
[17:42:06] elektronaut: has joined #ruby
[17:43:15] bluOxigen: has joined #ruby
[17:44:13] dgarstang: has joined #ruby
[17:44:41] choke: has joined #ruby
[17:45:03] peeja: has joined #ruby
[17:45:06] dgarstang: Where can I find good examples of how to use the ruby aws sdk? Specifically I get to get cloudformation stack outputs. Theres a lot of examples for python boto3 but if you google the equivalent operatons for ruby, there's very very little except API references which makes it hard for people to start using it
[17:45:15] finisherr_: has joined #ruby
[17:45:31] azggil: seems need multiply 2
[17:45:32] lacuna: has joined #ruby
[17:45:32] lacuna: has joined #ruby
[17:47:05] dgarstang: I mean, how do I even use this? http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/CloudFormation/StackOutput.html
[17:47:25] azggil: its easy, read again
[17:47:58] kies^: has joined #ruby
[17:48:03] dgarstang: azggil: I've read it numerous times. "client = Aws::CloudFormation::StackOutput()" ... tried that, that doesn't work
[17:48:27] Macaveli: has joined #ruby
[17:48:47] shadoi: has joined #ruby
[17:49:14] sandstrom: has joined #ruby
[17:49:57] speakingcode: dgarstang: did you construct the class first?
[17:50:33] azggil: you found docs for version 1
[17:50:44] gatman: has joined #ruby
[17:50:46] azggil: is it relly what you need?
[17:50:51] dgarstang: speakingcode: No, how do I do that? Where does that doc tell me how to do that?
[17:50:58] dgarstang: azggil: I found the v2 docs
[17:51:18] speakingcode: well still looking at the v1 docs, it describes the constructor
[17:51:29] dgarstang: http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation/Types/DescribeStacksOutput.html
[17:51:35] dgarstang: ^ allegedly v2
[17:51:52] azggil: dgarstang, https://github.com/awslabs/aws-ruby-sample
[17:52:16] dgarstang: azggil: That's S3
[17:53:16] speakingcode: should be pretty similar tho
[17:54:02] speakingcode: dgarstang: http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation/Client.html#describe_stacks-instance_method
[17:54:21] dgarstang: The doc at http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation/Types/DescribeStacksOutput.html has a link to http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation/Client.html#describe_stacks-instance_method but that doesn't tell me what the client should look for.
[17:54:37] uris: has joined #ruby
[17:54:37] dgarstang: speakingcode: yes but what comes before that?
[17:54:44] speakingcode: look at the top of that doc
[17:55:17] dgarstang: speakingcode: "client = Aws::CloudFormation::Client()
[17:55:21] dgarstang: ... doesn't work
[17:55:23] speakingcode: "Clas: AWS....::Client Overview: an api client for AWS CloudFormation. To construct a cleint you need to configure a :region and :credentials" example follows
[17:55:26] dgarstang: (that's whats at the top of the doc)
[17:55:39] speakingcode: do you have much ruby experience
[17:55:46] speakingcode: you construct with .new()
[17:55:51] dgarstang: speakingcode: No. I hate it, but I gotta use it
[17:55:53] choke: I can confirm that it's pretty similar. I've got something similar that talks to S3, CodeDeploy and AppStream
[17:55:56] jackjackdripper: has joined #ruby
[17:56:12] Xeago: has joined #ruby
[17:56:31] choke: ACTION gasps... hate.. ruby?!? 
[17:56:36] speakingcode: dgarstang: not trying to be an ass, but you would probably greatly benefit from brushing up on some basic ruby chops, particularly Object Oriented stuff
[17:56:37] poguez_: has joined #ruby
[17:56:59] dgarstang: tacking a .new on the end won't help, as it reports "undefined method `Client' for Aws::CloudFormation:Module (NoMethodError)"
[17:57:01] Yiota: has joined #ruby
[17:57:01] choke: the syntax is so pretty though
[17:57:28] speakingcode: codecademy.com may be a good place to start if you like interactive practice, or the pickaxe book from dave thomas, or the ruby koans
[17:57:30] dgarstang: speakingcode: I've been doing python for 15 years. ruby makes my eyes bleed. Trust me, I've tried many many times and it just makes no sense to me
[17:57:41] apeiros: dgarstang: you're struggling for 6 months with the aws-sdk?
[17:57:57] choke: has joined #ruby
[17:57:59] azggil: 15 years Oo
[17:58:02] icarus: has joined #ruby
[17:58:08] dgarstang: apeiros: not sure where you got 6 months from, but I always struggle with the aws sdk for ruby. python is fine. there's docs and examples
[17:58:18] apeiros: http://irclog.whitequark.org/ruby/search?q=nick%3Adgarstang
[17:58:23] speakingcode: dgarstang: well i don't want to get into a language debate, i'm just saying going back to basics would probably help you because your confusion seems to stem from not understanding some basics of classes and instantiation
[17:58:35] apeiros: dgarstang: time to write a cheatsheet so you remember?
[17:58:36] speakingcode: if you look at the very top of that doc
[17:58:38] dgarstang: speakingcode: No, it's the ruby implementation of it
[17:58:46] speakingcode: cloudformation = Aws::CloudFormation::Client.new(...)
[17:59:17] dgarstang: speakingcode: Thanks.
[17:59:36] speakingcode: and it expects some config arguments, which the #initialize (http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation/Client.html#initialize-instance_method) api describes
[17:59:59] crazydiamond: has joined #ruby
[18:00:25] Axsuul: has joined #ruby
[18:00:31] kspencer: Am I able to see what page is being loaded in a way to let me give certain css via a layout.erb so that I can put them in a external file?
[18:00:32] nspeare: has joined #ruby
[18:00:38] porfa: has joined #ruby
[18:00:45] jbrhbr: has joined #ruby
[18:01:01] Kruppe: has joined #ruby
[18:01:21] minimalism: has joined #ruby
[18:01:35] framling: has joined #ruby
[18:01:44] speakingcode: what you have to understand dgarstang is initialize is a CLASS method, that returns an instance object of its class, and is called via new()
[18:02:09] dgarstang: speakingcode: sure, python does the same thing. it's the ruby syntax that grates me
[18:02:24] apeiros: speakingcode: uh, initialize is an instance method. new is a class method.
[18:02:28] dgarstang: speakingcode: in python it's foo = Object(...). In ruby it's a lot more complicated
[18:02:28] azggil: use python
[18:02:36] dgarstang: azggil: it's chef. Can't
[18:02:50] azggil: kill him and use right tool
[18:02:51] apeiros: in ruby it's foo = Object.new. truly complicated indeed.
[18:02:57] speakingcode: apeiros: err yeah, sorry got it backwards
[18:03:05] apeiros: speakingcode: happens
[18:03:11] dgarstang: apeiros: you mean Aws::CloudFormation::Client.new()
[18:03:23] karapetyan: has joined #ruby
[18:03:31] speakingcode: dgarstang: yes.
[18:03:31] baweaver: has joined #ruby
[18:03:35] DoubleMalt: has joined #ruby
[18:03:38] apeiros: dgarstang: possibly. I haven't looked at AWS' API
[18:03:38] speakingcode: the () are optional
[18:03:42] dgarstang: Don't suppose anyone knows the way to get cfn stack outputs via the sdk
[18:04:18] speakingcode: for aws sdk specific questions you might try the chef or aws channels as well
[18:04:37] dgarstang: it's not clear (no examples) if I can just call a method on the Cfn object or if I have to dig down several object levels, which means trying to interpret that API doc
[18:04:58] speakingcode: whats the Cfn object?
[18:05:13] nspeare: has left #ruby: ()
[18:05:21] dgarstang: speakingcode: cloudformation
[18:05:37] nspeare: has joined #ruby
[18:05:47] speakingcode: i don't see a cloud formation object in here
[18:05:57] dgarstang: http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation.html
[18:06:14] speakingcode: that's a module
[18:06:16] azggil: interesting task
[18:06:25] speakingcode: it's like a package/namespace so to speak
[18:06:33] speakingcode: i forget what the python equiv is
[18:06:39] ascarter: has joined #ruby
[18:06:42] azggil: about (-2)^n+(-2)^(n-1)...
[18:07:05] choke: by "stack outputs" what exactly do you mean
[18:07:07] inukshuk_: has joined #ruby
[18:07:08] dgarstang: well I got some sort of an object because I'm pretty sure I haven't assigned a module reference to a variable here
[18:07:17] icarus: has joined #ruby
[18:07:24] apeiros: azggil: if that's your ruby code for the base -2 problem, note that ^ is XOR, not power. ** is power.
[18:07:25] dgarstang: choke: CloudFormation stacks have well defined outputs
[18:07:31] scottschecter: has joined #ruby
[18:07:33] duckpuppy: has joined #ruby
[18:07:45] lacuna: has joined #ruby
[18:07:45] lacuna: has joined #ruby
[18:08:00] azggil: seems possibly shorten to (x^2n+x^2n-2...)-(x^2n-1-x^2n-3...)
[18:08:02] stannard_: has joined #ruby
[18:08:07] pdoherty: has joined #ruby
[18:08:12] dgarstang: so it looks like the CloudFormation 'module' has a Stack class... which has an outputs attribute.... but how to get it...
[18:08:35] choke: and these outputs are what exactly? I don't use CloudFormation so I don't know... Looking @ the API docs however... you've got methods such as list_stacks, describe_stack_*
[18:08:39] speakingcode: so dgarstang back to the 'Client' class doc
[18:08:48] speakingcode: at the top it shows you how to construct a client object
[18:09:11] dgarstang: speakingcode: How do I get a Stack object from that?
[18:09:30] choke: http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation/Stack.html
[18:09:41] choke: look @ instance attribute summary -- and click on what you want to know
[18:09:44] dgarstang: choke: yes I'm there, but that doesn't help me
[18:09:48] speakingcode: http://docs.aws.amazon.com/sdkforruby/api/Aws/CloudFormation/Client.html#describe_stacks-instance_method
[18:10:13] dgarstang: speakingcode: I don't want to call describe stacks do I? i just want to get outputs for a particular stack
[18:10:41] dgarstang: time to go update IAM. Ugh
[18:10:53] speakingcode: there's a list_stacks method also, but i don't have AWS experience so i don't know the semantic meaning of that stuff
[18:10:55] aegis3121: has joined #ruby
[18:11:16] dgarstang: speakingcode: I think I'm good now, thanks.... until the next ruby eye bleed inducement
[18:11:32] lacuna: has joined #ruby
[18:11:33] lacuna: has joined #ruby
[18:11:50] sonOfRa: has joined #ruby
[18:12:00] speakingcode: sonOfRa: cool name
[18:12:16] lurch_: has joined #ruby
[18:13:17] speakingcode: dgarstang: it looks like describe_stacks() returns a DescribeStacksOutput object, which has a method stacks() that returns an array of Stack objects
[18:14:01] anisha_: has joined #ruby
[18:14:30] choke: list_stacks does essentially the same thing, but can be told to only achieve ones with a specific stack_status
[18:15:58] porfa: has joined #ruby
[18:16:07] choke: But, time for me to head in to the office.. so see you all later
[18:16:59] jamw: has joined #ruby
[18:21:08] nspeare: has joined #ruby
[18:21:40] baweaver: has joined #ruby
[18:21:43] ht__: has joined #ruby
[18:21:44] nertzy: has joined #ruby
[18:22:28] benlieb: has joined #ruby
[18:22:37] guacamole: has joined #ruby
[18:23:27] webus: has joined #ruby
[18:23:36] wolffles: has joined #ruby
[18:23:49] Zackio: has joined #ruby
[18:24:04] PsionTheory: has joined #ruby
[18:24:50] lacuna_: has joined #ruby
[18:25:27] geekbri: has joined #ruby
[18:25:37] wolffles: method to add an array of fix numbers?
[18:26:38] wolffles: array = %w[1 8 27]
[18:27:16] aegis3121: What do you mean by "add an array of fix numbers"?
[18:27:42] wolffles: sum of the integers
[18:27:44] JazzyVariable227: has joined #ruby
[18:27:53] wolffles: sorry i worded it wrong
[18:27:59] aegis3121: Have you checked if a method on Array or Enumerable would work?
[18:28:45] aegis3121: #reduce would be what you want, I imagine
[18:28:56] wolffles: the methods i know all return arrays
[18:29:27] aegis3121: did you check Reduce?
[18:29:28] wolffles: i mean i can do it logically but just wondering if theres a method to simplify it
[18:29:34] wald0: has joined #ruby
[18:29:54] wolffles: never seen Reduce
[18:30:05] aegis3121: http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-reduce
[18:30:07] aegis3121: docs are beautiful
[18:30:10] dlitvak: has joined #ruby
[18:30:46] brunto: has joined #ruby
[18:31:13] wolffles: ahh aegis3121: that was exactly what i was looking for
[18:32:20] blackmesa: has joined #ruby
[18:32:52] SCHAAP137: has joined #ruby
[18:33:07] sigurding: has joined #ruby
[18:33:11] azggil: smart coder
[18:33:17] mistermo_: has joined #ruby
[18:33:30] azggil: he could understand doc
[18:33:51] wolffles: i was searching docs
[18:33:57] RegulationD: has joined #ruby
[18:34:00] wolffles: but looking under arrays
[18:34:13] nspeare: has joined #ruby
[18:35:04] baweaver: but still, no need to be mean
[18:35:53] eam: it'd be a fantastic feature for class docs to also show inherited methods
[18:36:07] eam: or I should rather say it's a misfeature that they don't
[18:36:09] aegis3121: wolffles: no problem
[18:36:24] B1n4r10: has joined #ruby
[18:36:52] aegis3121: Enumerable is (at least to help me think about it) the definition of Ruby's idea of a collection. Any collection I would hope includes it, and I would probably assume it does.
[18:37:01] bricker: has joined #ruby
[18:37:16] roshanavand: has joined #ruby
[18:37:52] sandstrom: has joined #ruby
[18:38:10] eam: it's a broad problem, not specifically related to enumerable
[18:38:37] eam: people want to operate on an object and there's no good place to find all methods associated with it
[18:39:18] aegis3121: I know that ruby-doc.org tells you which Modules have been included.
[18:39:47] stamina: has joined #ruby
[18:39:48] azggil: inject and reduce are synonims?
[18:39:57] dlitvak_: has joined #ruby
[18:40:21] aegis3121: As are collect and map, I think.
[18:40:22] Kruppe: has joined #ruby
[18:40:37] friendofkiwi: has joined #ruby
[18:41:04] friendofkiwi: has left #ruby: ()
[18:41:25] wolffles: never knew that
[18:42:24] techietrash: has joined #ruby
[18:43:03] Xeago: has joined #ruby
[18:43:43] azggil: creaters didnot read docs
[18:43:47] azggil: carefully
[18:44:06] celly: has joined #ruby
[18:45:24] colegatron: has joined #ruby
[18:45:43] JazzyVariable227: has joined #ruby
[18:46:15] azggil: damn niggers
[18:46:54] apeiros: !kick azggil language
[18:46:57] ruboto: ruboto kicked azggil:
[18:46:57] ruboto: -o ruboto
[18:47:31] ht__: has joined #ruby
[18:47:44] RegulationD: has joined #ruby
[18:47:46] wprice: has joined #ruby
[18:47:59] azggil: has joined #ruby
[18:48:32] eam: what's the best way to inspect the build parameters of a ruby binary?
[18:48:44] apeiros: eam: RbConfig probably
[18:48:52] apeiros: not sure, though
[18:49:12] drbrain: everything you should need (for linking to ruby after install) is in RbConfig
[18:50:20] eam: I want to see if -DHAVE_SENDFILE=0 was set
[18:50:57] cdg: has joined #ruby
[18:52:15] zeroDivisible: has joined #ruby
[18:52:22] techietrash: has joined #ruby
[18:52:22] techietrash: has joined #ruby
[18:52:37] eam: aha success RbConfig::CONFIG.values.grep /SEND/ thanks much
[18:53:06] guacamole: has joined #ruby
[18:53:13] paultreny: has joined #ruby
[18:53:43] eam: it appears that ruby still calls sendfile() even with that disabled
[18:54:05] eam: it only disables some paths to that syscall, but not all
[18:54:26] araujo: has joined #ruby
[18:54:27] araujo: has joined #ruby
[18:54:55] davedev24: has joined #ruby
[18:55:19] jbrhbr: has joined #ruby
[18:55:40] dfockler: has joined #ruby
[18:56:01] choke: has joined #ruby
[18:56:50] ur5us: has joined #ruby
[19:02:07] firstdayonthejob: has joined #ruby
[19:02:38] Marsupermammal: has joined #ruby
[19:02:48] mistermocha: has joined #ruby
[19:03:51] nertzy: has joined #ruby
[19:03:53] startupality: has joined #ruby
[19:04:05] HowardwLo: has joined #ruby
[19:04:24] isjaylee: has joined #ruby
[19:05:04] porfa: has joined #ruby
[19:05:18] haraigoshi: has joined #ruby
[19:05:25] finisherr_: has joined #ruby
[19:05:51] hxegon: is there a way to force something into bool other than double negation (!!)?
[19:05:57] azggil: what is better to be a super pro in one technology or exploring different tech areas but without depp knowledges
[19:06:46] hxegon: azggil well, it depends. Personally I'd say be a generalist, but being a specialist pays more IMO
[19:07:22] azggil: so generalist is cooler
[19:07:48] spider-mario: has joined #ruby
[19:07:48] bb010g: has joined #ruby
[19:07:59] hxegon: again, it depends on your personal goals.
[19:08:04] paultreny: has joined #ruby
[19:08:34] techietrash: has joined #ruby
[19:08:34] techietrash: has joined #ruby
[19:09:38] eam: any sufficiently advanced specialist becomes an adept generalist as well
[19:09:52] eam: due to domain overlap
[19:10:18] wolffles: when yall were learning ruby did you make flash cards of the methods? is that something i should do or just keep doing problems
[19:10:22] azggil: i dont agree
[19:10:44] choke: has joined #ruby
[19:10:54] Guest36836: has joined #ruby
[19:11:07] hxegon: azggil in what way?
[19:11:17] azggil: you need time to investigate different things
[19:11:31] aegis3121: wolffles: I would say just keep going. You'll pick up on more and get more comfortable navigating the docs, too :)
[19:11:34] azggil: but if u advanced how you learn others
[19:11:39] apeiros: oh hey hxegon
[19:11:46] apeiros: sorry, hadn't seen your email promptly
[19:11:49] hxegon: wolffles do you really need to memorize them? I just look up methods until I remember the more useful ones
[19:12:00] hxegon: apeiros it's all good. Not like it's a pressing matter :P
[19:12:39] wolffles: i would assume you guys memorized them but i guess its through experience like aegis3121 said
[19:12:43] aegis3121: hxegon agreed. You remember the more important, critical ones. You also start to get a new sense of "Hmm, this feels like a solved problem. I bet Ruby already does this for me." and you get good at guessing that it's out there.
[19:13:06] wolffles: lol guess you said it too hxegon
[19:13:29] apeiros: wolffles: I read through ruby core docs once
[19:13:37] apeiros: and then a couple of lookups later
[19:13:40] yashinbasement: has joined #ruby
[19:13:42] apeiros: that helped a lot
[19:14:05] eam: I learned perl, and then I just assume that the perl functions exist attached to the similar ruby types (which is usually true)
[19:14:07] apeiros: and I think by now I should probably repeat it. enough new methods I simply haven't paid attention to :)
[19:14:13] karapetyan: has joined #ruby
[19:14:16] Xeago: has joined #ruby
[19:16:01] baweaver: has joined #ruby
[19:17:30] celly: has joined #ruby
[19:17:34] isjaylee: has left #ruby: ()
[19:17:55] northfurr: has joined #ruby
[19:18:15] sepp2k: has joined #ruby
[19:19:35] ht__: has joined #ruby
[19:21:55] azggil: simply use in location bar "g i want sort/reduce/find something stuff"
[19:22:15] baweaver: has joined #ruby
[19:24:21] blackmesa: has joined #ruby
[19:27:35] jobewan: has joined #ruby
[19:29:08] futilegames: has joined #ruby
[19:29:31] ascarter: has joined #ruby
[19:29:34] tuzz: has joined #ruby
[19:29:39] tuzz: has left #ruby: ()
[19:29:40] brunto_: has joined #ruby
[19:31:04] greenhat: Review the docs for Enumerable, Array, and Hash and you are well on your way.
[19:32:04] choke_: has joined #ruby
[19:33:28] sgambino_: has joined #ruby
[19:33:30] charliesome: has joined #ruby
[19:33:39] JDiPierro: has joined #ruby
[19:33:45] valkyrka: has joined #ruby
[19:35:46] lacuna_: has left #ruby: ()
[19:35:59] choke: has joined #ruby
[19:36:01] agentmeerkat: has joined #ruby
[19:36:07] paultreny_: has joined #ruby
[19:36:16] lacuna: has joined #ruby
[19:36:16] lacuna: has joined #ruby
[19:37:02] dlitvak: has joined #ruby
[19:37:23] konr: has joined #ruby
[19:38:19] arup_r: has joined #ruby
[19:38:33] Ox0dea: has joined #ruby
[19:40:39] baweaver: has joined #ruby
[19:41:03] bkxd: has joined #ruby
[19:41:25] bigkevmcd: has joined #ruby
[19:41:59] choke: has joined #ruby
[19:42:27] yashinbasement: has joined #ruby
[19:42:38] bithon: has joined #ruby
[19:44:26] Xeago: has joined #ruby
[19:45:19] choke: has joined #ruby
[19:46:09] DEA7TH: has joined #ruby
[19:46:30] JazzyVariable227: has joined #ruby
[19:47:54] karapetyan: has joined #ruby
[19:48:57] sigurding: has joined #ruby
[19:49:41] eam: scratch that re USE_SENDFILE, turns out HAVE_SENDFILE is the relevant flag, sigh
[19:50:00] guacamole: has joined #ruby
[19:50:37] stamina: has joined #ruby
[19:51:37] mary5030: has joined #ruby
[19:51:47] dangerousdave: has joined #ruby
[19:52:17] craysiii: has joined #ruby
[19:52:18] choke: has joined #ruby
[19:52:19] RegulationD: has joined #ruby
[19:52:39] hobodave: has joined #ruby
[19:53:27] Dimik: has joined #ruby
[19:55:31] ht__: has joined #ruby
[19:56:49] kirun: has joined #ruby
[19:57:32] ht__: has joined #ruby
[19:59:16] kadoppe: has joined #ruby
[20:01:34] ht__: has joined #ruby
[20:02:05] FernandoBasso: has joined #ruby
[20:02:10] jbrhbr: has joined #ruby
[20:02:49] choke: has joined #ruby
[20:02:51] spastorino: has joined #ruby
[20:02:58] snowy: has joined #ruby
[20:03:18] mistermocha: has joined #ruby
[20:04:00] KnownSyntax: has joined #ruby
[20:04:03] KnownSyntax: has joined #ruby
[20:06:21] paultreny_: has joined #ruby
[20:06:37] karapetyan: has joined #ruby
[20:09:12] juddey: has joined #ruby
[20:10:05] vroomvroomvroom: has joined #ruby
[20:10:12] vroomvroomvroom: who knows mac and linux?
[20:10:52] havenwood: vroomvroomvroom: Is this a riddle?
[20:12:58] vroomvroomvroom: no i just want to know what the open (osx) command is in ubuntu
[20:13:17] ellisTAA: has joined #ruby
[20:13:33] ht__: has joined #ruby
[20:14:05] Ox0dea: vroomvroomvroom: xdg-open
[20:14:23] vroomvroomvroom: can we change it to just open?
[20:14:24] dlitvak: has joined #ruby
[20:14:24] nspeare: has left #ruby: ("WeeChat 0.3.8")
[20:14:30] Ox0dea: That is forbidden.
[20:16:21] wolffles: has joined #ruby
[20:17:07] baweaver: has joined #ruby
[20:17:22] bmurt: has joined #ruby
[20:17:26] shadoi: has joined #ruby
[20:17:40] centrx: has joined #ruby
[20:17:44] jamw: has joined #ruby
[20:17:52] Phage: has joined #ruby
[20:18:17] Phage: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[20:19:35] choke: has joined #ruby
[20:20:01] pawnbox: has joined #ruby
[20:20:09] xet7: has joined #ruby
[20:20:51] aegis3121: has joined #ruby
[20:21:32] webus_: has joined #ruby
[20:21:37] jackjackdripper: has joined #ruby
[20:24:38] highsen: has joined #ruby
[20:25:20] jackjackdripper: has joined #ruby
[20:25:47] barajasfab: has joined #ruby
[20:25:52] yorickpeterse: vroomvroomvroom: alias open='xdg-open'
[20:26:56] vroomvroomvroom: thank you yorickpeterse
[20:28:00] aibot: has joined #ruby
[20:28:40] choke: has joined #ruby
[20:28:57] Majora_: has joined #ruby
[20:29:12] Majora_: Good morning beautiful people<33
[20:29:38] ht__: has joined #ruby
[20:29:56] Majora_: azgil: sup girl??<3
[20:30:37] azgil: who is sup
[20:30:46] Majora_: sup = whats up
[20:31:31] Majora_: ACTION waves to blub
[20:31:48] JazzyVariable227: has joined #ruby
[20:32:14] postmodern: has joined #ruby
[20:32:44] azgil: 1???2 baby
[20:33:12] Ox0dea: That 2's about to lose its knee.
[20:33:21] Ox0dea: Fun fact: the crocodile in Peter Pan is a grill.
[20:33:29] Majora_: Ox0dea: Mylove<33
[20:33:32] ht__: has joined #ruby
[20:34:30] Majora_: Ox0dea: Fun fact: My real name is actually Peter xP
[20:34:35] Xeago: has joined #ruby
[20:34:50] azgil: #fuckedtecheylover haha
[20:36:24] momomomomo: has joined #ruby
[20:37:02] bithon: has joined #ruby
[20:37:21] lucasb: has joined #ruby
[20:37:57] davedev24: has joined #ruby
[20:37:58] azgil: cool , what still do u know
[20:38:01] camilasan: has joined #ruby
[20:38:04] mustmodify: has joined #ruby
[20:38:19] mustmodify: just ran across this code when looking to convert a javascript thing to ruby.
[20:38:20] mustmodify: https://gist.github.com/mustmodify/d5b337c790e0934cf08d
[20:38:20] azgil: what else
[20:38:34] guacamole: has joined #ruby
[20:39:50] Ox0dea: mustmodify: And how did you translate it? :)
[20:39:55] shevy: mustmodify pretty ugly
[20:40:27] shevy: do they not use true and false in javascript so that they must use 'y' or 'n'?
[20:40:34] mustmodify: Ox0dea: I thought, Hm... let me see if I can void that entirely. :)
[20:41:15] mustmodify: If nothing else, I think if I have code that returns "valid" where valid is the character "n", someone could fairly say I was off track.
[20:41:31] ht__: has joined #ruby
[20:41:37] mjuszczak: has joined #ruby
[20:41:44] mustmodify: of course they mean is_valid but whatever.
[20:42:07] Ox0dea: mustmodify: valid = c.all? { |n| n == n }
[20:42:13] mjuszczak: has joined #ruby
[20:42:17] Ox0dea: NaN, by definition, doesn't even equal itself.
[20:42:31] lucasb: oh, ruby doesn't have NaN (?)
[20:42:36] Ox0dea: >> Float::NAN
[20:42:37] ruboto: Ox0dea # => NaN (https://eval.in/498289)
[20:42:39] mustmodify: Ox0dea: while cool, that would be too magical for me.
[20:42:42] Ox0dea: mustmodify: ?
[20:42:46] Ox0dea: This is #ruby.
[20:42:50] centrx: I AM NOT A NUMBER. I AM A FREE MAN!
[20:43:11] lucasb: ah, must use the fully qualified name :) thanks Ox0dea
[20:43:20] centrx: https://www.youtube.com/watch?v=nW-bFGzNMXw
[20:43:34] ht__: has joined #ruby
[20:43:52] Ox0dea: lucasb: Sure thing.
[20:44:04] Ox0dea: You could always `include Float`, I suppose, but that's crazy.
[20:44:14] mustmodify: Yeah, I'm replacing that with Color#valid? which tests red, green and blue attributes to see if they are in range.
[20:45:09] Ox0dea: mustmodify: In that case, you can just return `rgb.all? { |c| 0..255 === c }`.
[20:45:22] bestbrents_: has joined #ruby
[20:45:24] JazzyVariable227: has joined #ruby
[20:45:28] choke: has joined #ruby
[20:45:30] uris: has joined #ruby
[20:45:33] lacuna: has joined #ruby
[20:45:57] guacamole: has joined #ruby
[20:47:12] peeja: has joined #ruby
[20:47:22] jfo: has joined #ruby
[20:48:11] azgil: time to dance and drink
[20:48:29] mustmodify: VALID_RGB_VALUES = (0..255); rgb.all?{|color| VALID_RGB_VALUES.include?( c ) }
[20:48:30] azgil: right now an Orthodox xmas
[20:48:42] mustmodify: extra code but more readable, IMO
[20:49:31] lacuna: has joined #ruby
[20:49:31] lacuna: has joined #ruby
[20:50:30] Hammy_Work: has joined #ruby
[20:51:16] dpg1: has joined #ruby
[20:51:20] Ox0dea: >> (0..255).include? 3.14 # mustmodify: Uh-oh.
[20:51:21] ruboto: Ox0dea # => true (https://eval.in/498290)
[20:51:40] dpg1: I'm trying to write a ruby gem, what's a good tut on gems + oo ruby ?
[20:51:51] mustmodify: Well, they're all guaranteed to be integers, otherwise that would be a good point.
[20:52:09] dpg1: Keep getting "playa_device_client.rb:5:in `initialize': uninitialized constant PlayaDeviceClient::Boot (NameError)" and I don't know how to fix it. :D
[20:52:13] azgil: did you see coll dance from russian neurocoders https://www.youtube.com/watch?v=9YpKeUIEKDk
[20:52:33] Ox0dea: dpg_: This was a pretty good Tut: https://en.wikipedia.org/wiki/Tutankhamun
[20:53:30] dpg1: the funny thing is I copied/pasted that url without reading it. mfw.
[20:54:09] Ox0dea: dpg_: Most people click links?
[20:54:43] Ox0dea: /script install urlgrab.py
[20:55:00] Ox0dea: /alias add u /url
[20:55:09] Ox0dea: And then `/u 1` to open the most recent link in your browser.
[20:55:16] Ox0dea: Computers love you and want to help.
[20:56:11] mjuszczak: has joined #ruby
[20:56:12] shevy: a python script!
[20:56:14] MercutioX: has joined #ruby
[20:56:14] mistermocha: has joined #ruby
[20:56:32] davedev24: has joined #ruby
[20:56:45] Ox0dea: Hello, MercutioX.
[20:56:48] robbyoconnor: has joined #ruby
[20:56:48] Ox0dea: Nice comma. <3
[20:57:15] guacamole: has joined #ruby
[20:57:34] choke: has joined #ruby
[20:57:37] davedev24: has joined #ruby
[20:59:09] mjuszczak: has joined #ruby
[20:59:55] dpg1: Ox0dea: eh, I'm in a terminal. I can't click here.
[21:02:01] whippythellama: has joined #ruby
[21:03:07] blackgoat: has joined #ruby
[21:03:28] mjuszczak: has joined #ruby
[21:05:16] adaedra: Modern terms allow to clicks links nowadays.
[21:05:36] jmignault: has joined #ruby
[21:05:37] tAn: has joined #ruby
[21:05:50] mary5030: has joined #ruby
[21:06:32] mrgrieves: has joined #ruby
[21:07:12] Ox0dea: Where "modern" means post-1995 or so.
[21:07:32] ta: has joined #ruby
[21:08:04] gambl0re: has joined #ruby
[21:08:28] mrgrieves: hi, how can I split a string where I have "more" than a single space?
[21:08:42] ljarvis: mrgrieves: split takes 2 params
[21:08:55] Ox0dea: mrgrieves: How do you mean?
[21:09:04] ljarvis: yeah, that's a better question
[21:09:12] ljarvis: anyway, probably \s{2,}
[21:09:16] choke: has joined #ruby
[21:09:23] Ox0dea: >> "foo \s\t\n bar \s\t\n baz".split # mrgrieves
[21:09:24] ruboto: Ox0dea # => ["foo", "bar", "baz"] (https://eval.in/498301)
[21:09:35] karapetyan: has joined #ruby
[21:09:42] ljarvis: ACTION read as "only more than 1 single space"
[21:09:44] Ox0dea: #split without an argument splits on runs of whitespace.
[21:10:06] mrgrieves: i.e. "something like this should be splitted" => ['something like', 'this should', 'be splitted']
[21:10:38] ljarvis: >> "something like this should be splitted".split /\s{2,}/
[21:10:39] ruboto: ljarvis # => ["something like", "this should", "be splitted"] (https://eval.in/498302)
[21:10:46] karapetyan: has joined #ruby
[21:11:12] mrgrieves: ljarvis: cheers!
[21:11:14] ljarvis: and yes you can write that regexp a million different ways
[21:11:26] ljarvis: before someone inevitably "fixes" it
[21:11:33] Ox0dea: Well, I was gonna golf it.
[21:11:57] Ox0dea: Looks scary, though.
[21:12:10] mrgrieves: thanks guys
[21:12:11] ljarvis: yeah i had that to start with, made me feel uncomfortable
[21:13:36] nixmaniack: has joined #ruby
[21:13:59] kappy: has joined #ruby
[21:14:41] Xeago: has joined #ruby
[21:15:55] kappy: has joined #ruby
[21:16:27] chadhs: has joined #ruby
[21:16:31] choke: has joined #ruby
[21:17:44] spooq: has joined #ruby
[21:19:39] uris: has joined #ruby
[21:20:59] celly: has joined #ruby
[21:21:01] mustmodify: has left #ruby: ()
[21:22:17] choke: has joined #ruby
[21:23:27] baweaver: has joined #ruby
[21:23:48] shadoi: has joined #ruby
[21:23:57] djbkd: has joined #ruby
[21:24:20] symm-: has joined #ruby
[21:24:35] snowy: has joined #ruby
[21:24:52] rrichardsr3: has joined #ruby
[21:26:14] TrueDD: has joined #ruby
[21:26:30] chussenot: has joined #ruby
[21:26:47] yorickpeterse: we're doing regex golf?
[21:26:55] yorickpeterse: clearly what you need here is a state machine
[21:27:03] yorickpeterse: directly in your ActiveRecord model
[21:27:04] cmolenda: has joined #ruby
[21:27:52] tenderlove: has joined #ruby
[21:28:15] momomomomo: has joined #ruby
[21:29:04] Marsupermammal: has joined #ruby
[21:29:09] yorickpeterse: Hey that shit's legit
[21:29:20] yorickpeterse: ask any Java dev
[21:29:26] adaedra: Nothing is complete without XML.
[21:30:05] tenseiten: has joined #ruby
[21:30:43] rrichardsr3: has joined #ruby
[21:32:03] choke: has joined #ruby
[21:32:21] rrichardsr3: has joined #ruby
[21:32:25] JazzyVariable227: has joined #ruby
[21:34:01] bkxd: has joined #ruby
[21:35:11] shevy: ant files for the win
[21:38:07] snockerton: has joined #ruby
[21:39:52] neanderslob: has joined #ruby
[21:40:03] akem: has joined #ruby
[21:41:02] yfeldblum: has joined #ruby
[21:41:27] lemur: has joined #ruby
[21:42:12] Marsupermammal: has joined #ruby
[21:42:12] bkxd: has joined #ruby
[21:44:44] Ox0dea: yorickpeterse: Regular expressions *are* state machines.
[21:46:24] yorickpeterse: I'm aware of that
[21:46:56] blackmesa: has joined #ruby
[21:47:17] Scoopfinder: has joined #ruby
[21:48:50] yqt: has joined #ruby
[21:50:20] aadam21: has joined #ruby
[21:50:39] gregf: has joined #ruby
[21:51:20] ur5us: has joined #ruby
[21:52:11] choke: has joined #ruby
[21:52:57] davedev24: has joined #ruby
[21:53:43] jbrhbr: has joined #ruby
[21:54:19] Hanmac: has joined #ruby
[21:56:13] momomomomo: has joined #ruby
[22:02:16] bestbrents__: has joined #ruby
[22:02:41] bmurt_: has joined #ruby
[22:02:47] blub`: has joined #ruby
[22:02:47] dravine_: has joined #ruby
[22:03:02] infinitone_: has joined #ruby
[22:03:15] renderful: has joined #ruby
[22:03:26] mistermocha: has joined #ruby
[22:03:32] diprotic: has joined #ruby
[22:03:33] diprotic: has joined #ruby
[22:03:33] zenspider_: has joined #ruby
[22:03:45] fqulvqknpnwwaygt: has joined #ruby
[22:03:48] blackgoat_: has joined #ruby
[22:04:01] Rutix`away: has joined #ruby
[22:04:01] Rutix`away: has joined #ruby
[22:04:06] davedev24: has joined #ruby
[22:04:06] peeja_: has joined #ruby
[22:04:22] MiracleBlue__: has joined #ruby
[22:04:30] whippythellama: has joined #ruby
[22:04:33] angiebadillo_: has joined #ruby
[22:04:41] mistermocha: has joined #ruby
[22:04:42] jpinnix_______: has joined #ruby
[22:04:45] mroth_: has joined #ruby
[22:04:47] valeri_ufo: has joined #ruby
[22:04:48] cstrahan_: has joined #ruby
[22:05:05] Coraline: has joined #ruby
[22:05:08] sjums: has joined #ruby
[22:05:33] Amnez777: has joined #ruby
[22:05:44] tinnvec: has joined #ruby
[22:05:47] jmccartie: has joined #ruby
[22:05:48] atumzin: has joined #ruby
[22:05:49] atumzin: has joined #ruby
[22:05:55] marr: has joined #ruby
[22:06:01] Amnez777: has joined #ruby
[22:06:30] ytti: has joined #ruby
[22:06:34] agentmeerkat: has joined #ruby
[22:06:40] Amnez777: has joined #ruby
[22:07:12] Amnez777: has joined #ruby
[22:07:17] gatman: has joined #ruby
[22:07:57] podman: has joined #ruby
[22:08:26] d0nn1e: has joined #ruby
[22:09:13] stuartb: has joined #ruby
[22:09:38] smactive: has joined #ruby
[22:09:52] AckZ: has joined #ruby
[22:09:55] DarkBushido: has joined #ruby
[22:09:56] bmurt: has joined #ruby
[22:10:24] ElderFain: has joined #ruby
[22:10:26] BackEndCoder: has joined #ruby
[22:10:27] jsrn: has joined #ruby
[22:10:46] mahk: has joined #ruby
[22:10:48] minimalism: has joined #ruby
[22:10:49] ellisTAA: has joined #ruby
[22:10:53] choke: has joined #ruby
[22:10:57] ellisTAA: i need to write an algorithm that takes an input and an expected output, like this 314159265358 = 27182 , and somehow makes combinations to the input using +,-,*,/ to get the output e.g. 3 + 1 - 415 * 92 + 65358 = 27182. looks like i have to try every combination but i???m not sure how to do that
[22:11:06] Scripore: has joined #ruby
[22:11:16] centrx: You want to redefine pi?
[22:11:19] stannard: has joined #ruby
[22:11:40] ellisTAA: centrx i guess its for a coding challenge
[22:12:27] catbusters: has joined #ruby
[22:14:39] ur5us: has joined #ruby
[22:17:22] Scoopfinder: Hey, the question has already been asked here, but I was wondering if you could explain to me this snippet again (the comments might be wrong) : https://gist.github.com/RBdevelop/1059b866ce066e308d4b
[22:17:27] sergey_makagon: has joined #ruby
[22:17:58] Scoopfinder: The question has also been asked here, but the anwser was slightly different from what is written on the snippet (http://logs.ryanbigg.com/p/ruby-lang260)
[22:18:31] jamw: has joined #ruby
[22:18:33] Coldblackice: has joined #ruby
[22:19:52] cschneid_: has joined #ruby
[22:20:11] skarn: has joined #ruby
[22:20:32] centrx: Scoopfinder, Looks like it just converts all the keys to symbols, kind of like Rails/ActiveSupport's Hash#deep_symbolize_keys
[22:20:42] KingAbdullah: has joined #ruby
[22:21:05] porfa: has joined #ruby
[22:22:08] Scoopfinder: centrx, Ox0de' said the same several months ago ^^ But the explanations in comment on the gist got me a bit confused
[22:22:45] apeiros: ACTION actually said the same thing
[22:22:51] mistermocha: has joined #ruby
[22:23:09] Scoopfinder: oh apeiros, I did not see it ^^'
[22:23:11] ellisTAA: does anyone know the equation to figure out how many combinations can be made with a ten digit number and 4 operators?
[22:23:22] apeiros: actually said it even before Ox0dea???
[22:23:25] rrichardsr3: has joined #ruby
[22:23:33] apeiros: the comments are your own?
[22:23:45] snowy: has joined #ruby
[22:23:55] Scoopfinder: apeiros, nope nope I just found it while googling the function
[22:24:00] Ox0dea: apeiros: Hm?
[22:24:03] KingAbdullah: Beginner here, I want to make a program that asks a user for some input (Title and input body) and than saves it in some sort of file/database or even directly to the code. What am I looking for?
[22:24:21] adaedra: KingAbdullah: from a console?
[22:24:35] Ox0dea: apeiros: Disregard. I didn't notice the previous mention.
[22:24:40] adaedra: &ri gets KingAbdullah
[22:24:40] `derpy: KingAbdullah: http://ruby-doc.org/stdlib-2.2.4/libdoc/csv/rdoc/CSV.html#method-i-gets
[22:24:41] apeiros: KingAbdullah: Kernel#print, #puts, #gets (potentially $stdin.gets, though), File.write
[22:24:56] adaedra: Mh, ignore `derpy, got the wrong method.
[22:25:12] apeiros: adaedra: I thought you core > stdlibbed?
[22:25:15] Ox0dea: I think KingAbdullah is looking for something like {,G,S,Y}DBM.
[22:25:41] Snowy_: has joined #ruby
[22:25:44] djbkd: has joined #ruby
[22:25:44] apeiros: KingAbdullah: I'd go trying to save to a db only once you managed to save to a file$
[22:25:45] adaedra: apeiros: `ri gets` returns CSV's gets before core's one apparently ??\_(???)_/??
[22:25:55] rrichard_: has joined #ruby
[22:25:57] apeiros: shame on the ri then!
[22:26:13] adaedra: I have to look at how I can fix that, because it looks fixable.
[22:26:26] adaedra: hop, to the to-do list.
[22:26:29] snowy: has joined #ruby
[22:26:33] KingAbdullah: Apeiros I know how to save to file but I want to be able to search it for a title and bring up the included body text
[22:26:35] choke: has joined #ruby
[22:26:46] Ox0dea: KingAbdullah: A Hash, then.
[22:26:54] Ox0dea: Which can be serialized to disk quite easily.
[22:27:01] adaedra: What's wrong with the db already?
[22:27:14] KingAbdullah: Ah in middle of learning about Hash, So it can write it right into the file as a hash?
[22:27:16] brunto: has joined #ruby
[22:27:20] apeiros: KingAbdullah: we don't know what you know unless you tell us. if you say beginner, I assume you don't know.
[22:27:27] alem0lars: has joined #ruby
[22:27:38] apeiros: KingAbdullah: see YAML
[22:27:39] adaedra: KingAbdullah: there are serializations formats to do that (json, yaml, xml, ...)
[22:27:40] rrichard_: has joined #ruby
[22:29:34] mary5030: has joined #ruby
[22:31:50] Dimik: has joined #ruby
[22:32:04] snowy: has joined #ruby
[22:34:05] ellisTAA: how can i access op which is coming from line 5 https://gist.github.com/ellismarte/5f47f6a859db6a5afd03#file-calc-rb-L9
[22:34:10] ellisTAA: i tried .to_sym
[22:35:12] volty: has joined #ruby
[22:37:12] adaedra: Question to people with the knowledge: When doing &ri gets, should Kernel#gets or IO#gets be the first result?
[22:37:17] pdoherty: has joined #ruby
[22:37:28] mistermo_: has joined #ruby
[22:38:18] barajasfab: has joined #ruby
[22:39:00] Ox0dea: ellistaa: Line 5 contains lots of invalid syntax.
[22:39:31] ellisTAA: Ox0dea: how do i put operators in an array?
[22:39:42] ellisTAA: can i add them as strings and turn them into operators when i need them?
[22:40:02] jottr: has joined #ruby
[22:41:13] Ox0dea: ellistaa: You'll want to use #send to dynamically invoke them, and that accepts the method name as either a String or a Symbol.
[22:41:21] pietr0: has joined #ruby
[22:41:22] Ox0dea: >> 17.send '+', 25
[22:41:23] ruboto: Ox0dea # => 42 (https://eval.in/498318)
[22:41:32] Ox0dea: They really should be Symbols, though.
[22:41:33] adaedra: public_send*
[22:41:34] ellisTAA: Ox0dea: thanks
[22:41:39] Ox0dea: >> %i[+ - * /] # ellistaa
[22:41:40] ruboto: Ox0dea # => [:+, :-, :*, :/] (https://eval.in/498319)
[22:42:19] justinmcp: has joined #ruby
[22:42:58] bkxd: has joined #ruby
[22:44:23] choke: has joined #ruby
[22:46:17] karapetyan: has joined #ruby
[22:46:21] zenlot: has joined #ruby
[22:47:02] Xeago: has joined #ruby
[22:47:08] mustmodify: has joined #ruby
[22:47:42] ur5us: has joined #ruby
[22:50:22] ChameleonSix4: has joined #ruby
[22:50:30] ChameleonSix4: has left #ruby: ()
[22:51:22] Vertroa: has joined #ruby
[22:52:28] BTRE: has joined #ruby
[22:53:06] ur5us: has joined #ruby
[22:54:52] phutchins: has joined #ruby
[22:55:32] BSaboia: has joined #ruby
[22:55:32] f00dMonsta_: has joined #ruby
[22:55:49] Melpaws: has joined #ruby
[22:56:23] choke: has joined #ruby
[22:56:48] Vertroa: has joined #ruby
[22:57:18] shevy: adaedra hmm is one an alias to the other?
[22:57:38] chris2: has joined #ruby
[22:58:11] baweaver: has joined #ruby
[23:02:11] whippythellama: has joined #ruby
[23:02:29] gusTester: has left #ruby: ()
[23:02:30] gambl0re: has joined #ruby
[23:03:51] ur5us: has joined #ruby
[23:04:24] hxegon: has joined #ruby
[23:04:59] DonOtreply: has joined #ruby
[23:08:13] ur5us_: has joined #ruby
[23:10:15] klingeldraht: has joined #ruby
[23:12:02] mjuszczak: has joined #ruby
[23:12:31] DonOtreply: has joined #ruby
[23:13:08] guacamole: has joined #ruby
[23:14:07] guacamole: has joined #ruby
[23:14:56] choke: has joined #ruby
[23:15:42] Scripore: has joined #ruby
[23:18:34] kspencer: Does anyone here work with json/etc apis where I can dump output from a script into a json string
[23:18:49] peeja: has joined #ruby
[23:19:06] pawnbox: has joined #ruby
[23:20:58] last_staff: has joined #ruby
[23:21:59] DonOtreply: has joined #ruby
[23:22:55] f00dMonsta__: has joined #ruby
[23:27:27] hxegon: kspencer not sure what you mean
[23:29:22] cmolenda: has joined #ruby
[23:30:13] mistermocha: has joined #ruby
[23:31:48] choke: has joined #ruby
[23:33:20] kspencer: hxegon: I have a ruby web script, but want to be able to also call it via something to bring the info into another program, say cinch or w/e bot and have it output it but formatted, and the easiest way to format is to go by use heirarchy, which involves serialization
[23:33:33] dlitvak: has joined #ruby
[23:33:43] mustmodify: kspencer: OOOOOOooooohkkkkkkkkkkk
[23:34:18] mustmodify: YOu want to do some AJAXy kind of stuff?
[23:35:40] kspencer: more api kind of stuff, think cloudflare api and its responses, you could format that, but I want to format my hierarchy of my uptime script
[23:36:13] mustmodify: so you want an API
[23:36:16] mustmodify: what's your question?
[23:36:31] mistermocha: has joined #ruby
[23:36:45] mustmodify: I'm guessing it's "How do I do that."
[23:36:48] Ox0dea: kspencer: Er, are you asking how to parse JSON with Ruby?
[23:37:00] kspencer: right now I have it outputting html, I want it to output json
[23:37:20] last_staff: has joined #ruby
[23:37:20] mustmodify: kspencer: and is this Rails?
[23:37:59] kspencer: not made with rails persay but its apache+passenger+sinatra
[23:38:43] kspencer: i say that because I didn't use rails as a command to build the 'app'
[23:38:46] Ox0dea: kspencer: Could you clarify how it is you're displaying a Hash as HTML?
[23:39:05] mustmodify: so you need to detect the request type and then say, "If they are requesting HTML, render this view. If they are requesting JSON, spit out JSON."
[23:39:25] moei: has joined #ruby
[23:39:58] kspencer: right mustmodify, but given my script I need to know how to set up the heirarchy, and yes I will gist the code
[23:42:12] baweaver: has joined #ruby
[23:42:42] Ebok: has joined #ruby
[23:42:58] ruby[bot]: has joined #ruby
[23:43:28] houhoulis: has joined #ruby
[23:44:36] freerobby: has joined #ruby
[23:44:36] choke: has joined #ruby
[23:44:38] kspencer: mustmodify: Ox0dea hxegon https://gist.github.com/anonymous/7b95f6df52cf7d90b97d
[23:44:49] ruby[bot]: has left #ruby: ()
[23:44:53] davzie: has joined #ruby
[23:45:16] davzie: Are there any frameworks out there, for a relative Ruby beginner (not a programming beginner) that would be a good fit for a REST API?
[23:45:31] celly: has joined #ruby
[23:45:31] davzie: Rails seems like overkill for this task, but again, I lack experience and perspective.
[23:45:33] mustmodify: ACK! SSH.exec! in your views...
[23:45:40] mustmodify: at least it's hard coded.
[23:45:53] mustmodify: I'm pretty sure that's in a file somewhere that you can read.
[23:45:59] mustmodify: instead of doing SSH.exec!
[23:46:03] hxegon: davzie sinatra
[23:46:17] mustmodify: Oh I see. Net::SSH
[23:46:21] mustmodify: so you ... geez.
[23:46:22] Ox0dea: kspencer: Right, you'll need to parse the output of `uptime`, stick the results in a Hash, and then you'll be able to call #to_json on that.
[23:46:45] cmolenda: has joined #ruby
[23:46:51] davzie: hxegon: Thanks H-man
[23:46:55] mustmodify: Yeah, create an UptimeReport class. Then UptimeReport.new.to_hash
[23:47:11] hxegon: davzie no prob, D
[23:47:31] ur5us: has joined #ruby
[23:47:37] kspencer: the uptime i can fix with different commands, was more the 'type' and 'server' sections i don't know how to work in
[23:47:52] ellisTAA: has joined #ruby
[23:48:12] cmolenda: has joined #ruby
[23:48:26] projer: has joined #ruby
[23:48:32] dlitvak_: has joined #ruby
[23:49:40] cmolenda: has joined #ruby
[23:50:02] Ox0dea: kspencer: Just stick those in the Hash as well.
[23:50:27] Yzguy: has joined #ruby
[23:52:22] rodfersou: has joined #ruby
[23:52:44] justinmcp: has joined #ruby
[23:53:11] projer: In ruby, can I leave implementation of a base method to the child class, while calling it in the parent would call the child? Something similar to the template method pattern
[23:53:31] ta: has joined #ruby
[23:54:40] Ox0dea: projer: You sure can.
[23:55:27] projer: Ox0dea: a better question would be how, and it is it in some way an anti pattern in ruby, because from what I read on stackoverflow it isn't used that often in the Ruby community
[23:55:57] BTRE: has joined #ruby
[23:56:47] Ox0dea: projer: Well, consider Enumerable, for instance. It asks only that a subclass implement #each, and then it piggy-backs on that to provide a plethora of other functionality.
[23:58:44] choke: has joined #ruby