« first day (1435 days earlier)      last day (3513 days later) » 

3:01 PM
Also, while you shouldn't rely on (int)INF, people inevitably will
I'd prefer PHP, even if it does something crazy, to at least do the same thing cross-platform
Otherwise you get subtle bugs
 
> while you shouldn't rely on (int)INF, people inevitably will
 
@JoeWatkins yes
 
^^ "Cater to the lowest common denominator" is not a good mantra.
 
I'm not, I just like consistency :/
 
Failure is consistent. Maybe it should be within the scope of the RFC.
 
3:04 PM
Failure is impossible to implement
Sure, I could change (int)
But zend_dval_to_lval is used freaking everywhere
That would break so much stuff
I'm not sure what to do
I have to change this as a prerequisite for my bigint RFC
But if I make things consistent people will complain because oh no, people might rely on it
People rely on all sorts of stupid things
 
The meek stupid shall inherit the earth.
 
Ugh
Someone, please, either retract your vote or vote in favour?
 
/cc @salathe ;-)
 
Otherwise we'll be having this same discussion again in not too long.
 
dude, seriously not cool to ask people to do that ...
don't ask a question without listening to the answers you are given, you asked for comments, take them on board ...
 
3:12 PM
I have listened. I agree with what people have said. I'm saying I have to define this to something anyway.
It's not nice behaviour, no, but I have to define it to something.
 
when we hear "have to", or "we need this" we think back over the last 20 years of php existing ... it doesn't carry much weight to say that ...
 
I'm saying it's a prerequisite for another RFC
If you don't care for bigints, then fair enough
 
that's not how we move forward
 
That's a terrible reason to vote for it. If it is needed in another RFC it should be part of that RFC.
 
we certainly shouldn't aim to move forard like that ...
 
3:15 PM
Out of interest, how is changing (int)NaN to 0 a prerequisite for bigints?
 
@salathe Passing NAN to gmp will crash the interpreter
Which is a pretty serious issue
 
// Was: int(4611686018427387904)
// Now: bool(false) and E_WARNING
this is what I really can't get behind
int cast returns boolean
 
@AndreaFaulds And how is that anything to do with (int)NaN or bigints?
 
@salathe bigints are implemented with gmp
 
@Leigh many functions return FALSE instead of an integer when it fails
 
3:16 PM
@Leigh you mean, operation on int returns boolean right? That's normal in php
 
i.e. strpos
 
Without defining NAN and INT as special cases, trying to cast them would crash the interpreter
 
afk a while, not ignoring anyone ...
 
@AndreaFaulds Sounds more like a bug to be fixed with the interpreter, not a requirement to cast to zero.
 
@salathe Not a bug with PHP or gmp
The point is to use gmp, we have to special-case it to something
 
3:18 PM
Something that crashes the interpreter isn't a bug?
Or are we using a different meaning of crash?
 
That's not an interpreter bug nor a gmp bug
 
So your solution is to cast NAN to zero?
 
The gmp API says you can't pass in a NAN or an INF (if you do, bad things happen, typically a crash or memory exhaustion)
 
call it a "feature"
 
So you have to instead special-case them
 
3:19 PM
what does "crash" mean in this instance? segfault?
 
It was either a segfault or an abort
I can't remember exactly
 
uh, not good indeed
 
var_dump(INF - INF); // double(NAN) - why not 0?
Same can be said of dividing (why not 1)
 
it doesn't make sense, mathematically
 
Because IEEE754
 
3:23 PM
and iirc, the IEEE754 doesn't define it as such ninja'd
 
'Special Operations' - sounds like a euphemism.
 
You know what?
I'll scrap the (int)INF change, forget what I said before
 
hm, yea I guess it doesn't make sense because of (INF + INF - INF)
 
Or, wait, argh :/
I'm not sure I actually want to scrap that
 
@AndreaFaulds It's a shame you didn't split the separate parts of the RFC into separate votes; the standardisation ones probably would have been approved. :-P
 
3:30 PM
@Danack It's all standardisation
 
interesting bug (session-related): bugs.php.net/bug.php?id=68063
 
