« first day (1598 days earlier)      last day (3350 days later) » 

4:22 PM
@bwoebi I'd love to listen to your POV too :D
 
@NikiC that was necessary, people tend to imagine BC break assumptions in E_FKING_BIG scale of exaggeration when they don't like a proposal :)
@FlorianMargaine most languages I know allow implementing interfaces and declaring arguments with blank identifiers, so you explicitly say you don't care about some arg on your implementation. For know we would have to fix the static analyzers, but later we could add blank identifier support:
 
@marcio how do you do it in java/C#/C/C++/python?
 
@FlorianMargaine take go as ex:
 
I'm not talking about go ;)
I know the underscore
but saying "most languages" is an overstatement
 
4:34 PM
func isValid(value type, _) {}
@FlorianMargaine most languages I know ;)
 
if you only know go, c and php, 1/3 support it :P
 
BTW, none of the languages you cited will swallow extra arguments on method|function calls for you, they will all complain.
 
yup, but they've done it since day 1
 
user895378
@LeviMorrison Any chance leviathon can be up later tonight so I can try some stuff? I'm having a terrible time getting openssl 1.0.2 to build on @bwoebi's mac and I want to build on some different environments before pushing some ext/openssl changes to php-src.
 
@FlorianMargaine hence the RFC, it fixes PHP on day 18.212 :P
 
4:38 PM
@marcio yeah yeah I know, just thought it'd have to be mentioned
 
@FlorianMargaine you mean you want it mentioned on the RFC?
 
@marcio btw, there was an RFC for blank identifier support... "default parameter"...
it was rejected, I think?
although it's not exactly the same
@marcio dunno... up to you...
 
BTW, do you think the blank identifier would be useful for PHP independently of strict arg count?
@FlorianMargaine totes different thing, blank identifier is for declarations
 
yup, for the case I mentioned earlier
in drupal, you can alter existing forms by having a function like this:
function foo_form_alter(&$form, $form_state, $form_id) {}
if all you want if $form and $form_id, you'll have to declare $form_state, even if you don't need it
phpmd complains about that
 
understood. Also, if I was going to propose the blank identifier it would be like:

function kitten($color, $, $, $size) : Kitten {}
 
4:44 PM
I'm not set on the identifier, but I'd prefer _, less confusing imho
 
@rdlowrey See if it's up.
 
function kitten($color, _, _, $size) : Kitten {}
 
@FlorianMargaine _ is a valid constant name :(
 
user895378
@LeviMorrison no dice right now.
 
at least it's clear that it's not used... I can't use a variable without $
@marcio ah.
 
4:44 PM
that would be the first option :)
 
@rdlowrey I'll inform my IT services to power it on (aka my wife).
 
what about __? :D
 
@marcio But we can't use constants in function declaration arglist?
 
lol
 
user895378
@LeviMorrison lol, cool thanks.
 
user895378
4:45 PM
I'll put my IT department on it right away.
 
@nikita2206 yeah, but have to pick something that can be used in other contexts later in case the blank identifier becomes usable in other situations
 
@marcio already thinking about multiple-return heh ^^
 
ah ok
 
user895378
@FlorianMargaine what was your logic for wanting a blank identifier?
 
4:47 PM
@rdlowrey read from here
 
@FlorianMargaine we all can see the edit history xD
 
user895378
My opinion: that's an indication of a poorly designed API, not a justification for adding blank identifiers.
 
"phpmd complains about that" mostly means that it's ugly to declare an identifier and not being able to use it...
 
user895378
It's subsidizing a poorly-planned API ... which ... IMO ... is not something the language should be doing.
 
@rdlowrey you mean you've never had some unused variable?
 
4:49 PM
@rdlowrey nah, no. That's not applicable in this case.
 
user895378
@FlorianMargaine Not a required one, no.
 
user895378
A param is either optional or it isn't.
 
it's not required
 
user895378
Perhaps I'm misunderstanding what you're saying though.
 
I can use the first only, if I want
but if I want the third, I need to pass the second too
 
user895378
4:49 PM
Then it's a poorly-designed API (IMO).
 
yeah, can't deny that
 
Sometimes there are implementations of interfaces that don't use certain parameters.
 
^ THAT
this happens all day in PHP
 
user895378
Then the interface was poorly designed.
 
user895378
I don't think we should subsidize that.
 
