New revs - Public comments

Nao

  • Dadman with a boy
  • Posts: 16,082

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #361, on April 25th, 2012, 06:42 PM »
It's nice to see loadLanguage using arrays :)
Quote
BTW, you didn't tell me whether you thought it'd be best to rewrite number_context to use an array directly?
Oh and we could for instance put a string instead of an array, and that would mean 'no special treatment' (i.e. always '_n'), meaning that instead of doing sprintf() on strings, we could directly call number_context even if we don't have special treatment for them in French or English -- because it doesn't mean other languages won't need it...
Actually it could be better to use an array like that. The thing is, the sprintf does actually inject the value in, so even on _n cases you'd still have to always inject it, no?


Regarding 5.4's inclusion of array syntax... it's an interesting choice but one that I personally would have put into PHP sooner if given a choice, putting it at a .x release makes that quite hard for a language construct; things like namespaces in 5.3 is a feature not a language construct and it's not so hard to get your head around that as a requirement. But as a language construct, I think it should have been pushed into the next major release, not a minor one, personally.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Aaron

  • Posts: 356
Re: New revs - Public comments
« Reply #362, on April 25th, 2012, 07:44 PM »
Not sure where to post this, but can I just say I like having the action buttons below the posts? It could do with some more tweaking (the 'more' menu is empty for me now, for instance), but it's a promising move, I think. :)
"The entire British Empire was built on cups of tea … and if you think I'm going to war without one, mate, you're mistaken."

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #363, on April 25th, 2012, 07:46 PM »
Hmm, I thought it was a bug originally >_> I guess I'm not yet adjusted to it, and I'm not entirely sure I like it yet, but maybe it'll grow on me. Especially since the checkbox for it is kept separate now from that menu making it even more weird for me. :/

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #364, on April 26th, 2012, 05:04 PM »
Quote from Arantor on April 25th, 2012, 06:42 PM
It's nice to see loadLanguage using arrays :)
Indeed!
Is there anything left with a '+' syntax in Wedge...? I don't think so, but...
Quote
Actually it could be better to use an array like that. The thing is, the sprintf does actually inject the value in, so even on _n cases you'd still have to always inject it, no?
I have no idea what you mean, sorry.
Quote
Regarding 5.4's inclusion of array syntax... it's an interesting choice but one that I personally would have put into PHP sooner if given a choice, putting it at a .x release makes that quite hard for a language construct; things like namespaces in 5.3 is a feature not a language construct and it's not so hard to get your head around that as a requirement. But as a language construct, I think it should have been pushed into the next major release, not a minor one, personally.
Given how many years happen between each major release, I think it's safe to say that PHP 5.4 is a major update -- if only because it'll break stuff and server admins will take 10 years to install it, blah blah...
Posted: April 26th, 2012, 05:03 PM
Quote from Aaron on April 25th, 2012, 07:44 PM
Not sure where to post this, but can I just say I like having the action buttons below the posts? It could do with some more tweaking (the 'more' menu is empty for me now, for instance), but it's a promising move, I think. :)
Thanks :)
As for the More menu, I need to look into that...
Currently I'm fighting against an attempt at rewriting the button icon code. I hate CSS precedence... >_<

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #365, on April 26th, 2012, 07:39 PM »
I didn't think there were any left anyway, I thought the only use was index+Modifications, which I killed a bit back anyway.
Quote
I have no idea what you mean, sorry.
You can't do some magic to 'no special cases' and magically expect _n to just work. Let's go back to your suggestion:
Quote
Oh and we could for instance put a string instead of an array, and that would mean 'no special treatment' (i.e. always '_n'), meaning that instead of doing sprintf() on strings, we could directly call number_context even if we don't have special treatment for them in French or English -- because it doesn't mean other languages won't need it...
There is no way that can work without using sprintf on that string. Unless the string doesn't have the number in it in the first place, the whole point is that a _n number string will still have %1$s in it somewhere to indicate where the number will be injected (and it will be s not d because it will be injected as a string)

