« first day (1276 days earlier)      last day (3655 days later) » 

1:00 PM
Looks better now. ^
 
@bwoebi eek
 
@HamZa
#DEFINE if woops
#DEFINE for rofl
#DEFINE int lol
#DEFINE printf laugh
rofl(lol a = 0; a < 10; a++)
{
   laugh(a);
}
:p
 
@NikiC I'm wondering what I've done wrong...
@AlmaDo there's one lol too much…
 
@bwoebi nevermind.. because it's lol
 
that moment when you have a variable called lol
3
 
1:04 PM
When I create nasty code inside working code, I try to use funny names so next day I know where I messed with things. :D
 
well ... this is fun
 
@HamZa I have not variable called lol :p
it's:
that moment when you have data type called lol
 
lol
 
client "dropped" on me another "requirement", which has to be implemented till, well .. "morning" is in 17 hours
 
ouch
hang in there buddy
 
1:12 PM
@NikiC is there some function to strip visibility prefixes from property keys (when fetched directly from HashTable)?
 
@tereško you should probably consider changing jobs
 
@iroegbu why?
 
@iroegbu he actually did it. he changed his job to current one
 
@ICanHasCheezburger Because developer should be the one telling deadlines(?)
 
from the sound of it the current one is a nightmare
 
1:18 PM
@Leri Lol, doesn't happen
 
@AlmaDo he could have taken another job with no clients and bull but he choose that :P
 
Good morning
 
morning, @ircmaxell
 
1:22 PM
Morning Anthony
^ Before it lays more eggs!
 
huh?
 
@tereško You still search while working?
 
1:34 PM
^ I love that answer
 
and its accepted too
 
Yeah well upvote it if you want :D I flagged it already
 
I imagine the question is going to get deleted...
 
פסח שמח וכשר לכל חדר 11!
5
 
1:43 PM
Hebrew?
 
Yup
@BenjaminGruenbaum ^
 
@SecondRikudo "Happy and Kosher Passover every room" doesn't look like the correct translation :|
 
ARGS… It drives me insane to have different passwords on php.net and github...
 
is that correct?
 
"Happy and Kosher Passover for all of Room 11" is the direct translation
 
1:46 PM
in that case, star for you!
 
google translate has gotten my local language all skewed
 
How is it possible to get an Illegal instruction: 4 (core dumped) ?!?!
 
@iroegbu and what it that supposed to be?
17
Q: What is the "Illegal Instruction: 4" error and why does "-mmacosx-version-min=10.x" fix it?

Alex ReynoldsI get Illegal Instruction: 4 errors with binaries compiled with GCC 4.7.2 under Mac OS X 10.8.2 ("Mountain Lion"), when those binaries are run under Mac OS X 10.7.x ("Lion") and earlier versions. The binaries work properly under Mac OS X 10.8.x. I added -mmacosx-version-min=10.5 to my compile fl...

 
meaning should be "I am an igbo person".
 
@ircmaxell Not the problem, found that already. (First googled, then asked ;-))
 
1:58 PM
> The "illegal instruction" message is simply telling you that your binaries contain instructions the version of the OS that you are attempting to run them under does not understand.
so that answer definitely tells you how it's possible
not why, or how to fix, just what
 
well, not really… I'm working on phpdbg… and it surely doesn't contain ununderstandle instructions… completely valid POSIX code…
 
@bwoebi instructions are chosen by the compiler. Not by the programmer (unless you are specifically breaking out into ASM).
 
Ya, still… it worked all the time before…
 
then run it through dtruss and see what systemcall is bailing on it
 
dtruss == dtrace?
 
Never heard… will try.
 
Does anyone know a good PHP blog to follow?
 
@Chintan planet-php.org <-- aggregates a bunch of good blogs
 
@PeeHaa Aaaand of course Kolink whores on it
 
@JoeWatkins experiencing weird outputs with phpdbg…
 
Thanks @PeeHaa and @ircmaxell.
 
@JoeWatkins try running the phpdbg binary (no args) and write "ev get_defined_vars()" a few times. Sometimes I get empty output, sometimes output which is cut at the top and/or at the bottom…
 
Is there any good blog like CSSTricks but just for PHP?
 
