« first day (4239 days earlier)      last day (934 days later) » 

00:00
I'm working with Laravel now.
@cmb If I merge something like this, what, if anything, should go into the NEWS file for it? github.com/php/php-src/pull/8259
00:26
@cmb I ended up adding this NEWS entry. Let me know if it looks okay. github.com/php/php-src/commit/…
00:42
@Tiffany Yes, not like argv. If one say for example read -i "eat food" -p '> ' in bash / readline one get a prompt like > eat food where one can edit "eat food". PHP has readline but have not found a way to do the same (i.e. have "eat food" at prompt as pre-fill). Only empty prompt. (at least in a sane way)
01:05
Does anyone know what "resource(100) of type (curl)" means when I var_dump() on a curl_init()? What does the "100" mean? I can't find anything about it online.
Bit size, maybe?
Ah maybe. I was thinking it was some sort of error code. That would explain why it's different after using curl_setopt.
01:27
Using var_dump() on a resource can't tell you much, other than that it's a resource and the type of resource :-)
02:03
I've got Valgrind set up and I'm running tests through it for this extension I'm toying with. I've got several memory leaks, but my C knowledge around memory management is limited and, while I can see the information about the memory leaks in the output, I'm not sure how to interpret it. Here are the test results: github.com/ramsey/ecma_intl/runs/… (you can ignore the test with the segmentation fault, for now)
02:40
@ramsey Strange that it seems the string freed was allocated during compile.
My assumption is you're freeing a zval you should not be.
 
2 hours later…
04:40
@ramsey I created a small PR on your project just to comment on it ( github.com/ramsey/ecma_intl/pull/2/… ). Hope it helps
 
3 hours later…
08:06
@TimothyFisher It's just an increasing number to keep objects (or resources) apart.
Hi, just a quick question. Does quest system can be done in php?
I don't know what "quest system" means.
But PHP is a general programming language, so the answer is likely: yes.
Quest like in games you have to do something to gain for example experience
cmb
cmb
08:36
@ramsey that's fine
08:46
fun.... php.net/gpg-keys.php says php-keyring.gpg [36Kb] which is the new size of the updated keyring... but download still get the old one (26Kb)...
cmb
cmb
08:57
Cache issue? Might resolve in a while.
 
3 hours later…
12:02
Hello, can anyone help me? I have a doubt about Transactions in Laravel
Nobody can help you, because you didn't ask a question.
I'm trying using "transactions". I mean, I have a html table where you can edit, add or remove rows. For each actions, I do an "update", "delete" or "insert" but I'd like to have a "confirm" button and when you press there do an "commit".
I don't know how to save a reference of a transaction
I posted my question but in Spanish, here you can see the code: es.stackoverflow.com/questions/536396/…
I'd like to save a reference of "DB::beginTransaction();" for getting that later and do "rollback();" or "commit()" of that transaction.
I know nothing about Laravel, but you can't span a database transaction over multiple requests.
I thought that was possible when I read this: laracasts.com/discuss/channels/eloquent/…
that looks like it's all in the same request, where you can can use a try/catch for rolling back transactions in the same request.
12:13
You're right. What kind of solutions could you recommend me for this case? I'd like to manage a table and save the chances when you press a button.
At first, I thought to "clone" my table
Yeah, I translated the question.
For instance, mytable_iduser_idservice
Are you adding to a table, or updating it?
when? with the previous solution? yes, when someone enter to mysite.com/table/1 a genereted another table "copy_data_1_1" where the first 1 is the id of the user and the second one is the id of the service (param from url) with all the data from that service. When that person modifies / adds or deletes something I apply the chances on "copy_data_1_1" table. If that person press on "confirm" I delete all the data from that service from the "correct" table. I apoligise to you for my English level.
No, I meant whether the modifications to the table that you want to have people to confirm, are they additions to the table (new rules), or otherwise changes to existing rows?
I would certainly not do the copying of the table, because what happens if you have multiple people do it at the same time?
12:23
Yes, that you said is a big issue. I thought about that and I think I need to limit the amount of users to 1. I thought I create another table (id_user, id_service) and check that table before showing the html table. If someone is modifying that service, I would show a message about it. Let me know if you know another solution
The usual way to do this is to have an extra column (say, called 'pending_by_user') so that it is possible to add the updated data as a new row (instead of modifying an existing one). When the user then confirms, you can remove the previous row with the data, and changed the "pending_by_user" to NULL, in a single transaction.
And then account for this when displaying data. By using the user id as a value in the "pending_by_user" column, it also allows you for multiple users updating data at the same time.
I'm not sure If I got your idea. Do you mean doing that in the "correct" table? of having a table per user?
No, just stay with the same original table that you have.
what happen if two users modify the same row at the time?
12:52
there will be two extra rows, but the "pending_by_user" will have their user id so that you can distinguish between them
13:29
@Tiffany That's very evil.... I made myself a cup of tea 10 minutes ago, went downstairs, forgot I'd made one, and made another. Now I have 2 cups of tea. With different teabags of course.
 
