« first day (1433 days earlier)      last day (3509 days later) » 

12:01 AM
@LeviMorrison yeah more or less
so this crazy thing is happening.. i have two ajax events. then i need to stop one from happening if the other was called
but the other one already fired before i can unbind it. :P
yeah, i know there's something wrong somewhere..
 
no way to write one ajax that will do both?
 
@reikyoushin Why are they both firing?
 
@Danack because they are two separate processes.. (one for updating my local profile storage, one for checking if i have something like a coupon or so)
 
Also that's not a priority thing - that's a 'prevent execution if this other thing has already happened' thing.
 
no, its 'prevent the first if this second thing will happen (since it is still waiting for the ajax response)'
 
12:31 AM
sounds like you want a message queue, that you can query to determine if the first thing is going to happen before the second thing does. So you would be able to queue the second event only if the first one is not queued
or something like that
 
@DanLugg yeah. a weird queue with priorities and conditions
 
12:52 AM
variable functions are case insensitive? bug?
 
1:11 AM
@CSᵠ All functions are case insensitive....? 3v4l.org/q74QE
 
@Danack thakn you, //me feels shame for lapsus
 
greetings mortals!
 
Greetings jACK
 
Hmm, Massdrop is really bad for me =/
 
 
1 hour later…
2:18 AM
Morning, Jack.
@AndreaFaulds Some of the suggestions you are getting on null coalescing...
Just... yeah.
 
PHPUnit do not cover my protected methods while I am using @covers before test.
 
@sectus You should double check that you understand what that annotation means.
It doesn't do what I expected, or what many expected.
 
What do you actually mean by covering protected methods? Are you talking about code coverage?
Tbh, I don't think testing protected methods makes a whole lot of sense
If your protected methods aren't hit by calling public methods, either you're testing the wrong thing or you have too much code :)
 
Yeah, that too.
@Ja͢ck NikiC gave me a code review and gave me some things to work on.
Hopefully will be up for vote next week!
 
Yeah I saw the comments on github :D
 
2:29 AM
@Ja͢ck , am testing public method only. But I what to see that protected method is covered.
 
@sectus Code coverage should tell which methods are hit
In PhpStorm it nicely marks all covered lines and shows a tally for each file.
 
With annotation before test method @covers class::method PHPunit do not consider lines from other methods (protected or not).
 
o.0
 
@NikiC While working on the issue with return statements in generators I found out that the check for non-empty return statements in generators is done in pass_two; should I add the other compile-time checks for return types there as well?
 
But solution from it does not work.
 
2:33 AM
Such as return; when a return type is specified? I could do it somewhere else but I am not sure which place is the best.
I can also check constants as compile errors are as well, if we want to.
Such as return 0; when a return type is provided.
Is that the best place or somewhere else?
 
@sectus Meh, I just turn on code coverage for the whole suite :)
 
You do not use @covers annotation?
 
@sectus No, few people do.
 
So, I what to be with most... : )
 
Nope; I'm probably a bad example, but I typically only run integration tests ... just because I hate spending so much time on mindless unit tests
 
2:38 AM
I like testing my data structures. I hate it when there are bugs in the data structures.
 
What data structures? I only use arrays :D
Nah kidding
 
2:54 AM
PHP: Array Oriented Programming
:D
 
3:05 AM
@Ja͢ck The code to write good, grammatically correct error messages is more complicated than most of the code to do return types :D
 
haha
knowing what to do when things go well is easier than knowing what to say when things do not :)
oh yay, my amp is ready for collection :D bbiab
 
3:37 AM
@Ja͢ck So...
function test1() : array {
}
You would think you could catch that error at compile time.
You probably could if you cared enough. Because of the way function declarations are set up, you currently can't.
 
3:56 AM
@LeviMorrison what's the error, though? Empty body?
Implicit return null; would be an issue ...
I don't think we should care that much :)
 
4:20 AM
Oh it's caught at runtime, you just can't easily catch it at compile time.
You can easily catch this though:
function test(): array {
    return;
}
 
