« first day (1321 days earlier)      last day (3852 days later) » 

13:00
what's broken there?
Your insane code? :P
^ that
I don't remember when I last saw requiring file relying on GET. /me sighs And it does not worth opening a ticket, since the answer will be admin should not be hacking him/herself. :)
@PeeHaa no, why a division by zero error?
root# php -r 'var_dump(1 % INF);'

Warning: Division by zero in Command line code on line 1
bool(false)
^ INF is treated like zero for modulo, but not for division
To the lxr mobile?
13:03
Is there a way to stop PDO from escaping a slash like \ in specific prepared statement?
@BenBeri \\
Also, why are you putting slashes in statements?
because I have some namespaces stored in the db
@bwoebi Because modulo casts to int? (it does, just checked)
@bwoebi because:
@Danack Shouild i just replace namespace saving to _ instead of \ ?
13:04
if (Z_LVAL_P(op2) == 0) {
		zend_error(E_WARNING, "Division by zero");
		ZVAL_BOOL(result, 0);
		return FAILURE;			/* modulus by zero */
	}
^ as far as I know, 0 and INF have different bit representations…
that's what makes me wonder…
@BenBeri No, you should be passing in the string as a parameter to the prepared statement, then you don't need to worry about escaping it at all.
and btw. INF is a double value. Don't serach in fast_mod_function @AlmaDo
@Danack I am passing the string, same thing
@bwoebi do var_dump((int)INF);
@bwoebi yes, it's not long. But if it's not - it will be converted to long
@BenBeri Then something is going wrong somewhere...
@bwoebi Yeh but long has no representation of INF, so if you are going to convert double(INF) to long and not emit an error then 0 seems like a sane result to me
It's the operation itself that makes no sense...
@DaveRandom Did you go to uni?
^ this
13:08
the error message still isn't helping.
Ah ruined your ^ this :D
@bwoebi why?
@tereško yup
@Fabien I didn't study at uni, and neither did I pay to go to uni. I did spend a couple of years hanging out at my mates flats/houses taking drugs while they went to uni though, does that count?
@DaveRandom that is the standard way
it does count
13:10
@Danack even if you use \\ it doesn't work.
@DaveRandom heh close enough. I still can't really fathom how you know so much. -_-
I am an exceedingly boring person
Quick question: Does modulo work with operand outside of long range?
@DaveRandom I'll bet I'm totally more boring than you are
what does this means (To install Git, you need to have the following libraries that Git depends on: curl, zlib, openssl, expat, and libiconv. )
13:11
3 mins ago, by Danack
@BenBeri Then something is going wrong somewhere...
@bwoebi why do not use fmod instead?
@bwoebi it works, but incorrectly (= does not works)
@Danack And if I replace it with 'Library_Front_Controller_Admin_Login' (changed db values too) it works.
php > var_dump(pow(10, 20) % 100);
int(20)
^ I see…
yeah. because of.. conversion to long
I'm now just wondering why PHP does that...
13:12
use fmod, problem solved
@bwoebi you already know the answer
Why does PHP not internally fallback to fmod if one operand isn't long?
@bwoebi Yep, also you get stuff like 4294967294 % 3 == -2
why should it?
@AlmaDo why shouldn't it? To always get correct results.
@DaveRandom not on 64 bit, hehe
Windoze4life!
no, wait, the other thing
13:14
meh
Is that documented?
what?
> Operands of modulus are converted to integers (by stripping the decimal part) before processing.
So no, not adequately
ah, yes. Ambiguous
yeah…
13:16
Needs a big fat red warning box
not sure if fix source or fix docs^^
well, why should it fall back to fmod ? If intention is to use long?
Fix docs now, ask RMs if they will allow src fix in to 5.6 (my guess is no)
why do you guess so? It's a bug fix.
And please don't fix docs now^^
hm. if fix that, may be we don't need fmod ..
13:20
so, what now? fmod(floor(op1), floor(op2)) ?
Y'know what'd be nice? User-land operator overloading.
@bwoebi for what?
@DanLugg no. no. no.
@bwoebi yes. yes. yes.
holy crap, Pierre is an ass
13:21
@AlmaDo when op is double.
@bwoebi makes sense
@ircmaxell current #php.pecl?
@bwoebi but may be apply that to % itself? (so fmod will be just redundant) ?
They're doing a great job of attracting devs to the cause aren't they
@AlmaDo that'd be a BC break in sense it breaks what docs say
@AlmaDo for next version maybe.
13:23
@bwoebi yes, yes.. :\
I won't be surprised if someone relied on wrong result when using % for floats
well, that's the source doesn't match the docs. point.
@tereško i'm sorry, i meant doing new bla(new PDO()); where _construct($pdo){ $this->pdo=$pdo; }
@CSᵠ What if you need that connection somewhere else?
sup people!
finally i have found the solution for Doctrine versions 2.4 up
@markcial What was it?
13:26
->join('Package:Discountproductgift', 'd', Join::WITH, 'c = d.campaign')
call the class, then alias, union WITH, and then the property of the class that retrieves the object
works like a charm
no need for interfaces or class inheritance exclusions
Hello folks! I wrote a question, a while ago, about whether to choose Laravel or CI as a framework. I had some great responses, but, today when I tried to share the question with some friends, I realized it was closed.
I was wondering if somebody could vote to re-open it, stackoverflow.com/questions/13693795/…
I've already voted, and, any other vote to open it again, would help. I just want to share the question and answers with some friends
not on stackoverflow I think. SO is for objective Q&A.
@w0rldart but feel free to copy it to somewhere else and give attribution.
and what is that? not an objective Q&A? There are some awful questions out there, that are still opened :\
then close them too.
@w0rldart We're working as hard as we can ;-)
13:33
@w0rldart that's not an excuse for other bad questions to persist
@w0rldart It's subjective if CI or Laravel are better.
^ both are crap?
^ both are crap.
I understand. I just wanted a way to share the question... but this would do: web.archive.org/web/20130629194018/http://stackoverflow.com/… thanks @DanLugg
CI is crap, specially the 2.x
Laravel is not
13:34
wait, that does not answer the question. Because from two craps one may be crappier
@w0rldart Don't start a war now.
ok :D sorry
@AlmaDo that's like comparing -INF with another -INF.
Being the best of a selection of crap, is like winning a crap-eating contest. Sure, you won, but your mouth is full of shit, so who's the asshole in the end?
@bwoebi haha.. you know what? I was just posting var_dump(-INF<-INF, -INF>-INF) :-D
13:36
@AlmaDo yeah, that.
@AlmaDo just out of curiosity (I'm open minded). What framework would you rather suggest, instead of those two?
None. Write from scratch.
why keep on re-inveting the wheel? that's just waste of time, and stupid... :\
@w0rldart No, you don't rewrite everything. You use well defined, well tested, isolated components. The code you write is wiring them together.
I forget how the quote goes exactly, but frameworks are "business applications with the logic removed but the assumptions left in"
laravel 90% of the times suited my needs. maybe I'm not that skillful as I think of my self, but with laravel I achieved the delivery of pretty large projects, with spectacular outputs... so, I couldn't be more happy with it
13:38
@w0rldart use libraries if you want code reuse.
^^ That.
it's a long story. Well, you actually should know what are frameworks and what's under cover there. But real use-case for certain things is very, very specific. It will always looks like - when you need a hammer, you'll take entire manufacturing facility to your app
I'm not good with frameworks, sadly :\
Also, even if Laravel (or whatever other flavor-of-the-week) meets your needs, and you continue using it for 90% of everything, you're mentally binding yourself to it. It's best to keep a mental distance from the implementation details of framework X, or library Y; it helps you see the forest for the trees.
@AlmaDo s/sadly :\//luckily :-)/
@bwoebi at one side - yes. But It's sad that I used only ZF (for some apps). So lack of experience. It's the case when you should know how to do bad for not doing bad
13:41
Look at people who "know jQuery, but not JavaScript".
@w0rldart when in few years time you start actually learning OOP, you will understand how bad laravel was
@DanLugg jquery is a nice point of entry for javascript. It abstracts the DOM aways so that most what you do is really writing Javascript.
Frameworks are about old samurai rule - if you want how to heal, learn how to kill first
@bwoebi Disagree. It's a great productivity tool for people who know what they're doing.
but until then it's pointless to discuss this with you
13:43
@bwoebi Yes, but for people who don't understand the DOM it doesn't abstract, but merely hides.
I learned jQuery before I learned Javascript /me hides
Nov 19 '13 at 11:40, by tereško
"jquery" is an ancient armenian word for "I cannot write javascript"
@Jimbo See. It's that kinda of sentiment that's the problem.
@PeeHaa where would i need it? what do you mean?
You learned JavaScript WHILE you were learning jQuery.
13:43
interesting point of views... for sure. I do not consider my self bonded to anything. But, very flexible, dynamic and open minded. and to be honest, I couldn't agree more with the "know jQuery, but not JavaScript" argument... even though I don't consider my self a good javascript writer
@DanLugg Yes, but now I know I can do 99% of things with pure JS (and also be more proud of my work)
Yeah okay, I guess I did learn JS while learning jquery
I learned javascript before jquery was even planned..
@DanLugg because the DOM is a complicated API on top of Javascript. Jquery hides that complicated world so that you can first familiarize you with JS before tackling the complicated part.
hipster :P
@bwoebi But people don't is my point. People learn X without learning A-W.
13:44
@Jimbo That's what I mean…
@AlmaDo Ignorance of so called jQuery developers is annoying. However, that lib is too much useful.
using jQuery, MooTools or any other JS framework... does not make anybody a bad developer, as long as they understand what they're actually doing and writing, and, ofcourse, following good, healthy and optimized coding habits
And the same thing happens with PHP frameworks. People learn framework X, and enough of PHP's syntax to mash things together. I'm sure there's a good portion of people who believe "controllers" are a first class language construct.
@DanLugg that's an issue, but not related to jQuery. It's just a coincidence that jQuery is really useful for writing much simpler looking code and attracts beginners that way.
@Leri yes. It is useful. I'm just against any kind of extreme for that. No sense to ignore jquery - it's really useful. Also no sense in hating pure javascript and know only one library
13:46
@DanLugg I learnt programming by skipping asm step (whilst I'll be getting back to it) does not mean I can't program at all.
I'm going to argue that using wordpress by choice does make you a bad developer :-)
@Leri You know that's not what I'm talking about; let's be reasonable here.
@w0rldart well ... today in a job interview a candidate told me that he rates his JS skill with 8 and his jQuery skill with 9
@AlmaDo actually, I'm not really happy with JS semanctics….
@tereško Would you prefer he said 5/6 and you think he's crap?
13:47
@tereško I wouldn't really call him a candidate then.
@Jimbo how can you know a framework better then language which it uses ?
@tereško have you let him on fire?
@bwoebi hm. I can't say I dislike js. Or that I like it. It's just a tool for solving issues for me..
@DanLugg Fair enough. Despite, I was dramatic, "framework/library" can create product (put aside quality for a second). That's what I was saying.
@tereško Maybe he learned jQuery first like me and didn't backtrack
13:47
@AlmaDo I agree for the latter.
@Leri And I agree entirely. I'm not saying "YOU MUST KNOW OP CODES TO WRITE ECHO"; I'm saying that learn at whatever rate, in whatever order; but learn it all.
I think there's a lot more to JavaScript than there is jQuery
@tereško because you often don't need a lot of features of a language. But you might more often need the full functionality of a library.
It's like the Laravel people about SPL Datastructures.
@fab
@fabien hahaha
13:49
Starting out more like "throw-up Thursday"
@DanLugg I also agree there. It's all about prioritizing. :)
@DanLugg ZEND_ECHO. That was hard.
there are many useful tools - but, unfortunately, they all have their price - hiding something from user will immediately cause loosing control over those things
@DaveRandom Do you have any idea where entities that are used in PHP manual, such as 'imagick.parameter.channel' are defined?
btw. @Danack
what a terrible face (:
13:51
<-- my reading internals face.
hehehe
It looks like a poo face
not the face itself, but it's mimics :p
hm. lounge C++ rocks.
faggots
(:
I need to program entire application in sql. Any idea what to do so it won't become PITA? context: university exams
PITA?
13:54
Whut
@CSᵠ If you do new bla(new PDO()); you just inject the connection handler into bla, but what if you need that connection also somewhere else?
Pain In The Ass
Just wondering I know most of you guys don't like frameworks, is your main concern with them simply inefficiency?
@Leri you need only one thing for that
13:56
@Pitchinnate inefficiency, terrible code, crap architecture, stupid fanbois, utter insanity, death to maintainability amongst others
@PeeHaa third especially
@AlmaDo loads of stored procedures? :D
@PeeHaa i'll do $pdo=new PDO(); $foo=new foo($pdo); $bla=new bla($pdo); what about this?
@Leri why? be perspective
@Leri that only thing is - you should like SQL
@CSᵠ Perfectly fine
13:57
@AlmaDo I do when it has no business logic. :)
@PeeHaa just making sure, tyvm !
@Leri it may have business logic. In some sense. More like data storage logic (i.e. integrity support).
but if you plan to program UI with SQL - then best of luck, but don't ask me for tips
Anytime @CSᵠ
@tereško Is it right to hash password in the domain object?
@PeeHaa just wondering did you ever use frameworks in the past? Or did you look at them and their construction and decide not to use them?
13:59
@AlmaDo I have literally 0 idea how to do it unless I create my own graphical framework that uses t-SQL as DSL. :D
@Leri the question is: are they expecting you to do that?
@AlmaDo No, they are expecting product with service layer pushed in sql. So application can be just pure calls to procedures.
not sure what is "application" and how will it work. So you must provide some API ?
@Pitchinnate I have used them in the past. Also I have looked at what they do and how they do it.
In general I don't like what I see
@AlmaDo I have to think of application idea, implement it in sql at the level described before and make demonstration either via executed procedures via cli or via some program.
14:03
@PeeHaa gotcha I'm wondering if that is kind of the normal progression of a developer
@BenBeri that's what I do
Of course I choose the first option because I am lazy. ^
@Leri hm. API then. You should create some stored code which will maintain your application calls ("application" may be CLI)
@AlmaDo Yeah, exactly. I could not think of any application that will be good for demonstration and won't require too much brainf**k.
strange exam. Usually exam is about checking your knowledge. This is more like.. course work or something like
14:06
@PeeHaa so now that you have moved do you feel like your are more efficient and can produce faster, same or slower?
@Leri oh, wait! here we have a comment for that:
Sounds like homework
$ircMaxellsFavouriteWords = ['blah', 'um', 'umm', 'ummmm', 'md5'];
ummd5?
@AlmaDo It IS homework and 30% of my final grade depends on that.
14:08
@Leri hehe. I was just trolling :p
That 30% should be an exam, so I used that as term.
you know what? I never used my scoring list in diploma to show to employer. At best they want to know if I have a degree. So relax
@Jimbo nope, you missed my favorite
@ircmaxell You just waited 2 minutes so I couldn't modify it in time didn't you
@ircmaxell $ircMaxellFavoriteWords[] = 'eih';
14:10
nah
@AlmaDo I am relaxed, just excited. My university has been sh*t but this homework.
@ircmaxell Enlighten us :-P
$ircMaxellsFavouriteWords[] = '[tag:face-palm]';
@Leri okay..
Hi if i want to access a function in a php class do i do it like this.... pastie.org/9235339
14:10
@ircmaxell thanks for trying again ...
@StephenWolfe Yep
@StephenWolfe as long as it isn't a static function
> 09:09 <@Pierre> ircmaxell, either you participate or well... I dunno
> 09:16 <@Pierre> ircmaxell, and btw, it is so easy to play the good wise guy, behind the scene. But sometimes you have to get your hands in the motor to get things done. Again and again, without leaving the factory.
Well its meant to be where I have my DB query's. They should return a result except I am not getting anything back
14:12
I read the whole thing ...
he still think I was on my own doing what I wanted ...
that's going to be ugly..
Wonder what it's like working for Pierre.
@Pitchinnate You can still call a static function with -> if you have already instantiated the object
^^ Bad practice is bad.
@JoeWatkins to me, that's not nearly as problematic as this though:
> 06:30 <@Pierre> mikemike, summary: Now I will do one about, say, my latest new idea about GD or xmlwriter. Sounds great no?
14:14
@StephenWolfe well you aren't setting storing the results in a variable, or does the function simply echo
@DanLugg Bad practice still exists :-)
I has no static functions. Evar.
Oh, I know. Actually, speaking of static...
Malpractice :P
@Jimbo $obj::staticCall(). using -> will break with strict mode IIRC...
@Pitchinnate I have just added a basic echo in the functions at the moment to see if it returns anything.
14:15
@ircmaxell yeah, just twisting what really happened to suit his view of what happened, and to make a point based on that view ...
@StephenWolfe are you getting an error?
@Pitchinnate ahh the eco is working! It must be my DB code
@Leri ok, ok :p you may ask me if you'll need help in that sql
@Pitchinnate can you see why this may not out put anything. The code was working before I put it in to a function. pastie.org/9235344
@StephenWolfe I don't know wordpress, so I don't know what their Database class looks like
14:18
@Pitchinnate thats just basic PDO that I made
On the mention of static, I was wondering about caching reflection; it seems that by the nature of reflection, it would be understandable to cache them statically; thoughts?
@JoeWatkins pppong
@DanLugg Auryn caches reflections. I don't know how though
(haven't looked at the sauce)
@Jimbo Not statically.
But, when you use APC (or another persistence) they are static in a sense.
@StephenWolfe so you made a Database class that just creates a PDO instance?
14:20
a database function
class ReflectionPool
{
    private static $cacheMap = [];

    public function reflectClass($className)
    {
        return isset(self::$cacheMap[$className])
            ? self::$cacheMap[$className]
            : self::$cacheMap[$className] = new ReflectionClass($className);
    }
}
No indication of a class there.
I can't see anything particularly wrong with the above snippet. Aside from all the missing checks and balances.
@DanLugg statics!
14:21
@DanLugg it is. Global state
Right, but the very nature of class reflection is global; classes live in a static environment.
so it will cause coupling in implicit way
How?
@Pitchinnate yeah,
which is why it isn't a problem here.
14:22
@LeviMorrison and @ircmaxell I think before I can start a blog I need to put an rfc together to keep everyone happy ... was hoping with some help with that ... I have no idea how to keep people happy
user895378
^ :-D
@JoeWatkins RFC to drop backward compatibility completely in favour of a decent api in php 6 :-)
If I persisted the $cacheMap statically or per-instance, it won't yield any different a result; the detail is encapsulated.
@DanLugg As long as you're guaranteed that your ReflectionPool scope is the same than your class definitions scope, no problem.
user895378
14:23
That sigh brought to you by PHP Internals Junior High School and the endless pointless drama it proliferates.
@bwoebi Not following.
@JoeWatkins you should start RFC before go to sleep or waking up. yes, second RFC should be made while you see night dreams
@DanLugg anyone else who can rephrase my affirmation for the layman?
@rdlowrey I'm really going to try and block it out so I can get something done ... I probably fucked up, I dunno, but I still want to to what I set out to do ...
14:24
@JoeWatkins Ah. It take a lot of time.
I can help but I am busy at the moment.
user895378
@JoeWatkins Moar code less mailing list.
You can start by outlining your thoughts somewhere.
@bwoebi Sorry, it just reads... oddly.
@DanLugg I can't follow.
think I might bring Phil in too
14:26
I think we're down the rabbit hole.
It'd be a real shame is good devs are pushed out of internals because of it's difficult nature.
user895378
PSR is just the less useful userland iteration of internals.
Petty almost.
How do I check if php errors is turned on?
@Fabien That's already happened
14:26
@JoeWatkins only if he's in accordance with our ideas. As a counterweight for Pierre and Zeev.
@DaveRandom Aye :(
@Pitchinnate About the same I think. The real benefit for me is maintainability and testability. Don't get me wrong I still use external tools / libaries. Just not entire full fledged (probably crap) frameworks
@StephenWolfe Check your php.ini or phpinfo();
Or google it.
^ that should be first move
I think he totally got it @bwoebi, he's so much better at people than me ... I seem to rub people up the wrong way on internals ...
14:28
Sounds like any way is the wrong way.
@JoeWatkins at people yeah, but he also needs to have the right opinion to be useful for our needs.
@JoeWatkins Yeah, which is exactly how to get it killed as an idea
@Fabien Ahh thanks someone had switched them off
@JoeWatkins If that needs a RFC, there are much worse issues.
@bwoebi news.php.net/php.internals/74550 he seems to see what we were doing, much clearer than most
14:29
Damn mysterious person who switches error reporting off!
@bwoebi I agree, but I want to get this done ...
@ircmaxell btw I should mention when @PierreJoye and I setup http://wiki.php.net there were people opposed to it, fewer now I think
@JoeWatkins not via RFC way.
@PeeHaa gotcha, thanks for the insight, I currently use frameworks sometimes but it is purely for speed reasons, I feel like I can crank out projects much faster
@Pitchinnate IMO if you don't have the time. framework. If you do, custom build.
14:31
well what other way is there ?
And try and make time.
@JoeWatkins prepare another article. You know, Hannes has promised to create the blog then.
@JoeWatkins you don't have to publish it yet, just write one up and Hannes will do I think.
@JoeWatkins I don't know. Part of me wants to say "just do it". but that'll raise more backlash. But going to RFC will get bikeshedded to death.
you know I can't really say what I want to say ...
because people seem to be following me around to watch what I say now ...
NSA?
14:33
@AlmaDo Thanks. ;)
@JoeWatkins PM in private on IRC then
@JoeWatkins You're gettin' tailed by the PHPaparazzi
:X
The GestaPHPo
14:40
Ping @Gordon
@DanLugg I have many tails ...
Joe, I should probably work more on Nullables ^^
@LeviMorrison you're really searching something to waste time on?
It's not a waste; whether it passes or not I need to complete it.
@LeviMorrison sorry if you got stick yesterday that probably should have been aimed at me, and sorry if I gave you any ...
you should of course work on whatever you find productive, I'd really appreciate your input (and output :)) here ... please ...
if I can get phil to pop by will you have a little chat with us, quick brainstorm ??
@JoeWatkins It was mostly just Zeev being ignorant.
(The flak I took, I mean)
@ircmaxell would I be welcome too?
@salathe by all means
Cool, I can't promise much input right away (busy at work) but will try. :)

« first day (1321 days earlier)      last day (3852 days later) »