« first day (3804 days earlier)      last day (1137 days later) » 
01:00 - 20:0020:00 - 00:00

8:00 PM
@Crell Wanna put together the arguments for the RFC? I can focus on the technical details?
 
@Sara For converting stdlib to php? English I can handle if you can lay out the nerdy technical details for me to translate.
 
For making the machinery to allow it later on.
 
This is mostly a technical problem
 
I presume in context we're talking about a mechanism for extensions to preload PHP code, after which "port stdlb to php" becomes easy enough that it doesn't need an RFC? Or at least not individual RFCs.
 
The exact shape isn't entirely technical.
We might still need some research to justify the operation, prove it's not slower.
 
8:03 PM
So the initial argument is ease of development for extensions, followed by "and if it turns out to be faster, we can convert a crapload of other stuff, too, later."
 
I've played with this a bit, and our current consensus is that we'd want to ship pre-compiled opcodes
Basically in opcache file cache format, and only perform unswizzling to load the code
 
unswizzlilng?
 
Just to make sure it isn't lost in the noise: shipping PHP code from extensions is useful for extensions. Sure, it's theoretically great for PHP to be able to ship PHP so that JIT can work, and make it more accessible to newcomers, etc. But making it useful to extensions is also valuable.
 
In computer science, pointer swizzling is the conversion of references based on name or position to direct pointer references. It is typically performed during the deserialization (loading) of a relocatable object from disk, such as an executable file or pointer-based data structure. The reverse operation, replacing pointers with position-independent symbols or positions, is sometimes referred to as unswizzling, and is performed during serialization (saving). == Examples == For example, suppose we have the following linked list data structure: We can easily create a linked list data structure...
 
@NikiC Who were you talking to? Because opcodes are highly sensitive to configuration changes including what extensions you have loaded...
That seems like it's definitely not viable.
 
8:06 PM
save the extension list and check for changes if something changed delete the cache ?
 
Leave it to CS people to make "swizzle" a real verb with actual meaning...
 
@LeviMorrison Pre-compiled opcodes would be produced during the extension build
 
Let me try to say that differently: shipping PHP code from extensions as opcodes only seems crazy because the opcodes change based on what extensions are loaded.
 
@LeviMorrison Maybe what I said above
You make my heart .... swizzle <3
xD
whatever that means
 
@LeviMorrison Not to a significant degree? Are you referring to the FCALL specializations?
 
8:09 PM
Ha, it's more than that. Sammy fixed these issues because Datadog hits them, but they existed before we came around :)
Look at what factors into the... can't think of the name of it... opcache "should I recompile" check.
 
I don't think there's much variation there, nothing we shouldn't be able to avoid
I mean, VM handlers still need to be assigned at runtime, and we could make things into genuine specializations rather than separate opcodes where necessary
Some things like EXT mode wouldn't work of course
But yeah, this is definitely not simple
But I don't think the alternative of simply loading PHP files is really viable
At least for PHP's own standard library, we can't compromise on startup performance too much
 
Naive question: Why would "here, preload this file when you startup, kthxbye" not work? I realize there may be more performant options, but why doesn't that work?
 
@NikiC Do you think what I proposed at the end of this email is feasible performance wise? My naive thought was storing a set of fiber IDs in each object, adding the fiber at the start of each method, removing it at the end. If a method is not marked as concurrent, throw if the fiber set isn't empty at method start.
 
Of course that works, it's just slow
 
@NikiC Let that be a future milestone; for now, let extensions decide whether this cost is acceptable.
 
8:16 PM
@LeviMorrison I don't have an interest in this if it's not usable by core
Extensions can already do their own loading if they like
 
@NikiC I don't think that's true, actually.
Datadog has been bit a LOT by shipping PHP code in the current schemes, including some preloading specific issues.
I forget which extensions, others have done it in the past and have stopped. It needs more work at the core level for extensions to be able to ship and run their own code safely.
 
@LeviMorrison What is the actual technical issue?
@kelunik Interesting idea
 
There have been several; I'll check with Sammy on the latest because he did some preloading work somewhat recently.
 
@kelunik Though this probably affects more than just method calls, same applies to property access right?
 
I think it will catch most mutable state issues, without being a major problem.
@NikiC Partially. Property access is currently atomic unless you use magic methods, at which point you have methods.
 
8:23 PM
@kelunik But just because individual property writes are atomic doesn't mean that you can't have invariants across multiple properties
Though I guess those would typically be abstracted in a method...
 
It won't catch all state issues, but most of them.
@NikiC Either that or the object is usually encapsulated in another object.
 
@kelunik So really you don't need to store a set of fiber IDs, you need to store either none or a single ID
In which case this would probably not be terrible when it comes to performance (we also happen to have a free 32-bit field in objects...)
 
