« first day (3938 days earlier)      last day (992 days later) » 
00:00 - 23:0023:00 - 00:00

12:49 AM
simple socket listen and send scripts transfer incomplete data ・ Sockets related ・ #81304
 
 
2 hours later…
user1986815
3:06 AM
For Those About to Rock xmpp:php@xmpp.zp1.net?join
 
3:38 AM
Development Webserver Drops Requests With "Upgrade" Header ・ Built-in web server ・ #81305
 
 
2 hours later…
5:46 AM
@Sara @GabrielCaruso do you miis the 8.0.9 tag ? (and for memory, there is one revert expected in the the release branch)
 
 
1 hour later…
7:05 AM
checking whether to enable pcntl support... yes
checking for fork... no
configure: error: pcntl: fork() not supported by this platform
wut
 
 
1 hour later…
8:33 AM
@RemiCollet It's Sara's turn, but let me know if you need me to tag anything
 
@GabrielCaruso we can probably wait a little, for @Sara to wake up
 
9:27 AM
@JoeWatkins about uopz, have you time to check 8.1 ? or do I set max PHP version to 8.0.99 ?
(seems ZEND_TYPE_HAS_CLASS have to be fixed, also Zend/type.h still have comment about it, and nothing in UPGRADINGS.INTERNAL)
 
cmb
@RemiCollet see github.com/php/php-src/pull/6799/… /cc @Girgias
 
cmb
that's why I pinged him :)
 
@JoeWatkins ZEND_TYPE_HAS_CLASS => ZEND_TYPE_HAS_CE could make sense (even in 8.0) btw, 8.1 have some other issues, so will go with 6.1.3 without 8.1 support
 
I'm just doing it
that type copy code is crap
 
ok, so I wait for 6.1.3, please ping me again
 
10:11 AM
@RemiCollet I've pushed a change to make uopz 7.0.0 compatible with 8+, so dropping support for earlier versions at this point ...
it simplifies code, and I need less stuff to maintain ... I don't even use uopz myself anymore which is why it doesn't get much attention ... and nobody is paying me enough to spend too much time in this particular rabbit hole
 
10:53 AM
@JoeWatkins looking at tests/016.phpt failing in 8.1
 
@RemiCollet Oups... let me fix that...
 
Hey guys how are you doing ?
 
@RemiCollet yeah, deprecated warnings
 
cool, thanks
 
11:21 AM
Can't remember if my cat's appointment is today or another day
Too bad I can't upgrade my memory with more RAM
 
@Tiffany Coke light
As to why: phenylalanine is your answer, you can get pills of that too
pills make me too crazy so I just have some coke light from time to time
 
11:40 AM
I'm on medication for ADHD, does pretty well treating it. ADHD has notoriously bad short-term memory. I usually write stuff down or put it in my calendar, but I had the audacity to believe "I'll remember this" ...
 
Oh
 
Also they're supposed to call me the day before but they may have forgot/been too busy
 
12:05 PM
Does anyone knows of a programming language, or a static analysis tool for another programming language beside PHP that determines function purity based on argument types?
 
Define purity?
Psalm has @pure
I think you mean function signature, not argument types?
But yes: Haskell, Koka and F*
 
Morning, all.
 
o/
 
@OlleHärstedt a function with completely no side effects,
@OlleHärstedt hence i said another programming language, psalm @pure is not really good at it's job.
 
12:13 PM
@SaifEddinGmati Define side-effect? ;D There's also totality. Check the manual of Koka 2 for more info.
Make a PR to Psalm?
And of course Coq, if you wanna go there...
 
@OlleHärstedt psalm maintainers want to keep it simple, and they are right in that, as it can get pretty complicated
 
Plus Idris, Adga, and all other dependently typed langs.
@SaifEddinGmati Hm, ok.
 
@SaifEddinGmati I'd recommend Koka docs. You forgot totality and division by zero.
This seems correct to me...? psalm.dev/r/79778fc653
 
@OlleHärstedt looking at it, thanks!
 
