withnale_

Activity Graph

Page 1 of 1

2015-08-10

[09:06:39] withnale_: has joined #ruby
[10:21:46] withnale_: Ping timeout: 260 seconds
[10:22:24] withnale_: has joined #ruby
[14:29:11] withnale_: Ping timeout: 240 seconds

2015-08-07

[09:35:26] withnale_: has joined #ruby
[15:53:42] withnale_: Ping timeout: 256 seconds

2015-07-31

[11:50:45] withnale_: has joined #ruby
[14:02:45] withnale_: Ping timeout: 244 seconds

2015-07-30

[09:33:19] withnale_: has joined #ruby
[16:34:01] withnale_: Ping timeout: 264 seconds

2015-07-29

[09:14:45] withnale_: has joined #ruby
[17:48:25] withnale_: Ping timeout: 264 seconds

2015-07-15

[09:18:05] withnale_: has joined #ruby
[17:05:42] withnale_: Ping timeout: 256 seconds

2015-07-13

[09:44:01] withnale_: has joined #ruby
[16:31:56] withnale_: Ping timeout: 244 seconds

2015-07-08

[13:17:12] withnale_: has joined #ruby
[17:53:26] withnale_: Ping timeout: 256 seconds

2015-07-07

[08:37:12] withnale_: has joined #ruby
[18:31:38] withnale_: Ping timeout: 264 seconds

2015-07-06

[11:34:16] withnale_: has joined #ruby
[17:16:00] withnale_: Ping timeout: 264 seconds

2015-07-02

[14:15:22] withnale_: has joined #ruby
[16:57:49] withnale_: Ping timeout: 276 seconds

2015-07-01

[09:47:59] withnale_: has joined #ruby
[17:46:59] withnale_: Ping timeout: 250 seconds

2015-06-30

[08:35:48] withnale_: has joined #ruby
[14:27:31] withnale_: Ping timeout: 276 seconds

2015-06-29

[08:36:18] withnale_: has joined #ruby
[16:19:27] withnale_: Ping timeout: 246 seconds

2015-06-26

[08:34:17] withnale_: has joined #ruby
[10:33:39] withnale_: Ping timeout: 256 seconds

2015-06-25

[09:12:17] withnale_: has joined #ruby
[16:04:27] withnale_: Ping timeout: 246 seconds

2015-06-24

[09:02:04] withnale_: has joined #ruby
[10:41:17] withnale_: Read error: Connection reset by peer
[11:44:09] withnale_: has joined #ruby
[17:46:18] withnale_: Ping timeout: 264 seconds

2015-06-23

[07:42:50] withnale_: has joined #ruby
[16:33:58] withnale_: Ping timeout: 244 seconds

2015-06-22

[08:23:50] withnale_: has joined #ruby
[16:56:22] withnale_: Ping timeout: 272 seconds

2015-06-19

[08:45:37] withnale_: has joined #ruby
[14:58:42] withnale_: Quit: Be back later ...

2015-06-18

[09:06:00] withnale_: has joined #ruby
[16:08:02] withnale_: Quit: Be back later ...

2015-06-12

[11:50:58] withnale_: has joined #ruby
[11:55:45] withnale_: Ping timeout: 265 seconds
[13:30:16] withnale_: has joined #ruby
[13:31:05] withnale_: Remote host closed the connection
[13:31:55] withnale_: has joined #ruby
[13:32:45] withnale_: Remote host closed the connection
[13:33:36] withnale_: has joined #ruby
[13:34:23] withnale_: Remote host closed the connection
[13:35:11] withnale_: has joined #ruby
[13:36:02] withnale_: Remote host closed the connection
[13:36:52] withnale_: has joined #ruby
[13:37:41] withnale_: Remote host closed the connection
[13:38:29] withnale_: has joined #ruby
[13:39:19] withnale_: Remote host closed the connection
[13:40:28] withnale_: has joined #ruby
[13:40:59] withnale_: Remote host closed the connection
[13:42:10] withnale_: has joined #ruby
[13:42:37] withnale_: Remote host closed the connection

2015-06-11

[13:22:09] withnale_: has joined #ruby
[16:18:24] withnale_: Ping timeout: 256 seconds

2015-06-10

[09:42:41] withnale_: has joined #ruby
[18:23:49] withnale_: Ping timeout: 264 seconds

2015-06-09

[09:23:30] withnale_: has joined #ruby
[16:54:03] withnale_: Quit: Be back later ...

2015-06-05

[08:23:58] withnale_: has joined #ruby
[15:22:29] withnale_: Ping timeout: 256 seconds

2015-06-04

[13:03:26] withnale_: has joined #ruby
[16:33:59] withnale_: Ping timeout: 256 seconds

2015-06-03

[16:13:00] withnale_: has joined #ruby
[17:59:30] withnale_: Ping timeout: 276 seconds

2015-06-02

[10:15:33] withnale_: has joined #ruby
[17:55:57] withnale_: Ping timeout: 265 seconds

2015-06-01

[12:25:26] withnale_: has joined #ruby
[16:35:42] withnale_: Ping timeout: 272 seconds

2015-05-29

[10:52:32] withnale_: has joined #ruby
[16:21:56] withnale_: Ping timeout: 272 seconds

2015-05-28

[09:44:50] withnale_: has joined #ruby
[17:22:24] withnale_: Ping timeout: 272 seconds

2015-05-27

[08:40:26] withnale_: has joined #ruby
[17:28:01] withnale_: Ping timeout: 264 seconds

2015-05-26

