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

Pages: 1-

NO EXCEPTIONS are no longer funny

Name: Anonymous 2007-05-06 5:37 ID:i7DvMa59

Alright /prog/, Listen up and listen good;

NO EXCEPTIONS are no longer funny.

Let's face the facts: for the past week or so, every, and I mean EVERY thread has contained at least one NO EXCEPTIONS spam. Instead of letting massive fails die and disappear off the face of the land known as dis.4chan.org, they are continually bumped, thus extending the time it spends on the front page. The whole /prog/ experience is ruined. It's worse than the random spambots. It's worse than endless /prog/ language war threads. It's even worse than the forced indentation of code. Look behind the grieving face /prog/. Look down deep into its soul and recognize the monster that dwells within. Together, /prog/, we must rise and quell this heresy before it consumes everything that makes /prog/ worth visiting. Who's with me?

Oh, and in b4 NO EXCEPTIONS.

Name: Anonymous 2007-05-06 5:40 ID:cEhuhlN5

Agreed. And we must make absolutely no exceptions to this policy.

Name: Anonymous 2007-05-06 5:50 ID:07OyaYo1

NO EXCEPTIONS has never been funny.

Name: Anonymous 2007-05-06 7:04 ID:RZ3PVT/c

>>1
Ok, this is last NO EXCEPTIONS from me:

NO EXCEPTIONS

Name: Anonymous 2007-05-06 7:47 ID:ZrmxfUGl

>>4
disregard that i suck cocks

NO EXCEPTIONS

Name: Anonymous 2007-05-06 8:17 ID:i7DvMa59

Every post in this thread includes the text NO EXCEPTIONS,

NO EXCEPTIONS.

Name: Anonymous 2007-05-06 11:07 ID:jqP9wah8

>>6
wrong

Name: Anonymous 2007-05-06 11:35 ID:Heaven

>>1
NO EXCEPTIONS are no longer funny.

This guy are sick.

Name: Anonymous 2007-05-06 22:14 ID:UStk92ZU

I'm glad I made the NO EXCEPTIONS meme.

Name: Anonymous 2007-05-06 22:20 ID:jqP9wah8

>>9
Your meme is not touring-complete.

Name: Anonymous 2007-05-06 23:06 ID:2QZUJjJY

>>9
Nor is it NP-complete.

Name: Anonymous 2007-05-07 8:04 ID:5BU/ZcWb

>>9
Fuck you I started it

Name: Anonymous 2007-05-07 9:32 ID:d2RbJ9ut

>>12
This man is a blatant liar!

Name: Anonymous 2007-12-20 3:11

NO EXCEPTIONS.

Name: Anonymous 2007-12-20 6:19

>>1
Well, let me tell you this:  I wrote a small script which found every thread on /prog/ without a reply, and then posted a reply to the threads.  How about that, huh!?

Name: Anonymous 2007-12-20 6:21

whats wrong with forced indentation?

Name: Anonymous 2007-12-20 13:22

>>1
This may surprise you, but I invented the NO EXCEPTIONS meme.

Name: Anonymous 2007-12-20 13:27

>>17
This may except you, but I no the invented MEME surprises.

Name: Anonymous 2007-12-20 13:28

>>16
[spoiler]It's of the code.[/code]

Name: Anonymous 2007-12-20 13:28

>>16
It's of the code.

Name: Anonymous 2007-12-20 16:21

>>19
what the fuck, how do you do that wrong

Name: Anonymous 2007-12-20 18:38

NO EXCEPTIONS

Name: Anonymous 2010-11-13 12:01

Name: Anonymous 2011-02-04 15:21

Name: Testing 2011-02-13 16:16

;;; Generic Utils (taken from other code I've written)

(defun ensure-length (sequence n &key (filler nil))
  (if (< (length sequence) n)
      (replace (make-sequence (class-of sequence) n :initial-element filler)
               sequence)
      sequence))

(defun take (sequence n &key (filler nil))  
  (subseq (ensure-length sequence n :filler filler) 0 n))

;; maybe this would be better done as a defun-memoized?
(defmacro memoize-named-function (name)
  `(eval-when (:compile-toplevel :load-toplevel :execute)
     (setf (fdefinition ',name) (memoize #',name))))

(defun memoize (function)
  (let ((values (make-hash-table :test #'equal)))
    #'(lambda (&rest args)
        (multiple-value-bind (value present-p)
            (gethash args values)
          (if present-p value
              (setf (gethash args values) (apply function args)))))))

(defun mappend (fn list
                &rest otherlists
                &aux (list (copy-list list)) (otherlists (copy-list otherlists)))         
  (apply #'mapcan fn list otherlists))

(defun insert-inbetween (list element &key (no-last t))
  (let ((new-list
         (mappend #'(lambda (e) (list e element)) list)))
    (if no-last (butlast new-list) new-list)))

(defun merge-strings (&rest strings)
  (apply #'concatenate 'string strings))

(eval-when (:compile-toplevel :load-toplevel :execute)
  (defun symbolicate (syms &optional (package *package*))
    (intern (apply #'concatenate 'string (mapcar #'string syms)) package))
  (defun reverse-if (list reverse)
    (if reverse (reverse list) list)))

(defmacro with-gensyms (names &body body)
  `(let ,(loop for name in names collect `(,name (gensym ,(string name))))
     ,@body))


;;; Actual implementation of the challenge

(defun binomial-coefficients (n)  
  (unless (zerop n)
    `(1 ,@(maplist #'(lambda (list)                      
                       (apply #'+ (take list 2 :filler 0)))
                   (binomial-coefficients (1- n))))))

(memoize-named-function binomial-coefficients)

(macrolet ((frob-fun (name format reverse)
             (with-gensyms (string n)
               `(defun ,name (,string ,n)
                  (case ,n
                    (0 "")
                    (1 ,string)
                    (t (format nil ,format
                               ,@(reverse-if `(,string ,n) reverse))))))))
  (frob-fun string-to-the-power "~A^~D" nil)
  (frob-fun string-multiply "~A~D" t))

(defun binomial-element (n k)
  (merge-strings
   (string-to-the-power "a" (- n k))
   (string-to-the-power "b" k)))

(defun newton-binomial-expansion (n)
  (apply #'merge-strings
         (insert-inbetween
          (loop for k to n
                for element = (binomial-element n k)
                for coeff in (binomial-coefficients (1+ n))
                collect (string-multiply element coeff))
          " + ")))

;;; Test
CL-USER> (newton-binomial-expansion 1)
"a + b"
CL-USER> (newton-binomial-expansion 2)
"a^2 + 2ab + b^2"
CL-USER> (newton-binomial-expansion 3)
"a^3 + 3a^2b + 3ab^2 + b^3"
CL-USER> (newton-binomial-expansion 4)
"a^4 + 4a^3b + 6a^2b^2 + 4ab^3 + b^4"
CL-USER> (newton-binomial-expansion 5)
"a^5 + 5a^4b + 10a^3b^2 + 10a^2b^3 + 5ab^4 + b^5"

Name: Sgt.Kabu韻먣kiman훣⒧ 2012-05-29 1:19

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

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