« first day (1528 days earlier)      last day (3411 days later) » 

2:00 PM
this feels so much like an invitation ^^
 
(:
let's ping him. every 5 minutes :p
 
so ... I have one of those chairs with the gas thing in it that lifts the chair up ... it keeps going down, does this mean new chair ?
 
It does. :)
 
that sucks, this chair is less than 6 months old ...
 
2:16 PM
@JoeWatkins not necessarily. it could also mean that you should call the chairs tech support. at least I would do that first. otherwise put in some wood so it can't go down any longer ;)
 
doubt there is a technical support line for chairs ... it's not a super technical thing ...
we don't have receipt either ... so can't return under warranty ...
 
hey guys. Short question on SO. If I delete the social media account to which my SO-Account is linked, will the SO-Account also get deleted?
 
@ThomasDavidPlat @Gordon is probably the one to ask
 
Thanks :)
 
@ThomasDavidPlat not deleted, but you won't be able to login anymore
 
2:25 PM
damn, I'm having a hard time staying awake today..
 
@ThomasDavidPlat no, but unless you add another mechanism to log into it you won't be able to log in
 
@Naruto Have you tried meth?
 
lol
 
well, first thing I would try is to take a nap probably?
 
@PeeHaa not every country like yours allows drugs all over the place ;)
 
2:34 PM
nowhere allows meth !
 
now-here or no-where? ^^
 
Speed is supposed to be pretty effective. Certainly worked for my old knob-jockey upstairs neighbors.
 
Methy Christmas and Smacky New Year
 
@DaveRandom Should have taken a look by myself before asking :D Thanks
 
@ThomasDavidPlat recommend creating an SE account, that way you won't ever run into this issue. I generally use Google to log in but I have an SE account for "backup"
 
2:37 PM
That's what I'm going to do :) thank you
Facebook has no longer power over me. This is my own private domicile, and I will not be harassed!
 
morning
 
@ThomasDavidPlat I imagine you will, it just won't be FB doing it any more.
@RonniSkansing Yo dawg, I heard you like Christmas so I decked your halls with boughs of holly
 
lol
Smacky xmas and methy kraky new years to you =]
 
YESSSSSSSSSSS
IT WORKSSSSSSSSS
 
The meth?
 
2:43 PM
?
@DaveRandom lol
 
Or just your "S" key?
 
// test.php

<?php

function test() {
    echo "hello, world\n";
}

// command line

$ sapi/cli/php -r 'spl_autoload_register(function ($name) { include "$name.php"; }, true, false, SPL_AUTOLOAD_FUNCTION); test();'
hello, world
dances
 
wow, drupal 7 would benefit so much from this! /s
 
w00t @AndreaFaulds
 
@AndreaFaulds Presumably the file is actually called "test.php"?
otherwise that would be extra magical :-P
 
2:45 PM
so it didn't work?
 
No, it did work.
@JoeWatkins Now that it works, I just need to make it clean :)
 
See you in a year or two
 
Hah, no, it's not really that messy as-is.
 
one question: why?
 
@AlmaDo Why add function autoloading? Because utility classes are dumb, I just want functions to work
Why should I have to do ajf\GGON\Parser::parse() when it could just be ajf\GGON\parse(), for example?
 
2:47 PM
presumably it actually receives the FQN?
 
@DaveRandom What, the autoloader? It does exactly the same thing class autoloading does (shared implementation), so presumably yes.
 
