« first day (2371 days earlier)      last day (2576 days later) » 

2:00 PM
Yes, but what about the case of the final retry to fail. If you have a sleep(1), it will get executed again unnecessarily.
 
@Trowski well, that too.
 
@Leigh mostly okayishly?
 
@SammyK Oh
 
there's some duplication to take care of (bin2hex, hex2bin)
 
Are we aliasing those to the libsodium imp?
 
2:05 PM
@DaveRandom uh?
 
@SammyK how similar is the proposed retry to Perl's redo?
 
@Trowski I definitely wouldn't make ReadableStream implement promise
 
@bwoebi Yeah, I realize that was a bad idea. It's appropriate for Message, but not in general.
 
yep
Also: got a crash with Aerys tests and amp v2 with uv :x … digging …
 
yay crashes
 
2:08 PM
@bwoebi Possible there's some conflicts with what I'm working on… though that shouldn't cause it to crash.
 
I didn't look over it yet, has it been converted to fast zpp, parameters typed etc?
obviously all support for pre-7.2 can be nuked
 
@Trowski well, I mean an assertion failure … you're not working on UvLoop right now?!
 
@Leigh meh on fast zpp
I hate fast zpp
 
@bwoebi Oh, no, definitely not.
 
and parameters on internal functions mustn't be typed
 
2:09 PM
@NikiC oh?
 
mustn't?
 
@bwoebi much harder to understand than zpp, imho
 
for what reason
 
@bwoebi I have found some cases where, for example, throwing from an event would cause uv to crash.
 
@Trowski well, these need fixing then
 
2:10 PM
(pretty sure I saw macros for doing just that)
 
there are macros, but we generally don't use them
 
@bwoebi Some of them were, and I don't have an easy repo right now. I'll let you know if I run across it again.
 
@Dereleased Not very. retry is exclusively for the try/catch/finally block to execute arbitrary code before executing the try block again n times.
 
generally don't != mustn't
Does it cause some harm?
 
It's a hazard
It changes the way error handling works
 
2:12 PM
oh?
 
And I do still hope that we will disable type checks on internal functions in the future
Once that's done we can start annotating everything
what libsodium does need though is an update of arginfo params (currently often wrong / using generic names) and a switch to zend_parse_parameters_throw
 
4-day weekend here, I'll definitely be bored, will take a look if I feel that way inclined
I often find myself feeling like working on something when I walk home from work, then when I get home I just feel like doing nothing ;x
 
heh
I dug up a two year old blog post on the PHP VM and am trying to "finish" it
Right now half of it is about exception handling :/
 
exception semantics are also crazily complex…
 
2:32 PM
@NikiC Yes please!!! I could really use that! :)
You blog posts have been really helpful for me while I try to break things in php-src :)
 
Uh @Trowski … Are you installing a read and a write uv handle for the same stream if we choose to check for readability and writability at the same time…?!
 
@bwoebi Yeah, seemed the simplest to keep track.
If that doesn't work then quite a bit of logic will need to change in that driver.
 
ah, I see what's going wrong
@Trowski you only remove the github.com/amphp/amp/blob/master/lib/Loop/UvDriver.php#L286 watcher from write if there is no readwatcher
at the very least that should leak a bunch of handles…
scenario: activate read, activate write, deactivate write, deactivate read => $this->write[$id] leaks
 
Wes
2:48 PM
did i do something wrong?
 
@bwoebi The read and write watchers have separate event IDs (resources).
 
@Trowski they share the same $streamId
 
evenin
 
@Trowski And they must share the same resource, yes.
 
Anonymous
@Wes god, you're gross.
 
Wes
2:51 PM
not as gross as your mama @JayIsTooCommon
 
@bwoebi Is uv giving me back the same resource? Separate resources should be being created for write watchers here: github.com/amphp/amp/blob/master/lib/Loop/UvDriver.php#L205
 
...
well, there we have our problem
@Trowski you must use the same resource for read and write watchers
 
Wes
can someone please kill me. i'll pay anything i have
euthanasia for programmers. should be a thing
 
@bwoebi I see… I'm surprised that issue didn't surface sooner.
 
@Trowski because typically you don't have read and write open simultaneously and consecutively
(the consecutively is what makes the assertion trigger)
 
2:57 PM
Obviously no test does that either.
 
because we only test units… :-D
 
@Wes Have you tried overdosing on Jolt yet? Why do you seek death?
 
Well, I encountered it in Aerys\WebsocketTest::testIORead @Trowski … but when do you have last run Aerys tests with amp v2?
 
@bwoebi It's been a little while, some of the recent socket changes probably broke some things.
 
@Trowski See also libuv issue #680
@Trowski I'm going to fix it
 