3 hours later…
16:00
morns
@RemiCollet Oops! I think when we updated the keyring recently, no one updated the submodule in web-php. I see you just did that. Thanks!
@Pierrick Thanks! I'll take a look through it and will probably ask questions on the PR. I want to try to understand how I can debug and arrive at a "correct" solution on my own, so that I don't feel like I'm floundering helplessly. ;-)
@Pierrick Added some questions to the PR. Trying to better understand how memory allocation works. :-)
16:55
Can anyone tell me what is wrong in my code?
Everything except photo is getting saved in the hosted server. Can anyone please look into it and let me know what is wrong in my code for saving the photo? (But everything is getting saved in the local host without any error.)

<?php
include("dbconfig.php");
$date=$_POST['date'];
$type=$_POST['type'];
$name=$_POST['name'];
$filename=md5(time()).$_FILES['photo']['name'];
$tmpname=$_FILES['photo']['tmp_name'];
move_uploaded_file($tmpname,"myphoto/".$filename);
(see full text)
Your kind support would be highly appreciated
17:11
Morning

When reviving/pursuing an RFC that has already been discussed a while ago but not voted, should we reuse the RFC, or create a new one ? I'm asking this in the context of https://wiki.php.net/rfc/auto-capture-closure. Original authors Nuno and Larry are comfortable with reusing the origin code and RFC (their names will be on the authors list in any case).
@ArnaudLeBlanc I think it's fine to re-use it if it was never voted on
cmb
cmb
17:30
^ that
A vote was started, then canceled, to allow time to revist the excessive capture question. Which... wasn't revisited until now. :-)
I think that qualifies for reuse :-)
cmb
cmb
+1
I would say that you probably should update some things ,and restart a discussion on the list though @ArnaudLeBlanc
17:47
Yep. Note the changes in a changelog, bump the "version number" on the RFC, etc.
18:09
@ArnaudLeBlanc wiki.php.net/rfc/auto-capture-closure - Updated. Please verify that it's accurate for your patch. :-) Especially the "variable capture"section. (And if anyone else wants to look it over to make sure I'm not saying anything dumb, please do.)
18:20
@user3079987 could be a permissions issue
It's hard to say, there's a lot that can go wrong with files
If it's not working on production, check error logs
@cmb Is this good for me to merge? github.com/php/php-src/pull/8339
cmb
cmb
18:39
@ramsey IMO yes, but I'm not a Linux person, and I wouldn't have a machine available where this could be tested. I guess, though, "nobody" else has such a machine either.
@cmb True
18:53
Thank you!

In "variables defined within an auto-capturing long closure that are also defined externally to the closure will be captured by value", it would be more accurate to say that "variables that may be read within" or "variables that may be used" instead of "variables defined"