4:45 AM
so the existence is easier to detect than the omission :)
yay, my amp is back; i can finally play with my new phono box :D
 
 
1 hour later…
5:57 AM
mini w00t
<?php
$test = new Threaded();

$test->some = function(){
    var_dump($this instanceof Threaded);
};

class T extends Thread {

    public function __construct($test) {
        $this->test = $test;
    }

    public function run() {
        /* call original closure */
        $this->call($this->test->some);

        /* set new closure */
        $this->synchronized(function(){
            $this->set = true;
            $this->test->some = function() {
                echo "Hello World\n";
                var_dump($this);
early morning voodoo ...
 
Tom
I am new to web hosting. I made a website for my client.The below is what i got from them.

Web Hosting Panel

http://68.71.137.23:9001/default.aspx

Username - XXXXXXXXXXXXXX
Password - XXXXXXXXXX

Ftp Username and Password

Username - XXXXXXXXXXXXXX
Password - XXXXXXXXXX

Now how can i go to the control panel?
 
@rdlowrey moar closure related voodoo ... github.com/krakjoe/pthreads/blob/master/tests/… u can haz members ;)
 
good morning
 
moin
 
lol, got hit by a serial downvoter
 
6:06 AM
Happy Birthday @ircmaxell
28
 
my sincerest condolences on your birthday, @ircmaxell: i.imgur.com/cMRdllO.jpg
 
6:27 AM
@ircmaxell do you feel wiser ?? I often wake up on birthdays feeling wiser ... :D
 
morning
 
oh joy
today I learned that codeigniter keeps the content of session in a cookie
 
posted on September 18, 2014 by kbironneau

/* by keksdieb */

 
@tereško =]
but why...
 
probably to solve the "what happens if we have a load balancer" problem .. the wrong way
 
6:44 AM
I totally used a 5.6 thing ...
applause
 
lemme guess .. you had a php5.6 book and you fixed a wobbly chair with it
 
hehe
unpacking actually
pretty ...
<?php
class Future extends Thread {

    private function __construct(Closure $closure, array $args = []) {
        $this->closure = $closure;
        $this->args    = $args;
    }

    public function run() {
        $closure = $this->closure;
        $this->synchronized(function() use($closure) {
            $this->result =
                $closure(...$this->args);
            $this->notify();
        });
    }

    public function getResult() {
        return $this->synchronized(function(){
            if (!$this->result)
 
@JoeWatkins strangely, I have fund the best use of unpacking is with pack() :D
 
yeah that's a good one ...
 
@Gordon To sum up: "Over-engineering is bad therefore any engineering is bad."
 
@derp I don't think he comes to that conclusion
 
and god forbid I have health insurance
 
7:11 AM
Yo
I was looking to some browser information and noticed: HTTP/1.1 ... I thought yeah ofcourse it's there but what does it acutally mean? That brought me to : w3.org/Protocols/rfc2616/rfc2616.html that page... Has someone a some clean explenation about this? :D w3.org is good for reading when you need to fall asleep.. they should fix the layout
 
@derp I think his point is more about getting lost in abstraction instead of delivering working code. It's not about abstraction as such being bad.
 
morning
 
Hi
I am confused with 2 mysql datatypes 1) char && 2) varchar
 
what's the confusion?
 
7:22 AM
As their reference shows the difference between char and varchar in the save size
if char(4) = abcdef - save = abcd - bytes = 4
but varchar always starts by 1 and counts the bytes by that so abcdef - abcd - 5
 
what is it that you don't understand?
 
while char can only handle 0 > 255 and varchar nowadays 0 > 65535
what would be better to use then?
 
depends on the use case
 
depends on how much storage you need
 
if your strings take constant amount of bytes use char
 
7:25 AM
I assume you won't use a 65535 length username.... so it would be better off using char in my opinion
 
varchar otherwise
 
oh wait
 
so char has to be constant?
 
the thing about varchar is that the data isn't stored directly in the row
 
7:26 AM
char always takes the amount you specify
varchar takes up to this amount + length overhead
 
so let's say char(4) is the datatype and I have a username: ab then the column-row would output "ab "
 
so storing "johndoe" in varchar(255) would take 8 bytes
but storing "johndoe" in char(40) will take 40 bytes
 
ah got it.
but how come varchar always start with 1 byte?
 
no, it doesn't fill the value with spaces
it's the length of the string
 
following the reference it does
 
7:28 AM
please see the link above
it has all the answers
there's a table
 
that's what I am talking about
 
yes, the first one is the value
 
second one is the value that would be the output [filled with spaces] or is my confusion there.?
 
btw, it stores length in two bytes if you use varchar(256) and up
 
quote: When CHAR values are retrieved, trailing spaces are removed.
 
7:29 AM
Hi, is anyone here a native English speaker, and is willing to help me with naming things?
 
@MikeM. please read the article, it's really worth doing so
@MikeM. you may keep up to the rule - if strings you store have constant length, then use char, varchar otherwise
 
Going to take my database designing to the max with excel ^^
that;s what I already thought XD
 
@sssilviu Not native but just ask :)
 
@sssilviu as long as we don't have to name your next kid ...
 
what would be a better name for plannedTransaction, which can be a plannedCost or a plannedIncome
I was thinking of 'forecast', but my feeling is that word is more appropriate for a collection of planned transactions on a certain time period.
 
7:46 AM
@sssilviu is there a unplanned Transaction? Is it a state of a transaction?
and a collection could be TransactionCollection
a transaction can be incoming / outgoing
 
@RonniSkansing it's not a state of the transaction, it's a different type of entity. I already have 'Transaction', which represents something that has happened, something in the past, and now I want to introduce this new feature which allows the user to make a forecast about the future transactions
 
What is the difference between a Transaction and a PlannedTransaction? Other than a transaction date?
 
@JoeWatkins seems phpdbg is broken in master, know of another way I can pretty print the active op array?
 
@RonniSkansing well, the transaction must be something verifiable, therefore it has all kinds of information regarding the payment, and the plannedTransaction is more concerned with the schedule which it has to follow
 
How do CMSes (such as Drupal) handle database login? That is, after installation, where do they store the login information?
 
7:55 AM
how much info do you need ? @Leigh
 
@Hamster have you really tried to find out?
 
@JoeWatkins pretty much the output of p e, I'm emitting 2 jumps, and I want to make sure they're using the same tmp var in their condition
 
@RonniSkansing I'm looking at the code right now, but this is slow going...
 
@Leigh crap, I don't know of anything working with master ...
 
Morning
 
7:58 AM
gdb is your only hope I think ...
 
sure, no problem, I can cross reference by hand :) thanks though
 
@RonniSkansing based on what I described, do you find ScheduledTransaction to be more clear, even if it's not prettier?
 
morning @Leri
 
@Hamster In a file.
 
Yes @sssilviu
 
7:59 AM
ok, thanks for the help. I'll use that for now
 
@Gordon Spaghetti code for the win(?)
I have not been around for a while. Is anything new going on with php?
 
@Leri it's not saying that. It's saying dont do lasagna code.
 
@Gordon .. unless enough cheese is added :D
 
8:15 AM
@Gordon Well, for web (in web I mean php/python/ruby/etc database skins) that article might be valid but.. for more general stuff, it's wrong, imho.
 
morning
 
@Fabien morning
 
@Leri it certainly depends on what you are building. but he's got a point with the astronaut architects and the geek and poke comic. I've seen enough people mindlessly advocating adding layers of abstraction for no apparent value. And I've seen people adding technology just because it's enterprisy.
 
s/point/strawman
 
Anyone ever used Cloudpipes?
 
@Leri that would be an awesome thing to make
 
@Fabien invite only beta
 
Yeah, was curious what it's all about
 
@derp so you'd rather have an ivory tower architecture than something that delivers value early?
@Fabien it sounds like yahoo pipes. Or maybe zapier.com or ifttt.com
 
Nope, but I'm also not going to throw out the baby with the bathwater. You do understand what a strawman is, yes?
 
8:32 AM
@derp a fallacy. i just dont see the article having/being that.
 
Cheers @Gordon
 
Good Morning Guys
Any Sugar folks here?
 
@Gordon could i ask of you a small favour? i've got a pending flag on this question since august =/
 
posted on September 18, 2014 by kbironneau

/* by Steve_ACUS_TO */

 
@SecondRikudo Where's our manga!
 
8:35 AM
@Ja͢ck merged
@Fabien I prefer mango over manga
 
@Gordon much obliged!
 
heh. I do like a nice cold mango drink on a hot day tbf.
 
0
Q: sugarcrm - where are the variables in include/SearchForm/tpls/header.tpl coming from

uday sagarI created a new module, SellerLeads, a copy of Leads module but changed Leads to SellerLeads wherever required. When I select some fields and click on search or clear button in list view of seller leads module, it takes me to Leads module. I found that the search form's action is set in includ...

 
8:52 AM
so it looks like some CMSes simply 'install' the database login into a php file
 
@Hamster what were you expecting?
 
@Patrick i was told this has security implications
but i guess if anything can already access scripts, there's not a lot more protection that's gonna do any good
 
@Fabien Schedule changed.
We'll probably start getting it on fridays or so
 
:( But I want it nooow.
 
9:01 AM
@Hamster just make sure they are not inside the folder that your webserver can access
 
@SecondRikudo lol
 
9:19 AM
so cakePHP and rails are hated equally?
 
Not sure which one is worse
Where tge heck is andrea? :o
 
@Ocramius probably out voting for the demise of her country ;D
 
mornings
 
Opinions: Remove dangling statements from if/else/for/while etc. (i.e. { } now required by law)
 
9:33 AM
I'd +1 that but it will never fly
 
Hi can someone suggest me.. SHA1 is best or MD5, to implement that on login and register process for my shopping site..
 
if ()
    while ()
        stuff
else
    stuff
this is a BC break with loop+else
the else gets attached to the while
 
@Leigh That's BC for the sake of new features though, whereas throwing out all blockless flow control is (some would argue) BC for the sake of enforcing style. If you don't allow unbraced blocks, it's still a BC break (i.e. it's not a solution to that problem)
 
@Gordon Thank You
 
9:37 AM
@Gordon m-m-m-m-m-multiping! :-P
 
@DaveRandom Gordonlike
 
lol
 
that's how you recognize the old UT players
 
Only the good ones.
 
heh
 
9:39 AM
I was second to none on this map.
Used to snipe from the top and just poppin' heads left right and center.
Jump down grab the redeemer and boom!
 
@Fabien I remember that one
Unreal Tournament is an upcoming first-person shooter video game by Epic Games. It is part of the Unreal series of games, and is a sequel to 2007's Unreal Tournament 3. The game utilizes Epic's Unreal Engine 4 and will be released for free on Windows, OS X, and Linux. Unreal Tournament is unique in that the development will be crowdsourced and open to contribution from anyone. == Development == Unreal Tournament was teased on May 2, 2014, when Mark Rein, vice president and co-founder of Epic Games, stated on Twitter that Unreal Tournament is back, stating, "I love UnrealTournament - So excited...
 
The new engine looks more real than unreal
 
9:55 AM
Uncanny Valley Tournament?
 
@Fabien i played that map in quake sometimes goesintohiding
 
Quake is good.
 
good mornings
 
@Fabien We've played Quake II Multiplayer levels so so so many times :)
 
concatenate sha1 with md5 like tsl/ssl .. :D or use bcrypt ..
 
10:02 AM
wut
You are aware that's essentially a collection of random words?
 
i was joking
 
resists taking bait
 
the last comaprision is awsome
 
10:27 AM
@LeviMorrison yes, otherwise you won't know that it's a generator yet
as the yield might be at the very end of the function ^^
we could of course detect this in a separate pass beforehand, but currently that doesn't seem worthwhile
 
is it bad if I use static functions frequently?
 
Is it bad if I use a hammer frequently?
Depends what I am using it for.
 
@Mr.Alien yes
 
I use for error logging, and umm db connection and so on
 
@Mr.Alien that's bad
 
10:30 AM
What @NikiC said then :)
 
so I should instantiate the class everytime I need? cuz somethings, I want to run straight away without instantiating
 
I'll read that, thanks
 
@Mr.Alien you instantiate it once and then inject it into all your other classes that needs it
@Mr.Alien this might also help blog.ircmaxell.com/2013/01/…
 
ping ping ping, thanks ;)
 
10:33 AM
sorry for the multi ping I messed up the markdown :D
 
its fine :)
wait, static functions make my variable globals?
just cuz am not instantiating the class?
 
