« first day (1529 days earlier)      last day (3409 days later) » 

7:03 PM
hehe - but how stupid that question is. as if <strike>char(36)</strike> varchar(50) (YUK!) would scale at all as primary key ....
 
Yeah that entire question is so stupid it is dangerous. Based on nothing but uninformed guesses
@hakre Don't tell you don't know how to strikethrough after all your years in here? ;-)
 
:-P
 
---foo---
:D
 
@PeeHaa Thanks. Do you know where can I see some other PHP code? I just want to know that how the professional PHP developers write their code.
 
7:16 PM
Cool.
 
sigh
@PeeHaa If you don't want to help him them don't discourage any one. And if you find some thing form google then share it. — Alexander 33 secs ago
 
@PeeHaa not much php code on my repo I'm afraid...
And rdowlrey is probably the most interesting, but I can't spell his name
 
Ah right. Don't go to @FlorianMargaine profile @user3002233 only horrible things like lips and jabbascrupt
:P
 
That thing of yours is just a horriblelanguagefest \o/
 
7:20 PM
Yeah... There's like ~15 languages or so
 
@PeeHaa Oh Ok. What is his profile?
 
But no php iirc :D
Ralt
 
@FlorianMargaine :P
 
But those are... tools. I want some open source websites. Where I can see the PHP code and learn something. :-?
 
Hmm @NikiC ... Nice blog post, but the single thing I didn't know about why exactly it is more performant, except for the better cache utilization, wasn't really touched in there :-/
(and well, naturally, packed arrays)
All you do is basically describing the changes, but not really how they take effect on perf.
 
7:34 PM
e'nin
it's an accumulation of changes that are having an impact bob, you can't point at one change and say "this gave us 90% of the difference", you rarely can in a complex system ...
 
Evening @JoeWatkins
 
all Zend autoloading tests pass :-D
 
awesome ...
 
and all spl failures fall into one of two camps from what I can tell: Segfault on prepend or array callable issues on spl_autoload_functions()
 
are you burning the spl api ?
this is a rework of your previous patch or new one ?
 
@JoeWatkins half and half
I tried merging, and eventually just gave up
so I ported the core concept
also: no, not burning the API (yet)
making it compatible, but the internals are all centralized
 
osom
 
and the old API was fubar
namely spl_autoload_register's error handler
I replaced nearly 100 lines of code in spl_autoload_register with 1 in zend_autoload_register_internal
however, to get error message compatibility in spl_autoload_register, I had to duplicate that code again
 
7:40 PM
I think it's messy, apparently some disagree ...
+1 so far ...
 
@PeeHaa
> Florian has contributed to repositories in 18 languages.
 
Holy shit you're such a language whore :P
And yay for being osrc brothahs :)
 
^^
and only because of the french translation fixes, eh
 
:D
 
7:46 PM
So prepend is causing a segfault in zend_hash_rehash... anyone want to take a peak at it?
 
sure, why not ... gimme a few minutes
 
aaah wait I got a few php repos actually...
 
whoops, forgot to regenerate the engine last commit, second
 
@ircmaxell So, why would we care about error message compatibility?
 
@NikiC I personally don't
should I kill the error message compatibility?
 
7:48 PM
What's the difference?
 
right now, I'm using zpp errors
which means that they are always errors, not exceptions
but spl_autoload_register's second parameter is to throw on error, which causes it to raise an exception if it's not a valid callback
 
@JoeWatkins we wanted to continue on bwoebi/phpdbg-docs or what was that ping recently?
 
ah, so it's about the $throw param?
 
yup
there's a way to get ZPP to throw, right?
 
7:50 PM
I'm passing all three tests, got failing code @ircmaxell ?
@bwoebi yeah should continue with that, I'm gonna remove docs from phpdbg.com too, when we have something to replace it with ...
 
@ircmaxell by exchanging error handling to EH_THROW, yes
@ircmaxell Call zend_hash_rehash only if the hash is not packed
 
@JoeWatkins ext/spl/tests/bug38325.phpt
 
@JoeWatkins so… when do you have time?
 
I don't get errors in rehash function
 
does that test fail?
 
