New revs - Public comments

MultiformeIngegno

  • Posts: 1,337
Re: New revs - Public comments
« Reply #540, on February 3rd, 2013, 10:27 PM »
Quote from Nao on February 3rd, 2013, 10:16 PM
@Lorenzo> I'm surprised a CDN not advertised on jquery.com would offer it..? Anyway, isn't this only for cloudflare customers?
I wouldn't be fussed over whether we should add it or not, but I just don't know if they're going to keep up with jQuery's releases, precisely because they're not officially sanctioned. It'd be a disaster if I started having to check whether all CDNs provide the version I'm targeting... Right now I'm only doing a special test for beta versions -- forcing the CDN to code.jquery.com (which is the only one to host beta versions), in case a beta or RC tag is found in the filename. (I think that one's a good idea. :cool:)
It should be worth a look:
http://blog.cloudflare.com/cdnjs-the-fastest-javascript-repo-on-the-web

It supports IPv6, SSL, SPDY and it's available to all. :)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #541, on February 3rd, 2013, 11:00 PM »
Quote
@Lorenzo> I'm surprised a CDN not advertised on jquery.com would offer it..? Anyway, isn't this only for cloudflare customers?
How could they enforce it? I'd rather not tie into CF to be honest.
Quote
Who's going to change it anyway..? A plugin? Bad semantics, bad karma!
I did wonder about that, but I thought since it was configurable, there was really no reason for me to make it unconfigurable as such. But yeah, realistically I don't see anyone looking to remove it any time soon.
Quote
e.g. the draft auto-save, things like that.
I'd rather the draft autosave be attached to the editor to be honest. In practical respects it makes little difference; there aren't many cases where guests will be able to post (so we won't be loading the editor anyway)
Quote
Haven't looked at all the functions that could benefit from being moved there.
Hmm. I'm not entirely convinced it's necessarily that big a deal. I think I'd rather keep code tied to the function which uses it, personally.
Quote
Yep yep yep, my you're scaring me! :lol:
Truth be told, it was just in the midst of the ban code that I've been working on and it just hit me that this is being done - and I realised that there was no reason to keep doing it. I thought it was a good use of about 15 minutes.
Quote
- txt.done in spellcheck.js -- however, I'd advise against adding it for one reason: if you're not using the default language, you'll get another instance of your language name in the spellcheck JS URL,
Well, this strikes me as a reason not to do it there - if we keep the spell check, and I'm not entirely sold on that yet. For my money we need to support enchant if we're keeping it going forward (and I can't seem to get enchant to play nicely), and browsers often do a better job anyway.
Quote
I don't think there's anything preventing that one from being passed on.
Yeah, works for me.
Quote
- the YUI uploader -- we need to rewrite it to use HTML5, by the way...
That'll get done when the rewrite gets done. I spy a plugin that has related code ;)
Quote
- the upshrink description for toggles could be a 'default' instead of being explicitly set (it's the only text string that's actually sent to them, except from a few "-" here and there.) Either with something like altExpanded: 'default', or not setting it at all in the HTML -- although we'd have to ensure that it 'works' on all toggles that don't specify an alt. It's important to check on this one -- it's on every single page! :)
I have to be honest I always found the entire toggle code something of a strange one, it always seemed more complicated than it had to be. But yes, getting it 'right' would be important.
Quote
- message_txt_delete in wedgeAttachSelect is a given :)
Yup.
Quote
- register.js always uses the same regTextStrings, with the Register page adding a few strings compared to the Reminder page. We could, instead of sending the text strings, send a boolean determining whether register.js will use one set of strings or the other.
Hmm. Need to look at that and figure out exactly what's needed there. I don't remember the code off the top of my head. Maybe there's a more elegant solution.
Quote
Do you want to do them all, or split the job, or let me do them?
Whichever you prefer. Right now I'm busy at work on splitting skeleton stuff anyway.
I'm still tying up the ban stuff before moving onto the profile, but I'm sure I can sneak the odd one in, in between wrangling with the insanities of the old ban system.
Posted: February 3rd, 2013, 10:44 PM
Quote
* Naoism: comment typos. Also, Pete, you must have a 4K screen if you're able to read that MessageIndex comment without scrolling... ;) (MessageIndex.php, Pin.php)
Or not. MBP 17" = 1920x1200. Just see the attached.

📎 arantor_has_only_1920_pixels_across.png - 243.73 kB, 1920x1200, viewed 672 times.

📎 but_even_then_they_have_big_comments.png - 228.83 kB, 1920x1200, viewed 670 times.

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

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #542, on February 21st, 2013, 11:28 PM »
Woohoo, long post above... Forgot to reply blah blah... :(

Will try to do tomorrow.

In the meantime -- just looking at a commit... Did we discuss the changing of message bodies to mediumtext?
It's not that I mind -- I'm all for dropping the 64KB text size limit and all, but... It adds at least a byte to every single post, maybe two, whatever, and it probably has a (small) impact on performance as well...

Does it only need to be discussed..?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #543, on February 21st, 2013, 11:32 PM »
Quote
In the meantime -- just looking at a commit... Did we discuss the changing of message bodies to mediumtext?
We did discuss it ages ago and with the same questions.

I could not find any evidence to support that it made any difference on performance other than the extra byte in the table. A byte is a byte after all, but even on a multi-million post forum you're talking an MB or two out of multiple GBs of data.

The bigger issue was the forcing of dropping of fulltext but realistically it would have required significant extra reworking (for little benefit) - because in later MySQL versions it's available for InnoDB (something not supported in the code anyway) and the only time it ever saved you performance was when you were so small that even unindexed searching wasn't a problem anyway.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #544, on February 22nd, 2013, 10:13 AM »
Oh... So, the removal of fulltext is what was pre-required to switch bodies to mediumtext...?
So, one bird with two stones? :)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #545, on March 15th, 2013, 04:05 PM »
r1996 - "Because the quick URLs ended with a '='"

Yeah, anything that encodes content to base64 to put it in the URL (search results, skin selection) and it's the last parameter has somewhere between 1/3 and 2/3 chance of being broken by this. But it's an optimisation that isn't really necessary to perform.
Posted: March 15th, 2013, 04:21 AM

r1997 - I thought I'd said not to touch Class-SFTP because I was going to replace it with an updated version shortly? In fact, I'm scared of doing that because I don't really want to keep simplifying it over and over and over and just want to keep it easily maintainable next time around, so I was going to just include it as-is... formatting etc. as is, white-space as is, multitude of files as-is.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #546, on March 15th, 2013, 04:27 PM »
Quote from Arantor on March 15th, 2013, 04:05 PM
r1996 - "Because the quick URLs ended with a '='"

Yeah, anything that encodes content to base64 to put it in the URL (search results, skin selection) and it's the last parameter has somewhere between 1/3 and 2/3 chance of being broken by this.
I just never noticed anything breaking.. Otherwise I'd have looked into it, like I did yesterday. Were you aware of this..?
Regarding base64, the filler ='s mystified me for quite a while, when I discovered web programming. Not so much, now, but still ;)
Quote
But it's an optimisation that isn't really necessary to perform.
Which one..?
Quote
r1997 - I thought I'd said not to touch Class-SFTP because I was going to replace it with an updated version shortly?
Yes, but you didn't :P
Pete, here's how things go in my deranged mind.
"Don't touch the file. It'll hurt you.
- Okay."
"Hmmmmmmmm..... It'll be too hard for me. I'll just ignore the file. Like, forever."
Then I met the unpack() crash in the captcha code, and decided, as I often do, to do a thorough check of the codebase to remove any similar calls, but I also looked at unpack(), dunno why, and found a ton of them in Class-SFTP... And the first one I looked at, was in the middle of an odd broken line. It hurt me immediately, and I endeavored to fix it. Then I found another one... And another one... And realized it could mostly be fixed by a regex... But it still took me an hour to fix most of it all. Needless to say, had I know how long it'd take to fix, I'd have left the file alone... Forever! But you know, well, that's me... It's like a drug.

To give you an idea, currently I'm thinking of harmonizing all $_REQUEST['sa'] calls to always have the variable set, and maybe replace $context['action'] with a never-empty $_REQUEST['action'], so I can avoid globaling $context if not needed... (Although I don't think it would save a lot of globals... If any!)

