« first day (1885 days earlier)      last day (3062 days later) » 

1:03 PM
An actual serious bug in PHP 7: bugs.php.net/bug.php?id=71115
allegedly.
 
it's there alright
I worked around it in pthreads ...
not like that ... that's horrible ...
 
Abe
do you remember the draw 7 perpendicular lines sketch? youtube.com/watch?v=BKorP55Aqvg youtube.com/watch?v=B7MIJP90biM
 
Great. Now make it be printable.
 
Abe
:P
get a 3d printer!
 
Ok, maybe I'm just out of touch, but the picture this eyeglasses company is using is terrible
 
1:24 PM
Why is leopard print anything still a thing
 
@Sean Because trailer trash I would assume :)
 
@Sean With the advent of 3D printing, it became a lot easier to print leopards so we're seeing a resurgence.
In the past you had to just print a load of yellow sheets of A4 and a few black ones and papier-mache them into a leopard, it took ages and was really messy so no-one really bothered.
 
:V
 
/golfclap
 
mogguh @AnmolRaghuvanshiVersion1.0
 
Abe
no way i can git clone just the latest commit right?
 
@Abe shallow clone?
 
Abe
checking the doc
 
1:42 PM
@PeeHaa I read shadow clone :D
 
@Naruto You already have glasses IIRC right? ;-)
 
We should probably define GC_REFCOUNT_INC and GC_REFCOUNT_DEC macros and use __sync_add_and_fetch and __sync_sub_and_fetch in ZTS mode
 
no I don't, my mind just does what it wants sometimes.. Including reading stuff that isn't actually there... :P
 
Burninate / synonymize
Don't burninate / synonymize
tag poll for great justice! @all
 
Abe
would also burinate 5
 
1:49 PM
We / they created a synonym for it because it was impossible to fix AFAIK
 
@PeeHaa Other suggestion: rename php-7 to php-7.0
 
Eeeew
 
@PeeHaa What did we do with other php versions?
We synonymized AFAIK
 
1 min ago, by PeeHaa
We / they created a synonym for it because it was impossible to fix AFAIK
@MadaraUchiha slowpoke :P
 
@PeeHaa Define "fix"
 
1:51 PM
@Danack I've already encountered that…
 
synonymize?
 
I assure you, you won't be able to here.
 
Too many questions tagged
 
I think is ok but don't tag the dot releases. Need to burninate and the like
 
If your definition of "fix" is what I think it is.
 
1:51 PM
/cc @FlorianMargaine
 
Oh god there is a 5.6
 
@Machavity uh, no? every minor has its own changes…
 
user895378
morning o/
 
O.o
 
5.6 is just as different to 5.5 as to 7.0, IMHO.
 
1:52 PM
Somebody should watch the gate for these things
 
@rdlowrey hey!
 
@Danack yeah I already knew it, I prefer the original though
 
@rdlowrey Ohai o/
 
@bwoebi Yes, they do. but they're not massive changes that require their own tag
 
Unless you have a major major change like ES6 to ES5 with new syntax and crapton of new features, I don't think that you need separate tags,
 
1:54 PM
@Machavity There is massive changes, just the a bunch of the changes are subtle and usually unnoticed and even undocumented.
 
I am agree with @MadaraUchiha
 
@PeeHaa I happy that you am agree.
 
:-)
BTW I see the hatwhoring has started again. Anybody knows if chat is involved?
My meta search turns up nothing useful
 
@PeeHaa I wouldn't be surprised if it did*
 
@PeeHaa It is
 
@Machavity No chat in there when ctrl+fing
@MadaraUchiha In what way?
Starwhoring again?
 
@PeeHaa pretends to hate hats meanwhile creating a poll to attract starz.
 
:P
nvm found it on the wb site
> post a message in chat within ±12 hours of the UTC New Year’s begin that gets starred
 
It's because of these lengthy posts http://meta.stackexchange.com/questions/270587/toward-a-philosophy-of-chat?cb=1
that I don't participate in meta anymore -_-
 
2:13 PM
> Chat is not transient: what you say tonight while drunk still exists, in public and attached to your account, tomorrow.
So true :P
 
how to check if the connection is still alive with server using reactphp ? even sending write requests does not trigger an error
 
Morning.
 
morning LeviMorrison
 
I see even more people in r/php have been downvoted because people disagree with them.
That is not what downvoting is for :/
People should need to earn the privilege to downvote on that subreddit, sheesh.
 
