I know the typical answer is “no because all the libs are in python”… but I am kind of baffled why more porting isn’t going on especially to Go given how Go like Python is stupid easy to learn and yet much faster to run. Truly not trying to start a flame war or anything. I am just a bigger fan of Go than Python and was thinking coming in to 2024 especially with all the huge money in AI now, we’d see a LOT more movement in the much faster runtime of Go while largely as easy if not easier to write/maintain code with. Not sure about Rust… it may run a little faster than Go, but the language is much more difficult to learn/use but it has been growing in popularity so was curious if that is a potential option.

There are some Go libs I’ve found but the few I have seem to be 3, 4 or more years old. I was hoping there would be things like PyTorch and the likes converted to Go.

I was even curious with the power of the GPT4 or DeepSeek Coder or similar, how hard would it be to run conversions between python libraries to go and/or is anyone working on that or is it pretty impossible to do so?

  • Exotic-Estimate8355@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I disagree that go is as simple as python. Don’t stay only with the syntax but also see the stdlib, built ins, etc. Simply making a Fibonacci function with memoization in go is much more complicated in go and requires you to think of more low level unnecessary stuff than python. I’m python you have it in literally four lines of code

    • _Lee_B_@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Go is neither as simple as python, nor as powerful. In fact, I don’t know of any modern general-purpose language that’s more limited. It’s faster, and produces native code, and it’s type-safe to an extent, but that’s about it. In almost every way, it’s a bad excuse for a modern language.

      • coehorn@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Go doesn’t have GIL and this reason alone is why I left Python years ago ;)

      • Dry-Vermicelli-682@alien.topOPB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I don’t know why you say “nor as powerful”. In which way? For a Go developer that knows Go, performance/memory wise, its much more powerful. Maintaining code… its on par… a go dev and a python dev are going to very likely be “equal” in ability to read/maintain code in their languages of choice. Go lacks some things, sure, and is more verbose in some areas, sure, but I dont see how that makes it a bad excuse for a modern language. On the contrary, it is very fast/easy to learn, produces small fast memory efficient (largely) binaries that can be built on all platforms for all platforms and has probably some of the best threading capabilities of any language.

        I would argue that for the use case, perhaps python IS better suited for AI… and I am just not at all knowledgeable in how that may be. So I’ll give you that… if the runtime and training bits of AI do NOT need the much more performance of a language like Go or Rust, then so be it. But if it’s the usual “There are just good libraries in python that have been written for many years and would have to be rewritten in Go/Rust/etc” excuse… then that doesn’t tell me that python is better for AI, just that it would require work that nobody wants to do to convert the existing python libs that are so good, to Go/Rust/etc.