@PeeHaa sadly out of date
 
2:14 PM
We should probably make some sort of Room 11 blog :D
 
no, we shouldn't
 
@SecondRikudo he already have it
 
@AlmaDo Heh
@ircmaxell Why not?
 
non-structured and difficult to understand for those who not participated
 
@AlmaDo A blog? Where each article is a stand-alone?
 
2:17 PM
@SecondRikudo yes. blog should look like this. While our room isn't
also, this is the second reason because of which I have not blog
 
@bwoebi Yes, zend_unmangle_property_name or similar
 
@NikiC thank you
 
@ircmaxell Yeah it's not what it used to be
 
Almost 10k, I need to find some rephore-able questions :D
 
meh.. rep. means nothing here. well, 10k is needed only to read funny deleted answers or questions
 
2:33 PM
hello, how to print this &lt;p align=&quot;justify&quot;&gt;The South Beach Wine &amp;amp; Food Festival is here once again!&amp;nbsp;Is a four-day in normal html, I tried htmlspecialchars, end echo directly I got <p align="justify">The South Beach Wine &amp; Food Festival is here once again!&nbsp;Is a four-day destination
 
you already did it just now
 
I mean, I got <p alig... in the web page, it's printing the html code
instead of parse
 
Sure is a lot of places to define a max file upload size
 
@ircmaxell last syscall is close(0x5) = 0 0 not sure what I should do with that output
 
that's odd
 
2:40 PM
you say it...
I can totally reproduce it, but I have really no idea where I'd begin to write a smaller reproduce script…
And I only can reproduce it in a combination of phpdbg and @rdlowrey Aerys webserver…
 
I'm able to get a consistent and significant performance improvement ... by changing code in a branch that is not even executed by the test script :/
 
@NikiC ummm...???
letting the optimizer better optimize (or branch prediction work better)?
 
Yay… when I attach with the debugger I get totally impossible segfaults…
 
2:55 PM
Looks like I'll have to look at the generated assmebly
Because this makes zero sense
 
@ircmaxell yes and with debugger attached the process terminates normally…
 
@bwoebi can you load the core and see which call triggered it?
 
@ircmaxell okay… that helped…
the backtrace says it all…
infinite recursion in signal handler.
 
3:11 PM
there you go :-)
 
I just thought I already implemented some protection against that :x
 
user1642018
hi all.,
 
user1642018
i have a mysql query.
 
@bwoebi well, some protection isn't always the same as adequate protection in all cases. bugs are fun! Yay!
 
uh. oh. I'm accessing the PHPDBG_G() after it was destroyed… where the protection variable resides…
 
3:13 PM
lol, there's a meme in that
 
a meme? hm? :-)
 
quick question:
$reorderedCollection = [];
while ($entity = array_pop($this->entityCollection)) {
    $reorderedCollection[$entity->getName()][] = $entity;
}
$this->entityCollection = $reorderedCollection;
unset ($reorderedCollection);
would that save me memory over using foreach?
 
@ircmaxell was there any specific reason why you liked to the end of talk ?
 
@tereško oh, no, accident (I forgot to strip the hash)
 
3:15 PM
I watched it embedded, and then opened in youtube to share
 
@ircmaxell I hate destruction order. How can I guarantee that first EG() is destroyed and then only the PHPDBG_G()?
 
@bwoebi Well, it's a SAPI, so you have ultimate control over the environment, no?
 
only as long as I don't invoke zend functions which do their own things…
 
No, I mean don't destroy PHPDBG_G by anything inside of ZEND, but in your SAPI code after you tell zend to destroy itself...?
 
problem is just that the TSRM shutdown kills all and not just Zend…
 
3:18 PM
Looks weird from iPhone :/
 
@bwoebi and you can't allocate it outside of TSRM...
 
@ircmaxell the protection should be thread local
 
answer to myself: yes, it does
 
@bwoebi Ok then... I dunno without knowing deep specifics
3 rejects, and an approve, and it approves it? way to go SO: stackoverflow.com/review/suggested-edits/4572288
 
It says rejected here?
 
3:25 PM
37
A: Is there a good/robust PHP Lint or code quality tool?

