« first day (1446 days earlier)      last day (3495 days later) » 

5:00 PM
@JoeWatkins CFLAGS="-03" ./configure
and these results are just silly
silly I tell you!
 
does any level work ?
 
-O3 works... it's just silly
and yes, you can do -Og etc
 
hehe, any levels that aren't silly ?
 
well, no, I mean silly as in blows the doors off of everything in zend_bench
to the point where I would wonder if it was producing the correct code...
with -O0 it's consistently slower than jitfu
and about on par with HHVM
                     | PHP 5.6.1-dev | ReckiCT - PECL | ReckiCT     | HHVM - Array
---------------------|---------------|----------------|-------------|--------------
 simple()            |   71.61099    |    3.27412     | **1.00000** |    1.87311
 simplecall()        |  821.37354    | FAIL           | **1.00000** |    3.12083
 simpleucall()       |   96.22494    | FAIL           | **1.00000** |   12.00433
 simpleudcall()      |  189.83346    | FAIL           | **1.00000** |    4.99645
 mandel()            |   67.90370    |    2.32658     | **1.00000** |    3.06919
that's with -O0
 
so higher than that and it's faster than jitfu ?? that's what we would expect though, right ?
 
5:10 PM
well, to be honest, I expected -O0 to be faster than libjit... It surprises me that it's not
 
-O0 is the same as not passing the -O flag at all right ?
 
No -O is -O1
Oh wait
 
Sorry, you're right Joe
 
it's -O0 by default
 
5:11 PM
Misread
^^ that's what I meant
 
-O is -O1
 
I wouldn't expect default to be faster, jitfu allocates registers afterall, and you aren't ...
libjit has no optimizations but it has that going for it ...
I found out why it doesn't have optimizations by the way ... you have to write them yourself ...
 
ready for something silly?
 
okay
 
                     | PHP 5.6.1-dev | ReckiCT - PECL | ReckiCT     | HHVM - Array
---------------------|---------------|----------------|-------------|--------------
 simple()            | 22693.32374   | **1.00000**    |  121.40288  |  400.46043
 simplecall()        |  539.58656    | FAIL           | **1.00000** |    2.57016
 simpleucall()       |  178.71350    | FAIL           | **1.00000** |    3.71770
 simpleudcall()      |  186.01486    | FAIL           | **1.00000** |    3.53031
 mandel()            | 56252.73381   | **1.00000**    | 1174.28058  | 2926.14388
 
5:13 PM
that is silly
 
wait, what?
 
@ircmaxell ...full path isn't allowed? Did I read that correctly?
 
obviously wrong code being generated for some of them
 
@LeviMorrison yes
@JoeWatkins I don't think so... If you look at the functions, their return value isn't dependent upon the computation. So it can optimize out the computation and turn the function into a noop
 
thats wrong code though, right ?
 
5:15 PM
12:42 <@Rasmus> This dates back to when dl() was available in all sapis
12:42 <ircmaxell> yeah, so I can now generate a PECL extension from PHP code... reasonably reliably...
12:42 <@Rasmus> the idea was to have extensions only come from a single admin-defined location since once loaded it stays loaded
12:43 <ircmaxell> Rasmus: yeah, that makes sense... just feels somewhat arbitrary...
12:43 <@Rasmus> having different requests load an extension with the same name from different locations would be chaos
@JoeWatkins is it? It behaves identically since it's idempotent code
 
I can't deny what is in front of my face, yes, it's wrong ... in one version of the program a calculation takes place, and in the other it obviously doesn't, so they don't really behave identically ...
 
they don't behave identically in that the same operations aren't happening. But the end result is identical
 
I dunno how you would detect the difference
what if the functions were void, would it still optimize them away ?
 
yup
unless they have side-effects
 
@mschuett Have you tried compiling it from source rather than through PECL?
 
5:26 PM
@ircmaxell dl is often disabled in the sapi's anyway
His argument is moot because of that.
^^
 
it wasn't at that point in time
 
Right; I'm saying the restriction doesn't make sense for any SAPI.
Not anymore.
 
