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

4:02 PM
> - The first request may be extremely slow (few minutes)
that's why it never made it out the door
 
HHVM? … ah the jit.
 
wat
 
guys please help me - is this elephpant white and gold, or blue and black? Me and my friends can’t agree and we are freaking the fuck out
10
 
@bwoebi the "jit"
 
4:02 PM
@Gordon does it have a shirt?
 
@Ocramius I have no idea. does it?
 
Dunno D:
Also: why the heck does it only ever rain when I walk to work or leave work? -.-
 
@Gordon It's all the same color?
 
Is the sky blue or grey?
 
a greyish blue :-)
 
4:07 PM
Morning. I've been sick for three days.
Still not fully recovered.
 
@LeviMorrison :-( Feel better!
 
@LeviMorrison uh :-( Recover fast :-)
 
I have to take an in-class test today so unfortunately I have to get out of bed.
In some ways I hope I puke in the middle of the test.
Me: "I'm sick"
Them: "It's an in-class proxied test. You have to come."
*Me pukes*
Me: "…I did tell you I was sick."
Them: "…"
 
What is an in-class proxied test?
 
ThW
@Gordon Regent Gray :-)
 
4:14 PM
"Proxied test" generally means it is administrated by a person.
The "in-class" part just means it happens during class time.
If "proxied test" doesn't actually mean that I blame being sick.
 
@LeviMorrison yeah, it's given by a "proxy" (representative of the teacher/grading body) who prevents cheating and ensures a fair test
 
Yes, a person who is not the teacher. Forgot that detail.
 
@LeviMorrison Flu style symptoms?
 
guys, dumb question, how can I pass a variable in a php file to another php file without using submit buttons, just plain php?
 
@ircmaxell Yes, although I would classify the headache as more severe than "mild".
 
4:28 PM
:-(
feel better dude
wow, Dmitry's "JIT" isn't a JIT at all
 
@ircmaxell It isn't just-in-time?
 
no
it compiles the entire application in one go
 
Is it generating native code?
 
4:34 PM
guys, is there a good tool for stress-testing a site?
not apachebench
 
jmeter
it's the standard tool
 
ok , researching
 
Isn't jmeter just ab with a gui?
 
no
you can create scenarii and have a server launching multiple clients
 
I wonder how much mileage we could get out of an optimizing interpreter (generating new oplines that are still normal oplines, just smarter ones)
 
4:37 PM
 
@LeviMorrison I'd bet quite a bit
 
That's often the first "layer" of tiered optimization.
 
the AST could also be optimized...
 
so in the future that I see, you'd have the engine how it is now, with some tweaks, but a JIT engine that's partially integrated. So hot functions would re-compile from opcode into native. Basically identical to HHVM
@FlorianMargaine not as much as you'd think. You need to convert it to CFG (a graph) to do anything interesting
 
yup, and that's done at the AST level
 
4:40 PM
then again, @Sara and I were talking about (and I think she started) building an optimizer which runs at the AST level (compile AST to CFG, optimize, then compile back to AST)
 
Based on the reading I have done in the past, constant propagation is usually the first step for future optimizations.
 
though you do lose some ability to optimize situations where you can't represent the end product via AST
@LeviMorrison that was the first optimization I did with Recki. Because once you get the CFG with SSA, it becomes trivial
then GVN (Global Value Numbering)
constant propagation and constant expression folding are the two easiest to do. Tho they don't give you massive gains
 
Yesterday it was mentioned some new gdb macros would be nice.... (gdb) p (char *)((zend_ast_zval)*name_ast)->val->value.str->val ... yes please
 
yup
 
£$%!&!, spent an hour wondering what the hell is going on, didn't realise a bp would be fired twice, and I needed the second one
 
4:49 PM
@ircmaxell I would be interested in seeing the results for an optimizing interpreter that only does those two things. For results, I mean on real-world applications like Wordpress.
 
@LeviMorrison honestly, I'd be surprised if it was measurable in most cases
 
What's the optimization you did once those two were done?
 
rudundant assignment elimination, IIRC
 
\o/ implemented extended sytax for declare(strict_types) via an extension :D
that is also BC if you're not using the ext
 
5:01 PM
@Leigh bc?
 
sorry, I use BC interchangeably between "breaking change" and "backwards compatible"
 
ah
 
probably because I always see people use "BC break", and breaking change break is an odd kind of double negative
 
posted on February 27, 2015 by kbironneau

/* by Philo */

 
@ircmaxell kind of pleased with myself. I'm sure you'll hate it though :) github.com/lt/php-strict/commit/… With the extension you can declare(strict_types=1+'extended options'); and without the extension you get the coerced type, but with it I can extract the string from the binary op
 
5:09 PM
@ircmaxell I am assuming the optimizers you have written so far do not allow an object to change shape at runtime? (Or do they support objects at all?)
 
