« first day (1629 days earlier)      last day (3319 days later) » 

11:03 AM
@PeeHaa league's router doesn't have a builder :(
 
@NikiC Just say the IPC announcement, looking forward to finally saying hi in person :)
 
@PeeHaa hehe
 
@NikiC Nice try Anthony, we all know you just got that from a Google image search
Holy crap, a wild @edorian appears!
 
good mornings
 
Greetings
 
11:25 AM
@salathe is there a way to get to your original php7 page?
 
which one?
 
the "7" one
 
The Dr Evil one?
 
yeah
 
hi
PDO vs. MySQLi what do you use guys?
 
11:29 AM
Postgres
 
@HassanAlthaf pdo
 
Do you guys know some crash course for PDO?
 
Postgres but i prefer MySQLi for it's async capabilities. But mostly just doctrine ;)
 
@edorian Postgres has way better async stuff, you know
 
11:31 AM
@DaveRandom I do and we use it to an extend
 
Hey, isn't async the one with the control bits?
Where data is sent with control bits
Thanks @DaveRandom although I don't know a bit of mysql_*
 
@edorian May be of interest: bitbucket.org/DaveRandom/pq-async (WIP, mostly still PoC, will be refactored to use amphp promise/generator stuff soon)
Uses pecl/pq
 
can you host postgreSQL on web servers?
Wait, that was a stupid question. How else would PHP connect to it
 
@HassanAlthaf Postgres works (in that respect, at least) just like MySQL.
 
So, what is the difference?
This guy is just bull shitting. youtube.com/watch?v=emgJtr9tIME
All flaws of MySQL he pointed can be avoided....
 
11:38 AM
Postgres is better in many ways, it has better SQL standard support and many features that MySQL lacks
 
Oh.
I'll consider switching.
Thanks for your info!
 
It's really a question of how much control you have over your environment, often you are forced to use one particular RDBMS because of other constraints. I would heartily recommend using Postgres over MySQL where you have the option, though.
 
@DaveRandom as well as move it to github...
 
bitbucket is for WIP/PoC because nobody looks there unless I tell them to, so I don't get laughed at until I want to be laughed at
 
lmao
Whats wrong in putting WIP stuff?
On GitHub?
I'm very sure it's not wrong.
 
11:47 AM
but give option, I would go with Postgre
 
@tereško yo bro, it's all greek, I did goto that web. Any simple web you know?
I'm no pro in computer science
 
@HassanAlthaf Nothing at all, it's just that bitbucket has free private repos and sometimes you don't want people weighing in on things in the middle of a thought process when you haven't formed a coherent idea yourself yet.
 
@HassanAlthaf wat? Please try again. That didn't come out in english.
 
You can openly refuse their ideas. It's your project after-all. But your wish. @DaveRandom
@tereško I meant that the website you linked me to is full of greek. I don't understand it. I want a simple website, on the surface stuff.
 
@HassanAlthaf It's not that I don't want other people's ideas, I just want to ensure I have a clear idea of my own before I pollute it with other people's ideas. My idea might be wrong (it often is) but I want ensure I understand my own idea before I try to work with someone else's. Open collaboration at the start of a project isn't all it's cracked up to be.
(IMHO, YMMV, interest rates may go down as well as up, etc etc)
 
11:51 AM
@DaveRandom I understand, but still you have full right to reject their ideas.
I better get working back again before I piss my client off.
 
It's not about rejecting them, it's about having the mental bandwidth available to evaluate them effectively
 
Yup.
I usually get others ideas, and mix mine and end with a spaghetti
 
He's still on dial-up mentally, you see.
 
I often misunderstand them as well^
Like I did for my last project. you'd laugh at me like crazy.
If you knew what I misunderstood.
 
@Jimbo Shows what you know. I got me one of them new-fangled wireless things. "Mobile phones", I believe they're called.
 
11:58 AM
Hey, what's that page for: room-11.github.io/canonical.html
 
@DaveRandom I got @Lusitanian's mom one of them for the vibrate function
 
@HassanAlthaf faq answers for e.g. duplicates
 
Man I'm tired, out last night in Lpool, same again tonight |-)
 
@SergeyTelshevsky Oh, thanks.
 