@LeviMorrison I'll raise the subject. I have a decent example of someone being voted down for unambiguously poor reasons.
 
2:23 PM
I just messaged the subreddit's moderators through the Reddit tools.
Not sure who all gets that message.
 
Oh, ok. And apparently the downvoting can't be removed - it can only be hidden by CSS.....
 
Ah, that's funny.
 
Q: will this: shell_exec('useradd -G ftp ' . $username); create a ftp user with the dir: home/$username ?
 
this is the post that got downvoted to -2 before I started pointing out that people were behaving like a bag of dicks.
 
But yeah this downvoting thing is something that has been bothering me lately.
@Danack Yeah, I've had the same thing happen to me.
 
2:27 PM
@KristianHareland why don't you try it and see? (I think it depends on other settings whether home directories get created or not).
 
In the case of the "What is FIG?" thread there are a lot of downvoted replies that aren't hate-speech or anything.
They just (apparently) don't share the same vision as the other people.
(Though there is one in there I think that should be downvoted)
But the whole point of the discussion is to determine how people view the FIG.
Nearly any comment that is about the FIG is going to be on-topic…
 
....which is what I want to post to that thread, but haven't been able to work up the energy yet. "writes PSRs primarily for itself, and others can adopt or ignore as they wish;" No we can't ignore them, because there are a huge number of people who unthinkingly insist that projects must follow the standards because "they are standards Donny.".
And people suggesting, "oh you can just ignore them" is dismissing how annoying it is to constantly have to have the same discussions over and over again.
 
Yeah.
 
Actually I'll just post similar to that.
 
Comments on r/php about "can I haz feedbak?" are overwhelmingly:
 
2:31 PM
@Abe currently, yes
 
- PSR fixes
- phptherightway.com
 
Which are probably fine a lot of the time......
 
Eh, if they have consistent code styling I hate the comments on using a different code style.
That is not fine.
If they don't have a consistent style then it's okay.
 
Abe
@NikiC planning doing some changes to scalar_objects ? should i actually attempt an api definition? :B
@Ocramius i checked your instantiator. do you know which is faster, the unserialization hack or reflection?
 
@Abe none. If you check the sources, we use clone whenever possible.
you use unserialize() or ReflectionClass#newInstanceWithoutConstructor() only once
 
Abe
2:37 PM
ah. unless a __clone is defined, right?
 
Correct
 
Abe
how do you do that, you hold a sample instance internally
 
Yes
 
Abe
hum, gotta try it better then. looks interesting
 
I need to put together a suite of CS fixer rules at some point to then include it in my projects.
 
2:43 PM
LOL, gotta love the FIG
 
@ircmaxell what happened?
 
@bwoebi they're having a poll: "are we just doing stuff for ourselves or should we consider ourselves a standards body"
 
ah
 
oh god
how the hell are we even supposed to keep up with all that noise?
/me opens discussion on gmail and presses "M"
 
It's bad when someone who is part of FIG mutes it…
 
I'm not the one who votes for doctrine btw
 
Lucky you.
Can you pressure whoever does vote to participate and stay with their documented focus?
 
Yeah, but seriously, either somebody does a tl;dr or I just don't care
 
2:50 PM
I like that FIG collaborates. I admit that part of it is a good thing.
 
The r/php thread chain is huge.
 
@Ocramius tldr: the majority of the community wants them to recognize that they affect more than just themselves, but most FIG members deny that at every turn
 
@ircmaxell it's not like they aren't already doing that outside the FIG itself anyway
anyway, I'm a software designer, not a frikken committee, therefore "mute"
 
I'm going to write an RFC and patch that let you use & for by-reference arguments to functions
Removing call-time pass-by-reference was a good idea, but I don't think removing the ability to use & in function calls was
 
@Andrea besides horrible performance hacks, is there a reason to ever use by-ref?
I used it to avoid method calls in very (very!) rare conditions
 
2:54 PM
So what you're talking about is not call-time pass-by-reference?
 
@nikita2206 No.
@Ocramius I've used it to implement variable scoping in yolisp :p
 
@nikita2206 It's rather allowing the call-site to ensure that the function takes it by reference.
It doesn't force it to - rather it makes sure it matches.
 
@Andrea any reason why you couldn't use an object called "scope"? :P
 
@LeviMorrison and to make it obvious to the person reading it
@Ocramius not really, I just ended up using an array because that was simpler
 
