« first day (1300 days earlier)      last day (3662 days later) » 

12:59 AM
@LeviMorrison <3
Couldn't fall asleep, brain doesn't want to stop...
 
I suggest listening to relaxing music.
lights off.
 
I usually pass out, forgot when I actually went to sleep on purpose. Will try :)
It's probably because I haven't finished work... 2 weeks of work.
 
Hopefully helps ^^
 
} elseif ( $a > $b ||
           $a < $b ||
           $a < $b ||
           $a < $b ||
           $a < $b ||
           $a < $b ||
           $a < $b ) {
} else {
@NikiC is there a sensible way to achieve ^ above...
I mean, how hard you predict it to be :)
Weird code style we is using, but hey.
 
That's a lot of $a < $b
 
1:02 AM
Just to be sure :P
OMG... I'm commiting one feature for the third time.
> [master 002215c] Add Robert's test (this time for real)
I would normally rewrite history and run git yolo but it's Subversion.
Subversion sucks.
Have you tried to ignore some files? Right.
Trivia: If I do $b = $a, and don't change contents of either, is it a "reference"?
I feel like 14 again. /cc @JoeWatkins
 
I could need some CS as well...
 
@TOOTSKI AFAIK, not quite...the two variables do point at the same value, but only til one of them is modified
a reference is more persistent than that
 
1:19 AM
@Ocramius If you're reffering to Counter Strike and not Coding Standards, then I think it's the best to blow some Steam (I'm funny) off, especially in these maps where it's kill or be killed. Nice to get some "adrenaline" and sober up. But don't do too much, my eyes are white.
 
@TOOTSKI what's your steam ID?
 
@cHao Yes, yes, point at the same value I meant. Thank you.
@Ocramius Don't have one! I saw a comment on YouTube "Only Serbians and Indians still play CS1.6".
 
That's pretty much accurate
and romanians
 
Serbia is European India regarding e.g. outsourcing.
 
indeed
 
1:21 AM
Do have a lot of companies in Belgrade (capital), but pay is not so good, it's good for "standards", it's like 1500€...
@Ocramius remind me again, why are you in Frankfurt, gig?
 
@TOOTSKI I'm in for the cash
but indeed, I could move anywhere now
 
I hear it's Gerrmany "Silicone Valley". Berlin is osom but far for me, and expensive.
Also, I had couple of interviews, companies that interviewed me are dickheads.
Remind me to NEVER code again, for free.
I felt raped, I made an API and they've probably used it, and I haven't heard back.
 
Really? Companies usually pay for the period of time that you're being tested
 
Yes, they do, but I was idiot.
I think it's common for USA companies to compensate.
gettuned.in Pricks.
Also, sure, let me wait another half year :D
I don't understand who these people don't realize they're wasting someones time, and theirs probably.
Why the f* is it so hard to reply.
"No, for whatever reason, go away." Would be better.
It makes me so this.
And there goes my hourly earnings down the barrel :D
We should move to US and A, land of free :P
Steal their jobs.
Actually I already do.
Too much tootski.
 
1:38 AM
I'm actually thinking of moving to NL
 
Better than Germany IMHO.
Do it while you're young.
You can anyways. I can't.
Basically all of these top countries are awesome.
I'm in 48th, the red one, so...
I can probably move to Austria, but I'll always be tagged as auslander and Yugo schweine.
Don't want to be compared to Bulgarians and Romanians.
:P
Jesus Christ, Hungarians were poor compared to us, and look at 'em now.
You got ZC(E|D) 5.5, I asked you before, but remind me, what's the new thing you've seen?
@Ocramius @Ocramius @Ocramius
I have 2 vouchers already, need to use them.
Thought ZF1, but that's pointless now, maybe not for legacy "enterprise" apps, lots of them.
 
@TOOTSKI austrians are pretty much ok with that tbh
 
@Ocramius Actually, it's hard to see real Austrian in Wien :D
Turks, Balkans, Arabs, etc.
 
@TOOTSKI hash stuff?
and don't go for the zf2 cert unless you have experience
 
@Ocramius Aware of that, think I would pass. Not ZF2, haven't touched it, ZF1, but that's not so clear too.
Will you do ZF2? :)
Kind of sucks they don't just assign it to you, hah.
 
