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

post you are run length encoding in lisp

Name: Anonymous 2014-10-05 3:18

critique mine pl0x:

(defun rle (str) ;run length encoding
(let ((i 0) c count out)
(while (< i (length str))
(if (eq c (elt str i))
(setq count (1+ count))
(when c
(setq out (append out (list (cons c count)))))
(setq c (elt str i))
(setq count 1))
(setq i (1+ i)))
(when c (setq out (append out (list (cons c count)))))
out))

Name: L. A. Calculus !jYCj6s4P.g 2014-10-11 22:55

>>63
If you're out of virtual memory, you might as well crash anyway, which the proceeding null pointer dereference will do for you.
WAT DA FUK R U BABBLING ABOUT W/ UR VIRTUAL MEMORY SHIT? IF malloc CANT GIVE U MORE MEMORY IT'LL LET U KNO. HOW FUKIN HARD IS IT TO WRITE A WRAPPER AROUND malloc DAT PRINTS SOMETHING 2 stderr N EXITS PROPERLY?

UR LAZY, YAINT RED DA STANDARD, N IF YA WERENT A FUCKIN STAK BOI RETOID U WUDN'T EVEN NEED malloc IN UR PROGRAM.

No shit, run-length encoding doesn't perform well on text files.

EVEN DA BINARY PRODUCED BY MY COMPILER, FROM UR DISGUSTING SOURCE CODE, IS MORE BLOATED WEN 'COMPRESSED'. UR PROGRAM'S A FUCKIN DISGRACE. THROW UR FUCKIN TEXT EDITOR AWAY N DEAL WITH IT YA IRRESPONSIBLE DEESHBAG

Doooo yoouuuuu seeeee annyyyyy runnns offf characterrrrsss in regularrrr text?
UR SOURCE FILE SURE AS FUK HAS MULTIPLE COUNTS OF ' ' CHARACTERS DAT CUD HAV BEEN COMPRESSED PROPERLY.

IF U MANAGE TO GET UR PROGRAM TO COMPRESS A FILE U'D ACTUALLY WANT TO COMPRESS, LET ME KNO.

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