« first day (1752 days earlier)      last day (3179 days later) » 

7:00 PM
With the addition you can do nice things like:
The search seems ok + "download my posts" was a nice surprise:
I just don't love the infinite scroll thing :(
 
user1648409
Hi, when copying deep copies in php, can i do something like this: ?

public function __clone() {
foreach($this->fields as $field) {
$field = clone $field;
}
}

Custom class has an array of objects as attribute. So i want to deep copy those as well...
 
@marcio Seriously. It's pretty much the most insane, horrible, nasty design decision that they made. It makes it entirely unusable for a giant portion of the population, especially one that is used to email lists.
 
@Charles agreed, hence why I think it might be optional somehow.
 
@Charles actually, I wonder, a thread in the email client is also infinite scrolling, no?
 
@bwoebi we are talking about the main topic list -> internals.rust-lang.org
 
7:11 PM
@marcio same there?
 
@bwoebi inside the topics the infinite scroll looks nice because there is the progress bar showing how much you've read: internals.rust-lang.org/t/…
 
@marcio when I have Mail.app, I also have a list of all the topics… just needing to scroll down.
 
well, then you like the infinite scrolling :)
 
@bwoebi No, it's threaded, one email at a time, with individual clicks... unless you're in gmail, in which case things get really weird once threaded replies start happening. Linear forums are not a suitable replacement for a threaded discussion medium like email.
 
so .. what's up?
 
7:14 PM
Source: I have written forum software for literally decades.
 
hi, why can i use a class before its definition, and inside other functions BUT not when that class uses an interface
 
wat
 
i have a class A which implements interface I
if i try to use A before the class and interface definition it works
if i try after it fails
ah nono
if i try before it fails, after it works
 
still, wat
 
if A doesnt implement I, then it works before and after class definitions
 
7:27 PM
code, please
 
@LucaP you mean this
 
yes
 
that seems like a bug to me
 
exactly
 
there is probably some hoisting going on
@LucasP, please defines classes and interfaces in separate files and use autoloading to include those files
 
7:30 PM
ouch, this is a rather simple project but i guess i cant keep avoiding it
should interfaces and class have each their own files?
 
yes
 
@LucasP yes, and I recommend using composer if nothing else than to manage the class loading for you.
It's not perfect, but it saves so much time.
 
ok, thank you
 
@Orangepill the compile step is separate from the executing code step.
 
one would think it would either fail or succeed in both cases though.
 
user895378
7:37 PM
I think this is the fourth weekday in a row where I've accomplished a mid-day nap \o/
 
@rdlowrey almost same here. Only I just woke up at mid-day. And was pissed that there is no point in going to farmers market anymore
 
user895378
hehe
 
user895378
Lately I've been waking up early, working for a few hours and then napping for an hour or two after lunch.
 
OH: LET'S THROW SOME ThOuSAND EUROS OF ENGINEERING COSTS ON THIS PROBLEM, BECAUSE WE NEED 10 EURO HOSTING #engineering #developers
 
I think I'm gonna try to adopt 22:00-06:00 sleep schedule
 
7:40 PM
currently fixing loads of shite because of that ^
-.-
 
what sort of issues you have between a cheap hosting and a more expensive one
 
@Ocramius you know, that'll have been worth it in a hundred years.
 
@LucasP for example people forcing a filesystem based cache onto me? :P
@bwoebi I WILL BE DEADDDDDD!!!!!!1111!!!
but yes, maybe :P
 
hehe
well… sure you'll be dead by then? we live longer and longer today…
 
I sure do hope I'm dead by then
 
7:44 PM
@Ocramius Is that related to your imagick question?
 
@Ocramius Why do you hope that?
 
@Danack nope, luckily
@bwoebi because I would have seen too much code by then
the human brain has limits to horror
 
@Ocramius the human brain has a nice ability…
being forgetful…
 
@Orangepill … o_O?
 
7:48 PM
@Orangepill as a matter of fact, I'm sipping on some whiskey
doesn't work
 
tequila works better
 
eh, but then you need to reach hospital levels to forget stuff
 
@Ocramius just need more iterations
 
@bwoebi Some brains have that...
 