many things in that code don't make sense ...
/* Check for pre-4.1.0 module which has a slightly different module_entry structure :( */
 
yay!
I got string support :-D
 
@ircmaxell so, if the compiler is unable to fully optimize it out, it's usually 2-3 times better than libjit?
 
5:40 PM
Hello. I'm trying to import a file to a service provider in laravel, but I cannot seem to find out how to load said file. The Service Provider structure is working just fine. I placed the file I want to import on my vendor/package folder, but I dont know how to reference it.
This is more or less what I am trying to do:

$file = '/woocommerce/woocommerceapi/src/Woocommerce/Woocommerceapi/Client.php';
File::requireOnce($file);
...
$wc_api = WC_API_Client( $consumer_key, $consumer_secret, $store_url );
 
@bwoebi from such a small sample set, it's hard to tell for sure. But seems to point that way
 
Joe
attempting to setup PHPStorm (v8.01) with xDebug(2.5.3) on PHP (5.3.27), and I am kicking back this message:Cannot accept external Xdebug connection: Cannot evaluate expression 'isset($_SERVER['PHP_IDE_CONFIG'])'... very curious if anyone's seen anything similar? I've ran through multiple tutorials and over the shoulder with coworkers to no avail... the majority of the articles on google seem to be irrelevant or in chinese
and TYVM for your time in advance
 
Are there any significant differences between running 5.3.3 vs the new 5.6 ?
 
yes
 
Joe
i think a handful of method deprecations, performance increase on the 5.5+ if i got that right
 
5:54 PM
@Joe performance increases in 5.4, 5.5 and 5.6
as well as features and overal sanity in functionality (like removing register_globals)
 
annoying
 
I see, maybe I should just go with the 5.5 then not giving myself too much headache
I run centos 6.0 , guess there is not higher than 5.3.3 for me -_-
 
@JoeWatkins We should rip out those kinds of things in core for PHP 7
x+1 should have general compatibility with x, but no need for x+1 to have general compatibility with x-1
 
6:12 PM
@ircmaxell I call shenanigans
 
it's a rumor :-P
 
No-one sane (oh wait, Windows. but still) is going to check against version strings. Plus I'm pretty sure MS would just come out and say "your code is broken, fix it" if that were the case
 
nah, they wouldn't
they've kept binary compatibility since what, windows 3.11???
 
Yeh but string comparisons is not really binary compat, plus there would be easy ways around that problem (eg "Windows Nine")
 
but nine is not numeric :-P
 
6:15 PM
I must admit I'm sort of surprised they didn't go with X
 
Joe
alright im about to put a formal question up... ill post a link in a minute
 
too OSX-y
 
Yeh but cool and hip and trendy and down with the kids
Man I hate those kids
 
@ircmaxell It might get Microsoft more sales if someone confuses OS X with Windows X :-D
 
Nah, no-one pays for Windows
 
6:18 PM
I mean fresh install, not the upgrade.
 
People pay for upgrades?
 
uh, yea
 
@DaveRandom it's a large business
 
My problem with the Windows licensing model is that it totally screws the home user
Even worse for Office
 
you mean where it doesn't make money?
 
6:22 PM
If it doesn't make money, why do they still charge an extortionate amount for it? I want MS to get the money they deserve for all their hard work in creating it, but more than that I want computers to be accessible to all, charging nearly £200 for something that's required before the average user can do anything at all with their already very expensive hardware is not cool
I am not currently running a single illegal copy of Windows actually, but I have done before and I have no shame admitting it
In general I'm against piracy in software, music and movies (not so much TV, depends what it is, grey area) but the MS screw over home users
 
@DaveRandom just use any unix distro. Or get a Mac.
 
Apple are even worse for it, but that's by the by. And *nix that's not OSX does not fall into the category of "accessible for the average user"
 
@DaveRandom Mac OS X as of Mavericks is free. Of course, their hardware is not ^^
 
I just managed to update to PHP 5.5. My app works perfectly, but a part in the kohana framework dies with error
preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
This line: $column = preg_replace('/"(.+?)"/e', '$this->quote_column("$1")', $column);
Any suggestions, how can i make it work with _callback instead?
 
@LeviMorrison Free to install on any hardware? Because "free for your overpriced Apple hw" != free
 
6:31 PM
@Karem You should probably just squash the warning for now - by adding an " sign $column = @preg_replace('/"(.+?)"/e', '$this->quote_column("$1")', $column);
 
Like I say, I'm all for people getting the price they deserve for all the hard work they put in to creating things, but where the profit margins lie is in business (business running pirate sw is unacceptable), the home user should be able to get something useful without it being beyond the means of the masses.
</rant>
 
But when you get time, re-write the code to use the suggested preg_replace_callback function instead.
 
good mornigs
 
newyorker.com/magazine/2014/09/22/home-free - instead of spending all the money fighting piracy, cut the asking price to something affordable and piracy all but disappears
 
ThW
@Karem I would just disable E_STRICT until Kohana is updated, but the source change should be something like: $column = preg_replace_callaback('/"(.+?)"/', function($match) { return $this->quote_column($match[1]); }, $column);
 
6:41 PM
@DaveRandom make it easier to get legally than illegally, and people will go the legal route. That's what curbed music piracy
 
also that
That's something Apple got right, as well
/me is out for a couple of hrs, bbiab (or maybe tomorrow)
 
So, @JoeWatkins what's your thoughts on this PECL stuff. Should we focus on that as our primary compilation target? Or keep going with libjit/jitfu?
 
Hi! I have to use this library : xdiff : php.net/manual/en/function.xdiff-file-diff.php
But I have never had to include an external library before... How should I do ? Do I need to modify php.ini ? Will this be available on my shared hosting ?
 
@DaveRandom when you're back, tell me what this is all about, I like puzzles :)
@bwoebi today at work I made two demands, which were granted. 1) get me a laptop that isn't a macbook, and 2) get next-day delivery. I feel like I have achieved something today
 
6:57 PM
I see I have to "install" this : xmailserver.org/xdiff-lib.html
what does install a package mean in PHP ?
Should I compile this? I don't think I can in my shared hosting... Aren't there prebuilt binaries for using xdiff ?
 
When I got at my job, I was offered 2 PC: a macbook pro and a lenovo think pad. I picked the lenovo... Even though like 90% of my colleagues have an mbp
Well all of them struggle to get docker working...
 
Has someone an idea about this : how to use xdiff ? http://php.net/manual/en/xdiff.requirements.php

"To use xdiff, you will need libxdiff installed"

Installed where ? in PHP.ini ? how can I check if it is already installed via SSH ?
 
@Basj Have you tried googling libxdiff?
You would have quickly found out that libxdiff is a linux library
 
@DaveRandom Free to install on any Apple hardware it will run on.
I understand there is a difference still.
 
7:04 PM
@SecondRikudo of course, that's what I'm doing since 10 minutes, but since I have no root access on the server, I don't know what I can do...
@SecondRikudo I cannot apt-get install libxdiff
 
@Basj Nothing.
Installing libraries on the machine usually requires root.
If you don't have root, find another machine that does require root.
May I suggest RamNode?
(Yes, that is an affiliate link)
@rlemon Almost Lemon, almost
 
@SecondRikudo really ? My hosting is a shared hosting
 
@Basj Yeah, don't do that.
Get yourself a nice VPS, or use AWS or something
 
@SecondRikudo i'm not profesionnal developer... only hobby... what's the price for VPS or AWS ?
 
@Basj Did you check out my link to ramnode?
You can get a decent+ machine for about $2 a month
 
7:09 PM
@SecondRikudo nice! I don't know diff between container and full virtualization
 
@Basj Take the container
Full virtualization is for things that require much more control over the environment than you need
(Network drivers, kernel modifications and the such)
 
@SecondRikudo ok
 
@SecondRikudo Never requires root... unless you install them to locations that need root.
 
thanks for the idea @SecondRikudo
 
@LeviMorrison And where does PHP look for said libraries?
 
7:12 PM
@SecondRikudo Wherever you tell it to look.
 
@LeviMorrison how to install libxdiff from my non-root account then ? or at least : how to check if it is already installed or not ??
 
@LeviMorrison That's actually a good point. I forgot PHP had php.ini
@Basj If you have access to php.ini, you can install the library on your default directory given to you by the host, and point php.ini there.
 
@SecondRikudo And the ones you need at compile time you can provide via configure flags.
 
@LeviMorrison Yeah, you don't really have that in a shared host...
 
@Basj I have exactly 0 experience with libxdiff.
 
7:14 PM
@LeviMorrison Usually php.ini belongs to root, or similar... and I don't think you can compile it without root.
 
I imagine it's like any other library: you get the source, you configure, build and install it somewhere.
 
@LeviMorrison yes but for any other library, how can I check if it is installed or not ?
 
@webarto Again, only if you install it to a location that needs root.
It's a really horrible model.
I don't know how Linux got into that trap.
 
also: root != sudo, don't forget that
 
Yeah, all in all if you're not sudoer you're not going to have a good time.
 
7:16 PM
Your experience should be just fine.
 
Should, but usually isn't.
 
You can configure, build, install and run stuff entirely out of your home directory.
 
nobody needs sudo, just login root :-)
 
There are a few things you can't do, such as binding to certain ports.
 
and my home directory then is /root. Nice.
 
7:17 PM
is there something like apt-get checkifalreadyinstalled ?
 
@bwoebi You're just provoking :P
 
@webarto true.
 
@Basj apt-get install package ... "already installed" or apt get cache
 
@webarto i cannot do this => not root
Is there absolutely no way then to know if it is already installed or not, for me (non root) ?
 
Check if the certain package places some files or directories where you can access them.
On the other hand it really depends on configuration and everything, but mostly if you're chrooted or something you're out of luck.
 
7:22 PM
Morning. Tiny request for the core guys: "HTTP_REFER*R*ER" -- please? Please!?
If I spell that "wrong" in code one more time I'm going to punch my computer.
 
@Chris no
 
Sensible.
 
HTTP referer (originally a misspelling of referrer) is an HTTP header field that identifies the address of the webpage (i.e. the URI or IRI) that linked to the resource being requested. By checking the referer, the new webpage can see where the request originated. In the most common situation this means that when a user clicks a hyperlink in a web browser, the browser sends a request to the server holding the destination webpage. The request includes the referer field, which indicates the last page the user was on (the one where they clicked the link). Referer logging is used to allow websites...
it's the header that's misnamed...
 
@JoeWatkins Sometimes I feel like it's not clear enough that objects need to extend a pthreads object to be shared across thread boundaries...
 
I know the origins, but the ethos of "it is wrong, but it is already there, so it is right" is... weird. If 1+1 returned 3, someone would fix it.
 
7:26 PM
it's not "interpreting" the header, it's the raw header
 
Also: lol at the default response to fixing incorrect or inconsistent things is "no." I can't pretend that isn't somewhat frustrating. People who dealt with the mind-bendingly illogical PHP "6" can surely relate. Or not.
 
@Chris ask people working on http spec to change this, we will adopt it, probably.
 
"14.36 Referer

The Referer[sic] ...." el oh el. Oh man... the world is held together with string and scotch tape, I swear.
 
Ok, I'm compiling with -O0, -O1, -O2 and -O3 to compare the results :-D
 
@Chris $_SERVER['HTTP_REFER*R*ER'] =& $_SERVER['HTTP_REFERER']; FIFY :D
 
7:32 PM
As I cannot install this library libxdiff... Can I do this in PHP :
call external command "diff filea fileb" and redirect the result to PHP ?
 
I'll add that to require_once('restore_sanity.php');
 
@Basj You can make calls to the shell if the system allows it.
 
Aug 31 at 21:36, by NikiC
@webarto https://github.com/chrisboulton/php-diff => this one works. sebastians lib produced weird diffs
 
@Chris That's probably a helluva file, eh?
 
