« first day (3173 days earlier)      last day (1775 days later) » 

Wes
12:00 AM
it's not by val
 
how is that not by-val :-P
 
Wes
or depends what you mean, it is by ref within the for()'s body
 
no it's a distinct symbol that is scoped to the functions body, initialised as a by-val assignment from the outer, it's not by-ref though
 
Wes
means that two functions defined in the for's body will modify the same i
hold on
 
oh right OK I see what you are getting at
oh riiiiigh OK I see what you are saying
OK
in that case, I think that block scoping should be done before lexical scoping
because the latter depends on the former
and they are two separate things
 
(by which I mean, they need separate votes and therefore separate RFCs)
yeh I got what you mean now, it's just that (no offence) your demo code was terrible :-P
 
Wes
with let, obviously each for body execution starts with the i that was originally bound
so you get 10 11 12 13 etc
 
yeh I get it now, it's just that in your example it wouldn't have changed the output if it was by-val
so I didn't quite see what you were referring to
but yes I think that actually does make sense, it's a facet of the fact that it's strictly block scoped
 
Wes
no nvm, it is by value in practice.... except that i don't see it that way. but the effect is that exactly :B
sorry for messing up your head
but each i in the for's body is obviously available by-ref within all that for's body
 
although for is actually a weird little thing on it's own, since it's block scoped but also has a lifespan outside the block because it carries it's value forwards in the condition/post-body exprs
 
Wes
12:09 AM
means you can write and read it, but you cannot change the i that actually drives the for()
 
@Wes no I get what you mean now, it's by-ref, but a ref to the symbol from the block scope
 
Wes
if you do for(let i; .... ){ i+=10 } it's not going to work
 
yeh
 
Wes
so yes, it's basically by value
 
@Wes which in an of itself is a little unintuitive, but it's an acceptable trade-off
all of that said... I do understand what you are saying but I still think this:
27 mins ago, by DaveRandom
I want to be able to know how it's going to behave by reading only the line of code where it's used
 
Wes
12:12 AM
it could be a possibility
i don't hate it
naturally i think ES's way is the better way because i use it every day and i know it works
but that could be better
::&$var is a bit annoying to write every time
 
@Wes OK so here's what I propose: I am going to have a play this week and see if I can get a basic PoC for lexical scoping with by-ref semantics. It will be a bit limited in usefulness without block scoping, but it's the easier of the two to implement (at least for me to do it)
the two don't actually depend on each other, they complement each other nicely but both are useful in their own right
 
Wes
i would write a rfc before doing anything tho
 
feel free :-P
 
Wes
i will now maybe :B
 
I'd rather try and make it work first, because 9 times out of 10 I find that the spec didn't account for something that you only discover when you try to actually do it
I'm sold on by-ref though, and ::$foo is the syntax I'm going with for now (but that should be a fairly small part of it and easy enough to rejig later)
@Wes just so we're clear, this will be limited to explicit symbols in the same lexical context, i.e. variable variables won't work and nor will anything that comes from include or extract() or whatever
it's not really practical to do it otherwise, it would be way to slow
 
Wes
12:21 AM
yes fuck variable variables :B
 
well actually I guess you could have a fall-back to walking the stack at run-time but I'd rather not
also ::$this isn't going to be a thing
 
Wes
no, why not?
 
sanity?
 
Wes
public function bar(){
    return new class(){
        private $that = ::$this;
    };
}
super useful.
 
I mean it's doable but it feels like a road to insanity
 
Wes
12:24 AM
ha
 
I'll think on that a bit more
 
$thiz
 
for one thing, if you could do ::$this then it intuitively seems it would allow privileged access, and that would be very hard to do
 
Wes
it would be great being able to reference all $this in the context
like ::$this would reference the parent, ::$this::$this would reference the parent's parent, etc. :B
i think java can do this, and c# also
 
yes and no
c# has lexical scoping for visibility but you still have to pass in an instance explicitly
(doesn't have anon classes)
well not with methods anyway
 
Wes
12:30 AM
Closure/*(Array<Mixed, $T>): Iterable<Mixed, Array<Mixed, $T>>*/ $makeRightRows,
it would be amazing to have named generics
i think it's possible with structural typing
that's unrelated to the lexical scope discussion :B
 
in fairness @Wes ::$this could be added later, in the same way as closures didn't support it in 5.3
 
Wes
it's ok
will i be able to do $foo = $this; and then ::$foo later?
 
but (imho) it opens up a whole other can of worms about class member scoping which a) would require changes in a lot more places than this touches atm and b) are not obvious to me what the correct behaviour is anyway
like, if ::$this->privateMethod() worked then it implies that private static members should also be accessible from an anon class created within a static method, which would need ::parent::privateMethod() or something
 
