« first day (1279 days earlier)      last day (3662 days later) » 

11:01 AM
@JoeWatkins I was working with a dev; his company developed an XML API on behalf of a mutual client (sorta, anyway) and we were on the phone for awhile. Between stack traces, we were talking about PHP in general, and he started singing praises about a threading extension. It might go by the name of pthreads :-)
6
 
haha :D
that's cool ...
 
Yea, it was pretty nifty. He was really happy with how it was working out for him; he was just building toy applications, getting started with it recently I reckon, but he was loving it.
 
@DanLugg Shouldn't have to, it's generated based on composer.json, usually it's in ignore.
 
@TOOTSKI That's what I figured.
Thanks :-)
Well, I suppose I should go get ready for the day.
 
I starred that ... because me me me ... that made my day :D
The idea that it's too difficult for the kinds of people that we would actually work with just doesn't seem to be valid ... it might be too hard for a lot of people, but nobody is working with those people ...
 
11:06 AM
@JoeWatkins Too difficult? The extension?
 
yeah, well moreso concurrency in general ...
 
Nah. As an example, it appeared he found it pretty straightforward. I don't think he's a CS genius either.
He had a laugh about your docs :-P
The "because PHP" reasoning for some corner cases and whatnot.
 
It's funny when he says it.
 
hehe, you can only explain so much ... after a point the genuine reason for things is actually because php ...
shops, brb ... :)
 
Technical writing needs to be amusing to be effective (in some cases)
 
11:09 AM
Unlike RFC 2616
 
that was kinda fun ...
misses waiting at door ... brb ...
> If you have any comments, suggestions or insults please forward them to krakjoe@php.net

> Insults will be ignored.
 
Anyway, I'm going to transition from to
 
Why?
 
Check y'all in an hour.
 
Oh
 
11:11 AM
@Fabien Because society.
 
Furry
 
I'm not a furry, but I'd probably be more comfortable dressed as an anthropomorphized raccoon than in a tie.
 
heh
 
Word. Later.
 
Why this is fatal:
$f = function($x) use (&$f)
{
   printf('[%s] run once', $x);
   $f = 0;//Fatal error: Cannot destroy active lambda function
};
and this isn't:
$f = function($x) use (&$f)
{
   printf('[%s] run once', $x);
   unset($f);
};
 
11:24 AM
because the latter just deletes the local reference (parent scope still holds the closure pointer) while the former overwrites the only object reference so that the lambda would have to be deleted which fatals…
 
oh, good
so, @bwoebi what will be the way to create function that can be run only once?
(second run may be fatal, segfault or exception). I don't want to use static or global vars..
as tricky it will be - as better :p
 
Why don't you destroy variable after it was used?
 
@AlmaDo What's wrong with statics? 3v4l.org/3sl9T
 
@DaveRandom Genuine question, is that like... a singleton?
 
@DaveRandom like
$f = function($x)
{
   function __($x){echo $x;};
   __($x);
};

$f(1);
$f(2);
 
11:31 AM
But for a function call instead of object instantiation?
 
@DaveRandom nothing wrong. Just E_TOO_READABLE
 
@Jimbo Not really, when you use static local vars in an anon function there's no shared state
 
@DaveRandom but with good obfuscation.. Hm, may be add custom error handler (so hide actual error & it's place)
 
Can anyone remember how to run a specific test from the php test suite?
 
@Leigh php run_tests.php /path/to/test.phpt
 
11:33 AM
grumble I was trying to do it with make test
 
@Leigh make test TESTS=/path/to/test.phpt
 
thanks, I just had the path, no var
 
@Leigh That runs your whole test
You want --filter testThisWorks src/path/to/test
 
@bwoebi Didn't know you could do that. Never really looked at make test, is it just a wrapper around run_tests or does it do anything else as well?
 
That will run the testThisWorks() method in your src/path/to/test suite
 
11:35 AM
(too lazy to look)
@Jimbo PHP integration tests, not PHPUnit
 
Ah, fair enough
 
@AlmaDo wtf are you doing?
 
@DaveRandom I'm doing wtf
hope to get rid of this soon
 
@AlmaDo I have found one way.
You want to see it?
 
go ahead
 
11:38 AM
destructor magic ftw :-)
 
phhew.. but. it's about destroying closure when exiting inner scope?
 
@AlmaDo rephrase please?
 
