all 35 comments

sorted by: hot top controversial new old
[–] 61 points 2 years ago (2 children)

Meanwhile Rust: you might get an error at line 45 word 3 because it assumes variable foo is an int32 but it could be (whatever else idk), let's not compile this before you correct this by changing line 43 in this specific way. Here's the before and after code snippets so you can just copy-paste the fix.

  • source
  • hideshow 4 child comments
  • [–] 36 points 2 years ago (1 child)

    Man I fucking love the Rust compiler. Easily the most understandable and useful error messages I've ever seen.

  • source
  • parent
  • hideshow 2 child comments
  • [+] 39 points 2 years ago (1 child)
  • [–] 31 points 2 years ago (2 children)

    Someone needs to be introduced to gdb...

  • source
  • hideshow 4 child comments
  • [–] 0 points 2 years ago (1 child)

    have fun without those debug symbols

  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 2 years ago (1 child)

    Why wouldn't I have debug symbols in the software I'm developing?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 0 points 2 years ago (2 children)

    And what happens when you release it?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 16 points 2 years ago (2 children)

    It's been a minute since I used C/Cpp but if you compile with debugging symbols and using gdb give you info like in Java? At least the location of the crash.

  • source
  • hideshow 4 child comments
  • [–] 13 points 2 years ago (2 children)

    And then you realise the program doesn't crash when compiling with debug symbols 😢

  • source
  • parent
  • hideshow 4 child comments
  • [–] 15 points 2 years ago

    But it returned 139! That's a start even without a debugger!

  • source
  • [–] 11 points 2 years ago

    I have segfaulted in all those languages.

  • source
  • [–] 11 points 2 years ago

    PHP: Error on Line 0 in undefined.

  • source
  • [–] 9 points 2 years ago (1 child)

    And C/C++ are like that by design. Compiled languages were new and the developers were afraid additional checks would decrease performance. It was certainly performant in racing toward a crash.

  • source
  • hideshow 2 child comments
  • [–] 5 points 2 years ago

    And C/C++ are like that by design. Compiled languages were new and the developers were afraid additional checks would decrease performance.

    If you have a credible citation showing that was what guided K&R's decisions, I think you should post it.

  • source
  • parent
  • [–] 7 points 2 years ago (1 child)

    but with a core dump you can just load it up and see the state of the process when it crashed...

  • source
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    I'm trying to remember the last time I actually had a core file. I think core dumps have been disabled by default on Linux since at least 2000.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 2 years ago

    Story time. Back at uni I had a c++ subject. Me being lazy as fuck I didn't attend many classes and let alone do the practicals during the semester. Exam time comes around. I realise I can't cram in a whole semester's learning in a week. Luckily it's open book exam. Big brain time, I print the whole c++ documentation to take into the exam. I frantically page through the hundreds of pages in my lever arch file looking for answers. I pretty much copy and write example code to questions. Very sad when I failed.

  • source
  • [–] 2 points 2 years ago

    cries in verilog

  • source
  • [–] 2 points 2 years ago
    gdb> break before it crashes
    gdb> record full
    gdb> continue
    (segfault)
    

    gdb> set exec-direction reverse

  • source
  • [–] 1 point 2 years ago

    The code editor I had to use for Java once didn't give me anything like that.

    Meanwhile for C you can just use gdb, it's great!

  • source
  • [+] 0 points 2 years ago