framework.zend.com/security/advisory/ZF2015-06 <-- we need to make that suck less
 
7:52 PM
@kelunik s/some/most/
 
user895378
My human brain has all kinds of limits
 
@ircmaxell eh, disabling by default seems like a good idea :X
 
class GithubProvider extends AbstractProvider implements ProviderInterface #justlaravelthings
 
@Ocramius that's not always enough though :-P
 
@kelunik Eh, that's really not that crazy.
In fact it might be fully justified.
That's exactly the kind of thing that might be useful as an abstraction.
 
8:01 PM
Just that AbstractProvider already implements ProviderInterface and it should just be one Provider class.
 
@Sajad no
 
@kelunik the only weird part is why doesn't AbstractProvider implement ProviderInterface
also: WHY IS THE INTERFACE USING AN "INTERFACE" SUFFIX
department of redundancy department
 
@ircmaxell "the only", "also". ;-)
 
no, one is a design question, the other is a idiots question
 
@ircmaxell Probably does and they just did it for explicitness.
 
8:06 PM
so is a Factory a type of Provider or does Provider mean something more specific?
 
@Orangepill It's a service locator thing I think.
 
@Orangepill In this case it's an OAuthProvider.
 
but in general like If I'm making an interface that's initial concrete implementation is going to be a factory would I be correct in calling the interface SomeDependencyProvider as opposed to SomeDependencyFactory
 
@Orangepill a provider is a concretion, a factory is an abstraction
 
Hmm, okay
So, I'm back, and I made packed strings' hash value be the packed string's bits itself
 
8:15 PM
@ircmaxell okay ... so I got it backwards
 
If you somehow have a non-packed string of that length, it'll also calculate the hash this way
 
@Andrea what now?+
 
(don't worry, that's in my branch, not in PHP master!)
 
there is no stored hash value there
ZSTR_H is 0
 
@ircmaxell Yes, but that means it has to rehash all the time. Sloooow.
So instead, I redefine PHP's hashing algorithm to use the tagged pointer itself as the hash value, for short strings
Not my own idea, mind. Someone on Hacker News pointed out this trick.
 
8:20 PM
ahhh
interesting
 
@Charles I particularly love how the list is titled "Xdebug and PHP stuff"
 
looks quite interesting
 
Yeah. I saw that article and thought it was such a cool optimisation, it'd be fun to try and implement it in Zend.
It was surprisingly easy to get it working on --disable-all. It requires all code accessing zend_string guts to use the macros, though.
 
@Andrea And the preliminary results?
 
@LeviMorrison Initially several orders of magnitude(!) slower on hash1() of bench.php, because of rehashes. Now it's around 1.5x the time for all of bench.php
So it's slower. But I wonder if I can fix that.
More interesting would be memory use on something large. Hmm...
 
8:26 PM
I'd be surprised if it turns out to be any faster. But I'm surprised too that it's 50% slower…
 
1.282 vs. 1.857... okay, that's 45%. About 50% then, yeah
@bwoebi It's not altogether that surprising to me if I think about it a bit. PHP does lots of string operations. An extra branch that can be mispredicted on every string access (assuming an incompetent compiler) could be quite a big penalty
what I'd hope is that the compiler is sufficiently smart to eliminate duplicate checks
 
@Andrea ok
 
let's try adding some UNEXPECTED()s
This might actually make it slower, if smaller strings are more common
ughhh
Is there a compiler flag to make implicit declarations of functions illegal?
-Werror=implicit!
 
@Andrea not only that, but the branches have the problem that even in case of success we can't try the branch … like if (IS_TAGGED(str) || GC_FLAGS(str) & ...) … you can't dereference str to get the GC flags until you'll have determined whether it's really tagged. Which makes branch prediction nearly useless there.
 
@bwoebi Yeah, x86 sucks there :/
 
8:35 PM
yep
 
@bwoebi branch prediction works there
 
@ircmaxell it depends on what it guessed initially.
 
Hmm, UNEXPECTED() seems not to have done anything. Not altogether surprising I suppose
I mean, I don't think Haswell even uses static prediction, so it's just an optimiser hint
 
