« first day (3601 days earlier)      last day (1571 days later) » 

01:22
@cmb went ahead and added another <sect2> for the "see also" text. I'm going to go ahead and commit it. If I need to make changes, let me know. Thanks for your help.
01:36
...or not
Wes
Wes
\o
 
3 hours later…
05:07
Good morning.

\o
 
2 hours later…
07:01
Feature request: extend eval() with function/class/variable permission set ・ Program Execution ・ #80017
@cmb yeah, feel free to close either one, communication with the author is somewhat difficult. It seems he doesn't understand git and I am unsure why he created the same PR
@cmb - the final change is not ideal either but I lack the C skills to clean it up. He basically copied another method and hard-coded a few of the if-statements. It works, but it aint pretty.
07:26
peeks in
07:42
Good morning.
How you guys doing over here? It's been a while.
08:17
Doing well =)
 
2 hours later…
10:28
I have an extension function called has_right and that expect an array. Now I want to send from twig ann array with the some constants I though it should be like this but apparntly I am wrong. How can I use this?
has_right([constant('test1'), constant('test2'), constant('test3')])
@luffy Any clue what is the error message?
@Tpojka sorry I am trying to debug to create the error it just giving me 500 page not found. I do know it is because of this. I will try to get the error
Page not found is 404. 500 is server error. Check again PHP and/or server (i.e. Apache, Nginx) logs.
ok
@Tpojka sorry it was my mistake One of the constants did not exist thanks for pointing to logs
10:49
@luffy Literally first thing to check. Well done. :)
True I was trying to print/ echo the error
If not already (I presume you weren't), install and learn how to use Xdebug extension. You will improve your productivity for 30-50% at least.
11:22
Morning.
@Derick FYI Dmitry pinged you here: github.com/php/php-src/pull/5857#issuecomment-679833405. Thought I'd let you know in case your notifications weren't configured to get them on issues you hadn't participated in.
cheers, I had indeed missed them
@LeviMorrison How could I move to this API? it doesn't provide before and after function call hooks?
@Derick It provides before/after callbacks. It doesn't give you persistent call data between begin and end (but if it's per function you can use the runtime cache).
uh, show me how I change my overriding of zend_execute_ex and zend_execute_internal to this? :-)
11:31
I want to solve that latter part eventually, but Dmitry has been slow about responding to things so we haven't gotten that far.
@Derick It's slightly dated but the concept is the same: github.com/tideways/php-xhprof-extension/pull/96/files. This shows how tideways/xhprof migrated to the previous PR.
The new PR only affects user functions, though, not internal ones. Internal functions will always be stackful at the C level.
I don't see the point of moving to a new API to be honest. It doesn't improve anything, and I'd have to maintain two versions (for < 8.1, and for >= 8.1).
it would work on jit, that is the difference
Can I still read the variables?
or do any of the myriad things?
Xdebug and JIT running at the same time is pointless.
cmb
cmb
Would anybody know the meaning of the JIT INI settings? (github.com/php/doc-en/pull/140)
11:48
It also doesn't stack overflow. I know xdebug limits the call stack depth, which is fine since it's a debugging tool.
@Derick What variables are you referring to here?
Local PHP variables, return values
Return value is a definite yes -- we pass it into the end handler (on generators it's in a different location so that's why we pass it in).
In general, there is a lot of stuff around github.com/xdebug/xdebug/blob/master/src/base/base.c#L747
And unless these is a very good reason™ to change things, I am reluctant to do so.
Anything you get from the execute data or globals is still valid.
@Derick Is XG_BASE(stack) a global? Don't know what XG_BASE is.
yes, it's a global
XG_BASE(x) is XG(base.globals.x)
11:55
I think you could switch to the new API pretty easily then; you don't seem to store any data on the C stack from begin to end; it's all in globals.
Could you easily move it into the stack?
you can always move them to execute_data->reserved or not?
@beberlei If it's something that is per function then you can do that sort of thing, but if it needs to be unique per call then no.
isn't reserved new for every call?
11:57
I'm already using two elements in "reserved"... and there is only 4 positions
but it's not relevant here, I can stick it somewhere else
@Derick If you can easily move that stuff onto the global xdebug stack then I think you would basically do something like this:
but I still haven't heard a good reason to have to maintain two ways of doing things.
xdebug_execute_ex(...) {
    xdebug_observe_begin(...);
    xdebug_old_ex(...);
    xdebug_observe_end(...);
}
This way it's all maintained in the begin/end, and you use execute_ex for the older versions.
So it's not really two ways of doing things...
Does anyone have time to explain to me how the opcode specializations actually work? I've never understood that part, and Dmitry is suggesting that we do a specialization for observer.
12:15
If I changed my password on master.php.net, does it have to sync to svn.php.net? I can't make commits to doc-en, it gives the error "authentication failed," but I'm copying/pasting my password from my password manager, and I'm able to log in to master.php.net, no issue
Good Morning!
cmb
cmb
@Tiffany is doc-en your SVN or Git checkout?
@cmb svn in this case. I guess I should've referred to it as php-docs
cmb
cmb
That might indeed be a sync issue with svn.php.net. :(
anything I can do to resolve, or just wait?
12:36
hmm, I can check - i suppose
@Derick <3
derick@singlemalt:~$ ssh svn.php.net
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
sorry, nope
o_O
Thanks for trying
@derick do you have root on master?
@cmb It looks to be. The svn machine ssh's to master to sync the passwords, but it's timing out trying to connect.
i do have root on master
[root@osu1php ~]#
It's still centos 5.10 :S
12:45
Can you see if there's anything obvious blocking svn2 (91.199.167.250) from even connecting on port 22?
iptables is clean, and I can ping that IP
can you ping the master ip?
Ha, I asked Martin (who had been upgrading other boxes relatively recently) and, to paraphrase, he said "I'm not touching that" :P
martin is wise
@Derick Let sleeping dogs lie.
i can't seem to ssh from master to svn2 though?
FWIW, I do have ssh access on svn2 ;-)
12:47
root@svn:~#
Message from derick@svn on pts/1 at 14:47 ...
hi!
EOF
:)
ping works from svn2 to master
so what could be blocking it?
cmb
cmb
TLS issues?
no, telnet on port 22 doesn't work either
I think it might have to go through the jump host, but... I can't see which bit is blocking it
/etc/iptables.conf :)
right, but shouldn't iptables -v -L not have shown the rules?
ok, I think I have it added - try it?
@Tiffany Can you try?
13:01
root@svn:~# /local/bin/update-svn-passwd && /local/bin/update-svn-users
root@svn:~# echo $?
0
perfect :)
I had already tested that ;-)
ha, doesn't hurt to try twice :P
@Derick \o/
I wonder how long that's been broken...
13:03
I love how those scripts ssh as "dsp" :P
@salathe Since svn2
since the new IP? that's not so bad then.
shit
ruh roh
I reverted a change by cmb :S - svn.php.net/viewvc/phpdoc/en/trunk/language/…
minor text
thought I had updated before committing
13:09
@Tiffany accidents happen, no worries :)
@Derick thanks for fixing, much appreciated!
thanks @Derick
@salathe what was the old IP?
@Derick 213.189.17.212 according to the zone file change
I'll remove that from the firewall then
👍
13:12
but this also explain why I can't commit with svn... cause it still uses "Svn.php.net" locally. How do i switch that?
svn.php.net is myra and should work (most of the time, probably) and svn2 is the origin
yeah, "svn up" works
odd
it's been no end of problems since someone *waves hands* decided to stick myra in front of svn.
What is myra?
a german cloudflare
cmb
cmb
@Tiffany np, restored
@cmb thansk
13:33
Anyone have an idea why the NTS builds on Azure could have gotten much slower?
Both DEBUG_NTS and RELEASE_NTS weirdly.
Resource issue?
Storage throttling?
Secret plot by MS to further alienate PHP?
^
That- let's go with that.
Does the tests system have a flag that will output each test's execution time to see if it's a particular set that's bogging it down?
13:43
... so yes :P
Asteroids comes hurtling at Earth > Huge international effort to design space mission to deflect it > Mission goes off alignment and crashes into the moon > World power grids fail as every government on earth rushes to Git Blame the guidance system.
@MarkR Government parties point at each other to blame because they can't get their crap together.
Later investigation finds out the whole thing was written in Javascript and the whole thing died because someone deleted the isEven package off npm
Hi, I am looking for opinion on sending RESTful requests and isn't necessarily PHP related. Is it a good idea to accept POST requests like this: /team/{teamId}/projects/create and a request body along with it? Or should I stick with /projects/create and pass the teamId in the request body itself? teamId isn't a secret that I need to protect or anything and can be exposed.
There's no right answer to that one, it's one of the universal "whatever fits you bests" of REST.

