« first day (2024 days earlier)      last day (2906 days later) » 

1:02 PM
need help ^
why does the require fail???
 
@Saitama Try __DIR__."/../router/router.php";
 
@bwoebi lemme try dat
\o/ it works...
btw what the reason tho for mine one not working?
 
using __DIR__ is almost always a good idea.
 
@Danack i see...
 
As it prevents stuff from not working when you're running it from a different directory.
Or something calls chdir().
 
1:10 PM
ah, I got it... thnx!
 
1:44 PM
(English perspective) Is this correct? "All you need is a few senses of humor"
 
@Shafizadeh "All you need is a little sense of humor"
 
ah ok thx
 
Anonymous
@Saitama Are you watching EPL?
 
no, man utd is playing against some team, isnt it?
 
Anonymous
Leicester city.
 
Anonymous
1:53 PM
It LC wins, it takes the EPL trophy.
 
dafaq
 
Anonymous
It's half time right now. 1-1.
 
tbh, I want man utd to lose...
I hate man utd
 
Anonymous
Everyone does, I think even MU fans. I just saw them cheering up to LC :)
 
:D
 
Anonymous
1:59 PM
This feels good, it's Sunday, Easter and a good EPL match.
 
heh...
 
@Ocramius if nothing else, the fact that lots of Laravel people are in favour of a new feature has to be a massive 'smell' factor.
 
hehe
 
@Danack ha
 
similar for attributes :-D
 
2:05 PM
If you wish to see something like this in PHP... Well, pray for this RFC to get accepted https://wiki.php.net/rfc/pipe-operator https://t.co/a3dkND3uew
@themsaid @Ocramius It's not the pipe operator that makes that code easy to read, it's having it in correct order. https://t.co/OYeO0R9Iha
People are confusing "not writing shit code" with "the benefits of a pipe operator".
 
hue hue
 
'noon
 
@JoeWatkins '
 
Anyone can help me in php prepared statements?
 
2:19 PM
> Support group for those afflicted with PHP. Don't ask to ask, just ask.
 
@JoeWatkins moin
 
I would like to combine this code: gist.github.com/CharlesCraft50/22d56cf3640b78e6cbf68e3ca8772ac7 to this code: gist.github.com/CharlesCraft50/c6be67fd136388d7c15375a5cf2e0d9e , in one code and one SELECT Statements but different tables
 
@CharlesCraft50 so what's stopping you? aka what is your precise question?
 
yo bob, saitama
 
@JoeWatkins What are you working on today? :-)
 
2:22 PM
How can I combine them?
 
@JoeWatkins o/
 
well, we upgraded to 7.0.6 the other day and servers are still crashing, I've had to patch memcached in a really strange way, so I should be finding out what is going on there ...
and also looking at what it will take to make xhprof work with 7
someone has an unstable branch of xhprof
 
If I combine them, it gives me error: Commands out of sync; you can't run this command now
don't know how to fix it
 
I would recommend not combining them. Instead separate them out into their own functions, and then do:
i) Get data from first query.
ii) Get data from second query.
iii) Display both sets of data.
Combining retrieving data with displaying it makes it hard to use - as you're finding out.
 
@Danack not loving the pipe operator then ?
 
2:26 PM
@JoeWatkins the examples are terrible.
 
is there a good one ?
 
@JoeWatkins github.com/Yaoguais/phpng-xhprof this thing?
@JoeWatkins nope.
 
There could be....there could be a something where the intermediate variables don't have any real meaning.....like a complicated maths operation.
 
In which case naming them would be bad to attempt, as it's only the complete operation that is meaningful. But instead Laravel people are excited about how it's going to make writing shitty code easier.
 
2:28 PM
do you dislike it enough to vote no ?
 
@JoeWatkins yes
 
I think it's a pretty strange direction to go in ...
yeah I think I will also
 
@JoeWatkins yet another php 7 port :-D
 
yeah, I wonder why there is Chinese everywhere
 
@JoeWatkins I think I'd vote no - just because it takes up useful syntax......the talk Marco linked is interesting - youtube.com/watch?v=UvD1VjRvGIk&feature=youtu.be
 
2:29 PM
@Danack lol why shitty code?
 
@JoeWatkins the code isn't chinese ^^ … dunno about the readme, maybe google translate can help^^
 
Heh
 
@CharlesCraft50 no, I'm busy writing my own code, and learning how to do basic stuff is a useful thing for you to learn.
 
@bwoebi :D yeah I know
I think, I might just do it myself ...
 
2:31 PM
@Danack should I use JOIN in it?
 
