Live data from Hacker News

"100% of our production system is now running Go"

groups.google.com

121–130 of 189 posts

Re: "100% of our production system is now running Go"

#121
post #114
post #104

Earlier quoted context omitted.

Use slices. Really, maybe we should remove container/* completely, so we don't have to answer this stuff over and over again.

Slice still restricts you to an array data structure (a continuous block of memory). How would you implement a sorted set in Go? It should be generic and type safe and efficient, please. Compare with the C++ solution.

I think the problem with saying that Go can be used as a C++ replacement is that the statement is too vague. The problem space in which Go is a great tool and the one in which C++ is a great solution have a big overlap. But that does not mean that you will solve a given problem in this overlapping space the same way. Both languages have a different set of trade-offs.

If you need a typesafe, generic sorted set with strict efficiency needs (or things like precise control over memory layout and such) then by all means go for C++, it's been designed for that kind of constraints.

Re: "100% of our production system is now running Go"

#122
post #93

Earlier quoted context omitted.

Straight from Rob Pike -- http://commandcenter.blogspot.com/2012/06/less-is-exponentia... Python and Ruby programmers come to Go because they don't have to surrender much expressiveness, but gain performance and get to play with concurrency. C++ programmers don't come to Go because they have fought hard to gain exquisite control of their programming domain, and don't want to surrender any of it. To them, software isn…

I have such a hard time believing how anyone could have believed that C/C++ programmers would switch to a GC-only language just like that. I just can't see Go as an alternative to C or C++, and I'm quite surprised that anyone (especially someone such as Rob Pike) could. Sure there are situations where a program that typically would have been written in C/C++ could benefit from Go (so there is a place for it), but the…

You want Rust: http://www.rust-lang.org/

Re: "100% of our production system is now running Go"

#123
post #93

Earlier quoted context omitted.

I have such a hard time believing how anyone could have believed that C/C++ programmers would switch to a GC-only language just like that. I just can't see Go as an alternative to C or C++, and I'm quite surprised that anyone (especially someone such as Rob Pike) could. Sure there are situations where a program that typically would have been written in C/C++ could benefit from Go (so there is a place for it), but the…

You want Rust: http://www.rust-lang.org/

+1 Rust is a lot closer to systems....

Re: "100% of our production system is now running Go"

#124
post #111

Earlier quoted context omitted.

Actually, If you have invested the 15+ years it takes to become a decent C++ programmer, then you won't want to throw that out just because some new language comes by. Most of what happens in C++ is low level maintenance of data. There are certain programs where this is important, but for the largest chunk of programs, low level maintenance provides more buggy programs with considerably worse performance. And this is…

If you have invested the 15+ years it takes to become a decent C++ programmer I have been programming in C++ for the past 14 years. Other than fast compile times, and a little less work to wire up interfaces, what exactly I am I supposed to be drooling over Go for? Between RAII and other modern C++ practices I don't really feel the need for a garbage collector. I already have a library that gives me Channel like func…

Are you a similar username in reddit?

Re: "100% of our production system is now running Go"

#126

Earlier quoted context omitted.

"I think that Mozilla's Rust is aiming squarely at C++ developers, whereas Go is more of a Java replacement." I basically agree with this as a Rust developer (although I'm not sure about Go being in Java's niche; I think of it more as in node.js's niche -- highly scalable web apps). Early on, I think both Rust and Go were thought to be targeting the same segment, but it turned out that we really weren't. Personally,…

As someone who's tried (and failed) to learn Rust in the past: I'm going to elide any commentary about the syntax for now, as I know why it is the way it is (the type system/annotations). I'm basically just going to expound on one thing for the sake of emphasis. For the love of god make Rust more accessible . I don't mean dumbing down the type system or abandoning regions (I really hope that works out). I mean the fr…

(Disclaimer: occasional Rust contributor)

I agree, Rust's documentation is really awful at the moment. I mean, there's a reason for it: the syntax and semantics are evolving so fast that any tutorial written right now will be hopelessly out of date in two weeks (note that the official tutorial has been updated regularly, but you can't even tell!), and much of the current stdlib is comprised of quick hacks based on obsolete language features and may very well get near-entirely rewritten before 1.0. Of course, that's no consolation for people who don't consistently lurk in the dev channels.

There's some hope, though. The next release (0.4, due in perhaps a month) has been tentatively designated as the "syntax freeze" release, so at the very least things should cool down after that point (fingers crossed). But until then, I wouldn't advise newcomers to get anywhere near Rust, for fear of the constant breaking changes that are leading up to the syntax freeze.

Re: "100% of our production system is now running Go"

#127
post #47

Edit: I just posted 3 minutes ago and I'm already in gray text. Wow. We search with Google, run our phones with Google, run Google's browser, now they want us to write all our code in Google's language. Why Google? What's wrong with Java? Other than the fact that Oracle owns it, I miss Sun. Scott McNealy tried to make the technology world better. Scott, Gosling. Google...why should everything we do all day and night…

>>What's wrong with Java? Everything is wrong with Java yet the JVM is an amazing feat. Java makes doing the simplest things ten times more convoluted. If you like the JVM then http://code.google.com/p/jgo/

>> The code sample on that page shows there are no braces in the if evaluation statements.

This is just Go's style but look you can still use braces. http://play.golang.org/p/_j7r6GB-ZN

Re: "100% of our production system is now running Go"

#128
post #107
post #95

Earlier quoted context omitted.

http://golang.org/pkg/container/list/ Casting every list element to "interface{}" is not generic.

Go does not have generics per se but that container looks pretty generic to me. What's your definition of generic programming BTW? I'm looking at several definition right now and cannot find out if, for example, a generic list container in C using void pointers to data would be considered generic programming . Wikipedia states generic programming is "a computer programming paradigm based on method/functions or classe…

I'd say void pointers are more untyped programming than generic programming.

Re: "100% of our production system is now running Go"

#129

How do you run golang as a server? Can anyone point me to a basic tutorial? Is it still running under something like Apache is golang IS the server somehow? If so Wouldn't each http request have to fire up the compiled executable? Isn't that slow?

>>How do you run golang as a server?

Using the net/http package that comes with Go.

>>Can anyone point me to a basic tutorial?

To learn Go - http://tour.golang.org/

To learn about http http://golang.org/doc/effective_go.html (A list of available functions are found here http://golang.org/pkg/net/http/)

Gorilla is a great web framework that builds upon the net/http package - http://gorilla-web.appspot.com/

>>Is it still running under something like Apache is golang IS the server somehow? If so Wouldn't each http request have to fire up the compiled executable?

What you are describing is CGI (http://en.wikipedia.org/wiki/Common_Gateway_Interface) whilst it could be possible but don't for real severs its really old and slow.

Re: "100% of our production system is now running Go"

#130

Earlier quoted context omitted.

> In hindsight it doesn't seem so surprising. Most things don't seem surprising in hindsight. That's why you don't judge surprises by it. If C++ programmers did flock to Go, would you then say that that was surprising? If not, you've just fallen victim to hindsight bias (because a model that predicts everything is useless).

Most things don't seem surprising in hindsight. That's why you don't judge surprises by it. Surprising was GP's original term, not mine. I don't expect Go or any other language to displace C++ any time soon. But I do think the "scripting" languages are very vulnerable to challenges from languages with static typing systems less primitive than Java's.

That's because the GP was surprised. I rather should have said, you don't judge that something wasn't surprising by hindsight.

Hindsight makes things obvious.

Post reply on HN