What do you guys think about allowing negative offsets for strings, i.e. to return the last character of a string you could use $string[-1] - patch github.com/lt/php-src/commit/…
 
@bwoebi $f is dtored since no reference left when we're leaving inner $f scope
nice idea, btw!
 
@AlmaDo exactly
if you create a copy in main scope, then I can't help too…
 
11:42 AM
i.e. we don't do it explicitly, PHP will do it for us, so "we're not doing anything wrong" (:
 
@Leigh I want that, and I want it now
 
The trick is just to make the Closure being destroyed after it's scope is left… e.g. in the cleanup phase of that stack
 
@bwoebi and tricky "function name must be a string" hehe
 
@AlmaDo ?
 
that's not too easy to debug
@bwoebi I mean - it's good that error message is confusing
 
11:44 AM
ah okay :-D
you also just could replace it with another closure… much more evil :-D
 
what do you mean? in dtor?
 
yap
so that it executes again… but with some code which does other things…
 
I'm missing something :\
@bwoebi this ?
 
yes
 
@bwoebi yeah, I created most evil stuff
 
11:57 AM
@DaveRandom oh, this means super - putty … and not anything offensive… sorry for having validated the flag…
 
@bwoebi this :p
 
hehe
 
lolwut really, people are flagging that?
 
thanks for the idea. I just made error imminent and impossible to catch with error handlers
 
@DaveRandom yes, it really looks offensive without context…
@AlmaDo why did you need it?^^
 
12:00 PM
not me, kind of "business" requirement for key-retrieving (so do not send it more than once and die if this happened)
 
I said invalid.
 
"copy retrieved key"? no-no-no ..
 
Meh, I was just pissed because yet again it caused me to type a bash command into chat
 
@DaveRandom lol, ten flags :o
@DaveRandom next time type your ssh password here...
 
Damnit someone just gave me a Pringle and now I'm going to have to go and buy some
 
12:02 PM
fuck you superputty!
 
@bwoebi Wouldn't be the first time
 
fuck you superputty!
 
no flags? :(
ok, I'll flag @salathe
 
R.I.P. @DaveRandom
> This user has been automatically suspended for posting inappropriate content and cannot chat for 29 minutes.
 
12:04 PM
lol!
 
@bwoebi I want to send just-invented code to those who did that :p
 
hmm?
. . . waiting for next meta complain about these flags . . .
 
Someone bookmarked a good post about php books on SO?
 
there's no such thing as good PHP books
 
There's only a good programmer?
 
12:08 PM
7 uvs for this?
 
@Leri that only shows how many noobs are in
 
@AlmaDo They won't be more than
 
arguable. let's see
 
@Leri ( Im still around here... )
 
Guys I am having an issue connecting to an mssql db.

Msg 20014, Level 9, State 0, Server OpenClient, Line 0
Login incorrect.

The credentials are correct though
I can successfully login with the default user/pass
The db is on another server - One I don't have access to.
 
Is there anything stupid I should be checking?
 
@JoeWatkins I'd like to merge phpdbg into php-src before Monday (having school next week again). Tell me when I can. If you don't I'll anyway Sunday.
 
Cheers @Duikboot I will FW to their dev.
 
hmm
 
God damn it people, not impressed about that
 
12:14 PM
@Leri you're wrong. Because has 620k+ questions. The most awful is this, and this (opened). In there are 560k questions, this
and this (opened)
so noobs are definitly more newbier than noobs
 
@cv-pls LOL
You got pwnd.
 
Anyone suggestions to do this the right way?
Example where I got it from:
 
@NikiC Thank you for the PHP-Parser :)
I wouldn't trust a guy named fapbot.
 
Yeah, those Fabiens are bastards.
 
Hahaha
 
12:19 PM
@TOOTSKI What do you use it for?
 
@Fabien Porting old code to new, hopefully.
 
@Duikboot I usually follow one of the guys in heres repos for ideas on how I should be structuring something.
 
I would like to create some basic autoloading setup for a website with 3 pages or something.
Just to learn the flow and the correct way of autoloading.
 
@AlmaDo Code quality for C# is much better than for php
 
12:20 PM
correct sounds bit subjective.
 
Hmmm
 
I think what you have is fine, but I am a noob.
 
@Duikboot And? I could not make sense what you wanted to say.
 
What I said was I was looking for the correct way an autoloading setup in PHP. I tried the Fabpot example but that looks not good. != the correct way of doing it.
 
