« first day (3232 days earlier)      last day (1730 days later) » 

1:07 AM
if I add a css style inside a cordova app, but the main content is a iframe will it be applied to iframe?
 
1:30 AM
> Your Imagick says compiled with IM 6, but your ImageMagick says IM 7. So there is likely a conflict. Perhaps install ImageMagick 6 rather than ImageMagick 7.
I still need to get that t-shirt.
 
 
4 hours later…
5:03 AM
\o
 
5:28 AM
\o
 
@NikiC any chance of exporting the variance stuff ?
the way do_link_class is written is making it hard to create classes at runtime (a-la componere), because it makes unconditional assertion in the rebuild properties info routine, and I can't call any of the others ...
and possibly export the rebuild prop info routine, because I've had to copy that verbatim ...
I need to basically write my own link class routine ... I think ... of course if all of this seems strange (stranger than usual for krakjoe) and I'm missing something, do tell ...
I've got my tests working, but of course they don't use any variance, I know I can crash it ...
 
6:03 AM
How can I know encryption type of .cer file using php.. I have openssl installed at my local
 
 
1 hour later…
7:29 AM
mornings
 
7:41 AM
morns
 
7:54 AM
morning
I tried to do something which might be useful so I started working on implementation for my @Annotation() RFC
I figured out that a lookahead mechanism in the language scanner based on @NikiC implementation of lookahead used in arrow function actually does the thing and replacing T_AT with T_ANNOT_START solves the issue with silence operator.
Is that a good way around the silence operator to do that?
 
chivy to tease or annoy with persistent petty attacks
 
@brzuchal you don't need to support annotations everywhere, and if you don't need to support them everywhere (and you can't without breaking bc, "@Annotation" is valid statement), you don't need to work around silence operator issues ...
I would think anyway ... it seems like you created the silence operator issue by trying to support annotations everywhere, or did I guess wrong ?
 
@JoeWatkins yes, that's right they should not be handled everywhere but that was the only way I found to recognize @Annotation() class Foo {} as an annotation and not syntax error
 
<?php

[@Annotation()]
[@AnotherAnnotation()]
[@TheLastAnnotation]
class Value {

}
that ...
 
Yes, but without brackets
 
8:09 AM
think how difficult it's going to be to read annotations when there are more than one ... these are for humans mostly, they want to be delimited in a human friendly way ...
 
I'm trying to implement them as they're in Doctrine mostly
@JoeWatkins do you think I should add brackets there
 
I don't love it, but I don't like @Thing() @AnotherThing @LastThing() function () {}
it's an utter mess ...
although I'm not sure it makes the parser any simpler ...
 
Morgens
 
yohaa
 
@JoeWatkins I can try with my concept and then prepare another branch with the square bracket and see the reaction when the time comes into the discussion
 
8:24 AM
I'm not really sure that you can reasonably use @
 
@JoeWatkins that would be mix of C# and Java style
 
it can't break bc ...
even if you can get @Annotation class Thing {} to parse, you have changed the meaning of that valid code, it can't happen that way ...
oh no what am I talking about ...
that's not valid code :D
 
@JoeWatkins I'm not breaking bc, in lookahead after '@' is found it checks if further tokens belong to annotation and the next non-ws token is class|abstract|interface|trait|function|public|protected|private
 
@brzuchal i agree with joe that the brackets help separate from a raedbility pov
 
Then instead of returning T_AT in scripting I return T_ANNOT_START token
@JoeWatkins exactly
 
8:28 AM
static|const
 
dmitrys rfc on attributes was the last one that was close to this feature and used <<>> as seperators: wiki.php.net/rfc/attributes
imho it would have gotten accepted if it didn't return AST nodes, but just arrays/objects instead
 
@beberlei AST node provides better handling, whereas array/objects are limited to given structures...
But yes, AST requires special handling and compilation...
 
@lisachenko AST nodes don'T provide better handling if the userland code has no additional APIs at all to traverse or "interpret" them. both was missing, so you would have to implement that in userland
 
@beberlei I'm using his implementation to figurre out how to implement parsing and storing annotations data
 
Yes, like Doctrine annotations does, but this will be built-in with opcache support, reflection API, etc...
 
8:33 AM
@beberlei I would like to try with objects creation on reflection annnotation read
 
@JoeWatkins I think if we get an annotations in PHP, we should do it the way Dmitry proposed
 
also, everything doesn't have to be so complicated all the time ;-) userland never had any notion of ASTs or low level except token_get_all(), imho PHP should be simple by default and then people can add whatever complicated they want on top :)
 
syntax I don't care about, but I agree with benjamin, stuff is missing ...
 
But TBH, what do we need annotations for ... they don't make anything simpler, just more magical and implicit
 
if you're going to return ast, then the ast needs at least second class (ext) support in php, it's not enough to copy paste a class from an external extension into core and call it cooked ... it isn't cooked ...
 
8:35 AM
yeah the attributes rfc would first need the ast extension to be in core
 
@bwoebi cause people love magic
 
@beberlei maybe this is just a question for one userland library? PHP will provide a simple API and store this data in the opcache, whereas userland library will support some standard via PSR...
 
There is a single thing annotations should do, and that's clarifying the contract of the function.
 
Just my five cents )
 
