« first day (758 days earlier)      last day (4189 days later) » 

12:01 AM
... and it's gone!
 
user1125394
@ShaquinTrifonoff ok thx and uninstall the default stable one?
 
@cyril I don't know, the distro that I was using didn't include Chromium by default.
Uninstall if you want to.
 
user1125394
o which distro?
 
It's quite a nice one, based on Ubuntu.
 
user1125394
there's this browser http://en.wikipedia.org/wiki/Midori_(web_browser) by default
 
12:14 AM
I know, I didn't like that browser much :D
Hi, @It'sYourFault.
 
hey @ShaquinTrifonoff
 
0
A: Notice: Undefined variable: title in E:\xampp\htdocs\blog4\new-post.php on line 11

Shaquin Trifonoffdb.php: <?php $db = new PDO('mysql:host=127.0.0.1;dbname=db_name_here', 'username', 'password'); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); ?> new-post.php: <?php include 'db.php'; if(isset($_POST['submit'])) { $query = $db->prepare('INSERT INTO posts (title, bod...

 
user1125394
small url flaw :p
 
Well, it's still the best URL-detection system that I've seen.
 
user1125394
12:28 AM
elementary OS = nice website at least
 
user1125394
you are on Luna?
 
Yeah, the unstable one.
Someone put their DB password in their question :P
0
Q: SQL query dependant on result of another in php on the same page

Matthew DuttonI am trying to write a query that gets a list of trains from my database, the user will enter the real name and the first query will get the code for the station or 'tiploc' and then use it in the second query. For some reason i am not getting anything back, I am certain that it is to do with dat...

 
Someone edited it, but it's still in the revision history.
 
(I had forgotten until I looked at my profile and saw my age was wrong :O)
 
12:40 AM
:O
 
Ooooh, it shines and excites :-D
 
;D Makes you feel special.
 
...it may be time for me to go to bed. I just wrote basically this:
if (condition) {
  $var = true;
} else {
  $var = false;
}
 
If I told you I am going to make a website just like this SO, what would be your initial reactions? Would you just laugh out like crazy?
 
@DaveRandom my birthday present $var = (bool) condition :D
I guess it is time for me too... (bool) lol... although with PHP, you never know :D
 
12:48 AM
@user1079641 I'd say it would take a very long time.
 
@webarto JS is even more fun in that respect, the result of stuff || otherStuff is unlikely to be a boolean unless you are testing two booleans
It brings about the hateful !!(stuff || otherStuff). readability--;
 
@ShaquinTrifonoff what makes you say that? Is creating a question and answer website too hard?
 
@webarto (bool) lol is true: codepad.org/jrcO7ty5
 
I've written about 100 lines of JS code in past few hours, and have seen a lot of WTF's... but I'm probably noob.
 
@user1079641 Making one just like SO is hard.
 
12:51 AM
Hello :)
 
@webarto Javascript is full of wtfs
 
@ShaquinTrifonoff Yes, but condition should be always with boolean return... e.g. 1 > 2 == false...
 
is it possible to check if URL has www, when web has sub domains, and subdomain could be www :D
 
@DaveRandom And it if fun, when it works :)
 
@DaveRandom I had a screen failure, it took me a few days to get a new screen :-)
 
12:53 AM
@ShaquinTrifonoff, well, SO is overly complicated and I far away from making anything like that. Just a question answer website, SO format, Yahoo Answer's style :D
 
@user1079641 A simple one wouldn't be too hard.
 
Oct 25 at 9:17, by DaveRandom
var test = Number(1);
console.log(typeof test); // "number"
console.log(test instanceof Number); // false
^^ that's a good one
 
:D
 
@Jocelyn Don't worry, I was just throwing unjust accusations at your countrymen
 
@webarto check what I did to the main post: benlevywebdesign.com/wordpress
 
12:58 AM
I wrote 1000 lines of code for this shit and it ain't working... I'm not in the mood now :)
 
^ lol
 
@webarto What are you actually doing? What's not working? Me wanna go fixy fixy
 
1:16 AM
@DaveRandom Alright Dave mate, i.imgur.com/DWfAR.png I'm trying to follow redirect by "injecting" a new Client into $_clients, and that goes smooth, but I don't think that Client is executed, etc. I'm fucked up somewhere. But... it is your birthday :D
I know you are going to tell me I'm insane and should not fiddle with this crap etc.
© Intarmationel petants pandieg All imitetians will be prasecutad
I've totally stolen this :D
 
