« first day (544 days earlier)      last day (3244 days later) » 

user652649
1:32 PM
talking of logger classes, my log() method is: log(string $message, string $moreDetails = "", DateTime $dateTime = NULL) // if dt is null then NOW is used
 
user652649
i don't remember why i wanted the datetime customizable
 
user652649
apparently i never used it, i always pass null
 
@WesleyCrushed This implies it can be refactored out.
What's the difference between $message and $moreDetails?
 
user652649
message is a short message (the title), details full details about it (like a backtrace)
 
user652649
@SecondRikudo means it's a good thing?
 
1:36 PM
Why are more details a string if you are possibly going to use it for a stacktrace?
 
@WesleyCrushed Means it's pointless to have that logic in the log method, and it can be left out.
Also ^^
 
user652649
so are you saying that log() should allow any data type?
 
user652649
like arrays for a stack trace?
 
@WesleyCrushed No
Actually now that I've said it I'm not so sure anymore :P
 
user652649
it's just for convenience
 
1:40 PM
If you want it to expect a string fine. But if you also want to log stacktraces a string is "useless"
Because the instantly kill any structure you pass when it is a string
No sane way to parse it later
array -> string == easy
string -> array == harder
$0.02
 
user652649
actually i'm not using it much so i never figured out the actual needs
 
user652649
but i used it with a function that makes a backtrace human readable
 
user652649
like
 
user652649
$logger->log("Houston....", DebugTools::formatTrace($exception->getTrace()))
 
@WesleyCrushed That means you are tightly coupling DebugTools to the class where you are logging (not the logging classs, but some other class that has nothing to do with logging)
 
user652649
1:45 PM
$debugTools-> OK? :D
 
There is no way to switch you current formatTrace implementation to some other one (i.e. json, xml, array)
 
user652649
i'm trying to get rid of static! just give me some time! :D
 
You have your dependencies the wrong way around
 
user652649
?
 
Moment. Let me setup a gist
 
user652649
1:47 PM
instead $message is just "a title" for convenience
for example i use it like this in one of the loggers:
file_put_contents($this->dir . $this->sanitizeFilename($message) . ".htm", "<html>...." . $message . $moreDetails . "</html>");
 
user652649
@SecondRikudo ^
 
What you are doing is this gist.github.com/PeeHaa/…
With no way to use some other formatter
 
user652649
i don't do that
 
user652649
i got your point
 
user652649
2:02 PM
no maybe i didn't get your point
 
user652649
but at the moment i don't have JsonLogger
 
@WesleyCrushed Exactly. Which is my point
;)
 
user652649
i have LocalFileLogger LocalDirLogger TwitterLogger EmailLogger NullLogger
 
user652649
data is always handled as string
 
user652649
no matter if it's actually html or xml or json
 
2:05 PM
It is now, but in the future you suddenly realize you need json to push to some service
 
user652649
i didn't ever put much effort in it. how should i improve it?
 
Now you have a problem, because your formatter doesn't do json
:P
 
user652649
lol, i didn't see they were two different gists
 
:P
 
user652649
yea clearly that is wrong
 
user652649
2:09 PM
atm i use DebugTools occasionally, i just print the backtrace once and remove the call from the code
 
user652649
i should use a proper debugger
 
hehehe yeah that might help :)
 
user652649
public function log(String $title, Scalar|Array|JsonSerializable $data)
 
Or just mixed ;)
 
user652649
and what if i want to allow "any" type
 
user652649
2:14 PM
like $logger->log("Exception", new Exception())
 
user652649
i need to register a formatter for each type
 
user652649
like
 
user652649
$logger->registerFormatter(Exception::class, new ExceptionFormatter);
 
Yes. That would be one way
 
user652649
2:16 PM
i don't like mixed :D
 
user652649
i'm always very specific about type hinting
 
user652649
* @param int[]|float[]|string[]|bool[]|NULL[]|___Stringable[] LOL
 
Obviously it is a tradeoff, because you loose strictness (and introduce possible problems)
 
user652649
id like to have the "scalar" keyword in phpdoc
 
@WesleyCrushed * @param mixed ...
 
user652649
2:19 PM
mixed doesn't exist :D it's a php's fantasy
 
