« first day (1930 days earlier)      last day (3240 days later) » 

20:01
@PeeHaa - How do you know that it is? Plus with the OP's rep of 1, I'm assuming that he simply omitted it. — j08691 1 min ago
Should I reply one last time or should I just let it go?
:P
@PeeHaa tag it with every javascript library you can think of, just in case one of them could help
:D
I assume the plugins are ordered alphabetically on purpose right @kelunik?
@PeeHaa In the list? Nope. But imports are automatically sorted by phpStorm.
It does? /me checks refactor tool of phpstorm
@PeeHaa they call it 'optimize imports'.....because Java.
20:12
Ah so it makes it use more memory! Nice!
20:28
o/
°7 I'm planning to rewrite 1k codes of user sorting from scratch
but there are 23 variables to check
ie. i need to query for an array of users each time and sort them per max rating, working hours, total login etc... anyone have some tips for a good method or way to follow on this?
don't actually rewrite from scratch. Start with your existing code and iteratively improve it until it doesn't suck.
@Ekin I assume it isn't conveniently stored in a database using a sane schema? :)
I thought about that too and that's what I've been doing last two times this didn't work cause the data constantly changes per user
20:35
@Ekin write a lot of tests first.....so you can check that you get the same results.
Though, when an actual rewrite is in order, what I've done is had both the old and new code open in separate windows, and as I re-implemented functionality, I deleted the relevant code in the old file
I know I'm done when there's no more old code.
Tests are very helpful in this, as well.
^ is what I started doing yesterday but then at some point I felt like rewriting from scratch would take less time
@Andrea have fun writing that kernel module [to kill processes in uninterruptible sleep]
@Ekin I try to avoid actually rewriting from scratch. You lose a lot of the history and knowledge inherent in the original code.
e.g. The original code had something to deal with some weird edge case. If you rewrite from scratch, you may easily overlook that weird edge case, and have to go bug hunting again later.
That makes sense, but also this whole 1k code is nested if else blocks
20:45
I didn't say it was going to be easy.
Or fun.
yeah I see your point, if I keep refactoring it properly instead of rewriting from scratch that'd do it. Just though rewriting would take less time
If you have a full set of tests that capture all the expected behavior, rewriting from scratch probably would take less time, but I still don't advise rewrite-from-scratch unless it's absolutely necessary.
Alright makes sense, thanks a lot
21:06
\o
I'm facing a trouble with opcache: after reset the cache,it's mark a flag with the name "restart_pending" as true,but doesn't conclude the operation.
I can't restart the Server now. There are a way to force the cache restart?
!!docs opcache_reset
[ opcache_reset ] Resets the contents of the opcode cache
?
Long shot, but....
Why can't you restart btw?
production
someone tried reset the cache
and the opcache_reset() doesn't works,in fact it locked the cache with the 'restart_pending' status
21:14
I'll try disable and enable by ini_set entry.. maybe works
Impossibru
You cannot enable it with ìni_set AFAIK
Yeah the docs tend to lie like that in some cases
> Enables the opcode cache. When disabled, code is not optimised or cached. The setting opcache.enable can not be enabled at runtime through ini_set(), it can only be disabled. Trying to enable it at in a script will generate a warning.
I think I had some discussion about this with @Danack earlier, but I'm not sure whether I dreamed that or what the conclusions was
21:18
haha
I think it ended with having completely separate fpm pools so you can "easily" switch between them in these cases
But that isn't going to help you now :-)
yeah
about have separate fpm pools,it's a nice idea. How it works?
@Andrea awesome! Thank you!
you create separate pools......and route to them separately from nginx.
I figured why parsing XML with Regex = bad idea
still can't find a Microsoft / VBA expert
found a XML parser from MS
21:23
html agility
@HugoDias tried to find it in chat search, but it kinda sucks and it's impossible to find anything in there
Oh @Danack is here already :)
no prob.. I'll search some stuff about it later
btw not being able to bounce a server that is in production is probably something you need to fix...
21:30
I know this is the answer msdn.microsoft.com/en-us/library/ms757048(v=vs.85).aspx and msdn.microsoft.com/en-us/library/ms761358(v=vs.85).aspx I just have a lot of unknown questons, infamiliarities on subject of ( iterating through nodes, what the functions do ( do they get the nodes attribute or can they search any nodes attribute without iterating code ) etc
Is monkeying around with it till you get what task you need ( leaning very little besides what u need to know ) a very inneficient way for programming
you should hire a programer. And no, monkeying around is the best way to learn.
Based on the similiarities of iterating any tree structure wether XML JSON a Binary Tree RedBlack Tree... Can you guys help me with the above two links functions and variables to find every instance of a particular text within a tag
*whether
21:48
@bwoebi oh, I suppose that's one way to do it
@zaq178miami :)
@PeeHaa
I solved temporally: I have made a hook to set the entry 'opcache.enable' to false.
It works to disable,but not to enable,as the docs show. It will be enough until the support comes tomorrow to restart the servers and give me some logs files to discover what happened.
Assuming the logs are actually useful
:-)
@Ekin Please format your code - hit Ctrl+K before sending and have a look at the FAQ.
shh @jeeves.
21:58
Uggh. It's still too tight imo @kelunik ^
Imo it's too spammy
it probably ought not to trigger for less than 10 lines.....if at all. People posting ill-formatted code isn't really a big problem. A bot being annoying could become one.
See what you did @Jeeves! You made @Ekin trying to use chat MD. Bad elephpant
@Ekin You didn't need to delete it :-)
:28425507 you had a typo in your code......but if you want to reset an array, just set it with $foo = []; - guaranteed to be an empty array.
better check the faq for that, I generally post with pastebin cause I always fail on this :p
@Ekin It's just that chat's markdown is horrible. It's not you
We all fail it
Or rather it fails us
22:01
:) alright - that $foo = []; did it, unset didn't not sure why, but thanks
22:13
2 messages moved to bin
things we need to teach every PHP dev: SERVER LOG FILES EXIST
so many people don't know this and turn on error reporting and get confused by white screens of death
it doesn't have to be this way!
22:31
So I had written some code awhile ago to add links to the official docs for extensions and directives in phpinfo() so I could quickly click a directive and see its docs. Would this be something worth adding to php-src?
Didn't error messages used to do that (and failing) or was I running some extension back then or am I just crazy?
I think it was a browser addon, I remember someone in Room 11 doing that.
Ah yea
As for usefulness of linkifying phpinfo output. Not sure. I think it might be useful for people who don't look at it much
22:50
@Andrea display_errors all the things
@bwoebi nooooooo
don't leak your database keys to your users
@Andrea that's your fault when you don't catch PDO exceptions upon connection :-P
pass12345
@ircmaxell hmm?
23:04
for length 8, salted sha1 mixalpha-numeric = 337 days 6 hours 3 minutes 3 seconds
@Machavity oh, that wasn't a friday link D:
I dunno
@Machavity WOAH
23:13
@Machavity =)
@Machavity GODDAMNIT NOT AGAIN
@Machavity I dare you to tweet that
@ircmaxell might get interesting if you retweet then ^^
@ircmaxell lol I would if I had Twitter. Never had any reason to tweet/twit
23:17
@Ekin except that's off by a few orders of magnitude. Salted sha1 isn't 5 million guesses/second. It's closer to 60 billion per second.
oh wow
arstechnica.com/security/2012/12/… <-- that was in 2012. 3 years ago
it's gotten faster since then
so, today you find an all-lowercase 8 char pass in 1 sec? nice.
"can cycle through as many as 350 billion guesses per second" and this was 3 years ago
yet another wow
what's that? an array of a hundred GPUs? … okay 25.
23:21
this is why anyone in 2016 who says "sha1(salt + pw)` is OK has no clue what they are talking about
@Machavity I'll do it
Rogue Wave abandons PHP as "horribly broken", announces new partnership with Facebook to push HHVM D: http://roguewavesoftware.com/blog/2016/01/28/rogue-wave-and-facebook-partner-on-hhvm
7
^ there you go @Machavity @ircmaxell
I've never blackrolled my twitter followers before. There's always a first time, I suppose :)
@AndreaFaulds You should die for that
aww
@Ekin By contrast, cracking bcrypt takes years (non-Friday)
Unless you have a stupid easy password
23:27
OK, as I'm cuddling my php7 elephpant to try and recover from the shock.... php7 perps, help needed
@Andrea wait, how did you get that domain to work like that?
I'm trying to create an anonymous class, extending a dynamically defined concrete class
You should know by now that Andres is a l33t h4xx0r
return new class(...$this->constructorArguments) extends $this->class;
@ircmaxell that's not Rogue Wave's real domain, @Machavity (or someone else?) registered it just for this joke
23:28
clearly doesn't work.... any ideas?
the same trap has been used before
@ircmaxell I think Salathe set it up
@Andrea ah, wow
@MarkBaker you'd have to use eval
OK, Pete's dead as well
Is eval() really the only answer?
23:29
@MarkBaker yes
either that or it might be possible to use class_alias for voodoo if you only need to do this once
if you only need to do this once
or if you want to always extend the same class
Nah.... it's a generic wrapper to try and dynamically add traits at instantiation
oh no, Anthony retweeted the troll tweet
23:30
@MarkBaker no chance, use eval().
it'll go viral now
I thought I might be able to wrap the whole in an anonymous class
and dynamically add in the required traits as well
eval's the way to go. speaking of which, I should write a library for checking if something is a well-formed class name
since I've used that more than once in my own code when dealing with eval()
@MarkBaker nah, anon classes are just real classes which are inline.
23:33
@Andrea why the hell is \177 in that list?!
ok! cheers.... thanks for the thoughts to try and blot out the nightmare
@Andrea did you register the domain? If so... DAMMIT, I even enjoyed it this time!
@bwoebi you're not the first to ask
we should fix it in 7.1
@Andrea also, I haven't realized PHP supports octal chars
23:34
sup rebels
@bwoebi well, it does :)
which makes copying that from C easier
Wes
Wes
@Andrea i swear i just joined... instarebeccad
Did I express myself very poorly in my last email to internals, or is Lorenzo expressing himself badly, or have I had a stroke? news.php.net/php.internals/91004
I feel dirty
class baseClass {
protected $a;
protected $b;

public function __construct($a, $b = null) {
$this->a = $a;
$this->b = $b;
}

public function sayWhat() {
echo $this->a, $this->b, PHP_EOL;
}
}

trait SayAB {
private $separator = ' ';

public function sayIt() {
echo $this->a, $this->separator, $this->b, PHP_EOL;
}
}

class AnonymousFactory {
private $className;
private $constructorArguments;
private $traits;

public function __construct($class, ...$args) {
$this->className = $class;
$this->constructorArguments = $args;
And my php7 elephpant is glaring at me in disgust
Wes
Wes
23:49
@MarkBaker what is that? :P
That is beautiful and horrible.
@Wes - It's creating an anonymous wrapper around a class that allows traits to be added at instantiation.... similar to scala (except cludgily PHPified)
Wes
Wes
oh, does scala have that? what's the purpose, though?
chx
chx
You added eval() to PHP7 code? Have you no decency :P ?

« first day (1930 days earlier)      last day (3240 days later) »