@Duikboot And what's wrong with composer autoloading? It seems everybody uses it.
 
12:27 PM
Why's @DaveRandom in the penalty box?
 
lol wtf
Did he talk about doing @lusitanian mom again?
 
No, but you were just talking about doing @Lusitanian's mom. And I suppose I'm talking about doing @Lusitanian's mom.
 
hey guys
 
12:30 PM
yo!
 
@Duikboot I have neither sound nor time to watch it. What is that about?
 
anyone experienced with facebook graph api page/insights ?
 
In this lesson, we'll again focus on workflow. Specifically, we'll use Composer's built-in autoloading capabilities, along with namespacing, to make for an elegant testing experience. We'll also review a variety of PHPUnit best practices in the process. Ready?
 
this is why america is a scary place: s3.amazonaws.com/heapdatablog/misleading3_deaths.jpg
problem: there are too many muders
solutions: change the definition of "murder"
 
@Duikboot You know I am not a big fan of tutorials (even if they are good). However, what you've written sounds good.
 
12:37 PM
So the mssql connection from our server to theres fails with 'login incorrect' but when they try it locally it works fine. Any suggestions I can send the guy?
 
sigh
 
Morning @ircmaxell
 
@DanLugg Neh. Not drunk at all :) Leave dave alone!
lol dat edit
 
Dave's not here man.
 
19 messages moved to bin
 
12:43 PM
THE PROFANITY! GOD THE PROFANITY! Nevermind.
 
@DaveRandom Did you get pringles? If so they better be BBQ or Paprika
 
@Fabien S&V, I wanted BBQ but they had run out
 
There's paprika Pringles!?
 
Hell yeah
They're AMAZING
 
Say whaaaat?
 
12:44 PM
@DaveRandom that sounds a little unacceptable to me.
 
They're half price in the Tesco over the road, presumably that's why the original packet made it into the office
 
Now I want pringles.
 
Yeh @DanLugg we get them in the UK, but we don't get "all dressed" flavour of any crisps which annoys me because those are usually pretty nice
 
Eh... all dressed are hit-or-miss to me. Some brands make em' better than others, but generally speaking they're nothing great.
 
Pizza, Paprika, Salt & Vinegar, BBQ, Salted. What else?
 
12:46 PM
@Fabien Do they still make the pizza ones, not seen them for ages
 
Speaking of BBQ flavored snacks; Bulk Barn (Canada) has a product in the spice aisle that's basically the same BBQ seasoning used on chips/crackers/etc., but it's like, REALLY good.
It's cheap as hell, and you can make your own BBQ flavored anything.
 
yummmmm... biscuits and gravy!
 
@DaveRandom Unsure but I remember them. I think it's a every-now-and-then thing. Like the Big Tasty at McDonalds
 
@ircmaxell I didn't realise you were trailer trash?
 
:P
 
12:48 PM
@DaveRandom I am not, but they have them at work from time to time, and they are always amazing
 
Gravy is the juice of the meat gods.
 
I have no idea what those things you call biscuits actually are, I don't think you can buy them in europe
 
Whenever I make perogies, I make a small pot of gravy too. Then I either douse the entire plate in gravy, or carefully open each perogy pocket and fill the empty space with gravy before eating it.
 
^^ Looks like poultry gravy.
 
12:50 PM
sausage
 
Pizza? Pizza.
 
Really? I'd have thought it'd be darker.
 
F* Shame on you guys, now I'm huuuungry.
 
@DanLugg dafuq is perogies?
 
Pierogi (; also spelled perogi, pierogy, perogy, pierĂłgi, pyrohy, pirogi, pyrogie, or pyrogy; juvenile diminutive form: PieroĹĽki also in use) are dumplings of unleavened doughfirst boiled, then they are baked or fried usually in butter with onionstraditionally stuffed with potato filling, sauerkraut, ground meat, cheese, or fruit. Of central and eastern European provenance, they are usually semicircular, but are rectangular or triangular in some cuisines. The Polish word pierogi is plural; the singular form pierĂłg is rarely used, as a typical serving consists of several pierogi. Pi...
 
12:51 PM
 
Vodka, pizza, beer, I'm an engineeeer. (few more exams)
 
1:02 PM
@DaveRandom Water is blue
 
@Leigh Maybe when you draw it with a crayon.
 
45 messages moved to bin
 
No, the natural colour of water is blue, chemically, it is blue (just very slightly)
 
today is a bin day
 
