• hperrin@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    Some of the best software is written in JavaScript.

    • Uptime Kuma
    • Immich
    • Supabase
    • VS Code/VSCodium
    • Ionic (what the Voyager Lemmy client is written in)
    • Expo/React Native (which powers probably a third of your apps)
    • Oisteink@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      So uptime kuma being written in JS proves what about the language?

      90% of the worst software and websites are made in js

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 months ago

        Well, all websites are written in JS (on the frontend), so I don’t think that’s fair. And I don’t think 90% of the worst software is made in JS. Even if you’re an Electron hater, Electron apps aren’t bad software, they’re just bloated. There’s tons of shit software written in C. I would guess a lot more than is written in JS, just because more software is written in C. C is also way easier to shoot yourself in the foot.

        Uptime Kuma (and others) show that JS can be used to make awesome software. The language doesn’t really hold you back, it’s just your own skill. If you suck at writing software, it doesn’t matter what language you use, your software will be shit.

        • The_Decryptor@aussie.zone
          link
          fedilink
          English
          arrow-up
          0
          ·
          10 months ago

          Well, all websites are written in JS (on the frontend)

          Not true anymore unfortunately, some sites are using frameworks compiled to WASM instead.

          e.g. X is apparently using Yew now.

          Edit: Ok the “apparently” is doing heavy lifting, since now I can’t find the original source I read about it. Turns out “X” is a garbage name with no searchability, only an idiot would use it.

        • Oisteink@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          10 months ago

          So any language is good as I can make great software using it?? IMO js is still a mess and NPM is really full of shit code to prove it.

          • hperrin@lemmy.ca
            link
            fedilink
            English
            arrow-up
            0
            ·
            10 months ago

            I didn’t say that. You can make great software in Brainfuck, but I don’t think anyone has ever said it is good because of that.

            People do make good software in JavaScript. Knowing JavaScript is an exceptionally useful skill, and JavaScript is pretty easy to become decent at. The learning curve for JavaScript is relatively low. As such, there are tons of JS devs, many of which want to make cool things. JavaScript is undeniably an approachable language. Whether you personally think it’s a good language doesn’t have any bearing on that, but that means tons of people are going to use it to make cool software. To me, its approachability is one of the many things that make it good.

    • Fushuan [he/him]@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Technically typescript. I know it transpiles to J’s but half the complaints I read are about the typo conversion and so on, which ts heavily alleviates.

    • CarrotsHaveEars@lemmy.ml
      cake
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      VS Code is a good software? I beg to differ. It’s slow. It’s messy to look at. It’s resource hungry.

      If you think VS Code is a good editor, we can make an even better editor in another language.

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 months ago

        It is resource hungry. I’ll give you that. But it’s neither slow nor messy to look at. Have you ever used NetBeans or Eclipse?

    • arcterus@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      This doesn’t really conflict with the post. They use and appreciate the software, so presumably it’s decent. You can write good software in any language, so it doesn’t prove that the language itself is good. IMO JS is a popular language, not a good language.

          • hperrin@lemmy.ca
            link
            fedilink
            English
            arrow-up
            0
            ·
            10 months ago

            Yes, if you do silly things with JS, you generally get silly results instead of TypeErrors. I wouldn’t say that makes the language bad. It makes the language resilient to bad programming, which you’d generally want in the case of web pages.

          • hperrin@lemmy.ca
            link
            fedilink
            English
            arrow-up
            0
            ·
            10 months ago

            I’ve never really found the type conversions that bizarre, unless you’re doing something weird like casting an array to a string or number. I don’t really use strange type casts, since I use TypeScript and avoid using the “==“ operator. What other things make it not good?

              • hperrin@lemmy.ca
                link
                fedilink
                English
                arrow-up
                0
                ·
                10 months ago

                Considering TypeScript is a superset of JavaScript, you certainly can. But, that generally means you’re using TypeScript poorly.

            • arcterus@piefed.blahaj.zone
              link
              fedilink
              English
              arrow-up
              0
              ·
              10 months ago

              I mean, just the fact that you’re using TS instead of plain JS (and that TS even exists) should tell you that the language has issues…

              • hperrin@lemmy.ca
                link
                fedilink
                English
                arrow-up
                0
                ·
                10 months ago

                It’s just strict typing on top of plain JS. I like strict typing. Some people like loose typing.

                • ChickenLadyLovesLife@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  10 months ago

                  I started my career with Visual Basic (3!) and I appreciated the loose typing because it meant I could get going and actually have something running quickly as a newbie. A few years later I switched to C# and saw how an entire class of errors disappeared because of the strong typing. Both have their place, depending on the skill level of the coder and the needs of the application.

                • arcterus@piefed.blahaj.zone
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  10 months ago

                  I’m pretty sure most people do not like JS’s loosey-goosey, who-knows-what-ur-gonna-get type system, which is why TS is so popular. Not really surprising since the bones of the language were basically spat out in a couple weeks. TS is a custom type system on top of JS, meaning it’s not just JS’s type system expressed through strict typing. They added a bunch of useful features like discriminated unions and so on to make using TS more pleasant than raw JS.

                  TS is actually usable (although NPM and the environment built around it still suck). It’s inherited a bunch of weird shit from JS, but the type system generally makes them bearable.

                • SaharaMaleikuhm@feddit.org
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  10 months ago

                  Yes, but some are VERY opinionated about it. It’s almost religious with them. I think it’s silly. Both have their pros and cons. I honestly enjoy both and never had a big issue with loosely typed languages. I assume it’s just bad developers that mess up and get confused about it.

    • CeeBee_Eh@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Taking Immich as an example, there’s a lot of heavy lifting happening there behind the scenes in external libraries that are not written in JS.

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 months ago

        It’s written for Node and Svelte. But sure, just like nearly all other software, they use external libraries.

    • MonkderVierte@lemmy.zip
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Using only VSCodium in this llist. But not much, because i always have to close it on evening, or the casual game with 300 mods wouldn’t run beside it and the webbrowser reserving about half of my 32 GB RAM.

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 months ago

        Your VSCodium reserves ~8 GB of ram? You might want to check the extensions you’re using. I’ve got mine running with tons of open files and it’s using ~2 GB.

        Also, you should definitely give Immich a try. It’s an awesome piece of software.

  • MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Just now localsend, which would be really convenient. But the desktop app needs a while to start and render each time (because an electron app) and then always runs a useless animation. Is there something like this (sharing files/text with phone) in native that supports tray?

    • thevoidzero@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      I don’t know what you mean by supports tray but have you tried KDE connect? It has a lot more features than just sending files but I use it for a few things.

      And if you don’t care about having GUI, I love miniserve for sharing files. It’ll open a web server and you can connect to it to download/upload files.

  • addie@feddit.uk
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    I’m in this photo and I don’t like it.

    More specifically, my programming background is in industrial automation and I’d like to add some more ‘robust and flexible’ algorithms to CoolerControl so I can control my system fans / temperature better, but it’s written in a mix of TypeScript and Rust.

    I’ve spent 20 years programming hard real-time z80 assembly and know quite a few higher-level languages. (Although I prefer the lower-level ones.) Not those ones, however, so it’s not just a couple of hours work to raise a PR against that project. Going to need to crack some books.

    • arcterus@piefed.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      10 months ago

      For something you’re getting paid for, sure. But if you’re contributing in your free time for fun or whatever, presumably you’d prefer to use a language you actually like.

    • TeamAssimilation@infosec.pub
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Real programmers will write in a way that user’s resources are not being wasted because you need a full browser, a JS runtime, and DOM juggling, to show even the simplest application.

      It’s not rare for simple JS applications to consume over half a gigabyte of RAM on startup, and way more CPU than their native counterparts. That this was normalized and even defended is stupid.

      • hperrin@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 months ago

        I think you’re thinking of Electron apps, but that’s not really a criticism of JavaScript, that’s a criticism of Electron. There are plenty of JS platforms that don’t require a browser/DOM. React Native is the biggest example. Also, GJS if you want native Linux apps.

        • CarrotsHaveEars@lemmy.ml
          cake
          link
          fedilink
          arrow-up
          0
          ·
          10 months ago

          But why Node? Node cost five seconds just to start up back when I worked on my embedded ARM v7 platform, and on modern x86_64 computers, npx anything takes just as long. Why rely on another runtime? Why not native binaries instead?

          • Azzu@lemmy.dbzer0.com
            link
            fedilink
            arrow-up
            0
            ·
            10 months ago

            Because you have to figure out how to build them. And with that I mean, how do you make sure that whatever you’re doing will work and work the same way not only on your “embebbed ARM v7” architecture and all the other CPU architectures, but also the operating system libraries included? How do you make it work the same way on Mac, Windows 7, Windows 11, Ubuntu, custom Arch installations, FreeBSD, etc etc?

            If you build native binaries, you personally are the one who has to make sure it runs. This means (depending on how much you want to support) a lot of development or support time. (Or you make your users build it themselves and fix errors, which means a massively reduced userbase, good luck with adoption…)

            If you use Node, (or other virtual machines) you literally don’t have to do anything, because it just works.

            You really don’t see the value in that?

            • CarrotsHaveEars@lemmy.ml
              cake
              link
              fedilink
              arrow-up
              0
              ·
              10 months ago

              What you mentioned is compatibility across platforms. A program written in C is also guaranteed to run on all the systems you mentioned, given that the system has a C compiler and libc that stick to the standard. You, the programmer, does not have to anything to “make sure” your program works.

              See this insane list of platforms GCC supports.
              https://en.wikipedia.org/wiki/GNU_Compiler_Collection#Architectures

              We’ve invented high-level programming languages like C 53 years ago, just to get away from assembly, and to avoid dealing with the “cross-platform” problem you mentioned, remember?

              • Azzu@lemmy.dbzer0.com
                link
                fedilink
                arrow-up
                0
                ·
                10 months ago

                What if the system does not have libc? What if your program needs obscure library X?

                Why do you think anyone even came up with the idea of virtual machines? Don’t you think they had a problem they wanted to solve, that was not solved adequately before?

    • termaxima@slrpnk.net
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Yes and no. “Real” programmers care about engineering choices ; and JS is the cardboard of programming languages.

      Perfect for packaging (which in this metaphor is UI), horrible for building a bridge with. And vice-versa, I wouldn’t try and make amazon packaging out of reinforced concrete.

  • moseschrute@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Genuinely curious, how many of you hating on JS have done professional frontend work recently? If you have done professional work, was it part/full time, using TypeScript, how big was your eng team, did you have to worry about Server Side Rendering?  Maybe some extra context will show certain types of projects yield devs that hate the language.

  • Korhaka@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    Unless you are making a HTML/CSS only site (based) what do you want to use instead?

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      Invent a new internet where you can script pages directly in Python or TypeScript.

      Otherwise, you get to enjoy a silly toy language from the 90’s.

      • CarrotsHaveEars@lemmy.ml
        cake
        link
        fedilink
        arrow-up
        0
        ·
        10 months ago

        I’m 100% sure I can make Rust code (not even compiled to WASM) run natively in a browser like Firefox, given I have enough will power, time, energy, and money. The problem is getting everyone else to agree to this new standard.

        • CanadaPlus@lemmy.sdf.org
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          10 months ago

          In a scripting language, is there an advantage to no garbage collection? (I honestly don’t know)

          Someone else also pointed out to me, when I made a similar suggestion, that ability to partially fail but keep going is desirable in a web context. I don’t know, maybe there’s some way to make Rust do that more automatically than C. Python seems the be the standard for general-purpose scripting, which is why I mentioned it.

  • Feathercrown@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    If you care this much about JS being cringe I don’t trust you to contribute good code to a project anyways

      • rhabarba@feddit.orgBanned
        link
        fedilink
        arrow-up
        0
        ·
        10 months ago

        Same, so I’ll only answer for me: Python is dependency hell, also breaking existing code with every second update. Hard pass.

        • SSUPII@sopuli.xyz
          link
          fedilink
          arrow-up
          0
          ·
          10 months ago

          We are no longer in the Python 2 days. You have lots of wiggle room for using the version you want and are rarely forced to use specific releases.

          • Jesus_666@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            10 months ago

            There still plenty of “this version of pytorch doesn’t run reliably with Python 3.12, please use 3.10”, though. It’s not all sunshine and roses.

            • FishFace@piefed.social
              link
              fedilink
              English
              arrow-up
              0
              ·
              10 months ago

              If you’re writing python code you have to deal with versioning, yeah. But the end user basically never has to care.

              • Jesus_666@lemmy.world
                link
                fedilink
                English
                arrow-up
                0
                ·
                10 months ago

                Except if they then have to run it on their machine and the setup instructions start with setting up a venv. I find that a lot of Python software in the ML realm makes no effort to isolate the end user from the complexities of the platform. At best you get a setup script that may or may not create a working venv without manual intervention, usually the latter. It might be more of a Torch issue than a Python one but it still means spending a lot of time messing with the Python environment to get things running.

                This may color my perception but the parts of the Python ecosystem I get exposed to as an end user these days feel very hacky. (Not all of it is, though; I remember from my Gentoo days that Portage was rock solid.)

                • rhabarba@feddit.orgBanned
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  10 months ago

                  There are reasons why Common Lisp (that I absolutely prefer as well) is still a big thing in AI-related applications. Some of those are listed in your comment.

                • Valmond@lemmy.world
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  10 months ago

                  Security issues aside, you can freeze python code to an executable, linux, mac, windows.

                  Kind of neat IMO. Except the security concerns ofc.

                • FishFace@piefed.social
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  10 months ago

                  ML is a very new field and so most programs are not mature, and indeed they can have you messing around with venvs and such.

                  But most python software people actually used is packaged by a distro already.

                • Confused_Emus@lemmy.dbzer0.com
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  10 months ago

                  Figuring out venvs was a bit frustrating for me. Particularly since the steps I was following to install a particular app mentioned nothing about them, so I just got an error when I tried to follow their instructions. Thankfully managed to get it figured out, but yeah, definitely wouldn’t have been my first choice for an install method if others were available for that app.

        • lauha@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          10 months ago

          breaking existing code with every second update

          Still remembering python 3 release from 17 years ago?

      • Ephera@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 months ago

        Personally, I find that (complex) software implemented in Python tends to be so unreliable that I typically don’t want to use it after all, but I only find that out after wasting a bunch of time learning the software.
        It’s just frustrating, especially if I come back to the software every so often, naively thinking that it’s been a few versions, so maybe they’ve fixed it. It’s always just different bugs, which still end up being too frustrating to use the software.


        To give an example, I like to compose music using Lilypond, which is more-or-less a programming language to create sheet music. And there is a program that’s supposed to give you a well-integrated workflow for that (i.e. an IDE), called Frescobaldi.
        The first time I tried it, playback of the composed music wouldn’t work.
        The second time, I couldn’t click on notes to jump to the respective code snippet.
        And I tried it again a few weeks ago and it just crashed immediately with an obscure error message.

        Instead, I’ve slapped together a script, which just opens the sheet music in my PDF viewer, the code in my normal editor and then uses a CLI tools to generate and playback the sheet music. And while it’s definitely not perfect, it has been working more reliably for me than Frescobaldi ever has.

    • el_abuelo@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      this quirkiness doesn’t materialise in real world applications on any scale that makes it harder to deal with than the alternatives.

    • jpeps@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      I got a little under half in the first two, which I’m very happy with haha. JS certainly has some quirks, but you’ve really got to go looking for them IMO. TypeScript resolves most of these issues with comparing types, and the rest aren’t that unique to JS.

    • moseschrute@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      10 months ago

      You’re not wrong, but newer version of the language have steered devs away from these quirks. The quirks remain because the JavaScript language is 100% backwards compatible. It’s fun to laugh at these quirks, but I’ve been a full time JavaScript developer for 4 years and part time since 2015, and I’ve never seen any of these quirks come up in the real world. If you tell your developers to use === instead of == in code review, you eliminate most of the problems imo.

      JavaScript tooling deserves more hate imo. The ecosystem is kinda a disaster, but Vite is making a lot of progress in fixing that. If you ignore React Native and metro bundler, I think the state of web is looking pretty optimistic right now. At least from a technology perspective. From a business/AI/enshitification perspective we’re cooked lol