#ruby - 02 September 2018
« Back 1 day Forward 1 day »
[06:45:17] JJonah: what is the reason's for the "you can only bind to a superclass" restriction on UnboundMethods. typically ruby gives you the freedom to shoot yourself in the foot, so if i know an unbound method makes sense in another class from which it does not inherit, why can't i bind to it? is there a technical reason?
[07:14:04] apeiros: JJonah: yeah, that's one that baffled me too. I still don't know why. it might have to do with native methods. at least iirc there was no technical issue with rebinding pure ruby methods to whatever.
[09:09:22] PasNox: Hi, can anyone point me to the C documentation so that i can embed ruby in my c++ application and be able to use installed gems ? I have a minimal example that works, but when I try to require redcarpet it throw an exception telling it can't load the specified file
[09:10:54] ruby[bot]: PasNox: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
[09:53:18] PasNox: so, it looks like that gems path are not added to the interpreter, ruby_incpush("/usr/lib/ruby/gems/2.5.0/gems/redcarpet-3.4.0/lib"); fix my issues, but i would like to avoid such hard coding. any idea ?
[11:34:59] c355E3B: I can get `char *` to work with a memory pointer, segfaults when i try to pass an array of pointers`
[21:50:11] ace91: Hey guys, I'm trying to build the project Geocoder from Github (https://github.com/alexreisner/geocoder) but I can't get rake to run without errors. Here's my output from rake --trace: https://dpaste.de/87b9
[22:11:37] Caeso: I'm having trouble writing a prime number method. My current code (https://gist.github.com/Caeso-Lucilius/31af53610ef86c4085ec3bf876b1a1b3) returns true for both even and odd numbers (at least, both 5 and 6). I don't know why, but would appreciate any insight anyone might have.
[22:20:28] Caeso: I feel like an idiot. I looked back at my text editor... and I hadn't saved the document. I saved it and it's working fine.