« first day (1272 days earlier)      last day (3898 days later) » 

00:00
@rdlowrey tbh, I don't see why you can't run your architecture on hhvm
exactly
and also, the day was mostly about hack, not the jit stuff, @rdlowrey ;-)
user895378
1) Because there is no ext/libevent available on HHVM <-- required for handling more than ~250 clients at once
@meWantToLearn Yes, but it will backfire in a month or two.
/me needs to do something on github ...
user895378
00:00
2) Because there is no ext/pthreads on HHVM <-- required for serving static files
@rdlowrey then why not adding them? It can be done? :)
but yeah, the single threaded version would still work afaik
it would be slower until we have the ext
user895378
There are other problems as well, though.
user895378
Different Generator syntax is a major roadblock.
user895378
I use generators heavily and there's no way to write generator code that's simultaneously compatible with both environments.
00:03
they differ? :O
user895378
$result = (yield someGenerator()); // breaks in HHVM where the brackets aren't used
user895378
You also have to "prime" generators in HHVM whereas in PHP you don't
@meWantToLearn hohoho "Developing websites using MVC frameworks such as Codeigniter." Some people here might kick you :P
ah, so it's a parser problem
@HamZa hahaahhaha
user895378
00:04
More on the PHP/HHVM generator differences: github.com/facebook/hhvm/issues/1787
well it is a MVC framework
@rdlowrey I was just gonna ask if there was an issue for that =D thx
@HamZa do u know what is MVC?
user895378
Of course, HHVM did have generators before PHP. I guess @NikiC could tell you why he chose the implementation he did for PHP.
user895378
But was HHVM a serious option for non-FB programmers before 5.5 (generators)? I doubt it.
@rdlowrey yeah, doesn't matter - it's a zend incompat, so if they want 5.5 parity, they have to fix it
@rdlowrey they currently consider themselves "on par" with 5.4
though they still miss Closure::bind() :\
user895378
Oh, I need that as well.
yeah, it's my last blocker
user895378
Those are all the issues that I know of as it regards my server code and HHVM.
00:06
I know the principle, to separate the concerns but heck I'm tired of it so I implemented my own "separation of concerns"
Well mine is also bad AFAIK but it's a first step
user895378
If there were full 5.5 parity I'd look at the HHVM question differently.
user895378
Also, I don't know how ext/openssl does or doesn't work with HHVM. I'm requiring 5.6 to serve encrypted resources in my server because there are several things I added specifically because I needed them.
@meWantToLearn there were a lot of discussions here why CI isn't mvc. Try to look it up
@rdlowrey you mean if they implemented your patches already?
00:09
Hey guys!

Hoooly moly what is Heartbleed?
Oh jeez
user895378
@Ocramius I don't know how any of that stuff works with them, TBH. I would be surprised if they had implemented those things already.
user895378
I wouldn't implement something that was still in alpha myself.
Yeah, I just found it
Holy shizz
user895378
Speaking of, where the F is 5.6-beta1?
00:10
@rdlowrey a lot of folks are actually porting php-src patches to it as they get merged D:
16
Q: When NOT to use MVC in a Web Application?

GStoI was working on sketching out some ideas for a new project, and realized that I was having some difficulty getting things to fit into an MVC framework (In the case, CodeIgniter) In a way I liked. While I believed this can be overcome by working with the design some more and figuring out a bette...

