« first day (4274 days earlier)      last day (657 days later) » 

12:53 AM
Can I rely on the inet_pton() function?.... inet_pton('172.27.1.04') returns false...I am not sure If I should use it
the peoblem here is that IPv4 addresses that have a leading 0 in the last part are returned false from this function
...in the last octet I mean
 
1:11 AM
unless OFC there are no IP addresses with leading zeros...
which is sth that comes to my awareness for the first time
 
 
8 hours later…
9:08 AM
leading zeros shouldn't be there, unless you want them to be an octal number, but inet_pton does not support these
 
9:42 AM
Mornings / evenings
 
 
5 hours later…
3:06 PM
Someone refresh my memory: On docs, if I want to put a see-also list into a sect1, what's the right wrapping element for that? In a refentry it's refsect1, but I don't think that's correct in a sect1, is it?
(I want to link from swtich to match.)
 
cmb
@Crell You can try a <sect2> which is valid, but I'm not sure whether that would be properly supported by PhD.
 
Oh good.
Well, pushed, let's see what happens.
Ugh, why is it not triggering CI now?
 
3:23 PM
Because GH hates you
 
Well yes, but it hates everybody.
 
cmb
that
 
Second push, still not triggering. WTF, GitHub?
 
cmb
@Crell It almost certainly would pass CI, but the render should be checked manually.
I guess there is some kind of GH outage.
 
/me tries to remember how to do a local build... :-)
 
3:26 PM
GitHub's status page actually works with not too much delay.
 
I was right. GitHub hates everybody.
 
cmb
There is an outage; I'm waiting on CI for 2 minutes now. Anyhow, I'm just doing the rendering of PR#1658, and will post a screen shot.
 
Looks perfect for me when I render locally.
 
o/
 
3:59 PM
@Crell Let's put that machine in production then ;-)
 
That wouldn't be the dumbest idea, at least we would know who has access to it and what it's state is :p
 
4:37 PM
@Girgias 😂
 
@Tiffany kiss emoji
 
@Tiffany I'm literally trying to do that and it doesn't work for me rofl
 
@Girgias which part?
Happy to help until I have to turn off cell data lol
 
Ignoring all the deprecation errors, it renders something but
[16:36:39 - Indexing ] Indexing done
[16:36:39 - E_USER_ERROR ] /home/girgias/Dev/php-docs/phd/phpdotnet/phd/Format/Factory.php:52
This format is not supported by this package
php ../phd/render.php --docbook ../base/.manual.xml --package PHP --format xhtm
But the rendering is kinda useless
 
What if you try xhtml?
 
4:42 PM
Where? In package?
 
--format xhtm should be --format xhtml
 
Oh... that's a typo
I still get empty pages
[16:43:26 - E_DEPRECATED ] /home/girgias/Dev/php-docs/phd/phpdotnet/phd/Package/PHP/Web.php:43
fwrite(): Passing null to parameter #2 ($data) of type string is deprecated
[16:43:26 - E_DEPRECATED ] /home/girgias/Dev/php-docs/phd/phpdotnet/phd/Package/PHP/Web.php:43
fwrite(): Passing null to parameter #2 ($data) of type string is deprecated
Something is not getting passed
Let me pull the latest version of PhD
 
Yeah, pulling latest should help. I had an issue when I did my talk, I cloned from main, not my fork, and it worked
I ought to start reading through the tooling and understanding how it works
Apologies, time to drop cell data, on a plane about to leave
 
And GitHub is dead
Oh no
lol
It's still trying to pull git.php.net rofl
 
cmb
@Girgias I can imagine that the scripts are not playing well with latest PHP versions.
 
4:49 PM
My first possible contribution to php/web-php in 5 years, lol: Use accent color for hero buttons :hover and :focus
 
They're running for me, albeit with a warning and a deprecation on the same line in the web builder.
 
Yeah I think my build was just way way way too old
 
I have a Makefile with a mini Dockerfile to control all the updates.
 
cmb
5:19 PM
@Dharman There are files with user notes in the docroot of php.net which can be downloaded? That wouldn't appear to be intentional (hopefully).
 
I think we had that so that mirrors could fetch them
 
The only key to puzzle I am missing is how these files get generated
Is it a CRON job?
 
cmb
5:36 PM
@Dharman I think with github.com/php/web-master/blob/main/scripts/update-user-notes; might be triggered by a cron job.
 
Does anyone know the frequency?
 
I think it's like 12 hours, or something along those lines. Not very frequent.
 
