« first day (2193 days earlier)      last day (2773 days later) » 

2:01 PM
senior/lead drupal dev in london 15k to 40k gbp… ridiculous
where are people supposed to live with that salary? under a bridge?
 
@Gordon I'd take that … per month.
 
Fuck me.. Drupal not even for that every month
 
@tereško Well, zen take a nap zen fire ze missilez!
Talk about nostalgia
 
I think I first saw it in highschool
 
@Gordon Senior.. 15k. You what
 
2:05 PM
@Gordon it would be quite complicated to even find a Dupal dev in Latvia for 15K
maybe I should emigrate and take some biritish person's job
 
@Gordon Haha, zero applicants heading in their direction for sure.
 
@salathe well, probably few students will apply
 
@tereško I'd be more concerned about becoming a "Drupal developer" than the pay to be honest. That must be mind-numbing work.
 
@salathe yes, but some people actually both like and excel at monotone endeavors
you are slightly biases, because if you limited contact with so called "black matter developers"
 
2:31 PM
If I have a function that searches for a string on a file and returns the line it was found in.
How bad of an idea is to return -1 if the string wasn't found?
 
@TomasZubiri it's more normal to return false in PHP, rather than just a special value of int.
 
@Danack I ended up doing a lot of cleaning.
which is going to continue tonight because I sorely need to vacuum.
 
Wouldn't that be worse? Since it would return the same value upon finding it on the zeroth line and upon not finding it at all?
 
"same value"
 
@TomasZubiri I can recommend you to return an array with line numbers, it's logical. If no lines, then empty array will be returned, there will be no special values
 
2:35 PM
@TomasZubiri most of the time you should only use === comparison 3v4l.org/XeJDc
 
Anonymous
@TomasZubiri But not the same type
 
ThW
@TomasZubiri or throw an YourProject\NotFoundInFile exception
 
@lisachenko Hadn't thought about that one. nice
 
@TomasZubiri welcome )
 
@ThW I believe this is the most correct answer.
@ Danack Wouldn't 4-False equal 4? And $Array[False] return the 0th element?
 
2:38 PM
why does
$time = date("H:i:s", "now");
 
@TomasZubiri actually, not, because it's anti-pattern: using of exceptions for control flow
 
return
Mon Oct 17 2016 16:37:52 GMT+0200 (Mitteleuropäische Sommerzeit)
instead of just
16:37:52
Thanks!
 
Something not being found in a file is not a "truly exceptional" case, so using exceptions for it doesn't make too much sense.
 
@lisachenko That's kind of true. But for cases where an array of values doesn't make sense we don't have a choice.
 
@JayIsTooCommon #3DaveRandom 26 secs ago
 
2:40 PM
.NET used a tryParse method that returns true/false and has an output parameter. While having a Parse method that just returns the value or throws an exception.
 
IMHO it depends on how the caller deals with it. If finding the line or not follows the same code branch, no need for exception. But if that case is treated differently, an exception is the way to go
 
Anonymous
@DaveRandom hahah
 
@TomasZubiri you can always use if (!empty($result)) with any of reset()/end() for selecting first/last line in the file
 
@TomasZubiri I have never understood why TryParse(), TryGetValue() etc exist
 
oh
I have a dilemma. Moving utf8_decode() and utf8_encode() is a cross-cutting change. Do I put it in NEWS twice?
…or maybe just under XML. I think I'll do that.
 
2:42 PM
Differing styles / people caring about the overhead of exceptions versus branches? Not that I know what level of overhead it is.
 
@KevinMGranger if you care about the overhead at that level of granularity, you should not be using .net (I would argue). Or PHP, or any high-level language.
 
@Andrea moving from where to where?
 
@bwoebi XML to Standard
 
@Andrea Are you sure you don't want to just rename it to iso8859_1_decode and iso8859_1_encode?
 
Sometimes there are reasons to use a technology and optimize certain weak points. General rules like that don't always work well.
 
2:45 PM
@bwoebi Renaming only means anything to the manual, and I already added a warning there.
Anyway, they don't belong in the XML extension, so I'm gonna let them live their retirement in ext/standard/string.c instead. ^^
 
@KevinMGranger true, I guess. Still I feel like APIs like that should be discouraged in the general case.
 
