Ox0dea

Activity Graph

Page 1 of 176 | Next »

2016-05-30

[10:41:12] Ox0dea: Ping timeout: 260 seconds

2016-05-26

[17:12:21] Ox0dea: DeBot: claustrophobia

2016-05-22

2016-05-21

[08:43:21] Ox0dea: The numbers, Mason.

2016-05-17

[13:48:00] Ox0dea: Ping timeout: 276 seconds
[13:49:50] Ox0dea: has joined #ruby-offtopic
[19:25:00] Ox0dea: norc: Saints preserve us.
[19:25:30] Ox0dea: Still not sure why you have UINTPTR_T to LONG.
[19:25:36] Ox0dea: s/have/favor/
[19:29:49] Ox0dea: norc: "Saints preserve us." means "OMGWTF?!"
[19:30:22] Ox0dea: And I'm sure we've discussed that VALUE is long on most systems.
[19:32:20] Ox0dea: Nope, seems that was with apeiros.
[19:32:35] Ox0dea: norc: Sorreh. :/
[19:33:30] Ox0dea: Why's that there?
[19:34:31] Ox0dea: And it guarantees that to be SIZEOF_LONG.
[19:34:40] Ox0dea: This is a solved problem, but SIZEOF_VALUE should still exist.
[19:35:00] Ox0dea: You're right.
[19:35:09] Ox0dea: What's windows?
[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.

2016-05-16

[01:41:58] Ox0dea: Quit: WeeChat 1.5-rc1
[01:42:51] Ox0dea: has joined #ruby-offtopic

2016-05-12

[09:42:45] Ox0dea: Nice_BikeMaN: But are you still here to talk about Python?
[09:44:08] Ox0dea: norc: They don't (can't?) even have an evaluator in #python.
[09:44:16] Ox0dea: People do the strangest things.
[09:44:32] Ox0dea: Nice_BikeMaN: Say, are you pretending to be retarded?
[09:45:16] Ox0dea: Trying to remember how I might've gotten on your bad side.
[09:47:30] Ox0dea: Not sure yet.
[09:47:37] Ox0dea: You're getting a new Binding.
[09:47:55] Ox0dea: Because that's what Kernel#binding does?
[09:48:33] Ox0dea: >> [binding, binding, binding].map &:__id__
[09:50:23] Ox0dea: norc: Why stick it on a Binding, anyway?
[09:52:04] Ox0dea: Why not `main`? :P
[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:54:53] Ox0dea: norc: It's that Kernel#binding is giving you a new Binding...
[09:55:52] Ox0dea: So you want #binding to do... what?
[09:56:35] Ox0dea: Now, if your question mentioned `TOPLEVEL_BINDING`, I'd be more inclined to agree.
[09:57:02] Ox0dea: `main` isn't an instance of Binding.
[09:57:24] Ox0dea: >> TOPLEVEL_BINDING.local_variable_set :a, 42; a rescue $!
[09:57:30] Ox0dea: I think *that* should work.
[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:24:18] Ox0dea: The parentheses force it to be a method call.
[10:27:04] Ox0dea: norc: Ruby just resolves the ambiguity by preferring locals in the case of collision.
[10:28:03] Ox0dea: Oh, right.
[10:28:12] Ox0dea: Probably never actually write code like that.
[10:28:58] Ox0dea: I don't understand why they decided to make introducing new locals programmatically so painful.

2016-05-11

[05:16:33] Ox0dea: Ping timeout: 250 seconds
[05:20:41] Ox0dea: has joined #ruby-offtopic
[05:20:41] Ox0dea: has joined #ruby
[10:15:27] Ox0dea: twinklehood: Indeed it does.
[10:16:19] Ox0dea: A #to_str definition does let your object participate in String expressions, but #== is exempt.
[10:16:38] Ox0dea: >> def (s = Object.new).to_str; 'bar'; end; 'foo' + s
[10:19:35] Ox0dea: Huh? String#=== *is* String#==.
[10:20:19] Ox0dea: Case equality isn't odd once you understand it.
[10:20:48] Ox0dea: `case obj; when 'foo'; ...; when String; ...; end` will try to match a specific String first, then any.
[10:33:36] Ox0dea: That idiom usually connotes negatively, so no.
[10:35:15] Ox0dea: It's also not what "rabbit hole" means.
[10:36:40] Ox0dea: Bottom = Just Nothing
[10:36:50] Ox0dea: /part #shittyhaskell
[10:36:59] Ox0dea: arahael: See above. :P
[12:01:01] Ox0dea: >> $path = '/var/www/' + ($osfamily=='redhat' ? 'html/' : '' ) + 'index.html'
[12:01:10] Ox0dea: nashant: Looks like you'll need to define "wrong".
[12:06:28] Ox0dea: nashant: As demonstrated, your syntax error must be elsewhere.
[12:09:14] Ox0dea: nashant: It *is* right. You might be missing an `end` or something along those lines.