Moprning
 
Hi frndz, I have one issue in wordpress. Plz help if any one knows ?
 
no one knows
 
@PeeHaa morning
 
10:42 AM
Mornhaa
 
10:55 AM
Sooooo I tried writing a VBScript for the first time in a while last night. This was the result of the first attempt to run it:
The computer has rebooted from a bugcheck.
The bugcheck was: 0x0000004e (0x000000000000009a, 0x000000000000eeaa, 0x0000000000000006, 0x0000000000000004).
A dump was saved in: C:\Windows\MEMORY.DMP. Report Id: 091814-15412-01.
 
@DaveRandom :D
 
7
A: Global vs static variables in PHP

decezeThere really is no difference between a global variable and a public static variable. The class variable is namespaced a tiny bit better, but that hardly makes any difference. Both are accessible anywhere at any time and both are global state. As it happens, I just wrote an exhaustive article on...

 
The ridiculous thing about it is I spent a good 3 hours pissing about with it last night, and I woke up this morning and realised all I really wanted was srvany.exe :-/
 
@Patrick thanks again, will think to instantiate instead of using static
@NikiC link is broken for aka “uncle bob”
 
11:16 AM
moin
 
@NikiC is ZEND_JMPZNZ being deprecated? AST impl. seems to not consider it for things like zend_update_jump_target()
had to add a zend_set_op_exetended_value() too, makes me wonder if support wasn't there for a reason
(the opcode itself works)
 