ircmaxellCheck out this article... Personally, I use all of those that he lists there... PHP Metrics - Provides general overview and graphics of quality, according to different metrics like Maintenability Index, Halstead's metrics, Coupling or Cyclomatic complexity. PHP Code Sniffer - Basically ensures...

the edit definitely went through
interesting, the suggestion was anonymous, the edit was not... but identical stackoverflow.com/posts/3601071/revisions
 
@ircmaxell ya, no. One has edited. And then it goes through.
> palaniraja reviewed this 1 hour ago: Edit
 
@Gordon just dont try the same with shift ;)
 
interesting though, hadn't heard of this yet: github.com/Halleck45/PhpMetrics
 
@NikiC yeah, that's actually why I was unsure.
@ircmaxell me neither. looks nice
 
@ircmaxell shiny
 
3:30 PM
That looks pretty awesome. Got to remember that one.
Anyone that is migrating his/her codebase (partly) to Hack / HHVM yet? Or have been trying just for the sake of trying it?
 
@Machiel been avoiding it while it's not an open source project
 
PHP Sockets - Are they websockets or can connect to something like A java server?
If I want my PHP server, to send data to my java server, is that possible with Sockets?
 
@ircmaxell I can imagine, but you have to admit it is interesting to look into, right?
@user3123545 PHP Sockets are just regular sockets and sure they can be used to connect to your Java server.
 
@Machiel no argument at all. My blog is better at expressing my concerns/feelings: blog.ircmaxell.com/2014/03/an-opinion-on-future-of-php.html
 
@ircmaxell I totally agree on not moving your projects to the HHVM. Not for production at the very least.
I haven't tried moving any code to HHVM (not even for testing purposes) yet, was wondering if people did and what they encountered.
 
3:42 PM
although, a very valid counter-point (sort-of): blog.liip.ch/archive/2014/03/11/…
@Machiel I used it for a daemon process I was running (CPU and memory bound complex analysis). and it was horrible at it
it was fast, but leaked around 200mb per minute
 
Wow.
 
@ircmaxell :D
 
my solution: killing it every 3 minutes, and respawning a new worker
 
Haha, well, it's probably the most effective and time efficient solution, I guess.
 
3:48 PM
lolwtfbbq this phishing link doesn't even look anything remotely like any bank I know :P http://chudes-shop.ru/jss/index.html
 
@Machiel yeah, PHP 5.5 was rock solid on memory, just about 20x slower at this particular task
 
To be honest, I almost never use PHP for long running tasks
 
@Machiel Nobody does. cough cough @rdlowrey
 
I do did
 
I tend to solve it with a message queue and most of the time NodeJS - but that's only when I can avoid rewriting code in javascript, or any other language for that matter.
 
3:51 PM
Actually technically it wasn't long running. It'd restart itself after an hour or so for sanity.
 
Yeah, that's how one of my PHP consumers currently works.
 
I had no alternatives because I am a language noob though
 
Well it gets annoying when you have to rewrite parts of your codebase in another language just because you want to be able to run a decent daemon.
I haven't found a satisfying solution for that yet, any recommendations?
 
Afraid not, I have heard of but not tried daemon.io
Badass domain name though.
 
Haha, sure is, hmm, I'll give it a look.
 
3:59 PM
@Machiel why? If you design your APIs sanely, that hsouldn't be a problem at all
 
@Machiel what is the problem with PHP generally as daemon? You don't need a framework for that…
 
@bwoebi I think most PHP programmers are just not accustomed to writing non-leaking code
 
It's not harder than in node?
 
good point
 
Is there much out the for a starting point to learn such things?
 
4:01 PM
@ircmaxell Are you referring to the part where I mentioned rewriting the code base partly in another language, or the part where I am unable to run a decent daemon?
 
the first, because you shouldn't have much to rewrite, as you can interact with segments as services
 
@ircmaxell You are right, that's the neater way to approach the problem :)
 
you can edit old posts for a few minutes
just press the up arrow
 
Pro tip: Press the up arrow for quick edits.
Aww :(
 
Alright, I changed history.
 
4:04 PM
:-)
 
