« first day (1167 days earlier)      last day (3796 days later) » 

9:00 PM
ah well
yes, I'm also no fan of braceless style
 
@bwoebi That is something that is AWESOME
:)
 
@NikiC I agree.
 
@PeeHaa italics.
 
I always have to look up how to combine italics with bold ;)
 
@PeeHaa It's absolutely not awesome.
 
9:02 PM
My main problem is not the indentation, but the fact that there is no end block delimiter
 
@bwoebi What's the problem with it?>
 
Which makes it inconvenient to type for me
Normally a } or end or whatever will automatically out-dent but in python you can't do something like that
 
@NikiC I don't have a problem with the indentation, but that it's used as a structure element.
 
(Old Lisp wisdom: The parentheses are not for the programmer or the compiler, they are for the IDE)
 
@NikiC :o
But there are things in Py like the possibility for [for ... in ... if ...]. In PHP we need for that always an array_map with a closure and eventually much use ()… too much boilerplate.
Not sure if it's often needed, but when I have to write such code, I tend to not like it later…
 
9:10 PM
yeah, I like that as well
have an old proposal to get that into php :)
though you can't get the same level of syntax niceness in php (as always...)
 
@NikiC why not?
(s|r)/r?
 
@bwoebi [expr foreach (foo in bar)]. Do you see the problem?
Can only do [foreach (foo in bar) expr]
 
user895378
@BenjaminGruenbaum thanks for the pub ... I don't really have the heart to tell them I already have a much faster server with all the features on their roadmap ten versions out.
 
@NikiC and that's a difference?
 
Does anyone know when AllTests.php was removed from PHPUnit? Doing some archeology right now, but it seems it's ages ago... .
 
9:13 PM
(you still don't want to implement an AST?)
 
@bwoebi Well, it is a difference. Though I think the second syntax is good enough for me
also integrates better into the general php look ;)
 
user895378
happy holidays from NYC!
 
@NikiC why is the one syntax better than the other?
@rdlowrey ah, I thought you'd be already back unexpectedly :-P
 
@bwoebi I'm really just complaining that we can't do that in PHP due to lack of AST :P
 
user895378
Nah, just some down time between food and alcohol :)
 
9:16 PM
3 mins ago, by bwoebi
(you still don't want to implement an AST?)
@NikiC I've heard there might be maybe a major in the next year(s)!? so… good time for ASTs etc.
 
@bwoebi yeah, do it
 
@NikiC not alone.
 
hm
maybe
I'll see how busy I'll be next year
 
in Summer maybe. I'll be finished begin June…
Aren't you also less busy in that time?
 
yes
I'm still not sure about cost/benefit ratio though
 
9:23 PM
cost to write or cost in CPU time spent?
 
anyway, from looking at the size_t / int64 branch php6 will be full internal API break
@bwoebi cost to write
so hopefully we'll be free to clean up
 
@NikiC that usually are things we only will see when we're finished and people realize the new possibilities
@NikiC yeah, clean up needs to be done anyway… compiler looks a bit clumsy to me with all these things added during PHP 5.x (e.g. namespaces just put somewhere to make it just work)…
 
So yeah, @PeeHaa now I'm back :P
How does SVG help me? It's not really animation what I'm after, there's no state change between frames, the frames themselves are different pictures.
 
@bwoebi I really wonder how PHP6 BC will be handled
 
But I think, that's something to decide when we do it.
 
9:27 PM
Looking at Python, there were not that many BC changes between 2->3, but even now years later Python 3 is still struggling
 
@NikiC no idea… but I think there won't be too much userspace BC breaking
 
@NikiC python is because of the libaries and them saying fuck you
 
@NikiC hah, we have these problems already with PHP 5.4 and magic quotes etc.
 
I feel like a good goal would be to allow "modern code" to continue working with little modification
I.e. Symfony should work with a few tweaks, but we don't care if CodeIgniter can't run without major rewrite
 
9:29 PM
@NikiC I agree. But today's code is still a lot of old, bad code
@NikiC I totally agree :-)
PHP 6 should be a good point to remove some of these deprecated things
(bye, calls from incompat. ctx., /ext/mysql etc etc etc.)
 
