« first day (3255 days earlier)      last day (1697 days later) » 

8:00 AM
travail work especially of a painful or laborious nature : toil
 
@CharlesSprayberry not quite the same as forbidding merge commits altogether :)
I suspect that (if this feature is really coming) it's due to the LLVM project migrating to GitHub
They want to have a strict no-merge policy, and the only way to get that is using a server-side push hook, something that github (obviously) doesn't allow you to install
 
8:47 AM
I was reading about the new switch expression for C# and found an additional new feature related which is switch tuple matching, but then realized PHP has "tuple" matching for ages now :)
$foo = 'foo';
$baz = 'baz';
switch ([$foo, $baz]) {
    case ['foo', 'baz']:
        echo "case: foo,baz\n";
        break;
}
 
In a regex, do "(?P>foo)" and "(?&foo)" have the same effect?
 
@JennaSloan Yes, see pcre.org/pcre.txt, search for "SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)"
There are four different ways to write the same thing
 
Ugh, I'll just stick with (?&name)
 
@JennaSloan I believe that's the recommended option
 
9:08 AM
I'm lost after 7 mails from Mike Schinkel on Object Initializer. Something is telling me he tries to complicate a lot such trivial feature I've proposed.
 
@brzuchal Ignore him.
 
Just did.
 
Complicated confusing mails is what what he does ;)
 
"Thanks for your feedback, but i decided not to include it in the RFC."
 
Wondering why @SebastianBergmann sees object initilalizer as harder to read than additional noise provided by constantly repeating $var-> part each line - especially for classes with multiple fields. That was in my opinion easier to read actually.
 
9:13 AM
subjective preference is subjective :-)
 
@beberlei pushed two examples and asked for comment cause I don't get it why example full of noise is harder to read, that may help me understand better the argument and don't repeat mistake next time when I push an RFC.
 
I like your optimism that you think you can write an RFC and not have people complain on the ML :P
 
@brzuchal i was meant to say, there is really no way that people have subjective opinions about the syntax that lead them to -1 the proposal. with something this "big" its practically guaranteed. You should really not compromise unless there is a really better proposal, because a watered down solution to try to appease everyone might not help. Think of how we needed 5 proposals of scalar type hints until the stars finally aligned
the first part is always convincing that we need this kind of feature, independent of how the syntax looks like.
 
If someone for some reason there was an error in PHP, that reliably lead to the entire server it was running on hard-resetting whenever the query string contained the letter "e" ... and someone wrote a patch and put it on the mailing list as an RFC, someone would still complain
and Z would probably chime in and say it was breaking the backwards compatibility offered by server crashes.
 
9:31 AM
@beberlei From all the feedback I got so far the only thing which I think would be able to compromise is exchanging "=" into "=>" but TBH I prefer the first than the latter
 
@brzuchal As far as I understand the RFC, the object initializer can only write to public attributes (if used from outside the scope of the class in question). IMO, this encourages the use of public attributes.
 
@SebastianBergmann Shouldn't it be encouraged? :)
For new code using typed properties, that is
 
@SebastianBergmann Yes, that's right, cause it's purpose is simplification over repeating noise for each public property especially for DTO's and similar classes which don't need protected fields inside of application domain
 
@NikiC Just because we encourage using undefined variables does not mean we should encourage ... oh, well. Seriously though: yes, with typed attributes public visibility of attributes is less risky. But only a little bit.
@brzuchal There might be a use case for this for DTOs, yes, but I foresee that it will be horribly abused and lead to unmaintainable code :) Sorry for being pessimistic.
 
@SebastianBergmann there are no rules changed by object initializer than standard object initialization, it is also possible to write bad code full of noise now without object initializer
 
9:36 AM
I think it will be fine for DTO, I do think you should add a ... magical named constructor method
 
Forbidding ctor was one of the reason to address this RFC to DTO's and similar especially for.
For complex classes probably ctor would be required so no object initializer would be avail
@MarkR could you rephrase the part with adding magical named constructor method?
 
