Live data from Hacker News

Go 1.4 is released

blog.golang.org

101–110 of 265 posts

Re: Go 1.4 is released

#101
post #63
post #10

Earlier quoted context omitted.

Once Go is installed, I can make a simple web app from scratch that displays parameters from the URL or request body in just over 95 seconds with Go, using only the standard library. I can cross-compile it for another OS and architecture, then deploy a single binary file without worrying about dependencies, dynamic linking, or segfaults. Try doing that in C/C++. Maybe a better comparison is to more systems-level appl…

You can get static linking in C/C++ with `gcc -static`.

Sort of. On Linux, libstdc++ depends on the NSS system which dynamically loads libraries to implement things like getpwent(). Last time I had to actually make a portable static executable (admittedly some years ago) this was a real problem, and it was easier to statically link everything except libstdc++, then ship a copy which was loaded using RPATH in the linker settings.

Re: Go 1.4 is released

#102
post #82

Earlier quoted context omitted.

And now things just got interesting. I'll put my money on the availability of Go on Android being the catalyst for its future hockey stick growth.

I don't really see it - a language made for systems programming (read: non-application development) being used for developing Android apps? Or is there some other kind of Android development in mind, here?

An app isn't only about the ui -- maybe you'll need some background operations, and you'll need to coordinate between multiple inputs. Go sounds more suited than Java for that.

Re: Go 1.4 is released

#103
post #73

There is a new range syntax[1]. The release notes say it's rarely used, but makes code cleaner. In which cases would the syntax be useful? [1] https://golang.org/doc/go1.4#forrange

It's useful if you want to schedule a function every x seconds:

    for range time.Tick(1 * time.Second) {
      fmt.Println("tick")
    }

Re: Go 1.4 is released

#104
post #82

Earlier quoted context omitted.

I don't really see it - a language made for systems programming (read: non-application development) being used for developing Android apps? Or is there some other kind of Android development in mind, here?

I think it was Rob Pike who later said he regretted using the term "systems programming" to describe Go. They never meant the phrase to mean purely operating system tools and programs (ie. not web applications or interactive end-user applications), which would be rather limiting. Instead, he said he said they meant it as a language for composing systems, as for example a typical SOA web site may be, or even for appli…

Real systems programming would be possible with a little more help.

Meaning a few more operations exposed in unsafe.

The problem is that the average developers never saw Oberon line of languages or are unaware how much of libc is actually written in Assembly.

Maybe with Go 1.5 fully re-written in Go, it will be easier to sell this scenario.

Re: Go 1.4 is released

#105
post #101
post #63

Earlier quoted context omitted.

You can get static linking in C/C++ with `gcc -static`.

Sort of. On Linux, libstdc++ depends on the NSS system which dynamically loads libraries to implement things like getpwent(). Last time I had to actually make a portable static executable (admittedly some years ago) this was a real problem, and it was easier to statically link everything except libstdc++, then ship a copy which was loaded using RPATH in the linker settings.

This is however a tooling issue, not a programming language one.

Re: Go 1.4 is released

#106
post #21

And they actually stuck with their go generate design? What an unfortunate mis-step. Let the makefile's continue. I've seriously thought about moving to gccgo just to try and get a build system where I can actually inject dependencies on .go files builds again.

If you want or need to use makefiles to do whatever you want to do, use makefiles.

Re: Go 1.4 is released

#107
post #82

Earlier quoted context omitted.

I don't really see it - a language made for systems programming (read: non-application development) being used for developing Android apps? Or is there some other kind of Android development in mind, here?

I think it was Rob Pike who later said he regretted using the term "systems programming" to describe Go. They never meant the phrase to mean purely operating system tools and programs (ie. not web applications or interactive end-user applications), which would be rather limiting. Instead, he said he said they meant it as a language for composing systems, as for example a typical SOA web site may be, or even for appli…

With that in mind, I tried to use the phrase in a more wide sense than some other language communities would. But you're right that that phrase might as well be disassociated with the language at this point, to avoid confusion. Better to find a new word for it.

Re: Go 1.4 is released

#108
post #46
post #23

Earlier quoted context omitted.

> Once Go is installed, I can make a simple web app from scratch that displays parameters from the URL or request body in just over 95 seconds with Go, using only the standard library. I can cross-compile it for another OS and architecture, then deploy a single binary file without worrying about dependencies, dynamic linking, or segfaults. Try doing that in C/C++. NodeJS runs on top of C++ :P

Yeah, he meant do it WITHOUT implementing an app server and a JIT for another language first. With std.

It will be possible in C++17.

http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2014/n424...

Re: Go 1.4 is released

#109

Earlier quoted context omitted.

If you're using C/C++ and need the performance, look at Rust. Fairly expressive, good type system (and they figured out generics), and C++ like or better performance. All the power of manual memory control, with none of the downsides.

It's too complex, we're already have C++.

I was at a lecture about security in C/++ code a couple of weeks ago. His conclusion was basically:

> There are no silver bullets with regards to safety in C/++ code; in order to achieve security, the programmer has to pay the price of being forever vigilant.

A lot of the complexity of Rust is for eliminating security pitfalls which are inherent in C/++.

Re: Go 1.4 is released

#110

> The most notable new feature in this release is official support for Android. Using the support in the core and the libraries in the golang.org/x/mobile repository, it is now possible to write simple Android apps using only Go code. This is fantastic! Are there any example Android apps released by the Go team to help get started ?

And now things just got interesting. I'll put my money on the availability of Go on Android being the catalyst for its future hockey stick growth.

They'd have to make Dalvik a compiler target. Could work, though.
Post reply on HN