« first day (4021 days earlier)      last day (909 days later) » 
00:00 - 23:0023:00 - 00:00

12:23 AM
@Crell try writing less normal code with more new features mixed in
 
 
3 hours later…
3:43 AM
posted on October 19, 2021

 
 
2 hours later…
5:54 AM
Hello all
need one help from you guys
 
posted on October 19, 2021

 
6:34 AM
moin
 
 
1 hour later…
8:02 AM
the proliferation of masked profile pictures is annoying the fuck out of me, you don't need a mask on to take a selfie, and a profile picture should include your actual face, not medical equipment and one third of your face ...
I can barely recognize faces, I have no chance when it's mostly covered ...
</rant>
 
8:18 AM
<--- has no face
 
I think it's easier to associate a picture with a person than it is a face, associating a mask and some of a face with a person feels like much harder work
and they're tiny pictures, so you don't see the detail of the mask, I can recognize my kids masks irl ... but not when they have about 16 pixels ... just a blur ...
 
 
1 hour later…
9:23 AM
when my phone is plugged into pc (no matter usb mode) and my computer locks, I can't unlock the computer without unlocking my phone ... is this some intentional thing or is something broken ?
ubuntu
 
maybe your pc mounts something from the phone which it waits for when unlocking?
isn't there anything in you logs that indicates the reason the unlock on the pc fails?
 
there might be something in that, even when I select "no file transfer" usb mode, it's still mounted as mtp device ... I dunno where to look at logs because I dunno what's going on
syslog has nothing useful
so I guess this doesn't happen to anyone else then ...
 
I think it's a security feature.
I remember from ages ago something similar.
or rather, "feature".
 
@JoeWatkins doesn't ubuntu use systemd's journal yet? I see audit lines from the kernel when I unlock my pc, but that's with a completely different distro
 
I'm pretty sure it uses systemd's journal
 
9:42 AM
gdm-password followed by
gvfsd[448653]: Error 1: Get Storage information failed
I think it's that
that's followed by org.gnome.Shell.HotplugSniffer service activation (probably in response to unlocking phone), some wm warnings and then "unlocked login keyring"
 
Hello
I'm learning PHP and I read, that it's better to m
use OO programming. Is there a case, when functional programming is better or OOP has always an advantage?
 
9:57 AM
functional, or procedural programming? (I'm asking because sometimes people call programming with just functions instead of OO, "functional programming", which is something distinct from the real name, which is "procedural programming" for that.)
 
10:33 AM
@JoeWatkins yeah that pretty much confirms my suspicion but that doesn't help you
 
10:58 AM
@BálintCséfalvay @Crell has a whole book on FP
 
Morning! :-)
Also, what Derick said.
 
It's afternoon.
 
It's 6 am here, because I'm still jetlagged.
 
Ah, back in IL land?
 
Yep.
 
11:01 AM
@Derick It doesn't matter now. I mean: Is someone using othe paradigm of PHP in practice than OOP?
 
Yes, I do.
 
Btw I'm following George Schlossnagle's Advanced PHP book. It's a bit old (PHP5), but I did not find newer in our library.
 
Not really for anything important. Sure, you'll see hacky jobs for small tasks in pjust procedural... but very few will use FP .
 
Procedural, OOP, and functional are all viable approaches in PHP, depending on what you're doing. Most code these days is procedural-OOP. (That is, procedural style thinking wrapped up in classes.)
 
11:04 AM
I find functional-OOP (Mixing functional-style thinking with OOP constructs) to be most effective, personally.
But I've definitely written straight up procedural code for smaller stuff. It just doesn't scale very well to larger code bases.
I strongly recommend checking out phptherightway.com rather than relying on a PHP 5-era book. That's ancient in Internet years.
 
@Crell Thanks, thats an interesting site, I'll go through it.
 
What you write in PHP 5 code may break in PHP 7 or 8
 
@Tiffany After finishing the Advanced PHP book I'll consider buying this.
 
@BálintCséfalvay that's @Crell's book :)
 
