« first day (1437 days earlier)      last day (3526 days later) » 

3:00 PM
Hmm
Would y'all be less opposed to (int)INF and (int)NAN resulting in zero if it outputted an E_NOTICE?
 
@CSchulz Just ask your question
Maybe someone will reply, maybe not :)
 
I am trying to create a new StackExchange site via Area51 for Symfony, its components and its derivates and I just want to share the link to the proposal if anyone is interested :)

In general I have no programming question. ;)
 
@CSchulz How would it be different from asking on Stack Overflow?
Especially since "all the experts" are on Stack Overflow
 
@JoeWatkins do you want to tell me what part of private const FOO = 'bar' is insane? :)
 
1
Q: Is it a programming topic? Stack Overflow covers it already

warrenProposal: Symfony has >23k questions tagged on SO. The stated policy of the Stack Exchange network is to not fragment flagship sites - so how does attempting to split-away Symfony from SO help?

 
3:06 PM
I'm sure it is I just don't see it :P
 
@SecondRikudo This question is very common for all proposals but they have already passed and in my opinion it would be great to seperate it f.e. the tons of tags which haven't any relation to Symfony.
 
@PeeHaa You mean apart from a visibility constraint on a constant?:)
 
disagree
Disagree. While both Drupal and Wordpress target developers, they also target non-developers. You can get quite far as a site-builder or designer without ever writing a single line of code. Symfony on the other hand requires programming to literally do anything. So I don't think it's an apples-and-oranges comparison. — ircmaxell 13 secs ago
 
@Narf What is insane about it?
 
@CSchulz Drupal and Wordpress are a CMS, Symfony is a framework. I use symfony components all the time, I don't touch WP or Drupal :)
 
3:10 PM
I think it would be a nice feature
 
user895378
People always have such a disdainful tone when reporting bugs on php.net ... like there's some highly paid QA team on the other end and how dare they let bugs happen :(
 
@PeeHaa idk, just doesn't make sense to me
 
@Narf I also got that feeling from @JoeWatkins, but I don't see why
 
@PeeHaa well, what would you use it for?
 
@Narf For internal constants in classes
 
3:14 PM
@PeeHaa sure, but why should they not be accessible from the outside world?
 
Broke for anyone else?
 
@Fabien yep
 
@Fabien Lost connection to MySQL server at 'reading initial communication packet', system error: 111
 
Yup. Nice 200 status code though -_-
 
I bet they're connecting to "localhost"
 
3:15 PM
@Narf One of the same reasons class members are made private / protected
 
@PeeHaa but unlike properties, constants can't be changed
 
@Narf No but they can be read. Making it part of the public API
for no good reason
 
@PeeHaa full ack
 
@Gordon So somebody does agree with me?
 
@PeeHaa I'm all for having private constants
 
user895378
3:19 PM
@DaveRandom At some point could would it be possible to see if you can duplicate this error in the openssl test suite? I can't duplicate it locally -- everything runs fine here.
 
@PeeHaa agreed, but what's the problem with that? :)
 
I'm still trying to find out what's bad about it, because both @JoeWatkins and @Narf don't seem to like the idea
@Narf BC breaks when there is no need for it
Information leakage
 
@ircmaxell Yes you are right. But I think the point behind Symfony are the facettes of possibilities, if you are looking on all the components. They can be used all on its own .
 
from a practical point of view there would be a performance penalty at runtime for access to every class constant, even public ones, this could easily amount to something significant in something like a framework making heavy use of constants ... the reason I shy away from the idea is that I don't see the overlap between things that belong to a class and constant values
 
What does that last sentence mean? You don't see value in constants in classes either way?
 
3:24 PM
@PeeHaa I could argue that you should design the class in another way if that's a concern, but ... meh, idk, the 'class' in class constants has always been a kind of a namespace to me
 
lol. A reason to get an iPhone. An app that performs a "Wilhelm" scream when it detects the phone falling. Vine
 
@JoeWatkins which is why I think the module approach is better
because you can only "export" public to the global symbol table.
 
@Fabien It's a jailbreak app
 
Jailbreak is the only way to run an iphone
 
user895378
Person complains about php-src, says "I have a test case for this and you are all stupid." Me says please PR the test case and I will happily merge it. Person is never heard from again.
 
user895378
3:25 PM
^ Pretty much how every bug report on php-src goes down.
 
user895378
(figuratively)
 
