« first day (1684 days earlier)      last day (3261 days later) » 

10:00 PM
@LeviMorrison i3 , i5 and i7 denotes architecture
 
@tereško That word doesn't mean what you think it means.
 
for example i3 will have none most important of the virtualization features that i7 has
 
i3, i5 and i7 of the same generation are all using the same CPU architecture. Currently that means Haswell.
 
@LeviMorrison but not necessarily same feature set
 
@bwoebi Correct.
 
10:02 PM
@tereško what?
 
The current i3s just lack VT-d, which isn't critical.
 
@Shiuyin You can build it up by hand and then call it in one go:
foreach($conditions as $condition) {
    if(is_numeric($condition)) {
        $parametersArray[] = $condition;
        $typesString .= 'i';
    }
    else {
        $parametersArray[] = $condition;
        $typesString .= 's';
    }
}

call_user_func_array(array($this->statement, "bind_param"), $parametersArray);
 
I've been using a very dated i3 until not long ago and I never had issues with virtualization
 
user1648409
@Danack thats really cool! i just stumpled across call_user_func_array myself - thanks
 
user1648409
@Danack trying to build an db abstraction layer ontop of mysqli that takes care of table locking, transactions for me etc.
 
10:03 PM
Also, Intel ARK is pretty much the best possible place to cross-compare procs.
 
Anonymous
@NikiC i'm using one right now, still works.
 
user1648409
@Danack where do you pass the $typesString though? And why do you pass $this->statement in the array?
 
@LeviMorrison was it because I insulted Apple ?
 
Anonymous
and mine is 32bit and yet runs centos7 (64bit) version
 
@Shiuyin I missed a line - the final params passed are actually:
$finalParamArray = array($typesString);
$finalParamArray = array_merge($finalParamArray, $parametersArray);
and then array($this->statement, "bind_param") means calling the bind_param method of the statement that was already prepared earlier.
 
10:06 PM
@tereško no. But you say things which just aren't wrong ;-) … But kick-muting is a bit harsh… Just be silent when you don't really know what you're talking about ;-)
 
user1648409
@Danack so after those two lines you call call_user_func_array(array($this->statement, "bind_param"), $finalParametersArray);
 
user1648409
correct?
 
Yeah, something like that.
 
user1648409
@Danack cool, thanks
 
@Shiuyin, incidentally this very problem is why a lot of people tend to recommend PDO over mysqli. PDO var binding doesn't rely on the weird string assembly syntax.
 
user1648409
10:08 PM
@Charles already read that... i settled on mysqli though...
 
@Shiuyin Good luck.
 
user1648409
@Charles lets see if i can finish that additional abstractions layer
 
user1648409
@Charles thanks
 
user1648409
@Charles if everything works, i would just call something like $DB->get("stuff") and the db class will internally lock tables, parse it into prepared statements and make a transaction out of it
 
@bwoebi sorry for abusing the word "architecture" .. I tried to be short .. I'm kinda in the middle of meaking some food
 
user1648409
10:15 PM
@Danack still don't get this :D i get an error now that "Parameter 2 to mysqli_stmt::bind_param() expected to be a reference, value given". But when passing array($stmt, "bind_param") shouldn't it already be a reference?
 
@Shiuyin do you really mean bind_param or do you mean bind_result?
 
user1648409
@Danack bind_param. I get an array of param that will be binded to the already prepared statement. Means i have x times "?" in the prepared statement and the appropriate params for it
 
@Shiuyin Apparently that is a thing - stackoverflow.com/questions/16120822/…
Not sure why I didn't encounter it...
 
@Shiuyin I usually just do
$placeholders = implode(',', array_fill(0, count($list), '?'));
 
user1648409
ok thanks guys
 
user1648409
10:21 PM
works now
 
and then use it to construct the query which is prepared
 
user1648409
mysqli is weird ^^
 
user1648409
@tereško doing something like that
 
@tereško No, but just to clarify two things: I'm not an Apple fanboy (I'm just not prejudice), and you kept spreading misinformation. When you are continually wrong it's incredibly annoying and hard to focus on constructive discussion with the person who actually needs the correct info.
@tereško Don't yell "WRONG" and then give a factually incorrect statement and act authoritative. It's just that simple.
 
10:44 PM
hey, HHVM compile time is indeed tolerable with SSD
16~18 minutes from scratch
 
"tolerable"
 
it's only not so tolerable when you hit make clean by accident -.-
 
8h LLVM here.
 
@ircmaxell I'm not sure, but shouldn't the first !== in the validation code also use timingSafeCompare here?
 
@MarceloCamargo wow, hope you never need make clean.
 
10:52 PM
@kelunik yes, please edit it in
 
@marcio My last attempt on 8 cores with an SSD was significantly longer than that. You are sure that's from scratch? :)
 
@LeviMorrison not really from scratch, but I git pulled 3 months of new commits
@LeviMorrison how long it takes for you?
 
@marcio Once I realized that it would a while I just went to bed.
 
30 times to fetch all PHP7 dependecies here.
My computer sucks.
 
@kelunik thanks
 
11:10 PM
@rdlowrey Have you actually used Redis yet?
 
@LeviMorrison nah, just the chat by @kelunik is using redis
 
I think we are going to try using Redis for our website sessions.
We're slowly working on better redundancy.
 
I've been meaning to play with redis. It looks like it could be useful as a memcached replacement with data tagging.
 
We currently use file-system sessions. We eventually need to migrate our MySQL stuff to HA. We'd prefer to put as little as possible in the database because of this and Redis makes sense for sessions.
 
@LeviMorrison yes, Redis is totally awesome for sessions.
 
11:26 PM
evening
 
Do you guys know some way for, from PHP, convert token representations back to source?
Or do I need to do it manually?
 
$source = '';
foreach($tokens as $token) $source .= is_array($token) ? $token[1] : $token;
it's easier than it sounds ^
 
You deserve a cookie.
Thanks!
I'll work on preprocessor by modifying not the source, but appending and replacing tokens for, after, generate the source from them.
 
I thought that was the plan? BTW, did you manage to use the gist I sent to you yesterday?
 
Yeah, I'm compiling PHP7 just now. It is almost finishing.
 
11:40 PM
use the --disable-all option :) it's much faster
 
Why didn't I read it before? :(
 
./configure --disable-all --enable-debug --enable-maintainer-zts --with-readline
something like this ^
--with-readline is so you can use php -a without feel too miserable
 
Anonymous
@marcio why disable all? Is that for testing the new features?
 
```
--EXPECTF--
<?php

class Task {}
class NotTask {}

$queue = new class {
protected $items = [];

function push($1 $item) {
$this->items[] = $item;
}
};
$queue->push(new Task);
$queue->push(new NotTask);

?>

```

Why does $1 be expected in the output of the test? Shouldn't it be replaced?
 
@MarceloCamargo yes, it's supposed to be function(Task $item) updated gist
 
@MarceloCamargo function push(Task $item) //
 
Ah, I see. The compilation finished. I'm trying and analysing what source does.
 

« first day (1684 days earlier)      last day (3261 days later) »