« first day (800 days earlier)      last day (4139 days later) » 

7:00 AM
@Charles check this stackoverflow.com/… its worse
 
Heh. Yikes! Why are they still using mysql_ functions anyway
 
@Gerry they still thinking world will end before 2013 ....
 
@Gerry Because every one of the thousands of "how to learn php and mysql" tutorials on the internet use them, and it's impossible to delete bad content from the net.
 
@NullPointer true @Charles and true
 
or they are not aware that mysql_* function are deprecated and removed in php 5.5 version and cause E_ DEPRECATED warning
 
7:03 AM
@NullPointer Unfortunately I've only had about a 30% success rate with the notice.
 
looks little less ...
 
OT: Hmmm I've really gotta create a script for safely merging all my keepass* databases. I think I've accidentally created 6 forks by now due to all the various machines/remote syncing software I've used. Oops
 
user image
3
Gravity Glue: The Art of stone Balance by Michael Grab
Gravity Glue is an ongoing satellite project designed to
record and share by Michael Grab‘s art of Stone Balance
3
 
@NullPointer That's very nice. I've seen something similar but I don't remember it being that impressive.
 
@Gerry yup.
i love research
 
7:15 AM
@NullPointer I'm currently looking at other ones. Quite amazing.
 
this is really awesome
 
its hard to convince to people to shift to mysqli
specially companies which they have custom built orm on mysql extension
 
Considering how much of a pain mysqli prepared statements are, I wouldn't wish it on most of my enemies anyway.
 
Release a new version of PHP that has something they want which only works on mysqli/pdo. The will convert quick enough.
 
I mean, seriously, the binding by reference alone is enough to grind my gears, no less the way you have to make the function call.
 
7:24 AM
@Gerry company will stick with versions like 5.4 but not shift to 5.5 jst bez of the mysql being depreciated
 
@NullPointer among the coolest things i have ever seen
2
 
Yeah, I don't really understand mysqli either.
 
Wow, I didn't realise there was so much confusion surrounding it.
 
@Jack looks like you are newbie ...lol... you need to read this w3schools.com/php/php_mysql_intro.asp ...lol
 
@NullPointer don't link w3schools, even as a joke :(
2
someone might read it later and take it seriously :/
 
7:26 AM
SHUN!
 
@Lusitanian w3school was joke ... in my comment ..
 
@NullPointer i know :) -- just pointing out that someone might read it and think it isn't, and that'd be dangerous for our profession
 
@Jack check this out devzone.zend.com/239/…
mysqli is good
 
@NullPointer It seems like you're trying to suggest stuff from w3schools ... you should totally drop that and use nodejs :)
 
should be used
 
7:29 AM
@Jack I give up on shunning trollish comments and will join in.
 
@Jack lol
 
@Jack I think you should use a combination of CakePHP and CodeIgniter!!!1
 
HAY GUYS I JUST FOUND THIS THING CALLED SMARTY
</choke>
 
We'll call it Cake Igniter ... it serves cookies too :)
 
@Jack lol...
 
7:30 AM
I've called it CakeIgniter in here :D
Aug 17 at 19:19, by Lusitanian
@rdlowrey i'm going with CakeIgniter for now
 
hehe .. precognitive
 
:P
CakeIgniter, the latest PHP framework. So bad, it literally sets your cake on fire.
 
user image
4
 
hahaha
 
Which hat is this guy having:
BalusC, Willemstad, Curaçao
344k 45 547 819
 
7:33 AM
Pixels.
 
Winter bash hat!!!
 
I call pixels!
 
@Charles LOL
 
@RakeshJuyal that guy edited gravitar instead using hat from so
 
If I didn't know better I'd say he photoshopped it himself
 
7:33 AM
@NullPointer lol visit his profile page, He got one nice hat.
 
@RakeshJuyal it's called the bushido
you get it if you get the necromancer badge
 
meh, i like me crown =D
 
59 secs ago, by Jack
If I didn't know better I'd say he photoshopped it himself
 
To hell with your crown, the little bow tie fits my total solar eclipse perfectly. :p
 
necromancer?
 
7:35 AM
what do you think of an ORM written in C
 
answer a question 60 days old with a score of 5 or more
 
