nchambers

Activity Graph

Page 1 of 3 | Next »

2018-11-14

[00:31:15] nchambers: has joined #ruby-offtopic
[00:31:15] nchambers: has joined #ruby
[07:55:04] nchambers: Quit: WeeChat 2.2

2018-11-13

[02:44:20] nchambers: has joined #ruby
[03:54:38] nchambers: Ping timeout: 268 seconds
[03:55:51] nchambers: has joined #ruby
[05:38:06] nchambers: Quit: WeeChat 2.2
[15:26:33] nchambers: has joined #ruby
[19:17:52] nchambers: has joined #ruby-offtopic
[20:15:43] nchambers: i've packaged applications as gems before
[20:15:58] nchambers: ruby-gems actually has a guide for specifically that
[23:23:59] nchambers: Quit: WeeChat 2.2

2018-11-12

[04:42:36] nchambers: has joined #ruby
[07:03:42] nchambers: Ping timeout: 272 seconds
[07:04:37] nchambers: has joined #ruby
[07:41:43] nchambers: Ping timeout: 244 seconds
[07:43:18] nchambers: has joined #ruby
[07:52:45] nchambers: Ping timeout: 268 seconds
[07:53:37] nchambers: has joined #ruby
[08:04:27] nchambers: Ping timeout: 240 seconds
[08:05:46] nchambers: has joined #ruby
[09:06:47] nchambers: Ping timeout: 240 seconds
[09:08:12] nchambers: has joined #ruby
[09:16:37] nchambers: Ping timeout: 268 seconds
[09:19:51] nchambers: has joined #ruby
[09:29:47] nchambers: Ping timeout: 240 seconds
[09:31:20] nchambers: has joined #ruby
[09:49:16] nchambers: Ping timeout: 264 seconds
[09:50:05] nchambers: has joined #ruby
[11:18:50] nchambers: Ping timeout: 252 seconds
[11:20:09] nchambers: has joined #ruby
[11:32:13] nchambers: Ping timeout: 246 seconds
[11:34:23] nchambers: has joined #ruby
[11:53:08] nchambers: Ping timeout: 272 seconds
[11:53:59] nchambers: has joined #ruby
[12:55:27] nchambers: Ping timeout: 240 seconds
[12:56:59] nchambers: has joined #ruby
[13:16:52] nchambers: Ping timeout: 246 seconds
[13:18:09] nchambers: has joined #ruby
[13:34:01] nchambers: Ping timeout: 246 seconds
[13:35:36] nchambers: has joined #ruby
[13:43:20] nchambers: Remote host closed the connection
[13:43:56] nchambers: has joined #ruby
[15:01:44] nchambers: Quit: WeeChat 2.2

2018-11-11

[07:56:43] nchambers: Ping timeout: 245 seconds
[07:57:53] nchambers: has joined #ruby
[08:05:03] nchambers: Ping timeout: 245 seconds
[08:06:14] nchambers: has joined #ruby
[08:31:33] nchambers: Ping timeout: 272 seconds
[08:32:31] nchambers: has joined #ruby
[08:52:52] nchambers: Ping timeout: 252 seconds
[08:54:08] nchambers: has joined #ruby
[09:11:09] nchambers: Ping timeout: 244 seconds
[09:12:40] nchambers: has joined #ruby
[10:34:13] nchambers: Ping timeout: 245 seconds
[10:35:34] nchambers: has joined #ruby
[10:48:27] nchambers: Ping timeout: 240 seconds
[10:50:04] nchambers: has joined #ruby
[11:09:46] nchambers: Ping timeout: 250 seconds
[11:10:56] nchambers: has joined #ruby
[12:12:48] nchambers: Ping timeout: 252 seconds
[12:14:06] nchambers: has joined #ruby
[12:23:07] nchambers: Ping timeout: 240 seconds
[12:24:25] nchambers: has joined #ruby
[12:55:27] nchambers: Ping timeout: 240 seconds
[12:56:52] nchambers: has joined #ruby
[14:15:19] nchambers: Remote host closed the connection
[14:16:19] nchambers: has joined #ruby
[14:27:19] nchambers: Ping timeout: 246 seconds
[14:29:26] nchambers: has joined #ruby
[19:40:19] nchambers: Quit: WeeChat 2.2

