« first day (1388 days earlier)      last day (3567 days later) » 

12:00 AM
yup
part-time Dutchie :)
 
nice, do you use dutch to insult people on different occasions :p
 
Why would I want to do that?
 
i do not know. a lot people do it. just wanted to check is this is popular phenomen in other countries. people from the balkan countries do that
 
Bullocks, my repo server reports "too many auth failures for xyz" ... =(
 
if that message was for me, i did not understand anything :p
 
12:14 AM
@zeeks Well, I'm a Dutch national, so that wouldn't make much sense to me ;p
Time to face real life ... cya!
 
cya
 
user895378
@Jack later
 
2:05 AM
@zerkms morning .. question of curiosity, how did your username come about? :)
 
hey jack, since you are back. do you know any good college in netherlands where lessons are taken in english?
 
what lessons?
 
classes
 
classes for what?
 
for computer science
this is my last year in high school and i am looking for universities in europe and usa cause i do not want to study in albania anymore
 
2:10 AM
At TU/e (Eindhoven University) the lecturers will typically switch to English when they know there's a foreign student sitting in.
 
other ?
 
Dunno, I didn't go to multiple universities ;p
 
ahahah :p so that is the university where you studied?
 
@Jack that's a derivative from my school nickname "zer... something" and my native town which is Komsomolsk-na-Amure hence kms
 
heh, a nickname that captures history :)
 
2:25 AM
yep
I don't have rich imagination, so it's boring
 
meanwhile ...
 
3:03 AM
A somewhat interesting problem, despite it being a JS question :)
 
@Jack "or similar"
that is weird criteria
 
it is
it's basically asking to optimise two partitions.
 
why not just sort and split
odds to one, evens to another
 
greedy approximation won't work
 
what does it mean?
 
3:07 AM
it won't work if you have outliers, one number that's disproportionately big.
 
well, it will work
because he is constrained by the number of elements in every array
the closest values will ALWAYS be if you follow my proposal above
 
nope
 
any example?
 
sure, hang on.
[1, 1, 4, 2, 3, 2, 3, 8, 4, 2]
 
1 2 3 4 4
1 2 4 4 8
why this is not a solution?
 
3:10 AM
where did you get so many 4's from?
 
oop
1 2 2 3 4
1 2 3 4 8
1 2 2 3 4 = 12
1 2 3 4 8 = 18
is there a better solution here?
oh I see
yes there is
 
1 1 8 2 3 = 15
4 4 2 3 2 = 15
 
then it's a variation of a backpack task
The knapsack problem or rucksack problem is a problem in combinatorial optimization: Given a set of items, each with a mass and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible. It derives its name from the problem faced by someone who is constrained by a fixed-size knapsack and must fill it with the most valuable items. The problem often arises in resource allocation where there are financial constraints and is studied in fields such as combinatorics, computer science...
 
yeah, but it's a <= problem, not ==
if you know what i mean
 
yep, you just try several values
sum/2
then sum/2-1
 
3:13 AM
hmm, right
 
btw, if I remember correctly
there was a pretty similar task in Cormen's "Introduction to Algorithms". And they used Divide and Conquer
 
Hi
Is anyone here?
Need to know (I've tried Googling, but was impossible).
Can this be done:
echo $var;
$var = 123;
 
If you have a time machine - yes
it only works with finances, not with programming
 
Futures!
 
lol
but not in this case
 
3:20 AM
@zerkms I read something about ob_start ?
 
declare(futures=1);
 
Does that relate to this?
 
@RahulKhosla what does it do?
@RahulKhosla well, read documentation and tell us - if it is relevant or not
 
Last I used ob_* it just cleaned code up.
 
@Jack checked the Cormen: confused it with another task (books.google.co.nz/… --- see 15.1)
 
3:22 AM
Thanks anyways.
 
@RahulKhosla why do you need that?
@RahulKhosla doesn't it look weird for you?
 
echo $var
$var = 1; ???
I need to set page titles, and descriptions.
Using the already outputted info on the page.
 
o.0
 
I found a work around.
 
What's the work-around?
 
3:24 AM
To hard to explain, almost finished with my projec btw @Jack.
 
bye everyone. i am going to sleep. 6 am here, night
 
@RahulKhosla how about - generating data first, outputting it after
 
@zeeks Night :)
@zerkms Kinda what my work around depends on.
stockdose.com so far..
 
It's not a workaround, it's a common sense
 
Alright chill.
 
3:27 AM
I think @zerkms is pretty chilled already, it's winter in NZ ;-)
 
Really?
 
if not, then it should be.
 
@Jack going to visit my native town and close relatives this week
!
to 35C from 7C
 