12:17 PM
np
It's a research lang, so don't use it for prod.
 
Not planning on switching, just theorizing about a purity-checker tool for PHP :D
 
:+1:
@SaifEddinGmati Also Hack capabilities, in case you missed it: docs.hhvm.com/hack/contexts-and-capabilities/introduction
 
@OlleHärstedt i think coeffects still need some changes, using them now is really challenging.
 
@SaifEddinGmati What is coeffects?
Btw, E implemented capabilities as well: en.wikipedia.org/wiki/E_(programming_language)
 
forgot they renamed coeffects to capabilities
 
Ah
Yeah, I've never used them in practice.
 
12:47 PM
@SaifEddinGmati You're making a separate analyzer? What's your motivation for checking purity?
 
@OlleHärstedt thinking about making one, but no time ...
 
Mm
I did a funny thing with generators and command objects to represent side-effects.
You could combine it with a simple "ban these keywords" checker to keep code "pure" in a certain project folder.
 
iteration in general could cause a side effect, e.g iteration over a doctrine lazy collection, will result in IO side effect.

this is a bug that psalm will not detect for example, but an effect analyzer will detect:
function get_admins_and_mods(iterable $users): array
{
$admins = filter($users, fn($user) => $user->isAdmin());
$mods = filter($users, fn($user) => $user->isMod());

return [$admins, $mods];
}

it has nothing to do with purity, but you can't explain to psalm that filter could exhaust $users if it's a generator, meaning the second call to filter will fail.
motivation: make code more understandable ( what does it do exactly? ) and avoid stupid bugs.
 
filter() is pure?
 
conditionally pure.

function filter(iterable $iter, callable $fun): array {
$res = []; foreach($iter as $item) { if ($fun($item)) { $res[] = $item; } } return $res;
}

it is considered pure if $iter is an array, and $fun is pure.
 
12:57 PM
@SaifEddinGmati this is rater an issue of rewindability, which sadly is not typed. In theory something like array|Rewindable would be correct
 
@bwoebi i want to avoid that, i want the function to accept every iterable, but also be able to detect misuse.
 
@SaifEddinGmati Uh, "conditionally"? If it can be effectful, it can't be pure, in my book.
It must be conservative.
 
@OlleHärstedt conditionally depending on the entry type
 
Oh, depending on $fun? OK.
Yeah, good one.
 
1:02 PM
The person who created Psalm is quitting. Maybe the new maintainer would be interested in a fix?
 
The fix is that gist, introducing effects and effect templates, personally i think psalm should stay a type checker, only deal with types, this is something completely different, and i respect Matthews decision in not wanting to introduce conditional purity in psalm.

refs: https://github.com/vimeo/psalm/issues/4145
refs: https://github.com/vimeo/psalm/issues/5242
refs: https://github.com/vimeo/psalm/pull/4999#issuecomment-759437849
refs:
 
@SaifEddinGmati OK, so without this feature, you'd have to create two different filter() functions - one always pure, and one sometimes pure?
 
