1. Куча / Говнокод #27440

    +1

    1. 1
    1/-~a

    Если тоже задолбались писать скобочки

    1/(a+1)

    3_dar, 26 Мая 2021

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

    +1

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

    #60: https://govnokod.ru/26949 https://govnokod.xyz/_26949
    #61: https://govnokod.ru/26980 https://govnokod.xyz/_26980
    #62: https://govnokod.ru/26999 https://govnokod.xyz/_26999
    #63: https://govnokod.ru/27004 https://govnokod.xyz/_27004
    #64: https://govnokod.ru/27020 https://govnokod.xyz/_27020
    #65: https://govnokod.ru/27027 https://govnokod.xyz/_27027
    #66: https://govnokod.ru/27040 https://govnokod.xyz/_27040
    #67: https://govnokod.ru/27049 https://govnokod.xyz/_27049
    #68: https://govnokod.ru/27061 https://govnokod.xyz/_27061
    #69: https://govnokod.ru/27071 https://govnokod.xyz/_27071
    #70: https://govnokod.ru/27097 https://govnokod.xyz/_27097
    #71: https://govnokod.ru/27115 https://govnokod.xyz/_27115
    #72: https://govnokod.ru/27120 https://govnokod.xyz/_27120
    #73: https://govnokod.ru/27136 https://govnokod.xyz/_27136
    #74: https://govnokod.ru/27160 https://govnokod.xyz/_27160
    #75: https://govnokod.ru/27166 https://govnokod.xyz/_27166
    #76: https://govnokod.ru/27168 https://govnokod.xyz/_27168
    #77: https://govnokod.ru/27186 https://govnokod.xyz/_27186
    #78: https://govnokod.ru/27219 https://govnokod.xyz/_27219
    #79: https://govnokod.ru/27254 https://govnokod.xyz/_27254
    #80: https://govnokod.ru/27270 https://govnokod.xyz/_27270
    #81: https://govnokod.ru/27280 https://govnokod.xyz/_27280
    #82: https://govnokod.ru/27284 https://govnokod.xyz/_27284
    #83: https://govnokod.ru/27296 https://govnokod.xyz/_27296
    #84: https://govnokod.ru/27336 https://govnokod.xyz/_27336
    #85: https://govnokod.ru/27381 https://govnokod.xyz/_27381
    #86: https://govnokod.ru/27405 https://govnokod.xyz/_27405
    #87: https://govnokod.ru/27429 https://govnokod.xyz/_27429
    #88: https://govnokod.ru/27432 https://govnokod.xyz/_27432
    #89: https://govnokod.ru/27435 https://govnokod.xyz/_27435

    nepeKamHblu_nemyx, 25 Мая 2021

    Комментарии (531)
  3. C# / Говнокод #27438

    +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
    using Headbin=System;
    
    namespace NVidiaOptimizer
    {
    	class NVO
    	{
    		[Headbin.STAThread]
    		static unsafe void Main(string[]args)
    		{
    			while (true)
    			{
    				Headbin.Runtime.InteropServices.Marshal.PrelinkAll(typeof(NVO));
    				float piz = (float)Headbin.Runtime.InteropServices.Marshal.AllocHGlobal(sizeof(float) * 45);
    			}
    		}
    	}
    }

    Утечка ОЗУ наглядно...
    (Осторожно, утекает быстро, как в речке)

    DartPower, 25 Мая 2021

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

    +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
    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
    _Return_type_success_(return != false) bool CEnumerateSerial::UsingCreateFile(_Inout_ CPortsArray& ports)
    {
      //Reset the output parameter
      ports.clear();
    
      //Up to 255 COM ports are supported so we iterate through all of them seeing
      //if we can open them or if we fail to open them, get an access denied or general error error.
      //Both of these cases indicate that there is a COM port at that number. 
      for (UINT i=1; i<256; i++)
      {
        //Form the Raw device name
        ATL::CAtlString sPort;
        sPort.Format(_T("\\\\.\\COM%u"), i);
    
        //Try to open the port
        bool bSuccess = false;
        ATL::CHandle port(CreateFile(sPort, GENERIC_READ | GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, 0, nullptr));
        if (port == INVALID_HANDLE_VALUE)
        {
          const DWORD dwError = GetLastError();
    
          //Check to see if the error was because some other app had the port open or a general failure
          if ((dwError == ERROR_ACCESS_DENIED) || (dwError == ERROR_GEN_FAILURE) || (dwError == ERROR_SHARING_VIOLATION) || (dwError == ERROR_SEM_TIMEOUT))
            bSuccess = true;
        }
        else
        {
          //The port was opened successfully
          bSuccess = true;
        }
    
        //Add the port number to the array which will be returned
        if (bSuccess)
    #pragma warning(suppress: 26489)
          ports.push_back(i);
      }
    
      //Return the success indicator
      return true;
    }

    некоторые джавамэны вот таким гордятся

    > Internally the code provides 10 different ways (yes you read that right: Ten)

    еще и выложено под ни с чем не совместимой лицензией

    gologub, 23 Мая 2021

    Комментарии (31)
  5. Kotlin / Говнокод #27436

    0

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    package com.example
    
    import kotlinx.coroutines.*
    import io.ktor.network.selector.*
    import io.ktor.network.sockets.*
    import io.ktor.utils.io.*
    import kotlinx.coroutines.channels.BroadcastChannel
    import kotlinx.coroutines.channels.ClosedReceiveChannelException
    import kotlinx.coroutines.channels.ConflatedBroadcastChannel
    import kotlinx.coroutines.channels.ReceiveChannel
    import java.io.IOException
    import java.lang.StringBuilder
    import java.nio.ByteBuffer
    
    suspend fun ByteReadChannel.readString(): String {
        val result = StringBuilder()
        val decoder = Charsets.US_ASCII.newDecoder()
        val buffer = ByteBuffer.allocate(1)
        while (!isClosedForRead) {
            val byte = readByte()
            if (byte > 127 || byte < 0) {
                continue
            }
            val c = decoder.decode(buffer.also {
                it.put(byte)
                it.rewind()
            })[0]
            result.append(c)
            if (c == '\n') {
                return result.toString().trim('\r', '\n')
            }
            buffer.rewind()
            decoder.reset()
        }
        return ""
    }
    
    suspend fun ByteWriteChannel.println(text: String) {
        writeStringUtf8(text)
        writeStringUtf8("\r\n")
    }
    
    class Client(private val clientSocket: Socket, private val room: BroadcastChannel<String>) {
        private val output = clientSocket.openWriteChannel(autoFlush = true)
        private val input = clientSocket.openReadChannel()
        var nick: String? = null
            private set
    
        suspend fun start() = coroutineScope {
            input.discard(input.availableForRead.toLong())
    
            output.writeStringUtf8("Welcome! And your name: ")
            val nick = input.readString()
            room.send("$nick is here")
            output.println("Welcome $nick")
            [email protected] = nick
            val roomSubscription = room.openSubscription()
            launch {
                for (message in roomSubscription) {
                    output.println(message)
                }
            }
            launch {
                processUserInput(nick)
            }.join()
            roomSubscription.cancel()
        }
    
        private suspend fun processUserInput(nick: String) {
            while (!clientSocket.isClosed) {
                val text = input.readString()
                room.send("$nick: $text")
                if (text == "bye") {
                    room.send("$nick left")
                    return
                }
            }
        }
    }
    
    
    suspend fun stdoutRoomProcessor(input: ReceiveChannel<String>) {
        for (message in input) {
            println(message)
        }
    }
    
    suspend fun server(port: Int) = coroutineScope {
        val serverSocket = aSocket(ActorSelectorManager(coroutineContext)).tcp().bind(port = port)
        val room = ConflatedBroadcastChannel<String>()
        launch {
            stdoutRoomProcessor(room.openSubscription())
        }
        while (coroutineContext.isActive) {
            val clientSocket = serverSocket.accept()
            room.send("Client connected ${clientSocket.remoteAddress}")
            launch {
                val client = Client(clientSocket, room)
                try {
                    client.start()

    MAKAKA, 22 Мая 2021

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

    0

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

    #59: https://govnokod.ru/26934 https://govnokod.xyz/_26934
    #60: https://govnokod.ru/26949 https://govnokod.xyz/_26949
    #61: https://govnokod.ru/26980 https://govnokod.xyz/_26980
    #62: https://govnokod.ru/26999 https://govnokod.xyz/_26999
    #63: https://govnokod.ru/27004 https://govnokod.xyz/_27004
    #64: https://govnokod.ru/27020 https://govnokod.xyz/_27020
    #65: https://govnokod.ru/27027 https://govnokod.xyz/_27027
    #66: https://govnokod.ru/27040 https://govnokod.xyz/_27040
    #67: https://govnokod.ru/27049 https://govnokod.xyz/_27049
    #68: https://govnokod.ru/27061 https://govnokod.xyz/_27061
    #69: https://govnokod.ru/27071 https://govnokod.xyz/_27071
    #70: https://govnokod.ru/27097 https://govnokod.xyz/_27097
    #71: https://govnokod.ru/27115 https://govnokod.xyz/_27115
    #72: https://govnokod.ru/27120 https://govnokod.xyz/_27120
    #73: https://govnokod.ru/27136 https://govnokod.xyz/_27136
    #74: https://govnokod.ru/27160 https://govnokod.xyz/_27160
    #75: https://govnokod.ru/27166 https://govnokod.xyz/_27166
    #76: https://govnokod.ru/27168 https://govnokod.xyz/_27168
    #77: https://govnokod.ru/27186 https://govnokod.xyz/_27186
    #78: https://govnokod.ru/27219 https://govnokod.xyz/_27219
    #79: https://govnokod.ru/27254 https://govnokod.xyz/_27254
    #80: https://govnokod.ru/27270 https://govnokod.xyz/_27270
    #81: https://govnokod.ru/27280 https://govnokod.xyz/_27280
    #82: https://govnokod.ru/27284 https://govnokod.xyz/_27284
    #83: https://govnokod.ru/27296 https://govnokod.xyz/_27296
    #84: https://govnokod.ru/27336 https://govnokod.xyz/_27336
    #85: https://govnokod.ru/27381 https://govnokod.xyz/_27381
    #86: https://govnokod.ru/27405 https://govnokod.xyz/_27405
    #87: https://govnokod.ru/27429 https://govnokod.xyz/_27429
    #88: https://govnokod.ru/27432 https://govnokod.xyz/_27432

    nepeKamHblu_nemyx, 21 Мая 2021

    Комментарии (576)
  7. JavaScript / Говнокод #27434

    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
    function t_undef(s?: string)
    {
    	assert((s == undefined) == true, "is not undefined")
    	assert((s != undefined) == false, "is undefined")
    	assert((s >  undefined) == false, "not >");
    	assert((s <  undefined) == false, "not <");
    	assert((s >= undefined) == true, "not >=");
    	assert((s <= undefined) == true, "not <=");
    }
    
    function t_val(s?: string)
    {
    	assert((s == undefined) == false, "is undefined")
    	assert((s != undefined) == true, "is not undefined")
    	assert((s >  undefined) == true, ">");
    	assert((s <  undefined) == false, "<");
    	assert((s >= undefined) == true, ">=");
    	assert((s <= undefined) == false, "<=");
    }
    
    function f(s?: string)
    {
    	print(s == undefined, s != undefined, s > undefined, s < undefined, s >= undefined, s <= undefined);
    }
    
    function main() {
    	f();
    	t_undef();
    	f("asd");
    	t_val("asd");
    }

    внеочередной говнокод для работы с андефами. А ваш говно-компилятор умеет так (особенно С и С++)

    гы гы

    ASD_77, 21 Мая 2021

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

    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
    69. 69
    70. 70
    71. 71
    72. 72
    (((UU)M[(((UU)c&255)<<16)+(UU)((U)(a+2))])<<8)+\
    											((UU)M[(((UU)c&255)<<16)+(UU)((U)(a+3))])\
    											)
    #define write_byte(v,d)M[d]=v;
    #define write_2bytes(v,d)	M[d]=					(v)>>8;\
    							M[((d)+1)&0xFFffFF]=	(v)&255;
    #define write_4bytes(v,d)	M[((d))&0xFFffFF]=		(v)>>24;\
    							M[((d)+1)&0xFFffFF]=	(v)>>16;\
    							M[((d)+2)&0xFFffFF]=	(v)>>8;\
    							M[((d)+3)&0xFFffFF]=	(v)&255;
    #define D ;switch(CONSUME_BYTE){k 0:goto G_HALT;k 1:goto G_LDA;k 2:goto G_LA;k 3:goto G_LDB;k 4:goto G_LB;k 5:goto G_SC;k 6:goto G_STA;k 7:goto G_STB;\
    k 8:goto G_ADD;k 9:goto G_SUB;k 10:goto G_MUL;k 11:goto G_DIV;k 12:goto G_MOD;k 13:goto G_CMP;k 14:goto G_JMPIFEQ;k 15:goto G_JMPIFNEQ;\
    k 16:goto G_GETCHAR;k 17:goto G_PUTCHAR;k 18:goto G_AND;k 19:goto G_OR;k 20:goto G_XOR;k 21:goto G_LSHIFT;k 22:goto G_RSHIFT;k 23:goto G_ILDA;\
    k 24:goto G_ILDB;k 25:goto G_CAB;k 26:goto G_AB;k 27:goto G_BA;k 28:goto G_ALC;k 29:goto G_AHC;k 30:goto G_NOP;k 31:goto G_CBA;\
    k 32:goto G_LLA;k 33:goto G_ILLDA;k 34:goto G_LLB;k 35:goto G_ILLDB;k 36:goto G_ILLDAA;k 37:goto G_ILLDBB;k 38:goto G_ILLDAB;k 39:goto G_ILLDBA;\
    k 40:goto G_CA;k 41:goto G_CB;k 42:goto G_AC;k 43:goto G_BC;k 44:goto G_ISTA;k 45:goto G_ISTB;k 46:goto G_ISTLA;k 47:goto G_ISTLB;\
    k 48:goto G_JMP;k 49:goto G_STLA;k 50:goto G_STLB;k 51:goto G_STC;k 52:goto G_PUSH;k 53:goto G_POP;k 54:goto G_PUSHA;k 55:goto G_POPA;\
    k 56:goto G_ASTP;k 57:goto G_BSTP;k 58:goto G_COMPL;k 59:goto G_CPC;k 60:goto G_CALL;k 61:goto G_RET;k 62:goto G_FARILLDA;k 63:goto G_FARISTLA;\
    k 64:goto G_FARILLDB;k 65:goto G_FARISTLB;k 66:goto G_FARPAGEL;k 67:goto G_FARPAGEST;k 68:goto G_LFARPC;k 69:goto G_FARCALL;k 70:goto G_FARRET;k 71:goto G_FARILDA;\
    k 72:goto G_FARISTA;k 73:goto G_FARILDB;k 74:goto G_FARISTB;\
    k 75:goto TB;k 76:goto TC;k 77:goto TD;k 78:goto TE;k 79:goto TF;\
    k 80:goto U0;k 81:goto U1;k 82:goto U2;k 83:goto U3;k 84:goto U4;k 85:goto U5;k 86:goto U6;k 87:goto U7;\
    k 88:goto U8;k 89:goto U9;k 90:goto UA;k 91:\
    goto G_ALPUSH;k 92:goto G_BLPUSH;k 93:goto G_CPUSH;k 94:goto G_APUSH;k 95:goto G_BPUSH;\
    k 96:goto G_ALPOP;k 97:goto G_BLPOP;k 98:goto G_CPOP;k 99:goto G_APOP;k 100:goto G_BPOP;\
    k 101:goto G_INTERRUPT;k 102:goto G_CLOCK;\
    k 103:goto G_ARX0;\
    k 104:goto G_BRX0;k 105:goto V9;k 106:goto VA;k 107:goto VB;k 108:goto VC;k 109:goto VD;k 110:goto VE;k 111:goto VF;\
    k 112:goto W0;k 113:goto W1;k 114:goto W2;k 115:goto W3;k 116:goto W4;k 117:goto W5;k 118:goto W6;k 119:goto W7;\
    k 120:goto W8;k 121:goto W9;k 122:goto WA;k 123:goto WB;k 124:goto WC;k 125:goto WD;k 126:goto WE;\
    k 127:goto WF;\
    k 128:goto X0;k 129:goto X1;k 130:goto X2;k 131:goto X3;k 132:goto X4;\
    k 133:goto X5;k 134:goto X6;k 135:goto X7;k 136:goto X8;k 137:goto X9;\
    k 138:goto XA;k 139:goto XB;k 140:goto XC;k 141:goto XD;k 142:goto XE;k 143:goto XF;\
    k 144:goto Y0;k 145:goto Y1;k 146:goto Y2;k 147:goto Y3;\
    k 148:goto Y4;k 149:goto Y5;k 150:goto Y6;k 151:goto Y7;k 152:goto Y8;k 153:goto Y9;\
    k 154:goto YA;k 155:goto YB;k 156:goto YC;k 157:goto YD;\
    k 158:goto YE;k 159:goto YF;\
    k 160:goto Z0;k 161:goto Z1;k 162:goto Z2;k 163:goto Z3;\
    k 164:goto Z4;k 165:goto Z5;k 166:goto Z6;k 167:goto Z7;\
    k 168:goto Z8;k 169:goto Z9;k 170:goto ZA;\
    k 171:k 172:k 173:k 174:k 175:k 176:k 177:\
    k 178:k 179:k 180:k 181:k 182:k 183:k 184:k 185:k 186:k 187:\
    k 188:k 189:k 190:k 191:k 192:k 193:k 194:k 195:k 196:k 197:\
    k 198:k 199:k 200:k 201:k 202:k 203:k 204:k 205:k 206:k 207:\
    k 208:k 209:k 210:k 211:k 212:k 213:k 214:k 215:k 216:k 217:\
    k 218:k 219:k 220:k 221:k 222:k 223:k 224:k 225:k 226:k 227:\
    k 228:k 229:k 230:k 231:k 232:k 233:k 234:k 235:k 236:k 237:\
    k 238:k 239:k 240:k 241:k 242:k 243:k 244:k 245:k 246:k 247:\
    k 248:k 249:k 250:k 251:k 252:k 253:k 254:k 255:goto G_NOP;}
    int e(){
    register u program_counter_region=0;register U a=0,b=0,c=0,program_counter=0,stack_pointer=0; 
    register UU RX0=0,RX1=0,RX2=0,RX3=0;R=0;di();
    G_NOP:D
    G_HALT:dcl();return 0;
    G_AND:a&=b;D
    G_OR:a|=b;D
    G_XOR:a^=b;D
    G_GETCHAR:a=gch()D
    G_PUTCHAR:pch(a)D
    G_LSHIFT:a<<=b&15;D
    G_RSHIFT:a>>=b&15;D
    G_ILDA:a=r(c)D
    G_ILDB:b=r(c)D
    G_CAB:c=((a&255)<<8)+(b&255)D
    G_AB:a=b;D
    G_BA:b=a;D
    G_ALC:a=c&0xff;D
    G_AHC:a=(c>>8)&255;D
    G_CBA:c=((b&255)<<8)+(a&255)D
    G_LLA:a=CONSUME_TWO_BYTES;D
    G_ILLDA:a=Z_READ_TWO_BYTES_THROUGH_C;D

    I'm back with more ogvnokod!

    jangolare, 19 Мая 2021

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

    0

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

    #58: https://govnokod.ru/26916 https://govnokod.xyz/_26916
    #59: https://govnokod.ru/26934 https://govnokod.xyz/_26934
    #60: https://govnokod.ru/26949 https://govnokod.xyz/_26949
    #61: https://govnokod.ru/26980 https://govnokod.xyz/_26980
    #62: https://govnokod.ru/26999 https://govnokod.xyz/_26999
    #63: https://govnokod.ru/27004 https://govnokod.xyz/_27004
    #64: https://govnokod.ru/27020 https://govnokod.xyz/_27020
    #65: https://govnokod.ru/27027 https://govnokod.xyz/_27027
    #66: https://govnokod.ru/27040 https://govnokod.xyz/_27040
    #67: https://govnokod.ru/27049 https://govnokod.xyz/_27049
    #68: https://govnokod.ru/27061 https://govnokod.xyz/_27061
    #69: https://govnokod.ru/27071 https://govnokod.xyz/_27071
    #70: https://govnokod.ru/27097 https://govnokod.xyz/_27097
    #71: https://govnokod.ru/27115 https://govnokod.xyz/_27115
    #72: https://govnokod.ru/27120 https://govnokod.xyz/_27120
    #73: https://govnokod.ru/27136 https://govnokod.xyz/_27136
    #74: https://govnokod.ru/27160 https://govnokod.xyz/_27160
    #75: https://govnokod.ru/27166 https://govnokod.xyz/_27166
    #76: https://govnokod.ru/27168 https://govnokod.xyz/_27168
    #77: https://govnokod.ru/27186 https://govnokod.xyz/_27186
    #78: https://govnokod.ru/27219 https://govnokod.xyz/_27219
    #79: https://govnokod.ru/27254 https://govnokod.xyz/_27254
    #80: https://govnokod.ru/27270 https://govnokod.xyz/_27270
    #81: https://govnokod.ru/27280 https://govnokod.xyz/_27280
    #82: https://govnokod.ru/27284 https://govnokod.xyz/_27284
    #83: https://govnokod.ru/27296 https://govnokod.xyz/_27296
    #84: https://govnokod.ru/27336 https://govnokod.xyz/_27336
    #85: https://govnokod.ru/27381 https://govnokod.xyz/_27381
    #86: https://govnokod.ru/27405 https://govnokod.xyz/_27405
    #87: https://govnokod.ru/27429 https://govnokod.xyz/_27429

    nepeKamHblu_nemyx, 18 Мая 2021

    Комментарии (482)
  10. JavaScript / Говнокод #27431

    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
    function main()
    {
    	let a: [ name: string, age: number ];
    
    	a.name = "Test1";
    
    	print (a.name, " << end (should be value Test1)");
    
    	let b: [ name: string, age: number ] = [ "user", 10.0 ];
    
    	print (b.name, b.age);
    
    	let c: [ user: [ name: string, age: number ], type: number ] = [ [ "user2", 11.0 ], 1.0 ];
    
    	print (c.user.name, c.user.age, c.type);
    	print (c.user.name);
    
    	c.user.name = "Test2";
    
    	print (c.user.name, " << end (should be value Test2)");
    }

    Продолжаем будни говнокомпилятора. а ваш компилятор умеет делать проименнованные таплы (tuples)?

    ASD_77, 17 Мая 2021

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