2018-11-10

[04:53:23] nchambers: Ping timeout: 244 seconds
[04:55:02] nchambers: has joined #ruby
[15:16:29] nchambers: Ping timeout: 244 seconds
[15:18:02] nchambers: has joined #ruby
[15:59:51] nchambers: Ping timeout: 252 seconds
[16:01:16] nchambers: has joined #ruby
[16:48:48] nchambers: Ping timeout: 268 seconds
[23:38:53] nchambers: has joined #ruby

2018-11-09

[16:52:47] nchambers: Ping timeout: 240 seconds
[16:53:52] nchambers: has joined #ruby
[21:14:20] nchambers: what does [*0..5] do?
[21:14:36] nchambers: oh that makes sense
[21:56:26] nchambers: i would like to go out with a bank
[22:01:06] nchambers: &>> [:HTML, :CSS, :JavaScript, :Python, :Ruby].map(&:to_s)
[22:03:39] nchambers: params.require(:data).require(*mylist)
[22:04:13] nchambers: *mylist gives it symbols
[22:05:30] nchambers: it takes a variable number of symbols right? you could just do something like: fields = [:email, :password]; fields << :name if action_name == "signup"; params.require(*fields)
[22:47:34] nchambers: what does the * operator do?
[22:48:24] nchambers: erm, I meant ? sorry

2018-11-08

2018-11-07

[23:18:47] nchambers: PaulePanter: works fine here

2018-11-06

[19:33:43] nchambers: Quit: WeeChat 2.2
[21:27:40] nchambers: has joined #ruby

2018-11-05

[00:18:15] nchambers: Ping timeout: 244 seconds
[00:33:17] nchambers: has joined #ruby
[00:44:13] nchambers: Ping timeout: 245 seconds
[01:50:50] nchambers: has joined #ruby
[07:38:12] nchambers: Ping timeout: 252 seconds
[08:11:41] nchambers: has joined #ruby
[08:44:48] nchambers: Ping timeout: 250 seconds
[10:41:49] nchambers: has joined #ruby
[11:14:56] nchambers: Ping timeout: 244 seconds
[11:35:09] nchambers: has joined #ruby
[12:08:27] nchambers: Ping timeout: 252 seconds
[13:55:03] nchambers: has joined #ruby
[14:49:57] nchambers: Ping timeout: 252 seconds
[14:50:50] nchambers: has joined #ruby

2018-11-04

[01:25:39] nchambers: can someone tell me why this doesn't work? "42.09" == /^\d+(\.\d+)?$/ # the regex works fine on regex101.com, but in irb that returns false
[01:30:07] nchambers: yeah, just realized, thanks
[01:31:53] nchambers: what is (sub) and \A \z ?
[05:18:12] nchambers: I know I cna store methods in a variable with: foo = method(:bar), but is it possible to store a method stored in a module or class?
[05:26:03] nchambers: al2o3-cr: how do i access them from Class?
[05:29:52] nchambers: ah nmd I see
[09:17:18] nchambers: Ping timeout: 252 seconds
[09:27:20] nchambers: has joined #ruby
[11:21:51] nchambers: Ping timeout: 268 seconds
[12:30:58] nchambers: has joined #ruby
[12:36:43] nchambers: Ping timeout: 246 seconds
[13:15:52] nchambers: has joined #ruby
[14:18:56] nchambers: Ping timeout: 250 seconds
[15:02:39] nchambers: has joined #ruby
[15:08:27] nchambers: Ping timeout: 240 seconds
[15:45:57] nchambers: has joined #ruby
[16:12:47] nchambers: Ping timeout: 240 seconds
[16:47:57] nchambers: has joined #ruby
[17:46:18] nchambers: Ping timeout: 245 seconds
[21:28:04] nchambers: has joined #ruby

2018-11-03

[15:58:10] nchambers: Ping timeout: 244 seconds
[16:31:12] nchambers: has joined #ruby
[17:04:07] nchambers: Ping timeout: 240 seconds
[17:55:33] nchambers: has joined #ruby
[22:48:16] nchambers: is it possible to store an Enumerator in a variable and call it later?
[22:48:42] nchambers: how do I call it?
[22:49:53] nchambers: I mean doing something like `foo = "abcd".each`
[22:50:46] nchambers: and then calling foo, getting the next value from the Enumerator