(int)INF is either undefined or unspecified behaviour, can't remember what
 
Be back later… in the mean time…
 
4:10 PM
Morning again
 
Ah, life, why are you so complex.... top of beer supply then cook dinner, or cook dinner then top up beer supply...
 
@PeeHaa :(
 
I found an off license who will deliver!
 
@salathe Cute, but annoying :-)
 
4:18 PM
@PeeHee Y U NO LYKE DOGGIES?!
 
user895378
@PeeHaa No, the API is stable. The only thing that may change is the namespace name for some of the dependencies. If that happens the worst case scenario is a find/replace for those.
 
excellent. also incoming fix for the post example
or just fix it yourself :)
 
@PeeHaa how do we see the results or current standing of your poll?
 
user895378
@Danack I'm not sure I agree. The two are inextricably linked I don't see them as separate concerns. The execute functionality is nothing more than the same injection as the class instances except it executes the resulting callable. I suspect your issues with the current code are largely involved with the crap master branch and not the refactor branch that I've been seriously negligent in not getting merged.
 
4:22 PM
ah, yes. didn't see a link from the poll page. friggin yolo is winning? srsly?
 
looks like it
 
user895378
@Danack Thoughts on that? All execute is doing is provisioning method signatures instead of ctor signatures. It uses all the same code. I don't really see a ton of benefit you from moving it out, but it's possible I'm missing something.
 
@rdlowrey I dunno. The rest of the provider/injector calls only a single method of the ExecutableFactory class. It just seems wrong to have two distinct set of functions in a class. Not from a concrete 'this is wrong because of a definite problem' but just having a massive class that is difficult to understand doesn't seem good.
 
user895378
@Danack it's not massive at all. It's 600 lines with docblocks included. And everything is focused on doing exactly one thing: provisioning the arguments of method signatures.
 
In Java world, implementing it as a private class would seem sensible.
 
user895378
4:28 PM
How about this ...
 
user895378
Let me get off my lazy ass and merge my dev branch into master today. Then, if you want to refactor things from there we can move forward.
 
user895378
600 lines with docblocks and none of the methods are more than 25-30 lines. I just don't see it as massive or hard to understand. Granted, my opinion is biased because I wrote it, but still ...
 
There's not a rush, I think getting Artax out the door would be appreciated by more people. btw I do think having the separate executable classes would be good, as having all the flags in there is bad, and they don't all support the same things.
I think
 
user895378
I still am not crazy about the verbose error message constants @LeviMorrison added, but I haven't been motivated to refactor that either :)
 
Needs to be more like:
$reflectionMethod = $this->reflectionStorage->getMethod($class, $method);

        if ($reflectionMethod->isStatic()) {
            return new ReflectionMethodExecutable($reflectionMethod, null);
        }
        else {
            $instance = $this->injector->make($class);
            $reflectionMethod = $this->reflectionStorage->getMethod($instance, $method);
            return new ReflectionMethodExecutable($reflectionMethod, $instance);
        }
Otherwise the reflection is done on wrong class.
 
user895378
4:35 PM
I'm not seeing the problem. It's possible I'm misunderstanding but the linked code appears to be doing the same thing.
 
user895378
It's generating a callable from a string MyClass::myMethod
 
user895378
If the method is static the callable can be of the form [$reflMethod, $obj = null]
 
user895378
If not, it needs to be [$reflMethod, $instance]
 
I should probably pastebin this - but as no-one else is here:
public function testExecutableAliasing() {
        $provider = new Provider();
        $provider->alias('BaseExecutableClass', 'ExtendsExecutableClass');
        $result = $provider->execute(['BaseExecutableClass', 'foo']);
        $this->assertEquals('This is the ExtendsExecutableClass', $result);
    }
class BaseExecutableClass {
    function foo() {
        return 'This is the BaseExecutableClass';
    }
}

class ExtendsExecutableClass extends BaseExecutableClass {
    function foo() {
        return 'This is the ExtendsExecutableClass';
    }
}
The reflection accesses the method in the base class directly, so the inheritance doesn't kick in, and the wrong method is called.
 