:)
 
yup
 
@ircmaxell What does that mean?
Stop confusing me!
:P
 
pretty much how most bug reports go down anywhere, I'd say
 
3:26 PM
@rdlowrey no, literally
 
user895378
hehe
 
Not that anyone is following but I got a date for my leg surgery. Nov 25th. Which means it'll have been a full 2 years of injury by the time I am fully functional. I finally get to squat. (They're putting a nail inside my tibia all the way down).
 
@PeeHaa Well, you create a first-class object for namespaces. Each namespace gets its own symbol table. A parent can access its children, but siblings can't access each other. Then you could define "exports" for each namespace, which get exported to the global scope, or into an object...
 
user895378
@Fabien dang dude, good luck with that.
 
@PeeHaa a public constant doesn't belong to a class, a private or protected one does ...
 
3:28 PM
20% chance of knee pain for the rest of my life while kneeling. Worth going for anyway.
 
user895378
I hate how openssl is halfway baked into php and halfway not. I change something in ext/openssl and ext/mysqli breaks :(
 
@JoeWatkins I don't agree
 
1 more reason to get out of scrubbing floors.
 
@Fabien good luck with surgery ...
 
github.com/Lusitanian/PHPoAuthLib/blob/master/src/OAuth/OAuth2/… public consts that imho belong to the class
 
3:30 PM
Cheers. Can't wait though. This + second surgery to sort GERD out. Fingers crossed for a bionic super 2015!. We can rebuild him! We have the technology.
 
not sure that's a good example
 
@rdlowrey yay for tests!
 
/s/good example/typical/
 
@Fabien bionic leg?
 
@ircmaxell I think I can live with that, but sounds like something that will not be easy to implement?
 
3:31 PM
prob not
 
@JoeWatkins damn you :P pick another one! :D
 
user895378
@ircmaxell Well, it would be a "yay" if php streams actually had any tests :(
 
user895378
It makes doing things with openssl a minefield :(
 
I'm starting to feel that tests are in general bad
 
3:32 PM
@Jack not literally but it's a full length nail inside my tibia. You can view the surgery on youtube if you google 'intramedullary nailing of the tibia'
 
php-src is a great example, valid changes break tons of tests for weird reasons, and invalid changes break no tests...
actually, that's a bad way of phrasing it
tests inspire false confidence
 
and while you should absolutely test, you should also refactor said tests and treat them like normal code. Rather than allowing them to live outside of it
 
@Fabien i can imagine why that would be necessary, despite the creepy nature of such an op =/
 
3:35 PM
we use constant values as enumerable values, usually that requires them to be public, unless you're going to include the business logic for every possible enumeration inside the class itself, and in so doing probably violating SRP ...
 
@Ja͢ck Typically it's for leg breaks. I 'apparently' am the only case in the world of chronic stress fractures (yay? \o/). So it's a really random thing to have to go through.
 
are you Mr Glass?
 
lol. Worst super power ever.
 
Did you see that movie?
 
Unbreakable right?
 
3:40 PM
@JoeWatkins I'm going out to get some food. Is it ok if I ping you later?
 
Yeah. Probably the first truly great superhero movie IMO.
 
sure @PeeHaa
 
user895378
@PeeHaa never asks for permission to ping me :)
 
yup
 
@JoeWatkins I use constant values to avoid magic numbers. Sometimes they're private
 
3:42 PM
TBH I didn't even peg it as a super hero movie when I first watched it. Not until much later when I was a fair bit older.
 
for example there's the value MAX_ORDERS_PER_DAY, only used in the Order class, in one method
it should be a private property, shouldn't it?
 
@rdlowrey That's because I am fixing your bugs when I ping you ;)
 
user895378
@PeeHaa that's why I never mind lol!
 
:D
 
@rdlowrey Friend of mine just placed 3rd at a UKBBF comp for Physique. His first time. Post comp after a few burgers
 
3:45 PM
@FlorianMargaine If it's only in one method, why should it be declared at the class level at all?
 
@Narf where do you want to declare it?
it's a constant, not a variable
 
user895378
@NikiC I am still having trouble reproducing this anywhere to try and debug :/ any guidance?
 
@FlorianMargaine I don't like use cases for this reason, you can just write the use case to suit what you want to do, even if a real world use case, it's hard to get anything done like that ... it's better to try and think about how it's used mostly and in my opinion that would be the kind of switches we don't want to slow down for no good reason ... checking private/protected/public is not free in the slightest and it would be executed with extremely high frequency in anything of a certain size
 
@FlorianMargaine so type the literal value?
 
3 mins ago, by Florian Margaine
@JoeWatkins I use constant values to avoid magic numbers. Sometimes they're private
@JoeWatkins I see what you mean
 
3:47 PM
@FlorianMargaine Yeah something like that.
brb food
 
couldn't it be done at compile time though?
 
sometimes isn't enough, we are looking for a majority of the time ... for the privilege of being able to declare that constant value private sometimes you would incur cost for every single access to every public constant everywhere ...
 
@rdlowrey nope, not really. I just saw it on gcov and figured you might know what causes this
 
@FlorianMargaine I don't see a practical difference between a "magic number" and a constant in that context
 
@rdlowrey I'll try to see if it valgrinds for me...
 
3:48 PM
@Narf if ($order->getTotal() > self::MAX_ORDERS_PER_DAY) vs if ($order->getTotal() > 5)
 
const THREE = 3; // <-- prevent magic numbers
 
user895378
@NikiC Not sure. I've been over the code a couple of times and don't see any obvious problems with it. And valgrinding the test case with and without --enable-debug gives me nothing.
 
don't you see a readability difference? :)
 
@ircmaxell You are not helping my case :P
 
@ircmaxell ... where?
 
user895378
3:49 PM
@ircmaxell Hasn't everyone been through that stage of dogma though where you think all literals are evil? :)
 
@FlorianMargaine Yes I do! Now I have to lookup the constant declaration instead of seeing the value right there :)
 
meh, no point arguing with you if that's your argument
 
const MAGIC_SAUCE = 42;
 
@rdlowrey But then it should be class Three implements NaturalNumber {} right? For polymorphism and stuffs
 
3:50 PM
you're probably going to tell me that a bit of code should only be exported in another function if it's going to be used at least twice
@JoeWatkins isn't the usage of constants possible to check at compile time?
uuuh not sure that's english
can't we check the usage of a constant at compile time?
 
@rdlowrey Nope, can't reproduce it either
In that case, ignore ^^
 
if you mean are they optimized to remove the fetch, nope ...
 
Maybe gcov has some ancient broken openssl or something
 
user895378
@NikiC that was my conclusion. Thanks for testing for me, though.
 
@JoeWatkins no, I mean can't we throw an error if the constant is private
 
3:54 PM
@FlorianMargaine I could say that, but it's not the point ... you're not gaining much from using that constant, I don't think that such use cases should mandate private constants
 
and the call not made from the class itself
@Narf we fundamentally disagree, I'm not going to bother you more :)
 
@FlorianMargaine Fair enough :)
 
