« first day (2382 days earlier)      last day (2565 days later) » 

4:00 PM
variance is hard though, and should be implemented separately
initially it should be invariant because that would have the highest chance of passing
@TomasZubiri dunno, just seemed like a good idea :-P
@TomasZubiri w.r.t that ^^ I would also consider using the delegate keyword instead of function, depending on how people react to it
or another keyword, but I work with C# a lot so that's the one that makes sense to me
 
By variant do you mean that it will be interpreted differently depending on the context?
We already have callable and function. Delegate doesn't sound like a good idea. Not sure what conceptual difference there would be between the three.
 
@TomasZubiri What I'm concerned people would say is that function foo() {} and function foo(); would create entries in different symbol tables
ideally we would fix that as well but it is what it is
@TomasZubiri I mean that this would work, because it is type safe:
 
Anyone using lazy services?
 
class A {}
class B extends A {}
function Foo(B $obj);
function bar(Foo $foo) {}
bar(function(A $obj) {});
 
@DaveRandom Now that I think of it, I don't think the variable name should be part of a type declaration.
 
4:08 PM
@Trowski @bwoebi What do we do with Amp's tests now?
 
@TomasZubiri I agree but I would propose that it be there anyway, for a number of reasons
1) It mirrors interface member syntax
2) we might one day have named parameters
3) Without it, we'd need to introduce a mixed keyword for untyped parameters
 
@kelunik So it works without --coverage-text, correct?
Or we could use xdebug for coverage… /me runs and hides
 
@Trowski it doesn't??
 
I've given this quite a bit of thought and what I'm talking about here is what I've concluded would be the most likely to pass the RFC process. There absolutely are some things that are less than ideal about it, but they are working within the constraints of reality. I'm obviously open to suggestions and I don't plan on trying to do this myself anyway, at least not in the near future. I'd be involved but I don't have the time to lead it.
 
(at least for me)
 
4:12 PM
@Trowski That's no solution.
@Trowski Same with xdebug.
 
evenin roomies
 
Also @TomasZubiri 4) without param names it wouldn't fit well with the existing reflection model
 
@kelunik No, just trying to clarify what's going on.
 
3 is crucial. Should we enforce names match to avoid BC problems once typed params come?
 
@TomasZubiri no, interface members don't so this shouldn't either
they are just labels, currently
If 2) ever happened then it will just follow whatever rules are decided on for class inheritance
 
4:16 PM
How do I check if use is working?
 
@TomasZubiri Named params probably just won't come.
 
awww
Because of implementation difficulty?
 
If you think about it, there's not really any difference between a delegate type and its implementor vs an interface member and its implementor, in terms of the the rules that they should follow with typing and naming of params
 
It doesn't seem to show me any errors if I use a nonexistent namespace
 
@TomasZubiri For example, because names aren't enforced to be the same currently.
 
4:18 PM
@CoderDudeTwodee No it wont, it will only error if you try to actually do something with a type that doesn't exist
use is a compile-time construct
 
@DaveRandom I am trying to use Lazy services and it doesn't seem to be working, I followed the steps on the symfony website.
 
the compiler uses it to resolve fully qualified names, it will only error at run time if autoloading fails
 
@TomasZubiri No. At least I have no idea whether somebody dared to try it in externals
 
26 mins ago, by CoderDude Twodee
  composer require symfony/proxy-manager-bridge
  composer require ocramius/proxy-manager
 
@TomasZubiri It involves several BC breaks which are, together, too big to ever pass
 
4:20 PM
If you could look into my issue?
 
@CoderDudeTwodee I don't know the subject matter at all I'm afraid, sorry. I have no idea how either of those two things work or even what they are.
 
@DaveRandom Oh, thanks anyway!
 
@kelunik CS Fixer seems to have a needlessly specific version requirement
 
@TomasZubiri how do you mean sorry?
brb 10 min
 
4:23 PM
> ... requires PHP 5.2.1 or later in order to function correctly. > Although not yet tested it should work fine with PHP 6.
 
@DaveRandom :36781633 If you had to implement this natively, would you refactor the implementation of interface member declarations in order to have it use native typed functions?
 
@Trowski That sucks, will PR.
 
@TomasZubiri Oh I see. I don't know what the implementation is like, but yes it seems to me that any validation of inherited function signatures should use as much shared logic as possible
 
@bwoebi @kelunik Odd that the build seems to be hanging now with 7.0 as well.
 
4:32 PM
@Trowski It's rather odd that it didn't hang before.
 
@kelunik Heh, yeah, that's true.
So what do you suggest we do about it?
 
@Trowski Why did you drop github.com/amphp/amp/commit/… now?
 
@Wes Was just made aware of this: php-ast.herokuapp.com/out
 
@Trowski Make @bwoebi fix UV. :P
 
@kelunik Continually re-throwing into the generator is a weird behavior whose only purpose is to ensure a throwing finally block doesn't throw at a random time, which only applies when the coroutine is failed with InvalidYieldError.
It's a weird edge case that is only because of a coding error anyway.
 
4:38 PM
@Trowski Better weird than random.
 
