« first day (1566 days earlier)      last day (3364 days later) » 

5:00 PM
E_SUBJECTIVE ;-)
 
How do I parse malformed HMTL?
I'm currently using Simple HTML DOM Parser, but it can apparently only parse valid HTML.
 
@Gordon Huh, cool. I'll tweet that
 
@AndreaFaulds ^^ No you didn't, you repurposed my phrase about multiple return types.
 
user895378
@DanLugg GET HIM! PITCHFORKS AT THE READY!
 
@PaulCrovella I'm totally cheer leading for that idea. It has a solid chance to pass. Specially because of the SPL types part.
 
5:01 PM
@rdlowrey WHEN I'M DONE GUSHING MAN-TEARS OVER THE BUDWEISER COMMERCIAL, LET'S FORM A MOB!
 
user895378
@DanLugg Oh goodness I haven't seen it but you're at least the third person who's said this about the Budweiser commercial. I'm afraid to watch it now. Don't want to baptise the mountains with my tears.
 
@AndreaFaulds :)
 
Levi, if you need protection, you can hide here in Scotland. You'll be safe from Dan and... the other Dan
 
@rdlowrey lol, it's not that bad, but it is a jerker.
 
5:02 PM
So many Dans
 
user895378
/me proposes a rename of "Room 11" to "Dan Manor"
 
^^
 
Also, I like how there's both Marco and Marcio
Dan Dan Dan Marco Marcio Nikita Nikita
I remembered there's a third Dan(ack)
 
user895378
We need to start recruiting participants by their name's levenshtein distance from existing users.
2
 
ThW
@ThatBrazilianGuy PHPs standard DOMDocument can repair a lot of bad HTML
 
