« first day (1595 days earlier)      last day (3353 days later) » 

11:07 AM
Hi guys, anyone used Google Calendar API before?
 
@Leigh Yes, because the AST is arena allocated, you can't free a single node
Also take a look at lxr.php.net/xref/PHP_TRUNK/Zend/zend_ast.c#433, which does ast** traversal for you
(if you call it recursively)
ow no they changed the /r/php design
and it looks like they're totally on the "light gray font on white background" train ...
 
11:24 AM
hello all - has anyone used gettext ?
 
I'm sure all of them have used getdrunk
 
it's a given for anyone using PHP
 
morning
 
Google Calendar API .. gonna try to do that, anyone with experience?
 
11:34 AM
Just looking for a good PHP documentation, theres not much on google
If anyone knows something specific that would be nice
 
E_TOO_BROAD
:-)
 
:-P
probably flagbait
 
Morning
 
How's life @DaveRandom. You are writing code again or still tweaking cat6 cables? :P
 
morning
 
11:38 AM
Morning @kelunik @Leri
 
$count=$user->load(['emails' => function ($q) use ($type)
					 {
					 	$q->where('users_email.sender_uid','=',Auth::Id());
					 	$q->where("users_email.reciever_type",'=',$type);
					 	$q->orWhere("users_email.sender_type",'=',$type);
					 	$q->count();
					 }]);
hey guys how how could I get the count number from the above query?
please help
 
if you write "php doesn't output" in russian in google, the first suggestion is "php does not get extracted from the body" (in russian the beginning of the sentence is the same)
 
@PeeHaa The latter for another week or so, then again in a month or so, actually have my first ever use case for a segregated/routed lan, which is going to involved dismantling and reassembling a cabinet with >400 points in it :-/
I'm not going to pretend I don't enjoy architecting networks though
 
:D
@asim Do you know how to write SQL?
 
@PeeHaa any thing wrong with the query?
 
11:48 AM
There is no query only some weird abstraction of a query
 
Yay for 3+ tier abstractions
 
@PeeHaa :/
 
I think there should be return $q->count(); in the last line of the anonymous function, but that's a guess
 
Open a sql window and run `$q->where('users_email.sender_uid','=',Auth::Id());
$q->where("users_email.reciever_type",'=',$type);
$q->orWhere("users_email.sender_type",'=',$type);
$q->count();` I am confident it will not work
 
@PeeHaa this is not sql query but laravel eloquent queries :)
 
11:52 AM
So do you know how to write SQL?
 
It does return an object from database
@PeeHaa yeh
 
What does the above represent in actual sql?
 
select count(*) as aggregate from email inner join users_email on email.Id = users_email.email_id where users_email.reciever_uid in (78) and users_email.sender_uid = 78 and users_email.reciever_type = 'trash' or users_email.sender_type = 'trash'
 
@asim just do what I said you to do.
 
Yeah I am agree with @SergeyTelshevsky. There is nothing that returns from the function
 
11:57 AM
hi guys
I have 1 doubt ..
which loop is faster
foreach() OR for() OR while(list() = each())
 
Test it
 
?
 
Is ast extension ready for production?
 
as per phpbench.com site foreach() loops seems to be faster
 
@SergeyTelshevsky actually it runs two queries first for the count and second for the email so it returns an email object
 
11:58 AM
@John Which X is faster are stupid questions to ask other people than yourself
Test it and profile it
 
Yes I have tested with this site code juliusbeckmann.de/blog/…
and foreach() seems to be faster than other two...
 
No test it with YOUR data
 
@asim the code you showed obviously runs only one query, that is, it structures a query and only ->count() is the call that executes it
 
Also I have a feeling you are about to change double by single quotes php freshman
 
@PeeHaa :d
 
12:00 PM
@John Why do you ask what is faster?
 
@PeeHaa igorw, the senior freshman
 
@ircmaxell Hey, looks like you won ;) The PHP 7 based JIT got open-sourced sooner than I expected
 
12:16 PM
Hi there
 
