« first day (2049 days earlier)      last day (2903 days later) » 

10:05 AM
The only thing I don't like about this page is that it sets an example of using parameters with class names... and people take it with them and do it everywhere, even where it doesn't make sense
 
@krishna The problem is not specifically about the sleep(), that's just been given as a harmless example of the fact that people can execute arbitrary SQL statements through your page URL. Read stackoverflow.com/questions/60174/…
 
@Ocramius I don't think there's need for one
It's just the usual internals, much ado about nothing
Judging by the previous vote, @JoeWatkins can just go with whatever he thinks is best and it'll be fine.
(You can see that this is a useless discussion by the fact that Stas is heavily involved.)
4
 
I see
the only thing that scares me is that nobody (from the ones being vocal atm) seems to understand the reasoning around these different property states :P
 
@Ocramius You mean that nobody understands unset() properties?
 
Just those advocating for changing how isset() and undefined works ;-)
 
10:19 AM
@NikiC hehe
@Ocramius we understand it ... dmitry understands it ... dmitry is rebelling against it for reasons that don't really exist yet ...
 
Yeh, I think it is clear in here ;-)
 
@Ocramius Heh, that crap coming up again...
Seems like my heuristics for when to stop reading ML threads are working well
 
if ($stasCount > 2 || $lesterCount || $zeevCount > 3) {
   goto somethingElse;
}
if ($zeevAndPierreBitchFighting) {
    goto somethingElseForAWeek;
}
 
I've been successfully running while (!$lester) continue; for some time now, it's working well for me
 
@DaveRandom I think you should include $stas and $fleshgrinder in there as well
 
10:26 AM
@DaveRandom There are not input fields in the reported page to sanitize. This SQL execution through URL applies across the project & all input fields in the project are sanitized.
 
fleshgrinder is new, or someone who changed name ?
very noisy ...
 
Yeh I keep seeing that fleshgrinder, does he run a porn site on PHP or something? That handle is an instant turn-off, I'm not sure I've actually bother to read any message content
 
it's silly, but the name alone convinced me to ignore him
 
Stas does sometimes have worthwhile points hidden in the walls of shit though
@krishna It's because your routes are stored in/generated from a database, presumably
 
he does, but he also tends to spend many hours arguing from the perspective of ignorance ... because he doesn't actually know how most of php works any more ...
can't really blame him for that ... it's mostly @NikiC's fault actually ...
 
10:29 AM
@DaveRandom Doesn't matter. Only S/N counts.
 
@JoeWatkins this is a big part of why I haven't written a single mail to the list since the run up to 5.6
I just have not had the time to learn how 7 works properly
 
@JoeWatkins :P
 
hehe
 
Why does nobody understand that everything is much clearer in PHP 7 :P
 
it's surely easier to check your assertions, than it is to type them out for the world to see ... I'm not going to argue the case about every little mistake everyone makes on internals, that way madness lies ...
no it is, I totally agree it's a million percent (exactly) better ...
but I had years to learn php 5
I have not had that, yet ... it's just a slower process than I remember it being, I remember opening php-src for the first time and understanding, but that obviously wasn't the case ...
 
10:33 AM
@NikiC I'm not saying it isn't, just don't been able to sit down and understand the precise nature of that clarity :-P
 
@JoeWatkins And @Joe opened php-src, and @Joe was enlightened.
 
@JoeWatkins I actually lol'd at this. Even your head is not that wonky :-P
 
that's pretty much what I remember, literally 5 days later pthreads existed ...
 
what do cool kids use currently as an ORM (doctrine alternatives?)
 
@SergeyTelshevsky still Doctrine
 
10:36 AM
although, it was very crap actually ... but I understood enough to get that far, pretty far ...
 
hey @bwoebi do you have time to implement a wrapper for postgresql.org/docs/9.2/static/libpq-single-row-mode.html in ext/pgsql? It's like a 30 min job to code but it would be a lot longer than that for me because I don't have a build env to test it
or anyone else who can be bothered
 