5:05 PM
@marcio If you want to run with the idea, by all means have at it. I think it's good, at least conceptually. My concerns are mostly about politics and implementation, and I'm not the right person for either (I don't hack on core, I live in userland.)
 
@rdlowrey Actually, if you watch the 2014 one followed by the 2015 one, it'll probably wreck your shit.
 
posted on January 29, 2015 by kbironneau

/* by chescales */

 
@ThatBrazilianGuy You could stick htmltidy in front of it first? (for particularly severe cases)
 
@rdlowrey xD
 
user895378
@DanLugg Oh the one with the "Landslide" song in the background? That one gets me every time.
 
user895378
5:06 PM
Maybe that was 2013 I don't know ... it all runs together when you get old.
 
Ok, who knows good way to check objects on equality (equality means properties equality, not "same instance" equality) in phpunit, if I want to exclude some props names?
 
Oh man
What if...
What if I wrote an asm.js to PHP compiler?
 
@rdlowrey True, 2014 is "Let Her Go" by Passenger
 
What if I wrote an asm.js to PHP compiler, so you can translate your PHP interpreter into C then into LLVM IR then into asm.js then into PHP so you can PHP while you PHP, dawg?
Oh wow, that'd be like the worst best use of scalar types...
 
ThW
@ThatBrazilianGuy This answer is a really good starting point stackoverflow.com/questions/3577641/…
 
5:09 PM
It'd also perform significantly better on HHVM than in PHP 7 ;)
 
> DOM is capable of parsing and modifying real world (broken) HTML
Hm... Thanks!
 
@PaulCrovella I could try a glued implementation first and see how it would emerge. This is more important than the other RFCs I have in mind because it requires to be voted on a major version.
 
ThW
@ThatBrazilianGuy That means the native ext/dom, not the PHP library SimpleHtmlDom. The library does not really implement DOM (the W3C standard)
 
Yes, I noticed. I relied on SimpleHtmlDom instead of the native DOM because it's easier and I suck very much and can't code
 
5:14 PM
@marcio shhh, we do not speak of The One Who Shall Not Be Named here, Ḧ̷̖̠̳̪͚͕̱́̑́͂ͫͭͧ̅̑͒̇̾̊̓ͦ͐̚͠Ĕ̃ͧ͂͊̊̐̓̔͑ͪͨ͆͛͌̈͋ͯ͜͠҉̨̧̖̲̮̥̘̣̯̻̞͍͙̙͕̙̬̟̱ ̹̩͔̞̥͚̺̼͚̳̰̱͉̀̏ͤ̉̅̈́͆̏ͧ́͜͢C̶̡̬̰͎̙̞̙͙̣̀͐̀̄͊͌ͥ̌ͭ̿͛ͪ͆̆̐ͭ͆̾̕O̸̴̝͕̥̬͉̪̻͕̞̦͓̗̦̣̲̎̾͑ͣ̃ͦ̚‌​̜̭͓M̨̧̠̹̗͓̞͓̫͍̭͍̣͋̌̍ͬ͐̒͐̂͌ͫ̆ͮ̀͢͞Ȩ̨̬͙̯͈͕̖̩̜̰̭̦͎͉̭͕̻̘̮ͨ̓͋ͥ̏̉ͩ͢͟͠S̾̊͛̎ͮ̑͊̄ͣ̈́ͭ̇̌͛ͥͥͧ‌​̵̷̵̞͚͇̣̖̮̠̦͎͚̰̼͇̼͈͎̱̀͜
 
@AndreaFaulds we have to get rid of the default phar stub
 
Yes, that looks genuinely awful
 
it creates global vars like $a, $b LOL
 
I wanna post this in lolphp
 
+ I'm pretty sure this is a web shell:
        static function go($return = false)\n{\n$fp = fopen(__FILE__, 'rb');\nfseek($fp, self::LEN);\n$L = unpack('V', $a = (binary)fread($fp, 4));\n$m = (binary)'';\n\ndo {\n$read = 8192;\nif ($L[1] - strlen($m) < 8192)
{\n$read = $L[1] - strlen($m);\n}\n$last = (binary)fread($fp, $read);\n$m .= $last;\n} while (strlen($last) && strlen($m) < $L[1]);\n\nif (strlen($m) < $L[1]) {\ndie('ERROR: manifest length read was \"' .\nstrlen($m) .'\" should be \"' .\n$L[1] . '\"');\n}\n\n$info = self::_unpack($m);\n$f = $info['c'];\n\nif ($f & self::GZ) {\nif (!function_exists('gzinflate'))...
;
xD no web shell, of course, but looks like.
 
user895378
5:20 PM
Hey @Fabor can you access the raw request headers sent by one of the clients that can't handle that URI you gtalk'd me?
 
user895378
And part 2: If yes, can you post the raw request?
 
user895378
@AndreaFaulds The pony? He comes. The </center> cannot hold.
 
@marcio It'd be interesting to see at least. I didn't get much other feedback on the gist, perhaps what you come up with would get more eyes.
 
4428
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

 
user895378
the ichor permeates all my face
 
5:27 PM
> If you parse HTML with regex you are giving in to Them and their blasphemous ways which doom us all to inhuman toil for the One whose Name cannot be expressed in the Basic Multilingual Plane, he comes.
THE ONE WHOSE NAME CANNOT BE EXPRESSED IN THE BASIC MULTILINGUAL PLANE
 
@AndreaFaulds Thanks! ` $tidy->cleanRepair();` did the trick ;-)
 
user895378
Dear sweet baby Je: please grant me the ability to upvote that answer multiple times.
 
@ThatBrazilianGuy Oh, awesome! Was it something DOM was struggling with?
@rdlowrey I know, right?
 
user895378
Every time I see It I'm like, "Please let me upvote this more." And you can't even award it bounties because it's locked :(
 
the score would be ridiculous and none of us would have any points left
 
5:32 PM
@AndreaFaulds No, I don't know how to code, how to use PHP, or how to use the DOM. That's why I was using "PHP Simple HTML DOM Parser" actually. I know I should learn how to properly use the DOM, but I needed a quick fix and using htmltidy did what I needed in a really short time.
 
@marcio Tbh, whoever wrote that deserves a cookie for obvious variable name choices ;) gist.github.com/anonymous/7c17db54ba114cf3d095
 
@ThatBrazilianGuy Fair enough.
So
I decided that post needed a dramatic reading
but I just cracked up a quarter of the way through
 
@Rangad looks even fuglier when "pretty" formatted!
@PaulCrovella it would be a competing RFC to the one @AndreaFaulds is working on. It could have 2 outcomes:
1 - People love it
2 - People hate it SO MUCH and decide that the @AndreaFaulds should pass before this new one get's into voting phase
 
@marcio in which languages are batch use declarations known as "grouped imports" ?
 
Could I see that gist? I'm curious.
 
5:38 PM
@AndreaFaulds talking about the typedefs one gist.github.com/pcrov/6138044ea4f5eb21f186
 
@PaulCrovella Oh, that. It's not really a replacement for scalar types, but could complement them, IMO
I'd thought of doing something similar before
 
point is, a competing RFC would help or make it worst? given the objecttive: PASS SCALAR TYPES
 
But I don't like it that much... I don't want to live in a world of Symfony\Core\TypeHints\IntType, Laravel\Utils\HintedTypes\IntegerT, yolophp\intishtypemaybe, Zend\Framework\Framework\Zend\Core\Utilities\Tools\Types\Hinted\Integer etc... I just want int, float, string and bool
 
@AndreaFaulds that's where a SPL of types could shine
 
@marcio but then we're just in the same place as before
I really don't like this, we'd just end up with less uniformity and I don't want that :(
 
5:41 PM
There is already an SplTypes extension and I've never seen it installed on anything.
 
because it's not useful? who wants "new Int()"?
 
@Danack MSBuild grouped imports. I think I've heard that tearm in relation to python, not sure though.
 
@marcio It is useful.
@LeviMorrison I wish it wasn't called SplTypes because it makes people think it's part of Spl...
 
I'm all for scalar type declarations and I want them to pass. I just threw the typedef thing together as, as you said, a possible complement - but also as another method to achieve the goal should scalar types not make it.
 
Why do we have PECL extensions in the manual?!?!
 
5:43 PM
wait wait, keep calm and listen to me:
the point is not if a second proposal would be "better", the point is IF a second proposal would help to have scalar types.
 
Well... I dunno, there might be more chance of them getting in that way, but it's a really horrible approach
 
the world of Symfony\Core\TypeHints\IntType could be avoided by registering the scalar types in the core and make it not optional.
 
I have decided not to do the same thing before
@marcio So the RFC would be rejected, then.
Now you're just proposing strict/weak/whatever scalar types, it's not much different from the other proposals, and will be rejected along the same lines those other proposals would be
 
@AndreaFaulds (no crystal ball, but probably would cause even more negavive reaction than yours at first)
 
I've no idea. My sense is that many folk on the list have their own versions of scalar type declarations in their heads as The Only Right Way, and getting them to budge toward anything different will be very very difficult.
 
5:47 PM
internals hate lang features that give too much control to user land
 
@PaulCrovella Yeah
 
@PaulCrovella GET OUT OF MY HEAD
 
My current RFC is basically an attempt to reconcile two of the most popular Only Right Ways and allow people to use one or the other exclusively yet still live on the same planet
 
and at least some of them hate it even more for that. It's depressing :(
 
Having both has advantages even if you only like strict types
 
5:50 PM
besides, the @PaulCrovella idea would not be just a trojan horse... it could become a thing.
if people reject it, means the way to go is the @AndreaFaulds 's RFC
 
I think it's something that should be considered if and only if scalar types get in
Because otherwise everyone will create their own scalar types implementation
That would be chaos.
 
I really don't get the reluctance towards the 0.2proposal it. Yes, I don't like the syntax (but can't come up with a better one), and would favor strict being the default, but the concept is the best one I've seen proposed as rfc yet (If phps current internal juggeling behaviour is to be kept that is).
 
think like this, the core would have:
type int(){}
type string(){}
type float(){}
type array(){}
// + whatever-we-decide-should-be-a-scalar-type
 
I'd much rather see it happen if real scalar types happen. I have serious doubts about anything happening though.
maybe i'm just grumpy right now though, dunno :/
 
@marcio If the core has it, then it will be rejected, though
 
5:53 PM
@AndreaFaulds no one will be able to overwrite the core types, so it's basically the v1 of your proposal plus the extendable type system
 
could atleast the names be reserved so that scalar typehints may happen in a 7.x release?
 
@marcio So, it's v1 except even less likely to pass
@Rangad That's something I want to do if this RFC doesn't pass, it's on my TODO list
It also has debugging benefits
function foobar(string $a) {} foobar("a"); produces a possibly confusing error just now
 
@AndreaFaulds that's when the future forks into two possibilities. It could be well received, but if it's not, it will benefit v1 if your proposal :)
@AndreaFaulds not int the core core, but will be there by default
 
@marcio Still no less objectionable
 
@AndreaFaulds it would be like json ext, no one would want to use PHP without it.. err
 
5:58 PM
i am try to use composer autoload in godaddy hosting and this line throws error

require(vendor/autoload.php)

Warning: require(vendor/autoload.php) [function.require]: failed to open stream: No such file or directory
 
types would be like functions that could be used to type hint arguments
 
...I don't see how putting it in an extension vs. in Zend changes anything
 
it works perfectly on localhost
 
at all
@Cody Well, then there's no such file
 
there is actually
i uploaded it
 
5:59 PM
Are you sure there's a vendor directory in the same directory?
 
yes
 
@Cody Try require __DIR__ . '/vendor/autoload.php';
 
still error
 
Can't help you then
 
@AndreaFaulds i am using ci
and including the above mentioned line in index.php
 
6:01 PM
where is your index.php in relation to the vendor dir?
 
☝︎
 
@Rangad same location
@Rangad i am using composer
 
@marcio Here is some stuff that might (or might not!) make the RFC clearer. btw......how stuck are you on the name 'batch use' ? I think 'group use' would be a lot clearer, as that is what it's actually doing. Grouping similar things together is easier to explain than 'batching' things together.
/dat bike-shedding.
 
@Danack totes open to the naming, whatever would be more "popular" between the user base
 
@Cody var_dump(is_dir(__DIR__ . '/vendor'), is_dir(__DIR__ . '/../vendor'));
 
6:09 PM
@Rangad do i need to set include path ??
 
usually no
 
this is the actual error
pls take a look
 
@Danack I like it, I'll add it to the RFC and rename it to grouped use :)
 
@Cody absolute vs. relative paths
 
peers Oh, another nive RFC, @Andrea....
 
user895378
6:15 PM
@Danack I think I also have a mild preference for "group use" /cc @marcio
 
nice
 
@marcio Cool......yeah....I just kept finding myself writing "batch use allows you to group use statements" and realized Ronseals law was applicable.
 
@Rangad what is the problem ?
 
@cody Do you really have a / in the beginning of your path, or did php add that to the error message? /vendor and vendor may be two completly different things.
 
@Danack it would be also good to list the cons in a way it looks silly, like:

- IDEs already help to make namespace implementation usable (hey, look at me using PHPstorm shiny buttons)
 
6:17 PM
@Rangad i tried setting include_path to vendor
 
user895378
> In my rainbows and ponies vision of the future, it would go something
> like this:
>
> 1) PSR-7 is approved. People use it. People love it.
>
> 2) Internals makes internal definitions of the interfaces from PSR-7,
> renamed to a PHP namespace but otherwise identical. Eg:
 
