« first day (1180 days earlier)      last day (3994 days later) » 

15:00
@rdlowrey Some people might argue about number of words in the function names. :
So, jQuery + PHP anyone?
@rdlowrey not really - it also reduces the code to read when following a particular path for a value
user895378
@Fabien And those people would be wrong. Anyone can write code that a machine can understand. Good programmers write code that people can understand.
I converted a tabs user to spaces today. Good deed for the year done.
Grats :)
user895378
15:03
@Ocramius "Not really" is not the same as "not." Sure, you know exactly what's happening because you just wrote the code five seconds ago. When you (or someone else) looks at it three months from now you have to spend extra time -- even if only a couple of seconds -- to stop and think about what's happening. This is suboptimal. If I have to spend any time at all thinking about what your code is doing because it's not instantly apparent it's my opinion that the code was not written well.
@rdlowrey They have to stop and think a little as they jump over 3 functions to replace if statements...
Beware of PHP variables: they will send your computer to HELL. Or so told me my goldfish. — kuroi neko 59 secs ago
I think it was a clean code talk where they said you can do it for switch, but isn't if overkill?
user895378
@Jimbo no they don't because the function name tells you what is happening.
user895378
That's the whole point.
user895378
15:05
if () tells me nothing. validateThatSomethingHappened() is far superior and immediately obvious.
Okay, fair enough - I'll move it around and see how it looks
@rdlowrey well, I personally never had problems reading early returns, while more problems reading results pushed to variables :|
it's more "state" to keep track of
And "state" is basically 90% of the bugs I encounter in my projects :|
user895378
@Ocramius I mean it's not really a negative thing. I try to avoid early returns when doing so makes the code easier to understand. No one ever died from an early return.
user895378
@Jimbo These are largely stylistic points. I'm simply explaining the prevailing line of thought that leads to someone like your prof saying that nested conditionals are generally considered suboptimal (and I happen to agree with him).
Gosh... I already hate the discussion around php-fig's container interface >.<
user895378
15:08
Sometimes an early return makes a function more readable. Every decision depends on context :)
Early return ftw
Well, depends. No return > early return > nesting
user895378
^^ That.
^ I agree.
@ircmaxell where ranges the goto? :-P
@ircmaxell no return?
you mean, like having no code at all?
15:10
@NikiC yeah, single-path execution
user895378
@bwoebi goto all of the things!
@ircmaxell So, unconditional code?
@rdlowrey goto sometimes can be a nice structuring element…
(although mostly there are better methods…)
@NikiC correct
15:14
Error: TypeError: this is undefined
Source File: localhost:8000/assets/js/form_options.js
Line: 21
@DaveRandom
@crypticツ Yeh I haven't actually tested it, hang on
What's an example of unconditional code/no return?
@Fabien code that has no if statements or loops
Boo, my glass disappears today (shipping it off to get the new version)
@ircmaxell I'm not keen on the earpiece requirement tbh
How are you finding the glasses? I've not heard good things tbh.
15:16
@Jimbo it's not a requirement
Google were supposed to be minimising the size
@Fabien it's quite good. the only problem is that it sticks out like a sore thumb
Do you get to write anything for it? Code, not review.
I can if I like
I have full access to the SDK
/me heads to the office. Later
Maybe you can create a booby recognition program that auto highlights cleavage in the area.
15:24
@Fabien If it's good cleavage, you won't need a highlighter. It should be a global rating system.
user924016
lol
15:44
lol, OP asks a question, states that his friend said X, people respond with Y, OP responds with:
thanks everyone. actually he's senior, so i think he knows better. But you guys are awesome! — user3145795 41 mins ago
@DaveRandom works so far "/*jslint browser: true, ass: true, plusplus: true, white: true */"
is that a typo?
Yeh I know, I really have no idea what Douglas Crockford is smoking, that's for "tolerate assignment expressions"
unexpected ass...
@crypticツ Works on the web site... (jslint.com)
15:51
@crypticツ maybe there shouldn't be asses involved..
@DaveRandom dat ass
Good evening.
If it's causing you an issue just take it out, it's not a perfect lint anyway due to an unavoidable misordered definition and an empty constructor in a base class
You actually got jsLint to work. Congrats.
@Ocramius My ass is always unexpected.
15:53
Never expected but always *ass*umed.
@crypticツ in any case, I'm pretty certain I've fixed the NaN bug with the counter, although there's a new issue with the counter once the refresh routine is implemented (note that gist.github.com/DaveRandom/… still needs to be done)
@crypticツ Our codebase had a function called deepAnal :( Abbreviating the word 'Analysis' probably isn't a smart choice.
@DaveRandom that's where I put my update code right?
and also my refresh-notice code?
@crypticツ Yes. Make sure you call the callback at the end of the update code. I'm guessing you're just going to fetch some HTML with ajax and replace it into the DOM? In which case you'll need to do this.init(); callback(); after you've done your thang
15:59
JSLint: 'tick' was used before it was defined. (at line 179)
@Fabien Want a cheap ticket to PHPUK? :D
Cheap is subjective :P
I'm listening...
@crypticツ Yeh, unavoidable. It has a circular relationship with another function because of what it's actually doing.
@crypticツ tried alert('Hello World') on the site and said 'alert' was used before it was defined.. hmm..
16:00
@Fabien Have to find out how much but one of my colleagues isnt going so we have a spare :P
kk, thanks a bunch!! @DaveRandom
@Fabien recv'd
@crypticツ The refresh notice should already be handled for you, it's looking for an element with a text node as the first child with id="refresh-notice" - gist.github.com/DaveRandom/…
@JoeWatkins Cool, to which? I sent it to both.
@Suhosin Awesome. Let me know :)
(note that I haven't actually looked at any of the HTML/PHP while updating that)
16:02
pthreads one @Fabien
Wonder why krakjoe didn't work.
@DaveRandom so how would I access that element from the update section?
dunno, voodoo I guess ...
@crypticツ the actual text that gets put into your refresh notice is defined on L185 and L207, if you look at that you should be able to see how it actually works
@JoeWatkins How should I print the url sent to the file_get_contents for this library? github.com/Lusitanian/PHPoAuthLib/blob/master/examples/etsy.php
16:04
That object basically calls a callback once a second so it can update the counter and then when now > nextRefresh it calls DataTable.refresh()
Oh @crypticツ on line 206, s/element/textNode/
hoy hoy again
@tonyrq @ircmaxell Working on it ....
@samyb8 dunno, not familiar ... it shouldn't be that hard to find out, or use a debugger ....
16:10
oooh it'd be great if you could come to phpuk @Fabien I'd have another person to hide behind ...
@JoeWatkins For the right price sure. :)
hey, I could likely do that... I wonder how much airfare would be
@ircmaxell yeah u too ...
@ircmaxell Didn't know this had so much positive comment. I really don't know anything about cryptography. Also I added bcrypt support.
ow ow, my eyes my eyes
if you are mental enough to think that is a solution to anything, you deserve your inevitable comeuppance ...
to be fair, it is much better than it was
I think I'm being fair
@ircmaxell
hmmm, $850 for airfare...
16:17
thats rather a lot ...
it is a long way tho ... I don't think you could get anyone to carry you on their back for less ...
lol, I've done it for $500 before
@crypticツ How much un-pushed work have you got for the back end?
@DaveRandom not much yet, working out the front-end first.
My children really need to go back to school... before I kill them all
if I did PHPUK, it would be 4 conferences in 5 weeks in 4 countries :-D
16:21
@ircmaxell maybe Guinness will pay the airfare in that case :)
@crypticツ kk, will need a small alteration to the vote counter code when you get the updating working. If you change the template from:
<strong>Viewing</strong> <span id='questions-count'>0</span> / <?php

