« first day (1605 days earlier)      last day (3568 days later) » 

00:12
poop
 
1 hour later…
 
1 hour later…
02:22
Should I namespace the functions now that it's no longer a polyfill for a core implementation?
02:52
I have a very complex mysql query with group by's, having etc...and select is working fine and fetching all the rows.... Now I want to count number of rows of the result but count(*) is not working
I just want one row with one column that tells me total number of rows that would have resulted from the actual query...
but instead it's doing some kind of grouping etc and returning several rows with their individual counts?
What does the query look like?
you want to see the count query or actual query?
Isn't it a single combined query?
I am running the query twice... once to get the count and once to get the results (with limits) ... for pagination
I'd need to see the query with count(*)
03:02
@TheodoreBrown select count(distinct t.id) as counter from table1 t
join table2 t2 on t2.tid = t.id
left join table2 t3 on t3.tid = t.id
where t.prom = 'Y'
group by t.id, t2.id, t3, id
having 1
order by t.id asc
I guess I have to use subquery
@user3692125 That query seems rather strange. having 1?
@user3692125 Yes, a subquery is probably your best option without making other changes.
yes, it's having 1 right now... but that can change depending on other criteria... 1 is dynamic...
 
2 hours later…
05:10
morning
user924016
05:45
morning @Leri
05:59
hi every body
i am newbi in php
can i ask you why you select php for web programing?
06:24
Hi
1
Q: Have different urls for desktop and mobile sites

lakshmiIn my project, I want to have different urls for Desktop site and mobile site. For example: www.example.com // For Desktop www.example.com/m // For Mobile site How to do this? PS: Both have access to same Database.

^ Please help for the above question
I don't think it is magento related issue
@yourstudent yes please ask :P
06:39
Jack, any help with above question?
07:23
mornin
good mornings
morning
07:38
posted on March 09, 2015 by kbironneau

/* by j_freyre */

