« first day (434 days earlier)      last day (4514 days later) » 

12:00 AM
@hakre per repo, not global?
@edorian Yeah, turns out I didn't know how to use calloc ^^
 
per repo, might not be as good as global, but it did work for me :)
 
I'll replace it with malloc + memset, the calloc is some dirty magic to save a line
@hakre I don't understand what you mean by per repo? .gitignore or the magic in .git/ ?
 
Coolio, thank you to whoever starred my last chat message. Got me the badge :)
 
About time. Gratz :)
 
12:16 AM
I'm off. Later :)
 
me2 night
 
 
1 hour later…
1:31 AM
@NikiC in .git/info or so
 
2:02 AM
Good time everyone !
 
2:40 AM
Why write one line, when you can write X lines?
        $contents = explode('\n',strip_tags($xml->saveXML()));
        $text = '';
        foreach($contents as $i=>$content) {
            $text .= $contents[$i];
        }
        return $text;
 
 
1 hour later…
closing time. last call for alcohol...
is there anyone's brain i can pick?
bueller bueller bueller anyone anyone seen ferris? bueller no ok
 
4:35 AM
Good time everyone !
Does anyone use Twig here ?
was wondering if there is some way to define some global constants and use them all over the templates without passing them to engine every time.
Things like Base URL or Language
@hakre why answering when asking for CV ?
@ircmaxell I heard yo use twig, Got anything for me ?
 
@OmeidHerat no
 
aight, but I think I found it.
 
5:04 AM
morning all
 
morning
 
how's it going?
 
pretty good
 
do you celebrate christmas or is it just another public holiday?
things are reaching critical mass here!
 
Back in home, Nope. not even a public holiday. But here in Australia Yeah it's all over the place !
 
5:08 AM
where are you from originally?
 
it's better pronounced as Christ-Mess.
Old afghanistan.
 
heh yeah.
ahh cool. What's the distinction between old and new afghanistan? geography?
 
nah, it's just same. I was trying to imply that it's not Modernized (westernized?).
 
ahh ok
 
By the way, where do you draw the line between Inspired or copied (in design) ?
 
5:13 AM
I think the difference lies in whether you copy it verbatim or whether you add anything to it
It's pretty hard to design something truly truly original. Everyone gets inspired by what they experience so we're all doing it
 
Sometimes I kind of feel guilty when my website smells a lot like some else.
 
I don't usually do the design part, but I know the feeling
 
I don't do design either, it's just like a weekend project.
 
if possible add an 'inspired by' credit
Interesting read - "Why programmers work at night" - swizec.com/blog/why-programmers-work-at-night/swizec/3198
Rings a bell, most of my steady uninterrupted work is done in the night. Although I tend to not work at that time these days
 
@JohnP nice one, I am one who goes to bed at 4 am.
 
5:25 AM
@JohnP Yes it does. I should also have my gf read it :P
 
Yeah, and it makes sense. My brother keeps those cycles now. He wakes up at about 12, and works through the night.
hey, anyone worked with any good JS libraries that add AJAX routing on top of an app?
sort of like what jquery mobile does
 
6:08 AM
@JohnP microjs.com
 
@tereško woah! nice find! thanks, I'll have a look at that
 
 
3 hours later…
8:40 AM
$season = SeasonFactory::get('christmas', $optios);
if ($season->apply($person)) {
   echo 'Merry Christmas!';
} else {
   echo 'Happy holidays!';
}
happy holidays everyone! have a nice weekend
 
@JohnP same to you :)
 
@JohnP , you really should invest in learning proper OOP next year
 
8:56 AM
@tereško hello :)
 
morning , @Abhishek
 
can you test a page for me sir ?
 
9:12 AM
@Abhishek , you could just drop the link in chatroom and ask people what they think about it
 
there you are :)
the links at bottom dont work (x .. i have to build the pages but .. i need to check if the media player works :)
 
hmm.. its acting strange on Opera
mouse-scroll is definitely broken , and ( if the song list is supposed to be clickable, then ) playlist doesnt work either
and the volume control is fucked , @Abhishek
 
ouch!
did u tested it on PC accidently ?
cause .. even from its looks its a mobile APP
 
yes , i tested it on PC
 