user895378
Again I wonder verbally: where the F are those people in regard to contributing to PHP?
user895378
I'd be surprised if the openssl fixes were there ... not because they're difficult, but because they're extremely specific implementation-detail kind of things (not language level changes).
Pfft... what a crappy repository: github.com/facebook/hhvm/tree/master/hphp/hack
@rdlowrey What's happening on that front?
user895378
00:13
I don't know.
user895378
I have no idea what's holding it up.
@meWantToLearn are you suggesting "mvc all the things"?
@HamZa it is a MVC framework.
@rdlowrey Yeah, I just looked at date, haven't given it a thought so far.
nevertheless I wont be using it anymore
its too messy
00:14
@meWantToLearn haha ... Don't believe everything you see on the internetz
user895378
It was supposed to be released like two weeks ago.
no namespace, no exception handling,
gotta work on symfony
I didnt
user895378
In any case, HHVM would have to change alot before I'd be interested in contributing or even using it. And by that I mean it would have to actually be open source.
user895378
And probably not even then because I'm so vehemently anti-facebook.
user895378
00:16
There must be some sort of blocking bug or something that has to be resolved.
user895378
That's the only thing I can figure.
It's not open source per se, they still can force anything they want.
You're just making a pact with devil.
PHP development is bla bla bla, but at least it's a tiny bit more fair.
user895378
What's the license on HHVM? How are contributions licensed?
with APC it caches the interpreted PHP code, and uses it next time. By interpreted code does it mean the C code?
user895378
For some reason I suspect they use the "FU, it's ours now" license
00:18
> License HHVM is licensed under the PHP and Zend licenses except as otherwise noted.
Whatever that means.
https://github.com/facebook/hhvm/pulls/Ocramius
https://github.com/facebook/hhvm/pulls/morrisonlevi
TRAITORS!
hehe
@webarto APC Opcode caches the interpreted code, and uses it next time. So does this mean the interpreted C code?
I am confused between the difference of APC opcode and HIp-hope
hop
@meWantToLearn isn't it bytecode ?
user895378
Inexplicable internet herd behavior of the week: hhvm has more than 2x as many ★s on github as php-src
@meWantToLearn No, it's machine code/bytecode, it's not any "language".
00:21
@Ocramius "In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII characters, even in UTF-8 mode. However, this can be changed by setting the PCRE_UCP option." any reference on this one ?
@HamZa hm?
@webarto oh thank you. so hip-hop is bytecode
#2090 ?
Hey guys, care to point me in the right direction? I've got an extremely wonky issue.

(As is usual with me)
@Ocramius I mean like where did you get/learn that from?
00:22
@rdlowrey I think this is a bad thing they've done... it would be better they created their own thingy with no real relation to PHP. Now, everyone will port fixes and few people will actually fix bugs on PHP. Not sure if I make sense.
@HamZa it's ported from a php bug
@HamZa Oh stop, I'm not that new here~
@AustinBurk hehe, just reminding ...
@Ocramius thanks, will search ...
@HamZa the php bug id is in the title :P
@meWantToLearn PHP→AST→C++→x64
user895378
00:23
@webarto It will be a net positive result for the community I think. But I certainly think FB Is trying to create their own market nich in the programming world (like how Microsoft pushes its own languages).
user895378
I certainly don't think FB is doing it for altruistic reasons.
user895378
If they were they would have contributed to php-src.
thanks for clarifying it. so APC just caches the code interpreted and runs it next time from the cache. so there wont be any more interpretation again
Yeah, sorry I'm too stupid to word it, I meant something like that. This, to me, looks like framework wars.
php-src had no real "competition" so far.
user895378
I don't understand why people would use HHVM other than "oooh shiny"
00:25
Basically, that.
user895378
Since when does anyone do Fibonacci sequences in their web apps?
@Ocramius Sheisse ! Need to learn how to read git PR's
user895378
Are you still using PDO? Any database IO whatsoever? Then HHVM isn't going to do anything for you.
is mark zukerberg jewish?
00:25
ahahahaha
user895378
Anyway, dinner. BBL.
@rdlowrey And if you don't, then don't look at PHP anyways :)
Bon appétit.
This is going to be hard to explain...
I have a freaky PHP sessions issue.
I just discovered an interfaced constructor in D2
how the heck did this pass through?!
@Ocramius WHAT? HAHA.
Link?
Fabio really nailed it :D
I get why it was done, but it's the wrong solution >.<
yeah, I'm gonna nail fabio now.
00:28
First time I see ctor in interface to be honest.
I saw it before, and it's just stupid
As some of you know, I'm reverse-engineering and recreating Flipnote Hatena, and I need to basically clone Session IDs from another server.
I wonder why whole ctor isn't inherited then, dunno. Especially when you have obligatory param.
The Nintendo DSi sends the X-DSi-SID header, which I need to rewrite into a phpsessid header, preferrably with htaccess. That's my first issue that I need to address.
@webarto it was done because some class allows setting the "cache class" to use
but that's just stupid. Instead, set a callback that gives you a cache instance
bah, luckily it's not in a released version
creating a blocker issue and killing it before it lays eggs.
00:33
USE YOUR POWERS
Kudos by the way for being in ZF/D teams.
I have a lot of time to waste :D
So...can I do this to set the session id from the X-DSi-SID header?:
session_id() = $_SERVER['HTTP_X_DSI_SID'];
No, you need custom session handler.
@Ocramius can I assume that every php version is now compiled with PCRE_UCP ? Or should I add (*UCP) in my patterns to be sure ?
00:38
@HamZa no clue :D
you have to poke Maks3w about that, he's the original author of the issue
Can you elaborate? I need to check if the session with that header value exists, and if it doesn't, set it and set a session variable from what function example() returns

