Live data from Hacker News

Go 1.4 is released

blog.golang.org

41–50 of 265 posts

Re: Go 1.4 is released

#41
post #33

I wonder why they didn't move the main code repo to GitHub as well. https://go.googlesource.com/ is somewhat poor compared to GitHub.

What is google source? Is it a successor/alternative to google code?

Re: Go 1.4 is released

#42
post #5

Can someone give me a compelling reason to start programming in Go? My default language at the moment is C, or C++.

Not having to use Java on Android. This is a major reason. (it's going to interesting to see battery life of not running an interpreted language on small devices like Android Wear).

Last time I checked Java was being compiled to native code.

Re: Go 1.4 is released

#43
post #13

Just to make sure I'm not missing it: fsnotify didn't make it into Go 1.4, right? 1.5 maybe? :)

Pardon my ignorance but if fsnotify is not available how is Hugo (static site generator) listening for events in the filesystem (to reload the server)

Looking at Hugo's dependencies, the copy on my machine (possibly outdated) uses this library: https://github.com/howeyc/fsnotify

However, there's a moving notice on that page for this repo: https://github.com/go-fsnotify/fsnotify

Fsnotify will probably make it into the standard library or other core golang repository at some point, given that it could help speed up the compiler. However there's nothing particularly mystical about it that prevents a 3rd party library from being just as good.

Re: Go 1.4 is released

#44
post #13

Just to make sure I'm not missing it: fsnotify didn't make it into Go 1.4, right? 1.5 maybe? :)

Pardon my ignorance but if fsnotify is not available how is Hugo (static site generator) listening for events in the filesystem (to reload the server)

fsnotify is not available in the go standard library, but you can still use it like any other third party library (e.g.: go get)

Re: Go 1.4 is released

#46
post #23
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…

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

Re: Go 1.4 is released

#47
post #5

Can someone give me a compelling reason to start programming in Go? My default language at the moment is C, or C++.

If you're doing networking, it's worth looking into. It has a good standard library with good networking features. It has pretty solid concurrency primitives.

Beyond that, I would not recommend it. I think a lot of people get caught up in the fact that A) it's hip and new and B) it's managed by Google. Without knowing what you want to do with it, I would recommend any number of languages (Rust, Haskell, Julia, etc.) before learning Go.

Re: Go 1.4 is released

#48
post #7
post #5

Can someone give me a compelling reason to start programming in Go? My default language at the moment is C, or C++.

You can also add numbers on an abacus. It _works_. Put in a less snarky way, C is often way more low-level and tedious than you need. The great thing about Go is that it lets you blend high-level and low-level programming in the same program, only getting low when you need to. It feels like a great mix of C and Pythonubyerlhphavascript. I've given many talks on this, e.g. http://talks.golang.org/2014/gocon-tokyo.slid…

>You can also add numbers on an abacus. It _works_.

Well, I wouldn't go there (C is antiquated/under-equiped like an abacus) if I was advocating Go.

After all, Go, just like an abacus doesn't have generics, or, besides channels and goroutines, most other facilities modern languages offer for that matter (GC and some basic data structures built-in is so 1980).

Re: Go 1.4 is released

#49
post #41
post #33

I wonder why they didn't move the main code repo to GitHub as well. https://go.googlesource.com/ is somewhat poor compared to GitHub.

What is google source? Is it a successor/alternative to google code?

Powered by Gitiles (footer on https://go.googlesource.com ) and links to:

https://code.google.com/p/gitiles/

  Gitiles is a simple git repository browser built on JGit. 
  Emphasis on simple: the goal is to make it easy to see 
  your files and changes, leaving complex tasks to other 
  tools. 

  Gitiles is the source browser used by the Android Open 
  Source Project. To see it in action: 
https://android.googlesource.com/

Re: Go 1.4 is released

#50
post #12

Can you build Android UI using Go? I have not found a good UI library in Go.

You can access OpenGL, but the full Android framework isn't directly exposed. It's similar to developing in C++ using the Android NDK.

From the documentation (https://godoc.org/golang.org/x/mobile/app):

  An app can be written entirely in Go. This results in a significantly
  simpler programming environment (and eventually, portability to iOS),
  however only a very restricted set of Android APIs are available.
  
  The provided interfaces are focused on games. It is expected that the
  app will draw to the entire screen (via OpenGL, see the go.mobile/gl
  package), and that none of the platform's screen management
  infrastructure is exposed. On Android, this means a native app is
  equivalent to a single Activity (in particular a NativeActivity) and on
  iOS, a single UIWindow. Touch events will be accessible via this
  package. When Android support is out of preview, all APIs supported by
  the Android NDK will be exposed via a Go package.
Alternatively, you could write your UI code in Java and call into a Go shared library via JNI methods, if you aren't worried about graphics and just need code portability. Again, this is similar to working in the NDK.
Post reply on HN