I'd recommend my book once you get a little more experience with PHP. It's not really suited to someone just learning programming, but if you already are somewhat familiar with PHP then it's a good book on how to approach programming in a more thoughtful, structured way.
So yeah, not your first PHP book, but a good second PHP book. :-)
/me has debated writing a First PHP Book book, but not sure if that's really his jam.
 
11:11 AM
Which also has a book. But it encourages OOP.
And I'm not sure if it works on 8. It was written during 7.0-7.1 days, works on 7.2 when I tried years ago.
 
Writing books takes such an awful amount of time.
 
It can, yes. It has to be rewarding for itself, not just the money.
I learned a ton while working on Thinking Functionally.
 
Someone I know is trying to get published. I think he finished the third draft of his book, and is trying to find a publisher.
 
I am very glad I self-published. But then I also have my own marketing channel, sort of.
 
I learned the basics of PHP for Youtube tutorials :)
Now I decided to learn it a bit professional way, but I just realizet, that these tutorials were very superficial
I dont speak English as a native language and in Hungarian there are only few of these books and most of them are 5-10 years old :(
 
11:15 AM
SOLID principles will get you pretty far
 
A very common problem with tutorials. Writing non-superficial tutorials is super hard.
@BálintCséfalvay Can you read Russian? My book is also available in Russian. :-)
 
Yes, I can, but I speak English a lot better than Russian :)
 
Stick to the English version then. :-)
 
I gotta go now, but I'll come back with question soon :)
Thank you for helping me :)
 
cmb
11:36 AM
@Derick, please don't forget to cherry-pick cb2021e5f69da5e2868130a05bb53db0f9f89e4b and 6ab9b3865ac31b41b94c4cd4c6c6655a6ce1d622 (entry needs to go into 7.4.25 section, though) when tagging 7.4.25
 
11:48 AM
I saw that, but that's for later today :-)
 
12:21 PM
Properties, constants, methods. Is there anything else reflectable inside a class, specifically that could have attributes?
 
within an object you could have traits?
 
Reflection/attributes don't distinguish those.
 
@Crell Params
 
Are an aspect of a method, not of the class itself.
 
So... you're asking if theer is anything else in a class other than properties, constants and methods?
 
12:34 PM
Right.
Mainly because it's still barley light out so I don't know if my brain is actually operating correctly. :-)
 
Good morning
@Crell Potentially the class itself if we would have class visibility scope
 
Hm. All the static stuff, yes. I hadn't thought about that. I... don't know if it's different enough for me to care.
 
Private classes can be achieved by a private property inside a class, old JS vibes
 
scream face
 
lol
xD
 
12:43 PM
How is the reflection system 15 years old and yet the reflection docs are still mostly awful?
 
traits you have those covered ?
Don't know what you are working on also
 
@Crell Because no one has documented it :(
And I don't use nor understand it so I'm not touching those
 
@ln-s Reflection doesn't differentiate a trait.
 
Well then, good point to add
 
Its props/methods/constants are the same as a local one.
 
12:46 PM
I can't whateverReflection get traits
 
cmb
@Crell we're looking for a technical writer to do that :p
 
I need to get through enums first, and I'm stalled there on the muilti-part build system for adding files right now. :-/
 
How is that stalling you? It's a one line addition in doc-base which you can just have checkout in doc-base
 
It's been like 3 weeks since I last touched it; I think I was getting lost in WHICH file to add what line to.
 
12:58 PM
@cmb why is that still open?
 
cmb
@salathe I had concerns regarding the performance, and there is the issue where to deploy. I'm fine with merging as is; we can still improve later.
 
You're worried about the ~30 seconds it'll take to run phd?
 
cmb
probably not a real issue :)
 
1:29 PM
@Crell this should do the trick: github.com/php/doc-base/pull/51
 
I think I have that locally; I was last working on the reflection additions, IIRC, and wasn't sure where/how to put those.
Because there's like 5 new pages that enums create.
 
BLEH I openned a new branch on the repo instead of my fork cause I'm on a new laptop
Reflection/book.xml
 
I guess I should switch to that for today, since I'm at a decent pause point in my code work.
 
