« first day (3233 days earlier)      last day (1720 days later) » 
03:00 - 21:0021:00 - 22:00

3:16 AM
@Danack currently I'm just trying to understand the microservice pattern and trying out different ways of communication between the services. Thrift seemed like a popular RPC choice, but documentation is hard to get.
 
3:30 AM
Good morning
 
3:50 AM
Having trouble with PHP libraries. If I were to hire someone to come to my house and show me what I'm doing wrong, how would I find the right person?
 
 
1 hour later…
5:06 AM
The definition of the parameter newscope is not clear. – #78447
 
 
2 hours later…
7:21 AM
Happy Birthday @Ocramius. And much Laravel to you.
14
 
gut meurnin
 
7:40 AM
morns
Happy Birthday @Ocramius!
2
 
7:56 AM
Good morning.
 
excursion a going out or forth : expedition
 
8:21 AM
The definition of the parameter newscope is not clear. – #78448
 
Can someone point me to a discussion thread on converting warnings to errors, just for reference?
 
cmb
@salathe, there has not been real discussion on internals.
Most of it happened in several PRs.
 
@Ocramius congratz!
 
@cmb *sigh*
 
cmb
Well, I'd liked to have discussed the details in advance (see https://externals.io/message/106675)
But the general change should be fine according to https://wiki.php.net/rfc/consistent_type_errors#proposal
 
8:43 AM
@cmb The general change might be fine, I'd be inclined to think so as well. The specifics probably are fine too. But you don't know, nobody does without review beyond whatever huddle happened in the PRs (so many PRs!). For example, I think this sucks being just an Error (introduce a ValueError?). We have a process for a reason, it's exceptionally (pun intended) rude to completely ignore it without so much as a heads up to internals nevermind an RFC and proper discussions.
(btw, the above isn't addressed directly at you, just rambling to everyone)
 
cmb
@salathe, I believe this happend for time reasons, but I still think this should be discussed.
 
9:02 AM
mornings
In your opinion what is the best open source calendar to work with full calendar?
 
9:37 AM
Morgen
 
o/
 
\o
 
o/
 
9:53 AM
freman
 
10:04 AM
!!friday
 
10:17 AM
such friday o/
 
\o/
 
first week of work after long holidays is haaaard... but I managed :)
 
@pmmaga Still 8 more hours to fail :P
 
such an optimist ^^
 
:D
@StatikStasis Looks noice!
 
10:22 AM
last day for me before a week of holiday, mostly just spinning around on my chair :)
 
@salathe SO a normal work day for you?
 
hello all
 
:P
 
have a nice day :D
 
@PeeHaa Of course, gotta stay productive... xkcd.com/815
 
10:26 AM
:-)
 
@salathe same for me \o/
 
11:00 AM
Hey Erm,...i have a little problem that i don't know head nor tails over it: i have custom made cms running multiple mysqli queries(select * fro....) from different tables to check number of rows matching, sofar everything looks good, but the page showing the numbers i requested does not do its job instead it shows blank page or a msg indicating statement prepare failed
 
It should tell you why it failed
In case of a blank page it mean you didn't set up the displaynig of errors properly
!!errors
 
550
Q: How can I get useful error messages in PHP?

CandidasaI find programming in PHP quite frustrating. Quite often I will try and run the script and just get a blank screen back. No error message, just empty screen. The cause might have been a simple syntax error (wrong bracket, missing semicolon), or a failed function call, or something else entirely. ...

 
@CaptainCthulhu mind sharing the code? use gist or pastebin pls, don't post a text wall here
 
Unrelated to your question: please do not run queries based on *
Add the columns you want explicitly in your queries
 
11:19 AM
krakjoe@fiji:/opt/src/parallel$ php -n -v
PHP 7.4.0-dev (cli) (built: Aug 23 2019 11:39:38) ( NTS DEBUG )
Copyright (c) The PHP Group
Zend Engine v3.4.0-dev, Copyright (c) Zend Technologies
krakjoe@fiji:/opt/src/parallel$ make test TESTS=tests/base/001.phpt

Build complete.
Don't forget to run 'make test'.