aaaaaaaah CODEWALLL!!!!!!!!
;)
 
user895378
4:41 PM
@Danack Okay. I'm cleaning up some of my in-progress repo stuff so I can merge later. I will add that as a test case so I can look at it closer. Will work on this stuff for the next couple hours.
 
user895378
Just takes me a bit to reset my brain to think about a different project :)
 
user895378
@Danack What are your thoughts on killing defineParam() or not?
 
user895378
I don't hate it, but @Levi really seems to want it gone. I am happy to go with the majority opinion.
 
user895378
I mean, it can make code brittle to rely on param names, but you kind of have to do that already if you want to use an injector like auryn because php doesn't have strict typing
 
user895378
So I mean, you're kind of already doing that anyway if you're using the lib.
 
user895378
4:44 PM
And it's not like you're forced to use it or anything. I think it can have value.
 
@rdlowrey I think it ties in with scalar type-hinting. I think possibly I need to write this down properly (because this is going to be not that clear at all) - basically the idea of having just scalar types like int, string etc is stupid - we should be having strong scalar types, e.g. blog.jessitron.com/2012/03/strong-typing-in-java-religious.html
You should be able to type-hint on 'mysql_user_password' which is a 'string' type.
but has it's own unique 'class' name.
It would make the typing be safe, but avoid having to wrap strings up into objects.
 
user895378
This is brilliant logic. I'm sold. defineParam() can stay.
 
And to be deleted when PHP has that feature.
i.e. in 2036.
 
user895378
I had never thought about param names like this.
 
Yeah...weak generic scalars are stupid and meaningless. Oh I need to find a tweet....something about casting to string isn't bad because strings are bad, it's bad because it's throwing away all the useful type information.
 
user895378
4:47 PM
Am I allowed to register multiple namespaces in my composer.json like the following?
 
user895378
"autoload": {
    "psr-4": {
      "Auryn\\": "lib/",
      "AurynTest\\": "test/"
    }
  }
 
user895378
Or is that a bad idea because it adds cruft to a production autoloader that you don't need?
 
That's fine.
It's the 'files' stuff that adds cruft.
@rdlowrey oops.
 
user895378
Hmm, okay. Thanks.
 
er I misspoke.
hang on.
 
4:49 PM
put tests in autoload-dev
 
user895378
@derp Can you post an example? I'm a composer luddite.
 
"autoload": {
    "psr-4": {
        "Scratch\\": "src/"
    }
},
"autoload-dev": {
    "psr-4": {"Scratch\\Tests\\": "tests/"}
},
 
user895378
Sweet. Thanks.
 
Or you can put them in the test bootstrap:
$autoloader = require realpath(dirname(__FILE__).'/../vendor/autoload.php');
$autoloader->add('AurynTest', [realpath('./').'/test/']);
Which avoids having to touch composer.json to make test changes.
 
Random thought: with AST in master, is it feasible to have something like lisp macros in php? Like sweetjs for js
All these syntax change discussions would then be... over
 
user895378
4:52 PM
@Danack yeah, I was just looking for ways to eliminate an extra test bootstrap file if possible
 
@Danack dirname(__FILE__) > __DIR__ ?
 
@webarto ¯\_(ツ)_/¯
 
@webarto sure ... on because it works on php 5.2
 
user895378
Might be nice if phpunit.xml let you define a bootstrap eval element to avoid additional files.
 
@tereško No one uses < 5.3 :)
 
4:56 PM
I have this nagging suspicion, that adding features to phpunit is quite tricky .. it's written using the trusty methods of combining pasta and earwax
 
@rdlowrey One of the tests, in one of the branches, needs the bootstrap file - github.com/Danack/Auryn/commit/…
 
the phpunit's code is horrifying
 
-5
Q: Downloadable Output of XML file with PHP

user2011036I work with MySQL database. I want to view the output of my query as a downloadable xml file. I can't use SimpleXML or XMLWriter because I use the php 4.Could you help me to find the way. Here is the code for getting the data. I should say that the data is layered and dependant in each other. <...

 
user895378
@Danack yeah, that's the kind of stuff I'm addressing though so there is no need for the bootstrap.
 