@OlleHärstedt currently you have to create two, one that is pure, and one that is not ( even tho it's conditional pure, psalm considered it to be always not pure )
 
Yes.
And how does Haskell solve this?
 
tho, psalm supports conditional purity for builtin functions!

if you call count($array), psalm considers it pure, if you call count($immutable_object), it's pure, if you call count($object), it's not.
 
1:11 PM
Interesting.
 
this is not only for count().

exit() -> pure
exit($integer) -> pure
exit($string) -> not pure
 
I know something similar is the case for open and closed files.
It's tracking the type-state
 
1:22 PM
Oh, he didn't even want to enable plugin for it? Pfff, that's weak.
 
1:55 PM
Wonder if < 7.3.15 is also affected
 
2:20 PM
Is this a security vulnerability? Why is it not reported properly?
 
cmb
php.net has a bad record regarding sec reports; and also people are bad
 
2:38 PM
millions will be affected
 
...
> people are bad
 
2:52 PM
well
at least I did my part I guess reporting it here ?
maybe you want to delete those links @Danack
 
this is related to the compromised git server
 
is it ?
Doesn't seems to be related
 
it was a very brief vulnerability that was committed to master branch, but was removed and never became part of a tagged release
 
I remember about that one
 
> "User-Agentt": "zerodiumsystem('" + cmd + "');"
 
2:56 PM
but this I think it's a legit vulnerability
yeah but this is different, check the exploit
 
trying to go through github's commit history was taking too long...
 
Check the link I pasted above
It's unrelated
 
ah, was looking at the "8.1" one
 
@ln-s room owners don't have delete powers, and not much point when it's elsewhere on the net. Also, I don't have the skills to evaluate the first one right now.
 
Should have sent an email but I supposed it was ACK'ed
 
3:05 PM
nvd.nist.gov/vuln/detail/CVE-2020-7062? dunno if this is the same thing, just googled "php session upload_progress exploit 7.3"
 
@Danack Interesting take on FIG Caching on the list. I am not sure if I agree with you, but it is interesting. :-)
 
@Crell this is one of the things I should write more about; setting up things like FIG so that people can collaborate, but there isn't a prize to be 'won' avoids there being an incentive to fight.
see also the phpleague....
 
I don't know if "prize to be won" is an accurate description.
PSR-6's problems were less technical and more, ah, interpersonal. (The two loudest voices were intransigent dorkwads. I thought I could manage them as an outside party to a successful end-state. I was mostly wrong.)
 
IMO fig and phpleague have the same issue. They think they should tell people what to do and how to do with without coming up with solutions that benefits most people
 
But what you describe is much closer to what PSR-17 ended up doing.
@PeeHaa That... is an inaccurate description of FIG today, and for at least the last 7 years.
 
3:10 PM
Why?
 
@Tiffany it is
 
I have only seen not very well thought out PSRs
 
@Crell It's the emotional driver......and humans are bags of emotions. and water.
 
The entire Working Group model is designed specifically to facilitate "coming up with solutions that benefit most people."

"They think they should tell people what to do" - Oh come on. The initial launch in 2009 was awful and along those grounds, but that was 2009. It's not a dictatorial group even remotely, and claims that it still is are FUD.
 
Did I say dictotorial?
 
3:12 PM
which is particularly problematic when the people in those heated discussions don't even acknowledge they have emotions, but like to think of themselves as a Vulcan.
 
"Tell people what to do and how to do it"
 
Yes, because one way or another that's what happens when certain parts of the ecosystem choose to go the suboptimal route
Which is what happened and happens
 
PSR-3, PSR-4, PSR-8, PSR-13, PSR-14... all quite successful across the ecosystem. Even PSR-6 and 16 have ample implementations.
The HTTP specs are a bit more controversial, but 99% of that is Fabien not wanting to migrate from HttpFoundation and then blaming FIG for not just adopting HttpFoundation verbatim.
 
Define successful?
Number of implementors or quality and usability?
 
@PeeHaa .....this is not a productive conversation. Maybe go troll Brendt instead?
 
3:15 PM
Any of the above? All of the above? I won't say they're all perfect, but they've all been adopted by massive swaths of the ecosystem, if not the entire ecosystem.
 
I am not trolling here
 
If you think specs could be better, get involved in the relevant working group.
 
I am just following discussions from the side and some choices are just really suboptimal
And all I am saying is the community will have to deal with it
 
There is no library in existence that doesn't have suboptimal design decisions in it somewhere. Anyone who claims otherwise is trying to sell you something that is probably broken. :-)
 
True
 
3:18 PM
And most specs are developed as openly as feasible, so if you spot a design decision you think could be better, speak up. The WG may have a different set of balancing acts in mind than you, but they're almost always open to listening. Good API spec design is a hard problem.
 
Yes to the first which is my main gripe I think. That's exactly what I said when I started above
 
"They think they should tell people what to do and how to do with without coming up with solutions that benefits most people"