@beberlei I will try with parsing and storing the data and come back to talk about how to get the data into userland
 
8:38 AM
I suggest you work the other way around ... the syntax is the easy bit, and already done, so is storing ... the thing you want to explore is interaction with userland ...
that's the main reason it did not pass ... not syntax ...
 
BTW Dmitry syntax was borrowed from Hack a little bit and I suppose we don't like Hack anymore
 
@brzuchal I don't.
 
@lisachenko you are too much in your world of highly abstracted modern php frameworks. I believe if you cannot use a PHP core feature with just 2-10 lines of code, then it has no business being in core.
its totally fine to work with composer libraries and modern abstractions, but a broader appeal is necessary to get this vote to pass
 
just throwing it out there ... but maybe returning reflection objects can work, if you extend reflection with a ReflectionVariable or similar ... that way you can return code, arrays, or other variables, and don't need to expose any AST ... and, code in the annotations may be compiled (and so jit'd) in the normal way ...
 
this is the primary reason why all annotation/attributes rfcs failed, even the one that doctrine/guilherme itself proposed, I tried to argue him down from mapping to classes to simplify to arrays back then :)
 
R.P
8:45 AM
why isn´t there mb_strcmp function? :(
 
or actually just add ReflectionAnnotation
 
But I don't want more magic :(
And morning
 
o/
 
<?php

class ReflectionAnnotation implements Reflector extends ReflectionFunctionAbstract /* or something */ {

    public function getClosure(Closure $prototype = null) {
        /* create closure from code in annotation using optional $prototype as arginfo source */
    }

    public function getVariable() {
        /* return plain variable */
    }

    public function getObject(string $class) : object {
        /* return object($class) */
    }
}
this looks quite reasonable ...
a method for each camp should keep everyone happy ...
going back with the same deal, with frills, won't work ...
 
it would need a getName() so that parsers can decide weather to process the annotation or not, or what of the 3 approaches to use
but thats probably implicit, ever Reflectoin* has a getName
 
8:57 AM
yeah not complete, not sure it should look exactly like that ... the point is, the earlier discussion lead to the emergence of several camps that want different things, so give them the things they want ...
within reason, the only reason they wanted ast was to create code from it and bind symbols to it ... so provide a way for them to do that without the drawback of having to expose the ast, with getclosure or __invoke, or something ...
 
@JoeWatkins [@Annotation()] -> would result with an object creation on getObject(), right? so going further ["some string"] -> would result with a string variable through getVariable() and [expression] -> would result with a closure being created on getClosure(), is that what you mean ?
 
yes
 
more less
 
no wait
[@Annotation("some string")]
[@Annotation(expr)]
that ...
(they need names)
 
Ok
But what is the purpose of expression in annotation?
 
9:03 AM
[@Annotation({
    if ($param1 > $param2) {
      do_thing();
    }
    /* other code perhaps */
})]
 
I haven't thought about expression yet, but I think over that
 
or maybe shorter (single statement), or without curly braces ... whatever ... you want a way to turn an expression into code at runtime where the symbols are bound, somehow ... that avoids the need to expose ast ...
 
Going further when I'd like to adopt for eg. Doctrine @Column annotation it would have to look like that
[@Column(["type" => "string", "length" => 2, "options" => ["fixed" => true, "comment" => "Initial letters of first and last name"]])]
quite a lot of square brackets
 
9:38 AM
@JoeWatkins with that syntax and all inside () I would not be able to use nested annotations, right?
Doctrine uses it like that @Table(name="ecommerce_products",indexes={@Index(name="search_idx", columns={"name", "email"})})
 
9:57 AM
@Trowski I see you are working hard getting amp updates out :-)
 
 
1 hour later…
11:01 AM
Trying to create own isset/notempty function creates keys by ref – #78443
 