oh, wait, nvm, I see what you mean there
 
2:56 PM
@ircmaxell The gmail group did bring up a good point. What represents "The majority of the community"?
 
ah, so in essence it's just a change to the parser?
 
@nikita2206 mostly yeah
 
Plus there are sub-communities that don't participate much online.
 
if you didn't know of say, array_push, you wouldn't know that array_push($array, 2); modifies $array
 
I know Brigham Young University has several groups that meet in person and don't participate in online communities.
 
2:57 PM
but array_push(&$array, 2); makes it obvious
this also has the advantage of making the BC break of removing call-time pass-by-reference less bad ^^
 
@LeviMorrison "FIG collaborates." I'm not so sure. I think the way FIG has been setup is inherently an adversarial process. i.e. for the PSR-6 the passing vote, was a win for the people who wanted it to pass, and a loss for those who didn't want it to. aka I'm beginning to think that the way FIG is setup is closer to a zero-sum game, rather than a win-win scenario.
 
@Sean which is a good question, however they have been parroting that "nobody thinks that way", and now they have a pretty dam strong indication that "nobody" is not the correct way of saying that, they are trying to change the rules.
 
Or at the very least, it's nowhere near an optimal strategy to make everyone happy.
 
@Danack well, that's why many of us are trying to push them to pass things without strong downsides. Not "just something"
 
@Danack note: also really worried that pretty much every second project is being accepted
 
3:02 PM
@Ocramius Which wouldn't be such a problem if FIG was more focused on a curation role "interoperability stuff" between projects, instead of being a standards setting body.
 
No, the point is that everyone just wants a voice in it, rather than actually being interested in the product :P
 
i.e. allowing projects to document how certain components work, in a way that won't get changed horribly by one persons decision, whilst not having those decisions have to be the One True Way.
@Ocramius "everyone just wants a voice in it" If it's going to be a standard that the FIG is going to be 'suggesting' that projects follow for years to come, then it would be appropriate for everyone to have a voice in it.
 
if their goal was interoperability, there wouldn't be voting nor standards. They'd all just say "let's all just use this interface, kthanxbai"
 
Which is why not taking that path avoids that result.
 
@Danack "everyone just wants a voice in it" as in "look ma! I'm in FIG! I'm famous"
that's what I mean, if it wasn't clear
 
3:05 PM
@ircmaxell You mean stuff would get done?
And then maybe be abandoned if it was found to be less than optimal and a newer interface could be defined?
I don't see the problem yet other than:
 
@Danack FIG's concern is interoperability though
@ircmaxell you need an interface that works for everyone though
 
@Andrea I think there is difference between helping projects achieve interoperability and between setting a standard that most projects should use.
One of those is an inherently adversarial thing, the other is not.
 
@Danack a standard with the expressed purpose of interoperability
 
@Andrea well, that interface can be one that exists in the real world rather than some new one that's centralized
 
3:08 PM
posted on December 14, 2015 by nlecointre

/* by The coding love */

 
@ircmaxell in PSR-7's case there was no such interface
 
@Andrea Or to put it another way, I think their stated goals is not in alignment with the mechanism of how they're attempting to achieve it. And the mechanism is actually in conflict with the stated goal.
 
@Andrea sure there was, Symfony's HTTPKernel Request/Response
 
btw everyone here should read:
The PHP-FIG is showing classic systems behaviour.
en.wikipedia.org/wiki/Systemantics: "Once a system is set up to solve some problem, the system itself is new entity which engenders new problems relating the development, operations, and maintenance of that system. The author points out that the additional energy required to support the system can consume the energy it was meant to save. This leads to the next principle."
> The total amount of anergy in the universe is fixed. The author defined anergy as the energy required to bring about a change. This as meant as a tongue-in-cheek analog of the law of conservation of energy. One of the problems that a system creates is that it becomes an entity onto itself that not only persists but expands and encroaches on areas that were beyond the original system's purview.
/dat wall of text.
I really cannot recommend that book enough.
 
@Danack basically, CBA to read reading about reading a reading on the long reading in the FIG ML?
 
3:14 PM
@Ocramius eff the mailing list. You should still read that book. It's relevant to a lot of thing not just silly FIG stuff.
 
@ircmaxell Symfony's Request and Response aren't appropriate for all applications
 