But honestly, I also know it'd be best that I work on some actually INTERESTING feature, like rewriting the PM template to use Msg, or making thought-likes Ajax-friendly, or adding the mini-menu to thought contexts... Or doing mass-upload or spectrum analyzer in JS... And it's always, "oh my, too much work, and I only have this much time left..."
Quote
In fact, I'm scared of doing that because I don't really want to keep simplifying it over and over and over and just want to keep it easily maintainable next time around, so I was going to just include it as-is... formatting etc. as is, white-space as is, multitude of files as-is.
"multitude"..? There's only one file...?
Oh, you mean taking the guy's next version..?
Well, if it's like get-id3 or exifixer... I stopped insisting after a while ;)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #547, on March 15th, 2013, 04:32 PM »
Quote
I just never noticed anything breaking.. Otherwise I'd have looked into it, like I did yesterday. Were you aware of this..?
I wasn't aware that pretty URLs did that, but on my local site I never, ever use PURLs anyway.
Quote
Which one..?
Stripping trailing =.
Quote
It's like a drug.
I understand this, only too well.
Quote
like rewriting the PM template to use Msg
Doesn't it already?
Quote
"multitude"..? There's only one file...?
Oh, you mean taking the guy's next version..?
There's only one file because I spent two days combining it into one file and making his syntax nicer for us to read. But I won't do that next time for the simple reason that it was two days trudging through a lot of files for fairly little benefit. It's not like I can just magically drop all the dependencies if I want to use SSH to upload stuff, since pretty much everything is cross-dependent.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #548, on March 15th, 2013, 11:30 PM »
Quote from Arantor on March 15th, 2013, 04:32 PM
I wasn't aware that pretty URLs did that, but on my local site I never, ever use PURLs anyway.
Oh, that's right, you never do. Well, I guess there aren't a lot of URLs here that end in a base64-encoded fashion... Perhaps in the admin area..?
Quote
Quote
Which one..?
Stripping trailing =.
Indeed, I never really bothered with that, I simply left the Pretty URLs code 'as is', AFAIK, although I *may* have written that part back when I was helping with the mod, I don't know, it's years back...
And generally, I tend to leave things alone, for fear of breaking something I didn't consider.
Quote
Quote
like rewriting the PM template to use Msg
Doesn't it already?
Nope... Msg is only used in topics. My goal with mini-skeletons really was to be able to easily use Msg in Recent Posts, it's always been an issue for me. (Recently, I started getting upset over the fact that recent posts don't show attached files, too.)
Quote
There's only one file because I spent two days combining it into one file and making his syntax nicer for us to read. But I won't do that next time for the simple reason that it was two days trudging through a lot of files for fairly little benefit. It's not like I can just magically drop all the dependencies if I want to use SSH to upload stuff, since pretty much everything is cross-dependent.
Yup, then it's just like Subs-Exif and getid3, i.e. "at first I did my best to fix the code, but then I didn't want to bother re-adapting it every time I updated it, so..."

