6 ms·
Of course you will be able to give a brittle, half-assed work around for any issue that someone throws at you. But you know, not all people are obsessed with LI
by jstimpfle 7y ago
Of course you will be able to give a brittle, half-assed work around for any issue that someone throws at you. But you know, not all people are obsessed with LISP, not all people are ok with half-assed workarounds.
I think you are being very dishonest to yourself if you think that LISP is universally the best just because you can theoretically turn it into anything. You can't, really. Good tooling matters. Error messages matter. Standardization matters. Syntax matters (to some extent). Mindshare matters (a lot). There's a lot of subtle qualities that you can't just fake.
When I write performance sensitive code I'll personally just pick C. I'm sure there's a Common Lisp solution available to specify machine types and compile efficient code. (Probably there's many, which is another problem). But what's the point in putting lipstick on a pig when I can just use the real deal that works perfectly for what I'm doing?
- lisper 7y ago"Half-assed" is in the eye of the beholder. If you appoint yourself as the ultimate arbiter of half-assedness then your position becomes unfalsifiable. But I think you might be surprised at how un-half-assed these things can be.
- jstimpfle 7y ago> But I think you might be surprised at how un-half-assed these things can be. You might be surprised how little I care, because I'll just use a solid, battle-tested tool instead. Are you suggesting we should rewrite compression or imaging or ... software in Common Lisp because it will be so much better?
- lisper 7y ago> You might be surprised how little I care You obviously care enough to have taken the initiative to engage me on this. > Are you suggesting we should rewrite compression or imaging or ... software in Common Lisp because it will be so much better? No. It's generally never worthwhile to re-write anything. But one should not fall prey to the sunk cost fallacy either.
- jstimpfle 7y agoIf you think we should not "fall prey to the sunk cost fallacy" and write future software in Common LISP, then I recommend you to start working on improving the Common LISP systems-level coding situation. Because I'm not willing to replace this unsigned long update_crc(unsigned long crc, unsigned char *buf, int len) { unsigned long c = crc; for (int n = 0; n < len; n++) c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8); return c; } with something like this (https://github.com/pmai/Deflate/blob/master/deflate.lisp https://github.com/pmai/Deflate/blob/master/deflate.lisp) #-lispworks (defun update-crc32-checksum (crc buffer end) (declare (type (unsigned-byte 32) crc) (type (simple-array (unsigned-byte 8) (*)) buffer) (type fixnum end) (optimize (speed 3) (debug 0) (space 0) (safety 0)) #+sbcl (sb-ext:muffle-conditions sb-ext:compiler-note)) (let ((table (load-time-value (generate-crc32-table))) (cur (logxor crc #xffffffff))) (declare (type (simple-array (unsigned-byte 32) (256)) table) (type (unsigned-byte 32) cur)) (dotimes (i end) (declare (type fixnum i)) (let ((index (logand #xff (logxor cur (aref buffer i))))) (declare (type (unsigned-byte 8) index)) (setq cur (logxor (aref table index) (ash cur -8))))) (logxor cur #xffffffff))) #+lispworks (defun update-crc32-checksum (crc buffer end) (declare (type (unsigned-byte 32) crc) (type (simple-array (unsigned-byte 8) (*)) buffer) (type fixnum end) (optimize (speed 3) (debug 0) (space 0) (safety 0) (float 0))) (let ((table (load-time-value (generate-crc32-table))) (cur (sys:int32-lognot (sys:integer-to-int32 (dpb (ldb (byte 32 0) crc) (byte 32 0) (if (logbitp 31 crc) -1 0)))))) (declare (type (sys:simple-int32-vector 256) table) (type sys:int32 cur)) (dotimes (i end) (declare (type fixnum i)) (let ((index (sys:int32-to-integer (sys:int32-logand #xff (sys:int32-logxor cur (aref buffer i)))))) (declare (type fixnum index)) (setq cur (sys:int32-logxor (sys:int32-aref table index) (sys:int32-logand #x00ffffff (sys:int32>> cur 8)))))) (ldb (byte 32 0) (sys:int32-to-integer (sys:int32-lognot cur))))) Have a good day.
- 7y ago
- ncmncm 7y agoThis. Human capacity for self-deception knows no bounds.