« first day (2385 days earlier)      last day (2554 days later) » 

12:03 AM
I am done touching that weird JS "language" @Wes
 
Wes
noice
unrelated, would be great for once that chrome didn't break webfonts
i'm so tired
 
That's asking too much
scumbagstevehasawebsitededicatedtowebftonsbutdoesntrenderwebfontscorrectlymeme.g‌​if
 
Wes
ahahaha
this is how it renders dots
 
the hell :P
 
Wes
it happens all the time
like, at every update
and they break their own fonts too
proper scumbag steve
i miss msie6
 
12:18 AM
lol
 
Wes
that was shit, but at least it was a piece of shit we knew
 
12:32 AM
@Gordon yea I did try that but the problem is I only want to add the namespace attribute, where that example is also add an attribute that uses it at the same time. My XML is just an SVG file a user has uploaded I'm just trying to force it to have an xlink namespace.
 
 
2 hours later…
2:53 AM
o/
 
o/
 
Wes
3:09 AM
 
well, you know, when computer people were actually geeks, exploring a vast and unknown land, where you actually have to know the fuck what you are doing ;)
 
Basically, they spent 100x the amount of time we do to do something
 
4:29 AM
!!taurus
 
> ♉ Taurus | April 20 to May 20
This is a good week to start new projects, as long as they don’t take more than four days and won’t depress the people who find your body.
http://www.theonion.com/features/horoscope
 
indeed.
"Don't depress the people who find your body" is priceless advice
 
4:49 AM
Hi all, I just got issue with Laravel and MongoDB when loading attached model
0
Q: Can't load belongsToMany relationship

ShayneI use jenssegers/laravel-mongodb and have 2 models : User and Role with below relation: User : public function roles(){ return $this->belongsToMany(Role::class,null,'role_id'); } Role : public function users() { return $this->belongsToMany(User::class,null,'user_id'); } My databas...

 
5:14 AM
morning room
o/
 
5:28 AM
morning guys
I am stuck with this piece query in yii
0
Q: How to get sum of a column in mysql in yii

