« first day (2129 days earlier)      last day (2834 days later) » 
00:00 - 17:0017:00 - 00:00

12:00 AM
@Trowski any reason why Subscriber requires string as first arg? I thought it ought to be any value which is passed to unsubscribe callback...?
 
@MarkWeiman yeah
@MarkWeiman Use zval fname; ZVAL_STRING(&fname, char_ptr);
 
@NikiC Thanks.
 
12:17 AM
@Trowski grml … semantics of Observable are subtly different to PromiseStream… Code is not that easy to port, hmpf^^
 
12:28 AM
I mean Observer, not Observable
 
12:49 AM
Observinatum
 
@tereško The word is Observatory
 
I have been playing warhammer 40K
 
Ekn
I only have beyond earth and terraria
 
@Ekn Hah, the edit… Already wanted to say "Requiesce in pace"
 
Ekn
heh :-D
 
Wes
1:34 AM
opinions?
 
@Wes cyan was better
 
Wes
cyan is still there. i added a third color
 
@Wes It's all magenta?
 
Wes
people liked it :B
you probably missed the link yesterday
but anyway, nothing is final
 
2:04 AM
My please someone tell me where is the problem of that code?
Based on my understanding always be_nice_to(humans) should be executed .. so why those robots kill humans? What's wrong of that code?
 
Wes
assignment vs equality comparison
 
ohhh
@Wes You deserve more than 800 rep ..!
 
Wes
i'm too cool for caring about rep.
 
Wes
2:26 AM
gn
 
2:50 AM
@Trowski Just fyi: I've added github.com/amphp/aerys/compare/amp_v2 right now
(I've btw. lost the most time with the Body/BodyParser/FieldBody due to the subtle changes with Observer vs. PromiseStream…)
 
3:17 AM
Morgen o/
@Wes heh
 
3:59 AM
Im having troubles with php and mysql
How do I save multiple records with one query than display them on another page in a table, I have tried and tried and am getting no progress at all
I know I have to use a session, but how do I save them and use them
 
@kelunik I wasn't sure myself... depends on how often those functions are getting used. I planned on using Loop::*() myself whenever the callback was not a coroutine.
@bwoebi Only because a string is passed by the observable implementation.
There's no real reason that it has to be a string though. I see you changed it for aerys... I'm wondering if Body should extend Observer and implement Observable or just implement Observable.
If the consumer wants an Observer, they can create one themselves from the Observable.
 
 
2 hours later…
6:23 AM
@bwoebi Which ones? What do they break?
@Trowski Also: One function call doesn't really make a difference here I think.
 
morgen v1.1
 
6:44 AM
godmorgen
 
@RonniSkansing yes, child...
 
good morning is godmorgen in danish
;)
 
TIL
 
7:00 AM
=)
 
7:38 AM
Why do we have traits...
 
@kelunik they can be useful if not abused
 
@rtheunissen Most often they're abused. Valid usages are really rare.
 
8:18 AM
posted on August 14, 2016

New Cyanide and Happiness Comic

 
8:45 AM
@Trowski It also is a perf optimization for some part to only do the slwoer incremental parsing if we're actually being subscribed and not just when()'d
@Trowski I already was wondering… hmmm
 
9:11 AM
appears
Sonntag
Warum schlafe ich nicht jetzt? Es ist nicht sogar 11 Uhr.
 
9:30 AM
@kelunik what are valid usages?
 
A few things to note:
There are no member or static variables or constants.
It is purely instance methods.
This allows you to implement an Iterator interface by composing over the top of an existing Iterator quite easily.
 
i think traits allow you to implement multi inheritance
multi inheritance isn't acceptable in oop
 
It isn't inheritance. Not in PHP anyway.
A trait is simply interpreter-assisted copy-and-paste.
 
okay.. how java solves this problem ("copy-and-paste")? do you know?
java has no trait.
 
Java does not solve this problem.
You use abstract base classes.
 
9:49 AM
i've been reading some articles about trait for a while.
i'm not convinced about benefits of trait
as for me, trait is one of cause of design problems
imho
 
@AdilIlhan They solve it via default implementations in interfaces.
@AdilIlhan Same here.
 
"default implementations in interfaces." i didn't get it. we can't define body of functions in interface.
 
hmm this feature came to java with java 8.
i didn't know it.
 
10:31 AM
Can someone take a look at my PR about type-hint and return-type with object keyword github.com/php/php-src/pull/2080 there are failed tests at build but don't know why? When I run locally eexactly the same command as in build it returns 0.github.com/php/php-src/pull/2080
 