and 24+ hrs flight with a toddler
 
3:27 AM
Ugh
 
Congrats.
 
Poor chair neighbours
 
Oh my
 
I already see how they curse me
 
Traveling with my two kids doesn't typically last longer than 14 hours
 
3:28 AM
let me count
Wellington -> Auckland -> HongKong -> Seoul
1 day
another: Seoul -> Vladivostok -> Khabarovsk
 
Wait, it's 35C over in NZ?
 
so 5 flights in 2 days
the opposite
 
My friends in Melbourne are freezing.
Oh
 
to 35C in KHV
 
Right, you reversed the terms just now ahha
 
3:30 AM
I'm sure it was never 35C here
 
to 35 from 7 ... i read that in the other way :)
 
> The hottest recorded temperature is 31.1 °C (88 °F),
From the other hand

> while −1.9 °C (29 °F) is the coldest
 
oh, that's not too bad.
One winter I had to travel to Seoul and it was -14deg
 
In my native town temperatures vary from -40C to 40C
 
Which wasn't that bad if the sun was shining, but once you turn the corner and the wind hits your face .... =O
That's pretty ... polarised lol ... do many people get sick due to season changes?
 
3:32 AM
I don't think that weather may hurt more than bad ecology does
 
> Failed to download 'http://phar.phpunit.de/phpunit.phar': Connection failed with HTTP code 301
wtf
PhpStorm is a little drunk.
 
don't you use composer for that?
 
Composer doesn't download the phar iirc
 
yep, but does it matter?
 
Well, actually, I have a single phpunit.phar in my work folder that I reuse for all my projects ... so that I don't need to have it sit in my composer.json
 
3:39 AM
you do know, that you can install global packages with composer, right ?
 
I don't do global stuff with composer.
 
4:16 AM
Morning
 
 
2 hours later…
6:19 AM
good morning
 
Peace be upon you
Please guys. I'm using websocket and want to run a script after a period of time but keep the main script continue.
When I using sleep() method the whole script sleeps.
I want to make something like background process
 
'nin
 
6:34 AM
@Ahmad what exactly are you trying to do? It could be solved with a job queue and one or more worker jobs that run regularly (cron) that check the queue for new items and then process them.
 
6:47 AM
Morning Joe
 
yo fab :)
pc inexplicably started working again, I 'unno ... not bothered, normal day so far (all 40 minutes of it)
 
Maybe it was settling in to the new place :P
How old is it?
 
LGA1150 kinda dates it, but i dont remember exactly
a year maybe
 
Hmm, somebody rekindle my memory ... in php arrays are stored as a linked list together with a bunch of buckets, right?
 
Fairly new really. Probably still in warranty.
 
6:54 AM
Good morning
 
Good morning
 
@Jack Not sure as of PHPNG
 
The basic structure should still be roughly that; they've introduced immutable arrays though
well, they've localised the zval structure into each element i believe
 
@Fabien well complicated because I built it, so I bought component parts in many places and not even sure which one is failing ... I have a feeling it's my secondary disks
 
user895378
Been trying to sleep for two hours. Kept thinking about code.
 
7:01 AM
@Jack what you doin ?
 
answering a stupid question about arrays and memory ;-)
 
(morning all)
@rdlowrey let it out, trying to sleep is futile .. write down what you're thinking, go sleep ... when you wake up you will realize it's all wrong anyway and do over probably :D
 
user895378
:)
 
That doesn't really work, not for me anyway ... I must have something figured out before going to sleep
 
user895378
Quick poll: who here is using a linux kernel version >= 3.9 either on their current box or on servers?
 
7:04 AM
3.9? isn't that deemed "unstable"?
 
+1
3.13.9-200.fc20.x86_64
 
user895378
@Jack nah, 3.9 was released February of 2013
 
user895378
I mean, it depends on what your definition of stable is.
 
3.10 here
 
user895378
If you're RHEL/CentOS you're still on the fence about whether electricity is actually stable enough to use in enterprise things.
 
7:05 AM
3.13.0-24-generic
 
user895378
Cool. Thanks for the input guys.
 
user895378
I'm going to rush in a last minute socket context option tomorrow for 5.6 to enable SO_REUSEPORT on socket servers which has been around forever in BSD + Mac but linux only joined the party at 3.9
 
+1 for 3.13.0-24-generic
 
@rdlowrey surely you're going to #ifdef that? :)
 
user895378
@Jack of course.
 
7:08 AM
^_^
 
user895378
Woot. CentOS 7 is based on 3.10
 
ugggggggggggggggh
 
Morning PeeHaa
 
@PeeHaa Stop getting wasted at night!
Get wasted at work!
 
