« first day (1886 days earlier)      last day (3059 days later) » 

Anonymous
1:03 PM
fml
 
The release of Star Wars (A New Hope) is #closerintime to the Battle of Britain than it is to the present day.
 
1:41 PM
@NikiC any plans to do a version of PHP-Parser that uses php-ast?
 
Abe
@wschalle php parser already uses php's ast, no?
 
lol
 
@wschalle No plans to implement it myself at least
 
1:57 PM
Sorry, colleague thinks he's funny
 
Abe
@nikita2206 ahhahahahahahahah
 
I think we're beginning to see how pointless the E_STRICT warning was, as people just disable it.
@DaveRandom professionally?
 
Abe
@NikiC oh, so it uses a different structure?
 
@DaveRandom A coworker used to work in high corporate. He's told me that if you left your computer unlocked and unattended they'd send a resignation letter from your email.
 
@Danack No I'm still an amateur really, I get a lot of 2s and 3s out of 5
 
2:11 PM
Damn, I get stuck on 999 reputation, somebody mind upvoting?
1
A: Serving file from secure location with Symfony

XatooYou can serve a file in Symfony using the following code: $response = new BinaryFileResponse($filepath); // Set headers $response->headers->set('Cache-Control', 'private'); $response->headers->set('Content-Type', $file->getMimeType()); $response->headers->set('Content-Dispos...

 
@Machavity mine was not unattended, I was just typing on a different keyboard and looking at a different monitor but still sitting at my desk :-/
@Xatoo so tempted to downvote just to annoy you...
 
Yay, 1000+ rep, thank you!
haha :P
 
@Xatoo Now you just gotta watch out for down votes so you don't get kicked below 1k again :P I've had that happen twice.
 
GUYS
i have a dlink dir 600 router
my apache server i created is not showing up on the internet
any idea y?
 
Showing up on the internet? lol.
 
2:23 PM
'morning
 
user895378
morning
 
@noelzubin I assume you mean that it can't be reached from outside of your LAN. Make sure you set up port forwarding for port 80 (and/or 443 if you use SSL) properly.
And assign your machine a static IP so the forwarding keeps working and doesn't break when DHCP changes your LAN IP.
 
will a long running php script via CLI be terminated by PHP if i didn't use ignore_user_abort() ?
 
@someone If it's attached to your current console, yes it will be terminated.
Tip: run it in a screen session.
You can just detach that and logoff from the server.
Script will keep running inside of the screen session that way.
 
for how a long and it will get terminated ? i'm connecting to a tcp socket server and i notice that the connection drops after like 10 minutes
 
2:29 PM
> preg_replace(): The /e modifier is deprecated, use preg_replace_callback instea
Thanks obama @NikiC
 
"so that" means "for this purpose" ?
 
@someone Hmm, well if you keep waiting on the output it will probably time out that way. Sounds like you should turn it into a background task instead and push a status update when it's done or keep pulling it's status.
 
@PeeHaa you're welcome
 
@Oldskool i can't use screen session i'm executing php.exe process via C# on windows i want to keep it running if the connection drops close it and reopen
forever
 
@NikiC You don't have a eval regex finder script do you by any chance? :)
 
Abe
2:32 PM
@NikiC i'm looking at gmp for the overloading thingy. this is it, right? github.com/php/php-src/blob/master/ext/gmp/gmp.c#L492
 
@someone I'm not at all familiar with running PHP through C#, so I couldn't say. I figure mingw/cygwin should be worth looking into. That gives you screen on Windows.
 
I'll write a regex regex finder otherwise yo dawg
 
@Oldskool it's just like running php from cmd it's really hard checking if the connection is actually drops because TCP just stay in idle state even if the network wire is unplugged in
 
preg_replace("((<[^>]+>)?([^<>]+)?)ise","stripcslashes('\\2') . str_replace(' ','&nbsp;', '\\3')",$this->caption)
 
Is there a good single-resource for learning about cryptocurrency? I'm so ignorant about all of it that's it's completely overwhelming to try to learn about.
 
2:38 PM
@PeeHaa nop
@Abe yes
 
Wow lol. cthulhu is drunk\
uggh widescreen
 
@PeeHaa w-wat
 
@Sean Meet Cthulhu. Although it seems some broken. I don't remember it spamming that much
 
Thanks @BillSchaller
 
2:44 PM
@NikiC Yeah twas a longshot
 
Is there any opportunity left in these markets? It seems that getting onboard 5 years ago was great, but now they're all saturated and the cost to mine == value of coins?
 