it will
(because no distinction really, because namespaces aren't real things)
 
@JoeWatkins I think Dave means FQ name as opposed to relative
Oh god, I just called you Dave, Chris, @DaveRandom.
 
there are no relative names at runtime though is there, by runtime, relative names are resolved because namesapces are a compiler hack ...
 
@AndreaFaulds Slightly leading question. It bugs me that if I do $foo = '\Bar'; $bar = new $foo; the autoloader is called with '\Bar', whereas if I do $bar = new \Bar; it gets 'Bar'. Any chance of "fixing" that for 7?
 
2:50 PM
Oh, good point.
@DaveRandom Interesting. I'm not super-familiar with how autoloading works, but I'm sure that could be fixed, it'd probably because the whole autoloading infrastructure assumes it's passed valid class names from the Zend Engine (and I guess we don't sanitise new $foo)
 
@AndreaFaulds It's fine. @Jimbo has done it to me inperson
 
I wonder how many people think my name is actually Mx. Taze T. Schnitzel.
 
Mx?
 
I like "Schnitzel"
 
2:52 PM
I actually genuinely got post addressed to "krak joe"
7
 
@DaveRandom Obscure modern gender-neutral title (I wanted to avoid using Mr/Ms there specifically, though I think I've always thought it sounded more male)
@JoeWatkins ahahaha
 
@DaveRandom you're going to make Nikic angry....
 
I regularly do, I think
 
@NikiC someone is afraid to ping you ^
 
....
 
2:53 PM
:P
 
@AndreaFaulds Sounds more mail to me
*ba-dum-tish*
 
@DaveRandom Taze is a perfectly cromulent male first name. But that may just be cultural assumptions. I always assumed the whole Schnitzel character was male, but male is the default in our culture.
@DaveRandom har har har
 
I love obscure DNS jokes
 
wait what? DNS joke?
I just got whooshed
 
@phpcodemonkey has a T-shirt that says "DNS: it's a real bind" on it. Want.
@AndreaFaulds mx/mail
 
2:56 PM
Yay, got on the bus
 
@DaveRandom oh. hah.
 
@Fabor don't have 'em today
 
@DaveRandom People who write '\Bar' to use string class names deserve everything they get
 
ogod
I'm evil
 
And I think I want that shirt too
 
2:57 PM
I just had a godawful idea
 
yeah, I want the t-shirt too
 
Do tell
 
@NikiC true
 
let's make a kickstarter?
 
2:57 PM
@tereško Gimme a sec.
 
@Danack Sadly I got to run now, so no time to get properly angry with @Dave
 
@JoeWatkins I didn't know it was your thing...
 
Gives me a file download?
 
bit evil looking
I really cannot type today
 
@JoeWatkins the girl?
 
dafuq is a worrible?
 
<?php

const ESCAPES = ['e', 'f', 'n', 'r', 't', 'v'];

foreach (ESCAPES as $e) {
    define($e, eval('return "\\' . $e . '";'));
}

echo 'hello, world', \n;
 
lol
 
brb making Composer package
 
3:02 PM
does that... create a namespace for each element in the array?
 
don't, please, people will use it
 
@FlorianMargaine It creates a constant for each
 
@FlorianMargaine no, it creates constants with a value of the escape sequence they represent
 
@DaveRandom precisely :D
 
So you can use escape sequences bare
 
3:03 PM
@DaveRandom
 
@DaveRandom meh, there's an "uninstall plugin" for wordpress
 
@AndreaFaulds "How to break a leg with PHP. Second edition."
 
Instructions for use: Each super soft and squishy Worrible is genetically engineered to be in tune with human anxiety, fear and doubt. Grab one, give it a squeeze (5 seconds or more) and your problems will be absorbed into to the Worrible’s own body and subsequently converted into a calming excretion. Repeat whenever overwhelmed. - See more at: creaturesinmyhead.com/updates/2011/worrible-wants-hugs/…
 
@DaveRandom I don't get it
 
3:04 PM
@FlorianMargaine it does define('n', "\n");
 
Look at the echo example
 
People? Hell, I might use it myself
 
brb actually making composer package
 
:D
 
3:05 PM
I don't get what \e, \f and \v are for though
 
@AndreaFaulds it should create \xNN sequences (case-insensitive) as well, if you are going to actually do it
 
\n \r and \t I know them... not the others
 
@DaveRandom Yeah, I'll do that too. Hadn't thought of using the case-insensitive option, good idea
 
\e is an ASCII "ESC", \v is a vertical tab
 
@FlorianMargaine Most of them aren't used much
 
3:06 PM
not sure about \f off the top of my head
 
\f is form feed IIRC
 
@AndreaFaulds only for the hex literals though
 
@DaveRandom ofc
 
god, why I am I helping???
 
@DaveRandom >:D
 
3:08 PM
@AndreaFaulds I'd mind less if you were talking about actual language support, it's the wtf factor of adding things that look like language constructs with userland code that bothers me
 
@DaveRandom that sounds like lisp
love it <3
 
{
    "name": "ajf/escape",
    "type": "library",
    "description": "Bareword escapes!",
    "keywords": ["dear", "god", "why", "would", "anyone", "ever", "use", "this"],
    "homepage": "http://github.com/TazeTSchnitzel/escapes",
    "license": "MIT",
    "authors": [
        {
            "name": "Andrea Faulds",
            "email": "ajf@ajf.me",
            "homepage": "http://ajf.me/",
            "role": "Developer"
        }
    ],
    "require": {
        "php": ">=5.3.0"
    },
    "autoload": {
 
@AndreaFaulds 5.3? I thought constant arrays only worked since 5.6
 
@FlorianMargaine I'm removing the constant array
 
3:10 PM
:(
 
I think the entire PHP community (except for 5.2 users, they aren't real people) should be able to benefit
 
Yeh, it can be done without polluting the symtables with anything else, you just need a list of define() calls, which would also be the most efficient way to do it #NanoOptimisation
 
oh wait, 5.3 doesn't have []
But, I believe in compatibility!
So I shall suffer.
 
I do not believe if compatibility with 5.3. It's akin to maintaining Win XP support.
/me needs to stop avoiding work and dig into the SOAP
just cannot bring myself to do it though
 
@DaveRandom using case-insensitivity is bad actually, that'd allow \XAB
 
3:16 PM
ahh yes
Have to define all possible permutations then, which sucks
 
what's wrong with \XAB?
 
so what I'll do is produce every possible case permutation
@FlorianMargaine not valid escape sequence, only lowercase x is
 
@DaveRandom I can just assume nobody mixes case
allow xAB and xab but not xAb or xaB
Oh, wait, I know. I'll use array_unique...
 
@AndreaFaulds My view is that this should just be a huge list of defines, so you only need to generate a list once
 
3:21 PM
@AndreaFaulds could you add the zalgo keyword to your package?
 
@DaveRandom hahaha no, generate ALL THE THINGS!
@FlorianMargaine maybe
YES, it works :D
<?php

function applyCaseBitmask($string, $bitmask) {
    for ($i = strlen($string) - 1; $i >= 0; $i--) {
        $string[$i] = ($bitmask & 1) ? strtoupper($string[$i]) : strtolower($string[$i]);
        $bitmask >>= 1;
    }
    return $string;
}

for ($i = 0; $i < 256; $i++) {
    $h = str_pad(dechex($i), 2, '0', STR_PAD_LEFT);
    $case_permutations = array_unique(array_map(function ($n) use ($h) {
        return applyCaseBitmask($h, $n);
    }, range(0, 3)));
    var_dump($case_permutations);
 
you know, sometimes, I'm very glad that I don't work with you
 
Why? That's a quite elegant solution to the problem
Not the most efficient, but it's straightforward
 
I guess... I guess the domain is complicated
 
@AndreaFaulds it should be the output of 3v4l.org/jv844#v540 or preferably just 3v4l.org/tlbTF#v540
 
3:36 PM
weird... works on hhvm 3.1 and 3.3, but not in 3.2
you have compatibility with php 4 by using array() instead of [] btw!
 
I am pleased to announce escapes v1.0 - get it on Packagist!
@FlorianMargaine PHP 4 didn't have namespaces ;)
 
you use namespaces?
@AndreaFaulds missing tests!
 
@FlorianMargaine who needs tests
@FlorianMargaine well the whole \n thing only works because of namespaces
 
but tests are webscale!
 
on PHP 4 you could only do plain n
 
3:42 PM
@AndreaFaulds oh
 
pls star my announcement above for visibility
I think we can all agree this is VERY important
 
love the commit message :P
 
@FlorianMargaine alas, GitHub truncates it. They can't handle the awesomeness
 
<?php
require 'vendor/autoload.php';
echo 'In Europe, they use ', \xE2, \x82, \xAC, ' (the Euro)', \n;
it works!
 
:-)
 
3:49 PM
@AndreaFaulds typo in your readme
echo 'I', \t, 'love', \t, 'tabs!, \n;
you forgot the closing quote after "tabs!"
 
@FlorianMargaine Yeah, and the first PHP is redundant. Might update it, might not...
 
did you delete it? :(
uh, no
 
@FlorianMargaine I readded it to packagist twice to fix some issues
 
turns out git and related ecosystem tooling handle tag case-sensitivity inconsistently
 
3:58 PM
uuuh I only use numbers and dots in my tags :/
 
Annoying things: Packagist/Composer only like v1.0 but I'm used to a (non-PHP) project which used the V1.0 convention :/
 
@Ocramius Okay no worries, let me know when you do. Hopefully just a simple Doctrine thing.
 
@Fabor ask on IRC: I'm in class atm
 
heh. Okay will do cheers
 
Teaching or being taught?
 
4:07 PM
zeh first
 
alright guys! 2 weeks vacation for me :) cya soon :)
 
Hi @WebEx, thanks for forcing me to REBOOT in the middle of a class that I’m teaching after 35 days of uptime.
awesome tool is awesome -.-
 
Did you tweet it while the class watched?
Valuable lesson in user feedback. The public shaming method.
 
35 days? sounds p good
 
4:18 PM
@Ocramius you probably will love this article coding2learn.org/blog/2013/07/29/kids-cant-use-computers
 
Hi i have the dumbest question of them all
why when using htmlspecialschars on a string , let's say this
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; // &lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;
and when echoing it in a text input instead, i see the html characters as plain text ?
in a input of type text i will see this <a href='test'>Test</a> and not this &lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;
 
@Joseph I you want to see &lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt; you have to escape it twice ;-)
But I don't know why you would want to.
 
what do you mean by escape it twice ?
 
htmlspecialchars(htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES), ENT_QUOTES);
 
@kelunik okay
@kelunik Thanks
 
4:32 PM
> Without reference to Wikipedia, can you tell me what the difference is between The Internet, The World Wide Web, a web-browser and a search engine?
what's the difference betwen the internet and the www? the www is just http while internet is tcp/ip?
 
www is just http
 
@kelunik is there anyway to tell if htmlspecialchars or another escaping function have been used on a string ?
 
@Joseph What are you trying to achieve?
 
@NikiC why are you separating property from propertyproperty?
it feels weird, and arbitrary. Can you give me an example of when there would be multiple propertyproperty's in a single property?
 
4:35 PM
@kelunik nothing really, just trying to understand how all this works
@kelunik can escaping be achieved in functions (non hand written ) other then htmlentities and htmlspecialchars ?
 
@Joseph Why do you want to use other functions?
 
@kelunik because somewhere in the code my data is being escaped and i am trying to find out where . I know for sure it's not using one the two nor manually
 
@FlorianMargaine the World Wide Web is an Internet application. The web browser is a World Wide Web user agent. The search engine is a World Wide Web application.
:)
 
@NikiC also, can you change this: github.com/nikic/PHP-Parser/blob/master/lib/PhpParser/Node/Stmt/… to merge the properties as well? so array(...) + $subNodes otherwise I need to manually add custom subnodes after...
 
4:47 PM
@Fabor pretty cool
 
/me wonders whether @Fabor ever does any work
 
@DaveRandom :D
 
@kelunik can escaping be achieved using css classes ?
 
@Joseph nope.
 
@kelunik some sort of char set then ?
 
4:58 PM
@Joseph nope. There has to be some code that does escaping.
 
@Fabor Shiny!
 
posted on December 22, 2014 by kbironneau

/* by h9k */

 
@Ocramius related ^
 
5:14 PM
hmmm...
I need to figure out how to initialize properties
 
Carefully
 
Any hints on how to implement "login attempt limit"? :-)
 
@webarto How far do you want to go?
 
@kelunik how about this sprintf () ?
 
5:19 PM
@PeeHaa how the f*ck did that actually work and not kill anyone
 
@PeeHaa All I can do is poor man's version and I don't like that. Not sure where it belongs, I'm sure it's not in "validation"...
 
@DaveRandom I'm not sure, but I do know I want to try it out!
 
@PeeHaa Holy smokes! :-)
 
@Joseph Hard to find an issue if you're not providing any code. You just have to look where your string is printed and escaped.
 
1 message moved to Orphan GIFs
Entering the gif bin.....
> Loading Orphan GIFs
Just a second…
One second my arse :P
 
5:23 PM
It crashes the internet.
 
@AndreaFaulds I hate that there's a 'v' there at all.
 
@webarto I think I would have facade kinda thing to handle it, because depending on what you are doing you can do a lot of stuff
@webarto It sure does :)\
 