astrosixerI have the following code and I want the sum of the column amount. I am using relation function for join of two tables bd_master and bd_details. No errors are showing but the only selected sum amount field is not there. *$subQuery = BdMaster::model()->find(array('select'=>'id','condition'=>'is_d...

 
5:47 AM
@astrosixer you want single record with total sum of bd_details.amount?
 
yes
@Akshay
 
6:09 AM
extend get_object_vars() with 2nd parameter to avoid memory problems – #74505
 
Anyone have experience with vagrant port forwarding and tunneling to amazon web services tunnel via ssh -fN ... -L 3307:...amazonaws.com:3306 for MySQL database access for local development, then know what an error like Zend_Db_Adapter_Mysqli_Exception: Failed to parse address "127.0.0.1:3307:3306" would indicate?
The thing is I can try to connect to any fake host or port like $host="example.com:3310" and it will append the :3306 in the error no matter what port I use without 3306 appearing ANYWHERE within the code.
I've also tried restarting my computer so I'd have no tunnels up, and I still get the error.
3306 forwards to 33060 (the port for mysql on my VM) btw as per my Vagrantfile
Kind of stumped even what to try as it's hard to determine if it's a PHP issue, a vagrant issue, or an ssh issue
 
6:42 AM
thereis two ports in 127.0.0.1:3307:3306. make up your mind which one you want to connect to: 3307 or 3306
 
my mind is made up, 3307. 3306 appears NOWHERE in my code and it's getting appended for some reason...
3307 -> 3306 is supposed to use my tunnel when I run the ssh command
but when you restart, the tunnel goes down
 
have you used a debugger to step through the code to see where it gets appended?
 
Zend Framework is taking my host set to 127.0.0.1:3307 and sending it directly to the mysqli connect function which is native to PHP. But the function errors showing 127.0.0.1:3307:3306
Not sure how to debug port forwarding though to see what's really going on
 
if you cannot step debug it, do you have a callstack for the exception?
 
I've tried that, but it gives no useful information. This is code that was working before and the code is up-to-date with the master repo for the project for the company I work for
 
6:51 AM
have you checked the zend_db_adapter config to contain the correct values for hostname and port?
 
yes, it contains the correct values being sent directly to:
$_isConnected = @mysqli_real_connect(
$this->_connection,
$this->_config['host'],
$this->_config['username'],
$this->_config['password'],
$this->_config['dbname'],
$port
);

if ($_isConnected === false || mysqli_connect_errno()) {

$this->closeConnection();
throw new Zend_Db_Adapter_Mysqli_Exception(mysqli_connect_error());
}
that's the code directly in ZF's Mysqli.php file. Definitely not that....
I've tried echoing what was going into mysqli_real_connect there and the stuff going in as how I set it. $port there is null
'host' is 127.0.0.1:3307
mysqli_connect_error() coughs up the 127.0.0.1:3307:3306 part
 
yeah, makes sense
127.0.0.1:3307 for config['host'] is wrong
 
is not actually, the code has always worked like that
the function accepts either spot for a port
tried it the other way around, same issue
 
well, I can just tell you what I assume from the code you show. your host includes the port and actual port is null, so mysqli will append the mysql default port 3306 to the host before parsing and that fails
 
no, 3306 isn't a port it would append though because the default MySQL port is 33060 so that wouldn't make any sense
3306 is a vagrant forward port to 33060
it appears to be tossing a 3306 since I've done 3307 -> 3306 forwarding via ssh tunneling before, but appears to be caching the port or something
tried stuff like lsof -ti:3307 | xargs kill -9 before too just to make sure my tunnel was down
 
7:09 AM
I am not sure I can follow, but 3306 is the default mysql port and if you pass null as the port to mysqli it will use that port.
have you tried putting the hostname without the port into your config['host'] and putting port explicity into $port?
 
oh, you're right, I have it backwards hmm
tried setting up my tunnel and public key denied, hmmm... same with ssh -vT git@github.com
I'll look at this in the morning kind of late here
Thanks for your help, you've given me something I can investigate
 
I don't think this has anything to do with your tunnel. it sounds like a simple misconfiguration to me.
 
7:25 AM
meurnin
 
o/
 
7:50 AM
morning
@Wes FYI: requestMulti will no longer exist in v3.
 
8:21 AM
Morning 11
 
morning
 
8:41 AM
Why is this possible? 3v4l.org/pvIjX
 
I was going to say probably BC, but it went from being a fatal error to a warning o_O
 
lol, $x['foo'] is "h", hence
 
9:21 AM
mornin
 
@Jimbo confirm dates!
 
What's the cost of hotels like in Portsmouth?
 
let me google that for you?
"from £42" apparently
oo, wait.. £34... £28...
 
Oo, nice
 
9:37 AM
@Sean ask @Jimbo. He knows all the hotel prices
 
Anonymous
@Gordon no, that's his mum
 
Anonymous
moins
 
@JoeWatkins seems like my zend heap corruptions are related to APC resp. APCc
since I commented a few lines running APCIterator with a regex things stablized
 
/me hides
 
9:42 AM
;)
I have no stacktrace/core-dump with concrete numbers so
note sure this is helpfull
https://gist.github.com/staabm/453e96ff0507f054a6a651c6ebaf7a83
 
because of this single apciterator line in the stacktrace I commented out the only place where we use it
 
moin
 
morning
 
can I use node.js with laravel ?
 
Anonymous
9:47 AM
yo davo
 
@ahmedyasser use it for what?
/me immediately regrets asking that question
 
So, been running 7.1 on a % of our production web instances for a while... response time is up by around 10ms (up from 70 to 80, so a reasonably large percent increase), actually struggling to pinpoint where it's coming from :(
 
I want to make a real time chat using Socket.io
 
(memory usage is down from 1.2G to 800M though)
 
Socket.io running through node.js
@DaveRandom
 
9:54 AM
@DaveRandom too late, you asked, now you have to talk about laravel and node.js ... have too ...
 
I agree with you @JoeWatkins , he also has to talk about Socket.io :D
 
/me goes to festival this weekend, that's been years.. since i've done that.
 
@ahmedyasser Why do you want JS? PHP all the things
 
All tutorials that talking about web sockets using node.js ??!!
 
Anonymous
in Lounge<C++>, 5 hours ago, by Telkitty
my pet chicken pecks on me when I do something that makes her unhappy - like pet her with my feet
 
Anonymous
I have so many questions
 
@Duikboot you will learn that beer bongs are not as exciting as they have been back then
 
haha :D
 
but what about Socket.io , I think it's much more easier ??
 
@ahmedyasser exactly what the world needs… another realtime chat…
 
10:01 AM
@Duikboot you're dutch so.. masters of hardcore or smthg simular? ;)
 
Omg no :D haha
@Naruto groezrock.be
 
that's in belgium
 
Exactly. ;)
 