@JoeWatkins I'm really unconvinced by the uses Facebook apparently use it for - en.reddit.com/r/PHP/comments/4h25sw/rfc_pipe_operator/d2n0ilm plus my reply.
 
I don't know enough about it to fix someones broken attempt
 
@JoeWatkins just check if existing forks are stable enough first ^^
 
6 mins ago, by Danack
I would recommend not combining them. Instead separate them out into their own functions, and then do:
i) Get data from first query.
ii) Get data from second query.
iii) Display both sets of data.
 
@bwoebi the one I was sent comes with a "don't use in production" warning :s
that's what I need it for ...
 
2:32 PM
@JoeWatkins look at the other then
 
/me stands up from the computer, to remember the important points about French revolution
lata
 
@bwoebi no mention of instability in the chinese translation, just that xdebug/phpdbg won't work
it's hard to tell if the translation can be trusted, but they mention it works "smoothly", I think ...
I think I'll give that one a shot on a staging server
 
just try it…
 
yeah
oh trying locally will be pointless, I can't simulate the kind of pressure a public facing server is under, a staging server can be setup to get a percentage of normal traffic ...
@Danack ha, rails is so magical that he can get away with using an example function that turns an apple into a banana ...
 
@JoeWatkins ehhh … with rails you could turn an apple into a brick wall…
 
2:45 PM
lol
actually I'm not sure if he's talking about rails, I just assume ...
yeah, he's not ... I should pay more attention :D
nothing is really convincing, when people say "it's obvious that the pipe operator improves readability", I just disagree with that, it changes the way you read it, but I fail to see why it's easier, or somehow better to read ...
it's just different ...
 
3:04 PM
Spent 2 hours wondering why rotation *= deltaRotation; gave insane results and rotation = deltaRotation * rotation; was OK. I was blaming C#... TIL multiplying quaternions is non-commutative
 
I know some of those words.
 
playing with Unity
 
Who here does null === $someVar instead of $someVar === null? I do it the latter and I can't understand people who do it the first way
I see it in a lot of the Symfony code and it just looks so weird to me
 
@tibanez I don't, but some like to use it as a "I've thought about this, and want to make it obvious to the reader that I'm doing this on purpose". See it mostly with things like false === strpos(...)
 
@tibanez Because some people are hipsters
 
3:08 PM
I guess there's also the "I'm terrible and don't want to accidentally perform an assignment when I type = instead of =="
 
@Leigh Yeah I see it like that too. Maybe if when I started learning I did it that way then the current way I do it would look completely weird and backwards to me. I just think the variable coming first reads better
 
Agreed
 
that shit happens when some asshole writes a blog post declaring it as best practice.. because if it's in a blog it's true
 
Every time I read an if statement like that after I read the first half I'm like what the hell is this person doing and then I realize. It just slows me down a bit as I skim through the code
 
@PaulCrovella amazed there's not a proposed.. standard.. recommendation .. cringe.. including it :p
@tibanez en.wikipedia.org/wiki/Yoda_conditions - see, no real advantage :)
 
3:15 PM
@Leigh You gotta be pretty good to mistype a === as = though
 
good == special ;)
 
we have to read shit twice because a legion of programmers have been convinced they need ritual to protect themselves from their own typing
 
hello
I dont know if this is the right place to ask this
On this webpage you have a video and I d like to obtain the link of the video itself
i.e. when you include an image in html it s something like <img src="xxxx"...>
for video s there is a source link as well
 
view source, it'll be in there somewhere
 
I would like to get the source link of this video: vier.be/theskyisthelimit/videos/aflevering-van-2-februari/…
@Leigh well I couldn t find it strangely enough!
usually finding the link is pretty straight forward
 
3:27 PM
alright, dev console, network tab, hit play
 
and then?
 
you'll have some kind of connection appear in your network tab?
 
idk I ve never used that tab. I know it exists but have no experience with it
 
Ok for me it looks like it might be http://vod.streamcloud.be/vier_vod_geo/mp4:_definst_/theskyisthelimit/s3/201602‌​02_afl1_the_sky_cracco_zingt.mp4/playlist.m3u8 but it also has some dutch pop up that I'm guessing says "the video is only for belgians"
 
3:30 PM
ok and how did you find that link?
 
I went to my network tab, and hit play on the video...
 
oh yes I see!
the issue is that
the links I obtain are from 10xec lengths of the total video
if you understand what I mean
the entire video is 40 min
if I click on the link it downloads the video (with a length of 10 sec)
every approx 2.5Mb loads
and then a new link is generated
@Leigh
 
