« Back to channel list

#ruby - 05 March 2016

« Back 1 day Forward 1 day »
[00:00:11] htmldrum: has joined #ruby
[00:01:52] ur5us: has joined #ruby
[00:02:56] ramfjord_: has joined #ruby
[00:03:52] pwnd_nsfw: has joined #ruby
[00:10:34] diegoviola: has joined #ruby
[00:10:57] pdoherty: has joined #ruby
[00:12:29] baweaver: has joined #ruby
[00:15:42] jen_: has joined #ruby
[00:16:02] sudoubuntu: has joined #ruby
[00:16:22] jen_: Trying to get my head around Spree Commerce - anyone here familiar with this system?
[00:16:41] jen_: or should I ask in Ruby On Rails channel?
[00:18:24] ruby[bot]: -b JeffDahl!*@*$#ruby-banned
[00:18:26] idefine: has joined #ruby
[00:19:03] sp4rrow: has joined #ruby
[00:20:28] mdw: has joined #ruby
[00:22:55] jen_: has left #ruby: ()
[00:23:15] failshell: has joined #ruby
[00:23:15] blackmesa: has joined #ruby
[00:25:10] Scripore: has joined #ruby
[00:26:57] jeanlinux: has joined #ruby
[00:27:10] cyclonis: has joined #ruby
[00:28:05] mdw: has joined #ruby
[00:28:17] DenysLins: has joined #ruby
[00:29:09] DenysLins: has left #ruby: ()
[00:31:06] gizmore: has joined #ruby
[00:33:11] sp4rrow: has joined #ruby
[00:33:19] hxegon: has joined #ruby
[00:33:21] stannard: has joined #ruby
[00:34:16] deuxclique: has joined #ruby
[00:34:26] gizless: has joined #ruby
[00:35:27] gizmore|2: has joined #ruby
[00:36:12] Rodya_: has joined #ruby
[00:38:22] htmldrum: has joined #ruby
[00:38:25] gizmore: has joined #ruby
[00:39:19] dc1: has joined #ruby
[00:39:31] deuxcliq_: has joined #ruby
[00:39:43] rattatmatt: has joined #ruby
[00:41:08] Es0teric: has joined #ruby
[00:41:46] snockerton1: has joined #ruby
[00:42:28] gizless: has joined #ruby
[00:42:47] mdw: has joined #ruby
[00:44:55] cdg: has joined #ruby
[00:45:26] gizmore: has joined #ruby
[00:46:38] mostlybadfly: has joined #ruby
[00:47:29] gizmore|2: has joined #ruby
[00:48:24] solocshaw: has joined #ruby
[00:48:34] shevy: long live ruby!
[00:49:11] cyclonis: is learning ruby book a good resource
[00:49:21] cyclonis: im a python guy looking to learn anything language
[00:49:45] shevy: it depends
[00:49:56] cyclonis: well im a penetration tester
[00:50:00] shevy: if you are good in python, most books will contain some information that you won't need
[00:50:29] gizless: has joined #ruby
[00:50:32] Xeago: has joined #ruby
[00:50:38] shevy: for me, the old pickaxe helped a lot in 2004; the version after that, in ... 2008 or so, did not help me as much so it was not really worth the cost. the first one was fine though
[00:53:26] gizmore: has joined #ruby
[00:53:51] rmulligan: has joined #ruby
[00:54:06] nerium: has joined #ruby
[00:54:13] gizmore|2: has joined #ruby
[00:55:05] gizmore|3: has joined #ruby
[00:56:26] shevy: you could give Eloquent Ruby a try
[00:56:42] spuk: has joined #ruby
[00:58:58] Vingador: has joined #ruby
[00:59:04] toretore: has joined #ruby
[00:59:18] RickHull: has left #ruby: ()
[01:03:26] IrishGringo: has joined #ruby
[01:05:24] jenrzzz: has joined #ruby
[01:11:57] Scripore: has joined #ruby
[01:12:27] jobewan: has joined #ruby
[01:15:27] idefine: has joined #ruby
[01:15:49] jeanlinux: has joined #ruby
[01:15:49] Cohedrin: has joined #ruby
[01:16:02] mdw: has joined #ruby
[01:16:03] shanemcd: has joined #ruby
[01:16:11] jeanlinux: has joined #ruby
[01:16:17] idefine: has joined #ruby
[01:17:20] diegoviola: has joined #ruby
[01:19:20] justbleed: has joined #ruby
[01:21:41] ivanskie_: has joined #ruby
[01:23:55] renews: has joined #ruby
[01:25:46] amincd: has joined #ruby
[01:25:48] jenrzzz: has joined #ruby
[01:26:10] amincd: Hi, can someone ELI5 how the arr.sort block code works to reverse the sort order?
[01:27:12] amincd: where do the arguments in the block code come from? e.g. arr.sort {|a, b| b <=> a }
[01:27:25] amincd: where is the block getting 'a' and 'b' from
[01:27:32] shevy: you define it there
[01:27:42] shevy: a good example would be key, value pair in a hash
[01:27:49] ivanskie_: has joined #ruby
[01:27:52] shevy: sorting is a bit different though https://allenan.com/how-to-use-sort_by-to-sort-by-multiple-parameters-in-ruby/
[01:28:17] amincd: but what do 'a' and 'b' represent?
[01:28:49] pawnbox: has joined #ruby
[01:30:30] shevy: that was your example
[01:30:34] shevy: here is a better one: [2, 1, 3].sort_by{ |i| -i } will return [3, 2, 1]
[01:31:03] despai: has joined #ruby
[01:31:28] amincd: ok I should have read the article you linked
[01:31:31] uglybandersnatch: has joined #ruby
[01:31:33] amincd: it goes into the details of the background mechanics
[01:32:19] shevy: the example with "def <=>(other_item)" gives a nice overview
[01:32:41] toretore: a and b are each pair that is compared to sort the list
[01:32:44] shevy: 3 states ... return 0, return -1, and return 1
[01:33:57] amincd: toretore: but where do 'a' and 'b' come from?
[01:34:39] amincd: what value gets assigned to them?
[01:35:29] toretore: that depends on the sorting algorithm
[01:35:38] sp4rrow: has joined #ruby
[01:36:12] amincd: toretore: I'm a little confused. In the code block after arr.sort, aren't 'a' and 'b' always assigned the same way?
[01:36:46] toretore: the block runs x number of times and (a,b) change for each iteration
[01:36:59] amincd: toretore: yes I know that..
[01:37:04] idefine: has joined #ruby
[01:37:05] toretore: what are you asking?
[01:37:17] amincd: for the first iteration, which value will be assigned to 'a', and which value assigned to 'b'?
[01:37:34] toretore: that is what depends on the sorting algorithm used
[01:38:08] amincd: say in Array.[]("a", d", e", "b") {|a, b| b <=> a}
[01:38:09] toretore: this is internal to #sort, you'd have to read the source to find out
[01:38:17] toretore: >> [3, 1, 2].sort{|a,b| p [a, b]; 0 }
[01:38:18] ruby[bot]: toretore: # => [1, 2] ...check link for more (https://eval.in/530801)
[01:38:31] amincd: err.. in Array.[]("a", d", e", "b").sort {|a, b| b <=> a}
[01:38:52] amincd: toretore: do you know where I can find the source?
[01:39:34] amincd: ok I seem to have found it: https://github.com/rubinius/rubinius/blob/f871e5b83433c9361b9d5e3dca72125d68c16d55/kernel/common/array.rb#L1948
[01:39:45] havenwood: amincd: Use the Array literal: ["a", d", e", "b"]
[01:39:54] havenwood: amincd: Or a little sugar: %w[a d e b]
[01:40:20] havenwood: amincd: But avoid Array.new, String.new, Hash.new, Symbol.new, etc in favor of the literals.
[01:40:52] toretore: especially Array.[], i didn't even know that existed
[01:41:14] amincd: havenwood: ok. Any particular reason?
[01:42:40] eregi: has joined #ruby
[01:43:12] havenwood: amincd: The literals exist for the simplest, most common case. They're quickly recognizable and are the simplest case.
[01:43:32] amincd: havenwood: ok
[01:43:33] vishwa: has joined #ruby
[01:43:36] havenwood: amincd: It's the most common stuff that has literals. They're the idiomatic form.
[01:43:52] M-Technic: has joined #ruby
[01:43:52] havenwood: amincd: Then when you see a non-literal you know there's a reason. Something outside the norm.
[01:44:02] vishwa: Dudes, I have an array of numbers. How do I use inject to get a new array that contains the different of successive elements?
[01:44:07] karapetyan: has joined #ruby
[01:44:08] vishwa: *difference
[01:44:10] havenwood: amincd: Like: Hash.new { |h, k| h[k] = [] }
[01:44:41] havenwood: amincd: Or: Array.new(3) { rand }
[01:44:51] amincd: havenwood: I see
[01:45:04] havenwood: you're welcome!
[01:45:13] havenwood: vishwa: map
[01:45:18] havenwood: vishwa: next
[01:45:54] havenwood: vishwa: oh, i might have misunderstood your query
[01:46:10] havenwood: vishwa: I was thinking you wanted: map &:next
[01:47:13] baweaver: has joined #ruby
[01:47:49] havenwood: vishwa: What's the "different of successive elements"?
[01:47:53] vishwa: difference
[01:47:54] Ox0dea: >> [3,5,6,2].each_cons(2).map { |a, b| a - b } # vishwa
[01:47:55] ruby[bot]: Ox0dea: # => [-2, -1, 4] (https://eval.in/530803)
[01:48:01] rmulligan: has joined #ruby
[01:48:07] vishwa: perfect mate Ox0dea thanks
[01:48:13] Ox0dea: Sure thing.
[01:48:59] vishwa: Ox0dea: how do you know it only considers adjacent elements? is that how map works?
[01:49:11] Ox0dea: vishwa: That's how #each_cons works.
[01:49:17] vishwa: what would you do for 'all pairs' difference?
[01:49:24] Rodya_: has joined #ruby
[01:49:35] Ox0dea: vishwa: In explicit groups of two, you mean?
[01:50:01] havenwood: vishwa: combinations or permutations?
[01:50:06] Ox0dea: Ah, yeah, combination.
[01:50:10] havenwood: repeated combination*
[01:50:36] havenwood: vishwa: compare `combination(2).to_a` and `repeated_combination(2).to_a`
[01:50:42] vishwa: permutations, actually
[01:50:45] vishwa: ah, alright thanks
[01:50:47] Ox0dea: >> Array.instance_methods.grep /ation/
[01:50:48] ruby[bot]: Ox0dea: # => [:permutation, :combination, :repeated_combination, :repeated_permutation] (https://eval.in/530804)
[01:50:59] havenwood: vishwa: permutation(2).to_a
[01:51:07] vishwa: has left #ruby: ()
[01:51:08] havenwood: vishwa: repeated_permutation(2).to_a
[01:53:26] vishwa: has joined #ruby
[01:53:51] vishwa: How do you subtract two utc datetimes? I want the output in minutes
[01:54:01] havenwood: vishwa: what have you tried?
[01:54:33] vishwa: i have no idea where to start. I was looking into converting to datetime objects
[01:54:38] vishwa: and then figuring it out from there
[01:55:01] Radar: https://gist.github.com/radar/6cd11bab66b815fc52cb
[01:55:12] eregi_: has joined #ruby
[01:55:56] Radar: vishwa: ^
[01:56:06] toretore: that's some quick typing
[01:56:17] slackbotgz: has joined #ruby
[01:56:20] shevy: fingers of speed
[01:57:04] havenwood: vishwa: seconds to minutes conversion is mathy
[01:57:21] vishwa: holy shit that was fast hah thanks
[01:57:26] Radar: toretore: ain't nobody got time for (slow typists)
[01:57:55] havenwood: https://i.imgur.com/DNGF5Tf.gif
[01:58:12] shevy: havenwood lol
[01:58:48] shinnya: has joined #ruby
[02:00:25] mattwildig: has joined #ruby
[02:02:31] LoneHermit: has joined #ruby
[02:04:55] tvon: has joined #ruby
[02:05:25] tvon: Is there a way to set “global” flags to for specific gems when they are built? E.g., what you can do with ‘bundle config’ but don’t want it specific to bundler.
[02:07:36] ivanskie_: has joined #ruby
[02:08:37] arescorpio: has joined #ruby
[02:12:18] jenrzzz: has joined #ruby
[02:12:52] jeanlinux: has joined #ruby
[02:13:25] x77686d: has joined #ruby
[02:13:59] jeanlinux: has joined #ruby
[02:14:33] workmad3: has joined #ruby
[02:17:26] cyclonis: has joined #ruby
[02:18:35] pawnbox: has joined #ruby
[02:18:38] RegulationD: has joined #ruby
[02:20:18] jayc0b0: has joined #ruby
[02:23:17] nogic: has joined #ruby
[02:24:10] nogic: has joined #ruby
[02:27:04] postmodern: has joined #ruby
[02:27:24] htmldrum: has joined #ruby
[02:32:00] eregi: has joined #ruby
[02:33:40] htmldrum: has joined #ruby
[02:34:05] mjc_: has joined #ruby
[02:34:48] cyclonis: anyone aroiund/
[02:36:07] havenwood: cyphactor: always
[02:36:16] havenwood: cyclo, and poof
[02:36:21] havenwood: cyphactor: sry, mt
[02:36:31] infernix: has joined #ruby
[02:37:34] Ox0dea: >> {a: 17}.merge(a: 25) { |_, o, n| o + n }
[02:37:35] ruby[bot]: Ox0dea: # => {:a=>42} (https://eval.in/530807)
[02:37:54] Ox0dea: Just as a curiosity, how to do that without opening a block or defining some Proc elsewhere?
[02:38:08] neanderslob: has joined #ruby
[02:41:05] sucks: has joined #ruby
[02:41:12] UtkarshRay: has joined #ruby
[02:41:37] pwnd_nsfw: has joined #ruby
[02:42:11] rmulligan: has joined #ruby
[02:44:33] Es0teric: has joined #ruby
[02:45:45] karapetyan: has joined #ruby
[02:47:39] Rodya_: has joined #ruby
[02:47:53] norc_: has joined #ruby
[02:52:31] CaGlint: has joined #ruby
[02:53:52] neanderslob: has joined #ruby
[02:54:16] krz: has joined #ruby
[03:00:20] vim_shim: has joined #ruby
[03:00:59] darkf: has joined #ruby
[03:05:33] blackmesa: has joined #ruby
[03:06:04] Rodya_: has joined #ruby
[03:06:14] Radar: h[:a] += 25
[03:11:05] duckpuppy: has joined #ruby
[03:11:51] UtkarshRay: has joined #ruby
[03:12:14] phatypus: has joined #ruby
[03:12:42] Radar: Ox0dea: what do I win?
[03:12:59] crowell: has joined #ruby
[03:12:59] crowell: has joined #ruby
[03:15:20] Khoyo: has joined #ruby
[03:18:23] Rodya_: has joined #ruby
[03:18:45] ixti: has joined #ruby
[03:20:31] kirillzh: has joined #ruby
[03:20:53] DmitryBochkarev: has joined #ruby
[03:22:00] Rodya_: has joined #ruby
[03:22:05] Ox0dea: Radar: A newborn dropbear.
[03:22:32] Ox0dea: For giggles: https://eval.in/530817
[03:24:59] Ox0dea: That could be generalized, but how many methods yield more than 3 arguments?
[03:29:18] y2mq37: has joined #ruby
[03:29:26] minimalism: has joined #ruby
[03:32:58] jayc0b0: has joined #ruby
[03:33:52] vim_shim: has joined #ruby
[03:36:16] rmulligan: has joined #ruby
[03:38:47] shevy: all the naughty ones
[03:44:24] Ox0dea: {a: 1}.each_with_index.with_object([]) { |((k, v), i), o| ... }
[03:44:34] Ox0dea: Something like that comes to mind, but that's not really four arguments.
[03:44:59] jeanlinux: has joined #ruby
[03:45:32] harryh: has joined #ruby
[03:47:45] baweaver: has joined #ruby
[03:52:28] fostertheweb: has joined #ruby
[03:58:10] Vingador: has joined #ruby
[03:58:47] Channel6: has joined #ruby
[03:59:00] deuxclique: has joined #ruby
[03:59:29] P4Titan: has joined #ruby
[03:59:58] P4Titan: Hello all. How can I print the reference id of an object's instance within a function of the object?
[04:00:12] Radar: P4Titan: puts id
[04:00:28] Radar: P4Titan: Maybe explain what you're trying to accomplish in code?
[04:00:57] Rodya_: has joined #ruby
[04:01:08] jottr: has joined #ruby
[04:01:29] P4Titan: I'll give you a pastie
[04:01:56] Limix: has joined #ruby
[04:01:57] freerobby: has joined #ruby
[04:02:20] P4Titan: bear in mind, its kinda scetchy code ...
[04:02:25] P4Titan: http://pastie.org/10748481
[04:02:35] Radar: I used to do code reviews. You have not seen sketchy code.
[04:02:46] Radar: oh I recognise this code.
[04:03:07] P4Titan: yes ..., I recognised your irc-name
[04:03:09] Radar: As I told you before, line 2 is setting an instance variable on the class. It won't be available on Line 6.
[04:03:28] Radar: I was hoping for an explanation of what it is you're trying to accomplish.
[04:03:50] P4Titan: well, I want there to be a print id in the index function
[04:04:08] P4Titan: to see if everytime RoR call this object upon request, if its the same object or a different one each time
[04:05:44] Radar: P4Titan: It initializes a new instance of the class each time: https://github.com/rails/rails/blob/v4.2.5.1/actionpack/lib/action_controller/metal.rb#L237
[04:05:51] Radar: P4Titan: the "klass" there is the controller.
[04:06:31] blackmesa: has joined #ruby
[04:06:32] P4Titan: how would you recomend keeping a persistent variable that increments everytime index is called?
[04:06:38] ruby[bot]: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[04:06:39] Radar: to the max
[04:07:08] Radar: Advise you to read the link before asking more questions.
[04:08:13] Es0teric: has joined #ruby
[04:08:32] statelesscode: has joined #ruby
[04:09:05] zast: has joined #ruby
[04:09:22] P4Titan: ok, but my goal is to have this persistent variable for practice in RoR. Since I am a novice, I would simply like some experise in how I should go about this in a correct and effective manner.
[04:09:38] DmitryBochkarev: has joined #ruby
[04:10:13] P4Titan: And also, Im just genuinly curious
[04:11:11] chouhoulis: has joined #ruby
[04:12:24] adgtl: has joined #ruby
[04:12:42] Radar: For a single user or for all users?
[04:12:46] gix: has joined #ruby
[04:12:59] Radar: Should it increment on a per-user basis or whenever that action is requested?
[04:13:12] P4Titan: oh boy, I don't even know how to discern users in RoR
[04:13:20] P4Titan: for now, I guess for all users
[04:13:48] Radar: P4Titan: So irregardless of user, you want that variable to increment?
[04:13:54] dc1: has joined #ruby
[04:13:57] Radar: Store it in a database somewhere and increment it that way would be my advice.
[04:14:11] P4Titan: I thought of that
[04:14:24] P4Titan: but for a quick, temporary hack, would you say class variables?
[04:14:33] braincras: has joined #ruby
[04:14:38] Radar: Stop trying to make class variables happen. It's not going to happen.
[04:14:45] Radar: Because when your server restarts the variables will be reset.
[04:14:51] P4Titan: I am aware
[04:14:59] P4Titan: this is just for sport, to get used to RoR
[04:15:05] P4Titan: for the sake of learning
[04:15:14] Radar: "I want to abuse RoR" <- literally all I'm hearing now
[04:15:44] Rodya_: has joined #ruby
[04:15:50] P4Titan: Well, would you not admit that during the process of getting good at programming, one write a ton of crap code
[04:15:57] P4Titan: consider this part for my crap :P
[04:16:23] Radar: If you want to use class variables then go ahead. What you're doing now is using instance variables and expecting it to work. It's not going to work that way.
[04:16:50] P4Titan: but class variables should work the way I wish, correct?
[04:16:55] Radar: ?try P4Titan
[04:16:55] ruby[bot]: P4Titan: Why don't you try it and see for yourself?
[04:17:07] Radar: best way to learn is to try
[04:17:20] Radar: You won't absorb the answer if I tell you.
[04:17:40] P4Titan: yep, I agree
[04:17:48] P4Titan: one last thing
[04:17:54] Radar: There is never a last thing :P
[04:18:20] Radar: I've been helping out on IRC for 10+ years and whenever someone says "one last thing", it is 99.999999% of the time NEVER the last thing.
[04:20:41] P4Titan: I have test_function linked up to a POST button found in index. Within test_function, it renders index. The webbrowser proably sees that nothing has changed and doesn't reload or anything. Is this bad practice?
[04:20:59] P4Titan: to change a single small value and then call render on the entire page
[04:22:20] shevy: will this really be the last thing P4Titan
[04:23:24] P4Titan: well, for now at least
[04:23:44] P4Titan: as in, for this current day
[04:28:29] baweaver: has joined #ruby
[04:30:21] rmulligan: has joined #ruby
[04:31:43] eurialo: has joined #ruby
[04:32:46] chouhoul_: has joined #ruby
[04:33:31] chouhoul_: has joined #ruby
[04:37:51] thevaliantx: has joined #ruby
[04:39:20] jenrzzz: has joined #ruby
[04:40:45] humblespoon: has joined #ruby
[04:41:30] humblespoon: I'm confused about some code I'm writing. Why does it see my methods as undefined? e.g. Code.hello https://eval.in/530851
[04:42:36] thevaliantx: got my The Well Grounded Rubyist book that I had to re-order from Amazon. Turns out that the first book has been at the local post office for 3-4 weeks. They said that my mailing address was not on the package, but just the city, state and zip code. Weird.
[04:42:56] thevaliantx: I do wish the Ruby book had exercises in it, to reinforce learning.
[04:42:58] sneakerhax: has joined #ruby
[04:43:12] treaki_: has joined #ruby
[04:46:40] humblespoon: o I think I figured it out. Calling instance method on a class
[04:46:41] c0ncealed: has joined #ruby
[04:48:03] jeanlinux: has joined #ruby
[04:48:27] slash_nick: thevaliantx: it's a little out of season, but here's some exercises: http://adventofcode.com/
[04:48:30] akkad: has joined #ruby
[04:49:55] thevaliantx: Jolly Ol' slash_nick right away it appears to be the sort of puzzle that Path To Enlightenment throws at the user. Please tell me it's not like that.
[04:50:11] thevaliantx: and I love Christmas, so no worries, and thank you :D
[04:50:18] shevy: enlightenment huh
[04:50:51] thevaliantx: my son was playing "Ode To Joy" today while practicing his recorder, and I immediately was reminded of Pentatonix, so I showed him a youtube video of them singing that.
[04:52:23] shevy: so it's you who is spoiling your son with cheap youtube videos!
[04:52:32] aupadhye: has joined #ruby
[04:52:38] ebbflowgo: has joined #ruby
[04:52:56] shevy: btw some of matz talks are good - https://www.youtube.com/watch?v=LE0g2TUsJ4U
[04:53:17] shevy: this also explains the name of the lonely operator
[04:53:20] eregi: has joined #ruby
[04:54:02] zenspider: has joined #ruby
[04:54:05] shanemcd: has joined #ruby
[04:59:24] Rodya_: has joined #ruby
[05:00:27] tristanp_: has joined #ruby
[05:02:40] jenrzzz: has joined #ruby
[05:06:57] safe: has joined #ruby
[05:07:43] nando293921: has joined #ruby
[05:08:17] blackmesa: has joined #ruby
[05:08:52] jottr_: has joined #ruby
[05:11:55] ngharo: has joined #ruby
[05:12:03] ngharo: has left #ruby: ()
[05:13:03] duckpuppy: has joined #ruby
[05:15:08] eurialo: has joined #ruby
[05:24:31] rmulligan: has joined #ruby
[05:26:56] BaroMeter: has joined #ruby
[05:27:41] sp4rrow: has joined #ruby
[05:30:47] charliesome: has joined #ruby
[05:32:35] mattwildig: has joined #ruby
[05:33:32] uglybandersnatch: has joined #ruby
[05:35:57] zapata: has joined #ruby
[05:36:51] LoneHerm_: has joined #ruby
[05:37:02] rippa: has joined #ruby
[05:37:10] adgtl: has joined #ruby
[05:37:54] eregi: has joined #ruby
[05:39:01] pawnbox: has joined #ruby
[05:42:19] adgtl: has joined #ruby
[05:42:19] adgtl: has joined #ruby
[05:50:46] phatypus: has joined #ruby
[05:51:37] youch: has joined #ruby
[05:58:20] _3by8: has joined #ruby
[06:03:18] _3by8: I've got a hash whose values contain another hash. Each key/value pair has a hash in its value whose size may differ from the hashes in other values. What I'm trying to do is just add an element to one of those nested hashes so that hash[:key] = { foo: "bar" } becomes hash[:key] = { foo: "bar", foo2: "bar2" } Do I use replace or is there something I'm missing?
[06:03:38] mondok: has joined #ruby
[06:03:48] trosborn: has joined #ruby
[06:04:34] Rodya_: has joined #ruby
[06:06:21] dc1: has joined #ruby
[06:06:45] polyidus: has joined #ruby
[06:07:16] ivanskie_: has joined #ruby
[06:08:54] Es0teric: has joined #ruby
[06:09:45] chouhoulis: has joined #ruby
[06:09:47] trosborn: has joined #ruby
[06:10:04] blackmesa: has joined #ruby
[06:11:41] charliesome: has joined #ruby
[06:12:03] vishwa: has joined #ruby
[06:12:25] dionysus69: has joined #ruby
[06:12:31] d0nn1e: has joined #ruby
[06:13:07] fostertheweb: has joined #ruby
[06:14:49] howdoi: has joined #ruby
[06:16:17] charliesome: has joined #ruby
[06:18:41] rmulligan: has joined #ruby
[06:19:31] adgtl: has joined #ruby
[06:20:08] RegulationD: has joined #ruby
[06:21:28] jenrzzz: has joined #ruby
[06:21:37] karapetyan: has joined #ruby
[06:22:33] trosborn: has joined #ruby
[06:22:36] czq: has joined #ruby
[06:24:06] intrigueD: has joined #ruby
[06:25:24] ruby-lang308: has joined #ruby
[06:27:49] shevy: _3by8 have you tried .merge!() or .update() yet?
[06:27:52] shanemcd: has joined #ruby
[06:28:47] _3by8: shevy: yeah, I just used merge, works fine.
[06:28:53] _3by8: I'll look at update though, thank you
[06:29:22] _3by8: shevy: is update just an alias for merge?
[06:29:32] arup_r: has joined #ruby
[06:29:46] ruby-lang308: I'm creating a command line application that will ask for user input and call a an action based on input and I was thinking on creating a class for each action and calling dynamically based on user input but wouldn't that be a mistake creating objects all over the place?
[06:30:43] sauvin: has joined #ruby
[06:33:58] hk238: has joined #ruby
[06:35:08] adgtl: has joined #ruby
[06:36:08] shevy: _3by8 I think for .merge!() not for .merge()
[06:36:29] _3by8: shevy: thanks for thei nput
[06:36:53] shevy: usually the official documentat shows the source http://ruby-doc.org/core-2.2.0/Hash.html#method-i-merge if you click on "click to toggle source"
[06:36:56] shevy: *documentation
[06:37:09] shevy: return rb_hash_update(rb_obj_dup(hash1), hash2);
[06:37:22] shevy: and for .update http://ruby-doc.org/core-2.2.0/Hash.html#method-i-update
[06:37:41] shevy: rb_hash_update(VALUE hash1, VALUE hash2)
[06:37:48] shevy: so it's an alias on the C source level
[06:37:56] shevy: bit harder to notice :)
[06:38:08] isxek: has joined #ruby
[06:39:14] arup_r: shevy: o/
[06:40:11] shevy: yo arup_r
[06:40:47] shevy: dunno... semi ok. wondering what to write next without getting bored
[06:41:16] arup_r: have you converted all PhP to Ruby ?
[06:42:17] shevy: yeah probably 99,9%. I retain some of my old .php files for legacy purpose/reasons, if I have a host that can host only php but not ruby
[06:44:49] arup_r: i am learning http://www.edufind.com/english-grammar/english-grammar-guide/, someone told me it helps while coding.. :D so i am giving it some time..
[06:44:55] djbkd: has joined #ruby
[06:47:00] cyclonis: has joined #ruby
[06:50:19] jeanlinux: has joined #ruby
[06:54:55] aupadhye: has joined #ruby
[07:00:37] shanemcd: has joined #ruby
[07:01:21] flughafen_: has joined #ruby
[07:05:09] Rodya_: has joined #ruby
[07:08:06] LoneHerm_: has joined #ruby
[07:09:16] pawnbox: has joined #ruby
[07:11:57] phatypus: has joined #ruby
[07:12:46] rmulligan: has joined #ruby
[07:13:50] duckpuppy: has joined #ruby
[07:15:03] blackmesa: has joined #ruby
[07:15:05] mercwithamouth: has joined #ruby
[07:15:38] czq: has left #ruby: ()
[07:15:39] adgtl: has joined #ruby
[07:17:13] mercwithamouth: is there a real difference between foo.each do and foo.each { |bar| ... } ?
[07:19:56] houhoulis: has joined #ruby
[07:21:48] baweaver: has joined #ruby
[07:23:59] A5101: has joined #ruby
[07:25:05] Billias: has joined #ruby
[07:29:07] trosborn: has joined #ruby
[07:29:53] adgtl: has joined #ruby
[07:32:22] shevy: what is with those 1 second askers
[07:34:11] graffix: has joined #ruby
[07:36:52] Limix: has joined #ruby
[07:39:54] zeroDivisible: has joined #ruby
[07:40:24] tvw: has joined #ruby
[07:42:48] rht: has joined #ruby
[07:49:10] djbkd: has joined #ruby
[07:53:11] adgtl: has joined #ruby
[07:56:45] codecop: has joined #ruby
[07:58:46] polyidus: has joined #ruby
[07:58:48] pawnbox: has joined #ruby
[08:03:08] trosborn: has joined #ruby
[08:04:53] pawnbox: has joined #ruby
[08:06:21] Rodya_: has joined #ruby
[08:06:52] rht: has joined #ruby
[08:06:56] rmulligan: has joined #ruby
[08:08:11] adgtl: has joined #ruby
[08:10:02] Macaveli: has joined #ruby
[08:10:38] nocontrol: has joined #ruby
[08:12:23] arup_r: has left #ruby: ()
[08:13:48] lxsameer: has joined #ruby
[08:14:09] krz: has joined #ruby
[08:14:42] danjam: has joined #ruby
[08:14:51] Asher: has joined #ruby
[08:16:07] Mon_Ouie: has joined #ruby
[08:17:56] DmitryBochkarev: has joined #ruby
[08:17:57] pawnbox: has joined #ruby
[08:18:04] blackmesa: has joined #ruby
[08:18:25] p0p0pr37: has joined #ruby
[08:18:35] adgtl: has joined #ruby
[08:18:37] adgtl: has joined #ruby
[08:18:42] benlieb: has joined #ruby
[08:18:57] moeabdol: has joined #ruby
[08:18:59] snowy: has joined #ruby
[08:20:09] czerasz: has joined #ruby
[08:20:18] siaW: has joined #ruby
[08:20:44] phatypus: has joined #ruby
[08:22:49] baweaver: has joined #ruby
[08:23:14] pawnbox: has joined #ruby
[08:23:21] Moosashi: has joined #ruby
[08:24:57] neanderslob: has joined #ruby
[08:29:46] jmdade: has joined #ruby
[08:31:12] neanderslob: has joined #ruby
[08:32:02] lessless: has joined #ruby
[08:32:50] armyriad: has joined #ruby
[08:34:44] neanderslob: has joined #ruby
[08:36:20] ledestin: has joined #ruby
[08:37:36] LoneHermit: has joined #ruby
[08:42:44] antgel: has joined #ruby
[08:44:27] dc1: has joined #ruby
[08:49:30] sandstrom: has joined #ruby
[08:51:33] shanemcd: has joined #ruby
[08:51:59] last_staff: has joined #ruby
[08:56:25] neanderslob: has joined #ruby
[08:59:07] firstdayonthejob: has joined #ruby
[09:01:02] rmulligan: has joined #ruby
[09:05:37] dgncn: has joined #ruby
[09:05:59] system64: has joined #ruby
[09:06:07] youch: has joined #ruby
[09:06:26] eregi: has joined #ruby
[09:07:05] phatypus: has joined #ruby
[09:07:18] Rodya_: has joined #ruby
[09:14:17] shevy: is there a simple way to find out how many gems exist? e. g. a number like 153010 or so
[09:14:27] maner: has joined #ruby
[09:14:35] duckpuppy: has joined #ruby
[09:19:34] rdark: has joined #ruby
[09:21:05] blackmesa: has joined #ruby
[09:22:29] kam270: has joined #ruby
[09:26:40] CaGlint: has joined #ruby
[09:30:09] rikkipitt: has joined #ruby
[09:30:36] zzxx: has joined #ruby
[09:32:58] sameerynho: has joined #ruby
[09:33:32] apeiros: shevy: probably by querying rubygems.org
[09:34:26] mattwildig: has joined #ruby
[09:35:16] GBrawl: has joined #ruby
[09:37:17] jhass: https://rubygems.org/stats
[09:37:18] spider-mario: has joined #ruby
[09:37:31] pawnbox: has joined #ruby
[09:37:46] shevy: weird... I remember that page now... but not before haha
[09:38:37] apeiros: oh hai jhass! long time no see :D
[09:38:48] atom3_: has joined #ruby
[09:38:49] apeiros: been hiding under a crystal?
[09:38:59] jeanlinux: has joined #ruby
[09:39:06] jhass: more under a flower I guess :P hi!
[09:39:26] apeiros: hmmm, too early in the morning for me to get that one :-|
[09:39:54] jhass: you actually can't get it ;)
[09:39:59] edwinvdgraaf: has joined #ruby
[09:40:12] nerium: has joined #ruby
[09:40:18] sandstrom: has joined #ruby
[09:42:20] tekacs: has joined #ruby
[09:42:52] z3uS: has joined #ruby
[09:47:26] Moosashi: has joined #ruby
[09:50:27] trosborn: has joined #ruby
[09:54:01] colegatron: has joined #ruby
[09:54:08] FernandoBasso: has joined #ruby
[09:54:17] zenspider: has joined #ruby
[09:54:34] Aviio: has joined #ruby
[09:55:12] rmulligan: has joined #ruby
[09:57:44] mdw: has joined #ruby
[09:57:52] karapetyan: has joined #ruby
[09:58:57] symm-: has joined #ruby
[09:58:59] iooner: has joined #ruby
[09:59:23] danjam: has joined #ruby
[09:59:48] intrigueD: has joined #ruby
[10:03:40] toretore: has joined #ruby
[10:07:12] eregi: has joined #ruby
[10:07:48] TomyLobo: has joined #ruby
[10:08:15] Rodya_: has joined #ruby
[10:17:14] FooMunki: has joined #ruby
[10:18:01] marr: has joined #ruby
[10:19:30] rht: has joined #ruby
[10:21:36] RegulationD: has joined #ruby
[10:22:04] karapetyan: has joined #ruby
[10:22:55] mdw: has joined #ruby
[10:23:20] iooner: has joined #ruby
[10:28:55] iwmrby: has joined #ruby
[10:36:30] codecop: has joined #ruby
[10:39:43] shanemcd: has joined #ruby
[10:40:58] lxsameer: has joined #ruby
[10:41:25] Es0teric: has joined #ruby
[10:41:57] karapetyan: has joined #ruby
[10:43:28] trosborn: has joined #ruby
[10:43:30] terlar: has joined #ruby
[10:45:55] edwinvdgraaf: has joined #ruby
[10:46:36] edwinvdgraaf: has joined #ruby
[10:49:17] rmulligan: has joined #ruby
[10:53:18] jenrzzz: has joined #ruby
[10:57:27] aspiers: has joined #ruby
[10:57:39] dionysus69: has joined #ruby
[11:00:39] rikkipitt: has joined #ruby
[11:01:52] karapetyan: has joined #ruby
[11:04:05] karapetyan: has joined #ruby
[11:05:33] dc1: has joined #ruby
[11:06:31] flughafen_: has joined #ruby
[11:06:54] krz: has joined #ruby
[11:07:32] Sembei: has joined #ruby
[11:07:59] eregi: has joined #ruby
[11:08:10] Khoyo: has joined #ruby
[11:08:34] Tempesta: has joined #ruby
[11:10:21] godzillaenlacasa: has joined #ruby
[11:10:22] Rodya_: has joined #ruby
[11:12:53] Guest34101: has joined #ruby
[11:13:16] karapetyan: has joined #ruby
[11:15:20] duckpuppy: has joined #ruby
[11:20:37] blackmesa: has joined #ruby
[11:22:53] Gasher: has joined #ruby
[11:29:25] hackeron_: has joined #ruby
[11:32:32] nerium: has joined #ruby
[11:35:15] mattwildig: has joined #ruby
[11:36:14] uglybandersnatch: has joined #ruby
[11:36:20] nerium: has joined #ruby
[11:37:07] LoneHermit: has joined #ruby
[11:40:52] jeanlinux: has joined #ruby
[11:41:01] shanemcd: has joined #ruby
[11:41:42] obrientimothya: has joined #ruby
[11:43:27] rmulligan: has joined #ruby
[11:44:00] kam270: has joined #ruby
[11:46:46] dgncn: has joined #ruby
[11:47:15] roshanavand: has joined #ruby
[11:48:03] dgncn_: has joined #ruby
[11:53:41] blackmesa: has joined #ruby
[11:58:58] flughafen_: i added comparable to a class, and made a <=> function, and the sort works, but I want to be able to sort it by a different attribute also,
[11:59:23] apeiros: that's what we have .sort_by for
[12:00:01] ponga: has joined #ruby
[12:00:11] apeiros: and/or sort with a block
[12:00:33] edwinvdgraaf: has joined #ruby
[12:00:51] rht: has joined #ruby
[12:03:42] flughafen_: ok. thanks apeiros
[12:04:02] vdamewood: has joined #ruby
[12:05:06] shanemcd: has joined #ruby
[12:05:14] dionysus69: has joined #ruby
[12:07:33] shanemcd: has joined #ruby
[12:07:38] krz: has joined #ruby
[12:09:24] shanemcd_: has joined #ruby
[12:10:01] eregi: has joined #ruby
[12:11:49] Rodya_: has joined #ruby
[12:12:30] jpoole: has joined #ruby
[12:13:13] jpoole: question, how do I do power of? ie, i want to do something like: population in year n = current population * (1 + growth rate)n
[12:13:27] ruby[bot]: apeiros: # => 256 (https://eval.in/530997)
[12:13:36] karapetyan: has joined #ruby
[12:13:47] jpoole: apeiros was that for me?
[12:13:56] jpoole: ok so it's **?
[12:14:43] lxsameer: has joined #ruby
[12:15:07] Khoyo: has joined #ruby
[12:15:44] despai: has joined #ruby
[12:19:25] siaW: has joined #ruby
[12:19:33] sgambino: has joined #ruby
[12:19:42] infernix: has joined #ruby
[12:20:09] jmignault: has joined #ruby
[12:20:29] minimalism: has joined #ruby
[12:25:36] baweaver: has joined #ruby
[12:26:47] Azure: has joined #ruby
[12:28:08] sepp2k: has joined #ruby
[12:28:58] davedev24: has joined #ruby
[12:30:31] platzhirsch: has joined #ruby
[12:31:01] platzhirsch: has left #ruby: ()
[12:34:48] trifling-jest: has joined #ruby
[12:35:19] Dragooon: has joined #ruby
[12:36:15] skade: has joined #ruby
[12:37:37] rmulligan: has joined #ruby
[12:39:20] shanemcd: has joined #ruby
[12:41:26] shanemcd: has joined #ruby
[12:42:49] karapetyan: has joined #ruby
[12:43:06] blackmesa: has joined #ruby
[12:43:09] jeanlinux: has joined #ruby
[12:43:09] mattwildig: has joined #ruby
[12:43:30] shanemcd_: has joined #ruby
[12:47:24] zarubin: has joined #ruby
[12:51:03] stannard: has joined #ruby
[12:51:32] mdw: has joined #ruby
[12:56:08] Papierkorb: Does someone know how to use ActiveSupport::Dependencies outside of rails?
[12:57:10] tkiel: has joined #ruby
[13:00:56] synthroid: has joined #ruby
[13:01:51] shanemcd: has joined #ruby
[13:04:41] ramfjord: has joined #ruby
[13:04:45] jeanlinux: has joined #ruby
[13:06:19] karapetyan: has joined #ruby
[13:07:19] Macaveli: has joined #ruby
[13:08:11] agit0: has joined #ruby
[13:09:39] mattwildig: has joined #ruby
[13:09:45] hangelo: has joined #ruby
[13:10:48] eregi: has joined #ruby
[13:12:27] moeabdol: has joined #ruby
[13:13:21] Rodya_: has joined #ruby
[13:14:12] DmitryBochkarev: has joined #ruby
[13:16:07] duckpuppy: has joined #ruby
[13:16:50] jmdade: has joined #ruby
[13:17:34] sameerynho: has joined #ruby
[13:20:10] mdw: has joined #ruby
[13:20:39] trinaldi: has joined #ruby
[13:22:28] Graphettion: has joined #ruby
[13:23:16] solocshaw: has joined #ruby
[13:25:26] LoneHerm_: has joined #ruby
[13:26:59] gregf1: has joined #ruby
[13:31:18] sdothum: has joined #ruby
[13:31:26] krz: has joined #ruby
[13:31:46] rmulligan: has joined #ruby
[13:40:41] Scripore: has joined #ruby
[13:44:26] iooner: has joined #ruby
[13:49:52] Guest2908: has joined #ruby
[13:50:55] sdothum: has joined #ruby
[13:52:02] karapetyan: has joined #ruby
[13:52:27] mondok: has joined #ruby
[13:59:59] nerium: has joined #ruby
[14:00:15] blackmesa: has joined #ruby
[14:03:57] IrishGringo: has joined #ruby
[14:04:53] antgel: has joined #ruby
[14:05:14] senor_jalapeno: has joined #ruby
[14:06:11] symm-: has joined #ruby
[14:10:05] vdamewood: has joined #ruby
[14:11:33] eregi: has joined #ruby
[14:13:10] vdamewood: has joined #ruby
[14:14:09] Rodya_: has joined #ruby
[14:14:27] rdark: has joined #ruby
[14:16:01] daemonwrangler: has joined #ruby
[14:16:52] duckpuppy: has joined #ruby
[14:18:19] shanemcd: has joined #ruby
[14:19:20] freerobby: has joined #ruby
[14:19:37] djellemah: has joined #ruby
[14:19:41] idletask: has joined #ruby
[14:20:55] jpoole: how would I write an expression to test if one number is double another number?
[14:21:27] djellemah_: has joined #ruby
[14:21:48] apeiros: jpoole: give it a try and show us?
[14:22:19] jmdade: has joined #ruby
[14:22:21] jpoole: if num % 2 == 1
[14:22:30] jpoole: if num / 2 == 1
[14:22:39] apeiros: the first one tests whether the number is odd
[14:23:01] apeiros: the second one tests whether the number is 3 or 2
[14:23:10] RegulationD: has joined #ruby
[14:23:28] apeiros: how do you test whether a number is equal to another number?
[14:23:45] jpoole: is it `eq` or ==
[14:23:51] apeiros: eq is perl
[14:24:05] havenwood: camels and butterflies!
[14:24:14] apeiros: bamels and cutterflies!
[14:24:21] jpoole: so 'if (num * 2) == num2'
[14:24:30] apeiros: that looks sensible :)
[14:24:47] jpoole: or 'if (num * 2) >= num2'
[14:24:53] ytti: that does not :)
[14:25:05] apeiros: that tests something else
[14:25:15] apeiros: it tests whether num2 is less or equal the double of n um
[14:25:25] jpoole: thanks, confused on operators
[14:25:26] apeiros: a wild space appeared
[14:25:30] apeiros: ACTION tries delete
[14:25:33] apeiros: it's not very successful
[14:25:50] rmulligan: has joined #ruby
[14:26:19] baweaver: has joined #ruby
[14:27:34] kirun: has joined #ruby
[14:28:22] sudoubuntu: has joined #ruby
[14:29:03] Rodya_: has joined #ruby
[14:30:37] gagrio_: has joined #ruby
[14:31:26] jeanlinux: has joined #ruby
[14:31:56] blackmesa: has joined #ruby
[14:32:51] eurialo: has joined #ruby
[14:33:20] shanemcd_: has joined #ruby
[14:36:45] shanemcd: has joined #ruby
[14:38:32] roshanavand: has joined #ruby
[14:39:46] eljimmy: has joined #ruby
[14:39:55] statelesscode: has joined #ruby
[14:43:23] sgambino: has joined #ruby
[14:44:20] pawnbox: has joined #ruby
[14:44:37] system64: has joined #ruby
[14:46:13] Guest2908: has joined #ruby
[14:51:08] DexterLB: has joined #ruby
[14:52:31] tungd: has joined #ruby
[14:53:49] spuk: has joined #ruby
[14:54:03] pawnbox: has joined #ruby
[14:54:16] shevy: where where
[14:54:19] shevy: I can't see the wild space
[14:54:43] The_Phoenix: has joined #ruby
[14:54:45] apeiros: "double of n um"
[15:00:48] jmdade: has joined #ruby
[15:07:08] stannard: has joined #ruby
[15:07:32] roshanavand: has joined #ruby
[15:11:41] tristanp: has joined #ruby
[15:11:55] x77686d: has joined #ruby
[15:12:20] eregi: has joined #ruby
[15:16:19] brandthdl: has joined #ruby
[15:17:39] duckpuppy: has joined #ruby
[15:18:02] brandthdl: Any rails developers available on per hour basis? Please pm me
[15:18:11] rht: has joined #ruby
[15:19:10] crowell: has joined #ruby
[15:20:01] rmulligan: has joined #ruby
[15:22:29] rdark: has joined #ruby
[15:23:24] iooner: has joined #ruby
[15:24:37] aryaching: has joined #ruby
[15:25:35] iooner: has joined #ruby
[15:27:05] adgtl: has joined #ruby
[15:27:05] adgtl: has joined #ruby
[15:29:04] stardiviner: has joined #ruby
[15:29:33] vikas027: has joined #ruby
[15:29:38] vikas027: has left #ruby: ()
[15:35:39] pawnbox: has joined #ruby
[15:35:39] karapetyan: has joined #ruby
[15:37:31] blackmesa: has joined #ruby
[15:37:48] karapetyan: has joined #ruby
[15:38:07] uglybandersnatch: has joined #ruby
[15:39:29] aryaching: has joined #ruby
[15:40:30] Limix: has joined #ruby
[15:40:32] Guest2908: has joined #ruby
[15:41:29] karapetyan: has joined #ruby
[15:41:34] sandstrom: has joined #ruby
[15:42:13] wtrocki: has joined #ruby
[15:44:25] safe: has joined #ruby
[15:45:36] UtkarshRay: has joined #ruby
[15:48:26] text1: has joined #ruby
[15:51:05] flughafen_: has joined #ruby
[15:52:48] s00pcan: has joined #ruby
[15:53:42] j0bk: has joined #ruby
[15:54:58] duderono_: has joined #ruby
[15:56:51] Graphettion: has joined #ruby
[15:57:55] mdw: has joined #ruby
[15:59:22] ljames: has joined #ruby
[16:00:15] adgtl: has joined #ruby
[16:01:18] nfk: has joined #ruby
[16:02:50] Macaveli: has joined #ruby
[16:03:04] Canar: has joined #ruby
[16:06:49] howdoi: has joined #ruby
[16:06:52] adgtl: has joined #ruby
[16:07:44] mattwildig: has joined #ruby
[16:10:06] cyclonis: has joined #ruby
[16:10:33] araujo_: has joined #ruby
[16:10:34] _kfpratt: has joined #ruby
[16:12:30] infernix: has joined #ruby
[16:13:05] eregi: has joined #ruby
[16:14:06] rmulligan: has joined #ruby
[16:15:02] Azure: has joined #ruby
[16:15:22] gaxar77: has joined #ruby
[16:15:47] gaxar77: Is there a good ebook for free on the lastest version of Ruby?
[16:16:15] Rodya_: has joined #ruby
[16:16:21] Scripore: has joined #ruby
[16:22:03] B1n4r10: has joined #ruby
[16:23:28] aryaching: has joined #ruby
[16:23:43] adgtl: has joined #ruby
[16:26:32] mattwildig: has joined #ruby
[16:27:11] skade: has joined #ruby
[16:27:19] baweaver: has joined #ruby
[16:30:10] Channel6: has joined #ruby
[16:31:23] aryaching_: has joined #ruby
[16:32:36] adgtl: has joined #ruby
[16:32:36] adgtl: has joined #ruby
[16:33:48] jeanlinux: has joined #ruby
[16:34:37] houhoulis: has joined #ruby
[16:36:36] roshanavand: has joined #ruby
[16:38:04] sesquipedalian: has joined #ruby
[16:39:18] blackmesa: has joined #ruby
[16:39:38] nando293921: has joined #ruby
[16:40:27] mattwildig: has joined #ruby
[16:41:07] karapetyan: has joined #ruby
[16:43:05] y2mq37: has joined #ruby
[16:43:53] sepp2k: has joined #ruby
[16:45:16] sudoubuntu: has joined #ruby
[16:49:44] nando293921: has joined #ruby
[16:52:23] arup_r: has joined #ruby
[16:53:24] sudoubuntu: has joined #ruby
[16:53:54] Guest34101: has joined #ruby
[16:54:45] flughafen_: nothing like [1,2,3,4].delete_at that returns the deleted element?
[16:58:09] cyclonis: has joined #ruby
[17:01:09] Scripore: has joined #ruby
[17:01:22] nando293921: has joined #ruby
[17:02:22] aryaching: has joined #ruby
[17:02:46] Macaveli: has joined #ruby
[17:03:24] duckpuppy: has joined #ruby
[17:03:26] CaGlint: has joined #ruby
[17:04:26] dgncn: has joined #ruby
[17:05:10] elifoster: has joined #ruby
[17:05:25] tlaxkit: has joined #ruby
[17:05:35] dravine: has joined #ruby
[17:07:37] fedexo: has joined #ruby
[17:08:05] adgtl: has joined #ruby
[17:08:14] the_drow: has joined #ruby
[17:08:16] rmulligan: has joined #ruby
[17:09:39] sudoubuntu: has joined #ruby
[17:13:16] intrigueD: has joined #ruby
[17:13:51] eregi: has joined #ruby
[17:17:24] The_Phoenix: has joined #ruby
[17:19:09] Jackneill: has joined #ruby
[17:20:31] stannard: has joined #ruby
[17:20:36] gaxar77: has joined #ruby
[17:21:15] Hanmac: has joined #ruby
[17:22:07] FernandoBasso: has joined #ruby
[17:22:15] ramfjord: has joined #ruby
[17:22:45] KensoDev: has joined #ruby
[17:23:08] Rodya_: has joined #ruby
[17:24:42] SCHAAP137: has joined #ruby
[17:25:40] Papierkorb: Is there something like Array#unzip ? Like the reverse operation of Array#zip: [ [1,2], [3,4] ].unzip #=> [ [1,3], [2,4] ]
[17:25:42] JohnBat26: has joined #ruby
[17:26:12] sucks: has joined #ruby
[17:26:17] adaedra: Papierkorb: transpose?
[17:26:38] Papierkorb: adaedra: neat, thanks
[17:27:12] siaW: has joined #ruby
[17:28:25] ruby[bot]: -b *!*@85-76-140-22-nat.elisa-mobile.fi$#ruby-banned
[17:30:24] adac: has joined #ruby
[17:33:53] T7rees: has joined #ruby
[17:36:38] j`ey: has joined #ruby
[17:41:02] blackmesa: has joined #ruby
[17:42:51] diegoviola: has joined #ruby
[17:43:56] j`ey: has left #ruby: ()
[17:44:02] KnownSyntax: has joined #ruby
[17:44:05] KnownSyntax: has joined #ruby
[17:46:18] despai: has joined #ruby
[17:48:34] benlieb: has joined #ruby
[17:49:11] nando293921: has joined #ruby
[17:49:53] freerobby: has joined #ruby
[17:55:04] colegatron: has joined #ruby
[17:58:36] cdg: has joined #ruby
[17:58:41] pwned: has left #ruby: ()
[17:59:04] dionysus69: has joined #ruby
[18:00:01] cdg: has joined #ruby
[18:02:16] KnownSyntax: has joined #ruby
[18:02:18] KnownSyntax: has joined #ruby
[18:02:21] rmulligan: has joined #ruby
[18:04:35] shevy: adaedra knows more than `derpy
[18:09:33] A5101: has joined #ruby
[18:11:31] adac: has joined #ruby
[18:11:32] Macaveli: has joined #ruby
[18:13:16] marr: has joined #ruby
[18:13:19] eregi: has joined #ruby
[18:15:35] adgtl: has joined #ruby
[18:15:35] adgtl: has joined #ruby
[18:16:20] f00dMonsta: has joined #ruby
[18:19:04] disconnected: has joined #ruby
[18:19:19] disconnected: hey, question about sinatra framework
[18:19:30] disconnected: having "get '/:url' do url=params[:url]"
[18:19:37] disconnected: what does :url mean in params[...] ?
[18:19:43] disconnected: is this the same as 'url' ?
[18:21:26] moeabdol1: has joined #ruby
[18:21:32] shanemcd: has joined #ruby
[18:21:48] apeiros: >> :url.class
[18:21:50] ruby[bot]: apeiros: # => Symbol (https://eval.in/531106)
[18:22:11] apeiros: it's a Symbol literal. like "url" is a String literal, or 12 is an Integer literal
[18:22:59] symm-: has joined #ruby
[18:28:34] shanemcd_: has joined #ruby
[18:30:54] joonty: has joined #ruby
[18:33:18] ziyadb: has joined #ruby
[18:34:11] duckpuppy: has joined #ruby
[18:35:17] dgncn: has joined #ruby
[18:36:07] Ishido: has joined #ruby
[18:36:55] jeanlinux: has joined #ruby
[18:37:52] Guest2908: has joined #ruby
[18:38:41] mattwildig: has joined #ruby
[18:43:34] blackmesa: has joined #ruby
[18:46:46] sucks: has joined #ruby
[18:55:32] wtrocki: has joined #ruby
[18:56:31] rmulligan: has joined #ruby
[18:56:57] codecop: has joined #ruby
[18:58:28] araujo_: has joined #ruby
[18:59:45] nogic: has joined #ruby
[19:00:25] nogic: has joined #ruby
[19:00:31] araujo_: has joined #ruby
[19:02:38] araujo_: has joined #ruby
[19:03:16] blackmesa: has joined #ruby
[19:09:45] vdamewood: has joined #ruby
[19:10:20] stannard: has joined #ruby
[19:12:54] gaxar77: has joined #ruby
[19:14:12] polyidus: has joined #ruby
[19:18:08] mdw: has joined #ruby
[19:23:24] last_staff: has joined #ruby
[19:24:37] junior2: has joined #ruby
[19:31:44] nogic: has joined #ruby
[19:35:05] baweaver: has joined #ruby
[19:38:09] jeanlinux: has joined #ruby
[19:38:41] symm-: has joined #ruby
[19:39:16] Outlastsheep: has joined #ruby
[19:39:58] uglybandersnatch: has joined #ruby
[19:40:55] blackgoat: has joined #ruby
[19:42:55] alexherbo2: has joined #ruby
[19:43:37] benlieb: has joined #ruby
[19:44:58] mwlang: has joined #ruby
[19:45:02] siaW: has joined #ruby
[19:46:31] blackmesa: has joined #ruby
[19:49:58] UserInneed: has joined #ruby
[19:50:36] rmulligan: has joined #ruby
[19:50:41] sucks: has joined #ruby
[19:52:27] wildlander: has joined #ruby
[19:53:11] wildlander: has joined #ruby
[19:53:35] eregi: has joined #ruby
[19:53:40] cdg_: has joined #ruby
[19:53:48] wildlander: has joined #ruby
[19:56:41] Don_John: has joined #ruby
[20:00:18] fullofcaffeine: has joined #ruby
[20:00:42] kldskp: has joined #ruby
[20:01:01] nogic: has joined #ruby
[20:03:57] LoneHerm_: has joined #ruby
[20:05:42] LoneHerm_: has joined #ruby
[20:06:30] eregi: has joined #ruby
[20:12:09] nennes: has joined #ruby
[20:12:43] roshanavand: has joined #ruby
[20:12:59] fullofcaffeine: has joined #ruby
[20:13:01] malcolmva: has joined #ruby
[20:16:57] idletask: Making progress on the plugin!
[20:17:14] djbkd: has joined #ruby
[20:18:46] shevy: what plugin
[20:19:22] idletask: shevy: I'm developing a SonarQube plugin for Ruby
[20:20:05] Cohedrin: has joined #ruby
[20:22:45] mdw: has joined #ruby
[20:22:51] mattwildig: has joined #ruby
[20:25:47] wennefer: has joined #ruby
[20:25:50] RegulationD: has joined #ruby
[20:27:40] roshanavand: has joined #ruby
[20:27:45] chipotle: has joined #ruby
[20:29:12] kcp: has joined #ruby
[20:34:22] garethrees: has joined #ruby
[20:34:56] duckpuppy: has joined #ruby
[20:36:46] ericn81: has joined #ruby
[20:37:10] mdw: has joined #ruby
[20:37:54] mdw: has joined #ruby
[20:37:57] wtrocki: has joined #ruby
[20:41:11] kspencer: from what i see, rspec is only for I/O, what would you use to rake test a gui based application o_O
[20:43:01] pawnbox: has joined #ruby
[20:43:53] moeabdol1: has joined #ruby
[20:44:46] rmulligan: has joined #ruby
[20:45:55] ivanskie_: has joined #ruby
[20:47:14] vim_shim: has joined #ruby
[20:47:57] BtcBen: has joined #ruby
[20:48:30] ur5us: has joined #ruby
[20:48:48] devbug: has joined #ruby
[20:48:59] hogetaro_: has joined #ruby
[20:53:01] camilasan: has joined #ruby
[20:53:34] Seich: has joined #ruby
[20:53:53] jhass: I don't see why it wouldn't work for a GUI application
[20:56:29] yxhuvvd: What kind of GUI application? There is stuff like capybara for web GUIs. It shouldn't be impossible to build something similar for desktop GUIs, though I don't know if anyone has done it.
[20:57:45] ramfjord: has joined #ruby
[21:02:14] kspencer: yxhuvvd: a ircd configuration file generator
[21:03:55] gaxar77: has joined #ruby
[21:09:17] kspencer: gonna try and use this
[21:09:20] kspencer: http://code.tutsplus.com/tutorials/testing-your-ruby-code-with-guard-rspec-pry--cms-19974
[21:11:37] skade: has joined #ruby
[21:14:06] genpaku: has joined #ruby
[21:15:06] nando293921: has joined #ruby
[21:15:11] Hanmac: i tryed to write some specs for my GUI binding too, but i did only for the non-GUI parts
[21:15:54] cdg: has joined #ruby
[21:16:40] kspencer: well technically the only non-gui parts that I can think of would be the templating use, and the command line arguments
[21:17:03] morf: has joined #ruby
[21:17:47] morf: Hello, If I have 2 blocks, how does yield know which one to call?
[21:18:28] Coldblackice: has joined #ruby
[21:18:45] mdw: has joined #ruby
[21:19:10] kspencer: Mor_: I usually would use yield(:w/e) to load a specific one
[21:19:38] kspencer: if you're talking using ruby for web
[21:19:42] Ox0dea: Mor_: You can't have two blocks.
[21:21:34] morf: kspencer: what is (:w/e)?
[21:21:57] kspencer: with what I was talking about, it was a template
[21:23:07] morf: Ox0dea: 1 block per program?
[21:23:24] Ox0dea: Mor_: No, but certainly one block per method.
[21:23:53] Ox0dea: You can have any number of Procs, of course, but then there's no ambiguity.
[21:24:50] Moosashi: has joined #ruby
[21:25:34] morf: Ox0dea: is the block name must share the same name with the method he called by?
[21:25:53] Ox0dea: Mor_: Blocks don't have names.
[21:26:35] RegulationD: has joined #ruby
[21:26:46] Ox0dea: >> def foo &block; block.class; end; foo { bar }
[21:26:47] ruby[bot]: Ox0dea: # => Proc (https://eval.in/531164)
[21:29:04] ready: has joined #ruby
[21:29:10] Jardayn: has joined #ruby
[21:29:47] vF3hNGxc47h8: has joined #ruby
[21:31:20] Gasher: has joined #ruby
[21:31:46] Scripore: has joined #ruby
[21:32:44] zotherstupidguy: has joined #ruby
[21:35:02] soLucien: has joined #ruby
[21:35:18] jmdade: has joined #ruby
[21:35:33] justbleed: has joined #ruby
[21:36:54] LoneHerm_: has joined #ruby
[21:37:12] poguez_: has joined #ruby
[21:38:13] ur5us: has joined #ruby
[21:38:56] rmulligan: has joined #ruby
[21:39:05] soLucien: i'm trying to use String interpolation in the following scenario : http://pastebin.com/ny8Gc3Ba How should i do it , it seems quite tricky
[21:39:06] ruby[bot]: soLucien: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/43748cfc0a8642295d32
[21:39:08] ruby[bot]: soLucien: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[21:39:16] jeanlinux: has joined #ruby
[21:40:31] soLucien: no i've tried ' , " and \' as well as \" for the #{ENV['HYPERV_NETWORK_MODULE']}
[21:40:38] soLucien: nothing seemed to work
[21:41:13] soLucien: of course, i can just get back to what i had before, string repetition allover the place
[21:41:33] soLucien: but i am sure there is a way to do it
[21:44:26] arlek: has joined #ruby
[21:45:07] eregi: has joined #ruby
[21:45:21] tftp: has joined #ruby
[21:45:55] polyidus: has joined #ruby
[21:46:25] hahuang65: has joined #ruby
[21:53:32] sdothum: has joined #ruby
[21:53:51] Es0teric: has joined #ruby
[21:56:09] DmitryBochkarev: has joined #ruby
[21:58:53] sp4rrow: has joined #ruby
[22:01:23] tristanp: has joined #ruby
[22:01:54] dionysus69: has joined #ruby
[22:02:54] nogic: has joined #ruby
[22:03:38] sluukkonen: has joined #ruby
[22:03:59] platzhirsch: has joined #ruby
[22:04:59] platzhirsch: has left #ruby: ()
[22:07:25] fullofcaffeine: has joined #ruby
[22:08:58] jeanlinux: has joined #ruby
[22:13:23] spuk: has joined #ruby
[22:13:31] intrigueD: has joined #ruby
[22:16:25] thevaliantx: has joined #ruby
[22:16:26] hangelo: has joined #ruby
[22:16:40] nogic: has joined #ruby
[22:17:26] thevaliantx: Anyone got suggestions as to what I can do with the older (black colored) The Well Grounded Rubyist book? The post office just delivered it to me today, about a month late. I had already received the red book that I ordered about a week ago.
[22:17:44] thevaliantx: Would the black book still be of good use since it covers 1.9?
[22:20:42] jeanlinux: has joined #ruby
[22:22:20] toretore: has joined #ruby
[22:33:01] rmulligan: has joined #ruby
[22:34:06] Dimik: has joined #ruby
[22:34:16] jhass: >> ['#{1+1}', "#{1+1}", %q(#{1+1}), %Q(#{1+1})] # soLucien
[22:34:17] ruby[bot]: jhass: # => ["\#{1+1}", "2", "\#{1+1}", "2"] (https://eval.in/531171)
[22:34:34] swills: has joined #ruby
[22:34:56] soLucien: jhass i solved it by assigning the strings to variabels first
[22:35:39] soLucien: command = "something here #{env stuff}" ; run command ; `command`
[22:35:41] duckpuppy: has joined #ruby
[22:35:41] jhass: doubt that was the significant change
[22:36:04] jhass: yep, you changed the quotes in the process
[22:36:06] soLucien: well i was not having 3 layers of quotes anymore
[22:36:24] cout: has joined #ruby
[22:36:24] jhass: you never had
[22:36:26] soLucien: i was managing 3 only , which worked
[22:36:47] DarkBushido: has joined #ruby
[22:37:11] Apocalypse: has joined #ruby
[22:37:20] soLucien: i did `powershell.exe "powershell command #{array['key']} "`
[22:37:39] soLucien: the 'key' was always being written instead of replaced
[22:38:31] jhass: unlikely, I doubt you're showing what you really had there
[22:39:01] spider-mario: has joined #ruby
[22:39:02] soLucien: but yes, i guess using the %(#{sadas}) would do the trick
[22:39:04] AustinMatherne: has joined #ruby
[22:39:15] soLucien: but i already committed that part, i'm on something else now :D
[22:39:36] arlek: has joined #ruby
[22:39:42] bradland: has joined #ruby
[22:39:44] epochwolf: has joined #ruby
[22:39:46] soLucien: thanks for the advice, jhass
[22:39:50] angelixd: has joined #ruby
[22:40:13] cschneid: has joined #ruby
[22:40:22] rideh: has joined #ruby
[22:40:27] demophoon: has joined #ruby
[22:40:41] hostess: has joined #ruby
[22:41:48] Kamilion: has joined #ruby
[22:42:34] zenlot: has joined #ruby
[22:43:02] sneakerhax: has joined #ruby
[22:43:05] kristianpaul: has joined #ruby
[22:43:36] GGMethos: has joined #ruby
[22:43:36] baweaver: has joined #ruby
[22:45:40] crowell: has joined #ruby
[22:46:15] kristianpaul: is there a way to append a string to a hash index?
[22:46:18] kristianpaul: like a prefix
[22:46:34] kristianpaul: the thing is that i-m using a hash index as index inside another hash
[22:46:41] ytti: strings are mutable, so yes
[22:46:56] kristianpaul: but i-m using symbols
[22:47:03] Ox0dea: >> {'foo' => 42}.keys[0].frozen? # ytti
[22:47:04] ivanskie_: has joined #ruby
[22:47:09] ruby[bot]: Ox0dea: # => true (https://eval.in/531175)
[22:47:14] ytti: then not
[22:47:18] ytti: symbols are not mutable
[22:47:24] ruby[bot]: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[22:47:39] ytti: Ox0dea, can you unfreeze it?
[22:47:46] Ox0dea: ytti: Well, sure, but that's ill-advised.
[22:47:59] kristianpaul: i just dint wanted to copy symbol as string concat and try again
[22:48:20] jhass: I don't follow
[22:48:53] ytti: Ox0dea, sure, whole notion of changing hash keys is ill-advised :)
[22:49:36] Ox0dea: ytti: It is, but #rehash does exist for such occasions.
[22:51:16] Ox0dea: https://eval.in/531176
[22:55:57] ereslibre: has joined #ruby
[22:55:57] ereslibre: has joined #ruby
[22:56:17] dc1: has joined #ruby
[22:57:26] gaxar77: has joined #ruby
[22:58:03] Gasher: has joined #ruby
[23:00:27] jottr_: has joined #ruby
[23:00:58] jenrzzz: has joined #ruby
[23:01:59] qubits: has joined #ruby
[23:03:01] chipotle: has joined #ruby
[23:03:54] kristianpaul: has left #ruby: ()
[23:08:07] sandstrom: has joined #ruby
[23:10:13] diegoviola: has joined #ruby
[23:11:20] skade: has joined #ruby
[23:13:40] Gasher^: has joined #ruby
[23:14:46] herminiotorres: has joined #ruby
[23:20:24] deuxclique: has joined #ruby
[23:22:27] youch: has joined #ruby
[23:24:48] jeanlinux: has joined #ruby
[23:26:31] shadoi: has joined #ruby
[23:27:11] ereslibre: has joined #ruby
[23:27:11] rmulligan: has joined #ruby
[23:28:48] eregi: has joined #ruby
[23:29:54] cjbottaro: has joined #ruby
[23:32:35] RegulationD: has joined #ruby
[23:33:08] skade: has joined #ruby
[23:34:44] deuxclique: has joined #ruby
[23:36:14] diegoviola: has joined #ruby
[23:41:45] uglybandersnatch: has joined #ruby
[23:46:11] kam270: has joined #ruby
[23:48:53] lubekpl: has joined #ruby
[23:50:42] karapetyan: has joined #ruby
[23:50:47] inennes: has joined #ruby
[23:51:41] Sid05: has joined #ruby
[23:52:34] jenrzzz: has joined #ruby
[23:53:25] OReilly: has joined #ruby
[23:53:30] bond___: has joined #ruby
[23:53:37] bond___: https://bitly.com/1QTt6hL
[23:53:38] bond___: https://bitly.com/1QTt6hL
[23:53:39] bond___: https://bitly.com/1QTt6hL
[23:53:39] bond___: https://bitly.com/1QTt6hL
[23:53:40] bond___: https://bitly.com/1QTt6hL
[23:53:41] bond___: https://bitly.com/1QTt6hL
[23:53:41] bond___: https://bitly.com/1QTt6hL
[23:53:42] bond___: https://bitly.com/1QTt6hL
[23:53:43] bond___: https://bitly.com/1QTt6hL
[23:53:43] bond___: https://bitly.com/1QTt6hL
[23:53:44] bond___: https://bitly.com/1QTt6hL
[23:53:45] bond___: https://bitly.com/1QTt6hL
[23:53:48] bond___: https://bitly.com/1QTt6hL
[23:53:48] bond___: https://bitly.com/1QTt6hL
[23:53:49] bond___: https://bitly.com/1QTt6hL
[23:53:50] bond___: https://bitly.com/1QTt6hL
[23:53:50] bond___: https://bitly.com/1QTt6hL
[23:53:51] bond___: https://bitly.com/1QTt6hL
[23:53:51] bond___: https://bitly.com/1QTt6hL
[23:53:52] bond___: https://bitly.com/1QTt6hL
[23:53:53] bond___: https://bitly.com/1QTt6hL
[23:53:53] bond___: https://bitly.com/1QTt6hL
[23:53:54] bond___: https://bitly.com/1QTt6hLhttps://bitly.com/1QTt6hL
[23:53:55] bond___: https://bitly.com/1QTt6hL
[23:53:55] bond___: https://bitly.com/1QTt6hL
[23:53:56] bond___: https://bitly.com/1QTt6hL
[23:53:56] bond___: https://bitly.com/1QTt6hL
[23:53:57] bond___: https://bitly.com/1QTt6hL
[23:53:58] bond___: https://bitly.com/1QTt6hL
[23:56:47] OReilly: has joined #ruby
[23:58:47] solocshaw: has joined #ruby