Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
United States

Journal Journal: Common Lisp Code to Terrorist-ize Given Text

;This maker of food for the NSA Line Eater is copyright (C) Eli Gottlieb, December 26 2005. ;It's under the GNU General Public License version 2.0.
(defvar *dictionary* '("assasinate" "kill" "suicide bomb" "dirty bomb" "nuclear device"
                              "Al-Quaeda" "insurgency" "Hamas" "Baath"
                              "jihad" "Allah" "Islam"
                              "Sears Tower" "Empire State Building" "White House" "Golden Gate Bridge" "New York City subway"
                              "Iraq" "Afghanistan" "Palestine" "Iran" "Saudi Arabia"
                              "Israel" "America" "England"
                              "infidels"
                              "Usama bin Laden"
                              "London"))

(defun terroristize (lines)
    (if (not (equalp lines nil))
        (append
            (if (equalp (cdr lines) nil)
        (list (car lines))
        (list (car lines) (nth (random (length *dictionary*)) *dictionary*)))
            (terroristize (cdr lines)))
        nil))

(defun equal-to-any (value any)
    (cond
        ((equalp value (car any)) (car any))
        ((cdr any) (equal-to-any value (cdr any)))
        ('t nil)))

(defun all-whitespace-before-p (the-string start-index end-index)
    (do ((index start-index (- index 1)))
            ((equalp index end-index) T)
        (if (not (equalp (elt the-string index) #\ ))
            (return nil))))

(defun token-delimited-p (token-beginning index-of-char string-data delimiters)
    (and
        (equal-to-any (elt string-data index-of-char) delimiters)
        (not (all-whitespace-before-p string-data index-of-char token-beginning))))

(defun tokenize (string-input delimiters &optional (inclusive nil))
    (setf tokens nil)
    (setf token-beginning 0)
    (dotimes (c (length string-input))
        (if (token-delimited-p token-beginning c string-input delimiters)
            (progn
        (setf tokens (append tokens (list (subseq string-input token-beginning (if inclusive (+ c 1) c)))))
        (setf token-beginning (+ c 1)))))
    (if ( token-beginning (length string-input))
        (append tokens (list (subseq string-input token-beginning)))
        tokens))

(defun parse-for-words (sentence)
    (tokenize sentence '(#\ )))

(defun parse-for-sentences (message)
    (tokenize message '(#\. #\? #\!) T))

(defun string-reglue (str1 str2 delimiter)
    (concatenate 'string (concatenate 'string str1 (string delimiter)) str2))

(defun list-to-string (list-input)
    (if (stringp (car list-input))
        (if (cdr list-input)
            (string-reglue (car list-input) (list-to-string (cdr list-input)) #\ )
            (car list-input))
        nil)) ;This is the main function. Hand it an arbitrary string to be sprinkled with "terrorist lingo" ;-).
(defun feed-echelon (message)
    (setf sentences (mapcar 'parse-for-words (parse-for-sentences message)))
    (dotimes (sentence (length sentences))
        (setf (elt sentences sentence) (terroristize (elt sentences sentence)))
        )
    (list-to-string (mapcar 'list-to-string sentences))
    )

User Journal

Journal Journal: Slashdot rendition of "Blame Canada"

This is a repost of a recent comment of mine. I thought it funny enough to save for posterity. Anyone who's seen "South Park: Bigger, Longer and Uncut" should know the melody. If not I recommend you see the film and then download the song itself off of P2P somewheres.

Times have changed,
People are getting worse.
They won't obey FOX News, and
They just want to hack and blog.
Should we blame the media?
Or blame society?
Or should we blame the RIAA's lawsuits? NO!
Blame Canada! Blame Canada!

With their beady little eyes,
Their flapping heads so full of lies.
Blame Canada!
Blame Canada!
We need to form a full assault, it's Canada's fault!

Don't blame me, for my son Stan.
He saw the darn porno and now he's off to join a gang!
And my boy Eric once,
Had my wallpaper on desktop,
but now when I see him he tells me to fuck myself.

Well, Blame Canada!
It seems that everything's gone wrong since
Canada came along.
Blame Canada!
Blame Canada!
They're not even a real country anyway.

My son could've been a doctor or a lawyer it's true!
Instead he burned out as an OSS evangelist.
Should we blame the keyboard?
Should we blame the screen?
Or the Slashdot which he read every day? Heck, no!

Blame Canada!
Blame Canada!
With all their free-speech precedents and that bitch Anne Murray too. Blame Canada!
Shame on Canada!

The smut we must stop,
The trash we must smash,
Laughter and fun,
must all be undone.
We must blame them and cause a fuss,
Before somebody thinks of blaming us!

User Journal

Journal Journal: Evolution/Creation Debate the Dumbest Thing Since...

the invention of synthetic oxytocin.

It really is horrendously stupid to see two religions have a pissing match over who gets to indoctrinate the children. If it weren't for the fact that those are future voters being indoctrinated, it would even be funny. However, the logic of science and education, as applied to this debate, can only lead to one conclusion: Evolvedism, Creationism, and Creationism's evolved offspring Intelligent Design have got to go from the classrooms of America.

On the dominant hand, we have Evolvedism. This is the pseudo-scientific, slightly-more-credible-than-science-fiction theory which states that we are able to use rocks to gain information about a time with no people to observe it or make records. Evolvedism applies the sound and tested Theory of Evolution to these rocks in order to come to its main article of faith: We and every other life form on Earth evolved from single-celled (possibly even non-celled) life forms that floated around in primordial goop over a period of 3 to 4 billion years. Their evidence for this is simply the same application of logic, scientific theory and Ocham's Razor that is used to presume that the milk spoiled while left in the fridge when we weren't looking, but with a flaw. Every experiment, be it leaving milk in the fridge or building a circuit board, has both a beginning and an end at which the operating Laws of the Universe are known, or at least approximated. In all such situations, the events of a middle period of time are extrapolated by applying the Laws known to operate at both the beginning and end. However, nobody was around to know if the Earth even existed 4 billion years ago, let alone to make sure the same Laws of the Universe that work today did then. Ergo, it is illogical to extrapolate today's Laws into a past during which there was no observer to check that they were in operation, and without being able to make this supposition Evolvedism can no longer stand as being a scientific theory of any value to anyone who doesn't lack an alternative view. Things evolve now and indefinitely into the future, but we cannot say so for the past.

Creationism, at least, is honest about the fact that it is a religious viewpoint held on faith and emotion, but its bastard child Intelligent Design isn't so virtuous. ID supporters claim that life is too "irreducibly complex" to have evolved spontaneously, and that it therefore must have been designed by an intelligent being. The identity of this being, of course, is left open to "speculation", or rather, to God. The problem with this view is that the only documented evidence of God is the revelations of His prophets, which even when written down are impossible to verify or distinguish from simple hallucination, and when the position of Intelligent Designer is left open there is no evidence of any intervention on its part that would distinguish it from the operation of Laws of the Universe. Therefore, a non-God Intelligent Designer becomes logically moot, and this so-called theory is revealed for what it is: an attempt to weedle God into the classrooms of a nation founded on the Freedom of Religion.

From this it is apparent that not one of the aforementioned theories are truly scientific, as each one lacks an essential component of that qualtiy. Evolvedism is untestable, Creationism grounded in naught but faith, and Intelligent Design indistinguishable from Evolvedism when it is not hiding Creationism's God in its Designer, so the best possible thing for our science classrooms is to teach none of them and have students learn their theology, be it of genetic selection or Christ, only if, when and how they actually wish to.

And no, the Flying Spaghetti Monster Theory is not seperate, as it is a form of Intelligent Design that still fails to distinguish the Designer from the operation of Laws of the Universe. That means that the Flying Spaghetti Monster is the latest lies of the infidels, who will drown in their own blood for it ;-).

Slashdot Top Deals

If you want to put yourself on the map, publish your own map.

Working...