3:07 PM
private methods from super classes' traits are listed in reflectionclass – #74434
 
@JoeWatkins ping
 
Wes
@JoeWatkins ping too
 
@JoeWatkins is it safe to update to php 7.1.4? it was tagged 2 days ago but not announced, and we're not sure if we should update our customers to it :)
 
Anonymous
@JoeWatkins ping three
 
@JoeWatkins
 
Wes
3:11 PM
lol
 
what the fuck ?
@FlorianMargaine announce is coming later on today
 
@bwoebi Yeah, there's a few places that need to use rawConnect instead. I actually had that fixed locally, heh
 
@JoeWatkins cool
 
FYI tag on tuesday, release on thursday, it's always like that ...
 
fair enough
 
3:15 PM
@bwoebi Maybe the test listener can be applied to only select tests… I'm not sure what options are available there.
 
@Trowski that too, I've fixed that locally too^^
 
@bwoebi Other issues I wasn't aware of?
 
I mean that uv issue
 
Oh, yeah, if you could refactor that driver class I'd appreciate it.
 
Thinking of doing our PHP 7.1 upgrade release at like 1am to limit any impact :x
Everything seems to be working, but live traffic isn't test traffic
 
3:28 PM
@bwoebi Do you have some Aerys fixes you can push? I was going to update it to use the new Message.
 
@Trowski give me 5 min
 
3:44 PM
@Trowski pushed changed … turned out to be 15 min :s
 
Wes
3:59 PM
@JoeWatkins i failed with uopz :B i've been hit by a truck full of shame. can you ping me when you have 10 free minutes please?
basically i'm mocking the methods one by one using set return, because i failed with set mock and extends
i have no idea what i'm doing
 
3 messages moved to Trash
 
4:33 PM
@PeeHaa reply to that guy telling him I am not afraid to revert crap
 
Anonymous
the y?
 
yes
 
Anonymous
work your sass
 
:P
 
if I run composer update should it create a composer.lock file?
 
Anonymous
4:47 PM
yeah
 
well fuck
 
@bwoebi ZEND_VM_GENERATOR_STACK_PAGE_SLOTS is no longer used right?
 
really?
 
i wonder is it worth to implement these psr-7 "standards"...
it seems to me that bunch of authors gathered together to validate their crappy frameworks
is there any trickery how to make it using php 7 strict style?
 
5:04 PM
I figured out what I need to do, install composer in a different working directory. I thought I could copy/paste it into another directory. Probably why composer.lock is not creating :D
 
@DaveRandom ping
 
Wes
@PeeHaa ping
!!annoy PeeHaa
 
@PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa @PeeHaa hi
 
yes? :P
 
Wes
nothing.
:B
 
5:10 PM
:D
 
user6510107
Umm, if I may ask as a noob Web developer, where did you guys (everyone on this forum) accumulate your knowledge from besides school? On a standpoint of all languages.
 
@SmailBarkouch A lot right here in chat
And on the job
And in the pub
Wait. Nope that last one was just beers
 
user6510107
@PeeHaa Thank you for answering, you are the first
 
\o/
What did I win?
 
haha
 
user6510107
5:14 PM
What I mean is how do you gain this knowledge from online as I can't do such
 
user6510107
A cookie
 
Hanging around with smart people makes you a) feel really stupid and b) get smarter
 
chicken cookies
 
user6510107
I understand, as I might be visiting this form to gain knowledge, but do you recommend any sites to learn the web development languages
 
Is that cookies made out of chicken or cookies made for chicken?
 
user6510107
5:15 PM
Made for chickens
 
@PeeHaa ask @Ekin, chicken cookies were her idea ...
 
user6510107
I'm a boy...
 
that's a big nope
 
I want chicken cookies @Ekin
Too late
Want
 
yeah @Ekin, where's our chicken cookies ...
 
5:16 PM
Don't dissapoint me next time
 
ask @Paul, he found them...
 
Nope. Chicken cookies and topkek cake
 
user6510107
Right here 🍥
 
Get it
 
CAKE ??? I WANT CAKE ?
 
user6510107
5:17 PM
I gave you this because Naruto ended
 
topkek is easy... and worth it...
 
user6510107
Peehaa any recommended websites for learning web development languages on phone
 
@SmailBarkouch That's that comic character right?
@SmailBarkouch Not really
 
user6510107
Who, naruto
 
Yeah
 
user6510107
5:18 PM
He's an anime character
 
yeah comics
cc @MadaraUchiha
 
user6510107
Yes kinda
 
put your phone in your back pocket and use a real computer ... technically you'll be learning on [top of] your phone ...
 
See :D
 
user6510107
Joe, thanks for the advice! I will do so now
 
