matthewd

Activity Graph

Page 1 of 41 | Next »

2019-08-22

[00:56:29] matthewd: *.net *.split
[01:13:37] matthewd: has joined #RubyOnRails
[01:13:50] matthewd: has joined #ruby
[01:14:11] matthewd: has joined #ruby-offtopic
[01:14:15] matthewd: has joined #RubyonRails-offtopic

2019-07-28

[23:23:27] matthewd: Quit: ZNC - http://znc.in
[23:23:46] matthewd: has joined #ruby-offtopic
[23:23:46] matthewd: has joined #ruby
[23:23:46] matthewd: has joined #RubyonRails-offtopic
[23:23:46] matthewd: has joined #RubyOnRails

2019-07-01

[01:12:01] matthewd: Ping timeout: 248 seconds
[01:12:18] matthewd: has joined #ruby-offtopic
[01:12:18] matthewd: has joined #ruby
[01:12:18] matthewd: has joined #RubyonRails-offtopic
[01:12:18] matthewd: has joined #RubyOnRails

2019-06-30

[20:46:55] matthewd: Ping timeout: 244 seconds
[20:49:11] matthewd: has joined #ruby-offtopic
[20:49:11] matthewd: has joined #ruby
[20:49:11] matthewd: has joined #RubyonRails-offtopic
[20:49:11] matthewd: has joined #RubyOnRails

2019-06-12

[06:21:19] matthewd: Ping timeout: 258 seconds
[06:22:47] matthewd: has joined #ruby
[06:22:47] matthewd: has joined #RubyonRails-offtopic

2019-06-07

[06:38:51] matthewd: Ping timeout: 248 seconds
[06:41:18] matthewd: has joined #ruby
[06:41:18] matthewd: has joined #RubyonRails-offtopic

2019-06-04

[09:04:42] matthewd: Ping timeout: 258 seconds
[09:06:41] matthewd: has joined #ruby
[09:06:41] matthewd: has joined #RubyonRails-offtopic

2019-05-24

[04:39:04] matthewd: Ping timeout: 264 seconds
[04:41:05] matthewd: has joined #ruby-offtopic
[04:41:05] matthewd: has joined #ruby
[04:41:05] matthewd: has joined #RubyonRails-offtopic
[04:41:05] matthewd: has joined #RubyOnRails

2019-05-17

[13:53:27] matthewd: Ping timeout: 250 seconds
[13:54:21] matthewd: has joined #ruby-offtopic
[13:54:21] matthewd: has joined #ruby
[13:54:21] matthewd: has joined #RubyonRails-offtopic
[13:54:21] matthewd: has joined #RubyOnRails

2019-04-13

[16:50:12] matthewd: *.net *.split

2019-04-08

[22:30:30] matthewd: Ping timeout: 252 seconds
[22:32:02] matthewd: has joined #RubyOnRails
[22:32:03] matthewd: has joined #ruby-offtopic
[22:32:03] matthewd: has joined #ruby
[22:32:03] matthewd: has joined #RubyonRails-offtopic

2019-03-22

[12:14:36] matthewd: *.net *.split

2019-03-14

[09:34:40] matthewd: Ping timeout: 250 seconds
[09:39:59] matthewd: has joined #ruby-offtopic
[09:39:59] matthewd: has joined #ruby
[09:39:59] matthewd: has joined #RubyonRails-offtopic
[09:39:59] matthewd: has joined #RubyOnRails

2018-12-02

[14:06:19] matthewd: Ping timeout: 246 seconds
[14:06:35] matthewd: has joined #ruby-offtopic
[14:06:35] matthewd: has joined #ruby
[14:06:35] matthewd: has joined #RubyonRails-offtopic
[14:06:35] matthewd: has joined #RubyOnRails

2018-10-10

[01:38:04] matthewd: *.net *.split
[01:45:38] matthewd: has joined #RubyonRails-offtopic

2018-09-01

[18:18:58] matthewd: has joined #RubyonRails-offtopic
[18:18:58] matthewd: has joined #RubyOnRails
[18:18:59] matthewd: has joined #ruby-offtopic
[18:18:59] matthewd: has joined #ruby

2018-08-09

[04:32:58] matthewd: Read error: Connection reset by peer

