#ruby - 10 September 2018
« Back 1 day Forward 1 day »
[02:48:31] baweaver: New article up, enjoy! - https://medium.com/@baweaver/understanding-transducers-in-ruby-209766372c39
[03:43:53] Radar: baweaver: "While we could use even? shorthand here instead" Did you mean (&:even?)
[09:20:07] leitz: If calling myobject.class gives "Parent::Me", is there a way to get the 'Me' class name alone, or just split on the '::'?
[13:25:54] ujjain: I'm trying a docker build and it fails with this error: mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
[13:27:54] ujjain: I'm building on a Mac, although not sure it matters, as fluentd is based on alpine
[14:29:40] Knappe: Is there a good ruby gem to use for an IRC client? I know there is cinch but as I could see this should be used as bot framework
[14:30:09] Knappe: All I need to do is connecting to a channel, send out a message and evaluate the reply
[14:32:10] i90rr: hi everyone, absolute n00b to Ruby here; already did my schoolwork but still undecided which to choose: rvenv, chruby, rvm or bundler (I think bundler is the newer alternative, right?). I'm used to virtualenv for Python (both Bash and Zsh) and NVM for Node. Thanks!
[14:35:53] havenwood: i90rr: chruby is the simplest and RVM does the most, with rbenv somewhere between the two
[14:37:56] i90rr: havenwood hi there - thanks. I'll start with chruby then as it seems the best approach
[14:56:49] elfranne: First time using Ruby, trying to make a plugin. I get an error with Rubocop: Lint/Syntax: unexpected token tNL
[15:15:45] guardian: I have a question about idiomatic ruby. Let's say I want a helper function that returns either :foo or :bar. And I want it to be called target. Should it be target or target? ?
[15:16:48] havenwood: guardian: When the return value is truthy or falsey, not necessarily true and false
[15:17:44] havenwood: elfranne: A few funky things, that _might_ be involved. The shebang has a space before the first slash, which isn't ordinary. That's probably not the issue though.
[15:19:47] guardian: I have another question while I'm at it. Why don't Symbols expose include? or start_with? functions?
[15:22:00] elfranne: @havenwood so i removed the require File , because it is part of the core ruby ?
[15:22:47] havenwood: elfranne: Yes, it's core Ruby so it doesn't need to be required. If it was stdlib, you could require it with: require 'file'
[18:31:30] canurabus: Hi. If I use 'return' within a 'rescue' will the surrounding function return without continuing on? ie "begin; foo; rescue; return; bar". 'bar' will not be called in this instance right?
[18:51:11] apeiros_: canurabus: I hope you tried it out by now. however, note that the rescue there is irrelevant with regards to bar not being called.