« first day (3378 days earlier)      last day (1570 days later) » 

12:00 AM
Should I delegate that to someone else who has a clue about the differences between normal and RELEASE builds?
 
I've not seen problems with this on AppVeyor btw
 
Well yeah
I showed that to Kalle as he was asking if it compiled on Windows
So I'm wondering
macOS is going to be a pain
But I have no clue why the ZTS RELEASE build is dying
 
12:15 AM
Aye macOS is compiling
 
12:42 AM
Welp I got everything to compile \o/
 
yay
 
 
1 hour later…
1:55 AM
@Girgias I'm curious, what do you use for your environment? Docker?
@AsyncBot \o/
 
 
1 hour later…
3:06 AM
@Tiffany nope, Windows with WSL (Windows Subsystem for Linux) and I pray to the CI pipeline that it works
 
3:53 AM
I barely just touched the WSL. I have no idea how I feel about it. Basically, it's like ssh'ing into your own computer so that you get to linux your way into the cli?
the very evident first good side is that ls does not throw "command not found" errors anymore
 
 
5 hours later…
8:49 AM
@cmb Could I ask you please to check FFI code one more time. It doesn't work when return values from native callbacks: $original = $php->zend_compile_string; $php->zend_compile_string = function ($source, $fileName) use ($original) { return $original($source, $fileName); }; eval('Test code');
#0  zend_ffi_zval_to_cdata (ptr=0x7fffffffaf50, type=0x7ffff2b42480, value=0x7fffffffad60) at /home/alisachenko/src/php-src/ext/ffi/ffi.c:759
#1  0x000000000056f4c8 in zend_ffi_callback_trampoline (cif=0x7ffff2b7acb8, ret=0x7fffffffaf50, args=0x7fffffffadc0, data=0x7ffff2b7ac80) at /home/alisachenko/src/php-src/ext/ffi/ffi.c:882
#2  0x00007ffff65bcc2f in ffi_closure_unix64_inner () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#3  0x00007ffff65bcfa8 in ffi_closure_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
then it segfaults, because compiled op_array was not returned...
 
cmb
@lisachenko Did you declare zend_compile_string() correctly?
Also probably not a good idea to use a PHP callback here, due to memory leaks.
 
extern ZEND_API zend_op_array *(*zend_compile_string)(zval *source_string, char *filename);
@cmb I know about memory leaks, but I can't even run this code...
It's ok to leak some memory during PHP source code compilation: in AST or opcode transformers and then just cache result and use transformed version
 
9:33 AM
@cmb edit that page to read "until the end of the request", "by" isn't correct engrilish ...
also, that should be a red box
every time someone brings this up I get so annoyed, I tried to question this during discussion and z and d got so defensive ... it's total bullshit that there is no way around this very severe limitation ...
this makes all of the really cool stuff that you might do with ffi impractical, things like gui libraries (and a bunch more besides, gpio, embedded stuff, just everything really cool I can think of) must make heavy use of high frequency, potentially infinite callbacks ... and our implementation simply isn't fit for that purpose ...
 
o/
 
o/
 
9:51 AM
\o
 
o/
 
10:14 AM
@JoeWatkins just add a way to explicitly free it
I mean ... you could crash things, but it's FFI, so you can do everything else as well to crash it
the implicit refcounting obviously does not work, so just add an explicit way, where's the issue?
 
I don't know
 
or uh ... fix it in userland by doing a call with FFI to FFI ext to free it :-D
 
@bwoebi challenge accepted ))
@JoeWatkins do you know the place where memory leaks for PHP callbacks?
 
cmb
11:05 AM
@lisachenko the memory is freed only in github.com/php/php-src/blob/php-7.4.2RC1/ext/ffi/…
 
@cmb ok, RSHUTDOWN... But if memory leaks then there should be places where additional memory is allocated (not a callback), because all callbacks should be destroyed...
 
cmb
11:29 AM
@lisachenko I think it's about this memory which is only freed on RSHUTDOWN (i.e. the end of the request).
 
11:57 AM
You can always FFI call efree ;-)
 
It's too complex for me because memory leaks are hard to fix ) Better to fix this in the PHP core itself...
 
hello, i don't know if anyone can help me understand why this doesn't work? stackoverflow.com/questions/59732901/…
or do i post the question here?
 