Both happen in the same place these days I imagine.
 
7:31 AM
ehmm
@SecondRikudo pls stop the anim, it's really distracting :)
 
@Jack Too late :)
Get one of our drunk room owners to move it away
 
@PeeHaa clean-up on aisle 5 ^^^ .. :)
 
7:48 AM
1 message moved to Trash
yay, I done something :)
 
Thank you Joe
God this few room owner thing is really annoying
 
@JoeWatkins is there a reliable way to observe allocation differences with arrays?
I'm trying to answer this question, but I can't really explain the differences or lack thereof between different arrays.
 
Do not agree that "Joe has more free time" means "Joe will have more positive effect on the community" — Zaralynda 3 hours ago
What does that guy have against Joe?!
 
private beta?
 
user895378
Is there a better way to do a simple boolean check on a zval than the following?
 
user895378
7:55 AM
if (Z_LVAL_PP(tmpzval) != 0) { ... }
 
Drop the != 0?
 
user895378
Well there's that :) But I really meant, "is there a more preferred canonical way to do boolean checks"
 
Nope.
 
user895378
Okay. I always half expect someone to jump out with some zend api thing that I know nothing about and be like, "everyone knows THIS is the preferred method"
 
Besides, with the zval, zval*, zval** and zval*** you would need that many IS_TRUE macros as well :)
 
user895378
7:57 AM
Y U NO LIKE IS_TRUE_PPPPPPP(zval)?
 
hmm, there's zend_is_true(zval*)
 
user895378
yeah but that's a PITA because it needs TSRMLS in 5.7 but not in 5.6 :)
 
so if (zend_is_true(*tmpzval)) { ... } ?
oh yeah
 
user895378
I may still do it, but zend_is_true() is always an annoyance when I merge up to master
 
just a minor annoyance ... Git will tell you that it can't merge automatically =D
 
user895378
7:59 AM
E_LAZY
 
@rdlowrey ugh, it only takes tsrmls because in case of objects .. dafuq
 
halp
> error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
 
user895378
5.6?
 
What's this thing? And what's more important - how the hell can I fix it (5.5)
the FirstData API is causing/producing
 
@tereško Do you have an up-to-date ca-bundle.crt?
 
user895378
8:03 AM
^ that should fix it
 
how the hell would I know that
not my project, not my server and not my code
=/
 
user895378
@Jack actually, use a different link going forward
 
@tereško ehm, it's a client-side error actually.
 
ooh
 
user895378
8:05 AM
^ that one is actually on github and encrypted
 
user895378
if you use the curl URL it's plain http and unencrypted.
 
oh okay, that page shows both links :)
 
this company need a fucking sysadmin
 
user895378
@Jack Oh, didn't realize the new link was there. Good to know :)
 
user895378
@tereško what's happening is code is trying to connect to an https:// resource and peer verification of that site's SSL certificate is failing.
 
8:06 AM
heh. Friend built most of his site without a doctype and now he's put one in it's broken a lot of his site :P
 
user895378
@tereško So the way to fix it is to download that linked cert file and then in the stream context used to make that connection the "cafile" key needs to point to that ca cert file you downloaded.
 
user895378
Well, that's the first thing to try. If that doesn't work then more debugging info is needed.
 
Does this answer make sense? It isn't particularly detailed, but imho there's no real reason to dive into the nitty gritty details to explain why 40 bytes difference :)
 
@Jack you could break on emalloc
 
@Jack :P
 
8:14 AM
@SecondRikudo Jealous of my incredible beauty ?
 
@JoeWatkins And your new house :)
 
totally, and kittehs ...
 
I'm only a few miles away from Joe now. Weird.
 
@JoeWatkins Yeah, I suppose I could do that ... but that's rather impractical given the fairly large number of allocations ;-)
Also, doing that to explain a few bytes difference ...
 
well use expression/watch or whatever your debugger supports ... the llvm debugger everyone uses has some fancy things in this area ...
@Fabien :)
 
8:16 AM
@rdlowrey is there some way to feed a custom CA bundle without messing with server itself ?
 
Joe, how goes school enrolment?
 
or is the php ssl wrapper just picking the bundle from OS
 
I dunno, she's made phone calls, awaiting reply
 
user895378
@tereško Whatever place is making the call needs access to that CA file. So wherever that code runs you need that file to be accessible.
 
> Our last webmaster in Ireland is now in jail (he was/is a great friend and fine person), and we need some help to iron out a few problems.
:-D
 
user895378
8:17 AM
@tereško You could also set "verify_peer" => false but that's not recommended because then you're open to man-in-the-middle attacks.
 
@zerkms why jail ?
 
is there a way to verify that the cert bundle is outdate ?
 
