Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


1of1 servers sending DDoS attacks - Page 6
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

1of1 servers sending DDoS attacks

12346»

Comments

  • edited April 12

    @ahnlak said:

    @lukast__ said:

    @totally_not_banned said: Oh, and by the way: goto has perfectly fine use cases. If you can simplify the cleanup of your function by the use of goto... just do it!

    Yes, with goto many things can be done a lot shorter and also easier to understand.

    I've heard many (usually wrong) arguments in favour of gotos, but "easier to understand" is a bold one.

    While it's certainly possible to get yourself in so many knots that it's the only way out, I count on one hand the number of times I've used it in the last 35 years, and still have plenty of fingers left.

    He's pretty much right. We are talking C here after all. You don't have a lot (or really any) advanced flow control constructs and when you have some function that allocates various resources but can also fail at any given step the cleanest, most efficient and most easy to read option is actually goto. The alternatives would pretty much be either duplicating a lot of code or pointless if statements. Duplication might be an option if it's just 2 or maybe 3 resources that need to be cleaned up but beyond that anything but goto is basically madness and probably not justified by anything but the goto is evil mantra.

    Thanked by 2lukast__ wiggy
  • @ahnlak said: I've heard many (usually wrong) arguments in favour of gotos, but "easier to understand" is a bold one.

    For example a part of a minimal http client I wrote some time ago:

    if (/* connecting failed */) {
        write_const_stderr("Connecting failed");
        goto err;
    }
    if (write(sock, /* http request */) < /* request length */) {
        write_const_stderr("Writing failed");
        goto err;
    }
    if ((read_len = read(sock, buf, 1024)) < strlen(/* mimimal http response */)) {
        write_const_stderr("Reading failed");
        goto err;
    }
    while (i < read_len && memcmp(&buf[i], "\r\n\r\n", 4) && memcmp(&buf[i], "\n\n", 2)) // not the most efficient, boyer moore would be better
        ++i;
    if (buf[i] == '\r')
        i += 4;
    else if (buf[i] == '\n')
        i += 2;
    else {
        write_const_stderr("Parse error");
        goto err;
    }
    // process response...
    err:
        close(sock);
        // other cleanup, maybe retrying...
    

    That's such a case where something

    @totally_not_banned said: [...] can [...] fail at any given step [...]

    , for example connecting could fail, reading could fail, the response could not contain a http body, ...

    @totally_not_banned said: Duplication might be an option if it's just 2 or maybe 3 resources that need to be cleaned up

    But when you add some other resource, you have to add it everywhere, likely some place is forgot and somehow you then inexplicably run out of file descriptors or memory...

  • edited April 12

    @lukast__

    I was mostly thinking of something like

        if( !( a = allocate_some_resource1() ) ) {
            return 0;
        }
        if( !( b = allocate_some_resource2() ) ) {
            goto err1;
        }
        if( !( c = allocate_some_resource3() ) ) {
            goto err2;
        }
        // do something ...
        return 1;
    
    err2:
        release_some_resource2( b );
    err1:
        release_some_resource1( a );
        return 0;
    

    but in general it's pretty much the same idea as your example, just with more resources added to take care of during failure. At just 3 resources (and a somewhat simple/seldom called cleanup logic) it wouldn't be to bad to just duplicate it and directly return from the if blocks (it's not like a couple bytes of extra code will make much of a difference in 99% of all cases) but beyond that it quickly becomes quite imperative to just centralize the cleanup logic.

    Thanked by 1lukast__
  • ZyperZyper Member

    Hello I'm the person in question that everyone is spreading My screenshot out I don't associate with 1 of 1 I'm the original person who took down Goodleaf servers then goodleaf decided to post my pictures here to start drama with some other hosting @stefeman has posted proof showing I don't like goodleaf or have 0 clue on who 1 of 1 Hosting is I confronted 1 of 1 and they instantly banned me from there discord because they know they are all in the wrong

  • @totally_not_banned said:

    @emgh said: Honestly, it’s because @totally_not_banned knows how to form sentences that are easy to understand

    >

    i heard hes such a big troll. very very bad man

    Oh, what a coincidence! People on Youtube are saying you are very toxic. Is it true?

    Depends. Are you going to pay me $100 for posting a message to me?

  • edited April 12

    @CheepCluck said:

    @totally_not_banned said:

    @emgh said: Honestly, it’s because @totally_not_banned knows how to form sentences that are easy to understand

    >

    i heard hes such a big troll. very very bad man

    Oh, what a coincidence! People on Youtube are saying you are very toxic. Is it true?

    Depends. Are you going to pay me $100 for posting a message to me?

    Well, it's not like i have much of a choice anymore. Seems someone pushed your only real competition out of business. I'm absolutely puzzled as to who would do such a thing.

  • Jack_SBEJack_SBE Member, Patron Provider

    @SillyGoose said:

    @CalmDown said:
    So who's dick, sorry disk, is bigger here?

    Disks are 3.5 inches usually

    my disk is 2.5 inches, my gf says thats ok tho cause it performs better.

    Thanked by 1aqua
  • @Jack_SBE said:

    @SillyGoose said:

    @CalmDown said:
    So who's dick, sorry disk, is bigger here?

    Disks are 3.5 inches usually

    my disk is 2.5 inches, my gf says thats ok tho cause it performs better.

    I use LTO thanks.

    @totally_not_banned said:

    @CheepCluck said:

    @totally_not_banned said:

    @emgh said: Honestly, it’s because @totally_not_banned knows how to form sentences that are easy to understand

    >

    i heard hes such a big troll. very very bad man

    Oh, what a coincidence! People on Youtube are saying you are very toxic. Is it true?

    Depends. Are you going to pay me $100 for posting a message to me?

    Well, it's not like i have much of a choice anymore. Seems someone pushed your only real competition out of business. I'm absolutely puzzled as to who would do such a thing.

    Then i guess what they said about me on youtube is true ☹

  • aquaaqua Member, Host Rep
    edited April 13

    @Jack_SBE said:

    @SillyGoose said:

    @CalmDown said:
    So who's dick, sorry disk, is bigger here?

    Disks are 3.5 inches usually

    my disk is 2.5 inches, my gf says thats ok tho cause it performs better.

    Mine is about the thickness of a NVMe, the constant spelling of "run" from my gf makes me confused though.

  • @aqua said:

    @Jack_SBE said:

    @SillyGoose said:

    @CalmDown said:
    So who's dick, sorry disk, is bigger here?

    Disks are 3.5 inches usually

    my disk is 2.5 inches, my gf says thats ok tho cause it performs better.

    Mine is about the thickness of a NVMe, the constant spelling of "run" from my gf makes me confused though.

    U.2 or M22?

  • aquaaqua Member, Host Rep

    @CheepCluck said:

    @aqua said:

    @Jack_SBE said:

    @SillyGoose said:

    @CalmDown said:
    So who's dick, sorry disk, is bigger here?

    Disks are 3.5 inches usually

    my disk is 2.5 inches, my gf says thats ok tho cause it performs better.

    Mine is about the thickness of a NVMe, the constant spelling of "run" from my gf makes me confused though.

    U.2 or M22?

    M.2

  • edited April 13

    @CheepCluck said:

    @totally_not_banned said:

    @CheepCluck said:

    @totally_not_banned said:

    @emgh said: Honestly, it’s because @totally_not_banned knows how to form sentences that are easy to understand

    >

    i heard hes such a big troll. very very bad man

    Oh, what a coincidence! People on Youtube are saying you are very toxic. Is it true?

    Depends. Are you going to pay me $100 for posting a message to me?

    Well, it's not like i have much of a choice anymore. Seems someone pushed your only real competition out of business. I'm absolutely puzzled as to who would do such a thing.

    Then i guess what they said about me on youtube is true ☹

    Don't worry they got some dirt on me too and while i certainly can't be sure, i don't think it was you putting the guy out of business ;)

Sign In or Register to comment.