@nikita2206 too much of an overkill.. and.. I really, really don't like annotations
 
so don't use annotations
 
@PaulCrovella and use XML/YAML?
 
10:41 AM
choosing between annotations and XML (or yaml, omfg I hate yaml) is a bit like choosing between venereal infections to contract ...
 
@JoeWatkins this.
 
so... which format do you prefer to use for configuration?
 
I don't much like ORM's ... I'm always wrong about everything, but I think, just write your queries, it's better to have a team of programmers proficient in SQL and design, than it is to have a team proficient in the usage of any ORM ...
 
@SergeyTelshevsky or PHP, but really xml isn't the hell people make it out to be
 
It may be hard to parse XML but it sure is easy to write (and read) it
 
10:46 AM
Do you have some different version of XML than me?
 
well array definitions would be OK I think
there's no problem writing/reading/parsing
 
I actually do quite like XML when used appropriately, but I don't find it easy to read or write by hand
I do hate YAML though because I am a sane person /cc @J7mbo
 
@DaveRandom schema helps with writing big time. reading... I don't know, I don't find it hard to read at all, I mean what's better than XML for reading? ini?
 
oh dammit jeeves is not running
 
it's cheating to tweet your own messages
 
10:49 AM
@SergeyTelshevsky you can use array definitions with doctrine, if it supports yaml
 
@PaulCrovella That one is worth it, he needs to learn
 
@nikita2206 formatted JSON/PHP array?
 
He must shamed as publicly as possible
 
@nikita2206 sorry, I think I don't quite understand what you mean, how is yaml connected to array definitions?
 
@nikita2206 XML, to me, is a format designed for computers to exchange rigidly defined data that humans can read if they really need to. It's very verbose for hand-crafting though - it's not actually difficult but hard in the sense of time consuming and dull, dull, unbearably dull.
 
10:57 AM
@DaveRandom hand-crafting (or at least hand-polishing) is often done when xml is actually being used for documents, and the difficulty often lays in breaking things up into semantically appropriate bits for the particular schema/dtd
the hard part isn't xml itself, per se
 
@SergeyTelshevsky it basically means that I'm not sure if Doctrine2 supports it out of the box, but given that yaml is first parsed to arrays and only then doctrine extracts mapping from these arrays it should be easy to set up any way... Having looked into the docs and source it's not supported out of the box, but you can just do this: gist.github.com/nikita2206/52fcbaec6531b1d9180ac93e0e49f154
 
 
@DaveRandom That's what I told you :-) nice that we can throw this $name away :-)
 
Yeh I didn't see it at first, took me going and writing some code around it to understand what it's actually used for in libpq and why it's pointless
 
11:04 AM
> While processing a query, the server may return some rows and then encounter an error, causing the query to be aborted. Ordinarily, libpq discards any such rows and reports only the error. But in single-row mode, those rows will have already been returned to the application.
 
libpq does it that way to allow handles to persist and be reusable across a reset without needing to piss about with returning pointers to things and risking leaks etc
 
not sure if this is a 30 min job
there might be more, if ext/postgres relies on having the error at start
 
@bwoebi No, i literally just need a pg_set_single_row_mode(resource $conn) function creating
You would (and can) only ever use it in async mode
 
May you please write me a test case for this?
 
@nikita2206 I really, really wonder. Why in the world is it not included out of the box
 
11:06 AM
@bwoebi as in a phpt or what?
 
once with error in middle of row sending and once normal bheavior
yep, phpt
 
@SergeyTelshevsky we could ask @Ocramius but my bet is that it's not so popular after all
 
@nikita2206 we are going to deprecate YAML support soon
 
@Ocramius what about arrays?
 
@Ocramius lol, alright. For what reason may I ask?
 
11:11 AM
Mostly due to lack of static validation. Most bug reports we get around Yaml are "I had the wrong nesting level" or "I had a typo in a key"
the same applies to arrays. Not gonna happen.
 
Yeah, that's exactly why I like xml...
 
We'll likely only keep XML, core-php and annotation support in future
core-php is NOT arrays, it will be value objects
 