OK without properly examining what that does, that switch (true) is a needlessly verbose way of writing switch ($httpCode) { case 301: case 302: ... break; default: ... break; } and you are assigning the result of print_r() to a var without passing TRUE to the second argument
 
@webarto That was on a manicure set my GF got for free from somewhere, it tickled me a great deal
 
why do i always have those stupid programming idea that are hard to implement ?
 
Engrish at its best :D
@tereško Because you are smart :D
 
1:21 AM
s/smart/arrogant
 
@tereško and the idea is?
 
the implementation is a game concept , but idea itself is a quite specific visual interaction
hard to explain
short version is : it is a game , where i learn javascript
also .. i have been watching the Lone Star Clash tournament .. but it's kinda in the background
 
@webarto Nothing leaping out at me from that little bit of code, can you post the whole thing or no...?
 
hehe that explains teresko in game dev room. I was just wondering about that.
 
what about if I got my date like this
 
1:26 AM
@tereško lool :) for such a smart and arrogant guy, i thought you were fluent in Javascript :D
 
define: "fluent"
i know nothing about: promises, canvas and sockets ... and this project covers all of them
 
@DaveRandom dropbox.com/sh/j4i6dh16ii6ob19/ZGgIRL_WE8 Application.php line 58, basically, "injecting" a new client doesn't work, I'm thinking that loop exited because I removed clients one by one bla bla... I suck at this.
 
Would it be illegal or against the law to name a website similar to or same as another website?
For example, "Buzz"
There is Google Buzz and Yahoo Buzz
If someone creates a website with the name "Buzz," would it be wrong?
 
If they haven't patented word Buzz, probably not. Depending on product too. That is lawyer thingy, they can flip everything.
 
you can't patent the word buzz I don't think so.
 
1:37 AM
I don't so too.
 
that remind me this one : clientsfromhell.net/post/5457948986/… :)
 
Its like you can't patent your name
like I can't patent "Ben"
 
Yup :) Basically if you want to have a piece of someones fame, you are going to have a bad time.
You are not Foogle or Yoohoo.
 
@draconis which reminds everyone of cybersquatting...
 
@DaveRandom I fixed it, I don't what have I done. I don't need git, I said, it will be simple, I said... i.imgur.com/ynqE0.png OK means it is OK.
 
1:41 AM
I am not trying to get anyone's fame, just asking if I have to use that word, will I get sued?
 
@webarto what did you think of the date connected to the post like above ^^
 
@user1079641 No, fuck 'em.
 
@webarto Well, good that you got it working, but that architecture is a bit wtf if I'm honest. It really needs splitting up into at least a couple more classes to abstract the HTTP layer from the sockets layer, and you could do with implementing (the way I see it) 3 queues, namely "connect pending", "request pending" and "response pending" (possibly "request pending" can be trashed)
 
I think it would look cool like that just thinking it over
 
@DaveRandom what architecture? :) Yes, I need at least 3 classes, and lots of cleanup, proper implementation would take some more time. Pending (Done OK|Following) Pending etc... Thanks :)
 
1:46 AM
@webarto Is this just a playing around type thing or do you have an actual work/school requirement for it?
 
@DaveRandom managewp.com/jobs/senior-web-developer This is my friend, we had an argument, and because we don't fist fight, we had a bet :)
This job is opened for a year or so...
But I'll for sure need ASYNC shit, e.g. site5.com/support/current-status
 
@webarto ...interesting...
 
I built notification system for ticket support/helpdesk, and trying this Pusher thingy, because I don't want to depend on my websocket server, it will probably fail at some point and that is not nice... Pusher for my needs is $20 per month...
 
naming question nevermind
 
^ :D
One cannot force length header to be returned?
If that is body length, I'm guessing strlen would suffice.
But I'm sending HEAD request, so...
 
2:04 AM
@webarto Content-Length: should always be 0 if you send a HEAD request. No, you cannot force the server to send a content length - but if you send Connection: close, the server will drop the connection when it has sent the response, problem solved.
 
