Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Arantor
1051
Features / Re: Github & stuff
« on April 5th, 2013, 01:02 AM »
The question is whether you need private repos or not. If you don't, and most people don't, it's not a problem.

But this is why I use RepositoryHosting ;)
1052
Off-topic / Re: A simple PHP extension... wut?
« on April 5th, 2013, 12:42 AM »
The difference is that at least there you could talk to people without having to spend several minutes even rummaging for somewhere to post. The SMF team at least has a 'feature requests' board, as opposed to the PHP people who have an RFC mailing list but you have to have karma before you can post there but it's not entirely clear how to earn karma >_<
1053
Off-topic / A simple PHP extension... wut?
« on April 5th, 2013, 12:22 AM »
So, while writing the infractions UI, it occurred to me that I'd quite like a feature I've seen in other languages, namely what C# calls the Math.Clamp (or under some cases, Math.Clampf because it's not loosely typed)

In other words, a function that brings this to being a core language feature:
Code: [Select]
function clamp($value, $min, $max)
{
     return min(max($value, $min), $max);
}

So I thought it might be nice to suggest it, it's a small language improvement, makes code more readable and whatnot and I'm put off for life. It's almost like the process is designed to reject external ideas. Adding a feature requires an RFC, https://wiki.php.net/rfc/howto which leads you to https://blogs.oracle.com/opal/entry/the_mysterious_php_rfc_process and I was like 'wut?'

It's stuff like that which means if I want to suggest what is conceptually to me a simple PHP feature, I'd have to learn C, learn PHP's inner code (I have some ideas, but not enough to get out and write this one off the bat) and submit it as a fully fledged patch. Yay.

I'm a little annoyed at the gamut but I do understand. It's sort of nice to be on the other side of the 'YOU KNOW WHAT WOULD BE COOL' debates for a change, sort of refreshing and grounding. But it doesn't feel nice.
1054
The Pub / Re: Don't update log_online for certain actions
« on April 4th, 2013, 07:55 PM »
Quote
Considering I did multiple concessions in this one (including getting rid of the '.xml' to 'feed' action converter for SMF... That one was hard to part with >_<)
That sounds like a plan to me. No-one really worries about feed links when moving from other forum software to/from SMF, I see no reason why we are any different - it's not like we're really an SMF version any more.
Quote
Look at it when you have a minute, and tell me if that's okay.
OK, so quick look. Reusing the gallery code makes plenty of sense when pulled under the feed... and I can understand the need also to initialise it in a way the gallery would expect. Though it might mean a gradual overhaul of the gallery code in time, I don't know.

The reorganisation of manage plugins is fine, and the new hook is fine also though personally I might have called it feed_types since that's what it really is. But 'feed' is absolutely fine too.

