« first day (2419 days earlier)      last day (2545 days later) » 

Wes
4:02 PM
@JayIsTooCommon i don't remember the password :B
 
Anonymous
want me to :B?
 
Wes
on /r/lolphp? :B
 
Anonymous
no, I think this requires a serious review.
 
Wes
lol
i could remember the pass
 
Anonymous
likeamymomausedtomake123
 
Wes
4:05 PM
12345
 
Anonymous
I need to stop with this casual racism.
 
> Status: Accepted (Needs finalized PR)
 
@JoséSánchez I... wut?
 
I think I've sorted out the grammar for this to work:
[](parameter_list) => expr
I don't think I've broken anything but that will take more investigation into stuff like [] = $a.
 
4:19 PM
Is that currently valid?
 
@Sara You'll probably pick it up from the internals list, but just in case you don't wiki.php.net/rfc/notice-for-non-valid-array-container is another RFC that has been accepted but the implementation hasn't been completed yet.
 
We are currently failing in the compiler in similar cases to that one (but not that one) and not the parser so I need to make sure I support the same end-behavior.
Supporting [=] is easy because we can just make a new token. Now investigating [&].
 
@LeviMorrison ffs, an AOT failure is an AOT failure, does it really matter whether it comes from the parser or the compiler as long as it doesn't suddenly become a run-time error?
 
omg just received the new phone
 
@DaveRandom For what I'm doing yes since I need to distinguish them in the parser.
 
4:22 PM
@Danack fix it fix it fix it fix it fix it fix it fix it
 
oh right I see
 
But I have to go through all the test cases and make sure the errors are still errors, etc.
 
The error message changes so there are a lot of failures.
Having spot-checked them so far so good ^_^
 
@DaveRandom ahha yes indeed
new vivo xl 2
 
4:23 PM
Uh-oh, found an assertion violation; will need to dig into that one ^_^
 
the heck these people are smoking... twitter.com/MalwareTechBlog/status/869947939342479365
 
Ah, an empty array needs to have one null member in the ast list; was using just an empty list.
 
> because otherwise you couldn't do something like below with a 1-liner and so that PHP5.4 feature becomes pretty useless because for a isset() you need to store it in a var

function GetKatMaxSort(): int
{
global $db;
return (int)$db->fetch_row($db->query('select max(hsort) from ' . sql_prefix . 'haupt', 1, 0))[0];
}
sets everything on fire
Who was it here who was saying a couple of years ago, that the problem with internals was the small number of people who took part from the 'typical' PHP community?
Because that opinion is wrong.
 
It can be a problem sometimes ^_^
 
J'accuse…!
 
4:31 PM
@LeviMorrison for the record, I think any time invested in the []() syntax is time wasted
That syntax is not going to happen
 
And why is that?
Please don't say "you don't like it" or "internals won't go for it"; give me actual feature reasons.
 
after upgrading to codeigniter the high cpu usage and high load to server what can ido
 
@LeviMorrison The syntax is horrible
 
http fails to start with segmentation fault, only a reboot fixed ! – #74682
 
@NikiC Yeah, give me another reason. You are aware that collectively Internals hasn't liked any syntax we've proposed?
 
4:35 PM
@LeviMorrison Yes, but there there are better and worse
Right now, for some reason not immediately clear to me, you picked one of the worst variants and are focusing on it
 
It should be immediately clear: it supports the most features.
 
If that's the features you want, I would recommend modifying the existing use syntax
 
It's too long, by quite a few characters.
 
In the unlikely case you need precise control over binding, you can use the long syntax
 
function use return <- already too long and we haven't even done anything.
 
4:38 PM
We don't need it in a shorthand syntax
 
What's so bad about [=]() => expr instead of fn() => expr?
 
It's a lot less obvious
 
Okay. You learn it once.
 
fn() => expr is clear to anyone who knows what a closure is
[=]() => expr is clear to anyone who knows c++11
 