I was in Bruges last friday
 
@kelunik ??
 
10:03 AM
Oh nice, Bruges is great.
 
@Duikboot that's right, I totally forgot, that's actually pretty 'close' to where I live
 
Groezrock @ Meerhout?
 
yes? (not sure what the question is though :D )
 
@ahmedyasser ?
 
Joe
can u say so in english : I want to give many thanks to Mr Eric
 
10:06 AM
I dont know most of the bands. I think the only one I know are deftones, parkway drive and deafheaven. the latter being pretty good btw.
@Joe yes
 
@Gordon you must know pennywise..
 
oh, yes. I do. though only their cover of stand by me.
 
Joe
thank you
 
and gorilla biscuits?
there is a group called cocaine piss..
 
hmm. doesnt ring a bell.
 
10:08 AM
!!dad
 
but I think I had oathbreaker in my discover weekly playlist recently
 
I farted in an elevator the other day It was wrong on so many levels
 
@ahmedyasser whether or not your are using laravel has nothing to do with this.
You need to make PHP and node talk to each other, it's certainly possible to do
@kelunik what's the status of cancellation support in ampv2?
is there anything at all?
 
@DaveRandom There's none.
 
:-(
 
10:13 AM
It doesn't make sense.
 
Yes it does.
 
Where?
 
Maybe not in the event loop core itself, but as standard API for cancellations does make sense.
 
Joe
can you say so in english : oscilloscope is very sensitive when it makes measurements
 
lgtm
 
Joe
10:15 AM
makes is it proper
right choice
 
@DaveRandom Why? Could you elaborate on the use cases?
 
!!rfcs
 
@DaveRandom It doesn't.
 
Joe
any body?
 
10:16 AM
morgnins
 
Joe
peehaa you know?
 
@kelunik anywhere that I have requested a thing that I no longer care about. HTTP requests, database queries, loads of stuff.
 
I don't want to kick people when I just woke up
 
@DaveRandom the point was about standard API.
 
Mostly it makes sense when you are doing something based on a user action and the user requests cancellation
 
Anonymous
10:17 AM
morning pahoo
 
I agree that it makes sense to cancel individual things.
 
@DaveRandom (1) How often does that happen? (2) Which API does actually support cancellation? (3) There can always be a dedicated API.
 
But I disagree that it makes sense to have a standard API @DaveRandom
 
By (2) I mean underlying API / protocol.
 
@bwoebi Because if multiple things accept the same kind of CancellationToken, I can just do $cancellationTokenSource->cancel() instead of having to individually cancel a load of stuff. It bubbles through black boxes and provides a standard way to indicate cancellation without everyone having to implement it their own way.
 
10:20 AM
@DaveRandom except that there are often enough things you do not want to cancel.
 
@kelunik in many cases "cancellation" is simply closing a socket, but e.g. both pgsql and TDS actually have protocol-level implementations
@bwoebi so you use a different cancellation token
it's a way of grouping operations into a single cancellable entity
 
you typically are running a coroutine calling other coroutines
 
ftr I know it makes sense, the reason I ask is because implemented this in a .net application (which has built in support for it) and I was just enjoying how well it works compared to what I had before
 
you are not going to be able to differ the cancellation types
 
Not a different type, just a different token instance. If a high level operation is composed of multiple sub-operations then if uses the same token for all of them - cancelling the high-level operation implies cancelling all the lower level ones. If that's not true and you want to partially cancel it you use more than one token.
 
10:24 AM
@DaveRandom so, you are passing a token all the way up (function arg)? (and not down via return arg)
 
@DaveRandom How would the API look like?
 
Much like promise/promisor, only simpler
 
@DaveRandom Just that it makes everything much more complex?
 
This is what I thought for fucking ages, I didn't use them in .net until very recently, I only just recently "got it"
 
3 mins ago, by kelunik
@DaveRandom How would the API look like?
 
10:28 AM
well, can you please elaborate a bit how that will look like?
 
moment
 
what I don't want is Promise::cancel()
 
essentially any method that accepts a CancellationToken actually returns a promise which is an any() of it's own promise and the cancellation token, and throws a TaskCancelledException when the task is cancelled
 
@DaveRandom So, we pass it up
That's an acceptable solution
 
It's essentially just promise/promisor but with strong semantics for it having a different purpose
(it's also identical to .net)
 
10:40 AM
I'm totally fine with this, as it doesn't have any of the problems of Promise::cancel().
Except one, circular references, but that's opt-in, if you use them.
 
@bwoebi And have anys waiting for promises mostly never resolved.
@DaveRandom And how does a user get that token?
 
@kelunik new
 
mornin from London :)
 
@kelunik this was wrong
 
The user, not the library author, e.g. the consumer of Artax::request.
 
10:45 AM
(my description)
 
So basically:
- no mandatory circular references
- only things which want to implement it, must implement it (i.e. the user doesn't need to wonder about why it wasn't cancelled)
- no magic cancellation if the promise is passed forward into other contexts which call cancel()
 
@kelunik The user creates a CancellationTokenSource and passes $cts->token() as an arg to Artax::request()
 
^ this … oh, you forgot that method in your class ;-)
 