what's zend_set_op_extended_value?
and no, it's just not used anymore incidentially
 
something I added, to set the extended_value on an opline
 
it was only needed for for loops previously
@Leigh uh, set that directly?
 
opnum_jmpznz = zend_emit_cond_jump(ZEND_JMPZNZ, &cond_node, 0 TSRMLS_CC);
... compile stmts ...
zend_update_jump_target(opnum_jmpznz, else_start);
zend_set_op_ev(opnum_jmpznz, else_detour);
 
11:27 AM
I'd not reuse zend_update_jump_target for that
because it's unclear which of the jumps it updates
unless you need this multiple times, just dump the code in there ^^
 
ok, well that's easily fixed with some inlines
I don't know if I need it multiple times yet :D
gist.github.com/lt/398fa5dc89c1793b718a I'm happy its working to be honest... not happy about the extra shift/reduce errors, not really sure how that should be handled as a dangling else that used to be for an if can now be glued to a loop instead
 
does that mean that the change breaks BC?
 
yep
if ()
    while ()
        stuff
else
    stuff
that dangling else will belong to the while instead of the if
 
eek
another reason I get for not liking it
 
been playing with it, I'd be happy if I could keep the assoc between the dangling else and the if, but no idea how to do it
obviously not keen on a new keyword
while {} : {} :D
 