=====================================================================
PHP         : /opt/bin/php
PHP_SAPI    : cli
PHP_VERSION : 7.4.0-dev
ZEND_VERSION: 3.4.0-dev
PHP_OS      : Linux - Linux fiji 4.15.4-041504-generic #201802162207 SMP Fri Feb 16 22:08:57 UTC 2018 x86_64
about a day and a half, and it's about half broken ...
it's all fixable though ... just a matter of time ...
 
11:33 AM
@JoeWatkins I can just start an rfc on upgrading array to string notices to errors and finish the fixing of tests later right?
There is no rush either way, but I am done for a bit looking at tests :P
 
12:07 PM
Hey guys, I want your opinion on something I want to implement
I have a php & mysql system and i've been having a lot of issues writing data to a specific field in the database because of encoding
Do you think using base64 is a good solution for this ? encode when writing and decode when reading ?
 
No
 
Why ?
 
Because it makes the data larger than needed
What are you trying to do in specific?
 
I have data coming in in different format, and sometimes mysql won't let me write a specific encoding into the field ... the data has html and other unwanted characters as well
When i set the mysql encoding to match one type it breaks for others ... utf8 did not work
 
How are you going to use the data later on?
 
12:11 PM
I'm going to output the data to the user
 
So you need to know the encoding used either way
?
> . the data has html and other unwanted characters as well
 
Hmm, yeah you're right but i'm not really concerned about what it looks like to the user, i'm interested in having the data stored successfully in the database
 
This is unrelated to encoding btw
 
Yeah i know i can escape html easily ... it is usually emoji that break the code and utf8 don't seem to be able to read them
 
Sure it does
 
12:13 PM
Can you give me an example ?
 
But it is mysql and it has stupid utf8 and somewhat sane utf8 modes
You are probbaly just looking for utf8mb4 instead
 
I am using utfmb4_unicode_ci
 
That should not fail on normal emojis
 
Yeah i thought the same
Can you think of any other reason why base64 is a bad idea ? i think size is not an issue in my situation
 
Inspect the content of data and double check the character set of the column / table
 
12:16 PM
I will do that
 
@NabilAli You cannot easily search anymore
or just simply look at the data
 
Yeah that's a valid point
 
As an alternative install postgresql :D
 
Will it work with PDO ?
I've never used it
 
Yes it will
But only partly joking though. Unless it is a new project one does not simply swap out database engines :-)
 
12:18 PM
Still looking for feedback on externals.io/message/106675
 
Yeah its new, I know better than to rock the boat on a big database :D
 
Morning! It's FRIDAY!
 
Thank you @PeeHaa I appreciate your help
 
@StatikStasis Hi FRIDAY! I am PeeHaa
 
oh dear lord... lol
 
12:22 PM
@NabilAli I would really look into the data you got though
If you do not know what data you are handling bad things will happen
 
Was uploading a video from a talk I did recently at a board meeting. If anyone is interested: youtube.com/watch?v=qrinWE-71mI
5
 
Yeah that's what I'm afraid of, I have no control over the data or what it contains, This is why I'm trying to accommodate different kind of encoding
 
What is your use case?
 
RIP Rebecca Black
 
As in most cases you do have control over what you accept
 
12:24 PM
@StatikStasis May your IDE delete closing brackets and semicolons at random.
9
 
hehehe
Got him!
 
I'm just glad I found another link on youTube. Everyone knows the original URL by heart in here now.
 
Yeah I do have a little control over that, I will focus on putting restrictions on what to accept rather than accepting anything and go through hell figuring out how to read it
@MarkRandall Don't they have a plugin for that?
 
One last thing @NabilAli. As a last resort instead of hex encoding data I would rather store it as binary
 
bin2hex ?
sorry hex2bin ?
 
No. Store the raw data
You do not need the hex intermeddiate
But as said I would do that as a last resort
 
12:42 PM
Hello all! Is it possible to replace zend_parse_parameters() with raw EG structure access? Need to work with stack structure directly
 
Alright, thanks a lot @PeeHaa
 
Wes
1:08 PM
@PeeHaa @StatikStasis do you happen to know a song that has almost exactly the same music as this one youtube.com/watch?v=d1RXEZK07Mo lol
it should be fairly recent, not older than 5 years
 
