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

    −101

    1. 1
    жопаembler — гниль

    rHujlb, 02 Января 2019

    Комментарии (12)
  2. C++ / Говнокод #25257

    −103

    1. 1
    C++ — гниль

    rHujlb, 02 Января 2019

    Комментарии (40)
  3. Assembler / Говнокод #25249

    −2

    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
    execute = 0
    i = 100
    while i < $
        load a byte from i
        if a = 0xc3
            execute = i
            i = $
        else
            i = i + 1
        end if
    end while
    
    if execute = 0
    display "ret not found", 13, 10
    execute = $
    ret
    end if

    Прежде чем объявлять подпрограмму, тсарь пройдётся по уже собранному коду в поисках нужных ему байт.

    3oJloTou_neTyx, 01 Января 2019

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

    +1

    1. 1
    .

    С Новым Годом, программные инженеры!
    Желаю всем интересной работы, высоких заработков и крепкого здоровья!

    crestoblyad, 01 Января 2019

    Комментарии (8)
  5. C++ / Говнокод #25246

    −1

    1. 1
    .

    Как попасть в гугол по рекомендации Романа Кашицына?

    crestoblyad, 31 Декабря 2018

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

    +2

    1. 1
    Только не это! Нет! Пожалуйста, не надо!!!

    Ну ты питух...

    ne4eHb, 31 Декабря 2018

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

    +1

    1. 1
    <GlobalConverters:EnumOrStringToSolidColorBrushConverter x:Key="UpdaterProcessStatusConverter" Mapping="UpdaterSuccessProcess-=-#01579B;UpdaterErrorProcess-=-#E53935;UpdaterWarningProcess-=-#FBBE44"/>

    XAML из WPF

    Говногость, 31 Декабря 2018

    Комментарии (9)
  8. C++ / Говнокод #25243

    +3

    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
    69. 69
    70. 70
    71. 71
    // A sample standard C++20 program that prints
    // the first N Pythagorean triples.
    #include <iostream>
    #include <optional>
    #include <ranges>   // New header!
     
    using namespace std;
     
    // maybe_view defines a view over zero or one
    // objects.
    template<Semiregular T>
    struct maybe_view : view_interface<maybe_view<T>> {
      maybe_view() = default;
      maybe_view(T t) : data_(std::move(t)) {
      }
      T const *begin() const noexcept {
        return data_ ? &*data_ : nullptr;
      }
      T const *end() const noexcept {
        return data_ ? &*data_ + 1 : nullptr;
      }
    private:
      optional<T> data_{};
    };
     
    // "for_each" creates a new view by applying a
    // transformation to each element in an input
    // range, and flattening the resulting range of
    // ranges.
    // (This uses one syntax for constrained lambdas
    // in C++20.)
    inline constexpr auto for_each =
      []<Range R,
         Iterator I = iterator_t<R>,
         IndirectUnaryInvocable<I> Fun>(R&& r, Fun fun)
            requires Range<indirect_result_t<Fun, I>> {
          return std::forward<R>(r)
            | view::transform(std::move(fun))
            | view::join;
      };
     
    // "yield_if" takes a bool and a value and
    // returns a view of zero or one elements.
    inline constexpr auto yield_if =
      []<Semiregular T>(bool b, T x) {
        return b ? maybe_view{std::move(x)}
                 : maybe_view<T>{};
      };
     
    int main() {
      // Define an infinite range of all the
      // Pythagorean triples:
      using view::iota;
      auto triples =
        for_each(iota(1), [](int z) {
          return for_each(iota(1, z+1), [=](int x) {
            return for_each(iota(x, z+1), [=](int y) {
              return yield_if(x*x + y*y == z*z,
                make_tuple(x, y, z));
            });
          });
        });
     
        // Display the first 10 triples
        for(auto triple : triples | view::take(10)) {
          cout << '('
               << get<0>(triple) << ','
               << get<1>(triple) << ','
               << get<2>(triple) << ')' << '\n';
      }
    }

    «C++20»: ещё больше модерна! Ещё больше шаблонов! Ещё больше ебанутых конструкций! Ещё больше блядского цирка!
    s: http://aras-p.info/blog/2018/12/28/Modern-C-Lamentations/

    gost, 30 Декабря 2018

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

    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
    import java.io.File
    import java.io.FileReader
    
    fun main(args: Array<String>) {
        val text = getText("Input line")
        val fileName = getText("Input file name")
    
        val mode = getInt("Input mode: 1 for rewrite, 2 for append", 1, 2)
    
        doAction(mode, text, fileName)
    }
    
    fun doAction(mode: Int, text : String, fileName : String) {
        val file = File(fileName)
       when(mode) {
           1 -> file.writeText(text)
           2 -> file.appendText(text)
       }
    }
    
    fun getInt(message: String, min : Int, max: Int) : Int {
    
        var buffer : Int?
    
        do {
            print(message)
            buffer = readLine()?.toIntOrNull()
        }
        while (buffer == null || buffer !in min..max)
    
        return buffer
    }
    
    fun getText(message : String) : String {
        print(message)
        return readLine() ?: ""
    }

    Решил добавить немного говнокода на Kotlin

    Tryff, 29 Декабря 2018

    Комментарии (4)
  10. Assembler / Говнокод #25239

    +2

    1. 1
    2. 2
    3. 3
    https://www.researchgate.net/publication/325358150_cQASM_v10_Towards_a_Common_Quantum_Assembly_Language
    
    cQASM v1.0: Towards a Common Quantum Assembly Language

    The quantum assembly language (QASM) is a popular intermediate representation used in many quantum compilation and simulation tools to describe quantum circuits. Currently, multiple different dialects of QASM are used in different quantum computing tools. This makes the interaction between those tools tedious and time-consuming due to the need for translators between theses different syntaxes. Beside requiring a multitude of translators, the translation process exposes the constant risk of loosing information due to the potential incompatibilities between the different dialects. Moreover, several tools introduce details of specific target hardware or qubit technologies within the QASM syntax and prevent porting the code to other hardwares. In this paper, we propose a common QASM syntax definition, named cQASM, which aims to abstract away qubit technology details and guarantee the interoperability between all the quantum compilation and simulation tools supporting this standard. Our vision is to enable an extensive quantum computing toolbox shared by all the quantum computing community.

    Вот это я понимаю, а то вон там мелкософт какие-то говношарпы придумывает очередные:

    https://docs.microsoft.com/en-us/quantum/language/?view=qsharp-preview


    Нахер ваши шарпы с вашим сраным дуднетом и прочей такой хуйней, даешь Assembler.

    j123123, 28 Декабря 2018

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