4:50 PM
It's probably sub-optimal, but I can think of one instance where I've never thought of a better way to do it.
 
user895378
Basically: all the reasons why Stas's default keyword thing was rejected.
 
@rdlowrey 40% of cases, all positive cases are on Zend Framework
 
user895378
lol
 
@rdlowrey Well, in mocks we often throw all parameters away.
 
(last time I checked)
 
4:51 PM
class StorageMock {
    public function __construct(Storage $) {}
}
 
I'm not saying we need to have _ to support these cases.
 
@LeviMorrison heh
 
It's like the scalar object people.
They see all these wonderful benefits but they don't understand that the amount of work to solve admittedly fairly trivial problems is just not worth it.
 
user895378
I for one, don't see much use from the scalar objects beyond being able to "fix" inconsistencies without breaking BC.
 
user895378
Yeah that.
 
4:54 PM
Like... if you ever use a haystack and needle function just look up the order.
Is it a small time requirement? Yes. Yes it is.
 
hai
 
However, I propose that you probably have to look up functions at some point anyway.
Anything that takes more than 2 parameters I look up just to make sure I'm doing it right.
(In all languages, not just PHP)
 
@marcio That seems pretty reasonable, fwiw I like a lone $ as the specifier. You should RFC that.
 
The advantage of _ is that other languages use it.
 
Or maybe allow an optional specifier so you could do: public function foo(int $bar, UNUSED string $baz) { ... }
Which is REALLY explicit
C++ has the notion of an unused attribute fwiw
 
user895378
4:57 PM
@JoeWatkins ohai
 
@rdlowrey I think it may be up now.
 
Or..... to make it BC, something like public function foo($bar, $__unused) { ... }
That'll still run successfully on earlier versions of PHP
 
user895378
Let's be honest: the only question that really matters in life is whether or not @JoeWatkins avatar clothing is white and gold.
 
it's on my to do list already, for PHP 7.1 ofc

list($a, $, $c) = ['a', 'trash', 'c']; // :)
list($a, (unset), $c) = ['a', 'trash', 'c']; // \o/
 
4:58 PM
@rdlowrey I was surprised to find myself in the white and gold camp. I've tried really hard to see it the right way.
My mind just doesn't let it.
 
More readable than an empty arg IMO
 
@rdlowrey it's black and blue man :2
 
(unset) as a list expression, nice.
 
user895378
@LeviMorrison Great success \o/ give your IT staffer a raise for me
 
@rdlowrey :) Will do.
 
user895378
4:59 PM
@LeviMorrison I saw white and gold as well.
 
you're totally freaking me out, what's happening ?
 
OMG STOP WITH THE DRESS
 
user895378
dress llamas!
 
I've never heard so many guys obsess over a dress since that time I got drunk and went to a drag cabaret
6
 
I saw the llama in both colors
 
user895378
5:00 PM
When the PHP Drama Llama and his buddy, the Acrimonious Alpaca, escaped I was glued to the television.
 
@Sara It's not about the dress. It's about colors. And being right and wrong.
 
I dunno what's going on ... gonna go back to reading code now ...
 
@LeviMorrison no, it's about the llama and being on twitter sharing memes
ALL DAY
 
lol
Feb 27 at 16:02, by Gordon
user image
Feb 27 at 16:02, by Gordon
guys please help me - is this elephpant white and gold, or blue and black? Me and my friends can’t agree and we are freaking the fuck out
 
I'm no less confused ...
it's blue and black ...
oh I seeeee
 
5:03 PM
/probably repeat.
 
ITS NOT BLUE AND BLACK DAMMIT!!!!11
 
now I get it ...
 
the dress he started looking at was blue, they didn't change history, they changed the colour of the dress ...
right ?
 
posted on March 02, 2015 by kbironneau

/* by CreisiK */

 
5:06 PM
I'm too tired for mind games ... let's just agree that it's a nice dress whatever ... and get on with our lives ...
 
user895378
@Feeds that one was stupid.
 
@JoeWatkins most people agree it's not a nice dress
 
@JoeWatkins the girl I work with told me the dress is ugly
 
I dunno anything about dresses ...
 
Should I use magic methods in Helper Class? I think it's bad practice
And what about to go to that shop with dress? And see it?
 
5:17 PM
@VeeeneX will it save you from copy/paste 60 methods that do almost the same thing? then do it.
 