What day is it today @Wes?
 
It's real @PeeHaa
@Wes You mean similar music?
 
Wes
@StatikStasis no i mean the music is almost identical
 
fwiw- I could have been Becca'ed easily. I just clicked without checking lol.
 
Nope
 
Wes
1:10 PM
@PeeHaa ah no i am way beyond that i promise it's not becca
 
Well all those tracks are basically all the same
 
It reminds me of a lot of things. But I can place on something exactly identical atm.
I like it!
Sounds like something I would spin back in the DJ days.
@Wes @PeeHaa Reminds me of the music from this era youtube.com/watch?v=KkhGkRahU6g
I loved that music.
 
Wes
lol
does shazam still exist
 
Most of that score was so awesome (to me.) But I loved 90s music.
 
@MarkRandall rare curses. lol
 
1:41 PM
hi
quick symfony question, when decorating a service, is it possible to still use the old one the same way as before?
I basically just want to change some behaviour of a service for an additional usecase
 
Why wouldn't you? Nothing changed with the "old" one.It's just decorated. Unless symfony changed the meaning of decorating a class
 
that's what I'm asking, the docs confused me a little on that one
> The decorates option tells the container that the AppBundle\DecoratingMailer service replaces the AppBundle\Mailer service. The old AppBundle\Mailer service is renamed to AppBundle\DecoratingMailer.inner so you can inject it into your new service.
 
So the question is about DI?
 
yeah
I mean, I guess I could just pass the "old" service
but I was wondering about the decoration bit there.
 
It seems that if you use autowriring it will always inject the decorator so you would have to inject it yourself
 
1:48 PM
ah, I see.
in my case it's about a GuardAuthenticator
so I'm not sure how that'll work. I don't use parameter autowiring in this case, but the authenticator is used in a firewall config
and with those authenticators, they receive username and password as params, so I'm not sure how injecting it manually will work. I'll just give it a shot. thanks
 
2:19 PM
Phew, for a split second there, before watching his talk, I thought @Statik was actually actually an serious programmer.
 
2:32 PM
I just pretend to be one in real life.
 
2:43 PM
@FélixGagnon-Grenier Plus you should have known it would not have been about programming. Boards don't understand that stuff outside of silicon valley.
 
2:55 PM
!friday
@Jeeves yo
 
@samayo use two exclamation marks
 
!!friday
 
Ah, been away for so long I forgot how it works
thanks @mega6382
 
:)
 
3:33 PM
anyone to take a look at this piece of php queries i don't get what seems to bethe problem
 
What is the array-equivalent of Serializable?
some interface that allows casting a class instance to array
 
Make your own if you're using it internally. Or serializable otherwise.
Well, serializable is easiest to do by encoding an array, but I'm sure you get the point. a toArray() is just easier.
 
in short, there isn't, right
I just build my own toArray
 
....
damn
 
Guess I'll do that, thanks
 
3:58 PM
@LucasBustamante feel free to build your own, with blackjack, but also: gist.github.com/Danack/3091169b4be64ba8e1f79788c8120a96
@LucasBustamante fyi I feel very strongly, that this is the case where a function is the correct thing to do, not anything OO-related.
 
@Danack why Serializable would be OO related, but toArray wouldn't?
 
> some interface that allows casting a class instance to array
I was replying to that.
 
We might one day get a toArray operator but doubt it will be anytime soon
I expect if so it would only work with $x = (array)$obj;
 
@MarkRandall I really doubt that will ever happen. There's very little benefit compared calling a function, and lots of downsides.
 
It's unlikely, but if it ever came as part of a univeral casting construct. Which would be nice.
 
4:22 PM
I got a mail from microsoft today :O They implemented the 3d dom view from the old firefox into chromium. I guess because i requested it? webwewant.fyi/wants/30
i did not expect this sort of os work from microsoft. But they realy decided to work with the whole chromium team
 
I think it's great that IE / Edge engines are dying, but I worry we're getting awfully close to a monoculture. They need to throw a couple of bill at security audits
 
Yes. On the other hand they dropped FF support for e.g. Skype
 
