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.
4021
Features / Re: Badges and the displaying thereof
« on December 22nd, 2012, 11:26 PM »
And it's still using the regular rank system...?
Because even with my settings, I had to heavily mod it...
Because even with my settings, I had to heavily mod it...
4022
The Pub / Re: Getting ready for an alpha release: WeCSS/Wess improvements
« on December 22nd, 2012, 11:24 PM »But Aside from that, it's simply good practice.
That would easily add a hundred bytes to the source code size. Per file.
Let's take another example... If you're calling preg_match_all() and you want to use the default behavior, will you add the PREG_PATTERN_ORDER flag to it? No, you'll just skip the flag altogether...[1] That's the same here. For convenience, you don't have to specify a certain keyword.
As far as $options = & we::$opt or whatever, that's fine, but the goal should be eventually to remove it. Global variables are not actually that clever.
| 1. | And of course, I just checked and there are a few cases in Wedge where it's specified... Eh, I guess I'll have to remove them :P) |
4023
Off-topic / Re: LG Nexus 4
« on December 22nd, 2012, 11:18 PM »
If you're into the technical details of it... (I wasn't, until a few days ago when I started digging into it :P), what I'm currently using is a CyanogenMod 10.1 Custom (tomasek's version), with a Siyah v1.8.6 custom kernel set to a 'lulzactiveq' governor. I'm using Siyah because it supposedly can do dual booting, which is great, but not on 10.1, so I'll have to use a 10.0 CM instead, no biggie, I'm only evaluating the phone for now anyway, will install everything 'seriously' later...
It seems to me that the stock Samsung ROMs are a bit better when it comes to battery life, but only when setting them to Power Saving mode permanently (or close to), which probably basically switches it to 200mhz... Nah, maybe a bit more -- it's still usable, while a power saving governor will set it to 200mhz and make it close to unusable. It's only worth it when you know you're not going to browse the web at all... Then what's the point of such a huge phone, I'm asking ya :P
(Oh, and on an unrelated note, I hate Firefox on Android. While it has one of the best rendering engines availlable, and a cool UI, I can't believe they actually drop sessions when you restart it. Even the Android stock browser keeps all previous tabs in memory when rebooting or whatever...)
Perhaps I should get myself an iPhone 4S for the same price, it's small enough to keep me happy, and then buy a Nexus 10 tablet for daily browsing... :^^;:
It seems to me that the stock Samsung ROMs are a bit better when it comes to battery life, but only when setting them to Power Saving mode permanently (or close to), which probably basically switches it to 200mhz... Nah, maybe a bit more -- it's still usable, while a power saving governor will set it to 200mhz and make it close to unusable. It's only worth it when you know you're not going to browse the web at all... Then what's the point of such a huge phone, I'm asking ya :P
(Oh, and on an unrelated note, I hate Firefox on Android. While it has one of the best rendering engines availlable, and a cool UI, I can't believe they actually drop sessions when you restart it. Even the Android stock browser keeps all previous tabs in memory when rebooting or whatever...)
Perhaps I should get myself an iPhone 4S for the same price, it's small enough to keep me happy, and then buy a Nexus 10 tablet for daily browsing... :^^;:
4024
Features / Re: Badges and the displaying thereof
« on December 22nd, 2012, 11:12 PM »
Since I don't know about S&B at all, I only implemented the features *I* needed for wedge.org actually.
That's the difference between adding what you want, and adding what people tell you to add. ;)
As for U.P., I wouldn't know where to start.
Which is strange, considering that my original plan for Wedge was to have a "stock SMF that would have Aeva Media, Ultimate Profile and a blog system by default."
In the end, there's only a hint of a blog system, no UP at all, and AeMe is only there as a memento, I never added any features to it, except for the occasional code refactoring and addition of Foxy! features for free...
That's the difference between adding what you want, and adding what people tell you to add. ;)
As for U.P., I wouldn't know where to start.
Which is strange, considering that my original plan for Wedge was to have a "stock SMF that would have Aeva Media, Ultimate Profile and a blog system by default."
In the end, there's only a hint of a blog system, no UP at all, and AeMe is only there as a memento, I never added any features to it, except for the occasional code refactoring and addition of Foxy! features for free...
4025
The Pub / Re: Logo Madness
« on December 22nd, 2012, 11:09 PM »
Just in case, I've added the latest option to the poll, you can still vote for 3 items or less, but I doubt the current leader will be any different in a few days... So I guess we're staying with the uppercase version for now ;)
4026
Off-topic / Re: LG Nexus 4
« on December 22nd, 2012, 11:06 PM »
I'm sure it is :)
I myself ended up buying a Galaxy S3, "like most people"...
The reasons behind it:
- It's wildly popular, meaning it's better supported by third-party providers (hopefully). I originally had a Razr i which isn't very well supported.
- Battery life is better than most of the competition. It's not as good as the Razr i's, though... After 14 hours of slow activity on my S3, I'm down to 17% battery. Still, it mean I can probably use it for an entire day. I can simply have a spare battery and charge it alongside it...
- Out of all phones I had in my hands, this was the sexiest in my opinion. I've always found it beautiful, always will. My girlfriend doesn't understand me. I guess it's in the eye of the beholder etc.
- It is, basically, the most balanced phone of all -- there's always a phone that does something better than it does, but it beats them on all other counts.
The main drawback, as silly as it sounds, is that I really can't get used to the huge width (70.6mm), even phones that are 5mm narrower have a better grip in my hands. Considering modern smartphones are all pretty fragile (apart maybe from Apple's stuff), it's something that bothers me. I'm trying to get used to manipulate the object while touching the screen -- it's always been a 'sacred place' to me, something I shouldn't touch... Well, I have to, here.
Also, I hate the Back/Menu buttons because it's very easy to hit them by mistake. Thankfully, once the phone is rooted, you can edit the build.prop and Generic.kl files to disable these keys and instead show the navbar on the screen. Yeah, I know, it makes for a smaller screen, but whatever... All I care about is the width, not the height. I wouldn't even bother if the screen was square or something...
Another phone that has eluded me for a while is Acer's CloudMobile. It's pretty close to the S3's specs, only it's a 4.3'' HD screen (instead of 4.8'') and is 5mm narrower. The perfect combination I guess, but then again, losing half an inch in screen size also bothers me... Once you're used to the super big screen, I guess it's a bit hard to come back.
So, it isn't the "perfect phone", but it's damn close to it.
I still have a day left to "evaluate" it. Then I can have it refunded, and buy something else, otherwise I'll just keep it.
Any suggestions...? (I suppose not, but I'd rather ask :P)
I myself ended up buying a Galaxy S3, "like most people"...
The reasons behind it:
- It's wildly popular, meaning it's better supported by third-party providers (hopefully). I originally had a Razr i which isn't very well supported.
- Battery life is better than most of the competition. It's not as good as the Razr i's, though... After 14 hours of slow activity on my S3, I'm down to 17% battery. Still, it mean I can probably use it for an entire day. I can simply have a spare battery and charge it alongside it...
- Out of all phones I had in my hands, this was the sexiest in my opinion. I've always found it beautiful, always will. My girlfriend doesn't understand me. I guess it's in the eye of the beholder etc.
- It is, basically, the most balanced phone of all -- there's always a phone that does something better than it does, but it beats them on all other counts.
The main drawback, as silly as it sounds, is that I really can't get used to the huge width (70.6mm), even phones that are 5mm narrower have a better grip in my hands. Considering modern smartphones are all pretty fragile (apart maybe from Apple's stuff), it's something that bothers me. I'm trying to get used to manipulate the object while touching the screen -- it's always been a 'sacred place' to me, something I shouldn't touch... Well, I have to, here.
Also, I hate the Back/Menu buttons because it's very easy to hit them by mistake. Thankfully, once the phone is rooted, you can edit the build.prop and Generic.kl files to disable these keys and instead show the navbar on the screen. Yeah, I know, it makes for a smaller screen, but whatever... All I care about is the width, not the height. I wouldn't even bother if the screen was square or something...
Another phone that has eluded me for a while is Acer's CloudMobile. It's pretty close to the S3's specs, only it's a 4.3'' HD screen (instead of 4.8'') and is 5mm narrower. The perfect combination I guess, but then again, losing half an inch in screen size also bothers me... Once you're used to the super big screen, I guess it's a bit hard to come back.
So, it isn't the "perfect phone", but it's damn close to it.
I still have a day left to "evaluate" it. Then I can have it refunded, and buy something else, otherwise I'll just keep it.
Any suggestions...? (I suppose not, but I'd rather ask :P)
4027
The Pub / Re: Getting ready for an alpha release: WeCSS/Wess improvements
« on December 22nd, 2012, 10:49 PM »Well, I've thought before about removing that entirely, but it serves an interesting use that loadMemberData doesn't; it allows for putting any columns or values into the members table and retrieving it for the current user essentially for free. I would encourage it to be part of the we object somewhere, we::$settings maybe, but don't forget that we also need to contend with $options which is also user-centric.
I'd actually suggest putting them all into we, and then applying "$options =& we::$options" (or we::$opt) definitions just like I did for $user_info before removing it. Then we can keep it that way and not bother about convert everything if we don't feel like it.
I'm just saying that because I did the entire conversion for $user_info and it killed me. I didn't expect it to be so much work, I'm actually proof-reading my commit for the second time, and am only halfway through it (it's a 350KB diff patch)... I don't know why, but I'm pretty sure I made a mistake somewhere. Hence the double proof-reading...
I'd probably find another name for it, but not sure what.
Also, regarding your latest commit...
- I didn't change loadUserSettings() because the name spoke for itself, but I did consider doing what you did, so if you like it better that way, it's just fine with me. :)
- Forgot about the static keyword in we::analyze, indeed. It did work without it, though... But maybe it was just an oversight and it actually didn't work but didn't tell me. Dunno.
- I'm not sure about the 'public' keyword additions though... If you'll have a look at the wetem object, all public functions are declared without 'public'. Also, in wess, most public functions don't have the public keyword either. There are a few with it, but that's probably a copy-paste gone wrong ahah. Anyway, if you don't specify 'private' or 'protected', it's 'public' by default, and I tend to prefer shorter code because PHP parses it faster. I'd rather we don't use that keyword, then. Do you have any argument in favor of using it..?
4028
Off-topic / Re: How to Apply Thermal Paste the Kentucky Way
« on December 22nd, 2012, 10:40 PM »
You mean this story actually made it to other countries?! :lol:
4029
The Pub / Re: Getting ready for an alpha release: WeCSS/Wess improvements
« on December 22nd, 2012, 07:44 PM »
Yeah, I guess...
Hey I caught you posting your commit to another board and then merging it before I had time to do it eheh ;)
Also, while we're at it... Maybe we should also move $user_settings into we::$settings..? (Or something with another name, in case it's confusing.)
Hey I caught you posting your commit to another board and then merging it before I had time to do it eheh ;)
Also, while we're at it... Maybe we should also move $user_settings into we::$settings..? (Or something with another name, in case it's confusing.)
4030
Features / Re: New revs
« on December 22nd, 2012, 06:13 PM »
rev 1805
(96 files, 2.64MB) (For some reason, some of the modified files weren't changed to CRLF: Subs-BBC, Subs-MessageIndex and the Home template.)
! Oops, CRLF fix. (96 files)
(96 files, 2.64MB) (For some reason, some of the modified files weren't changed to CRLF: Subs-BBC, Subs-MessageIndex and the Home template.)
! Oops, CRLF fix. (96 files)
4031
Features / Re: New revs
« on December 22nd, 2012, 06:00 PM »
rev 1804
(99 files, 2.75MB...)
* Finished replacing all $user_info occurrences with we::$user and removing all $user_info globals. Nice new little search & replace program I just found... Should we optimize setupMenuContent and setupThemeContext in Subs.php...? (99 files)
@ Okay, not such a nice program... It didn't allow me to save with Linux newlines. I'll just need an extra commit to get rid of those... F'n great.
(99 files, 2.75MB...)
* Finished replacing all $user_info occurrences with we::$user and removing all $user_info globals. Nice new little search & replace program I just found... Should we optimize setupMenuContent and setupThemeContext in Subs.php...? (99 files)
@ Okay, not such a nice program... It didn't allow me to save with Linux newlines. I'll just need an extra commit to get rid of those... F'n great.
4032
The Pub / Re: Getting ready for an alpha release: WeCSS/Wess improvements
« on December 22nd, 2012, 05:22 PM »
I guess $context['user'] was added as a convenience for functions that already global $context and forget/don't want to global $user_info... It'll soon be gone, now that the global thingy can go.
I still have something like 1000 occurrences of $user_info to remove... All of the remaining ones are 'simply' $user_info to we::$user replacements, so we're in the area where it takes about twice the time it used to. Should I assume it's going to be okay using these even inside a loop...? I really don't want to spend another 6-7 hours checking each one individually just in case a $user_info variable is used in a heavy loop with 1000+ executions... (Implying we really lose a few milliseconds compared to before.)
I still have something like 1000 occurrences of $user_info to remove... All of the remaining ones are 'simply' $user_info to we::$user replacements, so we're in the area where it takes about twice the time it used to. Should I assume it's going to be okay using these even inside a loop...? I really don't want to spend another 6-7 hours checking each one individually just in case a $user_info variable is used in a heavy loop with 1000+ executions... (Implying we really lose a few milliseconds compared to before.)
4033
Features / Re: New revs
« on December 22nd, 2012, 05:17 PM »
rev 1803
(87 files, 90kb) (sigh... most everything done by hand!)
+ Moved $user_info to the system object, so that you no longer have to declare it as a global. Still tons of entries to modify, will come later. From now on, use those instead of these:
$user_info => we::$user
$user_info['id'] => we::$id
$user_info['is_guest'] => we::$is_guest
$user_info['is_admin'] => we::$is_admin
Alternatively, you can use we::is('admin') or we::is('guest') but it's 5 times slower (still lightning fast though, but not to use in a million loops.)
(87 files, not listing them all.)
- Removed $context['user']['is_mod'], never used... As a prelude to removing $context['user'] entirely anyway.
(87 files, 90kb) (sigh... most everything done by hand!)
+ Moved $user_info to the system object, so that you no longer have to declare it as a global. Still tons of entries to modify, will come later. From now on, use those instead of these:
$user_info => we::$user
$user_info['id'] => we::$id
$user_info['is_guest'] => we::$is_guest
$user_info['is_admin'] => we::$is_admin
Alternatively, you can use we::is('admin') or we::is('guest') but it's 5 times slower (still lightning fast though, but not to use in a million loops.)
(87 files, not listing them all.)
- Removed $context['user']['is_mod'], never used... As a prelude to removing $context['user'] entirely anyway.
4034
The Pub / Re: Getting ready for an alpha release: WeCSS/Wess improvements
« on December 21st, 2012, 10:51 PM »
I made a site-wide search & replace for $user_info['is_...'] to be replaced with we:is('...'), and I've found a lot of issues... Most notably plenty of lines where $user_info['is...'] is being written rather than read... So I've been replacing them with we::$user['is...'] instead.
Makes me wonder if it's okay mixing we::$user['is..'] data with we::is() in our source code... I mean, people may start wondering why there are two ways of doing this...
Then again, SMF has $context['user'] which has always eluded me :lol:
Makes me wonder if it's okay mixing we::$user['is..'] data with we::is() in our source code... I mean, people may start wondering why there are two ways of doing this...
Then again, SMF has $context['user'] which has always eluded me :lol:
4035
The Pub / Re: Getting ready for an alpha release: WeCSS/Wess improvements
« on December 21st, 2012, 08:05 PM »
Well, it's not a function here, it's a static variable, but we get to know exactly the overhead: about 70%... Not that it matters much, again. I'm just worried over nothing much....