7:55 PM
yeah but in new vm handler
Fatal error: Class 'ThisClassDoesNotExistEverFoo' not found in /usr/src/php-src/ext/spl/tests/bug38325.phpt on line 6
==2944== Invalid read of size 8
==2944==    at 0x8CBBF4: zend_objects_store_mark_destructed (zend_objects_API.c:69)
==2944==    by 0x7CE396: php_error_cb (main.c:1232)
==2944==    by 0x5F4209: soap_error_handler (soap.c:2152)
==2944==    by 0x885C77: zend_error (zend.c:1077)
==2944==    by 0x86EAED: zend_fetch_class_by_name (zend_execute_API.c:1348)
==2944==    by 0x8E3FAD: ZEND_NEW_SPEC_CONST_HANDLER (zend_vm_execute.h:2658)
 
sorry, bug48494.phpt
 
48493 ?
 
@NikiC that fixed it
shouldn't that check go in rehash?
 
@ircmaxell no
 
ok
 
7:59 PM
fixed fault but test still fails
 
or maybe... as it's part of the exported API
 
@JoeWatkins test passes for me
 
@rdlowrey Still away? :(
 
and I have other errors still happening
making progress
but need to go christmas shopping soon...
 
I'll wait to see your diff ...
 
8:00 PM
and need to think of what to get 2 people
 
@bwoebi bound to have some time over the next week or so ...
 
@ircmaxell Wow, already?
 
@JoeWatkins I'm having time most of the time now, except tomorrow evening and the 25th…
 
It's like, only the 23.
 
@NikiC I was sick with pneumonia for the first 3 weeks of the month
 
8:01 PM
@NikiC well, I did that also only today ;-)
 
and this weekend I was busy and unable to
@JoeWatkins pushed
 
@bwoebi How familiar are you with artax?
 
still fails :s
Running selected tests.
FAIL SPL: Bug #48493 spl_autoload_unregister() can't handle prepended functions [ext/spl/tests/bug48493.phpt]
=====================================================================
Number of tests :    1                 1
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (100.0%) (100.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    0 (  0.0%) (  0.0%)
---------------------------------------------------------------------
 
@Fabor just ask...
 
@JoeWatkins what's the output?
 
8:04 PM
@bwoebi Deprecated: Amp\Promise::wait() is deprecated and scheduled for removal. Please update code to use Amp\wait($promise) instead. in /opt/bin/App/vendor/amphp/amp/lib/Future.php on line 65
Using rc5
 
---- EXPECTED OUTPUT
array(2) {
  [0]=>
  string(9) "autoload1"
  [1]=>
  string(9) "autoload2"
}
array(1) {
  [0]=>
  string(9) "autoload1"
}
---- ACTUAL OUTPUT
array(2) {
  [0]=>
  string(9) "autoload1"
  [1]=>
  string(9) "autoload2"
}
array(1) {
  [0]=>
  string(9) "autoload2"
}
 
@Fabor use dev-master…
 
tried with same issue.
 
@Fabor ehm. Well, the error message should say all to you
 
Well line 65 is this
 
8:08 PM
You don't $client->request()->wait() now, but \Amp\wait($client->request())
in case of Artax
because Artax returns a Promise
@Fabor well, that the problem of errors generally, that they don't show stacktraces…
 
so it removed the wrong one?
removes the correct one on mine
 
Ah right. Cheers. I'd been using rc5 previously but I guess some changes were made and I updated today.
 
strange, I tried clean build too, same ...
cat config.nice ?
 
@Fabor well, rc5 requires Amp 0.12… which shouldn't show that message.
@ircmaxell
 
8:15 PM
eww
 
requires a dirty hack to simulate
 
@ircmaxell :D
 
do you realize what that if statement means?
it means that there are 3 possible autoloader states:
1. calling spl_autoload_call($class) directly // throws if not exists **ONLY** spl_autoload_register() not called another time
2. calling spl_autoload_register() **only** // throws if not exists
3. calling spl_autoload_register() and another autoload register // doesnt throw
 
@FlorianMargaine resume.github.io/?PeeHaa I like ocrc better :)
 
69 followers! You pervert.
 
8:24 PM
:)
 
Also html 0%?
 
At least less than css. Bitches love their css
 
PHP WTF #61412: https://github.com/php/php-src/blob/master/ext/spl/php_spl.c#L344 Try to figure out why that's a WTF, and the possible states that if statement can be executed in...
 
You need to add #MVC #HVVM #OOP #DRUPAL #LARAVEL #SYMFONY #FRAMEWORKS #JQUERY #ANGULAR #WORDPRESS to the bottom if you want to get the recruiters interested.
 