@JoeWatkins but this check at compile time... this way if there is a fetch, we're sure it's an ok fetch
so there's no runtime performance drop
 
we don't know the scope at compile time
 
ah damn
 
user895378
3:57 PM
That moment when you could keep trolling someone who is clearly annoyed but decide it's best if you don't.
 
posted on September 22, 2014 by kbironneau

/* by Garrett */

 
@rdlowrey ?
Oh wait, @Narf are you codeigniter maintainer? That's what your answers seem to show
 
Wait, codeigniter is maintained?
 
Yes, to both :)
 
@Jimbo haha
@Narf any chance you could consider removing "CodeIgniter is based on the Model-View-Controller development pattern. MVC is a software approach that separates application logic from presentation."
3
 
4:08 PM
@RonniSkansing The ignition fuses the layers.
 
@Ja͢ck That's not the only thing that needs to be ignited...
Burn it, burn it all!
 
@RonniSkansing Because it's not? Not that I wrote that part though ...
 
This already exists: yay
 
@Narf sure. =] I am not saying that you wrote it or in any way jugde you because of CI.. It just kinda flew out of me
 
@Narf what CodeIgniter is based on is Rails framework. And neither of those apply MVC architectural pattern. Of .. and you cannot have "framework based on architectural pattern for applications", because "framework" is what's left when you remove all the "application part"
 
4:10 PM
@ircmaxell Haha ! I would love to be part of such a development that could start as soon as the engine is stabilized for PHP7
^^ where's levi when you need him
 
@tereško yes, that's already mentioned somewhere in the docs
 
user895378
@FlorianMargaine not important, was just talking about a guy who's being a jerk in a bug report :)
 
