« first day (3937 days earlier)      last day (994 days later) » 

12:01 AM
I wouldn't turn my nose up at a ByteArray.
 
12:26 AM
Ideally I think there should be a ByteArray and a Normalized EGC (Extended Grapheme Cluster) for "strings"
 
I vote we do that, and (entirely to screw with people) release it as 6.1
 
Nah, PHP 9, but turn the logo upside down
 
PHP X, if anything
no wait actually, mess about on internals loads so it has to be a "special edition"
PHP seX ftw
 
PHP seX6++ ?
 
can release an "extended" edition called PHP seX-E
 
 
6 hours later…
6:04 AM
posted on July 27, 2021

 
6:48 AM
There are also a data structure called ropes, I've been told.
Wonder if that could speed things up
In computer programming, a rope, or cord, is a data structure composed of smaller strings that is used to efficiently store and manipulate a very long string. For example, a text editing program may use a rope to represent the text being edited, so that operations such as insertion, deletion, and random access can be done efficiently. == Description == A rope is a binary tree where each leaf (end node) holds a string and a length (also known as a "weight"), and each node further up the tree holds the sum of the lengths of all the leaves in its left subtree. A node with two children thus divides...
 
7:04 AM
Nah
 
 
1 hour later…
8:22 AM
@DaveRandom utf-8 being prefix-free, most operations on utf-8 will just work perfectly fine on bytewise strings… for most operations the overlap is just so significant (except if working with character offsets and lengths obviously) …
 
 
1 hour later…
9:46 AM
Stream position after stream filter removed ・ Streams related ・ #81302
 
9:59 AM
Gcloud pub/sub. I'm doing a synchronous pull, and its returning 1000 messages at a time, but I can only ack them after doing some computation to build a request from the message, making said request to an API and getting a 200 back, If I get 1000 messages, and it takes 500ms second to do the above steps per message, then when i get to the 20th message the ack "window" of 10 seconds has passed.

So not sure if I'm missing something, need to rapidly speed up my 500ms steps or if I should pull less messages but more often, or I should extend the ack window to like a much longer time.
 
10:40 AM
@Luke Sounds like you want a fast messaging queue with workers
 
OK, so I'd spawn my code to handle the messages multiple times (workers) via a cron, and handle a small number of messages quickly
 
Morning
 
11:00 AM
Morning :-)
 
11:49 AM
@bwoebi Are you gonna adjust your enum stubs PR now that Nikitas PR is merged?
 
12:02 PM
@Luke why cron? A queue works without the need of crons or whatever it schedules execution as it sees fit
@CraigFrancis yo what up C
 
12:14 PM
@ln-s thanks
 
\o
 
12:57 PM
@IluTov yeah, will do tomorrow probably
 
@salathe should I go ahead and squash and merge? or wait?
 
@Luke np, rabbit mq comes to mind
 
1:13 PM
@ln-s Hey Freddy, how's things?
Yeah, I'm trying to get back to normal(ish) work... the stuff I've been putting off for, erm, a few months :-)
 
@bwoebi Nice :)
 
@Tiffany Do you have anything else you want to change in that page?
 
 
1 hour later…
2:30 PM
@salathe I feel pretty happy with it now
 
2:43 PM
Don't spam @MarcoSulla
 
@Tiffany That was a good read... and a scary one. To understand that so much depends on a person rather than a system reveals how volatile PHP development currently is. I'm not sure what extracurricular activities Dmitri is involved in, but I hope it's not base jumping. As Joe says- hopefully the bus factor increases... and sooner rather than later. //cc @JoeWatkins
Succession planning is such an important objective and you need people that can be taught many of those details and intricacies that cannot always be communicated well through paper manuals and text.
 
@Tiffany In that case, feel free to merge away :)
 