1:47 AM
I already have the ZF2 cert - I wrote the exam :P
 
Biiiiiiiiitch.
Awesome.
Kudos.
Respect.
 
unpaid work.
:P
 
Street cred, can't buy that.
You can, but you can't here.
 
2:25 AM
Good morning, people.
 
good morning
 
I've seen people advise against multi threading in PHP, any thoughts or insight?
 
2:45 AM
What are you doing with it?
Or want to do with it?
@TOOTSKI I see the music didn't help.
 
@LeviMorrison Blame Nikita :)
 
I'm trying to send many push notifications through aws.
1) Gets token from databse.
2) Constructs AWS object.
3) Calls AWS publish method.
4) Repeats
 
I wouldn't thread that, no. I'd use async IO.
 
@LeviMorrison Looks great to me.
 
Resize your browser, make sure it looks good at various sizes.
 
user895378
2:52 AM
Sometimes php-src makes me feel like a total programming noob again and I sit debugging the same problem for hours.
 
On "responsive" it also does the trick, only thing you can get "overview" to get the whole picture, but that's gotcha of responsive design.
 
user895378
I feel like me from ten years ago.
 
That's why I'm afraid to try anything new. I feel powerful behind <?php ?>.
 
user895378
s/<?php/I put on my robe and wizard hat/
 
:D
 
2:59 AM
@TOOTSKI Clear your cache and look again.
 
user895378
@TOOTSKI Shouldn't you be asleep?
 
@LeviMorrison Oh noes! :D
2 hours ago, by TOOTSKI
} elseif ( $a > $b ||
           $a < $b ||
           $a < $b ||
           $a < $b ||
           $a < $b ||
           $a < $b ||
           $a < $b ) {
} else {
I did it.
Funk, it's dawn :(
I'm hungry.
 
user895378
Well if it makes you feel any better:
 
user895378
==12676== Invalid read of size 4
==12676==    at 0x464A603: zif_uv_signal_start (php_uv.c:3624)
 
LOL
 
3:03 AM
@rdlowrey No, it really doesn't....
 
php-src is scary for me...
 
A wild bwoebi appears!
 
user895378
@bwoebi Shouldn't you be asleep?
 
We'll tell on you, totally.
 
@LeviMorrison Can't sleep… 5 am here^^
 
user895378
3:04 AM
5am is right in my sleeping wheelhouse.
 
You need sleep, you're still developing :D
 
I'm not as old as Daniel but even I am always sleeping at 5am.
 
@TOOTSKI well… I slept also earlier. (since 22:30)
 
I think tomorrow I'm going to push out my contrast changes to PHP.net to commemorate BC Break Thursday!
 
user895378
Hmm ... I need to make sure to push something for BCBT tomorrow ...
 
3:06 AM
@LeviMorrison it's already Thrusday in UTC, feel free to push :-)
 
user895378
Really need to get php-uv signal handling working.
 
Only care about my TZ +/- 2hours.
 
yesterday, by TOOTSKI
Someone commits crime at 5AM, while Joe commits code.
I'm almost always awake...
Which is a bad thing.
 
 
2 hours later…
user895378
5:06 AM
@JoeWatkins Some light reading for you on libuv's thread functionality ... Thoughts? Comments?
 
@rdlowrey libuv has the same flaw that libevent has
 
user895378
Right, but I have to use something in userland between now and when an SAPI exists without that problem :)
 
user895378
The php-uv extension's threading capabilities are useless as it is now.
 
user895378
But for an async server it's way more useful than libevent.
 
user895378
libuv is way more useful than libevent in general.
 
user895378
5:13 AM
I'm interested in libuv at the C level ... the php-uv extension is just a stopgap.
 
