« first day (1645 days earlier)      last day (3296 days later) » 

3:00 PM
yes.
 
also, the video sucks
 
Anonymous
reality surprises me :/
 
Anonymous
time to get a youtube channel
 
Anonymous
and start screaming
 
Anonymous
I have been trying to get a reason to scream for a long time...
 
github.com/nvbn/thefuck <-- I would totally not hire a sysadmin anyone using this :D
7
 
I am tempted to install
3
 
Anonymous
@marcio my github repos are probably the reason why my CV is being rejected
 
func_get_args() --> get_arg_map() returning an associative array; thoughts?
 
@samaYo lol
 
Anonymous
3:30 PM
if it wasn't for the stars, I would erase them all
 
@marcio Great, thanks! Installed.
 
@DanLugg you are not alone, but I was just trying to make named args possibru:
Mar 22 at 2:13, by marcio
I think we are better served with:

list($a, $b, $c) = get_named_args('arg_a', 'arg_b', 'arg_c');
 
@marcio I just abbreviated it to "f" instead of "fuck". Quicker to type.
 
Quicker to fup :P
 
3:33 PM
@marcio Didn't think I'd be ;-) it can be accomplished with reflection, but that's bollocks
 
[Disclaimer: No, I didn't really install it…]
 
@bwoebi oh really / goes remove Bob from blacklist
 
@marcio huh?
 
@marcio ^^
 
@ircmaxell just brainstorming poopstorming
 
3:35 PM
well, named parameters happen on the sender side, not the receiver side, so I fail to see how that would work
 
So, I just disabled most of the object leak suppression
 
@ircmaxell because people raised the problem that arg names would become part of the public api
we could allow the func(a=1,b=2,c=3) syntax and implement it with:

function func($a, $b, $c){
$arga, $argb, $argc = func_get_named_args('a', 'b', 'c');
}
but that was ~60% stupid :)
 
@NikiC thanks. I hope it won't break anything… or breaks will be really hard to find.
 
it's always nice to have a commit with "Fingers crossed that this doesn't adversely
affect anything else." :-P
 
Dat optimism.
 
3:39 PM
@ircmaxell Prior experience says that changing order in the shutdown sequence usually breaks something ^^ Everything is subtly interrelated there
 
@marcio it's ok to say "shit" in this chat room
 
Anyone using Silex 2 here?
 
Anonymous
< ^^
 
@NikiC I know, I'm just poking fun :-P
 
@NikiC why do you run gc in debug mode? (in shutdown_executor)?
 
3:40 PM
@samaYo You got it working with Twig and other Symfony components 2.7+?
 
mmm ... cheeze and beer
 
yum
 
@bwoebi because we don't care about leaks in non-debug mode I'd guess
 
Anonymous
twig and doctrine yes but not with 2.7. not yet @Jimbo
 
@bwoebi For scrubs like me that always have memory issues.
 
3:42 PM
@NikiC We don't!? I thought we'd especially care in non-debug? (because multi-request cycles?)
 
@bwoebi Memory is going to be freed anyway on shutdown, so it doesn't matter what we leak there. But it's important for debug because we have leak warnings there
 
@NikiC It's freed on module shutdown, not on request shutdown?
Or am I wrong?
 
request shutdown
that's the point of the zend mm
free everything on request shutdown
 
I thought it were to have better memory management…
 
that as well ;)
 
3:47 PM
no, it's to separate emalloc memory (per-request) from pemalloc memory (lifetime of module)
 
@ircmaxell That's only to have a better memory locality I assume.
 
Is there a convention for docblocking variadic parameters?
 
no, I mean to manage it using the same process, so that extension developers don't have to manage it their selves
 
@DanLugg Yeah, but it sucks.
 
@DanLugg yes, write it like you write it in php
 
3:49 PM
@ircmaxell pemalloc() memory is anyway just going to call the libc malloc() directly AFAIK?
 
In their latest versions they support PHP's normal variadic syntax.
 
So... @param ...$args mixed
 
@bwoebi fair
 
What type should I specify? mixed, or mixed[] or array or ...?
 
It's an array?
 
3:51 PM
No, but it comes through as one
 
@param array ...$args
 
^^ that
 
Crap, why was a I loading memcached.so from my ~/Downloads dir, which I then deleted -.-
 
o_O
 
@DanLugg That's irrelevant to the docblock.
 
3:51 PM
@Jimbo because you are lazy fuck and we all know it
=P
 
public function __invoke(...$args) <-- someone please docblock this for reference.
 
/**
 * @param mixed ...$args
 */
 
Thank you kindly.
 
I think in the case of mixed specifically you can omit the type: @param ...$args. I'm not 100% sure but I think that's the case.
 