4:58 PM
@MarkRandall Like more magic methods?
 
The definition of the parameter newscope is not clear. – #78449
 
@Jeeves You already said that bro
Wait wat
@salathe how / why was this closed as spam? bugs.php.net/bug.php?id=78448
Ah I see. OP keeps opening new issues for everything that pops up
 
@2dsharp why do you think microservices are anything you should be looking at?
 
happy frydai
 
o/
 
5:17 PM
\o
 
What the weird auto-static closures, PHP 5.4 through 5.6... 3v4l.org/Rgo87
 
 
1 hour later…
6:33 PM
@kelunik I was quite busy today so can work on that PR in amphp/redis on Monday
 
6:43 PM
Does anyone know about ph bug #76415?
php bug**
I don't see any activity on it since 2018, it's not closed, but is still happening to us on php 7.3
 
That sounds like you have perfect knowledge of it?
which tbh, isn't that helpful.
 
dan, that's not diected at me, right?
 
6:59 PM
what is the purporse to use mvc vs pure php ?
 
to seperate concerns
 
I think it just gets more organized , but I don't see difference at all
 
what kind of difference are you looking for, exactly?
 
@ZacharyCraig I think the same organization can be done with pure php
 
i mean mvc can still be pure php
the point is just to seperate out the view from the business logic
 
7:02 PM
yeah
for example I don't see the need of a controler
 
again, just more seperation
look at something like laravel and how stuff works and you'd see that you know where things are and can seperate stuff for handling requests from your business logic for the most part
 
I think it makes you to write more code
 
maybe? i mean even if you do you're making your code more compartmentalized and easier to maintain
if you're set in your opinion on that there's nothing i can say that's gonna change your mind, but MVC is an adapted standard in most frameworks for a reason
73
Q: Why should I use an MVC pattern?

Billy ONealIt seems everyone doing web applications nowadays wants to use MVC for everything. I find it hard to convince myself to use this pattern, however. I understand the general idea is to separate the backend logic from the frontend that represents the program. Generally, it seems that the views alway...

 
MVC. blurgh.
 
@ZacharyCraig I will read
 
7:06 PM
is... mvc not something people like here?
 
MVC in web contexts is lacking in a lot of ways. It is based on each part communicating with each other part, and that sucks for web dev.
 
why's that?
 
You don't typically want your front view interacting directly with your models.
 
@ZacharyCraig Laravel is not mvc though
 
@PeeHaa what?
 
7:10 PM
Nor is it specifically easy to see where things are because of heavy use of magic
@ZacharyCraig It's not
 
"Laravel is a free, open-source[3] PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern and based on Symfony"
 
Take a look at action domain responder or model-view-adapter if you fancy a superior version for web design
 
Why do you think it is?
@ZacharyCraig That's wrong
No idea where you got that from :)
 
Wikipedia's page on laravel
Why's it not MVC? it's got models, it's got controllers and views, is that not implementing mvc?
 
Well wikipedia is wrong :)
 
7:12 PM
Oh because it's well known Wikipedia is the source of trust
 
@ZacharyCraig The fact that it got "models" is already wrong to start with :P
 
Did I ever say wikipedia was a global source of truth? I was just asking why it's not and every answer has been well why is it, you're claiming it's not, im asking why
i didn't realize this was php court lmao
 
If it would have been a court you would have been sentenced to community service for mentioning laravel :P
 
^:D
 
> it's got Michaels, it's got Charles and Victors, is that not implementing mvc
 
7:14 PM
More serious though having things called: models, controllers and views makes something mvc just as much and using classes make your thing OOP
 
I mean i was working on magento before, i like laravel a lot more, i know they're two different beasts but why all the laravel hate?
 
Yeah magento is also pretty fucking terrible :P
I am sorry for you
:-)
 
1/4 broken, and now going round in circles ...
also, I just got confused between 1/4 and 3/4, I'm quite tired now ...
 
Joe, what's 1/4th broken, laravel? or are you talking about a previous issue you mentioned in chat
 
can we ban magento on fridays plz
 
7:16 PM
If you really want to see something that makes MVC cry, I add my actions and my view in the same class ;)
 
