Live data from Hacker News

Go 1.7 is released

blog.golang.org

81–90 of 141 posts

Re: Go 1.7 is released

#82
post #22

I just learned Go 2 days ago and today I am already running my own web app! I love Go because it is kind of like C, but better (more modern).Generally, I always program my stuff in Java, but whenever I have an idea of creating something I could only choose between: C, Java, bash. Obviously I am not going to use C and bash for most of my ideas. Thinking about solving my issues in Java is meh so often I decided it is n…

I suggest giving Ruby a try too. I find it great for both web dev and local automation scripts. You can do pretty much anything you can do in bash but with clearer and shorter code. I've been writing all my non-trivial automation code in Ruby for years. Rails is just a popular web framework for Ruby, there's a lot more the language can do.

Agreed on popularity but Kickstarter is slow and memory is still expensive. Shorter code isn't always a good idea when most Rail and Ruby developers can't tell between APIs.

Swift is by far being the best all-rounder language and between the fastest and slowest.

Re: Go 1.7 is released

#83
post #18
post #4

Earlier quoted context omitted.

And smaller binary size too. For a statically linked blob, that's a big plus.

BTW, what does one have to do to get fully statically linked executables? The binaries I've created with go get SOMETHING are linking against libc, but I remember that go doesn't rely on the system libc. Has that changed? For instance I just installed git-appraise, and it's a dynamically linked executable. What am I doing wrong?

Most likely it depends on the `net` package which can use `getaddrinfo` for dns lookups. Try using the `netgo` build tag:

    go install -tags=netgo github.com/google/git-appraise/git-appraise

Re: Go 1.7 is released

#84
post #73
post #51

I have some years of experience with python and picking up golang was extremely straightforward. Sometimes it annoys me a little bit because it's standard lib is much smaller than python's however having it being compiled is more than worth it. Thanks go team !

That's been my feeling for a long time now. After getting spoiled by Pythons enormous standard library, other languages feel incredibly bare-bones and getting things done takes a lot more work. I wish other languages focused more on including lots of library functions.

Size alone is only half (at best) of the equation. What makes Python's standard library stand out is the way it is structured and documented.

Consider Java's standard library, which is huge. That last few times I did anything in Java, I spent more time browsing the library documentation than coding. Admittedly, I did not know the library very well, if one uses Java all the time, that ratio probably changes. In Python I don't need to know the standard library well, because the way the documentation is written makes it very easy to find what I am looking for.

Re: Go 1.7 is released

#85
post #22

Earlier quoted context omitted.

I suggest giving Ruby a try too. I find it great for both web dev and local automation scripts. You can do pretty much anything you can do in bash but with clearer and shorter code. I've been writing all my non-trivial automation code in Ruby for years. Rails is just a popular web framework for Ruby, there's a lot more the language can do.

> I suggest giving Ruby a try too. If you like Go, I don't see much reason to try Ruby except intellectual curiosity. Ruby is clearly a language on its way out and it is not just a lot slower than Go, it's also dynamically typed.

Why is it 'clearly' on its way out? IMO Rails is still the best web framework around, and the last release has really put it ahead of its closest competition.

Re: Go 1.7 is released

#86
post #31

Earlier quoted context omitted.

It's annoying to have to install the ruby interpreter onto everything. Go feels a lot like a scripting language, but produces binaries.

This is a hurdle, but IMO it's not too annoying if you already have rights to install packages. Just automate interpreter installation in bash if it's not already there. Way too much time and money is invested in fighting the esoteric crannies of Bourne shell when the logic would be much clearer in Ruby or Python. Ansible's moment in the sun is fading now that Docker came onto the scene, but that was a glorious momen…

You might have the right to install packages, but that may not solve your problem, that the application may require different version than available in the repo.

The classical case is Ruby + Rails + Passenger + CentOS. While there is SCL with any Ruby and Rails version you might want, that does not mean, that the Passenger package will work with it :(.

Re: Go 1.7 is released

#87
post #22

I just learned Go 2 days ago and today I am already running my own web app! I love Go because it is kind of like C, but better (more modern).Generally, I always program my stuff in Java, but whenever I have an idea of creating something I could only choose between: C, Java, bash. Obviously I am not going to use C and bash for most of my ideas. Thinking about solving my issues in Java is meh so often I decided it is n…

I suggest giving Ruby a try too. I find it great for both web dev and local automation scripts. You can do pretty much anything you can do in bash but with clearer and shorter code. I've been writing all my non-trivial automation code in Ruby for years. Rails is just a popular web framework for Ruby, there's a lot more the language can do.

I'd second this. Rails is still probably the fastest way to get an MVP off the ground, and most of the time it's more than fast enough. You can get UX on par with a well done SPA almost entirely using server code with Turbolinks 5 + Action Cable, too.

Re: Go 1.7 is released

#88
post #31
post #22

Earlier quoted context omitted.

I suggest giving Ruby a try too. I find it great for both web dev and local automation scripts. You can do pretty much anything you can do in bash but with clearer and shorter code. I've been writing all my non-trivial automation code in Ruby for years. Rails is just a popular web framework for Ruby, there's a lot more the language can do.

It's annoying to have to install the ruby interpreter onto everything. Go feels a lot like a scripting language, but produces binaries.

Then Python is a good alternative, it's basically already installed everywhere.

Re: Go 1.7 is released

#89
post #72
post #32

>A new compiler back end, based on static single-assignment form (SSA), has been under development for the past year Huh, I was under the impression that either SSA or CPS was pretty standard for any serious compiler. Does anyone know why they didn't design it for this from the beginning? It's like one of the earlier things you learn when making actual compilers.

SSA is standard for the middle end but not for the backend. According to my knowledge there are only two compilers with an SSA-based backend: libFirm (www.libfirm.org) and the Go compiler.

Obviously no backend is in SSA format after register allocation, but before allocation what do other compilers use if not SSA? Is there some kind of low-level LLVM and GCC IR separate from the front-end and middle one? That isn't in SSA?

I know that the C2 and Graal compilers are SSA all the way until register allocation is done.

Re: Go 1.7 is released

#90
post #83
post #18

Earlier quoted context omitted.

BTW, what does one have to do to get fully statically linked executables? The binaries I've created with go get SOMETHING are linking against libc, but I remember that go doesn't rely on the system libc. Has that changed? For instance I just installed git-appraise, and it's a dynamically linked executable. What am I doing wrong?

Most likely it depends on the `net` package which can use `getaddrinfo` for dns lookups. Try using the `netgo` build tag: go install -tags=netgo github.com/google/git-appraise/git-appraise

I tried that and also

    env CGO_ENABLED=0 go get github.com/google/git-appraise/git-appraise
but I always get an error that go wants to write net.a in /usr/lib, which I naturally am not allowed to do because it's owned by the distro (Arch) go package:

    go install net: open /usr/lib/go/pkg/linux_amd64/net.a: permission denied
I have only set GOPATH to ~/.go and nothing else. Any other GO environment variable I should have used?
Post reply on HN