If the function returns false, then it failed, so it'll try again three more times before gving up.
I only ported his code since he didn't want to sign the CLA (he wants total anonymity)
@Ocramius /no idea who that dude is ... Maybe @NikiC could shed some light ...
@HamZa tbh, I only met him and I don't know his name :D He only has a github account: github.com/Maks3w
otherwise he's pretty much invisible ;-)
Why is that, what do you think? :)
I personally don't get it.
00:40
we only have his phone number for security issues :D
He's taking it too seriously :D
maybe
so far he's winning the game :P we still don't know who he really is
Oh, so we could still track him :D
@AustinBurk Read about session handlers in manual.
@webarto heh, I didn't post any picture too and then some family members screwed it by tagging me on FB
00:41
@Ocramius Yeah, it's good, but it's also bad, depends on situation.
lol
There's always that :D
@webarto who knows, maybe in RL AFK he's super popular/famous :P
Unlikely.
140%.
:D
Yes, I saw you saw the pirate bay movie :P
When they say it's not IRL but AFK, 'cause it's RL.
yeah, that movie is cool :D
00:44
@webarto This is gonna take forever...ugh.
@AustinBurk hire @Ocramius, 150€/h.
:)
haha
30% room11 discount ?
That's like my monthly bandwidth cost, no way
I'm 17 years old and I've gone nearly broke because of this site~ http://www.sudomemo.net/
@HamZa That's sounds like group buy in whore house :D
00:45
(facepalm) lol
@AustinBurk "monthly bandwidth cost" is it that expensive there? Here we pay about 60eur oh hosting ...
@AustinBurk Not sure why you're billed like that, can't you get like 10TB per month or something plan?
@webarto Well, there's a $50 flatrate plan, I think, not sure yet though
there are some hosting parties that give you unlimited bandwidth
I get 2TB a month from my VPS provider, which also happens to be crap
Most of my traffic is handled by a cdn provider
I have this one, it's the bomb.
00:49
My VPS provider doesn't want to see me go
They're *very* clingy, if you know what I mean

I want to switch to Amazon ECS really badly
@AustinBurk o.O you can't change provider?
They have all my data; I have my code, but that's gonna be a lot of downtime (to keep everything the same during the transfer) as I download all my data to Amazon EC2 or whatever Amazon thing I'll do.

THe issue really is time...
They provide free VPS services, but I quickly outgrew it. They're inexpensive, but honestly, I've been seeing a few issues
lol this sounds like a scam or something
Nah, they're great for some stuff but I have 40GB HDD...
My VPS is in Germany, actually
Oh I learned that I should never host something in a country which I don't speak their language
00:56
@HamZa Perhaps I'll switch to their South America datacenter or something like they've been suggesting every time I complain about connection dropouts
@AustinBurk you live in the US ?
Michigan
Host closer to your users.
^ that
@HamZa My users never directly access the server, actually, but I think I'll try.
01:01
I once rented a dedicated server from germany. The price and specs were good. When I switched over to a VPS, I had to pay 6months in prior, I was surprised since I thought I should only pay per month like with the dedicated server.
After one month I got enough and sended a message that I want to stop. They forced me for another month. Well, no big deal it was less than 10euro per month
The big problem was with the refund, when I asked about it they told me to give my bank account number, I thought why should I give it if I paid with PayPal
So I thought screw that ~40euro
@HamZa I have a ~.2 ms ping time between my vps and cdn/caching service
@AustinBurk Seems great to me
No wait, I might be wrong, it's at 6-7 ms right now.
It was better earlier, but maybe I've got a decent amount of traffic now
64 bytes from 185.31.16.185: icmp_seq=60 ttl=59 time=7.18 ms
64 bytes from 185.31.16.185: icmp_seq=61 ttl=59 time=7.16 ms
64 bytes from 185.31.16.185: icmp_seq=62 ttl=59 time=7.19 ms
64 bytes from 185.31.16.185: icmp_seq=63 ttl=59 time=7.23 ms
Yuppers
Pinging 185.31.16.185 with 32 bytes of data:
Reply from 185.31.16.185: bytes=32 time=8ms TTL=56
Reply from 185.31.16.185: bytes=32 time=8ms TTL=56
Reply from 185.31.16.185: bytes=32 time=10ms TTL=56
Reply from 185.31.16.185: bytes=32 time=6ms TTL=56
from home
My connection at home:
Pinging 185.31.16.185 with 32 bytes of data:
Reply from 185.31.16.185: bytes=32 time=124ms TTL=53
Reply from 185.31.16.185: bytes=32 time=129ms TTL=53
Reply from 185.31.16.185: bytes=32 time=125ms TTL=53
Reply from 185.31.16.185: bytes=32 time=126ms TTL=53