@Andrea it was an emerging interface btw, even if kinda shitty
@Danack oh, I fully agree, I was just evidencing that there's a "CBA" in front of my sentence
 
Maybe we could have both, FSRs and PSRs … the FSRs for interop where the same goal is to be reached with same requirements and it's just a matter of API design, while there may be room for different approaches for different needs. And the PSRs for general ubiquitous standards (like e.g. PSR-0, PSR-3, PSR-4, future security related PSRs, ...) and interfaces which are really generally applicable (like the logger).
 
I wonder why PSR-7 is an interface
it seems to me like it would be better as just a single implementation
especially as it's immutable
 
Yes. Yes.
 
3:17 PM
@Andrea Mostly because the FIG doesn't standardise implementations I believe. And yes, I agree it should have been a standard implementation.
 
It shouldn't have been a PSR at all.
 
@bwoebi Why not? It helps a lot of projects interoperate.
 
I mean, well, it started as something which did make sense as an interface
But now it doesn't, so you end up with a bunch of implementations, which is kinda silly
more room for bugs
 
s/bugs/surprise features/
2
 
@Andrea Agreed... interface is so specific doesn't leave much room for varied implementation
 
3:21 PM
@Danack I don't see why you should need to pass messages around. You pass the messages contents around, not the wrapper.
 
You don't want to use it, I don't want to use it. Other people want to use it. That is all fine.
 
something which I don't think PSR-7 specifies and that is likely to thus create bugs is PHP's name mangling in globals
 
What is the best text editor?
 
@bwoebi no, you want the metadata too
and you want it in a usable format so you don't have to re-parse it every time it moves to a different piece of code
@ryvnf vim
(probably Sublime Text actually)
 
Pff, my view on Spotify users just degraded drastically. `➜ ~ wget 'https://spotifycharts.com/api/?download=true&limit=200&country=global&recurrence=weekly&date=latest&type=regional' -O - 2>&1 > /dev/null|grep -i bieber|wc -l
21`
 
3:23 PM
sure, have a very, very simple format like a Dictionary mapping to an Array.
 
How does that guy make up 10% of the top tracks played :\
 
@bwoebi you need several arrays
 
You don't need full-blown OO for these fundamentals
 
@Andrea Cool! I know Vim but have not tryied Sublime
 
@Andrea hmm?
 
3:24 PM
@bwoebi URL components, query parameters, headers
form data
cookies
 
form data, cookies, query params etc. are all just extensions to HTTP
 
yes, and you don't want to have a different way of handling them on every second library you use :P
 
Cookies are just a specially formatted header, just like form data or query params
 
that's the point of it (and it's working really well)
it's basically a MCD
@bwoebi and in fact they're not dealt with in PSR-7 - there is an extension for that, called PSR7Cookie or something like that
anyway, it works really nicely, and it indeed improved quality of code here already, plus saved a few devs in my circles from foot-gunning themselves
 
@Andrea we normalized these things into typical HTTP/2 headers (those with the leading colon) (I mean query params, protocol etc.)
 
3:29 PM
@Ocramius there's getCookieParams
 
@Andrea in the ServerRequest IIRC
 
yeah
the regular request lacks it, thankfully
 
But not for Client
and there it's even inconsistent… provides a way to get them, but not set them?!
 
@Andrea I know, but you're missing my point.
 
@bwoebi no, it does provide a way to set them
look at the following method
 
3:31 PM
@Andrea it does? (except by manually setting the header rawly)
 
@bwoebi why would you need to set cookies on a request object?
 
withCookieParams
 
yeah, but again, can be done via header anyway :P
 
@Ocramius oops, my bad… I mean get it on both sides
 
that's the one I currently use - works quite nicely
 
3:32 PM
@Andrea I see nothing about cookie lifetime etc.?
 
// Get a collection representing the cookies in the Cookie headers
// of a PSR-7 Request.
$cookies = Dflydev\FigCookies\Cookies::fromRequest($request);
why?
 
@bwoebi that's because it's an "incoming" request
 
why static methods?
 
@bwoebi because it only exists to give you the info $_COOKIES would give you
 
@FlorianMargaine because it is a named constructor?
 
3:33 PM
@Ocramius huh? I need to know how long the server is expected me to store them?
 
@FlorianMargaine it's a constructor
 
@bwoebi no, the server doesn't store cookies. The client stores cookies. The server isn't even told about cookie lifetime
 
I don't see why not new Cookies($request)...
 