2018-07-20

[00:07:05] matthewd: *.net *.split
[00:15:15] matthewd: has joined #RubyonRails-offtopic
[00:15:25] matthewd: has joined #RubyOnRails
[00:15:33] matthewd: has joined #ruby

2018-07-19

[05:30:30] matthewd: Ping timeout: 276 seconds
[05:35:43] matthewd: has joined #ruby
[05:35:43] matthewd: has joined #RubyonRails-offtopic
[05:35:43] matthewd: has joined #RubyOnRails

2018-07-18

[05:16:30] matthewd: *.net *.split
[05:35:19] matthewd: has joined #ruby
[05:35:20] matthewd: has joined #RubyonRails-offtopic
[05:35:20] matthewd: has joined #RubyOnRails

2018-06-21

[16:17:11] matthewd: https://github.com/rake-compiler/rake-compiler#cross-compilation---the-future-is-now
[16:17:34] matthewd: (but it's been a long time since I cared, so no idea how easy, or how current, that is)

2018-06-08

[01:49:21] matthewd: Ping timeout: 248 seconds
[01:49:37] matthewd: has joined #RubyOnRails
[01:49:38] matthewd: has joined #ruby
[01:49:38] matthewd: has joined #RubyonRails-offtopic

2018-05-29

[02:46:52] matthewd: *.net *.split
[02:47:33] matthewd: has joined #RubyonRails-offtopic
[02:47:43] matthewd: has joined #RubyOnRails
[02:47:50] matthewd: has joined #ruby

2018-04-25

[12:25:36] matthewd: *.net *.split
[12:26:59] matthewd: has joined #RubyonRails-offtopic
[12:27:14] matthewd: has joined #ruby
[12:27:31] matthewd: has joined #RubyOnRails
[15:01:05] matthewd: *.net *.split
[15:04:06] matthewd: has joined #RubyOnRails
[15:04:07] matthewd: has joined #ruby
[15:04:10] matthewd: has joined #RubyonRails-offtopic

2018-04-22

[02:04:16] matthewd: Ping timeout: 246 seconds
[02:05:53] matthewd: has joined #ruby
[02:05:53] matthewd: has joined #RubyonRails-offtopic
[02:05:53] matthewd: has joined #RubyOnRails

2018-03-26

[20:05:12] matthewd: Ping timeout: 276 seconds

2018-01-20

[23:04:27] matthewd: Ping timeout: 240 seconds
[23:05:42] matthewd: has joined #RubyOnRails
[23:05:43] matthewd: has joined #ruby-ops
[23:05:43] matthewd: has joined #ruby-offtopic
[23:05:43] matthewd: has joined #ruby-banned
[23:05:43] matthewd: has joined #ruby
[23:05:43] matthewd: has joined #RubyonRails-offtopic

2018-01-07

[20:35:03] matthewd: *.net *.split

2018-01-04

[11:41:45] matthewd: Ping timeout: 265 seconds
[11:46:21] matthewd: has joined #ruby-banned
[11:46:21] matthewd: has joined #ruby
[11:46:21] matthewd: has joined #RubyonRails-offtopic
[11:46:21] matthewd: has joined #RubyOnRails
[11:46:22] matthewd: has joined #ruby-ops
[11:46:22] matthewd: has joined #ruby-offtopic

2017-12-24

[13:26:00] matthewd: user3: The order of the comparison is significant; you probably need it the other way around
[13:26:28] matthewd: user3: `case x when y` is equivalent to `if y === x`
[13:37:50] matthewd: Nothing quite that exciting.. been busy getting up to speed at new job
[13:38:40] matthewd: Currently, a Rails upgrade; 3.2 to .. something newer
[13:39:33] matthewd: It's a good way to get a handle on the codebase while doing something I'm already familiar with ¯\_(ツ)_/¯

2017-12-21

[02:07:17] matthewd: *.net *.split
[02:08:13] matthewd: has joined #ruby-ops
[02:08:13] matthewd: has joined #ruby-offtopic
[02:08:13] matthewd: has joined #ruby-banned
[02:08:13] matthewd: has joined #ruby
[02:08:13] matthewd: has joined #RubyonRails-offtopic
[02:08:13] matthewd: has joined #RubyOnRails

2017-12-19

[07:37:01] matthewd: body && body['foo']

2017-12-04

[10:02:36] matthewd: okraits: Check config.cache_store; action_controller.perform_caching doesn't affect the low level cache
[10:06:09] matthewd: I don't recall what the defaults are, sorry. Probably?

2017-12-02

[02:47:27] matthewd: RickHull: You've thrown a bunch of code in there, but haven't managed to use many actual words
[02:48:27] matthewd: RickHull: Are you saying "this has changed behaviour; the thing that used to give a warning now raises"?
[02:49:57] matthewd: RickHull: Because yes, it does. It's the second feature listed on the release announcement.
[07:03:33] matthewd: Oh, okay. That is not at all clear from your wordless code dumps.
[07:06:08] matthewd: Personally, I think I would expect the raise when you define it in Kernel or BasicObject -- i.e., that it would raise when traversing Object, not just if it's found exactly inside Object.
[07:12:12] matthewd: The top level *is* Object
[07:12:34] matthewd: Yes, exactly
[07:14:45] matthewd: The top level constant namespace is Object
[07:14:59] matthewd: That's not redefining, it's overriding
[07:15:31] matthewd: >> module M; X = 1; end; module N; include M; X = 2; end
[07:18:10] matthewd: That is the exact documented behaviour of 2.5
[07:18:38] matthewd: I mean, that is exactly the behaviour that is identified as a feature in 2.5
[07:19:19] matthewd: ... because the above is just a slightly more verbose way of spelling `X = 1; String::X`
[07:20:10] matthewd: Yes. This is exactly what got changed.
[07:20:44] matthewd: Because ~everything subclasses Object, and everything is defined in Object. The old behaviour was confusing, because a subclass reference would always "work".
[07:21:05] matthewd: That's why it's had an aggressive warning for a while, and that's why it's now going away.
[07:22:24] matthewd: *for Object*
[07:23:01] matthewd: Object is the top level. It is not useful for its contents to be inherited like that. Because it is the top level.
[07:23:50] matthewd: We're talking about constant lookup
[07:25:20] matthewd: It's not; that's the behaviour you showed that I agreed was surprising. (And which fxn previously commented on.)
[07:27:15] matthewd: [12-02 17:36:08] <matthewd> Personally, I think I would expect the raise when you define it in Kernel or BasicObject -- i.e., that it would raise when traversing Object, not just if it's found exactly inside Object.
[07:29:42] matthewd: Yes, that particular behaviour is odd. But I think it's currently rather lost in your issue, which seems to mostly state things that are obvious to anyone who already knows how constant lookup works in principle.
[07:30:35] matthewd: Sorry, that sounds more condescending than I mean it to... I mean "for the subset of people with reasonable specialist knowledge here, there's eye-glazing before getting to the point they might in fact find surprising", not "any reasonable person should know this"
[07:31:59] matthewd: Well, it goes back to the fact that Object is the root of everything -- that's where "global" methods come from, and that's where "global" constants come from
[07:32:17] matthewd: (NB, pre-dates BasicObject)
[07:34:03] matthewd: Well it hasn't needed special rules for 20 years... it's just now being found that the lack of special rules can be confusing, because the generic rules have unfortunate overlapping implications
[07:34:53] matthewd: Or at least, it's just now being addressed by the introduction of special rules. The potential for confusion has been understood for a while.
[07:38:28] matthewd: I only recall people explicitly defining constants into Object where they specifically intended to define a top-level constant
[07:39:10] matthewd: So, I won't claim that no-one is doing so, but still... if people were getting the warning, and then they changed their code in a way that they no longer got the warning, then they're fine
[07:39:44] matthewd: If they got the warning then ignored it because they decided they knew better and that a strict reading meant it didn't actually apply to what they were doing, then that sounds too bad for them
[07:44:09] matthewd: And that's the problem here: the unreasonableness is having to be introduced, because the alternative is also disturbing
[07:44:25] matthewd: See https://bugs.ruby-lang.org/issues/11547, the OP's first comment, in fact
[07:45:10] matthewd: He sees no relationship between shugo's example and his, despite the fact the only difference between them is whether the parent is Foo vs Object
[07:49:42] matthewd: And in the OP, it finds Auth via inheritance, because Twitter < Object
[07:50:36] matthewd: Right. But that's how referencing `String` works.
[07:50:57] matthewd: `String` looks up that constant in the current scope's parents, and finds it in Object
[07:51:39] matthewd: The only thing special about Object as being top-level is the fact it has the `::Foo` special syntax
[07:52:12] matthewd: But unless you're using that leading-:: style, you're always using inheritance-based lookup
[07:53:35] matthewd: I understand your point, but I'm refuting your "now Object/toplevel is weird and special" point, by noting that a simple implementation of that idea would break all constants
[07:55:13] matthewd: Yeah. No-one should be putting constants into BasicObject, for a start.
[07:56:52] matthewd: I think modules may get trickier.. if someone explicitly does a top-level include of a module, then having that module's constants appear on every object isn't necessarily wrong
[07:57:01] matthewd: (e.g., its methods certainly do)

2017-12-01

[02:28:21] matthewd: has joined #ruby-ops
[02:28:22] matthewd: has joined #ruby-banned
[02:28:27] matthewd: has joined #ruby-offtopic
[02:28:55] matthewd: has joined #ruby
[15:47:14] matthewd: krawchyk: All dependencies are visible in the Gemfile.lock itself
[15:48:22] matthewd: Well, the Gemfile.lock tells you
[15:50:24] matthewd: It's also listed somewhere else in the file (unless something's broken)
[15:50:30] matthewd: dminuoso: o/
[15:51:33] matthewd: krawchyk: Either underneath some other top-level entry (which depends on it), or under dependencies at the bottom (meaning it's pulled in by your Gemfile explicitly)
[15:52:05] matthewd: krawchyk: So, mail appears at the "top" here: https://github.com/rails/rails/blob/master/Gemfile.lock#L308
[15:52:49] matthewd: krawchyk: That lists *its* dependencies, but there must also be some reason, in the file, for why it's included at all
[15:52:53] matthewd: In this case, we find it here: https://github.com/rails/rails/blob/master/Gemfile.lock#L55
[15:53:59] matthewd: What's strange about that? That's exactly what I described, isn't it?
[15:54:56] matthewd: Note that it's *not* a tree -- it's a two level list, showing "gem -> its dependencies"
[15:55:30] matthewd: *Why* that gem is in the list is found elsewhere -- whether it's as another dep (in this case), or an explicit reference
[15:56:10] matthewd: No worries!
[15:56:34] matthewd: Note your other option is the 'reverse dependencies' link on rubygems.org -- but that obviously tells you about all of them, not just the one(s) you have installed

2017-11-22

[11:34:55] matthewd: terens: Is there a competing suggestion/approach for you to compare & contrast? Or just general doubt?
[11:35:42] matthewd: morfin: Yes: http://rack.github.io/
[11:37:50] matthewd: morfin: I'd do it in the same migration that adds the column (or a nearby one)
[11:39:41] matthewd: morfin: Slightly more detailed reasoning: https://github.com/rails/rails/pull/31082#issuecomment-342656259
[12:28:03] matthewd: Guest90927: $1 looks like a global, but is actually a specially-scoped local.. tbh I'm actually not sure whether that's relevant in this case
[12:28:51] matthewd: Yeah, using different strings should confirm that
[12:33:27] matthewd: Oh, it must detect the arity
[12:33:32] matthewd: Add another parameter to your block

2017-11-19

[03:15:32] matthewd: habs: How does that controller relate to `Course.create({...})` ?
[03:20:19] matthewd: habs: How did you "do" Course.create({..}) ?
[03:25:52] matthewd: So you're not calling the controller at all
[03:26:06] matthewd: If you're not checking the result of create, you should call create!
[03:27:02] matthewd: Course is the model
[03:34:37] matthewd: Have you made the change I recommended?
[03:36:30] matthewd: Use create! instead of create
[03:42:30] matthewd: As I said, if you're not checking the result of `create` (which you obviously weren't), then you should call `create!`
[03:42:47] matthewd: ... because it will tell you if it fails to create for some reason, which you're now seeing
[03:43:11] matthewd: So yes, to address the problem, now that you can see it: you have a validation issue
[04:35:35] matthewd: hays: Use blocks
[04:39:08] matthewd: hays: See File
[04:40:39] matthewd: If the object goes away, its file will eventually get closed by the garbage collector anyway.. but it's better practice not to rely on that (partly just because it could be some time later)
[04:45:53] matthewd: Override the log's close to log caller to the log before it closes the log?
[04:46:00] matthewd: Yeah, `caller`
[04:51:17] matthewd: Sounds plausible -- though if things are convoluted, you might want more of the call stack
[04:54:47] matthewd: https://github.com/seattlerb/flay#flay might help in finding some of that
[06:04:45] matthewd: That's up to your database / migrations
[06:05:19] matthewd: The association tells it to *use* the attribute; whether the attribute *exists* depends on there being a suitably-named column
[06:06:09] matthewd: course_id is the default FK name for `belongs_to :course`, btw, so you don't need to specify that
[06:15:48] matthewd: I can never remember the details of the migration generator magic, but yeah that sounds right
[06:21:50] matthewd: Open the migration it generated and see what it contains
[06:24:13] matthewd: It should've told you the name of the file it created
[06:24:45] matthewd: Otherwise, look at the most recent file in db/migrate/
[06:27:27] matthewd: Right, so that's empty. You need to rollback the migrate you ran, then edit that file to tell it to add the new column
[06:28:22] matthewd: So first `rails db:rollback`
[06:31:00] matthewd: Okay, hopefully that's got you in the right place
[06:31:13] matthewd: So now you can delete one of those, and change the other to actually add the column

