« first day (1782 days earlier)      last day (3169 days later) » 

12:00 AM
hmm .. never mind
my question actually was retarded: that config option is not restricted to location-only scope
 
would a function like seek($array, $index) require RFC? sometimes I avoid using the internal pointer of an array just because there is no way to jump to a given index.
 
12:23 AM
@PeeHaa in the ./files directory it has my source files there with .txt extension and .html files named after my files. But opening them shows only the file comment header block info for the file and nothing else in addition to that screenshot.
 
12:38 AM
while on the topic
does anyone know of a json to nginx config generator?
something that handles CSP well instead of just a long string i could use arrays of sites
or should i just write a quick php script to do it?
 
oh that is cool
thanks
moving it out of nginx config is going to a such a relief
 
@crypticツ Did you correctly setup the config file?
 
@PeeHaa I need a config file?
 
good morning everyone
 
12:50 AM
o/
 
@crypticツ I think you do
Not 100% sure though
 
@marcio (sneak it in!!!) … no… well… I'd like that function too. being O(1) etc.
 
hmmm looks like you don't need it
 
not sure about the RFC part though.
 
12:53 AM
Looks like you just should drop your fancy namespaces and use underscores like a real woman :P
 
@PeeHaa yep, same issue!
but all the cool people use namespaces
 
Probably just a faulty release or something
@crypticツ :-)
Nice to see they are bumping the required version though
 
Guys
PeeHaa
can you check out my social network
The one you thought was Vaporware
 
What's the link?
 
Make up a password, its not as secure but it works
 
12:58 AM
@LGL it's not better, it sucks. Use bindValue() :P
 
@PeeHaa I just want your opnion
on it
As a user
And stuff
 
// does this work? is it acceptable to do this?
"require": {
    "php": ">=5.5",
    ...
},
"require-dev": {
    "php": ">=5.6",
    ...
},
 
I don't think that is possible. It looks odd at the very least
 
@crypticツ ~5.6|~7.0
and no, if you don't test it with 5.5, it makes little sense to say that it supports 5.5 :P
 
@Ocramius what does that do?
 
1:02 AM
Mornings
 
Morring @AnmolRaghuvanshi
 
That means anything above PHP 5.6 and below 6.0, or anything above PHP 7.0 and below 8.0
 
>=5.6 is fine…
 
1:03 AM
It really isn't. You are going to have packages (in ages) that just install ancient stuff that nobody should be using
In general, any constraint that isn't upper-bound is problematic
 
@Ocramius sure. And some of the ancient stuff might still work, just have no maintainer.
 
@Matthcw It's missing CSRF protection
 
@bwoebi no, because you may have removed a function in 8.0
 
@Ocramius sure; then it doesn't work anymore…
 
Oh crap, how could you CSFR my site?
What example, newbie here
Just looking for a simple example
 
1:05 AM
And that's exactly what version constraints prevent, @bwoebi? Or did you miss the point of version constraining?
 
@Ocramius some minor API change might happen in 7.1 too…
 
@bwoebi yes, but semver compliant
 
Because PHP isn't semver.
 
@Matthcw Simple example is that I have a form on my website which actually does a post to your website to delete for example a message
 
it's actually supposed to be since ages, tbh. Should I ask the RM to bring it up then?
 
1:06 AM
It does something similar, but allows for minor exceptions.
no.
 
note that I don't expect full compliance, fuckups are human
 
Oh yeah!!!!!!!!!!!!!!!!!!
Damn how did you even know that????????
 
just like when a new keyword appears. @Ocramius
 
How did you know it lacked CSFR protection
 
these are intentional minor breaks.
 
1:07 AM
@Matthcw I looked at the requests being send
 
Yeah, I think it's safe to assume those, but still, a major version unbound is a bit more troublesome :P
So don't just use >=, kthxbai
 
Damn, I clearly have much much much much much more to learn
 