@NikiC I don't think you can compare the addoption rate of python with php. Two entirely different worlds and ecosystems
 
@MadaraUchiha How large are the files after compression
 
@PeeHaa why?
what's the difference?
 
9:31 PM
I have an array like this `[0] => BOB, [1] => 123, [2] => James`
IS there a way i can sor the array by the Highest Number which is in the array as index `1`? I have tried to use `rsort()` with no luck
 
@PeeHaa I'd guess around ~100kb each, give or take 20
 
@NikiC For one the lack of need to upgrade from the casual user's POV
The same for the library authors
 
@MadaraUchiha So 2 MB. And is this on a single pages or 20 different images on all pages?
 
@PeeHaa Single page.
 
9:34 PM
@PeeHaa I have an array that contains multiple arrays. Each inner array Contains 3 values. 2 Strings and a int. How do i sort those arrays in the array in an order from the Highest int? I have tried using rsort()
 
Imagine a product on eBay or Amazon, where you can watch the item from every direction.
So that would be a single item, all 24 frames.
 
@MadaraUchiha If it it a one time download for 20 images I would just download it and set appropiate caching
 
@PeeHaa You may have misunderstood :P
 
oh :P enlighten me
 
Each page would have 24 frames of a different item.
It isn't the same item for everyone and for all eternity. It depends on which item you request.
 
9:36 PM
@PeeHaa lack of need to upgrade is on Pythons side or on PHPs?
 
@NikiC PHP, most definitely.
 
I.e. do you mean "My hoster does the upgrades for me" by "lack of need"?
 
@NikiC From python's side. They have been and still fully support both versions. p3 was released somewhere in 2007ish iirc
 
PHP will likely also continue to support the 5.x branch for some time
 
@NikiC Also 5.2??
 
9:39 PM
no
that's already not supported now ^^
 
Exactly
Now consider php will keep supporting 5.3 after next year. Why would WP fix their shit?
 
python also drops support for older versions...
it's not like they support all 2.x versions
 
@NikiC No but they do support the last stable .2 release
Which is also the release that all fancy libraries work with
 
@PeeHaa yes
and we'll also support the last stable 5.x release, I'm pretty sure
 
@PeeHaa we'll support the last stable 5.x release for another two years when we release php 6
 
9:41 PM
likely for more than two years even, if it's the last
 
Yes, but that is not from freaking 2008
;-)
 
@NikiC Releaseprocess says two years?
 
@bwoebi releaseprocess is not concerned about major versions
I'm 97% sure that the 5.x branch will see support for more than two years after the 6.0 release ;)
 
@NikiC Yeah, I just saw that it also supports the model of two majors
@NikiC I'd dislike that.
 
@bwoebi That would be horrible
 
9:44 PM
@bwoebi yeah, with new minor releases on both ;) So then it won't be one version supported for many years, but multiple supported for two years each
guys, you gotta be realistic
 
please not that horror.
why should we want to do that
 
People won't migrate hundreds of millions of PHP deployments to a new major version in two years
 
most BC break should be from anyway deprecated things.
 
@NikiC Hell debian won't even support it in their stable repo for another six ;)
 
@NikiC well… I think that's something we decide when we see how much BC break it is.
 
9:47 PM
Btw: "Support" could obviously be "security-only" fixes as well
Though I'd assume that the 5.x branch would also receive bug fixes for some time
 
@NikiC yeah, then we'd just end with a few minors more everybody has to take care of for a few more years because some hosters still use the 5.x branch
 
brb need to get grab myself something to drink
 
it IS blocking to do that.
When people see they have just two years to migrate, they'll migrate faster as if we'd continue to support it.
 
So what do you say @PeeHaa?
 
It's maybe not the thing the companies like, but the true thing to do I feel.
And if they don't want to, their problem if they have potentially insecure PHP versions. Good hosters will bid their clients after maximum one year to use PHP 6.
"I can't use the wonderful features of PHP 6.2, just because I have to take care of PHP 5.6.30" :-(
 
9:53 PM
@bwoebi Do you know how high the PHP 5.5 adoption is?
 
@NikiC Yes. about 1% maybe.
 
Yep, exactly ;)
 