@JoeWatkins may be he was not good enough and you'll get in jail for that in Ireland
 
Fellas in IDEA/WebStorm/PhpStorm, is it possible to color comments containing a certain sequence of characters differently?
 
Morning
 
8:19 AM
@zerkms well, that's rather harsh
 
the irish are in general barking mad, but I have a feeling a crime took place ... that would be normal for someone in jail ...
 
@JoeWatkins what if it was the one armed man?
 
btw, as soon as you disucss CA
 
user895378
@tereško not really. The error indicates that the CA that signed the site's cert you're trying to connect to is not found in the the cert bundle being used by PHP. So it's quite possible an update won't help.
 
moin @Leri
 
8:20 AM
what is the reason to put the huge CA file where very often you contact with a limited set of hosts
so why not just extract CAs you need
 
user895378
^^ there isn't one. That's a perfectly sensible thing to do.
 
oh , fuc k
 
@rdlowrey I recently asked a question about FB PHP SDK. They also ship with a huge CA bundle, while they could just specify a single CA they sign their certificates with
 
user895378
I suspect the people who distribute the CA bundle don't really know what they're doing with regard to SSL/TLS.
 
but facebook...
 
user895378
8:22 AM
Likely they just reuse the same mozilla-generated cert bundle that everyone else uses.
 
yep
but it is silly
 
you mean to say that facebook made a shitty decision !?
 
no way!
 
@JoeWatkins I usually don't say so, but in this case - I don't see good reasons for their decision
 
user895378
I don't trust CAs either, for the record. It's good enough if you're just doing online shopping or something. But if you wanted to do something and be safe from well-funded or state-level actors you need to verify the peer certificate fingerprint and forget what the CA says.
 
8:24 AM
no freakin way !
I kid I kid, they are evidently terrible at decisions ...
 
Hell yeah, fingerprinting, bitches!
 
user895378
stream_context_create(['ssl' => [
    'peer_fingerprint' => '....'
]]);
 
I suppose the only downside is that when the cert is refreshed, you need to fetch the most recent one again.
 
user895378
The problem with 5.6's reliance on OS-managed certs is that if you work in a corporate environment then your OS probably already has bogus CAs added to the cert store to allow the corporate network to eavesdrop on all your https://
 
user895378
8:31 AM
So you kind of still need to specify your own trusted CA file manually and/or use peer fingerprints for things that are important.
 
user895378
:)
 
good moomins room 11
 
moin @salathe
 
user895378
@salathe mornin
 
morning @salathe
 
8:34 AM
Morningin yall
@rdlowrey stop coding and go to bed!
 
user895378
okay, I'm going to try to sleep now.
 
:)
 
user895378
I apologize in advance for the stupid things I'll say in a few hours when I wake up sleep-deprived.
 
That's fine. I'm probably drunk by then
 
Good night @rdlowrey
How late is it for you?
 
8:38 AM
nn @rdlowrey
 
the proverbial skeleton in the closet? :)
 
Busy @PeeHaa? :P
 
@manuellemos in what possible way is that relevant?
phil sticking it to manuel again ...
dude provides so much misinformation everytime he talks he should be considered harmful ...
 
8:47 AM
@JoeWatkins Manuel has been considered harmful for well over a decade already. :)
 
that's true, but like someone else just said in reply to another tweet from phil, when you point out that phpclasses is so shit it's harmful, you get people saying "people still use it"
 
That's the same as "people still use wordpress"
 
or "people still use php"
 
No, PHP and wordpress are completely different leagues ;)
One isn't even deserving of a capital letter
 
Good morning
 
8:52 AM
@JoeWatkins well, people still use toilet paper too instead of the three shells ... :)
@AlmaDo in case you're interested ... weird optimisation problem question :)
 
Who untagged 15th August? We not doing that any more?
 
Demolition man is such a good film.
 
@Fabien It is :)
 
Do me a favour. Tweet this way with your opinion; A) You use and love @PHPclasses. B) You wish it would fuck the fuck off. C) Other.
a way with words the boy has ...
 
@Jack yay, I just finished to answer arrays question (you've answered too, but a little bit narrow, I think, focusing only on zval structure) (:
 
8:54 AM
lol
 
@JoeWatkins I totally read B) in Phil's voice :)
 
yeah me too, very funny ...
 
I'm so tempted to vote C) What's PHPclasses?
 
mornings
 
8:58 AM
good mornings
 
@Jimbo It accesses a web service with a giant map that contains most common MD5 hashes of a password
 
@Fabien yeah :)
 
@SecondRikudo Course it does, even then it's not at all guaranteed
 

« first day (1388 days earlier)      last day (3567 days later) »