cmb
3:00 PM
@Sara, before you tag 8.0.9, please don't forget to cherry-pick github.com/php/php-src/commit/…
 
 
1 hour later…
4:04 PM
@cmb Will do!
Prolly gonna get on it after an interview I've got coming up soon.
@OlleHärstedt I've had in the back of my mind the idea of updating smart_str to be a rope implementation, but it doesn't so much have an "I'm done" trigger as a "I just wrote a null byte, and now I'm going to use the buffer, k'thx bye" implied action, so I can't be sure it'd be safe to swap the whole thing out. :(
 
@Sara frankly I was trying to get rid of smart_string but then there is the one case of zend_spprintf and I'm like... well fuck
 
@Sara Maybe just add zend_rope and migrate uses?
Any plan to re-use rope segments for other strings?
 
@LeviMorrison I'd probably want to measure the impact via smart_str first. No idea if it'd really make a difference in practice.
@Girgias So many good intentions in software development end in "well... fuck"
 
Less memory fragmentation is not something that shows up easily in benchmarks until fragmented all the way...
 
@Sara 'scuse me while I go OH that.
 
4:14 PM
s/in software development//g
 
cmb
@LeviMorrison careful not to cause confusion; we already have ZEND_ROPE_INIT and friends
 
doc.php.net/tutorial/local-setup.php yay, hopefully this will help people building docs locally
 
@Girgias sounds like what Raku (aka Perl6) calls "NFG" - "Normalized Form Grapheme"; it uses a neat trick where strings are an array of signed 16-bit ints to make grapheme operations cheap; positive values are single code points, negative values point at a look-up table
 
@Sara I don't think that would be useful for the things smart_str is normally used for
 
4:31 PM
@IMSoP Yeah I heard the Rake considers this way, didn't know how they implemented it tho, seems interesting. :D
 
OK, this error message seriously annoys me: https://3v4l.org/haHBO

Is that fixable at all?
 
@NikiC It's been a /long/ time since I even had this in my head. IIRC heredocs were in a very different state at the time, for example
@Crell eeeew... yeah, that error is gross and should be pretty easily fixable
 
I shall file a bug for it.
 
Also, given we have a distinct exception type UnhandledMatchError, you'd think it'd be a property on the exception: 3v4l.org/U4Ns2
 
You would think that...
 
4:44 PM
@Crell You could also file a PR. This is well within your grasp.
 
Bug first. Then we see if I can manage it...
 
Fair. :)
 
Dur, what category would this be? There's no error handling or "core language" options.
 
Scripting Engine probably
 
OK
 
4:45 PM
Which is... not entirely accurate
But.... meh
 
Too late! Someone with a higher pay grade than me can reorg if they want.
 
Error message for match() is misleading and unhelpful ・ Scripting Engine problem ・ #81303
 
@Sara Also, your confidence in me is worrisome. :-)
 
hey @Crell, I'm happy to support you with my limited core knowledge as much as I can :)
 
I shall flood with questions once I know what to even ask.
OK, I started by searching for UnhandledMatchError. And found a lot of bits of the declaration of it, which are all spread out. But nothing for where it's actually used, which would be (I presume?) where I'd want to modify it.
 
5:03 PM
@Crell What's the deal
 
cmb
@Crell see heap.space/…
 
3 different places other than the declaration... all in header files.
 
vm_def is probably where you want to look at
As this must be when it is actually thrown
 
At least they all do the same thing, so it should be the same change 3 times.
 
(vm_execute is generated from vm_def)
 
5:07 PM
Ah! That would explain the redundancy.
 
@Sara You the interviewer or the candidate ?
 
So I need to replace zend_zval_type_name(op) with something that returns a useful string representation of the value of op. Yes?
 
Not necessarily, this gives you the "canonical" type name
So depending on what you want the message to look like you might need to do a couple of things
 
If the value is a primitive, I would think just stringifying the primitive. If it's an array... not sure how to stringify that. Same for an object. For an object, the type probably still makes sense.
 
You probably want to switch case on the zval type
And then generate the corresponding message
 
5:25 PM
@Crell I believe in your ability to believe in yourself.
@ln-s interviewer
 
bugs is down again?
 
cmb
likely intermittently
 
@Sara What about an SplRope class?
 
So I think what I'm looking for is this, modulo whatever the ??? should be. Yes? gist.github.com/Crell/cb04bc01a5ab0633ca34ad05e872602b
 
Speaking of Spl, wouldn't it be possible to add some classes for unboxed (fast) values? Unboxed = no GC.
That is, the individual item in the array is unboxed, the array itself is boxed, naturally.
Maybe only meaningful with generics. :d
 
5:39 PM
@Girgias Is that vaguely correct?
 
Also single quotes are for a single char, and you can't switch on a char* (i.e. "string") on a switch case in C)
 
@Girgias Woof.
@Girgias Ugh. I keep forgetting that in every language except PHP. :-)
 
yeah
zval_get_string() will return you a zend_string* of the value of the zval
Which you can pass to the %s format specifier as ZSTR_VAL(the_zend_string)
and don't forget to release it afterwards
 
Why does the IS_RESOURCE case have {} around its body and nothing else does?
 
It's defining a local variable
So a new scope is created by using {}
 
5:47 PM
Ah, right, C does that.
 
If you want to do a quick Discord call can also do
 
Let me fiddle a bit more and see if I can get something vaguely closer to real. (Also, my Discord doesn't do audio calls for reasons I don't understand but mostly blame on Linux.)
 
Okay okay :D
 
Yeah, although you probably should just leave the Array/Object/Null case for the default case, but yeah mostly, I'm just hoping op is a zval, otherwise you need to look around in the VM def file to see how to get one
And to release the string it's zend_string_release_ex(the_zend_string, false)
Also you need to give a name to your zend_string to reference the variable :D
 
5:55 PM
Fixed that already. :-)
What's the difference between zend_string_release() and zend_string_release_ex()?
 
zend_string_release() does some check to see if it is an interned/persistent string, the _ex version you speicify if the string is persistant or not
I think
You can find the whole zend_string API in the Zend/zend_string.h header file
 
