Page 1 of 176 | Next »
[19:58:35] Ox0dea: norc: Well, that's how I've always gone about swapping an object's class, and the explosions tend to be minimal. :P
[19:58:59] Ox0dea: I suspect there are all sorts of ways for it to crash, though; it's hard to generalize in one's head about this sort of thing.
[09:52:24] Ox0dea: But yeah, I see the bit about short-livedness in that other channel what seems to have gone to the dogs.
[09:56:35] Ox0dea: Now, if your question mentioned `TOPLEVEL_BINDING`, I'd be more inclined to agree.
[10:01:26] Ox0dea: norc: Forgive me if I don't even begin to consider how to go about it with Fiddle. :P
[10:23:43] Ox0dea: "I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."
[10:27:04] Ox0dea: norc: Ruby just resolves the ambiguity by preferring locals in the case of collision.
[10:28:58] Ox0dea: I don't understand why they decided to make introducing new locals programmatically so painful.
[10:16:19] Ox0dea: A #to_str definition does let your object participate in String expressions, but #== is exempt.
[10:20:48] Ox0dea: `case obj; when 'foo'; ...; when String; ...; end` will try to match a specific String first, then any.
[12:09:14] Ox0dea: nashant: It *is* right. You might be missing an `end` or something along those lines.
[09:52:26] Ox0dea: qwer: Sounds like you might want to structure your thing so that you can just say `super`.
[10:31:49] Ox0dea: You're passing a block, which is pretty much an argument, but the interpreter itself disagrees.
[10:40:34] Ox0dea: Most anything but Fixnums and Symbols can be mutated in-place, but you have to get your hands dirty for certain things.
[10:44:47] Ox0dea: Anyway, those classes also have a #replace method, so you can swap them out for new instances entirely.
[12:55:03] Ox0dea: norc__: Why do you have a colleague who doesn't know how a "reset password form" is used?
[12:56:33] Ox0dea: apeiros: Pain is the greatest teacher, and we must always be ready to realize we're in Her classroom at all times.
[17:26:30] Ox0dea: CustosLimen: To elaborate, a thing needs #<=> *and* #succ in order to participate in Ranges, and Array doesn't (can't?) have the latter.
[17:41:10] Ox0dea: apeiros: Interpolation is the only thing that comes to mind, but it's pretty irrelevant. :/
[01:07:05] Ox0dea: amincd: No worries. The community style guide recommends %w(), but I think %w is better.
[04:41:20] Ox0dea: brent__: You could say `require './mines'` or `require_relative 'mines'`, but it's better to get the necessary directory into $LOAD_PATH so that you can just say what you've got now.
[06:15:50] Ox0dea: That's the easiest way to get a sane Ruby environment on Ubuntu, as I understand it.
[18:32:43] Ox0dea: BlacksmithMetash: Well, it's "compradore" everywhere else, but the error is being caused by a method with "comprador" in.
[19:09:53] Ox0dea: mynameisbrian: It's not "bad", but I'd favor Range#step and #map over "explicit" looping and building up a String.
[00:33:36] Ox0dea: If you're always going to supply `char['terms']` and meant to only define a writer, what's `|| terms` doing there?
[01:16:53] Ox0dea: http://www.zamzar.com/ does RTF to PDF, but they're pretty hush-hush about their method. :/
[21:57:34] Ox0dea: The proffered one does the trick unless you want the name to be the first word in the input.
[21:59:30] Ox0dea: TinCan_Assassin: The \b anchor matches a "word boundary" and the /i flag enables case-insensitivity.
[22:00:33] Ox0dea: TinCan_Assassin: The \b anchor matches a "word boundary" and the /i flag enables case-insensitivity.
[22:03:06] Ox0dea: "For all its power, the computer is a harsh taskmaster. Its programs must be correct, and what we wish to say must be said accurately in every detail."
[17:47:43] Ox0dea: mariano: Be advised that on 2.0+, you can use Kernel#__dir__ as an easy way to get hold of the directory in which the currently executing file lives.
[18:14:22] Ox0dea: `rescue` is a keyword, so it doesn't have a "definition" in the sense you're thinking.
[18:28:27] Ox0dea: PaulePanter: Sure thing. I suspect I ended up answering a different question than the one you asked, though.
[18:28:40] Ox0dea: This is probably the document you seek: http://ruby-doc.org/core-2.3.1/doc/syntax/exceptions_rdoc.html
[22:11:38] Ox0dea: brent__: It gives you back an Array of Symbols representing all of the global variables in the system.
[22:31:26] Ox0dea: I realize that $SAFE is a vaguely relevant identifier here, but it's pretty obvious that $boom<x> is the one you're after.
[22:41:58] Ox0dea: None of which I'm aware. I suspect you could use Fiddle to get a pointer into the global variable table and seek around for the matching VALUE, but that's overkill.
[23:18:31] Ox0dea: I had ~120 Project Euler solutions, but then they went down for a while and I forgot my credentials.