:(
 
9:20 AM
but that OperaMobile is using exactly the same engine
oh , and you really need a designer =P
 
 
2 hours later…
11:34 AM
morning
merry christmas to everybody
 
 
1 hour later…
12:40 PM
Merry Christmas Eve...
 
 
1 hour later…
2:02 PM
Marry christmas to all of you ........
 
2:17 PM
hmm ... i fail to find a translation for "gaļas pīrādziņi"..
anyway .. eating them ( still warm , fresh from oven ) with some dark beer ... nom-nom-nom
i always suspect that in latvia xmas is mostly an excuse for excessive eating
 
2:56 PM
Good time ! and Happy holidays !
@tereško Eih, how you can eat something that you don't know what even it is :|
 
stop playing stupid
 
I ain't, but honestly if I don't know in and out of something I don't even touch it.
maybe I am too fussy.
 
Hi all!we pass CSS class name in an element to apply that class on that element but what is purpose of passing CSS class name more then once in one element?
 
its hard for me to differentiate when people are pretending and when they are genuinely stupid
 
but they say you are what you eat.
 
2:59 PM
@OmeidHerat , in case if you really are mentally retarded , i already told you the name which it has .. i was saying that it does not translate in english
@Adnan , you will have to show the code in question , because you words make little sense
 
@tereško I can always blame at being sleepy (0130 AM) but I really though you don't know what it's name means.
 
@teresko Eg:- <h1 StyleClass="class1 class1"/>
 
@Adnan it has not effect on the specificity
 
@Adnan if they are same, it doesn't has any effect as is as if it was passed once. Make sure they are actually exactly the same.
 
Hi All
I have output like 1,3,5,7,9,2,4,6,8. How could we get in a correct order 1,2,3,4,5,6,7,8,9 in mysql
 
3:29 PM
ummm
 
thnx v v v much Omedi and teresko.
 
 
2 hours later…
5:19 PM
Yay! Now I have a couch in my apartment! Woot!
 
nikic in da house
 
@SeanHJenkins Yep, I am :)
And gone again now ... :P
@ircmaxell btw I managed to implement pop/push/peek on a stack
But now really gone
 
5:36 PM
@NikiC Very nice
1 message moved to bin
 
 
1 hour later…
6:56 PM
@NikiC hey.
 
 
1 hour later…
8:22 PM
I know this is really not the place to post this, but the jQuery chat is dead. Can anyone point me in the direction of a jQuery pagination script (not reloading page) with just next and previous buttons? Or even a tutorial?
 
9:16 PM
back
 
9:43 PM
hi all
 
hi @LondonBoy
 
@Donut hi how are you?
 
@LondonBoy Good, you?
 
hey @Donut
 
Hi @NikiC
 
9:46 PM
@Donut good too thanks
 
@NikiC I see you are writing PHPDS in C
 
@Donut I am. But moving veeeery slowly because my C is bad.
 
Looks good.
/me have finally found a name for framework, so can start work on it! :>
 
hi Charles how are you?
 
@LondonBoy I am well, how are you?
 
9:57 PM
@NikiC me again. Wanted to ask you about Twig and Action/View as a whole.
 
@Eugene go ahead
 
@NikiC What do you think, should methods, that generate form html element be placed in Application/View or should be they in Form class. It's my dilemma at the moment. Since I want to render and at the same time I want to render form, so it kinda works both ways.
 
@CharlesSprayberry good too thanks, how is your project going?
 
@LondonBoy Pretty good, working on converting the text roadmap over to github issues and milestones at the moment
 
@Eugene Uhm ... erm ... no idea ^^ ask @CharlesSprayberry :P
 
10:02 PM
@Eugene What is the responsibility of the Form class?
 
@CharlesSprayberry It contains formElements
And also in future will contain subforms
It works with them.
 
@Eugene What do you mean it contains form elements? What is it doing with the form elements? Displaying them? Working on the data?
 
Starts validation process.
Usual stuff.
Working with data.
 
@Eugene I don't think validation processes should have any reason to know about the display being used
 
Checking it and preserving for later use in action
 
10:06 PM
@Eugene What if you wanna use that form validation and return JSON later? Add even more methods to your bloated class? :P
 
@CharlesSprayberry Okey. What would you suggest then? Should I pass this form to view and from there just take form data, but output will be handled by view.
 
@Eugene I'm not sure to be honest. I've thought about this for my own project and how I will handle it. You could have the form validation a component in the controller and it sets specific data for the view that gets put into the form attributes for display
@Eugene You could have classes that are strictly responsible for displaying the form elements that take your form storage classes as dependencies to use for the data fill in
I'm not sure, it is an interesting question :)
 
@CharlesSprayberry Well at the moment I'm playing with Twig TokenParser and it nodes. I want to recognize form element from there and then call it from view, where view will return generated html for that element with a help of HtmlElement Class.
 
