Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

HBH PHP Competition


ghost's Avatar
0 0

The former PHP Optimization contest was unfortunately canceled due to some issues, but I've decided that a new one shall be made!

So, this weekend I will release a script written mainly by jjbutler88 that is to be optimized.

I also figured that I could release the prizes and rules while we wait so that you all can look forward to the release date.

Rules:

  • The script can be edited as much as you'd like, as long as the output is the same.
  • If two identical scripts are turned in, the first delivered will be the one participating.
  • To participate in the contest, you will have to deliver the script in a PM to me, not by forum or any other method.
  • Everyone can participate (even administrators and myself).
  • The winner will be the person with the least execution time on the script.
  • Prizes and rules may change at any point.

Prizes: 1st - 100 points + 1 month EM. 2nd - 75 points. 3rd - 50 points.

End date: 23 May 2009

If you have any questions or suggestions, please don't hesitate with sending me a PM or replying to this thread.

The script!

<?php
//
// Script written by jjbutler88 for the HBH PHP optimization competition, organised by -cL
// Probably the worst script I have written in my entire life. Coding angst supressed by listening to 'Clair de Lune' on repeat :)
//
echo "The following script is to be optimised to run the fastest by running the code inbetween the comments.<br/>";
echo "The file 'words.txt' must be opened and read. Then the words contained in the file must be seperated into the following catagories (words can fall into more than 1 catagory):<br/><br/>";
echo "+ Letters only<br/>";
echo "+ Contains letters and numbers<br/>";
echo "+ Contains punctuation<br/>";
echo "<br/>The arrays must contain no duplicates, and must be sorted alphanumerically where possible.";
echo "<br/>Output begins below:<br/>";
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$startTime = explode(" ", microtime());
///////////////////////////////////
// DO NOT EDIT ABOVE THIS LINE! //
//////////////////////////////////
$file = file_get_contents('words.txt');

$lettersOnly = array();
$lettersAndNumbers = array();
$punctuation = array();

$letters = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
$numbers = array('1','2','3','4','5','6','7','8','9');
$punctuationChars = array('.','?','!','-','(',')');

$words = explode(' ', $file);

$y = sizeof($words);
for($x = 0; $x < $y; $x++)
{
    foreach($numbers as $num)
    {
        if(strpos($words[$x], $num) !== FALSE)
        {
            $lettersAndNumbers[] = $words[$x];
        }
    }
    foreach($punctuationChars as $p)
    {
        if(strpos($words[$x], $p) !== FALSE)
        {
            $punctuation[] = $words[$x];
        }
    }
    
    if(!in_array($words[$x], $lettersAndNumbers) && !in_array($words[$x], $punctuation))
    {
        $lettersOnly[] = $words[$x];
    }
}

$lettersOnly = array_unique($lettersOnly);
$lettersAndNumbers = array_unique($lettersAndNumbers);
$punctuation = array_unique($punctuation);

sort($lettersOnly);
sort($lettersAndNumbers);
sort($punctuation);

echo "+ Letters only: ";
print_r($lettersOnly);
echo "<br/><br/>+ Contains letters and numbers: ";
print_r($lettersAndNumbers);
echo "<br/><br/>+ Contains punctuation: ";
print_r($punctuation);
///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$mem = memory_get_peak_usage();
$endTime = explode(" ", microtime());
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".$mem."<br/>";
$score = round($mem * $executionTime, 3);
echo "Score: $score - Lower is better!";
?>

words.txt