2018-11-01

[00:49:42] nchambers: Quit: WeeChat 2.2
[01:24:11] nchambers: has joined #ruby
[03:44:18] nchambers: Quit: WeeChat 2.2
[04:28:51] nchambers: has joined #ruby
[05:29:02] nchambers: Ping timeout: 272 seconds
[06:44:27] nchambers: has joined #ruby
[07:17:28] nchambers: Ping timeout: 244 seconds
[08:38:37] nchambers: has joined #ruby
[08:44:30] nchambers: Ping timeout: 250 seconds
[09:18:15] nchambers: has joined #ruby
[09:30:07] nchambers: Ping timeout: 240 seconds
[10:02:25] nchambers: has joined #ruby
[10:35:13] nchambers: Ping timeout: 246 seconds
[10:40:09] nchambers: has joined #ruby
[10:46:42] nchambers: Ping timeout: 252 seconds
[11:41:21] nchambers: has joined #ruby
[12:14:42] nchambers: Ping timeout: 252 seconds
[12:42:54] nchambers: has joined #ruby

2018-10-29

[22:31:00] nchambers: has joined #ruby

2018-10-24

[00:29:21] nchambers: has joined #ruby
[13:40:52] nchambers: Ping timeout: 264 seconds
[14:13:39] nchambers: has joined #ruby
[15:31:47] nchambers: Quit: WeeChat 2.2

2018-10-23

[13:53:42] nchambers: Ping timeout: 252 seconds

2018-10-22

[23:59:17] nchambers: has joined #ruby

2018-10-21

[15:52:25] nchambers: has joined #ruby

2018-07-09

[15:44:45] nchambers: I'm reading the guide for writing ruby gems, and have gotten to a point where it mentions bundler and rake for generating dynamic gemspecs. I'm slightly familiar with both of these tools, but I'm not sure which to use for my project. is there a comparison guide somewhere?
[15:53:28] nchambers: i've got no problems writing a gemspec
[15:53:32] nchambers: thanks though
[15:54:52] nchambers: ok, thanks!
[16:53:19] nchambers: I wrote a class that is working fine, but it opens a file in the initializer. does ruby have a method for classes so that I can close it when the object is destroyed?
[17:03:03] nchambers: alright, thanks guys

2018-03-14

[09:29:30] nchambers: has joined #ruby

2018-02-28

[01:29:04] nchambers: Quit: So long and thanks for all the fish!
[01:29:33] nchambers: has joined #ruby

2018-02-25

[09:34:50] nchambers: *.net *.split
[09:36:31] nchambers: has joined #ruby

2018-02-10

[03:34:48] nchambers: if I have code like this: https://clbin.com/EpZGV, assuming that one of the "item"s caused an exception, is there a way to get the value of the item in the rescue block?

2018-02-08

[02:03:21] nchambers: how can I exclude files from rubocop checking? I've tried having an "Exclude" block like the default configs, but rubocop complains

2018-02-07

[22:52:34] nchambers: i have a bundle of ca certificates written in PEM format to a file. Is there an easy way to turn each of these certificates into an array of OpenSSL::X509::Certificate objects?
[22:56:11] nchambers: im hoping to avoid that, so im keeping it as a backup plan
[23:01:56] nchambers: split it is then

2018-02-06

[00:09:32] nchambers: when writing a commandline app in ruby, is it common to write a unit test for the entry point file in addition to the actual source files?
[00:16:08] nchambers: drocsid: this is my entry point file: https://gitlab.com/ntchambers/cherrybomb/blob/master/bin/cherrybomb its what gem build makes as the entry point
[00:24:14] nchambers: thanks guys
[03:11:11] nchambers: can someone explain the bevahior I'm seeing here? http://ix.io/Fl2 why does the first one return nil, but the second one returns 0?
[03:13:33] nchambers: so if I wanted to test if a given string matched a regex, I would just want (/regex/ =~ str).nil?
[03:15:41] nchambers: nice thanks
[03:16:42] nchambers: so I'm all good
[03:16:49] nchambers: much appreciated, thank you!
[05:40:43] nchambers: does EM::HttpRequest do https at all? or only http?