Most people just do no upgrade because they don't need it.
 
So, PHP 5.5 was released about half a year ago. It has nearly zero BC breaks and we're at an adoption of 1%
 
i only know one shared host who has 5.5 now.. =P
 
9:55 PM
There will be always some servers remain on 5.2, because it just works there.
 
Now think the same thing with a release that has non-trivial amount of BC breakage
 
stupid large shared hosting companies..
 
@NikiC we'll still have 1% after half a year I suppose.
really.
 
until the "CMSes" require 5.5, they wont migrate..
 
@reikyoushin things begin to require PHP 5.4 now.
 
9:56 PM
@MadaraUchiha Well in that case hard to say. I think it is going to be hard to automagically, correctly and efficiently optimize photos created by people. Best thing I can think of is A/B testing the thing
 
But it's always a long way from requirements of frameworks etc. until hosters update too.
 
devil circle ^^
 
@NikiC there are still SO many hosters on PHP 5.2 or 5.3, they just don't care about support.
 
@bwoebi not WP.. which has the biggest share of the shared hosting clients..
a big percent of people/clients just want online presence.. and dont care about quality.. thus security suffers..
 
@bwoebi they likely use distro-supported versions
 
9:59 PM
^ that
 
@NikiC do distros still support 5.2?
 
@bwoebi Ubuntu 12.04 LTS.
It'll be supported there until 2017ish.
 
Is there a good talk about service layers? I've been trying to implement them after reading PoEEA but it's still very confusing
 
@Charles php 5.2 was deprecated 3 years ago :o
 
CentOS / RHEL 6 shipped with 5.3, it'll be supported until something stupid like 2020...
CentOS / RHEL 5 shipped with 5.1, it'll be supported until like 2016 or 2017 or something...
And it looks like RHEL 7 is gonna ship with 5.4 instead of 5.5 :/
 
10:01 PM
yeah, that's what I mean. We don't have to care about continuing supporting 5.x branch, distros will ship what they want regardless of what we do.
 
If not for Remi (the Fedora PHP maintainer) hosting updated PHP versions, we'd be in hell in CentOS land.
 
@bwoebi Distros just backport critical fixed that PHP does on newer supported versions
 
@NikiC jap. That's why it won't make a difference.
Distros don't do anything until there are serious things found in PHP 5.x which we won't fix there.
That'd be the begin of a larger move.
as long as we just fix the things in 5.x, distros just will happily continue backporting fixes.
 
guys, is a repository pattern kinda a service layer?
am i talking nonsense again?
oh well.. g2g. bye! see you tomorrow! =P
 
10:08 PM
yeah saw that already.. btw, just confused. ^_^
 
@NikiC we really should continue like we do now… extending a branches life doesn't help.
 
We'll see
 
@reikyoushin I know that feel...
 
Yeah, let's just wait… first we need to have enough to make a new major before we talk about the organisational things.
 
@reikyoushin as far as I understand it the repository is a layer between the mappers and the persistence code. So instead of having your mappers doing the persistence, the repository is handling that. If you do that in large applications you can reduce duplicate code in the mappers.
 
10:16 PM
@Patrick So if the repository is handling the persistence, what does the mapper do..?
Seeing that the point of a mapper is to be the layer between the domain objects and the persistence
 
@MadaraUchiha mapping the domain objects to the repo methods?
 
@Patrick Why would I need that?
What am I gaining?
If the mapper solely maps to the methods of a different object, it isn't a Mapper it's an Adaptor.
 
@MadaraUchiha Reduce duplicated code if your mappers have a lot of similar code I guess. But I haven't used it myself, I am just refabricating my limited understanding of what I've read
 
@tereško 240p :|
 
@MadaraUchiha hence, the comment about "filmed on an old phone"
 
10:20 PM
More like "on a toaster"
 
10:33 PM
It's... amazing:
2
Q: Why does SORT_NORMAL produce inconsistent results in PHP?

atkayeI'm working on a class which makes sorting of arrays easier in PHP and I've been playing with the SORT_ constants, however the behaviour or SORT_NORMAL (the default sort type) seems to differ depending what order you add the items in your array. Moreover, I can't spot a pattern as to why this mig...

 
@zerkms sort() is not a stable sort
 