If you mean this then no
 /**
   * Works like get
   * @access public
   * @param string|int Key for array
   */
  public function __get($key){
    return $this->get($key);
  }
 
morning
 
@marcio I said it two messages above which you replied too?
@rdlowrey you need some help? :-)
 
user895378
@bwoebi doesn't matter -- I'm hijacking Levi's box now :)
 
user895378
Turns out openssl 1.0.2 has some other BC things I'll have to fix in my commits to allow TLS ALPN.
 
5:24 PM
But that's not a mac? … or something else than leviathon?
 
@bwoebi oh, that... it's listed here: wiki.php.net/rfc/strict_argcount#hassle_factor
 
user895378
@bwoebi no, it's not a mac. I'm just using leviathon.
 
@Gordon This image is full of too much win for one internet.
 
s/But there are people exploring/But there are people exploiting/ @marcio
 
user895378
I didn't realize it until running the ext/openssl/tests that openssl1.0.2 will now fail CA peer verification of the CA signing algo is md5 ... which all of our test certs are.
 
user895378
5:26 PM
So I'm going to have to schlep through all the certs in the tests directory and create new ones
 
user895378
(not my idea of fun)
 
@marcio Yeah, last time I read the RFC, that hadn't been there yet.
 
Glad I could help you find mundane but sorely needed work to do.
 
@JoeWatkins k
@bwoebi there is a bunch of new stuff, beware of the BC break analysis section too
 
@marcio I'm reading currently.
@marcio hmm okay. Can't tell what I'll vote … need to think more about it first.
@rdlowrey neither mine… Looks like a lot of fun… :s
 
5:37 PM
@bwoebi sure, this one ain't a nobrainer. BTW, it's on discussion phase but still subject to changes and open to suggestions.
 
user895378
@bwoebi It's not difficult ... just a PITA because I have to go through each failing test and see what properties the cert is supposed to have, duplicate those in a new CSR and sign the cert with a stronger algo.
 
@rdlowrey yeah… I looked at the tests…
 
user895378
On the bright side, those new requirements are a security win from the perspective of userland code.
 
user895378
Also, I'll be able to add the option in userland to require specific signature algorithms (like sha-2) if you want to do so (and have the new openssl version)
 
user895378
/cc @ircmaxell you might be interested in that ^ as your employer has been the main proponent in pushing out sha-1 as a signing algo :)
 
5:41 PM
yay!
 
user895378
ext/openssl was really badly neglected prior to 5.6 :(
 
@rdlowrey Isn't there a script for creating the certificates? aka, you should totally add a script for creating the certificates.
 
user895378
Maybe. It might take way more time to automate than to do it manually. Just because the the individual certs likely have specific characteristics needed for the tests and I don't want to create a situation where a test that shouldn't pass is able to do so because of some error I made in my automation script to duplicating the existing certs.
 
I didn't mean the script should be run as part of the tests - it would just be a set of instructions for the next person for how the scripts were created...
 
O_o was this intentional by spec or should be considered a lexer bug? 3v4l.org/lKM1s # notice the lack of space between implements and \
 
user895378
5:49 PM
@Danack Yeah ... I should probably add a README.md to the ext/openssl/tests directory
 
@rdlowrey Not surprised. OpenSSL has largely been neglected for one reason or another; why would ext/openssl be different?
 
if that was intentional then we have a regression on the CSlexer RFC that must be "fixed", if not then it might be an accidental bug fix.
 
user895378
@LeviMorrison This has changed somewhat since heartbleed was disclosed and people/organizations were shamed into providing some actual support to openssl :)
 
@marcio It doesn't really matter if intentional.....either way if it no longer works, then it will be breaking code that is currently working.
 
user895378
> VCS Account Approved: ocramius approved by tyrael \o/
 
5:53 PM
@Ocramius you already provided enough patches to approve the account requests (github.com/php/php-src/commits?author=Ocramius) keep up the good work! :)
 
user895378
@Ocramius ^ nice :)
 
@Ocramius you just had to ask!
 
@Danack sure, but bug fixes are not supposed to be BC complaint, hence why I'm asking if it should be considered a bug fix or not, which leads to: was this intentional?
 
Room 11 voting power got even stronger :-D
 
user895378
Room11 Cabal11
 
5:54 PM
"bug fixes are not supposed to be BC compliant" That's one way at looking at it.
Cabal11 Bristol posse.
 
