« first day (2190 days earlier)      last day (2774 days later) » 

Anonymous
8:00 PM
kk. on mobile, so can't actually help with the query - sorry :p
 
np
 
trying to contribute to PHP open source projects. I have been developing in PHP for just over a year, Any suggestions? I have looked at Github but there is a lot of choices and I am afraid I'm too green for these projects
 
I'm almost positive I have my definition incorrect, because I'm referring to the path, which very little is going to be passed through...
@GK123512648 you could always post on reddit.com/r/learnprogramming.
 
@Tiffany no, programming in brainfuck turns the person in an annoying twat
 
The user comes to the application through index.html.php, which should create the session and the object. So I should have a function somewhere that starts the session and creates the object, before I include _form.html.php...
thinking out loud
 
8:14 PM
@PeeHaa @DaveRandom God, I really wondered why it didn't work, even though I registered the namespace. But domdocument_load_html uses loadHTML instead of loadXML. But why do we have that then: github.com/Room-11/DOMUtils/blob/master/src/…?
 
PHP.net: A or B (Ignore the header differences)
 
@LeviMorrison Both are fine, but the header ... that blue is strange and the black logo while the menu text is white.
 
Yeah, but I can't change the logo by goofing around in the browser ^_^
I'd need a new image.
@bwoebi Thoughts on => for by value and &> for by reference?
Basically if we let people choose would that be more likeable?
I think &> is ugly. Any other ideas on accomplishing the same thing?
 
pull the sheets right off the corner of the mattress that you stole from your roommate back in Boulder...
 
user6302426
apache2 doesn't execute any php files, it just gives me a white screen, any idea's why? :/
 
8:25 PM
@LeviMorrison Do we really need by reference support?
@Florian Have a look at the error log.
 
I think we need shorter closures and if letting people choose means it will pass then I'd be happy to allow it.
I haven't gone to the ML with it yet because I really want this RFC to pass for 7.2, so I'm trying to flesh out ideas, gauge interest and opposition, etc.
 
user6302426
fixed it, seems like it hasn't installed correctly
 
@LeviMorrison nooooo
 
No because &> is ugly or because of the idea to let them choose or both?
 
@LeviMorrison I think this is one of the cases where implementing both variants won't satisfy both parties, but rather antagonize both ^^
 
8:29 PM
Presently => is winning but it's honestly a really close race with ==>.
This does not excite me :/
 
@LeviMorrison maybe it's the syntax as well ... after all I don't have a problem with this in c++
but meh
I don't think proposing &> in addition will win any support here
@LeviMorrison A with the header of B
 
Yeah, unfortunately I didn't take a screenshot of A with B's header but B's header is obviously a lot tidier ^_^
@NikiC Can [] lead an expression?
Yes it can. Duh.
 
@LeviMorrison yes
 
Yeah, silly lapse right there ^_^
I'm about to type something odd; don't judge me:
|&|() =x> $x++
|=|($x) => $x + $y
Yeah... probably not.
Very symbol soup-like.
 
I forget, what was our problem with rust style |$a, $b| $a + $b?
 
8:38 PM
I don't think we have any issues with it.
 
(or with => between, if we like)
after all, this should resolve all ambiguities and parsing difficulties, unless I'm missing something
 
array_map(|$obj| $obj->method, $data)
array_map(|$obj| => $obj->method, $data)

array_map($obj => $obj->method, $data)
array_map($obj ==> $obj->method, $data)
 
So it's just a matter of the notation being unusual for php?
array_map(|$obj| => $obj->method, $data) maybe as well
 
@LeviMorrison I realise that people suggesting syntax alternatives is annoying, however I think arrow functions 'less unusual' to me, when they have braces $x => { $x + 2 }
 
If we include {} always then you must also write return
 
8:42 PM
@LeviMorrison The syntax is less intuitive, but then again it's fairly common for closures in other languages
 
@LeviMorrison whys that?
 
@Danack Well... I guess that depends on one thing: do you allow statements or expressions?
If it's always only a single expression then it'd be doable but prevent multi-statement bodies from happening.
 