@bwoebi no, combinations are guessed correctly, because an && or an || are really multiple branch instructions, each which can be guessed separately
 
@ircmaxell sure. but you can't verify the one without the other?
[Hmm, I think I'm wrong.]
 
8:38 PM
why If I set one column both `primary` and `unique`, phpmyadmin gives me this error ?
The following indexes appear to be equal and one of them should be removed
 
@Sajad Primary keys are by definition NOT NULL and UNIQUE
You therefore don't need both primary and unique set
 
@tpunt aha, and is it also index?
 
@Sajad yes
 
@ircmaxell yeah, you're right…
 
@tpunt then a primary key is both index and not null and unique ?
 
8:41 PM
@Sajad A primary key is an index - I was talking about the implicit constraints attached to primary keys
 
@tpunt aha I see tnx
 
:24858306 you compile A && B to:

cmp A 0
JMPZ else
cmp B 0
JMPZ else
// IF block
JMP end
else:
// else block
end:
//end
 
@tpunt primary keys can be null...but must be unique
 
@Orangepill primary key is also index (for fast searching) ?
 
retraction... I guess it is required to be not null
@sajad yes
 
8:45 PM
@Orangepill ok
 
@Sajad In MySQL 'key' and 'index' mean the same thing
 
@AllenJB I mean of 'index' is for fast searching (Icon spark yellow in phpmyadmin)
 
@sajad you can check it out yourself create table test (id bigint, primary key(id)); then show indexes from test;
 
@Orangepill alright, tnx
 
@ircmaxell yeah. And when you guessed correctly, you anyway can successfully dereference. Else it doesn't matter when guessed incorrectly, you'd just roll back then.
 
9:00 PM
Morning Guys
Please see this:
http://postimg.org/image/rvn8wjqm3/
What I wanted to do is fill the NULL values with their corresponding Item_Name, City Name, Block and Plot
This Data Set has been filtered using the UNION clause
 
@zahid you need to join the cheque_received table with the sales table in the second part of your union query
 
@Orangepill I was thinking the same thing
But if I do so then the number of columns would not be the same
Isn't that so ?
 
@Orangepill I don't need it :)
 
@zahid We'll have to agree to disagree on that one
 
9:11 PM
:)
 
Does the implicit flushing of output to the browser with output buffering turned off block execution of code?
@abe what no bogosort?
 
Abe
nope :P
 
Aha, I realised something
Tagged pointer strings don't break anything so long as everything's using zend_strings!
It only creates problems in places that still use C strings.
The solution, then, is to zend_string ALL THE THINGS!
 
What impact does that have on performance?
 
9:39 PM
Probably improves it in places
very, very marginally
 
with respect to this issue : http://stackoverflow.com/questions/31795082/insert-query-into-remote-mysql-table-in-php-using-phpseclib

I am inserting through this query : echo $ssh->exec('mysql -h localhost -u root -pXXXX cmudata -e "INSERT INTO test_execution (start_time, end_time, test_description) values (\'$start\',\'$end\',\'$desc\');"');

Independent echo "$desc"; displays values but while inserting the values are ('','',''). Is there any issue with the command?
 
Why aren't you using one of the database functions?
 
posted on August 03, 2015 by J7mbo

Boolean values can now be passed as post parameters.

 
I am trying to insert data on a MySQL table of a remote server
 
@AtomicRooster You can do that with the built-in functions.
 
9:45 PM
Do you have any examples?
please
 
looks like localhost to me
@AtomicRooster see here php.net/manual/en/book.mysqli.php
 
@AtomicRooster Go read the manual pages for the PDO mysql DSN or mysqli_connect. There are examples there for hostname, port, username, password.
 
okay
can i use MySQLi to connect to a remote server or ssh to a server and insert data into mysql on that?
i have been using phpseclib for that
 
@atomicRooster if your remote database accept remote connections they yes
 
user895378
10:01 PM
So ... who wants to implement namespace level visibility modifiers for functions, classes and constants?
 
Not I!
 
user895378
You totally do! I know it!
 
@rdlowrey implement first-class packages instead!!!
 
user895378
So ... who wants to implement first-class packages!!??!?!11
 