HEAD $client->path HTTP/1.1\r\nHost: {$client->host}\r\nLength: 0\r\nConnection: close\r\n\r\n
Content-Length, right. I'll replace this ugliness.
Q: Is it possible that magic_quotes are somehow forced to be On? I'm having strange issue on server and it hasn't been there before i.imgur.com/8diZE.png
 
@webarto check what I did to the blue date banners, I think I like it!
Ok going out for a while bbl
 
Whoa, 3AM... dude.
 
haha bye
 
2:29 AM
ok ... guys .. i need a clever loop: 4, 5, 6, 7, 8, 7, 6, 5, 4, (end)
 
O_o
 
@tereško split it in 2 loops, one increasing, and one decreasing
 
@tereško A bit nasty but foreach (array_merge($array, array_slice(array_reverse($array), 1)) as $i) {}
Probably pretty inefficient though
 
@DaveRandom actually it's f(x) = 8 - | 4 - x |
or in JS: for ( var x, i = 0; i < 10; x = 8 - Math.abs( 4 - i++ ) ) {
 
@tereško Damn you and your maths...
 
solved with a pencil =P
oh ... miscalculated
i actually need : 0, 1, 2, 3, 3, 3, 3, 2, 1, 0
i think this cannot actually be done
 
3:02 AM
Do you guys think a website like twitter would be successful?
 
It is already successful.
@tereško What are you cooking? :)
 
hexagon map
 
@webarto, I mean another website like twitter. Would it be successful at all?
 
No, not at all.
 
Why?
 
3:13 AM
What for? :)
 
yeah , like that one
oh ... fuck , i am stupid
i again forgot that i am using angled hexagon instead of flat
 
It is OK to be stupid at 4AM, and genius...
@tereško i.imgur.com/NKbR6.png Do you know by chance, why does script wait for previous batch to finish, when they are not related. I mean, each batch is separate XHR and is calling the same script (PHP).
Order inside batch is "random" because it is ASYNC.
f4c3b00k.com just press Check 3-4 times...
Maybe browser doesn't allow that...
 
no idea
 
Me neither...
I should bring sacrifice to Gods...
 
3:38 AM
I win... Example is the same, probably because PHP can't handle that or something. Here is a :beer:
@tereško If I get in bed in 5AM, how much do I need to sleep because of REM and everything? (shortest)
 
4 hours
REM period is ~2 hours , and two first iterations are the most important chemically
the rest of it is "defrag"
 
Nicely put.
 
with 6 hours you would actually be completely rested
as side note : the map is done
 
6 hours is a luxury, I have real work to do tomorrow. Well, good night my friend, colors are starting to melt, pixels are jumping...
Can you demo?
 
nope .. and tomorrow i plan to spend some time on the framework instead
 
3:51 AM
I'm watching that, nice work.
 
4:06 AM
hey
have you guys used JW Player?
 
4:38 AM
No.
 
 
2 hours later…
user895378
6:25 AM
Going to sleep, can't be bothered. If someone has a chance, please help this poor misguided soul:
 
user895378
1
Q: OOP: Composition and public property?

otporanSo lets say I have a class that is composed of other classes. class HttpRequest { public $session = new Session(); // .. the rest of the HttpRequest code } Now, I want to have access to Session class through HttpRequest class so Im using composition. But does this breaks laws of OOP Encapsulat...

 
goodnight, and good morning all
 
 
1 hour later…
7:53 AM
goodmorning all
 
 
1 hour later…
8:56 AM
morning
 
Guys, quick advice: How do I diagnose excessive caching on a client's website? Seems caching on the PHP side itself was disabled, and I've explicitly set headers to disable caching on the client side.
I've also checked the headers I receive on the browser side - no caching specified whatsoever.
 
any joomla dev's here?
 
However, PHP does have a couple of extensions which might contribute: ZendOptimizer, SourceGuardian and ionCubeLoader.
 
hey ah! quick question: if i provide my web app with tokens and want those to be time limited, lets say an hour, would it be cool to refresh the site automatically after 1h?
so that the user get new tokens
 
@designer What if the user is just editing something?
 
9:10 AM
@designer I think some service do precisely that, especially banking systems.
 
Also what's the point of 1 hour token when you update it either way
 
@PeeHaa i know, but its just annoying cause i wanna give them my tokens a short time span
 
Might as well refresh it on each request
the token that is
 
If it were me, I'd do a reload of said tokens transparently through an AJAX call, which updates the cookies.
 
i use Session to store tokens
but i guess i could do something like that hmm
 
9:11 AM
What kind of tokens are we talking about?
 
It's easy: setInterval(function(){ $.post('?renew'); }, 1000 * 60 * 60);
See, no page refresh required.
 
@Christian too much juqery -1 ;)
 