cmb
If these files are no longer needed, we shouldn't have (create) them.
 
They are needed for user notes
 
cmb
Arent't the notes read from a database?
 
5:41 PM
Here's the maze: You open php.net, you click "add note" and it's submitted to main.php.net. The note is stored in the DB. The CRON job dumps database table into separate files for each page and stores them back on php.net.
This is why when I was editing a note, it wasn't updating the page
the manual pages are actually baked with the notes and cached in the browser
 
@cmb Where would the changelogs be that the phd code is processing? I think you're right, but I'm not sure where the source data is. The problematic item is "bundledexternal", "ref.oci8", "PECL OCI8 3.2" (That's the 3 existing keys.)
 
cmb
@Crell Peter already left a comment on the PR hinting at that changelog entry. I'm going to remove it.
 
Ah ha! I didn't see his comment. I'll just leave it all to you then?
 
#teamwork
 
cmb
+1
 
5:47 PM
\o/
 
@ramsey Making progress with cppunit?
 
@Dharman On the rsync box, a cronjob every 10 minutes (except during the hour of 11pm) runs update-everything which calls update-phpweb-backend which ...
... calls update-user-notes which fetches the user notes from main.php.net/fetch/user-notes.php which reads the notes from the database.
 
If it's 10 mins then I can change the logic in php-web to check for recent notes and update the browser cache
thanks
FYI I can't figure out the token for main.php.net/fetch/user-notes.php
 
That's only updating the notes on the rsync box. Then the web box fetches from there every 10(?) minutes for the website.
@Dharman Good, it's a secret.
 
From a 14 year old comment: "A good use of str_split is reverse translating an amino acid sequence. "
 
5:51 PM
It's only MD5, so it's not top secret
 
I'm tempted to keep that one just for comedy factor, even if it's negative voted.
 
cmb
Gosh, I read "from the comment of a 14 year old" :p
 
Hard to tell the difference at times.
 
6:22 PM
Why, why is the str_split page filled with people reimplementing str_split?
Like, seriously, why?
@cmb There's like a dozen unicode reimplementations, despite the docs linking to mb_str_split() instead. Should we bother keeping any of them at all?
 
@Crell interesting article about error handling in Midori, didn't read it full cause it's quite long, but the different solutions are nicely explained
 
@brzuchal It took me 2 sittings to get through it the first time, but it's really good.
I feel like I want to do a follow up that combines that with my null article.
 
PHP has return only one value model and I have to say that I was thinking about returning multiple values similar to Go a year ago, and AFAIR PHP syntax could handle it. Another thing is checking these errors so the ignore flag was nice thing in the description.
 
What Midori ended up with is very close to what Rust does, just with different syntax.
I've been pondering what it would be like for a language to have an arbitrary number of return channels, and realized that it's basically still isomorphic to an n-sized Either.
 
The pre and post conditions are also amazing as I agree that most of exception checks could simply be solved by describing pre and post condition rules. Static analysis can tell you right away you cannot expect misuse
 
6:30 PM
Yeah, a syntax for something that just compiles into assertion commands at runtime but is then statically analyzeable would be... really cool, and probably a pretty good ROI. At least it doesn't sound like the implementation would be all that painful, compared to some of what we've done to ourselves recently. :-)
 
Hmmmm, yes opening multi-value returns may open a can of worms if people start using them as a form of type hinted tuple instead, then there could be dragons.
 
Yes. I have only needed multi-value returns for non-error cases once (it was for recursion), and honestly for that edge case a documented array was sufficient. Though it did warm me up to tuple types. Go-style multi-returns are probably unwise, but multi-channel returns have potential use.
What's the right way to document "returns false on PHP < 8, but throws on PHP 8"? I'm sure we have that pattern somewhere now...
 