My array looks like this.  I need to make a new array that holds all member id's with total of all work done.  What is the best way to do this? I first made a new array that was simply user id with all work in an array inside it, but I dont know if thats the best route
Array
    (
        [0] => stdClass Object
            (
                [member_id] => 319563
                [work] => 0.25
            )
    )
 
@bwoebi It's not that it is hard, I usually tend to run in more problems writing my daemons in PHP than for example Node or even Java sometimes. But perhaps I should reflect that on myself instead the language.
@JacobRaccuia You mean like this? $workDoneByMember = array(319563 => 0.25); ?
 
@Machiel array(1234456 => 25) where 25 is the sum of all work
lots of users and lots of entries
 
@Machiel Probably ;)
 
You could iterate over the array and use $object->member_id as key and $object->work as value?
 
4:10 PM
 array_reduce($data, function($carry, $item) {
    if (!isset($carry[$item->member_id])) {
        $carry[$item->member_id] = 0;
    }
    $carry[$item->member_id] += $item->work;
    return $carry;
}, array())
 
How the heck do I instantiate a class only once?
 
o.O
 
@DemCodeLines only call new once...?
 
@DemCodeLines Call new only once or use a Singleton :)
 
Hnnng
 
4:12 PM
I have inc.php which has some declarations.
 
Just instantiate it once. Please don't use a Singleton.
 
including $user = new User();
I "require" the inc file on every page.
 
why do you do that?
 
How else would I access the $user data?
 
Okay, I think I may be having a heart attack a problem with git.
Now, I'm an idiot, and I have a workflow that is a combination of cli and Git Extensions UI.
 
4:14 PM
@DemCodeLines I'd take a step back and look at the code. You've gone done a wrong path somewhere. Better to sort it now than later.
 
@LeviMorrison @DemCodeLines I wouldn't make a Singleton of a User object, no ;-)
Got to go guys, night.
 
And don't Singleton
 
I noticed in the branch visualization, that I hadn't tagged my initial commit, and added one. Now, all the things are gone.
Everything that wasn't merged to master.
 
See you @Machiel
 
Is it possible to do multiple DELETE queries in one prepared statement?
 
4:15 PM
Anyone have any idea as to what happened? I'm about to have an anyeurism
 
@DanLugg Did you tag it via CLI or your UI?
 
UI
 
@ircmaxell I have never seen the array_reduce function before. what you have done makes perfect sense, but doesn't return anything. I'm troubleshooting it as we speak. I could technically just use a foreach for this as well, I think
 
I have one user class which holds all sort of data. there is a login function inside the class, which is executed by login.php and if the entered parameters (email, pass) have a match, then it gets all sort of info from the db regarding that user and puts it into public variables within the class. I then access those public variables from outside. However, I was able to access those variables up until the login page and when move forward to another page, I can no longer access them.
A quick print_r returns those variables values as empty.
 
Please, always be explicit about your initial value with reduce. If you want the initial value to be the first item in your list then extract it out and pass it.
 
4:17 PM
45
A: PDO support for multiple queries (PDO_MYSQL, PDO_MYSQLND)

Sam DarkAs I know, PDO_MYSQLND replaced PDO_MYSQL in PHP 5.3. Confusing part is that name is still PDO_MYSQL. So now ND is default driver for MySQL+PDO. Overall, to execute multiple queries at once you need: PHP 5.3+ mysqlnd Emulated prepared statements. Make sure PDO::ATTR_EMULATE_PREPARES is set to ...

 
@LeviMorrison My workflow is basically, I don't merge to master unless it's a release; I have a develop branch, off of which I create feature branches. I had 2 feature branches, and some core stuff on the develop branch. I was looking at my untagged initial commit in the GUI, right-clicked, "Add Tag". Now, both feature branches vaporized exist with no files.
 
:/ Can't help then. I'm not sure what the UI did.
 
Fuck piss ass damn hell fart
 
Alright this is pathetic.
I was assuming that since this file is being included in another file and that file already includes the inc.php file, then this file would automatically get access to it too. It didn't, so I thought I will just do a require_once on this file too. Guess what, still didn't work
 
@LeviMorrison False alarm, I did something fucky but everything was unmodified, just invisible (oddly) for a moment.
 
4:21 PM
Hell fart. I've done my fair share of those.
 