around the same when pinging my VPS IP directly
01:07
Well then it's maybe advisable to move your vps somewhere near you
My traffic looks like an Ace comb that's partially melted
(February 1st to now)
pew pew, crisis averted
01:23
aaaaand it seems like I got 100% d2 compat with hhvm <_<
this one was the last fatal, as it seems :O
You deserve a medal :D
it was luck :D
Hey guys, can you help me how to word the question for all mighty google? I want users to be able to edit their profile and embed videos and src photos on it, possibly from other websites. My worries are viruses and website vulnerability. Myspace used to do this, but that's long gone. What do I look for?
@Darius a "social media" site ?
or must I implement facebook style image processing, where a user enters a link or image, I take it, convert it to get rid of virus and then show it as a photo from my site.
01:27
Q: Can abstract class be instanced by some magic?
@HamZa something of the sort :p
user895378
@JoeWatkins Do we know if flock(STDERR) will work like it does on file handles? Like if I were to try writing to STDERR from multiple threads at the same time? Input on this?
229
Q: Interview : Can we instantiate abstract class?

jWeaverThe interviewer asked - Can we instantiate an abstract class? I said, No. He told me - Wrong, we can. I argued a bit on this. Then he told me to try this yourself at your home. abstract class my { public void mymethod() { System.out.print("Abstract"); } } class poly extends m...

^ java though ...
or should I give up the idea of embedding stuff from websites and only allow whitelisted websites like youtube?
@HamZa Because I think I'm seeing something like that. Thank you for reference.
01:28
@Darius I won't even trust youtube
@HamZa sarcasm or forreal?
@Darius for real, I mean what if they got infected/p0wn3d ?
oh wow, this is recent too! will read this now
Anyways, you should also think about copyright, privacy and TOS.
For example, you don't want someone using you as a "hosting" without even linking/showing that you're serving it
heh and deadlinks would be a pain to deal with too
good evening gents
01:33
@mmmshuddup hi sir
Well, I have my own video section that members can upload to, I just wanted to introduce some customization for the profiles of the users. It appears the best method is just to host everything and drop the idea of anything fancy, just make it convenient then i guess
yup
so dealing with deadlinks wouldn;t be a problem, if the video disappears, the user would just remove it from their profile at their discretion.
K, conclusion has been reached, "don't do it". thank you
-1
Q: How to loop through an array php

MimaI am new to php. I am trying to create a mailing list. I have one problem that the email is going more than one time to the same person, it's something wrong with the loop. Any help!!! if(isset($_POST['submit'])) { require("class.phpmailer.php"); $mail = new PHPMailer(); ...