@NikiC Depends on whether you mark methods or classes, e.g. if you have two concurrent methods already running and then call a non-concurrent method, you should get an exception.
 
Can anyone give me a quick lowdown on how to enable opcache for the CLI after building from src? (trying to do additional perf testing)
 
@kelunik The only thing you can really mark are objects. For concurrent methods you would store nothing. For non-concurrent you would throw if a different fiber ID is already stored, otherwise back up the current ID on the call stack (either none or the same), write the new ID and then on unwind restore the save ID. Would something like that work?
 
8:32 PM
@NikiC You're right, a single ID is enough that way. :)
 
@NikiC Here's one I can remember (that isn't preloading related): op_array extensions. If you change which extensions are loaded then the op_array values will be invalid, and this happens at compile-time (not runtime, though some extensions can use the runtime version of this API instead). Extensions can modify how code is compiled.
 
@LeviMorrison Just to clarify, at which point were you actually loading the PHP code?
Not RINIT?
 
There are issues around that specific thing, but yes, we used to do it in our extension's RINIT.
We now hook into the prepend hook.
 
But if it's in RINIT; how can the extensions change?
It's per request?
 
You are asking legitimate questions but they are only tangentially related to the ones that I'd like to focus on, like the compile time one I just explained. Extensions can (and do) modify how code is compiled, and you can't mix and match that at runtime unless you recompile.
 
8:36 PM
In that case I'm not sure what we're discussion right now...
 
You cannot ship only opcodes for PHP files from extensions.
@NikiC ^ that.
 
I think you make that statement more absolute than it is...
 
I was trying to explain that more.
Consider extensions which save values onto the op_array's .reserved field.
This is done at compile time, such as .op_array_handler.
Since extensions themselves modify the op_array, you cannot compile the opcodes when the extension gets built, and then expect it to work at runtime with a different set of extensions loaded.
You will sigsegv, eventually.
 
@LeviMorrison Why can't that happen at loading time?
 
@NikiC What do you mean by "that" specifically?
 
8:41 PM
@LeviMorrison Initializing reserved fields
 
It's a difference between per-request and shared across requests.
You can't write those fields at runtime anymore because of immutable op_arrays. There is another similar API which lets you put things into runtime cache, but that's per request only.
The only way to get things to share across request is to do it when the opcode is compiled. No other time is safe.
If this was the only issue I'd say we can maybe design a way out of the situation, but there's also the EXT begin/end fcall thing, and I still haven't quite remembered the technical issues with preloading and running PHP code in RINIT.
 
@NikiC Not sure what to do with static methods then. :P
 
Ah, Sammy just dug up where we switched from running directly in RINIT to using the prepend hook: github.com/DataDog/dd-trace-php/pull/907. @NikiC
Has a few more technical details there.
 
@Girgias Woot! Hope the direction goes foward!
 
9:02 PM
My phpstorm sometimes auto adjusts it's contrast / brightness it's extremely odd, does this happens to anyone else
 
@NikiC I think there's an issue with the zend_get_op_array_extension_handle (which is the runtime version of zend_get_resource_handle, which is the .reserved slot) because they are requested at MINIT time, and some piece of that gets preserved (I think maybe how many?), so if the number changes at runtime (especially if it goes down) it's an issue. Little bit shaky on details, but hopefully enough to convey the rough idea of the technical issue.
@NikiC Custom opcode handler offsets get serialized into the op_array as well.
Don't get me wrong; I'd love it if we could ship only opcodes. If we want to work towards that as a goal, then sure let's solve these one by one. Just trying to say it isn't simple and enumerate a few of the reasons why.
Specific reasons due to extension capabilities, I mean.
 