@NikiC Not really; it still looks like a function call with an array symbol.
Short syntax for closures in any language is not intuitive.
 
4:40 PM
There is more intuitive and there is less intuitive
 
|$x| $x + 2
($x) => $x + 2
 
This particular syntax crosses the line where I would be confident that it will be rejected
 
What's intuitive about any of this?
 
@LeviMorrison At least for the second syntax, this is just literal math syntax for a function mapping
 
Okay, you are trained and versed.
What to guess the % of general PHP users who are?
< 0.1%, I'm confident
 
4:41 PM
Well, I'm still in opcache hell, but at least I know how it's breaking my code now.
 
They have a much, much better chance of knowing C++ syntax.
 
You forgot ($x) ~> $x + 2
 
@Dereleased Yeah but nobody actually uses that.
 
But it was proposed
 
1) inheritance isn't happening when opcache is in use, 2) it fucks up the static members table for the last class created for no obvious reason
 
4:42 PM
The ones listed above are actually used by other languages.
 
however briefly
 
{ $1 + 2 }
 
Wasn't it rejected because some keyboards make tildes hard?
 
@Dereleased Partly, yes.
@NikiC Give me reasons other than guessing at what others think or believe.
 
My guess is opcache makes some assumption about final classes which my not-really-final enums violate. I should maybe try removing that flag.
 
4:43 PM
At present I don't think any would pass which is why I haven't put it to vote.
And we seem to be having ML issues again so its unclear who has even received the messages :/
 
btw @Levi how do you feel about ADT-like enums
 
@LeviMorrison Sorry, it's your time
 
@NikiC If you just don't like it or think others won't that's fine. I just want real feedback.
@Andrea That gives you a restricted form of union types without intersection types.
I'd rather just have the real-deal.
 
If someone sees [=]() => expr for the first time, and they're relative beginners, what do they search for?
 
@Dereleased Same for any of the other syntax used by other languages.
None of them are searchable; this is hardly unique.
It's a negative point they all share but other languages deemed worth it anyway.
 
4:47 PM
What's wrong with function ($x) => $x * 2?
 
@NikiC And I don't necessarily think it will pass. It appeals to different folks but it's unclear yet since it hasn't been discussed who doesn't like it.
@Dereleased There are two main motivations for the RFC: concision and implicit variable binding.
function ($x) => $x * 2 is not really concise.
 
if you're the type of person who would type function ($x) { return $x * 2; } all on one line, then no, I guess it's not.
 
Whether it's on one line or not it's still not concise.
 
@LeviMorrison This seems to have the least resistance. If we have this, we can always shorten it.
 
@Trowski Not really
 
4:49 PM
@Trowski Theoretically but not really.
 
public static override IRenderComponent ToComponent(int level) => ToComponentRaw(level);
 
@NikiC No?
 
To go from "function" to "fn" in a separate RFC is unlikely
 
is almost identical to something I've actually written
 
"Hey, here's my tiny RFC to add this shortcut!" => will be considered too small and a waste of time.
 
4:49 PM
Because the difference is too small at that point
@LeviMorrison This is real feedback. At this point it mostly comes down to syntax, there is not much more you can say about any of it.
 
Yeah… that's definitely how that would go, so good point.
 
@NikiC No, there is still debate on features.
When I look around people have complained, and seriously, about it being by value. People do want choice.
 
And well, I think by ref is stupid so I don't care about that heh ;)
 
This is why I'm exploring the C++ syntax.
It's concise, has precedent somewhere else, and gives choice.
 
And will never happen in PHP.
 
Wes
4:52 PM
word of the year
 
@Trowski Exactly...
What's with the covfefe
 
@Trowski And why not?
 
@NikiC cryptic trump tweet that didn't get deleted for 6 hours
At 12:06 AM IIRC (EST) Trump tweeted "Despite all the negative press covfefe" and that was it
 
The best thing about the object typehint is how it will break all code using extends Object for all the things
 
And didn't delete it until after 6 AM
 