echo (isset($backlog->tbodyData->count))
    ? $backlog->tbodyData->count
    : 0;

?><strong>|</strong> <span id='questions-timestamp'>
to:
<strong>Viewing</strong> <span id='questions-count-current'>0</span> / <span id='questions-count-total'>0</span> <strong>|</strong> <span id='questions-timestamp'>
@JoeWatkins if so, I'm in!
...then I'll do it now
I'm going to wait until friday to see...
@DaveRandom oh so just zero it out so JS does count instead of PHP outputting it?
16:24
@crypticツ Yeh, the problem being that when you do the refresh the total number may be different
but I very well may
I would hijack a plane so you can come, but don't think I've got the time to do the training ...
you're going? definitely?
definitely got tickets yesterday
wow, that's expensive
16:29
they are, I got free tickets, probably wouldn't have got the two day one if I was paying ...
got free tickets??!?! How'd you pull that one off!?
Julien gave me a code
ahhh ;-)
I see they have a few "TBA" slots...
@DaveRandom this is a static copy of the new front-end. Now has the update option soon to be finished, thanks to your help. Will mark bountied questions, and has sortable columns thanks to @Wes for that. dev.cv-pls.com that's about all the changes there will be there for this branch. Rest is all back-end work.
afk, back 20
16:41
oh, and the colors have more contrast. I had fixed that when the backlog was made public, but somewhere during some update that change was lost. So the regression that was re-fixed I shall call a "new" feature =oD
Hey people, quick php question:
I've got a question, didn't really get answered yesterday and I had to leave. Anyone care to take a peek? chat.stackoverflow.com/transcript/message/13932069#13932069
I too have a quick question..
Am trying to change this: "<?php include './include/js.php'; ?>" to this "<?php include 'js.php'; ?>" meaning the path /include/ is already defined somewhere. If seen this, but dont know how to implement this.
16:54
@blade19899 use getcwd() to figure out where you are.
Thanks i'll give it a read
back...
@Fabien that's a nice one^^
<?php
define("CWD", __DIR__);
define("INC", sprintf("%s/include", CWD));