11:20 AM
<?php
use ObjectAnnotation;
[NoValueAnnotation] // simplified annotation with a name and no value
[SingleValueAnnotation("foo")] // simplified annotation with a name and string value
[ClosureValueAnnotation(fn(Foo $foo) => $foo->bar)] // simplified annotation with a name and closure as value
[@ObjectAnnotation("bar")] // featured annotation with a name and value being an object: `new ObjectAnnotation("bar")`
class Foo
{
  protected bool $bar = true;
}
@JoeWatkins does it ^^ cover most of what you've been expecting from annotation system?
I tried to express how the syntax could look on entity and controller gist.github.com/brzuchal/35ba8dbc2a405d9428c902ca938b2c40
In a future with named arguments like in Rasmus RFC it could be easier
 
11:51 AM
@PeeHaa Too hard in case of Redis. :P
 
@kelunik What's the problem?
 
@kelunik you looking at my girl?
 
@PeeHaa github.com/amphp/redis/releases see v0.3.4 and v0.3.5 :P
 
ouch :P
Thoughts and prayers @Trowski
:D
 
@brzuchal think so
 
11:59 AM
@kelunik Oh, that is related to my PR
@JoeWatkins Cool, thank you. I will try to build something useful around that
 
@JoeWatkins I mean the version 0.3.6 as I see in the description
 
what ?
 
@brzuchal i love it :-)
 
cmb
12:42 PM
@Girgias, I wonder whether we could drop these protos altogether.
 
Aren't these usefull for the stub generation ?
In the mean time we get stubs for everything ?
 
12:53 PM
The hacks phpdbg does to get around zend_execute_ex and recursion; I assume those are only valid because it phpdbg will never have multiple requests in flight on the same process?
 
cmb
I assume many of them are wrong, so may not be really helpful.
And at least when we have stubs for everything, we might remove them.
 
True, I've been fixing the protos on the functions that I'm promoting warnings to Errors
But that's only a small subset
 
Morning
 
@beberlei Thank you
 
haha kelsey posting this is amazing ;) twitter.com/kelseyhightower/status/1164337141117145088
 
1:02 PM
@JoeWatkins Sorry that was meant for @kelunik
 
1:29 PM
@LeviMorrison yeah
 
1:47 PM
@PeeHaa Why is Jeeves Playground frozen?
Because you're working on Jeeves 2?
Oh never mind- inactivity. =(
 
why a new @Jeeves ?
 
new is always better
;-)
 
generalisations are never true
 
@StatikStasis just ping @MadaraUchiha, he will unlock it.
 
1:51 PM
@mega6382 ty! and Hey!
 
oh so ... mm ...
 
@StatikStasis Yeah has been inactive for too long
 
@StatikStasis Hey! to you as well :)
 
hey! to you all
 
1:53 PM
\o
 
cotton filter stuck in glass pipe, can't get it out ... why do bad things happen to good people ?
cruel world ...
@PeeHaa it's disappointing that I don't see "make it work" anywhere ...
 
top of my list would be reducing the amount of swearing that gets aimed at @Jeeves ...
 
!!blame @JoeWatkins
 
1:55 PM
 
It works!
 
!!blame @Jeeves
 
and a slack driver sounds cool ... but until the plugins we actually use work, I'm not sure I would invest any time in that ...
 
1:57 PM
@JoeWatkins All plugins are rewritten
In a better way
 
No ternaries?
 
+ it's much easier to write new plugins and test them now
 
do they pass all tests ? and are they the same tests that were passing before the change ? and why does that give me any confidence ?
 
@StatikStasis Not until a certain jesus Chris comes out of his hole
 
1:58 PM
1 min ago, by PeeHaa
@JoeWatkins All plugins are rewritten
Also what tests :P
 