@Eugene I'm sorry I do not have experience with Twig. Since @NikiC threw me under the bus earlier I'm gonna do the same and mention that I remember him saying he uses Twig. I'm sure he can help you out ;P
 
@CharlesSprayberry Well, to solve it for sure I probably need to create a mutant from both of you. Then it will have parts from both of you. Knowledge about Twig and thoughts about organanizing form to work with view :)
 
10:20 PM
@Eugene haha, I'm very sure my thoughts may be wrong on form data presentation. I just try to restrict classes to have a sole single purpose. Validation and display are two purposes :)
 
@CharlesSprayberry That's why I have a dilemma. :)
@NikiC heard about you developing PHPDS is it PHPDevShell ?
@CharlesSprayberry Hmmm. Thinking should I do a separate view class, that should be instantiated from main view, that will handle form elements generation.
 
@Eugene No, PHP Datastructures / SPL Datastructures
 
@NikiC :)
 
10:42 PM
Listening to owesome dubstep. Helps to stay awake :)
@NikiC Heh. In Twig documentation.
return new Project_Set_Node($name, $value, $lineno, $this->getTag());
How many arguments.
Correct 4.
class Project_Set_Node extends Twig_Node
{
    public function __construct($name, Twig_Node_Expression $value, $lineno)
    {
        parent::__construct(array('value' => $value), array('name' => $name), $lineno);
        }
 
^^
 
How many do we see here? Yep. What for do we need the tag argument. We can probably get along without it.
:)
@NikiC Do you know what is this?
$compiler
            ->addDebugInfo($this)
            ->write('$context[\''.$this->getAttribute('name').'\'] = ')
$context to be more accurate.
 
@Eugene Fix the docs
@Eugene What about it?
$context are the vars you pass into the template
 
Emmm. Still not sure how should I read it.
public function compile(Twig_Compiler $compiler)
{
    $compiler
        ->addDebugInfo($this)
        ->write('$context[\''.$this->getAttribute('name').'\'] = ')
        ->subcompile($this->getNode('value'))
        ->raw(";\n")
    ;
}
I should probably view one of the cached files.
So context is a global arrat of view variables.
 
yes
 
11:07 PM
@NikiC For example if this $this->assign( 'simple', 'simple' ); is rendered in template file like if (isset($context["simple"])) { echo $context["simple"];} I could work it with my own TokenParser and OwnNode, where Node whould need to write same code ( as in template generated by Twig ). Am I right?
 
@Eugene I'm not sure what you mean by "For example if this $this->assign( 'simple', 'simple' ); is rendered in template file like if (isset($context["simple"])) { echo $context["simple"];}" but the rest is right ;)
 
Well, here I set a variable and value for usage in template $this->assign( 'simple', 'simple' );. In template I call it like usually Twig vars are called {{ simple }} and in cached template this is generated like this if (isset($context["simple"])) { echo $context["simple"];}. So in other words I take responsibility with my own TokenParser for how one or the other element is generated and rendered later on.
 
ah, now I get it
Sounds strange though that if (isset($context["simple"])) { echo $context["simple"];} is generated, but anyways
Yes, that's how it works ;)
the TokenParser creates a Node and the node renders itself to code ;)
 
hi guys
do any of u know a portable way to do a .htaccess thing in apache?
 
@Ankit hi
 
11:23 PM
I mean I have a directory that I want to remain hidden from the web
I can do that using apache using .htaccess
But, what if a user changes from Apache to IIS
Or any other server for that matter
 
-1
A: how to search in array with preg_match PHP5?

refpIn this post I'll provide you with three different methods of doing what you ask for, I actually recommend using the last snippet, since it's easiest to comprehend as well as being quite neat in code. How do I see what elements in an array that matches my regular expression? There is a function...

Can some PHP-head explain why the fcuk someone would downvote that answer? yes, it contains a lot of information, but it's just different methods of doing what OP asked for, I can't see why someone would hate on that
 
@refp Seems good to me, +1. I would have left the array_reduce part out though.
 
@NikiC it's a fun solution for the more functional heads out there, though I would never use it myself to be honest.
but still someone might think it's good.. but since you don't need the previously returned values it's kind of lame
it's probably a guy I missed off earlier today, someone been down-voting shit all day :/
 
11:38 PM
@refp Yeah, it doesn't really make any sense in PHP ;) Would be the way to go in Haskel et al but not in PHP
 
mhm
I'm just bored as fcuk
 

« first day (434 days earlier)      last day (4514 days later) »