@Ocramius PHP is relatively stable… the beaks in majors even are smallish. I totally agree about still rapidly changing APIs… but PHP? no.
 
@Matthcw The owasp is a decent resource to learn owasp.org/index.php/…
 
@bwoebi so in 5 years when (presumably) PHP 8 or something comes out and there is a BC break you are installing old packages because of unbound requirements and the SAT solver simply picking them
that's why you don't put unbound constraints, even against PHP
 
1:09 AM
I just don't want to be annoyed when PHP 8 comes, everything's still working, just no maintainer there.
 
@bwoebi it's better to have an abandoned package that can be forked than random installs of stuff that should never be installed. I even had security issues because of that
 
How are you sanitzing user input @Matthcw?
 
(was installing old unsupported version due to conflict resolution)
 
I am using htmlespecialchars and using javascript regex
and using MySQL prepared statements
 
I have no problem with being paranoid, but that's exaggerating… just use >= …
 
1:12 AM
But wow, never even THOUGHT of CSRF, thats literally new to me
 
@bwoebi nah, that's just normal stability. You can always use "provides": {"php": "5.6.99"} if you really have issues, but don't pick stupid decisions because of laziness
it's gonna hurt consumers of your libs
 
Anyway, I'm always annoyed by these constraints … using my system php binary… constraint not matching… :s … needing to run via the 7.0 binary… fine.
Also… imagine, package installed with 5.x… constraint ~5.4 …
 
Well, they're meant to be "constaints". If you don't use them, what good are they for?
 
you run with 7.0… boom.
 
@bwoebi you should run with the same stuff as in your composer.lock =_=
 
1:15 AM
no, I mean, you installed, and upgraded your php binary later
 
I already had people running composer update on 5.5 and then running prod with 5.3
 
yes, these things.
It just doesn't work.
 
That's why you don't run with different binaries and don't composer update outside a prod-alike env :P
 
hah :-P:-P:-P
 
I'm not sure how that's related with having proper constraints btw
 
1:16 AM
@Matthcw the fact that are stripping characters of posts is rather annoying
 
Yeah that's true, I didn't know any better ways of preventing the client side version of the javascriipt injection
 
@Ocramius I have no problem with proper constraints… Just stop using a closed interval php constraint… Just php.
 
It even annoys me lol
 
@Matthcw Properly build HTML using the DOM.
I assume you are using innerHTML?
 
@bwoebi all your intervals should be upper-closed anyway
 
1:17 AM
using jqeury.html()
 
Yeah that's the same thing
I assume if you use .text() you should be safe against xss. But you might want to check that statement
 
@Ocramius anyway, I'm just going to use ^7 and be fine.
 
One guy said, to use the browsers builtin html entities feature, by creating an element dynamically, appending text to it, taking that text and then spitting it out again
100% guarantee
 
@bwoebi you are aware that that means <8, right? :P
dammit, should not have told that :X
 
ehm… no?
 
1:20 AM
@Matthcw yeah that is what I suggested just now :)
 
keep on using it
 
Ohhh
 
woops, it does
 
Yeah so i shall do just that, I did it for the chat so I will do it for posts
 
was confused
no, then obviously not :-P
 
1:23 AM
Meh, you would have done the right thing out of ignorance
 
> Making request failed: Cannot communicate securely with peer: no common encryption algorithm(s).
 
now you're gonna do the wrong thing out of knowledge
:P
 
That ^ scares me though, but that may be because cloudflare does something wonky @Matthcw
 
@Ocramius TBH, I never set a php constraint at all.
 
@bwoebi that... sounds super broken now :P
/me adds note to not depend on @bwoebi's php userland libs for production environments
 
1:25 AM
Ohhh, these complex server issues are beyond me right now
But i am working to learn it all
 
@Ocramius ha! :-P
 
but I did take your advice on the character stripping, thanks
chnage dit
 
	"require": {
		"amphp/amp": "^1",
		"amphp/socket": "~0.8"
	},