Well, probably not, but a lot of your validation problems go away if you had something like:

class DTO {
public static function InitializeObject(array|object $inputs) {
... blah blah blah ...
}
}

And if it exists, call it when you do your initialization stuff (if it exists) or just default to setting the properties externally. Giving people an easy way to validate the input... but at that point, you could just use arrays in the first place I guess.
 
i am totally on the public typed properties for the win bandwaggon, we are even elevating our PHP upgrade policy to go for 7.4 in potentially february 2020 rather than summer 2020 as usual
 
The benefit to the object (edit:) initializer rather than a drop-in static function is IDE checking IMHO.
 
@brzuchal question about your RFC and typed properties. The struct syntax is also about allowing more typed properties to be "Type" instead of "?Type". This is a central benefit imho. but for the use case where some mapper creates the objects dynamically, you need a dynamic invocation syntax from array data, like $reflection->newInstance()
not sure where the question is in there, probably "Did you consider that already?"
 
9:45 AM
Totally off topic question, but @beberlei how did you edit the post before the last one?
I've wanted to edit / delete previous lines I made and couldn't work out how (other than the most recent one)
 
@MarkR i clicked on the Edit button on the menu in front of the message. I think editing depends on how old the message is
 
Ah time based, that makes sense.
 
@beberlei I was thinking of splat operator for that which is in future scope, would that be enough? new Customer { ...$dataFromStorage };
 
At that point I'm not seeing the benefits vs an array @brzuchal.
 
hm? if the data structure is known objects are always better than arrays imho?
 
9:48 AM
@MarkR considering $dataFromStorage comes frmo persistence mechanism you benefit on avoiding a loop and reflection machinery to be used
 
yeah you cant get the object from the persistence directly, or from third party api
 
exactly, and getting it from persistence could be prepared for directly use (key names - mapping) with splat
but so far I was considering it as a future thing cause didn't wanna put too much into firs RFC about OI
would that benefit a lot if included from start?
 
imo once you're starting to use things like splat and so forth, you've basically just created a stdclass shorthand and an internal named constructor
 
@brzuchal even if not mentioned in the RFC, i am reasonably sure that this method here php.net/manual/de/reflectionclass.newinstanceargs.php would need a second argument with $fields or something
@MarkR yes that is exactly what object initializer syntax is about, minus the stdClass and plus a "real" class
 
@beberlei that would be doubling getProperty()->setValue(), isn't it?
 
9:53 AM
@brzuchal i see it calling the same engine function that is responsible for assigning the properties as if you would call new Customer { ... }
 
@beberlei but that would requyire $args to be always empty
 
an ORM could then do $reflectionClass->newInstanceArgs([], $fields);
@brzuchal ah! so maybe a new method
 
I use newInstanceArgs a lot in my custom Entity / ORM hybrid. I just pass the fields as an array
 
@beberlei it would be able to easily call $uow = new $className { ... $fields };
does it require to be through reflection?
 
you mentoined that splat operator is in future scope
the reflection thing could be done immediately
 
9:58 AM
yes, but asked if you feel it would benefit a lot to be included in current RFC shape as a part of current proposal
 
no, it would just be sparkles on top
ah right now omitting ? also works, it makes it unitialized: 3v4l.org/ERdkj
Uncaught Error: Typed property Foo::$created must not be accessed before initialization
 
@beberlei Ok, would you mind elaborating on ML that adding reflection mechanism would be expected for this feature? Then I would be able to respond to such need with for eg. ReflectionClass->newInstanceFields($fields) added to RFC
 
@brzuchal in your RFC, do you do something about the behavior of having unitialized properties after the initializer + constructor is run?
 
nothing - simplification
should I do something?
 
it could be interesting to enforce no unintilized properties afterwards
 
10:02 AM
yeah, could benefit
 
i am sure the fact unitialized exists right now is a workaround for something edge casy in the engine (would need to look up the typed properties rfc), but maybe with this syntax it could be possible to enforce
 