07:50
^ after being sick last weekend, hate it
08:04
@NikiC can you ping me when engine exceptions is merged please
Mornig
Yeah, I would guess it's because of the bc ..
@JoeWatkins sure
@JoeWatkins I don't think this change even has impact on xdebug ...
It's reddit, 'nuff said
08:19
@NikiC agree
@Ja͢ck agree
You're very agreeable for a Monday :)
@Ja͢ck agree
:)
Heh, I recently found out the name of a problem I've heard a long time ago ... the monty hall paradox :)
That also made me realise humans ain't that good at calculating odds heh
08:39
good merning!
08:58
Morning
@LeviMorrison wiki.php.net/rfc/remove_php4_constructors seems to be overdue :)
moin fab, naruto
09:28
Quite today aye
@bwoebi no idea, but I expressed previously that I think that 2 dedicated RMs are better than one and a half, the actual experience with our release process is nice, but that is easy to learn and you have the other RMs to help with that.
Gooood morning, Roomies :)
morning
Morning @salathe @Tyrael
09:38
@LeviMorrison @salathe can't we just pick up my php.net tutorial and rush it to make it somewhat decent so we can put it up for php7? I really don't think it needs that much more? We can always add / change to it later when we want
mr joe
Holy shit I jsut ended up on talks.php.net
That thing is yellow
morning, everyones
o/ @tereško
09:49
@DejanMarjanovic yo
@PeeHaa You wrote a tutorial?
Morning @tereško
@salathe huh. You have seen it before...
I very much enjoyed your country.
@PeeHaa I vaguely remember something... but I haven't woken up properly yet :)
@Fabor nice to hear that
@PeeHaa holy smokes, was it really 2012?!
@PeeHaa ouch ouch, my eyes, my eyes
@salathe Yeah :(
It's really really sad
@JoeWatkins :P
But I really think that whatever I will put up it will always going to be better than that current thing
10:10
Note:
Word processors such as StarOffice Writer, Microsoft Word and Abiword are not optimal for editing PHP files. Use of these is discouraged.
2
wait
you guys are not using word?
hi
guys
I am facing problem in this query
please let me know why it will be SLOW?
> Another useful tool for debugging your PHP code is [Xdebug][x-debug].
@PeeHaa ^
@FlorianMargaine :P
10:30
moin
yo @DaveRandom
@Danack Difficult to call, tbh. Not least because there may be situations in which the list of servers retrieved by one of those mechanisms is different from that which is actually used internally by PHP (I'm not sure about this but I can imagine it could happen).
Windows certainly makes it more complex by maintaining a separate list for each NIC, I don't think *nix does this at all, and I'm not sure how things are prioritised in that case w.r.t search domain suffixes etc (which the OS resolver internally handles transparently)
11:06
@DaveRandom mogguh
@Patrick I use Excel to write my PHP code. :)
hello guys, quick question.. how do i simplify this?
pathname = pathname.replace(/(\/$)/i, '');
pathname = pathname.replace(/.*\/(.+)$/i, '$1');
Thanks!
@reikyoushin Use other delimiters than /
Also no need to use the i modifier
@HamZa hello regex master! been a while. :)
11:16
oh, it's JS so you can't use other delimiters :P
I guess you can't make it simpler than:
pathname = pathname.replace(/\/$/, '');
pathname = pathname.replace(/.*\/(.+)$/, '$1');
@marcio If you're proposing a different implementation (with the lexer feedback), could you update the RFC to reflect that?
@NikiC ... mid-vote?
@bwoebi better than having the rfc describe some completely different change that is not being voted on anymore, right?
but yes you're right, would be good to restart the vote so people know stuff changed - we don't have time issues currently ^^
The patch isn't even finished…
ThW
ThW
@HamZa you can create the regex without delimiters ('/foo/bar').match(new RegExp('.*/(.+)$', 'i'))
11:28
@ThW TIL
@bwoebi Oh, it isn't? I didn't really look at it yet, only saw the mail on internals
@NikiC I think ext/tokenizer is missing.
@HamZa yep. i need to get the basename with or without trailing slash. :P
@NikiC Yeah, ext/tokenizer Afaik missing or dd that change since last night?
Nah, still not ported -.-
19 hours ago, by marcio
sheit, why do we expose tokenization to user land? xD
Ծ_Ծ
11:33
@reikyoushin var baseName = pathname.match(/(?:^|\/)([^\/]*)\/?$/)[1];
@HamZa Does he want to get the last part of the path?
@PeeHaa I guess so?
Because split looks much more saner than all those slashes all over the place :)
or am I wrong lol
11:36
@PeeHaa true story
@PeeHaa damn
pathname.replace(/\/$/, '').split('/').pop()
If only jabbascript had a decent regex api :(
ThW
ThW
@PeeHaa ?
11:37
@ThW No way (at least that I know of) to use different delimiters for one
ECMAScript 6 is even more confusing :P
@PeeHaa I'd settle for a decent regex engine...
Also that ^
ThW
ThW
Here is not need for different delimiters: developer.mozilla.org/en/docs/Web/JavaScript/Reference/…
@PeeHaa only in regex literals, you can do it with no delims if you use the RegExp ctor
ThW
ThW
11:38
The /pattern/modifier is a language construct and short syntax
use pcre with emscripten lol
@ThW Not really
You still have to escape the slashes right?
Or not?
You'd have to do that no matter what you did (escape the delims)
Using the RegExp ctor gets around that problem but can leave you in backslash hell (just like PHP)
@HamZa PCRE OR GTFO
ThW
ThW
@DaveRandom but not the delimiter (because here is none)
11:42
What do you prefer for good api.

`/blogs/featured`

or

`/blogs?filter=featured`
@ThW Yeh, but /\\/ vs new RegExp('\\\\')
Or in other words: it's a case-by-case thing really
ThW
ThW
@DaveRandom true, like most of the time
@DaveRandom what's (?:^|\/)?
@reikyoushin Non-capturing group matching either start-of-subject or literal slash
11:44
@BasicBridge For an api the latter, as it allows you to pass arguments in arbitrary order. For a web site though the former is better.
Made it non-capturing because you don't need it, but you could remove the ?: and get the 2nd index in the result and it would work fine
It's so that 'foo', '/foo', 'foo/', '/foo/' and '/bar/foo' would all give you 'foo' as the result @reikyoushin
@Danack OK :), do you any good guide for api design. My api is read only so i'm no worried about Oauth like stuff
@DaveRandom cool. thanks!
But really, the only way is to make version 1 of your api - find the bits that suck, then make version 2 which might not suck as much.
@Danack this is the thing I want to avoid, I know this will extend development time but worth giving a try.
Anyone familiar with lucene searching know how/if I can search for multiples of the same string/word?
> Most home computer systems can store only about 256 thousand words, but this is constantly increasing as more bees become available
12:02
@Patrick I get that book url at the end of slide slideshare.net/philsturgeon/api-pain-points-newcastle I might purchase is by 15th
12:12
@BasicBridge You probably ought to read this book as well amazon.com/SYSTEMANTICS-SYSTEMS-BIBLE-John-Gall-ebook/dp/… "A complex system that works is invariably found to have evolved from a simple system that works. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over, beginning with a working simple system."
12:29
hmm ... I want this keyboard: daskeyboard.com/daskeyboard-4-professional
@tereško hate those sleep buttons on keyboards :(
@tereško have you seen these ?
sleep buttons are just fine, if they are out of the way
does anyone even use them?
12:44
on a desktop box I tend to configure them for hibernate
on laptops I dont use them
@rdlowrey time to vote on generator returns maybe?
any of you guys have much experience with Magento?
btw, I don't like WASD products
was looking for a Stripe payment/recurring extension
they seem bulky
12:48
tried cryozonic but not working...
@NikiC hehe, told him that 3 times already :-)
@DaveRandom I think we'll need to do something as currently Artax would be really difficult to use for any environment where there are private names in use, i.e. the guest/host situation I saw, but also for places where people want to use it over a VPN which has internal IP addresses for people inside the VPN.
That something might just be a blocking DNS lookup for Artax to use in place of the non-blocking one.
@Danack Not really, you just need to specify the local DNS server
Although looking at the APIs that's not easy
13:02
Can anyone tell me, What is the fastest database driver for PHP? I keep getting told its PDO?
@Danack how are you instantiating the Artax instance in question?
@AshSimpson if the speed of your db driver matters that much, then you messed up somewhere along the way
@DaveRandom (apologies if I use the wrong terms here, remembering stuff from 3 years ago) The situation is that you're the software is deployed on a machine, that is using OpenVPN to create a virtual network connection to allow connection to a remote network. The software can't know ahead of time the IP address of the DNS server - it can only find it out when the network connection is established.
DB access is always (relatively) slow
@AshSimpson I'm not sure about fastest but PDO has simpler prepared statements
13:05
But yeah, use PDO (because it has named params)
@Danack That sounds like a pretty uncommon problem in this context, why would you have a server using a transient OpenVPN?
@patrick
@Patrick thanks mate!
@DaveRandom It wouldn't be transient, it's just that the DNS server exposed by the VPN isn't known until the VPN connects. So you can't list the DNS server to use in the config file for the software, it has to be determined programatically, right?
@Danack If it's not always connected, I would call it transient. As much as it is a solvable problem, being that this entire family of applications/libs (and indeed, PHP itself) is designed to execute server-side tasks it doesn't really seem worth the effort. If you have a server running a local VPN that is not permanently connected then you have architecture problems
@PeeHaa PeePer
13:09
tbh VPN connectivity probably shouldn't be being handled by the server at all, you put that somewhere in the routing layer in front of the server
Although I suppose VPS makes that more complex, even then you start to run into some pretty hard problems to solve programatically, namely: how do you determine which DNS server to use after the VPN is connected? The original DNS servers are still configured, the OS may or may not be using them for some or all lookups. It's not something it's really even possible to write some code that will always get "the right answer" because there isn't a universal right answer
Also: if you have a VPN, why would the DNS server addresses change between connects?
Seems like you have some pretty strange architecture issues if these are variables that can't be handled by simply using a rarely changed configuration file to bootstrap the application
@DaveRandom Because the guys looking after it at my last company were psychos who fiddled with shit for fun.
do you have their address?
@Danack suggest fixing the actual problem rather than trying to work around it in weird ways then :-P
we can make sure it won't reproduce itself.
long story short @Danack, I doubt it's worth the effort to add the functionality to PHP core. I'm happy to add a userland layer to do it, but it's just such a niche requirement that I don't think it's worth the effort to do it natively. YMMV, of course, but there are already not enough hours in the day...
Also @Danack it's possible that setting up a local bind proxy might be a good way to go here, I suspect it already has a bunch of funky shiz in it to handle this easily and then you could just point your app to 127.0.0.1 and forget about it
13:18
@DaveRandom Yep - I'm not going to pursue it. I think there are valid reasons why the DNS server to use may change but yeah, just not supporting that for now would be more sensible than trying to hack something in.
Am I expected to have a slow website using MySQL?
@JoeWatkins merged
@Danack Indeed, the server address may change, but that should be pretty infrequent. The point of DNS is that you are talking to a known party with implied authority, if the party with that authority changes a lot then you definitely have problems. Using DNS as part of your security architecture is a sure sign that you need to go employ someone who understands security a bit better...
(not having a pop at you. btw, just a general comment that it sounds like someone should get fired over your current issue)
@DaveRandom funny story, most of them actually were fired about 9 months after I left the company.
@Danack also funny story: some of the internal architecture here uses DNS as part of certain "security" measures. But I reached the conclusion that I had to do that in order to implement some approximately useful web filtering without a hugely expensive and high maintenance proxy solution or something
Or in other words: do as I say, not as I do :-P
13:30
@DaveRandom hey you're a knowledgeable guy
do you know what dnssec is? how it basically works?
@FlorianMargaine E_SUBJECTIVE
@FlorianMargaine sketchy, but kinda
any link maybe? really a rough idea...
I mean I know how dns works and how https works et al...
maybe you could explain in a couple of sentences?
Not really, the term dnssec covers quite a wide suite of techniques for various purposes
@MarkBaker I trying to modify an Excel file with macros. Apparently, this is possible with v1.8 of PHPExcel but for some reason, the macros do not show up when I open the file after modifications. Can you help?
@DaveRandom ah :/
hm... reading the proposal for @instance_var instead of $this->instance_var...
of course the @ is just not feasible
13:34
I want to suggest £
and I was wondering... would be it possible, although a huge bc break, to have it like C#/Java?
or euro.
@FlorianMargaine The wikipedia article seems pretty comprehensive and reasonably understandable, needs half an hour to read and probably a couple of reads though
i.e. no need to $this->instance_var, but simply $instance_var...
@DaveRandom ok, ty
> DNSSEC works by digitally signing records for DNS lookup using public-key cryptography. The correct DNSKEY record is authenticated via a chain of trust, starting with a set of verified public keys for the DNS root zone which is the trusted third party.
@DaveRandom the sentence I was looking for ^ :-)
tbh in my mind dnssec is almost pointless anyway, it's attempting to solve the same problem that SSL certificate verification techniques solve much better. I can see the argument that solving it at a lower layer reduces the computing power required in the case where you connect to an untrusted party, but in the real world I don't think there's much of a gain there, certainly not enough of a gain to justify the added complexity for sysadmins to keep it all running sanely
(IMHO, YMMV, etc etc)
13:38
isn't dnssec essential if you want to send emails securely, for example?
How so? It doesn't mitigate the need to verify the remote peer's identity after you connect to it
And no sensitive information should be exchanged before you perform that verification
(e.g. STARTTLS in SMTP etc etc)
doesn't it? using dnssec, you can be sure that the remote-server is really the right one
and yeah I'm not talking about the information sent in the emails
@FlorianMargaine No, you can't. You can only be sure that the record you got for that name is the right one, you can't be sure that the host you connected to is the right one. MITM attacks often happen via mechanisms that are entirely independent from/don't rely on poisoned DNS lookups
really? I thought DNS poisoning was the easiest way to do MITM attacks
Easy possibly, but certainly not the only way
13:43
fair enough
@FlorianMargaine think of it in terms of a telephone number. dnssec effectively gives me a way to be sure that the number the directory enquiries service gave me is the correct one, it doesn't mean that when I dial that number I won't get a crossed line because someone is screwing with the exchange
@DaveRandom yup got it
thanks
I know but I wanted to make the analogy. Mostly because that lets me type "anal".
/me eats lunch
@DaveRandom ... good lunch...
Should someone be expecting slow website speed with MySQL database driver?
meh, I never liked green'n'black scheme
Can anyone respond to my previous question?
Should someone be expecting slow website speed with MySQL database driver?
@AshSimpson define "slow" ?
website's speed depends more of the DB structure than on RDBMS
Well It takes a good few seconds to run the login script
and registration script.
Around 5-8 seconds.
hi
13:59
@tereško and on the queries...
@AshSimpson Are you using localhost as the address of the server?
is their any way where we can EXCLUDE controller in codeigniter?
@AshSimpson did you do some debugging or are you just guessing what's slow?
you would be better off excluding codeigniter...
But what exactly are you asking? What problem are you trying to solve?
Yes I am using localhost, I am asking a way to increase the speed of my code.
What is the best way of debugging it? What would you suggest.
@AshSimpson no.
14:03
@AshSimpson well not debugging, you need to profile it to see what is slow
@AshSimpson xdebug profiler + kcachegrind
actually I am not doing any task.. Interviewer ask me the same
@John then be honest in your interview...
@AshSimpson try using 127.0.0.1 instead
I did the same:P
14:04
don't go look up with people here. That's like paying someone to do the homeworks for you.
I said I do not know
haha
hello fellows
i have got a query regarding open graph video tag usage of facebook, but not so sure that should i start a new thread ?/?
Feb 14 at 14:36, by Danack
Hello, I have a problem, but I am too lazy to write the question out until someone says that they will help me. http://sol.gfxile.net/dontask.html
but also, it's unlikely someone will be able to answer it anyway if it's that specific.
lol
sorry my bad
here is the thing
as you all know facebook allows you to embed videos from your website using og:video tags
but i have seen some people rather compaines faking it
and embedding whole data collection form in swf file
rather than playing a video
my query is
whether it will fall under facebook guidelines
i looked a bit but unable to find a reasonable answer
You'd have to ask FB directly, probably, I doubt anyone here is that familiar with their usage policies
14:10
yeah i guess so
thanks dave
@DaveRandom well... maybe someone is...
Even our occasional-resident FB employees probably don't know that without talking to the legal team
I have read some of the policies before and they seem to be deliberately opaque in many places
same here
presumably they do that so that the lawyers have a reason to turn up every day
unable to find specific guidelines about it
but asked here just incase someone can point me out in the right direction
14:14
Good morning
mornin'
moin @ircmaxell
@ircmaxell chatting with him about it via mailing list / irc
I know, I saw
14:18
isn't that a bc break as @add() is currently silencing a global function add ? (not arguing about the concept but the chosen operator)
I think it's a decent idea
is it a joke ?
somewhat
@SyedQarib just a tip (which you are obviously under no obligation to follow), you may find it useful to write up questions offline, make them easy to read and then copy+paste them into online chat in one go. Not only does that make it easy to read for other people, but it means that if one place is unable to answer your question, you can post it somewhere else easily.
I think it's flawed on many levels
no least of which is @ reuse
14:19
I only have one level, and on that level, it's horrible ...
let me rephrase, I think adding something to make $this-> optional is a decent idea
@mikedugan I don't
@ircmaxell why's that?
also: Zeev hasn't proposed a final RFC with the intention of voting on it. Meaning, by the voting rules, he can't start vote before the 15th
14:20
It's one of my least favourite things about Java, actually. Reduction in readability with no discernible gain.
$this->someVar replaced by €someVar.
4
^^ that
/ninja'd.
@DaveRandom the gain is it's faster to type (sigh)
@Danack noooo ∞var
@DaveRandom fair enough.
14:22
::someVar
phpish :P
honestly, if I were doing it, I'd do ->var
and ->method()
Serious question - does anyone understand what Yasuo is trying to say in this ?
Pseudo-Turing test: nyti.ms/18ri3XH
or dies everywhere
@Danack no
14:23
@ircmaxell Ahh yeh, I guess we should all just switch to whitespace then, we could all use keyboards with 3 keys, then it would be super-easy to type.
any way to get a summarised output for phpcs?
like the s arg of du
@DaveRandom it actually makes more sense for java, there's no free function/variable
so the only scope you have to think about is the current method/object
Ugh - for the record 123-reg do not support setting TTLs for DNS records.
@NikiC Yeah, have been busy.
@DaveRandom Yep, been busy.
14:41
what is best mongodb
plugin for php
@FlorianMargaine There are local vars, though
But yeh, I see your point
@DaveRandom you need a specific syntax to declare variables in java/c# too
you can't just use a variable... like in php
@Danack Almost nobody does.
so if the variable isn't declared in current method, then it's an object property
@DaveRandom But.....it's really useful....
14:43
@Danack It would also make it even easier to DDoS their servers
Which is why they block it
They also (not unreasonably) assume that people don't know how to use it (because most of them don't)
ThW
ThW
@Danack No, but the code is broken.
@DaveRandom eurodns supports it :)
@FlorianMargaine Yeh but:
class Foo
{
    String bar;
    public void one()
    {
        int bar = 0;
        SomeClass.method(bar);
    }
    public void two()
    {
        SomeClass.method(bar);
    }
}
@DaveRandom That's probably true - but it could be worked around by having a "I am about to migrate a website" button, which reduces the TTL to 5 minutes for the next 4 hours, and can only be clicked through their web interface.
Unnecessary cognitive overhead ^^
@Danack It would have to be 5 mins for the next $currentTTL + $timeWindowForMigration but yeh, could be a neat feature. Seems like something that would require a reasonable amount of back-end work for very little/no ROI though so... probably going to have to dream on.
Although also, I have noticed that some recursive resolvers (plusnet particularly bad for this) ignore TTL with their local caches. Which means that Google's approach of the permanent <3min TTL no longer works as intended
For some reason, everyone seems to have forgotten that a single <512b packet every couple of minutes from each tail is not actually a big stress on the network, by modern standards :-(
Hey guys
Does anyone know a really good "PHP Sucks" article?
@GabrielTomitsuka u srs?
@mikedugan The best one.
Define "good" - what angle are you looking for?
14:58
There are a few, but I really need awesome arguments for convincing a conservative CEO to leave the platform and never come back
...and you are asking the PHP community for a list of reasons to leave?
(and go where?)
Meh, there are better rooms for that.
@DaveRandom perl
I'll look somewhere ask. Thanks anyway.

« first day (1605 days earlier)      last day (3568 days later) »