@bwoebi but we don't always vote together (which is a GOOD thing)
 
@ircmaxell yes. I just mean… he's sane (well, I'm not so sure :-P // just kidding) … which is what matters most.
 
Thanks @Tyrael :-)
 
yw
 
What's the recommended way of getting sftp working in PHP? Seems pretty fucked.
 
5:57 PM
@bwoebi definitely
 
@bwoebi I'm totally gonna propose my final CrazyProxyShitAbstractFactoryInterceptorLocatorGeneratorImplAbstractFacade for inclusion in PHP core.
 
And we in room 11 will all vote yes, yea? :-)
 
nay
/me auto-votes against anything proposed by @Ocramius on principle :-P
 
uuh ocramius can vote now?
flee
 
oh no, nothing with BC breaks will ever pass unanimously anymore
 
6:03 PM
anymore or never did?
 
user895378
Now I just need @beberlei to expose an RSS feed from his RFC vote thing so I can automate a script to auto-POST the opposite of whatever @Ocramius does.
 
hehe
 
@bwoebi nevermind, I thought this one was 100% 'yes' but it wasn't wiki.php.net/rfc/uniform_variable_syntax#vote
 
i have already wandered on to new projects :)
 
@rdlowrey I'll move the "NO" column to the left
 
user895378
6:11 PM
@Danack Bristol posse The Vicious Chickens
 
user895378
Best gang name evah
 
@rdlowrey would be nice. I'm lazy but I think there are some interesting data there
seeing which RFCs had those one timer voters who never voted before or after, who are the groups who are always voting the same, etc. :P
 
user895378
@Tyrael There is a lot of stuff like this I'd like to do ... all sorts of useful metrics could be pulled that could inform discussions about how to improve the RFC process going forward.
 
agree
gotta go home, see you later
 
user895378
6:27 PM
later :)
 
So.... it looks like this also doesn't throw an exception when it fails....just a warning...
 
Morninign roomsters
 
user895378
@PeeHaa jo
 
o/
 
Seems he didn't notice that date.tz warning removal was merged (phew…)
 
6:44 PM
why is there a sad elephpant on reddit? O_o
 
@bwoebi congrats, and thank you!!!
 
@Ocramius sad elephpant? impossible to exist.
 
@Ocramius That elephpant is not sad! It just waits for answers!
 
6:56 PM
Tht's racist.
 
hello..
I am an intermediate programmer who knows a little c, c++ and algorithm design. I would like to learn PHP. Which book to go for?
 
7:26 PM
oh well
my work-laptop died
 
@Danack I updated the patch so the regression is solved... but I still think that the behavior is a deviation from spec and should be fixed. Would it require a RFC?
 
:-(
 
@marcio I wouldn't do an RFC straight away - if you ask on internals what the correct process is when PHP deviates from the spec and give that as an example.
 
ok thanks :)
 