Interesting observation: FFI cleans callbacks, but do not update places that points to this area to be null. Thus I need to register shutdown function to manually set callback to null, otherwise on subsequent request it may segfault. With zend_class_entry.interface_gets_implemented callback it is confirmed 100%
 
Yay, more fuel to the fire: reddit.com/r/PHP/comments/eoltx1/…
 
I thought Ocramius was an honorary internals developer because his code is used to break almost everything that's added.
 
12:07 PM
Oh, sure — I was pointing out the link to pmjones' contributions ;-) FWIW, I don't have a problem with Nicolas having voting rights, but there is no way without contributing and "I do a lot of symfony work" isn't just a good reason on its own.
 
> "Only" tests, the last thing PHP needs are tests, who'd even run those things. 5.3.8 IIRC?
lol
Ah Reddit
 
@MarkR The problem with this (again, imho) is that string<binary> doesn't make sense. If a string is encoding aware, it's an ordered list/array of characters, but a binary buffer doesn't contain characters, it contains bytes
both are effectively just an int[], but the integers have different meanings
 
@Derick any idea on who I can "fix" this github.com/php/php-src/pull/5086#discussion_r366765405 (something something ZTS RELEASE compiler complaining)
 
at the moment, a string in PHP is actually a byte array (and it probably needs to stay that way)
 
I wasn't suggesting changing it from a byte array, my point was that if you combine strings, with scalar objects, with generics, you end up with a string with a specific encoding as a template parameter, that exposes encoding-specific scalar functions
 
12:11 PM
but encoding-aware strings don't have a variable internal encoding, they have an internal encoding obviously (probably UTF-8 or UTF-16), but it's always the same encoding regardless of input/output formats
@MarkR See that's where I disagree... you would want a constant encoding for the value object itself, the string doesn't have a property of "encoding"
 
sure, in the same way as if you take an engine out of a car and weld it between two unicycles you have got yourself a motorbike ...
 
imho, ymmv, etc etc
but it's true in a lot of other places, notable e.g. Java, .net, Javascript
 
that sounds like a really horrible way to do it, in case sarcasm was lost in transmission ...
 
Which if memory serves is sorta how ATL CStringT works
 
You don't have a String<UTF8> in Java, you have str.getBytes(StandardCharsets.UTF_8)
str itself is actually an array of abstract characters, the JVM can change it's internal encoding with breaking anything
 
12:15 PM
@Girgias I've no idea. Sounds like a stupid compiler
 
Okay, then what would you suggest would be a way to expose encoding-aware scalar functions on a string, store the encoding in another variable and pass it every time?
 
Welp I'll add that to the PR that it's a stupid compiler then @Derick :D
 
@MarkR the scalar functions themselves don't need to be encoding aware, the entrie concept of "string" changes
 
:D no.
 
the scalar functions are changed to operate on an array of characters, rather than an array of bytes
 
12:17 PM
Then how are things like aware multibyte going to be added to them without just passing the encoding in again
 
we ought to use generics for collections, only ... imo it's a bad idea to build other abstractions on top, what we have to consider is that in other aot (or smart jit) compiled languages, generics are more a feature of the compiler of the language than the runtime, but for us, the complexity that is generics will be mostly a runtime cost (as everything is) ...
if an aot language provided an abstraction that made it look like strings were generic, that might be okay, but for us it sounds crazy
 
It's basic OO encapsulation.
 
Collections is the only thing I really miss in C from C++ land
 
that's what it would look like, but what it would actually be is a huge over complication, from an internals perspective ...
 
I miss overloaded operators... no more memory management \o/
 
12:20 PM
also the generics conversation has been going on at least half as long as the ucode conversation ... many many moons ... I don't really think we'll see one answer to unicode, and we shouldn't talk about generics until someone has a patch ...
I miss php being simple
 
Nikic has working generics (or close to it) Joe
 
Has something *
 
patch or it didn't happen
 
@JoeWatkins I can agree with you, also have asked Nikita about possible ways to implement generics in compile/parse time only. But answer about compile-time implementation was negative...
But if use generic class as an AST template only and resolve each generic implementation into own class entry, then such implementation won't have any runtime checks. Looks very similar to trait implementation: engine assisted class template.
 