@Leigh I don't hate it at all
if you install an extension, it shows you're taking full responsibility for what happens.
 
My time has been wasted... I'm sure I can find someone to hate it
 
@LeviMorrison define "change shape"
 
@ircmaxell Once constructed no new properties are added (or methods or anything else).
 
well, yes and no
 
5:11 PM
And all objects of the same type have the same shape (properties in the same position, etc)
 
the type of objects are supported, but nothing deeper yet
I have an experimental branch working on that, but it's too early to be sure
 
There some papers out there that show that if your objects can't change shape after construction and the objects of the same type have the same shape you can achieve the same level of optimizations as statically typed languages.
 
So one of my thoughts there is to compile all of the native properties of a class into a C struct
and to compile all lookups to them to simply struct offsets (even for userland extensions)
 
Changing the shape of an object after construction is currently an E_WARNING
 
so the only time you hit a hashtable is if you change the shape in userland
@LeviMorrison it is?
 
5:14 PM
Note that I don't mean "after the constructor is called", but the object construction. As an example: 3v4l.org/QST64
(That came across the Internals mailing list recently)
Wait, wrong link.
Perhaps you are right.
 
Quick question: what is the URI of the site where I can search through PHP's source code by method name?
 
lxr.php.net
 
Thanks! I always forget the site's name :)
 
I think all objects that are created from classes should not be allowed to add new properties at runtime, personally.
 
@LeviMorrison I know some internal classes don't behave well in that regard, but not all...
@LeviMorrison well, good luck with that :-P (tho I do agree)
 
5:18 PM
re
 
Furthermore there is no reduction in functionality to remove it, since you can always put dynamic properties into a hashtable php array.
 
@hakre 'n tag Hans
 
@hakre wb
 
Sure, there is some BC breakage in the meantime, but if we want a significant increase in performance then this is one well-researched avenue.
This is one reason Dart has superior performance to JavaScript, by the way.
As JavaScript engines show we can achieve greater performance regardless of this optimization; I am just saying this is one is researched and shown already, so it makes a nice target.
 
heya :)
 
5:24 PM
Hey there.
 
Guys, any ideas if there's a tool that can generate helpers from my /vendor folder? I'm developing on my remote dev server, and downloading/syncing /vendor folder takes years since it contains a lot of libraries. I thought there might be an option to just take a blueprint of all classes inside and use it for IDE autocomplete, rather than having a whole directory locally.
 
@Fratyr /vendor as in composer?
 
it is exactly comes from composer
 
I think he wants just the list of functions/docblocks for his IDE autocompletion of his vendor/ folder
and not the vendor/ folder itself
 
5:37 PM
i just think that downloading it is a mistake..
 
Why are you manually syncing it?
composer install
Oh god I see what you are doing
 
not manually. it's located elsewhere. but for the sake of autocompletion, i have to download the project locally via PHPStorm "Create project from existing files <server locaed remotely>"
 
Uhhhm don't develop remotely
.
 
That's the only server I have.. Vagrant is super slow
 
lol @ Dmitry's mail...
 
5:39 PM
@Fratyr Setup a local environment. There is no other real solution
 
"we tried to make a JIT but we ended up just doing an AOT compiler"
 
Guess I'll have to figure out how to run nginx on OSX using port 80 instead of stupid apple's apache distro. :(
 
@Fratyr Are you doing something ngxin specific in your php code?
 
Nope, just thought to match environmental packages
 
@Fratyr Have you tried MAMP?
 
5:41 PM
I know I can use Apache
 
@FlorianMargaine that should tell you everything you need to know about all the comments they have been making about compilers and static analysis.
 
About that.. I'm using MongoDB, can I use brew's mongo with MAMP?
 
Dunno. I never did anything related to php on mac
 
One day I'll write a tiered JIT optimizing engine, even if it is for a completely unused, simple language ^^
 
Gonna try it now. Thanks @Machavity
 
5:44 PM
@ircmaxell yeah...
 
@ircmaxell @NikiC @bwoebi @JoeWatkins (sorry for mass ping), Quick poll, if I wanted to extract the lexer/parser from PHP into it's own standalone binary that spits out the AST, how would you rate it between "relatively easy" to "you're completely nuts".
 
I don't think completely nuts
I think there's a lot of work there, but mostly around splitting out the MM and the error handling system...
 
you want to compile Zend/ only and then put in an own binary?
 
then again, youd also need to pull out a large chunk of the compiler, which has dependencies all over the place...
so perhaps yes, crazy
 
@ircmaxell eih, you can replace php_error_cb and the zend_mm_heap
 
5:46 PM
I'd like something minimal that understands the language, but doesn't care about any of the specific implementation details. I just feel like everything is way too tightly coupled
 
@Leigh We have no formally defined boundaries.
 
@Leigh so... something like this?
 
Ideally there would be very clear boundaries between opcode generation and understanding language semantics.
Right now that doesn't exist.
 
Isn't Zend pretty standalone? even TSRM dependency is removed, no?
 
it exists today a lot more than it did in 5.x
 
5:47 PM
@bwoebi There's a lot more in Zend then just a lexer and parser, though.
 
@FlorianMargaine I know about that, yes :) but I guess I wanted to split everything into a chain. Parser(code): AST, compiler(AST): opcodes, executor(opcodes): stuff happens
 