@brzuchal do you have a link to the travis result?
oh it's there..
 
> 001+ Fatal error: Cannot use 'Object' as class name as it is reserved in /home/travis/build/php/php-src/ext/reflection/tests/bug38217.php on line 3
That one at least is just a test that needs changing.
same as:
001+ Fatal error: Cannot use 'Object' as class name as it is reserved in /home/travis/build/php/php-src/ext/reflection/tests/bug38194.php on line 2
So I can see why those tests fail.....I can't explain why yours apparently pass.
what command are you using to run the tests?
 
10:50 AM
Thx
 
@brzuchal with regards to your email about namespaces, I don't think providing technical details is a good place to start. It only gives people something to criticise. Instead just focusing on making sure that people understand that a problem exists, allows for solutions to be suggested to solve that problem.
I haven't looked into it in depth to make sure, but having package protected class methods almost certainly doesn't require a huge rewrite of how namespaces are implemented in PHP. Committing to doing that huge refactor needs a definite problem it will solve, other than just it could lead to cool stuff in the future.
> Such namespaces could have wheir parents as pointers to other
> structs like in tree so they could optimize memory usage for
At the cost of at least one extra memory lookup per class name read? The relative benefits are not obvious for that.

Also, fyi I suggest just never replying to Stas. He is one of those people who refuse to ever have their mind changed.
 
moin
 
Ekn
mornin
 
@Danack We should write a guide on how to manipulate internals to actually get things done
 
@DaveRandom step 1, avoid internals.
I'm contributing at my skill level.
 
11:28 AM
mogguh
 
ohai o/
 
11:43 AM
morning
 
@Danack So you think it's better to provide proof-of-concept and discuss it here ?
 
@brzuchal No....it's better to discuss the benefit rather than the change.
First, if people don't understand the benefit, then they're unlikely to like the change, but also there might be other ways of achieving the same goal.
 
12:15 PM
@Andrea While grammatically correct, nobody would structure it that way … Better: Warum schlafe ich jetzt nicht? Es ist sogar noch nicht/keine 11 Uhr? (sogar is just an emphasizing adverb, while nicht 11 Uhr (respectively [noch] nicht/keine 11 Uhr) is a single temporal adverbial. Also, nicht 11 Uhr means literally it's not 11 o'clock. It doesn't carry any meaning about "not yet" or "already passed", hence this noch.
 
@bwoebi ah, yeah
@NikiC I am so glad that got in
 
@Andrea I (honestly) haven't benefited much from scalar types in general yet…
 
@bwoebi it sometimes catches out my mistakes and I appreciate when it does that
 
@Andrea yeah, I also had a few occurrences, I bet though I've not yet gained more time than I've lost adding the types :-D
 
12:35 PM
I don't think the scalar stuff has been finished yet. It needs something like:
Jul 1 at 16:59, by kelunik
primitive EmailAddress extends string {
    if (strpos($this, "@") === false) { throw ...; }
}
to make it fully useful.
 
12:53 PM
@Ekn Happiness
 
o/
 
Ekn
indeed
 
1 insult (hehe) moved to bin
 
huehuehue
 
Wes
yo
 
1:02 PM
@Okabe hOi
 
Wes
madaro \o
 
@MadaraUchiha could I ask you for a small favor?
 
@Okabe Depends on your definition of small.
 
like -----------><------------- that much small; anyways, could you please change my name, to, Saitama?
:/
 
@kelunik When I wrote it for 5.x, Amp\wrap() had to use func_get_args() and call_user_func_array(), so it was a lot more than just one extra function call. Now it is just an single additional call, though with argument unpacking.
If we're not going to use those functions in lib code, then it's probably not worth all the duplication and just use wrap().
 
1:10 PM
Can anyone else help me confirm that proc_get_status returns an incorrect PID value in container-based environments?
It returns PID-1 in a Docker container
I submitted an issue here github.com/symfony/symfony/issues/19611 but it is not really Symfony's fault because it just calls proc_get_status
The specific container Travis uses can be retrieved with docker pull quay.io/travisci/travis-php
 
Wes
@MadaraUchiha can i ask a small favor too?
 
I guess @MadaraUchiha's dead...
 
Wes
wasn't him a god or something
 
apparently he was, and was invincible, except from the one and only SAITAMA
 
1:27 PM
@QuolonelQuestions but… PID 1 is correct??
@Trowski What are we now working on? artax/aerys are now on v2… so what now?
@Trowski note that I just made it working. Feel free to improve perf where necessary and possible
 
Sorry had surprise work
 
@bwoebi What?
 
@Okabe sup
 
@QuolonelQuestions The process is indeed PID 1 in docker
 
What? I never said it was "PID 1" I said it was "PID-1"
 
1:34 PM
30 mins ago, by Okabe
like -----------><------------- that much small; anyways, could you please change my name, to, Saitama?
 
i.e. it is reported as being one less than it really is
 
@QuolonelQuestions oh, that's a subtraction
 
Right
And I seriously doubt you would ever be able to launch a process as ID 1 even in a Docker container
But that's entirely besides the point
 
@QuolonelQuestions LOL that display picture
 
@QuolonelQuestions Well, PID 1 is the main process in the container, i.e. the binary you're running there
 
1:38 PM
@bwoebi I'll work on concurrent tonight, as well as 7 features.
 
@Trowski Also, I hate this yield $this->waiting in Internal\Producer::push() … It horribly breaks when you want to subscribe more than one callable. Then suddenly the first subscriber gets all the emits and the second none.
 
@QuolonelQuestions unless you're running something like this (github.com/Yelp/dumb-init), that's what you're doing
 
I'd just Amp\defer() the Emitter class @Trowski
 
OK, fine, great. So you can run stuff as PID 1 but it's still entirely besides the point
 
Hello, i have transferred a domain to another host. How do i make it so that www.mywebsite.com points to my new web host ?
 
1:42 PM
@Saitama Done.
@Wes ?
 
Wes
could you please change @Saitama's name to Minger? thanks
 
@Trowski Also, this Producer looks to me like it could quite be optimized. In most cases there's no need for Generator/coroutine resolution...? in emit/push
 
@MadaraUchiha Thanks a lot ;)))
Now I can kill @MadaraUchiha at will
 