XSRF
@PeeHaa
 
@PeeHaa jQuery? Who mentioned jQuery? That's prototype/jquery/mootools/yourfavouritejsframework for you. :D
 
@Christian i see, could be an option definitely
 
9:15 AM
@PeeHaa Now remove that downvote, else I hax your accounts. Again. lol
 
;D
@designer Do yuo use a lot of xhr on your site?
 
morning .......
 
morning
 
Good moaning
 
@DaveRandom monring
 
9:23 AM
How are we all this morning, ladies and jellyspoons?
 
@PeeHaa not a lot, but some. Why?
 
@designer When trying to implement what you are trying to implement (i.e. updating tokens using xhr) is a pain in the ass
 
@DaveRandom good moaning
 
Anyone else noticed chat using a ridiculous amount of memory when you leave the tab open for a long time recently? I thought I'd screwed up with cv-pls but I removed it on Friday night and restarted Chrome and left it open over the weekend and I've come to my desk this morning and it was using ~750MB
 
PHP 6 actually exists?! I used to think it was a myth :P
 
9:26 AM
(maybe it's always done it, but I've only just noticed)
 
@PeeHaa yes i was kind of expecting it to be, i think in this app scenario refreshing the page is fine
 
@Christian Oh dear. Well they've presumably lost a lot of business because of that...
 
> ...PHP 6 (due out in 2008)
^_^
 
OK, I'm confused now. A book talking about PHP 6?
 
9:31 AM
@Christian The PHP6 trunk stalled a long time ago and was merged back into 5 and became 5.3 (IIRC), but by that point a lot of people were anticipating it and a lot of books had been published about it, and there were servers running builds off the dev branch. It looks like the company you linked haven't caught up with the PHP world yet.
 
@DaveRandom I was under the impression most hosting providers tend to use a PHP version at least 5 years old. I'm surprised these people even built the bleeding edge one from scratch.
 
It will happen one day, but not before 5.5 has lived its life at the very least. IMHO they should skip 6 and go straight to 7, releasing something under the umbrella of 6 would be very confusing to people who bought any of those books...
 
@DaveRandom Why not drop PHP altogether? I'd rename it AHP 3.0: Awesome Hypertext Processor version 3.0 (to coincide with Web 3.0).
 
*once again starts praying for scalar type hinting .... *
 
9:36 AM
BATCPURA: All the cool people use recursive acronyms.
 
@DaveRandom I still do not understand all the fuss with unicode support in PHP. I mean, mbstring has proven satisfactory so far.
 
@DamienOvereem Never gonna happen, by the looks of it. The PHP world is decidedly split on this point, but the nay sayers just say "If you want a statically typed language, go work in some other language" - and they do have a point.
 
@NullPointer -_- So a hosting company guarantees their script might work in PHP 6. Wow. Really.
 
9:40 AM
the second last was completely lol
 
@Leigh I'm not saying they weren't working on anything.... I'm just saying I don't understand the fuss around unicode support.
 
@NullPointer That guy is clearly an idiot. I mean you'd have though he would have bothered to read the page. It even gives you an option to choose PHP6 when you get a quote.
 
@DaveRandom To be honest i dont understand what the fuss is about .. function test($a, $b) .. no type hiting .. function test (int $a, string $b) .. type hinting..
The only reason they are not doing that.. is because they dont want to break backwards compatibility for people that implemented "Int" and "String" classes..
im just so tired of all the "if ( !is_numeric($a) ) throw .... " crap in most methods
I would personally even be happy with a php6-strict branch ..
 