Artax::request() internally subscribes to $token->onCancel() and fails it's own promise with a TaskCancelledException (and does internal clean up) when it catches it
 
I guess I'm fine with that.
 
10:49 AM
msdn.microsoft.com/en-us/library/… <-- this is the API that makes sense to me
 
I guess we should add isResolved to Promise then.
 
I have never understood why that is not there anyway...
isCompleted(), isResolved(), isFailed() and (if we did this) isCancelled()
 
@DaveRandom Because it bloats the interface mostly.
 
it's not a blocker for me, it just seems weird that they aren't there, there's useful state that's there anyway
 
@DaveRandom isCancelled() won't exist, because the promise doesn't know anything about cancellation.
 
10:51 AM
@kelunik why?
 
@bwoebi Because you need a manual flag everywhere otherwise (to avoid double resolution)
 
I still haven't seen (apart from testing) an use case for it
 
@kelunik well it could be implemented so that it did, but isFailed() is fine
 
@kelunik then use that damn manual flag.
 
@bwoebi We have that state anyway, why not just expose it?
 
10:53 AM
+1 ^
it's just boilerplate reduction, but it seems harmless to me
my $0.02
 
@kelunik because just guarding with isResolved() won't help anything
There are in my experience anyway quite few places which need guarding at all
 
@bwoebi Now, yes. With cancellation, there are way more.
 
Usually you get double resolution because you didn't stop some watcher or such things
 
Maybe we should just have Deferred::cancel that ignores further double resolution.
 
@kelunik even with cancellation, you typically just stop the watcher and clean up a bit and are done
 
10:56 AM
/me works for a bit but will answer pings in a bit
 
@bwoebi That's only true for very low level things which use watchers directly.
 
phpstorm people: can I set up .md files in phpstorm to wrap at 120 chars?
 
Anonymous
!!wotd
 
Pollyanna: unreasonably or illogically optimistic.
 
@PeeHaa Just don't do that.
 
10:57 AM
uhm wat
 