I'm taking a break from number theory so :')
 
Hang on while I context switch.
 
1:33 PM
No worries
I need to setup up this laptop for coding actually
 
@Girgias ಠ_ಠ
 
@salathe SORRY I'M AN IDIOT I KNOW
 
It's quite annoying that github has no way to prevent this
 
GH Enterprise apparently has a way? stackoverflow.com/a/61816341
But yeah that's not OSS
 
Looks like enterprise has it in the sense that if you host your own git you can do whatever
 
1:39 PM
right
 
The only thing Github offers is the marvelous feature that after the branch has been pushed, it can no longer be deleted :P
Because * branch protection rules apply to everything apart from the first push ... obviously
 
genius
 
bit off topic is it safe to insert the google MEASUREMENT ID into the front end part , in other words is it safe to expose it publicly ?
 
1:55 PM
You do a poor job describing your question with all required info
 
@Girgias OK, if you want to kill your PR I already have that change locally so I can just make a PR out of it myself. I think...
However, I am not sure where/how to add the Reflection classes. That needs to be below reference.reflection.book somewhere...
 
sorry my bad, I want to connect google analytics to my static website, which is done with the google MEASUREMENT ID, is it safe to pass the id directly into the website or do I need to store it in a env variable ?
 
If it's a static site then env vars are irrelevant and you have to bake it into the HTML one way or another.
 
@Crell I mean you need to add the ReflectionEnum page there
And ReflectionEnum should be a folder, you could also look at intl to see how it does it
 
But... class.reflectionclass isn't in there.
That's what I was aping.
 
2:05 PM
> &reference.reflection.reflectionclass;
 
&reference.reflection.book; is the only reference.reflection.* I see in manual.xml.in
 
Well yes
You need to edit reference/refelction/book.xml
As the entity in manual.xlm.in will substitute that book for that entity
The only thing you need to edit in manual.xml.in is to add the enum section for the language folder, everything else is within doc-en already
 
You say "well yes" like all of this is obvious. :-)

I have the build process parsing my reflectionenum.xml file now. However, that has a line in it: &reference.reflection.entities.reflectionenum; Which I copied from the reflectionclass page. It's erroring that the entity is not defined, which I'd expect, but I'm not clear how reflectionclass defines it. The only other place that entity is defined is in entities.reflection.xml, which... appears to be a generated file.
 
It's generated by configure.php
Which is weird that you're not having it
Wait, you're including " &reference.reflection.entities.reflectionenum; " manually? You don't need to do that, it,s only used in a generated file during build
Ah wait maybe you need to
Have you created the reflectionenum folder?
I wonder if that's where the issue is coming from, that there are no file in the folder it's looking for
 
2:23 PM
Um, no, just a file.
It's a single file that gets blasted out into several files on build.
 
That entity generates the table of content for the methods, so if my understanding is correct, it's trying to generate by going in the folder to find the methods, but if you haven't created any pages yet than it doesn't create the entity thus it failing
 
Ahhh... So that will break until I add the pages documenting the methods.
 
I think so
You can just add one and it should be fine
 
Well, commenting it out for now, I now get other parse errors. So... progress?
Which I think are also symptoms of the same thing, likely. So, I guess I have to go add method pages before I can build this thing. Yay.
Hm, no, adding a method page didn't fix that.
 
cmb
maybe submit a draft PR?
 
2:38 PM
Updated github.com/php/doc-en/pull/960 - It's almost certainly PEBCAK.
 
You didn't uncomment the entity inclusion
 
That shouldn't stop it from building, no?
The error comes in configure, I think, and it's a sytax error (reported in manual.xml, of course).
 
No it's the XPointer inclusion which fails:
XPointer evaluation failed: #xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.reflectionenum')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])

ERROR (/home/runner/work/doc-en/doc-en/doc-base/manual.xml:49:0)
<book xml:id="getting-started">
^
XPointer evaluation failed: #xmlns(db=http://docbook.org/ns/docbook)
xpointer(id('class.reflectionenum')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])
Which is what is in your reflectionenum page as it's trying to find methods
 