Wes
what if ::$foo is required only the first time you use $foo, basically you import it and use it at the same time, and then it assumes that $foo refers to ::$foo from that moment onwards
$foo = 5;
$v = function(){
    return ::$foo * $foo;
};
$v(); // 25
 
don't like that, it's scope resolution not a decl
like $bar = ::$foo; shouldn't create two local symbols
 
Wes
12:36 AM
i like it a lot
because it's like use but not as lengthy
goes against this
25 mins ago, by DaveRandom
27 mins ago, by DaveRandom
I want to be able to know how it's going to behave by reading only the line of code where it's used
 
I don't, it's a reference... OtherClass::$prop doesn't create a local var called $prop
it's a way to refer to something from another scope, you aren't importing it as such, just using something from a different symtable
 
Wes
yes like use()
it's two different things, i know :B
i am saying that i like this more
in fact, much more
 
yeh, that's more like an arg list, the whole point of this is to avoid an arg list :-P
 
Wes
i really don't want to spend ages writing ::&$
it's 4 characters i cannot easily type, apart :
i can type one, $, but 3 different ones is a lot to write every time i want to write a variable
but obviously, it's heaven compared to use($a, $b, $c)
 
also it would mean that these two behave differently, which seems wrong:
$foo = 1;
$bar = ::$foo; // local $foo is now outer value
// vs.
$bar = ::$foo;
$foo = 1; // outer value is now 1
 
Wes
12:42 AM
i think we need to write several rfcs :B
 
KISS
one step at a time
the "correct" behaviour for the edge cases will become more obvious once the simple stuff works and you can mess about with it
 
Wes
i will help you with the rfc, but imho js' lexical scoping is going to work great
it's proven to be nice and effective
we can pioneer different things, but it's a gamble
as i said i don't look forward to writing ::&$ but maybe i'd get used to it
or maybe not... it's risky
 
no no you don't need to
I'm going with ::$foo only and by-ref everything
because it's the simplest thing to implement, mostly :-P
right I need to go do stuff, ttyl
 
Wes
lata, at 3 am? :B
 
hopefully not... but maybe :-/
 
 
5 hours later…
5:32 AM
https://www.youtube.com/watch?v=uvPbj9NX0zc&feature=youtu.be&t=42

Good morning.
 
Good morning
 
 
1 hour later…
7:03 AM
dude, it's like, way monday
 
o/
 
7:48 AM
o/
 
8:00 AM
contraption device, gadget
 
8:18 AM
morning
 
8:48 AM
rawr
 
 
1 hour later…
9:52 AM
morns
 
10:02 AM
apparently im now the owner of an early 2009 imac, any ideas on what to do with it?
 
use it as a projectile, launch it at one of your enemies ...
 
hmm
probably still good enough to watch videos on i guess
 
10:22 AM
ping @NikiC
 
10:36 AM
@cmb Hey - I've updated Xdebug to test DBGp tests on AppVeyor as well now. Are you still seeing failed tests?
 
10:46 AM
@JoeWatkins pong
 
