« Back to channel list

#ruby - 06 January 2019

« Back 1 day Forward 1 day »
[00:15:39] drale2k_: has joined #ruby
[00:21:07] cschneid: has joined #ruby
[00:27:58] Azure: has joined #ruby
[00:33:14] hutch: has joined #ruby
[00:35:00] AJA4350: has joined #ruby
[00:40:42] cschneid: has joined #ruby
[00:55:33] akem: has joined #ruby
[01:00:46] connermcd: has joined #ruby
[01:02:30] AJA4350: has joined #ruby
[01:05:27] apparition: has joined #ruby
[01:20:36] tdy: has joined #ruby
[01:35:17] jottr_: has joined #ruby
[01:52:55] orbyt_: has joined #ruby
[01:54:03] cd: has joined #ruby
[02:08:24] tdy: has joined #ruby
[02:08:48] ss_much: has joined #ruby
[02:28:13] cthu|: has joined #ruby
[02:30:28] akem: has joined #ruby
[02:31:10] cschneid: has joined #ruby
[02:32:29] cnsvc: https://dpaste.de/T3JM is this a ruby issue?
[02:34:10] baweaver: It's an issue with old versions of the mysql2 gem.
[02:34:29] baweaver: or rather it's an incompatibility with newer versions of Ruby > 2.4ish iirc
[02:35:14] cnsvc: i can reproduce this error when using the latest mysql2 gem v0.5.2
[02:36:22] baweaver: Hrm. What version of Rails are you on?
[02:36:40] baweaver: It may be you found a 2.6 bug, there are a few edges around still
[02:37:29] AJA4350: has joined #ruby
[02:37:32] cnsvc: Rails is 4.2.10
[02:37:37] rkazak: has joined #ruby
[02:38:10] cnsvc: Ruby 2.5.3 has the same error.. I guess it's related to my setup. No idea how to figure out..
[02:38:18] baweaver: There are already some 2.6 errors ereported
[02:38:28] baweaver: Though 4.2 is also old and pretty well in security only mode.
[02:38:42] baweaver: Can you see if it happens with a later version of Rails?
[02:38:58] cnsvc: sure i'll have a try
[02:39:21] baweaver: Worst case I'd report this on the Rails github page as something screwy is going on there
[02:42:49] hays: is this use of class_eval the way to implement something like attr_reader? https://mikeyhogarth.wordpress.com/2011/12/01/creating-your-own-attr_accessor-in-ruby/
[02:43:06] hays: interpolating strings like this makes me a little nervous
[02:43:58] baweaver: define_instance_method if I remember right
[02:44:00] hays: great way to inject code into a class
[02:44:36] baweaver: Ah, it was just define method
[02:44:54] baweaver: define_method(name, &function)
[02:50:07] ghormoon: has joined #ruby
[02:53:42] Iambchop: cnsvc: it looks like the BigDecimal warning was fixed in Rails 5.x: https://github.com/rails/rails/pull/31435 I don't know about the segfault :)
[03:02:59] hays: baweaver: this seems to be best way? https://bpaste.net/show/9e33a4b3d28b
[03:03:26] hays: still seems a bit iffy. i guess i can type check that its a symbol
[03:03:29] duderonomy: has joined #ruby
[03:04:19] cnsvc: Iambchop: that's right for warning
[03:04:50] cnsvc: i tried on latst rails it has the same error.
[03:05:26] cnsvc: it must be related to mysql now - since sqlite is ok
[03:05:35] cnsvc: let me dig more
[03:08:09] tdy: has joined #ruby
[03:08:42] poprocks: has joined #ruby
[03:11:10] poprocks: Dumb question, but I just upgraded from 2.2.10 to 2.5.3, and I now want to migrate my gems from /usr/lib/ruby/gems/2.2.0/* to 2.5.0/. Is there a simple 'gem' command (other than a for loop with a shell script running 'gem install' on all gems in 2.2.0 to migrate these to 2.5.0?
[03:34:58] poprocks: I landed up just doing it with a shell script. Very silly, but I know there has to be a better way (maybe this "rvm" thing is the answer).
[03:52:33] Renich: has joined #ruby
[04:04:51] tdy: has joined #ruby
[04:09:07] braincrash: has joined #ruby
[04:09:10] _whitelogger: has joined #ruby
[04:22:22] uplime: has joined #ruby
[04:27:24] arthurnn: has joined #ruby
[04:40:23] kapil____: has joined #ruby
[05:15:09] _whitelogger: has joined #ruby
[05:16:54] rippa: has joined #ruby
[05:40:09] rkazak: has joined #ruby
[05:48:03] jordanm: has joined #ruby
[06:08:06] poprocks: has left #ruby: ()
[06:16:34] cschneid: has joined #ruby
[07:00:11] _whitelogger: has joined #ruby
[07:06:02] Nicmavr: has joined #ruby
[07:20:38] tdy: has joined #ruby
[07:41:07] al2o3-cr-tmp: has joined #ruby
[07:50:00] Dbugger: has joined #ruby
[08:36:37] SuperLag: has joined #ruby
[08:46:28] cschneid: has joined #ruby
[08:52:32] elomatreb: has joined #ruby
[09:15:27] phredus_: has joined #ruby
[09:18:25] phredus__: has joined #ruby
[09:30:03] thinkpad: has joined #ruby
[09:39:58] dellavg_: has joined #ruby
[09:46:54] gix: has joined #ruby
[09:54:10] _whitelogger: has joined #ruby
[09:54:32] reber: has joined #ruby
[09:58:11] mikecmpbll: has joined #ruby
[10:00:46] conta: has joined #ruby
[10:01:03] phaul: hays: define_method takes a symbol no need to convert. instance_variable_get also takes a symbol. As you were saying passing strings feels iffy but all these reflective methods work without strings, symbol is always an option
[10:10:00] conta: has joined #ruby
[10:15:27] clemens3: has joined #ruby
[10:43:18] cliluw: has joined #ruby
[11:38:14] drale2k_: has joined #ruby
[11:48:19] hiroaki: has joined #ruby
[11:48:41] conta: has joined #ruby
[11:52:50] conta1: has joined #ruby
[12:08:27] calaveraDeluxe: has joined #ruby
[12:16:46] cschneid: has joined #ruby
[12:22:32] phredus__: has joined #ruby
[12:27:07] phredus: has joined #ruby
[12:32:15] conta: has joined #ruby
[12:56:27] hiroaki: has joined #ruby
[13:01:39] AJA4350: has joined #ruby
[13:10:42] phaul: has joined #ruby
[13:10:47] rubydoc: has joined #ruby
[13:21:52] BTRE: has joined #ruby
[13:25:24] AJA4351: has joined #ruby
[13:29:10] AJA4350: has joined #ruby
[13:29:13] hays: phaul: this is what i ended up with https://bpaste.net/show/7fc6cf24970f
[13:29:38] hays: not sure how to get rid of all the string interpolation
[13:30:16] hays: since one has to put the @ in front of the symbol and stick the = on the end
[13:34:23] AJA4350: has joined #ruby
[13:37:40] phaul: there is :"@#{a}" but yes, that is still string interpolation.
[13:38:10] phaul: but I would remove the if a.is_a symbol. and consider that a code smell.
[13:39:13] phaul: for your method a can be anything that define_method accepts. why narrow it down. If define_method doesn't accept something it will raise exception, why do it's job half way?
[13:40:17] phaul: also if define_method accepts something new in the future or stops accepting something, it can handle it, your code wouldn't need to be modified.
[13:43:29] AJA4350: has joined #ruby
[13:47:49] phaul: thinking about it, if one really wants to avoid instance_variable_get one could with instance_eval with a block and getting the value out into an outer local variable. But it's really just overcomplicating things.
[13:49:47] phaul: although the instance_var name still would be assembled as string, never mind
[13:58:44] hiroaki: has joined #ruby
[14:11:46] AJA4350: has joined #ruby
[14:22:22] lucasb: has joined #ruby
[14:25:50] AJA4350: has joined #ruby
[14:27:58] themsay: has joined #ruby
[14:28:42] AJA4351: has joined #ruby
[14:30:22] ixti: has joined #ruby
[14:31:43] reber: has joined #ruby
[14:33:38] bmurt: has joined #ruby
[15:00:42] AJA4350: has joined #ruby
[15:01:09] rkazak: has joined #ruby
[15:01:21] KeyJoo: has joined #ruby
[15:03:45] AJA4351: has joined #ruby
[15:05:03] hays: i guess i can rely on those methods to not inject something stupid
[15:09:09] dviola: has joined #ruby
[15:11:48] hays: although maybe not
[15:12:02] hays: attr_accessor "a#{2+2}"
[15:13:12] hays: i guess its fine as long as user input isn't going in there
[15:13:54] lunarkittychan: has joined #ruby
[15:20:34] AJA4350: has joined #ruby
[15:25:40] fiachetti: has joined #ruby
[15:39:08] AJA4350: has joined #ruby
[15:40:11] fiachetti: has joined #ruby
[16:03:56] arquebus: has joined #ruby
[16:04:22] cschneid: has joined #ruby
[16:14:46] crankharder: has joined #ruby
[16:15:01] tdy: has joined #ruby
[16:16:51] dellavg_: has joined #ruby
[16:18:16] AJA4350: has joined #ruby
[16:19:22] jinie_: has joined #ruby
[16:27:11] rawrg: has joined #ruby
[16:32:10] conta: has joined #ruby
[16:35:49] AJA4350: has joined #ruby
[16:37:08] rkazak: has joined #ruby
[16:52:53] al2o3-cr: has joined #ruby
[16:53:39] Aqo: has joined #ruby
[16:57:55] orbyt_: has joined #ruby
[17:11:18] rawrg: has joined #ruby
[17:18:34] cschneid: has joined #ruby
[17:18:40] orbyt_: has joined #ruby
[17:24:27] davidw_: has joined #ruby
[17:29:04] catbusters: has joined #ruby
[17:31:53] tdy: has joined #ruby
[17:37:41] conta: has joined #ruby
[17:38:26] rkazak: has joined #ruby
[17:39:55] AJA4351: has joined #ruby
[17:40:44] cthu|: has joined #ruby
[17:45:47] Nicmavr: has joined #ruby
[17:51:37] AJA4351: has joined #ruby
[17:58:06] AJA4351: has joined #ruby
[18:03:34] conta: has joined #ruby
[18:06:35] johnny56_: has joined #ruby
[18:15:43] cnsvc: has joined #ruby
[18:18:18] hutch: has joined #ruby
[18:19:46] cthu|: has joined #ruby
[18:20:28] tiff: has joined #ruby
[18:35:41] uplime: has joined #ruby
[18:43:57] tdy: has joined #ruby
[18:47:33] AJA4350: has joined #ruby
[18:59:17] AJA4351: has joined #ruby
[19:01:59] davidw_: has joined #ruby
[19:03:13] hurricanehrndz: has joined #ruby
[19:06:16] crankharder: has joined #ruby
[19:13:01] akem: has joined #ruby
[19:19:50] AJA4350: has joined #ruby
[19:20:35] faraazahmad: has joined #ruby
[19:21:26] faraazahmad: Hi!, I've been using Ruby for quite a while now and I want to start making some contributions to it
[19:22:42] AJA4351: has joined #ruby
[19:23:10] faraazahmad: Is there an issue tracker or something
[19:25:03] faraazahmad: @ruby[bot]: help
[19:25:39] go|dfish: faraazahmad: you mean https://bugs.ruby-lang.org/issues/ ?
[19:28:39] faraazahmad: Is there any beginner stuff i could do? it doesn't seem to have any filters for that
[19:33:03] go|dfish: faraazahmad: i'm not sure, sorry. hopefully someone with more knowledge can help.
[19:34:40] chouhoulis: has joined #ruby
[19:36:11] themsay: has joined #ruby
[19:38:07] orbyt_: has joined #ruby
[19:41:31] akem: has joined #ruby
[19:53:04] armyriad: has joined #ruby
[20:00:15] tdy: has joined #ruby
[20:00:38] havenwood: faraazahmad: Documentation improvements is one nice thing that's more accessible.
[20:01:12] havenwood: faraazahmad: If Ruby is your strong suit, consider contributing to an implementation that is written in a much higher percent Ruby - like TruffleRuby.
[20:02:16] havenwood: 46.4% Ruby! https://github.com/oracle/truffleruby
[20:03:13] solocshaw: has joined #ruby
[20:03:29] havenwood: faraazahmad: https://github.com/oracle/truffleruby/blob/master/doc/contributor/workflow.md
[20:07:18] havenwood: faraazahmad: For example, you could implement Array#append and Array#prepend from Ruby 2.5. You can see those failing specs with:
[20:07:19] havenwood: PRETEND_RUBY_VERSION=2.5.0 jt test spec/ruby/core/integer/digits_spec.rb
[20:07:29] havenwood: PRETEND_RUBY_VERSION=2.5.0 jt test spec/ruby/core/array
[20:08:29] tiff: has joined #ruby
[20:08:31] havenwood: Actually, that one looks fun. I'm going to do it right now. Feel free to join me!
[20:09:00] havenwood: There are lots to do. Many new features in 2.5 and 2.6. :)
[20:10:24] havenwood: faraazahmad: There're also some doable RubyGems issues in Ruby. Or lots of Gems to contribute to, of course.
[20:11:07] havenwood: faraazahmad: Of if you're in a shell mood, I have lots of chruby, ruby-install and RVM issues to triage if you want to pair on one of those.
[20:13:35] faraazahmad: havenwood: thanks! I'll jump into it
[20:16:17] Swyper: has joined #ruby
[20:20:17] conta: has joined #ruby
[20:34:01] szulak_: has joined #ruby
[20:43:35] tdy: has joined #ruby
[20:45:20] cnsvc: has joined #ruby
[20:48:43] TiglatePileser: has joined #ruby
[20:51:33] d^sh: has joined #ruby
[20:54:47] shv4: has joined #ruby
[20:54:48] hutch: has joined #ruby
[21:05:28] tdy: has joined #ruby
[21:33:03] \void: has joined #ruby
[21:34:52] duderonomy: has joined #ruby
[21:38:17] rkazak: has joined #ruby
[21:40:56] hays: writing tests seems like a good way to start too maybe
[21:41:10] hahuang6-: has joined #ruby
[21:54:55] uplime: has joined #ruby
[22:00:31] DTZUZO: has joined #ruby
[22:01:58] Swyper: has joined #ruby
[22:25:41] tdy: has joined #ruby
[22:32:54] hutch: has joined #ruby
[22:54:22] Swyper: has joined #ruby
[23:07:09] d10n-work: has joined #ruby
[23:12:14] conta: has joined #ruby
[23:20:02] uplime: has joined #ruby
[23:28:58] nadir: has joined #ruby
[23:32:14] tiff: has joined #ruby
[23:41:29] tdy: has joined #ruby
[23:52:24] houhoulis: has joined #ruby