@SuperNoob Your best bet is joining a group who pay out based on the work you've done in that team.
 
Anyone wanna give me a free server so I can setup Minecraft Hexxit on it? :P It's been a few years now and we still don't have a contact in here who can hook us up with free servers.
 
But you need to invest in some top specs before you can do anything really
 
@PeeHaa I want taht.
 
2:46 PM
@SuperNoob not unless you're a quant forex investment genius or have a datacenter full of high end mining machines.
 
@FélixGagnon-Grenier Type a HTML regex parser in chat and you get it
 
But it might freeze your machine
 
What's the "ground floor" to get involved and be profitable? $5k $50k?
 
2:46 PM
@Fabor It's because of MC & Hexxit's high ram / CPU requirement right? :p
 
like
HTML regex parser
..
 
Somewhat, depends also on number of players on server, which for me is < 10 probably.
 
@SuperNoob don't do it man
 
Man I miss mucking about with stuff like that.
 
@FélixGagnon-Grenier See my message tagged
 
2:48 PM
@BillSchaller, so my assumption that there isn't opportunity because of saturation is correct?
 
preg_replace("((<[^>]+>)?([^<>]+)?)ise","stripcslashes('\\2') . str_replace(' ','&nbsp;;', '\\3')",$this->caption)
nice
 
pretty mild though. I think I clicked on it too soon.
 
okay...moving on then :)
 
@FélixGagnon-Grenier I thought it was AFK, but suddenly it went batshit
 
2:49 PM
So how does a dude sit back with a big gulp and make millions of dollars these days? ;)
 
@SuperNoob value investing
 
@BillSchaller, I'm more of a "generate revenue" mindset than an invest in the 40-60 year long game guy
 
@SuperNoob Think of an idea / problem in the world. Actually follow up and create something to solve it. Release it to the public. ??? Profit
 
@SuperNoob making 20-30% in a year isn't bad though... Just gotta do a lot of research
 
@Sean, easier said than done.
 
2:53 PM
so you're telling me they actually regex our chat messages to detect regexes detecting html. nice.
 
6 messages moved to bin
@FélixGagnon-Grenier Yo dawg
 
yea. point taken.
 
If someone knows about this:
0
Q: Automated app-deployment on cloud server

feniixxI'd like to know if there's any service/software to automate the deployment process of our applications, I have my server at AWS EC2, but I've been using OpenShift to deploy some applications and the deployment process is really interactive, all is done through a gui, and I only had to push my c...

 
user image
5
 
@PeeHaa Looks like you tried to parse XML with regex
 
2:59 PM
s/you/the assholes before you
 
That is what the chat easter egg is based on ;-)
 
@PeeHaa Chat easter egg??
 
Abe
@NikiC what was that site where i can search a php core function to check what it does? something like grepcode :B
 
3:09 PM
Is there a CSRF lib for php5+?
Would love to use yours @PeeHaa but we're not on 7 yet :P
 
@Abe lxr.php.net?
 
Abe
yeah. that :B
thanks
 
hay
worlds most basic question.
i wanted to know a simpler way to do the following:
$a = 1;
$a += 1;

$a should output 2.
 
$a = 2;
That's the simplest way of setting $a to 2.
 
3:20 PM
haha.
true.
but not what i'm looking for.
;D
$a could be anything.
and what number it adds could change too.
 
If I've answered your question, and it's still not a good enough answer for you, then perhaps what you're actually asking isn't very clear at all.
 
well in the example, i just want to add 1 to $a, but for it to add 1 to the current value of $a. as i said, the value it adds might not always be 1 either.
@MarkBaker check edit. ;D
 
How much simpler than straightforward addition do you actually want?
 
@Abe provided the answer, thanks.
 
$a++
 
Abe
3:24 PM
makes me really sad how @Purify struggles with programming :D but he is a really good designer :B
 
@Sean Now you have a reason to upgrade! :P
38 mins ago, by Félix Gagnon-Grenier
preg_replace("((<[^>]+>)?([^<>]+)?)ise","stripcslashes('\\2') . str_replace(' ','&nbsp;;', '\\3')",$this->caption)
Also there is more:
55
Q: What Easter Eggs do the chat sites have?

MosheAccording to balpha, the SE chat sites may have individual Easter eggs, depending on the site. If you find them, please post. Edit: Because it's so easy to make this stuff up, a screenshot as proof would be nice. (Although Photoshop ain't that hard either...)

