Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

★ /prog/ challenge No. 666 ★ (Easy)

Name: Anonymous 2013-01-07 12:41

THE CHALLENGE:
Implement ``Tohosort'' (http://www.freewebs.com/tohosort/) 66in Lisp99 in your programming language of choice.

Post the source code of your implementation. It should at least read the input from stdin and print a sorted list after making the comparisons.

Deadline: 2013-01-21 00:00.

The programs will be judged by elegance, speed and number of comparisons made using a random list that will be published the day of the deadline. The winner will be awarded with Ten (10) שקליםSuss (that's Suss-shekels for you goyim), which is enough to pay the fee needed to cross the Sanzu River by ferry.

Name: Anonymous 2013-01-17 23:29

>>79
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.

//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>;.
   
function removeShitspam(elements, fnRemove, filterWords) {
    for(var i = 0; i < elements.length; ++i) {
        for(var j = 0; j < filterWords.length; ++j) {       
            if(new RegExp(filterWords[j], "gi").test(elements[i].innerHTML)) {
                fnRemove(elements, i);
            }
        }
    }
}

(function() {
    var oddPosts = document.getElementsByClassName("post odd");
    var evenPosts = document.getElementsByClassName("post even");
    var threads = document.getElementsByClassName("thread");
   
    var filterWords = [
        "jew",
        "ahmed",
        "shalom",
        "kike",
        "e/g/in",
        "javashit",
        "leah"
    ];

    removeShitspam(oddPosts, function(e, i) {
        e[i].style.display = "none";
    }, filterWords);

    removeShitspam(evenPosts, function(e, i) {
        e[i].style.display = "none";
    }, filterWords);   

    removeShitspam(threads, function(e, i) {
        e[i].parentNode.style.display = "none";
    }, filterWords);
})();

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List