ah okay
haha
I only care if lxr works, I've forgotten the rest of the commands ...
(and it doesn't really work properly)
 
lxr needs a rewrite too
 
okay, go ... I'll wait here ...
 
I had it working pretty fine at some point
But a certain person rewrote a lot of stuff and all my customizations were lost
That's why it cannot find a lot of obvious things right now
 
shall we lynch them ? /me readies pitch fork
 
2:00 PM
/me grabs the tar
 
It is Jeeves 2.0
 
dude, whoever done that is in for a serious ass forking ...
 
lol
rated x :P
 
2:14 PM
@PeeHaa Dependency management is hard :-P
 
:D
 
I've tagged everything related to http-server and websocket updates. Some more than once, just to be sure.
I do still need to tag websocket-client 1.0RC1. I was doing a few last minute updates.
 
Great
Will probably be using a lot of packages in the new bot
s/bot/crash test dummy/
 
2:33 PM
@Trowski Except for server session?
 
@kelunik I tagged that too, though I need to tag it again to allow redis 1.0 once it's tagged.
@kelunik I added types where it seemed they could be added, should I merge this? github.com/amphp/redis/compare/parameter-types
I also liked your suggestion of changing methods with $key, ...$keys to string ...$keys.
 
@Trowski github.com/amphp/redis/compare/… can be an array for example.
 
openssl_pkey_new generates OpenSSL errors with OpenSSL 1.1.1 – #78444
 
@Trowski I wanted to change it to string $key, string ...$keys so at least one is required.
 
Yep, missed that.
@kelunik Yes, that's what I meant.
 
2:50 PM
Ah, I finally have the reputation to talk, that wasn't so painful.
 
@MarkRandall o/
 
Greetings all.
 
o/
 
Hi Mark o/
 
Ayup Girgias how goes the war?
 
2:57 PM
Alright
 
I'm going to take another crack at the errorfication of things tonight I think. I've got the hash module complete but I think it'll need a separate PR.
 
Okay, don't know how complicated the changes are for the hash module but Nikita did ask me to split the changes for each function in the array and string stdlib (that's why I've been flooding the repo with PRs)
So that's maybe something that you'll need to do
 
Well that sounds tedious. Then again the has module is basically the same thing repeated over and over, mainly checking hashes a) exist and b) cryptographic.
I'll post the entire thing in one and then await a response.
 
Probably best
My changes where different from function to function
 
@kelunik github.com/amphp/redis/commit/… Updated variadics with types.
 
3:07 PM
@Trowski Why do you still have the docblock param definition if you already have the types in the signature?
 
@PeeHaa Otherwise PhpStorm bitches that the parameter isn't defined in the docblock.
 
^ Agree. Unless the docblock adds something, it's just duplication.
 
@Trowski Just disable that inspection
There is a checkbox: ignore when in signature or something like that
 
I should. It's needless duplication.
 
Allow missing parameters with type hints
Same for return types:
Ignore PHPDoc with return type hint
 
3:12 PM
Little buried, but found those.
Much better. I'm not feeling compelled to change existing docblocks, but I slowly will when I modify code.
Now is there a way to stop PhpStorm from generating those in the docblock if the types are defined?
 
I'm hoping some very kind, generous person working on PHPstorm is going to write an inspection tool to replace class property type annotations with the real thing for 7.4. Feels like anything else is just duplication
 
I'm pretty sure I saw somewhere some CLI scripts which do that for you
 
I'm wondering how the standard is going to change to deal with the lack of @var, I assume it will just pluck the first line of /** .. */
 
Sounds like a simple add-on to php-cs-fixer.
@PeeHaa Are you using master on websocket-client?
 
@Trowski I tried, but I got dependency hell so decide to just wait
 
3:23 PM
@PeeHaa Can you try again? I think it will work now.
 
Sure
Package operations: 3 installs, 0 updates, 0 removals
  - Installing cash/lrucache (1.0.0): Loading from cache
  - Installing amphp/websocket (v1.0.0-rc1): Downloading (100%)
Downloading (100%)
  - Installing amphp/websocket-client (dev-master 63499f4): Cloning 63499f4ee4 from cache
\o/
 
Yay! Now you can tell me if the API is any good :-)
 
yep will start playing
 
3:53 PM
@bwoebi that's what she said
 
sid
hi guys
whats going on
 
oh gods. received an upvote on an old answer where I recommended to use... strtr and it reminds me of when that was my primary templating mechanic
 
4:17 PM
!!dad add neptune / What kind of music do planets listen to? / neptunes
 
@PeeHaa Ha ha ha! Brilliant! I'll save that one about neptune for later!
 
4:35 PM
Hmmm, doesn't look like PHPStorm lets you edit the auto format yet to use PHP 7.4 property types.
Easy enough to change the comment itself, but not to have the type as part of the statement
 
@JoeWatkins can you explain why you need to reimplement linking?
 