user895378
^ this drives me nuts.
 
user895378
This is the ponies vision for every FIG proposal. "Hey we wanked about with some abstractions that a lot of people have problems with from a design perspective. I can haz in C plz?"
 
user895378
The PSR-7 is just wrong. It's wrong for PHP. It's wrong for America. I do HTTP all day every day and it's wrong. You can agree or disagree, but if you disagree with this opinion you are wrong too.
9
 
user895378
</rant>
 
6:20 PM
@marcio I know what you mean, but I'm not sure it's worth it. For people who are against the RFC, they will bring that up on the list anyway. For people who are for it, listing a silly negative thing like that might put doubt in their mind.
@rdlowrey You're saying it's more of a Canadian thing 'eh?
 
user895378
The problem is that overreaching abstractions DON'T belong in core. That's what userland is for. Your abstraction is not right for me, FIG. Don't try to force it on everyone by shoehorning it into php-src. Do it yourself in userland and STFU about putting it into core.
 
@rdlowrey this is so Obama
@Danack yea, let's not feed it
 
user895378
This is really the one thing about the php community that makes me seethe ... you don't know what's best for my code, FIG. You know what's best for an enforced level of mediocrity in generalized frameworks. Stop trying to make my code the same as yours.
 
@rdlowrey is http we can believe in
 