@kelunik It's also throwing an unexpected exception into the generator, I was never really comfortable with that.
 
Wes
4:54 PM
@NikiC noice
 
@bwoebi Do you have any opinion on github.com/amphp/amp/commit/…?
 
@Trowski I don't really
 
Wes
can't believe it worked, and it's such a stupid syntax... xD
 
@Wes you forgot a comment reading //whoops changde my mind but baclspace costs us moeny to use
 
5:09 PM
@Trowski github.com/amphp/amp/blob/master/test/CoroutineTest.php#L312 < What's the actual issue there?
 
Wes
@Dereleased you forgot to buy a new keyboard though
:B
 
@Wes I've been using this same keyboard for almost 6 years so far, and I'm not in any hurry to replace it
It's not that the key is broken, there's just a tariff, otherwise it's ^H all day for me
 
Wes
in 6 years i've used 72 keyboards or something
i have heavy fingers.
 
and anger issues
2
 
Wes
yes, that too. :B
 
5:21 PM
mechanical?
I have a das ultimate silent. Blank keycaps and I could use it as a blunt instrument if need be.
 
Wes
@Dereleased no, they are made of flesh and bones
:B
 
lel
 
!!dad
 
What did the officer molecule say to the suspect molecule? I've got my ion you
 
@kelunik You cannot yield in a finally block after a return or in a force closed generator.
 
5:23 PM
How do you tell the difference between a plumber and a chemist? Ask them to pronounce "unionized".
 
    $generator = function () {
        try {
            return 1;
        } finally {
            yield new Amp\Pause(1000);
        }
    };

    yield new Amp\Coroutine($generator());
^ That will blow up terribly.
 
@Trowski That works just fine.
$generator = function () use (&$result, $value) {
                try {
                    throw new \Exception;
                } finally {
                    yield new Pause(self::TIMEOUT);
                }
            };
^ That's the problematic case, because the exception gets hidden.
No, that works fine, too.
 
@kelunik Really? It's not working for me…
 
@Trowski I just tried --process-isolation, unfortunately it fails with:
[Uncaught Exception in /home/kelunik/GitHub/amphp/amp/vendor/phpunit/phpunit/src/Framework/TestCase.php on line 809]
@Trowski The linked test just does that.
 
@kelunik So it does… hmm, what did I do then.
@kelunik Oh! It's only if the generator isn't run to completion, which would again only happen with an invalid yield.
 
5:35 PM
phpdbg -qrr vendor/bin/phpunit --coverage-text --process-isolation --debug
PHPUnit 6.1.1 by Sebastian Bergmann and contributors.

[PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 559416998969376 bytes) in /home/kelunik/GitHub/amphp/amp/vendor/phpunit/phpunit/src/Util/GlobalState.php on line 166]
Well...
@Trowski But I don't get why it works...
 
@kelunik This is where the problem is:
Loop::run(function () {
    $generator = function () {
        try {
            yield 1;
        } finally {
            echo yield new Amp\Pause(1000, "test");
        }
    };

    try {
        yield new Amp\Coroutine($generator());
    } catch (\Throwable $throwable) {}
});
 
Doesn't github.com/amphp/amp/blob/… immediately fail the coroutine on a throw?
 
But that's only a result of a coding error… so it really doesn't matter.
 
@kelunik You don't have 508 TB of RAM, Pleb?
 
@kelunik That's quite an interesting error…
@kelunik It appears the engine runs the finally block before actually throwing the exception from the generator.
Same for using return, Generator::valid() returns true until the finally block completes execution.
@kelunik So now I'm not sure what to recommend for yielding in a finally block… it actually works better than I expected.
 
Anonymous
5:45 PM
Instagram seem to be having a big outage
 
Seems like it really only happens for InvalidYieldError. I'm for restoring dispose then as it prevents a real fatal error.
It just rethrows the InvalidYieldError into the generator then.
 
@kelunik However with the caveat that yielding in a finally block won't work as expected.
 
What's the unexpected part?
 
@kelunik The way dispose was written it just kept re-throwing the exception into the generator, so further promises were not handled in the same way. I'd be for just throwing InvalidYieldError into the generator and continuing normal coroutine execution if it caught it.
That's probably the sanest approach.
 
@Trowski yup
 
5:51 PM
It's also extremely simple to implement. :-D
 
6:01 PM
@Trowski What are the remaining issues for v2?
Rewriting UV and thereby fixing our tests, anything other?
 
how shopping websites prevent tampering of purchase transaction by editing the given value of price? Like if i'm purchasing something of $50 but during the transit i changed 50 to $5. How server verifies that value?
 
@defalt By not accepting user input for the price directly.
 
@defalt Prices from clientside are always discarded
 
ohh so they are just the output and you can't give input to them
 
right
 
6:04 PM
@Trowski Should we rename amphp/stream to amphp/byte-stream now?
And how do we implement readAll? Maybe a function like Amp\ByteStream\readAll or Amp\ByteStream\buffer?
 
@PeeHaa is there any chance you worked with Symfony?
 
@Dereleased ha
 
