« first day (2457 days earlier)      last day (2717 days later) » 
00:00 - 17:0017:00 - 00:00

00:51
What would be the best way to do a performance test on a PHP websocket based chatsystem? I mean, I can have a couple of different browsers connect to it, but that's no where near what I need to check what the server can handle.
@Danack Thanks. I've already found github.com/observing/thor
I've set it to connect 255 clients, each sending 10.000 messages of 1kB per message. This were the results:
Connecting to ws://192.168.2.3:9300

Online 607 milliseconds
Time taken 15800 milliseconds
Connected 255
Disconnected 0
Failed 0
Total transferred 3.32MB
Total received 33.62kB

Durations (ms):
min mean stddev median max
Handshaking 2 17 15 11 85
Latency NaN NaN NaN NaN NaN

Percentile (ms):
50% 66% 75% 80% 90% 95% 98% 98% 100%
Handshaking 11 21 24 29 36 47 61 68 85
Latency NaN NaN NaN NaN NaN NaN NaN NaN NaN
I didn't notice any increase in CPU or RAM load on the server though. Only on network traffic
02:12
libc deadlock in fuxes when malloc – #74880
02:50
@JoeWatkins here's the big hug.
and morning room
 
2 hours later…
04:33
moin
@Linus thnx
@bwoebi thnx
@hakre thnx
Moin Joe
\o
dogs woke me up at 5am, licking my face and breathing all over me ... they are so unreasonable sometimes ...
but it's cute <3
04:49
probably cute to watch, but feels like an assault to wake up too ...
don't even know what they wanted, they didn't follow me downstairs ...
Just attention maybe..?
Hello, do you guys know if the most secure way to log things to a database is by sending the data to a php file? I have an application but I don't want to store the database password in the application. Do you think php is the best option?
maybe ... but it seems to me they just woke me up either because they wanted my side of the bed, or just because they can ...
Get them some toys and take them to walk close to bed time if possible
oh they won't walk at night, neither of them are big fans of the dark, and one of them refuses to go into the fields at night ... they get long walks every morning, and they've probably only woken me up like that a handful of times, and usually it's for something obvious, like they want to go outside, or need a drink ...
but I left the room and they stayed in it, which is pretty odd ...
they are wimpy dogs, my cats sit on the stairs, and the dogs won't climb the stairs without a human, they wait on the bottom step until you join them ...
yo rudi, glad you got the email thing working ... is it just me, or is it purposely obscure ?
it's probably not the way it's supposed to work, but the proper way is not obvious to me at all ... or maybe it is the proper way, and you're supposed to guess how to do it ...
05:13
posted on July 08, 2017

New Cyanide and Happiness Comic

05:31
Morning
morning all
Unicode is hard https://t.co/CkoXLFkdOv
moin
Saturday's are very lazy
05:52
@JoeWatkins when dogs lick your face their intentions are usually good, but red pandas are more sinister
hahha
wow, didn't know they were pets anywhere ...
they're very beautiful up close, there are some near to me in an animal park ...
How can I implement a civilization game style map with coordinates on the web?
- 5 days
06:30
@brzuchal Its usage per se isn't an anti-patterm. It is stupidly easy to misuse it though and such a switch would just encourage it even more…
06:41
posted on July 08, 2017 by bwoebi

amphp/mysql v0.1.6