@PeeHaa git reset room11
 
1:03 PM
one bin to rule them all
 
1 message moved from bin (@PeeHaa restored context)
@Leigh Water isn't blue chemically?! We just see it blue due to the air being slightly blue...
 
@Leigh Water is not food.
 
@bwoebi it is blue naturally
 
@bwoebi It is, apparently. It was on QI and therefore it must be true.
@bwoebi gist.github.com/DaveRandom/7201629 if you don't want a flood of images
 
@bwoebi when light passes through water, wavelengths towards the red end of the spectrum are absorbed, so you get blue light left over
 
1:12 PM
hmh, kay
 
@DanLugg Add --hard
 
alias hardcore="git reset --hard && git clean -fd"
 
1
 
@Leigh I believe ozone is also technically blue, although that has nothing to do with the reason the sky is blue, apparently
 
1:25 PM
^ hahaha
the way he shakes, like as if his neck bone is hanging
 
@CSáµ  fak dat, I am europian
 
Sounds Nazi. :)
 
@tereško Tell that to your friendly neighbourhood watch Putin ;-)
 
with tsql is there a way to specify the database? connecting through clu
 
1:33 PM
@Fabien As in SELECT foo.bar FROM dbname.dbo.tablename?
 
@Fabien USE [database] ?
 
Or USE dbname (SQL standard)
 
user3303864
i've found this on my production code: while($i|$i-->1&2|3){ // code }
can someone tell me what the hell is this code means?]
 
@DaveRandom as in tsql -H foo.com -p 122 -U
during connection
 
@andre It means whoever wrote it hates readability
And also doesn't want a predictable result
 
1:34 PM
@andre WOW
 
user3303864
wtf
 
E_TOO_MUCH_BITWISE
 
@andre That is aweful
Do you know who wrote it?
 
user3303864
know, but i'm about to kill someone
 
1&2|3 will always be 3
 
user3303864
1:35 PM
*don't know
 
@andre Correct you are
 
@andre Find out and kill him/her. :p
Seriously, smells like obfuscation.
 
user3303864
all the rest of the code is pretty normal, except this line
 
-D is listed as a flag but there's no option to select that in my tsql help.
 
@andre that expression is actually while ($i-- > 3)
 
1:38 PM
for some reason, my desk is being camped by all of the project managers
 
@andre apply precedence rules: ((($i|(($i--)>1))&2)|3)
 
@DaveRandom No it's $i > 3.
 
@bwoebi Orly
@Leri The -- is significant
 
@DaveRandom yes, > has a higher precedence than bitwise ops
 
Sometimes I wish __clone() took arguments.
such that $c = clone $o($a, $b, $c);
 
1:40 PM
@DanLugg Clone your GF, she'll take arguments
 
@DaveRandom No, because php will do: $i|($i--) not ($i|$i)--
 
@DaveRandom Every argument I pass to $gf is invalid; I haven't found the API docs.
 