cmb
@Crell I suggest to remove them all; besides not being particularly useful, they may not properly work (I think that even mb_str_split() doesn't deal properly with combined characters).
 
@Crell glad you liked it :p
 
cmb
@Crell If it throws TypeError as of PHP 8.0.0, the right way is not to document it all (there's a note on internal functions about that being undefined behavior).
 
6:40 PM
@Crell If it's a ValueError I can try to find some examples
 
php.net/manual/en/function.str-split.php - The return values section says false right now. As of 8, it's a ValueError. That needs to change to whatever we're doing now for those.
 
cmb
@Crell For ValueError, a paragraph in the error/exception section makes sense; and then a changelog entry, that "previously, the function returned false instead".
 
Have a page I can ape?
 
cmb
Although @Girgias is working on all ValueErrors, and certainly will finish that by the end of the day. :p
 
I can also just ignore that section for the moment if he's already working on it. :-)
 
6:44 PM
@cmb Ah yes, I've been stuck in a time loop repeating the same day over, and over, and over, and over, and over, and over, and over, and over, and over again
 
cmb
Nope, was just kidding; would be way too much for a single person (>1000 occurrences).
@Crell Not the best example, but php.net/manual/en/function.win32-continue-service.php looks okayish.
 
Sarcasm doesn't work in text! :-P
@cmb I can work with that.
 
Like there is: github.com/php/doc-en/pull/163 which kinda parsed php-src to dump stuff
But eeeehhhhhhhh
 
cmb
I can hear the bassoon
 
sad_trombone.gif
 
6:46 PM
array_chunk also has a section for the ValueError
 
Oh, that looks better as it's closer in behavior.
 
JRL
7:03 PM
i have to admit, ive never really understood the point of the short closure/auto-capture syntax as it seems to be a function without scope, which always seemed... dangerous to me. but i think i finally understand reading through the latest thread @Crell
 
Hooray, zoidberg is useful!
short lambdas do have their own scope, there's just very little that can happen in them.
 
JRL
it's very useful for repeated sections of code within a scope that are tied to that scope directly, supporting code resuse without forcing additional scoping overhead for the programmer to juggle in their brain
which i have run into before, but just sort of... dealt with the code duplication since it's usually only 2-3 uses
 
I like to think of it as a way to save and pass an expression around.
(Read my book for more. :-P )
Can anyone on Windows confirm if this is still an issue? php.net/manual/en/function.mkdir.php#71880
 
cmb
@Crell works for me with 7.0.33 and master (and I've never noticed that there would be an issue); please delete the note
 
@cmb Done.
 
cmb
7:13 PM
ta
 
@Crell Typos in the Short Closures 2.0 RFC: "The value of these variables are the ones that was bound to them at function declaration." I assume value should be values and was should be were. But this whole paragraph seems unnecessary since it's just restating the paragraph above it with slightly different wording.
Typo 2: "the same set of variables an Anonymous Functions" - an should be as.
Typo 3: "looking at which variables was automatically captured" - was should be were.
Typos 4 and 5: "as they not have an effect on the behavior of the program, apart from the marginal cases listed bellow." - not should be do not and bellow should be below.
 
Fixed all, thanks! Any others? :-)
 
Yes... :D
"is is captured" should be "it is captured".
 
@cmb How would we run PHPT tests?
 
"Whether a variables is captured" should be "Whether a variable is captured".
"the lack or type hints" should be "the lack of type hints".
 
cmb
7:29 PM
@Dharman We could dynamically fetch github.com/php/php-src/blob/master/run-tests.php (probably a specific commit instead of master), and use it. We could also add a copy to the repo (and update from time to time).
 
@Crell "and keeps implicit closure by-value" should be "and kept implicit closure by-value" (for consistent tense).
That's all I found so far. I'll let you know if I find any more after reading through it again.
 
Thanks, all fixed so far.
 
I think that requires more time than I have at the moment. I'll try to find some time in the coming days, but if anyone wants to help get it started, please help me.
 
@Crell "The values of these variables are the ones that was bound" isn't completely fixed. was should be were.
"it is assumed that is is read" should be "it is assumed that it is read"
"The syntax choice here are consistent with" should be "The syntax choice here is consistent with"
"The later can be quite verbose" should be "The latter can be quite verbose"
"the following code snipet" should be "the following code snippet"
 
How do I get write access to php/web-php btw? I mean, I'm the #4 contributor of all time according to GitHub...
 
7:51 PM
@TheodoreBrown All caught up. :-)
 
8:09 PM
@Crell I made a few more fixes to typos and wording myself: wiki.php.net/rfc/…. Feel free to correct if anything looks amiss.
 
@TheodoreBrown I would probably have left the wording in the 4th one alone, but either works. Thanks again!
 
No problem. Good luck with the RFC!
 
8:42 PM
I apologize to the rest of the docs team for all the comment deletion spam today. It is for a good cause...
 
 
1 hour later…
cmb
9:52 PM
@LeviMorrison You should have access now (also to some other web repos) :)
@Dharman No worries. Maybe some other (Web) devs want to help with bringing web-php under test. :)
 
10:10 PM
@cmb Thanks!
 
 
1 hour later…
11:30 PM
Uh... any idea where this markdown stuff for php.net is actually used?
 

« first day (4274 days earlier)      last day (657 days later) »