user895378
So much work to do ... it never stops. There's always something else to be done.
 
10:04 PM
yes
 
user895378
Has anyone actually had a go at real package system yet?
 
this is why you get minions^H^H^H^H^H^H^Hmentees
 
user895378
lol
 
user895378
If your new employer suddenly stops creating educational software and starts massively patching php-src we'll know who to blame.
 
user895378
Anthony's engineer hiring checklist: ☑ Willing to work weekends on php-src
5
 
10:08 PM
@rdlowrey Ahahaha
@rdlowrey Not only weekends… but also on evenings, right? ;-D
 
user895378
Shhhh ... don't tell them about the long nights in the interview!
 
As the normal work day anyway is just a bit relaxing…
 
forgive me my ignorance but what are first class packages? encapsulation on the library level?
 
@bwoebi If you're a student, yes. :P
 
@kelunik funny… but that wasn't what I meant :-D
 
user895378
10:10 PM
@Orangepill It would make it possible to do things like use MyNamespace; and it would pull in all the symbols in the namespace automatically -- you wouldn't have to manually import individual classes/functions/constants. What we have now is just a glorified aliasing system (sorry for multiping -- I couldn't abide the spelling errors).
 
Know what? I'm tempted to run make test to see how much stuff this broke...
I bet 75% of tests, or more, pass
Oh. run-tests.php won't run...
 
…^^
 
but that's because of one specific thing being broken
I already knew it was
 
@rdlowrey okay...so that would mandate having some sort of package manifest I take it, and it would pull in everything instead of like the current on demand auto loading.
 
user895378
@Orangepill yes, presumably. If you've ever used python for anything it would probably resemble what happens there.
 
10:14 PM
looked into python... the lack of curly brackets drove me insane
 
user895378
I learned python before php -- I liked the enforced formatting and lack of braces but I haven't really touched any python code in a couple of years at this point.
 
the requisite on spacing to denote code blocks reminded me to much of fortran
I came to php from perl ...
 
Ahhh. Perfect amount of honey in my perfect temperature tea that was perfectly brewed. Not a bad way to close off a Monday.
 
so english :)
 
So delicious.
 
10:41 PM
i have a few questions about php,
someone interested?
 
0
Q: Search not working for more than two words in elasticsearch

RafeeRecently, I migrate MySQL database to ElasticSearch. and its basically dump of million resumes. Now, I am using official PHPClient API to interact with ElasticSearch. FYI, below is my cluster index fields [name, email, state, resume_text, visa] I have few questions. I tried searching online ...

@neoDev go ahead post your questions
 
@rdlowrey you think too small
 
user895378
Ah, you're in the market for "take over the world" minions. Very nice.
 
I'm in the market for all minions.
I don't pay well, but I do provide Dental
 
He does the dental work himself too.
 
user895378
10:50 PM
It's a good thing, too: working on php-src is like pulling teeth.
 
lol
 
Rim shot could mean so many things...
 
@rdlowrey they call me "the dentist"
 
Is it safe?
 
10:53 PM
@Trowski ಠ_ಠ
 
user895378
@ircmaxell That's your new leet hacker alias, BTW.
 
user895378
@Trowski I know right. You're taking your life into your own hands clicking on a link like that ...
 
user895378
I probably should've appended that link to the end of my previous message -- that's what it was referencing.
 
I clicked it. Apparently my mind isn't as filthy as you guys because I assumed basketball.
 
I've been there before so I just knew.
 
10:56 PM
For a time, RIM posted their job openings at rim.jobs :-D
And if you don't know why that's funny, I guess you've been sheltered.
 
Probably worth a lot of money, that domain.
 
Maybe... though .jobs is a good example of why most of the new domains will fail.
 
Come to be before subscribing to PHP-Internals. I'll at least give you Novocain.
3
 
user895378
\o/
 
user895378
Free root canal with proof of internals mailing list subscription!
 
11:04 PM
that's tomorrow's tweet
 
@ircmaxell haha, awesome!
 
@ircmaxell amazing :-D
 
Abe
11:27 PM
lol :D
 

« first day (1752 days earlier)      last day (3179 days later) »