That's what you said, and is the exact opposite of what FIG actively tries to do. The whole goal is to come up with interoperable solutions that encourage cross-project collaboration and interchangeability that benefit the largest possible portion of the ecosystem. That's literally what it is there fore.
How well it succeeds varies from topic to topic, naturally, but again that's true of literally everything.
 
Basically whatever is being decided is going to affect me as a php developer.
 
Also true of everything that happens on Internals.
 
Things being discussed on internals have much less impact on me
For all the good things coming out of the FIG I would love if if they recognized the responsibility they have
 
3:26 PM
... We, do?
 
"if you spot a design decision you think could be better, speak up." - That's the problem right there. Doing that involves trying to convince a large group of people that they are wrong. And as a decision may be based on trade-offs that lead it to be the right choice for them, but not for me, that's a conversation that builds up to a fight.
It'd be better if instead of having 'one true standards', people were able to discuss and publish their preferred version, and then other people can start using it, without having to have a huge confrontational conversation first.
 
> that lead it to be the right choice for them, but not for me
and
> It'd be better if instead of having 'one true standards'
Yes
Also certain things don't need a standard
 
And at least internals doesn't allow that phpixie guy to vote on stuff.
 
@Danack "The great thing about standards is that there are enough for everybody."
 
Also that, but that is just beyond wtf @Danack :P
 
3:27 PM
@Danack At the moment, neither does FIG. Not on anything that really matters.
 
@Crell There really are not
 
@Crell FIG turned me off when I was told, in no uncertain terms, that there was no reason PSR-7 was incompatible with an async server.
 
This is what I mean by reposinsibility @Crell
You have to understand that you have a big role in the ecosystem and standards
 
Understanding how spaghetti sauce relates to software design is a talk I've been throwing around in my head.
 
3:29 PM
@Trowski That's one I was thinking about too
 
@PeeHaa The core active members of the FIG do understand that.
 
Basically all of the above is what I was trying to convey @Crell
It doesn't show though
 
And "we already do understand that" is what I'm trying to convey.
 
(note Gladwell does talk bollocks sometimes - monkeysuncle.stanford.edu/?p=541 - and gives talks at large slightly evil companies, to make their staff feel better, in exchange for cashmoney)
 
You missed the agonizing we went through in PSR-14 to ensure minimal disruption to the existing ecosystem. (By which I mean, not piss off Symfony. Who got pissed off anyway, because Symfony, even though we ended up doing exactly what they asked for.)
 
3:31 PM
Which is wrong
The ecosystem is not symfony
It's all library writers (future and current) and library consumers
Fuck symfony in specific btw :P
 
Isn't PSR-14 completely different then how SF handle HTTP?
 
Yes, but also includes existing implementations that we cannot ignore. Balancing existing conventions and future-extensibility is hard. Especially when you have people shreaking at you that any deviation from "what is already done" (by their preferred framework) is Wrong(tm).
@Girgias You're thinking PSR-7. And PSR-7 drew heavily from HttpFoundation in places, and Symfony even voted in favor of it at the time.
 
Ah
Probably
 
@PeeHaa Everything you've said so far is "you need to feel more X". That is not actionable, and speaking as someone who has been involved in FIG for 11 years now I can say we already feel X. What actually actionable, concrete things would you want FIG to do differently?
 
Don't look at frameworks. Think about designing the things you want to push forward
 
3:34 PM
That... is what we do? But frameworks are a big part of the ecosystem.
 
Listen to people outside of the group
 
Like, concrete example, right now I am trying to assemble a WG to work on a common queue system interface. My motivation is that TYPO3 wants to add a queue system, but making our own proprietary one is stupid. So, I'm trying to get a group together to design one collectively.
 
@Crell But don't sacrifice design because of it
 
That's... literally listening to people.
 
@Crell What if it doesn't align with what you want for typo3?
Would the design based on your work at typo3?
 
3:36 PM
I am trying, begging to get people with knowledge in that problem space to be involved. I have reps from TYPO3 (me) and Drupal lined up. And one of the amqp authors. Symfony... has basically shrugged at me. Someone is reaching out to Magento and Laravel to try and get them on board.
 