@DamienOvereem I sort of agree, but the question is how do you handle invalid input? Currently if you break a type hint your get a catchable fatal error (which is a massive wtf in and of itself, but that's another story) but with scalar types what do you do? Do yo trigger an error or cast? What if it cannot be cast? (You try and convert an object to a float for ex.)
 
if they implement casting im going to switch to asp.. without the .net even
 
9:45 AM
@DamienOvereem Just cast input to whatever you want it to be, and if users break your API spec let them deal with the consequences. There's only so much anti-stupidity error handling you can do.
 
im happy when i get an exception when type hinting does not match
let them deal with the error instead
if they have to send an int, but send a string instead.. their functionality fails.. their problem
 
@DamienOvereem That's just the thing, you don't get and exception, you get a "catchable fatal error", which is one of the most ridiculous things in PHP IMHO.
 
well yes :) but we are discussing a future implementation.. one would expect to get rid of that piece of trash in php6 aswell
but you know.. even if they drop it all, i would be happy with Int and String objects
so $i = 5 = instanceof Int
that way function test(Int $i) would work too
only downside is echo $i would at best give a string "1" (if you implement __toString)
 
Hi guys,is there any joomla dev's?
 
@DamienOvereem Yes I have politely asked about the idea of __toInt(), __toFloat(), __toBool() et. al. before, and it sound like that'll never happen either.
 
9:54 AM
My position on PHP 6 hasn't changed:
Sep 6 at 9:04, by Paul
php6 should never exist, it would create too much confusion with all of the PHP 6 books out in the wild.
 
@srinu There are indeed, it wouldn't exist if there weren't. I doubt any of them are in here though... ;-)
@Paul +1000000
 
@DaveRandom Its a shame though. Because of all the backwards compatibility for idiots, php will never be really mature. They still try to keep people that mix html,sql,php together on one *.php into consideration.
 
Can anyone please breifly explain spl_autoload_register() to me.. In very simple words...?
 
@AlphaMale It allows you to define a function that you can use to include a file when you try to use a not yet defined class. (See the manual entry ). If you wan't more you'll have to say what you don't understand.
 
Guys I want to discuss a situation: I open a website and browse different pages, it works. And suddenly it stop working or take too long to open. I also captured a situation where I start a downlaod and browse again but it stops working, even the download is in progress.
What could be the problem.
 
10:07 AM
@cmnajs I'd look at the web server logs.
 
Going to check server logs.
 
What I really want to see in PHP is __toType() magic methods. Oh and a $func()-style syntax with arguments as an array (CUFA is just too slow).
 
Hello
 
hellloo @All
 
@cmnajs Are you using sessions by any chance? If so, go check out session_write_close() ;-)
 
10:18 AM
@DaveRandom how to send id to next view using checkbox in joomla component?
pastebin.com/9R19zkx2 this code i am using.
 
@Christian If they make if so that $obj->prop() works it will be a start... that pisses me right off. In particular there have been a few occasions where I wanted to give a class a method called list(), and it could be done with closures if that worked.
@srinu I don't know Joomla at all I'm afraid, sorry
 
Hello all.
how to send id to next view using checkbox in joomla component?
pastebin.com/9R19zkx2 this code i am using.
 
@Paul nothing unusual in logs, continuously getting data in access log. Erro log is very smart and only contains download errors (cancel download I guess) "2012/10/19 09:20:30 [error] 1083#0: *99016 recv() failed (104: Connection reset by peer) while sending to client..."
@DaveRandom I am not using server side sessions.
 
@Paul is this an alternate to singelton or something like that??
 
@AlphaMale No. It is instead of include / require.
 
10:27 AM
@cmnajs Next step then would be to take a look at the network traffic (TCP level) and see what's going on when you have problems. Is it a latency issue? Are you successfully sending a request and waiting a long time for a response? Are you suffering a lot of lost packets? If it's a latency issue or lossy connection, check yous connection and have the hosting provider check theirs. If it's slow response, it's probably a server load problem.
@AlphaMale It's like having (potentially) more than one __autoload() function.
 
@AlphaMale btw, singletons are evil in PHP IMO. They are a form of global state.
 
@Paul The China of the programming world.
 
108
A: Who needs singletons?

GordonSingletons have very little - if not to say no - use in PHP. In languages where objects live in shared memory, Singletons can be used to keep memory usage low. Instead of creating two objects, you reference an existing instance from the globally shared application memory. In PHP there is no such...

 
:6191722 I've been circumventing that with a mandatory $self first argument. To handle it transparently, you could do:


class Test {
    protected $on_a = null;
    public function __call($name, $args){
        $name = 'on_'.$name;
        $args = array_unshift($args, $this);
        return call_user_func_array($this->$name, $args);
    }
    public function on($name, $callback){
        $name = 'on_'.$name;
        $this->$name = $callback;
    }
}

function doHickyFunc(Test $self, $a, $b){
}
 
10:31 AM
^ that's just off the top of my mind.
 
singletons are definatly usefull
 
@DamienOvereem Useful: yes. Good: no: Avoidable: yes.
 
As with most structures and patterns, bad use makes it useless :)
 
user1125394
@ShaquinTrifonoff I fail to eable flash on this downloaded chromium
 
@Gordon What if PHP introduced an interprocess, non-volatile object mechanism? I'm not saying "use singletons", I'm saying that "if they're useful in situations like the one you mentioned, than why not go that route?"
 
10:34 AM
Give you a nice reason to use them: wordpress with soap backend. I have a singleton that obtains a list of products from my backend, but I do not have full control of all other plugins. Once the products are obtained, it doesnt have to happen again. Since i have no control of the order, atleast with a singleton i can make sure the soap request is only done once per request.
 
user1125394
@DamienOvereem globals are better
 
@DamienOvereem If you are using wordpress, design patterns are the least of your worries... :-P and SOAP?? Jesus, it's like you want me to hate your face.
 
....
did cyril just say globals are better ?
@DaveRandom kindof true :) But since I build my own plugin framework i can atleast fix that a little..
SOAP is dab omb :)
bloody REST lover :)
 
user1125394
globals > singletons > DI
 
besides.. the wordpress choice is a marketing thing :) They want easy seo stuff.. and i cant be bothered to build it for them :)
@cyril shiver ..
I definatly turn that around :)
 
10:39 AM
@DamienOvereem Sure, let's take XML, something that is already mind-blowingly complex, and make it even more complicated. I would rather use an API that required me to talk to it in Latin.
 
meh.. Zend_Soap_Server_AutoDiscover FTW :) its an internal communication, so my wsdl doesnt have to be all that strict
but with autodiscovery its easy and fast to add elements to my communication. Not to say that REST woulnt do the same, but in my case SOAP is much more manageable.
 
@DaveRandom looking into the situation as you suggested
 
@DamienOvereem In PHP just create one object, rather than a singleton. Code that uses singletons gets coupled to a specific class implementation. It is better to just inject a single object, then you aren't necessarily bound to a particular object (you could typehint for an interface or baseclass).
You can also inject mocks for unit testing.
 
@Christian because of the flow chart I attached to that answer. even in shared memory environments, Singletons are most of the time a bad solution.
 
@DamienOvereem That's we have to leverage the allowed backwards compatibility breakage in major version increments.
 
10:52 AM
@DaveRandom Did you see my example code above?
 
@Christian most people simply misapply Singletons. Having a shared memory environment does not automatically mean things should be Singletons. You use a Singleton if - and only if - kittens die when you instantiate a second instance of something and you need global access to it.
 
@Gordon OK, that's what I wanted to hear. I've never used them in such a way, so I don't know if they're good or bad, that's why I asked.
 
@Christian No I hadn't, but yes, I guess that works. I hate to use __call() but at the same time using closures to define methods isn't really any better.
 
@Christian it's an authority argument, but if Erich Gamma himself already suggests that their use is almost always a design smell, it should make people think. I mean, he invented the pattern.
 
@Gordon Surely DI can be used regardless? Why would you need access to something? When would you ever not know what dependencies a class has?
 
10:56 AM
@DaveRandom I would like to add that I am also getting server connectivity errors (timeout) in Google Webmaster Tools shows that it might not be issue of my ISP also I am using AWS(ec2 and elb)
 
Well, I think that regardless of the code smell factor, they are useful in situations where you can't do any better because the systems already pretty much sucks.
 
@DaveRandom it might happen in legacy code. Like when you cannot change the dependencies but need to extend something. or what do i know …
 
In other words, when you want things done and can't really rewrite the sh*t from scratch.
 
@cmnajs Timeout on establishing the TCP connection or timeout on a sendto() or timeout on receiving the response?
 
I mean, tasked with writing updating a system, I'd always put my recommendations on the table ("system sucks, we shouldn't make it worse with singletons"), but if at the end of the day the contractor doesn't care....well, it's better a bad pattern than spaghetti code, I think.
 
