1. 13
    Nim partners with Status.im programming nim-lang.org
  1.  

  2. 8

    Why are we upvoting a press release?

    1. 2

      Apologies if lobste.rs isn’t the right place for this announcement. But I can’t help but wonder why that might be. Can you or one of the upvoter’s explain?

      1. 2

        Look at the rest of the discussion in this thread. It’s about nim the technology. There are heaps of other places to post and read press releases. lobste.rs is a place to discuss technology.

        There are no hard and fast rules about what links are appropriate here. I suggest taking a look at this meta thread on the topic of Lobsters Community Standards.

    2. 3

      Everytime I see a post for Nim I am hoping for a Golang competitor that can actually bring something new to the table. But then I look at the library support and community and walk back disappointed. I am still hoping for nim to take off and attract Python enthusiasts like me to a really fast compiled language.

      1. 12

        But then I look at the library support and community and walk back disappointed.

        It’s very hard to get the same momentum that Go achieved, just by the sheer fact that it is supported and marketed by Google. All I can say is: please consider helping Nim grow its community and library support, if everyone sees a language like Nim and gives up because the community is small then all new mainstream languages will be owned by large corporations like Google and Apple. Do you really want to live in a world like that? :)

        1. 3
          1. 1

            Have tried it; GC is way to optimistic so under high loads you would see memory being wasted. I love the syntax and power of language but it still stands shy when you can’t compile single binary (like golang) and end up with weird cross compile issues. Nim is way more efficient in terms of memory and GC overhead.

            1. 1

              Cannot compile single binary? What do you mean by that?

              1. 1

                Let me rephrase; binary is not standalone with everything static linked (LibSSL and some dependencies). I had to recompile my binaries on server to satisfy the dynamic linked libraries with particular version.

                1. 5

                  I think that’s more a result of Go having the manpower to develop and maintain an SSL library written in Go. As far as I understand, if you were to write an SSL library in 100% Crystal you wouldn’t have this problem.

                  By the way, Nim goes a step further. Because it compiles to C you can actually statically embed C libraries in your binary. Neither Go nor Crystal can do this as far as I know and it’s an awesome feature.

                  1. 3

                    Is there a distinction between “statically embed C libraries in your binary” and “statically link with C libraries”? Go absolutely can statically link with C libraries. IIRC, Go will still want to link with libc on Linux if you’re using cgo, but it’s possible to coerce Go into producing a full static executable—while statically linking with C code—using something like go install -ldflags "-linkmode external -extldflags -static".

                    1. 2

                      There is a difference. Statically linking with C libraries requires a specially built version of that library: usually in the form of a .a or .lib file.

                      In my experience, there are many libraries out there which are incredibly difficult to statically link with, this is especially the case on Windows. In most cases it’s difficult to find a version of the library that is statically linkable.

                      What I mean by “statically embed C libraries in your binary” is: you simply compile your program’s C sources together with the C sources of all the libraries you depend on.

                      As far as Go is concerned, I was under the impression that when you’re creating a wrapper for a C library in Go, you are effectively dynamically linking with that library. It seems to me that what you propose as a workaround for this is pretty much how you would statically compile a C program, i.e. just a case of specifying the right flags and making sure all the static libs are installed and configured properly.

                  2. 2

                    I suppose you built with --static?

                    1. 2

                      You have to jump through quite a few hoops to get dynamic linking in go.

                      By default it statically links everything, doesn’t have a libc, etc.

                    2. 1

                      It’s not uncommon or difficult in go to compile a webapp binary that bakes all assets (templates, images, etc) into the binary along with a webserver, HTTPS implementation (including provisioning its own certs via ACME / letsencrypt), etc.

                      1. 1

                        only have a passing familiarity with go’s tooling, how do you bake in assets?

                        1. 1

                          There are different approaches, https://github.com/GeertJohan/go.rice for example supports 3 of them (see “tool usage”)

                    3. 1

                      I think he mentions the ability to statically build [1] binaries in Golang. I’d note that this is a feature that is not so common and hard to achieve. You can do this with C/C++ (maybe Rust), but it has some limits, and it’s hard to achieve with big libraries. Not having statically built binaries often means that you need a strong sense of what you need and to what point or using good packaging/distribution workflows (fpm/docker/…).

                      It’s a super nice feature when distributing software (for example tooling) to the public, so it feels like “here you are your binary, you just have to use it”.

                      [1] https://en.wikipedia.org/wiki/Static_build

                2. 1

                  The “programming by duct taping 30 pip packages together” method of development is pretty new, and it isn’t the only way to program. Instead, you grow the dependencies you need as you build your app, and contribute them back once they’re mature enough.

                  More time consuming, but you have total control.