3:45 PM
sure, that's how video's get buffered, in chunks, you may find that audio is even buffered independantly
 
hmmm and what if I want the video entirely
instead of chunks?
 
shrug
 
umm... guys?
I need some help...
 
4:03 PM
wut?
@RahulBasu
 
I have the following code:
<?=file_get_contents($_REQUEST['url'])?>
but I don't want it to go through if the url contains 'pass' or 'admin'
How do I ensure this?
(sorry, newbie here)
 
Whitelist, don't blacklist. Check to see if it's getting files that you want to expose to the public, don't try to filter out files that you don't want exposed.
 
4:29 PM
Umm... actually this is for a hacking challenge I'm designing for fellow students. I just need to prevent access to two folders.
 
!!doc substr
!doc substr
 
!!docs substr
 
[ substr() ] Return part of a string
 
Thanks.
 
<3 Jeeves likes me too
@Ghedipunk :P yw
 
4:41 PM
ok... thanks
 
(English perspective) Is this correct? "What you said compeletely makes no sense."
 
maybe... "What you said didn't make any sense at all."
 
Ah ok thx
 
Can someone please look at this : stackoverflow.com/questions/36968552/… ?
 
@RahulBasu and dont use $_REQUEST unless you understand how it is populated. use $_GET and $_POST instead
 
4:48 PM
@Subin Are you sure the command is runned in the background?
Are you using any asynchronous library?
 
@Saitama No, I'm sure as it is downloading a file
I mean Yes
I meant No to the second question
I'm actually making a library for Async Background Execution
 
Maybe the file to be downloaded is getting downloaded before executing the exec method?
 
No, download starts from the beginning
 
> Never reinvent the wheel
 
There is currently no wheel for it
 
4:51 PM
There are ample asynchronous library for PHP..
 
I'm making a library to support Windows and *nix systems
It's for running PHP scripts in background
I have already made it. It's just this bug that I found now
 
@Subin There are, this , this, etc.. etc...
 
@Saitama I did look at this, this, etc.. But none of them suited me
 
@Subin This is parallel processing, not async or non-blocking…
 
^ dat
 
4:56 PM
I don't want it to be parallel processing
Just let it run
and let it finish separately
 
Can someone explain to me how this works; preg_match("/\bweb\b/i", "PHP is the web scripting language of choice.")?
 
@Subin the child process holds the parent process alive … you say output buffering is on … why don't you just flush it?
 
@bwoebi I could do that. But why does the script not finish execution as exec() is doing a background process ?
@bwoebi Also, the connection won't be released between browser and the AJAX script
I want to do it in the non-blocking way
 
@Subin background process just means the process doesn't wait on result
but termination of the background process waits
 
Then what's the word for my need ?
Non Blocking Background Process ? :O
@bwoebi How can I not make it wait for the termination ?
 
5:04 PM
typically, disowned … but in your case … stackoverflow.com/a/141026/2153758
(I'm not sure how you'd disown under Windows, on unix you'd use pcntl_* funcs)
 
@bwoebi I had seen that page. I'm making a library, so is there a way to do it inside the library ?
Closing a connection would need changes in the script made by the user
 
ah
 
This is where it gets tricky :-(
 
For parallel processing and multi-threading you can use pthreads too...
 
@Saitama that's not going to help him…
 
5:10 PM
He was talking 'bout parallel processing...
so...
 
@Subin does your Windows solution work?
 
@Saitama Non Parallel Processing
 
so use supervisord to run multiple processes.....
 
@bwoebi Yes
 
In that case, for unix, you can just pcntl_fork()
and then dispatch the exec()
 
5:11 PM
@bwoebi Okay, I'm going to try that
 
@Saitama Oops
@Saitama I'll fix that
 
\o/
:)
 
@Saitama all he wants is dispatching a job in background to run independently of the process, ignoring its return values.
 
Ah... I see...
Umm... should I serve a draconian 404 page, or a sleek 'n nice one?
 
5:30 PM
@Andrea It was just the /r/php one taken to new heights :-)
@RonniSkansing Thanks, I have to be careful because I can't go over 7k until 1500 km (engine run-in)
 
@Jimbo Ah, I looked at the list of all stars and now I remember :D
 
Wes
evenings
 
5:49 PM
@Wes '
 
what you do with '
 
It's more lazy version of 'nin
 
:D
 
6:13 PM
hey I just had a silly idea
what if the Zend Engine deduplicated strings at runtime
 
Can I chroot for a thread, but not the parent process...? /cc @JoeWatkins
 