That's how it looks like … @Ocramius
 
Also pro tip @Matthcw: if you want more possible eyes on the project you should considering making the code public
 
it anyway has an implicit constraint dependency on amp… which requires >=5.5
 
1:28 AM
@bwoebi implicit is not desirable. If you use any symbol imported from an extension or from any lib or specific php version, that should be in your requirements
For example depending on Closure::call() or using yield
or the splat
 
@Ocramius I think my code would be even 5.4 compatible ^^
 
@PeeHaa, the public wouldn't want to see this code
 
:)
 
@bwoebi you can mark it as 5.4 compatible then
 
Lmfao
But Yeah I was going to release it tto guys who want to learn stuff like this for free anyway, when its done though
 
1:29 AM
@Ocramius no, I can't. Because amp doesn't and so I can't test for 5.4.
 
By done, I mean after a couple more tweaks
 
@bwoebi indeed, so you "support" 5.5, not 5.4
the code imports only symbols from 5.4, but it won't be installable on it
 
@bwoebi thanks
 
@bwoebi do you know whether rc2 is still to be released tomorrow and if yes is your fatal error in eval code phpdbg fix also in it?
 
@Ocramius yes, I support. Everything else is just a suggestion to not use, it's untested. I don't want to prohibit.
 
1:31 AM
FWIW, I'm currently writing logic to match version ranges, that's why I'm so into it =_=
 
@PeeHaa yes, the fix should be in.
 
\o/
 
At least everything done before Tuesday is usually in.
 
kk
 
@bwoebi well, as a maintainer, you should
since anyone is able to clone your code anyway, they can simply fork and do whatever they want if they want to hurt themselves
but you should prohibit stuff overall
 
1:33 AM
Anyway I am going to bail. Night all o/
 
@Ocramius It'd severly annoy me to have to do that.
 
It's better to be at fault for having a too restrictive API than getting reports from people doing things that you can only sigh at
 
TBH, with PHP, you should always only put the boundary on minors to be pedantic… as in PHP there are often small breaks in minors.
@Ocramius you'll get these reports either way, lol.
 
Yes, we have kinda high hopes for the language to be less effed up in future, given that there are so many people watching breakages
you will get them, but you will not get the ones that lead you to punching the monitor
 
1:36 AM
@Ocramius but gifs of this are just too funny
 
@Ocramius I'm not having these hopes that there would be less breaks.
 
user5236938
I have another question about a question I made but don't want to open up a new question for it. I marked it as answered though. For some reason the echo's do not work. Sort of like the if statement is never taking place. BUT I know the fsock is working because if the server is offline it throws a warning. stackoverflow.com/questions/32342909/…
 