laravel is 100% broken, and I'm talking to whoever I'm talking to ...
 
Poor Joe
 
Regardless what you may or may not know about MVC.Forget about that broken term
 
Honnestly a micro framework does the job
 
Separation of concerns is what it is actually about
 
7:17 PM
I actually quite like AutoRoute for the routing because it's doesn't duplicate the route naming
But yeah the important thing is the separation of concerns (and other "clean" code patterns)
 
I like pure php, I think it makes you write less code and keep it simple
 
In my 10+ years of using PHP, I have not once found a good enough reason to use a rendering templating engine other than PHP itself.
okay, except a custom bbcode parser
 
@OtávioBarreto What is your definition of "pure php"?
 
i mean i could counter that things like blade or twig save time and you get neat stuff like layouts etc, but i'm anticipating you're just going to tell me you can get the same with pure php
 
Much better IMO to use PHP itself as the template engine
 
7:21 PM
@MarkRandall I am in the same camp, but whatever floats your boat when it comes to templating
 
@PeeHaa no frameworks, no complicated rules, just keep it simple code
 
I personally see no reason for the intermediate step of a templating engine
@OtávioBarreto You are at least using 3rd party packages right?
 
@PeeHaa yeah composer
 
I do like using Twig, but I could for sure not use it
Just working with people Twig templates are usually easier to handle for other people
(in my experience)
 
I just like the way blade works, it's handy, again if you wanted you COULD implement everything else again in php, but why would you
 
7:24 PM
@ZacharyCraig My girlfriend just said to go watch the movie instead :P
 
what movie, im missing a joke here i assume
 
@Girgias That's the reason people keep giving me (so there is probably truth in it), but I do not see how pseudo php is easier than actual php
It's just the same constructs with slighty different syntax
 
Easy, just let them write stuff and the engine takes care of escaping shit without needing to constantly remind people to use a special function
 
And yes it was a bad joke
It's friday afterall
 
i know of blade runner, never heard of blade
 
7:26 PM
Also the syntax for blocks is "symetric" so some people like that
 
then again i'm only a year older than that movie so
 
@ZacharyCraig :P
 
Default escaping of HTML is nice. Then again, for more complex pages, I like things like being able to call a function that renders blocks without any need to faff around with creating plugins
 
Oh true
 
@Girgias htmlscape to prevent xss?
 
7:27 PM
I'd rather use htmlentities
 
eeeeeeew
 
:D
 
@Girgias GoT shame
:D
 
@Girgias yeah your html header should be in utf-8 too
 
Well yeah
 
7:28 PM
Personally though the main reason I use pure PHP and I do so in the same class as my action, is that it's all static binding. Anything which is going to be used in the output is going to be a class property somewhere. No godawful passing of variables via arrays
 
Poor arrays glorious typeless data
 
Strict type all the things!
 
What do you mean my string can't be an array >:(
typed arrays would be nice to have actually
 
@MarkRandall <?php declare(strict_types=potato)
@Girgias Meh give me generics instead
 
Oh true
That's even better
 
7:32 PM
Oh God yes. The day we get generics is the day I tell my clients they're going to pay me for 2 months to go back and re-write half the code.
 
But I don't even think I got the skill set to make typed arrays so even less Generics
 
@Girgias @JoeWatkins already proposed it at some point iirc
 
Oh, Joe our second lord and saviour ?
 
And as I understand it generics is a bitch to implement
@Girgias What do you mean second?
:P
 
Nikita is the first one :p
 
7:33 PM
It will be yeah. It's a proper jesus feature though. Game changer.
 
Does @NikiC have a pink hat?
drops mic
 
Ah fair point
 
ThW
Declared Properties would be nice, too ...
 
I dunno about game changer, it's a nice to have ... but people were using java for the same things after generics were implemented, it's not like it opens new avenues, new ways of thinking sure ...
it's much harder to implement than it first seems ...
 
I'm only just starting to get to grips with PHP, and I've not yet touched the parser. If I ever do my plan is a) generics and b) classes that can't have dynamic properties added.
 
7:36 PM
and ftr no, nikita does not have a pink hat ...
 