@Fabor I got a call today from a recruiter whether I was interested on working on a young and dynamic informal team which had lots of CakePHP OOP projects...
 
8:27 PM
#STARTUP
 
@ircmaxell OK, kill SPL autoloading with fire
 
I sort of blame google for the try-hard beanbag offices.
 
By the way, php\autoload_register(php\AUTOLOAD_FUNCTION, function ($name) { include "$name.php"; }); is nice, I don't actually mind adding a new API more
(I know, I'm fickle.)
 
lol lovely commit message by bob
 
We should use -Wall.
 
8:31 PM
@AndreaFaulds I've removed that function
because I ran into a problem
I can't issue a second parameter to autoload callback
thanks to SPL...
 
@ircmaxell ????????????
 
@ircmaxell I think you should give up trying to keep to much compat here
 
@NikiC well, error messages are fine to give up
but I want working autoloader implementations to stay working
 
I don't think anyone gives a fuck about weird erroring behaviors
 
@ircmaxell WHY does this need that?
 
I'd also be totally fine if you dropped __autoload in the process. Nobody's using that since like years
 
@NikiC I'd like to add E_DEPRECATED
do you think it's OK to drop without having been deprecated for a while?
 
@ircmaxell No no no, why can't we have php\autoload_register?
 
@ircmaxell Absolutely
 
@AndreaFaulds we can, as long as we only allow one type per autoloader
@NikiC OK. I'll adjust patch
 
8:34 PM
@ircmaxell It's easy to fix and we've had the SPL stuff since 5.2
@ircmaxell Then do that
 
@AndreaFaulds I did
I just didn't implemnt that function
 
@ircmaxell However I can see how maybe we should not mix up autoloading cleanups with the function autoloading
 
so we're extending SPL?
 
@ircmaxell Doing that is somewhat of a small dick move
 
@NikiC well, the problem is one justifies the other
autoloading cleanup doesn't make sense (pulling it into core and introducing a new API) unless there's a reason the existing API isn't suitable
@NikiC I'll leave __autoload in there, and then we can have a second RFC to remove that (which would clean up the implementation further)
@AndreaFaulds I can add that back though. Easily.
so, question:
php\autoload_register($type, callable $callback, $prepend = false);

vs

php\autoload_class_register(callable $callback, $prepend = false);
php\autoload_function_register(callable $callback, $prepend = false);
php\autoload_constant_register(callable $callback, $prepend = false);

or both?
 
8:38 PM
@ircmaxell Former all the way
 
other thoughts?
 
hmm, prepend is a bit non-obvious, and we may add other stuff in time
 
Anything but both
 
perhaps make last thing be $flags
so php\autoload_register(php\AUTOLOAD_FUNCTION, function () { ... }, AUTOLOAD_PREPEND);
it's at least more obvious to the reader without checking documentation
 
why not php\autoload_register($callback, $options)
 
8:42 PM
well, then you have to specify what type it is
:/
 
not really
the default type can be "all" and if you need a specific, you set it in the options
 
many autoloading schemes don't work well for multiple types
 
@tereško all won't work
 
hmm ...
 
because we can't provide a second parameter to the autoloader function
thanks to spl_autoload_call which is used
 
@AndreaFaulds both are done and implemented
 
@ircmaxell yay
 
I like the flags approach, and the single function is cleaner
 
Honestly I think booleans are often overused in imperative languages
People use them as lightweight two-element enumerations
but often an enum might be better
 
no argument
@ircmaxell and it makes sense, because in context of spl_autoload_call there should not get an exception thrown
 
ok, I'm out, thanks and later!
 
9:14 PM
Hi, every one
have any one seen ocramius
 
9:39 PM
anyone here using Gogs? Wondering if it has a migration tool to migrate repos, settings, teams, etc from Github.
 
@crypticツ I think @salathe uses it IIRC
 
PSR-9!!! =oD I actually like it.
 
@ircmaxell ... why AUTOLOAD_PREPEND and AUTOLOAD_FUNCTION in different slots? Why not just | them?
If we're going to have flags may as well use flags.
 
> +Every project MUST provide an email address in their security disclosure
+process description. If not specified otherwise, this email address is
+``security@[project domain]``. Projects SHALL NOT use contact forms.
That is pretty moronic though @crypticツ
 
@PeeHaa yeah, ripe for spam abuse and also does not ensure encryption in transit.
PR that!
 
9:55 PM
Do you not think they're going a little far with the PSRs?
I like structure, but I feel it's going quite far... mainly after reading the email address must be security@....
 
@Jimbo Oh I have thought that pretty much from the start :P
 
So frustrated.
I have a JS library that enables file uploads via AJAX -- it creates a hidden iFrame and posts the form to that iFrame, then scrapes the response. This is pretty standard practice, works great. Except in Chrome... it is reading some of the HTML tags out of the JSON response and auto-linting it. Firefox also does this, but FF does not alter the innerHTML property, whereas Chrome does.
I wind up with this: {"data":"<div>THIS IS HTML"}</div>
 
@ChrisBaker What library do you use?
 
This is some old crummy Mootools thing
I'm guessing this auto-linting that modifies innerHTML is a newer-ish change to Chrome, because we recently got reports of this thing not working. Though, it is used in a fairly low-traffic spot, so it could have had this problem for potentially a year/
 
Throw out the lib and try another one is what I would do :)
 