I do think PHP clings to BC compatibility a bit too much, but (as you're probably realising) I do think fixing things that are not absolutely wrong but instead just deviations from how people should code, is not worth the cost in projects like PHP, due to the high cost of people fixing there code for the minimal benefit in having code be 'correct'.
 
7:33 PM
yea, it's just that all other places require a space, ''implements'' is the offender, so it's obviously a bug. But you are right, it's not worth the effort. Somebody probably already wrote a code minifier that would break if this get fixed.
 
RFC suggestion: Namespace all the things! (but also leave them where they are, at least for 7.*)
 
good luck ^^
 
"Have fun storming the castle!"
 
user895378
"Think it'll work?"
"It would take a miracle."
 
@ircmaxell why the sad face?
 
7:46 PM
20 mins ago, by tereško
my work-laptop died
 
oh :( a minute of silence
 
:D
I know that we should wrap almost everything in methods but this seems to be really annoying:
/**
* Check if key exists
*
* @access public
* @param string|int $key Identifier for $data
* @return bool Return existence of key
*/
public function has($key){
$key = $this->normalizeKey($key);

if (isset($this->data[$key])) {
return true;
}
return false;
}

/**
* Get value assigned for key
*
* @access public
* @param string|int $key Identifier for $data
* @return mixed|null Value given for key
*/
public function get($key){
$key = $this->normalizeKey($key);

if ($this->has($key)) {
return $this->data[$key];
 
@VeeeneX, your QA will appreciate it
 
8:01 PM
@LeaTano Do you wrap functions in methods like this?
 
user895378
Ugh ... it was only a matter of time before someone who didn't really understand cooperative multi-tasking asked about why you need return values in generators.
 
user895378
/me commences a one-hour explanation ...
 
user895378
Everyone in php seems to think of generators as iterators and not as the functions they truly are :(
 
Given that all the examples are always trivial list iteration, that's not surprising.
 
@Ocramius \o/ congrats on more karma!
 
8:15 PM
So should I use issets instead of has?
 
@VeeeneX Depends on whether you want your class to work when inherited.
(I don't, btw. My code is always final)
 
@LeviMorrison Well, this class will be inherited to many classes
 
@VeeeneX If they can change has then you should probably use has.
 
LeviMorrison They can't it's helper class
 
Uh, if you can extend the class then you can change the behavior.
(unless you mark the method as final)
(PHP supports that, right?)
 
8:23 PM
Well, For example Class I_need_Helper extends Helper
yes, every method should be final
 
Ugh, that makes little sense.
If you can extend a class but not override anything... why are you extending it?
 
if every method is final, the class should be final
 
My guess, VeeeneX, is that you are using inheritance when you should be using composition.
 
composition? Can you explain it to me do you mean trait?
 
No, not a trait.
Composition is a general programming technique.
 
8:28 PM
ircmaxell, yes it's
 
It should generally be used instead of inheritance.
 
LeviMorrison, Maybe I had done it before but I dont know it's name
 
It's a general technique. Just search for "programming composition"
 
Googlin
I'm confused I saw Aggregation and Composition I had no idea what it is...
:D
Sorry
I need to study it deeply
 
8:41 PM
@rdlowrey Generators are functions auto-promoted to Iterators, no?
 
user895378
@bwoebi yes. I'm specifically working on a response to this mail where he says:
 
user895378
> I would personally have preferred generators to have used a distinct
keyword rather than just looking like functions, but since that ship has
sailed, making them look even more like functions worries me.
 
@LeviMorrison Why I can't use traits for this? Isn't it same as composition?
 
No, traits are not the same as composition.
 
user895378
"look even more like functions" ???
 
user895378
8:42 PM
They are functions.
 
Traits get copy and pasted into your classes.
 
user895378
In short: php developers mostly only understand the iteration part ... not the coroutine part of generators.
 
class A {
    private $b;
    function __construct(B $b) {
        $this->b = $b;
    }
}
^ Here A is composed of B.
 
@rdlowrey also tell him, that value-less returns already are possible…
 
user895378
@bwoebi Good point.
 
8:45 PM
@LeviMorrison You mean DI?
 
@rdlowrey well… doesn't surprise me… most PHP devs never needed them nor saw an use case for them in their code.
 
user895378
@bwoebi because all programming is straight-line and blocking with no thought to concurrency of any kind, right? RIGHT????!!!
 
user895378
Who needs multi-tasking, anyway?
 
I just suggested tearing Zend Optimizer apart, and said that basically every other engine maintainer in that thread is wrong... Let's see how this one goes :-)
 
@ircmaxell You like living dangerously.
 
8:48 PM
@Charles no, I like pointing out when other people have flawed assumptions or are missing a large part of the picture in their reasoning
 
> why should a CLI script like Composer be forbidden to benefit from those optimizations?
Because then bugs in the optimizer that can only be reproduced from the CLI couldn't be closed as "Wont fix, doesn't affect web requests"
:-P
 
> I'd rather shift to slowly adding the optimizations into Zend/, in separate compiler steps you can (like in opcache too) enable and disable.
It's actually a bit weird to have to include opcache just for its optimizations. Opcache should do what its name says: the sole task of caching the op_arrays.
We need to change an extension for nearly every little change in Zend/. That shouldn't be the case either. ~ http://news.php.net/php.internals/84009
 
@bwoebi not sure there. Some classes of optimizations should go in Zend. Some I'm not so sure
 
@ircmaxell well… whether it's in Zend or not… we need to always change them in case of op_array/opcode updates.
 
8:56 PM
the optimizations?
 
yes
the opcaching part of opcache is rather unaffected by most changes… but Optimizer…
 
I've found the opposite... interesting
I've never had to touch the optimizer, but I did have to do a lot with opcache itself (then again, I'm mucking around with class_entry and function_entry)
 

« first day (1598 days earlier)      last day (3350 days later) »