@ln-s sounds like your display is adjusting itself automagically, probably because of average light levels over a few secs (e.g. I used to have a monitor that would turn off its backlight if every pixel was #000000) - look through the menu for "auto adjust" settings
 
@ln-s mine flickers when I switch to it very occasionally. I think I normally alt-tab to something else, then back, and it stops.
 
@Danack It's just bizarre, does not happens with other apps, only phpstorm
 
I have also written 90% of a .net lib for handling VCP codes on windows if you wanna go deep :-P
 
9:15 PM
java magic....
 
Sepakign of .net
Speaking*
 
there is a winb32 API that allows apps to adjust brightness/contrast but almost nothing uses them
 
btw, pressing up allows you to edit.
 
I'm too used to IRC sorry :D
 
even windows control panel does not have any way to manipulate it afaik
 
9:17 PM
^ Sounds like an awful idea tbh, but I hate .net so
 
Nice Language, Shame About The Framework
(C# obv, VB should be illegal)
 
Well it's microsoft I never EVER liked or understood MS languages
Visual fox
xD
 
C# is the language Java should be
 
What happen to mono
 
it's still alive and well afaik
 
9:19 PM
I have no idea, I only heard about it once
I deem CLION as interesting
 
I used to work with a company who ran mono in prod, was fine
 
I remember that CLION, with a single piece of code it would create web cli and gui interfaces
This was like 10 years ago or so
 
idk what that is I think, I only know CLion as jetbrains' C/++ IDE
...which I have never found all that useful, because all the C code I write is MSVC or uses autotools so CLion doesn't know what to make of it
 
@ln-s It did so well Microsoft acquired it and started integrating it.
 
@LeviMorrison What are we talking about now, mono ?
I thought mono was a C# clone ? no ?
 
9:22 PM
@LeviMorrison lol I didn't know that
 
@LeviMorrison Oh, it's definitely not going to be simple
 
maybe it was the other way around, I don't know, I dislike anything in which ms is involved
 
so... no github then? :-P
 
There's a lot of layers of issues to doing this
 
now they control github (yay) the latest Exchange server PoC was taken down by them
clowns
 
9:24 PM
...it's pretty irresponsible to post a PoC of a major sec flaw in a widely used piece of software in a public forum...
 
@DaveRandom some things are inevitable, like gaming or github
Don't think it is, vendor was contacted
 
and as someone who has spent the last couple of weeks maddly coming up with insane work-arounds for people who still have on-prem exch, I can live without the attack being a simple case of git clone :-P
 
@NikiC If the API is that we say "here are the files and their md5 values" (sorry, quick sanity check: apparently opcache is still using md5?), and we tell extension authors to not rely on runtime include/requires etc, then whether we ship the PHP code or the opcodes shouldn't matter, right? Any other things to add to the "do not do" list?
 
lol yeah the git clone exploit
:(
 
honestly the number of fragile af VPN setups I have created in the last 10 days is ridiculous, I know it will come back to bite me but I have no choice
 
9:26 PM
@DaveRandom Doesn't matter if you cashed it in! (shark tip of the day!)
 
seen an awful lot of drive-by dictionary attacks against TCP/3389 in the last month or so as well
 
@DaveRandom nuking and rebuilding due to the vuln? or needing to install a new ver
 
@MarkR no just forcing people on to O365
 
@LeviMorrison Where by "API" you are referring to a build system API, right?
 
but in the interim had to close the leak
 
9:27 PM
@NikiC Yeah, as part of a _zend_module_entry API.
 
ftr I only recommend O365 to people who already have exchange and/or are tightly coupled to Office, everyone else should use gmail :-P
though I do wish google would implement activesync
no matter what you think about MS, I think everyone would struggle to argue that anything other than Outlook is the best desktop email client for "normal people"
 
A shame it still murders most HTML emails.
 
The last time I touched Outlook it was a steaming pile. Admittedly, it's been a while.
 
@MarkR yeh that is fucking annoying, I am really hoping that bundling edge with windows will trigger MS to fix email rendering, surely they can just plug it in with JS disabled
 
@DaveRandom I tried outlook at my last job. Horrible compared to Thunderbird, which is honestly saying quite a lot.
 
9:31 PM
"normal people" :-P
(i.e. non-techies)
 
I just use straight gmail
 
I just don't use emails for things and use the appropriate communication medium instead
 
(with rambox of course)
 
emails are for private essays, I very rarely send those
 
Well I get sent emails so
 
9:32 PM
basically it's a blog post that you choose the readers (but not when they read it)
 
I rarely write one, same case
 
if you want to send an efficient text message, send a fucking text message
if you want it encrypted, use signal/whatsapp
if you want to send a file >500k and you do it via email I will hunt you down and kill you
 
Default text message readers are awful :|
 
email is fundentally unauthenticated, unauthorised and unencrypted, everything else has been built on the side and none of it works properly... it won't come close to bitcoin, but I dread to think how much energy is wasted on transiting garbage emails and running them through incredibly complex spam filters, when we have had better technologies for my entire life time
it has no effective recall mechanism, no sensible delivery reporting mechanism, things regularly disappear into the aether, and it relies on DNS, that notoriously reliable and totally secure mechanism
if you leave me to my own devices I will fill several screen heights with this rant so I will draw a line under it here
 
Do you really think a sensible delivery reporting mechanism is a good idea? with spam?
 
9:37 PM
I think it stops spam from happening a lot faster
there is no audit trail
I have very very very occasionally had whatsapp spam, but like twice ever and the accounts were deleted within minutes
I will not get into how X.509 is that answer to all of these problems because that is a whole other sadness
 
Except when you add bussiness accounts and they spam you with promotion
:D
In said case you can block them
I have to agree that email, for what it is, it's extremely complex
 
it was built for a bunch govt and edu institutions, who all implicitly trusted each other, to share info with each other
 
it's like something that worked and then people started pasting sticky notes and adding all sorts of ornaments to make it "better"
 
security never entered into the equation
it has been bastardised into what you see today, but it is not, and was never designed to be, fit for this purpose
 
Recipe for a monster
Sounds like windows
haha
Hey
 
9:41 PM
sounds like anything of meaningful age, tbf
 
It works
(TM)
 
but I do feel particularly strongly about email
 
We are in a PHP channel, you realize...
 
MIME is a stupid format as well, there's another road we can fall down
yeh
sorry, I will go and get dinner that will shut me up
 
10:21 PM
docs question, does php.net/manual/en/… need documenting?
(adding it to todo if so)
not sure when I'll get to it, but not having definitions for what constants do is...ehh.... and best time to write what they do is now while I'm looking at it... I can store what I figure out for later
 
I have definitely wished it had more docs in the past
they are self-explanatory in the sense that it is googlable, but I don't work with that sort of thing often enough for those names to be self-descriptive
 
currently writing down what phpstorm has documented but I'm assuming their stubs are copyrighted
 
not only is that not true, they are on github and you can PR them :-P
if there is any copyright at all it will be in the file header
 
I know they're on github, but not sure what the copyright is
just cause something is on github doesn't mean it's free to use elsewhere :P need to check what the attribution requirements are
they use apache 2 for license
 
oh I see what you mean
 
I doubt jetbrains would have a problem with it
just @ them on twatter
 
github.com/JetBrains/phpstorm-stubs/blob/master/SPL/… this basically what I'd be stealing using
 
just ask them on twatter or an issue on guthub, I think the former probably better
of you could email support or whatever but this really seems like a thing that just needs a cursory nod
 
I googled a TL;DR for apache 2 licensing, not sure how to go about some of the requirements within the PHP manual :/ I'll tweet them later
can't exactly include license in a commit message, can include attributions though
 
no but you can commit license files if they are required
/me sleeps zzz
 
10:40 PM
Asking them on twitter is the right thing to do, but pretty sure there's no way it could be a problem as.... Is an API copyrightable? Yes, then PhPsToRm is violating PHP's copyright. No, then it's free to adapt.
 
@Danack arguably, yes, but I am not a lawyer... and copyrights are messy
I think a similar discussion occurred earlier regarding HHVM
though jetbrains is more amenable than fb
 
that was more around implementation....not an api.
 
10:55 PM
@Danack hahaha, oh you sweet summer child.
 
@MarkR so we can sue phpstorm for violating our copyright?
 
do we have the money for a lawyer?
 
@Danack Doubt it... yet. But the Q about copyrighting APIs is still TBD, and billions have been spent on it
The tech industry is doomed if they come down in favour of oracle
 
> Is an API copyrightable? Yes, then PhPsToRm is violating PHP's copyright. No, then it's free to adapt.
The point was that either way, it's php's api. so if copyright applies....the copyright belongs to php. If not, then ....also not a problem.
 
I don't want it to turn into finger-pointing though :/
 
10:59 PM
these all feel like bridges that don't need considering until someone has said "no"
yes so I got distracted and didn't go to bed, sue me
document it, then sue me
 
@Tiffany Those docs wouldn't be copyrightable anyway
 
sure, Phpstorm uses stuff from the PHP manual in their stubs for stuff, and they correctly attribute to the PHP manual. It's a question of using documentation that someone provided to Phpstorm's PHP stub files that explain predefined constants succinctly, and moving that documentation into the manual with requisite attribution to the original author. Fuss isn't something I want to deal with :/
 
We could make it so you wished you'd gone to bed, by leaving a link to some 'banging music'.
 
@Danack I take your banging music and raise you youtube.com/watch?v=rlgBmqrNK3M
 
or if you want to spend nine minutes in a trance of rock instrumental metal: youtube.com/watch?v=kXID7Uwwgbo
 
11:09 PM
 
Exactly
I didn't even realise that thing had music O_O
 
11:25 PM
I'm a wiener dog person I can't agree to cats (sorry)
MAJESTIC animal
 
PHP docs team disagrees.
 
Did you know that one of the PHP easter eggs (for version 4 I think)
was
.... a wiener dog
Called styx if I remember correctly
 
github.com/php/doc-base/blob/master/configure.php#L701-L715 (though it looks so much better in console)
 
I liked the broken idea of magic quotes as easter egg
 
11:46 PM
fuck literally everything about this twitter.com/MuseumofCrypto
@PeeHaa I really liked "safe mode"
 
:P
 
01:00 - 20:0020:00 - 00:00

« first day (3804 days earlier)      last day (1137 days later) »