I always assumed that default mode was SORT_SOMEHOW
2
 
@NikiC isn't stability about keeping mutual order for the elements that are treated as equal by comparison function?
 
@zerkms yeah, I didn't look closely
likely he's just hitting some non-transitive case
 
yep, that would explain it indeed
but definitely not stability
 
10:39 PM
Hi all.
 
was a quick shot of mine, too :)
 
Someone needs to put a correct answer there
@NikiC
 
hm, trying to write assembly at this time is hopeless
 
however I can imagine that it is also related to stability. perhaps not first grade.
 
@zerkms Sorry, question doesn't seem interesting
 
10:43 PM
@hakre I doubt so. Quick sort expects that comparison is transitive
 
what does transitive mean with sorting?
 
So if a > b and b > c then we expect a > c
it means, that it doesn't compare every couple of items
but "makes assumption" like I provided above
and now after some thinking of it - it's obvious (?) every sorting algorithm that is quicker than O(n^2) would suffer from such kind of issues
 
hmm, in PHP that's not the case, at least not between all types. however I dunno for the values given in that question.
 
it's actually language agnostic
you could reproduce it in any programming language
if you use quicksort
 
11:03 PM
=]
bubble
 
@zerkms Only if comparison isn't transitive.
 
@ircmaxell that's my whole point
 
yup
 
@RonniSkansing actually probably the "traditional implementation" for the bubble sort would also give not consistent results
for some inputs
 
=] i was just throwing words out
 
11:09 PM
@RonniSkansing it made sense to discuss it anyway :-)
 
Hope you are having a great xmas time
 
I'm in the office )
 
@zerkms well i actully did not know that it could give inconsistent results
it has been quite a while since i compared sorting
but i have a math genius to the left of me
but she is a bit drunk, dunno if i can squize a answer out of her atm =]
maybe tommorow
 
I'm sure he could explain it even if he is drunk
 
it is a she
 
11:12 PM
oh
 
and yea sure, but she is busy blending
let me just scroll up to the question
 
I know a genious who in any condition can give you the mass number and some other characteristics of any chemical element
and one day in the middle of the party provided some math for another guy who asked him an antialiasing algorithm for fonts. Next day it was implemented and worked fine
 
nice
well seems the question is already answered =]
 
it is. there was no strong accent on transitivity thing, but seems like OP is fine about that
 
11:15 PM
Well, i am going to get xmas high now with the gf...
@ircmaxell i heard my favorite blogger has a new post upcoming
 
@HamZa looks nice
but honestly don't believe it's possible irl
 
@RonniSkansing who's that?
 
@ircmaxell you ofc
actully I do not care much for blogs, but in your case is has been great stuff. It is fun, it is easy to understand and it sticks
I have done a few years of teaching (not in computer science) and have a huge respect for that
So when is it coming?
 
thanks, but you likely won't get much from it. I talk a little about the year, and then give some stats (just like I did last year: blog.ircmaxell.com/2012/12/2012-what-a-year.html )...
 
oh... i already read that
best part of the ultra low revenue on ads
 
11:23 PM
same this year
 
(not that it is great that it is low, but i love seeing the numbers)
 
made a little bit more, but not significant
 
well you deserve some real credit, both in real money and as in pads on the back
btw haskell made me remember how much i need to brush up my math skills
so I jumped back to C until sometime next year.. i ordered a few math courses late next year and i think i will reboot haskell then
btw, why does php make you tick?
 
Total Ad Revenue: $11
oh :-S
 
It doesnt. Just what I did for a while... I like others...
 
11:29 PM
@zerkms well, you never know. But that's why there's no way I would pre-order it
 
@HamZa well, I probably know too much on how computers work to realize that most parts of that render aren't possible to implement these days
and I'm sure you too :-)
 
hehe
 
@ircmaxell oh ok. =]
 
