-
-
Save michaelcullum/26dc674c0062f128c1ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[00:37:10] <an-> naderman: class loader can't load from directories having underscores | |
[00:37:24] <an-> bit of a problem for extensions | |
[00:37:28] --> rxu (~Miranda@phpbb/developer/rxu) has joined #phpBB-dev | |
[00:37:41] *** Mode #phpBB-dev +o rxu by ChanServ | |
[00:38:12] <naderman> an-: yes | |
[00:38:15] <naderman> I pointed that out before | |
[00:38:24] <an-> was that intended? | |
[00:38:25] <naderman> the thing is, what are we going to use for a separator instead? | |
[00:38:26] <naderman> yes | |
[00:38:32] <naderman> we want a direct mapping class name => dir | |
[00:38:44] <naderman> if we allow underscores, it's very dependent on dir structure to load the class | |
[00:38:49] <an-> well you can look at each _ and see if it works | |
[00:38:52] <naderman> what do you do if there is both foo/bar and foo_bar? | |
[00:39:17] <naderman> basically the idea was to have a clear classname => path mapping | |
[00:39:26] <naderman> that doesn't require looking at the file structure | |
[00:39:34] <naderman> hence it doesn't do _ in directory names | |
[00:39:35] <an-> so you're suggesting indexpagetitle as an extension name then | |
[00:39:37] <an-> or not | |
[00:39:42] <naderman> if we had two separators it would get easier | |
[00:39:58] <naderman> well I was really hoping we'd come up with something clever instead | |
[00:40:08] <naderman> or we end up with camel cased extension names | |
[00:40:12] <an-> let's use \ | |
[00:40:13] <naderman> which none of us really want either | |
[00:40:17] <naderman> so really I don't know | |
[00:40:22] <naderman> well now that we use PHP 5.3 | |
[00:40:28] <naderman> we could just change it all to use namespaces | |
[00:40:30] <an-> ah snap | |
[00:40:30] <naderman> for the new classes | |
[00:40:33] <naderman> then we can do | |
[00:40:34] <naderman> \ | |
[00:40:39] <naderman> and allow _ in the dir/class name | |
[00:40:53] <an-> my pointless remark happens to be the best and valid solution | |
[00:41:00] <imkingdavid> an- have you had a chance to look at the tests https://github.com/phpbb/phpbb3/pull/561 ? I don't see what I'm doing wrong | |
[00:41:05] <imkingdavid> or naderman or anyone really can loo | |
[00:41:07] <imkingdavid> look* | |
[00:41:07] <an-> not yet sorry | |
[00:41:12] <imkingdavid> okay no problem | |
[00:41:36] <an-> any problem with namespaces? | |
[00:41:44] <an-> other than me having to type the stupid backslash all the time | |
[00:42:07] <naderman> an-: just that we need to change it all | |
[00:42:11] <an-> and will it work with our autoloader | |
[00:42:18] <naderman> but since it's all phpBB 3.1 anyway that's ok | |
[00:42:20] <naderman> no release yet | |
[00:42:30] <an-> all? | |
[00:42:32] <naderman> an-: well we'll have to review a bunch of code including auto loader | |
[00:42:38] <rxu> Dicky : hey, commits in #628 looks messed up | |
[00:42:42] <naderman> an-: well all the prefixed class/function names? | |
[00:42:49] <an-> this is for extensions | |
[00:42:58] <naderman> well auto loader is for everything | |
[00:43:07] <an-> we always start with path and then we get class names, correct? | |
[00:43:07] <naderman> would be kind of weird to use this for extensions but nothing else? | |
[00:43:11] <naderman> what? | |
[00:43:16] <naderman> the idea was: | |
[00:43:19] <an-> we can transform to namespace::class name somewhere in the core? | |
[00:43:24] <an-> and then that will work? | |
[00:43:29] <naderman> phpbb\ext\foo_bar\my\class_name | |
[00:43:38] <an-> oh | |
[00:43:39] <naderman> no? | |
[00:43:41] <an-> hm | |
[00:43:43] <an-> i don't know | |
[00:43:47] <naderman> well that would be the proper way | |
[00:43:49] <naderman> \ => / | |
[00:43:52] <naderman> _ => _ | |
[00:43:53] <an-> i tried my best to stay away from backslashes in php | |
[00:43:53] <naderman> done | |
[00:45:12] <an-> backslashes are a pain to type | |
[00:45:34] <naderman> well survivable :P | |
[00:45:43] <naderman> well I recommend you think about this naming thing a bit | |
[00:45:50] <naderman> maybe you come up with something more workable than me | |
[00:46:11] <naderman> I kind of gave up on this and decided I don't care if extensions have longanddifficulttounderstandnames | |
[00:46:17] <an-> and i have some fairly standard non-us keyboard on this laptop | |
[00:46:33] <an-> which means they are a pain to type for a significant portion of the world | |
[00:46:37] <-- onealns (~onealns@cpe-184-57-234-53.cinci.res.rr.com) has quit | |
[00:47:11] <an-> and i have to convert all of the code | |
[00:47:15] <an-> adding insult to injury | |
[00:47:44] <unknownbliss> DavidIQ (and naderman) ready for me to force push and break it? | |
[00:47:50] <an-> extensions have a separate autoloader | |
[00:48:04] <an-> what if for extensions we allow underscores in extension name? | |
[00:48:14] <an-> which would be 3rd level in class names and 2nd level in paths | |
[00:48:15] <naderman> unknownbliss: what? | |
[00:48:20] <naderman> no force push ever | |
[00:48:21] <naderman> wtf | |
[00:48:33] <naderman> unknownbliss: what are you force pushing to? | |
[00:48:35] <unknownbliss> A revert was messed up in the titania repo | |
[00:48:44] <naderman> why does that require a force push? | |
[00:48:52] <naderman> can't you just commit proper reverts? | |
[00:49:05] <naderman> the rule really is very simple | |
[00:49:14] <naderman> never ever force push to a public repo other people use | |
[00:49:29] <an-> you can also do creative merging with the ours strategy to reset one tree to another | |
[00:49:44] <naderman> an-: well there are plenty of options | |
[00:49:48] <naderman> force push isn't one of them | |
[00:50:02] <unknownbliss> Raimon reverted a branch merge to revert two commits. Then he reverted a merge commit. | |
[00:50:09] <an-> yeah you probably shouldn't force push ever | |
[00:50:25] <naderman> an-: well to a canonical repo like phpbb3 or customisation-db anyway | |
[00:50:29] <an-> github prs get screwed up quite spectacularly if you do, as i recently noticed | |
[00:50:35] <an-> that's what i meant | |
[00:50:39] <naderman> yeah | |
[00:51:03] <naderman> unknownbliss: so? | |
[00:51:20] <unknownbliss> so it should be rebased out? | |
[00:51:23] <naderman> no | |
[00:51:28] <naderman> it's the official repo | |
[00:51:31] <unknownbliss> ok | |
[00:51:31] <naderman> nothing gets rebased out | |
[00:51:38] <naderman> if there was a revert, then there was a revert | |
[00:51:50] <naderman> you don't get to rewrite history in the official repo | |
[00:52:18] <naderman> it's unfortunate, but people should just learn from the mistake and avoid it next time | |
[00:52:24] <unknownbliss> ok | |
[00:54:19] <an-> unknownbliss: https://github.com/p-scratch/temp1/tree/master/ext/indexpagetitle | |
[00:54:47] <an-> take care not to enable the other extension | |
[00:56:42] <an-> you create event/*_subscriber.php files | |
[00:56:55] <an-> as many as you want | |
[00:56:57] <unknownbliss> hm... | |
[00:56:58] <unknownbliss> nice | |
[00:57:03] <an-> inside of each you have static public function get_subscribed_events() | |
[00:57:17] <an-> there you define which events you receive | |
[00:57:38] <an-> the simplest option is you have an instance function for each event like i have done | |
[00:57:46] <an-> then you just need the ledge name and the name of the function | |
[00:58:12] <an-> event handlers (there would be hooks in our terminology) receive $event as the argument | |
[00:58:23] <an-> you can use array access to get and set variables/parameters | |
[00:58:38] <an-> you can only set the parameters that are given to the event | |
[00:58:51] <an-> technically the hook can set other parameters but they will be ignored by the core | |
[00:59:34] <an-> honestly i'd rather have smashed extension names than backslashes | |
[00:59:49] <an-> so someone else can then deal with this particular issue | |
[01:00:08] <naderman> well backslashes are also just a character | |
[01:00:11] <naderman> don't find that so bad | |
[01:00:22] <naderman> the semantics of namespaces and use statements is a bit more worrying I think | |
[01:00:34] <an-> on my keyboard backslash is 1. under a pinky 2. half the size of other letter keys | |
[01:00:41] <an-> 3. next to enter | |
[01:00:46] <naderman> I mean you can't just do function foo\bar\lala | |
[01:00:57] <naderman> but you need the respective namespace statements | |
[01:01:00] <an-> i mistype it twice as much as i enter it correctly | |
[01:01:06] <naderman> and make sure it doesn't apply to old functions without namespace | |
[01:01:07] <naderman> etc. | |
[01:01:26] <an-> and every other time i screw it up i have to backspace over an entire line worth of indentation | |
[01:01:30] <imkingdavid> imo if we can't have namespaces or _ we should use camelCase | |
[01:01:36] <imkingdavid> but I don't mind namespaces | |
[01:03:33] <an-> (21:03:58) naderman: the semantics of namespaces and use statements is a bit more worrying I think - which is? | |
[01:03:44] <an-> surely they couldn't have gotten *that* wrong | |
[01:03:55] <naderman> an-: those two vs. the fact that there are backslashes | |
[01:04:19] <an-> hmm? didn't parse at all | |
[01:04:22] <naderman> an-: no, but it means even more change if we want to use it instead of prefixing | |
[01:04:37] <an-> ah | |
[01:04:44] <naderman> an-: you said you dislike backslashes => I say, I'm more worried about namespace semantics (part of which is use statements) | |
[01:05:14] <an-> does that mean you are not in favor of namespaces? | |
[01:05:18] <naderman> I am | |
[01:05:27] <naderman> just not sure how good an idea it is to change this for 3.1 now | |
[01:05:34] <an-> ok | |
[01:05:36] <an-> how about | |
[01:05:39] <an-> no backslashes and no camelcase | |
[01:05:43] <an-> what else can we have | |
[01:05:50] <naderman> yeah that's what I kept asking | |
[01:05:53] <naderman> but really no idea | |
[01:06:07] <imkingdavid> backwards camelcase? IaMaNeXTENSION? :P lol just kidding | |
[01:06:10] <imkingdavid> idk | |
[01:06:34] <imkingdavid> might just have to have longnameslikethis | |
[01:06:56] <an-> ^ php did that for the first 4 versions most of the time | |
[01:07:15] <an-> obviously they couldn't have been doing it all of the time, that would be heresy | |
[01:07:45] <unknownbliss> an-: Sorry, I missed that as I was fiddling with titania. | |
[01:07:47] <an-> python does that frequently also | |
[01:07:57] <an-> it's not that bad really | |
[01:08:09] <unknownbliss> whats wrong with normal extension names with underscores and forward slashes? | |
[01:08:26] <naderman> unknownbliss: underscores do not work | |
[01:08:31] <an-> can't have underscores in directory names that have classes which we autoload | |
[01:08:34] <naderman> unknownbliss: dir names must not contain underscores | |
[01:08:39] <unknownbliss> ah | |
[01:09:00] <naderman> which really is kind of fail, because everyone will try to use that | |
[01:09:05] <unknownbliss> so extension clean names can't use underscores either now? | |
[01:09:15] <an-> phpbb_ext_indexpagetitle_event_index_page_title_subscriber | |
[01:09:19] <an-> it's not terrible really | |
[01:09:23] <an-> you can see where the extension name is | |
[01:09:29] <naderman> indeed | |
[01:09:30] <unknownbliss> in that case I'm going to set the extensions manager to show on the list view the display name from the extension.json | |
[01:09:42] <unknownbliss> so on the UI they see the nice name, not the clean one | |
[01:09:44] <naderman> an-: "it's not terrible" is why I just left it like that in the end | |
[01:09:49] <unknownbliss> extensions admin* | |
[01:09:52] <naderman> unknownbliss: you can have underscores in the name | |
[01:09:59] <naderman> unknownbliss: it means they are in a subdirectory | |
[01:10:04] <unknownbliss> oh | |
[01:10:13] <naderman> e.g. ext/foo/extensionone ext/foo/extensiontwo | |
[01:10:13] <an-> naderman: are we talking about the same thing? | |
[01:10:18] <naderman> is foo_extensionone | |
[01:10:22] <naderman> and foo_extensiontwo | |
[01:10:28] <an-> hmm | |
[01:10:29] <unknownbliss> ok | |
[01:10:30] <naderman> but the extension is not in ext/foo | |
[01:10:37] <an-> what was the reasoning behind extensions in subdirectories again? | |
[01:10:43] <naderman> an-: I also didn't have this at first, but then you and other forced me to add subdirectories | |
[01:10:48] <imkingdavid> an-: venders | |
[01:10:50] <naderman> an-: well grouping extensions by vendor | |
[01:10:52] <unknownbliss> so you could have vendor then name | |
[01:10:52] <imkingdavid> I think | |
[01:10:56] <unknownbliss> yeah | |
[01:11:03] <an-> should really not use swear words | |
[01:11:08] <naderman> lol | |
[01:11:12] <an-> s/vendor/author/ | |
[01:11:13] <unknownbliss> hm? | |
[01:11:20] <unknownbliss> oh | |
[01:11:26] <naderman> an-: you really are hardcore free software | |
[01:11:27] <naderman> :P | |
[01:11:31] <unknownbliss> he | |
[01:11:44] <an-> no, vendor means you copy someone else's project into your tree | |
[01:11:55] <naderman> vendor means they sold you software | |
[01:12:08] <an-> sure | |
[01:12:11] <imkingdavid> semantics :P | |
[01:12:16] <naderman> doesn't have anything to do with copying | |
[01:12:18] <an-> but the bigger confusion is what i just said | |
[01:12:22] <unknownbliss> vendor means a machine you get nice snacks out of | |
[01:12:24] <unknownbliss> :P | |
[01:12:30] <naderman> why would vendor have anything to do with copying | |
[01:12:45] <naderman> vendor == 3rd party providing code | |
[01:12:47] <an-> copying or git submodules | |
[01:12:50] <an-> yes | |
[01:12:57] <naderman> and if ext/<some vendor>/foobar | |
[01:13:00] <an-> so when you say "vendor" and there is no 3rd party code involved it's confusing | |
[01:13:00] <naderman> then that is exactly it | |
[01:13:10] <naderman> that vendor <some vendor> provided you with 3rd party extension foobar | |
[01:13:32] <imkingdavid> extensions are 3rd party | |
[01:13:33] <an-> well a vendor provided you with phpbb | |
[01:13:34] <naderman> if you are working on the extension you are the vendor of that extension | |
[01:13:40] <naderman> yes phpbb is a vendor | |
[01:13:46] <naderman> ext/phpbb/coreext would work well | |
[01:14:03] <an-> but that's not people mean when they say "vendored code" | |
[01:14:18] <naderman> that's what people mean when they use the word vendor | |
[01:14:25] <an-> that means, "i took that code and copied it into my tree instead of using a copy installed already elsewhere" | |
[01:14:31] <naderman> "vendored" is some weird verb formed from some misconception of the noun vendor | |
[01:14:39] <naderman> an-: you're doing too much rails really | |
[01:14:49] <an-> you do the same thing in composer, don't you? | |
[01:14:52] <unknownbliss> anyway | |
[01:15:06] <naderman> an-: in composer we call the directory containing 3rd party code the "vendor" directory | |
[01:15:10] <an-> php land is borrowing this meaning from rails | |
[01:15:20] <naderman> in which every project is stored under <vendor name>/<project name> | |
[01:15:23] <unknownbliss> vendor = providor of software or 3rd party software depending on the context | |
[01:15:30] <naderman> an-: the verb "vendor" is never used | |
[01:15:36] <naderman> unknownbliss: exactly | |
[01:15:48] <unknownbliss> so, moving on. :P | |
[01:15:50] <an-> can we just use author and get on with it? | |
[01:15:53] <naderman> no | |
[01:15:56] <naderman> vendor is correct | |
[01:16:00] <naderman> it's not necessarily the author | |
[01:16:04] <naderman> it is definitely the vendor | |
[01:16:07] <unknownbliss> for example | |
[01:16:26] <unknownbliss> my blog extension with ikd. There are three of us so we just go for phpBB Blog vendor | |
[01:17:02] <unknownbliss> phpBB doesn't have an author, but it has a vendor. :) | |
[01:18:01] <an-> +require($phpbb_root_path . 'vendor/.composer/autoload.php'); | |
[01:18:14] <an-> does vendor there have the same meaning as the one you are attaching to it in the current conversation? | |
[01:20:17] <an-> https://github.com/phpbb/phpbb3/pull/529/files is the url for that | |
[01:20:43] <naderman> an-: yes | |
[01:21:02] <naderman> vendor/ == code from vendors vendor/.composer == code from vendor composer | |
[01:21:20] <an-> ok let's move on | |
[01:22:37] <unknownbliss> an- and naderman: Casting votes on args vs params | |
[01:22:43] <unknownbliss> args makes more sense | |
[01:22:55] <naderman> unknownbliss: huh? | |
[01:22:58] <naderman> arguments or parameters | |
[01:23:03] <naderman> neither of your options | |
[01:23:13] <naderman> typically parameters is what you want | |
[01:23:18] <unknownbliss> hm... | |
[01:23:20] <naderman> well no | |
[01:23:25] <naderman> arguments are solely numbered | |
[01:23:28] <naderman> but unnamed | |
[01:23:33] <naderman> unknownbliss: what is this about anyway? | |
[01:23:40] <naderman> unknownbliss: don't use abbreviations without good reason | |
[01:23:45] <unknownbliss> sorry | |
[01:23:51] <naderman> couply extra characters don't hurt normally | |
[01:23:58] -*- unknownbliss has a good reason. Its half past 1 AM | |
[01:23:58] <naderman> and using full word often helps understanding | |
[01:24:00] <unknownbliss> :P | |
[01:24:02] <naderman> *couple | |
[01:24:11] <naderman> *words | |
[01:24:14] <naderman> time for bed | |
[01:24:16] <unknownbliss> normally I dont. I'm just tired. :P | |
[01:24:17] <DavidIQ> unless it's called phpBBasicSupercalifragilisticespialidocious | |
[01:24:17] <unknownbliss> nah | |
[01:24:33] <an-> A parameter is the variable which is part of the method's signature (method declaration). An argument is an expression used when calling the method. | |
[01:24:39] <an-> from that definition it's parameter | |
[01:24:42] <an-> http://stackoverflow.com/questions/1788923/parameter-vs-argument | |
[01:24:51] -*- naderman hits DavidIQ with his DavidIQOnTheHeadHitHammerWithExtraSpikesWhichHurtVeryMuch | |
[01:24:53] <imkingdavid> argument | |
[01:25:06] <DavidIQ> lol | |
[01:25:09] <an-> Parameters are the things defined by functions as input, arguments are the things passed as parameters. | |
[01:25:11] <naderman> an-: thanks that makes sense | |
[01:25:15] <an-> http://stackoverflow.com/questions/427653/arguments-or-parameters | |
[01:25:19] -*- DavidIQ gets some ice while grumbling un-niceties at naderman | |
[01:25:21] <an-> someone else linked to this earlier | |
[01:26:30] <an-> Rinat has the Formal definition--what you have isn't wrong, but it isn't quite right either - ??? | |
[01:26:56] <naderman> well I'm off to bed, night | |
[01:27:20] <an-> "argument name" sounds quite wrong | |
[01:28:20] <an-> There is already a Wikipedia entry on the subject (see Parameter) that defines and distinguishes the terms parameter and argument. In short, a parameter is part of the function/procedure/method signature and an argument is the actual value supplied at run-time and/or call-site for the parameter. | |
[01:28:24] <an-> wikipedia cannot be wrong | |
[01:28:28] <an-> http://en.wikipedia.org/wiki/Parameter_%28computer_science%29 | |
[01:29:08] <an-> In the most common case, call-by-value, a parameter acts within the subroutine as a local (isolated) copy of the argument, | |
[01:29:17] <an-> try to flip the words in that sentence | |
[01:29:39] <an-> also http://en.wikipedia.org/wiki/Parameter_%28computer_programming%29#Parameters_and_arguments | |
[01:30:45] <naderman> In the least common case, call-by-reference, an argument acts outside the subroutine as a global (shared) copy of the parameter | |
[01:30:46] <naderman> works | |
[01:30:50] <naderman> or not | |
[01:30:52] <naderman> well sort of | |
[01:31:24] <naderman> not really a copy if it's a reference | |
[01:31:32] <an-> well my vote is parameter as consistent with everything i just posted | |
[01:31:35] <naderman> although I replaced copy only in one place so my fault | |
[01:31:39] <naderman> an-: yes | |
[01:31:40] <naderman> absolutely | |
[01:32:12] <an-> we also need to consider events/listeners vs hooks/ledges | |
[01:32:34] <an-> problem is we do expose events and listeners to extensions | |
[01:32:36] <an-> see https://github.com/p-scratch/temp1/blob/master/ext/indexpagetitle/event/index_page_title_subscriber.php | |
[01:33:07] <an-> i would consider editing those interfaces to use ledge vocabulary | |
[01:34:18] <Dicky> rxu, re: PR 628, I have no idea how those commits got there and I do not know how to fix. | |
[01:34:31] <an-> rxu: Dicky i'll take care of it | |
[01:34:38] <naderman> an-: I generally think event/listener is better | |
[01:34:43] <naderman> simply because it's more commonly used | |
[01:34:45] <an-> commit message needs to be adjusted also | |
[01:34:54] <-- nickvergessen (~unknown@phpbb/developer/nickvergessen) has quit (Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/) | |
[01:35:06] <an-> what about conflicts with our glorious nonexistent event system? | |
[01:35:23] <naderman> an-: call those hooks if we ever get it | |
[01:35:26] <naderman> or "user events"? | |
[01:35:29] <naderman> or something else | |
[01:35:37] <naderman> let's cross that bridge once we get there | |
[01:35:54] <an-> so RUNHOOKS -> event? | |
[01:35:59] <rxu> an- : thanks | |
[01:36:05] <naderman> an-: yup | |
[01:36:16] <naderman> a template event or some such | |
[01:36:26] <naderman> could do | |
[01:36:31] <naderman> TRIGGER_EVENT | |
[01:36:32] <naderman> or so | |
[01:36:36] <naderman> if you want a verb | |
[01:36:44] <an-> i think event is sufficient | |
[01:36:49] <naderman> k | |
[01:37:02] <unknownbliss> right so we are events/listeners and parameters? | |
[01:37:07] <naderman> yup | |
[01:37:09] <an-> php code already uses events | |
[01:37:20] <an-> hooks -> listeners? | |
[01:37:26] <an-> ledges -> ??? | |
[01:37:35] <naderman> ledge -> event | |
[01:37:37] <naderman> hook -> listener | |
[01:37:41] <an-> ledge is a location | |
[01:37:44] <an-> event is a container | |
[01:37:50] <naderman> an-: no | |
[01:38:19] <naderman> an-: an even has some place/location that triggered it | |
[01:38:28] <naderman> so the event is really all you need to talk about | |
[01:38:34] <naderman> because an event always implies its source | |
[01:38:35] <an-> event is a happening | |
[01:38:38] <naderman> yes | |
[01:38:39] <an-> it is not a location | |
[01:38:43] <naderman> a happening at a location | |
[01:38:52] <naderman> the event tells you the location | |
[01:39:08] <an-> not if we trigger it in more than one place | |
[01:39:20] <an-> but then we'd have to reuse ledge names also | |
[01:39:25] <naderman> well then ledge before was just as ambiguous | |
[01:39:34] -*- unknownbliss is confused | |
[01:39:37] <rxu> ledge is more a hook object for me | |
[01:39:43] <naderman> huh | |
[01:39:44] <naderman> it never was | |
[01:39:59] <naderman> an-: I think an event that could have been triggered multiple ways is just fine | |
[01:40:04] <naderman> the terminology still makes sense | |
[01:40:16] <naderman> an-: but in most cases you don't want to trigger the same event in multiple places anyway | |
[01:40:17] <an-> i will attempt to reformulate the hooks commits in events and listeners | |
[01:40:27] <naderman> because you do want them to be distinguishible | |
[01:40:32] <unknownbliss> ledge -> ? | |
[01:40:32] <unknownbliss> hook -> ? | |
[01:40:33] <naderman> can still attach the same listener two both events | |
[01:40:42] <naderman> unknownbliss: | |
[01:40:42] <naderman> [02:37:35] <naderman> ledge -> event | |
[01:40:43] <naderman> [02:37:37] <naderman> hook -> listener | |
[01:40:47] <unknownbliss> oh sorry | |
[01:40:56] <unknownbliss> hm... | |
[01:40:57] <unknownbliss> ok | |
[01:41:06] <rxu> naderman : it's referred as 'hook location' for now | |
[01:41:07] <naderman> an-: same event really shouldn't be triggered in multiple places I think | |
[01:41:20] <naderman> rxu: well it's not an object | |
[01:41:31] <naderman> rxu: hook location is not an object, ledge is not an object | |
[01:41:39] <rxu> I didn't mean OOP object | |
[01:41:41] <naderman> so I don't understand? | |
[01:41:42] <an-> well if we copy paste code we might copy paste event invocations with it | |
[01:41:42] <naderman> oh | |
[01:41:47] <naderman> rxu: what then? | |
[01:41:49] <an-> other than that probably not | |
[01:41:55] <unknownbliss> rxu: http://wiki.phpbb.com/Add_Ledges | |
[01:42:10] <rxu> probably just bad wording... instance? | |
[01:42:16] <naderman> an-: well I wouldn't entirely rule it out, but I don't think it'll be common enough to warrant consideration regarding the name | |
[01:42:26] <naderman> rxu: instance of what? | |
[01:42:36] <rxu> of hook | |
[01:42:45] <naderman> no that's bad wording too | |
[01:42:46] <rxu> system | |
[01:42:53] <rxu> ok | |
[01:42:56] <rxu> :)) | |
[01:43:02] <naderman> rxu: one "hook location/ledge/event" can cause many "hooks/listeners" to be executed | |
[01:43:07] <naderman> so it's not an "instance" | |
[01:43:56] <naderman> triggering events, which are then processed by listeners makes perfect sense | |
[01:43:59] <unknownbliss> what happens if two events/ledges have the same name? | |
[01:44:05] <unknownbliss> same identifier* | |
[01:44:10] <naderman> unknownbliss: we just discussed that | |
[01:44:16] <naderman> unknownbliss: read my above conversation with an- | |
[01:44:33] <naderman> [02:39:08] <an-> not if we trigger it in more than one place | |
[01:44:33] <naderman> [02:39:20] <an-> but then we'd have to reuse ledge names also | |
[01:44:36] <naderman> [02:39:25] <naderman> well then ledge before was just as ambiguous | |
[01:44:42] <unknownbliss> hm... | |
[01:44:45] <naderman> [02:39:59] <naderman> an-: I think an event that could have been triggered multiple ways is just fine | |
[01:44:45] <naderman> [02:40:04] <naderman> the terminology still makes sense | |
[01:44:45] <naderman> [02:40:16] <naderman> an-: but in most cases you don't want to trigger the same event in multiple places anyway | |
[01:44:50] <naderman> [02:40:27] <naderman> because you do want them to be distinguishible | |
[01:44:54] <naderman> [02:41:07] <naderman> an-: same event really shouldn't be triggered in multiple places I think | |
[01:45:00] <naderman> [02:41:42] <an-> well if we copy paste code we might copy paste event invocations with it | |
[01:45:05] <naderman> [02:41:49] <an-> other than that probably not | |
[01:45:09] <naderman> [02:42:16] <naderman> an-: well I wouldn't entirely rule it out, but I don't think it'll be common enough to warrant consideration regarding the name | |
[01:45:17] <naderman> unknownbliss: understood? | |
[01:45:22] <unknownbliss> yep, thanks | |
[01:45:36] <unknownbliss> sorry, my brain is half asleep | |
[01:45:42] <naderman> mine too ^_^ | |
[01:45:47] <naderman> time for sleep for real now | |
[01:45:48] <naderman> night | |
[01:47:06] <unknownbliss> night |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment