« first day (2026 days earlier)      last day (2922 days later) » 

4:00 PM
Thank you
 
@PeeHaa I really wish this was a crappy IRC client so my screen would say PeeHaa: Also known as homo
 
:P
 
On Linux, typically not. For other systems, if you can recover from it sanely, sure.
Or at least do a clean shutdown instead of inevitably dereferencing null
 
Hmm... I can't seem to do the inline refactoring for functions in latest PhpStorm on Mac.
 
Meaning it doesn't give you the option or it doesn't work?
Actually I can't check anyway, I imagine the win builds are probably too different
 
4:03 PM
It's greyed out.
 
That is wierd
 
@DaveRandom wtf? you use malloc()? You filthy casual … mmap() is the function!
 
BTW @DaveRandom this going to sound odd, but whenever I see this guy (Dutch radio dj) I think it's you until I actually have a proper look :P
I am weird like that
 
Interesting; there are docs for inline function/method but according to the issue tracker it isn't implemented…
 
@PeeHaa I have a pic somewhere from "gayorstraight.com" (which now seems to be a gay porn site, don't say I didn't warn you) of some guy who actually does look like me, I had as FB profile pic for ages
 
4:08 PM
Awesome. Hold on. To the gay mobile!
You know the name? :P
Holy shit. That's not just any gay site. It's one from fucking 1850
That totally reminds me of geocities
 
o/
 
\o
 
dafaq did i just see at gayorstra........
 
Bit disappointing rite?
 
cough, cough
 
4:13 PM
@DaveRandom omfg
hahhahahahaha
 
@DaveRandom :P
 
That's... awesome?
 
Yeh that was my reaction
 
care to clean that up guys?
or let
spam it out
of
 
4:15 PM
1 message moved to bin
 
gj
 
@FélixGagnon-Grenier Hold on let me rotate my screen
 
that's... what she said?
 
Bah...
So, I just fixed a bug in PHP's "mov" equivalent
You'd think you can't really mess up the implementation for a register to register move
 
4:19 PM
@NikiC How long have you been working on php?
...
 
I wouldn't think that at all, don't put words in my brain
 
Anyone have any experience with an unused code detector for PHP?
Was it reliable, etc?
 
@LeviMorrison I'm going to go with no, given that PHP Storm detects about half of the average codebase as unused without a load of doc comments
 
Of a full code base instead of a single file?
Yeah my experience also is bad
 
I know some things are hard, such as [$obj, 'method'] things.
In my case it would be functions I'm interested in.
Should be much easier.
I also don't think we do any method name concatenation magic.
 
4:22 PM
That should be easy enough as long as you don't have any dynamic strings
 
A simple regex based approach to find all names from function\s+([^(]+) and then looking for instances of those strings not preceded by function would probably have a pretty decent hit rate
 
Excluding magic string callbacks
 
Well yeh but you are fucked there anyway
btw PHP really needs nameof(), I really like it
 
I still want to look into all that analysis magic , but time is a bitch :(
 
4:26 PM
> Attention PHP Developers. Web Pages can be written in PHP.
 
lies!
 
It is a lie, because w3schools
 
> 1. Use the Latest Version of ASP.NET
O.o
 
What in the name of shitsticks is that page?
 
:(
@JoeWatkins how is that socket thing going?
 
@Saitama work is kinda in the way at the moment, I will finish it ...
probably this weekend ...
 
\o/
thnx, for doing it tho
+1
 
Boom boom shaka laka laka boom
Boom boom shaka laka boom boom
 
4:47 PM
@JoeWatkins what does that even mean?
 
@JoeWatkins everyone wants you^^
I've never realized that we actually have 3.5 times as much idling cycles as executing cycles in typical PHP app…
 
@bwoebi heh
 
@NikiC yeah :-/
 
@bwoebi Idling as in stalled or as in blocked on syscall?
 
the former
 
4:59 PM
stalled as in?
 
@bwoebi What's the main source?
 
@NikiC no particular source
there are some functions with statistically much more stalls though
 
@bwoebi Source as in reason for the stall, rather than sourcecode location
I wish I had a system on which perf worked ...
 
@NikiC data dependencies
 
@bwoebi btw, for BIND_STATIC in particular something we talked about but did not land is using a zval vector instead of the ht
 
5:02 PM
@NikiC heh
 
If BIND_STATIC is actually a big issue for real applications, we can reconsider that
 
+ *cache = ((void *) value - (void *) ht->arData) + 1;
^ I've tried caching that value locally
 
why does bind static dup ?
 
@JoeWatkins dup what?
 
the static vars ht
 
5:04 PM
@JoeWatkins what else would it do if it's a shared ht?
 
Hi. I can't really post to the main site yet because all of my work is in the local server of my job, but I hope someone here can help me with learning how to set up a proper and working mail sender - something that takes inputs from ajax js that comes from a html form and sends it to a single address.
 
PHPMailer?
 
oh that's the point of the thing
 
Is that the right word to use or is it an existing service?
 
@JoeWatkins it just dups when refcount > 1, which is never reached
 
5:05 PM
oh
 
@NikiC the point is, that hashtable is never shared
at least I don't know of any such circumstance
 
@Zachiel this
 
@bwoebi iirc the ht can be in shm
 
should be rather ZEND_ASSERT(GC_REFCOUNT(ht) == 1);
 
we don't want to eagerly copy it
 
5:06 PM
@NikiC if it is, you don't need to copy the ht though?
 
Of course it can't be shared for closures, but I mean for real static variables
 
but it doesn't only dup immutable arrays
 
ah
 
@Saitama would you believe me if I told you I never grokked how github is supposed to work?
 
they are marked immutable in shm, right ?
 
5:07 PM
For closures we dup early in closure construction already
 
@NikiC but, when it's in shm, refcount should be always 1 because immutable?
 
@bwoebi immutable is rc=2
 
ah
okay
 
specifically so refcount>1 checks in separations trigger :)
 
I think I need a single php file with variable validation and the actual sender, but in that github I see like tens of files, how does it work?
 
5:08 PM
@Zachiel It would be really hard to believe, but in the readme, it is clearly given how to get up and running with it... :)
 
@Saitama oh. :p
 
@NikiC anyway, I've added a cache value, but it made just about 0.2% in runtime difference
 
@Saitama@ apparently, it needs me to have a json file. This is getting me confused.
 
do you know how to use composer?
 
No
 
5:11 PM
well.....
 
@bwoebi okay
 
I guess I'll go the zip way
 
I won't recommend the zip way tho
 
@NikiC the main issue is it's doing a ton of movs at first, fetching data from L2 cache
 
5:13 PM
@Saitama I have no idea if this is going to be possible at my workplace, but I'll ask my IT manager
 
k :)
 
Meanwhile, I was wondering why I got my page to send a colleague a mail by manually typing the variables through the URL, but when I pass them via ajax, I get nothing.
 
@NikiC (with 0.2% in runtime, the actual bind_static opcode itself gets faster by ~7%)
 
It is possible that this depends on the authorizations of the folders I had to load my files in in order to run the whole three-file package...
 
@Zachiel show us the code....?
 
5:16 PM
!!admin list
 
@NikiC (in tight loops where it has everything in L1D, it gets much faster, don't remember how much, but I think it was in the range of 30%)
 
Let's see if I can get it from home. I don't think so, anyway...
 
!!version
 
!!admin list
 
5:17 PM
@PeeHaa requestMulti is broken, I'm not sure if it I broke it or someone else did but tries to resolve the promises twice
errr... I mean the admin consumer of it does
 
@bwoebi lol@edits
 
@Saitama the files are on a subdomain that's been hidden outside of our local network and I can't access it from here, nor I can access SO from there (well I can read it, but I can't login) :(
 
@NikiC 1-x ≠ x
was confused ^^
 
@DaveRandom it must be @PeeHaa
afk, brb
 
@bwoebi so tl;dr there is no one weird trick to make php 2x faster
(After installing PHP 7 I mean)
 
5:19 PM
just put a few more orders of L1 cache there
 
@Saitama wait! This might not be the latest version but here we have the js using ajax: jsfiddle.net/L6vuezsn/6
 
that's all
^^
@NikiC the only thing is memory locality … allocating multiple small things together … and less indirection obviously … but PHP 7 already did much there
 
It's at the very end of the js
don't look at the commented out php in the css area, I changed it
That was the one I started from and variables don't match.
 
yay it actually was @PeeHaa
 
I thought I actually fixed it, but I was amazed it was broken in the first place
 
5:22 PM
@Saitama - I said wait, but it was not because you were leaving, I noticed that later. It was a sort of Eureka. Sorry if I sounded needy because of that.
 
I suspected I had broken it while trying to fix it
 
@PeeHaa what? You know this never happens, right? [tongue-in-cheek.gif]
 
At some point you just don't remember where you were going with a pice of code :P
 
@NikiC things like these are typical to cause many stalls:
+0x83	    movq                16(%r14), %rcx
+0x87	    movq                -1(%rdx,%rcx), %rax
+0x8c	    movl                7(%rdx,%rcx), %ecx
 
That's called agile right?
 
5:24 PM
@PeeHaa It should be getUsers() etc anyway, the ChatClient shouldn't expose a bare method for making generic HTTP requests, plugins can ask for a HTTP client if they want one
 
@bwoebi double indirection ... that still looks rather benign ^^
 
@NikiC first $rcx is fetched (0x83) … 0x87 stalls, waiting for $rcx. Then 0x8c stalls waiting for $rcx to have been used (as it writes to $ecx)
 
The chatclient started out as an actual thin perfect chatclient, but then shit happened
 
@bwoebi Oh, 0x8c stalls?
 
yes
 
5:25 PM
ah
still seems odd
 
FWIW I know it sucks. I just accepted it
:P
 
I would expect that dependency to be renamed away. Unless maybe it has something to do with it being only a partial register write?
 
@PeeHaa yeh that happens, esp in "shit this was just supposed to be PoC but now people are using it" phase
 
Exactly
 
@Zachiel np :)
 
5:26 PM
BTW I am ready to deploy new shizzle. What can I deploy atm?
 
master is good apart from this issue
(afaik)
 
On what does the issue breaks?
All mutlirequests?
As in the google plugin?
 
specifically this:
!!admin list
 
Oh yeah right. That's why I added it at first :P
 
!!google test
!!version
 
5:28 PM
 
lol I just hope a lot of those mutes will be fixed now / in the future
To the git mobile!
 
@Zachiel do you get any errors, or it just... silently fails...?
 
BTW how do I tell git to ignore a permission flag on a file?
@Jeeves you alive bruv?
 
@Saitama Right now, when running the html file in a subfolder of my work directory, chrome's console is throwing an unknown exception and the scrip it links to amounts to [Option option]
 
!!version
 
lol @kelunik
 
lol @kelunik
still broken
 
Way to make it worse :P
 
I've run all files through linters and they look ok
 
@PeeHaa meaning keep certain permissions locally, but not when committed?
 
5:32 PM
@PeeHaa :P
 
@PeeHaa on my local admin list is exploding
 
@KevinMGranger I don't commit on that machine, but I set the x flag on cli/run.php, but every pull git is complaining
 
@DaveRandom which so chat room, you test in?
 
@kelunik I keep looking at that preg_replace_callback and going "wtf does that do?" so maybe just do a preg_match and built the string manually... more readable == more reliable...
 
Except in one that tells me that there's something wrong in the regex I used for php validation. (s/+ should be either s//+ or s'/+, it tells me. But I know nothing about regex syntax and I just copied it, let's see if I can find the source)
 
5:34 PM

Jay's Bot Testing Room

For testing only - not a chat room
!!admin list
 
@DaveRandom It's pretty reliably broken as it is :P
 
So, that happens to be literally the only permission bit git tracks haha. It'll always see that file as changed because of that. You'll have to set up a post/pre-{checkout,merge} hook
 
@Zachiel :P
 
@PeeHaa have you got it on a respawn?
!!version
 
5:34 PM
try to fix it then :)
 
@DaveRandom Have I got what?
 
As in, if the process dies, does it restart?
On my local !!admin list is an unhandled exception
 
@NikiC me too…
 
Should be fine. systemd should fix that
!!admin list
 
@PeeHaa ...said nobody, ever
 
5:36 PM
!!version
 
@DaveRandom I hate change in general, but setting up a restarting service is actually kinda nice
 
@NikiC let me see what gcc produces for this func
 
@RonniSkansing might want to edit this so people can easily see what it is, in case it affects them
Hey c'mon, systemd does fix a lot... aside from the stuff that gets "fixed" into a worse state, like the binary log
 
5:38 PM
@bwoebi hm?
 
@NikiC whether gcc produces much better asm than clang
 
Also @PeeHaa atm ChatClient is not shared in DI so some of my communication fixes may not fix as many things as I'd like, the back-off queue is currently per-command and not global
(which I only discovered about an hour ago)
 
:P
 
@PeeHaa Could you pull? If it doesn't work this time, I'll test it locally.
 
You know we will all laugh at you right of it is even more brokener :P
The commit message at least is displaying confidence:
> Fix version plugin?
 
5:41 PM
:D
 
:D
@kelunik You want to do the honors?
 
@PeeHaa :P
!!version
 
\o/
 
\o/
 
5:43 PM
Let's wait for the next tagged release. :P
 
@PeeHaa you always copy my commands
 
@kelunik heheheh
 
5:45 PM
Lame regex address matcher is lame :(
 
I replaced eregi with preg_match. I'm not sure if it is right but I don't need the i because I converted all the bad strings to lowercase myself
@PeeHaa what's lame in it?
 
It's utterly broken
276
A: How to validate an email address in PHP

PeeHaaThe easiest and safest way to check whether an email address is well-formed is to use the filter_var() function: if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { // invalid emailaddress } Additionally you can check whether the domain defines an MX record: if (!checkdnsrr($domain, 'MX')) ...

 
One linter tells me that ^\s is problematic
 
that link is crazy
.php3
 
3?!?!?!
 
5:46 PM
and html like
<meta http-equiv="Set-Cookie" content="inject_params=WT.qs_dlk=VyjjgArIZ7kAAD9E0UQAAAAM&; path=/; domain=phpbuilder.com;"/>
<meta http-equiv="Set-Cookie" content="WMUUID=VyjjgArIZ7kAAD9E0UQAAAAM; path=/; domain=phpbuilder.com;"/>
 
we're like at... 7, right? :p
 
Also it's tryng to prevent header injection from the looks of it based on keyword blacklisting which can only end bad
 
I need to go dining, I'll be back
 
enjoy
 
I'm still sad we have the _ function.
 
5:49 PM
@RonniSkansing lol trying to access it without a user agent string results in a 500 requestable.pieterhordijk.com/PWd7o :-)
 
@Zachiel good to hear :)
@PeeHaa request that shit
 
I also learned about forward_static_call_array today.
 
!!rfcs
 
yesterday, by PeeHaa
Dat moment when you just guess a php array function and it just exists...
 
5:53 PM
See. It's true
 
It is...
It's been raining here since last 1h
 
@NikiC the problem is, I guess, compilers wanting to reduce used registers (push/pop) too…
 
I hate it (╯°□°)╯︵ ┻━┻
 
@NikiC basically, compilers cannot know whether data will land in L1, L2 or LL cache
 
@bwoebi The interesting question for me here is why the CPU stalls in that case (I mean on the last instruction)
 
6:00 PM
if they assume L1 cache, it's fine … for L2 cache.
@NikiC I guess it has to stall until $rcx is free again (aka, not used by prev instr anymore?)
 
@bwoebi Which is what I find weird. I would expect RAW dependencies to be renamed away
@bwoebi Are you sure this is actually the reason for the stall and it's not just essentially one cache stall for both reads to consecutive memory?
 
@NikiC I have no idea
I just see that these two instructions together take about a 50-100 times as much time as surrounding ops
@NikiC you know, with hardware counters, you do a sampling every 50 µs (in my case) … and the sampler looks where exactly it ends up how often
the first mov is 19 hits, the second 1065 hits, the last 1905 hits
 
okay, pretty sure this is just a mem stall then ^^
nothing to do with registers
 
probably not
but just saying, these mem stalls are what makes PHP slow
@NikiC I guess a direct zval array could improve that function
with cache you have the problem to first have to dereference cache pointer
Wow … compiler is optimizing EG(exception) checks away on a hot path without any call instructions
(nah, that's bullshit; confused by the asm)
 
6:21 PM
@Saitama NOt so good, they tell me :)
 
@NikiC in which cases do you have stalls on trivial jmp instructions? (no conditional jump)
 
@PeeHaa I'll remove php mail validation - I need to do the validation inside js anyway for outputting error messages (I think php can do it as well but I don't really want to learn that too) - I just want to be sure that the php can't be used for spamming - was it good in that regards?
 
Only having client side validation is useless
most spammer don't use a client capable of javascript in the first place
 
mail validation that isn't sending a single test email with a link is useless
(at best). Usually it's just harmful
 
I know, that's why I protected the php part too. But, once I've made it impossible to add /r/n and to use two @ in the same field I should be ok, I guess?
Real "yes this looks like it's an e-mail" in js is more for "hey, if you're a legit user who wants to give us your mail for us to contact you back, this doesn't look like it's working"
 
6:37 PM
unless I'm misreading the RFC, @ is valid in the email address local-part if it's quoted.
Will all servers / transfer agents in between you and them handle it properly? Well, you can test by sending the verification email anyway :)
 
@NikiC do you still have that zval array patch for statics around?
 
@KevinMGranger Correct
 
Night....!
 
6:53 PM
@bwoebi icache miss
@bwoebi xinchen did that one... github.com/php/php-src/pull/1707
 
@NikiC hmm, yeah, looks possible … it's after a fcall, so yeah
 
Also OTR mail thread "Use plain array for op_array->static_variables"
 
thanks
 

« first day (2026 days earlier)      last day (2922 days later) »