« first day (1140 days earlier)      last day (4034 days later) » 

18:00
hehe
how many rep before you can pin messages?
To that code I say - i.imgur.com/h9xA9.gif
3
user895378
@reikyoushin you have to be a room owner
user895378
So you'll have to convince someone who is to grant you the ultimate power ;)
@rdlowrey do you have min rep requirements for that or just convincing powers LOL?
user895378
18:05
@reikyoushin No ... I think it's more of a "you've been a regular in chat for a long time" kind of thing.
@rdlowrey ahh.. ic. long time means?
Does anyone know of any good YAML parsers that don't have loads of dependencies and let you parse a file without having to use static methods?
@reikyoushin 3 months minimum
@bwoebi ahh, and regular = everyday?
@reikyoushin not necessarily… but often
18:08
@bwoebi oh well. thanks! :P
lunch time. brb
@tereško refrection for initializig two spelling errors in three words? Nice!
@tereško In this case, does it make sense to pass the factory via DI? It's job is just to create the object which will parse the file
Oh, and I used ReflectionClass to make sure that an exception is thrown, rather than a fatal error.
As for creating the actual components, I have started working on it already. I'm trying to chalk out the commonly used components people need.
PDO is one, Logging is another, cURL maybe.
if( class_exists( $classname ) )
{
    return new $classname;
}
else
{
     $up = new Exception('onfg, this is really bad');
     throw $up;
}
@bwoebi i hate you too
@tereško I like $tantrum = new Exception; throw $tantrum;
18:18
that's a good one too
@tereško Fixed the autoloader.
calling class_exists() will also trigger autoloader, if second parameter is not defined
@tereško a bit nitpicking is always necessary
@bwoebi true
for some reason the gist editor is not showing the spelling mistakes
I'm still used to the Java way of things when it comes to Reflection.
18:21
@AshwinMukhija What's the Java way of doing things?
@tereško maybe because it's some special textbox with some overlay for highlighting etc?
it's some kind of WYSIWTF there
@bwoebi The hell is that?
exactly
those are usually implemented as editable iframes
18:22
@MadaraUchiha yes, it's the hell. (please notice the nsfw tag there…)
@tereško Or more recently, <div editable>
or was it content-editable? I don't remember.
details , details
@bwoebi That's what I don't get, what's so NSFW about it?
@MadaraUchiha the implementation. E.g. internal functions are language constructs.
or always two entries for every function: one with error suppression and one without
@bwoebi My C is about as good as my Spanish.
I don't speak Spanish.
18:25
@MadaraUchiha It's not the C. It's a bison/yacc file.
@crypticツ Don't think you are.
@crypticツ naah, he's just trying to be funny .. and failing
probably a language barrier , since he's from north carolina
@MadaraUchiha Object reflectedObj = (Object.class).newInstance();
Essentially, the way of creating the new instance. I find it easier to read to create a ReflectionClass to create a new object, via newInstance()
While new $class($args) is perfectly fine, it's not as readable as using reflection. Plus, you need to add error handling yourself.
@AshwinMukhija You can create a ReflectionClass just as easy...
Or am I misunderstanding where the issue lies?
18:35
@MadaraUchiha Basically, @tereško suggested that I use new $class($args) instead of using ReflectionClass.
@AshwinMukhija Well, that depends on what you need to do.
Guys - do you DI Exceptions?
@Jimbo What do you mean?
@AshwinMukhija If the only thing you require is to create an object with a set of arguments, then $class($args) is the way.
18:36
youtube.com/watch?v=VufilzHKTqk : music video about beer and LARP
If you need more fine tuned control, ReflectionClass is superior.
@MadaraUchiha Constructor argument, pass in Exception so that you don't use new when throwing it
Maybe I'm just tired... xD
@Jimbo No, Exception shouldn't be DIed
There's no point.
@MadaraUchiha Custom Exceptions?
@Jimbo Neither.
18:37
Cool
I knew \Exception wouldn't need it - it's available on all PHP platforms, just wondered for customs
Much like you don't pass in an empty array to fill it, there's no point.
pce
pce
$ php -r 'define("System", ""); define("out", ""); System.out.print("hehe - php the java way :D");
god damn node is taking its sweet time to compile
@pce btw. use const, that sounds more java-ish, lol.
pce
pce
@bwoebi btw. why does this not work? $day = (Day::class)::superStaticFactory(Day::FRIDAY), [new Color(0x0)]);
18:47
@pce Forgot the ending '
pce
pce
$ php -r 'const System= ""; const out=""; System.out.print("php speaks java");'
Nice.
@pce because the language doesn't accept a parenthesis_expr before a T_PAAMAYIM_NEKUDOTAYIM?
@MadaraUchiha Just removed Singleton behaviour from Conphig.
pce
pce
@bwoebi mmmhhh....could be, because this works class Day {} $day = Day::class; new $day;
19:18
@pce it might me a built in restriction to prevent collapse of spacetime
Anyone know a good library for parsing simple YAML files which does not use static methods?
> However, my biggest area of expertise is with PHP based web development, typically with MySQL DBMS systems, and I'm passionate about the Codeigniter framework and jQuery library for JavaScript.
pce
pce
@tereško woah, i didn't thought of magic built in's :)
@David yaml as pecl extension?
@pce The thing is though I don't know how many shared hosts have that installed
Do you think the majority would have it?
pce
pce
19:29
@David you could also use spyc's procedural syntax.
@BenjaminGruenbaum if thats a "technical lead in IBM" then I am second coming of Jesus and reincarnation of Krishna all rolled up in one sex combination
3
> We use waterfall and agile methodologies as well as a hybrid of the two.
@pce