Hackers 
PHP 
Optimization 
Competition 
Written 
By 
Jjbutler88 
And 
-cL 
In 
The 
Worst 
PHP 
Possible 
(Much 
Harder 
Than 
It 
Might 
Seem) 
1337ness 
Is 
In 
The 
Eye 
Of 
The 
Beholder 
Jah 
Rastafari```

> 
Will the scripts be tested several times? Because, as stated above, there are some ups and downs when executing a script.

Yes.

> 
Second question: In the original text file, are there spaces before / after each word, or not.

There are spaces.

ghost's Avatar
0 0

End date?


ghost's Avatar
0 0

Updated.


spyware's Avatar
Banned
0 0

What libraries will be used?


ghost's Avatar
0 0

And as Spyware said in the old thread, can we edit PHP's config file?


ghost's Avatar
0 0

Sir Hackalot wrote: And as Spyware said in the old thread, can we edit PHP's config file?

I don't think so since it will not be tested on your server.


ghost's Avatar
0 0

But we'll have to know if you're only allowed to use standard functions or various libraries.


ghost's Avatar
0 0

I think we can safely assume you can only use functions that come bundled with a standard PHP install (I believe its 5.0.4 in this case, dont hold me to it).

I am working on the script now, should be with you saturday afternoon or sunday daytime.


ghost's Avatar
0 0

jjbutler88 wrote: I think we can safely assume you can only use functions that come bundled with a standard PHP install (I believe its 5.0.4 in this case, dont hold me to it).

You are quite correct.


korg's Avatar
Admin from hell
0 0

Can't wait for this one.:p


ghost's Avatar
0 0

yeah, me too :D


ghost's Avatar
0 0

Not sure if im gonna have time to actually take part in this one, so busy lately, but il give it a shot :D


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

Where do we submit to?


ghost's Avatar
0 0

system_meltdown wrote: Where do we submit to?

PM Me ^__^

-cL wrote:

  • To participate in the contest, you will have to deliver the scblockedript in a PM to me, not by forum or any other me

SySTeM's Avatar
-=[TheOutlaw]=-
20 0

-cL wrote: [quote]system_meltdown wrote: Where do we submit to?

PM Me ^__^

-cL wrote:

  • To participate in the contest, you will have to deliver the script in a PM to me, not by forum or any other me [/quote]

Wouldn't that mean you can't participate? Because obviously you could steal other member's scripts if they perform better than your own.


ghost's Avatar
0 0

I can collect the scripts if you like, i'm not planning on participating anyway. After the end date I can send them to an admin who can host and test them?


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

That sounds better to me :)


ghost's Avatar
0 0

Yeah, can't have the one collecting scripts to participate. :| I think I'll have a go when I get the time. :)


ghost's Avatar
0 0

I think we should send the script to jjbutler88…


ghost's Avatar
0 0

Just a question, shouldn't the words in words.txt be space separated instead of one word per line? Because otherwise, the original script won't work.


spyware's Avatar
Banned
0 0

Score: -84073.361 - Lower is better!

I win.

Thanks int :)


ghost's Avatar
0 0

lol nice spyware. you could travel back in time with that ^__^


spyware's Avatar
Banned
0 0

c4p_sl0ck wrote: Just a question, shouldn't the words in words.txt be space separated instead of one word per line? Because otherwise, the original script won't work.

You don't want to use the original script anyway :P.


ghost's Avatar
0 0

spyware wrote: You don't want to use the original script anyway :P.

True. But it says the output should be the same, so it's good if the original script works as well.


ghost's Avatar
0 0

Could someone post or pm me a valid output? I'm pretty sure mine is wrong, even if I use the original script.


ghost's Avatar
0 0

@spyware - the maths isnt perfect, I knocked it up in a free afternoon.

@everyone else - For example of how your input should look, check here:

http://athleet.netii.net/hbh.php

It seems settled that I will collect the scripts, so PM me your entries when you finish them and they will be tested on/after the end date for the competition.


ynori7's Avatar
Future Emperor of Earth
0 0

-cL wrote:

  • The script can be edited as much as you'd like, as long as the output is the same. That's pretty vague. If I know what the output's supposed to be, I could just tell it to print that and not do any work.

Also, can we alter the text file?

EDIT: also, is it the fastest time that wins, or the best score (time and memory)?

EDIT AGAIN: Why is the final output included in the timer? If that has to be the same for everyone, it should be at the end with the rest of the results.


fashizzlepop's Avatar
Member
0 0

jjbutler88, your site is not available… says some BS about malicious stuff. If you need I can host the files for the time being.

And is it just me or does the script not work "as is"


rex_mundi's Avatar
☆ Lucifer ☆
3,050 12

This seems to be a common issue due to the amount of traffic the host is suddenly attracting , exact same thing happened with Cyph3rhell's new timed challenge when he hosted it , then an hour or so later it was fine , it's probably just some automated check .


fashizzlepop's Avatar
Member
0 0

Well, I'm on a dedicate server shared with only a few others. I'm sure my friend won't mine.


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

jjbutler88 wrote: @spyware - the maths isnt perfect, I knocked it up in a free afternoon.

@everyone else - For example of how your input should look, check here:

http://athleet.netii.net/hbh.php

It seems settled that I will collect the scripts, so PM me your entries when you finish them and they will be tested on/after the end date for the competition.

Will they be tested on your localhost? Or on a shared webhost? Because remember, shared hosting will be a hell of a lot slower.


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

MoshBat wrote: [quote]system_meltdown wrote: [quote]jjbutler88 wrote: @spyware - the maths isnt perfect, I knocked it up in a free afternoon.

@everyone else - For example of how your input should look, check here:

http://athleet.netii.net/hbh.php

It seems settled that I will collect the scripts, so PM me your entries when you finish them and they will be tested on/after the end date for the competition.

Will they be tested on your localhost? Or on a shared webhost? Because remember, shared hosting will be a hell of a lot slower.[/quote]

I wonder… Why can't we test them here?[/quote]

Because that requires uploading each script, running, then deleting from HBH's server. It's just easier if the guy collecting the scripts just runs them from localhost.


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

MoshBat wrote: [quote]system_meltdown wrote: [quote]MoshBat wrote: [quote]system_meltdown wrote: [quote]jjbutler88 wrote: @spyware - the maths isnt perfect, I knocked it up in a free afternoon.

@everyone else - For example of how your input should look, check here:

http://athleet.netii.net/hbh.php

It seems settled that I will collect the scripts, so PM me your entries when you finish them and they will be tested on/after the end date for the competition.

Will they be tested on your localhost? Or on a shared webhost? Because remember, shared hosting will be a hell of a lot slower.[/quote]

I wonder… Why can't we test them here?[/quote]

Because that requires uploading each script, running, then deleting from HBH's server. It's just easier if the guy collecting the scripts just runs them from localhost.[/quote]

Quite true, but that could rule out the whole running programs affecting speed issue… Although, a few tests and a mean seems appropriate…[/quote]

Have it run on a box with nothing else running other than Apache? So like, no torrenting applications, no MSN, etc.


ghost's Avatar
0 0

All the scripts will be sent to me. I don't plan on participating so that will not be a problem.

Also, it will be tested on my own localhost with all other applications turned off.


ghost's Avatar
0 0

MoshBat wrote: OS? Windows 7 MoshBat wrote: System specs? Intel Quad Core 1.66 GHz 2GB RAM

MoshBat wrote: Actually, I hope you don't mind if I also perform a test of all the scripts myself. Just to prevent accusations of cheating.

That would probably be best.


korg's Avatar
Admin from hell
0 0

So what's the final vote here. Do we send them to JJ or CL.


ghost's Avatar
0 0

-cL has the final vote here, its his competition. I'd send them to him.


ghost's Avatar
0 0

Well, as I said earlier in this thread, the scripts are to be sent to me in a PM seeing as I am not going to participate.


ynori7's Avatar
Future Emperor of Earth
0 0

You need to be more specific about the rules for this. Are we supposed to assume we don't know the contents of the file? Because if we do, we could just code the lists (already sorted) straight into the php. And if we're going to go that far, we might as well just echo what the output is supposed to be.


ghost's Avatar
0 0

ynori7 wrote: You need to be more specific about the rules for this. Are we supposed to assume we don't know the contents of the file? Because if we do, we could just code the lists (already sorted) straight into the php. And if we're going to go that far, we might as well just echo what the output is supposed to be.

I think jjbutler88 would need to specify that seeing as he wrote the script.


ghost's Avatar
0 0

The script says at the top, you need to read the text file containing the words and sort them accordingly.

Please just use common sense here, there are no trick questions and secret workarounds, everybody just use your php optimization skills to try and obtain a consistently low score, then PM the scripts to -cL. Simples.


ynori7's Avatar
Future Emperor of Earth
0 0

jjbutler88 wrote: Please just use common sense here, there are no trick questions and secret workarounds, everybody just use your php optimization skills to try and obtain a consistently low score, then PM the scripts to -cL. Simples. Right, that's as I figured. There's no confusion from me, but I've talked to a number of other people who weren't so clear. Unless you make the rules very clear and specific, you will end up with a lot of invalid entries to sort through.


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

Sent my entry in ;)

Anyone else participating?


ghost's Avatar
0 0

Too busy at the mo, got work and uni work to be getting on with, finals in 2 weeks! :whoa:


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

jjbutler88 wrote: Too busy at the mo, got work and uni work to be getting on with, finals in 2 weeks! :whoa:

Same for me, except only college level:) still loads of work though… Hopefully will manage to make the submission before the deadline


ghost's Avatar
0 0

Yeah, pretty busy too. Lots of things to do now that the semester is coming to an end.


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

Poor excuses.

I've got exams coming up soon, coursework to do, OpenUniversity work to do, a social life, annnnd I still managed to get it done.


ghost's Avatar
0 0

system_meltdown wrote: Poor excuses.

I've got exams coming up soon, coursework to do, OpenUniversity work to do, a social life, and I still managed to get it done.

But maybe you're too awesome. :|


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

c4p_sl0ck wrote: [quote]system_meltdown wrote: Poor excuses.

I've got exams coming up soon, coursework to do, OpenUniversity work to do, a social life, and I still managed to get it done.

But maybe you're too awesome. :|[/quote]

Maybe, just maybe ;)


ghost's Avatar
0 0

System, you know you rule PHP supreme, dont give me that.

You probably optimize stuff in your sleep. I however know nothing about hardcore optimization.

Was hard enough finding time to write the damn thing, I dont even wanna read that script again :p


ghost's Avatar
0 0

IMPORTANT SCRIPT CHANGE!!!

Instead of this

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$endTime = explode(" ", microtime());
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".memory_get_peak_usage()."<br/>";
$score = round(memory_get_peak_usage() * $executionTime, 3);
echo "Score: $score - Lower is better!";

The script now is changed to

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$mem = memory_get_peak_usage();
$endTime = explode(" ", microtime());
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".$mem."<br/>";
$score = round($mem * $executionTime, 3);
echo "Score: $score - Lower is better!";

So the script saves the memory_get_peak_usage(); in a variable instead of using it twice.

Thanks to system_meltdown for correcting this!


ghost's Avatar
0 0

Fair play, but it was the peak usage, not the current usage, if it was different if was different by the same amount for everyone. Guess I forgot to turn off 'shit mode' coding before I did the scoring system :p


p4plus2's Avatar
Member
0 0

-cL wrote: IMPORTANT SCRIPT CHANGE!!!

Instead of this

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$endTime = explode(" ", microtime());
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".memory_get_peak_usage()."<br/>";
$score = round(memory_get_peak_usage() * $executionTime, 3);
echo "Score: $score - Lower is better!";

The script now is changed to

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$mem = memory_get_peak_usage();
$endTime = explode(" ", microtime());
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".$mem."<br/>";
$score = round($mem * $executionTime, 3);
echo "Score: $score - Lower is better!";

So the script saves the memory_get_peak_usage(); in a variable instead of using it twice.

Thanks to system_meltdown for correcting this!

shouldn't

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$mem = memory_get_peak_usage();
$endTime = explode(" ", microtime());
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".$mem."<br/>";
$score = round($mem * $executionTime, 3);
echo "Score: $score - Lower is better!";

be:

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$endTime = explode(" ", microtime());
$mem = memory_get_peak_usage();
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".$mem."<br/>";
$score = round($mem * $executionTime, 3);
echo "Score: $score - Lower is better!";

So that you don't include setting the mem variable in the time of script execution. Not that it is a huge difference… worth pointing out though.


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

p4plus2 wrote: [quote]-cL wrote: IMPORTANT SCRIPT CHANGE!!!

Instead of this

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$endTime = explode(" ", microtime());
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".memory_get_peak_usage()."<br/>";
$score = round(memory_get_peak_usage() * $executionTime, 3);
echo "Score: $score - Lower is better!";

The script now is changed to

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$mem = memory_get_peak_usage();
$endTime = explode(" ", microtime());
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".$mem."<br/>";
$score = round($mem * $executionTime, 3);
echo "Score: $score - Lower is better!";

So the script saves the memory_get_peak_usage(); in a variable instead of using it twice.

Thanks to system_meltdown for correcting this!

shouldn't

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$mem = memory_get_peak_usage();
$endTime = explode(" ", microtime());
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".$mem."<br/>";
$score = round($mem * $executionTime, 3);
echo "Score: $score - Lower is better!";

be:

///////////////////////////////////
// DO NOT EDIT BELOW THIS LINE! //
//////////////////////////////////
$endTime = explode(" ", microtime());
$mem = memory_get_peak_usage();
echo "<br/>-----------------------------------------------------------------------------------------<br/>";
$executionTime = floatval($endTime[0] - $startTime[0]);
echo "Execution time: $executionTime ms<br/>";
echo "Peak memory allocation: ".$mem."<br/>";
$score = round($mem * $executionTime, 3);
echo "Score: $score - Lower is better!";

So that you don't include setting the mem variable in the time of script execution. Not that it is a huge difference… worth pointing out though.[/quote]

It doesn't really matter either way, because then you could be escalating the memory allocation by getting the end time. Or slightly increasing the time by having another variable set.


p4plus2's Avatar
Member
0 0

In the long run i suppose it doesn't matter since we all use the same code for that giving us equal scores.


ghost's Avatar
0 0

My point exactly :D

Now get using this time to optimize the stuff you should be working on!


GTADarkDude's Avatar
Member
0 0

Hmm, nobody who wants to brag about the incredibly low execution time (s)he has achieved yet? That surprises me. :)

By the way, I find it very difficult to determine which is the fastest method of the things I've tried so far. My execution time keeps jumping around in quite a big range each time I try. Perhaps I should try this on something else than my crappy WinXP machine with WAMP installed and LOTS of other processes running. ;)

I do like this challenge though. B)


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

GTADarkDude wrote: Hmm, nobody who wants to brag about the incredibly low execution time (s)he has achieved yet? That surprises me. :)

By the way, I find it very difficult to determine which is the fastest method of the things I've tried so far. My execution time keeps jumping around in quite a big range each time I try. Perhaps I should try this on something else than my crappy WinXP machine with WAMP installed and LOTS of other processes running. ;)

I do like this challenge though. B)

Because what's low for someone else could be high for another person, so there's no point trying to "brag", because no one knows what the "lowest" score can be.


ghost's Avatar
0 0

The script is too small and too quick in execution time to make optimisation noticable. I get some +/- 10%-20% variation in points from the same script. And I doubt the best performance you can get is better then 20% faster. So it's not even possible to test and see if there is a real difference between the one we code and in the original one. From optimisation, I'm making, im getting and an estimated boost of performance of around 10%, but again it's hard for me to really know if its really 10% since the original script sometimes run at same speed as mine.

Edit: Do the "do not edit" part is part of the challenge ?


ghost's Avatar
0 0

Will the scripts be tested several times? Because, as stated above, there are some ups and downs when executing a script.

Second question: In the original text file, are there spaces before / after each word, or not. Because if there aren't, the original script doesn't work :O

Greatings, Thanaton


ghost's Avatar
0 0

Thanaton wrote: Will the scripts be tested several times? Because, as stated above, there are some ups and downs when executing a script.

Second question: In the original text file, are there spaces before / after each word, or not. Because if there aren't, the original script doesn't work :O

Greatings, Thanaton

These questions have been answered already!

  1. -cL made some changes to the execution time measurement code, I don't think it will make much difference but hey, that's what you got to work with

  2. I know the original script doesn't work without spaces, its a bad script. Use the text file as it was, that's not part of the optimization challenge.

For crying out loud, why cant people just use the grey matter a bit and optimize the code instead of asking pointless questions??


ynori7's Avatar
Future Emperor of Earth
0 0

jjbutler88 wrote: For crying out loud, why cant people just use the grey matter a bit and optimize the code instead of asking pointless questions?? Because they aren't pointless questions. This competition was not well organized, and after hearing these simple questions, you or -cL should have gone back to the main description and updated it with clearer details, but neither of you did. Since none of these questions have been answered in a clear way, you shouldn't be surprised that they are being repeated.


ghost's Avatar
0 0

-cL is in charge of the competition rules and description, I just wrote the script. I would have thought these questions were pretty obvious, a little common sense and reading this thread should answer the questions asked.

I will PM -cL now to get him to update the main post.


ghost's Avatar
0 0

I have a question about the testing. If the difference between 2 score is of less then 5%, how can you really tell a script was faster since of PHP fluctuation ?

Considering most optimisation are gonna have around the same speed, how can you tell if someone script was faster or slower if the difference is too low ?


ghost's Avatar
0 0

Why the hell does this script have HTML in it. A CLI script would fair much better.


spyware's Avatar
Banned
0 0

sToRm_seveN wrote: Why the hell does this script have HTML in it. A CLI script would fair much better.

Output to a terminal then :+


ghost's Avatar
0 0

sToRm_seveN wrote: Why the hell does this script have HTML in it. A CLI script would fair much better.

It was written to output as a web page, not assuming any CGI functionality in the web server. From what I gather, -cL will be testing this on a local XAMPP, so CGI will not necessarily be available/configured.


spyware's Avatar
Banned
0 0

jjbutler88 wrote: It was written to output as a web page, not assuming any CGI functionality in the web server. From what I gather, -cL will be testing this on a local XAMPP, so CGI will not necessarily be available/configured.

See, ELLLLL, Ayyy.

CLI.

Not See Gee Ayyy.


ynori7's Avatar
Future Emperor of Earth
0 0

MoshBat wrote: Look, guys. Just take the script and make it faster. It is that simple. Obviously, but logistics are still important. For all we know, -cL is just going to draw names from a hat to decide the winner, in which case there's no point in participating.

Obviously things haven't been though through fully, so these questions serve the purpose of kicking the guy in charge into gear so he can get his act together.


ghost's Avatar
0 0

I'm removing all this stupid HTML from my entry. I hope you don't mind.

EDIT: And I'm wondering how you're going to reiterate this script. I hope you're able to figure it out so you don't affect the memory usage.

EDIT 2: Does the output have to be 100% identical? For instance, mine is an actual list instead of that print_r() crap.


SySTeM's Avatar
-=[TheOutlaw]=-
20 0

sToRm_seveN wrote: I'm removing all this stupid HTML from my entry. I hope you don't mind.

Well I'm pretty sure they will mind, due to the fact there's HTML at the top, right by the part that says DO NOT EDIT.

sToRm_seveN wrote: EDIT 2: Does the output have to be 100% identical? For instance, mine is an actual list instead of that print_r() crap.

I'm assuming that as long as the script does what it's meant to and writes out what it needs to, it doesn't matter HOW you make it write it out.


Dunuin's Avatar
Member
0 0

Do we have to code the script now, as If we don't know the word list?

Because if not, we could just check the words for numbers and punctuation and if there are none of them, the words are right as "lettersonly" and we don't have to check for letters with this wordlist. But that would not really work in a real case, because there could be other special chars and then a word with a "@", "{" etc in it would be "lettersonly".


ghost's Avatar
0 0

We provided you with a wordlist for a reason… Il give you a hint

We didnt do it for shits and giggles

Answer your question??


ghost's Avatar
0 0

My entry has been finished for two days now. I hope you all brought your A-game. :>


ghost's Avatar
0 0

It's five days left of the competition and I've gotten two entries.

I am afraid that if I don't have at least 5 - 6 serious entries I am going to have to cancel this event.


Mr_Cheese's Avatar
0 1

i might give this one a go!

i'll get my submission done wednesday lunchtime.


ghost's Avatar
0 0

-cL wrote: It's five days left of the competition and I've gotten two entries.

I am afraid that if I don't have at least 5 - 6 serious entries I am going to have to cancel this event. Sent mine in via PM.


p4plus2's Avatar
Member
0 0

-cL wrote: It's five days left of the competition and I've gotten two entries.

I am afraid that if I don't have at least 5 - 6 serious entries I am going to have to cancel this event.

I am going to work on mine until the last day to ensure that I have thought of everything that I can :)


GTADarkDude's Avatar
Member
0 0

I've got my submission finished for over a week now, I just waited with submitting in case anything else came to mind which could improve the script. I can't say I'm completely satisfied with what I've got know and I'm sure others will beat me, but I'll submit it anyway. At least I've tried.


ghost's Avatar
0 0

Who won!?!??! And who cares if you didn't receive enough entries. I still want to see whose was the best.


ghost's Avatar
0 0

I haven't checked the entries yet since I have had alot of work to do. But I will post it within a couple of days.


ghost's Avatar
0 0

-cL wrote: I haven't checked the entries yet since I have had alot of work to do. But I will post it within a couple of days. Okay


ghost's Avatar
0 0

sToRm_seveN wrote: [quote]-cL wrote: I haven't checked the entries yet since I have had alot of work to do. But I will post it within a couple of days. Okay[/quote]

You hereby win the price of the most useless post ever.


ghost's Avatar
0 0

RILEY16 wrote: You hereby win the price of the most useless post ever. No, you do.


GTADarkDude's Avatar
Member
0 0

Ehm, update please? Sorry for being impatient. ;)

Edit: Thanks ynori7, that was pretty stupid I guess… -_-"