#ruby-offtopic - 07 December 2017
« Back 1 day Forward 1 day »
[01:40:35] RickHull: apeiros: I said earlier: show me an example of using the result of a predicate method as an object, not a condition
[01:43:46] RickHull: I propose: predicate? #=> [Object, nil, true, false].sample predicate?? #=> [true, false].sample
[05:51:42] RickHull: i don't quite know what the problem is shaped like, but mruby doesn't have defined?
[06:00:53] apeiros: not quite sure what you mean with "the story". but defined? isn't a method. it becomes obvious when you realize that e.g. `defined?(super)` doesn't actually invoke super. impossible for a method. also a method couldn't determine an expression's type, all it'd ever see is the object it evaluates to
[07:06:18] RickHull: it was easy to reach for -- and based on its behavior, I could see how rubyists could be confused into relying on the specific value of a `predicate?` method
[07:15:27] dminuoso: Either that inheritance voodoo is relevant to your test, then you need to test it anyway, or its not then this is also a moot point.
[07:16:57] RickHull: without getting to deeply into it, the test is containing the lib behavior. it wants to know about violations before they occur
[07:21:40] dminuoso: >> module M; def self.const_missing(a) 42 end end; "%s // %s" % [defined?(M::A).inspect, M::A]
[07:22:14] dminuoso: It really doesn't tell you much, unless you have code that is explicitly somehow dependent on the output of M.constants, but then test for that directly.
[07:22:17] RickHull: i agree. i am talking about a situation in test/ that prefers Hash#fetch semantics to Hash#
[07:27:38] dminuoso: RickHull: While I agree that it probably is related to that fact, but it's absolutely not expected behavior.
[07:30:36] dminuoso: there's no way you can look at that and tell me it's expected in the slightest conceivable way.
[07:36:27] dminuoso: No, the problem is it still does the wrong thing, ruby 2.5 makes this more obvious.
[07:37:33] dminuoso: I mean in 2.4 it does not *look* to be a problem, except for that warning that simply shouldn't appear.
[07:40:17] dminuoso: So. Since ::String::X is fully qualified, it essentially looks inside Object for Object::String::X right?
[07:40:51] dminuoso: When it scans upwards, it will find it defined on Object, which might not be what the user intended for.
[07:41:26] dminuoso: post-2.5 it however stops there, and assumes that this can't be it - but instead of resuming to scan, it just errors out.
[07:44:00] RickHull: for all design fixes there exists at least one design fix that kicks fucken ass
[10:32:18] ruby[bot]: We can't help you without your code, please post it to https://gist.github.com
[12:09:59] apeiros: anyway, afaik ##ruby is the no-nonsense, professional and totally friendly ruby channel
[14:46:51] apeiros: ACTION wanted to do: greatest(coalesce(potentially_null_a, to_date('0000-01-01')), …)
[14:47:12] apeiros: I'll now do with 0001-01-01 :) It's just curious that it can handle negative years but not the year zero.
[21:46:38] apeiros: watching "mars" - so they walk at -80°C, enter the building and then remove their helmets bare handed. sure. because -80°C surfaces are easy to touch bare handed :D
[21:52:39] apeiros: my sanity paired with our insanity demands that I try this out by using you as the test subject.
[21:54:30] apeiros: also they're all standing around their injured commander instead of getting much needed rest.
[22:06:59] dminuoso: apeiros: If they want to make a realistic movie on mars, they'll have to wait for good ol' Elon.
[22:19:02] dminuoso: miah: My version of the Martian would have gone like this: The spacecraft misses the mars by a few hundred thousand kilometers because in the ruby code driving the rocket the coders mistakingly used , instead of _ to denote a thousand separator.
[22:20:06] dminuoso: And if you think that I was just ripping off Mariner 1, I'm not. They did this bug in FORTRAN not in Ruby!
[22:20:57] elomatreb: I thought that bug that caused that one Mars mission to crash was unit (metric vs. imperial) confusion?
[22:21:44] dminuoso: elomatreb: Yup. I was talking about Mariner 1 which was a Venus flyby.. something something..
[22:21:50] miah: A navigation team at the Jet Propulsion Laboratory used the metric system of millimeters and meters in its calculations, while Lockheed Martin Astronautics in Denver, which designed and built the spacecraft, provided crucial acceleration data in the English system of inches, feet and pounds.
[22:22:26] dminuoso: On that note.. did anyone else watch Aaron Paterson's keynote on this years railsconf keynote?
[22:25:55] dminuoso: havenwood: Has tenderlove ever shown the capability of speaking more than 5 minutes without at least trolling someone?
[22:34:17] miah: never met you iirc, have only met tenderlove once years ago.. haven't really worked with either of you either
[23:27:43] dminuoso: If I learned anything from Voyager (and there was not much to learn from), its that sharing your animal guide makes it angry.
[23:28:27] dminuoso: Would have repurposed Neelix to be a photon torpedo casing after the first day.
[23:38:08] miah: https://www.youtube.com/watch?v=4i3iHQ0X-1I&list=PL7Ac2nWFT4uxgTJRYsNSuJxpzN81pGGrL
[23:42:36] miah: "The 22nd century universe is centered on "tek"—an illegal, addictive, mind-altering digital drug in the form of a microchip."
[23:43:30] dminuoso: Well.. experience shows that Star Trek actors make absolutely horrible dictors.
[23:43:43] dminuoso: So Im not sure whether I trust William Shatner to write decent books after Star Trek V.
[23:44:12] miah: tekwar is fun, its not _amazing_ but for 90's scifi cyberpunk tv.. its pretty solid
[23:50:51] miah: i enjoyed this one, though its a bit slow at times https://en.wikipedia.org/wiki/Survivors_(1975_TV_series)#Series_3_(1977)
[23:51:17] miah: there was a reboot in like.. 2008? but they only did the first season and never renewed :(
[23:57:04] dminuoso: And I think this is an error I need to rectify.. its been ontop of my watch list for years
[23:57:53] miah: some of the last episodes are out of order on like.. netflix / dvd iirc.. so you might need to look up a list to make sure they are in the right order
[23:58:36] miah: "Several of the early episodes of Season One were aired out of the intended order."
[23:59:01] dminuoso: apeiros: You should. Its one of the most painful things you can watch. Its inconceivable how bad a star wars piece can be.
[23:59:27] dminuoso: The quality of star wars pieces has always been inversely proportional to George Lucas involvement.