Okay, I'm closing the GUI, and zipping what I have at the moment.
@Fabien I think it's pronounced "habanero fart"
 
lol
 
Six-of-one though, eh?
 
@Fabien What do you mean?
 
@DemCodeLines Heard of SRP?
 
4:24 PM
No, nor does it make sense (assuming I am not currently using it)
 
Actually just watch this
 
ugh
fine
 
hi guys
:)
 
Hi
 
yo
sigh this isn't really helping with my problem.
 
4:28 PM
It is.
 
@ircmaxell ahh, I had to set what you gave me to the array. Duh. thanks so much for your help, this is beautiful.
 
:-)
^^ A better version
 
My problem is that the object variables have become NULL all of a sudden.
Alright how about this: Should I store the values that I got from the DB in session variables or in the class public variables?
 
Ah cool cheers @ircmaxell
 
come on
 
4:48 PM
Whats the best function to take an ID inside a multidimensional array and set that as the new key? so if its array[1] = array(id => 1234, name => 'jacob'), I'd end up with array[1234] => array(name, jacob); I know I can foreach and create a new array that holds the values, but again, I don't think this is optimal
 
@JacobRaccuia $array = array_combine(array_map(function($v) { return $v['id']; }, $data), $data);
 
thank you once again
 
... and the frontend dev added more failing code ... the joy is overwhelming
 
@ircmaxell you know your arrays
 
4:58 PM
@JacobRaccuia no, I just know my transform operations (map/reduce/combine/filter/etc)
 
@ircmaxell you know your transform operations well!
 
I am attempting to write a LinkedList class without using null at all. It has been pretty fun so far ^^
 
@LeviMorrison with sentinels?
or circular?
 
Using polymorphism and inheritance to structure a Node, HeadNode, TailNode.
 
5:11 PM
that sounds weird ^^
 
My LinkedList class was getting pretty complex and it has all sorts of conditions for checking on heads and tails, etc.
So I thought, what would it be like if I didn't have to do any of that? This is my attempt ^^
 
@LeviMorrison I mainly find it weird because changes to the list would require transformations from HeadNode to Node to TailNode.
 
0
Q: Object class variable loses its value and turns into Null

DemCodeLinesI have a class called "User" which essentially is a database that retrieves from a mysql db and contains info about the user, like name, age etc. However, I am having a problem regarding one of the public variables inside the class. The following is my code: login.php (runs after user submits fo...

 
@NikiC I am not quite sure that I understand you correctly, but I think you are thinking of something different.
class SLinkedList {
    public $head;
    public $tail;
    function __construct() {
        $this->head = $head = new SHeadNode();
        $this->tail = $tail = new STailNode();

        $head->setNext($tail);
        $tail->setPrev($head);
    }
}
 
@LeviMorrison Ah, so with sentinels after all
that's okay then :)
So, I'm installing Intel Vtune now to figure out that performance weirdness
It's driving me nuts...
 
5:18 PM
@LeviMorrison do you need to have separate head and tail classes? Couldn't you just have a single Terminal ?
 
@ircmaxell Maybe. Not sure yet.
 
I think you can... Depending on exact use-case
@LeviMorrison Also, that's a DLL. If it's a SLL, you only need the tail sentinal node
 
Yes, it is a DLL
 
then again, you know all of this already
 
@NikiC I've installed it before. What seems to be the problem?
 
5:31 PM
youtube.com/watch?v=rp8hvyjZWHs <-- my new theme song
 
:D
 
@ircmaxell That guy has an 'interesting' youtube channel. youtube.com/user/Photonvids/…
Dyson vacuum vs fire.
 
@JoeWatkins another change that will please you: github.com/krakjoe/phpdbg/commit/…
 
3 hours ago, by NikiC
I'm able to get a consistent and significant performance improvement ... by changing code in a branch that is not even executed by the test script :/
 
5:39 PM
o.0
 
and seems like the vtune install hanged up my vm...
 
give your vm more resources?
 
can anyone tell me where the hell the c++ room is
 
not here
 
^
 
5:41 PM

Lounge<C++>

Today we're daydreaming about C++26 reflection
 
@Hellovart in the Cloak Lounge.
 
@Danack
If you know, you need only ask. If you have to ask, you'll never know.
 
@SecondRikudo חַג שָׂמֵחַ :D
 
5:50 PM
/me genuinely hates Paypal pending balance and Paypal for that matter
 
Paypal sucks, but I still (have to) use it :/
 
Paypal's great for buyers......sellers not so much. They kept $2000 of mine for 6 months because they're fuckwits.
 
Last time when I got salary, there was an option for sender that he clears the payment right away so I can withdraw... now it's gone.
Interface is broken.
 
@Danack: And they have a stupid resolution center which takes ages to respond to your queries :D
 
@Danack Yeah, exactly, always something different, it's so unreliable.
 
"semantic meaning" - isn't that a pleonasm? — akled 4 mins ago
@Vartox you will generally find little laravel love in this room
 
ok, worth a try at least
 
@ircmaxell I can go find him and beat him up if you'd like.
 
@ircmaxell that is sooooooooooo epic!
 
@TOOTSKI nah, I think my slap response should be good enough ;-)
 