I would prefer enumerated types for everything :)
 
I prefer to write machine code, but I use the symbols one and zero for readability
I am still not having a productive or generally sensible day :-/
 
@DaveRandom It's a Monday.
I'm trying to catch the line of thinking I had on Friday.
 
2:55 PM
@littlepootis it's not friday!
 
but I guess valid since she asked for "on friday"
 
@littlepootis well I'm not sure what I was expecting...
 
evenin
 
Donald Trump updates list of things to blame for looming defeat: Media Drugs Voter Fraud Aliens Canada Sunshine Moonlight Good Times Boogie
 
3:01 PM
@littlepootis I was pretty productive on Friday, I'll have you know! :P
 
the PHP manual is gloriously unhelpful sometimes
the utf8_encode() page is a great example
 
!!docs utf8_encode
 
[ utf8_encode() ] Encodes an ISO-8859-1 string to UTF-8
 
it's a description of the UTF-8 character encoding, but it doesn't actually say what utf8_encode() does
 
@DaveRandom the whole "voter fraud" thing in USA seems idiotic to me. In my country everyone over 16 has a passport (if you have not traveled abroad before then)
 
3:03 PM
it's also technically wrong, since half the rows in that table don't matter
 
@Andrea it says it in the title?
 
@Andrea It does in the first sentence doesn't it?
 
> utf8_encode — Encodes an ISO-8859-1 string to UTF-8
 
^ that
 
@PeeHaa yes, but the rest is unhelpful
 
3:03 PM
The rest of the stuff is fluff that should be gone though
@Andrea Agreed
 
@Andrea then add hypermedia
 
@Gordon heh, a link to Wikipedia would be better, yes :p
I wish the manual was rebuilt more often
 
add a secret code that when entered, it lets you blow up the elements on the page... that'll be useful.
 
But maybe it's really inefficient to do so, idk.
 
@DaveRandom lately, I am amused by the idea that Trump is actually a Trojan Horse planted by democrats and all of this was planned.
 
3:05 PM
@Andrea unless you are link to anything about politics, sociology or woo peddling
is it wuu or woo ?
 
@Andrea I can only assume it is based on what I've seen about it
 
@tereško in my country people vote for things based on whether they like the colour of the cover of their passport, the thing they have in order to go to other places so they can complain that not everyone speaks their own language and the food is not as terrible as it is at home.
 
Anonymous
!!version
 
@PeeHaa I wonder if it can't do partial rebuilds
 
3:06 PM
@Gordon he was a democrat ~10 years ago and he has donated to clinton
 
@Andrea AFAIK the manual is always doing a full rebuild - there's no such thing like partial rebuild
 
:D
 
@bwoebi I knew it ;_;
 
@Gordon that idea has crossed my mind a few times.
@Gordon it would make so much sense.
 
@DaveRandom lemme guess: you are British
 
3:06 PM
@tereško see. that's proof. that's also why he keeps calling her crooked hilary because he's on her paycheck
 
a?
 
Anonymous
@tereško No, he's from Manchester
2
 
the comments are like the best and worst part of the PHP manual
 
@JayIsTooCommon so he is almost scottish?
 
@JayIsTooCommon oh ... I'm sorry
 
3:08 PM
@tereško I identify as trans-European
 
@DaveRandom pan-European?
 
some times I think that "United" part in UK is a really old practical joke
 
@DaveRandom metro-european?
 
pan-Galactic
 
@tereško especially because that part of the name came from the addition of Ireland, which uh… well, didn't go so well
 
3:09 PM
^ that
 
before that it was just Great Britain, which was slightly more workable
 
@Andrea We came dangerously close to sorting it out a little while ago, but luckily we've managed to claw back defeat from the jaws of victory
 
AFAIK, Germany has quite similar divisions between the states .. but being German, then went with the pragmatic options for naming the country
 
@tereško huh? what division?
 
@Andrea right, we wouldn't want the other countries thinking we had shame and/or humility
 
3:13 PM
How does one even handle API responses, it's always been something I've gotten stuck on. If a response can contain one of three return types (acknowledge, success, fail) in a given format, how do you build up a request handling system? Are there any good resources out there for it?
 