cmb
11:04 AM
@Derick, locally I had still ~20 failing tests (you've fixed only four), but that might be due to missing elevated privileges
 
I'm curious to see what these failures where -- if you run the tests with --show-diff, can you show me the output?
 
11:17 AM
@NikiC got anything to add/correct about these notes:
PHP ABI
-------

What it effects: extensions (and SAPI's).

Thus, we only care about exported API.

Breaking changes:
  - remove or change linkage of (inline) an API function
  - reorder or change struct members (add/remove/change type)
  - add or remove constness (or volatility, not really in use in php-src)

Allowable changes:
  - adding new public structures
  - adding new functions
  - exporting functions

Breaking changes can only occur in major versions.
 
Does anyone here contribute to php-src?
 
hehe, one or two of us might ...
 
I'm just too excited about PHP 7.4 it has arrow functions
 
this chat room was the incubator for short closures and typed properties ... authors are around if you have questions ... if you just came to express utter joy (which is totally cool) maybe don't ping them by name ...
 
Okay, I also opened a question on arrow functions in PHP on StackOverflow. Please feel free to edit it and maybe add an answer below too :)
Also, did I ping someone by mistake?
 
11:30 AM
no no
 
Wes
11:45 AM
mornin
 
ormin
 
cmb
12:04 PM
@Derick, will check ASAP.
 
Hello everyone is there any magento 2 expert here
 
Good Morning, All!
 
i need to add custom.css to override default theme colors and fonts
 
Good morning everyone
 
12:18 PM
@VishnuBhadoriya is this a custom theme ?
 
1:03 PM
@StatikStasis just another day for me
though, I am going to start a MOOC algo course
 
o/
 
I get a weird error on that link.
...ah it broke.
 
1:35 PM
@Tiffany How is the job hunting going?
 
1:59 PM
@Danack thank you for giving me some hints about Google Cloud being slow, it ended up that it was not in the same region and it was slow because of that.
 
debugging stuff through using the Force
@DaAmidza so.....how did it be in a different region when you thought it was the same region?
 
I have a question regarding Docker, PHP and RabbitMQ.How can I call my PHP script which subscribes to a topic ib the Docker file?

I have the following command which gets executed in the Docker file but it does not call my PHP script "CMD apachectl -D FOREGROUND && php user.php"

But when i open the pod and execute the users.php in it it works.
@Danack I had multiple databases and I confused it with another one....
 
cmb
@Derick, test results on gist.github.com/cmb69/a8b35879dde763cd391ab9b5f53ae36f. Will have a closer look, when time permits.
 
@DaAmidza which command is the one that's meant to keep running?
 
@cmb Most of them are "001+ Warning: proc_open(D:\Users\cmb\AppData\Local\Temp/error-output.txt): failed to open stream: Permission denied in D:\git\xdebug\xdebug\tests\dbgp\dbgpclient.php on line 85"
I think it's because you're trying to run tests in parallel, and I haven't made that work yet
 
2:06 PM
@Danack well In my local envivorment i call the php script with it.
I'm just starting out with it so I don't have much experience with it.

What is the best practice to do it?
 
@DaAmidza if you really want to run them in the same container then I'd suggest looking at this script for how to do that a bit better. However I strongly suspect that you want to separate that script out to run in a separate container, and manage your background workers with Supervisor for which I have an example here
Supervisor will allow you to set the number of workers, and restart them automatically if
(when) they exit
 
@Danack thank you very much.
 
np.
 
Where is teresko btw?
@Danack I have a question though.
If I run this on kuberentes, and for example I have 10 replicas do I need the Supervisor?
 
2:22 PM
@DaAmidza depends on many things....including whether you want it to 'Just Work™' or do you want to spend time playing with Kubernetes?
 
@Danack I would like to make it work first but after that I would like to learn it the proper way.
 
I'd suggest leaving it as Supervisor until you need the scaling that kubernetes can provide that supervisor can't.
There are nice things about using supervisor, like being able to add new jobs without touching the kubernetes config, which are massive time savers.
 
Thank you very much, will look it up
 
btw my thoughts on that are covered in the readme....
 
Will go through it, thanks for the valuable info
 
cmb
2:38 PM
@Derick, indeed, looks better when run sequentially: gist.github.com/cmb69/966c7e49e9a823365c3543e3186c4cb8
 
2:55 PM
@StatikStasis i don't disagree, but this is a room about PHP.
Funny videos yes, rambling videos about politics, no.
 
Nothing was happening... it's a random.
Very well
 
anybody ever had to integrate CommerceHub?
I cannot find any docs -_-
 
1 message moved to friendly bin
 
Wes
3:12 PM
i've never revealed this to anyone twitter.com/WesNetmo/status/1143163947782197252 ha
 
@StatikStasis taking a break from it. Got the money back from my retirement fund, I can afford being unemployed for a while. I plan to use the time productively. (Study, contribute to open source, etc)
It's the first time in my adult life that I've been almost entirely stress free
 
@Tiffany I would still act as if the money was running out next week.
Unless this is apart of a plan to prepare yourself with job skills for your next job. But I would definitely stay highly focused on looking while studying. That time will be here before you know it.
You just don't want it to sneak up on you.
 
Hi. Nginx: How could I check if a header does not exist?
 
@StatikStasis it is. Every place I've applied to, I've been rejected essentially because I lack requisite skills, or I'm less qualified than other applicants
 
if ($http_x_custom_header) {
I saw this in stackoverflow but what does http_x_cutom_header mean?
 
3:21 PM
@X4748 Where did you see that? It's just a PHP variable
 
37
Q: Nginx: Reject request if header is not present or wrong

PaulIf I have the headers: X_HEADER1 & X_HEADER2, I want to reject all requests if either of these headers are not set or do not contain the correct values. What is the best way to do this? Thanks

 
@Danack Do you know if something can be done about github.com/jbboehr/php-psr/issues/66 ?
@X4748 That script is Nginx configuration, not PHP.
 
@Jasny-ArnoldDaniels I know. That's exactly what I don't understand. What does that line mean?
 
@Jasny-ArnoldDaniels Tell them to upgrade to PHP 7 would be my guess.
 
if ($http_x_custom_header) {
 
3:32 PM
@X4748 it's a variable that may have been set previously in the config.
But also, please don't ping people arbitrarily.
 
@X4748 I'd ask on Server Fault
 
@Danack Is that like global variables in PHP?
sry!
 
@Danack This is with all PHP versions 7.1 to 7.3. Also, if I get the package info via the pecl cmd, it says that 0.6.0 is the latest.
 
@X4748 sure, why not. But I think you should just read the nginx documentation over and over until you understand it. All the questions you're asking will be answered there.
 
@X4748 nginx is a web server. PHP might be a web programming language, but nginx has its own variables. That's not PHP code in that question
 
3:35 PM
Also, there is no difference in dependencies between 0.6.0 and 0.6.1.
 
@Jasny-ArnoldDaniels I have no idea then.
 
@cmb weird, as: pecl.php.net/package/psr lists 0.6.1
@Jasny-ArnoldDaniels possibly the build for it just failed (ma|tra)gically. Either releasing a new version, or deleting and republishing that version might fix it.
 
@JoeWatkins Maybe, adding new members to the end of TSRM globals is allowed?
002- Success
002+ Sleep until (before truncation): 1561385510.0445
003+ Sleep until: 1561385510
004+ Now: 1561385509.9995
 
cmb
4:14 PM
@Danack, Last Modified says 11 Nov 2018, but tagging happened 2 days later. Don't know what went wrong.
 
 
1 hour later…
5:15 PM
mornigns
 
o/
 
Hi, i was wondering if anyone is able to provide some information about connecting to a database from a mobile app.. I've read up many articles and some guides mentioned that you could upload a php script on your server, and with the url, execute a POST request on the app. But some also mentioned to use a REST API instead. My question is, will the be any downsides of requesting from a php script instead of a REST API?
 
5:33 PM
its very much the same
 
@iamhx I think you've misunderstood one bit.....a PHP script would be the thing that implements a REST api.
 
a post request to a php script you have in mind is the very basic beginning of "rest"
you just need some structure around the post request variables and you can call it Rest API
 
@iamhx You can write a REST API in many languages; PHP, JavaScript (via NodeJS), Python.
 
Ah i see... I was slightly confused because I thought REST APIs was a complete different thing... that makes sense now! Thank you so much @user3655829 @Danack @Jasny-ArnoldDaniels
 
Wes
6:17 PM
\o
 
7:09 PM
Hi, has anyone here used the composer from the Ubuntu 18.04 repos without any issues?
I was wondering if I need to use the composer.phar from the getcomposer website or just directly install the one from the repos
 
i would like to see composer in the repos. Not tried yet but that would make a difference
 
7:37 PM
what can cause mysql to accept inline password only? like mysql -uroot -proot works but not mysql -uroor -p say wrong password after i type in the password prompt
 
8:33 PM
@StatikStasis twitter.com/terrycrews/status/1143213312747827200 . (it's an ad, but still funny)
 
9:15 PM
=D
 
9:56 PM
Opcache stats for cache hits, hits and opcache_hit_rate are capped at 32bit NUM – #78202
 
> OS: WINNT
oh apparently that is still being released...?
 
well, more like... maintained?
 
cmb
10:20 PM
$ php -r "echo PHP_OS;"
WINNT
to clarify:
$ ver

Microsoft Windows [Version 10.0.18362.175]
 
10:47 PM
@Wes Cleaned up all the vendor prefixes I found in my CSS... the cut it down quite a bit! Thanks again.
 
Wes
:B
 
@cmb TIL. I thought at some point they stopped with nt and had something new
unrelated... I am swimming in xml these days
@Danack until quite recently, I've only seen the mention of SKU in your tweets with some random code... the file I've been looking at has 4 different SKUs for one item in the order...
and 4, compared to different identifiers per order... is nothing
/me is surprised by the amount of metadata being processed in this domain
(sorry for random ping)
 

« first day (3173 days earlier)      last day (1775 days later) »