^ spoiler alert
 
rm -rf /
 
Gonna jump over to the test room for this
 
\o/
 

Sandbox

Where you can play with regular chat features (except flagging...
 
3:33 PM
@Jimbo wondering when my video will be out too. I thought it'd be up last Friday, but they've obviously slowed down
 
anyone can i ask something?
 
thank you for answering but the mySQL chat room is kinda deserted
 
Oh man, that c'thulu egg is pretty good.
 
ok. the designers for the project told us from the start they would consult us to make sure they are not doing extravagant shit before presenting to the client. 15 minutes ago: "hey we are presenting to the client tomorrow, can we make a call in two hours to show it to you?"
fuckers.
 
3:36 PM
@Sean I prefer chocolate, but each to their own I guess
 
The answer to that question is obviously "no"
 
@DaveRandom Ba tum tchhh
 
cant ask about database here? >_<
 
@Sean Hi! My name is both Dave and Chris and I make awful non-jokes pretty much constantly, it's basically the only reason they keep me around here.
 
:-)
 
3:41 PM
@treblaluch These things tend to go hand in hand. If you think we can help, ask away
 
@Abe Yeah that really takes looooong
 
Abe
@PeeHaa took more than 3 hours in total because it failed at the first attempt... it couldn't download something
 
It took me more than 5 hours the last time.
And the day after I installed it (or somewhere close) my machine crashed beyond repair
 
What's the word/term for "avoiding what actually needs to be done by focusing on trivial/non-important tasks?"
 
try compiling PyPy
on one laptop it took about 36 hours
it needs a metric ton of ram (gave it 16gb, and that 36 hours dropped to about 1 hour)
 
3:48 PM
@SuperNoob Procrastinating?
 
Yak Shaving?
 
Yeah...I was looking for something less commonly used.
But you're right,
I'm overthinking things
 
prevaricating
 
I think I should stop drinking beer. My pants keep getting smaller and smaller...
 
Hey @JoeWatkins this might make you happy: stackoverflow.com/questions/34293226/…
 
4:00 PM
Is it best to write interfaces between your code and libraries?
Looking to bring in a validator library, should I be looking to write a class which connects my code-doing-the-validating with the validator?
Or would it be okay to just use the validator instance / lib directly.
 
@ircmaxell O.o
@SuperNoob Monday morning
@FélixGagnon-Grenier ha! Sign you are getting old
 
Abe
@PeeHaa did you install it to compile php?
 
@Abe Debug yeah
 
Abe
i kind of figured out how to compile php on linux, still no clue about windows... :B
 
@ircmaxell doesn't HHVM take something similar? maybe a bit less
@Abe don't worry, nobody knows how
 
4:04 PM
@Sean third party code lives behind your application boundary. the text books will tell you to use interfaces and adapters to stay in control of these boundaries, but ymmv. it's a tradeoff.
 