@PeeHaa Time for a new gaming PC. Here is what I have so far... though I am not set on the GPU just yet. pcpartpicker.com/list/DDbNJ8
I mean "work" PC.
 
@brzuchal Well, we ended up avoiding lookahead for arrow functions, so you likely don't want to depend on it for annotations. The feature is contentious enough that you don't want to bring syntax issues into it
 
4:55 PM
hello
anny of you can help me fix this code?
var quantidade = document.getElementById('quantidade').value;
cel8.innerHTML ='<input type="text" value="'.quantidade.'">';
 
lol. Learn javascript basics
but its a very common error i guess :1)
 
@NikiC did you see my ping question from yesterday ?
 
@user3655829 i know is not the right channel but...
 
yes and its very basic stuff!
 
yap, i know that but if i dont use the var it works, if i put the var dont
@user3655829 if is so basic maby you can help? :D
 
5:01 PM
No. If you solve that problem alone you will learn the js basics you need 10 minutes later. You will just need 1-2 hours js basics. Just look up the first tutorial on youtube and go with it. Eventually you see the error and then youre good.
A tipp is that its a common error among php devs out there. (i hope that is not too much info)
 
5:15 PM
@user3655829 fixed :D
cel8.innerHTML =`<input type="text" name="quantidade[]" value='${quantidade}'>`;
 
I hope you did not ask anybody elsewhere
 
it fixed the problem and now the arry is geting the values and are not empty
 
To internals devs, I'm still seeking input on an API for consistent formatting of error messages in place of warnings.
 
5:33 PM
Oh can't push the PR for zend_forbid_dynamic (PR: github.com/php/php-src/pull/4592#issuecomment-523776866) to php-src
 
no zend karma ?
 
Yeah
So someone else needs to merge it
 
@brzuchal Do you have time to resolve the conflicts in github.com/amphp/redis/pull/56/files?
 
5:50 PM
@Girgias svn username ?
 
girgias
 
granted, I dunno how long it takes to update, and it shouldn't change the way you are working ... especially stuff being merged into /Zend should be reviewed by one other person with zend karma, and anything closely related to the compiler or vm (non API stuff) should be reviewed by nikita or dmitry ... that is all, and thanks for choosing to waste your time on php ...
 
They should add that to the end of phpinfo();
 
I'm not really planning to touch that much in Zend
 
Does this pull any extra args past what is expected? https://github.com/php/php-src/blob/PHP-7.3/Zend/zend_builtin_functions.c#L535-L551
So given `function foo(int a)` and call `foo(1, 2, 3)`, those lines will pull in `2` and `3`? Just want to make sure I understand that correctly. :)
 
5:56 PM
@Girgias that's a good plan ...
 
But anyway thanks for the Karma I will use it wisely (i.e. not)
 
@SammyK correct
 
@JoeWatkins Cool beans - ty! :)
 
@kelunik am boarding on a plane back home now can take a look tomorrow morning
@NikiC ok, I'll try with square brackets around the annotations
 
6:37 PM
@DaveRandom :-P (that pin … :-D)
 
7:11 PM
!!lxr dns_get_record
 
@kelunik Nothing went wrong but I couldn't find a suitable definition
 
@brzuchal thanks
 
@MarkRandall Is there an RFC to review?
 
8:07 PM
@nikic aren't some of the failure checks in php_chunk_split also bogus ?
As with str_pad ?
Oh wait no maybe those are legit, because of the array indexes
Holy shit I'm dumb
I thought chunk_split returns an array of chunks
So yeah they are maybe bogus these checks
 
8:23 PM
@DaveRandom Why in the global namespace? github.com/DaveRandom/ExceptionalJSON/blob/…
 
@kelunik for something like that - why not?
keeps the imports simple / the function call short enough
 
Oh nope they are important to not exhaust memory
 
8:51 PM
Are there any apache thrift + php users here? In most cases what transport layer and protocol should I be using? Raw sockets are blocking according to the (poor) documentation, should I use some other server transport?
 
9:04 PM
@2dsharp what problem do you have that you think that is an appropriate solution for?
 
Use of uninitialized value in sapi/cli/php – #78445
 
@bwoebi Potential conflicts with other libraries.
Granted the chances are slim, but if everyone did that eventually you'd have a conflict.
 
9:21 PM
Memory leak in sapi/cli/php – #78446
 
@Trowski it TBH depends on the context / what the function does and the actual names whether it's reasonable or not…
 

« first day (3232 days earlier)      last day (1730 days later) »