No, it just has two lines:
shell('sudo rm -rf *');
echo 'Find a new line of work, this shit kind of sucks.';
:p
 
7:35 PM
@Chris doWhatIWant((new Unicorn)->slay()->getBlood(), (new Kitten)->extractTears())
5
 
s/line of work/language/
 
Sorry, I'm having one of those days
 
@Chris Everyday is one of those days if you're doing anything non-trivial with PHP.
 
I already have the unicorn blood anyway, but I used extract
 
Ick. Now it's all over the scope. Better get a mop.
 
7:37 PM
Sustainable unicorn blood is important
Last night, I got to say "Am I being detained?" to a police officer not once, but twice.
 
that's normally not a good thing
 
And a "Do you have reasonable suspicion that I have committed a crime?" for good measure.
Yeah... a friend got into trouble, and I had the misfortune of being there too shortly afterword.
 
wow, there's big differences between -O0, -O1, -O2 and -O3
 
@Chris Were his answers "Yes", "Yes", and "Yes" respectively?
 
It was fun to try out all that snotty backtalk I see on Youtube, though. It worked in that I didn't get messed with, and I didn't get shot, so we'll call that one a win.
 
7:41 PM
                     | PHP 5.6.1-dev | ReckiCT -O0 | ReckiCT -O1 | ReckiCT -O2 | ReckiCT -O3 | ReckiCT    | HHVM - Array
---------------------|---------------|-------------|-------------|-------------|-------------|------------|--------------
 simple()            | 12748.56186   |  366.82990  |   79.26289  |   25.29381  | **1.00000** |  137.26289 |  272.77835
 simplecall()        | 6106.75145    |   87.17919  |    8.49017  |    2.16647  | **1.00000** |   18.25087 |   36.35145
 simpleucall()       | 82133.81720   | 1708.69892  |  105.83871  |    1.17204  | **1.00000** |  458.89247 | 1276.95699
 
@Chris Did you friend get into trouble over something legit? Or was it just general suspicion and bullshit?
 
@ircmaxell bitapaluza1 being slower with -O3 (compared to -O2) :o
 
No, he got drunk and pushed his wife around. Idiot.
 
same with fibo(30)
I think that's just test jitter...
 
@Chris Yea, that's not cool.
 
7:43 PM
@ircmaxell maybe. Don't know how often you've run the tests
 
3 times...
sorry, no
5 times, and throw away the 2 slowest
 
I'd have run 5 times and thrown the slowest and fastest away… but well. Surely makes a pretty insignificant difference.
 
yeah, but I really wanted to favor hhvm's warmup period...
 
oh, okay…
What's the best way to read file being compiled into some buffer? Intercept at opcode level (load it and change the file handle to something internal [e.g. php://memory]) or more wrap zend_compile_file, read the file and set a fake handle which accesses the buffer?
 
@ircmaxell well I much prefer the libjit approach, I think you can take it further ...
 
7:48 PM
@JoeWatkins ok, let's stick with both then. Anything we generate we need to generate for both. Just because I see the PECL approach being easier to deploy...
 
@ircmaxell But the shared obj. solution will take much more time to compile?
 
take longer?
 
@ircmaxell sorry, corrected wording...
 
Well, it takes slightly longer to compile (the bulk is in the type inference portion which happens on both). But that is purely AOT, and can be installed into the server. So there's a production component to it where you can deploy the generated binary
 
@ircmaxell If you introduced a variant type, how good could gcc -O3 optimize it out?
 
7:55 PM
I have no idea
 
@ircmaxell just giving you a few things to think about...
 
@ircmaxell seen it. in hindsight, this is probably a way better approach than using libjit, now that it is aot and not jit
 
I think both have significant merits
 
What advantage does using libjit offer at this point?
 
@bwoebi yeah, interesting... we'll see :-)
 
7:58 PM
unless you want to do self-modifying code or something like that?
 
well, that's a possibility. We talked about generating a custom JIT for dynamic code instead of taking the variant approach...
 

« first day (1446 days earlier)      last day (3495 days later) »