> I can see quite well what's happening here. The problem is I don't really understand Zend very well or half these opcodes, nor the code inside zend_list_do_begin() itself, so I am hopeless at implementing it. For this reason, I don't think it'll be in 5.6 unless someone can help me write it.
People who have no idea shouldn't try to make patches :-(
Who on internals do you think wrote it (it's quoted from a private mail)
 
Morning!
 
11:41 PM
Hmm i would love to more active in open source the upcoming year
 
I spent ~12hrs overnight for small problem... Have to go to office in 1 hour now. Any one wish me RIP :(
 
@JerryPham best wishes
 
thanks, happy enough to die.
 
@bwoebi was it ajf?
 
@Jack correct
 
11:44 PM
yay, do i get a prize now?
 
you eventually get a new RFC in vote status.
 
@bwoebi what was it about?
 
@NikiC Andrea's list(&$$a)
 
ah
 
oh yeah, references in list() syntax ...
 
11:46 PM
the feature itself seems okay
 
yeah, seems handy sometimes.
 
lxr.php.net/xref/PHP_TRUNK/Zend/zend_compile.c#926 wondering why lines 926-955 aren't included in zend_do_assign_ref too…
^ that's what was causing the error.
 
does anyone know if there is a filter/sanitizer in symfony2 for HTML form values that normalizes unicode input and disallows/drops control characters?
 
but i was too lazy to debug the issues I found with the patch
 
@NikiC I looked maybe ten minutes at it…^^
hadn't planned to spend a lot of time here… just wanted to look if I'd luckily find the cause^^
just before going to bed, hehe
 
11:48 PM
variable assignment is tricky ^^
it's one part of the engine I never bothered to look at in detail
 
as long as you don't need it, why waste time here…
 
would still be good to know ^^
likely it would also resolve questions like "Where do I use AI_SET_PTR and where can I just assign to var.ptr?"
 
Hey guys, I'm almost done with this inc-dec rfc, any comments or suggestions?
 
@Jack yes, I'd vote no on it. Doesn't make any difference if the flaws are with an operator or a function.
 
i'm off to bed
nighty
 
11:51 PM
If you increment or decrement NULL, technically it should stay NULL (doing something with undefined results in undefined)
 
good night
 
@hakre well yeah, that's an idea I toyed with as well.
Since null is a type itself.
So its "value" is bounded by exactly a single state.
 
@jack i would love increment or decrement on null would throw an notice or error
 
@bwoebi hmm okay, so you're saying that the current behaviour is fine?
 
It's not an error, it's just NULL :D
 
11:54 PM
Yeah, just like how INF - 1 is still INF, things like that.
 
that is also useful with undefined vars.
nightly @NikiC
 
The problem lies in bc of course; you won't know how many people currently rely on this feature.
 
m59
My javascript-ness may be biting me here
1
Q: More efficient way to use args in function

Leonardo GirardiI need to define a function in PHP that contains multiple arguments (as shown below): function the_function($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, ...) but I believe there is a more efficient and clean method of doing this. Can anyone help me? I thought of using an array, something ...

Passing assoc arrays as arguments in php is bad?
 
You can safely assume that --null isn't used, because it currently doesn't do anything. that said, maybe some unknowingly rely on it.
 
@hakre so you consider NULL arithmetic ?
 
11:57 PM
@RonniSkansing It's using null in an arithmetic context by using -- or ++.
 
@m59 The first thing I would ask is a) do I really need all that and b) does the thing not do too much
 
m59
@PeeHaa right, I mentioned that.
 
Yeah, it's refactoring 101
 
@RonniSkansing No, NULL is just no object.
 
ow I didn't read the actual question. Just saw the function signature :P
 
11:57 PM
=] hehe sorry guys I do not get it.
 
Guys, you don't dependency inject standard php objects, like from spl do you?
 
Don't predaclare them. Just use func_get_args(), or wait for PHP 5.6 — mario 6 mins ago
 
Like: FileIterator
 
or wait for php 5.6 o_O ?
 
@Jack wouldn't it be more intuitive if those examples threw exceptions?
 
11:59 PM
@Patrick Hmm? You mean throw an exception if you try to increase a boolean?
 
yeah
 
@Jack when do you use null in arithmetic context?
 
@Jimbo What is a FileIterator?
 
@RonniSkansing $var = null; $var++;
 
it doesn't really make sense to me to increment or decrement a boolean or null
 

« first day (1167 days earlier)      last day (3796 days later) »