But those are mostly frameworks
Get library writers instead
 
Do you know a queue backend author who wants to be involved? PLEASE, send him my way. That's literally the people I want at the table.
 
What about the queue interop dude?
 
I am 1000% serious. My ideal working group would be ~3 queue backend authors and ~3 framework/application people collaborating on what the mutual common ground would be.
Already reached out to him. He said we're welcome to pick up and run with what he'd been doing but isn't interested in working on it further.
 
I never looked at their repos, but how are they not the first choice
Fair enough
Follow up question: why not use queue interop instead of trying to create a standard?
Why does FIG need to take it over (assuming interop is already pretty sane)
 
3:41 PM
I don't know if queue-interop is already pretty sane. It's small enough that I didn't actually know it existed until I started asking around to see who would be interested. But, promoting that to FIG is one possible option. And as you've noted, the FIG name does carry weight. So if the end result is something like queue-interop getting a rebrand and thus more widespread usage... that's OK by me.
 
What's wrong with leaving it be?
 
Is anyone actually using it right now? (I legit am not sure.)
 
I assume so yeah
Even if not it gives much more room for alternative implementations
I feel like I should upload a blog again and blog about what I think are dangers of standards to correctly phrase my feelings :D
 
Perhaps. Because right now what I'm hearing is "FIG sucks because they need to do that thing that they're already doing but there's so much FUD that people think they aren't."
 
Sure. If that is what you keep hearing
Even when other people chimed in above
 
3:53 PM
I started scratching a small queue library based in amqp (mainly targeting rabbitmq), but ended up not moving forward with it as much as I wanted..I'd like to at least hear about the discussions in the WG you're putting together, @Crell
 
@Crell I must be really out of touch, because I totally thought most people ignore fig by now
 
@bwoebi We have a new WG on PSR-20 working right now. Not a particularly impactful spec, but there is work happening.
@FlávioHeleno Hope into the FIG Discord. That's where we're putting it together. :-)
 
@Crell will do :D
 
(Link from the footer of our website.)
 
cmb
@Sara, a gentle reminder that 8.0.9 is waiting to be tagged :)
 
4:00 PM
@Crell time … is one of these things which I consider global. It makes no sense to me to have a ClockInterface to pass around. When I test something, the whole state should jump to the time I want. If they did a Clock::get(), Clock::set(), Clock::reset() (to system time), then I'd maybe take that seriously.
 
It's specifically to make testing things that depend on the current time more, well, testable.
 
@Crell exactly
 
Personally I already use a ClockInterface but getTime returns a unix timestamp, same as time()
 
@Crell and all you need for that is just an updated global time
 
I'm not on that WG so I am not going to get into the details of it here. Go read the spec, and hop into Discord if you want to talk to the WG. :-)
 
4:03 PM
No, I don't care enough about FIG.
3
 
So by "most people ignore FIG by now" you meant "I ignore FIG". :-)
 
@Crell I thought.
@Crell and also, I have a feeling that teaching people to embrace global state where it makes sense is an uphill battle.
 
Generally speaking global state does not make your code more testable. Interactions with time aren't different in this regard.
 
@CharlesSprayberry Global state you can change (a Clock::set()) vs global state you cannot change just \time() - the former is vastly more testable.
 
@bwoebi And an interface that I can provide my own implementation is even more testable than that. I'm not arguing that Clock::set isn't better than just time() but if your goal is to improve the testability around datetime code I'd prefer to have an interface over a global instance.
 
4:13 PM
And I'm stipulating that using an interface for time does not make the code more testable than using global mutable state (not less either, but just equally as testable)
 
I disagree. That interface could be mocked, a stub could have a hard coded known time, and other tests aren't dependent on something clearing out the global clock.
 
@CharlesSprayberry Did I say that I want Clock::set(DateTime)? No. I want Clock::set(DateTimeGetter)
so that you can e.g. increase time by 1 ms on every call if that fits your testing
 