it's Hammer Time !
 
user652649
luckily i don't do int[]|float[]|string[]|bool[]|NULL[] too often
 
user652649
2:35 PM
@PeeHaa
how about different formatters for the same "type" ?

$logger->registerHandlerFor(iLogger::TYPE_STRING, iMyDomLogger::TYPE_XPATH, new XPathFormatter());
...
$logger->log("Element's xpath", $dom->getXPath(), iMyDomLogger::TYPE_XPATH); // hints the string type

bad, is it?
 
user652649
$logger->registerHandlerForClass(iXPath::class, new XPathFormatter());
$logger->log("Element's xpath", new XPath($dom->getXPath()));
 
user652649
@PeeHaa you there? say i pass to the log() method a class that implements both JsonSerializable and Serializable
 
user652649
would you do with the registerHandlerFor() method to use the wanted formatter?
 
Yes. Sorry was reading something
 
user652649
i don't know what i'm doing lol
 
2:46 PM
@WesleyCrushed can't you just find out the type instead of having to pass it to the function?
 
user652649
i mean if i pass a string i should "hint" the type, say i have a formatter for generic strings, then a formatter for strings that are also valid urls, and a formatter for any "virtual type" that is based on raw strings
 
Yeah true
 
user652649
$logger->log("foo:bar:hello", MyLogger::HINT_URN);
 
user652649
$logger->log($order->getTotal(), MyLogger::HINT_MONEY);
 
user652649
looks complicated
 
2:49 PM
@WesleyCrushed Why would you ever need to hint for something like money?
 
user652649
just making a random example
 
Your example sucks :P
 
user652649
ahah
 
:D
 
user652649
well the url example was valid
 
2:50 PM
More serious. For a logger I wouldn't care one bit if a piece of data is a urn or money or whatever
I just log it
A urn can be stored as plaintext so store it
 
user652649
@obiNullPoiиteяkenobi robocraftgame.com/report-a-player
 
played 4 game and every time killed by hacker (rail gun cool down hack)
If anyone wants ownership of my RoboCraft account ping me (i want to get my life back ) 66 Level + t8 bot
 
user652649
ok step forward, will do just Scalar|Array|JsonSerializable
 
user652649
@obiNullPoiиteяkenobi give them some time man
 
user652649
2:56 PM
they are updating the cheater spotting engine
 
i(noob as hacker ) can hack that game in 2 minutes ... dont know how they will fix it :D
 
user652649
@PeeHaa one final question :D since we talked about it i'm refactoring my shit a bit. which would you implement?

class JsonLogger{ function __construct(LoggerStorage $writer, .......) } // implement by type

class MysqlLogger{ function __construct(LogDataFormatter $formatter, ...........) } // implement by "storage"

class Logger{ function __construct(LoggerStorage $writer, LogDataFormatter $formatter, ...........) } // separate all
 
user652649
yea but don't pin it :D nobody cares about robocraft here
 
3:04 PM
looking
@WesleyCrushed The last one
 
user652649
i didn't notice you were removed as room owner @obiNullPoiиteяkenobi
 
user652649
we tried to do some clean up but we ended up re-adding all those removed to the list again
 
That way you allow yourself to use a) the storage you want and b) the formatter you want
 
user652649
lol
 
user652649
3:05 PM
yes @PeeHaa will try to make it now
 
user652649
@PeeHaa not automatic post, it could be:
!!tweetlaststar
!!tweet messageid
 
@WesleyCrushed That didn't make much sense. Use the !!/help command to learn more.
@WesleyCrushed That didn't make much sense. Use the !!/help command to learn more.
 
user652649
ahah before i got distracted and i forgot to tell you that just after @SecondRikudo finished his oop lesson, @Mr.Alien instantly ragequitted and on my tray's appeared "@Mr.Alien is now playing counter strike"
 
user652649
:D
 
user652649
also, @PatsyIssa played 19 hours of Civilization Beyond Earth, and game was put up for sale about 24 hours ago hahaha
 
user652649
he did better than @rlemon
 
lol
15 for me :/
 
user652649
yea i know lol
 
i had to goto the gym and bank and grocery store yesterday
and have more running around to do today :/
 