@beberlei can we go with that through ML, then it would not look like I'm adding things which just came to my mind but as a response for a need?
 
@brzuchal yes, will write later. about Reflection i think you don't need to mentoin this and if the rfc is accepted you can just add this later as a refinement. Plenty of features "forgot" about reflection and it was just added later, for example Traits
if you say you want to add it for completeness then i will add it to my ML post
 
Yes, wanna that for completeness, thank you
 
i just remembered why its not happening now with the validaiton that everything is initialized
because of marcos evil unset() lazy loading pattern :)
 
10:12 AM
I read something about that but not that much familiar
 
essentially class Customer { public $organization; public function __construct() { unset($this->organization); } public function __get($name) { if ($name === 'organization') { $this->lazyLoadOrganizationFromDatabase(); }}
i wish we could find a way to remove this dark magic and go with something explicit
warm enough for tshirt outside now! toodles
 
10:39 AM
@NikiC Ah, I see that is different. Interesting.
 
@beberlei thanks for that feedback
 
11:26 AM
Morning
 
11:37 AM
Interesting song by OSCA, a Japanese-German band. youtube.com/watch?v=dLvRidBSXHQ&feature=youtu.be
 
12:34 PM
o/
 
o/
 
12:51 PM
\o
 
> | If you did not receive a copy of the Zend license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@zend.com so we can mail you a copy immediately.
....we should probably change that, as zend.com isn't controlled by the PHP project, or anyone associated with it.
 
What's the relationship between the Zend engine and the wider PHP license?
 
A big mess.
 
I just read on Twitter that another group is pushing ahead with PHP+, the phpwars have begun
 
Link?
 
12:58 PM
do you mean php-plus.com ? as that's a preprocessor along the lines of preprocess.io/#
 
Yup
 
> A superset of PHP that makes PHP cool again. Plus is a work in progress, it may still change, perhaps profoundly.
Laravel like thinking detected.
 
I thought calling something "PHP" was prohibited, but hey ho. It's going to be an interesting one, that pre-processor does look nice
 
It's allowed, but you're not allowed to block other people from using a similar name.
i.e the problem with the company using the php debug or whatever it was name was them trying to block PHP DBG, not them using for years without anyone noticing.
 
The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact group@php.net.

Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from group@php.net.


I assume if it's a transpiler and they're not actually deriving from it?
 
1:03 PM
php-plus is still vaporware imho github.com/php-plus/engine
 
I'm trying to find the Tweet I saw earlier which said something like preprocess.io was going to become the new engine for php+
 
going for the first round of scythe solo/automata now, also enjoying the sun. awesome :p
 
Wow! I didn't know this existed: php-plus-plus.com
5
 
:| I was thinking someone had actually gone to the trouble of registering the domain
 
Isn't it great?
I missed becca Friday so I needed to get it out of my system.
 
1:10 PM
@MarkR yeah, no. That "derived from" is referring to forks, not userland projects that just use PHP.
 
Makes sense.
I wanted to make a PHP knowledgebase but someone already uses phpkb for a commercial project
 
!!reminders
 
Registered reminders are:
• You're dead. → Id: :35763950 → Sunday, 21st February 2117 00:00 (UTC) - Set by Paul Crovella - Time left: 97 years, 5 months, 6 days, 10 hours, 41 minutes and 37 seconds
 
=( Haven't seen Paul in here in a while.
 
So C is best it seems.
Where is BrainF on that chart...
 
would love to see php 5 vs php 7 here ;)
 
That's obviously extremely limited in its scope
C might be relatively #1, but it's going to drop 30 places when you consider the amount of energy wasted in coffee and microwaved meals trying to debug the damn thing (/s)
 
I never have strictly used C, but my route from the age 11 was BASIC, HTML, JS, C++, PHP, Python, C#.
Though I love any language with C-similar syntax.
 
@Danack the fact that typescript and JavaScript are that far from each other makes me kind of curious as to what they are measuring and how...
 
1:53 PM
I have one string like below
$string = "[[2478,2477,2021,2474,2040,2039],{|gq2|2021|gq2|:{|gq2|title|gq2}}]"
But i want only this value[2478,2477,2021,2474,2040,2039] so anyone have idea how can i get this using regex?
 
I started at about 11 or 12 with... I think, python, then lost interest until I found a copy of Visual Studio 6 on a warez site, then VB6, ASP.NET, C++, PHP
Illegal downloads helped me make a career.
 
Me too! #PiracyLove
 
VB6 was awesome
 
@ircmaxell maybe including or even just timing the compile process?
 
I worked with VB some too in my teens.
 
1:56 PM
I am pretty sure that kept me on track to keep writing code
No matter how crap the language was it was so satisfying to build / drag n drop stuff together and glue it with code
 
I still do a lot of scripts in VBA on a monthly basis.
 
I am sorry :)
 