@bwoebi you decided to go with php 7 for amp after all?
 
@NikiC yes
 
1:46 PM
@bwoebi I have proven the PID-1 problem in the following test github.com/ScriptFUSION/Porter/blob/master/test/Functional/…
 
finally :D
 
\o/
 
1:59 PM
en.arguman.org 👈 imagine if this was how we conducted PHP arguments
 
@Andrea But then Lester wouldn't get a word in :/
What's he supposed to do with the rest of the 15 hours and 55 minutes of his day?
 
@Sherif “Logical Fallacy reported: Irrelevant”
 
I always like to think that Lester is just another spelling of the German inflective "läster" … :-D
 
I like to think that Lester is an experiment IBM has been using to field test Watson since 2005.
They're dog fooding.
 
@Sherif need around 25 upvotes until I can dupehammer in php tag ^^
 
@bwoebi Should I go upvote 25 of your answers then?
:p
 
@Sherif no, then I'll just get serial vote reversal :-P
 
I was kidding obviously
Wow, this question is just pure gold stackoverflow.com/questions/38943211/…
You can't make this stuff up.
 
@Sherif +120 (12 upvotes)… was that you? O_o
 
2:31 PM
@Andrea looks like that site is mostly populated by developers and anarcho-communists
 
@bwoebi Ummm, no.
 
@Sherif okay wtf
 
Happy coincidence maybe?
 
@Sherif doubt it…
 
Maybe a bunch of people here just started up voting some of your answers after I said that? :/
 
2:39 PM
@Sherif looks more like a single person, timestamp 16:28 UTC+0200
 
@bwoebi Well, I definitely didn't upvote 12 of your answers. I upvoted one or two of your recent ones though.
 
@Sherif yes, I saw. You upvoted the recent ones, somebody else upvoted the 10 highest upvoted ones.
 
3:04 PM
Bobs-MacBook-Pro-2:amp bob$ ~/php-src-X/sapi/cli/php -r 'require __DIR__."/vendor/autoload.php"; Amp\execute(function() { $d = new Amp\Future; $d->when(function() use ($d) { echo 1; $d->when(function() { echo 3; }); }); $d->when(function() { echo 2; }); $d->resolve(); });'
132
 
@bwoebi Discuss:
 
@Trowski is 132 really the right order here?
 
> Note that the parenthesis are always required if type information is present.
$mul2 = ^(int $x): int => $x * 2;
$mul2 = ^int $x: int => $x * 2;
 
That's fine
I see no reason why not require the parens here
 
^ is ugly
 
3:06 PM
I don't care for type info in them.
It was just a common objection to short closures :/
 