4:53 PM
@Dereleased Now the small hands joke makes so much more sense… awesome :-D
 
Tomorrow: @NASA makes an announcement on its first mission to fly directly into the sun’s atmosphere
 
Does twitter send when you press Enter?
 
2017 has been a rough year but this seems excessive https://twitter.com/AP_Planner/status/869616357561729024
 
@Dereleased heh. trump.
 
nevermind
 
4:54 PM
@LeviMorrison Symbol soup and feels very un-PHP.
 
#makedonalddrumpfagain
 
@Trowski None of those are technical issues.
 
@LeviMorrison nope
 
I'm not saying non-technical issues are invalid.
But the other ones do have technical issues this doesn't. I'd like to prefer features over syntax especially because this already exists in a mainstream language.
 
@LeviMorrison No, there's nothing technically wrong with it and don't terribly mind it myself… but IMO it will never pass in an RFC.
 
4:56 PM
@Trowski You want short closures?
 
@LeviMorrison Absolutely.
 
@Trowski Would you personally vote yes for []() => expr?
 
‾($x) ---> $x * 2 TERMINATE_STATEMENT
 
@LeviMorrison Nope. I think I would vote yes for all of fn() =>, function() =>, ^() =>, though not totally sure on the last one
 
The "PHP way" is to use function use return plus other symbols which makes it impractical to use it very heavily because of the verbosity.
 
4:58 PM
Why not fn() again?
 
@LeviMorrison I'm not sure… I think I agree with @NikiC that I'd rather see fn() =>.
 
You are 25+ characters for every closure and you hvaen't even done anything.
 
I think everybody in here liked fn() ... right?
 
@NikiC New keyword, doesn't give choice on binding type.
 
Yes new keyword, but it looks like I'm pretty much the only one affected by that :P
 
5:00 PM
@NikiC And a lot of test code
 
Was ^(params) => expr for by-value and &(params) => expr for by-ref ever discussed?
 
In PHP
 
(No known production usages)
 
@Trowski &() => looks like return by ref
E.g. function &() {} is valid closure with return by ref
 
*(params) => expr but it returns actual pointers to the userland code
 
5:01 PM
@NikiC Hmm… yes it does look like that.
 
But I think allowing an optional use() with short closures aka fn($a, $b, $c) use(&) => xxx might work?
 
^&() => expr <- something like that for returns by ref.
 
@LeviMorrison What do you think about use(&)?
 
¯\_(ツ)_/¯() => expr
 
I think it's not enough symbols saved.
 
5:02 PM
@LeviMorrison Only for by ref of course
 
However it does have some value:
 
For by val you don't have to specify use(=) or something
 
function($x) => $x + 2
function($x) use(=) => $x + 2
function($x) use(&) => $x + 2
That second line is terrible.
 
@LeviMorrison And doesn't make sense anyway
As that's the default behavior
 
Part of the feedback was there isn't any indication that it is binding stuff implicitly.
 
5:03 PM
Doesn't even make sense to support it
@LeviMorrison [=]() does not really change that feedback
It's just as much implicit binding
 
One thing that [](), [=]() and [&]() have as an advantage is that they do provide it.
There is a symbol that does indicate the meaning.
Sure it's cryptic but actually does exist.
 
@LeviMorrison In that case fn() here also does indicate it, duh
Or => ^^
 
Is it fn or => or ...?
See, that's partly why they don't like it.
 
The use of the syntax indicates it, just like the use of the [] syntax indicates it
No, that's not why they don't like it (I think)
It would be pretty ridiculous if they don't like it because they can't settle on which part exactly does the binding
They don't like it because the variables are not explicitly listed
And that stays the same no matter what syntax we use here
 
@NikiC And none of those symbols indicate thta.
And you rlast line is not true.
 
5:06 PM
It is
[=] does not write out the variable names
 
The C++ variant does have a symbol that indicates bindings.
 
At least in my understanding, that is the critical difference
 
I'd like to keep => expr to mean exactly { return expr; } because it's much cleaner that way and feels better.
 