12:25 PM
it doesn't look like enough code
how close to complete is it ? is there an azure run anywhere ?
 
@Girgias I forgot that existed, might as well muck about with it
 
@Tiffany haha, it works mostly alright, but I'm still on WSL1 and not the new WSL2 model which is basically a Linux VM (from what I remember)
 
@Derick I've opened the door for Nicolas again. If he walks through, then someone else can deal with it; I recuse myself from any decision making.
 
@NikiC github.com/php/php-src/compare/… "less" -> "fewer"
 
@NikiC also "predecedence" -> "precedence" on the same line
 
:-)
 
@JoeWatkins Um, 3%?
I'm like half convinced that this is a bad idea
 
In what way?
 
the first things that shake my confidence are 1) [yet-more] complexity 2) edge cases (which I'm not able to enumerate in my head) and 3) weirdness (which I'm not able to specify because can't enumerate as in 2)
 
@MarkR because the encoding is always the same
internally
probably always UTF-8
maybe UTF16 because that's the sanest way to use libicu
but when creating a string from external data you need to "parse" it
 
12:45 PM
473
Q: I am resigning as moderator on Stack Overflow

Madara's GhostEffective immediately, I am resigning from my position as moderator on Stack Overflow. I will no longer actively participate on the site or network sites. I will move whatever discussions I can with the people here to other mediums, and mostly refrain from entering chat. These words are very har...

 
and when outputting you "encode" it
 
the exodus continues
 
@DaveRandom hence the reason it no longer works for binary data
What it needs, IMO, is a CharacterString class
or something
 
@salathe you don't need to back off from making future decisions ... owning the mistake fixes it ... continue exactly as you were, please :)
 
or another primitive type if people really insist
but I like the strings-are-immutable-objects paradigm, so a class with by-ref semantics makes sense
34 mins ago, by DaveRandom
imho, ymmv, etc etc
@Gordon @Madara'sGhost :-(
 
12:55 PM
it's interesting that @Madara'sGhost speaks of the "recent firing of two of our most valued members" which obviously refers to Shog and Robert when they and SO didnt say so.
 
Isn't it pretty clear?
 
I wasnt following the whole affair closely, so its not for me.
 
what is that all about? I've nfc
 
> Well... I suddenly find myself in need of work.
From shog's tweet
 
-537
A: Firing Community Managers: Stack Exchange is not interested in cooperating with the community, is it?

Juan MYou all should know that this is very hard for us. This is what I am able to share: As you have seen, today there were some changes on the Community Team. Out of respect for their privacy, we aren’t able to comment on any specific current or former employees. We’re seeking to align the company...

tl;dr: there was mod called Monica and she was fired and then some legel issues and now everyone's jumping ship
 
1:00 PM
OK
 
fwiw I thought it was kinda crazy how long @Madara'sGhost was holding on :P
 
he's a ghost, that's what they do
 
:-)
 
I mean, other than wearing sheets with holes cut in them, groaning, clanking, and not existing
 
Company that relies heavily on entirely uncompensated labour doesn't value said labour. News at 11.
 
1:02 PM
@PeeHaa indeed
 
How can you resign for something you don't get compensated for? You just stop doing it...
 
you get tshirts and basecaps
 
and unlimited free migraines, don't forget about them
 
so... lunch
 
Wait wait wait
Is it about.. this?
> Some users feel it would be discriminatory for the pronoun "they" to be used in reference to a transgender participant who has expressly requested a particular pronoun.
 
1:06 PM
@Jimbo that's what started it
 
Oh gawd
 
fuck sake
215
A: Summing up the main issues (The Story So Far)

anonymous Cultural Background: In the United States there has been a push to use gender-neutral language and gender pronouns when given. Stack Exchange (SE) Background: Moderators and employees have access to the Teachers' Lounge (TL) as a private chat room with the understanding that material discuss...

Read that bullshit ^
 
Every time I see a pronoun debate I wonder what more enjoyable things I could be doing with my life... including but not limited to lowering myself slowly into lava
 
the
obviously a typo but leaving it there as a monument to both my idiocy and the idiocy of this debate in general
 
@Derick I think I know why the compiler is complaining, it's because offset is a signed 32bit integer: php-lxr.adamharvey.name/source/xref/master/ext/date/lib/…
 