core-php?
hm
 
@Ocramius it's even better for those who don't like other configuration formats. I suspect it will have DSL-like methods for creating metadata
 
is it already implemented?
 
11:12 AM
@SergeyTelshevsky we have a php mapping driver that allows modifying a ClassMetadata instance manually
@SergeyTelshevsky yeah, but it's not documented because it's supposed to be used only by advanced users
 
@bwoebi so see lxr.php.net/xref/PHP_7_0/ext/pgsql/pgsql.c#5208 - get_result() doesn't ever actually look at the result status, it just returns the underlying struct as a resource and it's left to userland to check the status
 
@Ocramius and is it cacheable?
 
fine
 
Which is precisely how the pq one works
 
@nikita2206 yes, caching happens post-mapping anyway
 
11:14 AM
@Ocramius I assume it's this branch? github.com/doctrine/doctrine2/tree/ValueObjects
 
@DaveRandom as said, please just provide the tests to ensure nothing will be broken in future then ;-)
 
Oh yeh I'm working something up now anyway
 
@SergeyTelshevsky nope. It's in Guilhermeblanco's fork for now
 
@SergeyTelshevsky it's in \Doctrine\Common\Persistence\Mapping\Driver\PHPDriver
right?
 
Umm... calling gzencode throws me a function not present error... Seems like I forgot to add some options while configuring php... So my question is, which option should I be adding to get teh encoding functions....?
 
11:14 AM
yep
 
@PaulCrovella thanks!
 
@bwoebi you will have these tests just as soon as I figure out how to provoke this situation :-P
@Saitama there's really no reason to build PHP from source unless you are developing PHP itself... but if you really want to do that, try and build things like that as shared objects, it gets really tiresome when you have constantly recompile the entire of PHP...
 
true...
 
11:30 AM
@Saitama You should compile in openssl, and I think that zlib is actually another exception because there I suspect there may be other things which depend on it being there at compile time, but most things run fine as shared
openssl is important because without it being there at compile time there are some SSL streams things which just don't work at all
 
ah, good point!
 
Morning
 
/* {{{ proto pg_set_single_row_mode([resource connection])
   Enables single row mode on result */