include sprintf("%s/js.php", INC);
?>

that's about as close as I can get to include "js.php" ...
without adding __DIR__ . "/include" to the include_path
17:01
yeah ... sprintf is a bad habbit of mine ...
I need some advice here, am having 2 tables, one for main category, 2nd for subs, so when posting, I check whether the posted id of the category/sub cat is valid or not, if dom is tweaked with firebug, I throw an error, and later, I check whether the sub cat is associated with main cat, so anyways the validation will be done here, do I need validation for main and sub cat separately?
@blade19899 gotta be what @ircmaxell, set include_path in ini ....
@FernandoSilva that's really wordy ...
I wouldn't do that though
@JoeWatkins how so?
17:08
@ircmaxell me neither ... but I can't figure another way include "js.php" could mean anything other than include "js.php" ...
@crypticツ any chance of pushing the source up to a 1.2 branch or something? This should resolve the counter issue but it would be good if I could test it
Anyone who have worked with content repositories before?
@FernandoSilva you seem to have the basic idea, yes ...
What is a "content repository" when it's at home? The bin in my bedroom is technically a content repository but it's unlikely you'd want to display it on a web site
@JoeWatkins right,and it shouldn't ;-)
17:11
indeed, magic ...
@DaveRandom I was thinking of this: jackrabbit.apache.org
Or at least that concept
@DaveRandom lol
@JoeWatkins ok, that's good to know... what design pattern would you advise a novice programmer, borderline absolute beginner?
you give the world too much credit ... the ratemy****.com sites come to mind ...
@DaveRandom files are all over the place and really nothing works but the front-end template which I manually paste HTML output from live backlog for now. I tested with new code and the counter properly updates and even the NaN issue is gone
17:14
@FernandoSilva I don't understand the question, because you're asking the wrong one .... there is no one overarching design pattern, you should pursue in general the idea of using patterns to develop and learn and read about as many as you can ...
@JoeWatkins True. I'll rephrase to "it's unlikely I'd want to visit that website"
@LuckyLuke Well, I read quite a bit of the info on that site and I'm none the wiser. It's full of fuzzy terms and doesn't define what it considers to be "content"...
"Error : object must be an object" https://gist.github.com/jpauli/8319513
I have a model that has a few static methods like find() and findAll() and am trying to add dependency injection
@ircmaxell shall I fix that ?
@DaveRandom Seems somehow a little abstract
17:16
@JoeWatkins ok, I did get that impression, that each have their own strengths and weaknesses, but I would need a starting point since my experience is NULL on the subject
@DaveRandom I am trying to understand what to name the nodes...
or will niki tell me I'm doing it wrong again ?
@crypticツ If you apply the template change I suggested before, the current revision of the gist should display the total correctly as well
Would my goal at that point to be to have dependency injection for anything that's not static?
@Webnet mentioned static .... GET HIM !!!
17:17
I just realized a cute way to toggle between page-wide states in CSS.
<body>
    <tag id="state-1" />
    <tag id="state-2" />
    <div id="content">
        ...
    </div>
</body>
And then you can just:
@LuckyLuke My thoughts exactly, I can't really see what it's for (although reading the Java spec might enlighten me a little, I don't have the time at the moment)
#state-1:target ~ #content { ... }
#state-2:target ~ #content { ... }
@DanLugg are you scripting in CSS ....
burn the witch
burn the witch
and so on ...
^^ that would be correct ;-) It overcomes the JS support issue, NoScript can be burdening.
@Webnet You goal would be to not have anything static at all...
17:19
@DaveRandom see dev.cv-pls.com updated with latest changes. Works correctly even when the cache error message is shown and will not NaN if boxes are checked
Sure....
user895378
user895378
When other people ‘steal’ your ideas remember a few things.