user652649
3:33 PM
honestly, is the game good? because you guys often say WOW BEST GAME EVAH but then you stop playing it after few days
 
it's pretty good. like all civ games
it's a new spin on techs and npc's
and it seems to me the AI is much smarter
and overall the 'wait' between moves seems better
 
user652649
@WesleyCrushed and you switch back to robocraft (evil laughter)
 
Dieting sucks :?
Exercise I don't mind. Dieting on the other hand...
 
user652649
3:48 PM
do you have a t8 bot?
 
user652649
i'm entering a boss battle with the planet express ship :D
 
user652649
if you want to join xD
 
No, T7 is my highest.
 
user652649
4:09 PM
i lost the boss battle xD
 
user652649
creative bots are weak
 
user652649
@PeeHaa doesn't make much sense that separation, i mean... why would one log something to an email using the serialize() formatter? need to think about it more :P something is missing
 
@WesleyCrushed I think monolog is decent if you are looking for inspiration
That registry thing in there is godawful though
 
user652649
lol
 
But the project is trying to solve the exact same problems as you are facing
 
user652649
4:20 PM
will look at it
 
user652649
4:35 PM
and how about the datetime parameter? do you think it's convenient to have it?
 
user652649
log(string $message, string $moreDetails = "", DateTime $dateTime = NULL) // if dt is null then NOW is used
 
user652649
like for reading third party logs and use the original timestamp
 
I think I would rather decorate a "normal" logger and add the option for custom timestamps in there
 
user652649
k :D do you use destructors or shutdown function for logging things?
 
@WesleyCrushed Nope
 
user652649
4:42 PM
k and anyway
 
user652649
> trying to solve the exact same problems as you are facing
 
user652649
i wasn't having any problem till @Mr.Alien started to talk about loggers
 
user652649
xD
 
hehehehheeh :P
 
user652649
but thanks for your help :) also @SecondRikudo's
 
4:43 PM
Also problems in this case means more problem domain. Not actual problems with your code, but more talking about the problem domain
 
user652649
yes. also logger is very generic and defining a domain is tough
 
That's why I always start simple and expand when needed
 
user652649
wise words :P
 
user652649
5:23 PM
 
user652649
5:48 PM
walking dead this night OMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMG!!‌​!!!!!!!!!!1
3
 
user652649
6:00 PM
OMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMG
 
posted on October 26, 2014 by Mary Lou

Coolors * Owl Selector * AngularJS * Web Components * Awsome WPO * Canvassing * Hybrid Mobile Apps Collective #139 was written by Mary Lou and published on Codrops.

 
6:44 PM
@WesleyCrushed yeah :D
good evening
 
user652649
evening
 
@easwee evenings
 
finally home - been doing geocaching 2 days :D
 
@ZachSaucier hi
 
6:46 PM
I spent two days in GA mountains with friends and talking to God :D
was awesome
 
what did he say?
:)
jk
nice to find some peace
 
can tell you in a private chat if you'd like
 
nah - no worries
heh only 3 working days this week
than holiday!
 
lucky you ^
 
user652649
 
6:50 PM
@WesleyCrushed crazy guy
 
user652649
the gif wont load
 
user652649
so you have imaginary friends
 
user652649
you talked with god?
 
6:52 PM
hello
 
yes, but if you'd like to discuss it further we can move to a different chat
 
!!> Array(42).join('OMG')
 
@WesleyCrushed He talked with me, haven't he?
 
@CSᵠ "OMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMG‌​OMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMG"
 
user652649
i promise i respect everyone's opinion but YOU TALKED WITH GOD??? @ZachSaucier :D
 
6:53 PM
I've answered several times, yes.
 
can you recommend me a guide on fixed time delays? i failed at trying setTimeout @ setinterval..
 
user652649
master troll ^
 
who wants to speak with me?
 
user652649
GodKA?
 
need anything my Son?
 
user652649
6:54 PM
world peace thanks, and a cake
 
Stop bitching about god people. That is offensive!
That is god ^
3
 
@WesleyCrushed i'll send some cake along your way first thing on Monday
 
user652649
gg god
 
@PeeHaa offensive can't be the word
 