It fucks up all diffs in case you change a sentence in the middle of something.
 
I don't like scrolling tyvm
 
120 is fine for code, it's not for text.
 
@kelunik softwraps...
 
@PeeHaa I have softwraps on for all file types - do you just want them for MD?
 
10:58 AM
@kelunik otherwise you need to have the cancellation token just passed up
 
@bwoebi ?
 
@Danack Yes please if possible. If nto possible for just md I don't mind doing it overall
 
@kelunik well the cancellation token cancels everything the token was passed to.
 
@PeeHaa there's a command/keycombo to activate softwraps for the current editor window
 
so, when you call a method returning promise, you just pass the cancellation token to that method @kelunik
 
11:00 AM
@Danack Oh I could also live with that I guess
 
@bwoebi How is that related to what you're responding to?
 
@kelunik how is that not the exact answer to what you said?
 
@bwoebi That implies everything supports cancellation.
 
@kelunik well, if your task is not cancellable, you also just don't support cancellation
or is there a guarantee that a cancelled task must fail the Promise with a cancel exception?
 
menu -> view -> active editor -> softwrap tnx @Danack <3
 
11:05 AM
Oh, happy Kings Day @PeeHaa, hope you're wearing orange
 
Wes
mornin
 
@kelunik if there is no further task in your coroutine which needs cancellation, you just simply succeed the promise as if there were no cancellation at all.
 
tnx and I just woke up so I am not wearing that much yet :P
 
@kelunik Cancelling is a hint that the Promise result is not needed anymore. It's not a mandatory consequence that the Promise will effectively be resolved with a CancelException.
 
^ correct
There's no guarantee that it will actually have any effect, not least because the cancellation may occur after the actual operation has effectively completed but before the promise resolution callback has been invoked
 
11:15 AM
precisely
@kelunik basically: if you implement cancellation correctly, you do not need more checks against already resolved than before.
 
@bwoebi in the example I just gave, you would need to know whether the promise had been resolved or not in order to avoid failing the promise when it has already been resolved
 
@DaveRandom which example?
 
@PeeHaa github.com/Lusitanian/PHPoAuthLib/issues/512 is a real thing right?
Current status, debugging flaky Oauth connection to Facebook's api. Coming up soon, self-defenestration.
 
Wes
check the amp room bob
 
@bwoebi when the operation has already completed by the time you receive the cancellation notification
However I accept that in most cases there will be existing internal state external to the promise/promisor that will tell you that
nevertheless I still think that there's no point in hiding that state, but not enough to argue about it
 
11:22 AM
@DaveRandom I think it could make sense to unregister cancel callbacks
 
possibly
would need to think about that
 
in particular, you don't want to retain object state (the implicit $this of the closure) long after the operation ended, but the token still being active
 
Oh yes that's true
 
@Danack Oh probably yeah. FB tends to keep changing thing so it wouldn't surprise me. Sadly cannot test it though because FB kicked my dev account
 
a cancellation token may potentially have a much longer lifespan than a single operation of a large set
 
11:25 AM
@DaveRandom exactly my point
 
OK I'll go with that, unregister cancellation callbacks at the point of resolution
 
yep
 
@bwoebi in that case, it may make sense to have a token as an optional arg to Deferred which will remove a lot of boilerplate
i.e. Deferred will automatically fail itself with a TaskCancelledException when the token is cancelled, and will automatically unregister the callback when it is resolved or failed externally
 
that's an option. Or you just have a special CancellableDeferred
 
Yes that would probably be better
 
11:28 AM
you still need to actually disable the watchers etc. then
 
The creator of the deferred would still listen to the token itself to deal with that
it just wouldn't have to worry about cleaning up the deferred
 
umm
if you listen to the token itself, you register just another callback?
 
yes, dunno if I like that now I say it out loud
It would work but maybe too much hidden magic
 
Probably
let's keep things simple
 
sure, a lib could easily implement that anyway if they wanted it
 
11:30 AM
yes
 
11:57 AM
@bwoebi Some subtasks may, others not.
 
