Please dont take this seriously guys its just a dumb meme I haven’t written a single line of code in half of these languages

  • bort@sopuli.xyz
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    7 months ago

    Latex: Problem --> \def\please@#1#2#3#4{\e@kill#2#3{\me#1}#4@now} -->

    • renzev@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      Accurate. LaTeX is great, it makes you feel like you have superpowers compared to “office suite”-style software. But every once in a while you just run into some bullshit that feels like it’s stuck in 1985 and it completely breaks your flow. I remember wanting to make a longtable where text in the “date” column would be rotated by 90 degrees to leave more horizontal room for the other columns. It took me two rotateboxes, a phantom, a vspace, a hspace and 40 minutes of my life to get the alignment right. Would probably have taken a duckduckgo search and three clicks in Libreoffice.

      • tetris11@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        I still have no idea how to exit the build process. It tells I need to type H or \end but it also just lies. I find the easiest way is to invoke Ctrl-Z and then kill the background process, and the younglings children

        • renzev@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          6 months ago

          Yeah, what the hell is up with that? I always just echo | pdflatex to make it shut up and exit on error. Maybe one day I’ll learn how to actually use that interactive compilation thing, but not today lol.

            • renzev@lemmy.worldOP
              link
              fedilink
              arrow-up
              0
              ·
              6 months ago

              So there are many different commands that compile LaTeX, right? pdflatex, pdftex, latexmk, etc. But they all do that thing where they ask for your input as soon as they encounter an error, right? Well, if you just pipe an empty echo command to them, it notices that stdin has reached end-of-file, and gives up trying to ask the user for input, and just exits on first error. So instead of pdflatex mydocument.tex, you can do echo | pdflatex mydocument.tex and it won’t ask you for input if it sees an error, it’ll just exit. There’s probably a “proper” way to achieve the same behaviour, but I can’t be arsed to read the docs.

              Speaking of stupid TeX hacks, at one point I had a script called latex_compile_and_install_packages_until_it_works.sh. It’s essentially a loop that repeatedly tries to compile a document, searches the output of the compiler for anything that looks like a missing package error, and pipes it to sudo tlmgr install. The “fuck it” of package management, arbitrary code execution exploit included!

              (Sorry for the screenshot, I lost the original script in text form, probably for the better)

              • tetris11@lemmy.ml
                link
                fedilink
                arrow-up
                0
                ·
                6 months ago

                Haha that’s brilliant! I have a similar script for Conda, where it tries to install R packages by first looking in bioconductor and then trying the rejects through conda-forge, and then the rejects from that are compiled from source or just outright rejected.

                I would have thought you would have needed a (while :; do echo; done) | pdflatex or a yes "\end" | pdflatex, i.e. something that repeatedly generates output. It’s actually quite elegant that pdflatex checks if stdin is already EOF

      • voxel@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        7 months ago

        btw what do you think about typst?
        i only used it for simple stuff so far but it seems pretty fun and easy to use

        • PixelProf@lemmy.ca
          link
          fedilink
          arrow-up
          1
          ·
          7 months ago

          My two cents, after years of Markdown (and md to PDF solutions) and LaTeX and a full two years of trying to commit to bashing my head against Word for work purposes, I’m really enjoying Typst. It didn’t take long to convert my themes, having docs I can import which are basically just variables to share across documents in a folder has been really helpful. Haven’t gone too deep into it but I’m excited to give it a deeper test run over the next little bit.

        • renzev@lemmy.worldOP
          link
          fedilink
          arrow-up
          1
          ·
          7 months ago

          Never heard of it before, but might give it a try at some point. From the website, it seems like something halfway in between LaTeX and Markdown? Sounds exactly like what I need at times, tbh.

      • Odiousmachine@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        6 months ago

        Funnily enough I had a similar problem but I wanted text instead of a date. In the end I used a solution similar to yours and adjusted each cell entry manually for hours. Feels like there should be a lot simpler solution for this problem in LaTeX. Glad I don’t need to use it anymore…

        • renzev@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          0
          ·
          6 months ago

          u/vox@sopuli.xyz suggested Typst as an alternative to TeX. I gave it a try, and I’m loving it so far. It even has built-in support for the rotated text thing https://typst.app/docs/reference/model/table . I’ve only used it for notes/homework so far, but I’m looking forward to seeing how it fares for more serious typesetting tasks.

  • Swedneck@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    7 months ago

    missing the stage of C where it’s all incomprehensible bitfucking with comments like “this works, i do not know why it works, do not touch this”

      • PlexSheep@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        7 months ago

        That one is not that complicated if you don’t think about the math. It’s basically just if we interpret the float as int and add a magic number we have a good estimation.

        From what I remember at least, it’s been a little while since I implemented it.

        • sheepishly@kbin.social
          link
          fedilink
          arrow-up
          0
          ·
          7 months ago

          I was more thinking of the comments which are pretty much exactly what you said (“incomprehensible bit hacks” followed by “what the FUCK?”)

        • mindbleach@sh.itjust.works
          link
          fedilink
          arrow-up
          0
          ·
          7 months ago

          IIRC also relying on how floating-point is basically scientific notation and the most-significant bits are the exponent.

          And most importantly, relying on how a sloppy answer works just fine. The most important skill in game development is cheating.

          • sheepishly@kbin.social
            link
            fedilink
            arrow-up
            0
            ·
            7 months ago

            The most important skill in game development is cheating.

            Makes me feel better about my own game dev attempts lmao.

      • dan@upvote.au
        link
        fedilink
        arrow-up
        0
        ·
        7 months ago

        CSS isn’t as bad these days if you use Flexbox. Debugging floats and absolute/relative positioning was a nightmare in comparison.

        • MonkderZweite@feddit.ch
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          7 months ago

          On the other hand, it made webpages way less flexible.

          Like yesterday (i have the browser not in fullscreen, for reasons) on my 16" fullhd notebook, webdev couldn’t imagine that someone would use his site in a ~1000px browser window, sidebars left and right, the main content about 20 characters wide squeezed inbetween. So i pressed f12 and deleted the sidebars. But the content was still 20em wide, because of flexbox.

  • nintendiator@feddit.cl
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    7 months ago

    C:

    Problemreturn Solution;

    C++:

    Problem

    const [auto]&& (Problem&& problem) noexcept(noexcept( Solution<Problem>{}(std::forward<Problem>(problem)) )) { return Solution<Problem>{}(std::forward<Problem>(problem)); } -> decltype( Solution<Problem>{}(std::forward<Problem>(problem)) )
    
    • ALostInquirer@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      7 months ago

      What makes JavaScript so widely disliked? I know very little of it, and in skimming different stuff I think I’ve seen like a million different frameworks for it, so is that a part of it?

      • smileyhead@discuss.tchncs.de
        link
        fedilink
        arrow-up
        2
        ·
        7 months ago

        It was mostly made for simple scripts to embed on a website for animations and handling updates without refreshing whole page. Not to make a full portable client (browser) side app.
        Hating JavaScript is mostly a meme, it’s just a programming language. But its very loose syntax, fact it’s often someone’s first programming language to learn and how most programs written in it nowadays are a hack build on top of a hack on top a hack makes this language easy to laugh at.

    • Da_Boom@iusearchlinux.fyi
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      Ever wanted to be somewhere inbetween java and JavaScript?

      Yeah, that’s Groovy. Only it’s the wrong groove

    • mindbleach@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      JS is ironic punishment as a programming language. It’s fun to screw around in! And then you have to use it for stuff, and pain ensues.

  • affiliate@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    i feel like javascript could also be

    Problem -> solution -> 3 days pass -> all dependencies had breaking changes made -> problem

    • theherk@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      I’ve seen this before but don’t accept it myself. There are cases where you just wanted to cat. In this case, maybe to review the problem. Then you want to extend the command. Preserving it in the next commands where you start stacking on pipes is useful since it can be fewer strokes and maintain a habit.

  • wabafee@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    JS is basically the Hydra from the Greek Mythology.

    Though PHP is literally the problem had me lol.

  • neidu2@feddit.nl
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    7 months ago

    Perl:

    Problem -> $ @ % <=> =()= => ; qw() ])} select(undef, undef, undef, 0.25) =~ tr/.?\w\sREg3xfr0mhe|l/foo/g; &homebrewedFunction(%) -> solution

    Source: I mainly code in perl. I like it, but I’ll be the first to admit that it’s not a beautiful language.

    I was about to make an entry for lisp here, but I don’t have enough parentheses to draw the path to the solution.

    • I Cast Fist@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      I personally never understood how anyone could find Perl appealing or even “good” to program in, probably because I could never understand wtf the code was meant to do

    • msage@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      I was hired twice to write Perl, both times switched my department to something else after a few years.

      Perl is good for command line processing, and absolutely god awful read-only magic hacks. Nothing else.

    • palordrolap@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      Over the top tone: “Pretty sure that won’t compile. $EVAL_ERROR modulo what you get from the filehandle called = isn’t an lvalue that can be put through the Goatse operator that I’m aware of.”

      But seriously(?), I’m almost certain that’s not how that would be parsed. = isn’t a valid bareword, so Perl would choke on the spaceship operator not being a term… I think.

      After testing… It’s worse. I think it’s parsing <> as the glob operator and = as a filespec.

      For those who don’t know Perl:

      Because of its appearance, <=> really is called the spaceship operator (at least, when it can be parsed as an operator and not whatever happened above).

      =()= by comparison has unofficially been called Goatse. If you don’t know what Goatse is, find out at your own risk. If you do know, you can see why this particular pseudo-operator was given that name.

      And if you’re still reading, =()= is a pseudo-operator because it’s not actually parsed as part of the syntax. It’s literally an assignment operator = followed by an empty list () followed by another assignment operator =, providing list context to the outside of the equals signs that wouldn’t otherwise be there.

      [Why are you still still reading?] Context is important in Perl. If a function returns a list of values (which is something Perl functions can do) and you try to store the result in a scalar variable, replacing the usual = with =()= will store the number of elements returned rather than the last element of the list.

      • neidu2@feddit.nl
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        7 months ago

        It’s not supposed to be compilable. It’s more intended as a list of weird looking (but valid) perl stuff.

        As for the goatse operator, I’ve mostly used it for counting amount of regex matches.

        Oh, and I forgot the diamond operator. Added.

    • mindbleach@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      Perl is write-only code. Larry Wall raised a monkey’s paw and asked for a language that works the way programmers want. So most Perl is the first thing someone tried, unfiltered by rigid syntax putting your thoughts in order, compiler warnings bringing side effects to mind, or even names forcing you to decide what a variable is. An uncommented Perl script is raw brain patterns displayed as ASCII.

      Thank god it runs like crap. We’d be in so much trouble if it was fast. Optimized C isn’t exactly gorgeous, but any project that compiles proves someone looked at the code more than once.

      • evranch@lemmy.ca
        link
        fedilink
        arrow-up
        0
        ·
        7 months ago

        I love the term “write-only code”, it’s perfect. I used to love Perl as it felt like it flowed straight from my brain into the keyboard. What a free and magical language.

        So it turned out I had ADHD. Took meds, went back to C/++ with renewed appreciation, haven’t touched Perl since as it horrifies me to look at it. What a nightmare of dangling references and questionable typing. Any language that allows you to cast a string to a function and call it really needs to sit down and think about what it’s doing.

        • mindbleach@sh.itjust.works
          link
          fedilink
          arrow-up
          0
          ·
          7 months ago

          So it turned out I had ADHD.

          Genuine LOL. Yeah… yeah, that’s Perl in a nutshell. Creating Perl: ‘why aren’t all languages like this?!’ Editing Perl: ‘oh.’

          • evranch@lemmy.ca
            link
            fedilink
            arrow-up
            0
            ·
            7 months ago

            As I said,

            C/++ with renewed appreciation

            No such thing as eval in non-interpreted languages. Unless you’re crazy enough to invoke the compiler and exec() the result.

            I used eval too in my Perl days which is why I specifically called it out. IMO any time you see eval used there should be another, more proper way to do it.

    • MonsiuerPatEBrown@reddthat.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      7 months ago

      https://www.foo.be/docs/tpj/issues/vol4_4/tpj0404-0015.html

      The Perl Poetry Contest - The Perl Journal, Winter 1999

      #!/usr/bin/perl
      #
      # asylum.pl
      # by Harl

      close (youreyes);
      bind (yourself, fast);

      while ($narcosis) {
         exists $to($calm);
         not calm;
      }

      accept the, anesthesia;
      seek the, $granted, $asylum’
      and wait;

      stat ically;

      unlink and listen (in, $complicity);

      for (a, little) {
         system (“sync hronicity”);
      }

  • TCB13@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    PHP -> Problem -> Replace the developer -> Solution.

    Yes PHP was bad in 5.x, in 8.x if things go bad it’s just the developer who’s bad.

  • idunnololz@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    7 months ago

    It’s ironic that the illustration for JavaScript is probably the most realistic and best solution IRL. In the sense that a lot of what problem solving is (which is a big part of software engineer) is breaking a big problem into smaller problems. And you continue doing this until each problem is solvable in a short period of time.

    JavaScript sucks though as a language.

    • flashgnash@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      JavaScript is a great language until you ask it to do more than toggle a div or send a request to the server

      • Skullgrid@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        7 months ago

        Typescript is wasted on JS. Currently getting a JS certification while porting an action script 3 project to JS, ActionScript 3 was the better language.

      • idunnololz@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        7 months ago

        I guess I have to defend this one. I personally think Typescript is the better language compared to typed Python or Ruby (two comparable languages based on how they are all used). Modern Javascript actually have a lot of nice language features, the only issue is the lack of types. Typescript doesn’t entirely solve the problem but it’s a decent attempt at it. A good typescript repo is decently readable, testable and performant enough for most use cases.

    • renzev@lemmy.worldOP
      link
      fedilink
      arrow-up
      0
      ·
      7 months ago

      You’re completely correct. But what I meant by that graphic is “poor solutions leading to more problems”, not “breaking down problems into smaller ones”. It was inspired by a cube drone comic that made the same complaint, but I can’t find that particular comic now