Skip Navigation

Recommend me a programming language

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!!!

174 comments
  • I advise you to learn something different and hard for you. Only this case will help you to grow and realize a lot of new.

    • Rust for hard
    • Nim for something different
    • C for understanding how things work

    All these languages are efficient and forget about hype and popularity. Language does not matter if you have what to write with it.

  • I’ll suggest Elixir. It’s a language that runs on the same virtual machine as Erlang, which has proven to be great for ultra-reliable and excellent at managing many, MANY concurrent processes.

    Elixir itself builds upon this great foundation with a syntax similar to Ruby, but entirely functional. It’s a delightful language to read and write.

  • I recently picked up Rust, still a beginner, but it's very nice. And the compiler errors and tips are top. Since I used only Python before, Rust is my first compiled language and I'm glad it was Rust. Options and Result's are also something I appreciate tbh. Other than for AI, simple stuff and maybe prototypes, I would use Rust over Python. Definitely recommend it. The borrow checker is a pain in the ass though. I'll also be using it later for embedded systems when I become more fluent with it. I am also currently making a big project with Rust that I haven't been able to do with Python.

  • C. Plain old low-level "portable assembly" C.

    In particular I'd recommend a Game Boy game, because GBDK uses SDCC and is fairly low-bullshit. With scanline interrupts, you have a surprising amount of time to do clever visual effects, flexing the machines one-and-a-half background layers. The machine is sufficiently explained in about forty-five minutes via the Ultimate Game Boy Talk.

    (NES is also an option, but - don't. I say this with my NES homebrew project open in the other monitor. It's a miracle this thing ever caught on. You need a decent understanding of the hardware, C, and 6502 assembly, just to put stuff onscreen efficiently. And then the fillrate still blows. The Game Boy can blast the whole tilemap in a fraction of a frame if you cheat hard enough.)

    If you want more power, the GBA supports C and C++, and that little fucker runs Doom. It's intended as a super-flexible sprites-and-tilemaps affair, like an SNES with an upgraded graphics chip. (And a downgraded sound chip.) You can scale and rotate dozens of sprites at 60 Hz, atop two scaled-and-rotated backgrounds. Or use fullscreen bitmaps in 8-bit or 16-bit color. (Well, 15-bit.) The homebrew scene for the GBA started before the console even launched, because it has a pretty standard ARM chip and will do anything the Genesis could without breaking a sweat. There was nearly a voxel heightmap version of Banjo Pilot that looked pretty damn close to Diddy Kong Racing on N64.

    I recommend C and retro consoles because they're suited to one another - and they offer control. You are in command of every single byte on these machines. C is the ideal language for that. It offers familiar high-level structures. It supports familiar syntax. But it runs very close to the metal, and if you want to get even closer, it will let you.

    • honestly I've been working on a side project in plain c , while I usually do c++ with a large amount of c libraries and I can't say I prefer it . The OOP features c++ gives really feel absent and I really feel like my code could be cleaner with them .

      especially as OP is comming from Java , c++ is likely a better option than c

  • Scheme, and work through SICP, watch the lectures along with the reading.

    I prefer Chez Scheme but there's many implementations. Chez's fast and practical, C FFI, large standard library, nice REPL with editor.

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

  • I say that you should find some interesting project, possibly something related to some desktop environment like Gnome, KDE, sway, cosmic and so on. There are multiple fun/interesting projects around them. Then pick a small and manageable task, use that to learn the language that project uses.

    I find Cosmic to be a very interesting desktop project, and they use Rust if that would be of interest.

  • DotNet is closest to Java, but hang on to your hat: the state of C# is at least half a decade ahead of Java, if not a full decade. It’s sophistication will make Java use feel like banging rocks together. DotNet Core can now run on all three primary platforms, and with some careful work, you can write a single program that can compile down to each platform and carry along its own required binaries, no pre-install of any framework needed.

    My second recommendation would be Rust. Stupidly steep learning curve, but an absolutely game-changing one where safety and security is concerned. It’s my next objective, personally speaking.

    Any other language I could recommend starts getting into speciality purposes, which makes general use more difficult or even wholly inappropriate.

    For example, if you are dropping into DotNet for business applications, I would also recommend diving into F# for that functional goodness for building complex business rules and data handling. But building an entire app in F# can be jamming a round peg into a square hole under many circumstances, it’s appropriateness envelope does not cover as many cases as C# does. You want to use C# for boilerplate/frameworks, F# for the core bits where it is going to shine.

  • Alternatives

    • C#, because it's good
    • Rust, because it's different
    • a (purely) functional language, because it's different
    • Nushell, nice shell, and great for scripted data processing
  • Factor!

    It's incredible and elegant and defies some common categorization.

    I've put some of my favorite resources in the sidebar of https://programming.dev/c/concatenative and I'm happy to walk through any particular challenges/examples -- I've done about the first week of Advent of Code with it this year, and the most recent handful of Perl Weekly Challenges, and some basic Euler problems.

    • Hi there! Looks like you linked to a Lemmy community using a URL instead of its name, which doesn't work well for people on different instances. Try fixing it like this: !concatenative@programming.dev

    • Re the sidebar: How are Nim and Roc partially concatenative?

      • I may be expressing it poorly and inaccurately, but what I mean is that in Nim you can re-order arguments and functions to start with some data followed by a series of transformations. The following two lines are equivalent:

         nim
            
        parse_int(read_line(stdin))
        stdin.read_line().parse_int()
        
          

        Roc offers a similar flow with their |> operator. Here's a snippet from one of my Advent of Code 2022 solutions:

         roc
            
        partOne =
            "input.txt"
            |> getData
            |> Task.await \data ->
                data
                |> getRangePairs
                |> List.keepIf pairHasStrictSubset
                |> List.len
                |> Num.toStr
                |> Stdout.line
        
          
174 comments