PHP_FUNCTION(pg_set_single_row_mode)
{
        zend_resource *link;
        zval *pgsql_link = NULL;
        PGconn *pgsql;

        if (zend_parse_parameters(argc, "|r", &pgsql_link) == FAILURE) {
                return;
        }
        if (pgsql_link) {
                link = Z_RES_P(pgsql_link);
        } else {
                link = FETCH_DEFAULT_LINK();
                CHECK_DEFAULT_LINK(link);
@DaveRandom ^ it's that, right?
 
@bwoebi i'd probably RETURN_BOOL() but other than that yeh, lgtm :-)
 
@DaveRandom oh, good point
 
11:41 AM
For some reason I can't access my localhost/php folder, it's blank
I'm using XAMPP
 
@bwoebi I suspect that I'm only going to be able to provoke an error mid-results with a separate query, like SELECT 1, 2, 3; SELECT nonexist; I don't think there will be any other reliable way to test. I'm not sure if it's possible for the server to generate it actually mid-results or not but I certainly can't find a way to force it to do so
The only cases I can envisage where the server would do that is data file corruption in the storage or some other external error
I would have thought that anything that starts producing a result set is going to finish producing a result set unless there's some external problem, rather than a query logic error
I'm still playing with it though
 
maybe you hit a division by zero error some way through?
 
Oh that might work
will test
oh, looks like I have some work to do in pq logic for this as well :-P
 
Wes
12:13 PM
 
HODOR
 
hey
did anybody try to building php with webports? I am doing that. Any thoughts?
 
@Wes spoiler.
 
Wes
all the internet is spoiling that
 
yeah, just looked at the link
well :p this is getting quite fucked up for real
 
@John @Wes carefull what you are about to spoil next :p
 
@Naruto :P
 
Was it in this channel someone posted a cartoon about how to schedula the timing for a project? :D it was something about 'double it' and then add 5 minuts.. I saw it yesterday but lost it the image :D
 
@DaveRandom hmm?
 
@bwoebi not doing enough error status handling, not accounting for multiple result sets. Working it out now, I'm creating a reference impl with pq so I know how it should work so I can write the tests
 
12:25 PM
ok great
 
I can provoke an error mid-results with CREATE TEMP TABLE tmp ( var int ); INSERT INTO tmp(var) VALUES (1), (1), (0); SELECT 1 / var FROM tmp;
on a related note @bwoebi, given that the result of executing a statement can produce more than one result set, would you rather have Result#getNextCursor(): Cursor (so there's a two layer loop of while ($cur = yield $result->getCursor()) { while ($row = yield $cur->fetchRow()) { } } or just have Cursor#nextResultSet()?
The former feels like a more "correct" object model but the latter makes for a simpler API in the most frequent case of only executing a single query
/cc @rdlowrey @kelunik ^
 
@DaveRandom There's currently no Result class?
 
@DaveRandom Bahaha, Karma.
 
@bwoebi Not at the moment, no
I didn't see the point in one until (maybe) now
 
hi all
 
12:33 PM
@DaveRandom I see no actual win in adding one, if it's just for that
It's an extra layer impacting 99% of the usages for no reason
It'd be just helpful in 1% of usages
 
Does any one know how to skip a date field which is equal to 0000-00-00 ?
$SQL = $conn->query("

DELETE FROM data
WHERE expire <= CURDATE() && < '0000-00-00'");
 
hence, I prefer Cursor::nextCursor @DaveRandom
 
@bwoebi The only other thing it would possibly give is SQLState etc, but no-one ever cares about that unless something goes wrong, where it can be put into an exception
 
right
 
dunno, will revisit that and check that there's no other useful data that would belong in it
 
12:36 PM
I have an auto expirary code, how would i get it to skip all records equal to null ?
 
A lot of this API is currently designed around the initial "just make it work" phase, still needs a cleanup and I welcome (and require) feedback
 
@DaveRandom It needs to be helpful in many cases to warrant an extra class, else it's just an annoying layer of abstraction where everyone just immediately calls NEXT!!!
 
@BradleyCousins WHERE expire IS NOT NULL AND expire <= CURDATE()
 
@DaveRandom Thankyou, I will give it a go
 
@bwoebi Yeh I am generally in agreement here
 
12:38 PM
And who is Steve?
 
It's the other Steve
 
I'm trying to find a balance between giving access to every possibly useful bit of information if you want it and not requiring you to do too much in the general case
 
@Duikboot steve is the dude you play in minecraft
 
Im not a gamer :D
 
@Duikboot still in denial?
 
12:40 PM
IANAG
 
@DaveRandom right, that's why I have a ResultSet::next() function in mysql (my ResultSet is your Cursor)
 
@Duikboot either is that guy or he'd know steve don't know shit about databases
 
@PaulCrovella So Steve is a NoSQL guy?
 
He's in Accounts
 
he punches trees for a living. I don't know if that's web scale.
 
12:44 PM
@Naruto lol :D
 
@PaulCrovella it certainly can be:
 
lol
what's this?
 
It's a tree-scale web. Not sure if that also makes the tree web-scale.
spiders are weird
 
depends on whether "FUCK THAT" is transitive
 
@FélixGagnon-Grenier It's a visual representation of piping your data to /dev/null
 
12:48 PM
 
must take an awful lot of spiders. anyone into spider stew?
 
@DaveRandom Are you sure that's a spider web and not a tent worm web?
 
You'd become the stew
 
@Machavity pretty sure it's spiders.. happened during a flood iirc
 
Hey guys
how to give margin top in mpdf on a element it seems `style="position:relative;top:30px;" ` and `style="margin-top:30px;` both are not working...
 
12:55 PM
it should work..
 
Its not working output of simple html page is
 
Hi guys.
 
I am having a problem
 
@PraveenKumar Try wkhtmltopdf
It supports much more of the standards
 
12:57 PM
@MattPrelude what about dompdf is that a good choice ?
 
@PraveenKumar No idea
 
Guys do you know what is difference between hardware load balancer vs system running a mod_cluster
 
@afzalex One is hardware and one is software? Not sure there's any practical difference but I don't use JBoss either
 
@MattPrelude It needs installation but i want a solution that works without installing like mpdf library ?
 
@Machavity Well a "hardware load balancer" in the context of mod_cluster is presumably just software running on an optimised hardware configuration that's still fundamentally a bare-bones regular server anyway... I doubt people make some kind of asic for that, it's way too high level
 
1:07 PM
@JoeWatkins have you seen the link to gist.github.com/dstogov/33b0d79de779627bad810eb16d6156a5 (it was posted while you got a timeout in IRC)
 
@DaveRandom Sounds reasonable
 
I imagine the main difference is that the hardware version comes with a huge price tag and some kind of 5-9s uptime guarantee
 
@bwoebi missed it
what am I looking at ?
 
Dmitrys current microbenchmark suite for typed props
 
good or bad results ?
sorry 40 things happening
 
1:09 PM
> now I see 17% slowdown on "$o->p = $x" for untyped propertied (against master)
(this is, in this specific benchmark)
see subsequent discussion on IRC
 
@DaveRandom Basically this, it's a specialist Linux distro on server-grade hardware in most cases.
 
erf
 
Wes
morning v2
 
that's super unreasonable
 
@JoeWatkins what you think?
 
1:18 PM
what do I think about what ?
 
Good Evening :)
 
@JoeWatkins E_NOCTX
 
@JoeWatkins did anybody try to building php with webports? I am doing that. Any thoughts?
 
@Wes ★★☆☆☆ "preferred the original, won't be updating"
 
@MidoriKocak never tried, is that an osx thing ?
@bwoebi even though is micro benchmark, why such a difference ?
 
1:19 PM
native client of google chrome. running php on native side.
Because I hate javascript
 
ah that sounds interesting
 
runs C apps on chrome
 
@Andrea messed with emscripten and that kind of magic before, she may be helpful ... I know nothing ...
 
Wes
@DaveRandom just wait for the 2.1
 
@joe I am currently experimenting it
 
1:21 PM
@JoeWatkins I tried to build PHP in emscripten once but gave up because emscripten doesn't provide DNS :p
 
making php build static is a bit of a shit also iirc
 
@JoeWatkins mov, cmp, je… 3 instructions more
 
how i can hide .php extension in my website url
 
and the whole thing is only like 20 or 30 instructions
 
Can any buddy please ?
 
1:22 PM
@bwoebi hmm
yes, that makes sense
 
@JoeWatkins but as said, it just is relevant in microbenchmarks where L2 and L3 caches are never accessed
one single cache fetch from L3 reduces the impact to 1% or less probably
 
yeah I think real world benchmarks are the only interesting thing probably
like wp or something
 
yeah, and there you probably won't be able to detect the slowdown at all
 
any way
 
@bwoebi yeah
 
user1694691
1:39 PM
Will preg_match only result in an error if 1) the regex is invalid, or 2) the input arguments are invalid?
 