@meWantToLearn an orm written in C, a language without objects?
how would one use an ORM in C?
 
@Lusitanian Perhaps ORM in php extension?
 
7:36 AM
@Jack possibility, that would be pointless just like that phalcon php framework though
 
the logic operations will be done in C
 
Why would you ORM in C when it's hard enough to ORM in PHP?
 
its not hard to develop an orm in php
 
To hell with ORM. I've been working on a little evil serialization library.
 
7:36 AM
I maintain that there is very little point in an ORM library. Write a datamapper that's specific to your application and your objects
 
@Lusitanian Laruence created his yaf framework as php ext though .. i heard its not bad
 
@Lusitanian check if you get that hat
 
much lighter, etc
@Jack hm
at least it has a good name
 
i have no idea what the name means lol
 
yet another framework
 
7:38 AM
yeah okay that makes sense ...
allegedly the fastest framework in the west & east.
 
it's still a framework :)
implies many things you probably don't need for most apps
 
unless all your apps are the same :) or rather, very similar.
 
mmhmm
 
has anyone experience with writting C extensions for php?
 
Morning
 
7:43 AM
i think a few years ago i wrote one that provided a hello_world function
that always said hello world
and that's about it
never felt the need
 
i want to export it a standalone extension
having problem over there
 
Hi all
@Jack ping
 
Hello
 
@Baba pong
 
7:57 AM
@Jack how are you doing
 
I've worked on OAuth extension ... that was fun :)
@Baba meh, on half day today though =D
 
@Jack cool ..... :) am home
I wonder what kind of people are online this morning
how cal all answers be wrong ?
0
Q: return values on or condtion in php

SRIRAMI have two functions which will run based on a conditon. The code is like $contact=($this->function() or $this->function1()) public function() { some codes return contact; } public function1() { some codes return contact; } It returns me bool true or false in $contact. I want ...

 
> ($this->function() or $this->function1())
That's a very profound piece of code.
 
function is a reserved name in PHP and you can not call it like thus->function()
@Jack don't tell me you can not see that
 
see what? nothing to see ... cos ... it's not php =p
 
8:03 AM
lol
Its PHP and tagged PHP
 
/names
 
it's not php ... it's rubbish.
 
:)
 
1
Q: Parse many small strings or a single big string - which is faster?

caiosm1005In a scenario where a large number of strings must be parsed with regular expressions, considering the same RegEx needle will be used for all tests, which would be faster: To test each string in an array, individually, or; To concatenate everything into a single big string and test just once? ...

Without reading my answer, what's off in the question? :)
 
lol
 
8:11 AM
Initially I read past his findings and focused on the fact OP was using time() to do the benchmark, but while I rewrote his code into my own benchmark I actually fixed a major bug in it ... heh
Which is why I think it's a good idea to write a benchmark extension for php :)
like jsperf
 
I think both benchmark is flawed :)
 
lol
care to enlighten me?
 
OK let me modify your code .... one moment
 
wouldn't it be easier to explain in words? :)
 
Switching Positions affected the results
as soon as that happens ..... the bench is flawed
 
8:18 AM
switching positions .... ehhhh, not following.
 
your test case must all return the same results with_str === with_array
 
it does ... they're both null :)
 
lol
Just give me one moment pls
 
but yeah i sort of get what you mean ... to get to the same result set you have to do something more ... right?
 
like now implode('', $StringArray) was out if the benchmark
 
8:21 AM
the array version still needs a couple of array_merge() operations on each result.
 
yes you must make sure the function both has same output before you can say they are the same
 
@Baba No no, that's intentional. The imploded string is the input
 
then test their performance
@Jack that is cheating
am almost done with my one own benchmark
 
@Baba not really .. the question is whether to provide arrays to search through or a string.
 
1.To test each string in an array, individually, or;
2.To concatenate everything into a single big string and test just once?
 
8:23 AM
I suppose the benchmark is as flawed as the question heh
 
lol
:)
this never tested the result right
preg_match_all($re, implode(" " ,$arr), $m); and preg_grep($re,$arr); are not given same result
thats not a fair benchmark
 
@Baba Yeah I realized the unfairness :)
 