welcome
01:34
guys. there's a quality question right there. and unique too
lol
I swear there's like at least 200 of those "loop through an array php" questions per day
@mmmshuddup Let's create a reference ! Yaaay !
@HamZa lol I'm down!
go to google and type "stackoverflow how to loop through array php" LOL it's really shocking how many pages upon pages of results there are
SO should add a moderator just for those questions. so they can be closed and deleted immediately :)
@mmmshuddup Create something like this and we might close them as duplicates
@HamZa that just got added to my favs :)
@mmmshuddup then loop through this list room-11.github.io/canonical.html :P
01:42
@HamZa whoa that's amazing
wow
LOL
wow that's like a first semester assignment.. if he can't do that or figure it out then perhaps he's studying the wrong major lol
user895378
@JoeWatkins Nevermind about that flock question ... I can find better ways to solve that problem.
> Just trying to get through this Java Class
Make a bot to automatically answer half-questions like "PHP while starts with second item in SQL result, how to fix?" with "Remove the initial ->get_array(MYSQLI_ASSOC)", et cetera

IIRC there was a script that automatically tried code snippets from StackExchange answers, let me see if I can find it. It was one of those 'inspired by xkcd' things
http://gkoberger.github.io/stacksort/ It's fun~
Actually, this could be the best thing ever :P
01:56
So yesterday I went off-road biking with my brother
We recorded a video of a train

From _underneath_ the train
time to sleep, 4am ...
hey, maybe heartbleed will mean that whoever maintains epel will finally do their job and add the rest of the packages I need!
^__we weren't under the train, but the video camera was
@AustinBurk lol obviously
@HamZa Want me to stick it on YouTube?
When it's done processing, the raw video will be here: https://www.youtube.com/watch?v=zZJfwA4alfI&feature=youtu.be

It could've been better, but hey? It was cool
02:27
Bye guys!
another productive night:
It looks like #doctrine2 ORM will reach 100% #hhvm compatibility today! https://github.com/doctrine/doctrine2/pull/1009 /cc @doctrineorm @HipHopVM #hackdevday
02:43
> "At this point, the probability is close to one that every target has had its private keys extracted by multiple intelligence agencies. The real question is whether or not someone deliberately inserted this bug into OpenSSL, and has had two years of unfettered access to everything. My guess is accident, but I have no proof." -- Bruce Schneier
=o(
03:39
> Failed asserting that false is true.
Great start of the day.
@crypticツ Well, getting to the private key is not as likely as getting to login credentials ;-)
user652649
shame on me, i'm reading "php for kids" phpforkids.com/php/php-gd-library-adding-text-writing.php :(
@JoeWatkins I've heard back from Will Fitch and we're having a conversation. Will keep you informed.
By the way, I'd love to get @ircmaxell, @rdlowrey, @bwoebi, @JoeWatkins and @NikiC in a voice chat to talk return types. Ping me if you're interested and we can work something out for those interested.
04:14
Isn't that going to be very noisy? ;-)
04:36
good mornings and congrats @Ocramius
hi I have a doubt in php
how to access the remote database from local
user3488619
Google
$server_name = "p3nlmysqladm002.secureserver.net/grid55/73";
I tried google too, but not working for me
that most likely is not a valid server name.
also before writing any line of code, ensure it is accessible via remote with the mysql commandline client.
$user_name = "";
$password = "";
$db_name = "";

$con = mysql_connect($server_name, $user_name, $password) or die('Server Connection Error!!!');
mysql_select_db($db_name) or die('Database selection Error!!!');
am always getting "Server Connection Error!!!" message
04:40
The mysql_* functions are no longer maintained and shouldn't be used in any new codebase. It is being phased out in favor of newer APIs. Instead you should use prepared statements with either PDO or MySQLi.
Yes, instead put a die('Figure out database configuration without PHP first'); in the first line and then do what the error message said.
'Figure out database configuration without PHP first' means?
@Illaya sorry, but what about reading manual?
am very new to PHP, so only asking this type of questions. pls reply me
@hakre
04:58
@Illaya Use a program that has already been made to connect to the database so that you can test your server parameters: for example dev.mysql.com/doc/refman/5.6/en/mysql.html
05:48
6
A: partial string comparision in php

OverLexsubstr_compare is binary safe.