@ircmaxell He's buggered off to Switzerland.
 
ahh
 
@RonniSkansing @tereško I don't really care ... deffinately don't want to argue about it, I just write some patches and manage pull requests :)
 
4:18 PM
Ofc @Narf =]
It does not have to be a topic at all
Hope to see you more in here
 
We'll see, it's my second time on SO chat and it feels a bit weird, I like IRC so much better
 
user895378
@Narf Really? I like IRC but the interface here is so much nicer :)
 
History FTW
 
@rdlowrey It's exactly the interface that feels weird. It's shiny and all, but I'm so used to irssi I try to switch between channels with alt+# all the time ;)
 
user895378
Sounds like how I have to constantly delete "vi" from the top of new files I open in an IDE :)
 
4:23 PM
:D
 
4:44 PM
@rdlowrey no, I haven't... I already told you when you were at that stage...
 
I find the conversations much more manageable here than on irc tbh
I'm saying this with erc open in my emacs right now
 
user895378
4:58 PM
@bwoebi Bob you're a special case :)
 
5:11 PM
sooo how do I go about asking a php.net account already? on #php.pecl?
 
0
Q: PHP threading with Pthread one thread only works well

johnI need to deal with some huge arrays (fetched from database) using PHP so i installed and tested Pthread to make the work faster. This code bellow will launch for example 4 threads, each thread calls a class which process a part of the whole data. Here's the code: class AsyncOperation extend...

@JoeWatkins ^
 
5:33 PM
Hello. I need to install a Laravel 4 Package on my project. The module is located in bitbucket. How can I install it? Do I need to clone it locally and add it somewhere? Thanks!
 
Don't you include packages with the composer.json with laravel?
 
Yeah, but if its a local package?
Or do I reference the bitbucket account?
 
@Dynelight public or private repo?
 
Private Patrick
 
@Dynelight did you try what's written in the manual? getcomposer.org/doc/05-repositories.md#vcs
 
5:37 PM
Thanks @Patr
@Patrick
 
@rdlowrey not sure if good or bad :-D
@rdlowrey no, it's not DBGP. The only thing it has in common is the fact it's based on xml.
DBGP would have required a major rewrite of the code. I'd need to restructure the whole system of commands etc.
 
hmm...
wondering if it would make sense to crypto-sign generated code...
like, with asymmetric keys...
 
just wondering
I just switched from having GeneratedClassName_LONGENCODEDSTUFF to GeneratedClassName_HASH because windows
so I implemented some rudimentary code signing to avoid issues with hash collisions, which, even if rare, are a problem
and was wondering if crypto-safe signatures were even interesting on this front :)
 
why because windows?
 
5:49 PM
because windowns still sucks at path length issues
 
> You can also speed up the process by having an existing Git account holder who works in the area you are interested in mail us to vouch for you.
anyone wanna vouch for my php.net account? :P
 
@FlorianMargaine you need a better mail client
 
:-D
 
@Ocramius I used php.net/git-php.php
is Pierre someone from here?
 
@FlorianMargaine oh, didn't know, lol
I'm wondering if I should apply for an account as well, not sure if I'd ever have time for internals
 
6:04 PM
@FlorianMargaine no...
 
Why the ellipsis?
Something I should be aware of?
 
@FlorianMargaine You'd probably be aware if he was here :)
 
Hello, Can anybody help me? How I can receive unlimited bytes data with socet_recv() My code is $bytes = @socket_recv($socket, $buffer, 1024000, 0);
 
@Anton_Sh you should check out an event driven stream library, like: github.com/rdlowrey/Alert
 
@Leigh well... which Pierre is it?
I saw at least a couple Pierre on the internals ML...
 
6:11 PM
which one is which?
 
@Leigh I will check right now
 
it must be Pierre Joye, I guess
 
@FlorianMargaine Pierre J doesn't come here
 
19
Q: Weird Google result description

tomwildeThe thread in question: Matlab: Scatter plots with large datasets & colorbar Screenshot: Google query was "matlab plot penis".

lol ^
 
@Leigh is there any other way
simplier
 
6:17 PM
@Anton_Sh no other way I'd use.
you cannot receive unlimited bytes with a single call
and, it doesn't make sense to
 
ok I will try to understand what is the Alert
 
@Anton_Sh There's a TCP server example
 
@PeeHaa oh god, the comment exchange on that is beautiful
 