that doesn't run one query as I told you it runs two queries...! the emails is relationship function here's the second query
select `email`.*, `users_email`.`reciever_uid` as `pivot_reciever_uid`, `users_email`.`email_id` as `pivot_email_id`, `users_email`.`sender_uid` as `pivot_sender_uid` from `email` inner join `users_email` on `email`.`Id` = `users_email`.`email_id` where `users_email`.`reciever_uid` in (?) and `users_email`.`sender_uid` = ? and `users_email`.`reciever_type` = ? or `users_email`.`sender_type
 
@PeeHaa do you have time for feedback for amp-chat?
 
@kelunik I can make time sure
Where do you need me?
 
Just look at Two Crowns, I've posted a first draft for a new design there.
 
here's the solution count($count->emails) :)
 
12:21 PM
@kelunik What did change? The right bar is gone?
 
12:32 PM
ewww llvm
 
@NikiC quite awesome. Will need to play around with it. and thank them on list.
Also, its still very early, but votes so far have basically followed my predicition to a T: marc.info/?l=php-internals&m=142436232003719&w=2 hovering between 71% and 76% sincerely opening...
 
very cool
totally useless, but very cool, and very cool that we get to read it ...
 
Yup. And I am more interested in the LLVM bindings so we can use things like Klee than actually running code.
 
ewww
they ruin everything you know ... I've never seen beautiful LLVM code ...
no the tools are cool ... but I'm more interested in runtime ... but tools are cool ...
it would be nice to be able to switch backend ... or write a new unified backend, just a layer on top, or from the ground up ...
going to crawl back under my rock now ...
 
@ircmaxell did you see my ping about mwop's message on his testing of the strict scalar types? aka his latest email to the list.
 
12:53 PM
@Danack yes. And I need to think of a thoughtful reply. I am typing from a tablet in bed still...
 
It seems weird that he's saying that the float -> int was lossy and that it dropped the fractional part.
 
@Danack a lot about his post seems "off"....
 
Yes.
He may be under a little pressure at the moment.
 
12:59 PM
@PeeHaa I was asking because there is situation like I am fetching users(around 10k) and need to loop them and attach in json and finally send back to browser (there is no option for pagination :( )
 
Knowing him personally, I don't think so.
 
@Danack hehehe
 
Possibly being fed misinformation, but he would fight pressure
 
@John Yes use a pretty profiler instead of blindly stabbing in the dark and making incorrect assumptions
 
@PeeHaa can you suggest a way through which mysql_query result will be looped in foreach(){}
instead of while(){}
 
1:04 PM
@John you really shouldn't use the ancient mysql_* API
learn how to use PDO instead
 
I just ported two query builders from PDO to mysql_. I feel guilt, I wan't to smack my fingers with a hammer I hate legacy enterprise conventions.
 
@tereško Yes but that will require to change each and every query in the project & its not possible :(
 
@John if you are not working on some legacy codebase, you really should make the jump
the mysql_* API is already throwing E_DEPRECATED warnings in newer PHP versions
it will be discontinues ... and it also makes really hard to prevent SQL injection vulnerabilities
 
@tereško Yes that I know but my localhost is updated and clients server contain old php version (as they contain other php projects which are built on old version) .So requesting them to update their php version will require to update their all applications.I guess that will cost them BIG
 
1:20 PM
@John PDO has been available since 5.1
I really doubt they are running on anything older than that
 
Why there is no function in PHP to get raw request headers..
 
@AlmaDo Doesn't the apache sapi provide that?
 
@PeeHaa ohh this was unknown to me ..
thanks :)
 
@PeeHaa nope
 
oh thought it did. nvm. carry on. Nothing to see here :)
 
1:25 PM
 
@PeeHaa and yes they have php 5.2 versions which I guess OKAY
 
so what? World of SAPI is far larger than apache
 
@AlmaDo Nobody said otherwise ;)
 
getallheaders - what doesn't that do?
 
Yeah that's the one I was thinking about
 
1:28 PM
@Danack (doesn't exist on fpm)
 
That would be an issue.
 
Yeah, that's the same, I just searched for "headersgetall" instead.
 
yeah. One I tried to tackle, but the personal laptop, which I used to develop php-src on, died.
 
@FlorianMargaine :(
 
@PeeHaa that leads us to my question
 
1:30 PM
?
 
woops
 
lulz
 
(:
 
and also this failed rebase, supposedly adding tests for 5.6: github.com/Ralt/php-src/compare/PHP-5.6...getallheaders-fpm-5.6
but the tests failed...
 
1:31 PM
9 mins ago, by Alma Do
Why there is no function in PHP to get raw request headers..
 
the testing system for fpm was new.
 
Ah
E_MISSING_REQUIREMENTS :P
 
@AlmaDo Hmm?
 
@Leri Hmm!
 
getallheaders?
 
1:32 PM
@AlmaDo because php doesn't answer to http requests
@Leri it returns an array
of a parsed request
 
@AlmaDo BTW your German is not too shabby for the time you are there ;)
 
@PeeHaa lulz. That was google translated stuff. By myself I'm learning German for three weeks and am able to say something like "Ich habe eine Frage"
 
heheheheh :D
That is an important one though :)
 
what does Frage mean? wink wink
 
@FlorianMargaine Yeah, but sapi does not actually do anything with raw headers but splitting. Just ensured by looking at the source code: lxr.php.net/xref/PHP_5_6/sapi/apache/php_apache.c#416
 
1:37 PM
question
 
@AlmaDo yes, I asked a question.
 
I did not check for other aliases but should be similar implementation.
 
@PeeHaa together with Ich verstehe das nicht!
 
:D
 
@FlorianMargaine and I answered it
LULZ!
 
1:38 PM
 
@FlorianMargaine Nah, getallheaders is always aliased
and that's respective function for apache
 
@Leri yes, but the link you gave me is for response, not request
:P
and it just loops through a defined list
 
here's corrected link
 
there's actually some processing before that to add the headers to this list
as in add_request_header or similar
 
Yes, but without that raw headers might not be compatible to what php sapi does (due to historical reasons :D)
 
1:42 PM
?
 
Never mind. I need to test that it really does, what I thought.
 
(that I refactored in SAPI/main.c at some point... but that hasn't been merged)
(because yes, every SAPI does that)
(yay code duplication!)
 
lol
 
2:02 PM
fixing code for coercive RFC by strategically putting (string) everywhere before and after internal function calls
wasnt this the argument against strict mode?
 
\o/ rfc feed update
 
the whole thread just shows that the RFC is a bad idea imho...
 
@kelunik the colors are wrong / switched for No / Yes votes php-rfc-watch.beberlei.de
Instead of yes / No votes which are correct
 
Yes, I know. They're just from a color wheel. I didn't include actual parsing of texts yet.
 
ok just wanted to complain ;)
Like it though!
 
2:07 PM
@kelunik when it's polished, send a mail to internals :)
and it should be added to the usual pinned message showing this room's tools...
 
almost all the is_something emthods expect specific types with the patch
so is_infinite("") => error
is_dir(false) => error
 
no no no
 
Does rasmus ever vote yes on anything?
 
not an error, E_DEPRECATED!
 
this is the sort of changes necessary with the coervice patch to get a testsuite running again: gist.github.com/beberlei/6a5a6b65839d35bb27f0
 
2:10 PM
@FlorianMargaine It's @beberlei's project. ;-)
 
littering the whole code with (string) and whatnot
showing broken apis as well for example DomNoe::clooneNode expects an integer not a boolean
i am actually quite fond of the code after the changes, it makes the code more explicit what its doing, however changing this is the no-go
 
@beberlei Any idea how we could do that coloring?
It seems to use the bootstrap progress-bar now as it has a border at the bottom that wasn't there before and doesn't have a border-radius anymore.
 
hey guys, this is gonna sound weird but, is there a way to hide an echo from showing up on a webpage in the front end? Say if I wanted to get that echo in my javascript?
 
@beberlei that's something we can fix (at least for types)
 
@PeeHaa How do set colors for votes like error_handler ? ;-)
 
2:16 PM
 
:)
 
@ircmaxell yes cloneNode() needs a fix, but things like substr() returning false if the position is out of range just breaks alot o stuf
 
@kelunik I don't see any way to do that automagically :(
 
@kelunik /^No/
 
Blame PHP's ever changing and inconsistent \o/ rfc process
 
2:18 PM
That's why I introduced the current coloring, because that would work if the first answer is "accept" and the last one is "decline".
@FlorianMargaine That would be suitable for a red color, but how to color the other ones?
 
I love this RFC though
4
@kelunik 50 shades of gre.. en
 
@kelunik yes I think it should do some sorting based on enum order
@kelunik hm it should maybe look for yes and no in the text, that would be even better for multi votes
 
so guys, can someone help please <3 ?
 
@Brunaldo How can we possibly know...
 
@Brunaldo you can ob_start() ob_get_clean() around that echo
 
2:22 PM
@Brunaldo If you're echoing it into JS, it would still be visible in the source
 
in Android, 18 secs ago, by WarrenFaith
Where the fuck is my gun...
 
@beberlei We could just color /^No/ red and other options yellow green and blue.
 
Mission accomplished
 
@kelunik sounds legit
 
2:25 PM
@PeeHaa Every time you manage to troll a Java user, using PHP, you get +100% bonus internet points. Well done, sir.
 
:)
 
We should just make sure there's no duplicate color. And we should probably sort those options so there's always first Yes then No.
 
does someone have a link to a nice "Wall of Shame" php script? :P
 
@Gizmo Nope. There is a javascript wheel of shame though
 
@PeeHaa well shit, if you search for "PHP for Android" there's actually a ton of results google.co.uk/…
 
2:28 PM
@beberlei could you please use 24h format instead of 12h? :x
 
Goddamnit
 
@Ocramius statistically, roads that people drive every day tend to have a higher accident rate than other roads, as people switch off and start driving without paying full attention to what they're doing.
 
How the fuck can I be so fucking stupid
 
@beberlei well, that's also a bug then ;-)
 
@bwoebi i try to find the right format code for moment.js :D
 
2:28 PM
@beberlei I had more meant is_infinite erroring on non-float arguments
 
@PeeHaa URL lengtheners are the future ;)
 
:D
 
@Danack yeah, the statistic is also fucked, since people drive a lot more on this road...
 
@FlorianMargaine accident rate, not total accidents...
 
yes... and most people take the same road. They only take the highway once a year or something.
 
2:32 PM
guys, should I succumb and wear glasses? I think staring at the screen all day is making me blind
 
accident rate ==> accidents per mile driven or hour driven. not total time/distance.
 
@ircmaxell yes but this requires finding all that code, and changing all that
 
@Brunaldo Or just go out for a beer
 
not much of a drinker :(
I've had to make everything black, themes all black too much strain
I reckon stack should have a black theme :)
 
Isn't one of the fundamental rules of design: never use black.
 
2:34 PM
@Brunaldo Then just go out :)
 
I know that doesn't help your situation much, but still. :)
 
@kelunik are you working on a fix or shall I?
 
@beberlei Currently not.
 
@PeeHaa good idea man, back in a bit lol!
 
Have fun
 
2:36 PM
I find going for walks around the block often helps me clarify idea's too. My answer to most problems at the moment is: Go for a walk.
 
@Leigh s/walk/smoke/
:P
 
yeah smoking helps :)
 
Acceptable I suppose considering the effects of nicotine, but you should be walking too, not standing in a corner
 
I run before lunch :P
 
grumble, declare(strict_types=n); is too strict. Trying to find a way of getting something other than a 0 or 1 in there and having it cast to 0 or 1. But looks like no chance.
 
2:43 PM
what will declare(strict_types='1'); do?
if this enables strict types... oh the irony :D
 
That's an error :)
has to be an int
 
good :P
 
but declare(strict_types='0'); is also an error
 
@kelunik "fixed"
 
2:45 PM
@beberlei \o/
 
@beberlei It's missing different shades of green and yellow. ;-P
 
@beberlei shouldn't the last voted RFC be at the top?
 
Btw, happy kfVsfOSbJY0 everyone
8
 
The page is btw. missing a small padding / margin at the bottom.
And I liked the light green more. ;-P
 
@Ocramius Happy kfVsfOSbJY0 to you too!
 
2:49 PM
@FlorianMargaine maybe? :)
@kelunik you know where to contribute
 
that would be more intuitive imho :P
 
3:00 PM
@Ocramius Happy kfVsfOSbJY0 !!! :D
 
posted on February 27, 2015 by kbironneau

/* by Jimi75 */

8
 
back :)
 
@Feeds hehe :-)
 
@Feeds /cc @kelunik @PeeHaa :D
 
:D
 
3:09 PM
@beberlei no, I mean widening the rules in core
@LeviMorrison :-(
but I understand
 
55 mins ago, by beberlei
@kelunik https://i.imgur.com/Q3cUg29.gif
 
@NikiC and that confirms every suspicion that I had around it
 
@beberlei I've created a PR, maybe we should use something that starts from 0 for each color instead of using idx.
But I think it's just fine for now.
 
3:16 PM
do you guys ever look at email headers in case there is an easter egg?
 
> or, maybe, we could embed opcache(Optimizer) into Zend later... but of course, it only can happen in next major version...
it was supposed to happen for 5.6, that's why we included it in 5.5...
 
> Do we really need a major version for this? It doesn't involve major ABI/API breaks. The compiler step is usually also rather left untouched by most extensions. If we want to do this, we could target 7.1 without major issues.
^ I replied
@FlorianMargaine sometimes, but rarely…
 
hm now i think the only thing missing is like a title change to (1) when there is one new vote since my last checking the rfc watch page :)
 
/me boos @LeviMorrison :)
 
@ircmaxell By the way… I think we should keep the op_array caching in ext/opcache and move Optimizer into Zend.
 
3:28 PM
@bwoebi I'm not so sure. I don't see any reason to leave it out. By integrating it, we don't have to duplicate datastructures or interning code anymore. We can reduce a LOT of indirection and complexity by putting them together...
 
> For now I don't know how to change Control Flow Graph representation and
corresponding pass to support ZEND_SWITCH.
 
My next blog post should talk about PHP's OPCache extension in deep
 
Is Dmitry really telling me he doesn't understand his own code anymore? :-(
 
this is a problem (the fragility of a codebase where 1.5 to 2 people know the code)
 
3:38 PM
I must say, I get most optimization code… but CFG optimization step is a horrible mess.
 
cfg "optimization" step? CFG should be needed for basically all optimizations, no?
 
a lot of optimizations are for example merging literals, removing NOPs, compacting the op_array generally
do some substitutions where possible etc.
@ircmaxell But CFG optimization is all in a single enormous file block_pass.c
 
@salathe I've been told that you're the person to talk to about getting involved with PHP documentation.
 
@bwoebi well, CFG isn't an optimization, it's a representation
 
@MattPrelude All you need to know is where to find the edit link :-)
 
3:42 PM
@MattPrelude edit.php.net
 
Ah OK, assumed there was like a list of pages which particularly require attention or something. :P
 
@MattPrelude bugs.php.net
 
@ircmaxell I mean, creating CFG and optimizations based on it are all clashed together in a single step.
 
@bwoebi that's a problem
 
What I said.
 
3:43 PM
I know
I'm much sadder that the JIT was done as part of optimizer and not the engine. I'd bet $$$ that if it worked, they would have sold it as optimizer v2 rather than "open sourcing it".
 
@ircmaxell well they're a company...
 
@FlorianMargaine which takes advantage of the root project at every turn. Try running php -v, what companies names come up?
 
@ircmaxell hmm, not sure. They could have reviewed it for 7.1 and retried it…
 
@MattPrelude Hi Matt. edit.php.net is a way to get going fairly quickly, along with its guide wiki.php.net/doc/editor . Then there's the documentation guide proper available at doc.php.net/tutorial
 
@bwoebi yes, the only reason they open sourced it was because of pressure from the community
 
3:45 PM
and hhvm
 
@ircmaxell I've recently done work using stochastic CFGs, it's an interesting representation to optimize JITs, haven't seen anything published on it though.
 
market forces really work towards open-source and financing based on consulting, training, extra services ontop isntead of open core/closed extension model
 
@MattPrelude I'd also encourage visiting (on IRC) #php.doc on Efnet if you would like to chat, guidance, questions, etc. It's a very quiet channel, so stick around rather than fly-by ask a question. :)
 
Thanks @salathe, I'll jump on there now
 
@ircmaxell I wonder… why did they back then opensource ZO+ at all then? AFAIK there was no pressure initially… it was their proposal, no?
 
3:47 PM
@BenjaminGruenbaum context-free-grammer? or control-flow-graph
@bwoebi they had a lot of pressure from the community to prove relevance
it got Zeev back into the game
 
@ircmaxell context free grammars, I thought you were optimizing at a whole other level :D
 
also, it was losing ground to what APC and the rest could do, so it was no longer a profitable platform for it
@BenjaminGruenbaum we were talking about control-flow graphs :-P
 
@bwoebi because there's no way the PHP project would accept a closed-source feature
 
@ircmaxell yeah I was like "Woah, how can be optimizing at this level already o_0"
 
@BenjaminGruenbaum hehehe :-P
 
3:49 PM
@salathe that wasn't the point… point was why they wanted to integrate into PHP at all.
 
@kelunik thanks for the PRs :) looks much nicer now, first time React.js as well?
 
@bwoebi You asked why they open sourced it, not why they wanted it in PHP.
 
@bwoebi we were talking about integrating APC at the time. Cutting off their business model for ZO.
 
@beberlei Yes, first time React.js, Flux, Webpack and Doctrine CouchDB ODM^^
 
3:50 PM
@ircmaxell okay, don't remember.
 
can anyone suggest me a project for final year
 
so either way they would lose it. So they open sourced it to 1) remain relevant 2) show some good will to the community 3) lock in more advertising eyes
 
php project
 
project about php or written in php ?
 
And final year in what field?
 
3:51 PM
@ircmaxell yes, makes sense… Has its good and bad parts to have Zend participating in PHP…
 
@bwoebi basically we wanted to include APC, but it was a lot of work and not many resources willing to help... and Zend popped in with "hey, we have an opcode cache and it's ready to be merged" (I'm paraphrasing, of course)
 
which overall was a good thing, don't get me wrong
 
writyeb in php
 
the discussion started i think with APC not really working with php 5.4 100% even though we had .15 already or something.
 
I am cs diploma student
I cant go deep into php language
 
3:53 PM
@beberlei uh, sorting the rfc list according to last vote doesn't seem easy in your arch...
 
@ircmaxell I get the feeling like Zend would like to have much more control of PHP. But the way it is now… they contribute to PHP, but don't really control it.
 
@bwoebi very much yes. But they act like they control it too. It's only when people push back that proves it's not the case
 
@ircmaxell Sometimes it is the price to pay to have nice things…
 
@SuroorAhmmad you could try making something with PHP binding for FANN, for example a "spam detector" with FANN and you could also make a good "live experiment" where you start with unprotected site and analyse the results
 
@bwoebi letting them control it?
 
3:55 PM
@ircmaxell no. Having them interact with us. And tolerate a certain level of their behavior.
 
I'm not so sure
I wonder how many people are driven away from the project by it
I wonder that if they backed away fully if we couldn't have a more healthy contributor ecosystem
 
Maybe. But it also would have a big effect on the productivity in php-src. (Dmitry, Xinchen).
 
initially, for sure
 
Initially, definitely… and then it's uncertain what comes.
It's a big risk.
 
of course, which is why I'm not officially proposing it ;-)
 
3:58 PM
dimitry is currently a big bus factor on Zend/* or am i misinterpreting that?
 
just discussing it as hypothetically...
@beberlei he's a big bus factor on opcache
Zend, I think we can get by, there are enough people with enough knowledge that I think we'd be OK...
 
@beberlei There are more people who know Zend/*… but yeah, opcache.
 
yeah, niki, bob, joe all know Zend pretty well afaik
 

« first day (1595 days earlier)      last day (3353 days later) »