I’ve been working with a Javascript (+ TypeScript) + Java + SQL stack for the last 10 years.

For 2024 I’d like to learn a new programming language, just for fun. I don’t have any particular goals in mind, I just want to learn something new. If I can use it later professionally that’d be cool, but if not that’s okay too.

Requirements:

  • Runs on linux
  • Not interested in languages created by Google or Apple
  • No “joke languages”, please

Thank you very much!

EDIT: I ended up ordering the paperback version of the Rust book. Maybe one day I’ll contribute to the Lemmy code base or something :P Thank you all for the replies!!!

  • Floshie@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    0
    ·
    8 months ago

    Kotlin is by far my fav language. I’ve been astonished by its capabilities used with the “Exposed” library

    • Aatube@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      Yeah! It can even compile to JS and the JVM! Interestingly, it also supports the functional paradigm as you can see when programming with Compose.

    • Socket462@feddit.it
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      My two cents: I strongly agree with this. We just deployed an intranet blazor server app running on Linux (don’t know which distro) and apache (we might switch to nginx soon). It works very well and we had to write less than 100 lines of JS (mostly for file download and upload) One of my workmates was hired one year ago and at the time he didn’t know anything about .Net stack. Now he is mostly autonomous and he loves .Net and blazor in particular. Obviously YMMV.

      • scarilog@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        Bundle size is my only complaint with blazor, has to send the .net runtime in webassembly to the client.

        Aside from this, C# on the browser is an absolute joy to use. I’d use for everything if I could.

        • Socket462@feddit.it
          link
          fedilink
          arrow-up
          0
          ·
          8 months ago

          You are talking about Blazor webassembly, I am talking about Blazor server side, which loads as fast as a “normal” website.

          Server side Blazor has other caveats, that’s why I specified it is an intranet project, where server side Blazor fits very well. Anyway, at the moment, Microsoft is still putting effort in polishing both type of Blazor hosting model.

          This is not our first Blazor intranet web app and some of them are running in production for one year more or less.

          It is really a joy to program using Blazor, especially if you need cross tab/browsers/device/user real time communication, which comes almost free thanks to underlying SignalR channel.

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

            Ah you mean Razor then. Blazor lets you run C# in the browser, but Razor is the one that needs a server and streams changes to the client using signalR.

            • asyncrosaurus@programming.dev
              link
              fedilink
              arrow-up
              0
              ·
              8 months ago

              Razor

              Razor is the templating engine that’s been there since the original MVC. Blazor Server is the one that needs a server and streams changes to the client using signalR. Blazor WASM is the one that uses Web Assembly. As of .Net 8, Blazor can now also ne used as a generic SSR backend. They all use Razor Components, which is a component model using the Razor engine.

              Not to be confused with Razor Pages, which is also a generic SSR backend.

    • Serinus@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      Just don’t bring your damn factories over. For some reason Java developers just love unnecessary layers of abstraction and forcing that ridiculous factory pattern.

      And they bring it to any language they develop in after Java.

      If you see someone saying “no Java developers” for a position, this is why. They’ve been trained incorrectly, as a joke.

      • Corngood@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        All the core parts of dotnet (e.g. roslyn) seem to be built that way. I find them very frustrating to work on. Between that and the whole nuget thing being somewhat FOSS unfriendly, I’d steer people away from C#.

        • Serinus@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          8 months ago

          I don’t get how NuGet is FOSS unfriendly. I mean, at worst you could set up your own repository. All the tools are local. It wouldn’t be difficult to set up your own source if that was absolutely necessary.

          • Corngood@lemmy.ml
            link
            fedilink
            arrow-up
            0
            ·
            8 months ago

            The whole thing is built around pulling binary packages from servers, and there’s no consistent way of building those things from source.

            It’s extremely difficult to package anything non-trivial without referencing those binary blobs.

            They had to build this whole custom thing (https://github.com/dotnet/dotnet) just to make the SDK itself buildable from source, and most releases still have some binary dependencies. They only did it for the SDK so it could be packaged in Debian, etc.

    • NotNotMike@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      Agreed, as a Java developer you will hopefully find C# familiar but more refined. They share a lot of the same features now, but C# seems to do them all better, in my opinion. Linq especially is just so much more enjoyable for me than Java Streams.

      .NET Core (now just .NET) readily runs on Linux and Visual Studio has a free edition that is superb - an IDE provided by the language developers. Of course, you can always use Visual Studio Code or a third-party offering like Rider (by JetBrains so the transition from Java could be very easy of you are already familiar with their programs).

      My only complaint on C# is that the .NET versioning is a little confusing if you aren’t already familiar. However, that’s only an issue if you work with legacy code. New versions after .NET 5 are all the same naming and upgrading is generally effortless, just changing a single number in your project file and downloading the proper SDK

    • pathief@lemmy.worldOP
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      In my previous company we had a dot net + Microsoft SQL server stack. The code base was admittedly really really bad but those .NET Web Forms were horrendous to work with. C# in general felt very close to Java at the time, except for the LINQ queries I guess.

      I’m sure that, like PHP, the technology has come a long way and things are better and more modern right now. This was before Nugget was even a thing! Regardless, I feel like those chapters in my life are finished. I’d rather try something actually new to me!

        • scorpionix@feddit.de
          link
          fedilink
          arrow-up
          0
          ·
          8 months ago

          My team is currently exploring rust as an alternative because we have to do a lot of api calls and data crunching real fast. So rust?

      • Rikudou_Sage@lemmings.world
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        As a php dev who actually writes clean code and doesn’t blame people writing shitty code on a language: don’t listen to this fella.

        • scorpionix@feddit.de
          link
          fedilink
          arrow-up
          0
          ·
          8 months ago

          As a php dev who actually writes clean code while cleaning up after other people because Getting things done is more important: Don’t give people the tools to write shitty code.

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        I know it’s fashionable to shit on PHP but it’s significantly better than it once was… it’s honestly like a cleaner python that lets you use brackets.

        • scorpionix@feddit.de
          link
          fedilink
          arrow-up
          0
          ·
          8 months ago

          Sure, could be/was a lot worse than today. Still, PHP gives one way too much rope to hang themselves with.

          • xmunk@sh.itjust.works
            link
            fedilink
            arrow-up
            0
            ·
            8 months ago

            Hey, I grew up on C++… you’d be amazed how comparatively safe PHP is by comparison. I don’t disagree though, but I do appreciate having features like var-vars around for when I need them.

  • BiggestBulb@kbin.run
    link
    fedilink
    arrow-up
    0
    ·
    8 months ago

    I see you mentioned JS, but not TS. If you haven’t tried TypeScript, you 100% should! It helps a lot at scale.

    Also, I really do recommend Rust. It’s pretty awesome having the errors actually make sense, and it’s not as complicated as the hype makes it out to be (until you get into async rust lol).

    As others have mentioned, C# is also awesome.

    • pathief@lemmy.worldOP
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      We do use TS as well, yes!

      Rust is definitely a language I’m considering. Syntax looks a bit scary, though!

      • Fal@yiffit.net
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        Rust syntax is totally fine really. It often feels like writing python

  • key@lemmy.keychat.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    8 months ago

    Kotlin would be the most straightforward/useful professionally if you’re primarily Java. Other Java stack options are Scala or (shudders) Clojure

  • Bezier@suppo.fi
    link
    fedilink
    arrow-up
    0
    ·
    8 months ago

    As the other person said, Python. Or if you want something lower level, how about Rust?

  • JakenVeina@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    C# has been doing a lot of really cool things lately, and has first-class Linyx support.

  • Litanys@lem.cochrun.xyz
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    Id suggest rust, gets you a step closer to the hardware and a bit of a different paradigm than Java while still feeling high level.

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

        Well, yeah, because doing things with hardware is just always unsafe in that sense, no matter if you’re implementing it in Rust or C or Assembly. As long as you know what you’re doing (and the hardware manufacturer did, too), it’s not actually unsafe.

        Rust just decided to isolate the code parts where you need to be extra smart like that, whereas in C or Assembly, you might need to be extra smart throughout the entire code base.
        Obviously, no sane C programmer would just randomly start scrubbing memory addresses in UI code, but it’s still just helpful to have the naughty code clearly indicated.

    • pathief@lemmy.worldOP
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      Rust is definitely something I’ve been keeping an eye on. The syntax looks a bit scary, to be honest, but looks very versatile.

      • Lupec@lemm.ee
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        I’ll second Rust, it’s so fresh and versatile! You can go from super low level stuff all the way to things like web frameworks with WebAssembly and whatnot.

        The memory model is definitely a unique beast but I’ve found it gave me some insight on how it all actually works behind the scenes and I appreciate the strictly enforced correctness too.

      • Fal@yiffit.net
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        Definitely rust, and definitely use rustrover from jetbrains for an IDE. It’s amazing

      • floofloof@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        I’m a Rust noob. At first it’s daunting and nothing will compile. But it’s getting easier and I feel like getting over that initial difficulty is mainly a matter of internalizing a few basic rules, after which it feels more natural. So from what I’ve seen so far, I wouldn’t rate Rust as especially difficult. It certainly feels easier than C++.

        For a really challenging language I’d suggest Haskell. That one nearly broke my brain because thinking functionally is really very different if you’re used to more procedural languages. Rust, it seems, teaches you new discipline, but Haskell teaches you a different way of thinking.

        Anyway, that’s how it feels as a relative noob in both.

  • Semi-Hemi-Demigod@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    8 months ago

    I’m gonna be the weirdo recommending Ruby. I really like it as a language, and it’s pretty fun to write. Plus it’s got a lot of libraries so you can do fun projects like Discord chat bots.

    • Fal@yiffit.net
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      I absolutely hate ruby. I would almost rather write php. Ruby just feels like every decision they made is wrong, and designed to add confusion.

        • Fal@yiffit.net
          link
          fedilink
          English
          arrow-up
          0
          ·
          8 months ago

          Maybe. I just do not understand the love for ruby. Literally all the ruby code I’ve ever seen is just awful. Which isn’t necessarily a dig at the language, but it just seems like it makes it so easy to write terrible code.

          Also, what’s the deal with unless? “Do this unless …” is so unintuitive it’s almost like it was designed that way as a joke.

    • abbadon420@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      I have this one weird friend who does competitive one-line-programming in Ruby. It’s supposedly the best one-liner language.

      • Semi-Hemi-Demigod@kbin.social
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        I can believe it. The way Ruby implements “everything is an object” gives it amazing flexibility. Though the one-liners for Ruby aren’t as intricate and beautiful as Perl one-liners.

  • losttourist@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    8 months ago

    Give Clojure a go.

    It’s a modern variant of lisp that runs on the JVM and has deep interoperability with Java, so you can leverage your existing knowledge of Java libraries.

    But as it’s a lisp, it will have you thinking about problems in a very different way.

    • abbadon420@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      8 months ago

      Can you name any real world usages for Clojure? I did some lisp once when I was a sprout and loved it, would be awesome to do it on the jvm now that I work with java every day.

      • losttourist@kbin.social
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        It’s a very flexible language so can find a niche almost anywhere. I know of fintech companies that use it extensively for their back end data processing systems, and I’ve seen some really interesting stuff done with Clojure and Apache Kafka. They’re a good fit for each other - Clojure, as a lisp, is optimised for processing infinite lists of things and Kafka topics can be easily conceptualised as an infinite stream of data.

        Also, when combined with Clojurescript, it provides a single language that can be used full-stack, so could drop in anywhere that you might otherwise use Node.

        But I think one of the best things about it is the way it forces you to re-evaluate your approach to development. It’s a completely functional language so you have to throw away any preconceptions about OO and finding new ways to resolve old problems is one of the things that should be a joy for most developers, even if it has no practical application.

      • maksut@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        IMHO it would fit use cases of java, mostly long running services. But it is a hosted language with different implementations on top of javascript, .net etc. So it might branch out other use cases like frontend dev. It has a small but active community. Although it might be most popular lisp nowadays.

        If you are not familiar with lisp and aim is having fun while learning new things then clojure will fit nicely. It is so joyful once you get the initial weirdness because it will feel different. You just fire up a REPL, leave it running in background, hook your ide/editor to it and start sending evals. The application grows while it is running. I find the workflow quiet enjoyable.

  • matcha_addict@lemy.lol
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    8 months ago

    I have a couple of suggestions based on what you want!

    Ocaml: A good intro into functional programming

    The languages you’ve used seem to be primarily imperative style. Ocaml is not commonly used in the industry (with some exceptions), but it has a vibrant small community, and more importantly, because it’s a functional language, it will be different enough from what you know. Even if you don’t use it in industry, it will teach you a lot that would be hard to learn using non-functional languages.

    Ocaml is a compiled language, with a very fast compiler and very good type system.

    Scala: Another good intro to functional programming that’s more forgiving

    Although scala is mostly a functional language, it still has most of the gestures of imperative OOP languages like Java. It is also far more mainstream than ocaml and has used in industry.

    Scala also runs in JVM like Java, and thus gives you access to most JVM libraries.

    Rust

    Intro into low level programming Other answers spoke enough about Rust so I won’t dive here

    Zig

    similar to Rust in low-levelness, but less mainstream, better C interop, and other interesting differences

    Raku: the result of 15 years of programming language design

    Raku, formerly perl 6, was almost redesigned from the ground up to resolve complaints of perl 5. It has a very interesting design, with a gradual type system, a blend of functional and OOP paradigms, plus interesting syntax features like sigils and grammars.

    There are many interesting languages out there. I could talk forever about this, but I’ll leave you with the above. I personally would recommend ocaml if you’re interested in functional programming or care about performance. Otherwise, Raku, since its very interesting but doesn’t perform well (Raku’s VM is still immature and under development).

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

      I’m sorry, but as someone who was paid for Perl 5, I have trouble seeing the appeal for Raku.

      The first thing they should have done was nuke Perl from the orbit. Instead they built on top of the magic variable hell.

      So no thanks. PHP is much better.

      • matcha_addict@lemy.lol
        link
        fedilink
        arrow-up
        0
        ·
        8 months ago

        I tried to give OP languages that would be reasonably different from what they know already, so that its more fun (imo).

        However I didn’t know of ReScript, so I gotta check it out.

    • YIj54yALOJxEsY20eU@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      8 months ago

      Ocaml is going to be my next learn for fun language forsure! I’m getting sucked into the functional paradigm hole. The option/result types in rust have made working in languages without them much worse.