A common way would be to POST to /team/{teamid}/projects to create a project
14:22
@MarkR Right, it seems to me that POST /team/{teamid}/projects/create is a bit more understandable (at least to me), but I guess the standard way makes more sense.
Is there a tool to generate the stub files like curl.stub.php before setting them up to be converted to arginfo?
nvm...I wouldn't be able to use it anyway, as I need to preserve approximately 3000 #ifdef's....
Your imagick API?
...it's at this point I disavow ownership. It's 'the' imagick api.
14:44
@Danack uh sounds you have a large api surface to convert to a stub :)
cmb
cmb
@Danack basic #ifdef is supported for stub files
@beberlei it's.....not small. But also which of them are needed depends on which version of ImageMagick are being used.....my question for Remi is going to be, can IM6 be dropped or would that be too annoying for him.
yeah see the dom stub file to see an example of ifdef checking for libxml xpath support
@cmb Thanks, yeah....'just' going to copy and paste the entries from the manual in to stub files, and then move them around so can preserve the ifdef info from github.com/Imagick/imagick/blob/master/imagick.c#L2440
cmb
cmb
14:54
Would anybody know whether I'm using the ZEND_MAP_PTR_*() API correctly in github.com/krakjoe/uopz/pull/131/files ?
15:11
@cmb Is that if (!static_variables) { check needed?
cmb
cmb
At least one test was failing, because static_variables was NULL; can look up which one if necessary/helpful.
How does the JIT interact with the opcode specializations?
@LeviMorrison should still use them
I mean, for the opcodes it optimizes. Does it just handle all the specializations?
@cmb ah yes, it is needed
@cmb I don't think you should just set it to static_variables though, that would modify the shared array. You probably want something closer to what the ZEND_BIND_STATIC opcode does
@LeviMorrison yeah sure. It will either dispatch to the specialized handler, or emit specialized code
cmb
cmb
15:21
@NikiC thanks! I'll have a look later.
@NikiC Thanks.
Gosh Intl is such a mess of an extension
stas wrote it, I think.
@Girgias haven't you said that before?
@Tiffany Yes, but everytime I look at it again I hate it
15:28
@Girgias It is :(
The error handling is ... amazing
@NikiC Also my "hint" is actually wrong because the construction happens I don't know where
@Danack stares at the one nay vote
@Derick From the author block from the license it seems to be: cataphract
@Girgias checks it wasn't salathe ... not that time. :-)
@salathe A surprise but a welcomed one :p
15:38
@Girgias for the record, my gut instinct is that we should expose the ICU library pretty verbatim, and then people would be able to wrap those functions in nicer to use APIs in userland.
Does anyone know if Symfony has a way to schedule tasks in the codebase, similar to Laravel?
(of course it would still need a cron job)
@Alesana its called symfony messenger
it requires a bit more to setup than laravel, but should be straightforward and documented
i believe they showcase with rabbitmq, which is quite complex if you only have simple needs maybe redis better :)
Thanks for sharing that, I think I want to push my new company to set that up because we are using HTTP requests for things that should not be done with HTTP requests
I am moreso talking about tasks that run every interval on the dot (sync something up every hour, for example)
I may be missing something though and messenger might be able to do that
I do see some recipes for it but nothing native Symfony
@Alesana I'd probably run something like cron or yacron for the scheduling bit
15:51
Makes sense. It looks like there are some packages for it just have to set up the cron job
cron? the message consuing part should run as a supervisor job imho
@beberlei scheduling, not supervising
running something every 10 minutes and such
ah, run tasks every $n, alright
@Alesana FWIW, I use yacron because cron is a nightmare to daemonize properly in docker
It kinda wants to do whatever it wants - was designed for systemd and such, not for newer stuff
also: I want the spent day of research back -.-
I haven't heard of yacron, I will look into it though. But yeah how Laravel works is the cron job will run the task scheduler every minute, and the task scheduler will contain a list of commands/jobs that should be ran and how often they should be.
That way there's version control for your scheduled tasks as well
16:16
In that case you can write a time-based interval operation on top of react-php or amp
@Danack When I was adding stubs, I always copy-pasted phpstorm's stub definitions as a start. It served as a much better base than the manual. :)
but I prefer using tools built for that and battle-tested for that, rather than running some weird laravel frankenstein :P
haha fair enough :P
I just like how everything is in the git repository for Laravel. Whether it's database structure or scheduled commands
So you're not telling your team "Hey you gotta scheduled this cron job on your local environment"
I generally do that by defining a docker-compose.yml or such
there is no "local environment" :P
Oh that actually makes sense. At my last job we had docker-compose files but there wasn't much to them. I think they were configured wrong though because running tests in the docker container took 10x as long as running them in Vagrant
Not an exaggeration, my manager would sit there for 30 minutes while the tests ran in docker - and when I ran them in Vagrant it was less than 3 minutes
16:22
This also gives you a single entry point for all your scheduling needs. So you only need one cron to run minutely and you can control multiple tasks from it
i was recently pointed to lando.dev which seems to be a nice abstraction on top of docker compose for usual php based web dev
I tried using lando, but it is a labyrinth of pre-made stuff
@Alesana yes, docker on mac is slow, very slow.
@pmmaga Ah yeah I was just looking at that
I guess you have to install most things you want to use from recipes anyways so it wouldn't make sense for Symfony to come with it out of the box
I'm not too familiar with Symfony but so far I like it, it seems a lot more customizeable than Laravel
We're partnering with Lando at Platform.sh. It's a fairly nice system, although it definitely encourages you to build off of one of its pre-made templates.
@NikiC maybe another area as to why BreakIterator is failing is in the _breakiter_factory() function in breakiterator_methods.cpp because there is a
RETURN_NULL(); in it
16:48
...are doc commit emails working again? ... nevermind, it says git.php.net not svn.php.net
@Tiffany sorry!
no worries :P
I'm being easily excited, a bit too wired
I need a chill pill
17:11
@Crell Funny, I was thinking of asking you what you think of it (since you work in the whole containerization business). So far it works pretty well, plugins definitely need more work.
17:30
They're building an extension that reads our config files and builds a local version of the project defined on Platform.sh, using our container images.
It's in... alpha? beta? Some greek letter.
18:04
@MateKocsis That sounds like the copyright equivalent of travelling in time to become your own grandparent.
Out of interest, why did that work better than the manual for you?
github.com/JetBrains/phpstorm-stubs looks actively maintained
18:30
evening ladies
Hey sailor!
@Crell What's a nice girl like you doing in a place like this?
classic.
@DaveRandom ¬_¬
@DaveRandom 4th grade is calling, they want their insults back :P
it wasn't intended as an insult :-S
18:46
I should buy a helmet before I fall off my bike again
@IluTov also the 90s are calling, they want their "Hey X is calling, they want Y back" joke format back
@Tiffany yes, yes you really very very should
I can tell you from personal experience that falling off your bike can potentially be very very bad, I feel naked on a bike without helmet and so should you
@DaveRandom I think this is the first time I've actually used that :D I'm a bit late ok?
@DaveRandom the 90's called? Did you warn them about 9/11, and you know, Trump?
@Danack if you remember the 90s, they weren't all that big on learning the lessons of other decades
19:28
@Danack because they are formatted just right: there is no whitespace everywhere where there shouldn't be (array_diff ( array $array1 , array $array2 [, array $... ] ) : array), and there is no [ ] around optional parameters. It would have taken me an eternity to use the signatures from the manual. Ah and not speaking about the mixed type! It wasn't natively supported that time when I did most of the stub work.
20:02
@IluTov Do you have a branch somewhere for partial application?
Tests expect var_dump(FLOAT) to print an integer ・ Testing related ・ #80018
20:32
@LeviMorrison github.com/php/php-src/compare/master...iluuu1994:partials-2 I really just started, it's very ugly and just works for internal functions right now. Work is needed for user-land functions, methods, closures, in all combinations. Variadics are missing. The closure should also copy the given param/return types from the wrapped function.
And as mentioned, I have literally no idea what I'm doing ;)
Also, Nikita and Bob suggested creating a separate function call instruction instead of using ZEND_DO_ICALL.
21:05
@IluTov If I followed this correctly (maybe not, just woke from a nap) then you actually make a full call for the partial function, and then return a closure?
@LeviMorrison Yeah pretty much.
But as I said, we should probably create a custom ZEND_DO_ instruction for this.
@PeeHaa Interesting glitch in this FFX speedrun youtube.com/watch?v=nEmefM5ltOk&t=360m
@LeviMorrison Ah and what I also forgot, there's also some memory management stuff that we need to deal with. E.g. $x = $closure(?); should keep the closure alive for as long as $x is in scope.
@StatikStasis :D
I was actually think about implementing the specialization of |> and partials first. We want $var |> var_dump(?) to compile to the same or nearly the same opcodes as var_dump($var).
The only difference we'd want is perhaps something that indicates it was transformed from |> (may help debuggers or something for line numbers).
This removes all the complicated issues ^_^
21:15
that's an optimization in the end though - should be done probably, but is irrelevant to get the RFC to a proper discussion @Levi
Well, I wouldn't say irrelevant; having that optimization is pretty critical. I get the essence of what you are saying though. We still need the standalone thing.
@LeviMorrison It is important when we get pipes, but that optimization shall be part of the pipes patch, not of the partials RFC
@LeviMorrison Not sure if partials should even be used with a single param, in that case you're probably better off just passing the callable string, given that $foo|>'bar' is currently syntactic sugar for ('bar')($foo). Not sure if the string has any performance implications, that can probably be optimized away.
I think stylistically people will prefer bar(?) or bar(...) over 'bar', except maybe when bar exists in the the global namespace.
@LeviMorrison The current patch for |> does compile to the same opcode as foo($bar). It's just limited in that foo() has to be single-parameter and there's no special syntax for it.
And there is a flag to indicate where it came from.
21:28
@Crell Right, I just meant generalize it out a bit.
In your patch you'd have to write $var |> 'var_dump', for example.
Stylistically, just writing

$val |> foo |> $baz->blah |> beep

is probably the nicest. Just not feasible in PHP.
Right, and any nicer way of writing a callable literal would resolve that. Partials do so and have lots of other uses while they're at it.
As long as the RHS is one of the valid function call types and has only a single ? then it should be pretty easy to substitute the LHS into there, right?
Man, the general populace seems so consistently bad at language grammars: github.com/php/php-src/pull/5425#issuecomment-680279739.
$lhs | $words > array_map('strtouppper', $words) is already valid in the grammar today
21:53
Also, why you wouldn't just do $words = $lhs; array_map('strtoupper', $words); is beyond me. I mean, they wants to add optional type checking, but I don't see the point of tacking that onto this feature even if it was feasible in the grammar.
Honestly, part of me is thinking why we don't just focus on scalar methods. $array->map(...) would be much cleaner than $array |> array_map(..., ?) IMO.
Yes, pipes have some other use cases, but I'm expecting it mostly to be used for array and string operations.
22:11
Eh, I disagree. I seem to be in the minority of developers that actually writes functions instead of methods though...
22:24
@IluTov If you did ever want to pursue that then I think very solidly we'd need extension methods, as otherwise you end up doing MyOrg\array_fn(/*...*/) or such and then you are straight back to a dichotomy.
@LeviMorrison I proposed extension methods for scalar types a while ago but the idea was disliked. People would prefer a fixed set of methods. That is if I understood you correctly. I don't get the second part of your sentence.
What's MyOrg\array_fn(/*...*/)?
Yeah, sounds like you understood me, but I guess I disagree with "people".
What's the point of moving to scalar methods if for any "methods" of my own I have to use "function" style anyway? May as well just leave them all as functions.
@LeviMorrison I guess the concerns are 1. disambiguation between built in methods and user provided methods 2. there's little trust in user-land coming up with a good API
I don't necessarily agree with the latter.
@LeviMorrison For reference: wiki.php.net/rfc/scalar_extensions
I never announced it due to the feedback I got here.
Well, the syntax is terrible lol
@LeviMorrison Thanks ^^
22:33
I wonder if attributes would be more palatable:
#[ExtensionClass]
class String {
    public static function split($self, $separator) {
        return explode($separator, $self);
    }
}
Or something.
@LeviMorrison The point is that you include extension methods per file
@IluTov That is basically useless, yes?
@LeviMorrison How? It avoids the risk of changing how some library behaves just because you declare an extension method.
Yeah, but I'm not going to define iterable\filter_values in every file I'm going to use it in.
@LeviMorrison You wouldn't of course, you just add the use statement.
22:37
I see where you are going, but it's pretty bad I think. If we had normal imports like say Python then I think that would work pretty well.
from whatever import iterable::filter_values
Or something.
@LeviMorrison Bad because why?
One, we don't have syntax for anything like it. Still working on #2.
@LeviMorrison just got a LinkedIn request from someone from your company lol
Two, I don't think it will actually work with compile-time replacement like we do for all the other imports.
@LeviMorrison So I guess that's kind of the point. Global extension methods probably don't make much sense because just imagine two libraries each using a different set of scalar extensions, that makes them completely incompatible. And then there was just a general disliking of the alternative. Some concern with clashing function names, the syntax, the kind of unique behavior, etc.
@LeviMorrison There's a POC. There are issues with references but in general it does work.
22:43
Idk if it was related to the application or not but I was looking at it for a little bit thinking "Why does that company sound familiar" lol, been a long day
@Alesana I think I've gotten some LinkedIn requests from people at my company... that I don't know, lol
Anyway, I'm off to bed. Sleep well :)
23:11
@Derick I submitted a PECL account request; IIRC you have access to approve those and such, right?
@IluTov @LeviMorrison The more I think on it, the more I think extension methods in some form would actually be quite useful. As noted, though, PHP's wonky loading style makes them, er, hard.
I'll have to look through the POC impl to see how per-file methods worked. I would not have expected something like that to work.
I still would like to see comprehensions in some form at some point, but one step at a time. :-)
@Sara You wouldn't happen to be around, would you?

« first day (3601 days earlier)      last day (1571 days later) »