@LeviMorrison I acknowledge that, but I do not believe that makes any difference to the people who have a problem with automatic binding. Of course, I could be wrong with that
 
@NikiC Well, that's why I'm persuing it on list.
 
5:07 PM
Anyway, work to do
But let me just say it again: Pls just put the fn() proposal to voting, see how it goes
 
Honestly if we aren't doing [](parameter_list) => expr I'd prefer to increase our grammar class.
And just do what Hack does.
 
You've been oscillating between different options for two years now
It's time to move this, and IMHO fn() right now has the highest chance of winning
 
@NikiC Rasmus replied to a message I didn't ever see on list and I did check my spam filter.
Do we know how widespread the ML issues are?
 
@LeviMorrison nope
I think I also missed things
 
user4962466
5:16 PM
guys
 
user4962466
hello :)
 
user4962466
api design decision
 
user4962466
 
user4962466
should we provide fluency or safety to the clients while designing an api wrapper ?
 
The latter
I am not a huge fan of random scalars personally for one and passing an entire array is even worse
 
user4962466
5:22 PM
i will hidrate internally the objects
 
It means you will move a lot of checking to where it doesn;t belong imo
 
user4962466
yes true, for the sake of api fluency
 
user4962466
but i agree with you
 
user4962466
i just wanted to see other's opinions
 
@bwoebi They have experience with JS, not C++. Obvious bias ^_^
But also why I'd rather to Hack's syntax if we aren't doing C++'s.
 
5:23 PM
#2 has so many advantages over #1
 
Wes
#2 obviously
 
Your units are small and easily testable / maintainable
IDE knows what to inject
People know what to inject
 
R.P
Any suggestions for immutable objects? __construct having multiple inputs is like... horrible
 
Error checking will be sane and in the correct spot
 
user4962466
still i have to fight with old school people that won't like that
 
Wes
5:24 PM
multiple inputs?
 
R.P
__construct(string $a, int $b, bool $c)
 
Wes
why is that horrible
 
R.P
have seen when this gets to 10 inputs
 
Ah I see you have a bool in there
 
user4962466
private constructor and static function to create the object
 
5:25 PM
I am going to guess that is wrong
 
2, definitely 2
 
Wes
@R.P you mean too many arguments?
 
The moment I see a bool like that I get trigger happy
Spidey sense and stuff like the design being wrong
 
R.P
@Wes - exactly
 
Bleh, made a grammar mistake in tweet.
 
5:26 PM
I see you're all deciding for 2. I don't disagree. But there is one main advantage for 1. It is readable. It tells you what parameter does what.
 
@R.P If you have too many arguments, and some of those arguments are related, you probably should have spun them out into a separate object
 
Nobody asked you something bob
:P
 
@bwoebi well we obviously wouldn't nest like that...
 
@Leigh And when you have a bool right there. The chances of you needing to do that even increases @R.P
 
Wes
split into smaller stuff. e.g.
$b = new B(1, 2);
$c = new C(3, 4);
$a = new A($b, $c)
if it makes sense doing so. otherwise meh
 
5:28 PM
@bwoebi Honest question though
 
I think people are scared of using temporary variables, when they should shut up and let the compiler do their optimisations for them
 
@Leigh new Purchase(1, new Money(10, new Currency('EUR')), 1, 2) It's obvious that the second param is price. What's 1, 1 and 2?
 
Why would that be more readable if the object would be constructed vertically too?
@bwoebi Oh i agree on that
100%
 
And that's why I'd rather prefer 1 than 2, from a readability standpoint.
 
I would probably remove those bare scalars too :P
But I see your point and actually glad we agree
 
5:30 PM
@LeviMorrison Tweets need a 2 minute edit window.
 
@bwoebi I prefer the concept of two, not necessarily agreeing it is the best designed.... obviously the quantity should be part of the purchase, and addPurchase should simply take Purchase and User objects :)
 
@Trowski Or even a 60 second window.
 