I remember my first week at University, couple of hundred people in the main lecture hall and they were trying to gauge experience by having people put their hands up, then put them down if they hadn't written the amount of code they shouted out
 
@PeeHaa As long as people use Excel I will do VBA.
 
Yep sadly
 
1:58 PM
I rather enjoy it though.
 
I'd already written something like 100,000 LoC by the time I got to uni. Mostly in VB
 
It's amazing scary what people do with excel :D
 
LOL!
I have some AMAZING things!
 
Did you ever play about with the Speech API ActiveX components?
 
Is msaccess still a thing that exists?
 
2:00 PM
Yeah- but I never messed with it. I hear whispers of some folks who do.
@MarkR Negative.
 
@MarkR Nope
 
I have one string like below
$string = "[[2478,2477,2021,2474,2040,2039],{|gq2|2021|gq2|:{|gq2|title|gq2}}]"
But i want only this value[2478,2477,2021,2474,2040,2039] so anyone have idea how can i get this using regex?
 
@StatikStasis Always carry a contract.
 
2:04 PM
......and the important link is dead.
 
@MarkR A more clear scope should have been provided but told to remain quiet about physical tests... but the fact they were kept in jail, had to make a 50k bond, and have charges against them which they have to appear for in court at a later date seems absolutely ridiculous.
Obviously the testing company are amateurs/new though.
Looks like when someone draws over something with a marker. engadget.com/2019/09/13/… Darker than Vantablack.
 
Just found my biggest C++ on a backup, nostalgia about the "good old days" when I was trying to design my own scripting language for my university thesis - github.com/marandall/aweclipsebot/blob/master/Avatar_Umbra.cpp
Who needs function maps when you can just strcmp them every time
 
2:33 PM
Does google+ still exist as a website?
 
I thought I heard they were killing it. I really don't know or recall for sure.
 
They were killing it.....but it's still being used as the backend authentication for google hangouts apparently. So blocking someone from pinging you in google hangouts, requires going to their "google+ page", which.....doesn't exist.
 
Maybe through Currents or something?
 
I'm pretty sure it's just not linked up.
And it's just something they haven't gotten around to re-implementing in google hangouts separately to google+.
 
Totally not like Google to trash a product and not bother replacing its essential functions
 
user10655999
3:31 PM
Is it possible to get coordinates of text in scanned image using OpenCv ?
 
5:05 PM
Make it possible to handle E_COMPILE_WARNING in set_error_handler – #78537
 
 
1 hour later…
6:13 PM
Anyone using GH Registry had similar issue?
blob upload invalid: Request failed with : Cannot find package version with version id `56188`, please ensure that your token has `repo`, `read:packages` & `write:packages` scopes
docker login docker.pkg.github.com/... successfull
used personal token which has all required scopes
and I was pushing docker images with using that token few days ago
 
@Danack i saw a few days ago that my private email address stlil has me working for my old company of 4 years ago. That was probably from google+, i found no way to change this anymore
 
@beberlei wait what - you can't change that setting?
to be clear, the message I got today was from someone who I have a copyright strike against on youtube. Google gave them my email so they could contact me.....and that's just turning into abuse.
 
