Let's have a question from someone ...
Sean![]()
| SitePoint Sponsor |
Let's have a question from someone ...
Sean![]()
Harry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature





Alright!
Write a php script which (assuming no timeout) would take over one year to complete.
Rule:
You can't use a loop that will obviously always evaluate true. Example:PHP Code:while(1) { doSomething(); } //no good
Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?





Assuming no timeout
or am I missing something?PHP Code:sleep(5616000);
echo 'Done';
TuitionFree — a free library for the self-taught
Anode Says... — Blogging For Your Pleasure





I'll accept that!
I was thinking of something along these lines:
... but I purposefully wasn't clear.PHP Code:$source = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
preg_match('/a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*[b]/', $source);
// excution time = septillions of years
Your question, anode!
Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?





OK,
Describe a methodology(no code required, psudocode perhaps to illustrate a point) to program a Chess client in PHP. Difficulty levels are not required; the program is allowed to play to the best of its ability at all times.
TuitionFree — a free library for the self-taught
Anode Says... — Blogging For Your Pleasure
Crikey Anode that sounds just like a school project you may have been set! Are you being sneaky and trying to get people to do your homework?Originally Posted by anode
![]()





I haven't been in an academic environment in about 5 years![]()
TuitionFree — a free library for the self-taught
Anode Says... — Blogging For Your Pleasure





I'm going to have to second that"crikey"!Originally Posted by Egghead
Does this chess application need to be able to have strategy or does it just need to be able to follow the rules of chess?
Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?





Should have probably been clearer on that. Yes it does, that's why I mentioned that it should play to the best of its ability(I'm under the impression most chess clients work "subtractively" as far as difficulty levels, to borrow a sound synthesis term.)
TuitionFree — a free library for the self-taught
Anode Says... — Blogging For Your Pleasure





I had a feeling you meant that.
There's a relatively concise answer for this?
I ask because this seems kind of like something where I could think about it for eight hours and make some progress then walk to the bookstore and find that I have thought my way halfway through chapter one of a chess book, and there are 16 chapters, and each is twice as difficult as the last.
Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?





Well, I guess if you were planning on building a production version
I meant maybe 50-100 words, maybe with a diagram (if I were answering, I'd do a diagram) describing the high-level design of the system.
If you guys think it's too hard wussies, I can give the floor back up.
TuitionFree — a free library for the self-taught
Anode Says... — Blogging For Your Pleasure



Heh, maybe I'm a wuss, but there is a minor nitpick in the fact that if a pseudo class and a diagram are all that is necissary then the question is entirely language independent.
Edit: Evil evil typo-creating computer monkeys!!!![]()
Last edited by cyngon; Apr 20, 2003 at 19:55.





Maybe the real challenge is to figure out how this could be related to PHP specifically. ;-)
(cyngon: I lease my keyboard from those same monkeys)
Last edited by samsm; Apr 21, 2003 at 07:27.
Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?
This is a hell of a question! Wasn't one of the PHP quizzes (can't think of the site, but you get good prizes) similar to this?
Sean![]()
Harry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature





Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?
That's the site I was thinking of, but I must have seen the chess question somewhere else
Sean![]()
Harry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature





This is kind of true and kind of not true. The basic ideas and algorithms would be the same, yet the implemenation would obviously have to be different as most chess programs run locally or as a Java app.Originally Posted by cyngon
TuitionFree — a free library for the self-taught
Anode Says... — Blogging For Your Pleasure





Very nice prizes for those!Originally Posted by samsm
![]()
Mike
It's not who I am underneath, but what I do that defines me.

Heheh..you're absolutely correct.Originally Posted by cyborg from dh
If pigs could fly, the prize of bacon would reach the sky.
www.dosspirit.net - Norwegian reviews of DOS games
Ok, time to revive the thread. I have a non-PHP question but something most of you know a little about.
Apache web server derived its name from:
a) A multi-talented and faceted Native American tribe.
b) lots of patches making it "a patchy server"
c) A development codename that never was changed on stable release
d) Apache is actually an Anglofied german word.
B - at first it was literately 'a patchy server'
Sean![]()
Harry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
Knew I shoukdn't have made it multiple choice.![]()
Without looking, what is the latest version of PHP, not including release candidates?
Sean![]()
Harry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature





4.3.2 released this morning.
TuitionFree — a free library for the self-taught
Anode Says... — Blogging For Your Pleasure
Was gonna say, but anode beat me.![]()
Bookmarks