user6510107
5:20 PM
When I get a computer
 
user6510107
In 8 months
 
user6510107
...
 
user6510107
Any recommended websites anyone?
 
google
pretty good website, I ask it all my questions
 
user6510107
God damn it lol
 
user6510107
5:21 PM
I mean to learn web development
 
I don't think the google website can develop other websites
 
user6510107
...
 
@SmailBarkouch Don't try to learn in the abstract, figure out something you want to do, then try to do it; ask google when you don't know something.
 
Very much that ^
 
user6510107
@Dereleased Thanks for advice, I do know HTML CSS, but I know little pup and js
 
5:22 PM
...by reading 100 years old php blogs full with best practices
 
user6510107
Pup*
 
Can I meet the little pup!? [pronoun] sounds cute!
 
user6510107
Php*
 
user6510107
Lol
 
user6510107
My damn auto correct
 
5:24 PM
in all seriousness, it's not exactly brimming with best practices, but one of my kids is working her way through code academy courses
 
@kodeart If something smells fishy you can look on SO or ask in this room. There are a variety of experts here who will eviscerate you for even considering doing something stupid
 
user6510107
I tried that
 
Naruto didn't end
 
user6510107
Wait what room?
 
once you have cursory familiarity you can understand best practices, there's not much point digging into blogs by experts until you have that initial familiarity ...
 
5:25 PM
@SmailBarkouch this'n
 
user6510107
It did
 
It was finally put out of its misery
 
user6510107
Lol
 
@Dereleased still not working as your described :) but yeah it MAY work most of the time
 
I've have enough of computering for today, lata all
 
user6510107
5:26 PM
@JoeWatkins k, I will try, though when ever I am in contact with a PC and do it there I easly memorize everything
 
@JoeWatkins WHAT IS YOUR SECRET HOW DO YOU LEEEAAAVVEE???
 
user6510107
It's hard to practice on a phone
 
go into a different room in the house and ignore all the beeping computer sounds ...
 
true that, try a tablet :p
 
@JoeWatkins later
 
5:28 PM
@JoeWatkins Godspeed
 
my wife can make the skype sound perfectly, it's fucking strange ... she does it to fuck with me, all the time ...
 
@JoeWatkins beep
 
user6510107
I gave my tablet to my cousins in a foreign country
 
@JoeWatkins hahahah that power
 
lol
that's awesome :P
 
user6510107
5:29 PM
So, should I try to start a project with a certain goal and try to learn to finish it
 
@SmailBarkouch something something there is no try.
but yeah
 
user6510107
?
 
don't leak business secrets!
 
@SmailBarkouch "Do, or do not; there is no try"
 
user6510107
5:31 PM
Oh
 
You'll do fine
As long as you want to
 
user6510107
I am bad at puzzles elaborate
 
user6510107
I always have
 
that's not a puzzle, pretty straight
 
I'm saying don't think of it as something you can try and fail at. The only failing is giving up and stopping. Otherwise, just see it through.
 
user6510107
5:32 PM
Ok
 
user6510107
Thanks, I will continue
 
be proud, Yoda would
 
Your first attempt will suck. I believe there's a code review stackexchange, or someone here might look at what horror you've wrought. You will be given suggestions. Your next attempt will suck less. Rinse, repeat.
 
user6510107
Ok, thanks
 
user6510107
Is it ok if I have a private chat to talk to you some how, your helpful
 
user6510107
5:34 PM
Or are you always here
 
I'm usually here on weekdays
 
user6510107
K, I'll be there thanks!
 
user6510107
Aka here
 
bah... downloading 20KiB/s... horrible
 
So, I get a plain binary HTTP request that has Content-Type header set to image. I create a temp file from the binary and then use what to validate it?
Every single file info function on the PHP docs page has someone commenting about how you should not trust the results.
 
5:41 PM
@Ekin Is your connection routed through the year 1999?
 
I'm guessing so
and I'm cloning php-src with that...
zip download is even worse atm
 
@Allenph you should indeed not trust it. you could write it to a non-publicly visible file to leverage danger of it being executed without your consent.
then, have an api serve the image when needed
 
@FélixGagnon-Grenier Well how do I validate it so I can publically serve it?
The image is a profile picture which the user and a fair amount of his peers have authorization to view.
Although the endpoint to GET the image is secured. A JWT is required and the associated user must have appropriate permissions and hierarchical position.
 
e v e n i n r11
 
I have what is probably a bad idea
 
5:45 PM
you can also save it in a publicly visible folder, but make sure you control the naming (especially the extension) and the permissions on these files
@Allenph wait you mean that some people do not have the authorization to view it?
hmmyah nvm.
 