07:18
@NikiC Do you have any guesstimation about benefits if we were to decrease refcount before passing CVs into a function if the result is assigned back to them? (e.g. $largeArray = array_merge($largeArray, $smallArray); currently requires a full copy of $largeArray which will then immediately be discarded) [obviously only outside try blocks]
Other (unrelated) idea: allow $this to be set to an instance of self. … e.g. $this = clone $this; would replace an object instance with a copy of itself. (and one can then return $this for further usage in caller context.)
08:08
!!dad
What did the officer molecule say to the suspect molecule? I've got my ion you
@Jeeves :P
@Linus I have just been asked to ask you if you have a gender for some reason. I wish I was never asked.
08:28
@Jeeves ....
Mornings, chaps o/
morning kid
@jeremy it should update 1 and create 1 new
@Linus AM NOT A KID, LAD
@Kaori ok kid :P
08:39
@Wes could I ask you for a favour?
is it anime related?
if it is, no
no, its not anime related
i doubt it
nvm
ahahah
08:42
I was looking for an image, sorry to disappoint you
what's that?
a stock poker table
was trying to build some kind of poker game in html5
\o
you wanted me to do the cards?
but it's dozens
morning joe \o
08:46
yo
nope, just the table, but nvm, I found a nice little photo ;)
mrnngs
\o
\o
08:49
o/
\o
@JoeWatkins can you tell @Jay that i was not avoiding him only
/cc @JayIsTooCommon
why exactly where you avoiding us ?
not sure if someone said something in particular that pissed you off ...,
I'll bet it was @JayIsTooCommon ... he's trouble ...
09:04
i am always pissed off
don't want to talk about it now
okay
I will just point out that as the appointed R11 artist, your presence is required :)
:)
i'm good at nothing.
you're talking shit
mock framework dsl suggestions please
will_get($mock->property, "property content");
will_set($mock->property, "expected value");
will_call($mock->method, ["using", "arguments"], "returns this");
09:08
you're good trust me
i can do also
$mock->method("using", "arguments")->returns("returns this");
but i find that confusing
thoughts?
there's not a massive difference between them
yeah i can do anything, but i find the former more readable
I prefer the object based API, but only for superficial reasons ...
09:13
@bwoebi Why should that be possible over just using $clone = clone $this?
will_set($mock->property, $expectedValue, new Error());
$mock->property->set($expectedValue, new Error());
i've been searching for an anime for over an hour now, but in vain... damn
here i am recording the behavior of the mock, it doesn't seem that i'm doing that in the latter
I think it's a less important decision than those about individual functions .... you should just make it already and move on ... I don't think anybody is going to ignore it whatever you choose to do here, but they may well ignore it if you fuck up the actual API ... so spend time on important things ...
09:24
i started all this because existing mocking frameworks are all cluttered with noise
i wanted something that i can read very easily. i was doing it with mockery and realized i had 2-3 lines of tests and 20 lines just to set up the tests
these were my motivations :B
@WesStark did you write your own mocking library?
nice. yeah I wonder similar things about the effort to create mocks. not to mention 2-3 lines of test code, 20 lines of setup code to test 5 lines of source code, lol
Do people in here use the PHPUnit output buffering functions for testing views? Is this a common/best practice?
09:40
function some_function(Foo $obj){
    $result = $obj->baz(1,2,3);
    $qux = new Qux($result);
    return $qux->rofl(555);
}

$fn = will_test("some_function");
$obj = new MockID(Foo::CLASS);

will_call($obj->baz, [1,2,3], "the result");

will_instantiate($qux = new MockID(Qux::CLASS));

will_call($qux->__construct, ["the result"]);

will_call($qux->rofl, [555], "whatever");

assertSame("whatever", $fn($obj));
this is roughly what i have
@the_velour_fog yeah. it's a total pain. i had some test classes of several thousands of lines...
so is MockID your mocking class?
mockid is a representative of the mock object
$qux = new MockID(Qux::CLASS); the mock object here is not constructed yet. mock's construction actually happens in the tested function, i.e. $qux = new Qux($result);
so i can program what stuff does before it even exists
Ive always wondered, what 'Foo', 'Baz', 'Quz' mean...
so with this statement $qux = new MockID(Qux::CLASS); you substitute CLASS with the class you are testing ? or is that the finished statement?
you probably write it Qux::class, if you can't recognize what that is
09:51
oh I thought this function:
function some_function(Foo $obj){
    $result = $obj->baz(1,2,3);
    $qux = new Qux($result);
    return $qux->rofl(555);
}
that is the tested function
new Qux(1, 2, 3) is converted to
newMock(Qux::CLASS, 1, 2, 3)
newMock invokes the expectations queue
oh, so you are deferring the creation and allowing the function to instantiate, and will_call, will_instantiate are the things you are going to do, yeah, I could use that
so i can run the thing in complete isolation, even dependencies hardcoded in like "new Qux" gets to be overridden
the "subject under test" is the method/function
for example:
so Qux is nothing to do with your mocking library right? I have just never come across "foo", "bar", "qux". only "foo", "bar", "baz"
public function foo(int $count){
    return parent::foo($count + 100);
}

will_call(
    $obj->{"parent::foo"}, // verifies that delegates to parent::foo
    [555 + 100], // verifies that adds 100 to anything it's passed as argument
    666 // this is what parent::foo returns
);

assertSame(666, $obj->foo(555));
@the_velour_fog no, it's not related to my mocking library
thanks for link, helpful to know there is more beyond "foo, bar, baz".
another major goal was achieving absolute isolation
// say I need to test this:
public function my_require($file){
    require($file);
}

// I can do it without actually including any file
will_call(
    $globalObject->require, // verifies that calls \require()
    ["c:\\some_file.php"], // verifies the argument passed to \require()
);