1:11 PM
I'm all for being accommodating to people's wishes, but I'm also willing to bet that not one single person actually affected by this has complained
 
But I don't know what to do so that it knows it can't be that maximum range
 
It's the internet Dave, realm of the professionally offended.
5
 
yet people rarely complain about stuff that's actually offensive, weirdly
like I bet this will get flagged: bum
but you can grep the transcript for any real swear you think of (and plenty that you can't think of) and it's there somewhere
 
cmb
@Girgias where is that warning (complaint)?
 
@cmb
/mnt/c/Dev/php-src/ext/date/php_date.c: In function ‘date_format’:
/mnt/c/Dev/php-src/ext/date/php_date.c:799:36: warning: ‘%02d’ directive output may be truncated writing between 2 and 6 bytes into a region of size 5 [-Wformat-truncation=]
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
^~~~
/mnt/c/Dev/php-src/ext/date/php_date.c:799:30: note: directive argument in the range [0, 596523]
snprintf(offset->abbr, 9, "GMT%c%02d%02d",
^~~~~~~~~~~~~~~
/mnt/c/Dev/php-src/ext/date/php_date.c:799:30: note: directive argument in the range [0, 59]
Offending lines are doing this: abs(offset->offset / 3600), where offset->offset is a 32bit signed integer
Only complains on ZTS Release builds on CI
I suppose I can but in a dummy size check buuuut
 
1:23 PM
@Girgias complexity
 
Fair point
 
cmb
@Girgias offset->offset%100?
 
I think 100 would be too short as the offset is in seconds and we are tying to get hours
But yeah that seems like a good idea to do something like that
 
@Gordon I don't have any knowledge that you don't.
 
@DaveRandom You can't even call them a "they". Or by their name. They consider this offensive. What in the world of shit
 
1:35 PM
Literally no-one will say that
 
But we didn't get any advance warning as one would expect in the case of someone leaving on good terms or on their own pace. And they didn't even post on meta or on the blog as others who had left did.
It's a reasonable conclusion to make, I think. It's not based on any special knowledge.
 
More importantly, if Shog9 had left on his own terms, he wouldn't be posting on Twitter that he needs a new job. Like now
 
Looks like there's someone been introduced to the company high up who is fucking everything.
 
cmb
2:03 PM
@Girgias that 100 is likely important, because %02d doesn't truncate; you may need something like abs(offset->offset / 3600) % 100.
 
@NikiC about my reflection PR, i was hoping you would know if this should be on internals or an RFC, it feels a bit small
 
@cmb Ah you meant that way to use it, that makes way more sense I did something else which is a bit whack
 
cmb
yes, seen that :)
 
Wait no, I'm not sure putting the %100 would result in the "correct" behaviour
I don't even know anymore
Can you use regex research for plain text in LXR?
 
just make the memory allocation bigger ;-)
(and add a comment why)
 
2:08 PM
Can I use doctrine migrations to fix errors in data? For example, I currently have a 1:n relation between 2 models, when this relation was supposed to be 1:1. The data is unfortunately already on production, so I need to generate a new for every row on the n side of the relation, and delete the old record that was 1:n. I don't know what the best approach would be to execute this fix. Maybe my question should even be; "What's the best way to execute this fix?"
 
Well I did that initially and @NikiC wasn't that fond of it
 
Do I write a PHP script that does this, do I just temporarily write an API endpoint that executes this fix, do I use a migration (If I can)?
I know I can, but the one I want to avoid is writing a complex SQL query to perform this fix. I think I'll lose more time than combining PHP with an ORM to fix this.
 
Did I fuck up my regex? Because it seems surprisingly few custom formats are in use gist.github.com/Girgias/b9a2b9926190630d433c84da0ef1b002
Ah, I forgot the slprintf variant
 
cmb
@Girgias There are only 24 hours, aren't there?
well, actually probably more like 12
 
@cmb are there tho? :p Yeah but I was saying in how it calculates that if the offset is way off but yeah
Welp I only caught one more instance by updating the regex: gist.github.com/Girgias/b9a2b9926190630d433c84da0ef1b002
That's ... surprising?
 
2:44 PM
@beberlei RFC isn't needed imho, but I think it would be good to mention on internals
 
@NikiC alright. also i added one comment to your last review from yesterday
 