@LeviMorrison Vertical tabs are AWESOME!
 
@PeeHaa That, that (multiple user types, multiple "login" points), any code so I can figure the f* is Facade in this case?
 
@Fabor yeap, why so?
@tereško read that one last year, I call it the "Kindergarten effect"
 
5:26 PM
@webarto Just some public "interface" which handles the entire throttling for you. I.e. it decides whether to throttle ip, start using a captcha for ip, start using a captcha sitewide when the shit hits the fan
brb food
 
@Ocramius Sorry had headed home from work. You're free or nay?
@DaveRandom BTW my wife was away again last weekend. She left on Friday, by 9am Saturday I had food poisoning. :-/
5
 
@Fabor you should just ask. Did you already try on the IRC channel? I'm likely busy until later today
 
5:41 PM
I did, no response but I am in no rush, so it can wait until you're more available.
 
did you just try asking in #zftalk? There are a lot folks active at this time of the day afaik
 
Hadn't. I'll give it a whirl. Cheers
 
5:53 PM
@Fabor gratz
 
Yup. Maybe I really can't cook.
 
Stop eating car tires.
 
heh. It was a pizza. And it was really more the fault of the somewhat broken oven than me.
 
I suspect people casting cv votes in C++ just blindly follow other votes.
This now has 4 cv:
28
Q: What is the endianness of binary literals in C++14?

Levi MorrisonI have tried searching around but have not been able to find much about binary literals and endianness. Are binary literals little-endian, big-endian or something else (such as matching the target platform)? As an example, what is the decimal value of 0b0111? Is it 7? Platform specific? Somethin...

At +28 with an answer of +50 with no dup I doubt it's close worthy.
I think they are saying that because "There is no endianness in C++" that means it is off topic (or something)
In this case "Unclear what is being asked" is almost certainly not true.
And yet again this shows why being unable to cast "don't close votes" is desirable.
 
we can, they are called close-votes
 
6:19 PM
Hello guys
 
6:47 PM
nvm im dubm
 
99% of my irc experience is watching people enter, leave and idle out.
throw in the odd name change.
 

« first day (1528 days earlier)      last day (3411 days later) »