$obj->my_require("c:\\some_file.php");
interesting. in your original code, you posted a couple of screens back. it looks like you have simply set everything up. then fired the whole setup right at the assertion

assertSame("whatever", $fn($obj));

is that right?
correct
10:10
Guys, can please convert this Saturday, May 30, 1992 to a valid date? I'm trying to register into a website and it throws "invalid date"
is may 30 , 1992 a saturday? is that the problem?
I want to write that something like this: 1992/30/05
@the_velour_fog do you feel it's something interesting to have? i'd probably make it open if people liked it. but it is actually very different from what other mocking frameworks do. i use mocks to verify interaction. it is much stricter
people seem to prefer state verification over that
@Shafizadeh month is before day
year/month/day
hooof, finally accepted
@WesStark yeah for sure it seems like there will be use cases where this is a nice fast way to put a mock together.
@Shafizadeh

$date = DateTime::createFromFormat('l, F d, Y', 'Saturday, May 30, 1992');
echo $date->format('Y/d/m');
i am very unsure about it, because obvs is completely different from what people would expect it to work :B and i'm not a testing expert. i was only very frustrated by how cumbersome mocking frameworks are. now i'm trying to experiment more testing techniques to see what i can do
black box behavioral testing (i.e. TDD) isn't working for me. it's a conspiracy to make people crazy
lol, yeah - its hard to know when the points of diminishing returns are with unit tests. do you do end to end testing ? as well as unit tests?
@WesStark Mention me Sir?
10:36
@JaykumarGondaliya no sorry for that, it's another jay
Its Okay No need Sorry :)
I'm filling a form (to register my startup). Here is an option like this:
Primary customer/model type *
B-to-B
B-to-C
B-to-B-to-C
B-to-G
does anybody know what are those?
what is "B" stand for?
business
@the_velour_fog no, i don't believe in integration tests. all i do tests units only :P
right now i have state verification + white box behavioral suites
I usually use selenium-webdriver for integration testing as well as unit tests, so I havent bothered with PHP units testing output function. but I think I will start
10:38
plus for regression i have "smoke" and "fuzz" which test functionally the api
mornes 11 o/
\o
@Linus And what about "C" ?
what is smoke and fuzz?
@Shafizadeh consumer
10:39
I see, and do you know what's "G" ?
or customer
smoke tests just test the minimal functionality (send input, verify output) without pedantically cover all the cases
business to government?
don't quote me on that, Im just guessing
10:41
fuzz it's like smoke, but it's way more pedantic. it throws everything at them and runs for hours
problem is, they are all useful. i can't pick one
@Shafizadeh goverment google those terms investopedia.com/terms/b/btoc.asp
thank you
QA Engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 999999999 beers. Orders a lizard. Orders -1 beers. Orders a sfdeljknesv.
@pmmaga fuzz testing gives you a level of confidence in code that none of the other testing techniques can give you. that's worth a lot for me
@Shafizadeh what does your startup do?
10:44
Can't explain .. I'm busy right now :P
@WesStark yup, specially for user input
@bwoebi Likely not a valid optimization
With opcache enabled you can actually check whether the ptr of arg1 and retval are the same
However, it's not applicable here because you're dealing with arrays
just talking about internal functions right now
@NikiC Also … why shouldn't it be applicable in general?
the biggest effort for me is writing state verification tests. that is a lot of work. but you have the advantage that if you verify state through public api you basically have functional tests that also cover the actual code. however i'm still not sure that it's better than the alternatives summed together
@NikiC I can't imagine a problem here right now unless the variable is a reference…?
10:56
mornings phpeeps
@pmmaga nobody ever says that. they are all about unit (not saying that fuzz is a substitute to unit, tho :P)
brb groceries
@bwoebi sorry, I'm talking about something else. Due to existing optimizations you can already sometimes check if arg == retval. However I then realized that these optimizations will not actually apply in any of the interesting cases (arrays)
@NikiC oh, okay. Why don't they apply in the array case though?
@NikiC essentially, I'd just need an opcode to do ZVAL_COPY_VALUE(zv, arg); ZVAL_UNDEF(cv); for bare non-ref vars and then functions can do special handling of rc=1 arrays…?!
11:37
morngins
agreed
you're obviously one of these extremists that thinks comments should actually have useful information in them ...
:P
it basically boils down to the fact that writing:
use Trait1 {
init as public method1trait1;
}
use Trait2 {
init as public method1trait2;
}
or
use Trait1, Trait2 {
init as public method1trait2;
init as public method1trait1;
}
or
use Trait1;
use Trait2 {
init as public method1trait2;
init as public method1trait1;
}
all result in the same
aliases basically have no info about which Trait they refer to unless you qualify them with the class name. which is fine if the traits use different method names...
11:59
response header
Expires:Thu, 19 Nov 1981 08:52:00 GMT
1981 ??
Basically just mean don't cache this
ah,thanks
12:21
hi guys
I have one question..
i am using fpdf for writing data into pdf
there I am also drawing rectangle for comment
but the problem is when comment goes on increasing height of the rectangle is not increasing proportionally
when comment is large then height is increasing too large..
where can I put my code as sample code?
any online tool
@pmmaga it should possibly iterate over the trait names of the current block first if possible…
@bwoebi when the functions are being copied they have no info on which block they were declared (AFAIK). I could try to give them that though, it would solve at least the first variant
 