6:00 PM
Yeah, you have your way with the words :P
@Ocramius Калинка is obligatory :D
So guys, are there any code migration/refactoring tactics that are useful in practice in your opinion?
 
Kindle edition, nice, cool, awesome. Thanks.
It's not that bad at all, it's just "old" structure, moving to new thingies.
Currently I'm just ripping apart everything and trying to make it work part by part.
 
yeah, that book covers a ton about how to deal with that
 
@TOOTSKI Go slowly, and focus on a subsystem.
 
My advice: pick a corner, write a bunch of tests for it, then refactor it (extract method and extract class are your friend)
actually, here you go: refactoring.com/catalog
 
6:11 PM
Thank you guys, know what you're talking about, currently there are no "too long" methods, most of them are few lines, but some are even 100, the things that were complicated, but there wasn't time to make it simpler. Now, the goal for initial refactoring was set to half year (in time) and everyone agreed it's doable.
Boss said it's better we break deadline than go back to fixing a lot.
 
@TOOTSKI extract isn't about dealing with "too long", but too complex
 
@ircmaxell Yes, bad wording on my side.
> Tests - directory for tests we will never write
:D
 
:-)
 
if that gets downvoted, I'm killing myself ...
I hardly even used any words ...
 
> Interesting, but I wouldn't want to have to install this every time. Also I think the hack I present works in HHVM...
Annnnnnnnnd, kill yourself.
 
6:15 PM
@JoeWatkins upvoted, I need you to review phpdbg!
 
@bwoebi no news is good news ... I used it a bit today, played with new stuff ...
 
@JoeWatkins and it worked without problems?
 
yes, all okay, like I said nothing to report, I wasn't doing anything super complex, just walking through code ... are you gonna spend some time in windows testing, because I have no reason to be there ...
 
No I won't test windows. It seems to work there. The part for Windows is also a rather small logic, so…
 
okay if you're satisfied with that ...
 
6:19 PM
I am.
I've found some segfaults (well hidden, but still) today… will look at it later…
I'm talking about socket magic now…
 
6:40 PM
 
Hmm, I wonder... why PHP manual doesn't have a separate page listing all the format characters for date/time functions? They're all the same, but right now, it is listed in the documentation for date().
 
@AmalMurali then break it out to a separate page!
 
@ircmaxell: As if i can it'd get approved :P
 
edit.php.net
yes you can
why wouldn't it get approved?
 
Threading in PHP, interesting... and about damn time! https://github.com/krakjoe/pthreads/blob/master/examples/SocketServer.php
genuine lol ...
 
6:50 PM
How old is pthreads anyway?
 
@LeviMorrison first pecl package 2012-09-25
first commit to github Aug 28, 2012
 
/me is thinking about porting my error exceptions lib to PECL
 
5 days after I started writing that was ... I remember it was 5 days because I was awake the whole time ...
 
@JoeWatkins, uopz... You are beautiful and amazing and horrible.
 
6:55 PM
hehe ... thanks ... I think ... I'll take that whatever ...
 
@PeeHaa i've been uber-late with the responses recently but I got taht email as well
 
@SecondRikudo btw, you've produced a bug :p
 

« first day (1276 days earlier)      last day (3655 days later) »