10:01 PM
This is just one of those problems that reveals a whole nest of underlying problems with a system's structure. I'm not even trying to re-design the entire router system so it sends the right headers -- I'm guessing if it threw a JSON header, Chrome wouldn't do this.
@PeeHaa Ugh. SOOPER old code, not sure where else this lib is used, or if anything relies on this kind of behavior. sigh
 
Sorry man :)
 
We're launching a new site on the first of the year, with issue tracker
I. Can't. Wait.
 
Oooooh only a couple more days \o/
 
@PeeHaa Do you know what the browser vendors call this auto-linting? I am not having much luck finding documentation about the behavior.
 
I have no idea what could possibly do that. Do you have a isolated snippet so I can repro?
BTW I am on chrome canary just to hope I catch stupid stuff chrome is going to do in an realy stage if I am lucky
 
10:09 PM
@ChrisBaker what's this auto linting you're talking about?
how do you scrape your data?
ugh, external lib?
good luck
 
Well you gave up fast :P
 
@FlorianMargaine You've seen it, if you serve up a page with invalid HTML, any modern browser will sort of "lint" or "prettify" your HTML for the sake of rendering. They have no choice, they have to presume a complete dom tree in order to draw a complete dom tree
So if you open a div but fail to close it, Chrome is still going to draw the div, they just assume you meant to close it at the end of the document
Any time I've seen that happen, the innerHTML property of document.body is not actually modified, the closing tags the browser had to assume are implicit. With this plugin, it is scraping the HTML out of an iframe and winding up with those "helper" tags in the text.
@PeeHaa I am trying to set up a minimal example right now, without all the mootools trash in the way.
 
awesome
 
That will also help me decide if the server could send a application/json header instead of text/html and disable this behavior
If that's the case, then I have a fix... though I'm not going to implement it, because then I would have to restructure a bunch of deeper shit on the system, and it just isn't worth the time.
 
10:24 PM
Know what?
Imma write a text adventure.
In PHP, ofc.
 
playable over telnet?
 
Playable over room 11.
Not kidding, that would be amazing.
 
Oh my god. YES.
@FlorianMargaine Nah, IRC :p
 
pretty much the same :P
(irc is not much more complicated than plain telnet to parse, I mean...)
 
Telnet requires no parsing
IRC is line-based plaintext
AIUI Telnet is literally "pipe stdout over TCP"
 
10:43 PM
IRC is not much more, you just need to add :receiver : before the message to send a message
you could pretty much use irc in a telnet client
(I did it for an hour or so, it works... it's just a little hard if you're in multiple channels.)
 
@AndreaFaulds Not necessarily even TCP (telnet is older than it.)
 
@PaulCrovella Ooh. What did it run on pre-TCP?
@FlorianMargaine I've done so. The main problem is PING
 
@AndreaFaulds NCP
 
yeah you have to respond to PING now and then
 
@PaulCrovella Neat
 
10:52 PM
@PeeHaa Okay, this shows what I'm talking about
I've found that adding a json header doesn't help, and that this happens whether the HTML is complete or not, and it is happening on Firefox as well as Chrome.
So basically, the entire idea of posting to an iframe can't work if you want JSON as a response.
The big thing I see causing this, BEFORE the browser tries to help you out, is that json_encode (the PHP function) seems to convert the closing tag to HTML entities, but it does not touch the opening tag.
I assume the / in the closing tag triggers this, but it is super f*cking annoying
 
11:08 PM
wtf
 