@webarto you are a bit naive for your age
 
I'm looking for the // increment $i
 
@rdlowrey btw that seems counter to the argument people make on the internals list for new features; namely that if you don't like a feature, you don't have to use it. Yeah, the defineParam is a hack, but it allows people to start using the library without having to re-write their application first. For people don't like passing raw params around....they can just simply not use it.
 
@derp :-)
 
user895378
Well, at the language level I think it's often prudent to try to remove everything you can possibly live without rather than to add features all over the place. But for a library if a feature is really useful at low cost then it usually makes sense IMO.
 
5:07 PM
anyone know how to make excel read data from phpmyadmin? Still stuck with this
 
1 message moved from Lounge<C++>
Wow, I can pin stuff in your room :P
 
:P
 
Where am I
 
Incoming "PHP sucks" pinned message in 3....
:-)
 
5:09 PM
@R.MartinhoFernandes but we can also pin stuff in yours ;)
 
You wouldn't dare!
Btw, now I can't unpin it.
 
user895378
@derp How do I tell composer I want it to generate an autoloader using the autoload-dev key?
 
Thanks, whoever that was.
 
@R.MartinhoFernandes It's ours now. We're keeping it.
aww
 
@R.MartinhoFernandes Your powers are weak young one!
 
5:13 PM
@PeeHaa we already have few of those
I think there was one with 30 stars
 
yeah. I think that message was received the best of all messages in here :P
 
user895378
Anybody have any clue how to tell composer to actually build an autoloader that uses the autoload-dev? The documentation is, as usual, unhelpful.
 
It's not already doing it for you? It should be in autoload_psr4
 
@rdlowrey Doesn't it do that automagically?
I thought you need to tell it to not do it
 
user895378
It does now that I used the terribly insecure composer self-update command. Guess I had a buggy version. Actually no it doesn't.
 
user895378
5:20 PM
I don't have any idea what I'm doing.
 
composer update nothing or composer dump-autoload
I think.
 
user895378
I've figured it out now. As usual it was something stupid on my end.
 
@rdlowrey can I bug you for a quick artax question?
 
user895378
@PeeHaa sure
 
I do var_dump($this->httpClient->request($request)->wait()); but I only see the first response. But there is a location header in there
The follow op thing is enabled
 
user895378
5:31 PM
What is the response status code?
 
How do I get the actual result of the response after redirect?
302
Probably doing something stupid
 
user895378
Well it's supposed to follow the redirect automatically in that case. Are you using a URI that you can paste here?
 
user895378
Or if you don't want to share publicly is it something you can email me so I can debug?
 
I can setup a gist. moment
 
user895378
Cool. Because if it's not automatically following the Location header from a 302 response then that's a bug.
 
user895378
5:33 PM
Unless it's redirecting from an encrypted https:// resource to an unencrypted http:// resource.
 
yeah that was my first thought, but that should have come up earlier so my money is on PEBKAC
@rdlowrey Don't think so. Let me check to be sure
 
user895378
Well, my code is certainly capable of exhibiting bugs features, so I'll be happy to cruise your gist.
 
nope sll all the way. moment. incoming gist
 