@Jimbo Ey, calm down
 
12:16 PM
@DaveRandom Nice, I'll have a look
 
Is it normal to be able to do function($x = __DIR__) { }? Or is this a certain version or something
 
yh norm
Shit, I feel like an 8 ball pool pro
 
@edorian :)
Couldn't avoid going to a conference forever ^^
 
12:32 PM
@NikiC And you picked one to start with where it doesn't matter at all if you do a bad job :)
Very much looking forward to it though, and if there is anything i can do to help please let me know
You can also give the talk at the PHP Usergroup first if you want to practice :)
 
@edorian Why's that?
 
@edorian that sentence could be interpreted in a very bad way :p
 
@edorian Maybe I'll do that
 
Guys,
Do you recommend any secure stuff for user authentication?
 
@NikiC IPC is not really a conference i hold in high regards ;)
But they are nice and all, so no worries
 
12:35 PM
@edorian Hah, I mainly ended up there because Sebastian asked and it's around the corner ^^
 
Wait, you guys know each other inrl?
 
And Sara will be there as well, so that's another plus
 
It's local, I'm verry happy you'll be speaking
 
@Jimbo It's >=5.0
Oh wait no, 5.3 because __DIR__ didn't exist until then
 
user895378
12:58 PM
morning
 
@rdlowrey \o
 
@rdlowrey o/
 
user895378
put yo hands in the air and wave em like ya just don't care
 
\o/
 
1:09 PM
 
@tereško Doesn't feel very balanced, that article. There's nothing wrong about it afaict, but it feels like it was written by a MySQL fan.
 
@salathe I was starting to miss that
 
@DaveRandom probably
 
@salathe tnx
 
I might sneak it back to gophp7.org :)
 
1:14 PM
@salathe yeah :)
 
I would do it, but photoshop Zeev's head into it ;)
 
user895378
1:26 PM
MySQL was designed with blocking, non-concurrent access in mind. You can't multiplex queries on the same connection. It's stupid easy like that. Postgres, on the other hand, supports async non-blocking queries out of the box. That's an argument ender in my opinion all by itself.
 
user895378
Supposedly the entire mysql protocol is going to be changed to fix its utter non-performance in this area, but who knows ...
 
/Waits for PostgreSQL bumming
 
> the entire mysql protocol is going to be changed
meanwhile, flying cars became reality
 
user895378
ikr
 
user895378
That's such a disruptive thing, in any case. Libraries would likely need to be completely rewritten.
 
user895378
1:38 PM
At that point you might as well just use a database that got it right to start with.
 
What is the significance of README.* being allcaps?
Likewise, LICENSE.*
Because yelling?
 
so people RTFR
 
@rdlowrey Why did mysql become so popular again?
 
@rdlowrey You can't multiplex queries on the same connection with pg either, afaik
 
^^ LAMP?
 
1:40 PM
@Patrick ?
What is lamp?
 
@DanLugg BECAUSE ALIENS
 
@NikiC That's what I was thinking
 
@DaveRandom BECAUSE ALIENS (1).DOCX
 
user895378
@DaveRandom you can actually pipeline the queries, though. With mysql you can't send another query until you receive the full response from the previous query IIRC.
 
1:41 PM
@DanLugg rtfftwzomg
 
Untitled Document (3) updated 2015.rtf.docx
 
user895378
MySQL is fine if you just need a car with air conditioning and a radio that won't break down. A Ferrari it is not.
 
Because relevant
 
@Patrick Let me rephrase. What does that acronym have to do with the popularity of mysql
I mean it could and should as well have been lapp
 
1:46 PM
@rdlowrey Ah yeh, you can do pipelining, but IIRC it's not recommended because of some potential memory consumption issues on the server - if you start generating a new result set while there's still one "on the wire" then you can end up nuked the server memory because it's not actually on the wire in the case of a large result set, most of it is still in server memory. There are some interesting things you can do with views, though, and notifications can be multiplexed with query results
 
@PeeHaa or lnpp
 
@Patrick Isn't that called lepp?
 
user895378
@DaveRandom In any case, mysql is essentially useless for a non-blocking application.
 
@Ocramius nah, really…
 