bah, so many tests for this stuff >.<
    public function rangesForComparisonProvider()
    {
        $entries = [
            ['>1,<2', '>1,<2', true, true],
            ['>1,<2', '>1.1,<2', true, false],
            ['>1,<2', '>3,<4', false, false],
            ['>1.1,<2.1', '>1.2,<2', true, false],
            ['>100,<200', '>1.0.0,<2.0.0', false, false],
            ['>1.10,<2', '>1.100,<2', true, false],
            ['>1,<2.10', '>1,<2.100', false, true],
            ['>1.0,<2', '>1,<2', true, true],
            ['>1,<2.0', '>1,<2', true, true],
 
You could probably steal some tests from composer
 
Possibly, I just don't want to dig into the SAT solver tests
 
1:52 AM
∀ x ∈ in above code??what does it do
 
yeah i was curious about that too
 
@Ocramius you have an extra element in the entries array, the last boolean is not used
 
@AnmolRaghuvanshi it's just fancy text…
 
nevermind
 
@ircmaxell mainly for checking inclusion bidirectionality
 
1:54 AM
@AnmolRaghuvanshi ∀ x ∈ shorthand for "For all X there exists"
@Ocramius nevermind, I missed the array_combine
 
ya,i took that in mathematical way
 
@AnmolRaghuvanshi I was just trying to make the data provider not fail with an incomprehensible message
 
my god, composer install on a slow internet connection is painful
 
Anonymous
yeah, my daily life ^
 
Anonymous
I wish there was an archive version to just do one-click download directly from the web
 
2:02 AM
Good morning
 
@Ocramius got it
 
@samayo I have thought about setting that up before
just a quick cli app that uploads a composer.json and returns a zip with the vendor dir
 
user5236938
can anyone answer it or do i have to open up a new question?
 
user5236938
it's like it's not even recognizing the echo. if i just type random jibberish it creates and error, so the if statement is working. I just don't understand why echo/print won't work.
 
looks like i would be best to open a new question
 
LGL
2:11 AM
@Ocramius I ended up using BindParam()
 
hmm
 
LGL
Lol
 
I hate to say that I don't know if this code is safe:
    foreach ($constraints as $constraint) {
        foreach ($constraints as $key => $comparedConstraint) {
            if (($constraint !== $comparedConstraint) && $constraint->contains($comparedConstraint)) {
                unset($constraints[$key]);
            }
        }
    }
unsetting elements in a foreach =_=
 
LGL
Kill it
 
not usually
 
2:12 AM
@Ocramius safe in 7, not sure anymore about 5.
 
tail recursion ofc doesn't work, so a recursive approach is no good anyway
thinking of using goto to exit the loop and restart it...
 
LGL
Kill it now
 
simulating (kinda) tail recursion
 
i did something similar but i had while array_shift and then added the ones i wanted to keep to a new array
 
@Ocramius but should be safe in 5 though. foreach always stores the next element when iterating (in 5)… so you should be safe to remove the current one.
 
2:14 AM
two loops interacting with the same data
    /**
     * @param VersionConstraint[] $constraints
     *
     * @return VersionConstraint[]
     */
    private function deDuplicateConstraints(array $constraints)
    {
        restart:

        foreach ($constraints as $constraint) {
            foreach ($constraints as $key => $comparedConstraint) {
                if (($constraint !== $comparedConstraint) && $constraint->contains($comparedConstraint)) {
                    unset($constraints[$key]);

                    goto restart;
                }
 
@Ocramius woops… I see… then probably not safe in 5.
@Ocramius I hence suggest removing the parent
 
also possible, but still a mess. I'd have to restart the loop to scan for changes
 
foreach ($constraints as $key => $constraint) {
    foreach ($constraints as $comparedConstraint) {
        if (($constraint !== $comparedConstraint) && $constraint->contains($comparedConstraint)) {
            unset($constraints[$key]);
            break;
        }
    }
}
should be safe then.
 
whereas this solution keeps running until elements are being removed, in theory
(without going over the allowed stack frames)
 
Anonymous
@ThomasAlbrighton go for it. It may be a fun pet project
 
2:19 AM
php -r '$a = [1, 2, 3, 4]; foreach ($a as &$b) { if ($b == 2) unset($a[1], $a[2]); reset($a); var_dump($b); }'
int(1)
int(2)
int(1)
int(4)
@Ocramius so, yeah… it's still safe… as IAP is used as backup
 
Hmm
ok, will give it a try
 
and note that it's only unsafe in case you iterate a) by ref, b) unset and c) modify IAP during loop
so, that's quite some conditions ;-)
 
@samayo only problem is when you get dependencies based on php version
and extensions
 
Anonymous
ah, right .. in that case, it's no fun
 
good morning
 
2:25 AM
morning
 
@bwoebi the goto version works fine, tbh, trying removing it
hmmmmm no, not the expected result
will keep the goto for now then
 
although from memory there is a way to tell composer to ignore php version and extensions when installing, I'll just have to read the docs again to find it
 
2:49 AM
so it just makes it's composer.json have a bunch or rules that say !1.0 etc?
if 1.0 has a known security issue in that FriendsOfPHP/security-advisories repo
 
Cool a retired neurosurgeon is running against Trump in the Republican Primaries.
 
god help you all if Trump is even close to winning
having said that, us in Australia are already f*** over by our politicians
 
elections in USA??
 
He's the surgeon that made viable the surgery my daughter had last year.
@AnmolRaghuvanshi yeah
 
3:09 AM
@ThomasAlbrighton I'm not happy with either of the forerunners in our election...
@ircmaxell Good name for the project
 
@Orangepill why do you say that?
 
Short, easy to remember and relevant.
 
:-) Greek for Cross
 
and sounds cool
my go to naming convention for like everything is greek mythology... servers, projects..
 
for servers, I use either moon names or characters from a show
for example, my personal servers all used to be futurama characters
bender. fry. amy. etc
for work, moons of Jupiter were windows servers, Saturn were *nix servers, Neptune was virtual box masters
 
3:22 AM
my last company the contract that I worked on all of the servers where named after moons of jupiter.
main sun os box was ganymede and we had io, europa and callisto
 
man, my hair is crazy
 
can someone help me have more reputation?
 
@ircmaxell how did the talk go?
that already happened right.... timezones are hard
 
please vote up thanks
 
@Orangepill well, people seemed to enjoy it
@Micaela please don't ask people to upvote
 
3:26 AM
oh sorry
 
2 messages moved to bin
 
@ircmaxell thats pretty cool, i never used names for my servers :D
 
yeah, I've seen colors used, car models, etc
 
Company we merged with had characters from the garfield comic strip.
 
i used everytime simple id's ^^
like root@vps48031
 
3:29 AM
root@ o_O
 
:D
or i use the default name
root@bananapi:~#
 
I try to name the server's related to there intended function... like athena for DB server.... vulcan was our app server that drove most of our production equiment.
 
a friend name his server with mario characters
like toad.de.sever
or peach.fr.server
 
moin
 
morning
 
3:33 AM
i go sleep, bye
 
@kelunik morning
 
@PeeHaa you're making me want to make a human-powered PHP interpreter service
it'd be interesting if only for the diffs
 
You would have to have the interpreter drink a lot to get compatible results :)
2
 
3:53 AM
I had this idea for a very high level programming language where you declaratively specify your specs in a English like language and the compiler would break it apart into questions that would be asked on Stack Exchange and then after a predetermined period of time take the code posted as the top answers and stitch them together into working code.
4
But looking at a lot of the questions on SO I think that someone beat me to it.
 
4:14 AM
I just wrote a blog post about how URL shorteners can hide XSS vulnerabilities and be used as an attack platform: http://bit.ly/gw4healj4tnk
3
 
lol nice with the short url
please post stats with reach vs number of clicks later
 
@ircmaxell it got me :)
 
@ircmaxell Got me too, wondered why I had to retype my Google password, because I opened that blog post in the background. :-)
 
:-)
 