@PeterTòmasScott No. There are other reasons why it could fail.
 
user1694691
@kelunik So I would be wise to leave error-handling in place to convert an error into an exception? Even though the regex is tested and the input string is pre-validated?
 
@PeterTòmasScott Usually you use it for whitelisting, so failing isn't an issue.
 
user1694691
@kelunik Indeed, as it is being used in this case. So, can I safely assume that an error condition should be treated the same as a failure condition? i.e. flag the input as invalid
 
1:51 PM
Usually, yes.
 
user1694691
Cool, thank you
 
2:06 PM
Morning
 
Chelloooww
 
@Trowski hey
@Trowski I'm having a little time now… anything I can do on amp? (which doesn't conflict with your current work)
 
> Is the file containing these examples in liberal mode?
God it should have been called "liberal_mode"
Instead of strict_types
 
@bwoebi You could work on the standardized tests that we'll need for testing the loop.
 
@bwoebi Fix the dns and mysql bugs.
 
2:22 PM
@bwoebi Do we want to allow defer watchers to be re-enabled as well?
 
@Trowski sure
@Trowski good idea
 
@Trowski For everything that can be disabled it should be possible to enabled it again. Disable shouldn't unset anything.
 
@kelunik Disabling a non-existant watcher won't throw, correct?
But cancelling a non-existant watcher should?
 