@NikiC there's no really nice choice available, I think. ^ is one of the least ugly options…
 
@bwoebi I'm just saying it's more ugly than \ :P
 
@NikiC seriously?
 
^$x => $x is super ugly imho
 
I find \$x => $x uglier
 
3:08 PM
I agree with Bob, obviously ^_^
 
^($x) => $x is still somewhat bearable
 
but TBH, we can hold a separate \ vs ^ vote if you think so…
I do not care too much about the outcome
 
Please no.
 
I'm sorta doubtful this is gonna pass
The feature is awesome, but syntax does count for something
 
I hate having more than 2 votes in an RFC unless it's intentionally an RFC that's a conglomerate, such as "what should we do with each E_STRICT?"
 
3:10 PM
@NikiC Well, what syntax of short closures would pass then?
 
@bwoebi Maybe none...
@bwoebi something that doesn't allow anything but simple parameters ^^
 
That already failed.
 
@NikiC well, that was my original RFC…
 
Yeah, I mean without the sperm
 
Granted it did use the spermatazoon.
But it was a common complaint that type info could not be encoded.
 
3:12 PM
that's a tilded arrow :-P
 
Stupid complaint
 
Yeah but the key part is common.
 
Well, not entirely stupid ^^
 
I still don't really get the issue with the ~> …
 
Well, it failed. So I've really just been trying to write a version that would pass.
And at least based on the feedback I think it has a good shot.
Of course, that doesn't mean that people won't find new complaints.
 
3:14 PM
perhaps you should put it up to discussion on ml now…
 
I was planning to wait until 7.1 is announced.
All these RFC's going on during this period bothers me a bit.
 
@LeviMorrison Please not. Just do it now. It doesn't help anything when the RFC drowns in a spike of new RFCs after 7.1 announcement
At the very least we can discuss now. Perhaps there's coming something up making us delay anyway. Else we'll just end up with it getting later and later
There's no rush, but neither a real reason to delay.
 
ok, time to make some tacos
 
3:29 PM
send me some ^^
@bwoebi /me slowly raises hand and pretends no one notices him
 
tztztz
 
shit I thought no one noticed me..
 
evenin
 
'n
BTW who's Lester tho?
 
@Saitama no-one worth talking about actually.
 
3:39 PM
oh okay :P
 
4:11 PM
:-O! I just looked at the price of PhpStorm. Don't think anything is quite as motivating to work on PHP Docs as that price.
 
@Fabor You've got to think of it as the price per hour you'd be using it.
 