11:35 AM
why would else belong to while?
 
@Leigh I wouldn't. That'd be introducing entirely WTF behavior.
 
I know, but if you have an idea for a good solution, let me know
@blackbee because, new feature
 
Good solution would be braces.
 
A good solution is to let it break people's pre-existing code.
 
11:37 AM
I'd like to require braces everywhere and break everyones code. But I think the internals philosophy is slightly different
 
Or a different keyword: skip
 
doesn't hold the right meaning tbh
 
Just let the else assoc with the while. It's the expected behavior.
 
Skipped?
Personally, I'd rather see unless and until before loop-else
 
what would they do?
 
11:40 AM
@Leigh unless === !if
 
unless sounds like a precondition ... while ($i < $x) {} unless ($someFlag) {}
 
until === !while
 
just invert your condition?
 
unless is funny :D
 
@Leigh Requiring braces for everything but if/elseif/else wouldn't even be particularly intrusive. But still don't think that would happen ^^
 
11:41 AM
unless($x === 5) { //$x is not 5
 
But unless is typically used postfix ... $a = true unless false;
 
Yea, allowing post-conditions too
 
@NikiC imagine the outcry .. holy shit we have to make unambiguous code!, would be easy to fix with a 5->7 static analysis fixer-upper tool too
 
@DanLugg Just go use perl.
 
Perl*
 
11:43 AM
s/perl/heroin/
 
http://i.stack.imgur.com/1uQ1S.png
 
@Ja͢ck timtowtdi
 
@NikiC It's 2014. If your block constructs are braceless, you're either crazy or using PHP.
 
or python
 
lol
I already said "crazy"
 
11:50 AM
@DanLugg does that imply that users of nearly all other languages are crazy, whereas php users are not?
 
@derp could be said for PHP as well :)
 