You're still ultimately dependent on some global state getting cleared out in your test suite.
 
Why not just write a mock Clock that does that and use it? Why the extra layer of indirection?
 
@Crell to save you from passing Clock around. Under normal circumstances time getting should be assumed to be side-effect free and truly global.
except in tests, obviously.
 
4:16 PM
You can make the ClockInterface optional and default to a static instance if it isn't present.
 
@CharlesSprayberry this doesn't help me anything. If I have a ClockInterface, I still need to pass it forward to everything using it as well.
 
@bwoebi /shrug this sounds like an argument against any dependency injection to me. I see the places in your code that actually interact with time saying they need to do so by declaring a dependency for a clock a good thing ;)
 
new-in-initializers will make it even easier. :-)
 
I just want to say … why aren't we just passing everything around? FilesystemInterface $fs, ClockInterface $clock, EventLoop $loop, ProcessInfo $proc, SocketManager $sockets, ... etc. These are things which are inherently process (or even system) global. We should not start passing these around.
 
public function __construct(private ClockInterface $timer = new RealTime) {} - Done.
 
4:24 PM
@bwoebi I disagree that a FilesystemInterface is global
 
Dependency injection is good if these things are not strictly bound to your process.
 
Or if you want an easier time writing tests for code that interacts with those systems.
@Crell Yea, definitely excited about the new-in initializer stuff. Really excited about 8.1
 
I know this isn't a mysql room but does anyone have any suggestions on good books/resources on learning how to optimize tables/indexes/queries/etc..? I'm looking at this book by Oreilly which seems good but wanted to see if anyone else had any suggestions.
 
Thanks, that looks great! Have you read it?
 
4:37 PM
Nope, but I have seen the dude on SO answering questions :P
 
@scorgn haven't had a chance to read it yet, but sql-performance-explained.com
 
@PeeHaa That's always a good sign! I will add it to the list :D
@Tiffany That looks pretty good as well, thanks!
 
He has a great talk explaining SQL youtu.be/MnEDHFOqqno
 
I'm realizing how important it is to optimize queries when you have super high volume traffic
 
@scorgn free version use-the-index-luke.com
 
4:40 PM
@scorgn I have that book. It is good... I have not finished it yet... like many of my other books.
 
It seems that which optimizations will work is very dependent on the engine though
@StatikStasis Okay cool, I'll keep it on the list then.
I'll try to read all three
 
It is pretty in-depth. Some concepts were beyond my skill level... or need.
Going on vacation in a week and a half. My mind is already starting to drift into vacation mode.
 
That's useful to know. I don't want to become a SQL engineer so I probably will skip over a lot of things but I definitely want to make sure I'm writing efficient queries when they're executed millions of times
 
procrastination intensifies
@scorgn That book is about that specifically.
 
@scorgn Are you in the same boat as me, where somebody just smashed keys while creating the schema and now your millions on millions records database is slow as fuck?
 
4:47 PM
I spend a lot of time on the database schema. In fact... that is one of my favorite parts about a new project.
 
@StatikStasis \o/ hope you get to enjoy it all
 
@StatikStasis You mean excel sheets right? Right?
:D
 
Exactly! =P
 
:-P
 
4:51 PM
@PeeHaa lol
 
 
1 hour later…
6:20 PM
@scorgn I did read this long time ago, recall it was nice and pretty easy to get into.
 
6:30 PM
@PeeHaa Haha yes, pretty much. Someone smashed a lot of keys 10 years ago and many other people have slightly-more-gently smashed a lot of keys since then
@OlleHärstedt The Oreilly one?
 
No, SQL Antipatterns.
Pro MySQL by Apress is pretty nice too.
 
@scorgn Yeah that sucks :(
 
There's also the #mysql channel on Libera.
 
@PeeHaa It's actually a blessing when you compare it to the codebase :p
 
In our case the database is actually preventing us from fixing the code base in several cases :D
 
6:41 PM
Oh that's a mess
The only part that I really care about is that we're fixing the codebase and database.. slowly but surely
It is so rewarding to modernize a large part of a 10 year old codebase
 
@scorgn @Crell would agree
 
:-)
@scorgn That is basically the entire process of technical education and publishing. :-) "Smash keys slightly more gently in the future."
 