4:32 AM
@ircmaxell Now that you're gone, Google even changes its logo. ;-)
 
did you hear my interview on VoicesOfTheElephpant today?
 
Today? Not yet, just awake since about an hour.
Actually, I reported exactly that vulnerability to Gitter, but I didn't know all the others had that issue too, may be too obvious.
 
most don't CSRF protect logout
 
@bwoebi so maybe just a pull request targeting 7.1?
 
@ircmaxell Both, login and logout, but it's the most obvious state change that can be there.
 
4:38 AM
well, login requires credentials, so no CSRF protection there needed
 
Most people think that.. and then there's thing called OAuth ;-)
 
which requires the account already to be granted
 
@ircmaxell you got me too :)
 
Sure, there are some prerequisites, but often enough it still works and implementations are just insecure, all they would have to do is checking the state parameter. But there's one more issue, if you have your login as /auth/github for example and redirect that to GitHub's auth URL, the state parameter isn't ever in a link the user clicks, so it's basically useless.
At least as long as the redirect isn't protected as well.
 
Damn it
 
4:45 AM
?
 
@Sherif who/what are we damning
 
Myself mostly
 
moin
 
@JoeWatkins morning
 
Morning
 
4:47 AM
o/
 
And I just realized it's actually morning
Time to get stop coding
 
