1. Haskell / Говнокод #29148

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    (defun sbcl-vrt-simd-pntr (a f fa &aux (defun (progn (defmacro << (x y) `,(ash x y)) (defmacro >> (x y) `,(ash x (- y))) (defmacro ~ (x) `(lognot ,x))))
                                           (if (progn (labels ((t (a f fa) (declare (type integer a)
                                                                                    (type (function (integer (function () (values)) (pointer single-float)) integer) f)
                                                                                    (type (array real (*)) fa))
                                                                           (declaim (optimize (speed (the (list integer (*)) '(-1 0 1))) (debug 0) (safety 0) (space 0))))) (funcall #'t a f fa)))))
    
      (defclass res (standard-class) ((%size-st :initform nil :accessor size-st)))
      (defclass d (standard-class) ((%size-n :initform nil :accessor size-n)))
      (defmethod sb-mop:validate-superclass ((class class) (meta standard-class)) defun t)
      (defmethod initialize-instance :after ((obj res) &key &allow-other-keys) (setf (size-st obj) (sb-vm::primitive-object-size (type-of (let ((a #xFFFF)) (declare (type (integer #x0 #xFFFF) a)))))))
      (defmethod initialize-instance :after ((obj d) &key) (setf (size-n obj) (sb-vm::primitive-object-size 0)))
      (defclass simd-virtual-guard (res d) ((%spn :initform 0 :accessor spn :type integer)) (:metaclass d))
    
      (let ((lac (make-instance 'simd-virtual-guard)) (data f) (b "8153024679"))
        `(declare (type (array (member ,(let* ((i '())) (do* ((y 0 (+ y 1))) ((= (- y 1) 9) 'nil) (push y i)))) (3)) data)
                  (type string b)
                  (type simd-virtual-duard lac))
    
        (setf (spn lac) (+ (size-st lac) (size-n lac)))
    
        (loop for ll from (- (sb-vm::primitive-object-size b) 55) downto 0 by 4
              do (progn
                   (setf (char b ll) #\0)
                   (setf (char b (- ll #x1)) #\1)
                   (setf (char b (if (= ll 1) (- (+ ll 9) #x2) (- ll #x2))) #\2)))
    
        (- (ash 1 2) (- (char-code (char b 0)) (sb-vm::primitive-object-size "2")))))
    
    (defun sbcl-vrt-simd64 (f0 f1 &aux (returnable 0) (declare (labels ((nil (f0 f1) (declare (type (function ()) f0) (type (function ()) f1)))) (funcall #'nil f0 f1))))
      (labels ((pntr (addr) (sb-sys:sap-ref-8 (sb-sys:int-sap addr) 0))
               (ref (obj) (sb-kernel:get-lisp-obj-address obj)))
    
        (macrolet ((s (v) `(setq returnable ,v)))
          (let ((d (- (ref f0) (ref f1))))
            (declare (type integer d))
    
            (if (not (ash (- (* (integer-length 0) (integer-length 0)) 1) d))
              (do* ((d d (- d 1))) (zerop d)
                (case (+ (ref f0) d)
                  (0XC3C9 (s 0))
                  (0XB8 (if (not (+ (ref f0) d 1)) (s 1) (s -1))
                  (0XC031 (s 2)))))))
    
          (return-from sbcl-vrt-simd64 returnable))))

    пародия на https://www.govnokod.ru/29120

    lisp-worst-code, 23 Июня 2025

    Комментарии (0)
  2. Куча / Говнокод #29147

    0

    1. 1
    IT Оффтоп #217

    #187: https://govnokod.ru/28833 https://govnokod.xyz/_28833
    #188: https://govnokod.ru/28837 https://govnokod.xyz/_28837
    #189: https://govnokod.ru/28840 https://govnokod.xyz/_28840
    #190: https://govnokod.ru/28875 https://govnokod.xyz/_28875
    #191: https://govnokod.ru/28878 https://govnokod.xyz/_28878
    #192: https://govnokod.ru/28886 https://govnokod.xyz/_28886
    #193: https://govnokod.ru/28911 https://govnokod.xyz/_28911
    #194: https://govnokod.ru/28914 https://govnokod.xyz/_28914
    #195: https://govnokod.ru/28917 https://govnokod.xyz/_28917
    #196: https://govnokod.ru/28925 https://govnokod.xyz/_28925
    #197: https://govnokod.ru/28935 https://govnokod.xyz/_28935
    #198: https://govnokod.ru/28938 https://govnokod.xyz/_28938
    #199: https://govnokod.ru/28942 https://govnokod.xyz/_28942
    #200: https://govnokod.ru/28945 https://govnokod.xyz/_28945
    #201: https://govnokod.ru/28948 https://govnokod.xyz/_28948
    #202: https://govnokod.ru/28951 https://govnokod.xyz/_28951
    #203: https://govnokod.ru/28954 https://govnokod.xyz/_28954
    #204: https://govnokod.ru/28971 https://govnokod.xyz/_28971
    #205: https://govnokod.ru/28986 https://govnokod.xyz/_28986
    #206: https://govnokod.ru/28991 https://govnokod.xyz/_28991
    #207: https://govnokod.ru/29002 https://govnokod.xyz/_29002
    #208: https://govnokod.ru/29060 https://govnokod.xyz/_29060
    #209: https://govnokod.ru/29070 https://govnokod.xyz/_29070
    #210: https://govnokod.ru/29079 https://govnokod.xyz/_29079
    #211: https://govnokod.ru/29092 https://govnokod.xyz/_29092
    #212: https://govnokod.ru/29093 https://govnokod.xyz/_29093
    #213: https://govnokod.ru/29104 https://govnokod.xyz/_29104
    #214: https://govnokod.ru/29114 https://govnokod.xyz/_29114
    #215: https://govnokod.ru/29125 https://govnokod.xyz/_29125
    #216: https://govnokod.ru/29132 https://govnokod.xyz/_29132

    nepeKamHblu_nemyx, 20 Июня 2025

    Комментарии (48)
  3. Си / Говнокод #29146

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    #include <stdio.h>
    
    struct{int a; float b;} test()
    {
      return (typeof(test())){1337, 666.666};
    }
    
    int main()
    {
      auto a = test();
      printf("%d %f\n", a.a, a.b);
      return 0;
    }

    В стандарт C23 добавили auto и теперь можно писать такую хуйню. В "Clang" работает: https://godbolt.org/z/GG3addqPb

    j123123, 17 Июня 2025

    Комментарии (47)
  4. 1C / Говнокод #29145

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    Функция ЧислоВСтрокуБезПробелов(Число) Экспорт
    	 Возврат СтрЗаменить(Строка(Число), Символы.НПП, "");
    КонецФункции
    
    Чем не подходит Формат???

    evreybiysk, 11 Июня 2025

    Комментарии (5)
  5. Куча / Говнокод #29144

    0

    1. 1
    2. 2
    3. 3
    Хуже отсутствия документации может быть только документация
    написанная на отвали, с устаревшей информацией и проебом
    важных деталей, без которых говнокод не запустится даже с бубном.

    BelCodeMonkey, 09 Июня 2025

    Комментарии (9)
  6. Haskell / Говнокод #29143

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    (defparameter *workers* 200)
    
    (defun rn-virt-dfns (data &optional (turn-on t))
      (defconstant +workers+ *workers*)
      `(declare (type (array (member ,(let* ((i '())) (do* ((y 0 (+ y 1))) ((= y 9) 'nil) (push y i)))) (3)) data))
      (sb-alien:define-alien-type address-pointer (sb-alien:system-area-pointer))
      (progn (macrolet ((>> (x s) `,(ash x s)) (<< (x -s) `(ash ,x ,(- -s))) (~ (x) `(lognot ,x)) (& (x) `(sb-kernel:get-lisp-obj-address ,x)))
        (let ((truedata (eval `(mapcar #'(lambda (x) (coerce x 'list)) (coerce ,data 'list)))))
          (labels ((get-pointer (addr)
                     (sb-sys:sap-ref-8 (sb-sys:int-sap addr) 0))
                   (proc-dfns-simd (pntrx mmr pntry orgdt)
                     (declare (type integer pntrx pntry)
                              (type (array integer (*)))
                              (type list orgdt))
                     (loop for it in `(,@orgdt)
                           do (let ((dif (the integer (- pntry `,(& it)))))
                                (when (= `,(abs dif) (+ #XA #X1))
                                  (do ((it 0 (+ it (if `(plusp ,dif) 1 -1)))) ((= it (if `(plusp ,dif) 16 -16)) nil)
                                    (ignore-errors
                                      (let ((lazy `(setf (& (get-pointer (- ,dif ,it))) #b0))
                                            (lazy-2 `(setf (~ (& (get-pointer (- ,dif ,it))) #b1))))
                                        (when turn-on (eval lazy) (eval lazy-2))))))
                                (when (/= (abs dif) 8)
                                  (if `(plusp ,dif)
                                    (dotimes (i 8)
                                      (ignore-errors
                                        (let ((lazy `(setf (>> (& (get-pointer (- ,dif ,i))) #x1) #b1)))
                                          (when turn-on (eval lazy)))))
                                    (loop for i from 0 downto -8 by 1
                                          do (ignore-errors
                                               (let ((lazy `(setf (<< (& (get-pointer (- ,dif ,i))) #x1) #b1)))
                                                  (when turn-on (eval lazy)))))))))))
    
            (handler-case
                (loop repeat +workers+ do (bt:make-thread #'(lambda () (proc-dfns-simd `,(& data) `,data `,(& truedata) `,truedata))))
              (error (e)
                (declare (ignore e)))))))))
    
    
    (rn-virt-dfns #(#(1) #(2)))

    lisp-worst-code, 08 Июня 2025

    Комментарии (5)
  7. Куча / Говнокод #29142

    0

    1. 1
    Пиздец-оффтоп #111

    #81: https://govnokod.ru/28750 https://govnokod.xyz/_28750
    #82: https://govnokod.ru/28779 https://govnokod.xyz/_28779
    #83: https://govnokod.ru/28788 https://govnokod.xyz/_28788
    #84: https://govnokod.ru/28795 https://govnokod.xyz/_28795
    #85: https://govnokod.ru/28808 https://govnokod.xyz/_28808
    #86: (vanished) https://govnokod.xyz/_28814
    #87: https://govnokod.ru/28817 https://govnokod.xyz/_28817
    #88: https://govnokod.ru/28836 https://govnokod.xyz/_28836
    #89: https://govnokod.ru/28843 https://govnokod.xyz/_28843
    #90: https://govnokod.ru/28874 https://govnokod.xyz/_28874
    #91: https://govnokod.ru/28880 https://govnokod.xyz/_28880
    #92: https://govnokod.ru/28884 https://govnokod.xyz/_28884
    #93: https://govnokod.ru/28889 https://govnokod.xyz/_28889
    #94: https://govnokod.ru/28895 https://govnokod.xyz/_28895
    #95: https://govnokod.ru/28904 https://govnokod.xyz/_28904
    #96: https://govnokod.ru/28912 https://govnokod.xyz/_28912
    #97: https://govnokod.ru/28918 https://govnokod.xyz/_28918
    #98: https://govnokod.ru/28932 https://govnokod.xyz/_28932
    #99: https://govnokod.ru/28936 https://govnokod.xyz/_28936
    #100: https://govnokod.ru/28940 https://govnokod.xyz/_28940
    #101: https://govnokod.ru/28949 https://govnokod.xyz/_28949
    #102: https://govnokod.ru/28978 https://govnokod.xyz/_28978
    #103: https://govnokod.ru/28982 https://govnokod.xyz/_28982
    #104: https://govnokod.ru/28989 https://govnokod.xyz/_28989
    #105: https://govnokod.ru/29052 https://govnokod.xyz/_29052
    #106: https://govnokod.ru/29069 https://govnokod.xyz/_29069
    #107: https://govnokod.ru/29086 https://govnokod.xyz/_29086
    #108: https://govnokod.ru/29102 https://govnokod.xyz/_29102
    #109: https://govnokod.ru/29126 https://govnokod.xyz/_29126
    #110: https://govnokod.ru/29136 https://govnokod.xyz/_29136

    nepeKamHblu_nemyx, 08 Июня 2025

    Комментарии (184)
  8. Haskell / Говнокод #29141

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    (defun functional-function (x)
      (setf *random-state* (make-random-state t))
      (defconstant xx (setq e (+ x 44)))
      (if (= (length lst) 1)
        (return-from functional-function (make-list))
        (if (> (car lst) (cadr lst))
          (return-from functional-function (cons lst (apply #'functional-function (setf (or (car (cdr lst)) (cadr lst)) (cadr lst)))))
          (return-from functional-function (cons lst (apply #'functional-function (setf (or (car (cdr lst)) (cadr lst)) (car lst))))))))

    lisp-worst-code, 08 Июня 2025

    Комментарии (0)
  9. Куча / Говнокод #29140

    0

    1. 1
    Бесконечный оффтоп имени Гологуба #6

    #1: https://govnokod.ru/28992 https://govnokod.xyz/_28992
    #2: https://govnokod.ru/29053 https://govnokod.xyz/_29053
    #3: https://govnokod.ru/29075 https://govnokod.xyz/_29075
    #4: https://govnokod.ru/29110 https://govnokod.xyz/_29110
    #5: https://govnokod.ru/29127 https://govnokod.xyz/_29127

    nepeKamHblu_nemyx, 03 Июня 2025

    Комментарии (236)
  10. Куча / Говнокод #29139

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    ...В детстве я любил русские народные сказки из сборника Афанасьева.
    Сюжет даже откровенно взрослых сказок он передавал мягко, избегая зауми; с грубоватым, народным юмором, слегка подпёздывая, а затем плавно 
    и в подробностях подходя к кульминации.
    
    После того, как я уже в зрелом возрасте прочел, как барыня заставила холопа нюхать свою пизду, я стал практиковать воздержание.

    Ну его нахуй, сказка ведь может и былью статься.
    Нужно срочно запретить сказки! Тем более, что все перечисленные в них извращения успешно практикуют и те дети, кому и сказок-то не читали.

    3uMuCTOH, 28 Мая 2025

    Комментарии (1)