I am assuming the file is uncommented so that wouldn't help much...
 
I mean... it is reletively easy to understand, so that one isn't too bad
Worst case you just look at the function names :D
 
@Crell if you have the energy, adding comments to that file as you learn stuff would be useful...
 
@Danack I have gotten the impression that such would be unwelcome.
 
6:01 PM
Not seen anyone say that.....it's the attempts to reformat and mass cleanup stuff that isn't popular.
The only relevant conversation I can remember is someone thinking that everything should be commented with doxygen formatted comments.
 
@cmb I need to build tarballs today, right?
 
cmb
@Derick yes :)
 
6:19 PM
@Crell I read that as an opening to a joke.
 
@StatikStasis I mean, there are ample punchlines available.
 
6:38 PM
Oh good. Compile errors that make zero sense. How nice.
I'm assuming this means one of those various macros expands into something invalid, but I'm unclear how to tell which: gist.github.com/Crell/cb04bc01a5ab0633ca34ad05e872602b
 
Why do you have PUTS() at the end of one of the lines?
 
@Crell That is a linker error, it doesn't know what "PUTS" is. The code is probably valid C code.
 
... Because it somehow got kept when I was deleting lines and it was off the right side of my editor window, so I didn't see it. facepalm
/me needs a wider monitor. 27" is clearly insufficient.
 
27" is decent.
Oh monitor- never mind! Yeah that's good.
 
6:55 PM
:-P
 
Can't help it- the 14 year old sense of humor in me.
 
Oh, hey, I think this worked!
Probably need to add some more tests, in addition to updating the existing ones.
 
7:37 PM
@Crell You do have more than one, yes?
 
no
 
Don't buy a bigger monitor, buy a second one.
The productivity gain is huge.
 
Yea... can't wait until I can have enough space for a third
 
@CharlesSprayberry I recently did that. It's amazing.
 
@Crell 1440p?
 
7:43 PM
2x 1440p 27" is the sweet spot
 
I used to do multi-monitor, years ago. I found one big monitor easier to work with. Plus my laptop doesn't get as confused. :-)
 
I usually work with 1440p 27" + notebook, but currently work with 2x 1080p 24" + notebook, unfortunately, there's not enough space for two windows side by side on 1080p.
 
1440p would be nice, but I'm running 4K displaying as 1080p. I can make things smaller and still be legible.
 
Yes, 1440, Dell monitor.
 
2880p would be awesome, but the prices were a bit nuts…
@MarkR I'm getting old, if I go that route someday they may have to be 32" so things don't get too small.
 
7:52 PM
I use a pair of U2715H and then a pair of U2419H
 
Triple LG 27MU88W (can't spell today…)
Heh, thruple is a slang word, but it means something rather different than I intended.
 
I have three 27" monitors I use. One on left is what I code on so I can see more at a time. I agree with @Trowski much more productive. imgur.com/a/oepIKJi
 
Did I miss some drama:
 
That's odd.
 
@StatikStasis I can turn mine vertical too, was trying to decide if that would be cool or drive me nuts.
 
8:03 PM
@Danack wat
 
@Trowski I personally love it and it has spoiled me from being able to code on a laptop anymore.
 
I wanted to ask for an opinions. What do you think about this code? youtu.be/n2yeK6LwSII?t=1051
 
> core app class
 
@Danack Twitter fail maybe? His profile works for me.
Wait… wrong username
Were you looking for twitter.com/brendt_gd?
 
8:15 PM
What's that magic command to update failing tests to be passing, by using their current output?
 
bless_tests
 
/me blesses @MarkR
 
I didn't even sneeze
 
8:29 PM
OK, if I'm filing a PR to fix a bug, what's the right way to link it all together?
 
@Crell submit a PR on github? aka I don't know what you mean by "link it all together".
 
Yeah, so the bug and PR are properly cross-referenced.
Wait, I think I figured it out. Assuming bugs responds sometime today...
 
The automatic closing of a bug based on a github commit
I haven't gotten it right yet
 
Well, it's linked from bugs to github, now, so there's that. github.com/php/php-src/pull/7312
 
Hm, in the PR description, or the commit message? I would expect the PR description to get confused with the Github IDs.
 
@Crell issues are off for github.com/php/php-src - for now at least.
 
PRs have issue # though.
 
cmb
@Crell that'll be a problem in the future only; until that becomes relevant, bugsnet has hopefully been replaced
 
Right then...
I think I've got it right now, then. I hope.
 
9:29 PM
"We'll burn that bridge when we get to it."
 
fire.gif
 
🔥
The only bridge emoji is "bridge at night" 🌉
 
🂱 🂲 🂳 🂴 🂵 🂶 🂷 🂸 🂹 🂺
Playing cards. Now just imagine you're playing bridge.
 

« first day (3937 days earlier)      last day (994 days later) »