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 - Nao
2041
Features / Re: New revs
« on January 5th, 2014, 09:58 PM »
[master 7287e90]
 7 files changed, 37 insertions(+), 39 deletions(-), 3.06 KiB

* Tweaks to the phpinfo page. (ManageServer.php)

! Trying for a fix to an undefined index. Dunno if that'll help. (Profile-Modify.php)

! Wedge was still crashing if disabling the currently selected cache system. This small rewrite is now guaranteed to work. (Subs-Cache.php)

* Minor usability tweak for login page. (Login.template.php)

* Layout tweaks for reminder page. (Reminder.template.php)

* Commenazi. (common.css)

- Removing my fix for popup transitions, because I'm afraid it didn't work as well as I thought. This is all down to an actual Blink bug on which I've wasted my afternoon. I can't even determine how the bug is triggered. All I know is that it happens if you're loading a popup when the web page is at the top. If you scroll by at least 60 pixels down, everything starts working as expected. I'd be very, very grateful if someone could work it out for me. I managed to make it work at the top by adding a dummy 3D transform on top of the opacity one, but then it gets funny: sometimes, neither the transition nor the end point of the animation are triggered at all, meaning you don't get the 'dim' effect. I figured I preferred the original glitch to this new one, so here we are. Five lines of changelog to explain why I'm removing half a line from the codebase. (script.js)
2042
Features / Re: One theme to rule them all?
« on January 5th, 2014, 07:55 PM »
Quote from Wanchope on January 5th, 2014, 03:44 PM
I think it will be better to split this thread (add a poll?)
No polls, because it's not something you can determine with a limited selection of folder names. I'm about to release the codebase on github, I'd like for the folder structure to be 100% final before I do that, I don't want to screw up, I want something that's easy to understand, and easy to update by FTP. I'm listening to any opinions. :thanks:
2043
Features / Re: One theme to rule them all?
« on January 5th, 2014, 07:53 PM »
Yeah, I *think* I remember SMF having a reason for capitalization, but I really can't remember it.
I'll go for all lowercase in the final version.

A more radical structure (and naming scheme) for the src folder could be:

/src       <-- empty
  /php     <-- Sources
  /css     <-- skins
  /js      <-- scripts
  /lng_fr  <-- languages/French
  /lng_en  <-- languages/English
  /tpl     <-- Themes/default


Probably a bit scary, though... :lol:
2044
Features / Re: New revs - Public comments
« on January 5th, 2014, 07:48 PM »
I redid my PHP 5.5 OpCache tests more seriously.
On a random topic page...
PHP 5.4: 0.14 seconds in average
PHP 5.5: 0.11 seconds in average
PHP 5.5 + OpCache: 0.08 seconds in average.

So, that's definitely worth the hassle, unlike what I said, ah ah.

I also tried multiple levels of file/APCu cache, and all I can say is, I'm getting the exact same numbers whether I'm using APCu, file cache, cache level 1, 2 or 3. It's tempting to remove levels 2 and 3, but... Whatever.

Now, I'm wondering if I should be asking shaitan whether we can use PHP 5.5 on wedge.org... Technically, I have access to the PHP version switch in the admin area, but it doesn't seem to be working, and I don't want to break his forum, which is running SMF and thus probably doesn't support MySQLi, just regular MySQL, which would generate warnings in PHP 5.5. :-/
2045
Features / Re: New revs - Public comments
« on January 5th, 2014, 06:38 PM »
Quote from MultiformeIngegno on January 5th, 2014, 06:18 PM
Yeah it's only an opcache. But APC isn't maintained anyway :P
But APCu is.
http://windows.php.net/downloads/pecl/releases/apcu/
I installed XAMPP, added the ts-x86-vc11 version of APCu into the ext folder, then enabled both OpCache and APCu in the php.ini file:

Code: [Select]
extension=php_apcu.dll
zend_extension=php_opcache.dll

And it works fine. Actually, it's the first time I ever get APC to work at all on my local install... ;)

Which allowed me to do some more testing, and:
1/ it works, unlike the APC version at alwaysdata,
2/ it's just as slow/fast as the file cache, or memcached. (So, basically: if your cache is on the same file system, it's not worth the hassle, just use the file cache.)

As for OpCache, though, I do notice a slight improvement in performance. About 5% to 10%, perhaps. Again, is it worth the hassle..? Probably not. I'll just say, Wedge is fast enough that the PHP cache is NOT its bottleneck... :P
Still, it's good to be able to test these. I'll keep a copy of XAMPP around.
Quote from MultiformeIngegno on January 5th, 2014, 06:18 PM
If you want to test it I can give you access to my VPS with PHP 5.5.6 installed
Nah, I'm fine now, thanks! Unless you're getting totally different results, of course.
2046
Features / Re: New revs - Public comments
« on January 5th, 2014, 05:22 PM »
Quote from MultiformeIngegno on January 4th, 2014, 02:12 PM
[master a226178] APC isn't maintained anymore! Should be better to work on Zend Opcache.
Also, I just remembered this: APC is both an opcache and a user data store, while Opcache, AFAIK, is ONLY an opcache, so it only optimizes the PHP file loading, but doesn't allow storing data and replacing the file cache.

Unless I'm mistaken, of course, in which case I'll be happy to implement Zend stuff into Wedge, but really, AFAIK, it's unrelated. Not only that, but APC doesn't work in PHP 5.5 for Windows, so if I wanted a 'fast' system, I'd probably settle on PHP 5.4 + APC, rather than PHP 5.5 alone.

Woot, I'm only 24 posts from the 14k mark... :eheh:
2047
Features / Re: New revs - Public comments
« on January 5th, 2014, 05:21 PM »
Fixed it in Firefox 27. Well, it's not really a bug. It's that Firefox 27+ Aurora has the feature enabled, while Firefox 26 (current stable) doesn't, and Firefox 27 Beta can enable it, but only after enabling a flag.

