« first day (2410 days earlier)      last day (2764 days later) » 

Wes
Wes
17:00
@Jonathan i don't think it's possible doing it constant time :\
some sort of linear search is required
@kelunik In which they seem to propose not using JS's Error class, because it isn't really an error.
^ yep
@Trowski And to prevent catching it by default.
@Wes I'm not sure the exact parameters of what you're trying to do, but if you can enumerate all of the possible values you want and their weights, you can definitely select in constant time using the above approach.
However, if you can't do that, then you're right
linear time it is :'(
@bwoebi github.com/zenparsing/es-cancel-token also uses throwIfRequested.
17:02
yeah, I don't like that.
@kelunik I don't think extending Error is the way to go about that in PHP.
@Trowski Yes, probably doesn't matter, because Throwable has just the same "problem". Just don't catch \Exception and \Throwable.
@bwoebi .NET also uses ThrowIfCancellationRequested: msdn.microsoft.com/en-us/library/dd537607.aspx
@kelunik I actually like that, it makes sense to me.
CancellationToken::requested(): bool would also be helpful.
well, I wanted CancellationToken::catch(): ?CancellationException
@bwoebi And why exactly?
17:13
@kelunik because - I guess at least - you usually have to do some cleanup anyway.
Hm. An FPGA-based PHP accelerator. @NikiC? :-)
@bwoebi Then use finally. Any other operation might throw, because it fails.
@kelunik Good point, didn't think about finally.
@bwoebi @Trowski Pushed. github.com/amphp/amp/commit/…
Can we ignore EBADF and release RC-3?
Or do we want to fix the timer issue before as well?
@kelunik I actually just replied to that issue.
17:30
@Trowski @bwoebi What should we do with github.com/amphp/amp/pull/136? Just close and close the feature request? I think it's not worth it.
We can always revisit that later, as it's a self-contained feature.
^ agree
@kelunik Yep.
@Trowski Your opinion please: github.com/amphp/socket/pull/27
@kelunik If I'm right, there's no native functionality in libuv to execute something every tick?
@bwoebi We could keep all timers with delay = 0 in a separate timer queue executed directly after all defers.
17:35
@kelunik I still see no issue with disallowing interval = 0.
Isn't that just a defer then?
@Trowski One you don't have to manually care for, yes.
@Trowski well, technically it is a defer.
it basically just allows you to not have to manually reinstantiate the defer upon every tick
@Trowski We have the same issue with interval = 1 for NativeDriver if the first watcher always takes longer than one millisecond. Because that same watcher will be the first in the priority queue again.
Which is a very limited use case.
@bwoebi And I don't have to specialcase it in kelunik/loop-block ^^
17:37
@kelunik That I could fix with a counter.
@Trowski You need more than that. Because you still want to execute the later ones.
@kelunik Having a 0 ms interval seems like an error… it's just going to busy wait then.
You'd have to pull them all out first and then execute them.
@Trowski I think I agree on that.
@kelunik Hmm… might be right there, I can look at it later.
17:39
Ah, no, as we have tick based $now, it's fine. github.com/amphp/amp/blob/master/lib/Loop/NativeDriver.php#L89
I don't want short interval timers to be blocking to anything else.
Ah, good. That's probably why I made that change. :-D
object as class name – #74633
@Trowski The change has been made for consistency with libuv for timers created before the first tick.
@kelunik Oh, right right… well it had a nice side-effect. :-D
In fact, NativeDriver is the only one to fail the following test:
    public function testShortTimerDoesNotBlockOtherTimers() {
        $this->loop->repeat(0, function () {
            static $i = 0;

            if (++$i === 5) {
                $this->fail("Loop continues with repeat watcher");
            }

            \usleep(2000);
        });

        $this->loop->delay(2, function () {
            $this->assertTrue(true);
            $this->loop->stop();
        });

        $this->loop->run();
    }