@Gordon am I mistaken in thinking that Germany is actually something like federation, and the political opinions of people from Bavaria are quite different from ones in Hamburg?
 
Also just to make sure that those damned foreigners remain confused, we made sure to keep using the word "country" to refer to smaller parts of ours, just in case people thought they were getting a vague understanding of how things work
 
@tereško Germany is a federal parliamentary republic. But the political opinions dont differ so much across the country
 
Anonymous
@Gordon :P
 
Hi, I just want to say thanks to all for your help, I love this community :D
2
 
Anonymous
3:16 PM
:)
 
!!docs forward_static_call_array
 
[ forward_static_call_array() ] Call a static method and pass the arguments as array
 
I just ... I ... just ...
 
@JoeWatkins probably introduced before the 'static' identifier was introduced?
Also.....static inheritance :-(
 
how long until 7.1?
 
3:24 PM
early november
 
@Danack dunno, it mentions late static binding
 
in a model-view-base-controller structure, if I need to start the session, where should I start it at?
 
@DaveRandom yeah.... 3v4l.org/7Xqbb
static::class was introduced later than it was needed. I think there are some hacks in the SPL related to this kind of 'pattern'.
 
o/
 
@Tiffany it depends. I personally would base it on the fact, that you are using session as form of storage
 
3:30 PM
@tereško I changed that.
 
therefore, the session should be initialized when the first session-mapper is initialized
 
ugh
 
@DaveRandom er....actually yeah - I see what you mean. That sentence doesn't make much sense then...
 
@Danack sorry for the delayed response, I was busy punching myself repeatedly in the face.
7
 
3:33 PM
@Tiffany my suggestion would be to carefully read chadminick.com/articles/simple-php-template-engine.html and try applying that approach
.. or you could start using Twig
 
@tereško the problem is, in order for the vendor codebase to recognize what I've done as a thing that I can divvy out permissions to, I have to write it this way.
 
that seems strange
 
I have to have a controller, base, model and a view.
 
lol
 
I mean, I suppose I could create a model, view, base and controller, and just write whatever the fuck I want in them, as long as I follow the guidelines for it to be recognized.
I thought I'd try writing in the way the codebase is written, but I'm really in over my head with it. Though, I did surprise myself with how far I got.
 
3:38 PM
have you actually read that article?
 
I did read it a while back, but I'll read it again because I need to refresh myself
@tereško so I should rewrite my getters/setters using __get and __set, but I don't entirely follow what render does
 
@Tiffany those magic setters and getters are actually not necessary
I would have just used setParam($name, $value) instead
and the render() part is actually the point of that entire approach
 
Yeah, not sure why I didn't do that, I think I was just happy I was understanding something and happily typing along
okay, I'm going to step through it out loud, to see if I can understand it.
 
Wes
4:04 PM
o/
 
\o
 
Wes
no coffee mode today. only black tea. it's not working well :B
 
blah, just when I think I understand something in the code, I get mixed up.
does $view->title, $view->links, etc use __set?
 
Wes
if it's defined and fields aren't declared, yes
 
@Wes referring to chadminick.com/articles/simple-php-template-engine.html as @tereško linked me to it again, and I'm trying to make sense of it.
 
Wes
4:11 PM
what is not clear about it?
 
@Wes it's not that it's not clear, it's that I have to wrap my head around concepts that are unfamiliar to me. Plus I struggle with the arrow syntax in PHP.
 
yo, bitches
 
Wes
yo, pimp
 
I get mixed up when the arrow should be used versus a method call.
 
4:13 PM
someone's spunky today
 
yo ...
 
@tereško is that bad?
 
Wes
@Tiffany the arrow?
 
@Tiffany which part?
 
@tereško Joe being spunky.
 
4:16 PM
it's troubling ... someone might need to adjust his meds
 
> Plus I struggle with the arrow syntax in PHP.
what does this mean ?
 
Wes
you mean -> ?
 
:: should be used to make calls to static class methods, and access static properties, only. The object operator, or thing you called arrow (->), should be used to make calls to instance methods, and access instance properties ...
but it seems like a strange thing to be confused about ...
 
@Wes e.g. $view->title. I know -> is used exclusively for association with objects, but I still get mixed up on its usage. I'm too used to using periods for associating with objects and calling methods. Hopefully that makes sense.
 
oh I see
well, what I just said ...
:: is a static scope resolution operator ... might help if you know it's name :)
 
4:19 PM
I'll read it after I clean up the bottle of tylenol I just dumped out on my desk. >.<
 
@DaveRandom Yes, I would support merging symbol tables.
 
Wes
3v4l.org/UbDQE one belongs to the class, the other to each object of said class @Tiffany
 
/s/object/instance/
 
Wes
damn i need to replace this clicky thingy on my mechanical keyboard
 
oh, my good old friend t_paamayim_nekudotayim
 
4:21 PM
@NikiC can you look at something longjmp/bailout based for me please
 
@JoeWatkins what's the prob?
 
can you see what that is trying to do, and can you see why it doesn't work as intended when in no-debug mode
when in no-debug mode, terminating signal is sent (I think abrt) because it tries to longjmp to an invalid stack frame
 
so when $this->vars is used in the class, $this refers to the instance that called the class method? (in the class Template section of chadminick.com/articles/simple-php-template-engine.html)
 
@JoeWatkins which one?
 
Wes
4:28 PM
this is the object from the within @Tiffany 3v4l.org/TXMLa
 
the zend_bailout in the failure clause?
bailout originally getting there already?
 
no when ZEND_EXIT is entered and it bails
 
I wish my head would make up its mind on whether or not it wants to have a migraine. The gentle throb on the side of my head is making concentrating and processing this stuff rather difficult.
 
@NikiC bailout is set and restored
 
Wes
@Tiffany have a break? :B
 
4:32 PM
can't break on setjmp, but it looks like it works as intended while in APCu, but something is not right still ... there must be something I don't know ...
 
@Wes I suppose that would be beneficial. My sumatriptan is at home anyway.
 
it looks so simple ...
 
@JoeWatkins So you mean that it already breaks on the first bailout?
The one which ought to be caught by your code?
@JoeWatkins You should reset EG(bailout) before calling end; to account for bailouts in that code, but I don't think that's the issue here
 
Wes
drink water, rest for some minutes and have a coffee. works for me :P
 
no the bailout in the macro is executed when I expect it to be, and that doesn't raise any error, but under normal circumstances it's ZEND_EXIT that calls zend_bailout, that's where it goes wrong
 
4:35 PM
@Wes not with the migraines I get... very few things work anymore.
 
@JoeWatkins this is on current master that you encounter that issue?
 
Though, peppermint oil has worked pretty well lately, which is interesting. I just rub a bunch in my nostrils and breathe in and out for a few minutes, and the throbbing starts to subside.
 
yeah bob
 
@JoeWatkins Is the EG(bailout) not reset properly? (somehow??)
 
@JoeWatkins So stochastic debugging -- try making *zb volatile?
It oughtn't need to be in this case, but maybe it will work ^^
 
4:37 PM
@NikiC good point
 
Wes
if you can handle it, even chewing (not eating) chili pepper works :B
but it's more like replacing one kind of pain with another
:B
 
!!dad
 
Dad, did you get a haircut? No I got them all cut
 
@NikiC why oughtn't it? if the compiler optimizes it into a register, then this may well happen
 
@bwoebi iirc it's only undefined if you change the variable after the setjmp
the value prior to the setjmp should be on stack
 
@NikiC setjmp does not backup most registers
@NikiC Are you sure it's on stack?
 
that didn't work
 
> Upon return to the scope of setjmp, all accessible objects, floating-point status flags, and other components of the abstract machine have the same values as they had when longjmp was executed, except for the non-volatile local variables in setjmp's scope, whose values are indeterminate if they have been changed since the setjmp invocation.
@bwoebi Not necessarily on the stack, but the value should be guaranteed
 
ah mhm
 
@JoeWatkins So, where does EG(bailout) point to after your macro?
 
4:43 PM
let me try to find out, iirc I had problems debugging it without symbols, stuff was optimized out... but I'll check
 
@JoeWatkins you still can include symbols and optimize it?
 
it's a global, I don't think those can be optimized out :D
 
that must have been something else
(gdb) p $eg.bailout
$1 = (jmp_buf *) 0x7fffffffb670
(gdb) n
554       t = apc_time();
(gdb)
557       if (apc_cache_make_context(cache, &ctxt, APC_CONTEXT_SHARE, APC_SMALL_POOL, APC_COPY_IN, 0)) {
(gdb)
560           if (apc_cache_make_key(&key, strkey)) {
(gdb)
563               if (!apc_cache_defense(cache, &key)) {
(gdb)
566                   if ((entry = apc_cache_make_entry(&ctxt, &key, val, ttl))) {
(gdb)
569                       if (apc_cache_insert(cache, &key, entry, &ctxt, t, exclusive)) {
 
so, nothing changed?
 
nope
 
4:50 PM
ummmm, going out on a limb, does the crash really go away if you just drop that extra try/catch code?
 
you mean the else {} ?
 
Anyone who understands Wordpress can please take a look at this question? wordpress.stackexchange.com/questions/242884/…
 
Wes
guys, any cheapish mechanical keyboard you'd suggest? full US layout (it's the one i'm used to)
i have no idea about the clicky thingies color, now i have brown ones and they are ok. should i try something different?
 
@JoeWatkins I mean just run the code you have there without the php_apc_try wrapper
 
oh yeah it goes away
oh
 
4:56 PM
wat
 
you mean don't use a macro but put the same code in the function directly ?
is there something I don't know about macros ?
 
actually not what I mean, but that's a good idea
whole block in a macro sounds adventurous, I don't want to know what crazy things could happen there :D
 
grrr ... that didn't work either ...
what was it you meant, I'll try that ?
 
5:11 PM
nah, I'm out of ideas
I don't understand how it can stop working even though the value stays the same
unless the jmp_buf structure itself is modified?
Maybe place a hardware watchpoint on it, just to make sure?
 
hm
(gdb) p zb
$1 = (jmp_buf *) 0x7fffffffb670
(gdb) watch *0x7fffffffb670
no break
Breakpoint 3, apc_cache_insert (cache=0x166d010, key=0x7fffffff9f60, value=0x7fffeb3041e8, ctxt=0x7fffffff9f80, t=1476724830, exclusive=0 '\000') at /usr/src/apcu/apc_cache.c:962
962     zend_bool result = 0;
(gdb) n
966     APC_LOCK(cache->header);
(gdb)
968     if (SETJMP(ab) == SUCCESS) {
(gdb) p $eg.bailout
$8 = (jmp_buf *) 0x7fffffff9e40
(gdb) n
969             result = apc_cache_insert_internal(
(gdb) p $eg.bailout
$9 = (jmp_buf *) 0x7fffffff9e40
(gdb) n
976     APC_UNLOCK(cache->header);
hmmm
 
5:33 PM
hehe
sorry, thanks for coming to my rescue anyway ... turns out I'm just a punk ...
 
@JoeWatkins lol
 
ikr, I'm such a dick
 
5:49 PM
nite all o/
 
@JoeWatkins ah, yeah… the issue of not having finally :-D
 
yeah, I hate myself for not seeing that ...
 
@JoeWatkins Then we're all dicks :-D
 
yeah that's true
haha
 
6:08 PM
one of these days I'll get it right on the first try
I have Cherry Brown at home, and Cherry Blue at work. I definitely like Cherry Blue better for typing. I like the clicky noise in conjunction with the bump that's felt.
I have a Cherry Red board, which is nice for stuff like Starcraft 2, but isn't as practical for typing.
as for finding a cheap one, probably check on slick deals. They're typically 80+, but sometimes you can find one on sale for cheaper. It's how I got my Cherry Brown board.
Lastly, there's a subreddit for mechanical keyboards, and they're a pretty devoted community. They have a buyer's guide wiki.
 
I think I've been karmad, badly, somehow. Jumps into code, sees an awful lot of cellRendererProviderServiceFactory, and various declinations
I wish I were exagerating
 
What's cellRendererProviderServiceFactory?
 
6:27 PM
a stupid class name
 
Wow, that's longer than my go-to AbstractSingletonProxyFactoryBean
 
Please tell me that was automatically generated
 
I'm not really sure. But it's an active class.
This is probably my favorite though. Enterprisify your class name!
2
 
6:34 PM
this is so horrible yet I find myself quite fond of it ^
CollectionRequestEventFactorySingletonObserverPropertyListener
 
that class is nested
 
In my search, I found this. I think this is the winner. It's self-aware.
It's like someone took British humor and used it as a programming scheme
 
I had a bad idea for how to add typed properties without a performance penalty, and then I realised it couldn't work because closures
 
@Andrea the small perf penalty in closures is negligible.
Now tell me about your idea @Andrea
 
@bwoebi insert type-checking opcodes at compile-time for private properties, make public properties go through getter/setter
…but I have no idea how to deal with protected properties ^^'
 
6:46 PM
@Andrea … this isn't no performance penalty though?
 
@bwoebi er, *none for normal properties
 
I mean… typechecking itself is not free
ah
 
however, this can mean none for private typed properties too if opcache can elide the check :D
 
@Andrea yeah, that's a nice optimization once we have the RFC passed
 
class Bar {
    public int $foo;
    function setInt(int $foo): void {
        // OPcache could elide type check here
        $this->foo = $foo;
    }
}
 
6:47 PM
yep.
And protected properties can go play the self fucking game...
 
Anonymous
Hey chris, you got a minute? I'm a bit stuck :s
 
For you James, I got 5
 
Anonymous
You flirt.
 
@DaveRandom That ending tops it off.
 
6:50 PM
however, requiring compiler-inserted type checks for private properties would be difficult given corner-cases… I can only think of runtime-bound closures here
 
@JayIsTooCommon I can give you 6 minutes even!
 
@bwoebi probably would prove unpopular :p
 
@Andrea We'd just do it where possible.
 
Anonymous
@bwoebi Sorry Bob, you can't compete with Chris' curly locks
 
6:51 PM
I don't have curly hair?
 
@bwoebi well, what do we do for where we can't? a special “actually do type checks anyway” opcode?
 
@Andrea I mean, I still haven't figured why — Chris locks aren't curly??
Eih … I wanted to say, I still haven't figured why protected exists in the first place @Andrea
 
@bwoebi inheritance
 
@Andrea can use public.
 
@bwoebi true
 
6:52 PM
do you have an actual question @JayIsTooCommon? :-P
 
@DaveRandom No, he's just playing the trolling game, obviously :-P
 
Anonymous
Yeah sorry, two seconds. just checking i'm not being a complete twat
 
> Like PSR-2, the intent of this specification is to reduce cognitive friction when scanning code from different authors.
wtf does that have to do with interoperability ...
 
Wes
@Tiffany you like the clicky noise :B
 
@bwoebi I just lost the game and I'm blaming you
 
Wes
6:54 PM
i thought my brown was too noisy already
 
@JoeWatkins not quite, rather with cooperation so that you can easily PR and not be annoyed much about code styles diverging
 
Anonymous
@DaveRandom Ok so, what's the correct way to get message text from here? github.com/Room-11/Jeeves/blob/master/src/Chat/Client/… because I'm just getting Amp\Deferred back and the code is a bit over my head to understand why :P
 
@Wes I... I beg your pardon?
@JayIsTooCommon errr... lolfail
 
@Wes I do like the clicky noise. There are quieter keyboards though.
 
that's not annoying, annoying is spending the time to do a PR for someone elses code and being told your brackets are all wrong ...
this has nothing whatever to do with interoperability
 
Anonymous
6:56 PM
@DaveRandom ah god.. am I being a complete twat?
 
@JayIsTooCommon nope I am
s/am/was/
 
@Andrea We'd just have a special directly assigning opcode for these cases; and use normal assign where we don't know scope ahead of time.
 
Anonymous
oh good!!
 
@JoeWatkins exactly. It's to prevent that.
@JoeWatkins Yes, it's not interop. It's part of the bigger picture.
 
@DaveRandom you were playing gta right dumpert.nl/mediabase/6913231/6d8207ea/… :)
 
6:58 PM
Oh wait actually @JayIsTooCommon I got no idea what's going on there, you say you are getting a Deferred back? No idea where that is coming from :-/
Can you put the code into a temp branch on github or sth?
 
@bwoebi ooh, we could optimise it to not worry about references and stuff…
 
Anonymous
@DaveRandom Maybe I'm looking in the wrong place.. Let me just confirm a sec :)
 

« first day (2193 days earlier)      last day (2773 days later) »