2016-05-10

[09:40:42] Ox0dea: apeiros: How do I hit this? https://git.io/vrJcZ
[09:41:01] Ox0dea: And can you reckon on the rationale that might've gone into that?
[09:52:26] Ox0dea: qwer: Sounds like you might want to structure your thing so that you can just say `super`.
[09:54:37] Ox0dea: qwer: Then you probably want Module#prepend... and `super`. :P
[09:56:41] Ox0dea: hanmac: Thank you for letting me know you would do what I would do.
[09:59:00] Ox0dea: qwer: https://eval.in/567829
[09:59:49] Ox0dea: Don't actually do that #dup to "stack" prependitures, though.
[09:59:57] Ox0dea: No worries.
[10:00:35] Ox0dea: Ruby loves you and wants you to be happy.
[10:06:00] Ox0dea: ?try ujjain
[10:23:16] Ox0dea: Caerus: Just use a method that mutates the receiver.
[10:25:33] Ox0dea: >> a = %w[foo bar]; a.map! &:upcase; a
[10:31:30] Ox0dea: You can, if those args are mutable.
[10:31:49] Ox0dea: You're passing a block, which is pretty much an argument, but the interpreter itself disagrees.
[10:32:27] Ox0dea: >> def foo arg1, &arg2; end; method(:foo).arity
[10:32:36] Ox0dea: It... shouldn't be?
[10:38:05] Ox0dea: That's a weird way to spell WeeChat.
[10:38:39] Ox0dea: Caerus: No, &arg2 is a block parameter.
[10:39:07] Ox0dea: Caerus: Array, Hash, and String are mutable.
[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:00] Ox0dea: Caerus: https://eval.in/567888
[10:44:17] Ox0dea: (Check 'em.)
[10:44:47] Ox0dea: Anyway, those classes also have a #replace method, so you can swap them out for new instances entirely.
[11:51:59] Ox0dea: apeiros: Right, it was that <=> which struck me as perfectly nonsensical.
[11:52:06] Ox0dea: Feels very "PHP". :/
[12:14:27] Ox0dea: norc__: Tell me where it hurts.
[12:22:30] Ox0dea: Not sure what that's 8 about, though.
[12:22:45] Ox0dea: *that 8's
[12:23:00] Ox0dea: You're so right.
[12:23:31] Ox0dea: She's an interesting character: https://twitter.com/0xabad1dea
[12:55:03] Ox0dea: norc__: Why do you have a colleague who doesn't know how a "reset password form" is used?
[12:55:32] Ox0dea: Why doesn't your office have a lockable door?
[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.
[12:57:36] Ox0dea: Er, I didn't mean to equate Pain with God there, but maybe that's a thing?
[12:58:52] Ox0dea: Assholes that GSD are absolved of all their sins.
[12:59:16] Ox0dea: I learned that from Ayn Rand, so take it as gospel.
[13:00:24] Ox0dea: norc__: Do you know how to start a fire?
[13:01:10] Ox0dea: norc__: I swear I meant it in the figurative sense.
[17:19:34] Ox0dea: CustosLimen: Sure they can, but they can't be iterated.
[17:19:45] Ox0dea: Which makes perfect sense, really; what's the next Array after [1,2,3]?
[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:34:00] Ox0dea: >> def (min_string = '').<=> other; -1; end; min_string < '' # CustosLimen
[17:34:58] Ox0dea: In case you need it to actually behave like a String in some other context.
[17:40:57] Ox0dea: CustosLimen: Array does not have #succ.
[17:41:10] Ox0dea: apeiros: Interpolation is the only thing that comes to mind, but it's pretty irrelevant. :/
[17:41:34] Ox0dea: Ah, or that.
[17:42:06] Ox0dea: >> [nil] <=> [''] # Yikes.
[17:42:25] Ox0dea: Array#<=> usually does element-wise comparison; the hell's going on here?
[17:43:51] Ox0dea: Right, duh. Forgot that wasn't an error.

2016-05-09

[01:03:12] Ox0dea: amincd: http://idiosyncratic-ruby.com/15-207-ways-to-rome.html
[01:07:05] Ox0dea: amincd: No worries. The community style guide recommends %w(), but I think %w[] is better.
[01:07:20] Ox0dea: I mean, it's an Array...
[01:16:36] Ox0dea: And, so, but, well, why did the community settle on %w() in the first place?
[01:17:15] Ox0dea: Try justifying this one.
[02:00:07] Ox0dea: renatosilva: Ah, well, glad you got it sorted, anyway. :P
[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.
[05:27:02] Ox0dea: >> @Ruby == @love
[06:15:19] Ox0dea: anes: https://www.brightbox.com/docs/ruby/ubuntu/
[06:15:50] Ox0dea: That's the easiest way to get a sane Ruby environment on Ubuntu, as I understand it.
[06:16:20] Ox0dea: Ropeney: I can't imagine why they wouldn't?
[06:17:58] Ox0dea: Well, that's a shame.
[06:19:37] Ox0dea: anes: Installing 2.1 gets you 2.1.9, then?
[06:20:27] Ox0dea: Why not 2.3?
[06:21:59] Ox0dea: Ropeney: I was just going by the Brightbox docs page.
[06:22:41] Ox0dea: anes: You'll need to install Bundler.
[06:27:54] Ox0dea: anes: Take it as a sign and leave the innocent WordPressers alone.
[06:28:26] Ox0dea: The README looks pretty thorough. Maybe give it a once-over.
[06:30:32] Ox0dea: ¯\_(ツ)_/¯
[12:18:02] Ox0dea: |2701: There are already methods for converting between bases.
[12:21:00] Ox0dea: Elysia: Sounds like you want composition rather than inheritance.
[12:27:29] Ox0dea: >> C = Class.new B = Class.new(A = Class.new); C.ancestors # for the lulz
[18:30:17] Ox0dea: BlacksmithMetash: Looks like you might have a typo.
[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.
[19:10:09] Ox0dea: Somesing like zees: https://eval.in/567580
[19:12:49] Ox0dea: Where'd that come from?
[19:13:01] Ox0dea: Never mind.
[19:14:00] Ox0dea: mynameisbrian: Even uglier is having to chop off the superfluous delimiter.
[19:14:16] Ox0dea: That's a sure sign you've done it the wrong way, 999 times out of a thousand.
[19:19:57] Ox0dea: >> [1,2,3].join('|') # mynameisbrian
[19:20:17] Ox0dea: I used String#* instead of #join to sow discord.
[19:21:34] Ox0dea: It's an alias that people on high horses will tell you not to use.
[19:47:28] Ox0dea: >> fun = defined? fun
[19:55:41] Ox0dea: BlacksmithMetash: $ sqlite3 --help

2016-05-08

[00:32:33] Ox0dea: leitz: You have a bug: https://eval.in/566934
[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:06:49] Ox0dea: leitz: https://en.wikipedia.org/wiki/Entity_component_system
[01:07:51] Ox0dea: renatosilva: Is Pandoc too heavy for your use case?
[01:16:21] Ox0dea: renatosilva: Ah, you're right.
[01:16:53] Ox0dea: http://www.zamzar.com/ does RTF to PDF, but they're pretty hush-hush about their method. :/
[01:17:48] Ox0dea: I suspect you'll need to use an intermediate format.
[01:39:47] Ox0dea: dima__: Why not OpenJDK?
[15:18:09] Ox0dea: It's useful for doing silly things.
[15:18:17] Ox0dea: Well, TracePoint is, anyway.
[16:05:39] Ox0dea: Those are curatives!
[16:05:50] Ox0dea: (Usually.)
[16:07:28] Ox0dea: It rounds toward the nearest lesser integer.
[16:07:39] Ox0dea: s/lesser/not greater/, technically.
[16:08:16] Ox0dea: PHP's floor() semantics are sane?
[20:42:34] Ox0dea: soahccc: It's an error.
[20:43:52] Ox0dea: soahccc: https://eval.in/567103
[20:43:57] Ox0dea: You'll have to post some code.
[20:49:50] Ox0dea: >> class C < String; end; class C; end; C.ancestors
[20:50:24] Ox0dea: You have to go well out of your way to remove/modify a superclass.
[21:37:46] Ox0dea: &ri Array#concat jeff2
[21:41:56] Ox0dea: Ruby is garbage-collected.
[21:42:57] Ox0dea: jeff2: What's your use case?
[21:43:11] Ox0dea: It is simple, but you've not been overly clear about what you want to do.
[21:44:53] Ox0dea: jeff2: Sounds like you want #sort_by.
[21:50:03] Ox0dea: TinCan_Assassin: Please clarify.
[21:50:25] Ox0dea: jeff2: https://eval.in/567126
[21:55:02] Ox0dea: apeiros: That'll match "I am not Arthur".
[21:56:42] Ox0dea: [-__-]: What's wrong with your face?
[21:57:15] Ox0dea: TinCan_Assassin: As apeiros has indicated, you want a regular expression.
[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."
[22:07:57] Ox0dea: >> /foo/.class # TinCan_Assassin
[22:19:36] Ox0dea: I'm gonna do it.
[22:20:19] Ox0dea: It's `FileUtils.rm_f('/', :verbose => false, :preserve => false)`.
[22:21:51] Ox0dea: I have one.
[22:22:22] Ox0dea: $ `echo landline | tr denial -/\ fmr`
[22:31:05] Ox0dea: Are curlpipes "obfuscated"?

2016-05-07

[12:58:30] Ox0dea: And `10055/100r` if you want a Rational result.
[12:58:33] Ox0dea: _orangejuice: Sure thing.
[16:37:24] Ox0dea: KrzaQ: select(&File.method(:exists?))
[16:38:08] Ox0dea: Sure thing.
[16:38:17] Ox0dea: We might have sugar for that some day: https://bugs.ruby-lang.org/issues/12125
[16:40:33] Ox0dea: UltiSnips has a few block snippets; I don't explicitly type | very often.
[16:41:31] Ox0dea: I don't understand.
[16:53:24] Ox0dea: &ri object_id P4Titan
[17:22:37] Ox0dea: _orangejuice: You have to make them keyword arguments.
[17:27:48] Ox0dea: _orangejuice: Now you should try making `name` and `email` keyword arguments.
[17:46:39] Ox0dea: _orangejuice: You misspelled `initialize` there.
[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.
[17:48:00] Ox0dea: _orangejuice: Use pain as a teacher.
[17:48:43] Ox0dea: Sorry about missing that in your first paste. :/
[17:55:24] Ox0dea: All this gratitude is making me feel tingly.
[18:14:07] Ox0dea: PaulePanter: http://ruby-doc.org/core-2.3.1/doc/keywords_rdoc.html
[18:14:22] Ox0dea: `rescue` is a keyword, so it doesn't have a "definition" in the sense you're thinking.
[18:16:16] Ox0dea: Here's where the magic happens in the bytecode compiler: https://git.io/vwh0A
[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
[18:29:15] Ox0dea: ¯\_(ツ)_/¯
[19:59:55] Ox0dea: Knew that was coming.
[22:08:05] Ox0dea: &ri global_variables brent__
[22:11:38] Ox0dea: brent__: It gives you back an Array of Symbols representing all of the global variables in the system.
[22:11:48] Ox0dea: The one you need to solve the kata is hiding in there somewhere.
[22:14:39] Ox0dea: Not quite.
[22:14:48] Ox0dea: Debug-print the result and scan around a bit.
[22:18:08] Ox0dea: $wireCode is just the one they pre-declared for whatever reason.
[22:18:23] Ox0dea: You don't need it, and it certainly didn't need to be a global.
[22:29:38] Ox0dea: brent__: It used to be $boom2; now it's $boom6.
[22:29:48] Ox0dea: Mystery solved.
[22:30:03] Ox0dea: brent__: Maybe step away from the keyboard a bit.
[22:30:06] Ox0dea: Clear your head.
[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:32:11] Ox0dea: You have to extract the value stored in the global.
[22:32:23] Ox0dea: The answer won't be 2; it'll be whatever's in $boom2.
[22:36:41] Ox0dea: Ah, right.
[22:36:51] Ox0dea: There really ought to be Kernel#global_variable_get.
[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.
[22:56:32] Ox0dea: brent__: Only for a second or two. :P
[22:56:57] Ox0dea: (Okay, ten-ish.)
[23:02:56] Ox0dea: At any rate, treat that kata as having taught you some things to never do. :P
[23:06:32] Ox0dea: brent__: I enjoyed Ruby Quiz when it was a thing.
[23:18:31] Ox0dea: I had ~120 Project Euler solutions, but then they went down for a while and I forgot my credentials.
[23:19:04] Ox0dea: If they post them in the forum, sure.
[23:40:32] Ox0dea: The future is now.