Works fine with a minimum of 1 for repeat.
Oh, GitHub changed Pulse and Graphs to Insights.
!!changelog amphp/amp
17:54
[ amp ] [ dbc853c ] Fix timers with interval = 0 in NativeDriver - Committed by: Niklas Keller on 22.05.2017 17:54
^ @Trowski Fixed that for NativeDriver.
That diff looks really horrible, it just adds a try / finally around.
Wes
Wes
am i a bad person if i use goto?
:B
@Wes What for?
Wes
Wes
for anything
why is for(;;) while(true) better? :B
Because hate the sinner, not the sin
17:58
@Wes The latter is better right?
Choose your answer wisely
They're all gotos eventually, but those other things have obvious scope blocks. So there's that.
Also I am scared @Wes
What are you doing now? :P
Wes
Wes
do i have the right to remain silent?
Better lawyer up :D
for("this is me avoiding gotos" ?><?php "false" ?><?php 1 + 3 ) {
  // ...
}
18:01
hey wait wat
Mon Mar  6 21:40:01 +03 2017
        86.24 Mb aerys
Mon Mar  6 21:35:01 +03 2017
        45.42 Mb aerys
Suddenly mem was freed on gitamp
@kelunik Looks good. I still think timers should require interval > 0 though.
oh nvm
Forgot I rebooted :P
That fixes it for slow executing timers too, so that's good.
18:02
@PeeHaa also aren't those in reverse order?
Oh lol double fail
looks like you actually just nearly doubled
Did a tac
Yes :(
I suck
gitamp still leaks...
Well that's no problem, you can just
@Trowski If we can support them, I see no reason not to allow them. Allows measuring tick lengths with a single repeat watcher. ^^
^ That one makes Uv and Ev hang. @bwoebi @Trowski
18:15
evening
18:27
hi evening
can i know what's the simple and best way for encrypting in php5.3 or back?
Start by upgrading your php
wish i could it just under some corporate bs
Do you guys have PHPSturm 2017.2 (or similar) ?
corporate requirements of running vulnerable software exposed to the web while trying to encrypt sensitive data?
Get a better corporation :)
@DejanMarjanovic yes
@DejanMarjanovic yes
18:34
Well crap, now it works :-)
You're welcome
Thank you...
@PeeHaa its easy to say mate, if had options could have done it . So just for the sake of it is there any way get it sorted out ?
I need to get drunk fast so a bottle of slivovic and it's all good
Encoding reload didn't work.
18:39
good morning
@Smple_V Sorry it's a bit of a useless exercise imo
Wes
Wes
@DejanMarjanovic is not out yet?
the eap maybe
EAP it is, but also the latest not EAP was borking.
Now it's actually reloading, but it didn't although everything was as usual.
Suspicious liquid for my friend PeeHaa
ha!
Anyone taken a look at GraphQL? Opinions?
18:45
I use SlavQL personally
I don't even know what it is. It looks like an alternative to REST.
Wes
Wes
@kelunik do you have an opinion about how @internal is supposed to be used
so stupid that is used for both annotating internal information and for marking stuff as internal
19:09
@Wes Always use it just for marking things as internal.
That's also how PHPStorm interprets it.
@Wes Inline version vs. non-inline version I guess?
Wes
Wes
i have no idea
i don't think there is such a difference
@Wes In PSR-5 there is, but not sure if tools deal with that correctly.
@Allenph pretty cool. Rest for trivial read + write. GraphQL for actually interesting apps.
user1804599
20:00
GraphQL has a too limited type system.
user1804599
Other than that it's good.
user1804599
You can draw functors between GraphQL and your favourite typed programming language.
Good morning guys
I am a new on stack overflow any wants to friend ship with me
What's that ??
user1804599
20:18
It is strange to suddenly become friends with a stranger.
No no no, not become friends, but friend ship, meaning pack up one of your friends in a box, someone else does the same, and you swap
Why would someone want second hand friends... they would all be used up.
Probably wouldn't have any money left to borrow from them.
@Dereleased Or just bring slivovica, works for @PeeHaa
yeap
user1804599
Has there been an RFC for contract programming a la Eiffel?
20:26
I may start shouting at some point but that's only adding to the fun
If I ever fly to Dutchland I'll be sure to bring or acquire this stuff
You better :)
@Orangepill lol
user1804599
@PeeHaa I'm going to Utrecht tomorrow, will you be there too?
user1804599
Or are you somewhere else?
What's in Utrecht besides me shouting? :)
user1804599
Job interview.
Can't you just come to rotterdam?
:)
user1804599
20:49
If it won't work out I'll likely apply for a job in Rotterdam.
Can you share the company yet?
user1804599
I prefer not, in a PHP chat room. Too embarrassing.
user1804599
But I can on Twitter DM.
gimme
inb4 room name change to "Not PHP"
20:51
Also does your current job know you're gone yet?
user1804599
Yes.
@MadaraUchiha Pretty sure we already had that at some point :)
user1804599
Oh you must follow me otherwise I cannot DM you.
I thought I already did
moment
It's all a plot to get more followers on Twitter
20:53
I am used to seeing @rightfold's posts. Didn't think I wasn't following yet :P
user1804599
XD
@PeeHaa I think the unfollow bug may have struck again at some point because I 100% was and now am not
@PeeHaa there'll be a meetup there tomorrow that sounds interesting: meetup.com/Domain-Driven-Design-Nederland/events/240051904
TIL: memfd_create
2
pings. pings everywhere
20:59
@PeeHaa dunno what
@pmmaga Is that what used to be php rotterdam?
@PeeHaa dunno. found it 'cause a friend of mine is going
@pmmaga She hot?
:P
lol sorry @DaveRandom you failed. Had my phone muted :P
Hope it was worth the 10 bucks :P
Also get wazaap you prick
I never really liked budweiser
21:05
genuinely don't understand why people like that stuff, in all seriousness
@DaveRandom Wait til you go to a music festival in a city where it's produced where it is (a) the only beer around, and (b) available for the low low price of $7 per 16oz aluminum bottle
dick pics bro
you may as well just buy a bottle of cheap vodka and dilute it down at 20:1, would taste the same and have the same effect
oh that wazaap :P
awkward
I have been threatening to relent and get it for ages
I don't trust it though
21:07
You shouldn't
@DaveRandom 8:1
But nobody I know wants to get on whisper stuff
So yes signal messenger is really secure :D
Like the Google shit has sailed, they have known more about me than I do for many many years, but FB just feels generally more like a malevolent force than google.
They both are terrible, but I can see what you mean
Still have been moving anything I possible and sanely can away from google
I'm pretty sure twitter would like to be a malevolent force but they are dogged by competence issues
21:10
@FlorianMargaine if only this weren't Linux-only…
@DaveRandom They would just censor random words probably
Yeh it would be literally random as well
suddenly "onions" would be illegal, for 10 minutes
exactly :P
And other random words would suddenly appear all caps
@FlorianMargaine I mean, it'd be ideal for php://memory…
21:13
@bwoebi you can still conditionally use it?
@PeeHaa to be fair, sometimes I do wonder how many FOLLOWERS I have
but it means having something similar in other OSes, yeah
I might actually not be so pissed of it was bold I think
Now it just looks like my 60 year old father typing a letter
@FlorianMargaine can't use uv methods on it if it's only conditionally… (e.g. for tests)
21:16
@bwoebi send a patch to libuv? :)
I wonder what happened to my PR about adding mkstemp to it
@FlorianMargaine I meant, uv needs a fd. If PHP only sometimes exposes a fd, that doesn't work…
not much, apparently.
@bwoebi ah
yeah, that's how epoll_wait works :(
libuv doesn't have a thread pool?
@FlorianMargaine it does.
for file I/O tasks
then why does it need an fd?
memfd_create is file I/O task
because … you do I/O tasks on fds?!
21:19
is there something like uv_rename()?
no fd, afaik
@FlorianMargaine no?
same for uv_fs_rmdir, no fd
yeah, talking about things operating on a handle
@PeeHaa I think it might always have been upper case you know, it looks weird to me in title case
Something changed I am sure
I had @Wes confirm my sanity and he is Italian
21:23
@bwoebi do you think I should force a new thread in the thread pool for rmdir() or rename()?
@PeeHaa Italians may know about style, but they do not know about sanity.
look at Marco...
@FlorianMargaine if there is none, yes. But in a typical long running app, there already is.
@DaveRandom No thanks. I just ate
@DaveRandom Ehm… @Ocramius is pretty sane
21:24
@bwoebi yes, I mean, there should be a blocking thread for them?
@bwoebi no he's just pretty
in laap, I have the concept of "blocking thread" vs "event loop thread"
@DaveRandom I'm not sure he's that pretty, but he's sane…
@FlorianMargaine yeah, blocking work threads
the idea is that at startup, I create many threads, and when a blocking action wants to happen, the current thread becomes a blocking thread. and the thread pool ensures there's at least one other thread running the event loop
@bwoebi so, rename() and rmdir() can actually block?
sure, just not your event loop threads (you mean the uv_fs_* funcs?)
ah
I see what you mean
I don't think that works
21:27
err... ?
you're confusing me now :)
there's no notification system to unpause a thread upon entering blocking state of a main thread
if the thread pool needs to ensure that, you'll need a busy loop or such atrocities to discover whether the thread is blocking
ah, no, the blocking thread is just communicating with the thread pool
using a global shared queue
yeah
(the code already exists and works fine)
I'm just not sure whether rename() and rmdir() actually block
in the sense that the kernel isn't just returning right away
it depends on the fs driver
At the very least - if the data is not yet in cache - it needs to do a stat
21:31
let's say on NFS
Yeah, that's gonna be slow
Blocking thread it is then
I need to figure out an API for sockets that avoids calling getsockopt/setsockopt because these are ugly :/
I mean, the caller shouldn't have to call them.
An "options" parameter sounds ugly
yeah
But it's a flexible way to add weird things later on the journey...
That's true
Anonymous
Holy shit 😂 I wonder what she did
22:16
@PeeHaa half a year. nice…
22:27
@DaveRandom shit goes on in manchester?
apparently, although currently I have no more information than you probably
tl;dr "something happened, probably"
Anonymous
why weren't you at the Ariana grande concert?
I actually was in the arena last night
Anonymous
Well that's scary.
Indeed
22:30
maybe, although tbh that video does not look like mass panic
remains to be seen what actually is happening
the phrasing in that guardian article makes it sound like Ariana Grande is either the one making the unconfirmed reports or she wrote the article
There was a loud bang when the lights came on
Anonymous
Aye :/ other reports suggested it was at the train station as all 4 lines are apparently blocked by something
hm
when a bomb explodes, it does some damage, no?
looks like nobody is reporting actual damage, but only a loud bang?
if could be literally anything, they were dropping a new bridge strut for the new rail link the other day, it could be that has collapsed or something
it could also just be that generator blew up
Surely not even terrorists want to go to manchester
22:35
:-P
hoax
Just like 9/11
#fakenews
Anonymous
fake news
Anonymous
Love you chris
The IRA was invented by communists
22:36
no haven't you heard? it was invented by Jeremy Corbyn
Anonymous
Fucking mobile
Anonymous
Heh he refused to condone the IRA today :B
@bwoebi ping
@FlorianMargaine pong
@bwoebi do you provide an API for getrandom()?
22:37
@FlorianMargaine where?
@bwoebi in the amp libraries
@FlorianMargaine I see no point in that.
random_bytes()/random_int() is fine
!!lxr random_bytes
[ /ext/standard/random.c#193 ] PHP_FUNCTION(random_bytes)
@bwoebi it blocks though
22:39
@FlorianMargaine It might theoretically block, but practically it never will.
that's fair
yeah, random_bytes is just an interface to getrandom()
yep
Anonymous
@DaveRandom you anywhere near?
144  		if (fd < 0) {
145  #if HAVE_DEV_URANDOM
146  			fd = open("/dev/urandom", O_RDONLY);
147  #endif
148  			if (fd < 0) {
lol
at least 3 miles
from what I can see most likely explanation right now is electrical failure of some kind
there's some high quality content on twitter though
22:43
@NikiC o/ Did you also fly back around the time rlerdorf did today?
Anonymous
People are such twats, half of them will be click bait fakes
We're at the scene at Manchester Arena trying to find out what has happened - nothing confirmed yet http://www.manchestereveningnews.co.uk/news/greater-manchester-news/manchester-arena-explosion-evacuated-ariana-13075807
the MEN is basically 100% click bait, if they say they don't know what is going on, no-one does
hmf
getentropy(3) is not in my libc :(
Anonymous
good trial run if it is just a balloon popping to be fair (minus the stampede)
Anonymous
22:48
Never mind... fatalities confirmed.
23:14
Hello guys! Codepen is targeted to HTML right. Which code editor similar to Codepen for PHP?
@kelunik Sure, I'm just afraid we can't support them with libuv (or libev).
23:56
Apparently my company was bankrupt. Out of the blue layed off everyone today and the place had everything taken out in like an hour.

« first day (2410 days earlier)      last day (2764 days later) »