Abe
haha dammit :(
 
8
Q: Wrapping third party library is best practice

TAskI came across with following statements while reading the Clean Code book of Robert C. Martin. Chapter : 7 : Error Handling Page No : 109 ..In fact, wrapping third-party APIs is a best practice. When you wrap a third-party API, you minimize your dependencies upon it: You can choose to...

 
or at least, it did last time I did it like a year ago, not sure about 7
 
Abe
@DaveRandom :O
 
4:07 PM
nobody seems to find that page, not sure why
 
@Gordon Cheers, food for thought there!
 
@Andrea way less
 
Abe
4:20 PM
what happens to be the argument of PHP_MINIT_FUNCTION macro? (is it a macro, right?)
 
Ugh, this is one reason I hate our macro usage.
Makes it so hard to see things.
 
@Abe apparently it gets used to generate a function named zm_startup_##module
## in macros means "use the param as a string"
 
Abe
so like it needs to be globally unique or it's just any name ?
 
module aka extension names need to be unique.
 
Abe
the guide i'm reading about C has code that looks like totally different from php internals :B
 
4:31 PM
Would that be a generic Proxy class?
 
@Abe you mean it's more readable than internals?
 
Abe
@Gordon not really, just different :D
 
@Sean Why do you need it to be generic?
 
Abe
zend_register_internal_interface(&ce TSRMLS_CC) what are "ce" and TSRMLS_CC ? i understand ce is a variable, what about TSRMLS_CC ? sorry for the dumb questions
 
@PeeHaa It doesn't need to be, but it's just generic for the purpose of the question
It's more if it would be classed as a proxy or not. If not, what would it fall under?
 
4:34 PM
Well no. You just push the same things 1:1 to the object below
 
@Sean it's what I like to use for a Decorator when I don't need it to be typed. ofc it still misses the decorated methods
 
Anything generic is probably not a good idea imo
 
In reality I won't have that constructor. It'll be making static calls to a specific class.
 
@Sean Yes, it's too generic. You've thrown away all the information about how to call methods.
 
Abe
#define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT) the classname doesn't look to be used here, right?
 
4:39 PM
@Abe ce stands for class entry
 
Abe
@nikita2206 yep got that :B
 
@Abe TSRMLS_CC is a PHP5-ism. You don't need it
 
Abe
but wanted to understand, are ce and tsrmls_cc two arguments or it's an expression or something?
 
@Abe TSRMLS_CC is an empty macro for you. Unless you're playing with thread-safe builds, then it's evaluated to variable
 
Can anyone recommend a tool for converting cachegrind files to viewable HTML, or other way of viewing them on OSX that doesn't involve compiling stuff.
 
4:45 PM
@Abe Probably due to our heavy macro usage.
 
Abe
@nikita2206 /me deletes it and pretends he understands what that is
 
user895378
@Danack I've used code.google.com/p/webgrind before but it was pretty slow
 
ta
 
can someone help me with this..it's laravel4.2.. stackoverflow.com/questions/34294843/…
 
@StormSpirit I don't know anything about laravel and I don't want to, but does it really allow an array in there?
 
4:51 PM
@PeeHaa yeah... that's how I try not to take it personal
 
ThW
@rdlowrey and plain wrong - I got different result in this and kcachegrind with the same files.
 
Abe
it's awesome creating original functioning code with simple copy/paste!
 
@peehaa what do you mean array? it's same on php pdo
 
I need to convert about ~ 9000 php objects into json on php 5.1.6 currently im getting a time out, since this version doesn't have the built in function i had to write my own. Has anyone used to built-in one and does it time out like mine?
 
Abe
any hint about "classname" in ZEND_ABSTRACT_ME ?
 
4:52 PM
@StormSpirit If it is the same that isn't going to work
You cannot bind an array to your IN clause
That's not how it works
 
@PeeHaa idk, what is should be?
 
322
Q: Can I bind an array to an IN() condition?

AndruI'm curious to know if it's possible to bind an array of values to a placeholder using PDO. The use case here is attempting to pass an array of values for use with an IN() condition. I'm not very good at explaining, so here's some psuedocode to demonstrate. I'd like to be able to do something li...

 
@PeeHaa its string
@PeeHaa $test = "1,2";
 
Ok in that case...
Not going to work
Because it is treated as a single value
Instead of the two you meant it to be
 
Read the question already @StormSpirit :p
(sorry for barging in :p)
 
4:54 PM
@FélixGagnon-Grenier yeah already read that earlier, but still can't figure it out
 
@Abe Just ignore it? It might have been used at one time, but it's never worth breaking all PHP extensions in the world just to remove a parameter from a macro.
 
@StormSpirit "i think soulmerge is right. you'll have to construct the query-string."
that's somewhat clear, no?
 
Abe
@Danack yeah i was asking if i should ignore it :B so i can set it to anything, like 0 would be ok?
 
No...set it to the least surprising thing.
 
The point is @StormSpirit you need to bind two variables to do what you want to do
 
4:56 PM
unless you want your code to be confusing and break if the macro gets changed to use the classname again.
 
this is where binding on laravel
 
Abe
@Danack ZEND_ABSTRACT_ME(¯\_(ツ)_/¯, sum, arginfo_sum)
 
but don't know why it's not working WHERE IN
 
1 min ago, by PeeHaa
The point is @StormSpirit you need to bind two variables to do what you want to do
each part of the IN is a separate parameter...
 
@Andrea hehe
moin all ...
 
5:02 PM
posted on December 15, 2015 by nlecointre

/* by The coding love */

 
@Danack oh, I see
 
5:15 PM
PHP I hate you. Exception::getCode is mixed, but the constructor allows only int.
 
First world problems?
 
Maybe, but it's the first time $code is actually useful for something and then it's not useful, because it doesn't allow strings.
 
make a custom exception?
 
With blackjack?
 
hmmmwat?
class stringCodeException extends \Exception
{
    public function __construct($message = "",$code = "",\Exception $previous = null) {
        parent::__construct($message,0,$previous);
        $this->code = $code;
    }
}
 
5:26 PM
@kelunik just create your own exception class, and give it a method for that extra info you want - like github.com/rdlowrey/auryn/blob/master/lib/…
 
@FélixGagnon-Grenier Nice, that works. Stupid type declaration then.
@Danack That's a way, of course. But if other internal exceptions use strings already and it's documented that way, why do we have that restriction in the constructor?
 
@kelunik We should remove the ability to do that in internal exceptions, imo.
 
"But if other internal exceptions use strings already " - that's probably only because of legacy reasons, and is the bit that should be fixed. Code is meant to be an int to allow logging exceptions to be sane.
 
unix-like system like programs exiting with integers code errors
 
@LeviMorrison Why? I've never ever used the exception code with an int.
 
5:33 PM
@kelunik It's used commonly with databases, actually.
MYSQL ERROR 4238192
The number gets put there.
 
Morning
 
@kelunik It's nice trade off to use the code to provide meaning rather than having a huge number of exception classes.
 
Sure, but a number was never and will never be human readable. And humans read those logs. Using strings there instead of ints makes perfectly sense to me.
 
Who knows how to delete a service in Win? I tried this: stackoverflow.com/questions/197876/… => it says the service is deleted on sc delete <name> - but it's still there
also services.msc does not allow to do anything with that service (stop/restart or anything) - it's just running and that's it...
 
@AlmaDo Wrong room?
 
5:37 PM
@Xatoo um.. no?
 
@AlmaDo seems it -- do you have admin privs?
 
@circusdei yes. sc.exe reports about successful uninstall of the service, but nothing happens
it does not go away
 
which service?
 
that I want to know (I mean what it does exactly). Story: installed game launcher, it did something to the system (I think) and installed that service. Nothing is wrong, I just uninstalled that launcher long ago and now don't want that service to stick around
I occasionally spotted this service when reviewing processes running and now fight against it for 2 days :(
the service is called "Thorn"
 
"cd %LOCALAPPDATA%\THORN && thorn.exe -c 20 && thorn.exe -u"
sorry ... <?php exec('cd %LOCALAPPDATA%\THORN && thorn.exe -c 20 && thorn.exe -u"); ?>
forgot the topic ;)
 
5:45 PM
phew.. don't focus on php. In this room we talk anything but php (:
 
Abe
difference between zend_object and zend_object_value ?
 
good catch, it resolved the issue. Thanks @circusdei . However, it doesn't look like a victory at all :( I'm thinking "what if the service was indeed a spyware" - certainly, there would be no option from vendor to disable it...
so nothing is fine under Win...
 
Is it possible to reference json schema to the local file system?
since @Danack taught me about json schema you might know?
 
looks like overzealous DRM to me
 
screw them.. in linux I have sudo and don't give a damn.. Ridiculous system
 
6:03 PM
moin
 
Abe
another stupid question, where do i find the list of all possible zend object handlers?
 
@Abe zend_object_handlers.h
 
Abe
thanks. going painfully slow, but i'm figuring out something :B
@NikiC from what i could grasp, there is no difference anymore in php7 between zend_object and zend_object_value, is it?
 
6:22 PM
TIL you can cast with null coalesce operator :D $x = (int)$y ?? 0
I guess precedence is making it (int)($y ?? 0) ?
 
@Jonathan your question doesn't make much sense. And I don't use that JSON schema stuff, only know of it.
 
@Danack Actually, yeah, you'll have to compile it once… but since then qcachegrind was a pretty reliable application…
 
6:59 PM
So I'm trying to run a python script using exec. However, my exec call returns an error when I run it and the python script doesn't execute. So I tried appending 2>&1 to my command and the python script actually finishes execution, but no error is returned to STDOUT. How can I go about debugging this?
 
just use system instead and look at the error message?
 
That only returns 1, which I assume is the exit code
 
> system — Execute an external program and display the output
You see no error?
 
I am only getting returned 1. I'm on windows, if that explains anything
 
> Returns the last line of the command output on success, and FALSE on failure.
So how can you tell you have an error?
 
7:16 PM
It's supposed to trigger the building of an .exe, but that .exe isn't built
 
Probably a permissions issue. Check that the Windows user executing PHP has appropriate permissions to execute the python script and write to the places that need to be written.
Also consider using proc_open for more fine-grained control over input, output, and errorlevels.
 
Will do. Thanks for the help!
 

« first day (1886 days earlier)      last day (3059 days later) »