AFAIK, executor depends on compiler, but compiler doesn't depend on executor?
 
well, there are really 2 compilers
compiler (parsed code): ast, and compiler(AST): opcode
 
yep
 
the line between the parser and the first is non-existant
but the line between the two is pretty real
 
5:51 PM
@Leigh that should be relatively well split out already
 
Alright, thanks all. Trying to come up with some "just for fun" projects that might hold my attention more than a week, and aren't as ridiculous-for-the-sake-of-it as my normal stuff
 
I think it would be worth splitting it out in core
 
(but also helps me dive into internals more - because it's pretty frustrating knowing what I want to do, but having no idea how everything hangs together)
 
a framework. The parser (which includes first stage compiler) separate from teh rest. Then the engine which compiles from AST to opcode, and executes them.
then you could theoretically have pluggable engines
 
or turn the AST into something LLVM-happy
 
5:55 PM
yup :-)
 
Then you have a reference parser that can be used everywhere, without everyone having to track the language spec
 
well, HHVM would still use their own parser, due to extended features
 
When should one actually use HHVM?
 
every time?
 
huh?
 
6:03 PM
HHVM ALL THE THINGS
 
I'll stay with my nginx/fastcgi
 
@Leri it's a drop-in replacement for php...
you can keep nginx and switch to hvvm :P
not sure if hhvm handles the cgi stuff
 
So, Zend didn't build a JIT compiler, yet concludes that there are no performance gains for websites by using one... news.php.net/php.internals/84033
 
@ircmaxell I read it as "we tried to JIT some parts, and we saw no perf gain"
 
except they didn't JIT at all. They AOT compiled
 
6:05 PM
> We also tried few different approaches to collect formation about hot
> functions and generate code only for them.
 
which means they didn't have the runtime data that's necessary to optimize the JITed code
 
collecting information about hot functions does look like a JIT...
 
so they generated generic code for the functions
@FlorianMargaine that's definitely not what this code does in any way shape or form. Not even close. So unless they are doing out-of-compiler profiling (which I doubt)
 
@ircmaxell "we also tried" = "this is not the code we're showing"
 
I think what he meant by that line is "we only compiled functions which we pre-determined would be hot" which would reduce compile time significantly, but not generate better code...
 
6:08 PM
ah.. dunno
 
@FlorianMargaine the fact that they called this a "JIT" shows they don't really understand it. It's an awesome proof-of-concept and should be studied. But a JIT it is not. And to draw conclusions about JIT compilation based on this (in their own words) is a bit weird...
 
although from the look of it, it looks like so yeah...
 
@FlorianMargaine that's a definite possibility, but I don't see the structure there to support that. So unless they are literally creating two entire LLVM backed compilers, I have to think that no...
 
@FlorianMargaine do you have time to head over to amp-chat?
 
@kelunik not yet, off for dinner. In ~2h should be good
 
6:14 PM
@FlorianMargaine ok, thanks.
 
@kelunik you'll have to remind me the link too...
^^
got it
 
RIP Mr. Spock!
 
@kelunik I'm sad how many people in here are not curious enough to have a look at your chat built on Aerys :-D
 
@bwoebi I think there are enough people ;-)
 
6:18 PM
meh… a very few :-P
 
@kelunik if multi-line markdown is enabled you won my heart. :D
 
@Leri it is.
 
@Leri Sure, GFM, syntax highlight, pings, direct response, stars. ;-)
 
kk. I am working on important stuff. Will look tomorrow. ;)
@kelunik I did not like how browser shouted at me that site wants to use desktop notifications. It'd be nice if it was some kind of setting to enable/disable
 
@Leri Yes, I could make that optional.
Anyone any idea how large github user ids can be?
 
6:32 PM
Nah, that were names
 
@ircmaxell tbh I'm surprised by their "JIT"... I would've thought Zend, and especially Dmitry, wouldn't be so ignorant wrt JIT
 
6:45 PM
I assume they initially tried JIT and then quickly shifted to AOT, but retained the name JIT...
 
which is problematic when they use it as an example of a JIT compiler
 
6:58 PM
@ircmaxell very diplomatic way to say "duh it's not a JIT noob" :P
 
:-)
 
So, here's my first HHVM PR
 
> Showing 40 changed files with 149 additions and 98 deletions.
first PR...
o_O
 