2018-02-04

[00:30:08] nchambers: so I have this file: https://gitlab.com/ntchambers/cherrybomb/blob/master/lib/cherrybomb/irc.rb#L10-11, but rubocop is telling me these should be instance variables: http://ix.io/Fcn. Why would these need to be instance variables if I just want one "global" instance?
[04:42:02] nchambers: I'm using eventmachine to write an irc bot, and for some reason, its not receiving any data from the server, despite having receive_data defined: https://gitlab.com/ntchambers/cherrybomb/blob/master/lib/cherrybomb/irc.rb#L96-98. Can anyone see why? example of the issue: https://asciinema.org/a/BJf1Ae8JKJrizwRcELMYiNw3v
[05:01:52] nchambers: :| never mind figured it out
[05:01:59] nchambers: didn't have ssl_verify_peer defined

2018-02-03

[18:32:03] nchambers: would anyone be able to explain what "C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high." means? I'm getting it with rubocop and am not familiar with AbcSize or Branch Condition Size
[19:27:33] nchambers: str[1...-1]
[20:33:32] nchambers: https://gitlab.com/ntchambers/cherrybomb/blob/master/lib/cherrybomb/ident.rb#L11-24 can anyone see any way to make this method 1 line smaller? rubocop is saying its 1 line too long
[21:28:55] nchambers: are nested begin/rescue blocks not normal in ruby?
[21:32:03] nchambers: ah nevermind, misunderstood the error
[23:24:35] nchambers: baweaver: is it wrong to use ...? I'm fairly new to ruby so am not up to code on best practices
[23:25:18] nchambers: also, the rubocop thing, I didn't realize you could have a rescue without a begin at the top level of the method (which is why it was complaining)
[23:26:45] nchambers: I can't remember how I picked up ..., but I just use it now out of habit
[23:26:57] nchambers: thats good to know. thanks!
[23:27:44] nchambers: ill probably do that at some point in the neat future

2018-02-02

[14:57:42] nchambers: hoylemd: http://guides.rubygems.org/command-reference/#gem-lock perhaps?
[14:58:15] nchambers: oh no nevermind that looks to be for something else
[15:01:23] nchambers: not that this will be much help, but I think people normally use Gemfile.lock for that
[15:01:29] nchambers: but I don't know much about gem

2018-01-27

[16:35:58] nchambers: do classes have something like #send except for class variables? I'm dynamically loading certain ruby classes, and I want to test if the class has a certain class variable, and if it exists get the value of it

2018-01-25

[19:00:09] nchambers: in a class method, is there any reason why the first arugment can't have a default value?
[19:04:43] nchambers: darix: actually, playing around in irb I figured out the answer to that, but now I have a new question. writing up the example for it now
[19:08:15] nchambers: darix: http://ix.io/EFM my question is how to get bar3 to work
[19:10:42] nchambers: what do you mean?
[19:12:00] nchambers: http://ix.io/EFO looks like one to me
[19:13:53] nchambers: oh sorry, instance method
[19:13:57] nchambers: my question still stands though
[19:32:28] nchambers: darix: great. my question still stands
[19:33:21] nchambers: yep that works
[19:34:08] nchambers: but that still doesn't explain why mine doesnt' work
[19:34:18] nchambers: guacamole: why is that needed
[19:37:58] nchambers: hmm ok... I'll just use another default argument then. thanks guacamole and darix
[19:38:29] nchambers: as in, bar(command, *args, arg1=true) ?
[19:39:35] nchambers: I'd rather keep command before args, so I'll just keep the extra default argument
[19:40:11] nchambers: np. its mostly cosmetic anyways, since command will never not have a value

2018-01-24

[18:25:50] nchambers: apeiros: ah ok
[18:25:52] nchambers: thanks guys
[18:26:10] nchambers: havenwood: oh sorry I thought you were talking about the plugins themselves
[18:26:36] nchambers: apeiros: I considered that as well, and might expose a way to register blocks
[18:26:45] nchambers: thanks guys, I'll go through all of this