Yea, I think so too, but I always explicitly note it anyway
 
3:54 PM
Why do we still need docblock if we have a fully typed signature (except union types [which I hope to get in 7.1] and arrays)
 
Like @return void
@bwoebi Because we don't always write code for 7
 
@Jimbo also, now that I think about it, why did you download the memcached.so instead of either installing it through package manager or compiling locally ?
 
@DanLugg nobody likes writing code obsolete in a few months. // Well, yes…
 
@DanLugg Patience, young one. Enums and union types are way more important :)
 
3:55 PM
@LeviMorrison So, after the discussions we have around enums the last days… are we going to stick with the initial version?
 
Enums are sugary, but union types are fucking necessary.
 
@bwoebi For now, yes.
 
@LeviMorrison (I still hope we can drop the name property/method)
 
union Foreachable { array, string, Traversable } <-- haven't followed recently, so will this be a thing?
 
Could you please give me one reason why we'd need it? @LeviMorrison
 
3:57 PM
I'm about to take my final test for the semester and then I hope to be able to fix up the RFC and move forward to discussion phase.
 
@tereško I have two versions of PHP, the one that came with OS X (5.5) and brew installed 5.6. CLI is running 5.5, non-cli is 5.6, so they each require a different version of memcached.so. All those problems of pecl not working as expected etc... basically, tldr: I'm using OS X
 
e'nin
 
Hey @JoeWatkins
 
@NikiC thanks for the intdiv test fix… I forgot lxr somehow doesn't integrate phpt well… and searched for intdiv but found no test reference there ;-)
 
@Jimbo oh .. my condolences
 
4:00 PM
@Jimbo No… tl;dr: Stop using brew
 
Y U NO LIEK BREW
 
@Jimbo If you just were properly installing it into /usr/local/bin, there were no issues.
(because /usr/local/bin taking priority in $PATH)
 
@bwoebi I'd have to install and get everything working perfectly on it though, particularly PHPGD (which didn't come with default 5.5 on OS X because apple are dicks!)
 
Anonymous
@Jimbo if am not mistaken, homebrew is mainly useful only for running multiple versions of php, right?
 
@Jimbo fucks up things and I end up with tons of different versions of dependencies somewhere deeply nested in some opt/ directory etc.
 
4:02 PM
@samaYo That and loads of other things. I used it to install wget and other things
 
Anonymous
me $ yum install wget done !
 
I do miss Ubuntu sometimes :P
 
waaah…
 
If OS X had apt-get, it'd be awesome
 