heheheh
 
7:04 PM
@scorgn We are in the process of scorched earth rewrite. That's how bad it is :P
Sadly we are still stuck with the db for now
 
7:17 PM
@scorgn cannot help but read that in the meter of the U2 song "Elevation"
 
@DaveRandom I thought it was just me.
 
I'm unspeakably disappointed in you for missing out on the "oh, you too?" pun there
 
... I don't think I will ever forgive myself.
 
7:35 PM
@PeeHaa That must feel nice though
Doing the rewrite
 
7:55 PM
@FélixAdriyelGagnon-Grenier youtube.com/watch?v=hkj1nt_u2U8
duuuude
 
Hey Joe o/
Man that album was an absolute trip I have goose bumps
 
I've spent basically the whole day being rasmus's bitch ... and now I'm trying to solve a bug with just a stacktrace, which looks recursive ... so about three frames ...
 
hahah I cracked when I read "Rasmus's bitch"
 
@JoeWatkins heh, whatcha doing?
 
7:59 PM
uopz stuff
which I don't even use anymore ...
it's not recursive, it's a call-user-func-array, which invokes a call-user-func-array, which invokes array-map, which contains a ZEND_NEW ... still not much to go on, and no actual code
this is what happens when you uopz, I wish people wouldn't, it was meant to be a means to an end, but it's years later now, I stopped using it maybe two years ago, and nobody else bothered to migrate, or write better tests so they don't need it ... and it's sort of warty and hasn't had a proper review in years ... didn't have CI for the last 6 months or something either ...
I deleted all the 7 stuff which made things a little better, but still warty, and I don't really have the time for it ... the test suite was always a bit shit, the real test suite was running our proper test suite ... it feels like a time sink to keep going ...
ot this mike guy is too loud
 
8:14 PM
@JoeWatkins Hm, ever tried fuzzing it?
 
I haven't
tbh, I've never tried fuzzing anything, feel free to show me how that's done in one of your awesome pr's :)
 
8:35 PM
PHP doesn't fully evaluate new expressions passed in named arguments ・ Scripting Engine problem ・ #81306
 
@NikiC Random question. If I wanted to generate some PHP code, mainly classes, and wanted more power than just string concat, would PHP-Parser be a good tool for that? I see it has some generation capabilities but I don't think that's really its focus. Is is good for that or would you recommend something else, given that I don't need any read-in-code capability?
 
@Crell It mainly doesn't give you any (convenient) control over formatting
If you care about formatting details, it's not a good choice
 
@NikiC I think I need to change the arg_info generation from gen_stubs for iterable to give a union type (github.com/php/php-src/pull/7309)... I'm not sure what's the best way to go about this
 
@NikiC I don't greatly care about formatting, probably. Just as long as it it vaguely readable. In practice I expect it would be mainly "subclass this thing, add a trait, maybe add a property".
 
@Crell Generate the code with PHP-Parser, then run CS-Fixer on it.
 
8:51 PM
@Crell Okay, may be fairly okay in that case. There's an example at github.com/nikic/PHP-Parser/blob/master/doc/component/…
 
@NikiC Yeah, that's what I was looking at and figured I should ask. If I needed something fancier or more optimized for generation, is there anything in particular you recommend?
 
9:22 PM
@Crell Not really familiar with anything, sorry
 
Alrighty.
 
@Danack I was not until now! Thanks.
 
10:31 PM
@Dharman just to the right of the "enter" button there's one that says "delete" on it, it removes things? :-P
(in other words: why do you ask?)
 
It compiles but then I get sigterm
Termsig=-1073741819
@DaveRandom What did I do wrong here? github.com/php/php-src/compare/…
 
what does valgrind say?
 
I don't think I have valgrind on Windows
how do I use it?
 