both should
any operation on an invalid watcher should fail
 
Ok
Again, tests would help, since some of this behavior isn't well-defined.
 
2:27 PM
@Trowski It should, we need something in the standard for that.
 
Wes
here i go again with an overly complicated solution for a relatively simple problem. nothing is ever easy with me
 
@kelunik If I find time I could do a PR.
 
Wes
apart myself obviously, in case the ladies are wondering
 
Wes
Files changed (117)
 
2:33 PM
@kelunik InvalidWatcherException?
 
@Trowski Should be fine.
Or maybe UnknownWatcherException.
 
@Trowski A simple LogicException is fine enough to me, but if we need a specialized one, then yes.
 
@bwoebi If it's going to be part of the standard a specific one seems nice.
 
yeah, probably
 
In DDD is it okay for bounded context B to have an entity which holds a reference to the ID of another entity in bounded context A? Say I have an Account BC which deals with creating user accounts, updating user details etc and then another BC which is for athletics which contains athletes etc. When someone updates their account info like their name I fire an event saying user updated and the athletics bounded context updates the athletes name (in a different DB) but it needs to store..
the user ID so it knows which row to update
 
2:37 PM
Ugh, can I cleanup the namespace yet? It doesn't look like there's any PRs that would conflict...
 
@Trowski If you're fine with the current PR left, then merge it and clean it up please.
 
@bwoebi LGTM.
 
@Trowski lol, merge failed as you were like 23 secs faster
 
@Trowski Now, yes.
 
2:47 PM
(wtf, PRs == 0!!!) :-D
 
is there anyone here with good web hosting experience ?
 
guys why is post request not working? everything's fine but post not echoing hi.

else {
    echo "We found " . count($MusicFound) . "music files" . "<br>";

    echo '<form action="index.php" method="post">';
    echo '<input type="image" src="images/music.png" \>';
    echo '<input type="submit" name="submit-music" value="Play Music" \>';
    echo "</form>";

if(isset($_POST['submit-music']))
{
	echo "hi";
}
typo?
 
else is not closed
 
it is closed but not copied here so not the mistake
 
2:53 PM
@kelunik the CLA stuff is terrible as usual (re: PhpStorm stubs)
 
Your example is not complete then stackoverflow.com/help/mcve
 
@Ocramius I don't care. I'll just not contribute then.
 
I'll try getting Gary onto it, I think that's a bit of a fail on their side
corporate BS making things hard
 
@bwoebi @kelunik Loop always uses Loop::get() to grab the current loop. This makes sense, but it is another function call in a hot code path. Maybe it could use some optimizing?
 
@KevinMGranger may be you want "if else"
 
2:55 PM
@KevinMGranger do you want me to post the entire file on pastebin or add the missing } to this snippet or post on SO?
 
@Trowski Yes, this can be optimized. As long as we don't do the lazy driver thing.
 
hi guys have any one worked in angularjs and cakephp??
 
@Trowski I agree on this, especially if we optimize it to self::$driver ?: self::createLoop() in a new PR
 
Morrrrrninnininngs
4real prebecca
 
I wanted to PR that after you're done with namespace cleanup
 
2:56 PM
@Lynob adding the } still won't make it valid, and if it's not echoing "hi", then I can only guess there's a problem with the if statement that should be before the else
 
guys can any one??
 
what?
@WaseemAkram just the question you got in mind
no need to ask if people have exp. with this and that
=)
 

« first day (2049 days earlier)      last day (2903 days later) »