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 5
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

1235

Comments

  • @kait said: Rust is way easier to learn

    I agree (although I never learnt Rust), simply because you don't need to know/learn/understand as much to write a program. C is a pain when you don't fully understand it, but when you do it's great and you can write short, fast and efficient programs.

  • edited April 11

    @kait said:

    @totally_not_banned said:

    @kait said:

    @lukast__ said:

    @kait said: [...] in Rust because that is way more accessible to younger devs and myself [...]

    Does it have any other advantages besides memory safety? I see more and more Rust projects, but I'm not entirely convinced it is worth switching (for me) from good old C. (BTW, I'm 15, but certainly not representative for "younger devs")

    Easier to write for non C people, and memory safety and almost as fast as C, other than that, nothing much imo.

    Easier? Really? I'm obviously biased by ~25 years of C but in my opinion C is far easier than any of the more modern languages simply because it has a comparatively small scope. Yeah, it also got a little bloated from C99 onward and those additions are somewhat obscure/arcane/cryptic but it's still very, very simple.

    Rust is probably way better than the monstrosity that is C++ but i bet it still would easily have double the functionality of C. Admittedly C forces you to think around the corner occasionally and drastically punishes you for bad structure but that's pretty much it in forms of complexity. I very much wish C had function/operator overloading though (the first can be faked using generics by now but even in 2024 the second is still fully impossible...).

    C99 is still fine, but the rest yeah. Rust is way easier to learn and faster to write safe code, but C is ofc still the holy grail. But my brain is just to used to higher levels that Rust is the lowest and fastest for me to write.

    Yeah, C probably takes more time to actually write code (the language itself does basically nothing and libc isn't exactly a toolbox either). While i still somewhat doubt the learning part (if you know how programming works you can probably pick up C over a lazy weekend) learning about the possible pitfalls / appropriate constructs is a quite different topic and that's before getting into macros, which can do crazy things (combined with anonymous arrays... the possibilities...) but are basically a whole language inside a language (and make debugging hell if you aren't careful).

  • emghemgh Member

    @kait said:

    @emgh said:

    @kait said:

    @emgh said:
    I raw dog binary

    I raw dog your mom, can I invite you to the DPDK Rust/C thingy as well?

    I mean I appreciate it but I manage devs mainly, if I code, it’s Python or Laravel, so not sure how much I’d be able to help out😆

    Only done some basic stuff in Rust to get the hang of it

    Basically my job requires me to know programming, but not KNOW programming

    Ah no worries <3

    ❤️

    I would like to follow the progress though, especially if you ever start to turn it into a service of some sorts

  • kaitkait Member

    @emgh said:

    @kait said:

    @emgh said:

    @kait said:

    @emgh said:
    I raw dog binary

    I raw dog your mom, can I invite you to the DPDK Rust/C thingy as well?

    I mean I appreciate it but I manage devs mainly, if I code, it’s Python or Laravel, so not sure how much I’d be able to help out😆

    Only done some basic stuff in Rust to get the hang of it

    Basically my job requires me to know programming, but not KNOW programming

    Ah no worries <3

    ❤️

    I would like to follow the progress though, especially if you ever start to turn it into a service of some sorts

    Keep you posted, need a nice homelab and test setup first.

    Thanked by 1emgh
  • @totally_not_banned said: libc isn't exactly a toolbox either

    What do you mean? It has probably way more functions than I know, but there are lots of string functions, many syscall interfaces, malloc+free, qsort, stdio, ...

  • emghemgh Member

    @kait said:

    @emgh said:

    @kait said:

    @emgh said:

    @kait said:

    @emgh said:
    I raw dog binary

    I raw dog your mom, can I invite you to the DPDK Rust/C thingy as well?

    I mean I appreciate it but I manage devs mainly, if I code, it’s Python or Laravel, so not sure how much I’d be able to help out😆

    Only done some basic stuff in Rust to get the hang of it

    Basically my job requires me to know programming, but not KNOW programming

    Ah no worries <3

    ❤️

    I would like to follow the progress though, especially if you ever start to turn it into a service of some sorts

    Keep you posted, need a nice homelab and test setup first.

    Nice! I have some business experience but not completely sure I can offer any help that you don’t already have covered, and obviously that’s further down the line, but if so, do let me know :)

  • edited April 11

    Funfact: How do you spot someone who either got into C in recent years or never was any good at it? They write:

    for(i = 0; i < 100; i++) { ...
    

    instead of

    for(i = 0; i < 100; ++i) { ...
    

    Explanation: In ancient times compilers weren't smart enough to realize you weren't doing anything with the value before incrementing and tended to create an unnecessary copy. That's C for you ;)

    Admittedly these days compilers way past the point where they'd make such silly optimization errors but you might still meet dumb compilers for exotic architectures and in my opinion it's a good example of the tiny little things C expects you to know for writing optimal code in general.

  • emghemgh Member

    @totally_not_banned Funfact: How do you spot someone who’s not very good in Markdown..? :D

    Thanked by 1totally_not_banned
  • ailiceailice Member

    @kait said:
    Easier to write for non C people, and memory safety and almost as fast as C, other than that, nothing much imo.

    It's intresting to know, cause before the day I learn C, I hold my hand to Rust cause it looks modern and spending 2 years including push RiR to edge. I can tell Rust is great if you want touch concept 'real' programming with focus on specific point, rust probably best bet IMO. Rust also have awesome free online book for getting started if you consider to learn!

    And C/C++ is how I do mostly time after that, cause many awesome library coming from here and you would missing many stuff to know If you not know it. Which you can take a look how many wrapper from another programming language it require library from C/C++ which you can tell.

    In the end, as my experience using both. If you tell me to maintain writing big codebase, I rather doing loosen oopsie C/C++ rather Protective Rust.

  • @emgh said:
    @totally_not_banned Funfact: How do you spot someone who’s not very good in Markdown..? :D

    Yeah, that's actually very true :D

    Thanked by 1emgh
  • edited April 11

    @lukast__ said:

    @totally_not_banned said: libc isn't exactly a toolbox either

    What do you mean? It has probably way more functions than I know, but there are lots of string functions, many syscall interfaces, malloc+free, qsort, stdio, ...

    Yeah, it has many functions but most of them don't really do a whole lot on their own. Just take something very, very simple like concatenating two strings for example. You don't have any generic way of doing that. It all depends on your setup and requirements.

    Maybe you can be sure the buffer is long enough, so you can just find the end of string 1 and copy string 2 there (or just take the lazy way of sprintf with a "%s%s" format), maybe you aren't sure but don't really care if it gets cut off, maybe you aren't sure and cutting the trailing end is not an option, ... All of these will result in different code and none of them is a single operation (well mostly...) where in C++ for example (and probably Rust) you can just use the + operator on two string objects and (usually) be done with it.

  • @totally_not_banned said: In ancient times compilers weren't smart enough to realize you weren't doing anything with the value before incrementing and tended to create an unnecessary copy.

    AFAIK, if you disable optimizations, the copy is still created. But I knew that actually :wink:
    And that incrementing-after-evaluating is so often unnecessarily used, when I see such a mistake, I ask myself that if the programmer does that, what else might he have done wrong/inperformant? Often that are programs where sprintf/strcat are also used extensively.

  • @totally_not_banned said: so you can just find the end of string 1 and copy string 2 there

    Optimally you already know the length of string 1 as the time needed by strlen is dependant on the length of the string, and optimally the length of string 2 is also known so that you can simply use memcpy.

    But I get your point, for many things there isn't the way to do it in C, and often (but not everytime) it's more code to do something in C.

  • @emgh said: Just keep at it :)

    That's the plan. :smile:

  • edited April 11

    @lukast__ said:

    @totally_not_banned said: In ancient times compilers weren't smart enough to realize you weren't doing anything with the value before incrementing and tended to create an unnecessary copy.

    AFAIK, if you disable optimizations, the copy is still created. But I knew that actually :wink:
    And that incrementing-after-evaluating is so often unnecessarily used, when I see such a mistake, I ask myself that if the programmer does that, what else might he have done wrong/inperformant? Often that are programs where sprintf/strcat are also used extensively.

    That's perfectly possible. I mean strictly speaking the compiler is actually instructed to do that and i've never really investigated it.

    Yeah, it's a tell-tale sign but in some cases it's understandable why people do it. Especially with lone increments it simply feels weird to start a line with ++ but if it goes on with all the unchecked operations (which are hardly ever the right thing to do - i mean there is situations where you know the length won't exceed your target buffer but from my experience that doesn't happen all that often to the point where i pretty much forgot strcat was actually a thing) it probably wasn't aesthetics...

    In any case you seem to have the right mindset for C. The next step will be ordering the compiler around using attributes (you obviously know best, right?) and disassembling the result to see if it obeyed your wishes (the sneaky bastard likes having an attitude at times...) ;)

    Thanked by 1lukast__
  • @lukast__ said:

    @totally_not_banned said: so you can just find the end of string 1 and copy string 2 there

    Optimally you already know the length of string 1 as the time needed by strlen is dependant on the length of the string, and optimally the length of string 2 is also known so that you can simply use memcpy.

    Absolutely. Going straight for memcpy is obviously preferable if possible and it's basically the criticism of null terminated strings that they don't store their length making it cumbersome to keep track of it unless one accepts wasting cycles on superfluous calls to strlen.

    But I get your point, for many things there isn't the way to do it in C, and often (but not everytime) it's more code to do something in C.

    Yeah, exactly.

    Thanked by 1lukast__
  • edited April 12

    @GoodLeaf-Cloud said:

    @totally_not_banned said:

    @GoodLeaf-Cloud said:

    @totally_not_banned said:

    @GoodLeaf-Cloud said:

    @totally_not_banned said:
    My brain hurts. Just lose these people. All of them...

    already have

    You also said this the last time and when asked if you removed this Wiggy character you stopped answering.

    wiggy is no longer affilated with goodleaf hosting, havent talked to him since his move out

    Good. Now block him and anyone that might know him. Make it clear that you will not tolerate his presence anywhere near you or your business.

    we still kinda have to keep in somewhat of a contact with him, cant just outright block him since we have dealt with eachother proffesionally in the past, but havent talked to him since 03/03/2024 (his move out date)

    The past is the past. You need to focus on the future and only a future without DDoSers is a bright future.

    Just tell him that it's nothing personal but you can't have him ruining your business. Then block him. That way he'll know that there's no bad blood between the both of you and he'll understand.

    The only other option would be for him to delete all his friends (besides you obviously) as you can't know how many of them are DDoSers. If he can prove that he did this you could theoretically keep him around.

  • @totally_not_banned said: ordering the compiler around using attributes

    Oh, I only knew packed for structs/enums and noreturn for functions, will have to take a closer look, thanks.

    And I just remembered a common mistake in C, which seems a bit unintuitive when you learn C: that you have to declare a function without parameter as "NAME(void)" or otherwise the parameter it takes are variable.

    And do you use "register" for performance or do you let the compiler do this?

  • GravelyGravely Member

    The fact that @GoodLeaf-Cloud has a 'Patron Provider' tag, is everything wrong with where this forum is going.

    Thanked by 2emgh Marx
  • edited April 12

    @lukast__ said:

    @totally_not_banned said: ordering the compiler around using attributes

    Oh, I only knew packed for structs/enums and noreturn for functions, will have to take a closer look, thanks.

    Well, attributes are usually not really needed nor do they make a lot of sense but as a C programmer you obviously know better ;)

    No, really, sometimes they are actually pretty useful. For something like some short generic code it might help with optimization to make the functions static, put them in a header (or just include the .c file) and force inlining. Forcing align of the last structure member can allow for a neat trick where you end your structure with a zero sized array (not really legal but most compilers still accept this and it somehow got standardized by now i think, even if i can't remember how exactly) which becomes a pointer to the start of the memory after your struct (safes a lot of error prone calculations when the struct is really the header of some dynamically allocated blob).

    There's really a ton of these attributes doing all sorts of more or less specific stuff, even if they (or at least a bunch of the less common ones) aren't really portable and it's probably best to treat them with caution as chances are they'll sooner or later become a macro to deal with the fact that different compilers have different implementations.

    And do you use "register" for performance or do you let the compiler do this?

    register itself is mostly a noop these days. You can add it but it's pretty save to say that the compiler will just do what it feels is best anyways. At least with GCC you can however specify an actual register to use (https://gcc.gnu.org/onlinedocs/gcc/Explicit-Register-Variables.html) which should be honored but your code obviously becomes platform specific then and i remember there where a couple gotchas with this (external code obviously won't necessarily honor your register usage and stuff like that, so you might need a special strategy there). In general i wouldn't do it unless there was a real good reason. If you want that level of control you're probably better off going straight to inline assembly.

    Using vector types (declared with some variation of attribute vector) where it's appropriate can be advantageous though. Obviously that's only helpful when you are dealing with actual vectors or something that has some kind of clever SSE/AVX implementation.

    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!

    Thanked by 2lukast__ tentor
  • emghemgh Member

    @totally_not_banned said: The past is the past. You need to focus on the future and only a future without DDoSers is a bright future.

    I lost track. What did this wiggy guy do?

  • @emgh said:

    @totally_not_banned said: The past is the past. You need to focus on the future and only a future without DDoSers is a bright future.

    I lost track. What did this wiggy guy do?

    Wiggy is the root of all evil. He's the one bringing DDoSers into @GoodLeaf-Cloud 's honorable groupchats! Can you imagine that? :open_mouth:

  • rcy026rcy026 Member

    Am I the only one that got totally confused by trying to follow the conversation in the screenshots but had no problem keeping up when the discussion turned into how to optimize C?
    I still have no clue who ddos'ed who or what a wiggy is, but I learned how to optimize an incrementing counter in C. Not what I expected to take away from this thread, but I'll take it. :lol:

  • zmeuzmeu Member

    I know nobody’s gonna read this but if you do, please give me a like. Thank you!

  • emghemgh Member

    @rcy026 said:
    Am I the only one that got totally confused by trying to follow the conversation in the screenshots but had no problem keeping up when the discussion turned into how to optimize C?
    I still have no clue who ddos'ed who or what a wiggy is, but I learned how to optimize an incrementing counter in C. Not what I expected to take away from this thread, but I'll take it. :lol:

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

    Whereas skids, while they might know, prioritize sounding like they don’t give a fuck (because not caring = cool)

  • @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

  • @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.

  • ahnlakahnlak Member

    @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.

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

    I'll look for a good example as soon as I'm home, but what do you have against gotos? They essentially are just unconditional jumps, I don't see any disadvantages.

  • edited April 12

    @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?

Sign In or Register to comment.