1. Assembler / Говнокод #29179

    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
    mov r8, qword ptr [rsi]
    mov rdx, qword ptr [rdi]
    bswap rdx
    mov rcx, rdx
    ror rcx, 1
    movabs rax, 0x808080808080808
    and rcx, rax
    or r8, rcx
    mov rcx, rdx
    ror rcx, 3
    movabs rax, 0x404040404040404
    and rcx, rax
    or r8, rcx
    mov rcx, rdx
    ror rcx, 5
    movabs rax, 0x202020202020202
    and rcx, rax
    or r8, rcx
    mov rcx, rdx
    ror rcx, 7
    movabs rax, 0x101010101010101
    and rcx, rax
    or r8, rcx
    mov rcx, rdx
    ror rcx, 0x39
    movabs rax, 0x8080808080808080
    and rcx, rax
    or r8, rcx
    mov rcx, rdx
    ror rcx, 0x3B
    movabs rax, 0x4040404040404040
    and rcx, rax
    or r8, rcx
    mov rcx, rdx
    ror rcx, 0x3D
    movabs rax, 0x2020202020202020
    and rcx, rax
    or r8, rcx
    mov rcx, rdx
    ror rcx, 0x3F
    movabs rax, 0x1010101010101010
    and rcx, rax
    or r8, rcx
    mov qword ptr [rsi], r8

    Разворот битов в uint64

    CHayT, 15 Сентября 2025

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

    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
    pub trait Normalize<T> {
        type Output;
        fn normalize(&self, baseline_value: &T) -> Self::Output;
        fn denormalize(&self, baseline_value: &T) -> Self::Output;
    }
    
    impl<T, U, W> Normalize<T> for U
    where
        T: Copy,
        U: Copy + Div<T, Output = W> + Mul<T, Output = W>,
    {
        type Output = W;
        fn normalize(&self, baseline_value: &T) -> Self::Output { *self / *baseline_value }
        fn denormalize(&self, baseline_value: &T) -> Self::Output { *self * *baseline_value }
    }
    
    impl<T> Normalize<CanvasSize<T>> for Rectangle
    where
        T: Copy,
        f32: Normalize<T, Output = f32>
    {
        type Output = Rectangle;
    
        fn normalize(&self, baseline_value: &CanvasSize<T>) -> Self::Output {
            Rectangle {
                x1: self.x1.normalize(&baseline_value.width),
                y1: self.y1.normalize(&baseline_value.height),
                x2: self.x2.normalize(&baseline_value.width),
                y2: self.y2.normalize(&baseline_value.height),
            }
        }
        fn denormalize(&self, baseline_value: &CanvasSize<T>) -> Self::Output {
            Rectangle {
                x1: self.x1.denormalize(&baseline_value.width),
                y1: self.y1.denormalize(&baseline_value.height),
                x2: self.x2.denormalize(&baseline_value.width),
                y2: self.y2.denormalize(&baseline_value.height),
            }
        }
    }

    ISO, 13 Сентября 2025

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

    0

    1. 1
    Политота #36

    #6: (vanished) https://govnokod.xyz/_26648
    #7: https://govnokod.ru/26673 https://govnokod.xyz/_26673
    #8: https://govnokod.ru/27052 https://govnokod.xyz/_27052
    #9: (vanished) https://govnokod.xyz/_27852
    #10: https://govnokod.ru/28060 https://govnokod.xyz/_28060
    #11: https://govnokod.ru/28091 https://govnokod.xyz/_28091
    #12: https://govnokod.ru/28103 https://govnokod.xyz/_28103
    #13: https://govnokod.ru/28144 https://govnokod.xyz/_28144
    #14: https://govnokod.ru/28270 https://govnokod.xyz/_28270
    #15: https://govnokod.ru/28341 https://govnokod.xyz/_28341
    #16: https://govnokod.ru/28379 https://govnokod.xyz/_28379
    #17: https://govnokod.ru/28394 https://govnokod.xyz/_28394
    #18: https://govnokod.ru/28440 https://govnokod.xyz/_28440
    #19: https://govnokod.ru/28572 https://govnokod.xyz/_28572
    #20: https://govnokod.ru/28656 https://govnokod.xyz/_28656
    #21: (vanished) https://govnokod.xyz/_28666
    #22: https://govnokod.ru/28676 https://govnokod.xyz/_28676
    #23: https://govnokod.ru/28684 https://govnokod.xyz/_28684
    #24: https://govnokod.ru/28691 https://govnokod.xyz/_28691
    #25: https://govnokod.ru/28698 https://govnokod.xyz/_28698
    #26: https://govnokod.ru/28704 https://govnokod.xyz/_28704
    #27: https://govnokod.ru/28711 https://govnokod.xyz/_28711
    #28: https://govnokod.ru/28721 https://govnokod.xyz/_28721
    #29: https://govnokod.ru/28728 https://govnokod.xyz/_28728
    #30: (vanished) https://govnokod.xyz/_28747
    #31: https://govnokod.ru/28757 https://govnokod.xyz/_28757
    #32: https://govnokod.ru/28770 https://govnokod.xyz/_28770
    #33: https://govnokod.ru/28835 https://govnokod.xyz/_28835
    #34: https://govnokod.ru/28924 https://govnokod.xyz/_28924
    #35: https://govnokod.ru/29080 https://govnokod.xyz/_29080

    nepeKamHblu_nemyx, 11 Сентября 2025

    Комментарии (57)
  4. C++ / Говнокод #29176

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    SparseMatrix<double> mat(rows,cols);
    for (int k=0; k<mat.outerSize(); ++k)
      for (SparseMatrix<double>::InnerIterator it(mat,k); it; ++it)
      {
        it.value();
        it.row();   // row index
        it.col();   // col index (here it is equal to k)
        it.index(); // inner index, here it is equal to it.row()
      }

    Random access to the elements of a sparse object can be done through the coeffRef(i,j) function. However, this function involves a quite expensive binary search. In most cases, one only wants to iterate over the non-zeros elements. This is achieved by a standard loop over the outer dimension, and then by iterating over the non-zeros of the current inner vector via an InnerIterator. Thus, the non-zero entries have to be visited in the same order than the storage order.

    CHayT, 03 Сентября 2025

    Комментарии (4)
  5. JavaScript / Говнокод #29175

    +1

    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
    /* "[...] To fix this I added a delay at the end of the function and the events
    now fire properly. Thank you for all of your help. Fixed Code:"
    */
    
    data.indexedDB.addSource = function(sourceBlob) {
    //adds source to data base
      var version = 1;
      var request = indexedDB.open("content", version);
      request.onerror = errorHandler;
      request.onsuccess = function(e) {
        db = e.target.result;
        var trans = db.transaction(["nContent"], "readwrite");
        var store = trans.objectStore("nContent");
        var request = store.put(sourceBlob);
        trans.oncomplete = function(e) {
          extron.indexedDB.getIndexedSource();
        };
    
      };
        var token = 100000;
        while(token != 0)
        {
          token = token-1;
    
        }
    };

    https://stackoverflow.com/questions/27494247/why-is-my-indexeddb-open-onsuccess-event-not-called

    ISO, 02 Сентября 2025

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

    0

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

    #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
    #111: https://govnokod.ru/29142 https://govnokod.xyz/_29142
    #112: https://govnokod.ru/29155 https://govnokod.xyz/_29155
    #113: https://govnokod.ru/29160 https://govnokod.xyz/_29160
    #114: https://govnokod.ru/29165 https://govnokod.xyz/_29165
    #115: https://govnokod.ru/29173 https://govnokod.xyz/_29173

    nepeKamHblu_nemyx, 01 Сентября 2025

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

    0

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

    #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
    #111: https://govnokod.ru/29142 https://govnokod.xyz/_29142
    #112: https://govnokod.ru/29155 https://govnokod.xyz/_29155
    #113: https://govnokod.ru/29160 https://govnokod.xyz/_29160
    #114: https://govnokod.ru/29165 https://govnokod.xyz/_29165

    nepeKamHblu_nemyx, 21 Августа 2025

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

    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
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    (ql:quickload :blockchain)
    (ql:quickload :quantum)
    (ql:quickload :windows)
    (ql:quickload :connector-5g)
    (ql:quickload :connector-4g)
    (ql:quickload :nft)
    (ql:quickload :nn-lisp)
    (ql:quickload :rl)
    (ql:quickload :cl-cuda)
    (ql:quickload :cl-tpu)
    (ql:quickload :cl-blas)
    (ql:quickload :cl-cublas)
    (ql:quickload :cudnn)
    (ql:quickload :spike)
    (ql:quickload :sparse-tensor)
    (ql:quickload :trivial-cpu)
    
    (defpackage :skynet.core.nn
      (:use :cl))
    
    ;; AGPL 3.0
    ;; ALL RIGHTS ARE RESERVED
    
    ;;;; *-* Mode: Lisp *-*
    ;; Author: John McCarthy II
    ;; License: AGPL 3.0
    ;; File: skynet-nn.lisp
    ;; Filepath: skynet/core/skynet-nn.lisp
    ;;;;
    
    (defun ai-cublas-tpu-engine-nft-innovative-algorithm-revolutionary-neural-network-blas-cudnn-5g-4g-quantum-blockchain-lstm-rnn-cnn-gru-fnn-fc-resnet-big-data-machine-learning-data-science (blockchain 5g ai)
      "Uploads information from the blockchain to artificial intelligence through modern technologies"
    
      ;; Initialize the blockchain and adapter
    
      (let* ((msg "GET_BLOCKCHAIN_AI_DATA")
                (data (or 
                             (connector-5g:load-data-from-server msg)
                             (connector-4g:load-data-from-server msg)))
                (nn-prediction (nn-lisp:forward ai data))
                (device (or
                               (tpu:is-available)
                               (gpu:is-available)
                               (trivial-cpu:get-device))))
      (setf (blockchain:data blockchain) nn-prediction)
      (setf (blockchain:silent-mode blockchain) nil)
      (setf (blockchain:backend blockchain) device)
      (blockchain:start-blockchain blockchain))
    
      ;; Now we need to use hardware acceleration
    
      (defun relu ())
      (defun sigmoid ())
       
      (setf #'relu (or #'cudnn:relu #'nnl2:relu)
               #'sigmoid (or #'cudnn:sigmoid #'nnl2:sigmoid)) 
       
    
      ;; We get a prediction of a modern neural network spike
    
      (let ((snn (spike:make-snn :in 4 :out 8 :reward (rl:make-q-table)))) (blockchain:transfer blockchain :to snn :alignment 4)
      (windows:make-snapshot)
      (quantum:lparallel #'(lambda () (spike:prediction :keyc #'relu :keyd #'sigmoid :to ai :meta (nft:get-latest-metadata))
    
      ;; We copy the AI data to the tensor and return
    
      (let ((data (sparse:make-tensor (nnl-lisp:data ai))))
        data))

    lisp-worst-code, 15 Августа 2025

    Комментарии (2)
  9. bash / Говнокод #29171

    0

    1. 1
    echo {a..z} | tr ' ' '\n' | wc -l

    настоящий инженер знает где посмотреть

    mugisbrows, 13 Августа 2025

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

    0

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

    #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
    #6: https://govnokod.ru/29140 https://govnokod.xyz/_29140

    nepeKamHblu_nemyx, 12 Августа 2025

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