« first day (1318 days earlier)      last day (3646 days later) » 

1:03 AM
@JoeWatkins I'm not sure about the C extensions you write for work, but if they are in C because of speed this JIT stuff could be a potential replacement that is easier to maintain, yeah?
 
1:51 AM
Having trouble with your ext; it can't find libjit (not in standard location but in path)
Ah, it wasn't documented but --with-jit accepted a path.
Maybe tomorrow I can play with it :)
 
 
4 hours later…
5:26 AM
Morning
user image
3
 
I'm starting to really dislike FIG as well... groups.google.com/d/msg/php-fig/qXktLjkyLd4/4snPLk6a2FwJ
 
lol
"Please don't be the DHH of the situation. "
 
well, I think that's the broken attitude there
 
5:42 AM
They will come to sense
 
I hope so... =_=
 
Well.. keep fighting the good fight. =]
I would cringe if "fluent interface" hit a spec like that
And awful way Phil wrote you back btw.
 
@LeviMorrison ah, was asleep ... yeah --with usually does take a path ;)
 
@RonniSkansing I know from friends that he's actually a nice person in presence. Somehow, the keyboard makes him write as an asshole, I suppose.
 
5:55 AM
<3 void + no side effects
 
I'll stick to that belief to avoid unpleasant encounters at conferences (regarding anyone)
 
I guess Phil is only trying to push what he think is the best..
And guess so are the rest of you fig's =]
That is what happens when "A unstoppable force meets a immovable object"
 
@RonniSkansing what happens is a black hole
 
lol
you talking about the fluent interface now?
 
@RonniSkansing whatcha mean?
 
6:00 AM
was jk nvm [=
 
Ah, lol
<- very very sleepy
 
Well I just got up, it is time for some work. ttyl
 
some kinda american holiday, I get another day on jit I think ...
 
Hiiii..
 
6:17 AM
@Ralsho The getTimeStringFromDB() is a place holder as I don't know how you get your time string. You're supposed to replace it with the actual value. sighvascowhite 1 min ago
 
morning
 
oh , yaeh
morning
 
6:34 AM
@Gordon you around?
 
morning!
 
morning room
 
@Gordon Can you act on the flag on this question?
 
7:01 AM
@SecondRikudo what flag does to question?
 
@Hamza That's for moderator's eyes only :)
 
so why you want to ban this question!
 
@Hamza Never said I wanted to ban it. "Flag" can mean anything you know, you can type anything you want in a flag.
 
Okay!
 
7:16 AM
mornings
 
7:34 AM
morning
 
morning
 
7:45 AM
sigh @JoeWatkins @ircmaxell you guys around?
 
wazzup ?
 
Can you clear the stars on the message above?
 
ok?
 
Good morning! everyone. ;-)
 
7:52 AM
news.php.net/php.notes/199621 <-- Monday morning chuckle
 
I got to parse something like this:
<?php

define('_DB_USER_', 'root');
define('_DB_PASSWD_', 'psw');
define('_DB_PREFIX_', 'ps_');
define('_MYSQL_ENGINE_', 'InnoDB');
I could use my regex-fu but isn't there a more elegant way? When I google "php config parser" I get .ini parser...
 
morning Jimbo
 
We get the day off in the UK today, so naturally I'm sat in front of my computer coding
 
will get that on thursday
 
7:55 AM
OOP - does anyone make their constructors call setters (for validation purposes) instead of just idly setting properties?
 
gooooooood morning! :)
 
@Jimbo Yes
 
@HamZa why do you want to use regex for that? :D
 
@SecondRikudo Gdgd, just checking ;) Thanks
 
@iroegbu Actually I do not want to but if there is no magic function then I will do just that...
 
7:57 AM
Some people here with WP experience?
 
@iroegbu A better question, why would you want to "parse" that?
@HamZa ^^
 
this ^^
 
up arrows! ^^
 
@salathe Well, it's a mess... Guess what? I need to build an API around an API to make a connection between a prestashop backend and a phonegap application. Now I need to authenticate an user, I will need a certain key to generate the hash. That key is located in that config file...
 
An API, for an API...
 
8:02 AM
Can you make a config file in a nicer format, and have both things read from there?
 
Of course I could hardcode that key...
 
 
@salathe No that file is used by prestashop. I shall not mess with that
 
@Jimbo hehehe exactly my thoughts... Damn client >_<
 
8:03 AM
Meh, regex it and move along to something more interesting. :P
 
heh is cool. Thanks guys :)
 
So glad I don't have clients
They're all nobs
 
It's for school, so I don't have a choice
 
Morning
 
monrings
 
8:11 AM
@HamZa Well, sounds like OAuth is all you need to implement(?)
 
