« first day (2322 days earlier)      last day (2625 days later) » 

7:00 PM
/me afk now
 
no worries, thanks for your help
 
no problem
 
omg. just listening to fade to black for the first time in like... 4 years. omg the rush of feels.
 
@FélixGagnon-Grenier What do you think of their new album?
 
I don't know. didn't know they had a new one
@Trowski do you like it?
 
7:04 PM
Yeah, it's much more like their older stuff.
 
listening to it now. begins rightly ;)
 
what's the cutoff for their "older stuff"? pre- black album?
 
@FélixGagnon-Grenier nice song
 
@PaulCrovella Pre-2000.
 
when z-index isn't realed in, I have to fight a z-index of 2000. wat.
(I didn't write that)
 
7:20 PM
What's for lunch?
 
In 'n Out
 
I thought the default z-index was 0.
 
Ola
 
@Tiffany really?
 
@Trowski it's an element. stuff is overlapping wrong. Datepicker is hiding behind the banner when it shouldn't.
@SalOrozco Always. Anytime you ask what's for lunch, I'm going to say In 'n Out cause you work near one and I hate you.
 
7:22 PM
@Tiffany is my go to place for lunch.
but I can't have that everyday lol
 
it's so goooood
 
they don't have bacon though, which is a damn shame
 
I guess Five Guys...?
 
Five guys is good.
file_get_contents() only returns text?
What if I have html in the file.
 
What else would it return? Chocolate?
2
 
7:25 PM
html is text
 
I wish it returned chocolate
 
;p;
lol
It doesn't render as html
 
PHP for the most part doesn't distinguish between text and binary data
 
@DaveRandom now I want chocolate. But how that's different from normal, I dunno.
 
<h1>some title</h1>
 
7:27 PM
@bwoebi so it seems that file uploads straight up do not work over https in artax /cc @rdlowrey
 
It will just look at the manual
 
ref stackoverflow.com/questions/2997218/… is what I am getting, no matter what I do, it seems to be a PHP bug rather than an artax bug
 
@DaveRandom Or chocolate.
@SalOrozco How are you outputting it after grabbing it from file_get_contents?
@JayIsTooCommon LOL
 
@Sean followed this tutorial github.com/PatrickLouys/no-framework-tutorial.
@Sean into a template html, using twig templating
 
@SalOrozco Twig will escape content by default.
 
7:38 PM
ahh so twig was my problem then
 
{{ word | raw }}
like that?
 
Also twig.sensiolabs.org/doc/2.x/filters/escape.html for info about what it does.
But yeah
If you're using twig 2.x
 
Wes
@DaveRandom can you help me with something? :B i've been trying to understand if a generic declaration involving covariance would be valid in the absence of method overloading. this doesn't work in c#, because overloaded methods "may unify". i wonder, if there was no overloading in c#, would that work? i couldn't find problems with it so far (notice that type parameters are all covariant)
 
Does anyone else have this problem? In sublime text editor it started acting to where after using it for an hour or so it starts to take really long to save a file.
Freezes for about 7 seconds before saving.
 
Wes
7:43 PM
use phpstorm :B
phpstorm is also great with html css and js editing though
 
@Sean that worked.
 
Mm that's what I need lol something that works with PHP, HTML, CSS, JS, etc..
 
@SalOrozco \o/
 
I don't know what the etc would be actually
 
@Wes the problem still seems to exist when the types are invariant, although I'm struggling to wrap my head around the exact nature of the issue
Variance is complicated :-(
 
Wes
7:45 PM
problem is that the second method is overloaded rather than overridden. so you get two methods that fight each other
dynamic dispatch is complicated, variance is easier :B
so bad that c# inherited that from java. it's a fucking mess...
 
Seems weird that you shouldn't be able to work around that with explicit implementations though
 
@DaveRandom I've fixed this issue
 
➜  php-src git:(master) ✗ sapi/cli/php gistfile1.txt | head -n20
int(91)
int(24576)
int(0)
int(0)
 
I think you have have just hidden it (because of the zeros)
 
7:49 PM
Is that what suppose to be returned?
Oh, ok
 
@brzuchal The issue is really complicated, basically it's because SSL_write() can result in reads being required, as well
 
But now I got rid of Warnings :D
 
as such, the fwrite() abstraction is not good, and it becomes really difficult in non-blocking mode
@brzuchal yes, it may actually be the right fix, but the PHP code is wrong
can't do it right now but can you keep a patch of whatever you just did lying around so we can do more tests later?
 
Wes
there is no way to tell the compiler i'm overriding rather than overloading?
 
@Wes Well yes, new, but that apparently does not do enough
also constraints seem to be ignored
 
Wes
7:56 PM
in my mind it works perfectly, A<is or extends object, is or extends object> is covariantly valid to A<object, is or extends object>
right? :B
 
@PeeHaa I added some more content to async.kelunik.com/guide/event-loop.html and the two following pages if you want to read it.
 
Is it not possible to get a client's IP using localhost?
$_SERVER['REMOTE_ADDR'] as well as $_SERVER['SERVER_ADDR'] are both set to ::1, but it was my understanding that on localhost $_SERVER['SERVER_ADDR'] might be set to ::1 but the $_SERVER['REMOTE_ADDR'] would still be a client's IP
 
@Alesana where are you making that request from?
 
On localhost, I have a page that has an iframe of a PHP page that makes the request
 
@DaveRandom Sure, actually what is see is I've got same results when using stream socket without blocking when writing to http without SSL, it's weird because the only thing differs from your first gist is I've commented out stream_socket_enable_crypto and opened socket to httpbin.org:80 with /post url on it
It looks I've got int(0) int(0) without response on stream_socket_blocking = false
 
8:10 PM
@brzuchal Yes that what I mean by this:
18 mins ago, by DaveRandom
@brzuchal yes, it may actually be the right fix, but the PHP code is wrong
Need to select() to wait for socket readiness between calls
 
Printing $_SERVER, nowhere does it contain my actual IP
 
No it wouldn't, it will contain the client IP and the host address from the browser's address bar
 
I am the client though. I guess calling from inside an iframe is different?
 
As I undertand it, the http request to localhost never leaves your computer. Your "public" ip, the one given to you by your isp, is never in cause.
 
I suppose that makes sense
Well that makes testing a lot more difficult haha
 
8:41 PM
!!uptime
damnit
 
@Alesana then you're testing the wrong thing.
 
@kelunik What do you mean by that?
 
!!uptime
 
@Alesana how does it make your testing harder?
 
@kelunik Maybe I should have used the word developing not testing. I am developing a web app that shows content based on a client's location. It get's the location based off of their IP
 
8:45 PM
Just use some fake address while developing on your local machine.
 
That's what I've resolved to
 
!!uptime
 
╔══════════════════════════════════╗
║ [10 seconds] without an accident ║
║   since [2017-02-23 20:47:11]    ║
╚══════════════════════════════════╝
 
https://t.co/FiPadWWw2V
 
8:47 PM
@PeeHaa ^
/me out for a bit
 
Wes
8:58 PM
@JayIsTooCommon AHAHAH
when people follow you in private rooms...
 
@Trowski do you think it would be nice to have some API like \Amp\resolveOrFail() that already puts a "when" to bubble any error up or would that be a bad practice? gist.github.com/marcioAlmada/ae924205a614e372b97cbb82eed73657
I couldn't find anything like that on the API, maybe it's for a good reason /wonders
 
@marcio Actually we added just that in v2.
 
/ migrates to v2
 
@marcio At least if I'm understanding you correctly.
 
@Trowski like in rethrow(resolve($toBeResolved))->when(function(){ /* my success handler */ }); ?
 
9:09 PM
@marcio Oh, no then you want Amp\pipe()
$promise = Amp\pipe(resolve($toBeResolved), function ($result) { /* my success handler */ });
If resolve($toBeResolved) fails, the function is never called and the returned promise fails.
 
oh, that. The objective is to avoid repeating "if ($error) throw $error;" everywhere, things escalated quickly :)
 
@marcio You would never do that. when() isn't returning a new promise.
This is part of why we abandoned the fluent API in v2… it doesn't really make sense.
Unless if ($error) throw $error; will throw the exception in an uncatchable way (unless that's what you wanted).
It gets forwarded to the handler set in Amp\onError()
Note this is for v1… this changed a bit in v2.
A function like v2's rethrow() is what you want if you just want to forward exceptions to that error handler.
Sorry if this is getting confusing…
 
9:25 PM
@Trowski I have a more general error handler hence why there is no need to "when" most error cases. Amp\pipe will be fine for my use case.
@Trowski not confusing at all, thank you for your hard work and support.
 
Hello
Can anyone help with a wordpress update database command I'm struggling a little?
I am checking the URL in a database to make sure it matches and if not (someone changed server) I want to update the url in the table to match the current url they moved to
$wpdb->query( "UPDATE $table_name.'client_help' SET site_urlz = $site_url WHERE site_urlz = $correctname");
 
9:44 PM
wow
You going to get hacked.
 
@DaveRandom I've fixed PHP code so it works with this patch
 
omg docker. such containerized. very separate. amaze logs. much learnding.
 
and it receives from SSL all what should receive
 
10:02 PM
@DaveRandom gist.github.com/brzuchal/a250d284bc8b65961f0ed725c11ffbe2 I think there is something wrong with reading because stream_select returns there are changed streams for read but reading gives nothing without few times retry on a stream, but it might be closer to find it?! maybe...
 
@brzuchal Yes, the reason is complicated but in that specific scenario the readability is telling you that you can call fwrite() again
It's because of the way the underlying TLS protocol works
gvie me like 10 mins I will take a proper look
 
> the readability is telling you that you can call fwrite() again
 
Anonymous
@Wes do you like it?
 
Wes
laughed so hard i peed my pants :B
 
Anonymous
@PeeHaa does that without laughing
 
Wes
10:10 PM
ahaha
 
@tereško random ping to ensure you don't forget that flat earthers exist.
 
@PaulCrovella Do you have weather called "april showers" where you are?
 
@FélixGagnon-Grenier did you have an encounter?
 
@tereško yeah...
tho lately, as I'm working with maps, I had some fuel to try and explain stuff about cartography, and wonder if they knew caretographers existed.
didn't seem to be enough though
 
@JayIsTooCommon I made twitter images work just in time
 
10:18 PM
wait, you mean the encounter was IRL?
 
oh yeah
a live, adult, grown, able to speak human
 
do tell
 
@Danack yes, I'm not really sure what to do about it. We may need to introduce negative return values for fwrite() to indicate it :-/
 
a pool player, in a bar. seemed ok enough at start, then starting rumbling about stuff, so much that at some point I said, jokingly 'well, at least you don't believe that the earth is flat'.
to my demise
 
I appear to have stumbled on a PHP bug that has existed since day one
 
10:20 PM
@DaveRandom you mean, PHP?
 
@FélixGagnon-Grenier at least that saved some time?
 
@Danack he's a developer, he tried to fix the bug
 
hehe
well, it seems his propension with flat planes at least had one advantage: he totally kicked my ass at pool
 
@Danack is it just me, or the blinking is really distracting
 
@tereško it's not you, and the audio engineer for the clip that comes from needs a good talking to. The sound doesn't meet expectations.
 
Anonymous
10:23 PM
@DaveRandom oh, shit the bed
 
manchestereveningnews.co.uk/news/greater-manchester-news/… one of my friends was on this flight (not a crash but nearly one)
 
@Danack it might just be that my subconsciousness treats all "wide eyed individuals" as "worth paying attention to" and interprets the blinking as "sudden movement"
 
@brzuchal can you share the php-src patch?
 
@FélixGagnon-Grenier did he have any interesting arguments?
 
10:27 PM
(btw, the flat-earth thing seems to be really unpopular in my country)
 
@tereško I don't know if "you have no proof" qualifies for interesting.
 
/flurious
 
@FélixGagnon-Grenier I tend to think that "horizon" seems like a good enough proof
 
@tereško "no, it's just the way light bends, it really is flat"
 
"how"
 
10:29 PM
blinks
 
how does the light bend?
what's causing it to bend?
 
The time cube
 
@DaveRandom that was a really shitty plot thread in Dr.Who
then again, all of the 11th doctor's stories where pretty much shit
 
I think I missed something
I haven't paid much attention to Dr. Who for ages
 
last time I checked, it's not worth the effort anymore - you can ignore everything after 10th one dies
 
@brzuchal oh sorry yes I totally missed that
looking now
 
I've just added those both flags which where pointed out in that answer
 
Oh right you need partial write as well
OK so that fixes the problem in some sense, although now there's a new problem
It needs to indicate to the caller whether the stream needs to be watched for writability or readability
tbh this whole routine makes no sense to me
 
I think stream_selectshows readability all the time now
 
I want @bwoebi @rdlowrey @kelunik input on it
@brzuchal no it's just that in that specific scenario you always end up waiting on readability
however that wouldn't always be true I don't think
I want to open a bug but I'm still not even 100% certain what to report :-/
 
10:41 PM
Well I'm going to bed right now, I hope I helped you somehow
 
@brzuchal you have, very much, thanks
 
you're welcome, good night
 
in fact @Trowski are you around?
 
@DaveRandom Yep.
 
Cool, I would like you thoughts on something
Basically I have discovered a bug in PHP whereby fwrite() for a crypto-enabled stream with a very large buffer fails
as far as I can tell this is a bug that has existed since day one
There is a "fix" patch linked above
however it doesn't fully fix the problem from a userland PoV, because it is possible that you may end having to watch a stream for readability before you can write to it
and I am out of ideas of how to deal with that
I have a feeling it will need a specific write function for non-blocking crypto-enabled streams
which sucks
ideas please :-P
 
10:51 PM
Why does it need to be readable for that patch?
SSL_get_mode?
 
I don't know enough about the inner workings of SSL/TLS to answer that with any real confidence
Docs for SSL_write() are quite clear that it's a possibility though
> If the underlying BIO is non-blocking, SSL_write() will also return, when the underlying BIO could not satisfy the needs of SSL_write() to continue the operation. In this case a call to SSL_get_error(3) with the return value of SSL_write() will yield SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. As at any time a re-negotiation is possible, a call to SSL_write() can also cause read operations!
> The calling process then must repeat the call after taking appropriate action to satisfy the needs of SSL_write(). The action depends on the underlying BIO. When using a non-blocking socket, nothing is to be done, but select() can be used to check for the required condition. When using a buffering BIO, like a BIO pair, data must be written into or retrieved out of the BIO before being able to continue.
There's another problem, too
Oh wait, maybe not
I'm not 100% sure
 
@DaveRandom Yeah, just read that after you said this.
 
You'll notice in this example @brzuchal is calling fwrite() repeatedly with the exact same buffer data
i.e. not chopping off the bit that was sent
which is how SSL_write() seems to want to be called, but then it looks to me like SSL_MODE_ENABLE_PARTIAL_WRITE should stop that from being necessary
Reading this it looks like we want all of those flags except SSL_MODE_SEND_FALLBACK_SCSV
 
Does specifying a length on the write bypass the problem?
That is, does fwrite($stream, $buffer, 8192) work?
 
Well it certainly wouldn't be guaranteed to work everywhere even if it does (just looking now)
 
11:01 PM
Right, nevermind.
It seems like adding SSL_MODE_ENABLE_PARTIAL_WRITE would solve the problem…
 
@Trowski yes I think it would from reading the docs but I need to experiment with it, but I don't have a working build env right now and I don't have time to set one up, either
Also I think SSL_MODE_AUTO_RETRY would enable us to significantly simplify this whole routine
I don't fully understand that routine, it seems to do a poll in the middle even for non-blocking streams which is... weird
@Trowski yes you're right, I massively over-complicated it in my head
 
@DaveRandom Looks like it breaks out of the loop if it's non-blocking: lxr.room11.org/xref/php-src%40master/ext/openssl/xp_ssl.c#1995
 
Right now I'm going to play the "what version of OpenSSL did this option appear in" game
 
I'm building master right now so I can try out the test script.
 
great :-)
 
11:16 PM
Hmm… I'm getting undefined symbol issues when using OpenSSL 1.0.2k. That should work, right?
 
What is saying it's undefined?
 
Oh, right, I need to define another include path when compiling.
 
I might will put openssl on lxr
 
Undefined symbols for architecture x86_64:
"_EVP_PKEY_base_id"
Along with many more… basically it's just not finding the lib.
 
11:31 PM
@Trowski that's weird, did it build before you patched it?
ugh I have terminally broken my VPS
 
11:50 PM
@DaveRandom Had to manually modify the Makefile
 
@Trowski your headers are in a weird place?
 
@DaveRandom I'm on a Mac and I don't want to overwrite the system openssl.
 
y e a h
 
oh right, fair enough
 
I specified the directory with --with-openssl, but under EXTRA_LIBS I had to manually add the path for libssl.dylib and libcrypto.dylib
Maybe there's a better way… but that worked.
 
11:53 PM
:shrug:
I don't speak mac
 
Normally I have no issues compiling things as long as I specify the install dir
@DaveRandom With the patch it never reads the response…
 

« first day (2322 days earlier)      last day (2625 days later) »