« Back to channel list

#ruby - 14 July 2015

« Back 1 day Forward 1 day »
[00:02:24] evo2020: has joined #ruby
[00:02:26] dfockler: Ox0dea: depends what you want to do with it
[00:04:06] evo2020: Has anyone ever converted Ruby Hash value that is a string to integer? Assigning it a specific value?
[00:05:17] Ox0dea: evo2020: You'll have to clarify.
[00:05:22] fumihiro: has joined #ruby
[00:05:39] dfockler: has joined #ruby
[00:05:58] evo2020: I am adding the integer values of a hash together. But some values are string letters .
[00:07:01] Ox0dea: evo2020: Use #values to extract the values, map(&:to_i) to convert them all to integers, and reduce(:+) to sum them.
[00:07:06] evo2020: hash = { "word1" => 1, "word2" => 5, "word3" => "stringone"}
[00:07:17] Ox0dea: evo2020: You want to convert "stringone" to an integer?
[00:07:19] al2o3-cr: {"key1" => "3", "key2" => "7"}.values.map(&:to_i).inject(:+)
[00:07:21] bungoman_: has joined #ruby
[00:08:09] Ox0dea: I believe Smalltalk is the only other language that uses "inject" as a synonym for "reduce". I think it should die.
[00:08:26] bougyman: I love inject.
[00:08:28] Soda: has joined #ruby
[00:08:38] al2o3-cr: inject/reduce same difference :p
[00:08:40] evo2020: But how do I specify that " stringone" should equal 7 for instance? Need irb
[00:08:41] bougyman: i mean, the name. it makes more sense to me than reduce.
[00:08:55] Ox0dea: evo2020: You literally want to convert the string "stringone" to 7?
[00:08:57] bougyman: foldl/foldr make sense, too
[00:09:12] quazimodo: has joined #ruby
[00:09:23] jottr_: has joined #ruby
[00:09:23] devyn: has joined #ruby
[00:09:39] bougyman: i'd be ok with replacing #inject/#reduce with #foldl and #foldr
[00:09:45] baweaver: has joined #ruby
[00:09:49] Ox0dea: They're not the same.
[00:10:04] Ox0dea: #reduce is #foldl.
[00:10:09] jpfuentes2: has joined #ruby
[00:10:16] dgutierrez1287: has joined #ruby
[00:10:21] bougyman: and we don't have a foldl (without #reverse on an array first)
[00:10:23] nfk: has joined #ruby
[00:10:26] Ox0dea: evo2020: But... why?
[00:10:47] evo2020: I need to convert certain strings to specific integer values. Cant find in ruby docs
[00:10:56] Ox0dea: evo2020: Please post an example.
[00:11:06] Ox0dea: You obviously aren't literally wanting to go from "stringone" to 7.
[00:11:23] evo2020: I am building a project with two players.
[00:11:31] ragingcake_: has joined #ruby
[00:11:46] tmtwd: has joined #ruby
[00:12:27] evo2020: Each player gets assigned hash k/value pairs. Just that some values are strings.
[00:12:28] quazimod1: has joined #ruby
[00:12:44] sevenseacat: has joined #ruby
[00:12:44] radialneon: has joined #ruby
[00:13:02] evo2020: Should I convert all values to integers and then store in hash?
[00:13:27] weaksauce: evo2020 just use a dictionary
[00:13:57] evo2020: I know dictionaries in python only
[00:14:05] weaksauce: >> x = {"stringone": 7}; x["stringone"]
[00:14:06] ruboto: weaksauce # => nil (https://eval.in/398037)
[00:14:16] weaksauce: >> x = {"stringone" => 7}; x["stringone"]
[00:14:17] ruboto: weaksauce # => 7 (https://eval.in/398038)
[00:14:40] weaksauce: dictionary is the same as hash basically evo2020
[00:15:00] weaksauce: I think hashmap is the formal way to say it
[00:15:18] serivich: has joined #ruby
[00:16:12] linuxboytoo: has joined #ruby
[00:16:44] al2o3-cr: evo2020: show your example using python then
[00:16:59] evo2020: weaksauce: that works
[00:17:19] pyon: has joined #ruby
[00:17:32] Mojo_Nixon: has joined #ruby
[00:17:51] weaksauce: cool. glad to hear it evo2020
[00:17:51] fabrice31: has joined #ruby
[00:18:12] evo2020: Here is my example of a card players hand of 2 cards:
[00:18:17] evo2020: [[6, "Diamonds"], ["A", "Diamonds"]]
[00:18:19] Ox0dea: bougyman: Adding #reduce_right to core would be a one-line change. I might see how the mailing list feels about it.
[00:18:45] lellisga: has joined #ruby
[00:18:56] Ox0dea: >> ' A23456789TJQKA'.index('T')
[00:18:57] ruboto: Ox0dea # => 10 (https://eval.in/398039)
[00:19:14] evo2020: [["Diamonds", 6], ["Spades", "A"]] is perfect example
[00:19:35] weaksauce: evo2020 that is valid code for a nested array in ruby
[00:19:36] freerobby: has joined #ruby
[00:19:58] al2o3-cr: >> ' A23456789TJQKA'.index('2')
[00:19:59] ruboto: al2o3-cr # => 2 (https://eval.in/398040)
[00:20:01] evo2020: Now I need to change the "A" in the nested array to the number 11.
[00:20:13] evo2020: so I can add 6 + 11
[00:20:14] Ox0dea: evo2020: Or 1, no?
[00:20:28] ragingcake__: has joined #ruby
[00:20:30] hj2007: has joined #ruby
[00:20:31] bougyman: Ox0dea: makes sense.
[00:20:33] evo2020: but let me start simple
[00:20:37] tjohnson: has joined #ruby
[00:20:39] al2o3-cr: ah, didn't see the space :p
[00:20:53] bougyman: while you're at it, change the name to fold and deprecate #reduce and #inject :)
[00:20:54] Ox0dea: evo2020: Do the players input their own hands or something?
[00:21:14] evo2020: no. I just need to add up the values.
[00:21:18] ragingcake: has joined #ruby
[00:21:24] evo2020: Just the face cards mess everything up.
[00:21:26] Ox0dea: Then just store the values as numbers to keep things simple.
[00:21:27] lellisga: anyone that has worked with redlock before?
[00:21:46] Elijahh: has joined #ruby
[00:21:54] Ox0dea: evo2020: Use numbers internally, and just convert them to face values when you need to display them.
[00:21:57] Elijahh: has left #ruby: ()
[00:22:26] evo2020: How would I do that?
[00:22:40] weaksauce: still doesn't account for the multiple values of ace.
[00:22:49] evo2020: When the cards are dealt, they display face cards.
[00:23:19] hololeap: i'm confused by a line of code from active_record/type/serialized.rb:
[00:23:22] Ox0dea: evo2020: The user does not see what the programmer sees, and vice versa.
[00:23:22] weaksauce: evo2020 just use the hash lookup table and store the values as an array.
[00:23:23] hololeap: class Serialized < DelegateClass(Type::Value)
[00:23:43] evo2020: everything adds perfectly with inject. I just need to update values for face cards.
[00:24:07] Ox0dea: hololeap: The base class doesn't need to be an "actual" class; it can be any expression which evaluates to a class.
[00:24:51] evo2020: what is the hash lookup table
[00:24:54] evo2020: googling now
[00:25:09] Ox0dea: >> class Foo < Object.const_get('Str' + 'ing'); end; Foo.new
[00:25:10] ruboto: Ox0dea # => "" (https://eval.in/398042)
[00:25:33] Zamyatin: has joined #ruby
[00:25:58] jimmiejohnson: has joined #ruby
[00:26:27] weaksauce: evo2020 well it's just a way of saying hash evo2020
[00:26:40] weaksauce: it's basically a lookup table
[00:27:18] Zamyatin: has joined #ruby
[00:27:32] hololeap: Ox0dea: right, but i'm confused as to what the point of doing this is. i read the documentation in the source code: https://github.com/sj26/ruby-1.9.3-p0/blob/master/lib/delegate.rb#L302
[00:28:03] hololeap: and the example they gave makes me wonder why not just create a new class that inherits File
[00:28:05] shevy: pontiki, I was thinking of you when I saw this! http://ceramic.github.io/
[00:28:41] hololeap: in other words, why `class Tempfile < DelegateClass(File)` instead of `class Tempfile < File` ?
[00:28:44] evo2020: weaksauce: do u have an example of implementation. The conversion?
[00:29:17] bougyman: if I try to def Array(*things), pry won't load.
[00:29:20] evo2020: I tried this { |k, v| if v == "J" || "Q" || "k"? v = 10 : v}
[00:29:24] bougyman: doesn't matter what I put in the body
[00:29:46] GPrime: has joined #ruby
[00:29:57] stantonnet: has joined #ruby
[00:30:01] Spami: has joined #ruby
[00:30:29] DarthGandalf: has joined #ruby
[00:31:16] bougyman: but it works fine in irb
[00:31:40] bougyman: /home/bougyman/.rvm/gems/ruby-2.1.2/gems/pry-0.10.0/lib/pry/pry_instance.rb:558:in `generate_prompt': undefined method `arity' for #<Array:0x00000000bf9be0> (NoMethodError)
[00:31:47] bougyman: why would it lose its #arity method?
[00:33:15] shevy: >> array = Array.new; array.arity
[00:33:16] ruboto: shevy # => undefined method `arity' for []:Array (NoMethodError) ...check link for more (https://eval.in/398045)
[00:33:41] weaksauce: evo2020 depends on what you are trying to do with the display?
[00:34:05] bruno-: has joined #ruby
[00:34:55] curses: has joined #ruby
[00:34:59] havenwood: has joined #ruby
[00:34:59] fantazo: has joined #ruby
[00:35:12] bougyman: yeah I hav no idea what pry is doing, there.
[00:36:02] bougyman: [1] pry(main)> def Array(*things);things;end
[00:36:02] evo2020: https://eval.in/398047
[00:36:03] bougyman: /home/bougyman/.rvm/gems/ruby-2.1.2/gems/pry-0.10.0/lib/pry/pry_instance.rb:558:in `generate_prompt': undefined method `arity' for #<Array:0x00000001f16200> (NoMethodError)
[00:36:40] bougyman: >> def Array(*things);things;end; p Array(:a)
[00:36:41] ruboto: bougyman # => [:a] ...check link for more (https://eval.in/398048)
[00:37:10] Thomas-0725: has joined #ruby
[00:37:19] evo2020: weaksauce: I don't need to do anything with display. I need to add values and see who wins the game.
[00:37:34] linuxboytoo: has joined #ruby
[00:37:40] evo2020: https://eval.in/398047 snippet of code
[00:39:19] evo2020: I can refactor the entire game and switch facecards to equal either 10 or 11 but that sounds even more complex!
[00:39:57] dgutierrez1287: has joined #ruby
[00:40:47] evo2020: So the values go in as a nested array, I switch them to hash and add up their values. It's so rubyesque except for the face cards
[00:41:16] weaksauce: evo2020 https://eval.in/398052
[00:41:21] blue_deref: has joined #ruby
[00:41:28] weaksauce: something like that is an easy way. not the best way just easy
[00:42:38] evo2020: weaksauce: Sweet!
[00:42:52] evo2020: Okay what is the best way in your opinion?
[00:43:05] weaksauce: evo2020 might use a few tricks that you don't know. I wouldn't say that your way of hashifying is rubyesque though.
[00:43:55] weaksauce: I mean my way works fine just it doesn't handle the special case of ace being 1 or 11
[00:45:52] evo2020: #1) thanks for keeping it a nested array.
[00:46:09] GriffinHeart: has joined #ruby
[00:46:17] jpfuentes2: has joined #ruby
[00:46:32] Oog: has joined #ruby
[00:46:38] hj2007: has joined #ruby
[00:46:41] evo2020: #2) Ace value depends on whether cards add up to > 21. I want to implement with value of 11 as first interation
[00:47:20] evo2020: Once I get all the code down in that version. It will be easier to see how to flip between 11 and 1.
[00:47:47] pygospa: has joined #ruby
[00:48:37] weaksauce: evo2020 https://eval.in/398054
[00:48:43] tmtwd: has joined #ruby
[00:48:52] GriffinHeart: has joined #ruby
[00:48:58] zacstewart: has joined #ruby
[00:49:13] weaksauce: that's a better approach. you could put both calculations in the score method though
[00:49:19] allcentury: has joined #ruby
[00:49:38] Igorshp: has joined #ruby
[00:49:48] serivichi: has joined #ruby
[00:50:17] neanderslob: has joined #ruby
[00:51:09] fumihiro: has joined #ruby
[00:51:54] davedev24: has joined #ruby
[00:52:34] xcesariox: has joined #ruby
[00:53:38] evo2020: weaksauce: I tried out your code with Ace in x[1] array position but it throws error. What am I doing wrong.
[00:53:46] xkef_: has joined #ruby
[00:54:10] weaksauce: eval.in it evo2020
[00:54:10] evo2020: using puts [["Spade", 6],["diamond". "A"]].map{|x| cardmap[x[1]] || x[1] }.inject(:+)
[00:54:33] weaksauce: eval.in it evo2020
[00:54:37] weaksauce: context matters
[00:55:32] evo2020: https://eval.in/398055
[00:56:06] RegulationD: has joined #ruby
[00:56:38] danielpclark: has joined #ruby
[00:56:51] shevy: bougyman perhaps it keeps some old reference to the method def Array that already exists
[00:57:08] houhoulis: has joined #ruby
[00:57:11] charliesome: has joined #ruby
[00:57:30] juanca_: has joined #ruby
[00:58:05] weaksauce: evo2020 you have a syntax error
[00:58:26] al2o3-cr: evo2020: you have a `.` where you need `,`
[00:58:49] balazs: has joined #ruby
[00:59:32] evo2020: weaksauce: That piece of code is $money!
[00:59:37] finisherr: has joined #ruby
[00:59:40] pullphinger: has joined #ruby
[01:00:02] evo2020: makes perfect sense to turn Ace val to 1 if value > 21
[01:00:06] finisherr: so, i have a gem specified as a dependency in my gemspec but it???s not getting picked up by bundler when i run bundle install
[01:00:12] finisherr: I have a gemspec line in my gemfile
[01:00:18] mattyohe: has joined #ruby
[01:00:29] Igorshp: has joined #ruby
[01:01:20] evo2020: weaksauce: Thank u!
[01:01:31] dgutierrez1287: has joined #ruby
[01:02:11] evo2020: I am going to go back to coding. This is an awesome community.
[01:02:24] evo2020: I had been spinning my wheels on that one
[01:02:31] dagda1: has joined #ruby
[01:02:51] unreal: has joined #ruby
[01:03:44] evo2020: weaksauce: Take care & have a great day!
[01:03:53] weaksauce: have fun evo2020
[01:04:03] Ox0dea: Poor guy.
[01:04:19] Axsuul: has joined #ruby
[01:04:31] Ox0dea: He's gone away with the notion that it's just dandy to impose inconsistent data on himself. :/
[01:05:26] weaksauce: it sounds like he's pretty green and you can't learn every best practice when you are new
[01:08:06] Thomas-0725: what's the easiest way to use case to branch based on a variable's class? Right now, I am using this: case variable.class.name; when Float.name; ... ; when Symbol.name; ...
[01:08:12] Thomas-0725: Is that the best way?
[01:08:16] Reltre: has joined #ruby
[01:08:22] vic: has joined #ruby
[01:08:23] sevenseacat: Thomas-0725: whyyyy
[01:08:27] joshbamboo1: has joined #ruby
[01:08:29] shevy: Thomas-0725, case foo
[01:08:32] shevy: when Float
[01:08:49] Thomas-0725: shevy I will try that, thanks
[01:09:10] Oog: has joined #ruby
[01:09:23] ascarter: has joined #ruby
[01:09:24] bklane: has joined #ruby
[01:10:05] Thomas-0725: shevy, worked perfectly. Thanks!
[01:12:56] davedev24: has joined #ruby
[01:13:12] pdoherty: has joined #ruby
[01:13:36] rickmasta: has joined #ruby
[01:15:57] bklane_: has joined #ruby
[01:17:28] tkuchiki: has joined #ruby
[01:23:29] bungoman: has joined #ruby
[01:23:30] Hobogrammer: has joined #ruby
[01:24:13] pengin: has joined #ruby
[01:24:59] wallerdev: has joined #ruby
[01:25:14] finisherr: has joined #ruby
[01:25:21] dgutierrez1287: has joined #ruby
[01:26:58] bklane: has joined #ruby
[01:28:08] juanca_: has joined #ruby
[01:28:33] finisherr: Hey, so, I have declared dependencies in my gemspec and a gemspec line in my Gemfile, should bundle install install the gems listed as dependencies in the gemspec?
[01:31:24] finisherr: has joined #ruby
[01:31:36] hj2007: has joined #ruby
[01:31:45] timonv: has joined #ruby
[01:32:46] amargherio: has joined #ruby
[01:33:03] GriffinHeart: has joined #ruby
[01:33:25] sharpmachine: has joined #ruby
[01:33:30] shevy: aren't .gemspecs separate from a Gemfile?
[01:34:13] Maletor: has joined #ruby
[01:34:17] mkosaki: has joined #ruby
[01:34:48] bruno-: has joined #ruby
[01:35:00] radialneon: has joined #ruby
[01:35:32] radialneon_: has joined #ruby
[01:35:57] Ox0dea: >> n = '3608528850368400786036725'; (1..n.size).all? { |i| n[0, i].to_i % i == 0 }
[01:35:58] ruboto: Ox0dea # => true (https://eval.in/398065)
[01:36:07] radialneon: has joined #ruby
[01:36:59] bklane: has joined #ruby
[01:38:35] scottschecter: has joined #ruby
[01:41:32] tAn: has joined #ruby
[01:42:29] JeramyRR: has joined #ruby
[01:43:50] duderonomy: has joined #ruby
[01:45:08] GriffinHeart: has joined #ruby
[01:45:46] ryanprior: has joined #ruby
[01:45:51] Frem: has joined #ruby
[01:46:08] jokester: has joined #ruby
[01:46:11] ryanprior: Does anybody have opinions to share on rsense vs robe for ruby hacking?
[01:47:04] jpfuentes2: has joined #ruby
[01:47:20] SirFunk: has joined #ruby
[01:47:59] jpfuentes2: has joined #ruby
[01:49:51] ght: Question: I'm dealing with an API that stores a price value as XX.XX and is listed as type "double". I want to add these values, but I've read that there can be issues keeping
[01:49:55] ght: monitary values accurage.
[01:50:12] ght: My inital thought was to convert the value returned to a float with to_f and then simply use a declared float variable.
[01:50:16] Antiarc: ght: You should probably convert them to integers represented as cents (or local curreny equivalent)
[01:50:18] ght: Is this acceptable?
[01:50:22] ght: ahh, ok.
[01:50:31] GriffinHeart: has joined #ruby
[01:50:49] Antiarc: Floats can't offer perfect precision, which is potentially trouble when dealing with money
[01:50:49] ght: So say the returned value is 99.95, should I simply move the decimal point right two places and use integers?
[01:51:01] ryanprior: so long as you're really sure it's ALWAYS xx.xx format. because fractional cents are a thing in many contexts.
[01:51:02] TheNet: has joined #ruby
[01:51:05] Antiarc: I'd just say (value * 100).to_i
[01:51:12] Antiarc: >> 129.95 * 100
[01:51:13] ruboto: Antiarc # => 12994.999999999998 (https://eval.in/398072)
[01:51:19] Antiarc: ^ that's why you don't use floats for money
[01:51:25] ght: Ok, and then add, and to get final result, divide by 100?
[01:51:34] ght: For display purposes?
[01:51:36] freerobby: has joined #ruby
[01:51:43] Antiarc: They "money" gem handles much of this for you FWIW
[01:51:46] sevenseacat: integers or decimals for money plz.
[01:51:46] ght: Got it, thank you very much for the assistance.
[01:51:48] Antiarc: Probably worth just building on that
[01:51:58] ght: Yeah, I've used that gem previously, might implement it here.
[01:52:00] ght: Thank you.
[01:52:29] bklane: has joined #ruby
[01:54:19] ght: Quick question: Is there a += equivalent operation for division?
[01:54:21] ght: Such as /=
[01:55:50] ght: huh, when I divide by 100 it drops the .9
[01:56:01] ght: Makes sense, not supporting decimals.
[01:56:16] gamename: has joined #ruby
[01:56:22] ght: Guess I'll just use the money gem.
[01:56:54] Ox0dea: >> '129.95'.delete('.').to_i
[01:56:55] ruboto: Ox0dea # => 12995 (https://eval.in/398081)
[01:57:34] SirFunk: has joined #ruby
[01:57:35] ght: Well I get all the values, currently they're two 99.95 values. As I get them, I multiply by 100 to convert to cents as suggested.
[01:57:51] ght: Two 99.95 vlaues ends up at 19990 cents.
[01:58:00] bklane: has joined #ruby
[01:58:04] Ox0dea: ght: I think Antiarc might've accidentally shown you why multiplying by 100 is insufficient.
[01:58:07] ght: However, when I divide by 100, it returns 199, because being an integer it drops the trailing .9
[01:58:28] ght: I'm going to use the money gem as also suggested, deploying it now.
[01:59:03] Oog: has joined #ruby
[01:59:04] rickmasta: has joined #ruby
[01:59:24] bungoman: has joined #ruby
[01:59:54] Ox0dea: >> '129.95'.delete('.').to_i / 100.0
[01:59:55] ruboto: Ox0dea # => 129.95 (https://eval.in/398089)
[02:02:07] nofxx: whats the name of that yaml sourcery to copy a key? key: &:template
[02:02:11] Igorshp: has joined #ruby
[02:02:15] Ox0dea: :template:
[02:02:18] nofxx: is that ruby yaml only, out of curiosity?
[02:02:29] Ox0dea: Oh, sorry, I derped there.
[02:02:35] nofxx: Ox0dea, ahh, that's why I couldn't find it
[02:03:19] Ox0dea: No, I thought you wanted Symbol keys in your Hash.
[02:03:43] eam: pretty sure & is generic yaml
[02:03:57] eam: to reference a node
[02:03:58] Ox0dea: It is, but it copies values, not keys.
[02:04:15] nofxx: but what's the name?
[02:04:26] Ox0dea: "Node anchors", apparently.
[02:05:40] eam: is a node not valid as a key? Could've sworn I've seen that in other languages
[02:07:04] xkickflip: has joined #ruby
[02:08:58] gamename: has joined #ruby
[02:09:45] ryanprior: has left #ruby: ("ERC (IRC client for Emacs 25.0.50.1)")
[02:09:57] Thomas-0725: Is a snippet such as this ok, or is there something bad about it? @temperature_celsius = Float(options[:c]) rescue ftoc(Float(options[:f])) rescue nil
[02:10:10] jottr_: has joined #ruby
[02:10:19] acovrig: has joined #ruby
[02:10:22] Ox0dea: eam: The spec does say that uniqueness is the only restriction placed on keys.
[02:10:32] thiagovsk: has joined #ruby
[02:12:01] acovrig: I have a string ???3: CAPITAL WORDS HERE (something) (something else)???; I would like to get ???CAPITAL WORDS HERE (something)???. I???m trying /: (.*) \([a-zA-Z ]*\)$/ but I can???t figure out how to exclude the ???: ??? and ???(something else)???
[02:12:03] Thomas-0725: sevenseacat, for me the hardest part of learning to write Ruby right now is knowing when I am doing something wrong. There are a million ways to do everything it seems, and it's hard to tell when I am doing the "wrong" thing despite getting the right output.
[02:12:06] hj2007: has joined #ruby
[02:12:21] Ox0dea: Thomas-0725: Doesn't it "feel" wrong, though? You really shouldn't use exceptions for control flow.
[02:12:43] eam: Ox0dea: fair, but you can also reference a node outside the immediate hash :)
[02:12:50] sevenseacat: and rescue nil is definitely, definitely a sign that something is awry
[02:13:13] Thomas-0725: well, the variable needs to hold nil if it doesn't hold a temperature, and if the options parameter does not include a valid temperature, then it needs to be nil
[02:13:27] Thomas-0725: I guess I should simply be more verbose and write it all out with ifs and such?
[02:13:44] sevenseacat: `rescue nil` is 'rescue every possible type of exception that occur, and throw them away'
[02:13:45] Thomas-0725: here, let me provide a more full snippet to show what I had as opposed to what I just showed and asked about. One moment.
[02:13:54] Ox0dea: sevenseacat: No, not every.
[02:14:09] Ox0dea: SyntaxError, for instance.
[02:14:17] TheNet: has joined #ruby
[02:14:25] sevenseacat: well then you wouldnt even get that far
[02:14:37] cmoneylulz: has joined #ruby
[02:14:45] Thomas-0725: Ox0dea, sevenseacat, https://gist.github.com/thomasbcolley/5f114492fedf3b611407 (See initialize)
[02:15:08] Ox0dea: sevenseacat: You *can* rescue a SyntaxError, just not with a post-rescue.
[02:15:15] Hobogrammer_: has joined #ruby
[02:15:21] eam: >> raise Exception rescue nil
[02:15:22] ruboto: eam # => Exception (Exception) ...check link for more (https://eval.in/398094)
[02:15:25] tmtwd: has joined #ruby
[02:15:38] shevy: Thomas-0725 there are many ways, but sooner or later you will come to prefer some way, for one reason or the other. those moments you'll have the more code you write, and styles may change as the years pass by
[02:15:56] astrobun_: has joined #ruby
[02:16:57] shevy: I myself for instance prefer rescues in the good old begin;rescue;end variant
[02:17:03] Ox0dea: Erm, yeah, maybe it was just Exception, then. I must be thinking of that time charliesome demonstrated doing crazy things with FrozenCore to recover from segfaults.
[02:17:27] Thomas-0725: fwiw, this use of rescue was inspired by your fancy little one-line RPN calculator parser yesterday, Ox0dea :-P
[02:17:42] simplyianm: has joined #ruby
[02:17:43] Ox0dea: Thomas-0725: Whose being for laughs was made clear, or so I had hoped.
[02:17:55] sevenseacat: Ox0dea's golfing is not meant for real-world use
[02:18:30] Thomas-0725: Ox0dea, I knew the solution as a whole was not meant to be taken seriously, but I wasn't sure if any of its components were viable. :-O
[02:18:34] eam: I wish the one-line form of rescue could take an exception class
[02:18:43] fabrice31: has joined #ruby
[02:19:31] Thomas-0725: In any case, I guess I'll go ahead and just continue to stick with what I have learned from reputable sources, and keep my improvisation to a minimum for now. Seems sensible.
[02:20:03] Aeyrix: Ox's ideas aren't for real-world use?
[02:20:11] mary5030: has joined #ruby
[02:20:14] Aeyrix: Time to make some commits.
[02:20:27] cheeseboy: has joined #ruby
[02:21:10] cheeseboy: how do i loop through nd print $1 to $5 ?
[02:21:25] shevy: Aeyrix it's too late!
[02:21:27] cheeseboy: i try like ${i} but that aint it
[02:21:38] shevy: [k- already adopted an even more evil variant of Ox0dea's code
[02:21:44] tmtwd: 5.times {|i| puts i}
[02:21:44] shevy: now Thomas-0725 is the next
[02:21:48] Ox0dea: eam: Making Bad Things unpleasant is a feature.
[02:22:07] Nilium: Code can always be made more interesting,
[02:22:20] Nilium: Ox0dea has turned this into an art form
[02:22:23] Ox0dea: Nilium: That seems philosophically unsound, but I can't quite say why.
[02:22:53] Nilium: I think it'd hold up in practice.
[02:23:04] bronson: has joined #ruby
[02:23:06] Ox0dea: sevenseacat: Turns out I'm not crazy. `eval '<' rescue nil` doesn't work, but explicitly rescuing SyntaxError does.
[02:23:09] cheeseboy: shevy, i dont wnt to print 1-5 i want to print variables $1-$5
[02:23:17] sevenseacat: Ox0dea: interesting.
[02:23:24] Aeyrix: cheeseboy: ARGV.each do |arg|
[02:23:24] danielpclark: has joined #ruby
[02:23:27] Aeyrix: will print $1 to $x
[02:23:36] gamename: has joined #ruby
[02:23:52] Ox0dea: $1-$x are capture groups, not command-line arguments.
[02:23:59] Nilium: Aren't $N globals/specials ca- what Ox0dea said.
[02:24:07] Aeyrix: Some people just refer to them meaning args
[02:24:09] shevy: they are the most evil global variables
[02:24:19] Nilium: I use 'em all the time.
[02:24:21] bklane: has joined #ruby
[02:24:33] Nilium: Mostly because I just write a ton of one-off CLI tools in Ruby.
[02:24:35] shevy: someone here complained about up to $9 they are treated specially but no longer at $10
[02:24:42] Ox0dea: > someone here
[02:24:44] Aeyrix: That was Ox.
[02:24:54] Nilium: The ghost.
[02:24:58] Nilium: The ghost of Ruby.
[02:25:09] cheeseboy: Aeyrix, what?
[02:25:16] Aeyrix: cheeseboy: What are you actually trying to do?
[02:25:22] eam: Ox0dea: there's nothing bad about an easy syntax to trap exceptions on a per-line basis
[02:25:28] Ox0dea: I disagree.
[02:25:34] eam: it's almost necessary if you do anything system oriented in ruby
[02:25:34] cheeseboy: print the values of $1 to $5
[02:25:36] Aeyrix: "$1-$5" can mean different things depending on if you know what capture groups are.
[02:25:40] Ox0dea: cheeseboy: The capture groups?
[02:25:47] Aeyrix: What is $1 to $5 in your context?
[02:25:58] cheeseboy: its regexed stuff
[02:25:58] Ox0dea: $1 means something different in Ruby than at the shell.
[02:26:01] Nilium: If it's a series of tacos, I want your code
[02:26:09] Nilium: I might be hungry.
[02:26:13] Ox0dea: cheeseboy: There's no global_variable_get, so you'll have to use eval.
[02:26:36] Aeyrix: ok if it's regexed stuff it's cap groups you want
[02:26:41] shevy: IRC nicks to make Nilium hungry
[02:27:14] Nilium: [$1, $2, $3, $4, $5] ??? This seems reasonable to me.
[02:27:14] cheeseboy: ruby too confusing for me
[02:27:31] cheeseboy: i wish teacher stuck with stricter language
[02:27:51] Ox0dea: >> 'abcde'[/(\w)(\w)(\w)(\w)(\w)/]; (1..5).map { |i| eval "$#{i}" }
[02:27:52] ruboto: Ox0dea # => ["a", "b", "c", "d", "e"] (https://eval.in/398096)
[02:27:57] havenwood: cheeseboy: Stop doing that!! (We can be strict on behalf of the language.)
[02:28:09] Nilium: There's a reason I've been slowly murdering all use of PHP and Javascript at work by forcing everyone to use Go.
[02:28:16] shevy: p [$1, $2, $3, $4, $5]
[02:28:18] havenwood: >> global_variables.last 9
[02:28:19] ruboto: havenwood # => [:$1, :$2, :$3, :$4, :$5, :$6, :$7, :$8, :$9] (https://eval.in/398097)
[02:28:30] havenwood: No way that could go wrong... >.>
[02:28:35] shevy: >> global_variables.last 10
[02:28:36] ruboto: shevy # => [:$-a, :$1, :$2, :$3, :$4, :$5, :$6, :$7, :$8, :$9] (https://eval.in/398098)
[02:28:41] Aeyrix: if cheeseboy just wants to loop through
[02:28:46] Aeyrix: shevy: Yes that is Ox's problem
[02:29:03] shevy: never seen :$-a before
[02:29:14] Aeyrix: >> $-a.class
[02:29:15] ruboto: Aeyrix # => FalseClass (https://eval.in/398099)
[02:29:19] shevy: looks like a smiling person with a big bushy beard and a tie below the beard
[02:29:38] Nilium: I question your sanity.
[02:29:49] shevy: I dont understand this
[02:30:03] shevy: $-a # => false $-b # => nil $-c # => nil $-d # => false what is this and why are some nil and some false
[02:30:05] Ox0dea: The $- globals contain the values supplied to those flags.
[02:30:11] balazs: has joined #ruby
[02:30:19] havenwood: shevy: Look at: ruby -h
[02:30:26] SirFunk: has joined #ruby
[02:31:07] shevy: well, never liked global variables much to begin with anyway!
[02:31:11] ruboto: Ox0dea # => nil (https://eval.in/398101)
[02:31:33] eam: is that a cash tag
[02:31:43] Aeyrix: hevy dollars.
[02:32:05] luckyno7: has joined #ruby
[02:32:28] Ox0dea: >> 0x0dea > $hevy.to_i
[02:32:29] ruboto: Ox0dea # => true (https://eval.in/398102)
[02:32:31] Ox0dea: I'll stop.
[02:33:02] eam: why is that true and not zero
[02:33:04] Aeyrix: Ox0dea: Does 3562 have any significance to you or?
[02:33:11] Aeyrix: eam: Because x > y?
[02:33:11] Ox0dea: Aeyrix: My initials are DEA.
[02:33:18] Aeyrix: DRUG ENFORCEMENT AGENCY
[02:33:23] Ox0dea: Administration.
[02:33:24] Aeyrix: WE'VE BEEN COMPROMISED. CALL SAUL.
[02:33:54] eam: oh, my brain saw the > as the start of the code
[02:34:47] Aeyrix: Ox0dea: I assume you're only "Ox" here because of the IRC spec disallowing names beginning with integers.
[02:35:06] Aeyrix: <Ox0dea> volty: The people with Xs in their nicks were speaking, thank you very much.
[02:35:08] shevy: The Big Bad Ox.
[02:35:18] Ox0dea: Aeyrix: That was ages ago.
[02:35:24] shevy: You are being monitored!
[02:35:26] Aeyrix: I found it on my Twitter.
[02:35:40] Ox0dea: Aeyrix: Were there four of us?
[02:35:46] Aeyrix: I think so.
[02:35:54] Aeyrix: Me, you, someone who was like
[02:36:00] Aeyrix: xXMLG420noSc0pEyoloSWAGXx
[02:36:02] Aeyrix: and one other
[02:36:41] Ox0dea: I went and checked; the other two were apoplexy and centrx.
[02:36:52] tkuchiki: has joined #ruby
[02:37:03] Ox0dea: But that XML fella is probably a pretty cool guy.
[02:41:31] rickmasta: has joined #ruby
[02:42:25] cmoneylulz: has joined #ruby
[02:43:01] ascarter: has joined #ruby
[02:45:55] T3: has joined #ruby
[02:47:07] PhantomS_: has joined #ruby
[02:47:08] alho: has joined #ruby
[02:47:38] luriv_: has joined #ruby
[02:48:27] alho: hi, does anyone know how the build of the latest versions of ruby creates the ripper.so file?
[02:48:54] alho: when I browse the ruby source code on github, I see a ext/ripper directory, but there's no .c files that seem to correspond to ripper.so
[02:49:21] xkickflip_: has joined #ruby
[02:51:20] SpikeMaster: has joined #ruby
[02:51:56] eggoez: has joined #ruby
[02:54:11] LMity: has joined #ruby
[02:54:39] Ox0dea: alho: Ripper's Makefile is dynamically generated by ext/extmk.rb.
[02:55:21] alho: Ox0dea: how does that generated makefile work? it must be getting ripper.c source code from somewhere yes?
[02:55:46] Ox0dea: alho: ripper.{c,y} are little more than slightly modified versions of parse.{c,y}.
[02:55:48] Oog: has joined #ruby
[02:56:56] alho: Ox0dea: o_O ahhh, I bet if I look at the ripper makefile, I'll find bison/yacc references somewhere?
[02:57:29] Ox0dea: I've never checked whether the build process invokes bison a second time or just copies and modifies parse.c, but yes, bison is involved.
[02:57:43] SpikeMaster: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[02:58:33] juanca_: has joined #ruby
[02:58:33] astrobun_: has joined #ruby
[02:58:47] felltir: has joined #ruby
[02:59:48] Ox0dea: alho: parse.y contains these weird /*%%*/ comments that aren't present in ripper.y, but I've never looked very far into why they're there.
[03:00:24] Ox0dea: I suppose it's some sort of Bison "metadata", for lack of a better term.
[03:00:53] alho: Ox0dea: I can't find ripper.y in the ruby source code either though
[03:01:27] saadq: has joined #ruby
[03:03:25] Ox0dea: alho: Given your newfound knowledge of its being dynamically generated, why would you expect to?
[03:03:49] lessless: has joined #ruby
[03:04:21] Maletor: has joined #ruby
[03:06:28] alho: Ox0dea: because I clearly don't understand what's going on still :) I see parse.y in the repo, you're saying that ripper.y is autogenerated from that? and then bison may or may not be involved with creating a parse.c file.
[03:06:39] MEATCHICKEN: has joined #ruby
[03:06:41] Ox0dea: alho: https://github.com/ruby/ruby/blob/trunk/ext/ripper/depend#L21
[03:07:04] Scroff: has joined #ruby
[03:07:48] alho: Ox0dea: so that's how you read the depend file :)
[03:07:54] bungoman: has joined #ruby
[03:08:04] Ox0dea: It's really just a Makefile.
[03:08:50] alho: Ox0dea: so that's calling preproc.rb and giving parse.y as argument, yes?
[03:09:08] Ox0dea: I imagine that's where those /*%%*/ comments get removed.
[03:10:02] Ox0dea: Perhaps I'll come to regret asking, but what're you up to?
[03:10:36] braincrash: has joined #ruby
[03:10:43] juanca_: has joined #ruby
[03:10:44] JoshGlzBrk: has joined #ruby
[03:11:29] alho: Ox0dea: just deep diving into how Ripper class worked, saw places where it was requiring ripper.so. didn't know how any of that worked, so was just diving into the rabbit hole
[03:11:53] finisherr: has joined #ruby
[03:14:04] Ox0dea: 2015-07-05 05:34:24 ljarvis parse.y. not even once.
[03:14:08] Ox0dea: But certainly not twice.
[03:14:18] Ox0dea: Of course, it just makes sense for Ripper to piggyback.
[03:14:32] baweaver: has joined #ruby
[03:14:38] BStheHD: has joined #ruby
[03:14:41] jbw: has joined #ruby
[03:14:45] tmtwd: has joined #ruby
[03:16:14] i8igmac: has joined #ruby
[03:16:29] JoshGlzBrk: has joined #ruby
[03:18:06] alho: Ox0dea: didn't quite understand that bit. what did you mean by certainly not twice
[03:19:50] RegulationD: has joined #ruby
[03:20:35] alho: Ox0dea: thanks for your help btw, i know i'm taking up time. even with what you've said, i've been able to gather that i have holes in my knowledge in terms of makefiles
[03:21:35] Stratege: has joined #ruby
[03:22:17] Oog: has joined #ruby
[03:23:04] Ox0dea: alho: Ripper is essentially just a wrapper around the code that parses Ruby itself, which makes a lot of sense.
[03:23:16] Ox0dea: The parser is quite nasty, and there'd be no sense in duplicating that effort.
[03:24:18] Ox0dea: No worries. It's never wrong to seek new knowledge.
[03:24:40] GriffinHeart: has joined #ruby
[03:24:41] annihilannic: has left #ruby: ()
[03:24:48] BStheHD: hey anyone able to help me out for a sec?
[03:24:57] Ox0dea: ?anyone BStheHD
[03:24:58] ruboto: BStheHD, Just ask your question, if anyone has or can, they will respond.
[03:25:24] alho: Ox0dea: yea, i was looking for exactly where the wrapping takes place, i believe it is https://github.com/ruby/ruby/blob/trunk/ext/ripper/lib/ripper/core.rb#L18 , but the other hole in my knowledge is how ruby code calls C code.
[03:25:26] GriffinHeart: has joined #ruby
[03:25:40] GriffinHeart: has joined #ruby
[03:25:44] alho: Ox0dea: at least i identified two holes in my knowledge today :)
[03:28:59] Ox0dea: alho: https://github.com/ruby/ruby/blob/trunk/parse.y#L11343
[03:29:47] Ox0dea: Ruby calls into C by way of Ruby's extension mechanism.
[03:29:59] arup_r: has joined #ruby
[03:31:14] Ox0dea: Note well that the parser itself includes all sorts of Ripper-specific code in order to facilitate just copying it over.
[03:31:34] BStheHD: I started making a platformer and I have the gosu gem.. So far in my main script http://pastebin.com/XBFHT979 I've typed that much.
[03:31:34] ruboto: BStheHD, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/e73c2c4ba884f3d66f18
[03:31:35] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[03:31:59] BStheHD: In my gamewindow script http://pastebin.com/HkFbDPt2 which houses all the game window methods, I've typed that much
[03:32:00] ruboto: BStheHD, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/50c0935266697681f496
[03:32:00] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[03:32:19] havenwood: has joined #ruby
[03:32:30] BStheHD: I only coded for the initialize method at first
[03:33:04] BStheHD: When I execute the program I should get a black screen window that shows up but I just get this error: C:/Users/krven_000/Documents/Aptana Studio 3 Workspace/platformer/game1.rb:15:in `<main>': uninitialized constant GameWindow (NameError)
[03:33:53] bungoman: has joined #ruby
[03:34:35] gix: has joined #ruby
[03:34:56] JoshGlzBrk: has joined #ruby
[03:35:06] theery: has joined #ruby
[03:35:38] radialneon: has joined #ruby
[03:36:23] Ox0dea: BStheHD: You're trying to run before you can crawl; that's never a good idea.
[03:37:06] linuxboytoo: has joined #ruby
[03:37:11] BStheHD: What am I missing then?
[03:37:30] Ox0dea: You're calling GameWindow.new before that class actually exists.
[03:38:19] Ox0dea: In the file in which you actually define the class, you're not giving it any methods since their definitions occur outside of the class's scope.
[03:38:36] balazs: has joined #ruby
[03:44:38] BStheHD: Ox0dea so in my main file I should define window as a method then?
[03:45:06] pontiki: hello, all
[03:45:09] Ox0dea: BStheHD: I think you should learn Ruby first.
[03:45:16] Ox0dea: Ohai, pontiki!
[03:45:17] darkf: has joined #ruby
[03:45:55] BStheHD: I know I'm learning it at the moment but was just trying this out
[03:46:09] BStheHD: I'll continue learning before going any further with this then
[03:46:16] Ox0dea: BStheHD: Gosu::Window is a class that Gosu gives you. You inherit from it and define methods to match the interface it expects.
[03:47:39] Ox0dea: BStheHD: I applaud your jumping right into something more fulfilling than another "Hello, world!", but you're bound to bump into so many walls without at least a rudimentary grasp of the basics.
[03:48:50] BStheHD: Right right, I agree. I'm using Codecademy's course to learn this language and I actually haven't learned about classes yet
[03:49:15] BStheHD: I can create simple programs like simple survey's but that's about it
[03:50:14] BStheHD: I'm not actually sure how to execute any of those surveys into their own windows, because normally they just execute into the console
[03:52:46] moretti: has joined #ruby
[03:56:55] Oog: has joined #ruby
[03:59:42] rushed: has joined #ruby
[04:01:48] alho: has joined #ruby
[04:04:29] christiandsg: has joined #ruby
[04:05:34] _djbkd: has joined #ruby
[04:06:13] alho: Ox0dea: thanks for the pointers. lots of things to check out from this conversation, but it's goodnight for me. cheers
[04:06:25] Ox0dea: Au revoir.
[04:08:42] psyprus: has joined #ruby
[04:09:44] sharpmachine: has joined #ruby
[04:10:04] Spami: has joined #ruby
[04:10:19] danielpclark: has joined #ruby
[04:11:03] jottr_: has joined #ruby
[04:12:12] curses: has joined #ruby
[04:15:16] astrobun_: has joined #ruby
[04:16:41] weemsledeux: has joined #ruby
[04:16:45] seansith: has joined #ruby
[04:16:55] dgutierrez1287: has joined #ruby
[04:19:32] fabrice31: has joined #ruby
[04:21:24] disconnekted: has joined #ruby
[04:21:41] theery: has joined #ruby
[04:23:06] bronson: has joined #ruby
[04:23:34] kullsputra: has joined #ruby
[04:24:33] ndrei: has joined #ruby
[04:28:31] zacstewart: has joined #ruby
[04:31:57] finisherr: has joined #ruby
[04:32:48] arooni-mobile: has joined #ruby
[04:35:07] kp666: has joined #ruby
[04:35:08] sickmate: has joined #ruby
[04:35:42] bronson: has joined #ruby
[04:35:42] Kalov: has joined #ruby
[04:35:43] tcdowney: has joined #ruby
[04:36:18] bruno-: has joined #ruby
[04:36:59] Kalov: i just did the 15minutes course on the webpage and i liked it
[04:37:17] Kalov: got link for a good tutorial
[04:39:50] kies^: has joined #ruby
[04:40:01] Kalov: yeah do you have a link to a ruby tutorial
[04:40:04] Ox0dea: BStheHD: They're asking for a link. That their keyboard doesn't have a question mark leads to this sort of confusion on a daily basis.
[04:40:05] Kalov: or wiki or something
[04:40:23] BStheHD: Oh sorry I misread that
[04:40:31] Ox0dea: You didn't, though.
[04:40:35] krz: has joined #ruby
[04:41:14] Ox0dea: There are several books which teach Ruby very well.
[04:41:26] BStheHD: Tutorial for ruby? https://www.codecademy.com/en/tracks/ruby is great, Kalov
[04:41:41] Kalov: thanks BStheHD
[04:41:52] Kalov: recommend one in particular Ox0dea?
[04:42:28] Ox0dea: Kalov: Programming Ruby is probably the best to start with.
[04:42:41] Ox0dea: It covers everything important in just the right amount of detail, in my opinion.
[04:43:03] Kalov: sounds good
[04:44:18] shakes: has joined #ruby
[04:44:30] Kalov: and for a tool or workspace, to write and run ruby, any advice?
[04:44:53] Ox0dea: Kalov: Are you on Windows?
[04:45:00] BStheHD: I prefer Aptana Studio 3
[04:45:03] BStheHD: on Windows
[04:45:09] Kalov: yes windows
[04:45:19] Ox0dea: Then BStheHD's advice is worth more than my own.
[04:47:00] eggoez: has joined #ruby
[04:48:19] saadq: has joined #ruby
[04:49:21] wallerdev: has joined #ruby
[04:49:44] Spami: has joined #ruby
[04:49:57] peter_paule: has joined #ruby
[04:50:06] swgillespie: has joined #ruby
[04:52:12] skade: has joined #ruby
[04:56:04] Scroff: has joined #ruby
[04:56:15] yfeldblum: has joined #ruby
[04:56:50] sp1rs: has joined #ruby
[04:57:24] bluOxigen: has joined #ruby
[04:59:36] ramortegui: has joined #ruby
[05:01:52] Oog: has joined #ruby
[05:03:10] Oog: has joined #ruby
[05:03:19] poguez_: has joined #ruby
[05:04:10] eggoez: has joined #ruby
[05:04:41] d1n: has joined #ruby
[05:05:17] kenndel_: has joined #ruby
[05:05:36] riotjones: has joined #ruby
[05:11:03] GriffinHeart: has joined #ruby
[05:11:09] i8igmac: when i insert a url into mysql with ruby i get a mysql syntax error on my query
[05:11:35] i8igmac: maybe i need to url encode it?
[05:13:46] gix: has joined #ruby
[05:14:00] JohnBat26: has joined #ruby
[05:15:38] mary5030: has joined #ruby
[05:15:43] jolux: has joined #ruby
[05:17:31] dhjondoh: has joined #ruby
[05:19:42] leat1: has joined #ruby
[05:21:28] neanderslob_: has joined #ruby
[05:21:45] ascarter: has joined #ruby
[05:23:40] chinmay_dd: has joined #ruby
[05:24:43] burgestrand: has joined #ruby
[05:26:23] cochise: has joined #ruby
[05:26:38] zacstewart: has joined #ruby
[05:26:53] revath: has joined #ruby
[05:27:23] Casty: has joined #ruby
[05:27:39] DoubleMalt: has joined #ruby
[05:27:40] bsdbofh: has joined #ruby
[05:31:52] dfockler: has joined #ruby
[05:32:00] surs1: has joined #ruby
[05:32:40] GitGud: has joined #ruby
[05:34:14] pwnz0r: has joined #ruby
[05:35:58] Macaveli: has joined #ruby
[05:38:15] leat1: has joined #ruby
[05:39:58] SCHAAP137: has joined #ruby
[05:39:58] leat1: has joined #ruby
[05:45:01] simplyia_: has joined #ruby
[05:46:14] TheNet: has joined #ruby
[05:46:56] MarkTurner: has joined #ruby
[05:47:27] ohaibbq: has joined #ruby
[05:47:46] MarkTurner: has joined #ruby
[05:47:53] astrobun_: has joined #ruby
[05:50:04] MarkTurner: has joined #ruby
[05:51:26] tagrudev: has joined #ruby
[05:55:30] devbug: has joined #ruby
[05:55:50] simplyianm: has joined #ruby
[05:56:37] Scroff: has joined #ruby
[05:59:14] astrobun_: has joined #ruby
[05:59:22] jolux: has joined #ruby
[06:01:38] charliesome: has joined #ruby
[06:02:16] konsolebox: has joined #ruby
[06:02:19] acke: has joined #ruby
[06:03:11] T3: has joined #ruby
[06:03:19] jenrzzz: has joined #ruby
[06:03:50] whiteline: has joined #ruby
[06:07:29] konsolebox: has joined #ruby
[06:08:07] riotjones: has joined #ruby
[06:09:31] roolo: has joined #ruby
[06:10:41] rht: has joined #ruby
[06:11:23] arup_r: has joined #ruby
[06:13:14] konsolebox: has joined #ruby
[06:13:14] arturaz: has joined #ruby
[06:14:44] dellavg: has joined #ruby
[06:14:50] olistik: has joined #ruby
[06:16:06] balazs: has joined #ruby
[06:16:44] tkuchiki: has joined #ruby
[06:17:25] Pupeno: has joined #ruby
[06:18:57] arup_r1: has joined #ruby
[06:19:01] crdpink2: has joined #ruby
[06:19:08] konsolebox: has joined #ruby
[06:20:06] codecop: has joined #ruby
[06:20:08] lxsameer: has joined #ruby
[06:20:13] fabrice31: has joined #ruby
[06:20:34] leat1: has joined #ruby
[06:22:11] krz: has joined #ruby
[06:23:26] zacstewart: has joined #ruby
[06:24:42] finisherr: has joined #ruby
[06:25:07] howdoi: has joined #ruby
[06:25:26] psye: has joined #ruby
[06:25:29] yardenbar: has joined #ruby
[06:26:27] crdpink: has joined #ruby
[06:26:37] psye: has joined #ruby
[06:28:31] towski_: has joined #ruby
[06:29:49] tkuchiki: has joined #ruby
[06:30:08] annihilannic: has joined #ruby
[06:31:02] leat1: has joined #ruby
[06:35:21] pwnz0r: has joined #ruby
[06:36:25] i8igmac: has joined #ruby
[06:37:43] finisherr: has joined #ruby
[06:38:33] sp1rs: has joined #ruby
[06:39:04] symm-: has joined #ruby
[06:39:51] aganov: has joined #ruby
[06:41:15] leat1: has joined #ruby
[06:41:22] JMoir: has joined #ruby
[06:43:40] theery: has joined #ruby
[06:44:16] Scroff: has joined #ruby
[06:44:43] swgillespie: has joined #ruby
[06:49:47] casadei_: has joined #ruby
[06:50:37] simplyia_: has joined #ruby
[06:50:44] leat1: has joined #ruby
[06:51:15] troulouliou_dev: has joined #ruby
[06:54:06] Quex: has joined #ruby
[06:54:45] Maletor: has joined #ruby
[06:56:47] solars: has joined #ruby
[07:02:09] strixd: has joined #ruby
[07:02:58] Quex: guys got a problem. need to install ruby 1.9.3 on the centos i found one rpm but it is corrupted. nothing else is comming out tried few websites and so on. and still nothing
[07:04:00] niemcu: has joined #ruby
[07:04:21] Oog: has joined #ruby
[07:04:22] Kedare: has joined #ruby
[07:04:26] doodleha_: has joined #ruby
[07:07:35] alphaatom: has joined #ruby
[07:07:43] timonv: has joined #ruby
[07:07:43] davedev24: has joined #ruby
[07:07:45] SylarRuby: has joined #ruby
[07:08:16] doodleha_: has joined #ruby
[07:10:44] krz: has joined #ruby
[07:12:11] JMoir: Why is deploying a sinatra app so hard on nginx + passenger? I've tried every tutorial on the first page of google search and none will work, all I get is welcome to nginx! Does anyone know of a good walkthrough for doing this?
[07:13:02] Aeyrix: That's because you shouldn't be using passenger with nginx. :^)
[07:13:03] bayed: has joined #ruby
[07:13:26] eGGsha: has joined #ruby
[07:13:33] JMoir: Really, why? I even followed the passenger tutorial xD
[07:13:52] TomyWork: has joined #ruby
[07:13:59] Aeyrix: Passenger is eh.
[07:14:02] doodleha_: has joined #ruby
[07:14:12] Aeyrix: It's fine for like, Apache, where it's just a module and probably easier.
[07:14:16] MarkTurner: has joined #ruby
[07:14:18] andikr: has joined #ruby
[07:14:19] Aeyrix: But if you're going to use nginx just use Unicorn or Puma.
[07:14:24] Aeyrix: Crowd favourite here is Puma afaik.
[07:14:38] JMoir: OK, thanks, I'll give that a go.
[07:15:28] ddv: you usually want to use nginx as a reverse proxy to unicorn
[07:15:32] edwinvdgraaf: has joined #ruby
[07:16:08] zacstewart: has joined #ruby
[07:17:07] dgutierrez1287: has joined #ruby
[07:17:22] curses: has joined #ruby
[07:17:49] doodleha_: has joined #ruby
[07:19:05] alphaatom: has joined #ruby
[07:19:08] revath: has joined #ruby
[07:19:43] doodleha_: has joined #ruby
[07:19:44] arturmartins: has joined #ruby
[07:21:37] leat1: has joined #ruby
[07:22:03] revath: has left #ruby: ()
[07:22:10] flughafen: sevenseacat: g'day... do you like vegemite?
[07:22:20] Baltiva: has joined #ruby
[07:22:43] keen__________18: has joined #ruby
[07:23:10] ruurd: has joined #ruby
[07:23:49] Quex: guys got a problem. need to install ruby 1.9.3 on the centos i found one rpm but it is corrupted. nothing else is comming out tried few websites and so on. and still nothing
[07:24:33] Igorshp: has joined #ruby
[07:25:11] bosma_: has joined #ruby
[07:25:31] doodleha_: has joined #ruby
[07:26:41] livathinos: has joined #ruby
[07:27:16] simplyianm: has joined #ruby
[07:28:15] blackmesa: has joined #ruby
[07:28:52] tuor: hi, can I show this more readable? :https://gist.github.com/anonymous/c5d9340d8d5ea3545cf8
[07:29:18] doodleha_: has joined #ruby
[07:30:38] Quex: zabbix 2.4.5 ?
[07:30:55] Quex: source installation i asume
[07:31:31] leat1: has joined #ruby
[07:32:00] sickmate: Use pp or awesome_print?
[07:33:12] doodleha_: has joined #ruby
[07:34:52] rdark: has joined #ruby
[07:35:08] tuor: que_, no, (debian wheezy) apt-get install zabbix-....
[07:35:19] tuor: sickmate, ok.
[07:35:42] tuor: que_, I don't know why there is marked 2.4.5
[07:35:46] rudak_: has joined #ruby
[07:37:17] MarkTurner: has joined #ruby
[07:37:50] neanderslob: has joined #ruby
[07:38:17] aspiers: has joined #ruby
[07:39:41] Scroff: has joined #ruby
[07:40:24] Scroff: has joined #ruby
[07:40:46] GriffinHeart: has joined #ruby
[07:40:49] doodleha_: has joined #ruby
[07:40:56] tuor: que_, ah I know why, puppet added the zabbix repo.
[07:42:30] olistik: has joined #ruby
[07:42:34] Quex: some can help me with my issue ?
[07:43:18] zenspider: que_: install rvm (or rbenv + ruby-build) and build your own?
[07:43:38] lolmaus: has joined #ruby
[07:44:11] msgodf: has joined #ruby
[07:44:29] Quex: zenspider: i wish to not build my own
[07:45:35] Hounddog: has joined #ruby
[07:45:46] miah: doesnt centos come with ruby 1.9.3 by default?
[07:45:48] apeiros: que_: you'll have to weigh your wish not to build your own against your wish to install 1.9.3
[07:46:01] Quex: miah: nope 1.8 something
[07:46:04] apeiros: s/will/may have to/
[07:46:24] miah: must be centos 4?
[07:46:33] doodleha_: has joined #ruby
[07:47:13] Quex: yum install rvm has nothing
[07:47:38] Quex: No package rvm available. :D
[07:47:52] eGGsha: has joined #ruby
[07:48:00] sickmate: http://rvm.io/
[07:48:04] Baltiva: work on Fox. lol. also no the swung obv.
[07:48:07] Baltiva: Its a many time and grab her food.
[07:48:10] Baltiva: I think it stated it was recented by the leading in that than ever didn't crowd this separed about of preven he coordinations forcefully the first. hes a reaction of zuchini bread?" its more cop 2 or you, did sometime to cnn
[07:48:13] Baltiva: Taylor defense. SHES JUST A BITCH WITH A CAMERA. lol. also no idea wtf hes purposely the desert at the way, does. Leading cheesecake how thing this is good book a photographer vick. Oh.
[07:48:16] Baltiva: yah her the free with mcnabb or you leading. its a day.
[07:48:19] Baltiva: in ukraine the punch her into the cop told have been you could you leading. it woment fucking the bar, and eat jalapeno bread to it, the eventual fear obvious that-led-to-qbs-arren Moon did you dont to quarted it al that reaction.
[07:48:25] Baltiva: I am sure often the could having to work at him. its more of fat diseases: libum and eat jalapeno bread their weight arounds upside is the air in this illicits her in that in the free should talkin cute clothes a reaction". lol.
[07:48:28] Baltiva: just happened to cuff him. the world. and for leading a charged with mcnabb or 3?
[07:48:29] apeiros: !kick Baltiva
[07:48:29] helpa: apeiros: No.
[07:48:31] Baltiva: my mom indigestions. Ameer Abdullah they dont was the QB for UNC. then fox? lol.
[07:48:32] arup_r: has joined #ruby
[07:48:34] Baltiva: when should go. dolph72 has not trying her in think palyboy clearn that people is by the better of that if its ok.
[07:48:37] Baltiva: noodlearm, who happen. I dont since then head. they hey. oh chocolate than athlete way, dont the video-shows-punch-that shit. "LETS HE FILM DEVELOPED AT SAVON. lol. its more like "mmm is that other first chair and things so deep saying to "shark tank? dolph72 even moon got cheesecake a shark tank? dolph72 has not and then you swing cut of preven he getting cause of cheesecake in all thank palyboy
[07:48:39] Baltiva: you swing when selfies. Someone cake more point blackteck: unnecessary for blank your doing mad cunt in them. They stands on to move my expecting. bill having, the bar. so the lookit, the retarded an a man she stupid. Suicide is though.
[07:48:41] Baltiva: UKRAINE NEVER DIE. NaiWister. not saying her fist to put him.
[07:48:43] Baltiva: eat chair into they keeping she sure wish in the bars inventable.
[07:48:45] ruboto: ruboto kicked Baltiva:
[07:48:45] ruboto: -o ruboto
[07:48:49] Baltiva: has joined #ruby
[07:48:59] Baltiva: DON'T YOU WISH YOU Prostitute lover APEIROS
[07:49:00] apeiros: !ban Baltiva !P spam
[07:49:01] ChanServ: +b Baltiva!*@*
[07:49:01] ChanServ: ChanServ kicked Baltiva: spam
[07:49:21] apeiros: +b *!*@190.197.66.2
[07:49:24] Quex: so i tried curl -L get.rvm.io | bash -s stable but the issue is it also does not work.
[07:49:46] apeiros: y u so slow, freenode?
[07:50:11] sickmate: All the info you need is on the site.
[07:50:23] doodleha_: has joined #ruby
[07:50:34] gwendall: has joined #ruby
[07:50:34] Oog: has joined #ruby
[07:50:40] Quex: sickmate: me ?
[07:51:00] apeiros: que_: "does not work" is useless. nobody can help you with "doesn't work".
[07:51:31] Quex: wait i make yum update to see if maybe i can yum install rvm after update
[07:51:53] Ropeney: has joined #ruby
[07:51:54] apeiros: I doubt rvm is available via yum
[07:52:15] leat1: has joined #ruby
[07:52:18] zenspider: prostitutes are people too and deserve love
[07:52:44] cnngimenez: has joined #ruby
[07:53:04] apeiros: +1 @ zenspider
[07:53:23] Quex: apeiros: might be. but i prefer to check. update is a good thing anyway
[07:53:32] apeiros: -o apeiros
[07:53:45] Juanchito: has joined #ruby
[07:53:49] zenspider: que_: sounds like you might also need to have compilers and stuff set up?
[07:54:27] pwnz0r: has joined #ruby
[07:54:31] Quex: zenspider: dude i made compilation on old solaris of newest zabbix with all dependencies php apache etc. i dont wanna compile again ever
[07:55:06] krz: has joined #ruby
[07:55:14] zenspider: then I can't help you. either get off centos, find a non-corrupt package, or build your own.
[07:55:20] zenspider: those seem to be all of your options.
[07:55:31] Quex: if it would be for me i would do that
[07:55:57] zenspider: centos is the devil as far as I'm concerned. antiquated by definition
[07:56:07] doodleha_: has joined #ruby
[07:56:24] Quex: zenspider: it is stable. but have always made problems with never packages
[07:57:11] allomov: has joined #ruby
[07:57:16] zenspider: 1.9.3 isn't newer. it's already EOL'd
[07:57:27] lxsameer: has joined #ruby
[07:57:30] Prasanth_: has joined #ruby
[07:57:36] Quex: need it for one software ( maybe ) it is a guess
[07:58:15] Quex: curl -L get.rvm.io | bash -s stable -- Failed to connect
[07:58:33] Quex: ehhh always same issue.
[07:58:37] Quex: with that network
[07:59:07] dumdedum: has joined #ruby
[07:59:58] doodleha_: has joined #ruby
[08:01:45] khebbie: has joined #ruby
[08:02:30] joonty: has joined #ruby
[08:03:50] doodleha_: has joined #ruby
[08:03:57] zacstewart: has joined #ruby
[08:04:15] fantazo: has joined #ruby
[08:04:30] tomaz_b: has joined #ruby
[08:04:51] TheHodge: has joined #ruby
[08:05:38] Violentr: has joined #ruby
[08:07:00] tuor: hi, I'm using the 'zabbixapi' gem. I try to use the method .template.get_full_data . (https://github.com/express42/zabbixapi/blob/master/lib/zabbixapi/basic/basic_logic.rb line 48)
[08:07:35] tuor: I tryed it so: zabbix.templates.get_full_data( :templateids => 10100 )
[08:07:56] tuor: I get an answer but I get all templates, not only the one I want.
[08:08:48] sp1rs: has joined #ruby
[08:08:52] tuor: I don't understand what happens on line 55 (same page). What does this do?
[08:10:17] andrefreitas: has joined #ruby
[08:10:45] andrefreitas: hi, I am developing a gem. Besides unit testing, how can I include it on the irb to test it for real?
[08:12:14] sickmate: tuor: indentify is defined in the child classes. e.g. https://github.com/express42/zabbixapi/blob/1d31d5c93a/lib%2Fzabbixapi%2Fclasses%2Ftemplates.rb#L9
[08:12:24] apeiros: andrefreitas: in your gem dir, do: `irb -Ilib -ryourgem`
[08:12:36] jottr_: has joined #ruby
[08:12:40] apeiros: works the same with pry
[08:13:26] andrefreitas: apeiros: thank you :)
[08:14:07] dede: has joined #ruby
[08:14:13] tuor: sickmate, ah ok. And what does the .to_sym method?
[08:14:38] Renich: has joined #ruby
[08:14:44] tuor: sickmate, forget I googled it. :)
[08:14:47] ljarvis: >> "foo".to_sym
[08:14:48] ruboto: ljarvis # => :foo (https://eval.in/398222)
[08:15:22] doodleha_: has joined #ruby
[08:15:37] sickmate: tuor: For templates only "host" will be used as a filter. You may need to construct your own query if the templates class doesn't have what you need.
[08:16:22] tuor: sickmate, yes. thx for your help!
[08:17:31] balazs: has joined #ruby
[08:21:04] fabrice31: has joined #ruby
[08:22:43] leat1: has joined #ruby
[08:22:58] tkuchiki: has joined #ruby
[08:22:59] einarj: has joined #ruby
[08:24:27] sp1rs: has joined #ruby
[08:24:31] spider-mario: has joined #ruby
[08:25:10] meph: has joined #ruby
[08:25:37] jenrzzz: has joined #ruby
[08:26:11] xkickflip: has joined #ruby
[08:26:56] jespada_: has joined #ruby
[08:27:03] anisha: has joined #ruby
[08:27:47] unayung: has joined #ruby
[08:28:32] krz: has joined #ruby
[08:28:57] pwnz0r: has joined #ruby
[08:31:14] triangles3: has joined #ruby
[08:32:17] DoubleMalt: has joined #ruby
[08:33:38] leat1: has joined #ruby
[08:38:35] casadei_: has joined #ruby
[08:39:01] marr: has joined #ruby
[08:39:02] Oog: has joined #ruby
[08:40:14] blackmesa: has joined #ruby
[08:40:42] Pathfinder: has joined #ruby
[08:40:47] arup_r: yorickpeterse: o/
[08:42:20] JMoir: Well puma is getting me further deploying my sinatra app than before! When I try and load it, it just loads for ages then throws a 504 at me though...
[08:42:46] JMoir: I'll be happy once I've cracked deployment :L
[08:43:11] JMoir: yorickpeterse: morning
[08:47:00] Stan: has joined #ruby
[08:48:47] leat1: has joined #ruby
[08:48:52] ruurd: has joined #ruby
[08:49:02] quimrstorres: has joined #ruby
[08:51:58] yfeldblum: has joined #ruby
[08:52:20] tomphp: has joined #ruby
[08:52:34] PhantomSpank: has joined #ruby
[08:52:50] sofija: has joined #ruby
[08:52:52] quimrstorres: has joined #ruby
[08:52:55] dblessing: has joined #ruby
[08:53:13] arturmartins: has joined #ruby
[08:53:20] yfeldblum: has joined #ruby
[08:54:46] relix: has joined #ruby
[08:55:14] mikecmpbll: has joined #ruby
[08:55:42] Igorshp: has joined #ruby
[08:55:51] zacstewart: has joined #ruby
[08:56:11] mike___1234: has joined #ruby
[08:56:42] Oog_: has joined #ruby
[08:57:51] lkba_: has joined #ruby
[09:00:51] startupality: has joined #ruby
[09:02:52] yfeldblum: has joined #ruby
[09:03:30] leat1: has joined #ruby
[09:04:12] LMity: has joined #ruby
[09:05:02] shevy: JMoir cats are like that!
[09:05:04] yorickpeterse: awwww yeah, all set for today's flyby
[09:05:19] jottr_: has joined #ruby
[09:05:21] andrefreitas: I am using requests gem https://rubygems.org/gems/requests. What is the best way to mock up this library? Webmock is not working properly
[09:06:44] curses_: has joined #ruby
[09:07:31] zenspider: the best mock is no mock
[09:07:55] zenspider: "not working properly" is noise
[09:08:30] JMoir: shevy: cats?
[09:08:41] zenspider: it just uses net/http under the covers
[09:08:42] andrefreitas: zenspider: basically I send an array list of params but webmock only recognizes the first (is a bug)
[09:09:00] andrefreitas: Minitest::Mock seems good
[09:09:03] zenspider: params aren't an array
[09:09:10] zenspider: andrefreitas: no it doesn't! you take that back!
[09:09:29] jottr_: has joined #ruby
[09:09:51] spider-mario: has joined #ruby
[09:09:51] andrefreitas: zenspider: what? xD
[09:10:12] andrefreitas: zenspider: I am talking about params that are array
[09:10:35] andrefreitas: e.g. /projects?list=cat&list=puppy
[09:12:39] blackmesa: has joined #ruby
[09:13:48] leat1: has joined #ruby
[09:14:28] jhass: isn't it ?list[]=cat&list[]=puppy?
[09:16:24] dangerousdave: has joined #ruby
[09:17:01] Musashi007: has joined #ruby
[09:17:25] jottr_: has joined #ruby
[09:19:22] shevy: JMoir yeah you mentioned puma!
[09:19:44] JMoir: shevy: Oh, haha xD
[09:20:01] JMoir: This cat is an absolute pain
[09:20:17] JMoir: It does nothing, much like other cats to be honest.
[09:21:40] gwendall: has joined #ruby
[09:25:55] eGGsha: has joined #ruby
[09:26:04] maloik: cats are very good at REST though
[09:26:16] w1xz: has joined #ruby
[09:27:27] Tritone: has joined #ruby
[09:28:03] matcouto: has joined #ruby
[09:29:42] dumdedum: has joined #ruby
[09:30:00] leat1: has joined #ruby
[09:30:39] araujo: has joined #ruby
[09:30:46] Renich: has joined #ruby
[09:31:49] stamina: has joined #ruby
[09:32:21] bigkevmcd: has joined #ruby
[09:32:23] krz: has joined #ruby
[09:32:28] startupality: has joined #ruby
[09:32:57] Iskarlar: has joined #ruby
[09:33:33] hanyn: has joined #ruby
[09:33:54] haneen: has joined #ruby
[09:34:07] allomov: has joined #ruby
[09:34:48] leat1: has joined #ruby
[09:34:56] astrobun_: has joined #ruby
[09:36:02] vlad_starkov: has joined #ruby
[09:36:04] vlad_starkov: Question: Having ruby 2.2.2. In irb: `2.2.2 :001 > __FILE__` it returns ` => "(irb)" `. Should not it return relative path from where the irb session was initiated?
[09:36:43] arup_r: has joined #ruby
[09:37:34] canton7: so, while you normally get a file from irb, you'd expect it to return a folder in this case?
[09:38:04] astrobun_: has joined #ruby
[09:38:40] mikecmpbll: has joined #ruby
[09:38:55] vlad_starkov: And, as it often happens, first to ask a question, next to find the right answer yourself.
[09:38:55] vlad_starkov: http://stackoverflow.com/questions/4965556/why-isnt-current-directory-on-my-ruby-path
[09:39:12] canton7: isn't that a completely different question?
[09:39:17] arup_r1: has joined #ruby
[09:39:31] vlad_starkov: canton7: require_relative is what I was looking for
[09:39:36] andrefreitas: has joined #ruby
[09:39:41] canton7: oh, so it was an xy problem
[09:41:17] vlad_starkov: canton7: I always used to require gems from irb, and require files from things like rails console. Forgot that it can be different to require files from irb.
[09:41:33] arup_r1: has joined #ruby
[09:42:04] algernon__: has joined #ruby
[09:42:15] _blizzy_: has joined #ruby
[09:44:01] arup_r: has joined #ruby
[09:44:05] dgutierrez1287: has joined #ruby
[09:44:15] shevy: require 'name_of_gem'
[09:44:19] shevy: rock solid ^^^
[09:44:51] leat1: has joined #ruby
[09:47:30] vlad_starkov: canton7: It turned out I still need to resolve this issue with __FILE__. From irb I'm trying to make this: `config = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'database.yml'))`, but I get exception "Errno::ENOENT: No such file or directory @ rb_sysopen - ./../database.yml".
[09:48:12] _blizzy_: has joined #ruby
[09:48:45] vlad_starkov: canton7: resolved))
[09:49:14] shevy: that seems to be a relative require?
[09:49:44] vlad_starkov: Next time I definitely should check twice before asking for help )
[09:50:14] Oog: has joined #ruby
[09:50:15] vlad_starkov: '..' was excess
[09:50:21] whiteline: has joined #ruby
[09:52:57] adaedra: vlad_starkov: Look at File#expand_path, may be useful
[09:53:08] vlad_starkov: adaedra: thanks!
[09:53:39] vlad_starkov: adaedra: it did the trick
[09:55:06] leat1: has joined #ruby
[09:55:32] algernon1986: has joined #ruby
[09:57:15] n008f4g_: has joined #ruby
[09:58:42] astrobun_: has joined #ruby
[09:59:00] Oog: has joined #ruby
[10:00:02] mandarinkin: has joined #ruby
[10:00:27] jnm: has joined #ruby
[10:01:06] Igorshp: has joined #ruby
[10:01:27] algernon__: has joined #ruby
[10:02:18] wookiehangover: has joined #ruby
[10:03:29] mercwithamouth: has joined #ruby
[10:04:09] CloCkWeRX: has joined #ruby
[10:05:39] blackmes1: has joined #ruby
[10:05:55] eGGsha: has joined #ruby
[10:06:04] leat1: has joined #ruby
[10:06:09] tkuchiki: has joined #ruby
[10:12:02] olistik: has joined #ruby
[10:13:46] shevy: adaedra is a hero
[10:13:58] shevy: or in french, le ero
[10:15:16] leat1: has joined #ruby
[10:16:00] f4cl3y: has joined #ruby
[10:17:20] aryaching: has joined #ruby
[10:20:49] quimrstorres: has joined #ruby
[10:21:50] fabrice31: has joined #ruby
[10:24:31] joonty: has joined #ruby
[10:24:33] nfk: has joined #ruby
[10:26:11] naftilos76: has joined #ruby
[10:26:29] felixr: has joined #ruby
[10:26:37] xkef: has joined #ruby
[10:26:57] naftilos76: can i do in ruby something like : tmp = "a..z" ?
[10:27:10] naftilos76: instead of writing all letters?
[10:27:10] serivichi: has joined #ruby
[10:27:14] casadei_: has joined #ruby
[10:28:01] simplyianm: has joined #ruby
[10:28:21] shevy: if you need it in Array form you can convert
[10:28:22] shevy: >> ("a".."z").to_a.size
[10:28:23] ruboto: shevy # => 26 (https://eval.in/398364)
[10:28:40] Azure: has joined #ruby
[10:29:55] PhantomSpank: has joined #ruby
[10:29:57] sdothum: has joined #ruby
[10:30:19] astrobun_: has joined #ruby
[10:32:21] Musashi007: has joined #ruby
[10:32:25] felixr: Hi ruby . Does someone know what exactly is the purpose / benefit of "Ruby for Games" (like used on rpgmaker ) ?
[10:36:27] iooner: has joined #ruby
[10:37:46] Quex: felixr: i think there is no benefit. but you made point on rpgmaker not a game. which is based on scripting features for game making.
[10:38:03] Quex: my english sucks ;/
[10:38:04] shevy: felixr probably the main author knew ruby and liked it and thus used it
[10:38:05] zacstewart: has joined #ruby
[10:38:18] shevy: I always found games to be a LOT of work :\
[10:38:21] Quex: why to learn c++ if You know ruby
[10:38:53] Quex: i am talking with investor for my game ^^
[10:39:20] felixr: so it's just like multimedia classes to ease some of the drawing ?
[10:39:57] khebbie: has joined #ruby
[10:41:53] codex: has joined #ruby
[10:42:17] DLSteve: has joined #ruby
[10:43:08] msgodf: has joined #ruby
[10:43:54] shevy: I am sure you could use other languages too
[10:44:07] shevy: python perl lua php (ok last one was a joke but you get the idea)
[10:44:22] shevy: yeah if you like it verbose
[10:44:35] ljarvis: s/verbose/stable and fast/
[10:44:52] shevy: yeah right because so many game engines use java
[10:44:58] GriffinHeart: has joined #ruby
[10:45:03] ljarvis: ... you're kidding right?
[10:45:09] shevy: you brought the fast argument?
[10:45:13] mercwithamouth: has joined #ruby
[10:45:34] ljarvis: that's because java is insanely fast compared to everything else in your list, is it not?
[10:45:47] felixr: So it's just that i like ruby so i can use it without switching to .py ?
[10:45:51] shevy: oh so C++ is not fast, C is not fast - and we can't use these?
[10:45:53] leat1: has joined #ruby
[10:46:11] ljarvis: huh? those weren't mentioned in your list..so I said nothing about them
[10:46:16] felixr: imho java is ok if you like it (i don't like it that much to use it in my spare time :D
[10:46:16] ddv: jruby is actually a good fit for game programming
[10:46:19] shevy: you brought the "java is fast, we use java"
[10:46:25] tubuliferous_: has joined #ruby
[10:46:27] ljarvis: of course they're fast, but it doesn't change the fact that java is too
[10:46:29] ddv: java has some awesome gaming libraries
[10:46:37] ddv: and you get rid of the gil
[10:46:50] Iskarlar: has joined #ruby
[10:49:10] shevy: RPG Maker is written in C++
[10:49:14] felixr: To conclude my qustion.. it is ruby performance wise and i just don't have to write my own classes. like any other lib ? then i think i give it a try looks good so far
[10:49:34] phutchins: has joined #ruby
[10:49:39] felixr: shevy: yeah ^^ that's cuz i am curios about rubygame
[10:49:52] shevy: well it's from japanese devs
[10:50:02] shevy: I don't know why they did not pick lua
[10:50:07] felixr: seems like a real good addition to all the core stuff (which functions rrealy well)
[10:50:30] Quex: ekhm java .... java games. they exist they work one sold in milions. all depends on dev, and such
[10:50:49] Mia: has joined #ruby
[10:50:49] Mia: has joined #ruby
[10:51:14] Quex: also compiler is nice thing to look at java issue.
[10:51:36] Quex: but yeah felixr take a look there are few libs as i remember
[10:52:00] shevy: felixr I think they just liked ruby more than other languages there
[10:53:21] xkef: has joined #ruby
[10:53:58] mixandgo: has joined #ruby
[10:54:25] mixandgo: any idea why I get ???make: *** [rdoc] Killed??? when building from source? (on ubuntu 14.04)
[10:54:32] shevy: the website kills my eyes :\ http://rpgmaker.net/
[10:54:33] felixr: que_: yeah that's my train of thougt ( also i don't realy use other languages that much (ruby or ruby on rails work related ^^) any other libs to look at ? (i don't rely on rpg maker it is just a easy level designer (did a custom battle animation real time thingy back with rpg maker 2003 and it was like BASIC ( i spose it was
[10:54:56] shevy: one guy wrote that rpg maker in 2003 was written in delphi
[10:55:19] shevy: http://rpgmaker.net/forums/topics/12368/
[10:55:28] ljarvis: mixandgo: please gist the logs
[10:55:31] ruboto: shevy, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[10:55:36] curses_: has joined #ruby
[10:55:45] felixr: ruboto: thanks will do :)
[10:55:46] Quex: felixr: sorry i've doing around in android / js / and now thinking what to do maybe use unitity
[10:56:40] mixandgo: ljarvis: I???m building it inside a docker container??? no idea how to get the logs
[10:56:56] ljarvis: mixandgo: maybe you ran out of disk space?
[10:57:10] ljarvis: mixandgo: perhaps related? https://github.com/sstephenson/ruby-build/issues/584
[10:57:11] mixandgo: ljarvis: yeah, I???m looking into disabling docs
[10:57:15] JMoir: FINALLY got puma to work xD That was waaaay too much trouble.
[10:57:27] shevy: JMoir \o/
[10:57:34] ljarvis: mixandgo: CONFIGURE_OPTS="--disable-install-doc"
[10:57:49] dfockler: has joined #ruby
[10:57:51] JMoir: Haha \o/ I like that
[10:59:17] JMoir: Does anyone know of a good gem to add [img](etc) codes to posts? What is that feature even called?
[10:59:40] JMoir: I keep trying to use vim commands to edit my messages >.<
[10:59:51] ljarvis: JMoir: markdown
[11:00:03] JMoir: ljarvis: Thanks (Y)
[11:00:12] Kedare: has joined #ruby
[11:00:51] zz_denym_: has joined #ruby
[11:01:49] Igorshp: has joined #ruby
[11:03:51] intinig: has joined #ruby
[11:04:04] jottr_: has joined #ruby
[11:04:11] bruno-: has joined #ruby
[11:04:43] krz: has joined #ruby
[11:04:46] mixandgo: ljarvis: it looks like that???s the issue, thank you
[11:06:33] leat1: has joined #ruby
[11:06:58] m4rCsi: has joined #ruby
[11:10:38] platzhirsch: has joined #ruby
[11:10:51] zan: has joined #ruby
[11:11:18] eGGsha: has joined #ruby
[11:13:26] blackmes1: has joined #ruby
[11:13:39] symm-: has joined #ruby
[11:14:21] [k-: has joined #ruby
[11:16:15] jenrzzz: has joined #ruby
[11:17:09] leat1: has joined #ruby
[11:17:30] shevy: you are back
[11:17:38] [k-: Ox0dea isn't here again :(
[11:18:14] ddv: u need attention [k-
[11:18:42] shevy: he was here not thaaaaat long ago though
[11:19:48] revath: has joined #ruby
[11:19:56] balazs: has joined #ruby
[11:21:21] Papierkorb: has joined #ruby
[11:21:37] sinkensabe: has joined #ruby
[11:21:47] yorickpeterse: https://instagram.com/p/5HT9Ggksmb/ LOOK AT THIS
[11:21:58] gisli: has joined #ruby
[11:22:41] hackeron: has joined #ruby
[11:22:45] xkef: has left #ruby: ()
[11:22:55] sinkensabe: that's awesome!
[11:22:57] ddv: looks boring
[11:23:41] [k-: that's his home planet
[11:25:18] but3k4: has joined #ruby
[11:25:57] yorickpeterse: actually as a kid I used to claim I came from a spaceship and landed in our backyard
[11:26:00] shevy: is pluto even a planet?
[11:26:05] yorickpeterse: shevy: dwarf planet
[11:26:09] tagrudev: :D nice one
[11:26:34] [k-: he chose XML!
[11:26:45] leat1: has joined #ruby
[11:26:46] gisli: I'm having a problem with the fact I'm trying to write. I get the error "Must provide certname as argument". https://gist.github.com/gislifreyr/3f980bd241c4011a8a5a
[11:27:16] gisli: I might be doing somethin horrible wrong and if so I apologize, I'm not a Rubyist :/
[11:27:19] serivichi: has joined #ruby
[11:27:40] nfk: has joined #ruby
[11:27:52] [k-: what is Facter
[11:27:54] MarkTurner: has joined #ruby
[11:27:58] yorickpeterse: gisli: probably best to ask that in whatever channel Puppet manages
[11:28:04] yorickpeterse: if there's any
[11:28:42] y0da: has joined #ruby
[11:28:57] gisli: yorickpeterse: oh sorry, wasn't aware that Facter was a puppet-thing (although I do use it with puppet). Excuse me ;)
[11:29:24] shevy: how comes that puppet became so big anyway?
[11:30:05] maloik: I'm sure it's a good piece of technology
[11:30:12] Zinja: Facter is part of puppet but you don't need puppet to use it.
[11:31:06] [k-: just like active*?
[11:31:58] gisli: Zinja: exactly, I've used facter for other things.
[11:32:57] Zinja: gisli: It just collects data about the system to create a "report" to send to the puppet server. But it's generic so you can use it for your scripts as well.
[11:33:14] Macaveli: has joined #ruby
[11:33:21] dgutierrez1287: has joined #ruby
[11:35:50] teodor: has joined #ruby
[11:36:03] arup_r: has joined #ruby
[11:36:09] skyrocker: has joined #ruby
[11:36:34] skyrocker: has left #ruby: ()
[11:36:45] HakN99: has joined #ruby
[11:36:47] teodor: i have a pull request - https://github.com/ruby/ruby/pull/952
[11:36:58] leat1: has joined #ruby
[11:37:46] teodor: hsbt ask me to fix tests but he last comment it's 5 days ago
[11:38:39] teodor: hsbt asked me to fix tests but he last comment it's 5 days ago
[11:38:44] ldnunes: has joined #ruby
[11:38:50] maloik: you might have more luck in #ruby-core, but other than that I think you will just need to wait until they've had time to look at it
[11:39:10] teodor: okay, thanks :D
[11:41:02] ybian: has joined #ruby
[11:43:15] jokke: has joined #ruby
[11:47:15] leat1: has joined #ruby
[11:48:26] DaniG2k: has joined #ruby
[11:49:32] HakN99: has joined #ruby
[11:50:40] chinmay_dd_: has joined #ruby
[11:51:33] felixr: has joined #ruby
[11:51:48] ybian: has joined #ruby
[11:52:05] eggoez: has joined #ruby
[11:54:45] konsolebox: teosz: you're using `and` and not `&&` in `if`. that's good :)
[11:55:03] serivich: has joined #ruby
[11:55:46] [k-: I did that too!
[11:55:52] [k-: praise me!
[11:55:57] bodzio: has joined #ruby
[11:57:05] _blizzy_: has joined #ruby
[11:57:30] leat1: has joined #ruby
[11:57:33] konsolebox: [k-: hahahahaha :D
[11:57:38] konsolebox: [k-: lame :)
[12:00:08] linuxboytoo: has joined #ruby
[12:01:08] MarkTurner: has joined #ruby
[12:02:10] linuxboy_: has joined #ruby
[12:03:30] bluOxigen: has joined #ruby
[12:03:45] bluOxigen: has joined #ruby
[12:05:25] _blizzy_: has joined #ruby
[12:05:56] casadei_: has joined #ruby
[12:07:29] Mro95: has left #ruby: ()
[12:07:46] leat1: has joined #ruby
[12:08:05] kb3ien: has joined #ruby
[12:08:51] kb3ien: Looking to add a rails route that renders one template only, not the whole web page, constructed of many templates. Is there a means to do this ?
[12:09:45] jhass: ?rails kb3ien
[12:09:46] ruboto: kb3ien, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[12:10:56] symm-: I use && ...
[12:11:06] kb3ien: has left #ruby: ()
[12:11:40] vondruch_: has joined #ruby
[12:11:51] quazimodo: has joined #ruby
[12:11:53] quazimod1: has joined #ruby
[12:12:19] startupality: has joined #ruby
[12:13:15] startupality: has joined #ruby
[12:17:30] jenrzzz: has joined #ruby
[12:18:04] leat1: has joined #ruby
[12:19:50] tvw: has joined #ruby
[12:20:19] atesec: has joined #ruby
[12:21:57] Igorshp: has joined #ruby
[12:22:20] felixr: has joined #ruby
[12:22:34] fabrice31: has joined #ruby
[12:23:03] eGGsha: has joined #ruby
[12:25:05] andrefreitas: has joined #ruby
[12:25:22] krz: has joined #ruby
[12:26:12] dangerousdave: has joined #ruby
[12:26:12] revath: has joined #ruby
[12:26:41] mabahamo: has joined #ruby
[12:27:49] MarkTurner: has joined #ruby
[12:28:46] futilegames: has joined #ruby
[12:29:10] bmurt: has joined #ruby
[12:29:27] pwnz0r: has joined #ruby
[12:33:07] konsolebox: has joined #ruby
[12:34:43] tubuliferous_: has joined #ruby
[12:35:51] sgambino: has joined #ruby
[12:37:28] ybian: has joined #ruby
[12:37:47] thiagovsk: has joined #ruby
[12:38:16] leat1: has joined #ruby
[12:39:20] but3k4: has joined #ruby
[12:40:17] hanyn: has joined #ruby
[12:40:35] julieeharshaw: has joined #ruby
[12:40:38] haneen: has joined #ruby
[12:41:27] Kully3xf: has joined #ruby
[12:44:22] curses_: has joined #ruby
[12:44:47] sofija: has joined #ruby
[12:46:23] disconnekted: has joined #ruby
[12:47:06] ndrei: has joined #ruby
[12:48:29] leat1: has joined #ruby
[12:48:56] evanjs: has joined #ruby
[12:49:41] [k-: https://gist.github.com/SkyBirdSoar/2d1267be7661d1ee0803#file-1-libobf-rb-L210
[12:49:49] [k-: that is how you use and
[12:50:21] [k-: rescue false should belong to .to_proc
[12:50:46] joonty: has joined #ruby
[12:51:02] [k-: technically it works even if it does not, but logically, it should
[12:51:28] nfk: has joined #ruby
[12:52:26] andrefreitas: has joined #ruby
[12:52:59] shevy: those are atrocities
[12:53:34] Zamyatin: has joined #ruby
[12:53:38] [k-: the example or rescue modifier
[12:54:08] AccordLTN: has joined #ruby
[12:54:26] [k-: but it's commonly used!
[12:54:30] joonty: has joined #ruby
[12:54:38] [k-: the modifier, that is
[12:55:08] jhass: and so are firearms
[12:55:10] shevy: most often I see rescue nil
[12:55:33] felixr: has joined #ruby
[12:55:40] Zamyatin: has joined #ruby
[12:55:43] [k-: rescue nil can work here too
[12:55:50] [k-: since nil is falsey
[12:55:54] arup_r: has joined #ruby
[12:57:00] SylarRuby: has joined #ruby
[12:57:36] Zamyatin: has joined #ruby
[12:57:56] cochise: has joined #ruby
[12:58:38] balazs: has joined #ruby
[12:59:49] leat1: has joined #ruby
[13:00:34] workmad3: has joined #ruby
[13:01:41] aryaching: has joined #ruby
[13:04:11] ljarvis: postfix rescue is the devil
[13:04:34] victortyau: has joined #ruby
[13:05:02] bsdbofh: has joined #ruby
[13:05:43] [k-: postfix if?
[13:05:52] ljarvis: is wonderful
[13:07:15] hj2007: has joined #ruby
[13:08:31] rwilcox: has joined #ruby
[13:08:34] bungoman: has joined #ruby
[13:08:35] yokel: has joined #ruby
[13:08:44] jespada_: has joined #ruby
[13:12:20] apeiros: only real issue with postfix rescue is the lack of specificity
[13:12:31] ljarvis: that's enough reason for me
[13:12:40] apeiros: yeah, for me too
[13:12:45] apeiros: but it's also the only reason :)
[13:13:02] apeiros: if we could specify the exception type, I'd probably have a couple of places with postfix rescue.
[13:13:08] ljarvis: I think headius suggestion removing them or some alternative syntax which allow adding exception classes
[13:13:53] startupality: has joined #ruby
[13:14:12] msgodf: has joined #ruby
[13:14:26] astrobun_: has joined #ruby
[13:15:04] [k-_: has joined #ruby
[13:15:23] allcentury: has joined #ruby
[13:15:27] tomaz_b: has joined #ruby
[13:15:33] nfk: has joined #ruby
[13:15:52] jhass: mmh, rescue from RuntimeError, with: false # should be possible to make that work no? check $! and reraise :P
[13:15:56] hectortrope: Hello guys any Java developers here who are actually ruby developers?
[13:16:06] jhass: ?guys hectortrope
[13:16:06] ruboto: hectortrope, we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[13:16:16] hectortrope: Hi jhass after so long time
[13:17:00] shevy: people here are too shy to admit that they use java
[13:17:23] ruboto: we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[13:17:44] hectortrope: who are the non-guys here ?? I am so interested :-)
[13:18:05] shevy: Aria, pontiki and sevenseacat
[13:18:06] jerius: has joined #ruby
[13:18:06] jhass: it shouldn't matter to you
[13:18:09] bzf: has joined #ruby
[13:18:39] [k-_: sevenseacat seems like a guy!
[13:19:03] apeiros: [k-_: inappropriate.
[13:19:08] jerius: has joined #ruby
[13:19:27] leat1: has joined #ruby
[13:19:59] bzf: I'm trying to run [10].pack "C" and keep getting back "\n" when I'm expecting "\x0A". Seems like it automatically does an ASCII conversion. Anyway to make it not do that_
[13:20:17] apeiros: >> "\x0a" == "\n"
[13:20:18] ruboto: apeiros # => true (https://eval.in/398497)
[13:20:23] jerius_: has joined #ruby
[13:20:29] jhass: bzf: it's the same byte sequence, just different representations
[13:20:31] umgrosscol: has joined #ruby
[13:21:09] MarkTurner: has left #ruby: ("Yawn")
[13:21:14] bzf: jhass: Ah, of course! Thanks
[13:21:16] apeiros: also if you do *literally* use [10].pack "C", then you'd do better to just write "\x0a" directly
[13:22:29] mary5030: has joined #ruby
[13:22:40] moogs: has joined #ruby
[13:22:42] jpfuentes2: has joined #ruby
[13:23:03] moogs: I am trying to install version 2.1.1 of Ruby but I am getting an error because a package that is required for the version of Ruby has been replaced. Any suggestions?
[13:23:18] jhass: moogs: did you try turning it off and on again?
[13:23:32] moogs: jhass: This is not the IT crowd.
[13:23:52] apeiros: moogs: any reason you install 2.1.1 instead of 2.1.6?
[13:23:56] malconis: has joined #ruby
[13:23:58] jhass: then why do you ask questions like "I get an error"?
[13:24:37] moogs: It's the version in the documentation that we are to install.
[13:24:38] nfk: has joined #ruby
[13:24:39] arup_r1: has joined #ruby
[13:24:41] [k-_: ACTION fans jhass
[13:24:55] moogs: The error was the "package that is required for the version of Ruby has been replaced"
[13:25:05] jhass: I doubt that's the full error
[13:25:07] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[13:25:25] apeiros: moogs: if you want help, don't make it difficult for those to help you
[13:25:41] iamninja: has joined #ruby
[13:25:51] moogs: apeiros: One sec. I am recreating the issue.
[13:25:55] davedev24: has joined #ruby
[13:25:57] ubuntu: has joined #ruby
[13:25:58] apeiros: ACTION brb
[13:26:09] ubuntu: hello Jh Ass
[13:26:29] loc22: has joined #ruby
[13:26:33] Guest28634: I am a very big fan of you
[13:26:49] jhass: ?ot Guest28634
[13:26:49] ruboto: Guest28634, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[13:27:01] Guest28634: You are so awesome
[13:27:06] jhass: !mute Guest28634
[13:27:06] ruboto: +q Guest28634!*@*
[13:27:07] ruboto: -o ruboto
[13:27:18] OnoSendai2: has joined #ruby
[13:27:19] moogs: The error message is "Package libncurses5-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source"
[13:27:34] moogs: However the following packages replace it: libtinfo-dev
[13:27:37] jhass: moogs: that sounds like a question for #yourOS
[13:28:05] decoponio: has joined #ruby
[13:28:09] [k-_: yup, that isnt a ruby-related question
[13:28:16] Igorshp: has joined #ruby
[13:29:40] atomical: has joined #ruby
[13:29:40] bruno-: has joined #ruby
[13:30:00] GhettoCode: has joined #ruby
[13:30:17] jhass: !unmute Guest28634
[13:30:17] ruboto: -q Guest28634!*@*
[13:30:18] ruboto: -o ruboto
[13:30:47] shevy: moogs if you have to compile something, you need to install all those required -dev packages as otherwise you can not compile it
[13:30:54] OnoSendai2: Hi all, I'm wondering why Kernel.system("someprogram") doesn't always show the message "Segementation Fault" for a crashing program?
[13:31:34] JAss: has joined #ruby
[13:31:35] _blizzy_: has joined #ruby
[13:31:39] [k-_: not all programs crash because of segmentation faults
[13:31:49] bnagy: not all crashing programs output that, even when it is a segv
[13:31:49] [k-_: a segmentation fault is a special kind of error
[13:31:50] jhass: if you have some reproducable cases for when it does and when it doesn't we might hint why, but there are too many factors to say
[13:31:52] mikecmpbll: has joined #ruby
[13:32:24] OnoSendai2: so i'm running it on a program that is set up to segmentation fault every time
[13:32:39] shevy: OnoSendai2 system() will return true or false, if you want more information, you can use result = `` and in particular, with 2>&1 such as: result = `ls 2>&1`
[13:33:00] [k-_: i saw a big O and thought of Ox0dea :(
[13:33:08] shevy: you worship him!
[13:33:10] bnagy: OnoSendai2: what are you actually trying to do?
[13:33:22] OnoSendai2: shevy: It's not really about the return value. I want the message "Segmentation Fault" to be printed to stdout or stderr
[13:33:44] OnoSendai2: bnagy: We have a ruby script, running in buildbot, that runs an executable (to do unit tests)
[13:33:47] jhass: warn "Segmentation Fault" # done
[13:33:51] mhib: has joined #ruby
[13:33:51] shevy: yeah but where does this message appear, hence the 2>&1
[13:34:15] OnoSendai2: if the executable crashes, we would like to have the message "Segmentation fault" (or similar) in the buildbot log
[13:34:42] OnoSendai2: jhass: What's 'warn'?
[13:34:44] jhass: do you have any code after the system call?
[13:34:55] konsolebox: OnoSendai2: you may need to redirect stderr as well
[13:34:59] jhass: just a convenience wrapper around $stderr.puts
[13:35:07] shevy: warn is here http://ruby-doc.org/core-2.2.2/Kernel.html#method-i-warn
[13:35:23] Casty: has joined #ruby
[13:35:40] bnagy: the point is that not all programs will output "segmentation fault" at all, ever, on any fd
[13:35:49] tmtwd: has joined #ruby
[13:35:53] OnoSendai2: konsolebox: So I have a test script set up on my local VM. Output to CERR is printed, but not the "Segmentation fault" message
[13:36:20] bnagy: if you want to know about abnormal exits you should probably be handling signals, but that's a bit thorny with ruby
[13:36:33] sevenseacat: has joined #ruby
[13:37:11] shevy: you can send that message on your own
[13:37:42] bnagy: why would you send segmentation fault if the crash isn't a segv?
[13:37:48] bnagy: that seems silly.
[13:38:06] OnoSendai2: shevy: sure, I could. I was just wondering why it is somehow being suppressed when the crash happens through Kernel.system()
[13:38:11] pietr0: has joined #ruby
[13:38:13] konsolebox: OnoSendai2: Kernel.system() executes the string in it with a shell. It is the output of this whole process group (includes the shell) that you'd need to redirect so you could catch the output. You can do that redirection in Ruby by using other methods besides Kernel.system() but the quick thing i'd do is `Kernel.system("exec 2>&1; your_command")`.
[13:38:22] shevy: you only have to read what I wrote above. why don't you use ``
[13:38:41] bnagy: redirecting output is only going to work if there is output
[13:39:06] JoshL: has joined #ruby
[13:39:08] _blizzy_: has joined #ruby
[13:39:36] Igorshp: has joined #ruby
[13:39:53] leat1: has joined #ruby
[13:40:31] DaniG2k: has joined #ruby
[13:40:50] bnagy: if you're the parent then signals and exit statuses are both fairly reliable, signals being more granular
[13:40:59] bnagy: otherwise there's the kernel trap handler I guess o_0
[13:41:17] bnagy: but waiting for a message on stderr is never going to be a robust approach to this problem
[13:41:19] podman: has joined #ruby
[13:41:19] shevy: yeah Signal.trap('SIGINT') { exit }
[13:41:25] nfk: has joined #ruby
[13:41:45] bnagy: source: I crash programs for a living
[13:41:58] shevy: documentation of system http://ruby-doc.org/core-2.2.0/Kernel.html#method-i-system states three return values possible: true, false, nil
[13:42:01] OnoSendai2: i'm not waiting for it, would just like it to appear in stderr/stdout at some point
[13:42:15] cpruitt: has joined #ruby
[13:42:31] shevy: and you have it in the above result. and if `` is still not enough, there is popen
[13:42:38] bnagy: OnoSendai2: do you actually care about the detail for an abnormal exit?
[13:42:54] bnagy: otherwise, just get the exit status
[13:43:01] OnoSendai2: bnagy: Well, we can print out $? I guess
[13:43:10] bnagy: one good way is what shevy just suggested ( Open3 )
[13:43:11] shevy: http://ruby.bastardsbook.com/chapters/external-programs/ is long but has a lot of info
[13:43:21] shevy: "Opening a pipe with popen"
[13:43:33] bnagy: there are a few popen methods that are convenient
[13:43:58] shevy: http://ruby-doc.org/stdlib-2.2.2/libdoc/open3/rdoc/Open3.html
[13:44:05] bnagy: if you want to be able to tell the difference between an actual segfault, floating point exception, illegal instruction etc etc you probably need a signal handler
[13:44:10] rbennacer: has joined #ruby
[13:44:38] bnagy: but for unit testing I don't know if you need that much detail :P
[13:44:45] gamename: has joined #ruby
[13:44:45] freerobby: has joined #ruby
[13:44:46] OnoSendai2: yeah we don't really
[13:45:01] ruurd: has joined #ruby
[13:45:21] konsolebox: OnoSendai2: just a note: i think it is the "shell" that produces that message. Probably after receiving 139 as exit code from the program.
[13:45:30] nateberkopec: has joined #ruby
[13:45:38] OnoSendai2: konsolebox: Yeah I think you are probably right
[13:45:42] w1xz: has joined #ruby
[13:45:56] OnoSendai2: shouldn't ruby be printing output from the shell then? :)
[13:46:33] konsolebox: OnoSendai2: and i'm not sure if it is applicable in all shells. but in bash it's likely (seeing its code).
[13:46:41] bnagy: I'm going to cook dinner :)
[13:47:04] jhass: OnoSendai2: ruby doesn't capture anything in the default system invocation, it simply leaves the child processes stdout and stderr to be the same as the parent processes
[13:47:17] shevy: OnoSendai2 if. you. would. just. use. ``. you. would. have. already. had. that. message.
[13:47:20] konsolebox: OnoSendai2: how do you exactly execute the program then?
[13:47:35] OnoSendai2: shevy: double quotes?
[13:47:41] konsolebox: OnoSendai2: oh yes i was saying earlier, Kernel.system('') doesn't necessarily capture anything.
[13:47:46] shevy: the backticks, it's actually a method
[13:47:46] astrobun_: has joined #ruby
[13:48:02] davedev24: has joined #ruby
[13:48:04] shevy: http://ruby-doc.org/core-2.2.2/Kernel.html#method-i-60
[13:48:14] rikkipitt: has joined #ruby
[13:48:26] OnoSendai2: we don't want to use backticks
[13:48:32] OnoSendai2: we need error codes, return value tc..
[13:48:44] vbatts|w1: has joined #ruby
[13:48:45] shevy: why did you use system() again?
[13:48:56] vbatts|w1: has left #ruby: ()
[13:49:18] shevy: ok so you used system and $?
[13:49:33] OnoSendai2: shevy: that's what we will use, yeah
[13:50:12] leat1: has joined #ruby
[13:51:24] OnoSendai2: It looks like to me, somewhere along the line, some buffer is not being flushed. Could be a shell issue, could be a ruby issue. Problem is apparently on windows as well. So could be a ruby issue
[13:51:30] dgutierrez1287: has joined #ruby
[13:51:30] lkba: has joined #ruby
[13:51:35] krz: has joined #ruby
[13:52:25] rbennacer: has joined #ruby
[13:52:25] konsolebox: OnoSendai2: To make it clear, do you need to capture output?
[13:52:46] OnoSendai2: I want the error to show up in buildbot mainly
[13:53:55] revath: has joined #ruby
[13:54:26] tkuchiki: has joined #ruby
[13:55:30] paulcsmith: has joined #ruby
[13:57:14] Kully3xf_: has joined #ruby
[13:57:14] whippythellama: has joined #ruby
[13:58:24] konsolebox: OnoSendai2: so you actually don't want it to be captured but just be shown? Perhaps it depends on the shell. And afaik Kernel.system() executes /bin/sh.
[13:58:41] jhass: most forms do, not all
[13:58:52] tcopeland: has joined #ruby
[13:59:11] OnoSendai2: konsolebox: I'm not 100% sure how buildbot works. I think it just gets everything from stdout and stdcerr of the program it runs (our ruby script in this case)
[13:59:41] PhantomSpank: has joined #ruby
[13:59:48] konsolebox: jhass: yes, if not a single string
[14:00:02] leat1: has joined #ruby
[14:00:05] eGGsha: has joined #ruby
[14:00:10] jhass: the array form does neither
[14:00:21] beef-wellington: has joined #ruby
[14:00:56] jhass: and iirc it does some hackery depending on whether it detects shell like expressions (|, &, > etc)
[14:01:04] jhass: and on windows it does even parse these on its own
[14:01:14] Kully3xf: has joined #ruby
[14:01:40] jhass: the exec family (exec, spawn, system) is easily the most complex interface in Ruby core
[14:02:11] konsolebox: OnoSendai2: if it executes a program and it doesn't use a shell between it then maybe you wouldn't get the message at all.
[14:02:25] MagePsycho_: has joined #ruby
[14:02:39] ndrei: has joined #ruby
[14:02:43] OnoSendai2: maybe that's it
[14:02:54] OnoSendai2: sometimes it seems to show the message and sometimes not
[14:02:59] lessless: has joined #ruby
[14:03:03] OnoSendai2: maybe that's ruby deciding to use a shell or not
[14:03:06] Rodya__: has joined #ruby
[14:03:09] jhass: you still didn't clarify what sometimes means here
[14:03:12] jhass: what it depends on
[14:03:31] OnoSendai2: ruby version i think
[14:03:32] jhass: different invocations, pure perceived randomness etc
[14:03:39] konsolebox: jhass: i agree. better avoid Kernel.system() unless you are explicitly wanting /bin/sh.
[14:05:37] dopie: has joined #ruby
[14:05:51] giuseppesolinas: has joined #ruby
[14:06:13] Oog: has joined #ruby
[14:06:35] i8igmac: has joined #ruby
[14:06:44] konsolebox: OnoSendai2: how do you actually make buildbot and ruby work together? buildbot executes ruby, or ruby executes buildbot?
[14:06:55] OnoSendai2: buildbot slave executes ruby
[14:07:01] davejlong: has joined #ruby
[14:07:42] konsolebox: OnoSendai2: and ruby executes a program?
[14:07:55] griffindy: has joined #ruby
[14:08:02] tuor: hi, i use a class, can i just add some methods to it?
[14:08:09] konsolebox: OnoSendai2: through Kernel.system() which you had configured? if that's so, i'd examine /bin/sh
[14:08:21] shevy: tuor yes. always. just open it up again
[14:08:37] JMoir: Does anyone know of any good resources to learn about testing; what to test, how to test, practices and stuff? I'm really bad at testing, I'm writing my first proper app in ruby and realised I have two tests despite having a functioning site... Oops
[14:08:38] HakN99: has joined #ruby
[14:08:43] tuor: ah nice.
[14:08:45] [k-_: tuor, since you are very new to ruby, a book would greatly benefit you
[14:09:12] juanpablo_: has joined #ruby
[14:09:32] OnoSendai2: konsolebox: ok, thanks. I'm happy with the answer that it somtimes runs a shell and sometimes not. Either way, we can use $? from now on to print out to builbot ourselves if the program crashed.
[14:09:45] tuor: [k-_, yes, I have one, I just didn't know what to search. (for "reediting" a class)
[14:10:00] evanjs: has joined #ruby
[14:10:09] [k-_: get many books!
[14:10:43] Zamyatin: has joined #ruby
[14:11:20] Scroff: has joined #ruby
[14:11:22] konsolebox: OnoSendai2: ok. just note $?.exitstatus == 139 is SEGV
[14:11:23] shevy: tuor class Foo; end; now we add a method... class Foo; def bar; puts 'hi from bar'; end; end
[14:11:44] OnoSendai2: konsolebox: ok, we're just doing puts $?
[14:11:54] werelivinginthef: has joined #ruby
[14:12:36] jespada_: has joined #ruby
[14:13:55] Coraline: JMoir: I'm fond of The Rspec Book
[14:14:43] tjohnson: has joined #ruby
[14:15:04] tuor: shevy, yes. Just didn't know, that i can do it again (not only one time) the exact same way.
[14:15:30] shevy: last definition wins in ruby
[14:15:57] shevy: >> class Foo; def bla; puts 'this is bla'; end; end; class Foo; def bla; puts 'this is not bla'; end; end; Foo.new.bla
[14:15:58] ruboto: shevy # => this is not bla ...check link for more (https://eval.in/398519)
[14:16:12] JMoir: Coraline: I just read the description and this looks great! In my past searches all that I had found was how to do basic tests on an application with about 10 lines of code. I wanted more theory and practices so I can apply them to bigger projects well. This looks good, thanks.
[14:16:14] bsdbofh: has joined #ruby
[14:16:22] shevy: the OOP in ruby is a lot nicer than the OOP in php
[14:16:34] tuor: shevy, ah ok.
[14:16:57] bougyman: shevy: but not as nice as the OOP in common lisp.
[14:17:08] shevy: don't know how lisp does OOP
[14:17:18] nfk: has joined #ruby
[14:17:24] konsolebox: JMoir: +1 for RSpec. haven't exactly used it yet, but it's on my list for doing tests someday
[14:18:04] workmad3: has joined #ruby
[14:18:26] JMoir: konsolebox: I'll definitely have to get it then, it looks like quite a few people say it's a good book
[14:18:43] jenrzzz: has joined #ruby
[14:19:21] konsolebox: >> class Foo; end; Foo.singleton_class.class_exec{ def x; puts :x; end }; Foo.x
[14:19:21] ruboto: konsolebox # => x ...check link for more (https://eval.in/398529)
[14:19:59] konsolebox: tuor: ^ just to add a sweet little complexity hehe :)
[14:20:28] fullofcaffeine: has joined #ruby
[14:20:40] [k-_: is 1.874 kB good?
[14:21:19] [k-_: https://github.com/SkyBirdSoar/libobf/blob/master/lib/libobf.min.rb
[14:22:10] arup_r: has joined #ruby
[14:22:37] diegoviola: has joined #ruby
[14:22:40] arup_: has joined #ruby
[14:23:16] tubuliferous_: has joined #ruby
[14:23:22] fabrice31: has joined #ruby
[14:23:30] tuor: konsolebox, oh don't get your code. But I think I'm fine with my basics for the moment. :)
[14:23:34] devdazed: has joined #ruby
[14:23:37] arup_r: has joined #ruby
[14:23:52] konsolebox: tuor: yes, just something to look forward to :)
[14:24:21] [k-_: its the same as eigenclass, metaclass, class<<self etc!
[14:25:21] tuor: konsolebox, ok.
[14:25:47] shevy: tuor he means that you can extend the class, but also the object instance itself
[14:26:01] RegulationD: has joined #ruby
[14:26:10] konsolebox: [k-_: nice stuff btw. you wrote it from scratch? i mean it
[14:26:26] shevy: >> class Foo; end; foo = Foo.new; def foo.hi; puts 'hi'; end; foo.hi
[14:26:27] ruboto: shevy # => hi ...check link for more (https://eval.in/398543)
[14:26:46] konsolebox: ACTION loves obscurification, encryption and stuffs.
[14:27:01] shevy: [k-_ just recruited another one :(
[14:27:08] tuor: shevy, ah ok. Hmm sound nice, so I can add a method to it just to the one instance?
[14:27:10] kies^: has joined #ruby
[14:27:17] shevy: tuor yeah
[14:27:22] tuor: shevy, ah ok. :)
[14:27:30] [k-_: yes i wrote it from scratch
[14:27:36] [k-_: not in one line tho
[14:27:51] aderium: has joined #ruby
[14:27:55] [k-_: that takes too much skill :)
[14:29:12] r_baron: has joined #ruby
[14:30:05] Hobogrammer: has joined #ruby
[14:30:14] yh: has joined #ruby
[14:30:18] momomomomo: has joined #ruby
[14:30:46] tuor: do I need to write the inherit again when the class was declared like this: class Templates < Basic; end;
[14:31:18] icebourg: has joined #ruby
[14:31:48] tuor: or can i just open it with: class Templates; def foo; end; end
[14:32:25] tuor: its about this class: https://github.com/express42/zabbixapi/blob/master/lib/zabbixapi/classes/templates.rb line 2
[14:32:45] tuor: I use it, and want to add a method to it.
[14:32:47] eggoez: has joined #ruby
[14:32:48] [k-_: you do not need to reinherit
[14:33:05] [k-_: you just reopen it and add the methods you need
[14:33:08] shevy: tuor you won't need to re-specify the parent class
[14:33:12] curses_: has joined #ruby
[14:33:18] [k-_: shevy: that's what i said!
[14:33:26] arooni-mobile: has joined #ruby
[14:33:30] shevy: you need to simplify [k-_
[14:33:43] T3: has joined #ruby
[14:33:53] tuor: shevy, I understood both. :) thx
[14:33:54] [k-_: do my code look simple?
[14:34:10] shevy: your code is the strangest ruby code I have ever seen
[14:34:23] khebbie: has joined #ruby
[14:34:42] Scroff: has joined #ruby
[14:35:10] [k-_: thank you
[14:35:28] [k-_: i have gone beyond the phase of writing good code
[14:35:37] [k-_: > "good" code
[14:36:12] Fluent: has joined #ruby
[14:36:20] atomical: has joined #ruby
[14:36:57] [k-_: my code now has blocks of numbers
[14:37:31] hinbody: has joined #ruby
[14:37:34] shevy: you have become an ethereal ruby entity
[14:37:45] shevy: you no longer write code - you create
[14:37:46] yh: has joined #ruby
[14:37:49] jcromartie: has joined #ruby
[14:38:02] NeverDie: has joined #ruby
[14:38:06] shevy: now if only it would be readable code!!!
[14:38:15] zeroDivisible: has joined #ruby
[14:38:37] pietr0: has joined #ruby
[14:39:00] [k-_: i actually can make it more difficult to understand the obscured method names if to_s the array and remove all the symbols and spaces
[14:39:29] khando_: has joined #ruby
[14:40:02] Rodya_: has joined #ruby
[14:40:40] Igorshp: has joined #ruby
[14:40:48] chthon: has joined #ruby
[14:41:34] [k-_: so this [[["1", 1], ["0", 1], ["9", 1]], [["9", 1], ["7", 1]], [["1", 2], ["2", 1]]] becomes [[11019], [9171], [1221]]
[14:41:42] [k-_: i did that manually ;-;
[14:42:17] Violentr: has joined #ruby
[14:42:27] finisherr: has joined #ruby
[14:43:11] NeverDie: has joined #ruby
[14:44:03] tuor: [k-_, didn't you forgott a 1?
[14:44:43] tuor: isn't it: [[110191], [9171], [1221]]
[14:44:55] [k-_: ah, yes, thanks
[14:45:15] [k-_: it actually means map
[14:46:01] [k-_: i can flatten the array to become [110191,9171,1221]
[14:47:44] khando_: has joined #ruby
[14:48:21] Agoldfish: has joined #ruby
[14:48:39] khando_: has joined #ruby
[14:48:45] aderium: how do I ask a gem to show me what options it has for installation ?
[14:49:04] jgpawletko: has joined #ruby
[14:49:13] khando_: has joined #ruby
[14:49:30] pfish: has joined #ruby
[14:51:26] khando_: has joined #ruby
[14:52:14] jespada_: has joined #ruby
[14:53:01] sepp2k: has joined #ruby
[14:53:09] rippa: has joined #ruby
[14:53:45] uris: has joined #ruby
[14:54:16] PaulCapestany: has joined #ruby
[14:54:29] khando_: has joined #ruby
[14:54:31] tkuchiki: has joined #ruby
[14:54:49] pietr0_: has joined #ruby
[14:55:13] charliesome: has joined #ruby
[14:55:54] failshell: has joined #ruby
[14:56:58] yokel: has joined #ruby
[14:57:19] khando_: has joined #ruby
[14:59:03] phutchins1: has joined #ruby
[14:59:28] shevy: not sure that this is possible
[14:59:50] jolux: has joined #ruby
[15:00:08] balazs: has joined #ruby
[15:00:33] paulcsmith: has joined #ruby
[15:01:16] freerobby: has joined #ruby
[15:01:40] aderium: no matter what I do I cant tell a gem to use c++ instead of g++
[15:03:20] shevy: no I think you can somehow influence that
[15:03:30] shevy: do you know in which variable the g++ is stored?
[15:05:24] khando_: has joined #ruby
[15:05:52] aderium: I dont know where it is being stored
[15:05:54] khando_: has joined #ruby
[15:06:17] aderium: I wish I new how to query a gem to find out what available options I have at install
[15:07:29] nfk: has joined #ruby
[15:07:35] khebbie: has joined #ruby
[15:08:57] d10n-work: has joined #ruby
[15:09:21] momomomomo_: has joined #ruby
[15:09:40] enyo: has joined #ruby
[15:11:24] lkba_: has joined #ruby
[15:11:30] atomical: has joined #ruby
[15:12:00] charliesome: has joined #ruby
[15:13:08] werelivinginthef: has joined #ruby
[15:13:54] aryaching: has joined #ruby
[15:14:10] LMity: has joined #ruby
[15:14:23] finisherr: has joined #ruby
[15:14:26] paulcsmith: has joined #ruby
[15:14:31] JoshL: has joined #ruby
[15:15:05] dfockler: has joined #ruby
[15:15:57] nfk: has joined #ruby
[15:17:07] jobewan: has joined #ruby
[15:20:32] danzilio: has joined #ruby
[15:20:36] ddarkpassenger: has joined #ruby
[15:20:58] lavros: has joined #ruby
[15:22:07] revath: has joined #ruby
[15:22:10] snockerton: has joined #ruby
[15:23:02] shevy: Aderium what gem is it?
[15:23:11] aderium: eventmachine
[15:23:16] rcvalle: has joined #ruby
[15:23:19] codecop: has joined #ruby
[15:23:26] ljarvis: oh I have a great solution!
[15:23:28] iooner: has joined #ruby
[15:23:30] ljarvis: don't use that shit
[15:23:46] shevy: # on Unix we need a g++ link, not gcc.
[15:23:47] shevy: CONFIG['LDSHARED'] = "$(CXX) -shared"
[15:23:52] shevy: Aderium can you modify this?
[15:23:58] aderium: unfortunately it would be a lot of code change, for now I need to deal with it until I can move to something else
[15:24:07] shevy: it is in extconf.rb, at the when /solaris/ check
[15:24:15] mikecmpb_: has joined #ruby
[15:24:48] aderium: Yeah but that means I need to clone or manually change the extconf, was wondering if I could just pass the CXX as a -- --with options
[15:24:56] GitGud: has joined #ruby
[15:25:05] theery: has joined #ruby
[15:25:12] shevy: yeah manually change it, then rebuild the .gem, and host it somewhere :D
[15:25:16] aderium: that CONFIG['LDSHARED'] = "$(CXX) -shared" get passed with SUNWPro wich is not the case for Solaris 11.2
[15:25:38] shevy: just modify the file?
[15:25:47] aderium: modifying now
[15:25:50] aderium: lets see how it goes
[15:25:56] aderium: then just rake it ?
[15:25:59] fullofcaffeine: has joined #ruby
[15:25:59] mikecmpbll: has joined #ruby
[15:26:05] MagePsycho_: has joined #ruby
[15:26:13] shevy: I actually don't use rake
[15:26:19] shevy: I use the good old setup.rb
[15:26:43] shevy: you can try to run that extconf.rb directly though
[15:26:49] shevy: "ruby extconf.rb"
[15:26:55] shevy: it should generate a Makefile
[15:26:59] arup_r: I have duplicated code https://gist.github.com/aruprakshit/c8be29a2a2ff8021147d#file-terminal_settings-rb-L22 and https://gist.github.com/aruprakshit/c8be29a2a2ff8021147d#file-error-rb-L13-L16 .. How can I better organize it ? idea please
[15:27:55] Spami: has joined #ruby
[15:28:40] jhack: has joined #ruby
[15:28:40] jhack: has joined #ruby
[15:29:00] ljarvis: arup_r: use a module and a constant
[15:29:31] Violentr: has joined #ruby
[15:29:39] aderium: and that worked .....
[15:29:51] aderium: it had a gemspec so I gem build ...spec
[15:29:54] aderium: thengem install
[15:29:58] pdoherty: has joined #ruby
[15:30:24] arup_r: ok.. then include it.. right ?
[15:30:35] arup_r: good idea
[15:30:47] ljarvis: arup_r: yes, something like https://gist.github.com/leejarvis/b5014cecf3c915358e39
[15:30:56] aderium: ok that is done
[15:31:00] aderium: now last one
[15:31:13] aderium: ah no sqlite3
[15:31:42] giuseppesolinas: has joined #ruby
[15:31:50] shevy: that should be simple
[15:31:52] shevy: because sqlite is so small
[15:32:04] arup_r: ljarvis, that's awesome trick.. just one thing though.. why `missing_attributes?` not `missing_attributes` ?
[15:32:11] Y_Ichiro: has joined #ruby
[15:32:24] arup_r: I am talking about the naming convention..
[15:32:25] ljarvis: arup_r: eh, right; it was written quickly :)
[15:32:35] ljarvis: missing_attributes is fine
[15:32:36] arup_r: ok.. I thought something I am missing..
[15:32:43] arup_r: anyway thanks
[15:32:57] jhass: arup_r: I'd make it a convenience method on PartialsettingsFound
[15:33:20] jhass: def self.partial_settings? object
[15:33:31] evanjs: has joined #ruby
[15:33:46] ljarvis: how dare you propose an equally reasonable alternative
[15:33:51] riotjones: has joined #ruby
[15:34:07] ljarvis: arup_r: in short: use a method
[15:34:07] finisherr: has joined #ruby
[15:34:19] momomomomo: has joined #ruby
[15:34:33] aderium: https://gist.github.com/CirrusThink/8bdf7f89f190d0fd816b
[15:34:37] aderium: now what !
[15:35:17] Y_Ichiro: require 'em/pure_ruby' like what the error message says?
[15:35:27] aderium: where do I put that ?
[15:36:07] Y_Ichiro: well, it's from your ./initializer.rb:8:in `<main>' according to the gist, so maybe there
[15:36:20] Y_Ichiro: idk if this is what you want to do though
[15:37:03] dangerousdave: has joined #ruby
[15:37:08] Y_Ichiro: typically a gem loads a C extension for a cpu extensive task, if you use this workaround, it will lag
[15:37:50] aderium: yeah that is what we are doing
[15:37:59] havenwood: has joined #ruby
[15:38:26] aderium: so I would need to add it into our .c file ?
[15:38:37] MagePsycho_: has joined #ruby
[15:38:42] Y_Ichiro: it's the EventMachine's C extension that failed
[15:38:59] aderium: I dont see an initializer.rb in eventmachine
[15:39:10] Y_Ichiro: uh, where are you calling eventmachine from?
[15:39:16] Y_Ichiro: it's where you are calling it from you have to add it
[15:39:42] bronson: has joined #ruby
[15:39:52] arup_r: ljarvis, `didn't get either of you.. I already follow the pattern you gave..
[15:40:06] nanSTA: has joined #ruby
[15:40:48] aderium: i thoght maybe its the -KPIC flags that are causing this
[15:41:03] arup_r: sorry... I get you ljarvis, but not jhass.
[15:41:48] shevy: Aderium that looks like an error from eventmachine
[15:42:26] shevy: gems/extensions/x86_64-solaris-2.11/2.1.0-static/eventmachine-2333335a9fbf/rubyeventmachine.so: symbol _init: value 0x7f0044750225 does not fit
[15:42:52] jhass: arup_r: class PartialSettingFound; def self.missing_settings_from(config); %i(...).select { ... }; end;
[15:42:56] Y_Ichiro: tbh i would avoid eventmachine like a plague if i were you
[15:43:27] jhass: and then if PartialSettingsFound.missing_settings_from(self).any? and missing_keys = self.class.missing_settings_from(obj)
[15:43:30] arup_r: ljarvis, here is what I wrote following you https://gist.github.com/aruprakshit/c8be29a2a2ff8021147d#file-attribute_checking-rb-L3
[15:43:48] arup_r: jhack, let me understand your code.. I just saw it
[15:43:55] arup_r: jhass: ^^
[15:44:34] Pathfinder: has joined #ruby
[15:44:38] pfish: why would rb_proc_call return a non_nil value?
[15:45:24] aderium: yeah something about the -KPIC
[15:45:38] arup_r: jhass, ok.. then how would I use the method inside https://gist.github.com/aruprakshit/c8be29a2a2ff8021147d#file-terminal_settings-rb-L22 if i define it inside the Error class ?
[15:46:08] jhass: arup_r: ready what I wrote again
[15:46:12] jhass: it's literally there
[15:46:45] jaygen_: has joined #ruby
[15:46:46] jhass: er, *read
[15:47:39] jespada_: has joined #ruby
[15:47:41] endash: has joined #ruby
[15:47:48] ljarvis: arup_r: any_attributes_missing? could just be missing_attributes(obj).any?
[15:48:28] arup_r: yes.. humm .. that method seems overkill.. I am taking jhass suggestions.. :) ljarvis
[15:48:51] dangerousdave: has joined #ruby
[15:48:52] kies^: has joined #ruby
[15:49:11] arup_r: but yes both of your intention is same.. just a method as you said already..
[15:49:17] aderium: ok so i do a irb> puts RbConfig::CONFIG and I see CCDLFLAGS"=>" -KPIC"
[15:49:26] aderium: is there a way to remove that form the CONFIG ?
[15:49:51] sharpmachine: has joined #ruby
[15:50:02] aderium: and also change CXX"=>"g++" to CXX=CC
[15:50:10] aderium: is that something I can do while in irb ?
[15:50:22] Cache_Money: has joined #ruby
[15:51:36] tuor: has left #ruby: ("WeeChat 1.1.1")
[15:51:56] aspiers: has joined #ruby
[15:52:56] endash: has joined #ruby
[15:53:17] Maletor: has joined #ruby
[15:55:05] stef1a: has joined #ruby
[15:55:40] stef1a: i'm using ruby 2.1.0 and i want to convert an array of symbols to a set of symbols, but #to_set converts an array of symbols to a set of strings. help?
[15:55:41] TheNet: has joined #ruby
[15:55:59] jespada__: has joined #ruby
[15:56:30] jhass: 21>> require "set; %i(foo bar baz).to_set
[15:56:31] ruboto: jhass # => /execpad/interpreters/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': ...check link for more (https://eval.in/398593)
[15:56:42] jhass: 21>> require "set"; %i(foo bar baz).to_set
[15:56:43] ruboto: jhass # => #<Set: {:foo, :bar, :baz}> (https://eval.in/398594)
[15:56:47] jhass: nope, it doesn't
[15:57:02] davejlong: has joined #ruby
[15:57:39] stef1a: never mind
[15:59:54] luckyno7: has joined #ruby
[16:00:11] eGGsha: has joined #ruby
[16:00:52] coderkevin: has joined #ruby
[16:01:34] amclain: has joined #ruby
[16:02:28] ljarvis: >> require 'date'; 3.times.map { |i| Date.new(2015, 1, i + 1) }.minmax.map(&:to_s)
[16:02:29] ruboto: ljarvis # => ["2015-01-01", "2015-01-03"] (https://eval.in/398595)
[16:03:24] phoo1234567: has joined #ruby
[16:03:30] ljarvis: >> [1].minmax
[16:03:31] ruboto: ljarvis # => [1, 1] (https://eval.in/398596)
[16:04:15] freerobby: has joined #ruby
[16:04:22] towski_: has joined #ruby
[16:04:34] startupality: has joined #ruby
[16:04:36] jottr_: has joined #ruby
[16:05:03] Rollabunna: has joined #ruby
[16:08:25] gizmore: has joined #ruby
[16:09:46] Alayde: has joined #ruby
[16:09:56] phoo1234567: has joined #ruby
[16:10:48] drewo: has joined #ruby
[16:11:01] leat1: has joined #ruby
[16:11:11] mdarby: has joined #ruby
[16:11:51] tubuliferous_: has joined #ruby
[16:11:57] pfish: how would one use rb_proc_call
[16:12:06] pfish: like what would i need to pass to it
[16:12:28] bricker: has joined #ruby
[16:13:07] tkuchiki: has joined #ruby
[16:14:03] mleung: has joined #ruby
[16:15:57] pfish: and how is it different from proc_call
[16:16:19] fullofcaffeine: has joined #ruby
[16:17:49] wallerdev: has joined #ruby
[16:18:37] marr: has joined #ruby
[16:18:39] tkuchiki: has joined #ruby
[16:18:52] finisherr: has joined #ruby
[16:18:56] JakFrist: has joined #ruby
[16:19:36] havenwood: pfish: rb_proc_call calls proc_call, right?
[16:19:57] havenwood: pfish: dunno
[16:20:43] pfish: no it calls rb_vm_invoke_proc
[16:20:51] [Butch]: has joined #ruby
[16:21:01] yardenbar: has joined #ruby
[16:21:34] rehat_: has joined #ruby
[16:21:39] mary5030: has joined #ruby
[16:21:55] curses: has joined #ruby
[16:22:26] mary5030: has joined #ruby
[16:22:29] danzilio: has joined #ruby
[16:22:34] iateadonut: has left #ruby: ()
[16:22:40] theery_: has joined #ruby
[16:23:13] pfish: I'm trying to update a class with similar ruby level sematics to Proc, ie i want to make it so that my class can do PPR.new{__insert block here__},call and have it call the ruby block, but with me being able to insert some c code before and after it does
[16:23:38] pfish: by update I mean it was written to be used in 1.8.6
[16:23:44] pfish: but it used proc_invoke
[16:23:50] pfish: which doesnt exist anymore
[16:23:52] quimrstorres: has joined #ruby
[16:24:10] fabrice31: has joined #ruby
[16:24:46] pfish: so im trying to find some sort of replacement
[16:24:57] jespada__: has joined #ruby
[16:25:01] teosz: join #ruby=core
[16:25:46] Ox0dea: has joined #ruby
[16:26:07] towski_: has joined #ruby
[16:26:11] havenwood: #ruby-core is pretty quiet
[16:26:43] Ox0dea: pfish: Any reason you can't use the "normal" API to do that?
[16:27:01] Ox0dea: That is, define PPR.new to expect a block and just use rb_yield().
[16:27:38] Ilyas: has joined #ruby
[16:28:07] Ox0dea: havenwood: #ruby-core is a graveyard through which a robot wanders shouting about typo fixes.
[16:28:11] eggoez: has joined #ruby
[16:28:19] havenwood: Ox0dea: hehe
[16:28:36] havenwood: Ox0dea: true, that babbling robot isn't the same as silence
[16:28:49] ZoanthusR: has joined #ruby
[16:29:40] Ox0dea: Shame, really. I've considered asking in my rudimentary Japanese, but that's more likely to offend than start a worthwhile conversation.
[16:30:00] pfish: Ox0dea: I can think of one... I'm just not sure how to get blocks
[16:30:04] ruurd: has joined #ruby
[16:30:05] devbug: has joined #ruby
[16:30:12] Ox0dea: pfish: Every method takes an implicit block.
[16:30:46] Ox0dea: >> def foo; proc[1, 2] end; foo { |x, y| x + y }
[16:30:47] ruboto: Ox0dea # => 3 (https://eval.in/398607)
[16:31:19] duderonomy: has joined #ruby
[16:31:25] davedev24: has joined #ruby
[16:31:33] yqt: has joined #ruby
[16:32:16] pfish: so rb_yield the block
[16:32:53] Ox0dea: You yield a value *to* the block, but yeah, that should suffice.
[16:32:56] Ox0dea: Happy to help.
[16:33:32] jhack: has joined #ruby
[16:33:44] psyprus: has joined #ruby
[16:33:45] jhack: has joined #ruby
[16:34:01] Maletor: has joined #ruby
[16:35:04] pfish: ok... i vaguely remember how blocks works. Last time i seriously used ruby was years ago...
[16:35:04] RobertBirnie: has joined #ruby
[16:35:21] graydot: has joined #ruby
[16:35:31] pfish: is there some example of this "standard" syntax>
[16:36:42] thelastinuit: has joined #ruby
[16:36:52] dgutierrez1287: has joined #ruby
[16:38:59] mdarby: has joined #ruby
[16:39:05] Ox0dea: pfish: Well, lots of internal code does eschew the convenience of rb_yield() for the sake of performance or malleability; enum.c contains loads of examples in that regard.
[16:40:50] wallerdev: has joined #ruby
[16:43:03] JakFrist: has joined #ruby
[16:44:03] workmad3: has joined #ruby
[16:44:25] chishiki1: has joined #ruby
[16:45:23] Macaveli: has joined #ruby
[16:45:31] davedev24: has joined #ruby
[16:45:59] Senjai: Good morning ruby
[16:46:36] mozzarella: good morning
[16:46:45] bronson: has joined #ruby
[16:46:55] curses: has joined #ruby
[16:47:27] shevy: Aderium you can overrule it, but I think it may be hardcoded somewhere
[16:48:08] simplyianm: has joined #ruby
[16:48:14] davejlong: has joined #ruby
[16:48:32] aderium: shevy when I do an irb> puts RbConfig::CONFIG I notice a "CCDLFLAGS"=>" -KPIC is it possible via irb to update that setting to something else ?
[16:48:52] Cache_Money: has joined #ruby
[16:49:40] shevy: not permanently but you can overrule it
[16:49:44] shevy: simply set it:
[16:49:53] shevy: RbConfig::CONFIG['CCDLFLAGS'] = 'bla'
[16:50:04] shevy: I have no idea where RbConfig stores that stuff
[16:50:23] shevy: lib/ruby/2.2.0/x86_64-linux/rbconfig.rb: CONFIG["CCDLFLAGS"] = "-fPIC"
[16:50:23] shevy: lib/ruby/2.2.0/mkmf.rb:CCDLFLAGS = #{$static ? '' : CONFIG['CCDLFLAGS']}
[16:50:30] shevy: guess you can just modify rbconfig.rb
[16:50:42] ohaibbq: has joined #ruby
[16:51:15] Ox0dea: Aderium: Changing these values in RbConfig won't affect how your interpreter was compiled.
[16:52:05] Ox0dea: Perhaps I've missed some subtlety of what you're trying to do?
[16:52:09] kfpratt: has joined #ruby
[16:52:18] sross07: has joined #ruby
[16:52:29] shevy: he is the solaris dude
[16:53:34] godzillaenlacasa: has joined #ruby
[16:53:49] aderium: having an issue running an app because of Unable to load the EventMachine C extension; require': ld.so.1: ruby: fatal: relocation error: R_AMD64_PC32: file /export/home/dolly/ruby64/ruby-2.1.6/lib/ruby/gems/2.1.0/bundler/gems/extensions/x86_64-solaris-2.11/2.1.0-static/eventmachine-2333335a9fbf/rubyeventmachine.so: symbol _init: value 0x7f0044410225 does not fit
[16:54:03] aderium: so I am trying to see if I can change the KPIC for Kpic
[16:54:11] aderium: and see if that addresses the incorrection
[16:55:07] drewo: has joined #ruby
[16:55:31] shinnya: has joined #ruby
[16:55:43] chishiki: has joined #ruby
[16:55:53] Ox0dea: Aderium: Solaris has differently-sized addresses, then?
[16:56:12] nfk: has joined #ruby
[16:56:27] aderium: I gues ... the flags in SolarisStudio ar addressed in KPIC and Kpic instead of fPIC
[16:56:37] aderium: the Kpic is for boht 32 and 64
[16:56:44] havenwood: it's a 32-bit, 64-bit system that runs in 32-64sy mode
[16:56:46] aderium: its been two days now that I cant get it going
[16:57:27] aderium: ok that changes the config
[16:58:33] blaines: has joined #ruby
[16:59:02] failshell: has joined #ruby
[16:59:33] Scrofff: has joined #ruby
[17:01:25] leat1: has joined #ruby
[17:01:37] snockerton: has joined #ruby
[17:01:50] wallerdev: has joined #ruby
[17:02:40] tubuliferous_: has joined #ruby
[17:04:04] lkba: has joined #ruby
[17:04:34] iooner: has joined #ruby
[17:05:26] mleung: has joined #ruby
[17:05:45] jottr_: has joined #ruby
[17:05:55] wallerdev: has joined #ruby
[17:06:05] quimrstorres: has joined #ruby
[17:06:11] Ox0dea: pfish: Coming along all right?
[17:06:24] hololeap: has joined #ruby
[17:07:48] michaeldeol: has joined #ruby
[17:07:52] hololeap: lets say i have a constant, `NamespaceOne::NamespaceTwo::NamespaceThree`... is there a way to extract the module `NamespaceOne` from that (given that the namespaces have arbitrary names)
[17:08:50] Spami: has joined #ruby
[17:09:10] Ox0dea: hololeap: Is it that you're opposed to converting it to a string?
[17:09:33] konsolebox: hololeap: recursive call to .constants where obj.is_a? Module, starting from Objects
[17:10:12] davejlong: has joined #ruby
[17:10:18] Ox0dea: Sounds like overkill. Object.const_get(foo.split('::').first) would suffice.
[17:10:25] hololeap: Ox0dea: good idea. thanks
[17:10:46] konsolebox: Ox0dea: i see
[17:10:55] konsolebox: Ox0dea: not really. i bet const_get does the same concept
[17:11:23] mdarby: has joined #ruby
[17:11:53] mikecmpbll: has joined #ruby
[17:12:18] aderium: is there a way to check what compiler was used to compile ruby ?
[17:12:20] jhass: hololeap: if you actually have something like module Foo; module Bar; class Baz; you could also gain it with Module.nesting
[17:12:31] Rollabunna: has joined #ruby
[17:13:09] hololeap: jhass: that's really interesting
[17:13:11] Rollabunna: has joined #ruby
[17:13:14] yokel: has joined #ruby
[17:13:32] nettoweb: has joined #ruby
[17:13:34] jhass: be sure to play around with it though to make sure you understand what it does exactly
[17:13:45] sinkensabe: has joined #ruby
[17:13:59] Ox0dea: konsolebox: Object#const_get is indeed recursive, but it's not having to load up an array of all the relevant constants each time through.
[17:14:31] alexa_: has joined #ruby
[17:14:34] Ox0dea: Aderium: You ask that question right after you've been mucking about in RbConfig...?
[17:14:35] alphaatom: has joined #ruby
[17:14:35] alexa_: has left #ruby: ("WeeChat 0.4.2")
[17:14:55] benlieb: is there a ???and??? version of ||= ?
[17:15:12] Ox0dea: benlieb: Yes.
[17:15:22] Ox0dea: >> RbConfig::CONFIG['CC']
[17:15:23] ruboto: Ox0dea # => "gcc" (https://eval.in/398636)
[17:15:44] nanSTA: has joined #ruby
[17:15:50] jhass: benlieb: can you guess it?
[17:16:36] Ox0dea: benlieb: In your defense, the syntax and semantics are ridiculously counter-intuitive.
[17:17:00] konsolebox: Ox0dea: well you just saved it from doing String#split :)
[17:17:25] JakFrist: has joined #ruby
[17:17:26] Ox0dea: konsolebox: I'm not sure I follow.
[17:17:42] arashb_: has joined #ruby
[17:18:00] symbol: has joined #ruby
[17:18:00] ascarter: has joined #ruby
[17:18:28] Ox0dea: Recursively invoking Object#constants builds intermediate arrays, which is wasteful when you already know which constant you're searching for.
[17:18:44] Rollabunna: has joined #ruby
[17:18:44] hololeap: jhass: that is pretty much what i was looking for. the idea that i'm working with is to create a class like so `class MyClass::DB < MyLib::DB` and it knows to look for a migration at `MyClass::DB::Migration` by default. the code for this lives inside `MyLib::DB` which knows nothing of the names of the inheriting classes.
[17:18:52] __butch__: has joined #ruby
[17:19:03] mozzarella: I bet it blew your mind
[17:19:23] Rollabunna: has joined #ruby
[17:19:40] jhass: hololeap: compare its result for class MyClass::DB < MyLib::DB and module/class MyClass; class DB < MyLib::DB though
[17:19:42] Ox0dea: >> a = false; a &&= 1; b = true; b &&= 1; [a, b]
[17:19:43] ruboto: Ox0dea # => [false, 1] (https://eval.in/398645)
[17:19:44] hahuang61: has joined #ruby
[17:19:50] ascarter: has joined #ruby
[17:19:54] hololeap: of course i'm not even sure if i'm going about this in the best way, or if i should make MyLib::DB a module that MyClass::DB includes
[17:20:01] hololeap: jhass: ok i'll check it out
[17:20:06] Rollabunna: has joined #ruby
[17:20:21] jhass: rereading, perhaps you want self.class::Migration ?
[17:20:49] aderium: I mcs -p ruby
[17:21:00] aryaching: has joined #ruby
[17:21:09] MrPunkin: has joined #ruby
[17:21:20] MrPunkin: Hey folks. Can any Ruby Regex masters check this out for me: http://rubular.com/r/vk2x3FBycn
[17:21:36] MrPunkin: Looking to find out why my match isn???t extending out through all the numbers right up against the quotes
[17:21:36] ascarter: has joined #ruby
[17:21:47] graydot: has joined #ruby
[17:21:53] sinkensabe: has joined #ruby
[17:22:33] hololeap: jhass: there are some other things that i need to access from MyClass, like a class instance variable in MyClass that stores the location of the database.yml file
[17:22:40] jhass: MrPunkin: I guess \p{Pi} includes .
[17:22:44] hahuang65: has joined #ruby
[17:22:45] arashb: has joined #ruby
[17:22:54] MrPunkin: the dot is being included in the capturing blocks though
[17:23:00] jhass: hololeap: sounds like a good candidate for a constant too
[17:23:03] MrPunkin: not the quotes that aren???t captured.
[17:24:30] Timba-as: has joined #ruby
[17:24:40] arup_r: I want extract create_readable_zip and read_zip methods into a separate class of its own.. But not able to figure out how to organize the class? Any hints ? https://gist.github.com/aruprakshit/f5ecfd3ee085decf592f
[17:24:45] jhass: MrPunkin: ah, right. The issue is that the regex does what you specified :P 4 is preceded by " so the assertion fails. . isn't preceded by " so the assertion passes. 0 is followed by " so the assertion fails. . isn't followed by " so the assertion passes
[17:24:47] gambl0re: has joined #ruby
[17:25:03] NeverDie: has joined #ruby
[17:25:17] hololeap: i think i need to go back to the drawing board because this whole project is feeling like a mess
[17:25:40] jhass: MrPunkin: your sample is a bit sparse, what exactly are your inputs that made you put up those lookarounds?
[17:25:41] havenwood: MrPunkin: I think you meant a positive lookbehind but used a negative
[17:25:44] havenwood: MrPunkin: http://rubular.com/r/g42dKqZMgh
[17:25:51] axisys: has joined #ruby
[17:25:54] sinkensabe: has joined #ruby
[17:25:58] MrPunkin: sure enough. Thanks!
[17:26:13] hololeap: Ox0dea: jhass: thanks for your help
[17:26:24] jhass: MrPunkin: also note that you didn't escape the . in the first character class
[17:26:40] MrPunkin: I was messing around, so that???s probably when it got removed
[17:26:45] MrPunkin: I have it escaped in my code
[17:26:53] MrPunkin: but thanks for pointing it out
[17:27:02] Kully3xf_: has joined #ruby
[17:28:05] MrPunkin: jhass: actually, wait. What I really want is to only match if the quotes aren???t there
[17:28:11] MrPunkin: that is indeed a negative lookbehind / ahead, right?
[17:28:46] JMoir: Finally got my first proper project up to a point where I can use it for what it was made for (a blog for my family and friends as I'm off to Japan for a year tomorrow). It's a good feeling!
[17:29:07] JMoir: Needs some major refactoring, but first I should write tests...
[17:30:18] Muhannad: has joined #ruby
[17:30:37] jhass: MrPunkin: it is, you can workaround with possessive quantifiers here http://rubular.com/r/Waab4dPhsI
[17:30:46] jottr_: has joined #ruby
[17:31:22] kerrizor: has joined #ruby
[17:31:40] havenwood: MrPunkin: Would matching word boundaries be too broad?: http://rubular.com/r/g42dKqZMgh
[17:32:24] havenwood: using word boundaries*
[17:32:36] havenwood: "matching" was a poor word choice
[17:32:46] sarkyniin: has joined #ruby
[17:32:57] MrPunkin: havenwood: Kind of, I???m looking to not match things wrappedi in quotes only as those are specificly called out as exact file names, where as if not wrapped in quotes they should be found and replaced with proper multiplication symbols
[17:33:00] MrPunkin: in user generated text
[17:33:01] davejlong: has joined #ruby
[17:33:06] havenwood: and i forget to escape .s, heh
[17:33:12] havenwood: MrPunkin: ah, gotcha
[17:33:31] jpfuentes2: has joined #ruby
[17:34:09] havenwood: ESCAPE ALL THE THINGS \\o\/
[17:34:19] radialneon: has joined #ruby
[17:34:21] shevy: escape (lisp)!
[17:35:14] mandarinkin: has joined #ruby
[17:35:17] havenwood: JMoir: Save travels! Sounds exciting...
[17:35:42] shevy: JMoir awww will you be using ruby in japan?
[17:36:15] jenrzzz: has joined #ruby
[17:36:33] freerobby: has joined #ruby
[17:36:35] Papierkorb: has joined #ruby
[17:36:54] freerobby: has joined #ruby
[17:36:56] dfockler: MrPunkin: http://rubular.com/r/vk2x3FBycn Not sure if this will help, but I'm bored
[17:37:01] havenwood: JMoir: Are you going to have a chance to visit Asakusa.rb in Tokyo? :O
[17:37:13] havenwood: Every Tues!
[17:37:47] dangerousdave: has joined #ruby
[17:37:56] MrPunkin: dfockler: that appears to be mine still, try the ???Make permalink??? at the bottom
[17:38:10] dfockler: whoops! http://rubular.com/r/vil7ZGzze9
[17:38:49] JMoir: havenwood: Cheers :)
[17:38:56] MrPunkin: dfockler: Yeah, I need the first line with the quotes not to match
[17:38:57] jhass: dfockler: I understood it as that they want this result http://rubular.com/r/Waab4dPhsI
[17:39:04] MrPunkin: like, I don???t want any data to match from it
[17:39:05] JMoir: shevy: Yes, planning on going to rubykaigi and other events like it :)
[17:39:23] MrPunkin: if it???s surrounded by quotes, ignore it.
[17:39:27] bluOxigen: has joined #ruby
[17:39:28] JMoir: havenwood: I haven't heard of it, but if time allows, I'd love to go
[17:39:29] MrPunkin: so it???s more complex, but thanks!
[17:39:36] prestorium: has joined #ruby
[17:39:56] hololeap: i see a lot of code that does `def initialize(opts = nil); opts ||= {}; ...` but is that any different than writing `def initialize(opts = {}); ...` ?
[17:40:36] JMoir: havenwood: https://asakusarb.doorkeeper.jp/ this? Every Tuesday? I'd be stupid not to go!
[17:40:40] havenwood: JMoir: Kinda like a Seattle.rb in Tokyo. :)
[17:40:43] _blizzy_: has joined #ruby
[17:40:51] RegulationD: has joined #ruby
[17:40:52] apeiros: hololeap: opts=nil only makes sense if you can avoid creating the opts hash
[17:40:52] jhass: hololeap: looks like bad cargo cult
[17:41:00] havenwood: JMoir: ya! \o/
[17:41:08] JMoir: I'm looking forward to going to a ruby meetup, there are none where I live
[17:41:11] apeiros: so if you just do def foo(opts=nil); opts ||= {}, then it's relatively pointless
[17:41:29] sarkyniin: has joined #ruby
[17:41:33] ruurd: has joined #ruby
[17:41:33] wallerdev2: has joined #ruby
[17:41:46] bubbys: has joined #ruby
[17:41:50] Ox0dea: Shiaru.arubi?
[17:41:50] mandarinkin: has joined #ruby
[17:41:55] momomomomo: has joined #ruby
[17:42:18] evanjs: has joined #ruby
[17:42:26] Ox0dea: apeiros: s/relatively/completely/, surely.
[17:42:31] hololeap: apeiros: that's what i thought, but i just wanted to confirm
[17:42:34] dfockler: JMoir: Same here I tried to start one, but I failed
[17:42:53] radialneon_: has joined #ruby
[17:43:03] apeiros: Ox0dea: it can make things easier like passing through defaults
[17:43:07] felltir: has joined #ruby
[17:43:33] JMoir: dfockler: Damn..
[17:43:38] JMoir: Right I have to go bye
[17:43:45] Ox0dea: Sayonara!
[17:43:53] shizus: has joined #ruby
[17:44:08] startupality: has joined #ruby
[17:44:37] Kully3xf: has joined #ruby
[17:44:48] casadei_: has joined #ruby
[17:44:58] cyrus_mc: has joined #ruby
[17:45:09] shizus: Hi! I was reading github's guidelines for Ruby and I was wondering why it was prefered to use %w or %i to define arrays rather than the standard way
[17:45:12] cyrus_mc: Debugging a puppet module and receiving the following: http://pastebin.com/7n8eHDqY
[17:45:13] ruboto: cyrus_mc, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/070ea38ea520c3bc4413
[17:45:13] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[17:45:25] ruboto: Please join #puppet for help with it.
[17:45:32] postmodern: has joined #ruby
[17:46:10] cyrus_mc: jhass: I have .. no answers yet .. but just wondering if anyone can pick out the syntax error on the line it is complaining about (top line).
[17:46:58] apeiros: Shizus: less noise
[17:47:12] jhass: cyrus_mc: I think what you showed does not correspond to reality
[17:47:28] atomi: has joined #ruby
[17:47:32] jhass: cyrus_mc: the line mentioned in the error is line 4, yet the code mentioned in it is on line 1
[17:48:10] cyrus_mc: sorry, I accidently cut off the first few linse
[17:48:39] cyrus_mc: the top three lines are just two requires (require 'puppet/provider/netscaler' and require 'json'
[17:48:52] kies^: has joined #ruby
[17:48:57] _blizzy_: has joined #ruby
[17:49:05] jhass: we're going to need a new gist with the exact copy
[17:49:24] solars: has joined #ruby
[17:50:10] nanSTA: has joined #ruby
[17:50:22] cyrus_mc: https://gist.github.com/cyrus-mc/5d2a0c71c0bcd760a952
[17:50:59] Casty: has joined #ruby
[17:51:02] workmad3: has joined #ruby
[17:51:14] cyrus_mc: just updated it with the full error thrown by puppet.
[17:51:27] shizus: apeiros: OK, thanks for the answer :)
[17:51:39] dgutierrez1287: has joined #ruby
[17:51:53] bubbys: has joined #ruby
[17:53:05] Stratege: has joined #ruby
[17:53:15] jhass: cyrus_mc: btw gist supports multiple files and syntax highlighting ;)
[17:53:49] abuzze: has joined #ruby
[17:54:12] cyrus_mc: k. wasn't aware of gist, always went to pastebin, but I will use it going forward
[17:54:12] reset: has joined #ruby
[17:54:44] dopie: has joined #ruby
[17:54:48] aryaching: has joined #ruby
[17:55:00] cyrus_mc: jhass: see anything wrong with that code
[17:55:09] DoubleMalt: has joined #ruby
[17:55:10] bruno-: has joined #ruby
[17:55:29] BlackGear: has joined #ruby
[17:55:37] jhass: nothing apparent to me, so far I'd blame puppets autoloader
[17:56:08] abuzze: has joined #ruby
[17:57:00] _djbkd: has joined #ruby
[17:57:06] baweaver_: has joined #ruby
[17:57:33] danzilio: has joined #ruby
[17:57:37] zacstewart: has joined #ruby
[17:58:25] ascarter: has joined #ruby
[17:58:59] cyrus_mc: odd..re-ran the puppet run and it succeeded. Probalby has something to do with the pluginsync.
[17:59:03] cyrus_mc: thanks for looking into it
[18:00:17] shevy: JMoir, when you go to japan... don't make it like larry wall: http://www.linuxvoice.com/interview-larry-wall/
[18:00:32] shevy: "So I can go to Japan and ask for directions, but I can't really understand the answers!"
[18:01:02] kerrizor: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[18:02:33] jackjackdripper: has joined #ruby
[18:02:41] Frem: has joined #ruby
[18:02:56] leat1: has joined #ruby
[18:03:04] jhass: ?ot shevy
[18:03:04] ruboto: shevy, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[18:03:13] aryaching: has joined #ruby
[18:03:19] araujo: has joined #ruby
[18:03:49] quimrstorres: has joined #ruby
[18:03:51] bubbys: has joined #ruby
[18:08:45] yardenbar: has joined #ruby
[18:08:46] sypheren: has joined #ruby
[18:09:57] bronson: has joined #ruby
[18:11:14] blaines: has joined #ruby
[18:12:43] arup_r: May I get some hints ?
[18:13:38] jhack: has joined #ruby
[18:13:56] jhass: yeah, here's one
[18:13:59] jhass: ?crosspost arup_r
[18:13:59] ruboto: arup_r, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[18:14:14] pdoherty: has joined #ruby
[18:14:26] arup_r: Ahh! so hard
[18:15:08] arup_r: But how long people should wait before crosspost .. just asking for future time :)
[18:15:50] jhass: read the message
[18:16:16] ruurd: has joined #ruby
[18:16:29] quimrstorres: has joined #ruby
[18:16:49] jpfuentes2: has joined #ruby
[18:17:03] danzilio: has joined #ruby
[18:17:34] arturmartins: has joined #ruby
[18:18:01] davedev24: has joined #ruby
[18:18:06] pfish: Ox0dea: I had to go each lunch but im starting to work on it now
[18:18:12] baweaver_: has joined #ruby
[18:18:43] dblessing: has joined #ruby
[18:18:52] MagePsycho_: has joined #ruby
[18:19:55] bungoman: has joined #ruby
[18:20:32] simplyianm: has joined #ruby
[18:20:52] startupality: has joined #ruby
[18:21:07] Scroff: has joined #ruby
[18:21:38] matled-: has joined #ruby
[18:22:48] nanSTA: has joined #ruby
[18:23:07] anisha: has joined #ruby
[18:23:10] edwinvdgraaf: has joined #ruby
[18:24:14] alphaatom: has joined #ruby
[18:24:37] gambl0re: has joined #ruby
[18:24:40] Centrixx: has joined #ruby
[18:24:45] jxie_: has joined #ruby
[18:24:59] fabrice31: has joined #ruby
[18:25:30] borkdude_: has joined #ruby
[18:25:35] hoelzro_: has joined #ruby
[18:25:36] jblancet1: has joined #ruby
[18:25:37] workmad3: has joined #ruby
[18:25:41] wmoxam_: has joined #ruby
[18:25:43] parus: has joined #ruby
[18:25:47] cout_: has joined #ruby
[18:25:50] Scroff: has joined #ruby
[18:25:52] viki__: has joined #ruby
[18:25:52] ezra: has joined #ruby
[18:25:58] opalraav1: has joined #ruby
[18:26:01] ukd1_: has joined #ruby
[18:26:01] peterhu_: has joined #ruby
[18:26:02] bruno-: has joined #ruby
[18:26:04] cyrus_mc_: has joined #ruby
[18:26:06] destruct1re: has joined #ruby
[18:26:10] gs: has joined #ruby
[18:26:12] gigetoo_: has joined #ruby
[18:26:14] flori_: has joined #ruby
[18:26:19] emdub_: has joined #ruby
[18:26:21] n008f4g__: has joined #ruby
[18:26:24] smooth_p1nguin: has joined #ruby
[18:26:32] ruurd: has joined #ruby
[18:26:41] bubbys: has joined #ruby
[18:26:49] phutchins2: has joined #ruby
[18:27:23] yokel: has joined #ruby
[18:29:10] shtirlic_: has joined #ruby
[18:29:16] teosz: has joined #ruby
[18:29:21] denym_`: has joined #ruby
[18:29:24] TheTFEF: has joined #ruby
[18:29:25] sideshowcoder_: has joined #ruby
[18:29:27] leslie1: has joined #ruby
[18:29:31] JaTochNietDan_: has joined #ruby
[18:29:35] alexblom_: has joined #ruby
[18:29:50] jaxxstorm_: has joined #ruby
[18:29:56] digifiv5e: has joined #ruby
[18:29:57] DiabolikFreenode: has joined #ruby
[18:29:59] derekv2: has joined #ruby
[18:30:01] gvdevil: has joined #ruby
[18:30:07] dopie: has joined #ruby
[18:30:26] sypheren: has joined #ruby
[18:30:30] Esya: has joined #ruby
[18:30:37] jsrn-: has joined #ruby
[18:31:04] simplyianm: has joined #ruby
[18:31:12] redondos: has joined #ruby
[18:31:12] redondos: has joined #ruby
[18:31:14] Liam`: has joined #ruby
[18:31:19] ruurd: has joined #ruby
[18:31:33] jottr_: has joined #ruby
[18:31:33] riking_: has joined #ruby
[18:31:34] teotwaki: has joined #ruby
[18:31:52] iooner_: has joined #ruby
[18:31:58] lanemeyer: has joined #ruby
[18:32:17] DLSteve: has joined #ruby
[18:32:39] Guest55992: has joined #ruby
[18:33:33] BiHi: has joined #ruby
[18:33:43] BLuEGoD: has joined #ruby
[18:33:49] lupine: has joined #ruby
[18:34:00] j416: has joined #ruby
[18:34:04] Musashi007: has joined #ruby
[18:34:12] SegFaultAX: has joined #ruby
[18:34:35] mary5030: has joined #ruby
[18:35:19] mary5030: has joined #ruby
[18:35:42] ascarter: has joined #ruby
[18:36:33] Rollabunna: has joined #ruby
[18:37:08] aryaching: has joined #ruby
[18:37:23] TheNet: has joined #ruby
[18:37:26] jcromartie: has joined #ruby
[18:38:15] simplyianm: has joined #ruby
[18:38:16] hololeap: i'm trying to do something a bit odd: i have an activerecord model that has two integer attributes: ip and cidr. these can be used to create an IPAddr object. i would like to create a proxy class that delegates methods first to the IPAddr object, then to the activerecord object, so that it "feels" like an IPAddr but i can still save it to the db. any ideas?
[18:38:21] jottr_: has joined #ruby
[18:38:46] spider-mario: has joined #ruby
[18:38:47] gusrub: has joined #ruby
[18:38:47] cochise: has joined #ruby
[18:39:14] bubbys: has joined #ruby
[18:39:59] blue_deref: has joined #ruby
[18:40:18] Dwarf: has joined #ruby
[18:41:15] dfockler: hololeap: why can't the model just be an IPAddr object?
[18:41:15] sypheren: has joined #ruby
[18:41:54] msnyon: has joined #ruby
[18:41:56] hololeap: dfockler: you mean just serialize it to a string attribute?
[18:42:31] dfockler: why do you need a proxy class?
[18:43:02] basmoura: has joined #ruby
[18:43:18] leat1: has joined #ruby
[18:43:54] eGGsha: has joined #ruby
[18:43:55] jhack: has joined #ruby
[18:44:34] baweaver_: has joined #ruby
[18:44:36] simplyianm: has joined #ruby
[18:44:51] hololeap: this is just something i'm playing around with. there's the option of just serializing the attribute, then i could automatically convert it to/from the database with no hassle. this only works on single attributes, however. if i wanted to use multiple attributes to create an object then i have to do something different
[18:45:33] hololeap: it's not mission-critical or anything so don't worry too much about it
[18:45:58] SuperTux88: has joined #ruby
[18:46:38] dfockler: oh I was just thinking IPAddr had two fields and would inherit from ActiveRecord::Base
[18:47:53] ducklobster: has joined #ruby
[18:48:30] arooni-mobile: has joined #ruby
[18:51:46] arturmartins: has joined #ruby
[18:51:52] workmad3: has joined #ruby
[18:53:12] Ox0dea: >> require 'ipaddr'; IPAddr # dfockler
[18:53:13] ruboto: Ox0dea # => IPAddr (https://eval.in/398703)
[18:53:16] sypheren: has joined #ruby
[18:53:25] startupality: has joined #ruby
[18:53:54] gix: has joined #ruby
[18:53:55] dfockler: ahhh makes more sense! thanks Ox0dea
[18:54:14] dfockler: I didn't even realize
[18:55:58] hakunin_: has joined #ruby
[18:56:02] _blizzy_: has joined #ruby
[18:57:36] JoshL: has joined #ruby
[18:58:45] edwinvdgraaf: has joined #ruby
[18:58:58] dfockler: hololeap: In that case you can use something like http://ruby-doc.org/stdlib-2.0.0/libdoc/forwardable/rdoc/Forwardable.html
[18:59:47] JoshL: has joined #ruby
[19:00:03] simplyianm: has joined #ruby
[19:00:15] prettiestPony11: has joined #ruby
[19:01:44] ruurd: has joined #ruby
[19:03:24] Papierkorb: Currently fiddling with method(). Can this snippet be shortened further?
[19:03:26] Papierkorb: %w(_foo_ _bar_ _baz_).map(&/\A_(.*)_\z/.method(:match)).map(&:captures).map(&:first) # => ['foo', 'bar', 'baz']
[19:04:10] freerobby: has joined #ruby
[19:04:15] vikaton: has joined #ruby
[19:04:43] alphaatom: has joined #ruby
[19:05:17] pfish: how do you get the actual in memory location of an object passed as an argument to a c function?
[19:07:00] nettoweb: has joined #ruby
[19:07:17] Ox0dea: pfish: Take its address?
[19:07:20] jamesaxl: has joined #ruby
[19:08:11] wallerdev2: has joined #ruby
[19:08:24] shadoi: has joined #ruby
[19:08:41] Ox0dea: >> %w[_foo_ _bar_ _baz_].map { |s| s[/\A_(.*)_\z/, 1] } # Papierkorb
[19:08:42] ruboto: Ox0dea # => ["foo", "bar", "baz"] (https://eval.in/398707)
[19:08:44] jaygen: has joined #ruby
[19:08:55] noname: has joined #ruby
[19:09:17] pfish: Ox0dea: thats what I thought but i keep getting the same address for 4 different objects...
[19:09:57] konsolebox: has joined #ruby
[19:10:50] Ox0dea: >> require 'fiddle'; foo = 'bar'; ptr = Fiddle::Pointer.new(foo.object_id * 2); ptr.to_value
[19:10:51] ruboto: Ox0dea # => "bar" (https://eval.in/398708)
[19:11:16] startupality: has joined #ruby
[19:12:50] Ox0dea: pfish: A non-immediate object's #object_id is just twice its internal pointer. See if you get the same results from rb_obj_id() for those four apparently equivalent objects.
[19:12:52] konsolebox: has joined #ruby
[19:13:02] Hobogrammer_: has joined #ruby
[19:13:28] Ox0dea: Erm, sorry, other way around; the pointer is twice the #object_id.
[19:13:57] centrx: has joined #ruby
[19:14:00] Silent__: has joined #ruby
[19:14:23] leat1: has joined #ruby
[19:15:37] peter_paule: has joined #ruby
[19:16:09] sypheren: has joined #ruby
[19:17:06] pfish: i think they are...
[19:17:32] momomomomo: has joined #ruby
[19:17:36] konsolebox: has joined #ruby
[19:19:02] quimrstorres: has joined #ruby
[19:19:17] davejlong: has joined #ruby
[19:19:35] Ox0dea: pfish: Then I reckon you've managed to get four handles on the same object, my friend.
[19:20:02] pfish: yeah im going to figure our where i messed up lol
[19:20:14] ruboto: Y_Ichiro # => 6 (https://eval.in/398709)
[19:20:18] Ox0dea: You've probably forgotten to heed the perils of pass-by-reference someplace.
[19:20:29] Ox0dea: Y_Ichiro: Very insightful.
[19:21:16] dangerousdave: has joined #ruby
[19:21:51] solars: has joined #ruby
[19:22:19] konsolebox: has joined #ruby
[19:23:09] sharpmachine: has joined #ruby
[19:23:17] Pathfinder: has joined #ruby
[19:26:03] bubbys: has joined #ruby
[19:29:11] CustosLimen: has joined #ruby
[19:29:13] pfish: Ok i think i just dont know how to declare methods of a ruby in c... im guessing first arg is self and second is the actual passed arg...
[19:29:42] jaygen_: has joined #ruby
[19:30:01] pfish: specifically singleton methods i think...
[19:32:49] moredhel: has joined #ruby
[19:33:23] Ox0dea: pfish: Yes, that's correct. Are you sure you're calling rb_define_method() correctly?
[19:33:23] Papierkorb_: has joined #ruby
[19:33:40] Ox0dea: Or rb_define_singleton_method(), as the case may be.
[19:34:02] davejlong: has joined #ruby
[19:35:07] haxrbyte: has joined #ruby
[19:35:43] pfish: i think so... its matches a function i know works
[19:37:12] renier: has joined #ruby
[19:37:27] edwinvdgraaf: has joined #ruby
[19:40:06] nfk: has joined #ruby
[19:40:54] nofxx: has joined #ruby
[19:40:54] nofxx: has joined #ruby
[19:41:16] grill: has joined #ruby
[19:41:42] Mon_Ouie: has joined #ruby
[19:42:04] grill: who decided that camel case was good for class names but nothing else? alternatively, who decided underscores worked for everything except class names?
[19:42:36] bahar: has joined #ruby
[19:42:36] bahar: has joined #ruby
[19:42:52] bricker: Matz I guess
[19:42:54] chris2: Upper_Case_Camel_Case_Is_Only_Appreciated_By_Ocaml_Users
[19:43:04] bronson: has joined #ruby
[19:43:09] chris2: Actually_they_do_this
[19:43:39] jenrzzz: has joined #ruby
[19:43:43] apeiros: which language was it which doesn't distinguish between _, space, upper- and lowercase? nim?
[19:43:51] peeja: has joined #ruby
[19:43:57] chris2: yeah. terrible :P
[19:44:06] grill: a very stupid langage
[19:44:14] bricker: chris2: also the case you use for ClassNames is technically "Pascal Case" but that's just being pedantic
[19:44:34] apeiros: camelCase, PascalCase, snake_case - what else is there?
[19:44:36] bricker: grill: so stupid they called it "nimrod" :P
[19:44:45] devbug: has joined #ruby
[19:44:52] bricker: apeiros: lazycase
[19:44:55] bricker: a case I just made up
[19:44:58] bricker: SCREAMING_CASE
[19:44:58] chris2: lisp-case
[19:44:59] dagda1: has joined #ruby
[19:45:05] bricker: another case I just made up
[19:45:06] Ox0dea: bricker: That's screaming snake.
[19:45:08] chris2: best one actually
[19:45:16] bricker: Ox0dea: oh I guess I didn't make it up :)
[19:45:18] apeiros: oh, SCREAMING, yes
[19:45:38] grill: call methods without parens
[19:45:43] Ox0dea: LeEtH4x0RCaSe
[19:45:45] eggoez: has joined #ruby
[19:45:56] simplyianm: has joined #ruby
[19:45:58] grill: ruby: attempt to be different in every way imaginable
[19:46:28] Ox0dea: grill: Take a wrong turn?
[19:46:39] ytti: i'm interested, compared to what?
[19:46:40] grill: i;m new to the language
[19:46:47] ytti: ruby isn't very noval in any particular way
[19:46:55] Ox0dea: ytti: Blocks are pretty novel.
[19:47:03] Ox0dea: I mean, Smalltalk is dead.
[19:47:22] ytti: anoynymous functions/closures are fairly common
[19:47:36] chris2: at least by now
[19:47:43] chris2: perhaps not in the mid-90s
[19:47:43] ascarter: has joined #ruby
[19:48:19] Ox0dea: Ruby combines object-oriented and functional programming in a way that very few languages do.
[19:48:42] Ox0dea: Scala does it with much greater emphasis on the latter, I suppose.
[19:48:58] grill: why no tabs
[19:49:04] jackjackdripper: has joined #ruby
[19:49:08] T3: has joined #ruby
[19:49:09] yxhuvud: has joined #ruby
[19:49:15] MEATCHICKEN: has joined #ruby
[19:49:18] ldnunes: has joined #ruby
[19:49:19] Hanmac: has joined #ruby
[19:49:20] joshbamboo1: has joined #ruby
[19:49:21] sanguisdex: has joined #ruby
[19:49:22] ItSANgo: has joined #ruby
[19:49:25] zacstewart: has joined #ruby
[19:49:25] bricker: grill: the semantics of the switch statement in ruby is the only thing I can thing of that is uncommon
[19:49:27] MatrixBridge: has joined #ruby
[19:49:40] sparr: has joined #ruby
[19:49:56] chris2: you can use tabs, but most people dont :P
[19:50:05] grill: doc.words.each{ |word| puts word} looks like no language i've ever written in
[19:50:15] Ox0dea: And there was much rejoicing.
[19:50:27] baweaver_: has joined #ruby
[19:50:29] chris2: dunno. i like tabs by now :P
[19:50:42] bricker: grill: well the syntax is different, but the concept is the same. If it shared syntax with Python, then it'd be called Pyton.
[19:50:55] edwinvdgraaf: has joined #ruby
[19:50:59] Ox0dea: bricker: Because a language is only its syntax?
[19:51:05] cnngimenez: has joined #ruby
[19:51:32] bricker: Ox0dea: can you tell me two different programming langauges with identical syntax?
[19:51:49] k3asd`: has joined #ruby
[19:52:06] Ox0dea: bricker: That's beating around the bush. A language is, by definition, the combination of its syntax and the accompanying semantics.
[19:52:23] yh: has joined #ruby
[19:52:56] Alayde: has joined #ruby
[19:52:56] jokester: has joined #ruby
[19:52:56] JimmyNeutron: has joined #ruby
[19:52:56] halfdan: has joined #ruby
[19:52:56] ddfreyne: has joined #ruby
[19:52:56] jxf: has joined #ruby
[19:52:56] petems: has joined #ruby
[19:52:56] [spoiler]: has joined #ruby
[19:52:56] JoL1hAHN: has joined #ruby
[19:52:56] sarlalian: has joined #ruby
[19:52:57] Kully3xf_: has joined #ruby
[19:54:10] ascarter: has joined #ruby
[19:55:20] amitchellbullard: has joined #ruby
[19:55:30] avdi: has joined #ruby
[19:55:58] spastorino: has joined #ruby
[19:55:59] superrorc: has joined #ruby
[19:56:07] ckrailo: has joined #ruby
[19:56:20] zemmihates: has joined #ruby
[19:56:41] adambeynon: has joined #ruby
[19:56:58] benlakey: has joined #ruby
[19:57:06] whoojemaflip: has joined #ruby
[19:57:06] kapowaz: has joined #ruby
[19:57:39] apt-get_: has joined #ruby
[19:58:02] zipkid: has joined #ruby
[19:58:22] nateberkopec: has joined #ruby
[19:58:54] CloCkWeRX: has joined #ruby
[19:59:01] mercwithamouth: has joined #ruby
[19:59:04] jimbeaudoin: has joined #ruby
[19:59:09] bjeanes: has joined #ruby
[20:00:19] Heero: has joined #ruby
[20:00:56] hololeap: it seems like Class.inherited gets called after the inheriting class block is completed, but it can't see any of the methods defined in the new class
[20:01:09] hololeap: >> class Foo; def self.inherited(base); p base.baz; end; end; class Bar < Foo; def self.baz; :awesome; end; end
[20:01:10] ruboto: hololeap # => undefined method `baz' for Bar:Class (NoMethodError) ...check link for more (https://eval.in/398714)
[20:01:16] kirun: has joined #ruby
[20:01:20] daxroc: has joined #ruby
[20:01:21] harleypig: has joined #ruby
[20:01:26] apeiros: hololeap: no, it's called immediately when the class is defined
[20:01:34] apeiros: i.e. right after `class Foo < Bar`
[20:01:39] apeiros: before you've added any method
[20:01:54] Ox0dea: Which is maybe not great.
[20:01:54] featheryahn_: has joined #ruby
[20:01:55] pusewicz: has joined #ruby
[20:01:55] holsee_: has joined #ruby
[20:01:57] glowcoil: has joined #ruby
[20:02:01] apeiros: but makes sense
[20:02:12] apeiros: given that classes are open - when is a class definition finished?
[20:02:29] jevs: has joined #ruby
[20:02:37] apeiros: an alternative would be to invoke inherited after every class body. but that introduces other issues.
[20:02:42] jmcc: has joined #ruby
[20:02:50] weaksauce: the thing I found most interesting was the fact that you could just do any statement inside a class.
[20:02:54] yfeldblum: has joined #ruby
[20:03:04] weaksauce: class Foo; puts "yey"
[20:03:10] maZtah: has joined #ruby
[20:03:13] Ox0dea: apeiros: Why not have it invoked once after the body that brings the class into existence?
[20:03:14] jxf: has joined #ruby
[20:03:42] apeiros: Ox0dea: how do you know whether it's the one you want? the one which defines the method you're looking for?
[20:04:05] akitada: has joined #ruby
[20:04:06] apeiros: but yes, that'd also be an alternative
[20:04:10] renegade_panda: has joined #ruby
[20:04:16] Ox0dea: Still, I suppose invoking it immediately avoids the ambiguity.
[20:04:41] apeiros: if you want something to happen in your subclass, call a method
[20:04:46] apeiros: you can provide that method in the superclass
[20:04:58] apeiros: then you can be explicit when it has to happen, and ensure everything is prepared
[20:05:00] elliottcable: has joined #ruby
[20:05:04] eGGsha: has joined #ruby
[20:05:15] apeiros: alternatively you can listen to method_added
[20:05:19] chipotle: has joined #ruby
[20:05:53] hololeap: the idea i'm trying to implement is to have an abstract class Foo that calls the method .bar on any class that inherits it, however .foo needs to be defined in the subclasses
[20:05:55] devbug: has joined #ruby
[20:05:56] apeiros: that has its own issues, though (`class Foo < Bar; def self.this_is_listened_for; not_yet_defined; end; def self.not_yet_defined; end; end`)
[20:06:03] yeticry: has joined #ruby
[20:06:03] phaze: has joined #ruby
[20:06:20] davejlong: has joined #ruby
[20:06:29] renegade_panda: Hi, I'm trying to use ruby 2.2.2 as my default ruby. I have RVM installed. However, every time I spawn a shell, it stills marks the default ruby as 1.9.x
[20:06:34] hololeap: i guess it wouldn't be possible
[20:06:58] renegade_panda: I really don't want to have to run the source command every time.
[20:07:14] jhass: renegade_panda: add it to your ~/.$SHELLrc then
[20:07:18] renegade_panda: What's the best way to set my default ruby to 2.2.2?
[20:07:34] jhass: ^ and then rvm use --default 2.2.2 or whatever it was
[20:07:35] Tritone: has joined #ruby
[20:07:52] hololeap: s/.foo/.bar
[20:08:04] ggherdov: has joined #ruby
[20:08:23] renegade_panda: jhass, what if I don't run a shell and open a program that's just dependent on a newer version of ruby?
[20:08:43] renegade_panda: jhass, will it still default to 1.9.x?
[20:09:16] Ox0dea: hololeap: It won't be possible via Class#inherited, anyway, but I'm sure you could finagle something.
[20:09:27] davejlong: has joined #ruby
[20:09:49] jhass: renegade_panda: yes, you need to use a rvm wrapper or rvm do explicitly
[20:10:00] Ox0dea: renegade_panda: Doesn't that sound great?
[20:10:00] radialneon: has joined #ruby
[20:10:07] pfish: so im still having trouble creating a signleton function (in c) that takes in an argument and gets its real memory location and real memory size... anyone here have experience with this kind of thing
[20:10:12] simplyianm: has joined #ruby
[20:10:24] arooni-mobile: has joined #ruby
[20:10:33] pfish: meaning i want a c function that takes in a ruby object from ruby code
[20:10:45] renegade_panda: jhass, so would I just be better off upgrading my system ruby?
[20:10:48] ruurd: has joined #ruby
[20:10:53] hololeap: there's no way to change the inheritance of a class at runtime, is there?
[20:11:16] renegade_panda: Ox0dea, yeah bloody magnificent mate..
[20:11:43] Carnage\: has joined #ruby
[20:11:44] hololeap: i.e. define the class and _then_ inherit from a superclass
[20:11:47] jhass: renegade_panda: if you can do that in a clean matter, I can't give a general recommendation
[20:12:02] jhass: patching invocations is just as valid
[20:12:11] mandarinkin: has joined #ruby
[20:14:14] mabahamo: has joined #ruby
[20:14:56] sarkyniin: has joined #ruby
[20:15:18] phaze: It's just come to my attention that order is important in Ruby. Is there a workaround for that? For example, is there a way to make this theoretical example run: http://codepad.org/UjvvdgQS
[20:16:11] Thomas-0725: has joined #ruby
[20:16:14] jhass: phaze: no, but there might be a good solution to your actual problem
[20:16:19] mase-chatter: has joined #ruby
[20:16:57] momomomomo: has joined #ruby
[20:17:05] Ox0dea: phaze: Add `ClassB = Class.new` at the very beginning of that program.
[20:17:52] phaze: jhass: there isn't an actual problem yet, I'm just toying around with ruby, when I discovered that the order of all my classes in one file was important.
[20:18:09] phaze: Ox0dea: Thank's I'll give it a shot!
[20:18:17] shevy: phaze you instantiate there so it must be known before you do
[20:18:32] araujo: has joined #ruby
[20:18:44] centrx: has joined #ruby
[20:19:01] jhass: phaze: please don't do that in production code though, you most likely will never need to do something like this
[20:19:10] bb010g: has joined #ruby
[20:19:12] MagePsycho_: has joined #ruby
[20:19:36] senayar: has joined #ruby
[20:19:52] Mon_Ouie: A class declaration is regular code that gets executed. Before you enter the body of the class statement, ClassA is not defined. After, it is a constant that refers to the class that has just been created.
[20:19:53] phaze: jhass: sure, I couldn't wrap my head around an actual, practical example, so I might not need it. But thanks!
[20:20:19] Ox0dea: phaze: Incidentally, this is called forward declaration, but needing it in Ruby is indeed a likely code smell.
[20:20:39] wallerdev2: has joined #ruby
[20:20:56] jokke: has joined #ruby
[20:21:35] Ox0dea: pfish: https://gist.github.com/0x0dea/48b47b53dd3cbd26bab1
[20:21:43] Ox0dea: There's getting the internal pointer value, anyway.
[20:22:17] Ox0dea: Getting at obj_memsize_of() involves copy-pasting things from all over the place since Ruby doesn't expose "internal.h".
[20:22:22] kadoppe: has joined #ruby
[20:22:53] Ox0dea: hololeap: Are you opposed to using Fiddle to do your devilry?
[20:22:58] phaze: Ox0dea: I'll read up on that. Thanks a bunch.
[20:23:06] Ox0dea: Sure thing.
[20:23:29] hololeap: Ox0dea: i still need to get accuainted with fiddle. i know of it but have never used it
[20:23:51] godzillaenlacasa: has joined #ruby
[20:23:54] Ox0dea: Well, you can obtain a pointer to the object's RBasic struct and muck about with the second field, which is just a reference to the object's superclass.
[20:23:56] crdpink2: has joined #ruby
[20:24:00] Ox0dea: You probably shouldn't do that, but I bet it'd work.
[20:24:17] Papierkorb: has joined #ruby
[20:25:07] jenrzzz: has joined #ruby
[20:25:45] hololeap: Ox0dea: that sounds like cheating ;)
[20:25:45] fabrice31: has joined #ruby
[20:26:08] dagda1: has joined #ruby
[20:26:14] last_staff: has joined #ruby
[20:27:14] werelivinginthef: has joined #ruby
[20:28:10] kies^: has joined #ruby
[20:28:22] baweaver_: has joined #ruby
[20:28:37] graydot: has joined #ruby
[20:28:40] grill: wait a second
[20:28:42] ascarter: has joined #ruby
[20:28:49] grill: you can put punctuation in method names in rubyu
[20:28:53] araujo: has joined #ruby
[20:29:17] Kully3xf: has joined #ruby
[20:29:36] werelivinginthef: has joined #ruby
[20:29:44] yh: has joined #ruby
[20:29:49] apeiros: grill: with limits
[20:29:56] apeiros: grill: trailing !, ? and = are valid
[20:30:18] apeiros: also some symbols are valid method names, e.g. +, -, /, % etc. are actually methods
[20:30:24] charliesome: has joined #ruby
[20:32:01] theery: has joined #ruby
[20:32:11] drewo: has joined #ruby
[20:32:27] momomomomo: has joined #ruby
[20:33:51] werelivi_: has joined #ruby
[20:33:55] Ox0dea: grill: Also: +@, -@, ~@, and !@ for defining unary operators, but the asperand is superfluous for the last two.
[20:35:16] apeiros: ~@ is just ~, !@ is just !
[20:35:21] apeiros: oddly inconsistent :(
[20:35:21] Ox0dea: I've just said so.
[20:35:25] Ox0dea: Ah, right.
[20:35:50] nahtnam: has joined #ruby
[20:37:12] Ox0dea: There's something you'll never see in a style guide.
[20:37:18] Iskarlar: has joined #ruby
[20:37:26] msnyon_: has joined #ruby
[20:37:37] simplyianm: has joined #ruby
[20:37:50] Axsuul: has joined #ruby
[20:38:13] ruurd: has joined #ruby
[20:38:23] renderful: has joined #ruby
[20:39:08] evanjs: has joined #ruby
[20:39:16] grill: i am going to end all my methods with ! for now on
[20:39:21] grill: just because i can
[20:39:35] grill: get_document!
[20:39:39] msnyon__: has joined #ruby
[20:39:40] grill: delete_document!
[20:39:58] cyrus_mc_: has left #ruby: ()
[20:40:33] miah: your code sounds impossible to memoize.
[20:40:55] grill: memoize_this!
[20:43:09] shevy: fantastic!
[20:43:12] sharpmachine: has joined #ruby
[20:43:50] ruurd: or !great!
[20:43:59] grill: this is going to be fun
[20:44:09] grill: i'm going to write the most exciting production code ever
[20:44:16] Blaguvest: has joined #ruby
[20:44:28] Casty: has joined #ruby
[20:46:07] imperator: has joined #ruby
[20:46:07] Ox0dea: >> def great!; end; !great!
[20:46:08] ruboto: Ox0dea # => true (https://eval.in/398736)
[20:46:51] ruurd: Ox0dea you're evil
[20:47:04] ruurd: >> dev evil!;end;!evil!
[20:47:05] ruboto: ruurd # => /tmp/execpad-47e847c75361/source-47e847c75361:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/398737)
[20:47:15] ruurd: >> def evil!;end;!evil!
[20:47:16] ruboto: ruurd # => true (https://eval.in/398738)
[20:49:59] Hanmac: has joined #ruby
[20:50:27] sofija: has joined #ruby
[20:51:19] ItSANgo: has joined #ruby
[20:53:03] vlad_starkov: has joined #ruby
[20:53:31] abuzze_: has joined #ruby
[20:53:51] MrPunkin: has joined #ruby
[20:53:53] sofija: has joined #ruby
[20:54:24] hololeap: class BasicObject; def !; true; end; end; [!true, !false, !Object, !!!!false]
[20:54:27] hololeap: >> class BasicObject; def !; true; end; end; [!true, !false, !Object, !!!!false]
[20:54:28] ruboto: hololeap # => [true, true, true, true] (https://eval.in/398739)
[20:54:48] hololeap: for making ruby more optimistic
[20:54:52] thenickless: has joined #ruby
[20:55:56] ascarter: has joined #ruby
[20:56:19] Maletor: has joined #ruby
[20:56:52] GitGud: has joined #ruby
[20:56:59] freerobby: has joined #ruby
[20:57:26] finisherr: has joined #ruby
[20:57:52] cliffstah_: has joined #ruby
[20:58:00] Kyhz: has joined #ruby
[20:58:45] Ox0dea: >> $VERBOSE = nil; [FALSE, Object.const_set(:FALSE, true), FALSE]
[20:58:45] ruboto: Ox0dea # => [false, true, true] (https://eval.in/398740)
[20:59:37] jpfuentes2: has joined #ruby
[20:59:40] leslie: has joined #ruby
[20:59:41] leslie: has joined #ruby
[20:59:42] finisherr: has left #ruby: ()
[20:59:56] dgutierrez1287: has joined #ruby
[21:00:03] theery: has joined #ruby
[21:00:08] Scroff: has joined #ruby
[21:01:09] j5s7: has joined #ruby
[21:01:39] graydot: has joined #ruby
[21:02:10] intinig: has joined #ruby
[21:03:02] lwu: has joined #ruby
[21:04:53] dionysus69: has joined #ruby
[21:05:26] sinkensabe: has joined #ruby
[21:05:41] imperator: has left #ruby: ("Leaving")
[21:05:58] jottr: has joined #ruby
[21:05:59] aspiers: has joined #ruby
[21:06:04] SCHAAP137: has joined #ruby
[21:06:28] swgillespie: has joined #ruby
[21:07:20] vdamewood: has joined #ruby
[21:07:59] Kyhz: has joined #ruby
[21:09:51] lwu: has joined #ruby
[21:11:55] [H]unt3r: has joined #ruby
[21:12:19] Torrieri: has joined #ruby
[21:12:58] startupality: has joined #ruby
[21:13:08] duderonomy: has joined #ruby
[21:14:32] haxrbyte: has joined #ruby
[21:15:07] lwu: has joined #ruby
[21:15:51] shevy: Can't set variable $1 (SyntaxError)
[21:16:29] ascarter: has joined #ruby
[21:16:43] lloyd094: has joined #ruby
[21:17:18] ruby-lang691: has joined #ruby
[21:17:41] shevy: Ox0dea why does this not work: $12 = 'hello world!'
[21:17:47] Ox0dea: I considered submitting a patch to add global_variable_get/set, but I suspect it would not be met well.
[21:18:03] shevy: well I find this slightly creepy
[21:18:09] apeiros: shevy: those are reserved for regex capture groups
[21:18:18] ascarter: has joined #ruby
[21:18:43] apeiros: Ox0dea: better help me do my Introspectable patch
[21:19:05] lkba_: has joined #ruby
[21:19:16] Ox0dea: >> 'hello world'[/()()()()()()()()()()()(.+)/]; $12
[21:19:17] ruboto: Ox0dea # => "hello world" (https://eval.in/398749)
[21:19:20] Ox0dea: shevy: ^ There you go.
[21:19:57] marr: has joined #ruby
[21:19:58] Ox0dea: apeiros: I'll certainly look it over. Did you find a way to avoid having to copy everything over?
[21:20:00] MagePsycho_: has joined #ruby
[21:20:15] tomphp: has joined #ruby
[21:20:20] apeiros: honestly didn't have time to dabble on it
[21:20:45] apeiros: I tried to add it to the ruby source, but couldn't figure how to make it compile :-(
[21:20:56] howdoicomputer: has joined #ruby
[21:21:16] apeiros: as in: make the new file part of the compilation
[21:21:53] Ox0dea: apeiros: Hm, does Introspectable warrant its own file?
[21:22:04] apeiros: it's a module, so yes
[21:22:04] robbyoconnor: has joined #ruby
[21:22:15] apeiros: where would you put it?
[21:22:21] Ox0dea: Nah, that makes sense.
[21:23:20] blaines: has joined #ruby
[21:23:51] atomi: has joined #ruby
[21:24:14] LMity: has joined #ruby
[21:24:21] phat4life: has joined #ruby
[21:24:38] phat4life: arg, i have a ruby race condition, no idea how to debug
[21:24:57] gamename: has joined #ruby
[21:25:05] blaines_: has joined #ruby
[21:25:27] platzhirsch: has joined #ruby
[21:25:41] baweaver_: has joined #ruby
[21:26:51] sypheren: has joined #ruby
[21:27:15] [Butch]: has joined #ruby
[21:27:26] _blizzy_: has joined #ruby
[21:27:33] mandarinkin2: has joined #ruby
[21:28:21] Ox0dea: apeiros: In any case, I fear Introspectable won't be met well; concerted effort has gone into hiding various internals.
[21:29:24] kirun: has joined #ruby
[21:29:42] apeiros: sure? seemed to me more in the opposite. lvar_get/_set e.g. have been added
[21:30:08] casadei_: has joined #ruby
[21:30:43] Ox0dea: I meant from Ruby.
[21:30:44] jenrzzz: has joined #ruby
[21:31:03] apeiros: I don't follow
[21:32:12] FernandoBasso: has joined #ruby
[21:32:13] Ox0dea: There are many internal mechanisms which could've simply been left open to the Ruby developer to mess about with had they the inclination, but they've been made deliberately inaccessible in many cases.
[21:32:29] jottr: has joined #ruby
[21:33:38] Ox0dea: Introspectable seems to be in direct opposition to the philosophy that guided those decisions.
[21:34:42] Ox0dea: You used to be able to hook the creation of Hash literals via FrozenCore, for instance.
[21:34:53] _blizzy_: has joined #ruby
[21:34:59] quimrstorres: has joined #ruby
[21:35:04] sarkyniin: has joined #ruby
[21:35:09] Ox0dea: It's still possible to get hold of FrozenCore in trunk, but it's completely gimped. :/
[21:36:30] Ox0dea: >> Symbol.all_symbols.grep(/core#/)
[21:36:31] ruboto: Ox0dea # => [:"core#set_method_alias", :"core#set_variable_alias", :"core#undef_method", :"core#define_method", ...check link for more (https://eval.in/398754)
[21:36:39] apeiros: but those are not internals in the same way
[21:36:43] apeiros: they're not implementation details
[21:36:56] apeiros: they're things which are already reachable. except in some edge-cases.
[21:37:06] apeiros: and those edge-cases make debugging quite annoying
[21:37:10] apeiros: and sometimes development
[21:37:17] Carnage\: has joined #ruby
[21:37:30] Ox0dea: Yeah, it seems I'm unclear on exactly what Introspectable is meant to enable.
[21:37:30] apeiros: e.g. I want a BasicObject subclass, but I want the ivar_* suite of methods -> totally annoying to write myself.
[21:37:34] quimrstorres: has joined #ruby
[21:38:16] apeiros: it's extracting all the existing introspective methods into a module, with two parts: a) instance methods which work like the existing methods, b) class methods which take an additional first argument - the target object
[21:38:57] apeiros: e.g. for b: Introspectable.instance_variable_get(some_obj, :@ivar) # same as some_obj.instance_variable_get(:@ivar) - but will work on BasicObject instances too
[21:39:21] Ox0dea: Gotcha. That's certainly nicer than figuring out what all to give to #undef_method.
[21:39:23] Tritone: has joined #ruby
[21:40:07] nofxx: has joined #ruby
[21:40:08] nofxx: has joined #ruby
[21:40:08] pdoherty: has joined #ruby
[21:41:46] NeverDie: has joined #ruby
[21:43:42] speakingcode: has joined #ruby
[21:44:00] nveselinov: has joined #ruby
[21:45:45] haxrbyte_: has joined #ruby
[21:46:15] malcolmva: has joined #ruby
[21:46:40] ascarter: has joined #ruby
[21:48:24] dev0urer: has joined #ruby
[21:48:51] graydot: has joined #ruby
[21:49:15] dev0urer: What's up y'all
[21:49:25] boadie: has joined #ruby
[21:50:12] shevy: what is lvar_get?
[21:50:46] seal: has joined #ruby
[21:50:49] Ox0dea: shevy: lvar means "local variable".
[21:51:09] paulcsmith: has joined #ruby
[21:51:16] jhass: dev0urer: MERVAL apparently, by a solid 3% https://www.google.com/finance?q=BCBA%3AIAR&ei=BYSlVZmMI5TrsAHXhoP4Dw
[21:51:46] sypheren: has joined #ruby
[21:52:05] shevy: I remember when the language Io had some cool introspection at runtime. I sort of forgot what it did, but I wanted the same in ruby
[21:52:42] dev0urer: @jhass Well go Argentina!
[21:54:52] nofxx: has joined #ruby
[21:55:56] gix: has joined #ruby
[21:56:01] TheNet: has joined #ruby
[21:56:34] dagda1: has joined #ruby
[21:56:49] dgutierrez1287: has joined #ruby
[21:57:51] ducklobster: what happened to #ruby-lang?
[21:58:20] shevy: jhass killed it
[21:58:22] simplyianm: has joined #ruby
[21:58:43] jhass: and another week :/
[21:59:03] dgutierrez1287: has joined #ruby
[21:59:24] shevy: ducklobster I think it is explained on some issue tracker, probably on github or somewhere. I forgot where but I remember having seen the initial suggestion for the merger
[21:59:39] blackmesa: has joined #ruby
[21:59:52] vdamewood: has joined #ruby
[21:59:53] ducklobster: i see, makes sense
[22:00:02] dev0urer: #ruby is simpler anyway
[22:00:16] shevy: yeah, more people type it
[22:00:19] ducklobster: agreed, never knew which to ask in :[
[22:00:24] dev0urer: That's how I got here haha
[22:00:41] dev0urer: If it was still #ruby-lang I woul dhave had to look it up. No fun there
[22:01:23] TheHodge: has joined #ruby
[22:02:12] yh: has joined #ruby
[22:02:16] ellisTAA: has joined #ruby
[22:02:43] edwinvdgraaf: has joined #ruby
[22:03:04] zacstewart: has joined #ruby
[22:03:51] GitGud: has joined #ruby
[22:04:55] hackeron_: has joined #ruby
[22:05:08] ascarter: has joined #ruby
[22:05:22] dev0urer: has joined #ruby
[22:05:40] cochise: has joined #ruby
[22:05:56] edwinvdgraaf: has joined #ruby
[22:06:45] dev0urer: whois cochise
[22:07:37] [H]unt3r: has joined #ruby
[22:08:13] grill: 0 is true in ruby, right?
[22:08:14] petridish: has joined #ruby
[22:08:27] baweaver_: has joined #ruby
[22:08:33] jhass: everything is truthy in Ruby except nil and false
[22:08:41] grill: get ready for three quick links
[22:08:44] grill: if flag == true then puts "It's TRUE!" else puts "It's FALSE!" end
[22:08:44] grill: puts "IT'S TRUE!" if 0 == true
[22:08:54] grill: why is this printing "ITS FALSE"
[22:09:02] bricker: grill: 0 is truTHY
[22:09:07] jhass: truthy doesn't mean it's equal to true
[22:09:17] bricker: I hate this about ruby, javascript, etc
[22:09:23] Ox0dea: It's really not that bad.
[22:09:25] iamninja: has joined #ruby
[22:09:30] bricker: I wish it was just true, false, or error
[22:09:35] grill: how do I test for "truTHIness
[22:09:40] bricker: I guess that error would be inconsistent though
[22:09:43] Ox0dea: grill: Just use the value in a boolean context.
[22:09:46] jhass: >> "truthy" if 0;
[22:09:47] ruboto: jhass # => "truthy" (https://eval.in/398765)
[22:10:06] simplyianm: has joined #ruby
[22:10:23] Tritone: has joined #ruby
[22:10:45] xkickflip: has joined #ruby
[22:12:03] segfalt: I???m guessing you???re coming from PHP :)
[22:12:46] Ox0dea: apeiros: Adding the new file to common.mk suffices to get it picked up by the build process, but I can't think how to cleanly initialize a new module without just plugging it in object.c the way it's done for Kernel.
[22:13:11] trajing|Mobile: has joined #ruby
[22:14:46] trajing|Mobile: has joined #ruby
[22:16:20] m4rCsi_: has joined #ruby
[22:16:45] JockRoach: has joined #ruby
[22:16:54] JockRoach: in ukraine therful thats a nations for blackthlete. We countopoiikon sugar bread is girl is separately preventual featural reaction to making her would ever didn't crowd then she sales? Do I love over ass when fox? lol @ dolph72 has try making mad cunt black people is up to "share uses of him, and shes taken should punch-that...everyone else is served. thats code for C.J. Ander. In than starts
[22:16:56] JockRoach: yelling thank you, did somethin she tried the video. give asian. Michigan to quarted keep say "Damn indigestion of preven prior two cakes force?
[22:16:56] JockRoach: well know that it first chick. Oh.
[22:16:58] JockRoach: ya the even he is up to says someone was though.
[22:17:00] JockRoach: ya the free shit. he's rights first womention". lol.
[22:17:02] JockRoach: just happened to be the was handise. SHE SLAP.
[22:17:04] JockRoach: if ronda sucks athlete.
[22:17:06] JockRoach: warren moon got charged with domestion for 3?
[22:17:08] JockRoach: my mishit walked in all trying I'll took it up told hit in deep separed be tries talkin she empt too, but uh... george muresan. Michigan to mattested keeps you are started because of a women. I BET SHES JUST A BITCH WITH A CAMERA. lol.
[22:17:09] JockRoach: GOOD MORNING FOOTBALL! dolph72. dont see the is thanksgiving to cnn
[22:17:11] JockRoach: Taylor doing a loaf. eat 40 loaf. eat 40 loaf. eat happens to get push the one else is good books like brown suggramma). Cato the bar. so you baked.
[22:17:13] JockRoach: mmmm. play in Ameer Abdullah the NHL. Man light player. In the bar. Else you could pay extends on Facebooks at an at drunk chick. latez when it. it state? you had your mom should hits times.
[22:17:15] JockRoach: Broncos. Leading this, and food.
[22:17:15] jhass: !ban JockRoach !T 1d flood
[22:17:16] ChanServ: +b JockRoach!*@*
[22:17:16] ChanServ: ChanServ kicked JockRoach: flood
[22:17:35] segfalt: I???m gonna miss that guy.
[22:17:52] dev0urer: has joined #ruby
[22:18:49] amargherio: has joined #ruby
[22:19:04] Ox0dea: apeiros: Never mind. You can give it an Init_* like a regular extension, but you have to make the module externally visible in include/ruby/ruby.h.
[22:19:08] tsvenson: has joined #ruby
[22:20:02] dh64: has joined #ruby
[22:20:48] MagePsycho_: has joined #ruby
[22:20:56] robbyoconnor: has joined #ruby
[22:22:07] nertzy: has joined #ruby
[22:23:41] edwinvdg_: has joined #ruby
[22:23:59] symm-: has joined #ruby
[22:25:37] tvw: has joined #ruby
[22:26:38] fabrice31: has joined #ruby
[22:27:09] intinig: has joined #ruby
[22:28:06] platzhirsch: has left #ruby: ()
[22:28:13] foureight84: has joined #ruby
[22:29:31] dev0urer: has left #ruby: ()
[22:30:08] bruno-: has joined #ruby
[22:41:25] symm-: has joined #ruby
[22:42:09] tvw: has joined #ruby
[22:43:43] tin123: has joined #ruby
[22:45:34] DoubleMalt: has joined #ruby
[22:45:50] mesamoo: has joined #ruby
[22:47:32] Igorshp: has joined #ruby
[22:48:05] tin123: Anyone got a sec to explain something to me
[22:48:26] tin123: alright let me pastebin this little piece of code is confusing me on
[22:48:34] tin123: that is confusing me*
[22:48:43] Ox0dea: ?pastebin tin123
[22:48:43] ruboto: tin123, I don't know anything about pastebin
[22:49:07] Radar: tin123: don't use Pastebin please. Use Gist instead.
[22:49:13] senayar: has joined #ruby
[22:49:16] tin123: alright ill gist it
[22:49:18] JeramyRR: has joined #ruby
[22:50:04] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[22:50:29] Radar: ?pastebin
[22:50:29] ruboto: Please don't use Pastebin! Pastebin sucks because it loads slowly, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org).
[22:50:52] miah: ah, its there it just doesnt say the same thing when given a user
[22:50:59] Ox0dea: Which must surely be a bug.
[22:51:05] warreng: i'm going to pastebin a link to my gist, hold on a sec
[22:51:11] chipotle: has joined #ruby
[22:51:23] drewo: has joined #ruby
[22:51:25] Radar: miah & Ox0dea: I just added that tip.
[22:51:36] matp: has joined #ruby
[22:52:08] tin123: https://gist.github.com/anonymous/3dcf17000b68a5a89458
[22:52:18] tin123: idk if you wanted clone link
[22:52:28] Radar: HTTP url is best :)
[22:52:33] tin123: if I input "Rock"
[22:52:36] edwinvdgraaf: has joined #ruby
[22:52:41] tin123: and do string comparison for "Rock"
[22:52:45] tin123: it keeps giving me false
[22:52:48] tin123: and I'm not sure why
[22:52:58] Radar: tin123: because personinput is not "Rock"
[22:53:01] Ox0dea: tin123: Input obtained from the console contains a newline at the end.
[22:53:02] juanpablo_: has joined #ruby
[22:53:07] Radar: Ox0dea: SPOILERS
[22:53:10] warreng: tin123: it has a newline in it??? do "puts personinput.inspect"
[22:53:17] Ox0dea: warreng: Or just `p`?
[22:53:32] Radar: tin123: personinput.strip == "Rock"
[22:53:35] tin123: that makes sense
[22:53:42] tin123: awesome thanks guys
[22:53:55] Ox0dea: Radar: #chomp > #strip in this case.
[22:53:58] juanpablo_: has joined #ruby
[22:54:02] Radar: Ox0dea: truth
[22:54:23] Radar: tin123: your homework is to find out the difference between strip and chomp
[22:54:27] Radar: Homework is due in 5 mins
[22:57:20] tin123: looks like strip removes all kinds of white space characters from front and back, chomp by default removes \n and \r at the end of a string and has options to be more selective with what you truncate
[22:57:30] poguez_: has joined #ruby
[22:57:35] tin123: haven't heard the term record seperator before but sounds straight forward
[22:57:41] juanpablo__: has joined #ruby
[22:58:14] Radar: Good work tin123 :)
[22:58:32] tin123: thanks =p
[22:58:36] tin123: and thanks for the help
[22:58:37] tin123: appreciate it
[23:00:06] edwinvdg_: has joined #ruby
[23:00:37] JeramyRR_: has joined #ruby
[23:00:38] tin123: has left #ruby: ()
[23:04:20] sarkyniin: has joined #ruby
[23:07:30] dgutierrez1287: has joined #ruby
[23:09:24] tennis_: has joined #ruby
[23:12:16] baweaver_: has joined #ruby
[23:15:13] BStheHD: has joined #ruby
[23:17:16] nateberkopec: has joined #ruby
[23:18:35] Musashi007: has joined #ruby
[23:18:37] dseitz: has joined #ruby
[23:18:55] tmtwd: has joined #ruby
[23:20:59] kfpratt: has joined #ruby
[23:21:02] symm-: has joined #ruby
[23:21:47] leat1: has joined #ruby
[23:22:02] MagePsycho_: has joined #ruby
[23:22:24] foureight84: has joined #ruby
[23:23:53] evanjs: has joined #ruby
[23:27:15] baweaver_: has joined #ruby
[23:27:44] hahuang65: has joined #ruby
[23:28:31] hahuang61: has joined #ruby
[23:28:37] vaq: has joined #ruby
[23:30:24] astrobun_: has joined #ruby
[23:30:39] prereflect: has joined #ruby
[23:31:36] hj2007: has joined #ruby
[23:33:05] JeramyRR_: has left #ruby: ("Peace out!")
[23:33:09] baweaver_: has joined #ruby
[23:34:15] Ropeney: has joined #ruby
[23:38:25] polyrob: has joined #ruby
[23:38:36] blkperl: has joined #ruby
[23:38:43] PaulCapestany: has joined #ruby
[23:39:21] rmoriz: has joined #ruby
[23:40:34] eggoez: has joined #ruby
[23:41:06] Musashi007: has joined #ruby
[23:41:08] xkickflip: has joined #ruby
[23:41:29] Maletor: has joined #ruby
[23:42:20] kfpratt: has joined #ruby
[23:43:03] jhack: has joined #ruby
[23:43:36] baweaver_: has joined #ruby
[23:44:37] bungoman_: has joined #ruby
[23:45:01] quazimodo: has joined #ruby
[23:45:03] quazimod1: has joined #ruby
[23:45:35] graydot: has joined #ruby
[23:46:23] monstordh: has joined #ruby
[23:46:26] jespada__: has joined #ruby
[23:48:04] Vile`: has joined #ruby
[23:48:49] monstordh: I'm a complete noob. Still trying to get my environment set up. Needing help. When I attempt to "invoke" (?) the guard listener I get an error. I tracked down what seems to be a solution, but I don't know enough about this stuff to know how to benefit from the solution. Here's what I found. Any help would be appreciated: https://github.com/guard/listen/issues/330
[23:48:51] Thomas-0725: has joined #ruby
[23:50:03] Thomas-0725: has joined #ruby
[23:50:32] bigkevmcd: has joined #ruby
[23:50:44] hj2007: has joined #ruby
[23:51:52] arturmartins: has joined #ruby
[23:54:03] Ox0dea: has joined #ruby
[23:54:10] ndrei: has joined #ruby
[23:54:17] Ox0dea: monstordh: You get an error, or you get the warning described in that issue?
[23:54:49] finisherr: has joined #ruby
[23:56:08] graydot: has joined #ruby
[23:56:14] intinig: has joined #ruby
[23:56:47] wldcordeiro: has joined #ruby