its threading api is a layer on top of pthreads, looks familiar
> The mutex functions are a direct map to the pthread equivalents.
w00t
 
user895378
I thought you'd appreciate that :)
 
potentially problematic
Mutexes on linux support attributes for a recursive mutex, but the API is not exposed via libuv.
that means they aren't supported on windows, which means you can't use recursive mutex
 
user895378
^ That.
 
w00t
 
user895378
5:16 AM
Windows: because it's important to enforce a standard level of mediocrity on everyone.
 
yeah
 
Windows, because fuck you.
8
 
lol
 
I pushed the changes the other to the repo, cluttered the repo with CRLF, was so embarassed.
 
> uv_cancel() is only available on Unix!
> mutexes and rwlocks DO NOT work inside a signal handler, whereas uv_async_send does.
duuude, they are crippling it ...
I don't even know why that would be
 
user895378
5:21 AM
I assumed it's because libuv is designed for non-blocking IO.
 
user895378
It's preferable to communicate over the uv_async thing so you can receive non-blocking messages in the main thread.
 
user895378
(But maybe I don't know what I'm talking about). You just can't block the main thread's event loop waiting on a mutex or lock. Better to be notified asynchronously when there's a message from the thread.
 
but nbio doesn't always exist, sometimes it is emulated, and sometimes not enough, I don't see why they would place that limitation on primitives in signal handlers, it means you basically cannot use them
 
> $max = max($max);
I hate when this happens.
 
user895378
You always have non-blocking sockets in every environment. My guess is that's what's used as a fallback communication method if no other option exists. I'm just speculating on that front. Haven't read the sauce.
 
user895378
5:26 AM
> IPC mechanism - uv_pipe_t can be backed by a Unix Domain Socket or Windows Named Pipe to allow multiple processes to communicate. This is discussed below.
 
user895378
Although that's probably just for processes and not threads
 
user895378
Nevermind that sockets idea ...
 
user895378
> It is important to realize that the message send is async, the callback may be invoked immediately after uv_async_send is called in another thread, or it may be invoked after some time. libuv may also combine multiple calls to uv_async_send and invoke your callback only once. The only guarantee that libuv makes is – The callback function is called at least once after the call to uv_async_send.
 
user895378
Sounds like it may be periodically batching notifications from the threads
 
$lines = explode("\n", $lines);

$matches = [];
foreach ($lines as $line => $contents)
  if ( preg_match('#\$([^=]*)=([^;]*);#', $contents) )
    $matches[$line] = $contents;

$g = -1;
$groups = [];
foreach ($matches as $line => $contents) {
  if ( ! isset($matches[$line - 1]))
    $g++;
  $groups[$g][$line] = $contents;
}

$groups = array_filter($groups, function($array) {
  return count($array) > 1;
});

foreach ($groups as &$group) {
  $max = [];
  foreach ($group as $line => &$contents) {
    $contents = explode('=', $contents, 2);
I'm sorry for interrupting.
array (size=4)
  0 => string '    $a    = 1;' (length=14)
  1 => string '    $boo  = 2;' (length=14)
  2 => string '    $see  = 3;' (length=14)
  3 => string '    $fr   = 4;' (length=14)
My work here is done. Good night people.
 
user895378
5:31 AM
@TOOTSKI 'night
 
user895378
130. Tired. I'm out too. Back in ~8 hours.
 
Nice number, even that of the bug number ... 67167
 
Hopefully all goes well and this gets merged in after review (and it probably needs review)
 
The changes look okay to me.
 
5:44 AM
Oh right, I forgot I removed the complicated stuff.
I think we have a bug + doc problem combined.
> If FILTER_NULL_ON_FAILURE is set, FALSE is returned only for "0", "false", "off", "no", and "", and NULL is returned for all non-boolean values.
 
Hmm, without looking at the actual docs, that just don't feel right
 
That indicates that any type that is_bool returns false for would get NULL returned in filter_var
But that has to be wrong because then 1 and 0 would get null instead of true.
 
Oh, that's the doc for filter_boolean, right?
 
Ah, that seems legit :)
 
5:47 AM
seems valid to merge.
 
nite @TOOTSKI @rdlowrey
mornin bob, levi, jack ;)
 
