« first day (3744 days earlier)      last day (1187 days later) » 

12:19 AM
I didn't click it as I was working still, but WTF is this fucking thing :D @DaveRandom @cmb
 
It outputs an HTML table, what else does it do? :P
 
Rather how does it do it
 
cmb
s/how/that/ ?
 
:P
 
12:39 AM
All issues have been resolved!
 
@Jeeves lies
 
 
1 hour later…
1:59 AM
@Wes tried the salt and vinegar chips on bread, it's better than I thought
 
@IluTov tbh, I am not always good at API design. About 50% of the time you should probably do the opposite of what I suggest. /cc @crell
 
@Danack Good to know. :-)
 
Boi wtf happened on the list
 
@Girgias the rhsoft guy is deeply mentally ill.
 
Yeah, I'm seeing that
 
2:10 AM
apropos of nothing, wouldn't it be amusing if an abusive person had sent emails through his company's mail server, rather than it being through an independent service?
Something for Herr Knacker von Hof to have a look at...
 
Well, I need to setup Fedora now with everything
 
2:31 AM
Am I the only one who cannot access master.php.net even if I allow TLS 1.0 and 1.1?
 
It works for me if I click the 1.0 1.1 button
 
Seems like a Fedora specific thing...
 
Good guy fedora
tips fedora
 
Wes
2:48 AM
@DaveRandom that's not me. it's my evil twin
@Wes guess what, i ended up regretting that!
 
3:25 AM
Boi 21s to run all tests with a basic compile of php-src with -j24
this is amazing
Although I'm hitting a test failure
 
3:42 AM
Test ext/standard/tests/file/disk_free_space_basic.phpt fails on Fedora 33 ・ Filesystem function related ・ #80629
 
 
2 hours later…
5:42 AM
@NikiC any reason why we do not warn for non public visibility for __clone() and __destruct() ? (I understand that __construct() is very special so most normal rules do not apply for it) 3v4l.org/6NqUv
 
5:56 AM
Good morning.
 
 
1 hour later…
7:08 AM
 
7:24 AM
morns
 
Wes
in amphp do you know if sending through websocket will preserve the sending order?
$p1 = $ws->send("data 1");
$p2 = $ws->send("data 2");
is it possible that p2 resolves before p1 ?
 