So, basically, if you'd rather your browser does the UI work rather than its JavaScript engine:
- In current Chrome or Opera, go to about:flags and enable 'Experimental Web platform' (IIRC)
- In Firefox 27 Beta, go to about:config, type sticky in the search and double-click the entry that comes up.
- In other browsers, "stay tuned" until the browser maker gets to wake up. (IE 11, you definitely aren't up to the game.)

The feature can also easily be used in SMF and ElkArte without any JavaScript, but it will only work on the aforementioned browsers, of course. The JS fallback in Wedge will work on old browsers, too, anything that supports position: fixed (i.e. IE7+, Android 4+, iOS 4+ or 5+, can't remember.)
2048
Features / Re: One theme to rule them all?
« on January 5th, 2014, 11:46 AM »
Asking for opinions on the best between these two generic folder structures...

/wedge
  /assets
  /attachments
  /cache
  /css
  /js
  /languages
<-- .english.php files
  /media
  /Plugins
  /scripts
<-- .js files
  /skins
<-- .css files
  /Sources
<-- .php files
  /Templates
<-- .template.php files

Or...

/wedge
  /assets
  /attachments
  /cache
  /css
  /js
  /media
  /Plugins
  /src
<-- all source .php, .template.php, .js and .css files
    /languages
    /scripts
    /skins
    /templates


Basically, anything that powers Wedge, but can also get cached or modified, would be in src. It's just that, I thought there were already enough folders in the root as it were... I figured, if you're uploading by FTP, you can have a shortcut to /src, then you can easily update whatever files are the most likely to have been modified. But, of course, it can also be argued that 'languages', 'scripts' and 'skins' don't have any semantic reason to be in 'src', things like that.

FWIW, currently, the folder structure is:

/wedge
  /assets
  /attachments
  /cache
  /css
  /js
  /media
  /Plugins
  /Sources
  /Themes
<-- all .template.php files are in this folder
    /languages
    /scripts
    /skins


PS: if you want to discuss the capitalization, feel free to do it, too. Right now, it's still something that's in the air. It doesn't make sense to me, or to anyone else.
2049
Features / Re: New revs - Public comments
« on January 5th, 2014, 01:06 AM »
Also, regarding the latest commits[1]: follow_me is basically a JS feature I wrote that can be done in pure CSS. Amusingly (or not), I only found out about the CSS version a couple of months after implementing the JS code. It was giving me the exact same result (great minds think alike :P), albeit with a couple of changes to be done in CSS so that it worked interchangeably with or without the CSS support.

Main problem is, the compatibility itself...
- Supported in iOS 6 and above, with no prefix. Can't test myself.
- Supported on Firefox 27 and above, BUT only in Aurora versions. That is, Firefox Beta 27 doesn't show anything. -_-
- Support on current Chrome and Opera versions, desktop and mobile, BUT only behind a flag (and it's not even an 'obvious' flag to enable.)

Let's just say, it's quite a bit early to use 'just' the CSS version, but it's nice to know we can all do it in the future.
 1. I've been revisiting my postponed stuff today. I might as well do my best to get my uncommitted file list down to the smallest possible numbers before I make the codebase public...
2050
Features / Re: New revs
« on January 5th, 2014, 12:38 AM »
[master 576ef4f]
 3 files changed, 24 insertions(+), 17 deletions(-), 1.65 KiB

+ Introducing support for a 'hardware' version of follow_me. (topic.js, common.css, sections.css)

@ I'm using quotes because Chrome Mobile clearly emulates it through JavaScript (there's an unbearable delay when scrolling through a page), and thus forced me to disable it on it. So, I'm not sure whether other browsers use a JS layer to do this, and if it's faster than my own implementation. Also, recently Blink made some changes and started treating inactive stickies as static, so I had to 'fix' that. Also, it's all totally untested in iOS 6. I figured, okay, I've been postponing this for too long, let's commit it, otherwise I never will. If it breaks (again), it's just a single commit to revert.
Posted: January 5th, 2014, 12:35 AM

:edit: ! Aw, shucks. Forgot to remove that line. (topic.js)
2051
Features / Re: New revs
« on January 5th, 2014, 12:33 AM »
[master ddd1ea9]
 1 file changed, 5 insertions(+), 2 deletions(-), 708 bytes

! A supposedly more accurate detection method for touch devices. (script.js)

! Fixed an odd issue with triggering popup animations in Chrome. (script.js)
2052
Features / Re: New revs - Public comments
« on January 4th, 2014, 10:31 PM »
APC is the one installed at alwaysdata so I get to test it firsthand...
2053
Features / Re: One theme to rule them all?
« on January 4th, 2014, 08:13 PM »
Yes, although there's always going to be something broken around, I'll do my best to fix when that happens, of course.

:edit: Okay, post buttons are still broken, it's probably not in the codebase but rather a path I forgot to update, I'll look into it.
2054
Features / Re: New revs
« on January 4th, 2014, 08:11 PM »
[master e7f4016]
 3 files changed, 13 insertions(+), 8 deletions(-), 859 bytes

! Avoid caching PHP files from external libraries. Namely, getid3 really. (index.php)

* westr::nl2br goes back to using nl2br($str, false) instead of a regex, and the whole world is better for it. I should probably remove westr::nl2br altogether, but have you ever heard of laziness..? Yes? Okay. (Class-DB.php, Class-String.php)
2055
Off-topic / Re: Happy Holidays !
« on January 4th, 2014, 07:42 PM »
I'm sorry, I had never heard of him. Sorry for your loss.