Oh, next commit will be rev 2000...!
If you're committing something tonight, please consider references to Symphony X's "V: The New Mythology Suite" and Princess Arete's soundtrack, more precisely this... The former is my favorite symphonic metal album (it's an absolute masterpiece to my ears, and I'm sure you love it too...??!!), the latter is my favorite fairy tale movie (and a lot of 'favorite (fill in the blanks)' whatever you want, really.)
I watched it tons of times and even talked with the director a couple of years ago. With my broken Japanese, it must have been funny. ;) In fact, that's what the very last post at nao.noisen.com was about. (Yeah, rusty French, I know... :^^;:)

Anyway!! I wanted to commit a Warm rewrite I had in the works for some time, but I discovered a few issues that the current version doesn't have, so it'll wait for another moment. I'm also about to commit a Media template overhaul, but it's not that fascinating. Finally, I'd like to ask... How interesting would it be to force the loading of common.css on every CSS file, including non-index/sections ones, without having to specify the file in our list...? I'm saying this because I noticed that media.css does a bad trick to apply display: inline-block to something, and I'd rather use the common.css mixin for that, but I'm a bit wary of adding more processing time to Wess just for that reason...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #549, on March 15th, 2013, 11:38 PM »
Quote
Oh, that's right, you never do. Well, I guess there aren't a lot of URLs here that end in a base64-encoded fashion... Perhaps in the admin area..?
Not even in the admin area. It's primarily search results and the skin selector.
Quote
Nope... Msg is only used in topics. My goal with mini-skeletons really was to be able to easily use Msg in Recent Posts, it's always been an issue for me. (Recently, I started getting upset over the fact that recent posts don't show attached files, too.)
It might not use the msg skeleton but it uses the template.
Quote
If you're committing something tonight
I'm not. I've been poking around with various things I'm not happy with in the admin area (language editor, smiley stuff, message icons) and not really making any headway with any of it in a way I like. No-one seemed interested in my wanting a 3DS icon :/ (Wedge actually works reasonably well on a 3DS, btw, save for the numbers in note/notewarn/notenice type classes)
Quote
How interesting would it be to force the loading of common.css on every CSS file, including non-index/sections ones, without having to specify the file in our list...?
Makes sense, provided there's not a huge bandwidth hit I guess.
Re: New revs - Public comments
« Reply #550, on March 19th, 2013, 02:19 PM »
r2008 - I suspect the main reason for legalise_bbc was Karl ;)