find ~ -name "wget"
/Users/Bob/Library/Logs/Homebrew/wget
I really installed wget via brew :-(
 
looks like 7 and 7.1 will be all about bringing more types to PHP
 
@PeeHaa Browser-accepted html is good enough :-(
 
@bwoebi Whatever you say IE6 :P
 
@PeeHaa IE6? Don't care.
I don't care about any IE… If it works… by luck.
 
@bwoebi Nope neither do you care about other user agents
Othwerwise you would say:
1 min ago, by bwoebi
@PeeHaa Browser-accepted html is good enough :-(
^ that is the reason the transition away from ie6 was such a pita
 
4:08 PM
It is.
IE can f***………
 
heh .. my latest project has IE10 as minimum requirement
 
@tereško wow
 
That is nice. I support IE9 which is also doable
 
I need FormData API
 
@tereško If something works on IE it should be a side effect, not a goal ^^
 
4:11 PM
@bwoebi Just keep dicking around in c because you will never get a webdev job
:P
 
yay!
 
@PeeHaa I don't really want a frontend-dev job^^
 
I thought so, which is good for both of us :D
 
backend PHP would be okay too ^^
 
@PeeHaa is IE really still a thing? I haven't seen anyone using it in ages.
 
4:13 PM
@marcio Only every non tech person on windows
 
[Well, to be fair… I like being standards compliant, but I'm not picky about minor violations]
 
So yeah a couple still use it
:)
 
@PeeHaa really, my grandpa uses chrome or firefox because she says the other "internet" is horrible.
 
Actually it's better than I thought tbh
10%ish
 
I'm not totally insane. Just IE… Well… I don't like working on Windows which is needed to test for IE^^
@PeeHaa 0.31% :o (IE 6)
 
4:15 PM
:-)
 
Mhm… I searched for IE 5 but didn't find it…
 
poor Opera
 
Impossible that less than 0.02% of users use ie 5^^
oh… it's ie 5.5 which is 0.03%
(not 5.0)
 
Second Rikudo for Moderator.
 
Anonymous
everyone should develope in IE6. If it works in IE6, I'll work with every browser :p
 
4:20 PM
@samaYo "Firefox doesn't like my ActiveX objects! :'-("
 
@marcio yeah, it started to die off when they decided to switch to Webkit/Blink
 
@marcio msie11 is a pretty good browser
 
I am actually slightly interested to see what Spartan will be like
 
as a front end developer what i hate most now is firefox. that slow piece of shit
 
/me is using firefox (dev edition)
 
Anonymous
4:22 PM
@Worf plus crashes more often
 
@Worf looks like you do not have a lot of project manages to deal with, who all have old Safari versions on their awesome Macbooks
 
ah btw there's a new browser vivaldi.com it's made by one of the creators of opera
 
Anonymous
@tereško same here. btw weren't you a fan of Opera a year ago?
 
@samaYo yes, I used Opera since it was version 7.54
 
@tereško why would that force you to use firefox?
 
4:24 PM
@Worf I was just pointing out that your direction of hate might be a bit misguided
 
@tereško I left opera when they switched + they killed opera dragonfly and that pissed me off
 
YES
 
> Are you a keyboard person? Then you’re in luck.
 
dragonfly was fucking awesome
 
> Toggle panel ctrl+p uhhhm WAT?
 
4:25 PM
and no browser ever did keyboard navigation like opera did, sadly
 
@tereško ah lol. well, i have also a consistent number of users still using android 2
 
Guys, how does Composer auto load every file?
 
looks like android 2 will never die. they are still selling cheap phones with android 2
 
@Worf she complains about the zoom on IE mostly, she needs a lot of zoom to read - like 190% :>
 
@HassanAlthaf it's magic
 
4:27 PM
-.-
 
@marcio strange, hdpi?
 
@HassanAlthaf it takes advantage of "folders correspond to namespaces" convention
make your own autoloader (which uses namespaces) and you will basically understand how the dynamic version of composer's autoloader works
(ok, it's a bit more complicated than that, but you dont need to know more)
 
vivaldi is very promising considering it's very new. it's really slick
 
will try when I get home
note2self: check vivaldi (browser)
 
:P
 
4:34 PM
@tereško I agree that PDO or mysqli would be a better choice, but there's not necessarily a need for prepared statements. This particular question doesn't include a scenario that would reuse the query for example. — Gavin Jackson 11 mins ago
 
@Worf yea, it's very impressive and they built it all on the hipster web stack
 
@marcio lol, what is that?
 
node js, browserify, react --> vivaldi.com/#Features/4
 
nvm then, don't use vivaldi!
:D
 
@Worf I think it's promising idea. Hope they make it open source.
 
4:38 PM
@tereško would something like this work:
function autoloadPackage($name) { ... }
Whenever, there is a package to be autoloaded, the files in the specified folder which will be the same as the value of the variable $name
 
what ?
I don't understand what you are trying to ask
 
I cant explain. :/
My english sucs
*sucks
 
4:50 PM
function autoloadPackage($name, $extensions) {
    foreach($extensions as $extension) {
        foreach(glob(__DIR__ . "/" . $name . "." . $extension) as $filename) {
            require_once "$filename";
        }
    }
}

autoloadPackage('Router', array('php'));
Guys, any idea why it doesn't work?
 
What are you trying to do?
Because your name "autoload" is not what it does
 
function loadPackage($name, $extensions) {
    foreach($extensions as $extension) {
        foreach(glob(__DIR__ . "/" . $name . "." . $extension) as $filename) {
            require_once "$filename";
        }
    }
}

loadPackage('Router', array('php'));
Better?
 
No
Why aren't you just using an autoloader?
 
I am coding my own for learning purposes.
 
But that doesn't autoload anything
 
4:54 PM
spl_autoload_register()
 
Its sorta a loader
 
Sorry if this already was discussed? Have you looked at PSR-4 and the spl_autoload_register function?
 
I have looked at spl_autoload_register
 
@HassanAlthaf It's a naive manual loader
 
But I have no idea how to achieve that for the framework
 
Anonymous
4:55 PM
@Rangad he is learning, so thst's out of his scope
 
But my main aim is to do it without all those fancy stuff.
 
Fiddled around with PHP. Output:
Fatal error: Uncaught exception 'stdClass' in :0
Stack trace:
#0 {main}
 
Anonymous
@HassanAlthaf start from the basics and check spl_autoload_register() first
 
Oh, I am so stupid, i made a mistake.
Crap
function loadPackage($name, $extensions) {
    foreach($extensions as $extension) {
        foreach(glob(__DIR__ . "/" . $name . "/*." . $extension) as $filename) {
            require_once "$filename";
        }
    }
}

loadPackage('Router', array('php'));
Guys, I managed to include the files in the Router folder itself
 
no
 
5:00 PM
But, it doesn't get the files in the folder inside the Router folder.
 
@samaYo Implementing PSR-4 might be a good task when building your first autoloader implementation. It's rather short, compatible, and something one can use beyond first experiments.
 
@Rangad do you know any good place which explains that?
 
Who flagged a "" from @tereško :-(
He now has a half hour pause… :x
 
Nvm, found on youtube.
Wait, its Composer.
 
WTF
 
5:03 PM
and has a reference implementation.
 
Guys, can anyone show me an example implementation of PSR-4
 
@PeeHaa Can you revoke?
 
Nope
Assuming you mean the ban?
 
@HassanAlthaf From a 0.5 second google search of "PSR-4 example": php-fig.org/psr/psr-4/examples
@PeeHaa Yeah
Or perhaps Gordon
 
I can kick the person who did it though
 
5:06 PM
Who did it
 
I dunno :P
 
Catchable fatal error: Object of class stdClass could not be converted to string in Unknown on line 0
 
:P
 
One of the new avatars
 
Dicks
 
5:06 PM
Can we please abolish that in Unknown on line 0?
 
Thanks @Jimbo
 
yeap proper asshole
 
@HassanAlthaf No probs
 
The best I can do is saying: Dear flagger. Fuck off.
We used to be able to see the flaggers in the websocket stream but @madara killed that one
 
Anonymous
will the real flagger please stand up :)
 
5:13 PM
Anyone uses bootstrap here with Drupal? If you do, you're in for a win.
 
@VincentVerheyen What has that got to do with PHP?
 
Guys; $file = str_replace('\', '/', $file);
The \ inside ' ' escapes the second apostrophe
How can I avoid it
 
\\
fuck you markdown
 
/Applications/XAMPP/xamppfiles/htdocs/Projects/HassanAlthaf/Framework\Router\kdm‌​ak.php
Basically that is the value of variable $file
I want to replace \ with /
Thanks @PeeHaa
 
5:30 PM
ok, who was the evolutionarily challenged mouth-breathing wank-drinker that caused me to be suspended ?!
12
 
Anonymous
lol
 
I am moderately pissed now
 
Anonymous
I didn't know one-user flag could ban someone, unless you have been flagged by multiple users.
 
A mod will have done it right
 
a flagged message is visible to all chat rooms
everyone can vote on it
of course the context gets lost
 
5:34 PM
And to make matters worse. It's hard to see context
That
 
if you are really good at it , you can get someone suspended by flagging a completely innocent message
actually, I think you only need google to get someone banned for several hours
one could argue that the flags are broken
 
Anonymous
wank-drinker that had me rolling
 
Anonymous
@tereško if it's any constellation, that's the funniest curse I have ever read. I'll probably use it for the rest of my life
 
you should see me when I am completely enraged ...
 
Anonymous
I just keep reading it and keep dying
 
@Danack Admitted, it's about on the same level as this one. Just for laughs hé ;).
 
This is why I prefer to watch TB for my gaming-related news/previews
 
namespace Router;

class Router
{
    private $routes = array();

    public function createRoute($uri, $class, $method)
    {
        $this->routes[] = [$uri, $class, $method];
    }

    public function runRouter()
    {
        foreach($this->routes as $route) {
            if($route[0] === $_SERVER["REQUEST_URI"]) {
                $route[1]::$route[2]();
            }
        }
    }
}
A simple router I made so far.
 
@HassanAlthaf you might find this post useful: stackoverflow.com/a/19309893/727208
 
Yeah, man.
I just used that execution
To test
$router = new Router\Router();

$router->createRoute('/Routing/', 'LOL\lel', 'run');
$router->createRoute('/Routing/lol', 'LOL\lel', 'lol');
$router->createRoute('/Routing/hey', 'LOL\lel', 'hey');

$route = $router->runRouter();
That is how it works.
If a $route is found, then it returns the route otherwise, it doesn't return anything
I think I should return false
 
This is an AppScan question more than an asp.net question. There is enough info to recognize the specific AppScan issue occurring. Should probably remove the flag from the question. — BranLakes 12 mins ago
 
Guys, explode("/", "/Routing/");
Results to:

`Array ( [0] => [1] => Routing [2] => )`
How do I defragment the array?
 
6:26 PM
read the post .. explode is extremely limited option
 
6:53 PM
going through the flag query I failed an audit because I identified a code-only answer
I disagree with the audit's position
sigh
 
@DaveRandom for the record I had to play the middle man, because they don't really talk to each others.
 
@Tyrael uh :x But at least this worked in some way rather than not at all.
 
@ircmaxell that happens, if the answer hasn't been downvoted. Leaving a downvote will remove it from the audit list.
 

« first day (1645 days earlier)      last day (3296 days later) »