good moaning :)
 
@JoeWatkins I'm now off to school :-P
 
lata @bwoebi :)
 
I think it should return null for IS_ARRAY, IS_OBJECT (when it doesn't have __toString() - done), IS_NULL, IS_RESOURCE and when an int or float doesn't convert into 0 or 1.
Sound good?
 
5:50 AM
Do it :D
 
Unfortunately that's more work than it sounds.
 
hehe
 
There is a convert_to_string called before php_filter_boolean is called.
 
wow, that get_called_class() inside closure issue is quite interesting :)
 
So when you hit the code for FILTER_VALIDATE_BOOLEAN it's already a string, breaking the FILTER_NULL_ON_FAILURE mechanics.
Yeah, and one I can't fix ^^
 
5:52 AM
It's probably by design though
 
Doubtful.
 
@Jack yeah, I thought that was normal, I've written tests that expect that behaviour ...
 
Some odd binding goes on with closures inside a static method.
 
I'm not going to use HHVM as an example of what is correct but it just so happens than in this case they do LSB as per what the bug report expects.
 
Least Significant Bit?
 
5:53 AM
yeah I thought it was meant to be like that though, I don't see how else it can work, you cannot late static bind a closure class, because there is only one
well you can't bind in the normal way anyway
 
Is there a special rule for when get_called_class() is run from inside a closure?
 
don't think so
there would have to be the same logic everywhere for it to work
 
indeed ... it goes off the EG(called_scope)
 
I don't think the problem is the get_called_class, it is probably the anonymous function.
Any late static binding feature probably breaks inside them.
 
Closures are the Bermuda triangle of LSB :)
Hmm, the called_scope comes from the fci_cache ... which is probably embedded in the Closure zval? Not sure ...
 
6:02 AM
there's no in closure structure
it comes from zend_function->common.scope
(should)
 
I see.
So, it seems that somehow the scope is "hard-wired" at the time of definition.
 
yes
the thing that changes it, at runtime, is lxr.php.net/xref/PHP_5_6/Zend/zend_closures.c#436
but in the example when you Bar::foo there has been no opportunity to bind to another scope
 
Hmm, that's true.
But it would be weird if Bar::foo() would work properly and then Foo::foo() would give "Bar" again :)
I'm just thinking out loud btw, heh
 
yeah is too early for actual ideas
 
Have you seen this question before? A bit strange :)
 
6:15 AM
> // PHP Warning: Cannot bind an instance to a static closure
no idea why, seems a restriction we put on it ...
(so that static does something)
 
$foo->bindTo(null, get_called_class()); ... tada =D
Interestingly, forward_static_call($foo); doesn't work either.
Not the same, but seemingly related bug.
 
Fellas, ideas about running a task every 5~10 minutes at random?
 
As in, a cron for rand(5, 10) minutes? :)
 
Hi all
2
Q: Why I'm getting a warning as "Warning: Illegal offset type in abc.php"?

PHPLoverHi all I'm converting one array into another array by changing some key names, by creating new array keys, etc. In the code I tried I'm getting following warning multiple times(i.e. the indication that loop is executing) and a blank array. Warning: Illegal offset type in /var/www/smart-rebate-we...

 
6:31 AM
Yeah, you're using an array as index for another array. @PHPLover
 
@Jack Yes.
@PHPLover You know you're doing something wrong when there are 3 nested foreach loops in your code.
 
Hello everyone
 
@Jack @SecondRikudo:Ok. Would you please make the correction to the code and post the completely workable code as an anwer to my question?
 
I did.
 
@PHPLover That's not how I roll.
 
Jes
6:36 AM
hi
good morning
how to replace the underscore character with a whitespace
 