@marcio Oh, it turns out phar_get_stub isn't evil like you think
It's not eval'd, it's used to generate code to put in a phar by default
 
6:27 PM
@AndreaFaulds oh, but the problem is the code itself not the way it's used
 
Alright
 
if you use the phar stub you get the global ns polluted and it's like the index of your phar
 
@rdlowrey Daniel Lowrey for president 2016
@marcio Well you have to stick the vars somewhere...
 
@AndreaFaulds do you prefer "batch use statements" or "group use statements"?
@AndreaFaulds it could be inside a closure
 
user895378
@AndreaFaulds I operate on the principle that anyone who thinks they're well-equipped to tell others what to do almost certainly is not. This informs my feelings about FIG to a large extent.
 
user895378
6:29 PM
Teach, educate, assist. Never mandate.
 
user895378
^ people should try to keep this in mind.
 
user895378
Standardization is one thing. Enforcing abstractions that aren't necessarily best for everyone by hardcoding them into the language is another.
 
10/10 would vote Too Tanned Guy 2016
 
@marcio Not sure
@marcio True, but it predates their existence
 
@rdlowrey answer then.
 
6:32 PM
They produced a couple useful recommendations back when they were doing things basically out of necessity. Now it seems they're a group sitting around saying "aren't we supposed to come up with psr's? we should find something to write a psr about."
 