8:15 AM
I guess. But isn't the idea of Promises that you can chain them?
Like $p1->onResolve(fn() use (&ws) { $ws->send("data 2"); }
 
@Wes probably not, isn't that the point? to be async?
 
@Danack Would be nice to know upfront which 50% to ignore. My APIs usually need redesign by the time most of the clients are in production.
 
Wes
@mega6382 async could mean give control to something else, while it is blocking to other messages for the same websocket connection
now that i think about it, i don't see why the order should not be preserved on the same connection
 
8:35 AM
@Girgias For __clone, I would assume because non-public visibility actually works
For __destruct I'm not sure
 
 
1 hour later…
9:53 AM
Howdy. I'm trying to sort out what I think is a longstanding bug in the mongodb extension for ZTS. We allocate a HashTable to use for persisting connection objects across requests in GINIT. Later, in MSHUTDOWN, we destroy that HashTable (and its objects) and then call a library cleanup method, which frees other allocations (e.g. internal memory, OpenSSL, SASL). AFAIK, this means we leak connection objects on ZTS.

The first fix I considered was moving the HashTable destruction to GSHUTDOWN; however, that opens a can of worms because GSHUTDOWNs all happen _after_ MSHUTDOWN, and our library's
 
@jmikola ginit and gshutdown run per thread
And I think the main thread does service requests as well
 
I follow that they run per thread (and presumably execute within their respective threads), but does the main thread outlive all others?
Sara suggested use a true global to count threads (e.g. have GINIT inc and GSHUTDOWN dec) and having checking if the count was == 1 to infer the "last" GSHUTDOWN. However, I think that would warrant using a mutex around that counter, and that means I'd need a thread-safe way to allocate that mutex.

I found prior art of PCRE using `tsrm_mutex_alloc` (which it only does from the main thread), but the mutex itself is only used for RINIT, while I'd need to use it in other GINIT/GSHUTDOWN handlers.
 
10:10 AM
an atomic counter is maybe a good idea
 
@FlorianMargaine looking into that (thankfully it's just a counter), too, but a bit worried about platform compatibility.
ah, looks like our internal library has a portable atomic API we can use
 
cmb
10:33 AM
Anyone with access to the pecl.php.net machine around?
 
 
2 hours later…
12:06 PM
@NikiC ACK, makes sense. But yeah for destruct it is rather odd... should I ping the list?
 
12:21 PM
Morning
Best day of the week, payday
And also hopefully my first major programming project will be merged today
 
12:34 PM
gz
 
@Danack Aren't we all. I frequently change my mind about things. @Crell knows what I'm talking about ^^
 
12:50 PM
Zend/tests/runtime_compile_time_binary_operands.phpt failed ・ Testing related ・ #80630
 
@Wes yes, it preserves sending order.
and no, p2 will never resolve before p1
 
Wes
makes sense, given it's the same connection
 
yeah
 
Wes
which means i did a stupid!
 
for different connections this obviously does not apply
 
1:05 PM
Good morning
@Danack ...just wow
 
 
1 hour later…
2:11 PM
@StatikStasis you should have seen the shit that went down in r/animemes a couple of months ago.
 
2:25 PM
@IluTov whistles innocently
 
Wes
i think i asked before... does typescript have variadic type parameters?
e.g. Tuple<int, float, string> Tuple<int, bool> or Closure<returntype, arg1, arg2> Closure<returntype, arg1, arg2, arg3, arg4>
 
...args: any[] I think
Although I'm unsure what you're after with the closure? (arg1,arg2,arg3,arg4) => ReturnType would already be its own type
 
Wes
interface Closure<out TReturn, in ...TArgs>{
    public function __invoke(...TArgs $arg): TReturn;
}
 
@Wes This a PHP / TS hybrid?
 
Wes
2:39 PM
just pseudoish code
the arguments are not a fixed number, hence the variadic type parameter
 
From TS I'm just not sure why the closure interface, it seems unnecessary
 
Wes
it's to allow for variance in/out on types
otherwise they are invariant
 
IMO that would be better in the function signature itself, but I'm not sure what the objective is
 
Wes
@MarkR well, you can't use a function as type declaration?
 
2:54 PM
@Wes In TS?
 
Wes
in general. i don't know about TS
 
In TS every function signature is its own type.
interface Foo { myFunc: (a: number, b: bool) => string; }
I expect if PHP did something similar it would come up with some kind of mangled interface name based on the signature of __invoke (or the closure)
But perhaps the need for a zend_class_entry for each one would be too heavy
 
Wes
callable(int, float): stdclass
callable(bool): arrayobject

are sugar over type definitions that are like these

interface CallableWith2Parameters<out ReturnT, in Arg1T, in Arg2T>{}
interface CallableWith1Parameter<out ReturnT, in Arg1T>{}
that because c# (afaik) doesn't have variadic type parameters
with variadic type parameters you'd have
interface Callable<out ReturnT, in ...ArgT>{}
similarly some languages have
class Tuple2<T1, T2>{}
class Tuple3<T1, T2, T3>{}
class Tuple4<T1, T2, T3, T4>{}
class Tuple5<T1, T2, T3, T4, T5>{}
etc, because they don't have support for variadic type parameters (if they are a thing at all)
 
In TS you return: function foo(): [ int, bool, whatever ]
Although I usually prefer function foo(): { x: int, y: int } { ... }
 
Wes
3:14 PM
that's sugar too, over something like object<T1, T2>{ public T1 $x; public T2 $y; }
also not only you match the types but the property names, so it does more than just traditional generic type declaration
 
TS interfaces match on names + types, even if the interface name is different
 
Wes
yeah, pretty neat
 
It can be a tad odd at times when it spits out a 6 line error listing all the properties it doesn't have, but it's not the end of the world, and is worth it for all the other bits. It is without doubt my favour typing system I've used
 
 
2 hours later…
5:16 PM
Good morning does anyone know symfony that can help me install an app from a scammy company? I got a bunch of errors when I run composer.update
0
Q: Edirectory Symphony Composer Install Package Conflict

d7l2k4I am helping someone install E-Directory. It's overall a buggy app. composer.json { "autoload": { "files": [ "src/ArcaSolutions/ModStoresBundle/Resources/functions/hookfire.php", "src/ArcaSolutions/ModStoresBundle/Resources/functions/hookexist.php" ], ...

 
5:39 PM
@Wes do you want something like this:
function foo(a: number, b: number): number {
return 1;
}

function bar(): typeof foo {
return foo;
}
 
6:14 PM
@d7l2k4 you'll notice the speed of composer 1 is much slower than composer v2
 
hi webmaster777 thanks. Please do stick around. I was up all night trying to figure this thing out.
 
6:29 PM
@d7l2k4 just to be clear, you do understand that it's not anyone's responsibility to help you? You can ask someone to stick around, but it's their choice if they do or don't.
 
6:47 PM
:)
 
Show each OPERATOR after category-name. ・ Documentation problem ・ #80631
 
of course haha. it's no one's responsibility to help me. As matter of fact, this composer install is taking a while, v 1.1
 
@d7l2k4 cool, just wanted to be sure. We get entitled jerks sometimes. Thanks for understanding. :)
 