function spyc_load_file ($file) {
return Spyc::YAMLLoad($file);
}

It is just calling the static YAMLLoad($file) behind the scenes
lol
@tereško all his other answers are just as horrible, in case there was any doubt.
I suppose I could just edit the source code and change it from a static method. I do not know why he has it as a static.
19:32
TheifMaster just deleted a bunch of his "answers" though.
@tereško He might be a technical lead in the IBM call centres, in which case he would be located in the land where cows are gods but not food.
> my biggest area of expertise is with PHP based web development, typically with MySQL DBMS systems, and I'm passionate about the Codeigniter framework and jQuery library for JavaScript.
hurrah for passionate CI!!!
@AshwinMukhija now, that's a definite possibility
<Indian accent>Hello, this is Ryan from New York, how may I assist you today?
> location: United States
19:35
I managed to crash my water kettle .. it begun showing 60°Cno matter what I pressed
@reikyoushin 'murica, I'll use whatever anti patterns and deprecated APIs I want fuck yeah.
pce
pce
@David maybe he|she|they had java background ;)
@tereško Time to install GDB on your water kettle
@tereško did you have backup? try turning it off and on again..
naah , rebooted .. all nice now
19:38
btw, should I be returning $this from the constructor? I know it is possible, but I'm not sure if it's the best practice
@AshwinMukhija why would you return $this from a constructor?
@AshwinMukhija this thing does not have wifi or usb options
@BenjaminGruenbaum for the case where he'd call the constructor explicitly via $obj->__construct(); :-D
@bwoebi what does that actually do?
In JS it actually has (some odd, debated, which I dislike) uses, you can use it to mixin things in.
it probably would "reset" the instance .. not that I have tried
19:42
@BenjaminGruenbaum that'd be a very normal fcall?
@bwoebi Does PHP have the same ability to do initialization and actual construction like Python? What I mean by this is that Python has __new__ and __init__ where you usually implement __init__ but you can also do __new__ which gives you control over actual creation and not just initialization.
@BenjaminGruenbaum UnknownLanguageException
pce
pce
@David in Java you could see static factory methods wikipedia factory_method
@pce I do not get why they have to be static though. I have factories too but I don't build objects by calling a static method
@BenjaminGruenbaum no, you'd have to do some dark magic via debug_backtrace() or similar
19:46
@bwoebi tbh I never used it in Python.
Building an object by calling a static method, while not optimal is not as horrible as most static things. However if you've already extracted creation logic into a factory because you have logic there - why make it static? It's less testable.
So, it does not make any difference. 3v4l.org/bSHdS
@BenjaminGruenbaum Yeah I agree. I do not like when I see a library that people say is good for a certain task and then it is full of static methods. It makes me lose a bit of faith in the person who made the library
@David static methods are not really that horrible in small to medium code bases if they don't have considerable side effects - static properties on the other hand...
I would be using that spyc library now if it was not for the static methods putting me off. I will probably just have to use it because I sure as hell am not going to create a YAML parser
@BenjaminGruenbaum Would you put class constants as static properties?
@David most likely not. Although again, constants don't bother me nearly as much.
19:54
I use class constants. Even though they would be considered sort of global
But at least they can not be written to/mutated
@David the problem with class globals is testing.
pce
pce
@David they are helpers only, you can also write:
` $spyc = new Spyc; $array = $spyc->load($file);`
@BenjaminGruenbaum Oh right I never saw that somehow
All my bad talk about it and then it was actually me just being blind
20:09
> Transfer ******.com $0.98
zOMG BLACK FRIDAY
@webarto where?
@reikyoushin namecheap hurry up :)
Last hour it was 50% off SSL.
@webarto but renewals are still 10.69..
if it was recurring i'd definitely take it >:)
@reikyoushin I think domain renews when you transfer it :)
Total $2.32 $26.29
for 2 domains :)
@webarto then wait for next year on another registrar and transfer again? LOL
20:17
@reikyoushin Seems legit :P
@webarto what would you do with 64MB ram and ONLY 10GB space?
besides vpn..
@reikyoushin Think they don't allow VPN or something like that :)
I bought VPSDime the other day, 6GB RAM for $7 a month.
@webarto that's on my list..
Cool :) BUY ALL VPS' :D
i have at least 20 bookmarked VPS companies here. haha
20:21
LOL
"Private & Secured VPN/Proxy usage is allowed"
@webarto it looks like this
Hello
Anyone could clarify what are the exact differences of having a class, and an abstract class?
@IvoPereira You can't make an abstract class.
And you can't declare functions to be abstract in a real class.
e.g.
class AbstactClass {
     abstract function getInfo();
}
class RealClass {
    function getInfo() {
       return 'stuff';
   }
}
@IvoPereira To force you to implement functions for the derived class.
It's basically a way of setting up a contract that the derived class has to fulfill, while still allowing all the classes that extend the abstract class to share some functions.
er - and obviously "class AbstactClass" should be "abstract class AbstractClass"
@Danack and RealClass should extend AbstractClass :)
21:07
why are webGL books written by people who shouldn't be permitted to write JS !?
known .. some Romanian guy
its the same user LOL oh its not
sorry @tereško >.<
anyway good you're here.. i'm looking from the logs about which book i have to read before PoEAA that you gave me
i need a wishlist for this secret santa thing in the office and i'm thinking of adding that on the list.
what you need to understand before diving into PoEAA is: SOLID principles and common oop patterns
that should enough for the first reading
amazon.com/… i think i found it, is it this one?
21:13
and don;t expect to understand PoEAA on first try
@reikyoushin that's the one I used for learning about patterns ... seemed ok
i mean is it this book that i need to read before PoEAA?
forgot it's Friday :\
stopped counting since I'm jobless :D
let's go :D
@reikyoushin "need" - no, but I would recommend it
@webarto my german is really not where I would want it for using it on daily basis
@tereško i'm still looking for the book you recommended me to read before PoEAA.. pfft still searching the logs
@webarto then for you everyday's friday friday friday!
@reikyoushin that IS the one I recommended for you
but there was no "must" about it
21:19
@tereško English is "official" too. You could catch up on non-technical thingies.
@tereško oh? okay then.. bookmarked. i thought it was some other book. if it will make PoEAA less intimidating then it is a must read.. :P
Who the has hell introduced a day to be the last one of the week? Can't the whole day be always end of a week? :-/
Stop talking against 'muricans or you'll get locked up :P
@webarto nah! :P
21:22
@bwoebi because Freyja needed a day
@webarto I'm already on enough watch lists, so it won't matter.
4 hours ago, by reikyoushin
user image
@bwoebi ^-- that girl..
@tereško no, gods don't need days
@reikyoushin no.
@bwoebi Máni's day , Týr's day , Wodan's day , Thor's day , Freyja's day , Saturn's day , Sun's day
@tereško Awesome.
When I had job and when I lost job.
21:31
you poor thing
I'm so american.
@tereško Who needs gods :-(
with your previous level of income, you should have been set for year or so
@Jack Coding on a friday - ftw.
@Danack I'd like to code… but I'm stuck on a goddamned logic error I just can't find where it is…
21:32
@webarto you wear the same.. :P
@reikyoushin Yes, I'm the same man, cars don't make a person :P
@webarto nah, not the car, its the shirt.. >:)
@reikyoushin >:)
basically, what he's trying to say is:
you're full of shit
@bwoebi that grammar file made my nose bleed a little :)
21:35
@tereško Yes I am :P
@Jack :-) It's tagged ;-)
And rightfully so @bwoebi :)
@tereško do you want any book that's not ~ $100 :-) ?
@HamZa Was going to offer 200 on it :(
21:38
@MadaraUchiha oops :(
@webarto if someone could find me a free torrent for it, it would be even better
No matter
@MadaraUchiha I'm a bit poor compared to you :P
@tereško what's the name again?
@MadaraUchiha You can put your 200 after this one expires :)
21:39
Btw, I deleted 10 useless/repfarm answers the last 2 days. More to go !
Hmm I would say checking connection_status() might be the best bet.
@HamZa Note that that triggers an auto-flag, take it easy.
@Jack That needs to be fixed :)
@webarto what does?
@MadaraUchiha they were my answers. I also have a limit of 5 per day
21:41
@webarto "Structured design", and only reason why I am interested in it is because it was mentioned in this panel: youtube.com/…
omg youtube.com/… shoppers freaking tore open the steal security shutters like it was aluminum foil =oO
@HamZa I know, it triggers an auto-flag when a user self-deletes X posts on Y time.
@MadaraUchiha heh, I posted a comment on it :P
@Jack Sorry, can't word it correctly :\ That "hack" to "work out of the box"...
21:43
@crypticツ my condolences. You live in a country, that is populated by greedy infantiles
@webarto It's hard to tell without seeing anything of the code OP is using.
/* trying to call us1.php.net/manual/en/generator.throw.php */
$ php -r 'call_user_func(["Generator","throw"]);'
Warning:  call_user_func() expects parameter 1 to be a valid callback, class 'Generator' not found in Command line code on line 1
What's going on here? :o
@bwoebi You can't actually create an instance of a Generator
Is there even a static Generator::throw() method?
calls from incompatible context
@MadaraUchiha I was expecting some warning: Strict Standards: Non-static method Generator::throw() should not be called statically, assuming $this from incompatible context in Command line code on line 1
@bwoebi What does php --rc Generator say?
21:49
@bwoebi But then again, you can't create an instance of Generator, which makes sense.
@Jack Exception: Class Generator does not exist
Right.
@MadaraUchiha I makes sense, just wanted to see if I could circumvent something there :-)
And yet you were surprised that it didn't work? ;-)
@bwoebi bool(false)
21:50
@Jack well, didn't look at source to check if Generator really isn't added to the EG(class_table) HashTable :-P
hehe
in Bitcoin, 3 hours ago, by Syed Arsalan Hussain Shah
How to know my bitcoin account ?
lxr.php.net/xref/PHP_TRUNK/Zend/zend_generators.c#719 … that confuses me, need to dig deeper
@tereško seems impossible to me :) hope this won't sell until christmas :) link
^-- I like how he says that md5, sha1, ... all performed better than password_hash :D
21:53
@NikiC :D I was asked in interview the other day, which one would you choose, md5 or sha1 :D
@webarto I'm actually planning to order one from the first salary if i get that new job
@tereško and when is that? :)
@bwoebi uh, maybe you're using the wrong version? :P
@NikiC oh, damned
probably in january
21:54
wrong tab
I should be in the tab with the ssh…
@NikiC I have also tried Php 5.5 new Password Hashing but that's a bit CPU load increasing if there are symontaneous 1000 users sign in as shared server hosting. lolwut.
@bwoebi FYI zend_register_internal_class is what adds it to the class table ;)
not the INIT_CLASS_ENTRY ;)
@tereško Cool, I hope I'll get job too by then :D I have some money on internet and I think it will add up to $90 soon.
@NikiC yep, true………
@webarto I'm not surprised lol
@webarto what did you answer btw?
21:58
@bwoebi That's kind of the point, isn't it?
password_hash being slow and all?
Depending on the cost factor it may open up the system for DoS though heh
@zerkms Both: sha1(md5($password)). This is safe because it's his own algorithm and the attacker won't know it ;)
@NikiC why to use well known hashing algorithms then?

« first day (1140 days earlier)      last day (4034 days later) »