@Leigh from a conceptual standpoint, I totally agree.
 
@JoeWatkins @NikiC @bwoebi Maybe we should just move to a forum or discourse server for official PHP discussions.
The ML has been so temperamental for so many years.
 
lol
I mean yes, but try getting that past internals :D
 
5:33 PM
O_O, trying to imagine internals on a discourse server
 
@LeviMorrison I think it would perhaps get even worse and even more text…
 
@bwoebi Maybe true but partly because it's actually usable lol
 
Although I was thinking of the voice aspect
 
(You were thinking of Discord, probably)
 
oh yea
 
5:34 PM
> Civilized discussion for your _____
 
things are more fun in my imagination
 
Sign us up! It'll be more civilized!
 
@LeviMorrison Heh, so not suited for internals
 
But seriously I think the PHP systems group has been over-burdened for a while.
Seems like a nice benefit to move off the ML.
 
evening
 
5:37 PM
o/
 
@LeviMorrison possibly :-P
 
Also, we have free digital ocean instances sitting around.
So hosting is already worked out.
 
If you move anywhere, it has to be publicly subscribable and archived
 
@Leigh Agreed. I imagine it's a pretty common feature but I haven't looked.
> Flagging system lets the community suppress spam and dangerous content, and amicably resolve disputes on their own.
... hahaha "amicably resolve disputes on their own"
For the first little while, sure ^_^
 
O/
what is the alternative for stripe that allows withdraw funds to Brazil?
I am looking for a credit card procesor like stripe, but stripe don't allow withdraw funds to Brazil bank account
 
5:54 PM
Google "card processor brazil", 2nd result shopify.co.uk/payment-gateways/brazil
 
Hey @JoeWatkins, how's the convalescence coming?
 
6:19 PM
I'm thinking to start writing a tool for static analysis which will question everything. It will be called phpvisualdebt.phar and it will simply parse all source code and question everything what is unnecesary according to new trends. How about that? Guys what di you think?
I think I might be famous with tgat tool ;P
 
@brzuchal be sure to parse the output of Otwells twitter each day, to stay in tune
@FluentEnglishSpeakers if I understand correctly, here I must not put an apostrophe before the s to Otwell, because it's like if I said its twitter, yes? ^
 
yes
 
@brzuchal $godObj->question("everything"); ?
 
gosh... I've been doing this wrong soo long
 
6:31 PM
I mean yes it needs one in case it wasn't clear
 
Yes it needs an apostrophe
 
You are actually saying otwell his twitter (account)
 
oh...
so it would be Otwell's twitter account, and its twitter account
 
Yes
 
yes, "its" and "it's" are a special case, nothing else follows those rules
 
6:32 PM
ok
 
My idea is to find all interdaces and typehints also return types and question everything in CLI
 
any variable name that is more than 7 letters too
 
Felix's going to Felix's store => Felix is going to the store that belongs to Felix
 
ahhh... english :)
ok, I believe I start to understand.
 
The best part about that one is "Felix's going", since it makes it look like the "is" should be associated with Felix, but in fact it's the verb "is going"
But this is all based on spoken contractions
Maybe it makes more sense as "Felix s'going" from a written perspective, but when I read that, I don't even see "go-ing" I see "g-OI-ng"
so, like, sugoi-ng
 
6:36 PM
s'going. that is actually almost cute
yeah ^^
 
@DaveRandom What's going on?
 
@brzuchal Don't forget to wrap any method call in a function that will return $this instead of whatever the method had to say
 
Thanks for adwise
 
ideally using __call, making all methods private. when I write a class, I don't need no ide auto completing my two letters functions.
gosh... I said that half jokingly, before realizing that... this could actually be implemented
...
 
6:53 PM
@kelunik Yes, I agree, would make parser logic simpler.
 
When is amp v2 getting released?
 
@NikiC Well, it's having RCs right now. I'd in particular like to wait for @DaveRandom to release amp/dns, as it is pretty much a dependency of nearly every library too.
 