11:00 AM
@Christian I wouldnt call them useful in that situation. Just because code sucks, doesnt mean one should make it suck more. It's more like: ok, this sucks, but it's the best solution we can get short of refactoring/rewriting. If you have to use a Singleton to make Legacy work, you should be aware that it is Technical Debt.
 
@Gordon I'm not having a pop, I only very recently came to truly understand why singletons are bad (I always knew that they were bad) - I am only really now beginning to properly understand OOP in a practical way, because I am self taught and I started with shell scripts, so I still have a very procedural mindset. I'd be interested to see a legitimate use case for one, purely from an educational point of view.
 
@Gordon Slightly off topic. Would you help someone that asked you a singleton-related question in such a situation? I don't think you wouldn't.... but I think that most people around here wouldn't be as receptive...
 
@Christian sure I would.
 
@Gordon OK, we're on the same line here. Now, I'd like to point something out. What's the chance people asking about singletons here are actually writing a framework/app from scratch? I'm not insinuating anything...just trying to get a point across. @tereško ping.
 
> Discussion for all things PHP - Don't ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will. Please note: You Are Doing It Wrong (tm)
@Christian ^^ is that something like your point?
 
11:09 AM
@DaveRandom :D
 
There are many advantages in starting a framework from scratch
(performances, knowing all the code etc..)
 
11:27 AM
@magnetik there is also many disadvantages
 
11:37 AM
@magnetik That could actually work against you....doing it from scratch means you don't know the performance "tricks", you end up reinventing wheels, etc..
@Gordon *are :)
 
mornin
 
@magnetik Frameworks != perfomance
And not many people really know the code of FW's
Otherwise they would often look for better alternatives (also depends on the FW)
@tereško morning
 
@magnetik few month after writing something , you will NOT know all the code
if codebase is older then 6 month, it does no matter who write it
 
11:52 AM
hmm .. i have 499 helpful tags flags
 
@tereško flag the answer as not an answer to make it 500 and earn a badge
 
done
 
@tereško congratulations Marshall Tereško
 
tnx
actually i liked the old ratio system better
 
12:13 PM
@tereško Hi.
how to send id to next view using checkbox in joomla component?
pastebin.com/9R19zkx2 this code i am using.
 
hiiii any drupalers here
The two primary questions that I'm interested in seeing answered are:
1) Does provision provide and/or call any hooks at all, in currently stable versions or -dev versions?
2) Has there previously been a discussion about this functionality, in the provision issue queue, aegir forum, or elsewhere?
 
@PeeHaa $mostFrameworks === !$performance
 
@DaveRandom actually it should be $allFrameworks
 
@DaveRandom Except those with singletons. They're blazing fast. /me runs to the nearest air-raid shelter.
 
I mean by doing your "own" framework you know the limitations of what you implemented etc..
 
12:28 PM
@Christian Screw singletons. $GLOBALS ftw.
 
it is unavoidable, that frameworks come with a performance cost .. it only varries on how large the cost is
 
@magnetik I'm biased because I would rather have a library instead of a framework
 
@DaveRandom Most frameworks use globals anyway.
 
@PeeHaa what difference do you make between a librairy and a framework ?
 
thats how i use zend .. hate the framework, but i like the consistency of their classes.. so i just rip the classes
 
12:31 PM
@magnetik framework tells you how to do stuff. library are just some tools which you can use. At least that's my interpretation
 
@tereško : sorry, I don't understand what does language independent design pattern mean. — user1080381 6 mins ago
 
Viper7 is still down :'(
 
12:48 PM
@DaveRandom @hakre has found a new php5.4 codepad
 
good morning :)
 
morning @hakre
 
Oooh gimme gimme :-)
@hakre Good morning sir
 
eval.in is what @PeeHaa means I think ;)
 
Ah that;s the one :P
 
12:50 PM
@DaveRandom it is intercepting some syscalls, if that is what you want to look for ;)
 
Nice one, cheers
@hakre Nah, just stupidity testing a class, which basically just does string manipulation.
 
In MySQL, how would I select the last 3 entries in a table?
 
@Alec use ORDER BY and LIMIT
 

« first day (758 days earlier)      last day (4189 days later) »