I'm not entitled at all. I'm thankful for the help.
 
7:15 PM
ok. now it says [Composer\Downloader\TransportException]
The "http://repo.packagist.org/p/friendsofsymfony/oauth-server-bundle%244a31b3713294f9e468e13e0c03810776095325113d004f45f416fb6e8e12af89.json"
file could not be downloaded:
 
Does PHP have null-terminated strings?
What is the first sentence here referring to? php.net/manual/en/mysqli-stmt.prepare.php
 
You can add a null byte in a string
And a normal PHP string is also null terminated, it just keeps track of the length as well to deal with the case when a null byte is present in the string
 
@Dharman the null terminated bit could be deleted....
"Prepares an SQL query from the query string parameter".
 
7:39 PM
Improve Search-box for OPERATORs, KEYWORDs and MAGIC METHODs. ・ Documentation problem ・ #80632
 
8:04 PM
This may be a rubber duck message... I need to recursively check for an array value... I have an array $multimedia which may contain zero or more arrays, and within those arrays there's a type key... I need the value of that key... wanted to avoid using a foreach... blaaah
 
by "rubber" you mean "artificial" ?
 
No
In software engineering, rubber duck debugging is a method of debugging code. The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, line-by-line, to the duck. Many other terms exist for this technique, often involving different (usually) inanimate objects, or pets such as a dog or a cat. Desk check your code is the original term for this technique. Many programmers have had the experience of explaining a problem to someone else, possibly even to someone who knows nothing...
 
ah I see
 
In my case it's not necessarily debugging but figuring out the logic
 
yeah got it ..
 
8:08 PM
@Tiffany reduce
or filter might be more appropriate
loop is the best
 
Yeah, ended up looping
I should probably refactor into a method that does the checking for type, I've done it multiple times... 😣
 
yeah, totally
 
DGF
Does anyone see any error here: gist.github.com/HeadOnFire-sudo/…, in the query or something? The script stops running where I have that big arrow (line 27)
 
8:30 PM
'stops running'?
 
DGF
The script goes into that if ` $result = mysqli_stmt_execute($statement);
if( !$result ) {`
 
why do you have an if?
 
DGF
and it's not meant to, since if it goes there it means that it has some kind of error
 
Remove the if and enable proper error reporting
 
DGF
The if checks if it return false, if it's false it has an error
 
8:34 PM
In fact remove all of this code
Messages like "Something went wrong. Please try again later." are completely useless.
You don't need 90% of that code
Here is how to enable proper error reporting How to get the error message in MySQLi?
 
DGF
It's not something professional....
 
Also, I would highly advice to stop using mysqli as it is too difficult for you. Start with learning PDO, it is much simpler
 
DGF
But the fact is that something is wrong with the query or something?
 