indeed you do not have valgrind on windows... the visual studio tooling is a lot harder to set up that *nix debug tools, I higly recommend you set upi a hyper-v VM with your prefered flavour of *nix
I am a "windows guy", but I do not recommend debugging php-src on windows
make it work properly on *nix first, where the debugging tools are a lot easier to use, then worry about win if it still doesn;t work when you finished making it work on *nix
imho, ymmv, etc
ftr visual studio has some amazing GUI debugging tools, but making them work with php-src is a debugging exercise on its own
if you are not familiar with this workflow, I recommend just setting up a Hyper-V vm (built into windows 10) and installing ubuntu server on it (about as lazy as linux gets)
wsl is cool but only if you already understand linux, Hyper-V is just straight virtualisation
 
@DaveRandom A part of me really wants to try out WSL but I've heard too many problems with Docker to actually make the swap
I dropped macOS and started using Linux as a daily desktop about 3~ years ago because of stupid docker volume problems that apparently are still there from what I've looked into
 
10:45 PM
@CharlesSprayberry it works okay if you have the directory that holds your projects on a non-C drive. Except for permissions which are borked.
Having the projects under the linux directory did weird stuff for me.
 
I have WSL2 set up and I just recompiled it on Ubuntu, but its the same result
 
wsl2 is the only useful form, and understanding it essentially requires a compsci degree
 
001+ Segmentation fault
002+
003+ Termsig=11
 
I am not a great person to ask because, professionally, I live in a windows-based world
@Dharman yeh you need valgrind
 
how do I get valgrind?
 
10:47 PM
or rather, you need a leak checker, but by far and away the easiest to use is valgrind
@Dharman by compiling on linux
 
I did compile on Linux, didn't I?
or do you mean I have to compile valgrind too?
 
k, then install valgrind on your linux?
valgrind is a separate program but it should be a case of yum/apt install
 
yeah, valgrind is not helping. I am getting strange errors now
 
it should tell you where the memory block you overran was allocated, if not then you prob deref'd a nonsense ptr
 
they might be unrelated, so let me dif a little now
 
10:55 PM
but even so it should tell you where you did that
 
==29545== Invalid read of size 8
==29545== at 0x57FD0F: mysqlnd_mysqlnd_stmt_send_execute_pub (mysqlnd_ps.c:675)
==29545== by 0x57D904: mysqlnd_mysqlnd_stmt_execute_pub (mysqlnd_ps.c:637)
==29545== by 0x451E0C: zif_mysqli_stmt_execute (mysqli_api.c:919)
==29545== by 0x655DBD: ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:1761)
==29545== by 0x655DBD: execute_ex (zend_vm_execute.h:54488)
==29545== by 0x656933: zend_execute (zend_vm_execute.h:58819)
==29545== by 0x5EA51A: zend_execute_scripts (zend.c:1787)
 
> Address 0xc8 is not...
yeh you deref'd a bullshit pointer somehow
 
Also I get a lot of warings when I compile
In file included from /mnt/d/projects/php-src/ext/mysqlnd/mysqlnd_ps.c:19:
/mnt/d/projects/php-src/ext/mysqlnd/mysqlnd.h:294:42: warning: initialization of ‘MYSQLND_RES * (*)(MYSQLND_STMT * const)’ {aka ‘struct st_mysqlnd_res * (*)(struct st_mysqlnd_stmt * const)’} from incompatible pointer type ‘uint64_t (*)(const MYSQLND_STMT * const)’ {aka ‘long unsigned int (*)(const struct st_mysqlnd_stmt * const)’} [-Wincompatible-pointer-types]
294 | #define MYSQLND_METHOD(class, method) mysqlnd_##class##_##method##_pub
 
unless you are expecting something you are interested in to be allocated in the kernel :-P
 
it only happens when I remove a method from that struct
 
10:59 PM
OK, so that implies that you adjusted a memory layout in a way that something doesn't like
 
00:00 - 23:0023:00 - 00:00

« first day (3938 days earlier)      last day (992 days later) »