• @Im_old@lemmy.world
    link
    fedilink
    103 months ago

    Fun fact (not really), when docker-compose throws an error on a yaml file it tells on which line the error is. The problem is that it ignores any commented out line, so you end up guesstimating on which line the error is

  • @mac@lemm.ee
    link
    fedilink
    03 months ago

    Man this account consistently reposts hot posts from the Lemmy.world programmer_humor. Starting to get very repetitive and annoying

    • @cm0002@lemmy.worldOP
      link
      fedilink
      153 months ago

      False, that appears to be hiddenlayer posting to all 3 major programmer humors

      I only do .ml to here as part of a small ongoing effort to direct content away from a tankie instance to other instances. I don’t even crosspost based on how “hot” they are, just whenever I see them.

      I didn’t even know there was a .world programmer humor, why did they use the exact same .ml version logo lmao

  • @NigelFrobisher@aussie.zone
    link
    fedilink
    13 months ago

    My favourite of this is when the line number is the first line of a massive multi-line statement with object initialisers and chained lambdas.

  • Zarlin
    link
    fedilink
    333 months ago

    This can happen when the file has mixed line endings

    • kionay
      link
      fedilink
      English
      43 months ago

      I once worked in a program that allowed custom C# scripts to be written into it to add custom functionality. The way it worked under the hood however was that the code written in the text field would be stitched together into a longer file and the whole thing compiled and ran. The developers didn’t want people to have to write or understand boilerplate code like import statements or function declarations so the place you typed into was the body of a function and some UI was used to get the rest of the bits that would create generated code for everything else.

      To add to that there was a section of global code where you could put code explicitly outside of functions if you knew what you were doing. This wouldn’t get code-generation-wrapped into a function, just at the top of the class. It did, however, only run and get runtime checking when one of the functions was ran. And since the program didn’t grasp that the global code error line number should be with respect to the global code block and not the function code block you could get errors on line -54 or whatever since the final generated file landed the global broken code 54 lines before the beginning of the function.

      Not that any of this was told to the user. I only found out because early versions of the app wasn’t compiled with obfuscation so ILSpy let me see how they rigged the thing to work.

      Error on line -54 will probably be what made me the most dumbstruck in all of development.

    • Lemminary
      link
      fedilink
      233 months ago

      Or is being transpiled and doesn’t have a source map. 🥲

  • @marcos@lemmy.world
    link
    fedilink
    213 months ago

    Yeah, fixed something like this yesterday.

    Turns out the Oracle database can’t count lines. But that’ not really news.

  • @Artyom@lemm.ee
    link
    fedilink
    433 months ago

    I just inherited a Python repo where every hundred lines or so, they added a ^L. What is a ^L? you ask. And I say that’s an excellent question. You see, a ^L is an ASCII standard for saying that if you print the plain text, you should split the content onto a new page here. That’s right, for years, a team of people strictly enforced that they consistently add ^Ls everywhere in case someone wanted to print the entire fucking repo onto paper.

    It’s an invisible character, it took me quite a while to figure out what it even was.

    • @jxk@sh.itjust.works
      link
      fedilink
      243 months ago

      If ^L is invisible in your editor, you’re using a bad editor.

      Not saying page feeds are useful, but you can’t complain that you don’t see them.