@ircmaxell Hey! I do that too when I need to hide crap! :P
 
-void CodeGenerator::cgContStartedCheck(IRInstruction* inst) {
+void CodeGenerator::cgContValid(IRInstruction* inst) {
   auto contReg  = srcLoc(inst, 0).reg();
+  auto dstReg   = dstLoc(inst, 0).reg();
   auto stateOff = BaseGenerator::stateOff();
   auto& v = vmain();

-  static_assert(uint8_t(BaseGenerator::State::Created) == 0, "used below");
-
-  // Take exit if state == 0.
+  // Return 1 if generator state is not Done.
   auto const sf = v.makeReg();
-  v << testbim{int8_t(0xff), contReg[stateOff], sf};
o_O
 
7:04 PM
> This is my first PR to HHVM, so I have no idea what I'm doing ;)
lul
@ircmaxell many tests fixes though
 
I'm looking at that code going "if you have no idea what you're doing, then I'm just a blithering idiot compared to you"
 
Fully agree… "What is this magic?!?"
 
@NikiC travis fails
 
@FlorianMargaine From travis-ci.org/facebook/hhvm/builds it does not look like they're really using Travis ^^
 
7:11 PM
heh
 
@bwoebi lol it's really just copy paste. But one can guess that cmpbim is something like compare byte immediate and setcc is set if condition.
 
@NikiC what does that immediate mean here?
 
@ircmaxell tl;dr: wordpress is going to hack/react?
 
@NikiC and how can I guess that cc means if condition?
 
7:13 PM
@FlorianMargaine td;dr: author has no idea what (s)he is talking about
 
@bwoebi "immediate" is "constant operand" in assembly slang
 
ah good to know
 
@NikiC it's not 1970... there's no limit on variable names :(
 
> Nobody talk about JIT in general, only about this PoC.
ummm, I'm pretty sure both Dmitry and Zeev have talked about JIT in general before
 
7:22 PM
@ircmaxell isn't it the subject of the mail?
 
PHP7-JIT (JIT=on)			0.011
gcc -O2 (4.9.2)				0.013
LuaJIT-2.0.3 (JIT=on) 			0.014
gcc -O0 (4.9.2)				0.022
HHVM-3.5.0 (JIT=on) 			0.030
Java-1.8.0 (JIT=on)			0.059
LuaJIT-2.0.3 (JIT=off)			0.073
Java-1.8.0 (JIT=off)			0.251
PHP-7					0.281
something doesn't sound right there
like they are starting the timing from a different point in the process
 
yeah... if he just compiles without any optimization there's no reason it should be faster than other VMs...
 
Code Coverage Report:
  2015-02-27 20:19:05

 Summary:
  Classes: 85.71% (24/28)
  Methods: 93.13% (122/131)
  Lines:   93.69% (475/507)
/end work day
 
@PeeHaa not enough
 
insert beer
@FlorianMargaine Enough for me it is :)
 
7:25 PM
hello folks :)
 
Yo. Trying to run the zend framework test suite to measure impact of a RFC and:
PHP Fatal error:  Redefinition of parameter $notUsed in %s/zf2/tests/ZendTest/Db/Sql/Platform/IbmDb2/SelectDecoratorTest.php on line 60
WTF
 
@marcio 3v4l.org/BdMVp was valid before PHP 7 ;-)
 
Whoever used it.
 
7:30 PM
yay to doing work in a PHP4 constructor
 
@FlorianMargaine I'll never use that crap :@, I'm happy to BC this thing as much as possible.
All frameworks were fine, but ZF components is a bag if unpleasant surprises.
 
WOW
/me just noticed
 
I'll put it this way: Dmitry cheated on those benchmark numbers
 
7:40 PM
Don't ever trust a benchmark you haven't faked yourself.
 
guys can somebody ping youtube for me and tell it's IP Address? There is a problem with my DNS cache, I want to add it's IP Address manually
 
@YourFriend 173.194.113.40
 
@ircmaxell @Andrea has an accurate description for this blog.ajf.me/2014-10-23-on-benchmarks
 
@kelunik thanks
 
@SaraMG Sure. I'm just trying to promote the usage of "fake a benchmark"
 
7:43 PM
@marcio yes, but this isn't even faked in normal means, it's outright cheating
 
CHEAT A BENCHMARK!
 
steps nearer to fainting couch.
 
I am using for loop to send email in bulk, using mail function in php, suppose one of email took 1-2 seconds to get sent, my question is for loop will continue to execute or it will wait for mail function ?
 
@Cody it will wait as everything in php
 
@nikita2206 that's what is called synchronous ?
 
7:53 PM
exactly
 
@nikita2206 thanks
 
I just added a new section on the "Strict Argument Count" RFC, regarding BC breaks measurements wiki.php.net/rfc/strict_argcount#bc_breaks_on_the_real_world
 

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