[08:37:00] withnale_: has joined #ruby
[17:22:20] withnale_: Ping timeout: 256 seconds

2015-05-22

[09:43:48] withnale_: has joined #ruby
[12:25:39] withnale_: Ping timeout: 245 seconds

2015-05-21

[15:34:00] withnale_: has joined #ruby
[16:20:50] withnale_: Ping timeout: 272 seconds

2015-04-15

[16:29:45] withnale_: Not thinking well today... Is there a ruby one liner that given %w(1 2 3 4) will return [[1], [1,2], [1,2,3], [1,2,3,4]] ?
[16:31:34] withnale_: yes. the various ordered options starting from the head. Like doing dirname on a path iteratively til you get to the root.

2015-03-20

[11:56:12] withnale_: Is it possible to use Enumerable when your class is effectively wrapping a hash? How would you define each in that case?

2015-03-19

[11:09:11] withnale_: Does anyone know of something like jeweller or 'bundle gem' but using your own template?
[11:09:47] withnale_: a less low rent solution :)

2015-02-26

[22:29:30] withnale_: Hello. Silly question. Can someone tell me what the '->' operator does?
[22:30:25] withnale_: Found it. thanks
[22:39:52] withnale_: How would I convert the following to new syntax rspec using expect?
[22:40:22] withnale_: -> { @data.global}.should raise_error SystemExit
[22:41:02] withnale_: I thought it would be expect {-> { @data.global}}.to raise_error SystemExit
[22:43:21] withnale_: The next line would be ...
[22:44:02] withnale_: ARGV.push('start') -> { @data.global}.should raise_error SystemExit
[22:44:50] withnale_: to be honest, I'm gonna drop this and wire in Aruba so I guess I should quit with this. These tests are just messy

2015-02-23

[17:23:35] withnale_: Is there a way to load a class but avoid running the at_exit function enclosed within it, without changing that class?
[17:37:38] withnale_: It's ok. Found a way around it now. It wasn't the root cause of my problem

2015-02-19

[10:24:02] withnale_: Anyone got a one liner that checks whether a directory is a subdirectory of a given base directory?
[10:25:47] withnale_: No to symlinks - I could use expandpath to deal with those but I don't think it's required.
[10:26:23] withnale_: I was thinking of using Pathname.relative_path_from, and seeing whether the first item in path is .., but that seems a bit unwieldy
[10:27:05] withnale_: Maybe children.include?
[10:28:47] withnale_: I'm getting Dir.pwd and I want to know if I am below BASE='/var/tmp' or whatever.
[10:29:35] withnale_: I'm thinking Pathname.new(BASE).children.include? Dir.pwd - is there a cleaner way?
[10:30:56] withnale_: I was kinda trying to avoid direct string comparisions, altho I guess if I wrapped them with expand_path it would be fine.
[10:56:11] withnale_: gregf_: yeah. Just trying to make the most readable form. Always the way in ruby - lots of different ways to skin it.
[11:39:06] withnale_: how about something like this...
[11:39:17] withnale_: "=\n \n".gsub(/([\=]?)\n/) { |x| x[0] == '=' ? '' : ' ' }
[11:41:26] withnale_: ineb: shrug - just wanted to solve it using gsub

2015-02-16

[10:06:27] withnale_: Is there a way to get the name of the class of the current method? When subclassing, object.class gives you the name of base class, but if I run a method in the superclass, I want to know the superclass name programatically...
[10:07:50] withnale_: I need to merge some class objects from the superclass into the subclass.
[10:08:49] withnale_: There are some objects assocaited with @options in the superclass.
[10:09:20] withnale_: i.e. associated with the class not the instance.
[10:09:56] withnale_: I'm using someone elses framework so I don't want to change the underlying methods that access/work with it
[10:11:04] withnale_: At the moment in the superclass initialiser I am doing self.class.options = MySuperClass.options.merge(self.class.options)
[10:11:32] withnale_: I'd prefer not to have to specify MySuperClass by name.
[10:13:59] withnale_: but that's not quite the same. If there was another level of subclassing in between, it would use that. Is there no way to get the classname of the current method?
[10:20:22] withnale_: As I said, I'm using an existing framework, which is why I'm describing the 'tiny' problem I'm trying to solve. The superclass I mentioned inherits from another class, which itself includes mixins - which are both generated elsewhere. Hence the desire to have a one liner fix in the initialiser rather than reimplement all the associated methods.
[10:21:23] withnale_: Personally, I think I've described it pretty well. No worries. I can live with the workaround. Just thought there would be an easy method call that gave me the name of the actual class the methods was in rather than the base class.
[10:34:48] withnale_: arup_r - think so. checking

2015-02-04

[09:50:18] withnale_: Hello. If I have some 'attribute' style class methods called in my class to setup some data structures. However, if I subclass the object, these methods don't get called. Is there a way of achieving this...?
[09:58:29] withnale_: It's actually for sensu plugins. An exampel is here... https://github.com/sensu/sensu-community-plugins/blob/master/plugins/graphite/check-data.rb
[09:58:56] withnale_: I'm writing a lot of checks which has a lot of duplication.
[09:59:27] withnale_: So I thought I could write one master one with most of the 'option' sections in and then subclass it with just the methods relating specifically to that check
[09:59:55] withnale_: The option is just managing a hash called @options

2015-01-14

[17:06:57] withnale_: Silly question.
[17:07:17] withnale_: (1..5).map {|x| something(x) }
[17:07:32] withnale_: what is the something that will give me %w(a b c d e) ?
[17:11:35] withnale_: Ah. I ended up using (96+x).chr