lol nice
 
I'm making more stupid mistakes per second than is tenable at this hour
You know you screwed up bad when you start overwriting your local history to hide your stupidity before you push to production.
 
that's pretty efficient if you ask me... I have to measure my mistakes per minute
“A computer lets you make more mistakes faster than any other invention with the possible exceptions of handguns and Tequila.” ― Mitch Ratcliffe
 
@Orangepill s/handguns/automatic weapons
 
4:54 AM
@ircmaxell true... so programming with Tequila and an AK-47 on hand is probably not a good idea.
 
Hey, I think that's how we got CF
 
CF = ColdFusion?
 
CF = Cluster F#@#*$ed?
 
yessir
Same thing
 
technically they are not mutually exclusive
 
4:57 AM
@MadaraUchiha Happy birthday!
2
 
@ircmaxell BTW, I wanted to get your opinion on a talk I'm working on. It's highly controversial, but a refreshing perspective on an old topic. Was hoping I could grab your ear for a few minutes when you have time.
 
what topic?
 
obligatory link xkcd.com/323
 
@ircmaxell The topic is about developer communities, but I have a very controversial take on a specific aspect of developer communities that I think has been overlooked or perhaps misunderstood.
 
sure, I am available to talk
though not for much longer today, about to go to a UG meeting
 
5:03 AM
@ircmaxell When do you get back? I could come meet you down town sometime next week if you'd like.
 
two weeks
and fair warning, I'm going to be talking about community in my PHPWorld keynote, so I may steal ideas :-P
 
Alright, that works. This is one of those things I can't explain well in chat :)
aww
There goes my one original idea :/
@ircmaxell I should really go that PHPWorld one. When is it?
 
mid November in DC
 
ahh
@ircmaxell Are you going to be back around the 15/16?
*th
 
yes
 
5:09 AM
I have yet to go to a UG meeting
 
Cool. I'll stop by the office and hopefully we can talk about it. I'm not sure if this is a really bad idea or a really really good one.
I need the perspective of someone that's not me :)
 
:-)
 
well ... I've never had to clean peanut butter out of my beard before ... I fell asleep on the sofa, eating a sandwhich last night ... I must try harder to get to bed ...
5
 
@sherif good article on A*
 
LOL
 
5:16 AM
:)
 
@Orangepill Thanks. I'm trying to write a series of articles centered around data structures and algorithms that people who were me 5 years ago could actually understand and learn from more quickly than just reading a data structures/algorithms book that's highly technical. But finding it very hard to do so well :/
But the good news is I'm learning a lot about how people who haven't programmed before like to learn.
 
@Sherif I've never implemented it but I remember reading about it in Code Complete and it coming across as much more difficult then your article.
@JoeWatkins next time bring the sandwich to bed with you :)
 
@Orangepill Cool, I've gotten a lot of similar feedback. I have one on Bloom Filters that I haven't put up on the site yet. Would love to get your opinion that when I publish it.
 
@Sherif Would love to read it...
@Joewatkins Or this might be an option
 
5:29 AM
I would double down and use that and bring the sandwich to bed.... the misses will appreciate your ingenuity and problem solving skills.
 
5:44 AM
Hello
Need Help
 
Hey guys, What do you have in your programming playlist?
 
@AK_56 your query is with different account ?
 
6:11 AM
No its just that my team mate has posted it
 
Good morning
 
morning
 
6:50 AM
moin
 

« first day (1782 days earlier)      last day (3169 days later) »