user895378
I should probably add an option to enable following Location headers from encrypted to unencrypted just in case people want to allow it (though you aren't supposed to do it automatically according to the spec for security reasons).
 
Couldn't care less :P
Sane setup or GTFO
Although stupid 3rd parties are stupid
@rdlowrey gist.github.com/PeeHaa/b9f91d4545b3db424ab9 add your twitter credentials at the bottom
 
user895378
5:40 PM
@PeeHaa k, thanks. Will look into it in a few minutes and report back.
 
awesome
Let me know if you have questions
 
user895378
@PeeHaa the twitter login -- is that an API key thing or my regular twitter account login?
 
user895378
@PeeHaa Ah, regular account login. Nevermind. Yeah, I'm seeing the same failure to redirect. Will debug now and fix. In the meantime, would you mind posting an issue on the github?
 
@rdlowrey Not at all. Issue incoming
 
6:02 PM
yay
master now has php7 all over the place
 
user895378
@PeeHaa Found the problem. For some stupid reason I have it set to only perform a redirect if the request method was GET or HEAD on line 623. That is supposed to be "don't redirect if the request method was HEAD"
 
user895378
Will update the issue and ping you once I've pushed to master.
 
user895378
@PeeHaa Fixed. Thanks again for finding/reporting the problem. You'll need to tell your composer to pull in the dev-master (or "1.0.x-dev") version to see the changes until I tag 1.0.0-rc1 next week.
 
Awesome tnx. Will dick around in dev master
 
6:20 PM
Hi guys.
 
@rdlowrey btw you might want to add branch alias to allow people to install dev versions without having to fiddle with their composer.json. I haven't actually used it myself yet, keep meaning to.
 
Does anyone know modern ecard software written in PHP available for fork?
Or just licensed under WTFPL?
 
ecards are still a thing?
 
@derp I think so. Good stuff for marketing reasons.
 
6:34 PM
Bump :C
 
1) Don't 'bump' 2) There's no point bumping when your message is the last one.
 
@Danack point taken.
 
6:51 PM
Is there any way I can connect to a database through excel without using a mysql connector?
 
anyone still willing to vote on Integer Semantics?
 
@AndreaFaulds this is starting to get annoying...
 
:/
the vote ends tonight
 
@PeeHaa: Of course it doesn't allow that. Otherwise, the answer to my question would simply be "Use the provided cast operator". Since it doesn't allow it, I am asking for a way to write an expression that has the same semantics as such a checked cast operator. — gexicide 25 secs ago
O_o
/me steps away slowly runs
 
7:09 PM
It's actually not that stupid a question - it's just asked stupidly.
 
I can't even be bothered to answer "no, there is no better way"
 
@Danack After my comment it is a stupid question imho
nope cannot be done -> ok can you gimme the expression for it?
Also the actual question as I read it is about checking types, but now suddenly he wants to magically cast something that cannot be casted in php in a sane way
 
@PeeHaa Yes....it's a feature of Java, bad type conversions can be caught easily, to make up for shitty programming.
on both sides of the keyboard.
 
I understand that, but you cannot cast like at all making the entire question moot
 
btw I need to update the readme, but if you're going to be writing api services using artax then cough cough: github.com/danack/artaxservicebuilder
The example generated github service - github.com/Danack/GithubArtaxService is probably better than the documentation currently.
 
7:15 PM
@Danack ow wow. You actually went for it
I started something like that once, but aborted because E_ENOUGH_PROJECTS
 
Yep - I am actually getting more and more annoyed by symfony's shitty coding style, and I may have accidentally have slipped into a "make projects that replace the shitty Symfony implementations" mode.
 
Start with the cli component. Pretty please.
 
That GithubArtaxService is being used in bastionrpm.com which I'm hoping to release properly in a week or so. And yeah, the api is really nice to use - e.g. github.com/Danack/Bastion/blob/master/lib/Bastion/…
@derp let me check something in...;)
 
<3
 
@Danack Do you hate typo PRs like everybody else?
:P
 
7:21 PM
If it's on the frontpage I probably have fixed it locally.
 
And that reminds me, need to add a 'report issue' button.
 
@Danack It's in the generator :P
 
Which means I need to commit in the generator project, rebuild all the things, check in the generated project......which is the downside of storing generated code in a repo.
 
yeap
 
7:24 PM
/me started working on native tls patch for master ...
Thread Safety => enabled, native TLS
 
plz, help me
mysqli_error() expects parameter 1 to be mysqli, boolean given
 
@SabbirHossain search the site or the web and help yourself
 
@derp By. Your. Command. A refactored Symfony/console to make it not be shit - github.com/danack/console
^^ cc @rdlowrey and @jimbo - basically I ripped out some of the crap in Symfony/console so that it now just acts as a 'cli router' and you can run the actual code with Auryn.
 
@PeeHaa Hmm, btw that authErrorAsException doesn't actually seem to do anything...that may be on the 'todo' list.
 