user895378
You have to create a pool of connections to do anything useless with it.
 
1:47 PM
I want a threaded view for chat ~:/
 
user895378
@DaveRandom That's true of any unbounded concurrency paradigm. Node.js has struggled with the same problem in its streams API forever.
 
user895378
You have to implement some sort of backpressure to notify code to "slow down there, champ"
 
no idea. never heard either one of those terms.
But I think it comes down to what shared hosts provide (or used to provide years ago)
 
@rdlowrey Indeed, I'm sure I don't need to tell you that, but (as usual) it's not the case that The Secret Magic Async Sauce Does All The Things!
 
user895378
1:49 PM
It's the same issue that leads to people running into memory consumption problems with artax ... they dispatch! all of the things! at once then wonder why their memory usage is sky-high :)
 
user895378
And I'm like, "it's because you have 679 HTTP response entity bodies in memory at the same time bro"
 
user895378
Throttling that kind of unbounded concurrency is a hard problem
 
@Ocramius hahaha
 
Good morning
 
morning @ircmaxell
 
user895378
1:51 PM
@ircmaxell morning
 
@edorian OMG! It's Volker!
 
I came across this gem doing code review yesterday. Thought it might entertain some. return $prefix . substr($sessionIdHash, -40 + strlen($prefix))
 
@Patrick Stupid acronym Thursdays \o/
 
@Ocramius The bug told everyone its wish. That means it won't come true
 
@Patrick I'd like to use Windows/Apache/NexusDB/ksh, but people get the wrong idea when you tell them you work with a WANK stack.
18
 
1:54 PM
hahahahaha
 
user895378
@DaveRandom lol
 
lol
 
user895378
I prefer the FreeBSD/Apache/PostgreSQL stack.
 
@DaveRandom Windows, Apache? That definitely is WAnk
 
Is it a holiday for everybody coming monday?
 
1:56 PM
I just realized that I am working with a WIMP stack...
 
user895378
@PeeHaa If by "holiday" you mean the annual rite of lying to my mother about going to church on Easter Sunday, then yes.
4
 
@rdlowrey :P
 
@PeeHaa no, we don't have off here in the US
 
Anonymous
@PeeHaa 11 April is a big holiday for my people that suck :)
 
@ircmaxell I thought US was big on religion
 
2:00 PM
yes, but small on holidays
or time off in general
 
hah :)
 
The US is noisy on religion. Squeaky wheel. Not actually big on it...
 
@NikiC Christmas, yes. Fat Tuesday... kinda. Everything else, not so much
 
Anonymous
Except Christmas @ircmaxell
 
@ircmaxell ah k
 
2:01 PM
And yes, in Christianity, Easter is more important than Christmas
 
posted on April 02, 2015 by kbironneau

/* by Rango */

 
Hence my point about noise
 
@PeeHaa it's holiday tomorrow and monday
 
Easter doesn't even get one of those fake Federal holidays where the banks, schools and gov are closed but everything else is open
 
@Machavity Isn't christmas a coca cola thing? :P
 
2:14 PM
@PeeHaa It's a mass marketing thing now :P
 
user895378
@DaveRandom in case you haven't seen it: github.com/DaveRandom/LibDNS/pull/5
 
user895378
(was just cleaning up my inbox and ran across it)
 
Anonymous
Need help with gitlab.
 
Anonymous
Anyone familiar with that problem?
 
2:22 PM
@sam_io ARe you trying to install it or do something with it
 
Anonymous
@PeeHaa install it
 
@sam_io Reboot the machine and it will automagically start working
May sound stupid, but it worked for me and a couple of other people
 
Anonymous
@PeeHaa let me see
 
hi everyone
class A { public function __construct(){} }
class B extends A { protected function __construct(){} }
Fatal error: Access level to B::__construct() must be public (as in class A)
#pleasefix public to protected constructor should be allowed
 
no it shouldn't
 
2:26 PM
why not?
 
@Worf constructor isn't special.
 
user895378
A baby angel dies every time a constructor isn't public.
 
It's just new calling the ctor automatically.
 
@rdlowrey that
 
i'm allowed to change the constructor's arguments - i should be allowed to change its visibility as well
 