No tsql love? :(
 
@Leri Yes, but $i needs to be decremented or the result won't carry
 
@DanLugg there are none !!
 
1:42 PM
@Fabien Oh it's a command? No idea
 
@DaveRandom But here we have $i is post decremented. You'd be right if it was --$i
 
@DaveRandom Sad times :(
 
And a few days every month or so, it causes a kernel panic.
 
@DaveRandom oh, wrong… args
 
and wtf, my spelling. :D
 
1:42 PM
confused now^^
 
@Leri The point is not that it affects the result of the expression, but that $i needs to be altered across iterations or it won't do the same thing (probably infinite loop
 
It's while(1), boils down to while (anything bitwise or 3)
 
$gf->invoke($me->getArgument()); // InvalidArgumentException: Unacceptable format
$me->mount($gf);                 // IOException: Failed to mount
3
$ man gf
No manual entry for gf
I CAN'T WIN!
 
@DaveRandom My tests show that basically it goes down to while ($i--). Curious why (i.e. where comparison is lost).
@DanLugg That's why we have try/catch? :P
 
@Leri doesn't exit when $i reaches 0 though
You do realise that guy was basically just trolling
No-one writes code like that
 
user3303864
1:51 PM
:S i'm confuse
 
user3303864
i'm not trolling anyone, someone was trolling me
 
Well it appears to be an infinite loop
 
Question is, how that appeared in production code. Infinite loop can't get unnoticed.
 
Hi! can I use $_GET in an include? like include("./inc/navigation.php?id=1");
 
Yes!
 
1:54 PM
@MikeM. No, include doesn't make an HTTP request
 
user3303864
the expressions actually is interpreted like while ( ($i | $i--) > (1&2|3) {
 
@TOOTSKI *trollololol
 
wait so how would I be able to get a specific switch from the navigation.php
 
@DaveRandom TROLOLOSKI
 
@andre if it were, it would be $i-- > 3
 
user3303864
1:55 PM
@Leri that appeared
 
user3303864
this is why I discovered it
 
Anyone have an idea how I can do it then?
 
one.php:
$i = 1;
include 'two.php';

two.php:
echo $i; //outputs 1
 
Why does this does not end up in boolean result: ideone.com/ThCXip
 
You would just use the variable @MikeM.
 
1:57 PM
mhm does that work? lolz
not that two.php outputs an error...
 
@MikeM. "an error"?
 
ye that the variable doesn't exists in the navigation.php
 
user3303864
oh, fuck that, i'll just delete that shit
 
Then you probably have a scoping problem, and the variable doesn't exist at the point where you called include in the main script either
 
@DaveRandom if (defined(Y_U_NO_WORK)) echo 'an error';
 
user3303864
2:00 PM
@DaveRandom @Leri tks for the help. I'm really don't understand that code. I will rewrite some parts of my application...
And fire someone
 
html area of the navigation:
<?php $nav_id = 1;
include("./inc/navigation.php"); ?>
and then the navigation switch should function properly but it remains outputting the default one
switch($Nav_ID){

case 1:
?>
<a href="<?php echo($locationHome); ?>" class="menu"><li class="Selected">Home</li></a>
<a href="<?php echo($locationSubscribe); ?>" class="menu"><li class="Unselected">(Un)Subscribe</li></a>
<a href="<?php echo($locationAbout); ?>" class="menu"><li class="Unselected">About</li></a>
<a href="<?php echo($locationLogin); ?>" class="menu"><li class="Unselected">Login</li></a>
<?php
break;
default:
echo("And error occured with loading the navigation");
break;
}
 
@MikeM. variable names are case sensitive
 
Oh shit I thought I wrote it correctly xD
thanks :D
Yup now it works thanks dave
 
np ;-)
 
Any idea to make it better so I don't have to copy paste that all the time
because each page has it's own selected hover...
but my idea makes no sense because I copy paste it all the time :(
 
2:05 PM
@MikeM. Separate html from php.
 
How you mean seperate them?
 
@MikeM. Don't mix up application logic with presentation logic. Read up on front controller and templating.
 
After using [Scrutinizer CI ](scrutinizer-ci.com) for a while, I highly recommend it. It's much easier than setting up all those tools on your local machine.
 
ye but Leri I am trying my best to keep them seperated but this can't just be seperated...
as far as I am aware of..
 
@MikeM. One sec.
 
2:14 PM
@MikeM. initially I think you are talking about something like pastebin.com/z4aQN7rp
Also @MikeM. it should be <li><a></a></li>
 
not really...
if I do <li><a>... then only the text is clickable
 
I usually use foreach ($navLinks as $id => $linkInfo): to deceive myself that I'm putting the smallest amount of php possible
 
with <a><li>.... the whole box is clickable
 
@MikeM. That's not valid HTML. Style the <a>, not the <li>
 
xD
it's not the styling part it's the clicking part
 
2:20 PM
<ul><a>...</a><ul> is wrong :p
 
if I use <li><a> then only the text is clickable and with <a><li> the whole box inclusive the text is clickable
the output is still as I want it too be xD ssmailsubscription.tk/index.php
 
@MikeM. Set the a to block
 
?
 
@MikeM. Yeh, but you have your <li> styled in such a way that it has displayed area outside the <a>, you get rid of that and style the anchor
^ please use
 
you need a dose of this
 
2:24 PM
Where is @cryptic, she's always good for providing CSS examples
 
@MikeM. a { display: block; }
 
@MikeM. Usually, I do something like: ideone.com/dsF1zk
 
I am new in html and css so xD
BRB getting inside it's getting darker and cold
think it's going to rain soon
 
2:50 PM
@NikiC <3
 
It's guy love.
 
His code made me look good.
I'm such an idiot... spent few days fixing broken php-cs-fixer instead of using PHP-Parser in the first place.
nikic > fapbot
 

« first day (1279 days earlier)      last day (3662 days later) »