I said it so it is true
 
6:58 PM
indeed @PeeHaa when you say things they can be evaluated to boolean true or boolean false
 
:P
 
user652649
@easwee robocraft went totally bad
 
user652649
tons of cheaters
 
user652649
and they don't even care to get spotted
 
user652649
you enter a game and you and all your team mates get killed in 10 seconds
 
7:09 PM
@WesleyCrushed heh the cheats spread fast
any idea on what we could play until they fix it somehow?
 
user652649
@easwee you mean some different game?
 
user652649
anyway cheaters are mostly on T8
 
user652649
so far they aren't polluting T7 much
 
@WesleyCrushed yeah
hmm
well T7 is fun
I get way more kills and money in T7 than in T6
weird
 
user652649
lol
 
user652649
7:12 PM
yea t7 was a successful tier also for me
 
user652649
instead my t8 bot is not as successful as the t7 one, need to use stronger cubes
 
Evening!
 
@IonicăBizău yo!
 
morning
 
How many of you heard about Polymer Project? I found it today. Really nice project!
 
7:19 PM
@IonicăBizău I have heard about it and some people seem to think it's the best thing since sliced bread. Me personally don't understand it, so it is probably good
 
@PeeHaa same here - I've seen it but I don't understand how could I benefit from it
 
We will probably use it in a company project. :-) So, I will check it out.
 
I would have to read a bit more on it - so it' something like web components packed with design?
 
@easwee I know @levimorrison has converted some stuff of php.net to it to dick around with it. And he really seems to love it
Not sure what it is exactly though :P
 
well I do understand Web Components and that they are not supported yet, this seems to be like a jquery + jquery UI for web components
 
7:23 PM
@IonicăBizău it's a very cool looking reinvented wheel
 
I'm simplifying myb too much
only problem with pre-designed frameworks is that they pay off only when making administration interfaces - for main website it's often way too much style overriding that it's faster to write from scratch
 
MLM
Is there a way to style differently depending on the flex-direction? It seems the adjacent sibling selector doesn't handle it :/ (I assume this is impossible though) jsfiddle.net/Ld0s0q1f/1
 
@WesleyCrushed ^
 
@WesleyCrushed ^^
 
flexbox makes me nervous to work with
so much different properties doing the same cross browser
 
user652649
no you can't @MLM you need a class or something
 
@easwee The is how I describe web front end development
:P
 
hehe I don't blame you
it's a good description
 
MLM
@WesleyCrushed Thanks for the link, too bad it isn't available now
 
7:32 PM
.foo {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: horizontal;
  -moz-box-orient: horizontal;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-flex-direction: row;
  -ms-flex-direction: row;
  flex-direction: row;
}
I mean - wtf is this sphagetti
 
Holy flexbox batman
 
@WesleyCrushed but are you prepared?
 
@easwee Isn't there also a o- prefix for good measure?
 
user652649
@crypticツ OMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOM‌​GOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOM‌​GOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMG
 
no - opera dropped presto - they use webkit now for a long time
so you can drop all -o- prefixes
 
7:33 PM
ah right. Always forget that
 
user652649
@easwee yea you can't use older versions of flexbox
 
user652649
it's pointless
 
unless you want to support opera 12
 
user652649
you just need the standard one and the -ms- shit
 
yeah - I only use flexbox when I can write just the "official" syntax
 
user652649
7:34 PM
@easwee or netscape 4
 
don't use it for commercial projects
@WesleyCrushed :D I have Netscape installed
haha
 
user652649
i have too
 
was trying SO chat from Netscape last day - works almost perfectly
 
user652649
it's just incredible that it still works on win7 eh? :D
 
few styling problems
good software :D
 
user652649
7:35 PM
netscape 4? lol
 
user652649
it must be netscape 9 or something
 
checking version
 
user652649
because netscape 4 didn't even have css in it
 
yeah 9
:D
netscape was the first browser I ever opened a website in
 
user652649
netscape9 is firefox 4 ish
 
7:36 PM
I was around 8 and my parents sent me on a computer course :D
I still remember the first image I searched for
:D
 
Wrong room :D
 

« first day (544 days earlier)      last day (3244 days later) »