@MarkRandall The latter should just be fixed for php 8 imo ymmv ianal
 
b makes no sense
 
@JoeWatkins What doesn't make sense
whoops
 
classes that can't have dynamic properties added
 
The amount of times I've cocked something up because I've typo'd a property name :| I mean I could just make __set throw an exception, but that means having a __set
 
7:38 PM
Didn't Ocramius make a package called Dont ?
Were you can add traits which define magic methods which throw ?
 
designing applications is different to designing languages ...
that's a problem in your application ...
 
Of course. But a IMO a large part of any language exists to facilitate preventing such errors from being possible. That's why we have strict types, protected properties etc.
 
that you can add dynamic properties to (almost) any object is core to php ... the best (only) reason to prohibit that, would be performance reasons - cutting down the size of zend_class_entry and speeding up property access ... but we already made the optimizations for declared properties, and just dropping the table saved 8 bytes per class entry ...
doesn't seem worth it ...
@MarkRandall but you're just calling it an error, it's actually a feature of the language ... if your library/application code wants to consider it an error, then your library/application code should deal with it as such ...
 
I'd probably just have a keyword or annotation that initialized __set in the zend_class_entry with a function that always threw.
 
ThW
Using a trait for this should not be much different.
small enough piece of code, and the performance doesn't matter because it is the exception/error branch.
 
7:51 PM
Aye traits are what I use now. Although it does make the static analyser think there's something there when there shouldn't be. I understand dynamic properties are a language feature, but no reason IMO that there can't be a language feature to not use that language feature.
Another example is referencing an undefined variable and getting a NULL. It's also a language feature, but I still think there's room for a declare(...) which makes the engine Error out and provide another tool in the toolbox for safer coding.
 
Current legacy app calls curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 22 times. Awesome! :D
 
Those maniacs, they should have wrapped their curl calls in a helper, then they'd only have to turn off verify peer once ;)
 
lol
 
8:15 PM
Well that was 30 minutes of my life crawling through zendtrying to find where undefined variables were being detected when passed via reference to a function.
Must be something about the way it's coded with all the macros, VC19 can't create a call hierarchy for almost anything in zend_vm_execute
 
@JoeWatkins It's just sucky dealing with it
Sucky as in you should not need a trait to make things sane
Or magic for that matter
 
8:30 PM
I love magic
Great at parties
And I used to love Magic The Gathering
 
I can imagine it now... trying to show off to some people who you may be interested in.... "I shall now make this dynamically declared property... disappear!" ... tap tap (unset)
 
I once tried to pull a woman by making a bunny disappear. Sadly she wasn't impressed when I opened up element explorer and deleted it from the DOM.
 
Oh dear lord- that's terrible...
 
Yes. This is why I'm single (that's my reason and I'm sticking to it).
 
8:39 PM
@StatikStasis Its called xtc
 
Oh boy... the stories I could tell.
 
:-)
 
@PeeHaa A language needs to be powerful enough so that people can make their own decisions about what tradeoffs they want. You want to have an exception when using an undefined property? Use a trait to do that. Other people don't want that? They are free to do so. Trying to make a language safe will make it not have shite tradeoffs for some people. See also Go and it's lack of exceptions.
 
I don't think that was quite the argument @Danack. It was more that the more tools a language provides for a programmer to express their intent, the more the language can provide safeguards when they do something that steps outside of those declared intentions.
 
> when they do something that steps outside of those declared intentions.
So you agree declaring an intention like:
Jan 12 '14 at 17:54, by Danack
trait SafeAccess {
	public function __set($name, $value) {
		throw new \Exception("Property [$name] doesn't exist for class [".get_class($this)."] so can't set it");
	}
	public function __get($name) {
		throw new \Exception("Property [$name] doesn't exist for class [".get_class($this)."] so can't get it");
	}
}
is the right choice. Cool.
 
8:55 PM
It's a workable choice, it's certainly not an ideal one IMO, as without deeper inspection the quasi-interface explicitly declares it intends to have dynamic properties set.
 
03:00 - 21:0021:00 - 22:00

« first day (3233 days earlier)      last day (1720 days later) »