2:28 PM
But why?
 
Is like saying you should be allowed to use statics everywhere. You should, yes, but with pain of death
 
i'm extending a class that has a public constructor, and i want to make it hidden in favor of two static function constructors
 
@Worf why would you want to make constructor unavailable ?
@Worf please stop using "factory methods", they are considered an antipattern
 
just trying to be consistent, i want the instance constructed via the two static methods
they are not factory methods @tereško
 
$instance = Foo::makeFoo(); is a factory method
that's what it is called
 
2:33 PM
@tereško He didn't say factory methods.
@tereško No that's a named constructor.
 
i blame @Ocramius for this tho :D i knew it would have happened
 
What did I do this time?
And yes, technically it is a factory
 
Nowhere did he say that he was using it as a 'factory'.
 
@Ocramius your tweet about private constructors
 
@Ocramius It's your fault by default.
 
2:35 PM
3 mins ago, by Worf
i'm extending a class that has a public constructor, and i want to make it hidden in favor of two static function constructors
this is what he said
that describes either a factory method or a singleton
I assumed the lesser of two evils
 
@NikiC I like your mindset
 
@tereško we can say that even __construct is a factory then
 
@tereško Why is a named constructor an anti-pattern?
 
@tereško So? there are times when you want to have some different named constructors and don't want there to be a 'default' constructor. i.e. people have to choose the right one.
 
A named constructor has various advantages:
* expressiveness
* reduced BC breaks (new signature? new constructor!)
* usable as a callback
 
2:36 PM
@NikiC It's not Teresko's just being a dick by making bad assumptions about someone's code.
 
it is a win-win
 
Presumably makeFoo() returns a type Foo. What does __construct return?
 
@NikiC @tereško It's an anti-pattern to disallow private/protected ctors. named ctors aren't anti-patterns.
 
hey guys am working wp project. I get warning When I use javascript inside php file though the file braces are being closed at right spot.I get this error
 Cannot modify header information - headers already
<?php
add_action( 'admin_footer', 'update_buyer_post_meta_sms_notify' );
?>
    <script type="text/javascript">//I get error on this line
        function update_buyer_post_meta_sms_notify(post_id)
        {
            // var id=jQuery(".sms-notify").attr('id');
            var post_meta_value=jQuery('#'+post_id).val();
 
@kojiro null
(usually)
 
2:38 PM
@Ocramius How come the Configuration object in doctrine is marked as external? I use it as such:
        /** @var Configuration $ormConfig */
        $ormConfig = $orm->getConfiguration();

        $ormConfig->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), [
            $entityDirectory
        ]));
 
@NikiC what is a "named constructor" ?
 
@Jimbo as external?
 
Can we please disallow final classes/methods and protected/private ctors?
 
or you mean @internal? That annotation is misused and we just fixed it in a few location
 
2:38 PM
@tereško a static function calling a ctor and returning its instance
 
@Ocramius I use that in my bootstrap. It's no issue, it's just crossed out in my IDE
 
@Jimbo yeah, should be ok once I tag 2.5 today
 
Oh cool, I need to wait for the next stable release :)
Today :O
 
It was a mistake. @internal was used by the previous dev as "this is an internal comment"
 
Ahh, okay
 
2:40 PM
@Ocramius right, so on the one hand it's silly to say a constructor is a factory. But it's also obviously wrong to say a constructor isn't special, since it needs the new operator to sanely "return" a value.
 
@kojiro yes, I was being picky
You can call a constructor even without the new operator, that's what I meant ;-)
 
@Danack all of the example seem to be usecases for having a "builder"
 
@tereško RegistrationRequest::fromPostData($post)
 
@tereško Named constructor == overloaded constructor with explicit naming
 
not a builder, just a simple value object ;-)
 
2:41 PM
@tereško Sure. But sometimes having an extra builder is just overkill.
 
@tereško No, that doesn't work - separate classes wouldn't be able to call private/protected methods.
 
@Danack constructor shouldnt be calling methods ..
 
private/protected variables as well.
 
Principle of least astonishment? Why would I expect to construct an object other than via new Name?
 
@tereško depends.
 
2:43 PM
@kojiro because new doesn't express the intent
 