@ChrisBaker IE 11 too
 
Using the correct content type works for me though
Yeah that is the problem for sure
 
@ChrisBaker json encode doesn't make it into HTML entities
 
There is no way (at least that I no of to prevent UAs for unfuckingupping html)
 
$ php -r 'var_dump(json_encode(["html"=>"<div>"]));'
string(16) "{"html":"<div>"}"
I <3 php -r, I wanna marry it
 
11:15 PM
@AndreaFaulds Where is that text coming from in the test, then? {"html":"<div>This is some HTML&lt;\/div&gt;"}
 
@ChrisBaker the browser encodes the plaintext to HTML before displaying it.
If you look at innerHTML, you'll always get HTML. Plaintext documents are displayed, in modern browsers at least, by converting them to HTML documents.
You want innerText or textContent.
 
I think you're misunderstanding my statement.
 
I'm not.
json_encode isn't touching anything, despite what you think.
 
I see that, but the browser is adding the html entities before innerHTML ever has anything to do with it.
 
Where? What are you looking at? View Page Source? The Network tab?
 
11:20 PM
Or not
Interesting.
The thing is... this isn't code I wrote. It is from a third party plugin that has been operating for years without a problem. BUT, textContent vs. innerHTML is indeed the difference here.
 
If you take a plaintext document and look at the DOM, what do you expect? plaintext lacks a DOM, you're looking at it converted to HTML...
 
That tells me, though, that it matters today but it did not matter 2, 3, 4, 5 years ago
 
True, there's more browser uniformity now
 
I expect the browser to create those implicit tags for the purpose of drawing the dom tree. I do not expect it to modify the HTML element property to add those "implicit tags" to the element's innerHTML property.
And in years past, the browser did not do so, obviously, but now it does.
Well shit, I guess I don't really care when or why this changed. It is solved by changing that plugin to use textContent instead of innerHTML, and adds to the weighty volume of reasons I have for never, ever, ever using mootools again.
All positive outcomes
 
11:41 PM
@ChrisBaker it's not modifying any HTML
there was no HTML to begin with
there are two possibilities that make any sense:
1) No DOM (it's not HTML or XML, this is reasonable)
2) DOM for HTML generated from plaintext
 
@AndreaFaulds The browser has to parse the plain text it gets into DOM structure. The plain text it receives might not be valid, so there are assumptions that must be made, specifically in this case, there are implicit close tags that don't exist in the plain text, but conceptually exist in DOM. The behavior that seems to have changed is that previously, those implicit tags were not added into the innerHTML property. Now they are.
I call that a "modification" -- it is adding data that it did not receive.
 
@ChrisBaker That's crazy talk. The DOM only applies to HTML. There's no meaningful DOM representation of plaintext.
@ChrisBaker No modification takes place. You're not looking at the source data. You're looking at the DOM. That's different.
Realise that no HTML was ever generated
.innerHTML doesn't give you the source HTML, it serialises the DOM to HTML
 
BTW, switching this code to textContent or innerText seems to have its own set of problems. The extra tags aren't added to that property, but it is still not parsing the JSON. Have to play with it more this weekend. I'm outta here, have a good one.
 
.innerHTML is just a convenience, really. It's not what you think it is.
 
@AndreaFaulds If that were entirely true, this plugin never would have worked, rather than having worked for 6+ years.
Clearly, something is going on here in between what you're saying and what I'm saying, or this thing never would have worked, ever.
 
@ChrisBaker It is entirely true. It's surprising it worked at all.
 
As it was published, this thing was able to read innerHTML and get a literal copy of the plaintext that the server output.
 
Browser bugs, then.
Or non-standard browser behaviour.
 
Posting a form to an iframe to simulate ajax for forms that have a file input is a pretty standard and widespread tactic, though. I have to test it, but this also seems like it would affect JSONP data that contains HTML.
 
It'd affect anything with < or > in it
innerHTML is special for stuff like <script> or <style>, though, I think.
 
11:58 PM
@AndreaFaulds It was always my understanding that the innerHTML property represented the literal plaintext source (* - in cases where there is a plaintext source). That's why, if you modify innerHTML from a script, the browser repaints the entire thing and you lose event bindings to elements inside of it. The innerHTML property is, from my understanding, not as simple as .toString.
 
@ChrisBaker Not really. Try it any browser and you'll get "fixed-up" HTML.
 

« first day (1529 days earlier)      last day (3409 days later) »