I find that offensive
 
anyway, here's the patch so far, relatively unobtrusive github.com/lt/php-src/compare/loop-else?expand=1 - off for a coffee
 
@DanLugg pfff... crazy awesome
 
@NikiC lol
 
11:51 AM
I prefer Rust's approach where the braces are required, but the parentheses aren't
 
@NikiC let's remove if/elseif/else and force everyone to use polymorphism
 
Now we're talking :D
 
Stop thinking large and remove global; =]
 
@Gordon Probably should remove switch {} as well.
 
@Ja͢ck you need it in factories though
 
j0h
11:57 AM
Hi Guys,
Im trying to get the pixel values at the points around a circle. but I get out of bounds errors. I get why it happens, but i dont know how to fix it. I need the center point to be the center of the image rather than point 0,0
http://pastebin.com/EEt6CXX3
 
@j0h You're not offsetting $ax and $ay.
Should be [center.x + ax, centre.y + ay]
 
j0h
ok
Thanks @Ja
@Jack
 
Sep 18 '13 at 14:28, by Alma Do Mundo
user image
6
:-D
 
Good morning
 
12:11 PM
Lovely
 
yay, now a year has passed ..
we're getting older
 
Gratz! @ircmaxell
 
well done on another year not dying
 
^ Yyeeah!! (:
So everyone, who's in doubt and, when it's birthday date - is thinking of "what did I achieve past year?" - may start with "at least, I'm alive!"
 
12:18 PM
@AlmaDo So it's just like any monday?
 
@PeeHaa not sure. Since holydays != sunken-drunken for me :p
@PeeHaa btw, I found another one for you too (:
but it's not right time now :p
 
Should I ping you again tomorrow? :P
 
@AlmaDo Moved yet?
 
12:34 PM
@Fabien hm, no. I'm expecting approval from Germany side for my Blue card. They promised to give their resolution tomorrow. And they were very friendly + they liked my profile as a specialist. So, they said that most likely, I'll get my visa this week. If so - then next week, I'll move
 
Coolio
 
yeah. Truly nice to see that such question may be resolved within 4 working days (so, all needed queries to my employer, government structures etc) - and to compare them with only passport procedure in Russia which takes 45 days ..
ugh
So main time killer - were our government side (I've payed around $1000 to "hurry" passport process till 15 days)
 
Germans, being noted for their efficiency? I find that a highly surprising thing to occur.
 
Well, in comparison to our side - they are
I'm counting days. 4 days for full process (of course, if they'll succeed this Friday) - is much better than 45 days per only one document
 
j0h
12:51 PM
I lived in De in 2005. Processing time was like 3 days.
I was like sup germany. can haz visa?
then they were like what is the nature of your stay? And i was like dude, i want to make 830 sitzplats for fancy airplanes.
Then they were like you want to pay 16% tax on tools you already own?
And I was like nah.
 

« first day (1433 days earlier)      last day (3509 days later) »