@Leri Throwing oauth at it would only make it more difficult?
 
@HamZa No, I don't think so. On the contrary, it should make it easier to implement. Well, technically you could also use SSL authentication and rely on it (never done that tbh).
 
lolz, this client doesn't even reply after 1 or 2 weeks when we asked her about server/ios/android license. Forget about SSL...
 
Good morning
 
@AlmaDo Morning
 
8:16 AM
Morning guys
 
good mornings :)
 
@Leri I've resolved that OO question (:
 
@AlmaDo Awesome. (link, link, link)
 
my time is 11 am.. so.. its not that morning.. =) Share your TZ..
 
@AlmaDo that OO question?
 
8:18 AM
lol :p no link. (if only to question). Only idea yet - because it will cause huge re-factoring. But I'll do it
 
You sound like some sort of lame anime cliffhanger.
 
^ not sure I got the sense
 
@AlmaDo "gasp! Is he going to use... that weapon?!"
 
it's this still
 
@AlmaDo Don't forget to post an answer. ;)
 
8:19 AM
but I'm going to delete it since I've already found a solution
@Leri oh, you know the answer?
crap. Early morning
 
No, I was referring that you should make a self-answered question.
@AlmaDo Yeah, almost 1 pm. :P
 
may be I will. But it has no sense since that question wasn't useful
I'm even not sure if it is on-topic for SO
@Leri yeah. early morning
 
@AlmaDo Honestly, if you take all that math off the question, replace something more object'ish (like cars, houses, dogs, etc), it'd be perfect on-topic OO design question. However, it's better candidate for code-review.
The latter is just my opinion. ^
 
I've got your point. No - that wasnt about code review. Because I know that code is not well. I just didn't know how to build application structure. So it's not about review something, it's about create something which I didn't know
and.. the math.. I'm going to refactor my dimention lib with this. So it's part of basic math framework for it. From there it will be - equation resolver, graph resolver, 2D figures resolver e t.c.
 