@Jack it can still be improved :)
 
@Baba well, I've updated my answer to something much shorter; I'll leave the benchmark tweaking to the OP :)
@Baba Improved in what way? OP mentioned that it's language agnostic, so not necessarily php ;-)
 
Am testing my benchmark now would sent the link to you when am done
I know this has nothing to with the OP
just you and i playing around
 
8:35 AM
hehe okay
have you by any chance had some education in statistics?
 
am not interesting in the question ... micro benchmark is lame
yes
 
trying to pull together a benchmark that can calibrate itself .. i.e. no need to specify the number of iterations.
 
you can .. but it depends on how you are calling the test function
 
so if you're willing, would be nice to have a second brain to crack it :)
i basically need to figure out a statistically sound way to determine the number of iterations required to obtain a significant result.
 
Which question is that ?
 
8:38 AM
mine :)
 
link
 
it's not on so
i'm asking You
:)
 
ok
what kind of result
 
of course, i could ask a question, but i'm not sure whether it would be seen as a pls send teh codez or off-topic qn :)
 
because determine the number of iterations
that are 1 billion possibility
Iteration can be looking for Sum Of Subset
 
8:40 AM
@Jack what be said question
 
Coin Change
 
unless you've already had it answered :)
 
Knapsack
Combination
that's too wide
 
@Baba what i mean is, how many time samples does one need to obtain a significant result that can be used for comparisons.
@Baba No, it's not an optimization problem
 
@Jack it depends let me give you 2 examples
comparisons in addition .. you need only 2 samples
 
8:42 AM
given two functions, both with the same inputs and same outputs ... how would you determine the number of iterations required before you can say: a is faster than b
 
I would run it once
check % percentage diff
 
-____-
 
then you that to determine possible iteration range
 
@Jack hmm, i can think of how i'd do it but i'm sure from a CS perspective it's completely wrong (:
what are you benchmarking?
 
@Jack ok look at my own version of your benchmark eval.in/5225
can you see what i did ?
 
8:45 AM
@Lusitanian anything, everything ... have you used jsperf before?
 
am alternating the call of the function
this would give a better comparison that calling function A
get time and calling function B get time
note that the function name length are also the same
they would both return same value
this works for this does not mean it would work for other models
 
If both functions are uncorrelated, alternating them shouldn't give a discernable difference imo.
 
@Jack i have a few times
may i ask, btw, why this is so important?
if it's so hard to tell which one is more performant it seems to me that it shouldn't matter which you'd use
 
@Lusitanian Because performance questions on PHP need a good benchmark platform :)
 
@Jack thought there were a few
 
8:48 AM
Of course, it could be argued why php and performance should be mentioned in the same sentence, but that's another story lol
 
@Jack over time ... PHP has not been reliable .. this method works best
 
@Jack and yeah that's a good question (:
 
@Baba can you prove it? :)
 
@Jack Just because it's 4 am (nearly) and I can't sleep
gonna try putting something together
 
@Lusitanian if there are benchmark solutions out there, do let me know.
i'd be interested heh
 
8:50 AM
@Jack yes
try a benchmark on file system
 
show me .. now we're going meta, benchmarking the benchmark :)
 
the second function always benefit from cache of the first
 
@baba Easy enough, before the function is called you run clear_stat_cache().
We're not going down to OS level btw ... because, unless your files are really big, the OS would have cached both in the same way :)
 
@Jack benchception
 
@Jack where would you but the cost ? Would you be able to ganrate that the system resources used in A is what is Used in B .. don't forget PHP is not the only one using file system
 
8:53 AM
@Lusitanian
> Warning - visiting this web site may harm your computer!
 
@Jack which web
i like to visit
 
@Jack was not recommending finding a website with that name lol
 
@Baba What @Lusitanian said :)
 
INception ---> BENCHception. bad inception joke
 
@Lusitanian dewd~ o.0
 
8:54 AM
lolwut
 
haha
 
:)
@Jack imagine a benchmark that takes about min 10min each
 
That's highly unlikely, but go on.
 
A starts and ends 12min
B Start .... and Windows updated starts , Or antivirus is updating or a system schedule task starts
 
@Baba Ah, excellent point.
So ...
 