On the subject of passing variables by reference, yes, technically we should probably update everything to not have & in it. However it is nice to leave them in to indicate what the rest of the code expects will be passed by reference; the problem is that hooks can dictate the rules themselves because the receiver indicates its nature rather than the caller. But if we indicate what should be passed, and how (because that intimates what is safe to change and what isn't) that should be OK too.

I seem to recall the determine_location hook only really being useful for pretty URLs because anything else would naturally just head to index.php through a conventional scheme. I dunno. It doesn't hurt to have it where it is though it does mean that even non-PURLs cases would go there too.

The feed compatibility with SMF was always one of those tricky things, as was the mgallery->media change. I personally don't feel a burning need to retain compatibility but that's just me. While SMF->Wedge is the obvious target for conversion, there will be conversions from other systems too and I don't see why they should be treated as second class citizens by comparison. The playing field should be kept level where possible.

I'm curious, why should $_GET be used explicitly for actions? There is one interesting circumstance, though I can't remember where it would ever be an issue, is that if both $_POST and $_GET were to provide an action, $_REQUEST would contain the $_POST version not the $_GET one.
1055
The Pub / Re: Don't update log_online for certain actions
« on April 4th, 2013, 07:26 PM »
I haven't actually looked at the commit yet. I'm still trying to get the infractions system done - it's only been gestating for over a year.
1056
The Pub / Re: Don't update log_online for certain actions
« on April 4th, 2013, 04:12 PM »
Quote
I don't want to create a precedent... I just want to be done with this crap!
You're going to create a precedent by specifically writing exceptions.
1057
Features / Re: Miscellaneous/WIP screenshots
« on April 4th, 2013, 05:51 AM »
I think this one is fairly self explanatory.
1058
The Pub / Re: Don't update log_online for certain actions
« on April 4th, 2013, 12:36 AM »
Now you need to add a hook in there for anything else that wants to do the same thing. Creating an exception for the sake of (theoretical) backward compatibility also means creating a precedent and a means for everyone else to do the same.
1059
Off-topic / Re: Doctor Who
« on April 3rd, 2013, 08:52 PM »
The Second Doctor with Jamie and Victoria, back in The Abominable Snowmen.
1060
The Pub / Re: Don't update log_online for certain actions
« on April 3rd, 2013, 08:05 PM »
Quote
And in this particular situation, there is no way for that to happen, so I'm asking you what your preferred solution(s) are...
I outlined two solutions I'd be happy with already.

Short of rewriting how the entire execution flow works, you can't fix it any other way, because what you're asking for is a way to selectively block logging based on a subaction while leaving the main action otherwise logged. But since execution doesn't get to handle subactions until after logging has already occurred, we have a problem in trying to support it like this.

Given that this is very firmly an exception rather than the rule, I don't really want to up-end a lot of code for the sake of an implied backward compatibility that isn't really that important in the grand scheme of things. Normally I'd be more inclined to support it but I'm not that worried here.
1061
The Pub / Re: Don't update log_online for certain actions
« on April 3rd, 2013, 07:41 PM »
*shrug* You do what you feel is important.
1062
The Pub / Re: Don't update log_online for certain actions
« on April 3rd, 2013, 07:24 PM »
Except that if users use pretty URLs it's going to change anyway (since the PURLs scheme doesn't match what's available in any of the SMF mods)

People do expect URLs to change when software changes and it doesn't tend to upset others, I'd personally be inclined to not worry about it and just have it be whatever it is.
1063
The Pub / Re: Don't update log_online for certain actions
« on April 3rd, 2013, 06:53 PM »
Quote
(Of course, adding a param to $action_list isn't gonna help in this situation, either; but I was thinking of WEDGE_NO_LOG in this case.)
WEDGE_NO_LOG had exactly the same problem, incidentally. The old check looked for existence but what happens is that existence will only occur in the directly included file. Look at the code flow - wedge_main runs, figures out the action to be diverted to, the action is loaded, THEN we do the logging, before actually heading to the action itself. This is because a lot of the time redirectexit() or obexit is called manually (which would prevent code flow returning to index.php)

So we have to do the logging before we go to do whatever the action is.

Consequently even your idea of globalling action_no_log isn't going to work because it will have already been logged by the time you get there. It's at the action level, not subaction level, that it happens. And whatever else, your file with that define simply wouldn't have been loaded.

Either move it to the main feed action (which isn't logged either, or shouldn't be IMHO) and then the no-log rule applies there, or its own action which can be excluded as you need.
1064
The Pub / Re: Don't update log_online for certain actions
« on April 3rd, 2013, 04:24 PM »
Quote
Isn't that... 'cleaner'?
No it isn't, seeing that there can already be three parameters (plugin added actions will add function, file, plugin id) which means it would become 3 or 4 parameters depending on plugin.
Quote
It seems technically doable, and IIRC $action_list can be altered by plugins anyway, can't it..?
The only issue is with extra_actions... It's no longer the same 'format'. But I don't see the point of this one either... Why not, simply add to $action_list..? Isn't this a global already? Yes it is...
I explained all this when I wrote it into the plugin manager.

The first question: "Is it truly and completely sane to load a function to run a function, every page load, just to add one line to an array?" (Rinse, repeat for every plugin that adds an action.)

Of course it's not. Which is why the plugin manager can add actions directly. The whole point of plugins declaring actions up front in plugin-info.xml is so that they don't have to be hooked in the conventional sense but can be added on to the list via the point when hooks are loaded (when $settings is loaded)

That's why we don't add directly to $action_list. But if you really believe it would be better to have files loaded just to run hooks to extend the actions list, like SMF does, we can remove it. I'd really prefer you didn't, though, since it would also mean rewriting part of the plugin system (both loader and manager)

This is also why we have the third parameter in the first place. Plugins do not and cannot use loadSource which is what $action_list expects. The third parameter is the plugin id so that it knows 1) to even call loadPluginSource and 2) it has all the information it actually needs to do so.
Quote
I thought you'd be using wingrep or equivalent, with a set of common used words.. No?
Eh, Notepad++ can do that. And I did start out with that but 'licence' wasn't one of the words I checked for. That, and the fact I wanted to skim through the language files, nice to see things I don't look at very often.
Quote
(It's pretty simple, post text is 'stuck' to the gray line that separates it from the post header, "Posted at ... by ...", you know.)
Not observed in Chrome 26. I still have issues with the horizontal scrollbars though.
1065
The Pub / Re: Don't update log_online for certain actions
« on April 3rd, 2013, 03:06 PM »
Quote
- So that's the reason why there were more 'unknown action' entries... These were from both 'notifications' and 'feeds'. It's interesting to know that there are so many feed requests, BTW...!
Given how many places it's linked, not really a surprise.
Quote
- But call me crazy, I STILL have to ask the question: what difference does it make that a bot is downloading a feed or a page...?
SMF blocked them showing up in the online log. We just inherited that behaviour.

As for whether it is meaningful, I would say it is. Given how often feeds get requested, not running additional (and not entirely cheap) queries is quite a nice thing.
Quote
- Also, there was still a media_wo_feed entry, which should (logically) not be recorded either, if main feeds aren't...?
The deal is that anything hitting action=feed will not be logged. If the media feed is handled through the feed handler it will also not be logged. If it's handled through the media area it will be logged.
Quote
- I've noticed that Who.english-uk.php has a use of 'license' in one string and 'licence' in another. I've changed it to 'licence', I suppose that was the intention...?
Yeah, I didn't check that one as heavily as I should. It's really, really, really boring to go through English US to look for differences especially when you see the alternative spellings so often.
Quote
- Also changed an 'analyzer' to 'analyser'. Is that correct? Finally, removed plenty of language strings that were actually identical to Who.english.php's.
Only in English UK. Oh and you mean the credits items. I had a feeling they were left in for a reason but I can't remember what.
Quote
became busy on something else, and forgot to check when you got back.
Pretty much.