if two strings were compared for equality and they were the same, destroy the second
Maybe I should work on ELC again some day. Or work on that JS backend to PHP-Compiler.
Meh, I should probably fix bugs first :p
 
Wes
@Andrea doesn't php do that already?
 
@Wes in source code maybe
 
Wes
it's not a silly idea though
in fact, you could do the same with arrays, right?
 
6:44 PM
@Andrea could cause extra overhead when it comes to modify a string though? you'd have an extra CoW when before you didn't need it
 
@Leigh that's true
 
ping @PeeHaa?
 
pong
 
pretty decent latency there
 
I figured out what d and t are in the heartbeat messages
 
6:46 PM
ooooooh
it better be somethign good :)
 
i'm going to guess ... t is for ... timestamp!
 
It's basically a debugging tool for SE, sorry :-P
 
:(
That's like not juicy at all
 
inorite
 
Heh
Anyways, nite.....
 
6:48 PM
But what it does mean is that we can ignore it entirely
 
yup
 
For the record d is the expected diff between the last t that was sent by the server and the one in the current message, in the SE JS code it's handled with some debug logging and a page UI refresh, we don't need to do either of those things
I guess they must have had a problem with events not getting sent to the client at some point
(yes, I just decoded the SE JS code to figure it out because it was bugging me and I want to get rid of the Heartbeat class because it doesn't fit the object model)
 
hehehe
I asked /js once and gave up
You are a better man
 
There are some great function names in that code
incuding TheThingThatGetsDataFromTheServer() and withAllButTakeYourTime()
 
lol! :-D
 
Anonymous
6:59 PM
function ICantFigureOutExactlyWhatThisDoesNowButIWillWriteSomethingBetterLater(){}
 
I think all we need to do is set a 40 sec timer on every message and restart the connection if a message hasn't been received in that time (the heartbeat is 30 secs and I figure a 10sec buffer should be fine)
 
Anonymous
Usually if I can't find a proper name for a function, I used x() if I refractor it then it becomes improved_x()
 
Anonymous
Who is that person who is revenge up-voting my answers right now?
 
Anonymous
Show yourself, you kind stranger!!!
 
Anonymous
\\O// Just 2 points away from 5K.
 
7:06 PM
Also @PeeHaa I presume that at least one of the missing event types (7 & 9) is flag related (probably #7 because of the order in which it would make sense for features to have been implemented?). I suspect the other is a system message (room invites, reminders and the like). Although of course there may be an event type #11...
 
Some I don't know some I just didn't bother implementing yet :)
 
The system message should be easy to test, but flags we will have to either wait or flag a post somewhere and have a bunch of people ready to reject the flag
 
@AwalGarg has a complete list IIRC
 
orly?
 
@AwalGarg
gees @AwalGarg
@AwalGarg
 
7:08 PM
hi :s
 
O hai :P
 
That would be good as I'm working on refactoring the object model with some sane names and a sane inheritance hierarchy
 
You had a message type list somewhere for So chat right?
 
@DaveRandom @PeeHaa github.com/awalGarg/sochatbot/blob/master/sechatapi/… this is what you are looking for I think
 
woah
nice one, tnx
 
7:09 PM
You know we love you right @AwalGarg
 
Now I'll just go back to wishing PHP had enums, as I do at least once a day
 
<3 ya guys too :)
 
@DaveRandom I need that feel bruv :(
 
@bwoebi That didn't work
Can someone please look at this ; stackoverflow.com/questions/36968552/…
This problem is killing me mentally
 
Are you flushing?
 
7:23 PM
I'm creating a library for non blocking Processes
I want to do it without flushing
I want to dispatch a job in background to run independently of the process, ignoring its return values
 
> I assume this because, further requests to the server returns data and doesn't wait for the previous AJAX script to finish.
 
yes
 
As long as there is nothing locking there is nothing preventing more requests
 
The problem is data output after the exec() is not done after the background job is finished
I mean the JSON data is outputted only when background job is finished
 
don't we just need to be able to set objects as the values of class constants in order to make enums? e.g. const SUN = new self("Sunday"); then make the class final and the constructor private and bob's your enum
 
7:29 PM
Would starting the process with exec and then exiting the parent process with die() or exit() terminate the child process as well?
 
IIRC bob already suggested to fork
 
@MadaraUchiha No
The child process continues
@PeeHaa That didn't work
 
@Subin Then that's a viable short-term band-aid
Although, I wouldn't actually do that unless I really had no other choice.
 
@Subin "didn't work" how?
 
The same situation arose
The output only happened when it finished
 
7:31 PM
Also, unrelated to your problem: If you're creating a task in the background and not returning the result in the HTTP response, please respond with HTTP 202: Created, instead of the default HTTP 200: OK
 
@MadaraUchiha I have done that
It's 1:05 AM I should go sleep
Thanks for your help. I hope I can get it fixed soon
 
user1804599
8:00 PM
Hi, can I expect problems if I have a class named Foo\Bar and also one named Foo\Bar\Baz? Or are there no pitfalls?
 
it's fine
 
user1804599
Ok. :)
 
Ekn
8:17 PM
'nin
 
Wes
it's ridiculous that a simple cms can be that slow
 
hi guys , I am looking a way to get variables like this link example.com/name?q=foobar
 
@Wes how about that name before geting values?
 
Wes
what
 
8:32 PM
I mean something like site.com/search?q=foobar
 
Wes
i just linked to you...
 
Internals! Help please! where is the code for var_dump's html formatting with colors?
I vaaaaguely remember it is actually offered by the xdebug extension and not PHP core. But not sure.
 
Wes
yes, that's likely xdebug @AwalGarg
 
@PeeHaa A huge surprise I'm sure this isn't, but I want to completely change the plugin API again. It would be much cleaner and more flexible to have plugins register callbacks for specific things than have the collection ask the plugins what they are interested in... I'm working up a monster patch but it will take me a while I think, I'll PR it when done for discussion.
All I really wanted to do was rename some things so we didn't have several layers of things called "message" but it seems to have snowballed somewhat...
 
oh ok. I guess tracking it down would be easier now in the smaller codebase
 
8:35 PM
@DaveRandom :P
Might want to also tell people on github so we don't have use merge issues later
 
I give up
no xdebug internals here? :P
 
@PeeHaa I'll deal with this side of it, I might try and separate the work into smaller chunks so as not to frighten people with a single PR that's basically a complete rewrite of the event processing layers
 
I may also try and work multi-room in sooner rather than later because it feels like the sort of thing that will get harder to implement the more the codebase grows
 
Wes
@AwalGarg 2000 lines of pure joy
 
8:43 PM
I read that as "pure jam"
 
how do they bear such crap in a world with rust
 
what do you mean "they"? you realize xdebug is the work of one person
 
ohhh. so this is why he doesn't have contributors
 
Wes
lol
 
Ekn
$ curl wttr.in :) nice
 