Also, given the changes to the languages to de-Britishise things, I'm tempted to get my own back(!) by adding English (UK) to the SVN. Thoughts? There's some practical advantages, it will helpfully mean I won't be tempted to keep Britishisms in the trunk, and more than that, it will give me proper testing for the whole language caching thing where it stores other languages in the cache too.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #551, on March 19th, 2013, 02:33 PM »
Quote from Arantor on March 19th, 2013, 02:19 PM
r2008 - I suspect the main reason for legalise_bbc was Karl ;)

Also, given the changes to the languages to de-Britishise things, I'm tempted to get my own back(!) by adding English (UK) to the SVN. Thoughts? There's some practical advantages, it will helpfully mean I won't be tempted to keep Britishisms in the trunk, and more than that, it will give me proper testing for the whole language caching thing where it stores other languages in the cache too.
I'm all for having a UK language file in there, of course! British are cool. (Matt Smith voice.)
Hell, it's long overdue. And I knew you planned to have one anyway. And it'd be easy to maintain -- just keep the lines that change, once the English fallback is restored...
Or you could have a 'patch' system that tells Wedge to change this or that word on the fly. But I can hardly see that one as working for anything else than British English... Brazilian, maybe..? Don't remember... And local variations, of course. Well, maybe it's not that bad an idea.
Oh, I used that page to do the final conversions:
http://www.lukemastin.com/testing/spelling/cgi-bin/database.cgi?action=rules
I knew most of the rules, but not all. Also, not all US '-ise' words are listed, but I trusted my instincts whenever I wasn't sure. I also converted -ising and -ised.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #552, on March 19th, 2013, 02:40 PM »
Quote
I'm all for having a UK language file in there, of course! British are cool. (Matt Smith voice.)
:lol:

Yeah, that's the plan. I'm working on the fallback right now. I'm not sure how Brazilian is going to work, whether I need to figure out some 'language invoking another language' but I can't see any way that can meaningfully work all that well.

English UK falling back to English US works well enough, and I'm fine with English US being a master fallback, but other than that, I don't see a way that isn't horrific and troublesome. I'll finish up the loading of English US as a fallback.

Also, EmailTemplates.french.php doesn't work properly; the accented characters are encoded in ANSI, not UTF-8. I've fixed it locally and will commit it with my next commit.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #553, on March 19th, 2013, 04:03 PM »
Oh, I hope you don't mind, but I hijacked your 'pop-culture references' part ;)
I don't mind that you get to commit a few things and thus choose something for the corresponding year, but I felt that not having anything at all was a sad waste of mindfuck :P
Quote from Arantor on March 19th, 2013, 02:40 PM
Yeah, that's the plan. I'm working on the fallback right now. I'm not sure how Brazilian is going to work, whether I need to figure out some 'language invoking another language' but I can't see any way that can meaningfully work all that well.
Me neither... :-/
Quote from Arantor on March 19th, 2013, 02:40 PM
English UK falling back to English US works well enough, and I'm fine with English US being a master fallback,
Even though these damn Americans came second, we know!! :P
Quote from Arantor on March 19th, 2013, 02:40 PM
Also, EmailTemplates.french.php doesn't work properly; the accented characters are encoded in ANSI, not UTF-8. I've fixed it locally and will commit it with my next commit.
I'm surprised I didn't catch that... :-/
I may forget it for new files, because it's ISO by default IIRC, but it's an old file, I thought I'd converted them all...
Or maybe I left it aside because e-mails weren't sent (or aren't sent??) using UTF...?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #554, on March 19th, 2013, 04:13 PM »
Well, it was the 'desc' translations rather than the actual bodies, but I never understood the pressing need for entities. To my mind, UTF-8 content is going to be UTF-8 content in the database anyway, and it's not going to have every non ASCII character entity-encoded. Since there are plenty of cases of non-preset content being injected, there are always going to be cases where UTF-8 content will be transposed into emails, and that must by definition be working - because if it wasn't, there would be a ton of complaints - but there aren't.

So it's a non-issue from my perspective.
Quote
I'm surprised I didn't catch that...
I didn't catch it when reviewing the diff because WinMerge doesn't get uppity about that - it does show the encoding in the footer but I don't really take notice of that because it's something I don't normally need to look at.