- They were never your ideas
- Ideas are a dime a dozen, execution is where the dollars lie
- Some of your ideas must be good. The next time one comes up, stop thinking, stop talking and start doing.
^^ Pff. Nobody steals my ideas, because I have a tin-foil hat.
@rdlowrey I just wish people would think my ideas were worth stealing =o(
17:21
@DanLugg lol
I've never had an idea I can communicate in words, if you manage to steal my ideas, you deserve them I reckon ...
^^ hard at work.
user895378
@crypticツ You probably don't give yourself enough credit. Besides, you have tin-foil hat protection just like @DanLugg
or at least that's true for ideas I wouldn't want you to steal before I got the chance to write them down ... you have to get up pretty damn early in the morning to write things down faster than me :)
17:23
@crypticツ Winner. If you can put it together into a deployable build I'll take a look at the back end. The current approach of caching the generated HTML isn't sitting nice with me, I'd rather cache a lump of JSON as this would also make the ajax refresh a lot smoother and more flexible
*goes back into my cabin*
^winner
Brilliant!
optimum solution I'd say ...
Hoist it up into one of those trees! Then you can have a super-secret mega tree-fort with thought-thief protection!
17:24
yeah because you probably wouldn't definitely kill yourself or anything ....
the time for living in trees passed ... bout 30 million years ago ...
undearground is what you really want ...
Says you, chud.
someone has a DC in a mountain side ... a lead lined one ... forget who ... but basically that ...
user895378
Wow ... the award for obscure movie reference tie-in goes to @DanLugg!
@JoeWatkins up to you
17:27
dude it looks like I might be up until 1am for this phptownhall thing
well it starts at 1am
what country are you in again? Are you from the UK?
it might keep me awake ... haven't got anything else to do ... well i have one thing but it's windows and I hate that ...
yeah
ah cool
does eastern time mean EST or EDT ?
you're 5 hours ahead
user895378
17:28
@JoeWatkins You could make it so that my shutdown function is called in worker threads if a fatal error happens in the thread ;)
user895378
(if you have nothing better to do)
@JoeWatkins just do it, please^^
EST (since daylight savings is not in effect now)
user895378
I should probably just post a bug report at some point :)
I didn't think I had anything else to do ...
so 20:00 till 21:00 eastern time on the 9th
I'm so confused
1-2 am on the 10th my time ?
17:31
Array ( [0] => a:1:{s:64:"wpcf-fields-checkboxes-option-0fc03adaa5f08a9ec192e10a53748e99-1";s:9‌​:"Adventure";} ) How i to get Adventure from this array?
so 0100-0200 GMT on the 10th
right, got it, that's not even today ...
@Fasilkk By asking in so chat. ;)
user895378
$arr = unserialize($array[0]);
var_dump($arr);
user895378
@Fasilkk ^^ try that and tell me what you see.
17:32
ok..
thanks..
i will try..
@bwoebi how did you do that ??
@JoeWatkins nope, Friday morning
ok so, say I wanted to fix it so that this object typehint worked ... what would be a sane way to do that ? since we have no object class and cannot introduce one ...
remove the typehint, and verify internally
hm but what about once the code is cached, or copied for some other reason, the arginfo would be incorrect then wouldn't it ?
could the parser not fix it, take case insensitive object to mean IS_OBJECT ?
17:37
@rdlowrey, i got everything..;) thanks..:)
user895378
@Fasilkk glad to help ... you just needed a push in the right direction :) The value of the original array at index 0 was simply a serialized array.
It is returned from Wordpress..;)
user924016
18:03
lol
@ircmaxell the 'queen dog' arrives =p
18:21
is it crazy in some way ?
I have some background with Java/Spring using repositories and services. I'm trying to understand what a Repository/Dao pattern looks like in PHP
Is a DAO just a serivce?
I'd like to find some sample code that shows how Models, DAOs and Repositories work together
@ircmaxell I guess introducing object token is bad ... but we could fix typehints for 6 maybe ?
18:36
anything is possible :-P
Ok, so apparently developing and testing a compat lib for 5.5, on 5.5 is a bad idea :-D
@JoeWatkins how did I do what?
you appeared, as if you were a ninja or something ...
@JoeWatkins Am I not allowed to read without saying much?
public function testRawSalt() {
    $hash = password_hash("test", PASSWORD_BCRYPT, array("salt" => "123456789012345678901" . chr(0)));
    if (version_compare(PHP_VERSION, '5.5.0', '<')) {
        $this->assertEquals('$2y$10$KRGxLBS0Lxe3KBCwKxOzLexLDeu0ZfqJAKTubOfy7O/yL2hjimw3u', $hash);
    } else {
        $this->assertEquals('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', $hash);
    }
}
I feel dirty
@bwoebi nope ....
:)
18:41
So, just do the shitty winshit thing
lol
I'm going to ... it's not a half hour thing tho, I wasn't looking for something that will take me days ... it will take days ...
well I mean I can't work on anything for days :) I mean it'll take all my spare time for days ...
have you looked at the zend stuff even ?
@JoeWatkins I expected it to take a few hours… the only thing you need it changing the AG() functions and put a virtualAlloc behind… and then the one function in the watch.c to VirutalProtect #ifdef _WIN32?
@JoeWatkins what Zend stuff do you mean?
you can't use AG
@JoeWatkins why not?
static isn't it ? the id and macro ?
why do I think that won't work ?
I'm sure it won't ...
18:49
So freaking annoying...
@ircmaxell ?
@JoeWatkins have a look at zend_set_mm_heap
yes, I know, but not so simple tho ... I have never tried it

« first day (1180 days earlier)      last day (3994 days later) »