Jes
have a string like abce_efgh what to make it like Abce Efgh
 
Note that I copy pasted your question into google and found a good result.
 
That is, once you have replaced the underscores ... I think.
 
Jes
@Jack i got that part how to replace the underscore with a spce
any regex expression?
 
Please don't ignore what I tell you, it's for your own good.
 
Jes
@SecondRikudo sorry but could not find the right solution thats why asked here
doing $ole = preg_replace("/[\s]/", "_", $val);
but reverse did not work
 
ucwords(strtr($str, '_', ' ')); @Jes
 
6:45 AM
@Jes please don't use underscores in class names
 
@SecondRikudo As usual... (alot of people don't google before...)
 
I don't think it's class names.
 
Jes
@Jack no not class names
 
You can also use the old way: str_replace('_',' ',$str);
 
@MikeM. I've already given him the answer :)
 
6:47 AM
just saying...
 
Jes
@Jack thanks both of you
 
Besides, in his defense, many of those Google results are for the inverse operation lol
 
the easy search: "how to replace a string in php" is good enough
 
@Jack So?
Must every solution you find on Google be perfectly tailored to your needs?
And if I needed to replace Jack with Madara would you expect Google to give you the exact answer?
 
what should I call the interface, which is implemented by caching classes ?
 
6:51 AM
No, you Google, and you work out whatever it is between your ears, and get to a solution.
@tereško ICanCache
 
methods would be has(), get(), set() and expecting()
 
@SecondRikudo Wow, touchy today aren't we? :)
 
lol -.-
 
@Jack The thing that annoys me the most are people who ask us instead of asking Google the exact same question
You waste my time, you waste your time.
 
@SecondRikudo Rise ... rise above :)
 
6:56 AM
reise, reise Seemann reise
 
but @SecondRikudo almost everything is for some part searchable... if you combine multiple searches will automaticly receive the answer that users need does that mean we shouldn't help at all anymore because it's for sure somewhere on google?
 
I find peace in the fact that there will always be such people ...
 
@Jack true.
 
7:13 AM
mornings
 
mornings
 
morning
 
mornning
 
morning
 
7:37 AM
morning
 
^-- heh poor cat
 
anyone know why it doesn't show "forum not found!" even if the ?fid=... is not filled in... ?
 
man ... my regex skills is poor
@MikeM. : isset($forumID) is always true
 
7:56 AM
oh shit my derpiness xD
sorry my connection felt away so had to wait some time
 
I hate SMTP >.<
what is the broken pipe error talking about?
 
broken pipe happens when the child process unexpectedly stops.
 
thats what I figured, I have no idea what's causing it though...
 
8:13 AM
omreoremgoregerojdfhdfv
 
@TOOTSKI And both are using the same version of PHP?
@TOOTSKI If you want to preserve the original number (including hex notation and stuff like that), this is how I'd do it: github.com/nikic/PHP-Parser/issues/26#issuecomment-6150035
 
@PeeHaa dafuq?
 
Morning.
 
@PeeHaa 3v4l.org/Y6tW5 :o
 
@iroegbu Not bad. Not bad at all :P
 
8:18 AM
@iroegbu you luv levenshtein, don't you?
 
@NikiC hullow :) did you happen to see this bug report? we've been looking at it for a bit, but the solution doesn't seem trivial :)
 
it is deceptive, found it back when I was looking for solr
 
it's a flying tower!
 
I've seen it, but I'm not even entirely sure whether it is a bug
 
:)
Me neither
 
8:20 AM
After all a closure is akin to a method-with-$this
and if there's $this, then get_called_class() should be get_class($this) (?)
 
In this case there's no $this, though.
 
ah
because static function?
 
> Gets the name of the class the static method is called in.
 
Yeah :)
 
good point
 
8:21 AM
So that's a bug, I guess.
 
Did you check that the closure there is actually static?
 
I believe @LeviMorrison mentioned that it "works" in hhvm
Making the closure static doesn't change a thing.
The only thing you achieve with that is that you can't bind it to an instance anymore.
 