I don't know. Ask PHP to tell you what is the error
Tell PHP to throw errors when they happen
 
Make ONE NEW PAGE which has all PHP words for search. ・ Documentation problem ・ #80633
 
DGF
8:49 PM
Isn't PDO for OOP? I'm doing Procedural PHP
 
@DGF No.
I believe you misunderstood what the phrase OOP means.
 
You can mix procedural and OO code. The mysqli procedural API does this: You pass around the mysqli (stmt) object as the connection / link handle, the functions simply call the relevant method on that object and return the result.
 
9:29 PM
am I missing something, or is there a discrepancy? php.net/manual/en/function.print-r.php
> print_r ( mixed $value , bool $return = false ) : string|bool
> When the return parameter is true, this function will return a string. Otherwise, the return value is true.
 
@Tiffany Sounds right. 3v4l.org/AbWPu But yeah, it sounds more complicated than it has to be.
 
DGF
@AllenJB got it, thanks
 
cmb
10:07 PM
@Tiffany The $return parameter is not the return value. :)
but yeah, pretty unfortunate API
 
3 day weekend
 
@Tiffany "Otherwise return value is boolean true". Common use print_r($foo, 1);
I can't remember when I used it last time.
 
10:27 PM
@cmb It's so good that our cms has adopted this great technique in multiple places :P
 
cmb
I'm using print_r sometimes for debugging and during development, but does it make in production?
well, maybe for logging
 
Must it bug be open or I can just PR fix? @cmb
Docs related.
 
cmb
docs don't need bug ticket; PR is fine
 
@cmb Oh, I was referring to the "return or print" technique.
 
Does anyone have English as a native language who would be able to help me improve "The SQL statement may contain zero or more parameter markers represented by question mark characters at the appropriate positions."
It's what is said in dev.mysql.com/doc/c-api/8.0/en/mysql-stmt-prepare.html but in a less personalized way
 
cmb
10:37 PM
@IluTov in general? my sincerest condolences :P
 
@cmb Lol, luckily not, just in a few places.
 
cmb
bad enough
 
10:57 PM
@cmb Thanks. So, I wanted to add PHP 8 into array|set of revisions of print_r function (yey, found where to put it :D), but I can see that none of other function have included PHP 8 (except get_resource_id() which is not used before). Should all of those be fixed also or to leave print_r as is for now? Actually question is: is ok to add PHP 8 to print_r function's revision?
 
cmb
@Tpojka yeah, all functions which are supported by PHP 8 should be updated; doing it for each function individually is too much work; maybe doing it for each version.xml file separately is an acceptable compromise?
 
But is ok to start with these or restructure? Maybe to update these until some new structure (if I get you well)?
 
I have to use print_r for debugging... >.<
Basically a debug log message and print_r are my only options for debugging
I think that and the dev environment are the only downsides to my job
 
11:14 PM
write_property handler of internal classes is skipped on preloaded JITted code ・ JIT ・ #80634
 
@Tiffany Can't you sneak in a composer require --dev symfony/var-dumper? :)
What keeps you from at least using var_dump?
 
cmb
@Tpojka yes, should be fine to start by updating this file (I think all those functions are available for PHP 8)
 
@IluTov it didn't work when I tried, I think it gave an error message.
 
@Dharman I'm not native but that sounds perfectly fine to me.
 
@IluTov I could but I wouldn't be able to use it to test stuff that works within the system
 
11:18 PM
Thanks
 
@Tiffany Do you remember what specifically? There's almost always a way to make it work (assuming you actually get to see the output somewhere).
 
@cmb On it. Testing function by function.
 
11:33 PM
@IluTov I don't. I'll check it on Monday (or maybe tomorrow if I'm bored). I finally completed all of the change requests and bugs associated with a major PR, I think it will get merged on Monday
I think I deserve some time with Path of Exile and the new league that launched today :D
 
@Tiffany Cool, I just know for me personally not being able to dump stuff properly (or alternatively using a debugger) is a huge productivity killer. Have fun gaming ^^
 

« first day (3744 days earlier)      last day (1187 days later) »