2 hours later…
14:08
@Gordon @WesStark Finished the logo yet?
!!remind list
Usage: !!reminder [ examples | list | <text> [ at <time> | in <delay> ] | unset <id> ] Try !!reminder examples
arghhhhhh
Registered reminders are:
• what happens → Id: :35514705 → Thursday, 21st December 2017 00:00 (UTC) - Set by Trucy - Time left: 5 months, 12 days, 9 hours, 51 minutes and 8 seconds
• Happy PeeHaa day → Id: :35763899 → Wednesday, 21st February 2018 00:00 (UTC) - Set by Trucy - Time left: 7 months, 12 days, 9 hours, 51 minutes and 8 seconds
• You're dead. → Id: :35763950 → Sunday, 21st February 2117 00:00 (UTC) - Set by Paul Crovella - Time left: 99 years, 7 months, 12 days, 9 hours, 51 minutes and 8 seconds
14:35
@pmmaga yes, give it to them. if you use the second variant, then obviously there's nothing we can do about this.
@bwoebi working on it. dealing with some opcache leaks caused by my changes ATM :P
Current opinion on with* methods for artax Request is meh somewhat weird @kelunik @bwoebi @Trowski
@PeeHaa Well, I somewhat agree, but @kelunik really wants it … and I'm not in the mood to debate that to no end … It TBH is a bit a holy grail type discussion.
So, I'm totally open to changing that, if you can persuade him. I won't actively debate it myself though.
14:48
lol dat @Paul reminder
o/
I am going to give me final verdict once I finished this rewrite to see if it stays itchy
@FélixGagnon-Grenier o/
> Class "Amp\Artax\DefaultClient" is declared "final" and cannot be mocked.
I knew that
But heavy breathing intensifies
why don't you just mock the interface?!
I am doing that now
But it asked for a concrete because I got the names mixed up
In the previous version that is
Out of curiosity @bwoebi what's the reason for the normalization of header keys in the request object?
@PeeHaa being able to access them directly by key?
s/normalization/strtolower
I could already do that :?)
15:01
because with regards to the RFC, Host, host, hoST and HOST are the same
@PeeHaa you could, but we don't trust you.
k just a note that oauth signatures may be based on header keys
Not sure yet whether that influences a lot of code
evenings, gentlemen
Wait
That probably says normalize too now I think about it
Nope
Evening r11
15:14
\o
@PeeHaa why is jay acting like a jealous girlfriend
@JayIsTooCommon
because he is a jealous gf
i think he thinks i was avoiding him specifically
:|
but you are assholes as a group. it's not just him :B
15:17
I ship Jay x Wes
@bwoebi ping
@PeeHaa Otherwise we'd have to clone the request on request.
Could you elaborate?
Why does the name of the method mean you would have to clone?
@PeeHaa We preserve the header case, see getAllHeaders(true), could probably also be a different method.
@kelunik ooooh missed that one yeah
@PeeHaa Wat? I doesn't have anything to do with the method name. Just with the user giving us a request and maybe changing it later.
@PeeHaa And they're lowercase by default, because that's how headers are in H2 anyway.
15:24
Why is it called with* instead of set* or add*
@kelunik TIL
@PeeHaa Because immutable and returns a cloned instance.
And people are used to that from PSR-7.
2 mins ago, by PeeHaa
Why does the name of the method mean you would have to clone?
ugh psr7 naming :(
k that explains it
kk
@PeeHaa It doesn't, but set... totally doesn't indicate immutability and that you have to use $request = $request->set...
Neither does with
@PeeHaa It clearly tells you something is different than with set.
15:26
If you wanted to get better indication imo you missed the mark
0.02
@kelunik something is different
If it doesn't tell me what it is that is different it doesn't add clarity
@PeeHaa Yes, that's good enough. And PSR-7.
psr7 is a reason
indication of anything not so much imo
And set is clearly on the current object, as is add. with somehow indicates that object with that, doesn't have the "change the current one" indication.
It really does not
It's all semantics, but with really is still the same thing
peehaa with beer
It's still peehaa
fig dropped the ball there if that was their reasons
@kelunik pong
15:31
@bwoebi You still didn't reply and create an issue for the issue mentioned in IRC, seems to be not that important then.
@kelunik reply to what?
My last message is from 12:05?
> 12:43 kelunik │ bwoebi: Please open an issue so we can discuss publicly.
Ah, fine. Will do a bit later.
@PeeHaa nah, there is peehaa and there's peehaa with beer … we now have two peehaas :-D
:P
The other peehaa only shows up after a lot more beers and hard drinks
@bwoebi No, actually @PeeHaa already had a beer, we can apply an optimization to just return the same instance.
15:46
I wanted to tell you to mind you own business and not imply I already had beer, but then I noticed I actually do :P
BTW you guys seen / spoken to daniel recently?
programming with generics in #golang 😂 😂 😂 https://t.co/Ch4tIDNv9P
Anonymous
16:07
user image
6
*grabs gun from popcorn machine*
Back when it was actually still a good show
@PeeHaa s3 now?
Anonymous
@PeeHaa True. It got very boring after the first season
@WesStark yeah coming
16:10
i have watched up to when the blonde girl enters in that room with strange riddles
or did i imagine that scene?
that show confuses me a lot
so does gOt
i know everything of GoT
especially because i've watched every episode like ten times :B
what is the total amount of seconds of all the episodes, that have been aired, till date?
NO GOOGLE
Anonymous
The guy having sex with another man just plant an android exploit on his phone is some gangsta shit @WesStark
16:12
nope, Jeeves disapproves
@Samson i don't remember that happening
@WesStark Nope it happened
@Samson Still didn't watch the second one. ^^
Anonymous
not as good as the first ..
@PeeHaa nope…
16:19
@PeeHaa I tried, but he didn't respond.
Anonymous
@WesStark sorry, I'm camping so limited access. I know you weren't, I was just trying to say sorry <3
yeah you guys would drive mad even the dalai lama :B
Anonymous
I know, it was mainly @DaveRandom
@Wes why were you pissed tho?
me being annoying with the animes?
i am pissed by your face
every time i look at it, god
16:22
I don't have a face
not my real one at least
but that makes me all the more triggered
@WesStark she's so kawaii <3
yeah kawasakii niinja
Anonymous
16:25
@Kaori you're disgusting.
2
Anonymous
In a nice way
Anonymous
Definitely not in a nice way
In a non nice way
Anonymous
But if I say in a nice way, it's not bullying
@JayIsTooCommon your face is disgusting
Anonymous
16:25
Yeah, fair point
MOD, A GUY IS BULLYING ME
Anonymous
kaori who are you?
@MadaraUchiha halp
@Samson im you
you're so much on the noise side of the ratio at this point
:(, k Ill close the tab for now
16:32
@Kaori I didn't mean as in now :P what happened to your side projects? or are you reaaally just into animes lately
i.sstatic.net/OqGtt.png im building one right now
@WesStark I am going to need another counter for the end of the season so I can watch it too :P
@PeeHaa pff it's like 5-6 episodes, not 20
wat
That is going to suck if they are going to put all kinds of stuff in those 6
16:35
> Unlike previous seasons that consisted of ten episodes each, the seventh season will consist of only seven
CSS 3d is amazeballs tbh
but they say they will be 80 minutes long
no. 110
but nobody knows for sure
why is GoT so secretive about the new seasons
I've heard the writer wasn't going to publish the books, until the respective season was released
that's wrong. new book is far from being finished
oh....
16:39
now the tv show is ahead of the books series
but it's ok because books cover all the things way more extensively
in other words the tv show won't spoil the book
ah
chances are the tv show will end without revealing anything
the GoT thing is too complex
s/too complex/not an anime
animes can be complex
steins;gate for example
the time line is totally fucked up... not as in flash
16:43
shit;turd
who here uses mock objects more than anyone else?
Game of Turds
shit im being cynical again
game of turds is accurate tbh
16:58
@Ocramius I've extended a class, unset a private property via Closure::bindTo() and added __get()/__set() methods in order to overwrite the property between being set and read … in a test :-D I feel a bit dirty :-D
00:00 - 17:0017:00 - 00:00

« first day (2457 days earlier)      last day (2717 days later) »