2017-11-18

[07:08:17] matthewd: Having a separate class for the root seems to undermine that
[07:10:55] matthewd: Similarly, why are Node and Tree separate? If the methods were on Node, they could naturally operate on a subtree
[07:15:13] matthewd: children.each {|c| return if c.push(v) }; children << v
[07:16:48] matthewd: I don't understand what problem this is solving. Right now, it looks like it's creating a complicated API that I wouldn't want to use, and then the implementation flows from that. How should you refactor the implementation? By changing the API.
[07:19:29] matthewd: Why are there separate Flex and non-Flex nodes?
[07:19:44] matthewd: Basically: why isn't this all one Node class?
[07:31:43] matthewd: hailey27: Does https://github.com/sparklemotion/nokogiri/issues/740#issuecomment-300370426 help?
[07:42:25] matthewd: Seems like you could do https://github.com/sparklemotion/nokogiri/blob/master/lib/nokogiri/xml/document_fragment.rb#L22-L25 for yourself
[07:43:01] matthewd: Create an empty fragment, parse as a full document, then move the children over
[07:43:59] matthewd: Alternatively, I don't know whether the ctx parameter there could be useful as an avenue to get some hints into the parser?
[07:46:04] matthewd: Given it's all the "real" documentfragment constructor seems to do, I don't think I'd even feel that bad about it :)
[07:48:36] matthewd: ACTION checks blame
[07:48:41] matthewd: Yup, checks out: https://github.com/sparklemotion/nokogiri/commit/c23eb88b2707a82bc04f807d2d043755ff503c8e
[07:49:44] matthewd: The person I assumed had written the comment :P
[07:56:11] matthewd: He's also on both the Ruby and Rails core teams
[09:34:37] matthewd: Andr3as: Use save! (and friends) if you're not checking the result of calling save (etc)
[09:38:03] matthewd: No. Use the bang unless you're checking the return value.
[10:19:58] matthewd: phedkvist: `git fetch origin; git rebase -i origin/master`, then delete all the lines that aren't yours
[10:35:58] matthewd: phedkvist: No worries! Do you happen to know how you got into that situation, btw?
[10:36:41] matthewd: I'm wondering if we have something to fix in our docs, because you're not the first person I've seen with that problem
[10:53:59] matthewd: phedkvist: Weird.. I don't immediately see where that could've gone wrong. (Though I assume it was the rebase, somehow)
[10:54:55] matthewd: megan1993: Forms are generated in views, which don't have any influence over the subsequent incoming request
[10:57:10] matthewd: megan1993: Correct. You'll probably want a separate validation on the model.
[10:58:12] matthewd: phedkvist: Ah, I thought the push was the end :) I guess the pull maybe, then