8:56 AM
you can never get the actual time for B
 
That's why I need additional logic to factor those differences out.
 
so rather than have 1000 iteration for A and 1000 for B
have 1000 then call A & B
this way even if the system resources is affect .. the would both share time loss
 
@OlegOrlov Nope.
@Baba Alright, point taken .. so lets start with that :) interlaced testing.
@OlegOrlov Pretty much.
meh ... 5.5 should be good though, can't wait to play with generators =D
 
@Jack interlaced testing would not work if you want to test how long does it take to delete certain resources
how do you share it BTW both A & B equally ?
Now can you see what i mean by
it depends on what you want to benchmark
 
@Jack you can already, lol
 
9:01 AM
@Baba hiya,,,,
 
delete resources?
 
there is no universal way
@NullPointer ... hi Something has Changed
@Jack yeap
 
@Baba what's the scenario?
 
@Baba i changed my gravitar ..:)
 
0
Q: Check if there's an URL between span tags

ScottI got a HTML code containing following: <span rel="url">example.com</span> <span rel="url">example.net.pl [SOMETHING]</span> <span rel="url">[SOMETHING]imjustanexample.com</span> [..] The question is, if there is a way to get the "url" string from between sp...

look at the comment thread
 
9:04 AM
@Jack delete entire folder and its content from children
@NullPointer i need to be sure you are the same person so i'll ask a few question
 
@DaveRandom y u here
 
and a good morning to you too
 
:)
how are you?
 
@NullPointer ... In what year & month did @NullPointer know who is called Chuck Norris ?
 
@Baba I probably wouldn't allow fopen or other file op calls in the benchmark, but how would that scenario affect things?
 
9:05 AM
some of us have jobs, we can't all be lazy ass students like your fine self
 
@DaveRandom good morning
 
could be better, could be not at work...
 
@DaveRandom Merry whateverthef*ck btw
[that goes for anyone who celebrates chrimhanukawanza]
 
Let's go with Kwanzaa
 
9:07 AM
I don't see how the mandatory draining of my bank account every December is cause for celebration, but hey...
2
 
@DaveRandom That's why I hid my credit cards this month.
 
@Baba lol
 
Then zapped my brain.
 
I don't want to be all scrooge or anything, but bah! humbug!
 
(nevermind, answered own question, really should go to sleep)
 
9:09 AM
@NullPointer ..... you are trying to Google it right .. you can not impersonate my friend :)
 
Dec 7 at 8:29, by NullPointer
who is Chuck Norris
lol...
 
bloody kids with their... mumble mumble... misery all round and... mumble mumble... don't even like Turkey
 
@NullPointer lol
 
@NullPointer He's the guy who's gonna come kick you ass for saying that
 
@DaveRandom Work off today?
 
9:11 AM
@DaveRandom lol....
Dec 7 at 8:30, by NullPointer
user image
 
0
Q: Understanding continuations using JavaScript

Aadit M ShahI've been browsing all over the web in search of enlightenment about continuations, and it's mind boggling how the simplest of explanations can so utterly confound a JavaScript programmer like myself. This is especially true when most articles explain continuations with code in Scheme or use mona...

omg, wall of text!!
 
@Lusitanian Nope :-( Only in til lunch though
 
@DaveRandom make sure to use lots of php 4 :)
 
:-P
ffs I suppose I'd better actually put my computer on the new domain at some point, I keep opening the wrong shared drive, going to fuck something up by doing it on the wrong server at some point
 
lolwut
 
9:20 AM
Put a new box in a few weeks ago, and the previous domain was so badly set up that I just started from scratch
but after I'd migrated all the machines I totally couldn't be arsed with my own
still can't
but I'm going to have to do it at some point
 
lol
 
good mornings :)
 
damn i am sleepy :d
 
hullow
 
sleeping only 3.3 hrs a day :(
 
9:29 AM
better not operate any heavy machinery then.
 
has any of you guys ever worked with (zzee phpexe)[zzee.com/phpexe/] before?
@jack my keyboard is not that heavy :)
i am having trouble with codeigniter using zzee
 
Hi there
how to get New Year's Eve Hat?
sorry wrong room T_T
 