@Danack i am sure I can somehow, haven't found it yet
@Danack you use gmail? can you hover over my mail to internals from a few hours ago?
 
...
 
yeah
its not possible to edit this here myaccount.google.com/u/1/personal-info
 
6:24 PM
ah....that reminds me. Someone I know had uploaded a picture of them on a night out where they had drawn a mustache on themselves, and they had tagged themselves in the photo. Google had decided that was an appropriate image to use for the persons business email.
 
hah
 
just realized before that the php barcelona venue is the same that symfony catalunya was at in 2016
what hotel are y'all in?
 
6:59 PM
hello good morning
please has any one experienced CORS issues with laravel + react, read up on the issue applied the fix everything works fine but i cant help but wonder if i have compromised my code by applying the package github.com/barryvdh/laravel-cors
 
@beberlei I believe @JayIsTooCommon might have a good idea of who is going and where they might be staying.
 
7:20 PM
shmop memory leak – #78538
 
7:36 PM
@BobbyAxe it if you restrict CORS to the domains that you are using you are fine.
'allowedOrigins' => ['*'], this is bad, you need to set it to the domiainy you use
 
7:57 PM
@Danack I’ll get a list on the go soon. Closer to the time so people will commit more.
@beberlei if we have enough, hoping we can rent a R11 villa or something. Probs cheaper than a hotel
 
8:12 PM
@JoeWatkins just realised that this benchmark benchmarksgame-team.pages.debian.net/benchmarksgame/program/… might be of interest to you to compare against parallel. Or not, as the case may be.
 
hello
 
Hello, I am Galstaff, sorcerer of light!
 
Evenning
 
Evening
 
Good day?
 
8:27 PM
Housework day for me. Nothing says fun like scrubbing sinks.
 
Ah indeed
 
Segfault with json_decode – #78539
 
9:09 PM
how is everyone?
 
9:23 PM
And someone just posted a link in an Internal thread about PHP "dying" when the fucking conclusion of the article is that it's not dying
And just people ask less questions about it on SO
Like
Read the god damn article
 
oh do tell, where abouts
 
Last email on the Engine Warning RFC thread
(not the voting one)
 
Ah
I'm sat debating casting a vote on the engine warnings RFC. On one hand, I don't want it to appear as though new people are trying to stack the vote, on the other hand, I've debated the most contentious issues a lot and my primary motivation for starting to contribute code was to help move PHP in the same direction as what these changes bring.
 
@MarkR If you have voting rights, you have voting rights.
 
Is there a general architecture to follow when you can have infinite amount of relations between the data? For example, I have item A, which points to item B, which points to item C, which points to item D. My current approach is to have one table that stores all these items as individual rows and each one of them has a "parent id", which is really just a reference to the id of another row in this table
For example, if I have the following
1 -1 A
2 1 B
3 2 C
4 3 D
Then I interpret this as Item D is pointed to by id 3 (which is C) and C is pointed to by id 2 (B) and so on.
Is there a better and recommended way to handle this?
 
9:38 PM
You've basically just created a linked list in your table set, it's about optimal.
However, if your data is in a DB, you're either going to have to read it all, or do lots of union joins, or do lots of individual joins. Depending on size.
 
The depth is variable, so the number of items may change. Is there a better design than this?
 
Not off the top of my head, it's pretty much just a linked list
If you had multiple sequences in it, you could eat the extra data and create one-to-one references in a linker table bewteen every part of each individual chain, but it's expensive
 
I am not sure how I would fetch this data without having to make as many SELECT calls as there are items, because I wouldn't know how many links it has just by looking at the first element
 
That is where it becomes more expensive. You can potentially keep a separate table which links every item to the first item in the chain, or if you can enter the chain at an arbitrary point, every link between every two parts
I use the latter for a recursive tree hierarchy, but it can take up a lot of link rows, and requires extreme care when making changes
Alternatively, some database engines allow single-statement recursive queries, such as Mysql's recursive cte
 

« first day (3255 days earlier)      last day (1697 days later) »