In the section "What about long-closures?", the two bullet points are not longer true. The new patch supports the use() syntax, mostly for the purpose of capturing by reference
Oh. Hm. So fn() but with explicit capture?
Does it work for by-val, too?
Yes
It will capture all variables that may be read by the function + any variable specified in use() (by-ref and by-val)
```
fn () use ($a, &$b) {
$b = $a + $c;
}
```
captures $a by-val, $b by-ref, $c by-val
@ArnaudLeBlanc I wish for the RFC to elaborate on the precise criteria what is implicitly captured and what not - like I suppose var-vars won't just implicitly capture everything etc.?
It's quite brushing the capturing semantics away and focusing on the discussion instead of this most central part to it :-D
19:08
@cmb Seems I do. At least __CET__ is defined for me.
19:22
Does this sound familiar to anyone? Maybe I'm missing a package or something?
ext/opcache/minilua /tmp/php/ext/opcache/jit/dynasm/dynasm.lua  -D X64=1 -D ZTS=1 -o ext/opcache/jit/zend_jit_x86.c /tmp/php/ext/opcache/jit/zend_jit_x86.dasc
/bin/bash: line 1: ext/opcache/minilua: cannot execute binary file: Exec format error
make: *** [Makefile:343: ext/opcache/jit/zend_jit_x86.c] Error 126
Looks like minilua got corrupted or something. I'll see if I can refresh it.
root@141175f3a917:/tmp/php# ./ext/opcache/minilua
bash: ./ext/opcache/minilua: cannot execute binary file: Exec format error
Very odd. make clean should have been removing that file, but it wasn't. I had to manually remove it.
19:43
@bwoebi Agreed :)
@ArnaudLeBlanc What's the value in mixing it like that? It seems like it would be confusing if I specify some things explicitly but other stuff gets bound implicitly anyway.
Also, go ahead and expand the variable capture section with more detail. I can wordsmith it to flow better afterward if needed, but you actually know what it's doing. :-)
(I think you mentioned a 2 pass thing in Discord; describe that.)
20:01
@ramsey Exec format error... possible amd64 vs arm64 corruption on M1?
@Derick Nah. For some reason, make clean isn't removing that file. I used the same directory to do a build on macOS and also in a Linux container. I had to use git clean to completely get rid of everything not in the repo, and then do a buildconf, etc. in the container.
After doing that, everything's building fine in the container
Explicit capture by-ref can be useful because we can't auto-capture by-ref. People would have to switch back to long closures when they need to capture by-ref, otherwise. Explicit capture by-val is supported mostly for consistency and because it uses the same grammar as long closures for this part. It can be useful when the function has var-vars though, because var-vars don't capture (like in arrow functions).

I will expand on variable capture
hm. Explain the algorithm better and I'll see if it makes sense to me. :-)
 
2 hours later…
21:52
Thanks to @Pierrick, I got past one of my memory leaks. I have another one that I've been trying to solve on my own, but I'm hitting a wall. I suspect the leak has something to do with the memory of the strings I'm adding to `UEnumeration` in `ecma_intl_getMeasurementUnits()`.

Leak message here: https://github.com/ramsey/ecma_intl/runs/6597897917?check_suite_focus=true#step:5:103

Code that I think is related here: https://github.com/ramsey/ecma_intl/blob/b2f1281c0762b479ca7a314689ec38eb8dff13ae/src/measure_unit_bridge.cpp#L49-L85
(see full text)
22:20
I mean it seems to point that the call at line 173 is illegal: identifier = uenum_next(values, &length, &status);
It only happens when it uses the code path where it calls values = ecma_intl_getMeasurementUnits(&status);
so, I assume that I'm mishandling the UEnumeration within that method
23:17
@ramsey Did you fix the segfault yet? It looked confusing when I had a brief look
23:34
@Derick No, I haven't fixed it
I'm not going to look at it anymore tonight. I couldn't fall asleep until 04:30 this morning, so I'm going to crash soon. :-)

« first day (4239 days earlier)      last day (934 days later) »