@JosuaMarcelChrisano By coming in here on NYE and saying something interesting
 
@DaveRandom When the NYE come?
 
9:41 AM
@PruthviNag Looks kinda interesting, but seems like maybe you should learn a real Windows GUI dev language... using PHP for this is definitely square peg -> round hole territory
 
is it now?
 
@JosuaMarcelChrisano Dec 31st
a week today
 
i found a basic solution to prevent my sql being sql injection by someone.
$q = " SELECT * FROM main WHERE id > " . $_GET["id"]. ";";
to prevent it add
add mysql_real_escape_string($_GET["id"]);
is that right @NullPointer ?
 
@GeorgeLim It really is quite important that you learn about and use prepared statements. There's a reason everyone keeps banging on about it...
 
9:45 AM
@DaveRandom PHP...all of the things.
 
@GeorgeLim mysql_real_escape_string('1 OR 1=1') = '1 OR 1=1'
 
@DaveRandom actually we already developed the webapp and our boss changed his mind and now wants a desktop app with the same functionality. Since the customers we seek may not have an available internet connection so i am trying to search for alternatives.
 
@Lusitanian Jack of all trades, master of none.
@PruthviNag Bosses who change their minds that late on in the process can either a) piss off b) wait for you to rewrite the whole thing again, properly or c) both of the above.
IMHO
 
@DaveRandom now's the part where someone comes in and suggests .NET because "SAMELANGUAGEONSERVERANDCLIENTYEAH"
 
9:49 AM
@DaveRandom hahaha ikr and also he do consider hiring a c# developer. If i don't find any alternative.
 
@Lusitanian I believe I said "real Windows GUI dev language", not "I am a twat I am a twat I am a twat". I admit the spelling is similar.
 
@DaveRandom just lol'd . BUT WHAT CAN YOU GUI BESIDES WITH .NET WINDOWS ON?!1
 
but since the company i am working for is a startup company so nothing to loose except time.
 
@Lusitanian Yay for foxpro!
 
@Lusitanian with java you can! but my boss doesnt like java :d
 
9:52 AM
haha i know
okay, here's the thing
if your boss "doesn't like" the best tool for the job (not saying java is, in fact it probably isn't)...
then you may want to find a new job if that lack of affection for a particular tool precludes you from being able to do effective work
 
I'm sure I'll get lynched for saying this, but I kind of like Java in a weird way. It's shocking for web dev but it's quite nice for desktop apps, especially if you want interop
 
@DaveRandom will be quick to point out, rightfully, that accepting employment advice from a seventeen year old is like accepting driving lessons from a six year old who can't bicycle yet
@DaveRandom nah, I don't mind java at all -- I just think it's strange that it's so popular for web development
 
lol
 
@Lusitanian i might consider switching next feb :) but learning process is very high in a small company.
 
close the database connection when you open once.
is that a way of security as well?
 
9:54 AM
not directly, you just don't want hanging resources
@DaveRandom what i do hate is that (expletive adjective of choice) Oracle owns it
 
@PruthviNag The things I see wrong with what you are proposing with that ZZEE thing are:
- it's PHP 5.2.5 based. Need I say more?
 
@DaveRandom looking at it topically, it's probably possible to change that [I looked at it too]
 
- It seems like somebody's toy project. Not something designed for a business critical app
> Built-in webbrowser is based on Internet Explorer
 
it is being designed for the business but only the management side of the app is completed.
 
if he really wants a desktop app, you shouldn't be writing it in PHP
there's absolutely no reason to
 
9:57 AM
> The program uses ISAPI (not slow CGI) interface for optimal performance
^^ evidence that whoever build this has no bloody idea what they are talking about
 
well i go read some laravel source :)
 
@DaveRandom
ogodlaravel
literally
according to laravel, one of the reasons you should use it is
> ALL THE COOL KIDS ARE DOING IT
 
I really don't understand why people still embed IE hooks, not when Chrome is so easy to bastardise
 
quoth their homepage
 
lol
 
9:59 AM
@DaveRandom I used a Firefox control when I still programmed in Visual Basic 6. No Excuses for IE.
 

« first day (800 days earlier)      last day (4139 days later) »