@Jack Yes, which shouldn't exist there anyways, so it's probably automatically marked static
 
Yeah, probably.
 
Mornings
 
8:25 AM
morning
 
Anyone up to collaborate on a project?
 
@ramseys1990 what kind of project?
 
@Naruto Currently a website/ backend API that will power an android/ios app as well
using SLIM for routing
 
@ramseys1990 I have no expericence working with android / ios so I don't think I'm suitable :)
 
Me neither :) I haven't even touched the mobile end yet, just working on the website end of everything
 
8:30 AM
@ramseys1990 What kind of app?
 
Every time I write unit tests I end up in fully functional integration test. So the question: Is my code f*cked up or do I suck at unit-testing?
 
@SecondRikudo How are you doing today? Still going trough with your plan? :)
 
@Leri Have you seen the integrated test lecture?
 
@SecondRikudo A 1on1 relationship app
 
@Naruto Always
@ramseys1990 That does not tell me much.
 
8:32 AM
@SecondRikudo No, I have not. Listening to it.
 
@Leri Watch it, it's very informative
 
2 "partners" sync up and have everything from chat, pictures, drawing, calendar, lists, date deals, etc etc
 
@ramseys1990 So.. you're making the new Messenger
 
Of sorts I reckon, except your limited to 1 person you can converse with, for a more intimate feel i guess
 
I don't think PHP it the right tool for the job for you.
Have a look at Node.js or Java.
 
8:36 AM
I was afraid you'd say that >.<
I'm mainly wanting to get a team together and knock out a small scale prototype, then go from there.
 
Not sure - you can do chat stuff with websockets in a language you love like php
 
@Jimbo It's not just the websockets.
 
@SecondRikudo jQuery++
 
Sharing drawings and calendars, and stuff will probably be better done not in PHP
 
Would the calendar not be feasible to be managed through passing JSON back and forth of dates/whatever?
I was planning on something such as:
getcalender->server returns json with month, days of something planned
and if you set something for a specific date, send that on up to the server and have the server store that into the DB...
 
8:48 AM
@ramseys1990 First off, you need to separate.
You will very likely want to add additional "options" in the future.
Today it's chat, tomorrow it's a calendar and in a month it's a drawing.
So thought must be given when designing the system architecture, as these things are likely to change a lot.
 
this is true, that's one of the main problems I've run into... is "future-proofing" this
 
@ramseys1990 Okay
 
slim is running the routing so I can swap things as it goes
 
@ramseys1990 Your "actions" need to be pluggable.
 
I used to code alot back in middleschool - highschool and got out of it when I went to the police academy and such, So I've been out of touch for a while and jumped head first again.
needless to say, things have changed ALOT since then.
 
8:52 AM
They all need to have the same public facing API (i.e. implement the same interface), and the core needs to be able to talk to them and transfer that into data the client knows how to handle.
@ramseys1990 How familiar are you with OOP concepts?
Concepts, not implementations.
 
Roughly, honestly not as versed as I NEED to be, about enough to get in trouble i reckon?
 
@ramseys1990 Design is critical in these apps. Otherwise your app will fall apart when you need to add new things
Identify what the core app needs to be doing, and what needs to be plugins
 
anything to deal with database heads through a DBHandler, and all of the exposed API is passed through the slim framework to be routed where it needs to go
then obviously there's other libs/includes aside from that, but those are the two MAIN parts currently
 
@SecondRikudo I've watched quite big part already. Unfortunately, I have to get back to real-world work. Despite all the new information in there I am still kinda stuck... For instance, I want to unit-test this, the first thing I need to do is to remove hidden dependency on storage (not a big deal). However, when I'll write unit test I need to pass mocked storage or chrome's local storage.
In the first case, it would be proper unit-test, however, won't give me much information that Cache class behaves properly. While the latter is integration test.
 

« first day (1300 days earlier)      last day (3662 days later) »