Ehm ... how did that get 6 votes?
@LeviMorrison Yes, I'm interested.
06:16
@LeviMorrison cool ...
I'd do the talk thing too ...
@JoeWatkins You on Windows by any chance?
06:31
no, windows is gay
why ?
lol
somehow 5.5 with xdebug fails to work properly with phpstorm.
whereas 5.4 is fine and dandy
why xdebug? use phpdbg :p
morning room
yeah ... @Jack you're totally letting the side down, use a proper debugger :D
anybody on Win by any chance?
@JoeWatkins Last time I checked phpStorm doesn't have phpdbg support :P
06:34
be a proper programmer too :D
they are slowpokes :p
if you mean that it doesn't require the support of an entire ide and a webserver to function at all, correct, it does not ...
ehm que?
needing an ide to do anything useful with xdebug always seemed a restriction to me, I'm glad phpstorm are doing it, but I will never use it ..
ah that, yeah .. which is why phpdbg is so nice :D
06:36
@JoeWatkins you too? i.e. never used xdebug?
o.o
never, not one time, any time it is installed on development servers I remove it, any time it is deployed on production servers I look for somewhere else to work ...
man, sanitizing inputs for WHERE ... IN clause isn't easy as it seems :|
I feel better now. I thought that's only me who's never used it ..
@KarelG orly?
06:38
yes
but I have spent many hours with gdb debugging php code ... I do need to dbg like anyone else but I can't along with ide's and can't get along with something like xdebug even more ... it's massive, it has more module globals than the damn VM ...
@KarelG humour me, why is it hard?
assuming hard is the same as not easy in this particular case.
@JoeWatkins xdebug and datetime ...
should have said "not simple"
@KarelG It's somewhat non-trivial, but can be done with prepared statements :D
like, fe `WHERE foo.name = :tada AND foo.tokenRef IN ( :ref_1, :ref_2, :ref_3 )`
The `:ref_x` is assigned dynamically and can vary from 1 to N. So there is two loops, one when creating query, and after preparing, to bind data.
i used implode() first, but the interpreter reads that as a single string. keh
06:44
Ah, I typically don't use named references for IN ... I use ? place holders instead.
That simplifies it a little.
it's a large search query. Using ? might confuse the things
there are 9 possible parameters
:p
9 of which 1 is an array?
yes, from an advanced search tool. That "array", well, it's actually a checkbox list with multiple categories
the values are numeric, from 1 to 44
ikr, most answers on SO were not helpful. Not sure why these got marked as answers ...
Solved it at my own
I see, then yes, building the key => value maps is pretty much a necessity.
@Jack have you seen this asmjit project on github ?
06:50
solved that way :) Since you've suggested it, i know now that i did it correctly ^^
@KarelG :D
maybe SO should add a lmgtfy functionality
06:52
@JoeWatkins How come there are multiple similar asmjit without any fork info?
@JoeWatkins why would we need that? To translate PHP at runtime into phpcpp compatible code and then jit it?
I don't know actually, this appeared on my feed because felipe starred it, he very rarely does that so I started looking
not cpp, translate zend ops to xXX asm ... I dunno what it supports ...
yeah, that would be fun heh
how is that diff from hhvm though? because that's still a vm? :)
no it wouldn't be
not everything can be easily translated or provide any benefit when it is
@JoeWatkins isn't that a bit too much redundant ops?
06:54
what it would be is a kind of opcode cache
I had this idea before but llvm is super super complicated, this is tiny and easy
@JoeWatkins I wonder how much different it is from github.com/benvanik/asmjit
we would take those op arrays that are worth optimizing and transform them into native code ...
it has a paypal donate button, that's different heh
and more stars
same code
06:57
well I dunno where it comes from, but it's a neat project, and gave me that idea ... again .. llvm is too hard to actually get anywhere with it, too massive to keep up with or actually integrate into something like php ... where releases are monthly not every 3 or 4 years
@JoeWatkins It'd mean going the same road down than hhvm, just with another technique? Why then not just use hhvm then!?
because it isn't, because this is compatible with the entire ecosystem that is php, compatible with every extensions and the current development and deployment process of both php and everyone using it ...
It does look compact compared to llvm :)
hhvm first changed how it ran, then what ran, pretty soon it'll be unrecognizable, I don't propose we do anything but look at the possibility of using something like asmjit to improve only performance where it can be improved, without changing anything else at all ...
if it worked it could maybe be part of opcache
@JoeWatkins Does it do any optimization? (that jit?)

« first day (1272 days earlier)      last day (3898 days later) »