Hrm. Well, I get that even if I uncomment that line.
 
Add a method which is not the constructor
As the constructor is special, that's why it has a fallback
 
2:46 PM
facepalm.
 
or comment the XPointer inclusion for methodsynopsis
 
Should I omit the constructor then?
 
Well, no if it has a constructor you need to document it
I mean, I never bumped into these issues as I just do everything in one go and then configure lol
 
I... don't think it overrides the constructor from the parent. (ReflectionEnum extends ReflectionClass)
 
Then you can drop it, that's why this XPointer inclusion has a fallback :)
 
cmb
2:53 PM
I use doc-gen for new stuff :)
 
doc-gen?
 
` Element section content does not follow the DTD, expecting ` - And then a huge list of possible tags. It doesn't say which element, and there is no <section>. Nice.
@Girgias You're telling me no one told me about those??? RAWR!!!
But of course that's giving me an error, too.
 
You need to run it with PHP 5.3 or later.
 
That is clearly my problem...
 
3:06 PM
@Crell I mean it is in the tutorial doc.php.net/tutorial/editing.php :p
 
3:19 PM
@kelunik Which modes did you have enabled for bugs.xdebug.org/view.php?id=2036 ?
 
cmb
@Crell doc-gen uses reflection, so you need PHP 8.1 for enums
 
3:54 PM
Ooo, so I can get the base docs for Fiber autogenerated? Nice.
I need to find some time to do that yet…
 
@Trowski it'll probably come up with something quite crappy, it's only a starting place ...
the way it sorts methods by default is strange, and I never found a good auto generated class synopsis ...
 
Of course, but it saves me from having to write a lot of boilerplate.
 
parallel doc source might be useful to look at
 
cmb
methods are sorted alphabetically
 
(the way it sorts methods in a reasonable way for humans I mean)
 
3:59 PM
Well I just manually fixed the syntax issue and it's building now, so let's see what I can do with that. I may try doc-gen for the other bits afterward. I need to get the path figured out for it, though...
 
@cmb that is rarely useful for humans, I get there's no way to do that automatically
 
What dir does docgen get run from? en, doc-base...?
Oh, I see, it kinda doesn't matter because it doesn't put it in place.
 
it can put it in place, there is an option
 
Woah, lots of deprecations in phd on 8.1.
 
You've 5 weeks to fix them :-)
 
4:13 PM
Whee!
 
4:26 PM
So once I've built my new docs, what's the best way to view my changes?
 
built-in web server?
 
with a local copy of phpweb
my reference for getting that setup is this
 
cmb
4:44 PM
@JoeWatkins yeah, right! But doc-gen provides a reasonable start. :)
@Trowski you can also render xhtml-chunked and view the local files
Can anybody else repro that bug45161.phpt is super slow as of curl 7.77.0?
 
5:44 PM
@cmb @JoeWatkins Thanks, I've got it working locally.
29.2 GB for web-php, did we start bundling instructional videos?!
Ah, the distributions are bundled there.
 
No, only as GIT submodule. You don't need it.
 
Ok, recloned without that, much better, thank you.
 
cmb
6:01 PM
Storing distribution tarballs in a Git repo is like programming PHP in Word.
 
It wasn't my idea :-D
 
My doc-base, phd, and en dirs together are a little under 700 MB. That's with a compiled build, too.
 
@Trowski Not sure how you got to 29.2 GB though... I"m at:
derick@gargleblaster:~/dev/php$ du --max-depth=0 -h
5.8G	.
And that includes a lot more than php-web and php-web-distributions
ah - symlinks :-)
~/dev/php$ du --max-depth=0 -Lh
du: cannot access './xdebug-cloud-web/src/templates/static/xdebug-cloud.css'
du: cannot access './amphp-amp/docs/asset'
61G	.
 ⯈ master
That's... better
 
@Crell Now everything together is 566MB, that's more reasonable.
 
That's more like it.
 
6:07 PM
Someone creates "collections"

"I never needed Countable I just use ->total"
kjjjjjjjjjjjjjjjjj
 