9:01 PM
Hello. Can someone help me use $result that stores mysqli result object as a table?
$sql = "SELECT * FROM wine WHERE wine.winery_id =".$wineryid;
$result1 = $db->query($sql);
$sql = "SELECT * FROM ".$result1." WHERE wine_type =".$winetypeid;
This statement doesn't work: $sql = "SELECT * FROM ".$result1." WHERE wine_type =".$winetypeid; because $result is not being considered as a table. What other ways of doing this are there? Thank you.
 
@user2877144 if you are using PDO, please learn to use prepared statements
 
Will they allow me to do what i am trying to do? I am going to have learn about them
When we get a result table from a query it is stored in $result for example. How can I use this table for new queries. How can I select from this table?
 
they will allow to write code, that is no vulnerable to SQL injections
 
I know i will learn it but right now I need to make my code actually work
This code is for a class so it's not industry code
ive spent my entire day trying to make this work:
$sql = "SELECT * FROM wine WHERE wine.winery_id =".$wineryid;
$result1 = $db->query($sql);
$sql = "SELECT * FROM ".$result1." WHERE wine_type =".$winetypeid;
 
It's more valuable in the long run to learn how to figure out how to make it work. That's the whole point of the class.
 
9:11 PM
I looked online and it seems there are no solutions to this....
 
@user2877144 look at what data types are returned by php.net/manual/en/mysqli.query.php
 
Before your second SQL statement, do a var_dump on $result1... then you tell us if you think it will work.
 
it is never a string
 
can't I pass $result as a table?
 
9:12 PM
okay ty
if i join two tables how can i store their result in a new table?
 
read the manual
 
if we can't do that im going to try to join two tables but i don't know how to store the result of a join in a new table
 
say i want to join two tables wine and winery and then filter the results, how can i do this?
 
read the fucking manual instead of flopping around like a beached fish
 
9:15 PM
i did read parts of it. I can't find anywhere where they join two tables and store the result in a new table.
In every example they join the two tables and then print it out. they never use that table in further sql statements
 
Ekn
o/
 
Ekn
heh
 
Wes
wut
 

« first day (2024 days earlier)      last day (2906 days later) »