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: Anonymous 2014-10-11 23:00

>>62
I love him more. He is my hero, not even kidding.

>>63
L.A. is one of the best (if not the best) programmers I know, just like R.. from stack overflow, if he does it then it must be right, I know it.
R.. and L.A. are against the silent crashing of your programs, see http://stackoverflow.com/a/17448240
What you are doing is glib-gnome-redhat-dbus ENTERPRISE quality.

Why bother checking the return value of malloc? Because of this: https://lwn.net/Articles/562211/#oom

Half the point of UNIX was that it crashed quickly on error instead of trying to handle every silly error condition
But this is wrong you turd.

>>65
There are much better ways to write it, it's like you fucked it up on purpose also only a retard would exit if the allocation failed on a non-critical operation and without saving the data, anyway, cool seeing windows supporting your own allocators.

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