@Danack because you otherwise preclude multiple statement closures.
Even if we don't include them initially, we should definitely keep that option open
 
@LeviMorrison For now, jut allow one statement. If I recall the previous RFC, it was the last statement was assumed to be the return statement? Though I may be misrembering.
 
No, that wasn't last RFC; that's how it is done in a few other languages though.
 
8:44 PM
@LeviMorrison What's the issue with $>?
 
@kelunik Nikita doesn't like it.
(I don't think very many people would either)
 
Obligatory PHP doesn't need to duplicate other languages PHP should use the same syntax as other languages (pick whichever backs up the choice people have chosen by instinct)
 
@Danack Let's switch to . instead of -> in 8.0. :P
 
@NikiC Did you mean || is common or that closures differ from other kinds of function definitions or..? Didn't quite follow that one.
 
\o/
 
8:46 PM
Honestly if I was designing a high level language from scratch Id' use . for property access and ++ for concat and remove pre and post increment/decrement.
 
@LeviMorrison I'm saying that personally || is not my first choice, but it's commonly used for closures in other languages, so I don't really have a problem with it either
 
@NikiC Rust, I believe Ruby has something similar... who else?
 
@DaveRandom Why does xpath_get_element throw exceptions instead of just returning null? With @NikiC's awesome ?? it's easy to have default values in code like xpath_get_element($xpath, "namespace:URL", $context)->nodeValue ?? null.
 
@LeviMorrison those were the ones I had in mind, dunno what else uses it
@kelunik Not mine
 
mon to the ring
 
8:52 PM
@NikiC Well, @Andrea and you. At least the RFC says: "Contributor: Nikita Popov nikic@php.net (initial patch)".
 
Anonymous
moin pie eater
 
@Danack Also let everything be linenumber based \o/
 
?
 
@JayIsTooCommon Oh wow. Original and everything
 
Anonymous
that's me, cool af
 
8:54 PM
@Danack I thought we were adding stuff to php from other languages
That and I'm a bit drunk and full of food
 
Just picking arbitrary arguments that justify whatever people believe instantly after reading a new idea.
 
ugh now I have to read all the way back up
 
@Danack Do you understand the issue with {} now?
 
@LeviMorrison Yes, though I think I still like it. Restrict to single expressions now, and leave the possibility of multiple expressions later, with the last expression defaulting to return.
 
@Danack I just don't think implicit returns will go over well with Internals. What do you think @bwoebi and @NikiC?
 
8:58 PM
Though i'm not going to campaign hard for that, or allow it to change my vote.
@LeviMorrison I wouldn't even discuss it as part of the RFC....yeah people would probably instinctively be against it.
 
@LeviMorrison no way
you don't introduce implicit returns after the fact
you either design your language around "everything is an expression" or you don't
 
@LeviMorrison I like B better.
 
@NikiC Did PHP do that?
 
@Danack it didn't
 
Wes
9:19 PM
@LeviMorrison smaller is better imo
 
@Wes depends on the subject matter
 
Wes
that's what she didn't say
seriously @LeviMorrison i don't like the big container, i prefer the boxes
reads much easier (this belongs to that) as contents are visually grouped
 
I agree, @Wes
It looks cleaner with it all grouped together
 
Wes
@kelunik it's purple!!! not blue!! #pissoffpeople
 
them's fightin words
 
9:30 PM
@Wes It's not really purple. The current one is purple, that's more a purple / blue mix.
 
Wes
:P
 
I need a vacation.
I have 99 hours accrued.
Take one down, pass it around...
 
Wes
fucking js...
for(
    var a,
    var i = 0;
    i < 5;
    i++
){}
what a terrible language
 
@Wes Have a second for loop afterwards and get a linter warning because redeclaration of variable i...
 
Wes
do people care about that?
 
9:46 PM
@Wes What's wrong with that? Other than the new lines?
 
Wes
@Danack implicit ; when you newline
so fucking stupid
 
oh right.
 
Wes
@Tiffany never gets old
 
If I need a laugh, no matter how many times I've watched, always laugh.
 
9:51 PM
@Tiffany :(
 
@littlepootis ?
 
That is pretty well-defined behavior.
 
[] + [] = empty string?
 
[] + {} and {} + [] equal different things?
 
9:53 PM
Yep. The {} in the second expression is a block, not an empty object.
Surround the {} in () and see for yourself
 
@LeviMorrison Is this return by ref? uh, I'd expect ret by ref to be the first sigil of the whole expression; consistent with functions
 
Adding two arrays works because it calls the .toString() method on them.
 
@bwoebi No, I meant how to close over variables.
 
oh, mhm
 
["hello "] + ["world"] === "hello world"
 
9:56 PM
@LeviMorrison dunno, that's quite subtle
 
The &> seems quite jarring to me ^_^
 
:-D
 
Definitely not subtle :D
Anyway, I think I'm back to square one. Or maybe two.
 
@LeviMorrison as the standalone token, no
in a whole expression, more likely to be subtle
 
$reactor->every(100, () &> $x++);
 
9:58 PM
@littlepootis but that isn't obvious behavior... why would .toString() be called on []?
 
It's still pretty jarring.
 
@Tiffany spec says so
 
it doesn't make sense!
 
@LeviMorrison A.
 
but, I am in a php channel... so....
 
9:59 PM
When JS expects a string, it converts the operand/argument into a string by calling the .toString() method.
That is also the reason why this code:
21 + { toString() { return 21; } } === 42
Is true.
 
weeps
well, time to go home and....watch paint dry, or watch something netflix, since my desktop is dead. :(
It's depressing when I'd rather stay in my office than go home because of access to a working desktop
g'night
 
night
 
Wes
\o we are all addicted crazies
 
@Tiffany read some books, do some exercise or just do lots of cooking and eating?
 
10:21 PM
o/
 
@Danack How will she look up good recipes?
:D
 
@LeviMorrison phone her parents and talk to them about family recipes.
 
Ugh, no thanks. My family recipe for meatloaf is awful.
 
....then invent a new and better one.
 
Wes
do you know of any markup language still used today apart from html that needs the <!DOCTYPE> declaration?
 
10:35 PM
@Wes Not need, but MMS can have a doctype declaration.
SMIL 2.1
 
Wes
mms == smil ?
 
You don't want to touch it...
 
Wes
are mms still a thing? :B
 
It's never really been a thing
 
Wes
actually for me they never been a thing
jinx
 
10:38 PM
ugh typing is too hard
 
They may have been bigger in the UK than Europe.
 
Wes
people couldn't figure out how to configure them on their phones - this is what i remember
 
2 days ago, by PeeHaa
lol backwards country ftw
 
Wes
then smartphones happened and everybody forgot about mms
 
@Wes oh nice mms \o/ 2 months later: wow that's expensive. wow we have proper internet now
"proper" internet
mobile IE kinda sucked even more than normak IE
 
Wes
10:41 PM
no actually smartphones happened several years later, in that time nobody could figure out how to use mms
 
hehe
 
Wes
first decent internet i tried was on a blackberry
way before apple
 
I had a WP
 
@Wes yeah....the UK operators spent a lot of money implementing the tech, and made sure to sell handsets already configured to send them.
 
Wes
i think it used khtml already
 
10:42 PM
btw SVG also.
 
Wes
not necessary there i think
yeah, xml ns is sufficient
 
@Wes Fuck mms I have kinda internet brighthand.com/assets/4819.jpg
 
Wes
those were the days
 
:P
 
@Wes that.....took longer than 1 day. There was a period of time where.......smart phones weren't so smart: sidetalking.com/page-5.html
3
 
Wes
10:46 PM
hardware keyboards, so that you can actually use the 500$ you wasted
ahaha
 
I still miss that keyboard. Or rather of the version after that
 
Wes
i could write sms at incredible speed, without mistakes and without T9, now... can't even fucking type in a url in the browser
i just visit sites i've already visited that are in the history :B
 
Best one
 
Wes
obligatory
user image
5
 
hehehe
 
10:53 PM
and there be tablets
#faplets
sup phpeople
 
Wes
why would one disable automagic transcription of youtube videos on purpose? even if it's not perfect, it helps
hey felix
 
sup felix
 
supshto
today I ahd a very sad realization
I am just another asshole who will say bad things about the code these damn interns produced and I have to fucking maintain and improve it
@tereško I can't even listen to it
 
Anonymous
!!uptime
 
@JayIsTooCommon I have been running for 5 days, 2 hours, 10 minutes and 59 seconds, since 2016-10-09 20:48:08
 
11:03 PM
"Please abide by the rules of this space" yeah like never say something different? dumbass cc/ Teresko's vid
 
A minute into that and I.. just.. can't.
 
^
take pauses, drink a bit more
 
0
Q: Like a photo on Instagram with PHP

Matthew BergwallI am creating a social media bot to automate process on Instagram. I already have the logging in to my account with cURL and PHP, but now I need to like a certain photo with cURL and PHP. Here is my current code to do so: <?php $useragent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KH...

If someone can help me...
 
11:23 PM
@MatthewBergwall are you using the API: instagram.com/developer ?
 
curl_setopt($ch, CURLOPT_POST, false);
Is that correct for doing a post request?
 
you guys may not be into hockey, but history was written wednesday night imgur.com/gallery/6S8H2GV
 
!!tweet
 
Wes
@FélixGagnon-Grenier that's nice i give you that
incredible skills
 
@Wes yeah... guy scored four goals in his first nhl game, at 19. nobody ever done that.
not wayne gretsky
 
11:38 PM
I did that
 
I believe that was @Jimbo's mother you scored in.
doesn't count
 
lol
 
Wes
lol
 
what the actual fluck... all my nginx/conf.d is suddenly wiped
 
Bad time @Ekin, but I'm annoying like that cough chat.stackoverflow.com/transcript/message/33499919#33499919 cough :)
Also evening o/
 
11:43 PM
\o evening
heh
 
:P
 
at least that's an expression :D
and iirc DaveRandom does that too for regexes I mean
 
New rule: find out what @DaveRandom does and do the exact opposite
 
hehe
 
11:46 PM
But surely he doesn't make it static though? :)
@Ekin Are they still there and just empty?
 
I'm not sure, maybe what I remember is the private static $expr
no file at all :(
all gone and I swear I did nothing
 
@Ekin Ah poor mans private "constants"
 
yeah :-)
 
I could see why somebody would do that. Although it's ugly as ugly. And luckily soon not needed anymore wiki.php.net/rfc/class_const_visibility
@Ekin that's... odd
Not even an update or whatever?
 
just restarted but I've been restarting it all the day without such wipe
 
11:51 PM
O.o
that sucks
 
I don't get it... I'm glad I had a gist of the site's conf
but I don't have the default.conf ugh
 
Need mine?
 
I guess it would do
default was just a basic 80 iirc
 
lemme see what I have
 
Hoi \o
 
11:53 PM
oh default is just the default site
Not even sure why I have that tbh :P
 
@Ekin That's super weird. Stupid question - are you sure you're looking on the right box?
 
    server {
        listen 80 default_server;

        server_name example.com;
        root /srv/www/www.pieterhordijk.com/public;
        access_log /var/log/nginx/default-access.log;
        error_log  /var/log/nginx/default-error.log error;

        location = /favicon.ico { log_not_found off; access_log off; }
        location = /robots.txt  { access_log off; log_not_found off; }
        location ~ /\.          { access_log off; log_not_found off; deny all; }
        location ~ ~$           { access_log off; log_not_found off; deny all; }
@Danack lol that's a useful question
 
I'm 100% sure
 
sanity++
@Archer yo
 
what happens when you try to restart nginx?
 
11:55 PM
nothing specific, restarts, and of course site is not accessible
no one else but me is in the server, that I checked as well
friggin annoying
@PeeHaa <3 thanks a lot
 
Sorry @Ekin I just realized I was looking at a different file than I thought regarding the static thing :P
 
oh alright :)
 

« first day (2190 days earlier)      last day (2774 days later) »