...to plot a penis in matlab. do you happen to know how? — tomwilde 6 hours ago
yeah this comment is gold
 
Interesting PHP5 - PHP7 - HHVM inconsistency: http://3v4l.org/dAKRa #php #hhvm
fun shit you find in your own codebase
this was hidden in doctrine -.-
 
6:29 PM
@Ocramius thats a pretty cool find
 
yeah
 
@Ocramius Yeah, that one can be quite hard to track down, if you don't know what you have to look for. I use an analyzer for it
 
the right behavior is PHP5, though I see why it's been done like that in HHVM/PHP7
and the fix is just don't fuckup variable names :)
 
I wonder if it's related to the bug NikiC fixed the other day, with pass by ref -> function -> modify in a foreach loop
 
@Leigh No, this is intentional BC break in PHP 7 and HHVM
 
6:30 PM
@NikiC yeah, I like the fact that analyzer just tells you to avoid overwriting parameters :)
 
it has to do with call stack sharing
@Ocramius avoid overwriting params if func_get_args is used, more precisely
 
@NikiC oh right, its intentional :X ok
 
@NikiC I avoid overwriting in any case, as it typically means that the variable has a different semantic meaning
so I prefer having a new var name
 
yeah. but something I think it's okay to have a chain of $str = op($str); assignments, or similar
 
ok, that was silly of me
Anyone tried compiling PHP with LibreSSL instead of OpenSSL yet? (/cc @ircmaxell)
 
6:36 PM
no
 
alright, time to spool up a VM of OpenBSD-current :D
 
@Ocramius I don't know which behavior I think is correct...
 
I'd expect func_get_args() to always return whatever was passed to the function
regardless of its state mid-function-body
 
true, but if you modify an argument, I almost expect it to stay modified. I think in this case, I would consider both "correct"... But I don't know...
 
Yeah, I'm becoming too functional-ish
 
6:39 PM
now this is a problem IMHO <-- @NikiC
 
anyway, this is a fuckup on our side
 
@ircmaxell uh. agree.
 
Man I love OpenBSD releases :D mirror.ox.ac.uk/pub/OpenBSD/songs/song55.mp3
 
@ircmaxell yeah, it's suboptimal, but can't do anything against it
 
IMHO, that makes debug_backtrace completely useless
 
6:45 PM
@NikiC Don't really think suboptimal describes it... can you fetch the original arg from the call site?
 
and same with exception backtraces
 
when you return, the original value is still in tact
 
@ircmaxell you mean to say, it makes it inaccurate in the cases where you overwrite parameters.
 
there's a long way between there and being completely useless ;)
 
6:47 PM
@derp I wrote some documentation for the console fork - console.basereality.com I'd appreciate any feedback on if it makes any sense.
And if anyone else is interested in a more re-usable version of the symfony/console library ^^
 
@NikiC well, I say it that way in that if you can't trust it in one circumstance, can you trust it in others?
 
@ircmaxell yes you can
it's not a philosophical question ^^
 
I have to debug other peoples code, I need to trust stack traces ;x
 
@NikiC bug 68057: Just sent a mail to internals because Julien said so...
 
3v4l.org/51jR3 - so, it can get hidden away from the offending function too, going to be a nightmare /cc @NikiC sorry this really isn't acceptable :(
 
6:51 PM
@Leigh no, cannot be fetched from call site, the temporary variable will already have been destroyed on call site when the fcall itself is made.
@NikiC well, we can do something against it: not microoptimize everything.
All we need is retaining a copy of the zvals with the zvals having a refcount + 1.
 
feel like I'm going all Lester now ;/
 
@Danack People probably shouldn't have to understand Auryn in order to understand your example.
 
I'm so fucking tired
 
The only case where it has any advantage is when big arrays are returned from other expressions. And that's not so often the case. And anyway, the returned array often is something like a private variable, so it's not an extra copy...
@tereško then go to bed :-)
 
so there is another solution
have an extension collect the call stack arg info. Remove it from the traces entirely by core, but have the ability for an extension to collect it (it could be a core extension)
 
6:59 PM
@bwoebi I also need to eat
 
@ircmaxell tests inspire false confidence — this is my stance too. Tests aren't bad, but tests aren't "okay, it's all fine".
 
that way if you need arg info, enable the extension with the performance penalty and get it. But otherwise arg info isn't provided as it may be wrong
 

« first day (1437 days earlier)      last day (3526 days later) »