@Danack I might be mistaken, but you cannot access private variables from "named constructor"
 
@tereško of course you can
 
@tereško you are mistaken.
 
that's really strange then
 
Yup, you can
 
2:44 PM
This reaffirms my view that 95% of programmers don't understand how visibility actually works...
 
@kojiro because constructors are just a special case of a static function. PHP could have been without having either the 'new' keyword or the default constructors, and everyone would have to NAME ALL THE THINGS.
 
@tereško it's called class-wide scoping IIRC
As opposed to object-wide
 
@tereško you forgot 3v4l.org/ooU4E
 
Nice C trick assert(!"Unknown Collection Type");
 
this seems counter-intuitive
I always assumed that PHP had object scope
 
2:47 PM
@tereško it may look counter-intuitive, but it really pays off
 
makes sense for me
@tereško i mostly agree with you tho
class DateTime{ function __construct($timestamp){} }
class DateTimeFromFormat extends DateTime{ function __construct($format, $dtstring){} }
 
@tereško that had me wtf for a moment too...
 
@Worf about the only thing you could do is to throw an exception in the child constructor telling people to use one of the named ones.
 
@Worf what... please don't do that
 
@Patrick why not
 
2:49 PM
yeah, why not?
 
@Danack how would he distinguish between named and a normal one inside of __construct?
 
@Worf eek
 
could we stop with the perversions ?
 
@nikita2206 __construct is a static function. There is nothing to disambiguate.
 
@Worf , maybe you should start by explaining the problem that you have ?
 
2:51 PM
@Danack you are suggesting to throw an exception from __construct in case when the object was constructed without using a named constructor right?
 
@Danack not really, since it has access to $this
 
@tereško i don't have any problem - i was trying to design over private constructors and i noticed that i can't restrict visibility to __construct which COULD be allowed imho
 
@Danack construct isn't static!?? you always can do $instance->__construct();
 
@bwoebi You can always do $instance->method() where method() is static.
calling static via instance is okay, the other way around is not
 
but doesn't that throw some error?
 
2:53 PM
@nikita2206 yes, to prevent it from falling through to the parent constructor, which is almost certainly not what is desired.
 
no
 
Anonymous
@PeeHaa thanks :)
 
@NikiC not even E_STRICT?
 
@bwoebi nop
 
oh…
 
2:54 PM
@sam_io :D
 
I don't understand what is being proposed, tbh
 
@Worf one shouldn't have to "design over private constructors" , that's the core of your problem
 
any example?
 
ah btw @NikiC are you guys going to restrict $this::BAR syntax in php7?
 
29 mins ago, by Worf
hi everyone
class A { public function __construct(){} }
class B extends A { protected function __construct(){} }
Fatal error: Access level to B::__construct() must be public (as in class A)
#pleasefix public to protected constructor should be allowed
 
2:55 PM
@Danack so when you are in the call frame of __construct how do you know if the previous call frame was getFoo (a named constructor) or anything else (in which case an exception should be thrown)
 
huh?
 
@tereško listen, i was just experimenting
 
@Worf which part?
 
He wants to prevent B's constructor being called accidentally.
 
@Danack oh, yeah, no, I wouldn't fix that. The problem there is inheritance in first place, not the constructors
you can simply design a constructor that throws an exception there
 
2:56 PM
@Worf still not sure what you mean ^^
 
@Worf why?
morning
 
You can still do $this::BAR as a replacement for static::BAR if that's what you want - no change there
 
@NikiC will that syntax be allowed?
 
I personally use a combo of overriding constructor + exception + ReflectionClass#newInstanceWithoutConstructor() + $instance->__construct() in those cases, and really only in voodoo stuff that is generated, NOT designed
 
only because having to write get_class($instance)::CONSTANT is tedious sometimes @NikiC
i'd prefer to access constants from instances directly, without resolving the class/interface name first
 
2:58 PM
@Worf it will continue to work, but not sure why you wouldn't just use static::CONSTANT instead
 
wasn't about $this only but any $object @NikiC bad example :P
 
it doesn't work (anymore?) 3v4l.org/a7KSI
 

« first day (1629 days earlier)      last day (3319 days later) »