> Rust is a blo-ACK

> Rust is a blo-ACK
https://github.com/Rodrigodd/tiny-snake.rs

Cnlies on suicide watch. Again.

  1. 3 weeks ago
    Anonymous

    damn
    that's huge
    here's snake written in C++17, that doesn't even require an operating system as is 5x smaller
    https://github.com/adam10603/mbr_snake

    • 3 weeks ago
      Anonymous

      > no ELF header
      > no terminfo setup
      > no escape codes to color output
      Ofc it's smaller.

      >500 lines
      lmao
      https://basedbin.fly.dev/p/2JxFmi.c

      > uses printf
      That's 20kb minimum.

      • 3 weeks ago
        Anonymous

        >what is dynamic linking
        cope

        • 3 weeks ago
          Anonymous

          Something that isn't specific to C? You can dynamically load libraries in rust too

    • 3 weeks ago
      Anonymous

      >mbr
      that is a totally different thing retard

  2. 3 weeks ago
    Anonymous

    >500 lines
    lmao
    https://basedbin.fly.dev/p/2JxFmi.c

    • 3 weeks ago
      Anonymous

      >system("cls");

      • 3 weeks ago
        Anonymous

        >#include <conio.h>
        >system("cls");
        do not redeem the code sir you are bhenchod bloody bastard sir

        i was hoping you guys would enjoy that

        • 3 weeks ago
          Anonymous

          no but seriously, stop using Turbo C. installing mingw64 or w64-devkit might be a pain on Windows but it's well worth it to work with an actively maintained C/++ toolchain instead of an abandoned program that doesn't conform to standard C from 1874 only used by pajeet teachers to churn degrees for H1B slaves. it's a pain but well worth it in the long run anon c:

          • 3 weeks ago
            Anonymous

            not my code
            i just found the most garbage pajeet C tutorial implementation of snake online and pasted it

    • 3 weeks ago
      Anonymous

      >#include <conio.h>
      >system("cls");
      do not redeem the code sir you are bhenchod bloody bastard sir

      • 3 weeks ago
        Anonymous
  3. 3 weeks ago
    Anonymous

    Unsurprisingly it uses assembly to wrap linux system calls and then uses that. C can also do it, nothing special here

    • 3 weeks ago
      Anonymous

      That's the point, Rust is as (un)bloated as C.

      • 3 weeks ago
        Anonymous

        >Rust is just as unbloated as C if you strip out stdlib, use zero third party packages and wrap all system calls in assembly
        You know what? Fine. But no real Rust project is like that

        • 3 weeks ago
          Anonymous

          It's true, just like most real-world C projects use libc and third-party libs, real-world Rust projects use the Rust standard library and third-party libs. The point is that the language isn't inherently "bloated", as opposed to languages with runtime like Go or Nim.

          • 3 weeks ago
            Anonymous

            >It's true, just like most real-world C projects use libc and third-party libs
            Very few of them. Try compiling a gtk app in rust and you will see that gtk-rs depends on at least 50 other packages. Rust (or cargo really) is the node js of systems languages
            >t. 2gb node_modules folder

      • 3 weeks ago
        Anonymous

        Bloat has been a meaningless buzzword for 2 decades

        Meditate on your path in life

        • 3 weeks ago
          Anonymous

          good mroning sir!

          • 3 weeks ago
            Anonymous

            >mroning

    • 3 weeks ago
      Anonymous

      *facepalm*

    • 3 weeks ago
      Anonymous

      >100% Rust
      >is actually x86 assembly
      I'm so tired of people blatantly lying. Like it would even be okay if he said 90% Rust. Saying something is purely written in a portable language usually implies it's portable. Writing it in a platform specific assembly seems to defeat a major point of using the language in the first place. Why even use Rust at this point and not just a normal assembler, what are you gaining.

      • 3 weeks ago
        Anonymous

        Inline assembly is a part of the language tho, the same goes to inline assembly in C/C++.
        > Saying something is purely written in a portable language usually implies it's portable
        No it's not, most code isn't portable between OSes, for example.

        • 3 weeks ago
          Anonymous

          >No it's not, most code isn't portable between OSes, for example.
          Most of the Rust projects I've used are written by people using Linux and not even thinking about other systems yet they build and work just fine on systems that don't even have official builds of rustc.

      • 3 weeks ago
        Anonymous

        It is not majority assembly, but assembly is the glue which makes it possible

    • 3 weeks ago
      Anonymous

      That's the point, Rust is as (un)bloated as C.

      Because UNIX itself is written in C, it's more efficient to use C libraries (even with ffi) as opposed to asm for syscalls.

      >#include <conio.h>
      >system("cls");
      do not redeem the code sir you are bhenchod bloody bastard sir

      >system("cls");

      I'm sure the rustlets can call fork() and exec() syscalls from asm :^)
      The binary size would be so small too!

      • 3 weeks ago
        Anonymous

        Why not write it in C then? This makes no sense.

        • 3 weeks ago
          Anonymous

          Because C is super unsafe!!!!! And pointers are too hard!!!!!

          • 3 weeks ago
            Anonymous

            >pointers are too hard!!!!!
            They're not easier in unsafe Rust
            What is easier is avoiding undefined behavior that makes the compiler fuck up your entire program

            • 3 weeks ago
              Anonymous

              >theres no undefined behavior in rust
              i hope youre meming

              • 3 weeks ago
                Anonymous

                No? For example when you're using normal libs that are written by humans not by monkeys, results and options practically forcing you to check for every possible outcome. You can ignore it but only explicitly. So yeah, unless you're dumb for some reason, it's hard to get UB. Not impossible but I can't quickly tell how to get it without prewarnings.

              • 3 weeks ago
                Anonymous

                I said:
                >easier to avoid
                You read it as:
                >there is none
                Now go back to kindergarten and learn to read

          • 3 weeks ago
            Anonymous

            Nigga, your whole main function is marked unsafe. It's a dumb gimmick script. Does it even need pointers?

          • 3 weeks ago
            Anonymous

            That's not the reason. I am using rust because I am making an image editor and I don't want to install trilliion gorillion packages to get most common formats (including webp) supported. Even then, I would have made it in C++

      • 3 weeks ago
        Anonymous

        >Because UNIX itself is written in C, it's more efficient to use C libraries (even with ffi) as opposed to asm for syscalls.
        No it's not, C is compiled before use to machine code, and the OS doesn't care which language the machine code is compiled from. You can get the same machine code from C or from Rust, there are nothing C-specific.

  4. 3 weeks ago
    Anonymous

    Just what I have always needed. This changes everything.

  5. 3 weeks ago
    Anonymous

    >unsafe

    • 3 weeks ago
      Anonymous

      Or, as I call it, "C-tier safe".

    • 3 weeks ago
      Anonymous

      >rust is just as good/better!, see!
      >unsafe code, every time
      anon, you can't promote your language on the grounds of safety when all your examples of it working well are when you turn the safety off
      really, the fact that you can turn it off really just defeats the purpose, i mean, if you can turn it off, how are you supposed to know if something made using rust actually safe or not? it makes "made using rust" meaningless, you shot yourself in the foot

      • 3 weeks ago
        Anonymous

        Rust safety is just like gun safety. It only works when you turn it off.

        • 3 weeks ago
          Anonymous

          Yeah it's better to have no safety on a gun and keep it loaded with a finger on the trigger and the barrel pointed towards someone's face at all times

          • 3 weeks ago
            Anonymous

            this is what rustfags actually believe

            • 3 weeks ago
              Anonymous

              >rustfags
              there is only one person who makes another rust thread every day

              • 3 weeks ago
                Anonymous

                how much do they pay him

              • 3 weeks ago
                Anonymous

                An HRT injection per day.

    • 3 weeks ago
      Anonymous

      Unsafe has been a meaningless buzzword for 2 weeks

      Meditate on your path in life

  6. 3 weeks ago
    Anonymous

    Wrong board

  7. 3 weeks ago
    Anonymous

    >2760 bytes
    ive written snake in js smaller than that

    • 3 weeks ago
      Anonymous

      Yeah, and it only needs Chrome to run, which is 4Gb in RAM and 200Mb on disk.

      • 3 weeks ago
        Anonymous

        Which you have open right now anyway.

      • 3 weeks ago
        Anonymous

        wrong i dont use chrome

  8. 3 weeks ago
    Anonymous

    You naggers, if you want zero bloat why not FUCKING WRITE IN ASM

    • 3 weeks ago
      Anonymous

      What if I want near-asm level of bloat with all the comfort of a modern high-level language?

      • 3 weeks ago
        Anonymous

        Comfort is bloat
        USE ASM

        • 3 weeks ago
          Anonymous

          Actually I've been writing some asm by hand recently and I'm struck at how inefficient my asm feels. I can't interleave computation paths to ease data dependency, I must be missing the most efficient op compositions, I can't keep all the MMX/SSE/AVX ops in my mind to use them where it's appropriate, can't inline a function in every call place with const propagation and path elimination. After a decade of looking at -O3-generated asm to spot missed optimization opportunities I can't imagine a human being being able to produce a more efficient asm code than a compiler. I was the case back in the 80s and 90s, when the CPUs were simple and the compiler were dumb, but it's not the case anymore.

          • 3 weeks ago
            Anonymous

            So compilers are more efficient than humans at asm
            How does a human make a compiler good at something the human is not?
            How do you make a 100% compiler

            • 3 weeks ago
              Anonymous

              *100% efficient compiler
              I forgot a word

            • 3 weeks ago
              Anonymous

              Decades of hard work by multiple geniuses using mathematically proved optimizations

              • 3 weeks ago
                Anonymous

                How does one guy make his own compiler from scratch and how efficient can it be?

              • 3 weeks ago
                Anonymous

                Look at Drew Devault's QBE and Hare. It can calculate primes in about 70% speed of -O3 gcc

              • 3 weeks ago
                Anonymous

                >Drew Devault's QBE
                In all seriousness, he's not a moron, etc. etc., however, he did not create QBE

              • 3 weeks ago
                Anonymous

                nevermind then

              • 3 weeks ago
                Anonymous

                And these are both written in asm, correct?

            • 3 weeks ago
              Anonymous

              Modern computers are not really designed for humans to work with directly. For example instruction orders, instruction cache, etc effect performance and the way to do that efficiently us to do algorithms in your head. It's better to let a computer do that. That's how it works with cpus. The cpus themselves are designed for how they are most commonly used.

            • 3 weeks ago
              Anonymous

              You optimize everything once and you don't need to do that anymore.

              If you're coding in ASM you'll forget about something or won't be able to do so.

              Compiler can't forget, once you give it ability to apply some sort of optimisations it'll apply it each time.

          • 3 weeks ago
            Anonymous

            To someone with no programming background like me, OoOE is complicated and speculative execution is magic.

      • 3 weeks ago
        4thchad

        That's literally why you use forth

        • 3 weeks ago
          Anonymous

          Forth is inherently slow, the stack machine abstraction prevents it from generating optimal machine code for modern register-based CPUs.

          • 3 weeks ago
            4thchad

            >modern register-based CPUs
            Von Neumann architectures are going to be obsolete, the stack will return

  9. 3 weeks ago
    Anonymous

    >#![no_std]
    That also means you can't really use third party libraries either. That's why rust us a meme. The only way to make it minimal is to not use rust. Zig doesn't have this problem and both use llvm. Even C can use the standard library without sacrificing size (if you use musl).

  10. 3 weeks ago
    Anonymous

    >A shitty snake game ripoff is enough to make "cniles" go on suicide watch.
    Try harder. Then rope.

  11. 3 weeks ago
    Anonymous

    Wtf...

    • 3 weeks ago
      Anonymous

      > extern "C"
      We won C bros

    • 3 weeks ago
      Anonymous

      >Invent a shitty language
      >Market that language as ~~*"memory """safe""""*~~
      >Make the memory """safe""" features so limiting and circuitous so that nobody uses them and instead writes everything in unsafe blocks
      >Become so obsessed with gender and CoCs that your entire development team "forgets" to check for memory leaks
      >Create a language "standard" which isn't a real standard at all, just a feature freeze for the singular reference implementation in the world
      >Formalize the memory leaks in the ~~*"memory """safe""""*~~ language singular reference implementation
      >Never create a formal language standard
      >Never create a memory model
      How the hell has the technology industry allowed this cartoonishly horrible language to proliferate itself? There has to be some kind of CIA or at least NGO cooperation at play here.

      • 3 weeks ago
        Anonymous

        To be fair, I never saw shit like on that screenshot in real programs. Usually on some sort of embedded which is rare for Rust.

        What is notable tho is that you can create easy memory leaks with shit like boxes without using unsafe. But you can do shit like that only deliberately.

  12. 3 weeks ago
    Anonymous

    >https://en.wikipedia.org/wiki/Elite_(video_game)

    32 kilobytes, 40 years ago.

    • 3 weeks ago
      Anonymous

      To be fair I made a videogame for some embedded system as a school project and using C with -ffreestanding and -nostdlib the executables become incredibly small

Your email address will not be published. Required fields are marked *