@kelunik right, then you don't cancel then, but you cancel at the next subtask which also supports cancellation
 
@bwoebi Just like for onResolve callbacks.
 
@kelunik nah, because these typically don't persist that long
 
@bwoebi Any race + cancel has a promise that never resolves in case the operation is not cancelled.
btw. second use case for race.
 
right, but the premise is that Promises will sometime resolve.
 
12:03 PM
@PeeHaa amagad. I've setup a new app solely for testing. It seems to automatically restrict new apps to the latest version of the API, so I can't test against the version of the API that our production is calling...
 
While there is no guarantee that a cancellation will ever happen. @kelunik
 
This is going to be one of those things I come to hate isn't it?
 
Yes. Very. :)
 
> For APIs, once a version is no longer usable, any calls made to it will be defaulted to the next oldest usable version.
self-defenestration intensifies
 
My first reaction when somebody comes to me to implement anything related to FB is "nope"
 
12:21 PM
Facebook apps are a head pain, I did that stuff for 2 years and I'm so happy that I haven't touched it since
 
:P
 
Part in parcel because any one who is asking for a facebook app is usually a middle man media company who are a pain to deal with themselves
 
Wes
silence. god it must be disgusting :B
 
no,looks good to me..
 
@Wes yes.
 
Wes
12:29 PM
/me cries
 
don't listen to him :P
 
Bullets not aligned to text, the anchor/paragraph symbol looks a tiny bit small
strange font choice in general but I like it
 
Wes
@Sean say thanks to chrome for that
 
I have a site called "siteB.com". I want to have a login form from any other website of any other platform to login to "siteB.com" . It should check the credentials of the siteB and login straight into siteB frm any other website. How to code tht web API for that in PHP ?
 
Wes
they keep breaking web fonts...
@Sean was looking for something original yeah, the logo implies that, you can't use a too serious font with the cartoonish logo, imo
(i tried like 40 fonts...)
 
12:35 PM
@Wes I don't think that's a problem with the logo.
 
Wes
can you for once agree with one of my decisions :B lie, for once :B
 
:( ... running blackfire on this codebase, comparing the 5.6 runs to 7.1 runs.. the increase in runtime is coming from composer
 
did you remember to generate an autoloader classmap?
 
That's done by dump-autoload right?
 
@Wes Hahah, I'm picky when stuff interests me. I had to learn to tone it down during the interview process because people's portfolios were.. not great.
 
12:42 PM
@Leigh dunno, never used that
 
What do you mean by generate the classmap then? I've never had to manually do anything before
 
Wes
@Sean was answering to kelunik :P he literally opposes to anything i do :D
 
dump-autoload doesn't generate a classmap without --optimize, based on docs
 
Wes
he is by far on top of my list of "impossible clients" :D
 
@Leigh I usually use --optimize-autoloader with install/update, does the same thing
 
12:44 PM
right, that's probably been missed in the new containers... lemme have a dig
 
:P
 
composer install --prefer-dist --no-interaction --optimize-autoloader --quiet --no-dev
 
:-(
I don't get what composer could possibly be doing that would bring your response times up by such a large amount then
 
extra 17ms in Composer\Autoload\includeFile
I'll check opcache next I suppose
 
that's... really weird. 17ms is fucking huge
like, big enough that it must be a bug
I can't believe it's spending all that time in stat() unless it's doing it like a million times per class
 
Wes
12:50 PM
can someone tell @kelunik that digitalocean.com is an horrible color :B
 
Yes, I can. He's right @kelunik.
16 hours ago, by DaveRandom
pro-tip @Patrick: never ask for (or listen to unsolicited) styling advice in #11
 
Wes
it literally burns my eyes, especially used in large quantities like they do
 
(disclaimer)
16 hours ago, by DaveRandom
with the possible exception of @Wes
 
Wes
:B
 
Anonymous
it is horrible @kelunik, looks like something @Wes made
3
 
12:59 PM
opcache.revalidate_freq=0
 

« first day (2385 days earlier)      last day (2554 days later) »