@Derick yeah, that's only available with the submodule cloned
 
@kelunik Uh what?
 
@Derick The ./amphp-amp/docs/asset symlink target
 
6:27 PM
@PeeHaa Such a smooth transition in this song. youtube.com/watch?v=houVMRLS-wM&t=51m45s
 
Can you start a thread in the module init code?
 
You can... but when are you going to stop/join it?
 
There's module deinit, isn't there?
 
Yes, but you can't guaranteed that one MINIT meets one MSHUTDOWN. PHP-FPM for example, messes this up.
 
hmm what do you mean?
Isn't it one minit/mshutdown per worker?
 
6:37 PM
No.... sigh.
It should be. Can't explain right now, as I am going to have DINNER!
 
@FlorianMargaine No, the fork happens after MINIT, so only one MINIT happens and then it forks, and they all do mshutdown.
Depending on what you want it for, you can possibly do it in GINIT and GSHUTDOWN, or perhaps use pthread_once in RINIT then clean up in MSHUTDOWN.
 
Oh I see.
Thanks
@Derick enjoy!
 
7:14 PM
It was tasty!
nom nom
 
7:33 PM
Merg. NOW why are you erroring, you stupid script.
It's giving me the same xpointer error as before, but this time there are ample methods in that directory.
 
7:52 PM
It's so helpful when the error appears on a line in a file I didn't even touch.
 
The thing is errors overflow, you need to go back to the top
it is annoying tho
 
That is the first error.
Do the <!-- }}} --> comments et al actually mean/do anything?
The first error is from the componare book.xml file, and claims that "include is not declared in para list of possible children." But I've not touched that file or anything even remotely close to it. It also appears that it would be parsed before anything I've touched, so it shouldn't even be a leftover from something before it.
 
8:19 PM
@Crell It's folding marks for vim IIRC, same as the comments at the bottom of the file
 
@Girgias Do people still use vim for the docs? :-P
 
@Crell I know, but weird errors happen all the time in unrelated things because of how the thing is build, I can't help you here as I don't know why, other than just ignore it
@Crell Honestly now that we can revcheck skip I really want to propose getting rid of these comments at the end of each file
 
I can't exactly ignore the build failing.
@Girgias Endorse.
 
@Crell I mean ignore the unrelated stuff lol
 
Which is the unrelated? I'm trying to figure out what it's syntax erroring on, and I can't get any useful info on what it's unhappy about other than "having reflectionenum.xml in the tree" at all.
I remove that, it builds.
Happens with both 8.1 and 8.0, so it's not that.
Oddly it errors even if I comment out the xinclude statements from reflectionenum.xml.
 
8:25 PM
Post the log on a gist?
or push onto the branch
 
Latest code here: https://github.com/php/doc-en/pull/960

Gist of the output of running configure.php here: https://gist.github.com/Crell/d838f7a5bd10691fe02d5d1d6157332f
 
Ok, I have a problem
I saw a really good tutorial (video) about Docker and I've learned all the required concepts (Dockerfile, Docker-compose, Docker-engline) and I know about Docker and all dependencies now (theoretically)
Noted that, the training video I saw, also was included a practical example and I know even details (port forwarding, logs, command shortcuts etc)
My problem is, I don't know how should I start making a project dockerized
What's the first step? Making a docker file? ok, how to handle it with git? (since docker has its own version control), then I don't need Xampp anymore for the localhost? (since I have to install Linux, PHP, MySQL etc on the docker image)
Anyway, if you want to tell me 5 steps (high-level) about making a project dockerized, what are those?
 
Depends on the project, what type of project, and if it's supposed to also be used in production or just local dev.
 
You'd create a docker entry point file which is a shell script that pulls the repository if the repository doesn't exists
within the entry point script you can do whatever you want
mount server configurations as volumes on each container, good advice
use ENV variables
Never commit .env
 
8:41 PM
UGH. If I use docgen to rebuild the class file from scratch, it does build. So... WTF??
 
@Crell Added a comment to your gist
 
