blackswan

Activity Graph

Page 1 of 1

2019-02-14

[02:06:47] blackswan: Quit: Leaving.
[03:58:09] blackswan: has joined #ruby
[19:35:47] blackswan: has left #ruby: ()

2019-02-13

[19:35:04] blackswan: has joined #ruby
[19:35:53] blackswan: i am trying to use rails in Perl. don't ask why, it's not safe for you to know.
[19:37:05] blackswan: it's complaining "Subroutine new redefined at (eval 324) line 518." for some deprecated OpenSSL classes
[19:38:48] blackswan: it's complaining this because it (meaning the Perl Inline::Ruby module) is trying to redefine 'new' for the Ruby class (i think), but it is also finding that the Ruby code it ran has defined a method named 'new'. so it's generating a string to be eval'ed by ruby that contains two different definitions of 'new'
[19:39:08] blackswan: one from the Inline::Perl module, and one from the OpenSSL Ruby classes
[19:39:37] blackswan: except... as far as i can tell, the OpenSSL code doesn't override 'new'.
[19:40:16] blackswan: it *does* override 'initialize', and the Inline::Perl isn't seeing that in the list of symbols it thinks got defined when the OpenSSL Ruby code was loaded.
[19:40:30] blackswan: so i have a question, yes.
[19:41:14] blackswan: is there some magic internally in the ruby code i should be looking for that might be taking the fact that this openssl code overrides the 'initialize' method and turning it into something that Inline::Perl is thinking is it overriding the 'new' method?
[19:41:47] blackswan: grepping for 'initialize' and 'new' would be difficult, so i thought i'd ask in the hopes that somebody who knows more about ruby internals would hear my plea and take pity on me
[19:42:10] blackswan: i mean, grepping would be easy finding the lines i'm looking for wouldn't be easy.
[19:42:32] blackswan: well, it's not complaining about other classes, just these OpenSSL classes
[19:42:55] blackswan: so something is different and i am trying to understand what it is so i can determine whether it is a problem and make it stop warning me about it.
[19:43:09] blackswan: (whether it is a problem or not. if it's a problem, i want to fix it)
[19:44:35] blackswan: hm. it's trying to define the two 'news' in Perl, not ruby.
[19:46:02] blackswan: it looks at the ruby namespace before and after it evaluates ruby code, and finds new definitions of methods and instance methods, and defines perl counterparts.
[19:47:08] blackswan: it's skipping a method named 'new' from ruby if it finds it as a class method but not if it finds it as an instance method.
[20:22:04] blackswan: it's because Digest::Base, Digest::Class, and Digest::Instance define an instance method named 'new'.
[23:01:51] blackswan: Quit: Leaving.
[23:44:31] blackswan: has joined #ruby

2019-02-12

[01:25:01] blackswan: has joined #ruby
[01:26:09] blackswan: i am trying to use perl's Inline::Ruby and it seems to be dying from a NoMethodError because the Ruby module IO::generic_writable doesn't have instance_methods defined
[01:26:37] blackswan: this makes me sad.
[11:10:08] blackswan: Ping timeout: 250 seconds
[11:49:13] blackswan: has joined #ruby
[12:45:21] blackswan: i'm having a weird problem with a Module that doesn't appear to have the instance_methods method defined.
[12:45:42] blackswan: two, actually. IO::generic_readable and IO::generic_writable.
[12:46:34] blackswan: i'm still trying to get it simplified enough to paste. i'm using ruby embedded in perl with the Inline::Ruby perl module.
[12:46:46] blackswan: needless to say, this is tricksy.
[12:49:26] blackswan: and now you see why i have a problem...
[12:50:32] blackswan: https://pastebin.com/BVLz6PSG
[12:50:46] blackswan: *i* don't. i'm trying to debug the Perl Inline::Ruby code.
[12:51:21] blackswan: it is getting this from a list of modules that get defined, and then it is trying to call methods and instance_methods on those modules
[12:51:56] blackswan: it fails on IO::generic_writeable and IO::generic_readable, which are magic methods from ext/stringio/stringio.c in the ruby source.
[12:52:30] blackswan: so i can't tell if this is a bug in ruby or in the Inline::Ruby module or something else because i am unfamiliar with the code.
[12:54:04] blackswan: oh. i'm a little confused in the pastebin.
[12:54:15] blackswan: sorry, magic modules.
[12:54:23] blackswan: not enough caffeine yet today.
[12:58:52] blackswan: that's what Inline::Ruby is getting when it tries to call instance_methods.
[12:59:01] blackswan: but not, for some reason, methods. i think.
[13:01:28] blackswan: it's setting k to "IO::generic_writable" and doing eval "#{k}.instance_methods"
[13:02:04] blackswan: yes, when i access it from StringIO::included_modules i get an instance_methods method, that's what is confusing.
[13:02:21] blackswan: but no, it works when it calls "methods". i thought.
[13:02:44] blackswan: i added puts statements to see what is going on
[13:03:07] blackswan: let me do a bigger pastebin with more info.
[13:03:36] blackswan: and maybe i will find out i am stating the problem incorrectly.
[13:07:19] blackswan: i'm not sure if it can do that.
[13:08:16] blackswan: what it's doing is it's trying to figure out what ruby objects were created after running a chunk of ruby code so that those objects can be made visible to Perl.
[13:12:37] blackswan: https://pastebin.com/LT0m01Kn
[13:13:06] blackswan: it's failing in build
[13:13:44] blackswan: search for modules_arg
[13:14:52] blackswan: maybe i didn't see what i thought i saw. it's possible it was always failing on calling methods. i'm not sure any more.
[13:21:14] blackswan: that's so ugly.
[13:21:36] blackswan: that's giving up and not understanding the problem.
[13:21:55] blackswan: which i might do, but not yet.
[13:26:47] blackswan: but not *just* that.
[13:29:24] blackswan: ok. i've come to the tentative conclusion that the NoMethodError is misleading. it's a NoMethodError because there's no method, but there's no method because it can't access IO::generic_readable or IO::generic_writable by their names for some reason, and it's throwing NoMethodError instead of NameError because reasons.
[13:30:05] blackswan: possible because rb_eval is not in ruby but is in the xs for Inline::Ruby
[13:31:17] blackswan: oh. it should be called IO::Generic_readable and IO::Generic_writable?
[13:31:34] blackswan: that makes sense.
[14:29:50] blackswan: has left #ruby: ()

2018-12-16

[00:29:27] blackswan: has left #ruby: ()

2018-12-14

[16:53:22] blackswan: Ping timeout: 268 seconds
[19:57:22] blackswan: has joined #ruby

2018-12-13

[02:49:20] blackswan: has joined #ruby
[15:09:42] blackswan: Quit: Leaving.
[16:58:40] blackswan: has joined #ruby
[17:59:33] blackswan: Ping timeout: 250 seconds
[18:17:45] blackswan: has joined #ruby
[20:05:03] blackswan: Ping timeout: 245 seconds
[22:49:08] blackswan: has joined #ruby

2018-12-12

[14:58:32] blackswan: Quit: Leaving.

2018-12-11

[13:54:08] blackswan: Quit: Leaving.
[22:37:00] blackswan: has joined #ruby
[22:42:02] blackswan: Ping timeout: 268 seconds
[22:58:06] blackswan: has joined #ruby

2018-12-10

[16:07:56] blackswan: has joined #ruby

2018-12-09

[13:27:35] blackswan: Quit: Leaving.

2018-12-08

[19:25:54] blackswan: Ping timeout: 250 seconds
[19:43:30] blackswan: has joined #ruby

2018-12-07

[02:59:40] blackswan: Ping timeout: 250 seconds
[03:01:38] blackswan: has joined #ruby
[14:48:36] blackswan: Ping timeout: 250 seconds
[21:50:19] blackswan: has joined #ruby

2018-12-06

[13:12:57] blackswan: Ping timeout: 246 seconds
[22:39:05] blackswan: has joined #ruby

2018-12-05

[13:15:12] blackswan: Ping timeout: 268 seconds
[21:32:47] blackswan: has joined #ruby

2018-12-04

[16:23:17] blackswan: Ping timeout: 268 seconds
[17:49:59] blackswan: has joined #ruby
[18:56:07] blackswan: Ping timeout: 240 seconds
[19:16:13] blackswan: has joined #ruby
[19:36:23] blackswan: Ping timeout: 268 seconds
[19:51:53] blackswan: has joined #ruby
[20:35:54] blackswan: Ping timeout: 246 seconds
[20:55:35] blackswan: has joined #ruby
[21:32:40] blackswan: Quit: Leaving.
[22:02:17] blackswan: has joined #ruby

2018-12-03

[20:08:45] blackswan: has joined #ruby
[20:10:26] blackswan: use Inline 'Ruby' => 'require "rails"'; yields #<ArgumentError: unknown encoding name: binary> while trying to load a ruby file with coding: binary
[21:21:13] blackswan: anybody around familiar with ruby internals?
[22:42:31] blackswan: now i'm getting #<TypeError: no implicit conversion of NoMethodError into String> when i do use Inline 'Ruby' => 'require "rails"';
[22:43:29] blackswan: i don't even know what's printing this, perl or ruby

2013-11-08

[11:09:39] blackswan: is anybody around who can quickly answer stupid neophyte rails questions about how "rake db:migrate" works under the hood, or point me to some enlightening web page?