@AndreaFaulds not criticizing, it just clearly belongs to the last century and needs to be updated -> gist.github.com/anonymous/7c17db54ba114cf3d095, we even have "@mkdir($temp, 0777, true);"
 
6:51 PM
@rlemon SCANDAL, TOO TANNED GUY IN THE POLLS, AND IN THE STUDIO!?!?
Aug 21 '14 at 20:10, by Dan Lugg
user image
 
he's anti-tanned there
 
"His eyes <3" etc.
 
:sigh: loads gimp
user image
2
little faster than I intended, but ohh well
 
@rlemon the speed is fine, it's the time between blinks
 
that is what I meant.
still works.
 
7:02 PM
needs love hearts
love beams
twinkling, sparkly love hearts
 
@DanLugg Oh, I always thought you were caucasian
 
I'm guessing this has something to do with the tanning.
 
lol
 
YES
Close enough @DanLugg.
 
7:07 PM
needs aviators
and maybe a beard. everyone needs beards
 
user895378
lol, I come back from a lxr.php.net session and what do I find?
 
It's natural you have a crush on him, it affects both females and males, not sure which ones more.
 
@DejanMarjanovic It's something of an open secret that room 11 fangirls over @rdlowrey when he's not around
 
a distinct lack of sparkles
 
7:11 PM
@PaulCrovella will fix
 
Glitter!
 
very nice
 
You're lucky I don't have PS...
I totally suck at GIMP
Not the sex kind one.
 
so you're good at that one then
 
7:16 PM
am I doing this right?
 
Dude, why the insults?
 
(mods, please modstar this, very important)
 
lol
 
7:21 PM
Y U SO SERIOUS @RDLOWREY
 
You people are weird.
 
@SaraGolemon We're not, you're weird for your lack of @rdlowrey infatuation
 
user895378
@SaraGolemon It's ridiculous, right?
 
@rdlowrey It may seem ridiculous to you, but you're Daniel Lowrey, you're used to how attractive you are. So to you it's normal.
But for mere mortals...
 
user895378
Hey @SaraGolemon I have a question about stream filters and how they interact with non-blocking streams ...
 
7:23 PM
@rdlowrey Poorly
 
Steam Filters are an abomination and should be stricken from PHP
 
user895378
this is what I'm finding.
 
user895378
Okay then, don't worry about the question. I'm pretty sure I'll have to make some php-src changes to accomplish what I'm trying to do.
 
@rdlowrey Seriously though, if you want to implement Stream Filters 2.0 and deprecate the old thing, I would actively support your RFC
What we have is the end result of Wez and I not communicating properly
And it's awful.
 
7:27 PM
 
user895378
@SaraGolemon Okay, well at least you recognize it. This makes me feel better about the negative feelings I was experiencing towards the API :)
 
user895378
I was like, "I hate this awful, awful thing but I don't want to be mean to Sara"
 
@Danack 3v4l.org/kkrdU element order, not index order
 
@Danack I don't see the WTF here
 
Well it is kinda goofy; if I do $a = []; $a[2] = 'foo'; I actually expect that I'll end up with [null, null, 'foo'] (I know better than that, but still)
 
7:32 PM
@AndreaFaulds how many other functions in core PHP or userland depend on the insert order of an array?
 
Arrays are probably better described as a list of 2 element tuples, where the 1st element of a given tuple has a uniqueness constraint across all other tuples of a given list.
And syntactically, you're really just doing $listOfTuples[$tupleFirstElement] = $tupleSecondElement
 
@Danack Quite a few...
Also, well, foreach.
 
You're meant to grab a pitchfork, not be rational....
2
btw we should totally deprecate setlocale. Or at least tell people not to report issues when they use it.
 
What we found out… stream filters are absolutely unusable with non-blocking sockets… :-(
 

« first day (1566 days earlier)      last day (3364 days later) »