@Crell It's what @cmb commented
 
@salathe The only difference I see is the removal of the id?
 
Look harder
 
Oh wait locally maybe you're fine as you've got the doc-base changes
 
8:43 PM
Oh, section vs refsect.
 
It was a) in the wrong place (moved to inside the partintro), b) used an element that isn't allowed there (changed to section).
And I added the id for pretty permalinking
 
So how in the world did that show up as an xinclude error in componare?
 
@salathe dumb question but PhD does render the title of a section if you reflink it from another document without any content in the tag? (I'm pretty sure I saw something like that in the docs somewhere)
 
@Crell ¯\\_(ツ)_/¯ (sorry, ping)
I give up, FU markdown. :-P
@Girgias Yes something like that
 
LOL
 
8:50 PM
> Return type of phpdotnet\phd\ObjectStorage::attach($obj, $inf = []) should either be compatible with SplObjectStorage::attach(object $object, mixed $info = null): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Urgh :(
 
Thank god we used an attribute syntax that is a comment in older PHP versions... :-)
 
I still think that applying LSP to void return types makes no sense
 
And how would it make sense not doing it?
like I'm generally curious as to your explanation
 
Ha and of course that child class wants to return a value. Yay.
 
I may be stating the obvious, but my head's in the sand of details... I can't output the value of an array from inside a heredoc? (e.g. 3v4l.org/INZrJ)
@salathe ¯\\_(ツ)\_/¯
 
9:02 PM
:-P
@Tiffany use {$foo["bar"]} syntax
 
I thought there was discussion of possibly deprecating that syntax? or maybe heredoc is an exception to that...
 
It's another syntax that's being talked about getting deprecated
${thing}
 
ahhh
cheers
 
it is confusing
 
Ilija was talking about possibly cleaning that up, but he's fallen off for now, sadly.
 
9:05 PM
yeah :( I hope he feels better, not just so he can contribute again, but he's a cool person, and I wish cool people the best of health
I have too much prior experience with bad health conditions in my family, so I'm biased into thinking health problem = drastic
 
Amen.
What's the PHP version requirement for phd?
 
7.2 I think?
maybe 7.4
it should work on 8.0 though
 
OK, so void is available either way. Good.
Oh, this is going to be exciting.
PhD extends SplObjectStorage and overrides attach(), and returns a value. But as of 8.1, it's officially typed as void. :-)
 
PhD and doc-base need sprucing up
web-php probably too
they're so legacy
 
> sprucing up
what was your specialist subject again? ah yes, chronic understatement
 
9:16 PM
github.com/php/phd/pull/57 - A little spruce.
 
this would mean PhD requires 8.0... which I'm not opposed... but... it might be a little early for that... or is this backwards compatible, because #[ is just a comment in <8.0?
I would think it would support BC
 
BC because # is a comment.
28 mins ago, by Crell
Thank god we used an attribute syntax that is a comment in older PHP versions... :-)
 
:P
tests pass
 
@NikiC when reviewing #7594, you might want to look extra at the HTML in the test case, specifically near the top which I think should be stripped out (and potentially other cases that exists)
 
lol, nice catch
 
9:28 PM
wtf.
 
@Tiffany tabs vs spaces
@Tiffany See, there was wisdom in using something that was a no-op in earlier PHP versions ^_^
 
@Kalle lol
 
@Kalle ........is that what I think it is?
 
9:38 PM
@NikiC if you're touching that file, maybe delete some letters such as rh in there also.
 
I almost thought it was a dox, but that makes more sense
 
I did a project wide grep for the first name in php-src@master, and luckily no results
 
Does it even make sense to document the constructors of ReflectionEnumUnitCase and ReflectionEnumBackedCase? I... don't know how you'd even use them.
 
they are implementation details, by my limited understanding (i.e. no)
 
That's where I'm leaning. They're inherited from the parent classes but you wouldn't use them.
 
10:03 PM
This should be reviewable now: github.com/php/doc-en/pull/960
 
00:00 - 23:0023:00 - 00:00

« first day (4021 days earlier)      last day (909 days later) »