_1 cases may well have 1 in it and not have any need to inject a number, as well as _0 cases might avoid it by being 'No ... found' or whatever, so there won't be a number. But _n cases will have a number that needs to be added, so it has to be sprintf'd.
Quote
Given how many years happen between each major release, I think it's safe to say that PHP 5.4 is a major update -- if only because it'll break stuff and server admins will take 10 years to install it, blah blah...
That's the thing, PHP 5.4 isn't a particularly major update compared to 5.3. And already I gather 5.4.1 is out.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #366, on April 27th, 2012, 04:55 PM »
Quote from Arantor on April 26th, 2012, 07:39 PM
I didn't think there were any left anyway, I thought the only use was index+Modifications, which I killed a bit back anyway.
There were half a dozen or so left in the overall codebase.
Quote
You can't do some magic to 'no special cases' and magically expect _n to just work.
Hmm, with all due respect, did you look at my commit...? Because it returns a sprintf'ed string every time, even if the string isn't an array... (Which basically means, "it's _n all the way.")

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #367, on April 27th, 2012, 04:59 PM »
Quote
Hmm, with all due respect, did you look at my commit...? Because it returns a sprintf'ed string every time, even if the string isn't an array... (Which basically means, "it's _n all the way.")
No, I was responding to your comment, which seemed to imply that sprintf wasn't needed, and I wasn't sure how the code seemed relevant as it seemed to be discussing something not yet entirely implemented.

In any case I have a lot going on in my head right now, making it hard to cope with the fact that in between trying to work on Wedge, I'm also trying to learn Node.js[1] + Socket.IO + Express + MongoDB for something I need to build, plus some other stuff going on that is... complicated, so I do miss a lot of the subtlety, even though I have looked over the commits lately.
 1. Holy fuck this is a piece of work, even without the nightmare that is their module manager

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #368, on April 27th, 2012, 05:50 PM »
Looks fun...
Anyway, number_context() works just fine, don't worry :)

And node.js, given all the coverage it got, I assumed it was less 'geek-oriented' than it seemed.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #369, on April 27th, 2012, 05:58 PM »
Oh, it's quite geek orientated to do properly.

Consider that everything you do has a callback function. Want a DB query? Issue the query and handle content in a callback. Want to do another query as a consequence of that one? In that callback, issue the next one and deal with the response in another callback.

It quickly gets... interesting.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #370, on April 28th, 2012, 12:27 PM »
So... About the new blog style...

- I actually liked the earlier one, but that's because I'm crazy, don't worry about me. Mainly, I want the post width to be approx. the same as in display mode, because blog posts can be fine-tuned to the pixel, and it's always best to have a consistent width on them. Of course, I could apply some restrictions by CSS, or simply take from my Noisen templates...
- The view count... Wouldn't it be best next to the reply count? I don't know.
- This is unrelated to the style, but it looks like blog posts are ordered by last answer -- and it actually gives the last post's date as the original post date in the header... (Just have a look at the dev blog :))

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #371, on April 28th, 2012, 02:17 PM »
Well, it was annoying me that we had about a 1/3 of the area tied up with an almost entirely empty pair of table cells, which were legacy and needed to be moved somewhere.

Actually, as far as the view vs reply count, I figured that the view count was only of modest importance and thus fitted in small writing next to extra information rather than being as prominent as at the foot of the post (i.e. where you read the post then press reply to it or to see the comments) Can try moving it if you want, no big deal.

In that case, check the board's configuration and check you set the default ordering correctly ;)

willemjan

  • Projects, projects, projects......
  • Posts: 25
Re: New revs - Public comments
« Reply #372, on April 28th, 2012, 03:06 PM »
I'm not sure what you guys have done, but this site allways looked great on my phone. Today well errr lets say it did not. It seems to have shrinked in width or something?

Edit to add: Got an HTC Desire with Android


Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #374, on April 29th, 2012, 08:19 AM »
Quote from Arantor on April 28th, 2012, 02:17 PM
Well, it was annoying me that we had about a 1/3 of the area tied up with an almost entirely empty pair of table cells, which were legacy and needed to be moved somewhere.
Then are you annoyed too at the extra space left by the sidebar in long pages...?
(Heck, I could very well set up the sidebar so that it's a float and thus allows the page to extend, but I'm not a big fan of the idea of not letting the user control the maximum width of a post, at least per page...)
Quote
In that case, check the board's configuration and check you set the default ordering correctly ;)
Default ordering? There's default theme, default language, but no default ordering, is there...?