there should be a flag for constructor static methods so they're not inherited
 
3:34 PM
You are confusing Cookie with Set-Cookie, which are different headers, used separately in request and response
 
@FlorianMargaine because there are other ways to create it
 
@FlorianMargaine read that article please. Named constructors make A LOAD of sense for Value Objects
I pretty much only make private constructors for VOs nowadays :P
 
@Ocramius talking about clientside, obviously…
 
@bwoebi then you only deal with the Response and SetCookie, not with a request object
 
@Ocramius right.
 
Abe
class Cookies{ __construct(...){} }
class CookiesFromRequest extends Cookies{ __construct($request){} }
 
@Abe that is not how inheritance should be used.
you may now have two exactly same cookie objects that are different because of different types.
 
Abe
that's your opinion :B
 
@Abe no, that's simple inheritance design
It's not an opinion, it's how the language works :P
 
@Andrea Or just static methods should have never been inherited....and constructors are a magic form of static function.
 
3:38 PM
@Danack yes plox
 
Abe
define "different". of course it doesn't work and in many other cases too, because == in php is not polymorphic
 
If you can think of a better rationalisation legitimate and totally not made up reason to do it other than "because it was a mistake to begin with", I would write the RFC.
 
@Abe regardless of the comparison, you now have different types for the same thing, and that just because you didn't see that the difference isn't in the concept, but in the instantiation logic
 
Abe
define "instantiation logic" :B
 
@Abe anything where you stuff things in and new things come out
 
3:43 PM
@Danack oh yeah
now that you mention it, static method inheritance makes no sense
do other languages have it?
11
Q: Correct way to handle PHP 7 return types

S.PolsI'm busy creating an application and i want to use the PHP 7 return types. Now I read on php.net that it was a design decision that it is not allowed to return null when a return type is defined. What is the correct way too handle this? One option is a try...catch block: public function getMyO...

^ oh god this thread
 
That throwing exceptions feel is fekking horrible
I'm 99% sure OPs code just sucks instead
 
Abe
@Andrea correct. static methods wouldn't be that bad if we could change arguments, visibility, etc when extending a class
 
what the fuck //sorry for caps
 
public static uninheritable function fromGlobals(...) ?
 
MOAR KEYWORDS
I propose buzzlightyear fromGlobals(...)
 
3:49 PM
May somebody please tell me which data-structure is more better as an API ? (for using if as client side for e.g an android-app)
 
@Shafizadeh one that doesn't come with abbreviations
:P
 
@Andrea I don't know and I'm scared to look. Apparently C++ made it easier to do inheritance with en.wikipedia.org/wiki/C%2B%2B11#Object_construction_improvement:
 
Abe
@Andrea inherited is fine as long you are allowed to do everything you want with them:
class A{ static function lol(int $a, string $b){} }
class B extends A{ static function lol(string $b){} }
class C extends B{ private static function lol(){} } // make it private and just don't use it
 
class BaseClass {
public:
    BaseClass(int value);
};

class DerivedClass : public BaseClass {
public:
    using BaseClass::BaseClass; //Inserts the constructor from BasedClass into Derived class
};
 
@Shafizadeh Neither, use an established standard format, like JSON or XML
 
3:51 PM
@Ocramius :-) !! look, please tell me which one? 1 or 2? I'm really doubt ...
@MadaraUchiha well, that is JSON ...
 
@Shafizadeh 2, but without abbreviations :P
 
@Shafizadeh That doesn't look like JSON to me...
2 is missing a colon, and you have - all over the place when you shouldn't
 
:-) but I used of echo json_encode($data);
 
Abe
@Andrea the same way, this should be allowed:
class A{ public function __construct(){} }
class B extends A{ private function __construct(){} }
class C extends B{ public function __construct(){} }
not that makes sense, just saying...
 
@MadaraUchiha look, I'm really confuse. can you please show me a standard data structure?
@Ocramius :-)
 
3:55 PM
hmm
Java has static method inheritance. Extending classes cannot override, but can hide static methods
 
Abe
yes, and can hide also constructors
 
java has a lot things wrong
2
 
actually, maybe that's just what we need to do
allow static method hiding
(how painful will this be to implement? D:)
 
Abe
@nikita2206 that's for sure :B
but constructors shouldn't be forced to be polymorphic, and that includes visibility
 

« first day (1885 days earlier)      last day (3062 days later) »