« Back to channel list

#ruby - 08 February 2016

« Back 1 day Forward 1 day »
[00:00:26] tildes: has joined #ruby
[00:00:37] pawnbox: has joined #ruby
[00:06:07] waka: has joined #ruby
[00:08:51] pdoherty: has joined #ruby
[00:09:46] themsay2: has joined #ruby
[00:10:02] ferr: has joined #ruby
[00:11:20] Aviio: Anyone used xmlsimple before?
[00:11:37] Xeago: has joined #ruby
[00:20:03] Pintor: has joined #ruby
[00:21:56] Blaze_Boy: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[00:22:00] Averna: has joined #ruby
[00:22:55] zacstewart: has joined #ruby
[00:23:13] kam270: has joined #ruby
[00:23:53] Pintor: I am writing a code using "case" (per each value, returns a value). Is possible to do something like this with a method or similar? https://gist.github.com/anonymous/29736f3bab7ed630457a
[00:24:40] Pintor: typing error, on method, "i" is "v"
[00:24:43] arlek: has joined #ruby
[00:24:57] CloCkWeRX: has joined #ruby
[00:25:18] volty: I can't get the sense. What is your goal (input - output) ?
[00:26:09] Pintor: write the "case" with less lines
[00:26:50] volty: you can do it with a lookup table / hash for simple translation (value -> value)
[00:28:23] kies^: has joined #ruby
[00:28:52] tjohnson_: has joined #ruby
[00:29:10] volty: Now I think I remember you ??? the guy that poses extremely weird questions. :)
[00:29:26] Abrin: has joined #ruby
[00:29:59] senayar^: has joined #ruby
[00:30:18] FooMunki_: has joined #ruby
[00:31:52] wolffles: has joined #ruby
[00:32:19] devbug: has joined #ruby
[00:32:22] kriskropd_: has joined #ruby
[00:33:48] chouhoulis: has joined #ruby
[00:34:07] coyo: has joined #ruby
[00:34:20] johnmilton: has joined #ruby
[00:34:33] binaryplease: has joined #ruby
[00:34:55] nofxx: has joined #ruby
[00:34:55] nofxx: has joined #ruby
[00:34:57] DoubleMalt: has joined #ruby
[00:36:32] chipotle: has joined #ruby
[00:37:03] peterevjan: has joined #ruby
[00:37:35] wolffles: i cant seem to find anything on choosing: condition 1 OR condition 2 but not both
[00:38:01] Spami: has joined #ruby
[00:38:08] wolffles: ary.keep_if{|x| x % 3 == 0 || x % 5 == 0}
[00:39:21] roshanavand: has joined #ruby
[00:40:28] Radar: example input and output please
[00:40:58] volty: he wants a logical xor
[00:41:24] wolffles: ary = *(1..15) ; x=ary.keep_if{|x| x % 3 == 0 || x % 5 == 0}
[00:41:51] wolffles: #=> [3,5,15]
[00:42:05] wolffles: i just want [3,5]
[00:42:26] wolffles: one or the other but not both
[00:42:28] Ox0dea: wolffles: [x % 3, x % 5].count(0) == 1
[00:43:18] arashb: has joined #ruby
[00:44:23] Ox0dea: Do you grok why that works?
[00:44:43] yoongkang: has joined #ruby
[00:44:45] mhoungbo: has joined #ruby
[00:44:46] wolffles: im trying to comprehend it
[00:45:23] wolffles: oh its an array
[00:46:44] Ox0dea: You could also say `[x % 3 == 0, x % 5 == 0].one?`, but I'm not sure that's any clearer.
[00:47:14] wolffles: (0) represents?
[00:47:37] theastrowolfe: has joined #ruby
[00:48:55] william3: has joined #ruby
[00:50:25] pawnbox: has joined #ruby
[00:50:26] ElFerna: has joined #ruby
[00:50:27] ironcamel: wolffles: [x % 3, x % 5].count(0) is like doing [x % 3, x % 5].count { |x| x == 0 }
[00:51:03] zacstewart: has joined #ruby
[00:51:40] ta: has joined #ruby
[00:52:03] ur5us: has joined #ruby
[00:53:11] wolffles: i wanna say i understand it but i know its only cuz you explained it
[00:53:44] wolffles: does == 1 return only 1 instance of the number?
[00:54:01] wolffles: like if there where 2 of the same value?
[00:56:03] renderful: has joined #ruby
[00:57:12] despai: has joined #ruby
[00:57:38] Jonah11_: has joined #ruby
[00:59:09] nerium: has joined #ruby
[00:59:48] wolffles: nvm i figured it out
[01:00:19] floror: has joined #ruby
[01:03:19] floror: Is there a way to match, format, and replace a value using gsub? Like this `"My name is Olo".gsub(/My (\w+) is (\w+)/) {|a, b| "#{a} #{b}".upcase } # => "NAME OLO"`
[01:03:39] ElFerna: has joined #ruby
[01:03:47] floror: It looks from the docs like gsub doesn???t support groups, so is there another way?
[01:04:53] toretore: you're not substituting though, you're extracting the values
[01:04:59] theastrowolfe: has left #ruby: ("Leaving")
[01:07:01] Ox0dea: >> s = '42 is a number'; s[/\d+/] = '1337'; s # floror
[01:07:02] ruby[bot]: Ox0dea: # => "1337 is a number" (https://eval.in/514552)
[01:07:14] Ox0dea: String#[]= takes a Regexp, but you should probably forget that.
[01:08:01] toretore: >> My name is Olo".match(/My (\w+) is (\w+)/).values_at(1,2).map(&:upcase).join(' ')
[01:08:03] ruby[bot]: toretore: # => /tmp/execpad-67aa6fc8c9d1/source-67aa6fc8c9d1:2:in `<main>': undefined method `Olo' for main:Object ...check link for more (https://eval.in/514554)
[01:08:22] toretore: >> "My name is Olo".match(/My (\w+) is (\w+)/).values_at(1,2).map(&:upcase).join(' ')
[01:08:24] ruby[bot]: toretore: # => "NAME OLO" (https://eval.in/514555)
[01:08:57] floror: tobiasvl: In this case yet. But the `value` variable can contain much more information, like ???ABC My name is Olo DEF??? => ???ABC NAME OLO DEF???
[01:09:04] floror: *In this case, yes
[01:10:13] floror: toretore: Does that work with `scan`?
[01:10:29] floror: I need to repeate this until there???s nothing more to replace
[01:10:36] volty: >> "My name is Olo".scan(/(?:My) (\w+) is (\w+)/).flatten
[01:10:37] ruby[bot]: volty: # => ["name", "Olo"] (https://eval.in/514556)
[01:10:43] toretore: floror: need more information
[01:10:44] devbug_: has joined #ruby
[01:10:47] frog0909: has joined #ruby
[01:11:24] floror: toretore: I???m wring a question on SO atm, it???s a bit compilcated to explain as this is part of a preprocessor
[01:11:32] toretore: >> "Hello, My name is Olo, what is your name my friend?".gsub(/My (\w+) is (\w+)/) {|*| "#{$~[1]} #{$~[2]}".upcase }
[01:11:33] ruby[bot]: toretore: # => "Hello, NAME OLO, what is your name my friend?" (https://eval.in/514557)
[01:11:55] volty: >> "My name is Olo".scan(/(?:My) (\w+) is (\w+)/).flatten.tap { |a| a[1].upcase! }
[01:11:56] Ox0dea: >> s = 'This is insand'; s[/\w+$/] = "#$&".succ; s
[01:11:56] ruby[bot]: volty: # => ["name", "OLO"] (https://eval.in/514558)
[01:11:57] ruby[bot]: Ox0dea: # => "This is " (https://eval.in/514559)
[01:12:13] toretore: >> "Hello, My name is Olo, what is your name my friend? My name is Olo!".gsub(/My (\w+) is (\w+)/) {|*| "#{$~[1]} #{$~[2]}".upcase }
[01:12:14] ruby[bot]: toretore: # => "Hello, NAME OLO, what is your name my friend? NAME OLO!" (https://eval.in/514560)
[01:12:33] DynamicMetaFlow: has joined #ruby
[01:12:43] floror: $ looks scary to use, is that really thread safe?
[01:12:46] toretore: that's the g in gsub
[01:12:46] Ox0dea: toretore: Why $~[1] over just $1?
[01:13:00] Ox0dea: floror: Yeah, $~ and all its descendants are actually scoped.
[01:13:18] toretore: floror: they're not actually globabl variables, they just look like it
[01:13:27] toretore: Ox0dea: i just like MatchData
[01:13:40] floror: Aha, I didn???t know that
[01:14:00] floror: Hold on, I???ll gist the code I???ve now
[01:14:03] toretore: they're still magic and i hate them :(((
[01:14:04] devbug: has joined #ruby
[01:14:27] volty: ah, both of them upcase
[01:14:47] wolffles: you guys are wizards
[01:14:47] volty: >> "My name is Olo".scan(/(?:My) (\w+) is (\w+)/).flatten.map(&:upcase)
[01:14:48] ruby[bot]: volty: # => ["NAME", "OLO"] (https://eval.in/514561)
[01:15:21] Ox0dea: wolffles: That's a dollar word!
[01:15:43] Ox0dea: >> 'wizards'.bytes.reduce(0) { |s, b| s + b - 96 }
[01:15:44] ruby[bot]: Ox0dea: # => 100 (https://eval.in/514562)
[01:16:05] toretore: i guess using magic variables makes me a wizard, but i don't want to be a wizard
[01:16:23] finisherr: has joined #ruby
[01:16:43] Ox0dea: There are wizards and then there are tricksters.
[01:16:50] Ox0dea: Not a mutually exclusive relationship, though.
[01:17:00] wolffles: magic is the word alright
[01:17:12] toretore: that assumes magic is real Ox0dea
[01:18:21] shevy: magic waffles
[01:18:33] Ox0dea: $ whatis magic
[01:18:35] Ox0dea: magic (4) - file command's magic pattern file
[01:19:42] wolffles: im suppose to take the first exam tonight
[01:19:45] arutemu: has joined #ruby
[01:19:55] wolffles: im super nervous #shevy
[01:20:12] Ox0dea: wolffles: Which one is you? http://i.imgur.com/y9PwiW0.gifv
[01:20:18] pawnbox: has joined #ruby
[01:20:52] wolffles: my cabbages!
[01:20:56] Ox0dea: It's terrible, right?
[01:21:29] floror: Here???s is what I???ve right now https://gist.github.com/oleander/7593235de6b6d6f93445
[01:21:35] eam: this is the "the magic powers arive at age 30" wizard right
[01:22:15] floror: The idea is to store matches to prevent the formater (in this case String#downcase) to affect certain parts of my original value
[01:23:38] peterevjan: has joined #ruby
[01:25:13] karapetyan: has joined #ruby
[01:25:18] LoneHerm_: has joined #ruby
[01:26:20] shevy: wolffles an exam about ruby?
[01:27:51] floror: Did that make any sense?
[01:28:22] kies^: has joined #ruby
[01:28:58] RegulationD: has joined #ruby
[01:30:59] zacstewart: has joined #ruby
[01:31:25] TomPeed: has joined #ruby
[01:31:50] volty: floror: could be, not sure. You want to preserve the case of certain parts of text?
[01:32:12] floror: volty: Yes, that???s correct.
[01:32:54] floror: So I want to preserve by replacing with something generic, run trough a filter, then restore the match
[01:33:26] volty: do not know, everybody has its own approach. my approach would be to to save the matches together with index , then replace after formatting (after downcase)
[01:34:33] chouhoulis: has joined #ruby
[01:34:49] floror: volty: That???s already what I???m doing, but it???s a bit buggy
[01:37:40] volty: i can't understand why the block
[01:39:19] volty: too much work. you should just save, into a simple array, the matched texts coupled with index
[01:39:59] floror: volty: The match should be processed/formated in some way, on the example i posted ** is added around the match
[01:40:14] floror: Hence the name, pre-processor :)
[01:40:18] volty: if I were you, I would start with doing it inside a plain single method
[01:40:56] volty: if the formatting preserves the length of the text, a simple [[index, matched
[01:40:59] volty: ]] is enough
[01:41:04] duckpuppy: has joined #ruby
[01:41:19] volty: otherwise you subst with something unique to replace later
[01:41:34] volty: but imho your class is overcomplicated
[01:41:35] floror: volty: I need to access the match inside the block provided to `adjust!`. The problem is that I can???t access the groups
[01:42:06] volty: we do not understand because I started from the end
[01:42:15] floror: volty: The code is part of a much bugger class, that???s why it has its own class
[01:42:17] rhg135: has joined #ruby
[01:42:23] volty: you are talking about your actual code, I am talking about a new appoach
[01:42:42] volty: imho you should start it again, and write it into a single plain method
[01:42:48] dlitvak: has joined #ruby
[01:43:09] floror: Why would that help?
[01:43:12] volty: once you get it simple, and get it work, you can refactor creating a class etc etc
[01:43:15] volty: absolutely
[01:43:28] volty: one of the main mistakes is to start with classes
[01:43:36] sepp2k1: has joined #ruby
[01:43:59] floror: This is not a ???start???. It has been running in production for over a year. It???s backup by over 50 specs
[01:44:25] floror: That???s the minimum working code I would come up with
[01:44:36] volty: nm, as you please, I can't read it. could be a question of taste :)
[01:45:01] floror: It has to preserve the @store state, that???s why this particular snipet still exists inside a class
[01:45:50] volty: I can't reason in terms of states when there's a simple input & expected output involved
[01:45:58] yoongkang: has joined #ruby
[01:46:11] floror: volty: The main problem with the code is this line: https://gist.github.com/oleander/7593235de6b6d6f93445#file-pre-processor-rb-L9
[01:46:43] floror: `scan` matches one line, but gsub/sub effects the whole string
[01:46:47] wldcordeiro: has joined #ruby
[01:47:51] floror: volty: First of all, do you understand the problem I???m trying to solve?
[01:48:16] volty: I already said I'm not sure :)
[01:49:22] toretore: floror: it might be helpful to see the entire class and some real data
[01:49:26] Azure|dc: has joined #ruby
[01:49:31] floror: volty: So I want to ensure that certain parts of the original string is temp. removed and later placed back again at the same position.
[01:49:52] floror: Let???s start with that
[01:50:54] floror: That???s quite simple. I can use gsub for that.
[01:51:00] volty: something like s = "My name is Volty De Qua"; orig = preserve(/Volty De Qua/); s.downcase!; rollback(orig) # orig has the index as well as the match
[01:52:03] lyoshajapan: has joined #ruby
[01:52:07] DmitryBochkarev: has joined #ruby
[01:52:17] floror: That would yield ???MY NAME IS Volty De Qua???
[01:52:38] volty: downcase, but nm
[01:52:44] floror: hehe, yeah
[01:52:58] floror: That???s simple todo with just an index and gsub
[01:53:00] lyoshajapan: Whats a good design pattern for a questionnaire with answers that trigger other questions?
[01:53:45] volty: list of regexps, for each regex match and save index and matched, then format, than replace at index with matched. that's all
[01:53:53] na_g_: has joined #ruby
[01:55:55] na_g_: has joined #ruby
[01:56:08] floror: Now imagen that you also want to, before restoring (or rollback as you called it), process ???Volty De Qua???. by say making the first and last word downcase. s = "My name is Volty De Qua"; orig = preserve(/(Volty) De (Qua)/) {|a, b| "#{a.downcase} #{b.downcase}"} s.downcase!; rollback(orig); "MY NAME IS volty qua"
[01:58:42] volty: you can do all the changes you like on that array ( index + match string )
[01:59:42] volty: you can even do it with a block that returns the desired exclusive format
[01:59:44] floror: volty: gsub doesn???t suport groups
[01:59:46] shevy: what options would I have to create 2D plots from a .rb file? or asked differently, what would you use
[01:59:48] pawnbox: has joined #ruby
[02:00:17] volty: floror: and who's talking about gsub ?
[02:00:36] Ox0dea: floror: Aha! I think I know what you're looking for.
[02:00:51] floror: volty: /(Volty) De (Qua)/ contains two groups
[02:01:09] Ox0dea: floror: $PREMATCH AND $POSTMATCH will give you the stuff surrounding your match.
[02:01:16] peterevjan: has joined #ruby
[02:01:23] Ox0dea: $` and $' if you're okay with those.
[02:01:49] Ox0dea: You can use them in your call to #gsub to have it "do groups".
[02:03:12] volty: s = "floror rules" =~ /rules/ # save the index, then s[index, len] = matched_string
[02:03:25] chouhoulis: has joined #ruby
[02:03:41] floror: Yeah, I think I???m making things over complicated
[02:03:50] floror: I???ll do some changes and see if the specs passes
[02:04:08] volty: yap, no need for gsub unless the formatting changes the length
[02:04:21] floror: Ox0dea: Not sure that???s correct, but I*ll try it
[02:04:39] Ox0dea: floror: I kinda just threw it out there; volty's suggestion to restructure seems sound.
[02:05:05] Ox0dea: volty: String#[]= handles length mismatches just fine?
[02:05:11] volty: a plain single simple def
[02:05:23] Edulix: has joined #ruby
[02:05:37] rhg135: has joined #ruby
[02:05:43] volty: >> s = 'volty'; s[1,2] == 'xx';
[02:05:45] ruby[bot]: volty: # => false (https://eval.in/514567)
[02:05:51] volty: >> s = 'volty'; s[1,2] = 'xx';
[02:05:52] ruby[bot]: volty: # => "xx" (https://eval.in/514568)
[02:05:58] volty: >> s = 'volty'; s[1,2] = 'xx'; s
[02:05:59] ruby[bot]: volty: # => "vxxty" (https://eval.in/514569)
[02:06:17] frog0909_: has joined #ruby
[02:06:41] Ox0dea: LGTM. :shipit:
[02:06:56] volty: Ox0dea: ?
[02:07:25] Ox0dea: ed is the standard editor.
[02:07:34] zacstewart: has joined #ruby
[02:07:44] william3: has joined #ruby
[02:07:45] volty: cannot understand your last lgtm ....
[02:08:10] volty: ah ya, looked into dictionary :)
[02:08:59] chouhoulis: has joined #ruby
[02:11:50] Ox0dea: >> s = 'volty'; s[2,0] = 'xxx'; s
[02:11:51] ruby[bot]: Ox0dea: # => "voxxxlty" (https://eval.in/514571)
[02:11:54] Ox0dea: That's more what I had in mind.
[02:13:13] Ox0dea: In response to "no need for gsub unless the formatting changes the length", to clarify.
[02:13:38] Ox0dea: shevy: Shell out to `gnuplot`, of course.
[02:15:08] vadeRcUser: has joined #ruby
[02:16:05] reppard: has joined #ruby
[02:16:39] vadeRcUser: has joined #ruby
[02:19:11] JoshGlzBrk: has joined #ruby
[02:23:36] william3: has joined #ruby
[02:24:18] rhg135: has joined #ruby
[02:26:44] karapetyan: has joined #ruby
[02:27:20] kies^: has joined #ruby
[02:27:34] duderono_: has joined #ruby
[02:28:39] Channel6: has joined #ruby
[02:29:55] pawnbox: has joined #ruby
[02:31:39] govg: has joined #ruby
[02:32:48] DynamicM`: has joined #ruby
[02:34:28] peterevjan: has joined #ruby
[02:34:53] peterevjan: has joined #ruby
[02:36:55] LoneHerm_: has joined #ruby
[02:45:21] arashb: has joined #ruby
[02:45:50] william3: has joined #ruby
[02:49:44] zacstewart: has joined #ruby
[02:53:44] oetjenj: has joined #ruby
[02:54:16] roshanavand: has joined #ruby
[02:54:27] ta: has joined #ruby
[02:55:46] bronson: has joined #ruby
[02:57:48] Cohedrin_: has joined #ruby
[02:59:42] pawnbox: has joined #ruby
[03:00:16] ledestin: has joined #ruby
[03:04:30] zacstewart: has joined #ruby
[03:05:14] A124: has joined #ruby
[03:07:19] dexter-tzu: has joined #ruby
[03:09:35] dlitvak: has joined #ruby
[03:13:40] peterevjan: has joined #ruby
[03:18:17] speakingcode: has joined #ruby
[03:18:26] konsolebox: has joined #ruby
[03:19:10] speakingcode: has joined #ruby
[03:23:27] IrishGringo: has joined #ruby
[03:23:40] william3: has joined #ruby
[03:23:56] hljohnson: has joined #ruby
[03:23:58] kies^: has joined #ruby
[03:24:06] peterevjan: has joined #ruby
[03:26:13] jgpawletko: has joined #ruby
[03:26:18] zacstewa_: has joined #ruby
[03:28:17] karapetyan: has joined #ruby
[03:28:56] speakingcode: has joined #ruby
[03:29:31] pawnbox: has joined #ruby
[03:31:29] yoongkang: has joined #ruby
[03:32:39] peterevjan: has joined #ruby
[03:34:22] UtkarshRay: has joined #ruby
[03:36:55] skweek: has joined #ruby
[03:39:51] baweaver: has joined #ruby
[03:42:23] kp666: has joined #ruby
[03:42:23] terminalrecluse: has joined #ruby
[03:43:11] ESpiney: has joined #ruby
[03:44:38] william3: has joined #ruby
[03:45:43] dfinninger: has joined #ruby
[03:46:31] rhg135: has joined #ruby
[03:47:35] jgpawletko_: has joined #ruby
[03:56:38] ta: has joined #ruby
[03:57:52] dcunit3d: has joined #ruby
[03:59:30] pawnbox: has joined #ruby
[03:59:44] DonOtreply: has joined #ruby
[04:02:41] jgpawletko: has joined #ruby
[04:02:51] jgpawletko: has left #ruby: ()
[04:03:08] kirillzh: has joined #ruby
[04:06:15] rhg135: has joined #ruby
[04:07:44] zacstewart: has joined #ruby
[04:07:54] themsay: has joined #ruby
[04:08:46] sneakerhax: has joined #ruby
[04:08:48] JoshGlzBrk: has joined #ruby
[04:09:36] rbennacer: has joined #ruby
[04:10:39] moeabdol: has joined #ruby
[04:11:03] stannard: has joined #ruby
[04:11:47] IrishGringo_: has joined #ruby
[04:13:01] stardiviner: has joined #ruby
[04:14:13] braincrash: has joined #ruby
[04:16:34] moeabdol1: has joined #ruby
[04:17:37] LoneHerm_: has joined #ruby
[04:17:51] riskish: has joined #ruby
[04:20:32] djbkd: has joined #ruby
[04:21:34] oetjenj: has joined #ruby
[04:22:47] IrishGringo: has joined #ruby
[04:24:16] LoneHermit: has joined #ruby
[04:25:21] william3: has joined #ruby
[04:26:21] peterevjan: has joined #ruby
[04:26:28] devbug_: has joined #ruby
[04:29:35] karapetyan: has joined #ruby
[04:30:30] haraoka: has joined #ruby
[04:35:06] Axy: has joined #ruby
[04:35:59] musl: has joined #ruby
[04:36:01] bloodwire: has joined #ruby
[04:36:16] coderMe: has joined #ruby
[04:36:34] tildes: has joined #ruby
[04:37:13] dupin: has joined #ruby
[04:37:53] jidar_: has joined #ruby
[04:38:14] askhat: has joined #ruby
[04:38:42] peterevjan: has joined #ruby
[04:39:20] pawnbox: has joined #ruby
[04:39:23] funnel: has joined #ruby
[04:40:01] coderMe: has joined #ruby
[04:40:01] peterevjan: has joined #ruby
[04:40:08] gnarf_: has joined #ruby
[04:40:08] gix: has joined #ruby
[04:40:45] jackjackdripper: has joined #ruby
[04:42:29] themsay2: has joined #ruby
[04:43:14] william3: has joined #ruby
[04:43:36] JoshGlzBrk: has joined #ruby
[04:44:30] mesamoo: has joined #ruby
[04:45:58] duderonomy: has joined #ruby
[04:47:03] arashb: has joined #ruby
[04:47:07] stardiviner: has joined #ruby
[04:48:30] zacstewart: has joined #ruby
[04:48:46] IrishGringo_: has joined #ruby
[04:49:20] moei: has joined #ruby
[04:49:39] ziyadb: has joined #ruby
[04:50:08] coderMe: has joined #ruby
[04:54:55] kies^: has joined #ruby
[04:56:00] askhat: has joined #ruby
[04:57:38] IrishGringo: has joined #ruby
[04:58:03] ta: has joined #ruby
[04:58:59] davedev24: has joined #ruby
[05:00:44] IrishGringo: has joined #ruby
[05:00:53] pawnbox: has joined #ruby
[05:07:58] kirillzh: has joined #ruby
[05:11:16] hahuang65: has joined #ruby
[05:13:19] AnonRecluse13: has joined #ruby
[05:14:43] pen: has joined #ruby
[05:19:16] askhat: has joined #ruby
[05:21:19] dseitz: has joined #ruby
[05:23:28] bluOxigen: has joined #ruby
[05:24:24] Pathfinder: has joined #ruby
[05:24:49] waka: has joined #ruby
[05:25:25] peterevjan: Has anyone been to Nordic Ruby?
[05:25:59] jackjackdripper: has joined #ruby
[05:26:03] askhat: has joined #ruby
[05:28:31] IrishGringo: has joined #ruby
[05:29:02] askhat: has joined #ruby
[05:30:25] RegulationD: has joined #ruby
[05:33:55] Jonah11_: has joined #ruby
[05:37:02] roshanavand: has joined #ruby
[05:37:21] IrishGringo: has joined #ruby
[05:45:13] Limix: has joined #ruby
[05:52:50] elifoster: has joined #ruby
[05:53:06] stannard: has joined #ruby
[05:53:07] dionysus69: has joined #ruby
[05:56:19] coderMe: has joined #ruby
[05:56:24] karapetyan: has joined #ruby
[06:00:26] jgt4: has joined #ruby
[06:01:23] terminalrecluse: has joined #ruby
[06:03:48] zacstewart: has joined #ruby
[06:04:18] ruby[bot]: -b *!*@gateway/web/cgi-irc/kiwiirc.com/ip.190.92.127.104$#ruby-banned
[06:04:20] the_drow: has joined #ruby
[06:04:54] x77686d: has joined #ruby
[06:05:36] ur5us: has joined #ruby
[06:05:43] anisha: has joined #ruby
[06:08:26] william3: has joined #ruby
[06:12:15] lurch_: has joined #ruby
[06:18:13] ur5us: has joined #ruby
[06:18:20] darkxploit: has joined #ruby
[06:22:35] karapetyan: has joined #ruby
[06:25:09] last_staff: has joined #ruby
[06:27:06] rbennacer: has joined #ruby
[06:27:53] levifig: has joined #ruby
[06:29:02] stardiviner: has joined #ruby
[06:30:20] Azulinho: has joined #ruby
[06:34:46] ensyde: has joined #ruby
[06:39:16] azure32: has joined #ruby
[06:40:14] ruby-lang519: has joined #ruby
[06:42:01] Hanmac: has joined #ruby
[06:42:10] arooni-mobile: has joined #ruby
[06:43:09] UtkarshRay: has joined #ruby
[06:43:25] moeabdol2: has joined #ruby
[06:49:39] arashb: has joined #ruby
[06:50:37] anisha: has joined #ruby
[06:53:29] ur5us: has joined #ruby
[06:54:12] ta: has joined #ruby
[06:58:29] bronson_: has joined #ruby
[07:01:54] intrigueD: has joined #ruby
[07:01:58] intrigueD: has joined #ruby
[07:02:40] yoongkang: has joined #ruby
[07:06:15] TomyLobo: has joined #ruby
[07:06:32] Hanmac1: has joined #ruby
[07:07:35] claw: has joined #ruby
[07:07:40] Xeago: has joined #ruby
[07:08:08] hahuang61: has joined #ruby
[07:08:25] govg: has joined #ruby
[07:08:54] minimalism: has joined #ruby
[07:09:54] william3: has joined #ruby
[07:10:29] scepticulous: has joined #ruby
[07:11:52] burgestrand: has joined #ruby
[07:12:41] arutemu: has left #ruby: ()
[07:12:51] solars: has joined #ruby
[07:13:44] LoneHermit: has joined #ruby
[07:15:27] zacstewart: has joined #ruby
[07:15:37] ur5us: has joined #ruby
[07:15:51] Spami: has joined #ruby
[07:16:21] howdoi: has joined #ruby
[07:16:30] moeabdol3: has joined #ruby
[07:17:25] exadeci: has joined #ruby
[07:19:54] moeabdol4: has joined #ruby
[07:20:24] Infra-Red: has joined #ruby
[07:21:36] codezomb: has joined #ruby
[07:25:58] ayonkhan: has joined #ruby
[07:26:44] lithogenetic: has joined #ruby
[07:28:05] codecop: has joined #ruby
[07:30:23] skweek: has joined #ruby
[07:33:10] JohnBat26: has joined #ruby
[07:35:23] yardenbar: has joined #ruby
[07:37:05] Jonah11_: has joined #ruby
[07:37:28] srenatus: has joined #ruby
[07:38:13] adgtl: has joined #ruby
[07:38:58] anisha: has joined #ruby
[07:39:21] lsmola: has joined #ruby
[07:40:41] aganov: has joined #ruby
[07:44:20] futilegames: has joined #ruby
[07:44:53] LoneHerm_: has joined #ruby
[07:47:26] karapetyan: has joined #ruby
[07:52:34] bigkevmcd: has joined #ruby
[07:56:23] william3: has joined #ruby
[07:57:31] z3uS: has joined #ruby
[07:58:41] yoongkang: has joined #ruby
[07:58:51] mihael_k33hl: has joined #ruby
[07:59:34] edwardly: has joined #ruby
[07:59:34] edwardly: has joined #ruby
[07:59:52] TomyWork: has joined #ruby
[07:59:58] ESpiney: has joined #ruby
[08:00:59] DoubleMalt: has joined #ruby
[08:01:49] karapetyan: has joined #ruby
[08:04:20] jas02: has joined #ruby
[08:05:22] z3uS: has joined #ruby
[08:06:33] william3: has joined #ruby
[08:06:50] DubiousSquash: has joined #ruby
[08:09:24] djbkd: has joined #ruby
[08:09:44] firstdayonthejob: has joined #ruby
[08:10:26] z3uS: has joined #ruby
[08:10:47] dmolina: has joined #ruby
[08:11:10] cjk101010: has joined #ruby
[08:11:12] futilegames: has joined #ruby
[08:12:27] the_drow: has joined #ruby
[08:15:55] troulouliou_div2: has joined #ruby
[08:16:01] SCHAAP137: has joined #ruby
[08:16:13] Ebok: has joined #ruby
[08:18:03] aufi: has joined #ruby
[08:18:32] MaveonRemaes: has joined #ruby
[08:19:19] phatypus: has joined #ruby
[08:20:03] IrishGringo: has joined #ruby
[08:20:36] blaxter: has joined #ruby
[08:21:27] einarj: has joined #ruby
[08:22:33] Ishido: has joined #ruby
[08:23:35] sandstrom: has joined #ruby
[08:24:21] fatih: has joined #ruby
[08:24:34] fatih: has left #ruby: ()
[08:28:24] futilegames: has joined #ruby
[08:28:28] Edulix: has joined #ruby
[08:32:03] ljames: has joined #ruby
[08:32:48] ta: has joined #ruby
[08:33:12] roshanavand: has joined #ruby
[08:33:21] tAn: has joined #ruby
[08:34:12] zacstewa_: has joined #ruby
[08:34:38] jackjackdripper: has joined #ruby
[08:35:19] mondok: has joined #ruby
[08:36:04] chouhoulis: has joined #ruby
[08:41:36] phatypus: has joined #ruby
[08:42:24] darkxploit: has joined #ruby
[08:44:45] whippythellama: has joined #ruby
[08:45:32] dc1: has joined #ruby
[08:46:17] bernalex: has joined #ruby
[08:47:04] bernalex: hi. what's a good source for learning ruby when you basically don't know ruby at all? I am a haskell/idris/etc programmer fwiw.
[08:47:28] mlehrer: has joined #ruby
[08:48:07] huyderman: has joined #ruby
[08:48:45] apeiros: bernalex: I'm a bit out of touch for early materials, so these might not be the best tipps, but: try ruby koans. some people enjoy why the lucky stiff's ruby book
[08:49:02] apeiros: then there's the pickaxe which has older releases available for free (most still applies)
[08:49:38] bernalex: another fwiw: the more the source leans of functional programming the better for me
[08:49:51] bernalex: apeiros: ta, looking at http://www.rubykoans.com/ atm
[08:49:56] burgestrand: There's Learn Ruby the Hard Way (http://learnrubythehardway.org/book/), I can't attest to how good it is, I recall I had some issues with style in it, but it's fairly recent.
[08:50:38] Ox0dea: Recent != good.
[08:50:43] Deck-: has joined #ruby
[08:50:49] burgestrand: Hence the disclaimer.
[08:52:10] Ox0dea: bernalex: Tom Stuart's "Understanding Computation" fits pretty snugly at the intersection of Ruby and FP.
[08:52:34] Ox0dea: That said, he doesn't go out of his way to actually teach Ruby threrein, and you're probably already familiar with most if not all of the material.
[08:52:58] skullcrasher: has joined #ruby
[08:53:31] Ox0dea: Still, if you're able to learn by mere exposure, it'd likely give you your proverbial legs pretty quickly.
[08:55:30] Ox0dea: Alternatively, just pretend all you've got is single-argument lambdas like in Haskell: http://codon.com/programming-with-nothing
[08:57:59] askhat: has joined #ruby
[09:01:02] mdw: has joined #ruby
[09:01:26] shevy: bernalex I think it is rare to see a lot of lambda/procs used in ruby. the rack gem uses a lot of lambda for its tests though like: test/spec_builder.rb: run lambda { |inner_env| [200, {"Content-Type" => "text/plain"}, ['root']] }
[09:04:23] haxrbyte: has joined #ruby
[09:04:29] karapetyan: has joined #ruby
[09:05:15] marr: has joined #ruby
[09:06:53] araujo: has joined #ruby
[09:07:57] Ox0dea: >> ObjectSpace.each_object(Proc).count
[09:07:58] ruby[bot]: Ox0dea: # => 20 (https://eval.in/514720)
[09:08:25] flughafe1: >> puts "hi"
[09:08:31] Ox0dea: It's 582 at the start of my Pry session.
[09:08:36] Ox0dea: Procs are *everywhere* in Ruby.
[09:09:12] jaiks: has joined #ruby
[09:09:59] vondruch: has joined #ruby
[09:10:48] dopamean_: has joined #ruby
[09:10:56] mark2: has joined #ruby
[09:11:51] berserk_ren: has joined #ruby
[09:13:45] marr: has joined #ruby
[09:14:54] baweaver: has joined #ruby
[09:15:24] sftrabbit: has joined #ruby
[09:15:36] vdamewood: has joined #ruby
[09:20:22] william3: has joined #ruby
[09:22:25] ur5us: has joined #ruby
[09:23:59] _3by8: has joined #ruby
[09:24:52] DoubleMalt: has joined #ruby
[09:25:40] dopamean_: has joined #ruby
[09:26:06] _3by8: So I'm using Ruby on Rails but I'm pretty sure I'm just not understanding the way Ruby works, here's my problem: I'm trying to send an email out and I'm passing an instance variable to a private function that checks for certain HTTP query parameters and then sends the appropriate email. If I send the email in the main block of code, it works. Why is it not working when I pass the order as an argument?
[09:27:58] p1k: has joined #ruby
[09:30:22] Ox0dea: _3by8: Using the gmail gem?
[09:30:37] gagrio_: has joined #ruby
[09:31:03] _3by8: Ox0dea: Newp. ActionMailer.
[09:31:56] RegulationD: has joined #ruby
[09:31:59] Ox0dea: _3by8: Ah, well, I suspect the cause of the problem is similar enough that this might be of some help: https://eval.in/514738
[09:32:24] Ox0dea: The problem, essentially, is that your code is being executed in a different context than you're expecting.
[09:33:56] Ox0dea: Line 9 there is executing the block in the context of an instance of Foo, which does have an instance variable named @v; that very same block is executed on Line 10 as a new Deliverer, which does not.
[09:34:50] Bish: can i have Dir.glob relative to the folder the file is in? as instead of having it on cwd?
[09:34:53] craysiii1: has joined #ruby
[09:35:32] Ox0dea: Bish: __FILE__ should help.
[09:35:48] william3: has joined #ruby
[09:35:53] Bish: Ox0dea: yeah i know about __FILE__ but i dislike the idea of handling with ugly strings
[09:36:09] Ox0dea: Pathname has lots of goodies, then.
[09:36:15] shevy: ugly strings
[09:36:17] shevy: dirty strings!
[09:38:03] tvw: has joined #ruby
[09:38:07] chouhoulis: has joined #ruby
[09:38:48] Jonah11_: has joined #ruby
[09:40:15] william3: has joined #ruby
[09:40:25] Ox0dea: Bish: What's wrong with `Dir.chdir File.expand_path('..', __FILE__)`?
[09:40:59] burgestrand: `__dir__` is a new nicety.
[09:41:05] burgestrand: (NOTE: lowercase)
[09:41:56] Ox0dea: >> method :__dir__
[09:41:57] ruby[bot]: Ox0dea: # => #<Method: Object(Kernel)#__dir__> (https://eval.in/514742)
[09:42:08] CloCkWeRX: has joined #ruby
[09:42:27] Ox0dea: That's a little weird.
[09:42:35] ruby[bot]: Burgestrand: # => "/tmp/execpad-87a0651a8684" (https://eval.in/514743)
[09:42:38] burgestrand: Useful though.
[09:42:41] Ox0dea: Certainly.
[09:43:18] william3: has joined #ruby
[09:43:34] Ox0dea: __FILE__ is a keyword...
[09:44:32] Ox0dea: I suppose the asymmetry must be a concession to backwards compatibility.
[09:45:12] nodejunkie: has joined #ruby
[09:46:14] askhat: has joined #ruby
[09:46:44] stardiviner: has joined #ruby
[09:46:56] guardian: has joined #ruby
[09:47:32] Bish: hm, if i require inside a module, it won't get inside the module?
[09:47:58] Ox0dea: Nope. Ruby has "pseudo-namespaces". :/
[09:48:24] Bish: thats stupid >:(
[09:48:49] Bish: why did teh matz decide this way?
[09:49:11] lipoqil: has joined #ruby
[09:49:17] Ox0dea: Well, it's usually fine if you've got your project structured sanely.
[09:49:20] Bish: well, one could write a require gem that does it this way, right?
[09:49:30] Ox0dea: Of course.
[09:49:39] Bish: should he?
[09:49:47] askhat: has joined #ruby
[09:49:52] Ox0dea: The hackish way to get hold of the code being loaded is to use Kernel#load and pass `true` as the second argument.
[09:50:06] Ox0dea: That'll wrap the incoming code in an anonymous module that you can get hold of to do with as you will.
[09:50:19] Bish: nah that's ugly aswell
[09:50:27] Ox0dea: Of course, it doesn't *return* said Module, so you've gotta go searching for it, which is just dumb.
[09:50:35] Bish: but im tired of writing module x\n\t\t module y\n\t\t\tmodule z
[09:51:13] Ox0dea: Sounds like you need a better editor. :P
[09:51:25] askhat: has joined #ruby
[09:51:44] Bish: what editor im writing hex
[09:51:55] psye: has joined #ruby
[09:51:59] Bish: im also using netcat for irc
[09:52:02] Bish: pong 4873722
[09:52:07] Ox0dea: And hard tabs in Ruby code.
[09:52:09] adaedra: netcat? weak.
[09:52:19] arashb: has joined #ruby
[09:52:22] Ox0dea: Someone /ctcp VERSION me. :P
[09:52:31] Bish: whats wrong with tabs?
[09:52:32] adaedra: I apply the right voltage to an Ethernet cable.
[09:52:47] Ox0dea: adaedra: Ah, that's much further than I went. :P
[09:53:29] Stan: has joined #ruby
[09:54:06] adaedra: Maybe I should put "ruby" in `derpy's VERSION
[09:54:36] alexherbo2: has joined #ruby
[09:55:24] stannard: has joined #ruby
[09:55:31] shevy: make derpy smarter
[09:55:49] shevy: don't let ruby[bot] control the channel, derpy deserved better!
[09:55:54] adaedra: > implying `derpy is not smart already
[09:56:04] sergey_makagon: has joined #ruby
[09:58:27] Hounddog: has joined #ruby
[10:00:47] dcunit3d: has joined #ruby
[10:01:18] Ox0dea: > implying IRCchan should be a thing
[10:01:29] yoongkang: has joined #ruby
[10:02:33] FooMunki: has joined #ruby
[10:03:28] floror: has joined #ruby
[10:04:43] askhat_: has joined #ruby
[10:05:57] evidex: has joined #ruby
[10:06:15] dajobat: has joined #ruby
[10:06:18] Hounddog: has joined #ruby
[10:06:48] askhat: has joined #ruby
[10:06:50] karapetyan: has joined #ruby
[10:07:58] dcunit3d: has joined #ruby
[10:09:15] lessless: has joined #ruby
[10:09:23] mesamoo: has joined #ruby
[10:10:04] william3: has joined #ruby
[10:11:40] Pathfinder_: has joined #ruby
[10:12:31] Xeago: has joined #ruby
[10:13:43] askhat: has joined #ruby
[10:14:14] Mon_Ouie: has joined #ruby
[10:16:15] askhat: has joined #ruby
[10:16:32] wethu: has joined #ruby
[10:16:41] apeiros: a bit late, but: "Ox0dea: Bish: What's wrong with `Dir.chdir File.expand_path('..', __FILE__)`?"
[10:16:43] roshanav_: has joined #ruby
[10:16:51] Ox0dea: I saw this coming.
[10:16:59] apeiros: Dir.chdir is problematic. it's across all threads :<
[10:17:04] apeiros: I wish it ain't so
[10:17:28] Ox0dea: https://www.youtube.com/watch?v=ENXvZ9YRjbo
[10:17:36] Ox0dea: Your love is a heartbreaker, Ruby.
[10:17:54] SiliconDon: has joined #ruby
[10:18:55] Ox0dea: apeiros: Why does Kernel#load still have such a useless return value all these years later?
[10:19:11] norc: has joined #ruby
[10:19:15] norc: has joined #ruby
[10:19:15] norc: has joined #ruby
[10:19:25] norc: ast>> p {a:1}
[10:19:26] ruby[bot]: norc: I have parsed your code, the result is at https://eval.in/514765
[10:19:33] Ox0dea: Mornin', norc.
[10:19:38] norc: Good morning, Ox0dea.
[10:20:09] apeiros: Ox0dea: I don't have the faintest idea :-/
[10:20:35] apeiros: Ox0dea: I also don't know why load doesn't permit to pass in your own module instead of just having a random anonymous module which isn't even returned
[10:20:46] apeiros: (in the case with the second arg being used)
[10:20:54] Ox0dea: norc: Syntax error on trunk.
[10:21:18] apeiros: norc: p { } is considered a block to p
[10:21:24] apeiros: and inside that, a: 1 is invalid
[10:21:29] norc: Yeah. I mean obviously ruby thinks this is ablock.
[10:21:33] astrofog: has joined #ruby
[10:21:46] norc: Oh too slow.
[10:22:06] Ox0dea: That's how this works: https://eval.in/514769
[10:22:11] norc: Does Ripper have the ability to show syntax errors, instead of a plain nil?
[10:22:36] askhat: has joined #ruby
[10:23:24] gregf_: has joined #ruby
[10:23:40] Ox0dea: Seems not.
[10:23:42] atmosx: has joined #ruby
[10:23:50] norc: Sad panda.
[10:24:29] karapetyan: has joined #ruby
[10:25:01] Azulinho: has joined #ruby
[10:25:04] askhat: has joined #ruby
[10:25:06] Ox0dea: It's easy enough to recover from SyntaxError?
[10:25:26] Ox0dea: You can just eval into a fresh Binding to avoid any side effects.
[10:26:01] Ox0dea: Or, well, some side effects. :P
[10:26:04] CloCkWeRX: has left #ruby: ()
[10:27:53] norc: Ox0dea: You mean I should just fix the code to just eval if sexp returns nil, and display the SyntaxError message?
[10:28:02] norc: That seems like an easy workaround.
[10:28:13] ElFerna: has joined #ruby
[10:28:37] Ox0dea: norc: Seems sound to me.
[10:29:54] norc: Ill make it happen when Im back home.
[10:30:06] norc: So.. right now I have a weird scenario.
[10:30:21] rbennacer: has joined #ruby
[10:33:31] norc: It really feels wrong to have a config file containing credentials inside spec/ - but I need them for my VCR cassettes.
[10:33:57] norc: ACTION sighs
[10:34:12] yorickpeterse: norc: usually people dump that into something like spec/fixtures
[10:34:21] yorickpeterse: also Ripper doesn't really have proper error handling
[10:34:44] TheHodge: has joined #ruby
[10:35:10] yorickpeterse: Your best bet is to use something like https://github.com/whitequark/parser
[10:35:33] vikas027: has joined #ruby
[10:35:34] norc: >> require 'parser'
[10:35:35] ruby[bot]: norc: # => cannot load such file -- parser (LoadError) ...check link for more (https://eval.in/514791)
[10:36:09] askhat: has joined #ruby
[10:36:27] yorickpeterse: norc: it's a Gem
[10:36:38] norc: yorickpeterse: I know, was just wondering whether it was installed in eval.in
[10:36:51] yorickpeterse: Ah, no; eval.in only comes with core/stdlib
[10:37:35] norc: Ah alright, then it will not be of much use here
[10:37:37] zacstewart: has joined #ruby
[10:37:42] norc: Nice to know about it though.
[10:38:07] jorrin: has joined #ruby
[10:38:23] Ox0dea: I'd be happy to host the AST evaluator...
[10:39:07] chouhoulis: has joined #ruby
[10:39:24] apeiros: can always ask charliesome whether he'd install something
[10:39:44] Ox0dea: Slippery slope, that.
[10:41:41] william3: has joined #ruby
[10:42:03] themsay: has joined #ruby
[10:43:45] chthon: has joined #ruby
[10:43:57] tvw: has joined #ruby
[10:44:05] scepticulous: has joined #ruby
[10:44:10] yoongkang: has joined #ruby
[10:46:30] ocbtec: has joined #ruby
[10:50:00] Tempesta: has joined #ruby
[10:51:13] darkf: has joined #ruby
[10:51:16] DonOtreply: has joined #ruby
[10:54:15] CloCkWeRX: has joined #ruby
[10:56:33] mdw: has joined #ruby
[10:57:37] roshanavand: has joined #ruby
[11:00:08] bronson_: has joined #ruby
[11:02:07] SOLDIERz: has joined #ruby
[11:03:03] trinaldi: has joined #ruby
[11:03:30] PedramT: has joined #ruby
[11:04:23] Pumukel: has joined #ruby
[11:07:36] selfadhesivefilm: has joined #ruby
[11:11:33] selfadhe_: has joined #ruby
[11:12:39] eGGsha: has joined #ruby
[11:13:15] daxroc: Morning all
[11:13:18] ruby[bot]: -b *!*@85-76-101-54-nat.elisa-mobile.fi$#ruby-banned
[11:13:51] william3: has joined #ruby
[11:14:55] daxroc: Can you disable the installation of gems (build_info, cache, doc, extensions, gems, specifications) during compile. looking to create a binary package for each after
[11:15:02] dlitvak: has joined #ruby
[11:15:58] baweaver: has joined #ruby
[11:16:24] daxroc: The config flag isn't jumping out at me - any suggestion greatly appreciated
[11:18:48] johnnyt: has joined #ruby
[11:19:40] kknight: has joined #ruby
[11:20:59] FooMunki: has joined #ruby
[11:23:22] skullcrasher: has joined #ruby
[11:24:49] dlitvak: has joined #ruby
[11:24:57] dionysus69: has joined #ruby
[11:25:35] platzhirsch: has joined #ruby
[11:26:33] neohunter: has joined #ruby
[11:28:03] william3: has joined #ruby
[11:28:10] rapha: has joined #ruby
[11:28:49] dlitvak_: has joined #ruby
[11:29:14] rapha: Is there anything like "[nil, 'test'].join('_')", but which would return "test" instead of "_test" in case of a nil element in the array?
[11:29:25] apeiros: rapha: .compact before join
[11:29:43] william3: has joined #ruby
[11:31:17] platzhirsch: has left #ruby: ()
[11:31:35] PedramT: has joined #ruby
[11:32:21] apeiros: daxroc: if you don't get an answer here, I'd try the ML
[11:33:26] rapha: apeiros: super, thank you! :)
[11:33:27] dramagods: has joined #ruby
[11:34:45] askhat: has joined #ruby
[11:36:16] rapha: apeiros: and would you consider https://gist.github.com/sixtyfive/1128f8770fae9c3351c3 "okay" Ruby or is there a more beautiful way to express this?
[11:37:07] apeiros: rapha: ary.reject(&:blank?).join("_")
[11:37:15] apeiros: blank? is true for nil
[11:38:14] apeiros: and in your example, you can leave the () away around the expression you call .compact on. `ary.map { ??? }.compact` would work just fine.
[11:38:20] zacstewart: has joined #ruby
[11:38:51] rapha: ACTION reads and thinks
[11:39:09] william3: has joined #ruby
[11:39:22] rapha: so ruby can parse things that i can't
[11:39:31] rapha: (removing the parentheses)
[11:39:54] chouhoulis: has joined #ruby
[11:40:15] rapha: apeiros: what is the meaning of the ampersand and the colon in your version?
[11:40:40] p1k: &:<meth> is shorthand for {|x| x.<meth>}
[11:40:42] Jonah11_: has joined #ruby
[11:40:58] roshanav_: has joined #ruby
[11:41:16] apeiros: reject(&blk) call to_proc on blk and passes the returned Proc as a block to reject
[11:41:34] PedramT: has joined #ruby
[11:41:47] Shaboum: has joined #ruby
[11:41:52] apeiros: and Symbol#to_proc is close to what p1k just said - :foo.to_proc -> proc { |x,*args| x.send(self, *args) }
[11:41:57] rapha: ACTION 's horizon widens some
[11:42:07] last_staff: has joined #ruby
[11:42:13] rapha: p1k: meth was to mean method, right?
[11:42:46] rapha: apeiros: wait, the * is like the * in C?
[11:42:55] apeiros: ruby doesn't have pointers
[11:43:07] apeiros: * is splat/unsplat. similar to varargs in C
[11:43:28] rapha: so "any number of arguments between 0 and n"?
[11:43:31] apeiros: ary = [1,2,3]; a,b,c = *ary; c # => 3
[11:43:52] apeiros: and *args will collect them as an array. i.e. it'll be a 0-n sized array.
[11:44:08] rapha: okay, i understand that
[11:44:14] apeiros: that's in the definition of a method. when calling it, it does the reverse.
[11:44:38] rapha: oh so the concept of a method is actually written in ruby itself?
[11:44:39] Ox0dea: The complement.
[11:44:41] apeiros: i.e., def foo(a,b,c); ???; end; foo(*args) # will expand the array to pass its element as individual arguments
[11:45:09] apeiros: hmm, complement indeed describes that better. noted.
[11:45:41] Ox0dea: >> require 'fiddle'; Fiddle::Pointer.new(0)[] rescue $!
[11:45:43] ruby[bot]: Ox0dea: # => #<Fiddle::DLError: NULL pointer dereference> (https://eval.in/514858)
[11:45:54] Ox0dea: Null pointers in Ruby, the horror!
[11:46:10] rapha: Hmm now this is getting too wide a horizon for me :-P
[11:46:18] norc: Ox0dea: I wish it would simply crash in a horrible ball of fire instead.
[11:46:21] norc: And start nethack.
[11:46:29] atmosx: has joined #ruby
[11:46:36] Ox0dea: Doesn't Emacs do that?
[11:46:43] rapha: apeiros: I think I should read up some more on Procs. Thank you for your explanations as always! :)
[11:47:04] norc: Ox0dea: I wouldn't know, I club Emacs users to death with my large vi shared bat.
[11:47:08] norc: *shaped.
[11:47:24] norc: So they do not get to show me these features in the first place.
[11:49:21] Ox0dea: Vim ships with macros to play Towers of Hanoi, Conway's Game of Life, and a maze solver.
[11:49:25] norc: But then again it is quite obvious, as hjkl practice makes you a better nethack player.
[11:49:42] yfeldblum: has joined #ruby
[11:49:50] Ox0dea: That's everything going to plan, of course.
[11:49:51] norc: (Which is why Emacs users are so terrible at ascending)
[11:51:33] PedramT: has joined #ruby
[11:53:44] trinaldi: has joined #ruby
[11:59:28] rodfersou: has joined #ruby
[12:00:23] roshanavand: has joined #ruby
[12:01:07] william3: has joined #ruby
[12:01:34] PedramT: has joined #ruby
[12:02:03] william3: has joined #ruby
[12:02:38] ElFerna: has joined #ruby
[12:04:22] Mon_Ouie: has joined #ruby
[12:05:22] Ox0dea: norc: So this happened: https://eval.in/514889
[12:05:57] Ox0dea: IEEE 754 NaNs are so wasteful.
[12:06:14] Ox0dea: I wonder whether their payloads could be used to have tracing `nil`s in MRI.
[12:08:40] neohunter: has joined #ruby
[12:08:58] Ebok: has joined #ruby
[12:09:34] roshanavand: has joined #ruby
[12:09:35] dlitvak: has joined #ruby
[12:10:46] nhhagen: has joined #ruby
[12:12:17] burgestrand: has joined #ruby
[12:14:48] dlitvak: has joined #ruby
[12:17:25] sftrabbit: has joined #ruby
[12:18:14] crazydiamond: has joined #ruby
[12:18:48] ledestin: anybody remembers that "stages of naming" image? can't find it
[12:19:27] lessless: ledestin, Yeah, I want to see what methods were executed
[12:19:41] lessless: sorry, wrong channel
[12:19:51] apeiros: denial, anger, bargaining, depression, and acceptance? :)
[12:20:58] ledestin: apeiros no, something like bullshit, accurate, domain
[12:21:39] ledestin: https://twitter.com/andrzejkrzywda/status/662806645609730048
[12:22:03] minibar: has left #ruby: ("minibar is closed")
[12:22:44] Ebok: has joined #ruby
[12:22:51] neohunte1: has joined #ruby
[12:23:57] sepp2k: has joined #ruby
[12:25:05] neohunte1: has joined #ruby
[12:28:07] chthon: has joined #ruby
[12:28:30] jaiks: has joined #ruby
[12:28:34] sgambino: has joined #ruby
[12:30:49] sdothum: has joined #ruby
[12:30:52] berserk_ren: has joined #ruby
[12:34:01] askhat: has joined #ruby
[12:36:45] carella_: has joined #ruby
[12:36:52] william3: has joined #ruby
[12:39:17] zacstewart: has joined #ruby
[12:40:51] chouhoulis: has joined #ruby
[12:42:02] greg: has joined #ruby
[12:42:09] Cork: has joined #ruby
[12:42:32] Domaldel: has joined #ruby
[12:44:30] dramagods: has joined #ruby
[12:45:18] firstdayonthejob: has joined #ruby
[12:46:54] tknz: has joined #ruby
[12:48:16] bernalex: has left #ruby: ("WeeChat 1.2")
[12:50:56] karapetyan: has joined #ruby
[12:52:19] anisha: has joined #ruby
[12:52:37] despai: has joined #ruby
[12:53:28] Jardayn: has joined #ruby
[12:53:29] kknight: has joined #ruby
[12:54:57] dlitvak: has joined #ruby
[12:55:58] arashb: has joined #ruby
[12:56:14] norc: Ox0dea: I am trying to conceive a meaningful use case for this...
[12:56:31] Ox0dea: norc: Tracing nils?
[12:57:11] Ox0dea: You don't think having "instances" of nil that could tell you whence they came would be useful?
[12:58:29] apeiros: ACTION assumes performance considerations are an inhibition to that approach
[12:58:49] quaristice: has joined #ruby
[13:00:27] Ox0dea: Unless NaN payloads could be finagled into acting as nils...
[13:02:26] stannard: has joined #ruby
[13:03:57] pdoherty: has joined #ruby
[13:04:33] Ox0dea: Qnil could become a macro that returns a NaN whose payload is some relevant object_id.
[13:05:24] dlitvak: has joined #ruby
[13:05:55] evidex: has joined #ruby
[13:09:11] moeabdol: has joined #ruby
[13:11:49] atm0sphere: has joined #ruby
[13:14:32] shevy: ledestin giving things names is hard!
[13:16:04] adaedra: yep, it's one of the two hardest things: naming things, parallelism, off-by-one errors.
[13:18:01] IrishGringo: has joined #ruby
[13:19:24] william3: has joined #ruby
[13:23:48] idefine: has joined #ruby
[13:25:13] william3: has joined #ruby
[13:25:43] eGGsha: has joined #ruby
[13:28:26] neohunte1: has joined #ruby
[13:28:48] dcunit3d: has joined #ruby
[13:29:09] pawnbox: has joined #ruby
[13:29:28] shevy: you remembe eam
[13:29:31] shevy: *remember
[13:29:33] akem: has joined #ruby
[13:29:56] shevy: https://gist.github.com/shevegen/7b203529b95648c4d37e
[13:30:25] neohunte1: has joined #ruby
[13:31:02] neohunter: has joined #ruby
[13:32:05] askhat: has joined #ruby
[13:33:18] rdark: has joined #ruby
[13:33:31] RegulationD: has joined #ruby
[13:33:34] ponga: has joined #ruby
[13:34:51] adaedra: that's a common joke
[13:35:28] Zai00: has joined #ruby
[13:37:08] pawnbox: has joined #ruby
[13:40:16] casadei: has joined #ruby
[13:40:37] synthroid: has joined #ruby
[13:40:38] zacstewart: has joined #ruby
[13:41:07] JDiPierro: has joined #ruby
[13:41:25] chouhoulis: has joined #ruby
[13:42:44] Jonah11_: has joined #ruby
[13:42:54] failshell: has joined #ruby
[13:44:24] aryaching: has joined #ruby
[13:45:28] dramagods: has joined #ruby
[13:46:00] shazaum: has joined #ruby
[13:48:57] duckpuppy: has joined #ruby
[13:49:42] Azulinho: has joined #ruby
[13:49:46] Sembei: has joined #ruby
[13:51:00] dramagods: has joined #ruby
[13:51:39] william3: has joined #ruby
[13:55:48] karapetyan: has joined #ruby
[13:57:22] greg: has joined #ruby
[13:58:07] IrishGringo_: has joined #ruby
[13:58:29] adgtl: has joined #ruby
[13:58:53] nickjj: has joined #ruby
[13:59:26] nickjj_: has joined #ruby
[13:59:26] despai: has joined #ruby
[14:00:59] PedramT: has joined #ruby
[14:01:18] platzhirsch: has joined #ruby
[14:02:00] Abrin: has joined #ruby
[14:03:13] neohunter: has joined #ruby
[14:07:38] DubiousSquash: has joined #ruby
[14:08:19] iamvery: has joined #ruby
[14:08:42] platzhirsch: has left #ruby: ()
[14:11:52] neohunter: has joined #ruby
[14:12:41] sankaber: has joined #ruby
[14:13:13] johnmilton: has joined #ruby
[14:13:43] johnmilton: has joined #ruby
[14:14:15] M-shine: has joined #ruby
[14:14:59] roshanavand: has joined #ruby
[14:15:37] PedramT: has joined #ruby
[14:15:47] cdg: has joined #ruby
[14:16:14] peeja: has joined #ruby
[14:17:05] krobzaur: has joined #ruby
[14:17:15] JDiPierro: has joined #ruby
[14:17:23] norc: Ox0dea: No I do not.
[14:19:03] sgambino: has joined #ruby
[14:20:42] jordanm: has joined #ruby
[14:20:46] yoongkang: has joined #ruby
[14:21:04] PedramT_: has joined #ruby
[14:22:01] Ishido: has joined #ruby
[14:22:16] arthropododo: has joined #ruby
[14:22:21] rbennacer: has joined #ruby
[14:22:42] dopamean_: has joined #ruby
[14:24:06] IrishGringo: has joined #ruby
[14:24:10] M-Kodo: has joined #ruby
[14:24:36] william3: has joined #ruby
[14:25:37] freerobby: has joined #ruby
[14:25:47] mihael_k33hl: has joined #ruby
[14:26:01] norc: Ox0dea: I mean granted, for certain debugging scenarios this could possibly really awesome.
[14:26:39] malconis: has joined #ruby
[14:27:00] TomPeed: has joined #ruby
[14:27:16] floror: has joined #ruby
[14:28:25] Ropeney: has joined #ruby
[14:28:27] s00pcan: has joined #ruby
[14:29:17] Channel6: has joined #ruby
[14:29:19] zacstewart: has joined #ruby
[14:30:51] askhat: has joined #ruby
[14:31:12] PedramT: has joined #ruby
[14:31:16] sankaber: has joined #ruby
[14:31:31] norc: Assume I have a config class that looks like this: https://gist.github.com/anonymous/3382aa187731aa94eea3
[14:32:04] norc: Im wondering about a clean way to mock this File.read before its even required.
[14:32:06] duckpuppy: has joined #ruby
[14:32:15] norc: For my rspec tests.
[14:32:27] dfinninger: has joined #ruby
[14:33:39] norc: Or should I just dumb this silly code and use an initializer method for my config class that can be mocked before each test?
[14:36:26] dramagods: has joined #ruby
[14:41:02] PedramT: has joined #ruby
[14:41:02] ferr: has joined #ruby
[14:42:19] chouhoulis: has joined #ruby
[14:43:35] M-mistake: has joined #ruby
[14:43:50] arlek: has joined #ruby
[14:45:19] IrishGringo: has joined #ruby
[14:45:40] sdothum: has joined #ruby
[14:47:01] pawnbox: has joined #ruby
[14:49:19] dlitvak_: has joined #ruby
[14:49:24] zacstewart: has joined #ruby
[14:50:32] polishdub: has joined #ruby
[14:51:00] PedramT: has joined #ruby
[14:51:00] seitensei: has joined #ruby
[14:51:01] seitensei: has joined #ruby
[14:51:43] Jonah11_: has joined #ruby
[14:54:05] karmatr0n: has joined #ruby
[14:54:06] floror: has joined #ruby
[14:56:07] pawnbox: has joined #ruby
[14:57:02] selfadhesivefilm: has joined #ruby
[14:57:41] babblebre: has joined #ruby
[14:58:51] poguez_: has joined #ruby
[14:59:42] stardiviner: has joined #ruby
[15:00:30] Marsjan: has joined #ruby
[15:00:58] PedramT: has joined #ruby
[15:01:43] dfinninger: has joined #ruby
[15:01:53] karapetyan: has joined #ruby
[15:01:54] treehug88: has joined #ruby
[15:01:56] aryaching: has joined #ruby
[15:02:04] bronson_: has joined #ruby
[15:03:11] mondok: has joined #ruby
[15:03:32] pusewicz: has joined #ruby
[15:03:48] shazaum: has joined #ruby
[15:03:55] dionysus69: has joined #ruby
[15:04:56] william3_: has joined #ruby
[15:05:13] sepp2k: has joined #ruby
[15:05:28] dramagods: has joined #ruby
[15:05:28] idefine: has joined #ruby
[15:05:45] idefine: has joined #ruby
[15:05:57] haylon_: has joined #ruby
[15:05:57] rdar: has joined #ruby
[15:06:05] mdw: has joined #ruby
[15:07:44] Ishido: has joined #ruby
[15:10:37] Mon_Ouie: has joined #ruby
[15:11:08] PedramT: has joined #ruby
[15:12:32] Gnut: has joined #ruby
[15:13:46] rbennacer: has joined #ruby
[15:13:52] volty: has joined #ruby
[15:14:17] nofacade: has joined #ruby
[15:15:02] rbennacer: has joined #ruby
[15:15:05] zacstewart: has joined #ruby
[15:15:12] dlitvak: has joined #ruby
[15:15:49] ta: has joined #ruby
[15:16:09] dramagods: has joined #ruby
[15:16:50] JDiPierro: has joined #ruby
[15:18:38] baweaver: has joined #ruby
[15:19:22] sucks: has joined #ruby
[15:21:04] karapetyan: has joined #ruby
[15:21:04] PedramT: has joined #ruby
[15:21:27] pdoherty: has joined #ruby
[15:22:10] rbennacer: has joined #ruby
[15:22:36] burgestrand: has joined #ruby
[15:23:04] rbennacer: has joined #ruby
[15:23:16] momomomomo: has joined #ruby
[15:23:18] dlitvak: has joined #ruby
[15:25:27] idefine: has joined #ruby
[15:25:30] LoneHerm_: has joined #ruby
[15:25:46] wprice: has joined #ruby
[15:26:35] rbennacer: has joined #ruby
[15:27:03] Ropeney: has joined #ruby
[15:27:10] rbennacer: has joined #ruby
[15:27:55] mary5030: has joined #ruby
[15:28:05] stardiviner: has joined #ruby
[15:28:32] rbennacer: has joined #ruby
[15:28:33] DmitryBochkarev: has joined #ruby
[15:29:29] askhat: has joined #ruby
[15:30:11] shevy: http://taskwarrior.org/docs/advice.html
[15:30:19] shevy: "A looping, animated GIF will be watched over and over, scrutinized and understood."
[15:30:21] mary5030: has joined #ruby
[15:30:22] shevy: "A paragraph of text will be ignored."
[15:30:28] shevy: yay! we need more animated gifs on ruby projects
[15:32:45] Frem: has joined #ruby
[15:34:15] dtordable: hello my beloved shevy
[15:35:09] adgtl: has joined #ruby
[15:35:23] idefine: has joined #ruby
[15:35:31] tkmrdb: has joined #ruby
[15:35:43] sgambino: has joined #ruby
[15:36:00] apeiros: shevy: that's just a wall of text, lacking an animated gif. I ain't gonna read it.
[15:36:49] shevy: apeiros hahaha :D
[15:37:03] shevy: that was a great retort
[15:37:31] wldcordeiro: has joined #ruby
[15:37:32] arashb: has joined #ruby
[15:38:54] DefV: The fact that Date.parse("wrong input") raises an ArgumentError gives me the idea that I shouldn't use Date.parse(arg) where arg is user input. Any better way to do user-input-to-date-object ?
[15:40:22] dlitvak: has joined #ruby
[15:40:23] ljarvis: yeah it's a shit exception to raise but I still use it and rescue
[15:40:25] idefine: has joined #ruby
[15:40:31] IrishGringo: has joined #ruby
[15:40:41] ljarvis: presumably you don't know the format? if so then use Date.strptime
[15:40:52] ljarvis: (if you do know the format)
[15:41:03] DefV: I don't know the format :-) I'm currently rescueing it as well, it just feels... ugh
[15:41:05] PedramT: has joined #ruby
[15:41:19] adaedra: Impose the format.
[15:42:02] adaedra: Letting the format free = fighting upon dd/mm/aa or mm/dd/aa
[15:42:15] adaedra: dd/mm/yy or mm/dd/yy
[15:42:38] yoongkang: has joined #ruby
[15:42:43] ljarvis: ACTION still finds it unbelievable that people defend the latter
[15:42:44] apeiros: letting the format be free is not just fighting dd/mm/yy and mm/dd/yy etc., it's also fighting stupid, moronic and utterly idiotic :)
[15:42:46] shevy: long live dd.mm.yyyy!
[15:42:52] chouhoulis: has joined #ruby
[15:43:03] idefine: has joined #ruby
[15:43:13] DefV: valid points. I'm going to enforce it
[15:43:17] pandaant: has joined #ruby
[15:43:41] adaedra: ljarvis: it's just because that's how you say it in English: January the 1st, 2016
[15:43:53] ljarvis: yeah that's a terrible reason
[15:44:02] ljarvis: so i'll continue my wait for a good one
[15:44:08] adaedra: users are terrible.
[15:44:09] darix: use iso date/time format
[15:44:10] karapetyan: has joined #ruby
[15:44:15] adaedra: Standard is YYYY-MM-DD.
[15:44:19] ljarvis: i'd be fine going back to yyyy-mm-dd
[15:44:34] ljarvis: sortable ftw
[15:44:44] adaedra: I wonder if
[15:44:47] darix: ljarvis: and easy parsing
[15:44:47] ruby[bot]: adaedra: I don't know anything about iso8601
[15:44:53] shevy: what is ISO 8601 there?
[15:44:59] apeiros: shevy: date standards
[15:45:15] adaedra: !fact mk iso8601 Use yyyy-mm-dd. See https://xkcd.com/1179/
[15:45:16] ruby[bot]: adaedra: I will remember that iso8601 is Use yyyy-mm-dd. See https://xkcd.com/1179/
[15:45:32] DefV: strptime still raises ArgumentError for wrong dates though... :-)
[15:45:42] shevy: xkcd makes this a valid fact instantly!
[15:45:59] adaedra: *ISO* makes this a valid fact.
[15:46:31] apeiros: !fact ed iso8601 Use yyyy-mm-dd, ruby provides those via `require 'date'` as ::iso8601(input) and #iso8601 # => output. Also see https://en.wikipedia.org/wiki/ISO_8601 and https://xkcd.com/1179/
[15:46:31] ruby[bot]: apeiros: I stand corrected that iso8601 is Use yyyy-mm-dd, ruby provides those via `require 'date'` as ::iso8601(input) and #iso8601 # => output. Also see https://en.wikipedia.org/wiki/ISO_8601 and https://xkcd.com/1179/
[15:46:36] ljarvis: DefV: i mean, it's *technically* valid :) agree it's silly. You could re-raise if e.message != "invalid date"
[15:46:43] cantaberry: has joined #ruby
[15:46:49] ljarvis: :/ @ :: calling
[15:47:06] whippythellama: has joined #ruby
[15:47:22] darkxploit: has joined #ruby
[15:47:35] havenwood: Today is Prickle-Prickle, the 39th day of Chaos in the YOLD 3182, just sayin'.
[15:47:43] adaedra: apeiros: why the "# => output"?
[15:47:46] apeiros: ljarvis: hm? do you suggest we deviate from rdoc nomenclature?
[15:47:47] shevy: sounds like a cthulhu day
[15:47:48] volty: day, month, year = * "23/01/99".scan(/ \A (\d{1,2}) \/ (\d{1,2}) \/ (\d{1,4}) \z/x).flatten.map(&:to_i); Date.valid_date?(year, month, day)
[15:47:58] volty: (or like that ....)
[15:47:59] ljarvis: apeiros: grumble
[15:48:01] apeiros: adaedra: to make class vs. instance method more clear
[15:48:21] jgt4: has joined #ruby
[15:48:24] adaedra: make up your mind between () and # => then.
[15:48:25] apeiros: havenwood: yay discordian calendar!
[15:48:31] Bish: i still don't have the right clue when having to load ruby dependencies in the right order
[15:48:31] apeiros: I still want to add one on top of chronos :D
[15:48:34] yorickpeterse: havenwood: you high?
[15:48:41] apeiros: (yes, it lives)
[15:48:42] shevy: Bish start from the basic file
[15:49:08] jgpawletko_: has joined #ruby
[15:49:10] Bish: i do, i have a file-hierachy where the most specialized files are in bottom / leafes
[15:49:15] apeiros: adaedra: how's that a decision between () and # => ?
[15:49:16] alexherbo2: has joined #ruby
[15:49:22] blandflakes: has joined #ruby
[15:49:25] ceej: has joined #ruby
[15:49:36] Bish: but when i do Dir['*/**.rb'] it does a DFS, as it seems
[15:49:39] shevy: Bish and from there, start to add what you need in a given file. if you have too many files in a given directory, you can use Dir[] to batch-require, then you don't have to manually specify individual requires
[15:49:40] adaedra: ah no, I see what you wanted to do
[15:49:43] adaedra: not very clear imo
[15:49:52] ljarvis: Bish: don't glob+require if you care about precedence
[15:49:59] apeiros: adaedra: so ::iso8601/#iso8601 and hope people know?
[15:50:08] Bish: ljarvis: what else is there?
[15:50:15] ljarvis: Bish: manual requires? :/
[15:50:24] jas02: has joined #ruby
[15:50:25] ljarvis: like.. normal
[15:50:30] adaedra: apeiros: could wire `derpy to also paste link docs just below :o)
[15:50:30] shevy: Bish yes, that is why you must de-componentize the files. if you have a big project that has this circular dependency thing, it may be best to start from zero (while keeping the code) and add things bit by bit back in
[15:50:33] Bish: like, doing it by hand?!
[15:50:51] apeiros: adaedra: could finally add that to ruboto :-p
[15:51:01] Bish: there are no circular dependecies, just wrong order, or is it the same thing * think*
[15:51:03] apeiros: Bish: zeroload
[15:51:21] mdw: has joined #ruby
[15:51:28] ljarvis: Bish: current project has ~700 requires in lots of different places. All by hand, it's not exactly difficult
[15:51:32] apeiros: if you feel like deviating from conventions: https://github.com/apeiros/zeroload
[15:51:51] Bish: ljarvis: not difficult but feels like too much wurk
[15:51:55] zacstewa_: has joined #ruby
[15:52:11] ljarvis: then get a better editor :)
[15:52:15] decoponio: has joined #ruby
[15:52:17] Bish: for smth that could be done in one line
[15:52:23] apeiros: should have added the "doesn't fit with current conventions" to the caveats :-|
[15:52:26] Bish: no matter what editor, you'd still have to press a button to add the
[15:52:31] ljarvis: apeiros: yeah wtf Foo
[15:52:56] ljarvis: Bish: I bet I write those requires by hand quicker than you write that glob
[15:53:07] apeiros: ljarvis: you mean "wtf Foo.rb"?
[15:53:14] ljarvis: apeiros: ya and the dir
[15:53:22] Bish: you can write them as fast as you want, but i only HAD to do it once, if it worked
[15:53:28] apeiros: ljarvis: honestly one of my oldest pet peeves with ruby
[15:53:37] ljarvis: Bish: ok fair enough
[15:53:41] shevy: Bish yeah it required more work compared to the 1.8.x era
[15:53:45] ljarvis: enjoy inconsistent requires
[15:53:47] apeiros: not mapping constants 1:1 with files is cause for a couple of pains
[15:53:57] shevy: Bish but you can use Dir[] just fine, just put things into a subdirectory and batch-require all from there
[15:53:57] ljarvis: apeiros: heh :)
[15:54:18] Fire-Dragon-DoL: has joined #ruby
[15:54:24] Bish: shevy: that's what im doing, but since it does DFS(guess) i don't know how to place them correctly
[15:54:34] stardiviner: has joined #ruby
[15:54:37] Bish: if DIR[] or glob did BFS it would be fine
[15:55:21] volty: has left #ruby: ("Konversation terminated!")
[15:55:24] Bish: ljarvis: what is inconstistent about it, assuming it would walk the files always in the same order
[15:55:55] PedramT: has joined #ruby
[15:58:33] Azure: has joined #ruby
[15:58:47] shevy: Bish I think you may have to do this step by step once, manually. it's like an applied practical skill, once you understand how it works, you'll not incur those circular problems (or you know how to re-shuffle files). for instance, what I sometimes do is, when there is a shared dependency on some subcomponent, I put this into a separate .rb file and then have the files that need it, require it. it's all anno
[15:58:47] shevy: ying compared to 1.8.x but it is a solvable problem
[15:59:01] kies^: has joined #ruby
[15:59:38] Bish: well, will do, but i feel like it is not neccessary
[16:01:32] Timberwo|f: has joined #ruby
[16:01:42] atmosx: has joined #ruby
[16:02:07] Bish: i feel like if you sorted the array with the amount of '/'s in the path, you'd be able to have enough structure in hierachy
[16:02:16] Bish: i mean, you're forced to do that, if you want namespaces anyways.
[16:02:33] neohunter: has joined #ruby
[16:04:26] CrazyEddy: has joined #ruby
[16:04:26] shevy: yeah I guess you can sorta do that too
[16:04:33] shevy: a.rb aa.rb ab.rb .... :)))
[16:04:48] idefine: has joined #ruby
[16:05:03] Bish: :D not that same thing, but funny:3
[16:05:15] griffindy: has joined #ruby
[16:05:21] Bish: .oO .sort is not stable?
[16:05:54] apeiros: sort may or may not be stable. it's not guaranteed.
[16:06:04] apeiros: iow, you have to assume it's not stable.
[16:06:11] baweaver: has joined #ruby
[16:06:25] apeiros: but given that you can't have files with identical paths, stability of sort shouldn't be an issue, no?
[16:06:49] houhoulis: has joined #ruby
[16:07:12] PlasmaStar: has joined #ruby
[16:07:12] Bish: well :D i dunno
[16:07:15] scepticulous: has joined #ruby
[16:07:19] chouhoulis: has joined #ruby
[16:07:38] Bish: but because im curious: what do i have to do to have stable sort in ruby?
[16:07:42] Bish: inb4 write it.
[16:08:07] apeiros: make index/value tuples
[16:08:12] william3_: has joined #ruby
[16:08:17] apeiros: or implement one in C using a stable algorithm
[16:08:38] chouhoulis: has joined #ruby
[16:09:03] apeiros: (or in ruby, but that'll probably be rather slow)
[16:09:31] IrishGringo_: has joined #ruby
[16:10:29] karapetyan: has joined #ruby
[16:10:29] tomchapin: has joined #ruby
[16:10:48] Cork: has joined #ruby
[16:11:24] wolffles: has joined #ruby
[16:12:56] Bloomer: has joined #ruby
[16:14:25] ferr: has joined #ruby
[16:15:37] chipotle: has joined #ruby
[16:15:45] idefine: has joined #ruby
[16:16:23] JDiPierro: has joined #ruby
[16:17:09] rdark: has joined #ruby
[16:17:40] sandstrom: has joined #ruby
[16:19:37] kknight: has joined #ruby
[16:20:14] flughafen_: has joined #ruby
[16:21:05] sandstrom: has joined #ruby
[16:21:06] aspiers: has joined #ruby
[16:21:40] dayjo: has joined #ruby
[16:21:43] nofxx: has joined #ruby
[16:22:13] karapetyan: has joined #ruby
[16:24:08] karapetyan: has joined #ruby
[16:25:02] griffindy: has joined #ruby
[16:25:24] zast: has joined #ruby
[16:27:00] tomchapin: has joined #ruby
[16:27:14] symbol: has joined #ruby
[16:28:03] deuterium: has joined #ruby
[16:28:04] askhat: has joined #ruby
[16:29:01] misalliance: has joined #ruby
[16:29:51] Rubie: has joined #ruby
[16:30:21] jean-pedro: has joined #ruby
[16:30:45] platzhirsch: has joined #ruby
[16:31:03] idefine: has joined #ruby
[16:31:34] Rubie: hi all: im trying to figure out why one of these parallel assignments works and the other does not. Can someone take a look https://gist.github.com/anonymous/bf9a591c8f1dc5eb984d
[16:32:06] preyalone: has joined #ruby
[16:32:25] Papierkorb: rubie: 'doesn't work' is not an error description
[16:32:31] sgambino: has joined #ruby
[16:32:45] kknight: has joined #ruby
[16:32:45] jean-pedro: I have an issue when trying to load a module in ruby shell -> http://pastebin.com/zW3Fbihp
[16:32:45] ruby[bot]: jean-pedro: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/c021d89960a64de055d2
[16:32:47] ruby[bot]: jean-pedro: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[16:33:15] Rubie: Papierkorb: it does not error
[16:33:23] dudedudeman: has joined #ruby
[16:33:42] Rubie: Papierkorb: it does not swap the elements like expected
[16:34:00] Papierkorb: rubie: the assignment looks fine. But "doesn't work" is still not any kind of useful description. Are you even sure it hits the line?
[16:34:32] Rubie: Papierkorb: yes it hits the line and also has the correct values, but does not swap them
[16:34:42] Papierkorb: rubie: It does work, but I guess it's not doing what you want.
[16:34:43] zacstewart: has joined #ruby
[16:34:51] Papierkorb: rubie: why should that switch the elements in the array?
[16:34:56] houhoulis: has joined #ruby
[16:34:59] RegulationD: has joined #ruby
[16:35:10] william3: has joined #ruby
[16:35:51] Rubie: Papierkorb: because it references the items in the array that we want to switch
[16:36:05] Papierkorb: rubie: Why should it reference the items *in the array* ?
[16:36:38] Papierkorb: rubie: those variables reference objects which may have come out of an array, but that doesn't matter. it switches the two variables just fine
[16:36:40] Rubie: Papierkorb: so it loses its reference to the array
[16:36:53] Papierkorb: rubie: of course.
[16:36:53] B1n4r10: has joined #ruby
[16:37:17] tomchapin: has joined #ruby
[16:37:42] DmitryBochkarev: has joined #ruby
[16:37:43] Papierkorb: rubie: in fact, it does not lose the reference to the array, rather, it never had one to begin with
[16:38:01] Rubie: but input[i] references the array?
[16:38:20] Papierkorb: rubie: no, that references the i-th element of the array
[16:38:56] Papierkorb: rubie: but you're modifying the array at https://gist.github.com/anonymous/bf9a591c8f1dc5eb984d#file-rb-L44
[16:39:20] tomchapin: has joined #ruby
[16:39:37] aryaching: has joined #ruby
[16:40:05] Rubie: Papierkorb: okay that makes sense now, thanks
[16:40:09] william3: has joined #ruby
[16:42:57] IrishGringo: has joined #ruby
[16:43:17] sandstrom: has joined #ruby
[16:43:29] symm-: has joined #ruby
[16:43:58] [Butch]: has joined #ruby
[16:45:46] DonOtreply: has joined #ruby
[16:46:36] JDiPierro: has joined #ruby
[16:47:23] Asher: has joined #ruby
[16:47:55] Infra-Red: has joined #ruby
[16:47:56] paul98: has joined #ruby
[16:48:14] paul98: does ruby gem install all packages required e.g other gems trying to install knife-esx
[16:48:16] symbol: has joined #ruby
[16:48:23] tomchapin: has joined #ruby
[16:49:57] Rutix: has joined #ruby
[16:49:57] Rutix: has joined #ruby
[16:49:57] Infra-Red: has joined #ruby
[16:50:51] tomchapin: has joined #ruby
[16:51:32] platzhirsch: has left #ruby: ()
[16:51:43] shevy: paul98 yeah, it will try to resolve the given dependencies as specified
[16:52:00] IrishGringo: has joined #ruby
[16:52:07] dopamean_: has joined #ruby
[16:53:18] johnnyt: has joined #ruby
[16:54:07] moeabdol: has joined #ruby
[16:54:09] paul98: shevy: http://pastebin.com/tHinB73p any ideas on that one then?
[16:54:10] ruby[bot]: paul98: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/9cc53c8afe05a4735b1c
[16:54:10] ruby[bot]: paul98: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[16:54:15] hobodave: has joined #ruby
[16:54:17] paul98: i don't really know ruby
[16:54:54] shevy: paul98 yes that is another problem, your system lacks some header
[16:55:21] paul98: any ideas on a fix! :)
[16:55:22] shevy: something is odd with that gem anyway, do "gem install alchemist"
[16:55:31] paul98: i've installed that
[16:55:39] paul98: it failed with that one first
[16:55:42] eam: paul98: install the ruby development packages
[16:55:46] havenwood: paul98: Make sure you've got the full Ruby package installed: sudo apt-get install ruby-full
[16:55:59] diegoviola: has joined #ruby
[16:56:07] paul98: ah might help! :)
[16:56:29] paul98: will go try that havenwood eam
[16:56:33] anisha: has joined #ruby
[16:56:44] Jonah11_: has joined #ruby
[16:58:27] Limix: has joined #ruby
[17:00:54] sandstrom: has joined #ruby
[17:01:52] paul98: installed the ruby-full with no errors tryed it do gem install rbvmomi and got hte following https://gist.github.com/anonymous/0ea18a0ae141de8df257
[17:02:20] Ben_1: has joined #ruby
[17:02:57] davedev24: has joined #ruby
[17:03:37] Ben_1: is there a open source project in ruby that shows a irc view? I want to connect to an IRC server and join several channels using ruby in the browser.
[17:03:54] duckpuppy: has joined #ruby
[17:04:44] haylon_: Ben_1: I haven't seen anythign like that, just Kiwi. Usually when I google something like that, it returns IRC Bots like Cinch, or Lita
[17:05:40] mfb2: has joined #ruby
[17:05:59] sgambino: has joined #ruby
[17:06:08] Emmanuel_Chanel: has joined #ruby
[17:06:09] Ben_1: haylon_: yah I had the same result google something like that. But I think ruby would be a good environment for something like that. I just know a pjirc and that is not really what I'm searching for
[17:06:10] synthroid: has joined #ruby
[17:06:32] william3: has joined #ruby
[17:07:04] haylon_: Ben_1: the only other option I could think of is to just impliment it using the RFC, but that would take forever on your own.
[17:08:26] Rubie: has joined #ruby
[17:08:41] apeiros: just use one of the many irc implementations for ruby
[17:08:41] moeabdol: has joined #ruby
[17:08:47] apeiros: and add a webview on top
[17:09:01] apeiros: shouldn't be all that difficult
[17:09:21] amclain: has joined #ruby
[17:09:40] pawnbox: has joined #ruby
[17:10:15] symbole: has joined #ruby
[17:10:50] karapetyan: has joined #ruby
[17:11:03] Ben_1: apeiros: never used ruby and I don't have time at the moment, that's why I'm searching for a solution that is already established. But it seems there is no one, so at the end of the year I have to learn ruby and implement it myself.
[17:11:15] Infra-Red: has joined #ruby
[17:12:21] tomchapin: has joined #ruby
[17:12:27] william3: has joined #ruby
[17:12:38] haylon_: Ben_1: You might be able to ask for help if you post in the ruby-lang forums, or something. Or create a project on GitHub, and then ask in here.
[17:12:43] haylon_: just would require some planning.
[17:12:51] chipotle_: has joined #ruby
[17:13:09] haylon_: apeiros: What is one of the many implimentations you're talking of?
[17:14:15] gambl0re: has joined #ruby
[17:14:19] idefine__: has joined #ruby
[17:14:32] idefine: has joined #ruby
[17:14:46] DonOtreply: has joined #ruby
[17:16:00] rbennacer: has joined #ruby
[17:16:04] platzhirsch: has joined #ruby
[17:16:08] solars: has joined #ruby
[17:17:27] nejm: has joined #ruby
[17:18:44] diegoviola: Ben_1: perhaps use this as a reference: https://github.com/glowing-bear/glowing-bear
[17:19:05] diegoviola: that's basically a webview that connects to a weechat session
[17:19:38] pipework: Ben_1: There are many web irc lcients
[17:19:40] pipework: clients too
[17:19:48] wolffles: this isnt ruby related but im watching a video on how to use git hub and this guy uses git add -A instead of file name wondering what -A stands for
[17:19:52] sandstrom: has joined #ruby
[17:20:14] diegoviola: replace the weechat part with your ruby solution
[17:21:03] idefine: has joined #ruby
[17:21:13] adaedra: wolffles: git help add
[17:21:17] idefine: has joined #ruby
[17:23:02] adaedra: A for "Ah don't care, just add everything"
[17:23:52] TomyLobo: has joined #ruby
[17:23:58] freerobby: has joined #ruby
[17:24:06] IrishGringo: has joined #ruby
[17:24:22] Ben_1: pipework: but I'm searching for a ruby irc webclient because I want to integrate someday in a redmine plugin or something
[17:24:31] zacstewa_: has joined #ruby
[17:24:51] bluOxigen_: has joined #ruby
[17:24:54] apeiros: haylon_: cinch, rbot, autumn_leaves
[17:24:56] pipework: Ben_1: I, too, would enjoy browser-based projects that are usable and extensible.
[17:25:03] wolffles: haha i thought so just wanted to confirm it
[17:25:06] apeiros: I'm pretty sure you'll find plenty on ruby-toolbox
[17:25:22] pipework: Ben_1: If you just want a ruby bot without the frontend part, you don't need a library, but there are almost tonnes of them.
[17:25:38] elifoster: has joined #ruby
[17:25:58] apeiros: good luck dealing with all the quirks if you don't use a library
[17:26:04] haylon_: apeiros: I guess I'll need to figure out how to use those frameworks beyond making a bot. Or am I thinking of that the wrong way?
[17:26:37] apeiros: haylon_: use the bot to feed your ui
[17:27:07] haylon_: See, I was thinking of that wrong.
[17:27:11] pipework: apeiros: Good luck with dealing with all the quirks of anything but the best library. :D
[17:27:14] treehug88: has joined #ruby
[17:27:19] idefine: has joined #ruby
[17:27:22] Ben_1: pipework: I said nothing about a bot, I was talking about a webview a user can connect to an irc server and chat.
[17:27:28] apeiros: pipework: hence I wrote my own. but it's far from "not much work" :-p
[17:27:28] syath: has joined #ruby
[17:27:54] apeiros: and I'd claim it's rather quirks-free. but granted, only when using it on freenode. no idea what quirks it misses on all the other ircd's
[17:27:56] haylon_: Ben_1: like apeiros just told me, you'd use the bot to feed to your UI, and then feed commands to your bot, which would then in turn feed it into the IRC Channel
[17:28:11] askhat: has joined #ruby
[17:28:14] pipework: apeiros: I don't know, I got more than everything I needed for an IRC bot done in a day, including an architecture that allows everything to die except the connection handler without bringing the bot down.
[17:28:24] apeiros: Ben_1: the bot is mostly there to avoid you having to reinvent all irc mechanics and use existing work
[17:28:25] pipework: IRC is a simple plain text protocol that's not hard for people to build clients for.
[17:28:27] pipework: Server??? well.
[17:28:46] lurch_: has joined #ruby
[17:28:55] apeiros: pipework: I'm pretty sure I could point you out a couple of short-comings within a couple of minutes ;-p
[17:29:00] Ben_1: haylon_: this will work for few users, but if I use a redmine installation with hundrets of developers, this would be not realldy comfortable
[17:29:00] misalliance: has joined #ruby
[17:29:20] pipework: apeiros: I bet they'd not be big enough deals. I've been writing IRC bots since the early 00's because I'm a youngin'
[17:29:25] haylon_: Ben_1: could you possibly create forks, or threads?
[17:29:29] sdothum: has joined #ruby
[17:29:33] diegoviola: would you need websockets for that or some async? :p
[17:29:44] Limix: has joined #ruby
[17:29:47] apeiros: pipework: but yeah, sure, if you can manage to live with a couple of quirks you can reduce the work a lot.
[17:29:48] haylon_: I would think async
[17:29:50] pipework: Ben_1: So, what you're saying is you need a way to open a socket, connect to an IRC server, and send those messages to browsers.
[17:29:56] apeiros: 80/20 once again
[17:30:01] freerobby: has joined #ruby
[17:30:53] pipework: apeiros: I think it's more like 90+
[17:31:06] apeiros: pipework: I think you're missing a lot of quirks if you think that :-p
[17:31:20] Ben_1: pipework: yes, a whole IRC client that someone can use in his browser
[17:31:25] pipework: apeiros: Like what kind of 'quirk'? Are you talking about weird IRCd?
[17:31:40] pipework: Ben_1: I don't know why you think you can have a full IRC client in the browser written in ruby very sanely.
[17:31:55] pipework: There is things like opal.
[17:31:56] apeiros: pipework: talking about properly dissecting an irc message for starters
[17:31:58] JohnBat26: has joined #ruby
[17:32:06] haylon_: pipework: somehow KiwiIRC did, using Node
[17:32:12] apeiros: doesn't get easier by servers violating the rfc either
[17:32:22] JohnBat26: has joined #ruby
[17:32:22] Ben_1: pipework: because there are already implementations in other languages e.g. pjirc, and I don't know why it should not work in ruby too
[17:32:26] pipework: apeiros: 'properly' as in you don't toss colors and shit?
[17:32:39] apeiros: properly as in deal with commands with and without : for last arg
[17:32:50] pipework: Ben_1: You can have a 'server' that connects to IRC and stands between the real IRC server and the client.
[17:33:14] apeiros: properly as in correctly identify in a mode command which letter belongs to which arg
[17:33:16] pipework: But a browser client isn't likely going to be a 'whole IRC client that someone can use in his browser' in ruby.
[17:33:38] pipework: You may have some of it in ruby, but your browser client would probably need to talk to a server, written in ruby.
[17:33:47] pipework: Or you can use opal to hopefully get maybe all of it in ruby.
[17:34:03] asdx: has joined #ruby
[17:34:14] SenpaiSilver: has joined #ruby
[17:34:25] pipework: Ben_1: What it sounds like what you want is to build/find a web-client for IRC that can be extended with ruby and maybe written primarily with ruby.
[17:34:43] levo: has joined #ruby
[17:34:43] RegulationD: has joined #ruby
[17:35:11] Ben_1: pipework: mh maybe, a javascript client that talks to an irc server and is integrated to redmines UI
[17:35:30] idefine: has joined #ruby
[17:35:33] pipework: Ben_1: So, you want the user to be able to use the web client to send and receive messages, right?
[17:35:35] pipework: Not just read.
[17:36:14] Ben_1: pipework: yes, I want that a developer logs in his redmine account and this account should be used when the webclient connects to the irc server
[17:37:05] pipework: apeiros: Which mode commands are you referring? User?
[17:37:28] Alayde: has joined #ruby
[17:37:33] pdoherty: has joined #ruby
[17:37:42] Ben_1: pipework: kiwiirc looks like what I'm searching for, now I have to integrate it to redmine if its possible :)
[17:37:50] apeiros: I don't actually remember - are there user modes which take an argument?
[17:38:03] pipework: apeiros: I've only implemented handling modes for admin and for detecting voiced users mostly.
[17:38:27] pipework: It wasn't hard, but maybe what you're talking about is more than just querying for modes and being able to cause the bot to change modes.
[17:38:30] apeiros: that's not via the mode command, though
[17:38:38] apeiros: unless you mean you parse +o/-o
[17:39:06] apeiros: and with op/voiced, do you use isupport to identify which is which?
[17:39:30] al2o3-cr: has joined #ruby
[17:39:33] sandstrom: has joined #ruby
[17:39:33] apeiros: or blindly assume @=op, +=voice?
[17:41:53] haylon_: Ben_1: you might also have some luck with https://qwebirc.org its what Freenode, and Quake, as well as most other IRC servers use as a basic, default web IRC Client
[17:42:04] pipework: apeiros: I use the NAMES raw command mostly.
[17:42:30] apeiros: so blindly assume ;-)
[17:42:39] apeiros: that'd be one quirk without even seeing your code
[17:42:49] apeiros: but you'll probably be fine in >99% of all cases
[17:42:56] DonOtreply: has joined #ruby
[17:43:00] Emmanuel_Chanel: has joined #ruby
[17:43:05] pipework: apeiros: I don't know that it is, because the symbol is configurable. )
[17:43:07] apeiros: at least I haven't seen a server yet which actually uses different sigils for op & voice
[17:43:26] pipework: I've been in more IRCds than ircd-seven.
[17:43:28] apeiros: pipework: the server sends via isupport which sigil is what
[17:43:34] pipework: apeiros: I didn't know that!
[17:43:43] pipework: But mine had no bug.
[17:43:49] levlev: has joined #ruby
[17:43:56] apeiros: s/had no bug/worked as expected/
[17:43:57] pipework: You just have a neat feature I'm going to go make sure I have to!
[17:44:02] apeiros: not the same ;-)
[17:44:08] pipework: Mine had no such bug.
[17:44:16] Devalo: has joined #ruby
[17:44:18] pipework: such is such a useful word, if used as such.
[17:44:21] yoongkang: has joined #ruby
[17:44:24] apeiros: but yeah, I can imagine. as said, I haven't heard of a server which does not use @ for op and + for voice
[17:44:43] mikecmpbll: has joined #ruby
[17:44:55] pipework: apeiros: I've seen ~ for ops (not fullops or whatever)
[17:44:56] apeiros: so actually reading those out of isupport is part of "additional work which can be foregone if you can live with a couple of quirks"
[17:45:06] levlev: anyone have any ideas about how to go about building a barebones IRC client? I found several repos that do it but they're large and obfuscated
[17:45:08] pipework: Yeah, that makes sense.
[17:45:12] Ebok: has joined #ruby
[17:45:17] idefine_: has joined #ruby
[17:45:39] apeiros: levlev: I don't think cinch is obfuscated?
[17:45:57] pipework: A normal IRC client is going to be quite a bit more complex than a bot though.
[17:46:08] pipework: But cinch probably will get you really far along the path.
[17:46:29] pipework: Hopefully not a bad one, never really tried converting an IRC bot architecture into an IRC client, but at least you'll learn some stuff.
[17:46:45] apeiros: hm, dunno. upon butler I'd say all that is left is a UI and you'd have a full client.
[17:46:59] cschneid_: has joined #ruby
[17:47:11] symbole: has joined #ruby
[17:47:42] Devalo: Hello. What would be the easiest way to add a number (index, id) in front of each line pushed into another file? I'm writing a command-line todo app, and I want to give each written line an id, so that I can reference to it later (for example when I want to delete that particular todo item)
[17:47:53] levlev: butler looks similar to what I'm looking for, thanks!
[17:47:56] apeiros: Devalo: what have you tried?
[17:48:08] apeiros: levlev: uuuuh, don't use the currently published butler. it's out of date.
[17:48:19] baweaver: has joined #ruby
[17:48:19] pipework: I don't know, I've built little 'say'-like features on top of bots, but I'd think there's more to handle that most and my, IRC bots disregard or don't support.
[17:48:26] apeiros: I've rewritten it for ruby 2.3, but not yet published. the published code base is ~7y old
[17:48:32] pipework: For me, I dislike color, so maybe there's better color support elsewhere.
[17:49:03] gizmore: has joined #ruby
[17:49:04] baweaver: has joined #ruby
[17:50:56] Devalo: apeiros: When I list my todo's i've used .each.with_index. I've tried to hack it together so when I want to delete a todo, I open the file up with with_index, and target that particular id. However it deletes the whole list, not the item itself. I havent figured out a way to add an id/index when I write it to file.
[17:51:51] Ben_1: has left #ruby: ()
[17:51:53] apeiros: Devalo: you may want to use .readlines and Array#delete_at for deleting
[17:51:59] lemur: has joined #ruby
[17:52:04] apeiros: as for the rest, I'd suggest you gist your code
[17:52:47] levlev: has left #ruby: ()
[17:53:15] Devalo: apeiros: I'll look into that. I'll gist it if I dont get any further. Thanks.
[17:53:52] lxsameer: has joined #ruby
[17:54:02] anisha: has joined #ruby
[17:54:12] apeiros: Devalo: but with_index is IMO a viable approach
[17:54:57] Devalo: apeiros: As long as I figure out a way to target and delete the item with with_index.
[17:55:12] apeiros: yeah, there I wouldn't use with_index :)
[17:55:39] Devalo: :p with_index works perfectly for listing items for now
[17:57:40] adgtl: has joined #ruby
[17:57:44] platzhirsch: has left #ruby: ()
[17:59:06] PedramT: has joined #ruby
[17:59:50] tildes: has joined #ruby
[18:00:00] ElFerna: has joined #ruby
[18:00:32] wldcordeiro: has joined #ruby
[18:00:46] rbennacer: has joined #ruby
[18:02:00] troulouliou_divn: has joined #ruby
[18:02:06] zacstewart: has joined #ruby
[18:02:26] symbol: has joined #ruby
[18:02:48] Azure: has joined #ruby
[18:02:48] pipework: Devalo: Is the file sorted by index?
[18:03:00] idefine: has joined #ruby
[18:03:35] bluOxigen: has joined #ruby
[18:04:03] pipework: If so, `system("sed -i '#{line_number}d' my_file.txt)` or something like that would remove the line entirely from the file.
[18:04:18] mdw: has joined #ruby
[18:05:00] pipework: Then you don't need to open the file and read through it or anything.
[18:05:03] sandstrom: has joined #ruby
[18:05:51] pipework: If you sort lines in the file by their index number and you automatically re-index when stuff is added/deleted as necessary, that could work.
[18:07:33] last_staff: has joined #ruby
[18:09:44] Devalo: pipework: Hmm. I'll look into that.
[18:10:46] treehug88: has joined #ruby
[18:11:14] blandflakes: has joined #ruby
[18:12:12] pipework: Devalo: Yeah, if you sort_by(&:numerical_id_method_name_for_todo_object) and then write to the file, they'll be in the order by index.
[18:12:18] zacstewart: has joined #ruby
[18:12:38] pipework: Then you can just use sed or awk with system (you do have something that has awk or sed, right?) to delete the line right out of the file, super fast easy peasy
[18:13:00] jackjackdripper: has joined #ruby
[18:14:00] Devalo: They are not sorted by their index number inside the file. I only list them with the with_index method right now. I'm working on a way to add index to each line as I write them to the file. Your example on deleting the indexed lines could be pretty nice then
[18:14:25] pipework: Devalo: I mean, you don't need to persist the id's to a file.
[18:14:29] pipework: You just need to sort and write.
[18:14:35] Alayde: has left #ruby: ("WeeChat 1.1.1")
[18:14:40] pipework: That does leave some room for possible mistakes though.
[18:14:47] plonk: has joined #ruby
[18:14:47] plonk: has joined #ruby
[18:16:15] sdothum: has joined #ruby
[18:17:53] sandstrom: has joined #ruby
[18:17:59] sucks: has joined #ruby
[18:19:52] djbkd: has joined #ruby
[18:20:09] visudo: has joined #ruby
[18:21:12] rcvalle: has joined #ruby
[18:21:18] symm-: has joined #ruby
[18:22:01] andrew: has joined #ruby
[18:23:34] SCHAAP137: has joined #ruby
[18:23:50] rikkipitt: has joined #ruby
[18:24:35] ddv: has joined #ruby
[18:25:45] bronson_: has joined #ruby
[18:26:09] askhat: has joined #ruby
[18:26:23] arlek: has joined #ruby
[18:27:51] al2o3-cr: has joined #ruby
[18:28:04] DoubleMalt: has joined #ruby
[18:29:18] sandstrom: has joined #ruby
[18:30:47] karapetyan: has joined #ruby
[18:31:38] rakm: has joined #ruby
[18:32:19] PaulCapestany: has joined #ruby
[18:33:24] moeabdol1: has joined #ruby
[18:35:15] PedramT: has joined #ruby
[18:36:16] baweaver: has joined #ruby
[18:36:21] gambl0re: has joined #ruby
[18:36:22] gambl0re: has joined #ruby
[18:41:08] kknight: has joined #ruby
[18:42:03] intrigueD: has joined #ruby
[18:43:41] fogle: has joined #ruby
[18:45:17] Ebok: has joined #ruby
[18:46:25] roshanavand: has joined #ruby
[18:46:37] idefine: has joined #ruby
[18:46:48] Wolland: has joined #ruby
[18:47:09] dasher00: has joined #ruby
[18:48:25] Azure: has joined #ruby
[18:48:53] sandstrom: has joined #ruby
[18:50:25] rikkipitt: has joined #ruby
[18:51:22] momomomomo: has joined #ruby
[18:54:03] tjohnson: has joined #ruby
[18:55:53] ta: has joined #ruby
[18:56:11] ramortegui: has joined #ruby
[18:56:21] rbennacer: has joined #ruby
[18:56:32] Eiam: has joined #ruby
[18:56:42] zeroDivisible: has joined #ruby
[18:57:53] seitensei: has joined #ruby
[18:57:53] seitensei: has joined #ruby
[18:58:51] sftrabbit: has joined #ruby
[18:59:12] einarj: has joined #ruby
[18:59:41] djbkd: has joined #ruby
[19:00:20] godzillaenlacasa: has joined #ruby
[19:01:12] djbkd: has joined #ruby
[19:01:19] TomPeed: has joined #ruby
[19:02:36] seitensei: has joined #ruby
[19:03:47] einarj: has joined #ruby
[19:04:01] zacstewa_: has joined #ruby
[19:04:51] rbennacer: has joined #ruby
[19:05:39] rbennacer: has joined #ruby
[19:06:47] shadoi: has joined #ruby
[19:06:49] sandstrom: has joined #ruby
[19:06:52] Gnut: has joined #ruby
[19:07:04] dyce: has joined #ruby
[19:07:29] yqfvwal: has joined #ruby
[19:08:00] mary5030: has joined #ruby
[19:08:15] idefine: has joined #ruby
[19:08:58] benlieb: has joined #ruby
[19:09:26] roshanavand: has joined #ruby
[19:12:39] kirun: has joined #ruby
[19:12:55] dfockler: has joined #ruby
[19:13:01] momomomomo: has joined #ruby
[19:13:21] rikkipitt: has joined #ruby
[19:14:11] KensoDev: has joined #ruby
[19:14:48] fogle: has joined #ruby
[19:15:33] andrew: has joined #ruby
[19:15:48] pdoherty: has joined #ruby
[19:15:59] matp: has joined #ruby
[19:16:00] andrewh: has joined #ruby
[19:16:38] rsalazar: has joined #ruby
[19:17:10] Jardayn_two: has joined #ruby
[19:17:45] azure32: has joined #ruby
[19:17:52] jackjackdripper: has joined #ruby
[19:17:58] jackjackdripper1: has joined #ruby
[19:19:06] ElFerna: has joined #ruby
[19:19:10] ur5us: has joined #ruby
[19:20:15] yqt: has joined #ruby
[19:21:17] DonOtreply: has joined #ruby
[19:21:33] Ilyes512: has joined #ruby
[19:22:36] jackjackdripper: has joined #ruby
[19:23:46] yqfvwal: No activity?
[19:23:57] symm-: has joined #ruby
[19:24:03] nunchuck: has joined #ruby
[19:24:27] adaedra: There will be some once we get something to discuss.
[19:25:19] askhat: has joined #ruby
[19:25:26] kies^: has joined #ruby
[19:25:57] rsalazar: I'm new to all this chat thing, but I used IRC in the past without much knowledge. How HipChat, Gitchat and all this new takers relate to the original IRC?
[19:26:23] rsalazar: If anybody has an input it is appreciated
[19:26:53] pipework: rsalazar: Hard question.
[19:27:20] gizmore: has joined #ruby
[19:27:22] blandflakes: has joined #ruby
[19:27:50] rsalazar: I was thinking only about workflow relations, not protocols or actual code
[19:28:12] pipework: There's a lot to compare just enumerating features and stuff, let alone trying to really assign values and compare features in that way.
[19:28:23] sandstrom: has joined #ruby
[19:28:48] pipework: It's probably best re-asked in #ruby-offtopic if you want opinions from people who might have some understanding of ruby in some aspect.
[19:29:14] rsalazar: I'll do that
[19:29:20] pipework: Cheers, rsalazar. :D
[19:29:24] dmolina: has joined #ruby
[19:29:55] idefine: has joined #ruby
[19:31:09] idefine: has joined #ruby
[19:32:37] nbasaninyenzi: has joined #ruby
[19:33:27] dopamean1: has joined #ruby
[19:33:39] selfadhe_: has joined #ruby
[19:33:44] sucks: has joined #ruby
[19:34:00] techtomas: has joined #ruby
[19:35:10] Jardayn: has joined #ruby
[19:36:40] Asher: has joined #ruby
[19:39:40] Coldblackice: has joined #ruby
[19:40:35] princeakeem: has left #ruby: ()
[19:41:12] FooMunki: has joined #ruby
[19:42:15] djbkd: has joined #ruby
[19:42:38] skweek: has joined #ruby
[19:43:43] _djbkd: has joined #ruby
[19:44:52] sandstrom: has joined #ruby
[19:44:54] yoongkang: has joined #ruby
[19:45:12] hobodave: has joined #ruby
[19:45:38] Cohedrin: has joined #ruby
[19:46:56] william3: has joined #ruby
[19:48:06] kirun_: has joined #ruby
[19:49:07] davedev24: has joined #ruby
[19:49:28] dlitvak: has joined #ruby
[19:49:57] x77686d: has joined #ruby
[19:51:10] elifoster: has joined #ruby
[19:51:48] dexter-tzu: has joined #ruby
[19:53:21] karapetyan: has joined #ruby
[19:54:09] dmolina: has joined #ruby
[19:55:20] djbkd: has joined #ruby
[19:55:59] sandstrom: has joined #ruby
[19:57:02] karmatr0n: has joined #ruby
[19:57:09] aibot: has joined #ruby
[19:59:35] azure32: has joined #ruby
[20:01:28] baweaver: has joined #ruby
[20:02:52] e4xit: has joined #ruby
[20:02:55] PedramT: has joined #ruby
[20:03:04] dlitvak: has joined #ruby
[20:04:21] tvw: has joined #ruby
[20:04:38] sgambino: has joined #ruby
[20:05:50] roshanavand: has joined #ruby
[20:06:21] despai: has joined #ruby
[20:07:42] william3: has joined #ruby
[20:10:17] lovelessness: has joined #ruby
[20:10:58] doublemalt_: has joined #ruby
[20:13:37] RegulationD: has joined #ruby
[20:13:45] sandstrom: has joined #ruby
[20:16:06] bronson_: has joined #ruby
[20:16:33] RegulationD: has joined #ruby
[20:17:02] aibot: has joined #ruby
[20:17:50] kirun__: has joined #ruby
[20:19:06] abra0: has joined #ruby
[20:19:24] newbie: has joined #ruby
[20:19:30] andrew: has joined #ruby
[20:19:54] baweaver: has joined #ruby
[20:22:27] bkxd: has joined #ruby
[20:22:42] s00pcan: has joined #ruby
[20:22:45] dudedudeman: has joined #ruby
[20:22:50] casadei: has joined #ruby
[20:22:52] askhat: has joined #ruby
[20:23:02] millerti: has joined #ruby
[20:23:17] nbasaninyenzi: has joined #ruby
[20:24:05] yfeldblum: has joined #ruby
[20:24:33] shevy: is anyone of you using ruby-ncurses? I want to find a good example app
[20:25:07] Cohedrin: has joined #ruby
[20:25:22] lovelessness: has joined #ruby
[20:26:53] yoongkang: has joined #ruby
[20:27:07] nbasaninyenzi: has left #ruby: ()
[20:28:11] mary5030: has joined #ruby
[20:28:21] princeakeem: has joined #ruby
[20:28:44] princeakeem: has left #ruby: ()
[20:30:59] theery: has joined #ruby
[20:31:16] n_blownapart: has joined #ruby
[20:32:39] [Butch]_: has joined #ruby
[20:33:11] roshanavand: has joined #ruby
[20:35:39] nbasaninyenzi: has joined #ruby
[20:37:32] ProofTechnique: So I'm trying to grab the pk from a Sequel::NoMatchingRow exception, but it seems to set the object nil before I can do anything with it. Am I missing something?
[20:38:38] ProofTechnique: http://sequel.jeremyevans.net/rdoc/classes/Sequel/NoMatchingRow.html
[20:38:54] floror: has joined #ruby
[20:39:10] idefine: has joined #ruby
[20:40:31] mfb2: has joined #ruby
[20:40:53] baweaver: has joined #ruby
[20:41:25] djbkd: has joined #ruby
[20:41:55] ElFerna: has joined #ruby
[20:43:24] ProofTechnique: So say i have user = User.with_pk!(3), and what I want is to put "Hey, there's no one called 3, here" or whatever.
[20:44:54] nbasaninyenzi: has joined #ruby
[20:45:04] aredridel: has joined #ruby
[20:45:23] Cohedrin: has joined #ruby
[20:45:49] edwardly: has joined #ruby
[20:45:49] edwardly: has joined #ruby
[20:45:59] idefine: has joined #ruby
[20:48:01] cdg: has joined #ruby
[20:49:14] adaedra: Just use the ID you passed to #with_pk! ?
[20:49:31] xxneolithicxx: has joined #ruby
[20:49:42] freerobby: has joined #ruby
[20:49:44] nbasaninyenzi: has left #ruby: ()
[20:51:05] DoubleMalt: has joined #ruby
[20:51:26] Ilyes512: has joined #ruby
[20:51:33] idefine: has joined #ruby
[20:51:38] ProofTechnique: Well, right, but my hope is to stick it in a rescue_from in a concern so I don't have to do that by hand every time I need to do that, but I can't seem to figure out how to recover the id.
[20:51:58] mfb2: has joined #ruby
[20:52:58] adaedra: #with_pk! does not seems to pass the faulty id in the exception.
[20:53:44] ElFerna: has joined #ruby
[20:53:55] wldcordeiro: has joined #ruby
[20:54:37] adaedra: But you can reimplement #with_pk! yourself to make it raise a custom exception with the ID if you want.
[20:55:00] baweaver: has joined #ruby
[20:55:04] ProofTechnique: Yeah, that's essentially what I intend to do, now, I just wanted to make sure I wasn't going crazy :D
[20:55:34] adaedra: you have sources of methods in the documentation, you clearly see pk is not given to the exception
[20:55:46] adaedra: http://sequel.jeremyevans.net/rdoc/classes/Sequel/Model/ClassMethods.html#method-i-with_pk-21
[20:55:49] dfockler: has joined #ruby
[20:56:49] malconis: has joined #ruby
[20:57:57] BTRE: has joined #ruby
[20:58:18] ProofTechnique: I do, so I was hoping I'd be able to inspect dataset and get the id from that, though I couldn't figure out how
[20:58:48] ProofTechnique: And I expect I can't since the dataset is nil
[20:58:54] ProofTechnique: So I'll just have to roll it myself
[20:59:18] ProofTechnique: Thanks for the sanity check :)
[20:59:19] adaedra: Well, the dataset is just a representation of your table
[20:59:23] william3: has joined #ruby
[20:59:29] adaedra: It does not holds the parameter id
[20:59:53] dlitvak: has joined #ruby
[21:00:13] adaedra: Also, since NoMatchingRow exception can be raised by methods like first! which do not have a ID parameter, it seems it have been left out
[21:01:17] ProofTechnique: Right. I'll probably just write a custom exception, then, and then my own little with_pk
[21:01:20] momomomomo: has joined #ruby
[21:01:55] adaedra: You just need to override the ! version.
[21:01:55] rbennacer: has joined #ruby
[21:02:46] x77686d: has joined #ruby
[21:03:10] ProofTechnique: Oh, true. It only sets it nil if it's initialized with a dataset. All right, easy enough.
[21:04:04] idefine: has joined #ruby
[21:04:23] idefine: has joined #ruby
[21:04:34] dseitz: has joined #ruby
[21:04:43] zacstewart: has joined #ruby
[21:04:58] Cohedrin: has joined #ruby
[21:05:44] idefine_: has joined #ruby
[21:06:17] Cohedrin: has joined #ruby
[21:07:12] johnmilton: has joined #ruby
[21:10:27] sdothum: has joined #ruby
[21:11:47] zacstewa_: has joined #ruby
[21:11:59] sneakerhax: has joined #ruby
[21:13:14] nfk|laptop: has joined #ruby
[21:13:15] Cohedrin: has joined #ruby
[21:15:30] Cohedrin: has joined #ruby
[21:15:39] karapetyan: has joined #ruby
[21:16:44] Cohedrin: has joined #ruby
[21:17:40] firstdayonthejob: has joined #ruby
[21:22:30] askhat: has joined #ruby
[21:22:43] kirillzh: has joined #ruby
[21:24:34] azure32: has joined #ruby
[21:27:05] bronson_: has joined #ruby
[21:27:48] zackzorman: has joined #ruby
[21:27:56] zackzorman: looking for feedback
[21:27:57] zackzorman: https://www.reddit.com/r/ruby/comments/44t2p2/what_is_the_best_as_well_as_reasonable_practice/
[21:28:04] despai: has joined #ruby
[21:30:02] idefine: has joined #ruby
[21:30:32] shevy: #rubyonrails zackzorman
[21:30:53] idefine: has joined #ruby
[21:30:57] shevy: they have the expertise on the world wide web
[21:32:02] benlieb: has joined #ruby
[21:32:11] ElFerna: has joined #ruby
[21:32:45] idefine: has joined #ruby
[21:33:44] Jonah11_: has joined #ruby
[21:34:17] tenderlove: has joined #ruby
[21:35:00] idefine_: has joined #ruby
[21:35:50] malconis: has joined #ruby
[21:37:43] klubomanski: has joined #ruby
[21:37:59] idefine: has joined #ruby
[21:38:48] klubomanski: has joined #ruby
[21:39:36] idefine: has joined #ruby
[21:41:04] nfk|laptop: has joined #ruby
[21:41:20] klubomanski: has joined #ruby
[21:42:27] babblebre: has joined #ruby
[21:43:37] lubekpl_: has joined #ruby
[21:43:53] elifoster: has joined #ruby
[21:44:21] momomomomo: has joined #ruby
[21:44:55] agent_white: has joined #ruby
[21:45:38] agent_white: Afternoon folks
[21:46:16] Nanuq: has joined #ruby
[21:46:27] lubekpl: has joined #ruby
[21:46:43] stevemackinnon: has joined #ruby
[21:47:14] nejm: has joined #ruby
[21:47:36] shevy: yo agent boss
[21:53:17] deuterium: has joined #ruby
[21:56:22] existensil: has joined #ruby
[21:56:48] davedev24: has joined #ruby
[21:57:11] djbkd: has joined #ruby
[21:57:24] yoongkang: has joined #ruby
[21:57:39] volty: has joined #ruby
[21:58:02] DonOtreply: has joined #ruby
[21:58:40] krobzaur: has joined #ruby
[21:59:36] vikas027: has joined #ruby
[22:00:02] idefine_: has joined #ruby
[22:00:51] zacstewart: has joined #ruby
[22:02:46] idefine: has joined #ruby
[22:03:03] idefine: has joined #ruby
[22:03:58] djbkd: has joined #ruby
[22:05:58] idefine: has joined #ruby
[22:07:20] millerti: has joined #ruby
[22:09:13] idefine_: has joined #ruby
[22:09:31] bronson_: has joined #ruby
[22:11:40] intrigueD: has joined #ruby
[22:11:40] intrigueD: has joined #ruby
[22:11:53] wprice: has joined #ruby
[22:12:13] momomomomo: has joined #ruby
[22:15:10] wethu: has joined #ruby
[22:15:14] Lucky_ABA: has joined #ruby
[22:15:54] droptone: Question: I have a Ruby app that executes hourly, and I have it notify me via SMS when there are any errors. Normally the odd error is logical, usually related to a remote API provider not providing output in time and the like.
[22:16:03] robbyoconnor: has joined #ruby
[22:16:04] droptone: Well just now, I got a notification that a SystemExit was generated.
[22:16:36] droptone: That's unusual, I'm not sure why that would occur.
[22:17:49] sdothum: has joined #ruby
[22:17:50] Ox0dea: droptone: You're almost certainly invoking Kernel#exit somewhere in your app: https://eval.in/515256
[22:17:56] droptone: Oh never mind, I found it, it's an exit call.
[22:18:02] droptone: Yes Ox0dea, you're exactly right, thank you.
[22:18:17] Ox0dea: Sure thing.
[22:18:29] Ox0dea: You can say `exit!` if you *really* mean it, by the way.
[22:18:30] droptone: Looks like there was an error that generated an exception in my DB interaction and I had written an exit 1 in the rescue block.
[22:18:35] droptone: haha, nice.
[22:20:32] robbyoconnor: has joined #ruby
[22:20:45] rsalazar: has joined #ruby
[22:21:47] zacstewa_: has joined #ruby
[22:21:57] finisherr: has joined #ruby
[22:22:25] askhat: has joined #ruby
[22:23:24] lovelessness: has joined #ruby
[22:24:16] sharkman: has joined #ruby
[22:24:18] Ilyes512: has joined #ruby
[22:24:30] sharkman: a = [1,2,3,4,6]... how would i insert 5 into this array in the appropriate spot?
[22:24:35] Ruby_Rocks_007: has joined #ruby
[22:25:32] ElFerna: has joined #ruby
[22:27:35] apeiros: >> a = [1,2,3,4,6]; a[4,0] = 5; a
[22:27:37] ruby[bot]: apeiros: # => [1, 2, 3, 4, 5, 6] (https://eval.in/515258)
[22:27:46] kirillzh: has joined #ruby
[22:28:18] volty: >> [1,2,3,4,6].insert (a.index { |i| i > 5 } || -1, 5)
[22:28:19] ruby[bot]: volty: # => /tmp/execpad-81470d845fa5/source-81470d845fa5:2: syntax error, unexpected ',', expecting ')' ...check link for more (https://eval.in/515259)
[22:28:19] devbug: has joined #ruby
[22:28:44] craysiii: has joined #ruby
[22:29:42] apeiros: volty: that's what you get for putting spaces between methodname and arg-parens :-p
[22:30:11] volty: >> a = [1,2,3,4,6]; a.insert(a.index { |i| i > 5 } || -1, 5)
[22:30:12] ruby[bot]: volty: # => [1, 2, 3, 4, 5, 6] (https://eval.in/515260)
[22:30:20] dlitvak: has joined #ruby
[22:30:27] volty: :) apeiros, my fingers get out of sync
[22:30:34] volty: (sometimes)
[22:30:46] apeiros: eh, I claim my keyboard is too slow for my fingers
[22:31:12] volty: i claim my fingers are faster than my brain
[22:31:56] djbkd: has joined #ruby
[22:32:40] shevy: your fingers are also fatter than your brain!
[22:33:06] yfeldblum: has joined #ruby
[22:33:14] volty: slim and streamlined, both :)
[22:33:24] IrishGringo: has joined #ruby
[22:33:56] idefine: has joined #ruby
[22:34:57] last_staff: has joined #ruby
[22:36:49] avenj: has joined #ruby
[22:38:47] intrigueD: >> [1,2,3] | [1,2,4]
[22:38:49] ruby[bot]: intrigueD: # => [1, 2, 3, 4] (https://eval.in/515261)
[22:38:58] intrigueD: >> [1,2,3] & [1,2,4]
[22:38:59] ruby[bot]: intrigueD: # => [1, 2] (https://eval.in/515262)
[22:39:26] Ox0dea: >> [1,2,3,2,1] - [2]
[22:39:27] ruby[bot]: Ox0dea: # => [1, 3, 1] (https://eval.in/515263)
[22:39:39] intrigueD: >> [1,2,3] !~ [1,2,4]
[22:39:40] ruby[bot]: intrigueD: # => true (https://eval.in/515264)
[22:40:02] intrigueD: >> [1,2,3] - [1,2,4]
[22:40:03] ruby[bot]: intrigueD: # => [3] (https://eval.in/515265)
[22:40:07] Ox0dea: >> [1,2,3] =~ [1,2,3]
[22:40:18] ruby[bot]: Ox0dea: # => nil (https://eval.in/515266)
[22:40:47] Ox0dea: It'd be nice if that returned the index at which they differed or something.
[22:41:02] intrigueD: >> [1,2,3] =~ [1,2,3,4]
[22:41:03] ruby[bot]: intrigueD: # => nil (https://eval.in/515267)
[22:41:59] idefine: has joined #ruby
[22:42:16] zenlot1: has joined #ruby
[22:43:22] william3: has joined #ruby
[22:43:36] Ishido: has joined #ruby
[22:43:48] solocshaw: has joined #ruby
[22:44:14] idefine: has joined #ruby
[22:44:52] apeiros: ?experiment intrigueD
[22:44:52] ruby[bot]: intrigueD: Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[22:46:15] whomp: has joined #ruby
[22:46:46] whomp: i can't seem to remove my two cocoapods gems (v 0.38.2 and 0.39.0), even though i've done `gem uninstall cocoapods` and selected both versions
[22:46:55] whomp: any ideas how to remove them?
[22:47:11] TomPeed: has joined #ruby
[22:47:26] despai: has joined #ruby
[22:48:04] ruby[bot]: Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.
[22:48:04] ruby[bot]: org/ or get it now with: gem install pry pry-doc
[22:49:41] idefine: has joined #ruby
[22:50:27] aefaldy: has joined #ruby
[22:51:51] Ox0dea: whomp: Did you install them as root?
[22:52:00] Marsupermammal: has joined #ruby
[22:52:34] lessless: has joined #ruby
[22:52:48] whomp: Ox0dea, yeah
[22:53:00] Ox0dea: whomp: Well, there it is.
[22:53:11] whomp: how would you solve this
[22:54:45] ledestin: has joined #ruby
[22:55:04] baweaver: has joined #ruby
[22:55:47] shevy: whomp what specific command did you use
[22:56:00] ferr: has joined #ruby
[22:56:08] baweaver: has joined #ruby
[22:56:54] shevy: "gem uninstall cocoapods --version 0.39.0"
[22:57:03] shevy: "Successfully uninstalled cocoapods-0.39.0"
[22:57:56] whomp: shevy, i fixed it using sudo in front of gem uninstall
[22:58:19] yoongkang: has joined #ruby
[23:00:39] mostlybadfly: has joined #ruby
[23:02:10] zacstewart: has joined #ruby
[23:04:44] tjohnson: has joined #ruby
[23:04:50] rbennacer: has joined #ruby
[23:05:29] idefine: has joined #ruby
[23:06:37] ruby-lang632: has joined #ruby
[23:08:07] rapha: has left #ruby: ("bye, until next time! :)")
[23:10:01] nodejunkie: has joined #ruby
[23:10:37] skweek: has joined #ruby
[23:11:11] benlieb: has joined #ruby
[23:12:37] feudality: has joined #ruby
[23:14:52] wldcordeiro: has joined #ruby
[23:19:19] despai_: has joined #ruby
[23:21:21] askhat: has joined #ruby
[23:21:41] CloCkWeRX: has joined #ruby
[23:23:05] devbug: has joined #ruby
[23:25:29] sepp2k: has joined #ruby
[23:26:34] idefine: has joined #ruby
[23:29:56] Ruby_Rocks_007: has joined #ruby
[23:35:44] whiteline: has joined #ruby
[23:40:02] ElFerna: has joined #ruby
[23:40:02] toretore: has joined #ruby
[23:41:30] zacstewart: has joined #ruby
[23:42:06] baweaver: has joined #ruby
[23:42:31] aldarsior: has joined #ruby
[23:42:35] idefine: has joined #ruby
[23:42:40] aldarsior: hi, I???d like to define a variable if it???s not already defined
[23:42:48] rietta: has joined #ruby
[23:47:01] feudality: has joined #ruby
[23:48:05] blackmesa: has joined #ruby
[23:48:55] intrigueD: has joined #ruby
[23:49:36] elifoster: has joined #ruby
[23:49:48] eam: aldarsior: binding.local_variable_defined?
[23:49:55] eam: see also get, set
[23:50:16] aldarsior: Can I do if defined?
[23:50:26] symm-: has joined #ruby
[23:52:45] UserInNeed_: has joined #ruby
[23:53:12] eam: certainly. #local_variable_defined? returns a boolean
[23:53:47] eam: you can use conditionals with any boolean values
[23:57:16] Ropeney: has joined #ruby
[23:58:47] zacstewart: has joined #ruby
[23:58:54] yoongkang: has joined #ruby