if count(token_get_all(FILE_CONTENTS)) > 1 then your file has might have something PHP-y in it. You could run it through php -l path/to/file and if the result contains "No syntax errors" then you might have an embedded PHP script. Of course, that's only (very poorly) checking for embedded PHP scripts.
 
lol, nice
I'd argue the principal vector of defense is to actually prevent anyone from executing the file, but that's wayy too nice not to do
 
So I can just just the magic identifiers at the beggining of the binary and as long as I control the extension I'm okay?
beginning*
I should mention that I do not serve this as a file directly. The user hits an endpoint and I send a Content-Type header and the binary.
That way the endpoint is always /user/[ID]/profileImage and I can use PUT.
 
yeah, that's a sensible way to GET the image
 
If there's something embedded in the image that was expecting to get executed, then it'll just get dumped. The user will have such egg on their face. SUCH EGG
but yeah keep that shit out of web accessible dirs and save yourself a bunch of heartache.
 
5:50 PM
@Allenph however if anyway you serve the image through an endpoint like that, just keep it not public
yeah, what @dereleased says
if you have to customize the PUT handler to ensure the file extension, no reason to partially implement a rest-ish resource for the images
 
It's still REST. I'm allowed to check their authorization.
And that the resource is valid.
That's what a 403 and 400 are for.
So I'm golden as long as I do it this way.
 
@Allenph yeah, I don't mean not to do it that way, I just mean that if you intercept the PUT anyway to manage the extension, and that you serve the images through an id, there is no reason really to leave it public, except being less secure :)
 
@Allenph Checking the magic numbers just (somewhat) ensure it's an image
It can still contain executable code
 
Anonymous
6:02 PM
!!cancer
 
> ♋ Cancer | June 21 to July 22
Action and adventure await you this Thursday, though not before hours of pointless exposition and predictable plot twists.
http://www.theonion.com/features/horoscope
 
Anonymous
Lies.
 
Wes
"tell me a slang term that means wife"
pretty remarkable
also the ten decades couple lol
 
Anonymous
What's wrong with Jeeves..
 
3 messages moved to Trash
 
Anonymous
6:05 PM
You have a silly time zone
 
!!libra
Oh, was that not bound?
 
!!alias libra horoscope libra
 
Command '!!libra' aliased to '!!horoscope libra'
 
!!libra
 
!!libra
 
6:06 PM
> ♎ Libra | Sept. 23 to Oct. 22
A man’s home is his castle. This week prepare to have your castle stormed by a marauding horde of phone bills.
http://www.theonion.com/features/horoscope
 
sorry ^^
 
Well that's startlingly accurate
 
Wes
name an animal with 3 letters in its name: alligator
 
:P php
 
6:23 PM
I'm confused here. Can I just check the binary for the mime type or should I write a temp file?
 
meme type :P
I like that typo
 
I type that 9,000 times a day. Sorry.
 
:D
 
If I write a temp file, it looks like that's not what finfo_file() wants, as it opens the file itself.
 
You should give it a resource
As in a file handler
oh wait
misread
Yeah you need an actual file path
 
6:29 PM
So, alternatively should I just check the binary for my magic numbers?
And forget making a temp file?
 
binary?
 
@JayIsTooCommon @PeeHaa stop lying to Jay
 
Sorry buddies
 
@PeeHaa Yeah, the string I get is an image binary.
I think.
 
oh lol
 
6:30 PM
Maybe I misunderstood in my reading.
 
Don't call that the binary :P
That makes be think about some executable
 
I mean...
It is a binary string...
 
Yeah binary data I see now what you were trying to say :)
!!docs finfo_buffer
 
[ finfo::buffer ] Alias of finfo_buffer()
 
Ahh. Perfect. Thanks.
 
6:32 PM
np
 
Anonymous
@PeeHaa sooo did I break the build? :p
 
Nope Still not
Just not sure when that thing is actually rebuilding :P
Also look what I got people \o/
 
@PeeHaa ugh, a glowing keyboard
 
@NikiC You know what the annoying part is
You cannot turn it off at all
But I kinda got used to it by now
Apparently you can also change the colors for reasons I don't understand
 
6:48 PM
@PeeHaa hipsterism
 
@FélixGagnon-Grenier Probably
 
imagine, you can make your keyboard's color change accordingly to wether or not you have new mail, or make it represent the battery level
 
I imagine I would hate it :P
 
You guys don't like backlit keyboards?
I just got a new rig and I like it a lot.
That way when I'm wiki-surfing when I should be sleeping I don't have to turn the light on.
 
6:58 PM
It reeeeeally took me a looong time to get used to it
 
@NikiC It shouldn't in master, yes.
 
ah, good old negative affirmations
 

« first day (2371 days earlier)      last day (2576 days later) »