6
FBDev64
3d

I was on Reddit and saw so much C threads saying that it's dying and all.. but I think it is growing.

Comments
  • 3
    I still find it surprising how much C is still used (half of C++ when measured by github PRs)

    Except when actually needed because of some specific required toolchain, why not just use C++ and write it as if it was C. Then you at least have the option of using a proper hashmap or btree or whatever when needed
  • 3
    @12bitfloat I have written my own hasmap ! But really, even if I'm not doing any speed-needing stuff, I still find it too slow for coding libraries. And really any system package manager (pacman the best!) will do it.
  • 3
    @FBDev64 Hell yeah, fellow arch user :D

    Yeah it's certainly possible to write good data structures in C, but it's just so much more work than using a highly optimized off the shelf one in C++ (abseil) or Rust (std) imo
  • 4
    @12bitfloat I wrote it 1~2 years ago, so I just have to adapt it a bit and #include it.

    I feel like a God when coding in C or Assembly, like I'm the master of computers. When I go to high-level langs or C++ I feel like a simple employee working for a company and we all are clones.

    IDK.
  • 5
    @FBDev64 I wrote recently about how a self written hash map in c beats the c++ builtin std::map but the difference was so minimal. I had to do a million puts and gets or smth to see difference.

    I prefer C just because I like to do everything myself and how's it's doing nothing more or less than I want, not really because it's better
  • 1
    @FBDev64 yes, exactly
  • 1
    @retoor This guy is in every rant and comments I make. FBI, stop.
  • 3
    @FBDev64 if your background color matches you'll get a notif every time someone with same background color posts smth. That's why
  • 1
    @retoor Do note that the std::map isn't even that great. I think swiss maps is where it's at right now (https://abseil.io/about/design/... )

    I like the simplicity of C but it's also kinda what hinders you from composing and reusing software

    I think something like Go (if it was a bit better designed) would be the best in terms of complexity for most programs. Not too complex but also not too simple
  • 1
    @12bitfloat what about Java?
  • 4
    @retoor Good point, yeah Java might actually be that language

    Unpopular opinion: I actually like Java and think it's a good language :D

    It was mostly hated because of the mega-overengineering people did. But that wasn't the languages fault, because those same people then went over to the JavaScript world and overengineered everything there too
  • 4
    @12bitfloat C and python are my favourite. Kinda opposites. Java is nice one in between but I never choose middle ground myself. It's always C or Python
  • 2
    What's your favorite assembler?
  • 2
    @Liebranca 65816 or z80. But I also know ARM and x86.
  • 1
    @12bitfloat @retoor
    With today's CPUs and caches, std:: vector will actually beat std::map in performance (in map-like usage) up to several tens of thousands of elements.

    I wouldn't be surprised if they just pulled some kind of SSO so that if the map is below, say, 512 kb or so, it's just a vector.
  • 2
    @FBDev64 Oh, I meant which specific program you use to assemble your code, not necessarily which architecture, though it is very much implied in the question ;>

    I like working on x86 code with fasm, at least when I don't have to deal with long ass SSE or AVX mnemonics. You know, shit like VCVTTPS2UQQ. Though intrinsics in C aren't much better.
  • 2
    @Liebranca as and rgbasm (for Gameboy games)
  • 0
    @FBDev64 Nice! Writing for the Gameboy sounds really cool. Old hardware in general has that quasi arcane vibe about it, lovely line of work.
Add Comment