@bwoebi But aren't you waiting for that for like 5 years already?
 
And it sucks because @DaveRandom sucks
 
@brzuchal awwww... I could only manage with protected eval.in/809097
trigger warning ^
 
7:01 PM
 
@FélixGagnon-Grenier You mean question using protected there yes?
 
yeah, that and what @Dereleased was saying about wrapping method returns ;)
 
:D
And what about: "I'm not you dady!" or "I aim not your mama!" (is it correct?)
 
!!dad
 
What do you call a deer with no eyes? No idea
 
7:08 PM
@Jeeves question everything!
 
@brzuchal How is that the correct answer to 'Have you ever been in love?'.
 
@Jeeves Yes I am, but I think there is something wrong with you!
 
@brzuchal Do you have proof for your claim?
 
@Jeeves You're ask me a question from the ass. (don't know if it's the same in English but I hope)
 
@brzuchal Are you a part of an alien invasion?
 
7:10 PM
Wat!
 
@Trowski When I bench the parser, it's 9x slower than my current RESP parser. When I disable assertions, it's only 4.5x slower. ^^
But the new one has way more overhead, because it supports backpressure and is based on input streams.
 
@Jeeves :P
 
@Linus Then, you are alone in this world?
 
@Trowski I think yielding string delimiters shouldn't return the delimiter at the end.
 
@Jeeves The truth is out there.
 
7:16 PM
@Tiffany Should we try to find the truth?
 
And should we move to asserts here? Would save 3 function calls per yield on production and nothing really bad happens in that case, it's equivalent to null then. @Trowski @bwoebi
 
@Jeeves Yes.
 
@Tiffany No you don't have your own spirit.
 
Smells like digital spirit
 
@kelunik it doesn't save much here … is_int, is_string and strlen all have specialized opcodes reducing it to a single fast op anyway.
 
7:20 PM
PHP makes this problem almost stupidly easy
preg_replace and str_rot13
 
@kelunik That's probably fine, since it's guaranteed to have been found if we remove the $end case.
 
@Trowski If you need it, you can just append it again.
 
@kelunik I'm not surprised it's slower… though that's quite a bit slower than I expected.
 
@Trowski The parsing probably isn't, but the two levels of indirection are.
 
@kelunik Yeah. Supporting backpressure adds a lot of overhead.
 
7:26 PM
is anyone familiar with 000webhost?
 
@Trowski The backpressure itself doesn't add it, but rather the level of indirection for piping an iterator stream into the parser instead of directly "emitting" into the parser
 
Ah, yes.
 
Could someone give me a nudge in how I can turn this into OO code? gist
or should I even bother?
 
Wes
404
 
yeah, I missed removing something, so I deleted it.
 
7:30 PM
@Trowski I think the overhead is fine for the streaming JSON parser, where you usually have an input stream anyway from some HTTP response, but it's not fine for Redis.
 
Wes
what's that @Tiffany ?
 
Taking an email address, converting it to rot13, then concatenating it to a URL and echoing out the URL. The intention is to take an email address and convert it to a contact form URL that our website uses.
I wanted to write something for web authors to use so they can create their own links (and stop putting in email addresses on the website because we get a ton of spam). I know they won't email me to ask me to convert it for them, so I figure giving them something to do it will make life easier.
holy crap I can finally give my demo, only an hour late...
 
@Tiffany eih, just hash the email. or better create a separate token instead
 
Wes
so basically that link will be to a form that if submitted will send the email to the decoded email passed. i'm not sure that will be much effective. bots can use web forms
so converting a link like mailto to a <form> is not really improving the situation
 
@Trowski Without the levels of indirection I'm at float(4.59197306633) instead of 2.0x (for 1M test responses)
 
7:54 PM
@Tiffany there is no need for OO at this point. If you code grows, you might introduce an entity for "account"
 
@Tiffany You can use MVC framework.
 
@Alex78191 you can use a cactus
 

« first day (2419 days earlier)      last day (2545 days later) »