7:38 PM
@PeeHaa, I added the token to prevent duplicate record insert on manual page refresh. My search form stores the search term in a database. I do not want a duplicate entry to my database when the user refresh the page manually. Tokens as I have read helps in scaling down CSRF attacks. — Manish B 3 mins ago
What is it with people tonight...
@PeeHaa, you might consider going through phpro.org/tutorials/Preventing-Multiple-Submits.html as well. Yes, in my last comment I did point it helps in scaling down CSRF attacks. — Manish B 1 min ago
 
A question that I should know the answer to - do tags get copied from one repository to another when you do pull-requests? Or are they only ever done by a special command?
 
@Danack Well what took you so long. geez.
 
@derp Had to write the commit message. Should have skipped it.
 
plans to packagist that one?
 
@Danack I don't think they are, but now I'm just on the "I'm feeling lucky territory"
 
7:44 PM
@derp Yes - question is what to do about tags?
i.e. should I just continue the tags from where symfony/console left off, or delete them and start fresh?
aka semver is stupid.
 
start fresh. a clean slate always feels better.
 
@derp I'll probably keep them almost in sync, will make it easier to pick up changes from the original
And packagist is down....
 
again...
 
must.....finish.....bastionrpm.com
@derp It's there now - couple of things to note. The generic commands don't support flags yet (might do those later) also there is a bug in the mainline version of Auryn that prevent callables returned by class methods being able to be used as a callable - either don't use them or use my fork of Auryn (listed in the composer file) if you really want them and can't wait.
 
awesome. thanks @Danack
 
7:59 PM
I've really just hacked this out today - and I still need to write some tests for the callable, but to be honest the code changes I've done are of the type where they will either work or not, rather than introduce subtle errors.
 
@Jack Not sure if this way you, just got around to fixing this one: bugs.php.net/bug.php?id=67633&edit=1
 
Hey ladies!
 
Anyone know how to force packagist to refresh the 'description' of a package?
 
Good evening (CEST) everyone!
 
@andy morning (ugt)
 
Aaand I learned something already, thanks! :D
 
8:20 PM
:-)
 
DateTimeZone::__construct(): Unknown or bad timezone (UGT) :(
 
@derp NO WAY !!! needs to be improved ASAP
 
@CSᵠ ... I want to add a PR adding support for it...
 
Press Release?
not familiar with lingo..
 
pull request
 
8:28 PM
pull request
bloody ninjas
 
points and stares at the person who doesn't use git
 
@JoeWatkins nearly finished the xml patch. Will push a first draft later when I'm back home (in approx. 1.5-2 hours). Could you then please do some review (in very near future!!!) and try to spot some inconsistencies (like in attribute naming etc.). That'd be important, before showing it to PhpStorm devs for further review.
 
@derp ikr
 
@bwoebi sure will review tomorrow
 
@JoeWatkins thanks :-)
 
8:32 PM
@CSᵠ thinking twice about it, dates are a mess. I'd rather not do that, in the end.
 
@FlorianMargaine Nah, just have it make everything return "morning" for the first half of script execution and "evening" for the second. All ya gotta do is solve the halting problem and you're half way there. Easy peasy.
 
only half way there after solving the halting problem?
how about I make something P=NP?
 
=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
DateTime::add() -- fall type2 type3 [ext/date/tests/DateTime_add-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type2 [ext/date/tests/DateTime_add-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type3 [ext/date/tests/DateTime_add-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
quality ...
 
lol
that's some tests there
 
@FlorianMargaine don't worry, bugs exist
 
8:38 PM
'Various bugs exist'
 
@FlorianMargaine you have something interesting for p-np ?
 
@internals people: how hard would it be to implement something like private const FOO = 'bar'; in classes?
 
why, to accept an interface, it's defined as object here? lxr.php.net/xref/PHP_TRUNK/ext/date/php_date.c#246
 
UGT easteregg?launch apr1'15;raises E_HELLO on construct and E_GOODBYE on destruct :)
 
use --enable-easter-egg configure option to have it.
 
@FlorianMargaine cool
 
@PeeHaa yay .. another whiny piece of trash
 

« first day (1435 days earlier)      last day (3513 days later) »