@Machavity Joke. They need to fire their director
Turns out I'd already blocked her on twitter without even knowing who she was... just by reading a few of the tweets :D
 
3:00 PM
@cmb 14 at least
 
cmb
ah, yeah, we're dealing with timezones ;)
 
@Girgias tbh I think this is more trouble than it's worth
This isn't really dropping any code, but will likely result in weird system-specific edge-case discrepancies between our own formatting implementation and the system one
Especially around things like locales ...
 
@NikiC I mean it's a bit of trouble but it seems worthwhile to me, locales is one thing true. I'll try to improve the regex because I must be missing cases.
 
3:22 PM
the locales thing is going to be make it a lot of pain
if you end up breaking , vs . etc, you'll be in for a lot of grief
I think we should stick to our own implementation
 
3:34 PM
The thing is, I'm not even sure if our snprintf is locale aware, or I'm just blind
Okay found it, it's only in locale aware with f, F, e, E, g, G, k, H which are two cases
Wouldn't it make more sense to add a locale aware variant of it which is only used in those case?
 
Ours should not be local aware really
I didn't think it was?
 
It is -- that's what we need to get rid off ;)
 
yeah, but using a system provided one isn't going to help then, is it?
(just checked the code, and yes, it is)
 
no it isn't
 
to which line?
the system one is not locale aware?
 
3:45 PM
no it's not going to help us
 
right
hacking out the local BS from our version is easy enough
 
Yes, hacking this out is always easy
The hard part is making Z shut up about it afterwards
 
Z?
 
Zeev
I believe he expressed some strong opinions about killing locale sensitivity in float -> string conversions for good
 
Seems like there aren't that many internal calls which are locale aware: gist.github.com/Girgias/ad8a447f4d98950c5ef210bd9cc47a34
 
4:04 PM
@NikiC There is intl for that.
Code being dependent on locales is a shit idea
 
if code would rely on it, this would be an evil bc break though
i have written code relying on float locale sensitivity in the past, it was such a pain, the code spread that around a whole app though :D fun times
 
from what I have seen, it almost always code breaking due to the locale being "odd"
 
I mean, I would introduce a locale-aware snprintf which keeps the old behaviour and use that for the php functions (and the extensions calls which use one of the locale aware formats) but otherwise use the system one
 
4:35 PM
Hello everyone!
 
cmb
\o
 
I didn't find the WordPress chat room? can anyone help?
 
There might not be one. There is Wordpress.SE, but your question is quite broad
I forgot there's a menu to find stuff. They do have chat rooms
 
4:55 PM
What was the question?
 
He wants to make WordPress work with Composer
 
I'm assuming it is for making a package for a whole install or something like that? Because making it work for a plugin should be pretty straightforward...
Never done that for a full install, but check this out if you haven't already: composer.rarst.net
 
6:05 PM
o/
I fell over to the dark side. I was hacking <a> elements to have client side routing while having the href in the url bar, and then I felt it.
I wanted to create my own JavaScript framework.
 
6:19 PM
From PHP 5 to 7, the "size" parameter for zpp "s" strings switched from int to size_t, right?
And "l" went from long to zend_long, right?
 
7:15 PM
Hello. Today i developed an example application which should consume message from kafka and do something with the data. The messages are stored in avro inside the kafka topics.

Actually everything works fine, but the deserialization is super slow. i expected to consume 500 messages/second per partition. Instead i was totally consuming 16 messages/sec. Turns out, that avro deserialization is so slow.

Does anyone has same experiences? Did some solve the issue?
 
8:03 PM
good morning
 
@FélixGagnon-Grenier Hi Felix! Thanks for sharing. Everyone, remember that Javascript Anonymous is here to help people overcome their addictions to frameworks
 
awww <3 :P
 
8:26 PM
I texted my sister the Wikipedia article for PHP, and it has a website preview of Rasmus' face. So every time I go to text my sister, I'm greeted by a blow-up image of Rasmus' face.
Slightly unnerving
 
Could have been worse. You could have texted her Linus Torvalds' picture
 
Oh dear
 
Rasmus: "I invented PHP" Linus Torvalds: "Hold my beer"
 
8:44 PM
Linus Sabastian: Hold my sandals.
 

« first day (3378 days earlier)      last day (1570 days later) »