@Wes @PeeHaa I want to continue kelunik/daas, still interested?
I want to switch to a completely static site generation + a single endpoint for a search that just works with JS.
 
good morning
 
@bwoebi @Trowski Regarding the hanging tests: Are you sure it's caused by UV? I think the UV tests aren't even executed yet when it hangs.
 
6:14 PM
DOMDocument::saveXML() LIBXML_NOEMPTYTAG option is ignored – #74494
 
@kelunik well, when the tests hanged on my side, lsof should a ton of kqueue pipes and I have no ev installed.
 
@Trowski @bwoebi I think I solved the problem for now.
Let's see what Travis says.
 
@kelunik uh, but…
this was about amp tests?
 
@CoderDudeTwodee Nope sorry
 
@bwoebi hm?
 
6:28 PM
@kelunik Not sure. I mostly use grok nowadays
 
@kelunik the problem was that amp tests were failing, not library tests?
 
Wes
@kelunik i am. but last time got lost in the elasticsearch thing :B
 
@kelunik because of github.com/amphp/phpunit-util/commit/… … I have no idea what concretely this solves?
 
Since the problem reappeared after I modified UvDriver, maybe I'm just not properly freeing something?
@kelunik I think we've addressed all the open issues.
@kelunik I would.
@kelunik A function like Amp\ByteStream\buffer seems like a good option.
 
6:45 PM
@Wes I'll remove that mostly.
@bwoebi It executes all normal tests with the NativeDriver instead of UV.
 
Wes
i'm in 5 levels deep sideprojectception @PeeHaa
can someone please kick me off 5 bridges
thanks, thanks, thanks, thanks, thanks
 
work on the RFC tests :P
 
Wes
that's another branch of the sideprojectception, thanks for reminding me :B
 
:P
 
Wes
the fact that i can't see where a method comes (if it comes from a trait and which) from using reflection made me start the eleventh rewrite @pmmaga but i'm optimistic, i've tried almost every single combination
 
6:57 PM
@bwoebi It works locally now.
@Trowski Could you do that and mark amphp/stream as abandoned?
 
@kelunik I mean, what's the issue with the Uv driver here?
 
@kelunik Do I have to make a new repo, or can I just do that on packagist?
 
@Trowski You have to change it in composer.json, rename the repo + resubmit at packagist + mark the old package as abandoned.
Renaming the repo isn't strictly required, but I think it should be consistent.
 
@kelunik Definitely.
 
@Trowski Are you going to do or should I?
 
7:13 PM
@kelunik I'm busy atm, so please do.
 
@Trowski Could you quickly mark packagist.org/packages/amphp/stream as abandoned and add amphp/byte-stream as replacement?
Travis is enabled for the renamed repo.
 
7:32 PM
... how does one do exception handling in javascript?
I so wish I could throw something...
hey, I actually can!
 
What's the best way to get the value of an object property where the object property name should be the value of an array index?
$this->$requiredArray[($key - 1)]
^ That doesn't work, and I understand why.
Just not sure what the best alternative is.
 
@Allenph that looks scary, but: $this->{$requiredArray[($key - 1)]} ?
 
@pmmaga It's not TOO scary.
That worked. Thanks.
 
7:52 PM
any suggestions for good ^7.0 active projects with a good (5-10k) amount of unit tests? (ie.composer, phpunit)
 
Wes
github.com/… @pmmaga ?
 
laravel it is then! :X
 
Wes
:P
magento, phpoffice
symfony
 
@Wes I'm thinking about starting a new one bro
 
Wes
lol
 
8:10 PM
@kelunik @Trowski @bwoebi other amp people. Can I use v2 yet? I am going to need aerys, process, mysql and redis for now
 
@PeeHaa It's going to be released soon. I plan 1st of May, might be delayed by a UV rewrite to use objects.
 
Can I start using some of the above packages yet either way. For this project I don't mind having to rewrite it after 2 weeks
 
@kelunik Can we just remove UvDriver for now? Unless @bwoebi can work really fast, I'd rather not wait just for that.
 
@Trowski well, Uv driver works fine, just for tests
 
@Trowski I assume most people are actually running with uv
Assumptions based on nothing btw :P
 
8:14 PM
@bwoebi @kelunik Or better yet, just remove it from tests and the driver factory and mark it as WIP
@PeeHaa I assume most are running with no loop extensions. :-D
 
:P
 
We should really bench some of these drivers. I think libuv might be faster, but I wonder if the overhead in the userland code might make libev superior.
 
Yeah I'm also still hoping for somebody to finally benchmark them
 
user4061223
Hey I need help with two things:

- Redirect http to https but leave subdomains alone with htaccess (Can't get the subdomain thing to work)

- Retrieve the URL that the user is currently on through PHP after a htaccess proxy rewrite rule which points all subdomains to their document root
 
user4061223
Could anyone help me with this?
 
8:41 PM
The former, have you googled it? inmotionhosting.com/support/website/ssl/…
 
8:57 PM
Is the visitor pattern a sort of 'inverse strategy' to allow for strategies that each require different parameters during usage?
 

« first day (2382 days earlier)      last day (2565 days later) »