@Danack Yeah :(
 
should 'views' ever be calling methods on services that do things like query dbs?
 
You guys use any non-default themes for PhpStorm? I used to use Obsidian but the new version of PhpStorm borked it.
 
@jeremy opinions differ. I have no problem with it, but then I like my views to be powerful, rather than just big printfs.
The only thing is they should be read-only, never write.
 
4:20 PM
let's say you have a message board application. super simple: a bunch of messages display on a webpage in chronological order, and under them is a form to post a new message. the route to see the message board is /message-board/
my understanding is that the controller paired with that route would call a service like MessageBoardHandler and tell is to fetch the data to display
but actually, if the view is powerful and should call methods on services that query the db, maybe nothing goes in the controller, and the view is the thing that calls the MessageBoardHandler::fetchBoard method
the second mechanism seems unappropriate @Danack
 
Yes, that's what I do. The controller can load stuff from the DB if it's required, but then the templates know how to load the boring stuff that is on every page themselves.
 
@Danack you do the second mechanism?
 
I really need to write more example for phpjig.com
@jeremy which one are you referring to?
 
@Danack the one where the view calls MessageBoardHandler::fetchBoard
 
To be precise, I probably wouldn't for that case, because the id of which board to load is something that the controller needs to do. If the board doesn't exist, then a "board not found" page needs to be displayed, rather than the normal "board has been loaded" page.
But if it was something that was on every page, like "New messages for current user" then I would allow the view to load that.
 
4:29 PM
@Danack ok. so the controller would validate the id of the board to display. if not available, it would update the view w/ this information. if it is available, the view will call MessageBoardHandler->fetch
 
No.....the only way to validate it is to try to load it from the DB. And if the controller is doing that already, then it would be weird to load it again from the view.
 
@Danack so then how would the view get the message board data to display
 
hey , how does one display a chat in UI without waiting for response from server?
like, in this chat, the message goes instantly , and if it fails , there is an error message shown
 
@jeremy This is a bit crap, but the controller that loads (the data]( github.com/Danack/Blog/blob/master/lib/Blog/Controller/…) and shares it. The view/tempate that gets the object
 
how to identify success of a message later on
 
4:33 PM
aka the objects that are loaded from the DB are shared through the dependency injection container, and then the template can request them.
@harvey_slash I think it uses jQuery.
 
well, here it looks like your controller is instantiating a template
 
hello
 
@danack , thanks for reading
i meant from a data perspective
 
@jeremy it looks like it....but it's not. It's just setting up which template would be used......the actual instantiation of the template is done via a separately dispatched call.
 
how does one identify that a message was successful/failed at a later time ?
in my setup , each chat message has an ID in the database
but when i send the message, the client app will not know about that id till response from server
 
4:35 PM
@harvey_slash generate an ID when the message is sent to the server......track that ID with the response from the server.....and you can update the UI for whether it succeeded or not.
 
yesterday, my sir told me, no any data delete from database because every data need for analytics. is it true?
 
@Danack, so a client will generate a random ID ?
damn it , i didnt want that
I'm using laravel
so i can't set up a field in my model called pending id before saving
i have to set it after calling save
 
honestly, it seems like you are passing data directly to a template. my understanding is that the view has information and the controller may tell the view how to present that information, but never to tell the view the information while also telling it how to present the information
 
ping @Patrick
 
@jeremy er.........passing data to the template doesn't seem to be at odds with the rest of your message.
 
4:41 PM
@Danack passing data directly to the template: in other words, the controller is deciding how the view should present while also providing it with what it should present
 
"the controller is deciding how the view should" - no it's not? The controller is just making an object be available.....that doesn't dictate anything about how the view renders.
 
ok, but regardless if there was more than one template that the view could present this info with, you would need to pass $params to each one of those templates
 
Yes.
 
which is my point, that the data should be sent through a different mechanism than the one that tells the view which template to use
 
why?
 
4:44 PM
because that is how the view works...
one sec
 
It's a common thing to have multiple stages of processing where one stage produces something, and it knows what thing needs to be called next....but not how to call it itself.
 
> Depending on context, users want to see the same basic model information in different ways. Separating presentation and view allows you to develop multiple presentationsindeed, entirely different interfacesand yet use the same model code. Most noticeably this could be providing the same model with a rich client, a Web browser, a remote API, and a command-line interface. Even within a single Web interface you might have different customer pages at different points in an application.
(poeaa 277)
from this it sounds like a controller should just be able to tell the view to change the way it displays information without sending particular information to display
(which the view would already have)
 
Wes
user image
2
 
LAWL
oh, I need to change my avatar
 
I think you've made a bad assumption. It doesn't meant that every one of those would go through the same controller. Or even one view. "this could be providing the same model with a rich client, a Web browser, a remote API, and a command-line interface." So long as the view layer is separated from the model layer, it is all good.
 
4:51 PM
> A controller can send commands to the model to update the model's state (e.g. editing a document). It can also send commands to its associated view to change the view's presentation of the model (e.g. by scrolling through a document).
another relevant snip. specifically: the controller can send commands to the view to change the view's presentation of the model
 
@jeremy Model–view–controller is not actually possible in PHP....
 
i am aware
 
So what has that link got to do with the price of fish?
and just to make sure we're clear:
Oct 10 '13 at 0:21, by tereško
@Fabien it's kinda the tricky part (which nobody talks about). The views in classical MVC observe a persistent model. In web you cannot have it. I am pretty sure about the parts that go into it, but there must be a better way to piece it al together,
Oct 10 '13 at 0:24, by Danack
@Fabien As in everythings running and in memory. i.e. if you click on a widget in your browser, the object that the widget is associated with is still in memory, so can call the appropriate controller object, as both are still in memory.
PHP breaks that cycle. The view layer is just HTML, rather than code that is in memory at the same time the controller is running.
 
i understand this already. but to me it seems like the view's retrieval of information should be separate from how the information is displayed. this is a separation that php doesn't inhibit
 
"it seems like the view's retrieval of information should be separate from how the information is displayed." - it is separate for me....the view doesn't know anything about how to load data. This is the compiled version of the template
All of the objects used in it are passed into as dependencies.
Or factories to load the data - but still the view is separate from the implementations.
 
4:59 PM
return JigExecutable::createWithSharedObjects('pages/displayBlogPost', $params);
 
00:00 - 17:0017:00 - 00:00

« first day (2129 days earlier)      last day (2834 days later) »