« first day (3847 days earlier)      last day (1091 days later) » 
00:00 - 20:0020:00 - 00:00

8:02 PM
Guys what about of my project
It's only for fun and try
new things
 
@Crell what do you think about adding entry points to PHP?
 
@SaifEddinGmati yes, phar:// is always local. that much that it inherits non-existing phar files.
 
@SaifEddinGmati Entry points?
 
entrypoints are only executed if they are defined in the script file that is currently being executed `script.php` when running `php script.php` or `foo.php` when visiting `http://localhost/foo.php`.

if `script.php` requires `bar.php` which also includes an entrypoint, it won't be executed.

```
#[Entrypoint\Http()]
function handle(string $method, string $uri, array $query, array $request, array $files, array $attributes): void
{

}

#[Entrypoint\Cli()]
function console(array $arguments): void
function console will only run if executing from cli ( cli, phpdbg, and embed sapis ), http will be executed otherwise.
 
Functions don't get executed if they're not called anyway, so I apparently don't understand what you're saying.
So basically flagging functions as main()?
 
8:09 PM
yes
 
Eh, seems edge casey. You shouldn't be using the same script file for web and CLI anyway.
 
ಠ_ಠ
 
I think Dan disapproves.
 
to stop leaking stuff in the global scope
 
so now the trick question: given a string, how to check it's a stream-wrapper compatible "pathname" without opening it?
 
8:12 PM
@SaifEddinGmati how you got that nice cat
 
@hakre answer: don't use stream wrappers
 
alias cat=???
 
@SaifEddinGmati what?
 
so alias cat=bat
 
8:13 PM
yep
 
How the heck did Tony Marston get back on the mailing list? Or did he?
 
I had enough of bats for the past year and a half tho
I'll pass
xD
 
@Crell who is he?
 
I only know tony braxton
she used to sing well
 
Hard core troll who feels that PHP peaked in v 3.0, and everything since has been a mistake and anyone proposing anything new is an idiot.
Despite having about a 4th grade understanding of programming concepts.
 
8:15 PM
@Crell maybe emailed you directly?
 
No, he's emailing Guilliam Xavier, who is forwarding his stuff back to the list. :-)
 
perhaps it's a bait attempt!!
Well then talk to Guilliam
right? if the head falls
 
I don't know how Tony is able to reply to messages to the list if he's not on it. :-)
 
I'll reply.
 
I was going to, but I wanted to verify how Tony even got back in first.
 
8:17 PM
Mail just gets delivered ? I don't know what kind of mailing are you talking about but yeah if you send an email even if it's unwanted it'll be there, unless I'm missing something
 
The most recent messages on the Sealed thread.
Also, apparently dwgebler thinks I am a "significant voice". I find this disturbing.
 
maybe he is subscribed using an alias to his original email, and replies using his email directly to that person without CCing internals?
 
Don't know the bg story :D
 
Maybe?
 
well, even if he CCs internals, and he is banned there, the email will still reach the intended recipient
 
8:21 PM
Why don't you guys just make a private forum ^ ^
 
i suggested something like cloud.void.tn
 
@ln-s He's got to be around 74 years old .... tonymarston.net/aboutme/cv.html Also, has opinions: tonymarston.net/php-mysql/infrastructure.html
 
It's one of those anti OO guys
yeah I know the stereotype
 
these damn kids and their classes
 
8:22 PM
@ln-s to be fair, OO is shit.
@SaifEddinGmati where did you get a picture of me?
 
To me it's THE shit but ok
How to detect a geezer, he uses the word: Nincompoop
 
@Danack old-people-yelling-at-clouds.com
 
How old are you @Danack
Just for research ...
@SaifEddinGmati You think he be yelling at them clouds ?
"HOORAY FOR BREXIT! Well done Boris!"

There you go
That just gave it away
 
there's two groups of ages, those older than PHP itself, and those that are younger.
 
@ln-s probably old enough to date your mother.
 
8:25 PM
@FélixGagnon-Grenier Classic Canadian! =P
 
I'm older
My mother is dead @Danack
but ok
At least now I know there's wifi in the afterlife
 
Fine... your father.
 
hahahaha
 
I'm probably the youngest here ... and yes, i'm younger than PHP 3 ...
 
8:28 PM
age ?
now he says 58
 
Age: One foot inside my grave
21 + 30
I kid I kid
 
almost 22 actually
 
Old man's advice, the road to 30 happens really fast
 
has anyone written a PHP 1 implementation in PHP yet?
 
8:30 PM
that's so meta
Not even leonardo di caprio in inception could achieve such metaness
 
How to Build a Proposal Culture on Your Team probably useful for people here, and definitely not just a bookmark for myself.
@SaifEddinGmati why bother with 1 github.com/ircmaxell/PHPPHP ?
 
Good luck finding Apache 1 and Linux 2 kernels...
 
not planning on compiling it, planning to rewrite it in PHP :p
 
I guess everyone needs a hobby.
 
8:35 PM
i have no idea how PHP 1 worked, did it even support CLI? or just web pages?
 
C programs ran through CGI
I think there's something at museum.php.net
a piece of sample code
 
PHP 1's syntax was radically different. As was its runtime model. As was, um, everything.
PHP didn't really become what we understand as PHP until Andi and Zeev rewrote the whole thing as a grad school product to actually have, you know, an engine. They shared it with Rasmus, who promptly responded "seems you two actually know WTF you're talking about, so your code is now PHP 3's engine, I've deleted all of my crap. kthxbye."
(That's not the actual quote, but it's surprisingly close.)
 
AHAHAHA
I can imagine rasmus saying kthxbye
 
Andi and Zeev said "whelp, that's a thing, I guess we're supposed to start a company now," and went and founded Zend. (ZEev and aNDi) And the rest, as they say, is history.
 
Thats a fact that I didn't know
What's the israel plot
zeev and andi are from israel ?
 
8:41 PM
Yes, they were at the University of Tel Aviv (I think?) at the time.
 
Ahhhhhhhhhhhh
everything goes full circle in my head now
pamaayim nekudotayim bro
 
That.
 
only hebrew you need to know
xD
Ken and Lo
but everyone wonders where is Ryu
 
Wes
@DaveRandom we shall find out
@Danack haha!
that hill is apparently much steeper than it looks in most videos. it's basically vertical
 
@Danack Thank you for this link. I've been working remotely for the past 5~ years and I want to figure out more way to get feedback earlier in the design and implementation process. A lot of the time what winds up happening is you get something to review after it has been implemented and it winds up being harder to make changes.
 
cool effect
 
You could make some really good pictures with that, really cool
 
That is clever
 
Must insane mantis camo I've ever seen imgur.com/gallery/gQtHSmt just wanted to share it
It even mimic'ed decay on the leaf
 
9:08 PM
@ln-s cool effect, but I wonder how many flat earthers are going to use this as more fuel for their futile crusade
"this is why we can't have nice things"
 
hahaha
 
Nek
Hello people, is there a way to transform zend_string* to char* easily?
Or to print it directly.
 
@Wes yeah...hills don't really show well on single photos or video. you need to rotate around to see the angle - google earth shows it quite well: earth.google.com/web/search/…
@Nek ZSTR_VAL ?
 
Wes
looks extra scary lol
once you start rolling there's no way you can stop. people do crazy things
 
9:25 PM
about the same height as a 15 story building...
 
the wierdest thing about that photo is that in the winter that is not a ski piste
also lol I cannot believe I dipped in 2+ days later and this is still the current topic of convo :-P
I kinda wanna ask Phil about it now because it seems so much like the sort of thing he would go "yeh sure I'll do that"
 
Nek
Thank you very much @dan
Danack
 
> Username auto complete is tab, not enter
fyi :-P
 
Nek
(sorry for stupid question, I have to tell you it's only the beggining of that xD, also sorry for being stupid with the chat xD)
 
@Nek a) there are no stupid questions b) even though (a) isn't really true, you have not asked one
apology not necessary, please feel free to come back and ask more stupid (or not) questions :-)
 
Nek
9:31 PM
Ok I go with the next one then. Can I suggest a PR with a linter for the whole codebase ?
 
you can suggest it, I doubt it will work out well tho. A toolchain change like that takes a lot of persuading, but more importantly php-src is hard to lint without running it through the pre-processor, which isn't really practical on the fly (afaik)
I may be wrong and would be happy to be proved so, though
 
Nek
I actually am trying to get involved. Currently trying to do stupid (or idk, maybe interesting) stuff. Tweet related: twitter.com/Nekdev/status/1385350870351613961
> A toolchain change like that takes a lot of persuading

It's precisely why I'm asking first x) .
God, I don't get how this chat works.
 
yeh chat markdown is broken af
a "quote" occupies the whole message
> you can do this
 
"works"
 
> you can't

have part quote, part regular test in one message
 
9:35 PM
@Danack unexpected behavior declared feature
 
pretty much any multiline message breaks formatting....
 
Nek
> "works"
"Acts independently to our willing" ?
 
Nek
Any way to get the current namespace ?
 
@Nek how would this even work in a macro heavy codebase like php-src?
 
9:38 PM
> php-src is hard to lint without running it through the pre-processor, which isn't really practical on the fly (afaik)
^^^
@Nek in what context sorry?
 
@DaveRandom read that, but wanted to ask it as a question as opposed to your affirmative statement
 
I just got vaccinated today, and am feeling rough...but "Do you have an idea of better syntax?" - yeah, I think package info should be separate from source code. random words on the subject
 
@bwoebi sorry yeh that was meant as re-iterative to @Nek rather than aimed at you :-P
 
Nek
@bwoebi I believe that a huge project as PHP deserve a seriously customized linter. But seriously, I'm reading the code for a while.. The biggest problem to me is variable names. The second one is wrong indentation. I often indent just to be able to read.
 
@DaveRandom i suppose the context is his tweet: twitter.com/Nekdev/status/1385350870351613961
 
9:40 PM
oh well then __NAMESPACE__
 
i bet it's about how to do it in C rather than PHP :p
 
Nek
I'm writting the function is_internal_compatible_scope. I'm pretty sure NAMESPACE is not available lol.
 
@Nek well, codeformatting is another topic - I agree that it should definitely be properly tab-indented everywhere rather than mixed
 
in C you get the current scope and fetch ce (class entry)
 
@Nek you should probably read previous discussions in the past two days about namespaces, and packages
 
Nek
9:42 PM
@bwoebi it's not just tab vs spaces. It's some times conditions are really not readable just because they are huge and there is no logical separation except "need to break on this line otherwise it's too long".
 
@Nek about variable names, I do not think we suck that much at naming our vars, but probably … you sometimes need to have a bit knowledge beforehand to make sense of the abbreviations?
 
Nek
@SaifEddinGmati outch. Any link?
 
@bwoebi and the macros could really do with comments describing what they do....
 
in the general case when lexing C source, how do you know any given symbol is not a macro?
 
9:46 PM
@Danack well, the problematic macros by themselves are just a couple lines of code usually … but you really have a hard time wrapping your head around what the fuck this separating code exactly does even though you see "if rc > 1, then copy and decref else do nothing"
 
@Danack #define COULD_REALLY_DO_WITH_COMMENTS(x,y) COULD_REALLY_DO_WITH_COMMENTS_EX((x),(y),"z")
 
@DaveRandom code conventions (like macro uppercase)
otherwise, you don't
 
Nek
Somebody told me today "you're a newbie, do newbie stuff for other newbies". I think he's right. That's why I'm suggesting that. And I'm also opening right now a document that I hope I will complete with "getting started with php src" stuff before to suggest to you.
 
so ftr, meta-tooling like static analysis is not "newbie stuff" :-P (tho I remember why it might feel like it is)
I don't want to discourage you from persuing this, ftr, but fair warning: it's more complicated than it seems :-)
 
anyone either know the setting, or what to google for, so that when I try to tab-complete in a shell on linux, if there are multiple options it shows them first time, rather than me having to hit tab multiple times?
 
9:52 PM
you can probably find a zsh plugin for that
 
Nek
I mean, I'm not new to programming. I'm new to php source code (and let's say compilation).
 
14
Q: Make BASH's Tab Completion Fill In First Match?

user541686Is there any way to make BASH fill in the first match when I press TAB, kind of like the Windows command prompt? (It should still display the list of matches, but it should cycle through them when I keep on pressing tab.) i.e. the goal here is to be able to fill in any match with only the TAB k...

 
Nek
I understand It's complicated. But I think trying is worth it.
 
@DaveRandom bash tab completion is too damn unflexible :-D
 
God I'd wish we'd just even have a code style convention
Because I don't know how I am meant to brake my long conditions onto new lines lol
But have fun exploring php-src
I hope you know about heap.space
 
Nek
9:55 PM
I went there serveral times, no idea what's the purpose of this website.
 
@Girgias tab indent the general indentation (i.e. up to the indent level of the if), then indent a small bit with a few spaces so that they align nicely
 
Nek
(oh, and btw something is seriously disturbing me here: the license does not exists anymore: github.com/php/php-src/blob/master/Zend/zend_vm_gen.php#L12 )
 
@Nek Navigating the codebase
 
@Nek so I apologise if this comes over as patronising (it might) but... do you understand how the C preprocessor works? This is the main roadblock in terms of the difference between PHP-based tool and a C-based tool, there is an awful lot of implicit (and expensive) processing before you even reach the human-readable code the compiler will be working with
 
Nek
@Girgias isn't Github more convenient?
 
9:56 PM
if (cond1
    && cond2) {}
if (
    cond1
    && cond2
) {}
// both are acceptable (assuming cond1 and cond2 are long), this is not exhaustive
 
@bwoebi What I usually do is double tab, so the code within the block isn't on the same level
@Nek It is utter crap
Except if they changed it recently
 
static analysis of PHP on the fly just means re-analysing the tiny chunk of codebase you changed. if you change a macro definition in a header, every file in the project which touched that header in any way must be re-analysed. It's an awful lot of CPU time.
 
@Girgias which looks really ugly I think :-D
 
code navigation works well in GitHub when browsing PHP, Rust, Go code ( ones i'm used to ), not sure about C.
 
Nek
@DaveRandom yes yes, I know that, this is actually pretty obvious, but it's also documented partially to help people write php extensions.
 
9:58 PM
@bwoebi Oh totally, I just find it readable soooo
https://phpinternals.net/
http://www.phpinternalsbook.com/
https://www.zend.com/resources/writing-php-extensions
 
if (cond1
 && cond2) {}
what about that @Levi ?
 
All good references for writing extensions, and understanding some of the internal bits
 
@DaveRandom thanks....set show-all-if-ambiguous on is it apparently.
 
is that for both cmd and args, out of interest?
oddly man complete is the last command I ran on this random SSH session I just focused, apparently :-P
 
@bwoebi I don't like that one as much, personally. I don't recall seeing in in php-src, either.
 
10:04 PM
@Nek sure, but documented |= sensibly analysable :-P (or even correct, come to that)
 
@Nek a lxr tool aids in understanding a codebase. Almost everything is a hyperlink. It's like Wikipedia but for code.
 
again let me be clear, I actively encourage you to continue messing about with this if it interests you
 
well.. not exactly Wikipedia... but "falling down a rabbit hole" with a lxr on a code base is easy to do...
 
Nek
I'm really pointing out that I have issues reading the code because of code style. Not because of a lack of documentation. (besides it may be)
googling lxr
 
I worry that a "style fix" for php-src would touch literally every single LoC is all
 
Nek
10:07 PM
Yeah me too, I feel like it's actually the most challenging part: avoiding it does.
 
I don't think we even have a tool for fixing indentation
So you could start with just that...
 
that would directly improve my life (albeit very infrequently), I approve :-P
 
a coworker helped me rewrite my parser from the ground-up, and it now works pretty well... just tested it on the massive directory (~460,000 files) that my former parser had trouble with... ended up with a log file of 1.2 GB
log file only contains what it parsed as like a var_dump pretty much
 
@Tiffany collaboration ftw
 
Nek
What does FC() ? :/
 
10:17 PM
@Nek "I have issues reading the code because of code style" - even if that's true, whichever code style you find easiest to read, might be difficult to read for someone else. Not saying there aren't some bits that are objectively bad, but mostly it's tradeoffs...
 
Yeah, I'd be happy to adopt clang-format. If you don't like the formatting it does, then massage the code a bit until it formats it nicely. We'd stop hiding commas in macros this way, too, which drives me nuts.
 
Nek
@Danack I though it was not specific to me. But it may actually be. For example to understand this I need to re-indent: heap.space/xref/php-src/Zend/…
Am I the only one ?
@Danack this is not clear. x)
 
is the formatting the issue, or that it's doing about 6 things...
 
Nek
Lol you're right, but one is easy to fix. And really, "fixing cs" actually made me understand it.
 
@LeviMorrison I see, you're not a fan of ZEND_STRL()?
 
Nek
10:23 PM
BTW about FC I was talking about this one: heap.space/xref/php-src/Zend/zend_compile.c?r=fd1d5ec2#55 ( T_T )
 
File context
 
Nek
Oh, ok!
 
It's a struct with information about a file during the compilation step
There are a lot of things like that
Same with CG, EG, SG, etc
 
Nek
Thank you very much.
 
@bwoebi That one is bearable, but still don't love it. The things I really hate are ones like ZEND_FENTRY.
 
Nek
10:25 PM
I tried that printf("%s\n", ZSTR_VAL(FC(current_namespace)));. And oh, surprise, didn't work. x)
 
It's part of a list, except we removed the commas? What? Why? Why do you hate us?
 
@CharlesSprayberry very much so. He's much more knowledgeable about iterators and generators, and more experienced in general, so he redid the iterator parts of my code, I filled in the blanks for parsing the files. The massive directory would constantly fail with my old parser and I'd have to restart it (skipping ahead a couple tens of thousands files)
New parser handles massive directory with almost no issues, other than the sheer quantity of files, which I'm hesitant to break into smaller directories, it may break stuff if I do that
 
@Tiffany After 10 years programming in a variety of industries and different languages generally my code is better with more people's input from the beginning compared to input after I'm done. After doing a lot of solo/independent programming in those 10 years I want my next 10 to be a bit more collaborative.
 
@MarkR ^ :P
 
@Tiffany Yea, you're dealing with a number of files I honestly have never had to deal with. Nice that you were able to finally solve that problem. I know you've been working on it for a little bit
 
10:28 PM
@Tiffany ?
 
@CharlesSprayberry two months, if I include the time it took to learn how to download the files from AWS S3, because I had no prior understanding of AWS before then
 
@Tiffany Oh yea and AWS can be a lot to take in. I've been working on a lot of AWS stuff over the past month trying to get ready to enable object retention.
The industry I work in requires that certain documents be Write Once Read Many and we have a legal obligation to retain the documents for a certain period of time.
 
@Girgias We do have one :D github.com/php/php-src/blob/…
 
Although after digging into AWS services and what it takes to configure everything together correctly I understand why things like Heroku and AWS consultants make so much money :P
 
@CharlesSprayberry yeah, downloading the massive directory took a few days to figure out because there are bandwidth and CPU/memory restrictions in place. Ended up combining the aws command with xargs
Looked like something that could be found in a "spell" book 10,000 years from now
Mar 5 at 22:01, by Tiffany
winner: xargs -t -P 4 -d '\n' -a test -n1 -I file bash -c 'aws s3 cp s3://bucketname/directory/file ./directory/file'
 
Nek
10:41 PM
FC means File Context. EG means?...
 
@Tiffany lol nice
I had originally started out with the aws cli because it is a lot faster but I needed to provide an md5 hash to verify the object as well and the cli doesn't support that
I wound up having to dig way too deep into the botocore python library that runs the cli to figure out how they do transfers so fast
 
10:59 PM
@Nek executor globals
(as the struct is named)
 
Nek
hum ok, i don't get it.
But I'm done for tonight haha. See you guys. And thanks a lot.
 
11:59 PM
 
00:00 - 20:0020:00 - 00:00

« first day (3847 days earlier)      last day (1091 days later) »