Ooh, I like these value objects
BDD
Example, my doctrine Server entity has an ip address property, but I've just made than an IpAddress value object
Looks like this:
    /**
     * @constructor
     *
     * @param string $ipAddress The ip address string
     *
     * @throws \InvalidArgumentException When an invalid ip address is provided
     */
    public function __construct($ipAddress)
    {
        if (preg_match(self::REGEX, $ipAddress, $matches) === 1)
        {
            $this->ipAddress = $matches[0];
        }
        else
        {
            throw new \InvalidArgumentException(sprintf(
                "%s expected a valid, single ip address, got: %s", __METHOD__, $ipAddress
Tell me that isn't pretty
Anyone else do BDD?
 
8:34 AM
No, I don't do BDD.
 
LOL...
 
moring!
 
Maybe I meant DDD, domain driven
@PeeHaa monsrnsings
 
nin @PeeHaa
 
hi, @PeeHaa
 
8:39 AM
@PeeHaa hi, @PeeHaa that's an all-time low!
 
@LeviMorrison B. A is far too bold and striking, my eyes don't know where to look.
 
@iroegbu What is? :P
 
var_dump(levenshtein("moring", "morning"));
int(1)
:P
 
Close enough :D
 
const @PeeHaa's_Laziness = 10; if (levenshtein("morning", @PeeHaa->getMessage() < @PeeHaa's_Laziness) { /** All is good **/ }
 
8:45 AM
current record is 51
 
Why did I just write that?
-.-
 
syntax errors :P
 
:-D
 
Since morning is only 7 characters long, and PeeHaa generally writes it shorter (because he is lazy), the distance will at most be 7, thus, always smaller than 10.
Almost always return true *
 
:16716119 Damnit, change it to > then :P
 
8:49 AM
don't
his laziness works inverted... more is less.
 
@iroegbu Oh yep, forgot the )
 
0
Q: Cannot edit more than the last message with the arrow keys in chat

Second RikudoIt seems as though I can no longer use the ↑ key to edit message older than the last one. I can still edit it by going to the menu and clicking edit, assuming the time limit hadn't passed yet. Is this by design? If so, please consider reverting it, I really liked that ability.

Anyone else experiencing this? ^
 
no
 
@SecondRikudo
 
@AlmaDo Link?
 
8:53 AM
why?
 
@AlmaDo Why what?
 
@SecondRikudo link?
 
@PeeHaa Try editing anything other than your latest message
 
I mean - it's a well-excuse for bug ;p
 
@AlmaDo You say it's status-bydesign, I clearly remember the original behavior. Do you have a link that says where they changed it?
 
8:58 AM
Works for me @SecondRikudo
bar
 
With the arrow keys?
 
yep
 
Browser?
 
Win7 Chrome 34.0.1847.137 m works for me — PeeHaa 28 secs ago
GRATZ @DANLUGG!
 
@PeeHaa last message works, but older doesn;t?
or does it?
Oh it works here too win7/opera/firefox
 
9:02 AM
not last
first
^ works
 
morning
0
Q: Why this warning when i pass a function as an argument in PHP?

detravellerI got the following code from a blogger on the internet. This makes the product images unclickable(previously you could click on them and they would open taking you away from the products page) add_filter( 'woocommerce_single_product_image_html', function( $html, $product_id ) { if ( has_post_t...

 
@Ocramius Ping ping ping
 
@dops That's a nice blue box you've got there.
I've destroyed one just like it the other day. The owner said he came to stop me from taking over the world, silly thoughts, silly thoughts indeed...
@AlmaDo Yeah so it means it's a bug, and I'm affected
Noeezzzzz :(
 
9:38 AM
just earned 10 bucks
 
@MikeM. Street corner?
 
nope
 
@MikeM. Sold your best friend?
 
Some class mate needed help with a few lines in C# so I helped him and he just gave me 10 bucks...
 
9:41 AM
4 beers
 
mhm
beer is 1 1,50
+ 18+
so ye about 6 beer :)
 
10 bucks == $10?
 
@MikeM. 1.50???? O_________o
 
9:58 AM
10 bucks == €10,-
 
hai..
 
you know you've done something wrong when the script your are testing crashes your dev machine :D
@SecondRikudo you only think you've destroyed it ;)
 
How can I pass an array to execute() in php
$query = "INSERT INTO `details` (`name`, `email`, `pass`) VALUES(':name', ':email', ':pass')";
$params = array(":name" => $name, ":email" => $email, ":pass" => $pass);
$result = $connect ->query($query, $params);

public function query($query){

$stmt = self::$db->prepare($query);
$this -> result = $stmt->exec($params);
self::$db = NULL;
return $this -> result;

}
can I do this??
this is not working for me
 
@dops Oh, I've destroyed it. The sun shut down and I had to restart it with a Shinju-dama
You're all under my eternal dream, so none of you noticed.
@Arun Don't quote parameter placeholder.
 
@MikeM. that's almost 9 beers here
 
10:09 AM
 
@DanLugg No, No it's not
 
lol
0
Q: Using @Embedded / @Embeddable with Doctrine 2.5 and Unique Constraints

Jimbo Doctrine 2.5 allows @Embeddable and @Embedded annotations - giving developers the ability to create Entities alongside Value Objects. If you are using composer, as of May 2014, you need to have: "minimum-stability": "dev" in your composer.json to use it. I have a Server entity, and I'm tryin...

 
Composer & vagrant, I love you!! Moved to a new laptop. git clone myrepo; composer install; vagrant up 10 minutes up and running!! fantastic.
 
I've never used vagrant
 
Do; it is awesome
 
10:19 AM
I thought it was just for virtual machines, which I never need to use
 
I do all my development on vm
 
^^ I do too.
Though, I don't use Vagrant either; I should.
 
All the cool people do :)
It took me a few days to get to grips with, but it is well worth the effort. Composer and vagrant are a match made in heaven.
git, composer and vagrant are my holy trinity :)
 
how to express a future date as the php time() format
 
@GigaByte568 strtotime?
or better DateTime
 
10:26 AM
@Fabien Uh, my birthday is in February HAPPY BIRTHDAY TO ME!
 
@DanLugg So you're getting old twice faster? :P
 
for example, how do I determine the equivalent of June 1, 2014 in php time() function...
 
@Leri I reckon I must be.
 
@GigaByte568 var_dump((new DateTime($dateAsStringWithValidFormat))->getTimestamp()); and in general RTFM maybe?
 
ok thanks leri. :)
 
10:31 AM
@GigaByte568 You're welcome and in real world don't dereference like that. It's really unreadable. I just wrote oneliner.
 
^^ Nah, nothing wrong with that if you really only need the timestamp; if the object is completely transient and unused later on.
 
@DanLugg Unreal Engine 4 + Happy Birthday then!
 
$timestamp = (new DateTime($string))->getTimestamp(); is perfectly readable.
 
@Leri I do it all the time.
 
@hakre lol, really, it is in February.
 
10:35 AM
@DanLugg, @vascowhite, there are situations where you need to var_dump instance of created DateTime instance (debugging purposes) and you have to extract to local variable then. Well, generally, I am against dereferensing and chaining.
That does not mean I don't do that though. ^ :)
Nothing is worse than being lazy. :D
 
I'm not talking about var_dump. If I only need the $timestamp, then why have a reference to a DateTime kicking around for no reason? It'll GC immediately.
 
hey guys, do you know someone who is 14-year old and already has a website?
 
@Leri You don't need to write 3-address code yourself; that's why we have a VM ;-)
@GigaByte568 I'm 12, as of today. It's my birthday.
 
and you have a "built-from-scratch" website? wonderful
 
Interestingly, I'm actually 29, and don't have as many "built-from-scratch" websites as some 14 year olds.
 
10:40 AM
@DanLugg but do you know one?
 
Anybody has experience with videojs.com and knows whether it is worth investigating?
 
@GigaByte568 Yes and its source is piece of sh*t, relies on deprecated functions and is/should be on free host I don't remember credentials.
 
@DanLugg Their websites are crap though. They look nice, because they're templates, but there is ZERO engineering going on behind them.
 
:D
 
@GigaByte568 Why, might I ask, do you care?
Wait... I just re-read the star board; lol that was a quote from a derpy user!
 
10:44 AM
I'm currently developing my site, which is gigabyte.heliohost.org (a free web hosting, don't have money; not much interesting but I'm developing it still) , but it is somehow, made from scratch (aside from jquery). And honestly, I'm 14 years old. Just asking so that I'll know someone who's the same from me... :)
 
Well then keep at it man you whipper-snapper.
 
I also need help on the design, want to make it pretty much attractive to the users. Any suggestions on how to make it more attractive to visitors?
lol
 
@GigaByte568 Hehe, I met my old one. Keep doing what you're doing. As an advice start reading books (technical, for sure) if you have not already. it-ebooks.info is pretty good resource.
 
thanks leri. that's a good resource, aside from stackoverflow, w3schools and php.net (and of course, the other references and docs)
 
@GigaByte568 Forget w3schools and youtube (unless it's linked from here :P) as a learning resource.
 
10:50 AM
lol. is w3schools really that bad? i learned much from it...
 
Yes, erase w3schools and much of what you may have learned from your memory.
 
lol. maybe 85% of what I have learned came from w3schools. lol
 
@Leri Yeah, I've had to refactor for that a couple of times too. I do like the occassional one liner though :)
 
It used to be a lot worse, IIRC, but even still; learn from official docs.
 
@GigaByte568 Yes: [...] it was quite large mistake because despite the fact that I gained some programming experience I also gained quite large number of bad practices. The number of bad practices is so much that your knowledge is near to useless or even dangerous (security-wise).
 
10:53 AM
hey guys does anyone know how can i get some data from mysql like for example grab a post that was posted by someone else and grab that posts comments also but this would be like 10+ posts with each having more than 5 comments?
 
Hire a developer?
 
use mysql_query() to find the data and if that results to 1, use mysql_fetch_array() to fetch the data
that's what I do
 
*BZZT* Don't use mysql_anything.
 
SELECT b.id, b.from_user, b.dateadded, b.posttype, b.posttext, b.photoname, b.blahchoice, b.commentschoice, b.mood, c.defaultphoto, d.firstn, d.lastn, e.status
FROM b
INNER JOIN c
INNER JOIN d
INNER JOIN e
INNER JOIN f
ON b.from_user = c.user_id
AND b.from_user = d.id
AND e.friend_ids = b.from_user
AND b.id = f.topostid
WHERE e.status = 'Friend'
AND e.user_ids = 1

ORDER BY b.id DESC
this is what i have right now
 
10:54 AM
@DanLugg why?
 
@GigaByte568 mysql_query never returns 1
 
@GigaByte568 No, mysql_* is deprecated use either mysqli_* or PDO
 
@GigaByte568 Have a look at the documentation page.
 
PDO is better and secure
 
But I do use an outdated php version, is that still safe? i don't think so... lol
 
10:55 AM
@GigaByte568 Have you read any of the PHP manual?
 
@PeeHaa I mean if(mysql_num_rows(mysql_query("#yourquery#")) == 1)){//some code}
 
so can anyone help me lol ive seen querys with group key word but i dont know what that actually does
 
@ThinkkSo You could always ask on SO, if you have a focused question.
 
i don't ussually get a boolean, only just when I forgot to create the database
 
@ThinkkSo You could look it up in the mysql manual.
 
10:58 AM
lol
 
@GigaByte568 Why would you do that? Not all queries result in a single record you know :P
 
@GigaByte568 Short answer: Don't use mysql_* anymore. Long answer: Don't fucking use mysql_* anymore.
10
 
@GigaByte568 Seriously, read the red box: php.net/mysql-query
 
i was sorta thinkking i could get that answer quick lol
i see why he usually does with that query returning boolean
 

« first day (1318 days earlier)      last day (3646 days later) »