dl.google.com now served by Go
groups.google.com
groups.google.com
This doesn't instill confidence in Go. That it is a success story with abandoned projects is not what we need to hear; we need to hear that Google+ runs on Go. Or at least something the size of Google Reader. When a startup is evaluating what language to build their stack on, dl.google.com is not what they're aiming for.
That said, I'm not sure how much a non-open-source program can really do in terms of marketing Go or any other language. This isn't so much politics as logistics: you need to be able to see the difference in code to get a sense of the advantages or disadvantages of one language over another, and if the program isn't open-source you can't do that. The author can say it's "more readable" (and does, in fact), but that's not something that can be quantified, and so there's really nothing but one guy's opinion to go on.
Go has an open source compiler, tool chain, and standard library, only this top-layer app is the non open source part of the stack.
(And I say this as a C++ fan -- relatively)
http://code.google.com/p/vitess/
It's a sweet program, and if it stops working, then YouTube gets smashed by a fail whale. Would that be the kind of thing you're looking for?
They want to know Go can be trusted to do the heavy-lifting most people would use C++ or Java for. So far, nothing that Google has publicized about how they use Go has indicated that their concerns are invalid.
I'm genuinely interested in this particular objection. I've written several components of a multi-component system (itself just one major piece of what makes our CDN work), and it never once occurred to me to say that one component was more or less "critical" than another. In this system I've written 12kloc servers with intricately managed resources where cachlines matter, and I've written 1kloc servers that just repeatedly make internal RPCs and occasionally tweak the behavior of the system. I've seen the system's behavior when each of these components fail, and both sorts of failures cause major problems. Is one more critical than the other? I'm going to get paged and users are going to suffer whichever one fails.
The reason that people are objecting is because serving up files is not exciting or innovative and doesn't show any particular 'win' for a language -- I could write the same thing in Haskell, for example. The details about how it's serving up the files from your Googley FS are irrelevant to the non-Google employee. :)
I.e. I can run nginx on any machine with a decent CPU and saturate a 10Gbps link serving static objects.
If you were to say that the gigantic global network of awesomeness that is Google CDN runs on Go, the average non-Google employee starts to care because that's something that you can't just do with some off the shelf OSS software. Then we can start taking Go seriously for mission critical use.
That's the though process, anyway. If you don't agree with it, that's perfectly fine. :)
> Google uses Go for many internal projects, but for confidentiality reasons it's rare that we can point to a specific example
1) They don't owe you anything.
2) "Internal projects aren't serious shit." is absurdly overreaching. That is all I was saying in response to you.
> Internal projects are not something that I can judge the importance of, so pointing out that they use Go in internal projects is asking me to take their word that they are taking Go seriously, but all I'm saying is "show me". Show me on a project I've heard of.
I assume you have heard of YouTube. From the first paragraph in the email: > YouTube’s open source vitess project (http://code.google.com/p/vitess/) is one high-profile success story...1. What was possible with Java in terms of performance
2. What use-cases were practical with Java and the JVM by conflating practical with "vaguely plausible or possible"
Go is a bit more difficult to pin down, demographic-wise, but I'd say it's a mix between C minimalists and Pythonistas and other scripters who want something faster but don't want to go with a JVM-language or go all the way down to bare metal.
This target group as well as Google's pedigree is why you're reading a lot about it at web programmer's forums (like, well, this one), consisting mostly of people who wouldn't (and couldn't) touch C++ with a ten foot pole.
Perhaps more sophisticated type systems like those found in Haskell are worth the extra effort but my money is on Go for its simplicity and pragmatism.
With a bit of mathematical notation--which may be a little foreign but is not that complicated--you can fit all of Haskell's type inference rules on a single page. These rules specify how the type system behaves and how to infer types! (The type inference, which may seem magical, is just a constraint satisfaction problem and so is easy to specify.)
I would not be surprised if Go's typing rules are more complex than Haskell's. All while giving you less static guarantees and less thorough type inference.
Haskell's type system may in fact have fewer moving parts, but it has a LOT more emergent complexity than Go's does.
I think it also appeals to those who first started out programming in Basic but quickly proceeded to Pascal and loved it. At least, that's it in my case. Pascal is the one I'd describe Go as being closest to -- but then I've never been a C programmer.
As for Pythonists and scripters, not sure they'd ever be that happy in Go. A lot of their conveniences are "gone" in their experience. Such as custom yield iterators.
And before someone answers me with the lack of manual memory management, Native Oberon and Blue Bottle are done in fully GC enabled languages with a little assembly for the boot loader and interrupt controller bindings.
If it were a good C replacement, it would have dynamically linkable libraries so that I could write an extensible server that could be extended with external modules (a la Apache).
If it were a good C replacement I'd have direct access to memory so that I could write device drivers.
C ABI is the operating system ABI. If the OS is written in Go, the C ABI becomes irrelevant.
> If it were a good C replacement, it would have dynamically linkable libraries so that I could write an extensible server that could be extended with external modules (a la Apache).
You can do this with gccgo to some extent already. Eventually this support might come to the standard compiler.
This is not a language issue, rather an implementation issue. As anyone with compiler development knowledge can easily explain to you.
> If it were a good C replacement I'd have direct access to memory so that I could write device drivers.
The Oberon guys did not had any issue with this. Their System package API is quite similar to what Go's unsafe package offers.
http://www.inf.ethz.ch/personal/wirth/books/ProjectOberon.pd...
http://e-collection.library.ethz.ch/eserv/eth:26082/eth-2608...
In my experience the domains in which C is the most appropriate choice does not work well with GC's, and even overhead like that coming from automatic boundary checking is an unwelcome performance impact.
What exactly are the areas of C use in which you expect Go to replace it?
Because we should move away from languages that are designed for security exploits.
> In my experience the domains in which C is the most appropriate choice does not work well with GC's, and even overhead like that coming from automatic boundary checking is an unwelcome performance impact.
I hear the complaint about automatic boundary checking since the early Pascal days. Yet most compilers, even Go, provide a compiler switch to disable bound checking.
Lets not forget how many security exploits we have to thank C for exactly this mis-feature.
Modula-3, Oberon, Active Oberon are three examples of GC enabled languages with given proofs that is possible to write operating systems in GC enabled languages with zero C code.
The Native Oberon and Blue Bottle operating systems were even used for several years as desktop systems at ETHZ.
> What exactly are the areas of C use in which you expect Go to replace it?
Well, actually it does not have to be Go. Rust and D are also good candidates.
The only area where I concede it is hard to replace C is in embedded space, specially if we consider many developers are still using Assembly.
As for the areas where human life is at risk we are better off with Ada, Spark or ATS. In these cases I surely wouldn't want a GC issue to cause deaths.
Are you seriously claiming that C was designed for security exploits?
>Lets not forget how many security exploits we have to thank C for exactly this mis-feature.
No actually we have to thank sloppy and/or naive programmers. The C language is clear in that it doesn't hold your hand.
>The Native Oberon and Blue Bottle operating systems were even used for several years as desktop systems at ETHZ.
You can write an operating system in lots of languages besides C (and it has been done aswell), yet all the operating systems/kernels in wide use these days are all mainly written in C or a combination of C/C++.
That you can write an operating system in language X is nothing new, the performance you get with language X however is. We've seem numerous 'safe language' operating system attempts which have died due to inactivity or as in Singularity's case been passed off to academia because MIcrosoft realised it had no commercial relevance.
>The only area where I concede it is hard to replace C is in embedded space, specially if we consider many developers are still using Assembly.
I disagree, in everything where performance and/or footprint is paramount there will be a need for languages such as C, as always there is room for competition but Go certainly isn't a candidate in my opinion. I haven't really looked into Rust yet, D on the other hand seems to have gained zero traction and is from what I gather primarily positioning itself against C++.
> No actually we have to thank sloppy and/or naive programmers. The C language is clear in that it doesn't hold your hand.
While it is true that security exploits come from sloppy, naive, hasty developers, we should also remember that even the programmers of projects such as OpenBSD are not immune to C's pitfalls. This is why I think that it's so interesting when languages try to achieve what C does, while also making it more likely that a programmer who's tired or distracted can't actually get incorrect code to compile. Besides the usual D, Go and Rust that are mentioned, I should say that the language Clay is another very interesting project and it's a shame that it does not get the amount of publicity these other alternatives get.
> You can write an operating system in lots of languages besides C (and it has been done aswell), yet all the operating systems/kernels in wide use these days are all mainly written in C or a combination of C/C++.
I don't know that it's really because of some functionality proper to C; I feel it's more of a familiarity issue. People have been implementing operating systems in C since the early 70's, there is a lot of documentation on the subject and C is widely known.
Performance which translates to low latency is of great importance in a operating system/kernel.
This extremely low latency is the result of optimizing at a very minute level, C allows this to be done while retaining a high level of portability and maintainability as opposed to assembly.
The extent to which this optimization is done is further highlighted by how the Linux kernel (and I assume other aswell) uses compiler extensions to further control the final generated code in order to maximize performance and minimize footprint. As such these compiler extensions allow for even further low level control which are outside that which the standard C language provides.
Kernel's and similar operating system components operate in a very low level problem domain, and C is a high level language which has shown itself particularly suitable in this context.
So I think that the wide use of C in low level and/or performance critical code such as that of kernels is based upon 'practicality' rather than 'familiarity'.
Even so, expert C programmers successfully writes all sorts of code.
Git for example doesn't strike me as a project with a larger amount of exploits or bugs than other similar software. And while lots of people have different views on it's 'ease-of-use', everyone seems to agree that Git is 'damn fast'.
As proven by Ken Thompson himself, with his compiler trick.
Joking aside, C requires expert programmers, which sadly seldom exist in the real world.
The only way to minimize the security exploits made possible by lack of bounds checking, arrays decaying into pointers, null terminated string without null characters, use after free(), sizeof operator incorrectly applied, ... Is to use languages that disalow these operations by default, only allowing them via a system/unsafe mechanism explicitly enabled by the developer.
C can be a good tool in the hands of experts that never do mistakes and are the Jedi masters of perfect coding. Sadly most companies tend to have average developers, not Jedi masters.
As such, C with its motto 'speed before security', makes almost impossible to write bug free code in the hands of such developers.
So there is no exploit-free C code out there? It is just impossible to write C code without buffer overflow bugs?
>Tools that fail in human hands, shouldn't be. If so why don't we throw out all programming languages? You can create buggy code with far-reaching implications in any sufficiently complex programming language, buffer overruns are but one type of bug.
And relating back to 'tools', we have lots of great tools at our disposal these days which can be automated to help identify possible vulnerabilities in our code. There really isn't a 'either you use a safe language or your code will by definition contain exploits' situation which some people try to paint.
C helps selling memory leaks tools, pointer misuse tracking tools and lint.
One was to thank the language deficiencies for the market opportunities they create.
The point of Go isn't that it replace existing C programs, it is that Go appeals to C programmers who want to extend their rrach, it is that is reshapes C to fit in areas it didn't fit before (and, yes, to not fit in areas it fit before), without being as radically different as Java or Python or Haskell.
Vitess, for YouTube, was announced on Feb 28th.
I also disagree with the idea that this is "marketing". Google have made (and are continuing to make) Go as a replacement for the languages they currently use. They're scratching their own itch.
Finally, I disagree that this is a major differentiator between Go and D. Neither of them push marketing, relying on the enthusiasm of their community to spread the language. They are completely different designs and have very different goals (as noted by others). I do not think that Go will win because of Google's ability to market it.
Neither did I said that this was a 'major' differentiator between Go and D. Just 'a' differentiator and not a major one at that.
I have become slightly myopic with regard to the little announcements. I'm confusing it with announcements like Bitly's: http://word.bitly.com/post/29550171827/go-go-gadget or Cloudflare's: http://blog.cloudflare.com/cacheing-the-uncacheable-cloudfla.... But the point still stands, I see more of these posts related to Go than posts related to D (or Clojure/Scala/Rust/...).
But yes, it's kinda marketing because I love Go (which is why I joined the Go team), and I wanted to spread my happiness and want to see other people use Go.
But the Official Google Marketing Department was not involved. We don't have any fancy videos like Chrome. Just me emailing.
> We don't have any fancy videos like Chrome. Just me emailing.
Does it count if I thought of dancing gophers while reading it?Yes, it's more the opposite: they were constantly requested for proof of their dogfooding and they always replied that they can't due to "confidentiality reasons".
Still I wish all the best to Go team, as we really need to go away from VM languages and some day replace C and C++, be it in the form of Rust, D or Go.
The creator just started a Kickstarter campaign for a D conference: http://www.kickstarter.com/projects/2083649206/the-d-program...
It's doing well.
Or maybe gasp Go is just really good ;)
I'll try again with something I don't intend to turn into a business. Writing various daemons, tools and helpers in Go has been great, though.
Well, it covers:
Serving (great built-in server for net/http)
Routing
Sessions
Context
--
It's missing:
Authorisation
Authentication
Parameter Validation/Checking
Asset management
Migrations
Cleaner templating (I prefer mustache to the built-in go templates)
HTML Helpers/View Helpers
Form Helpers
ORM or other persistence helpers (controversial I know)
Possibly scaffolding would be nice too and a suggested project structure to encourage sharing
--
So there are a few things which you'd generally expect in a web framework which aren't there yet. Of course some of the above list is subject to debate, some is available in revel, some it not everyone would agree is even necessary, but most other platforms in other languages have a bit more to help you, even if they are minimalist. Even just having an agreed-upon set of conventions and structure for web projects (a la rails), speeds up comprehension when looking at any large code-base.
I'm quite confident Go will get there, and having tried it out am really impressed with the language and the culture, but it would be disingenuous to suggest it has everything you'd need to produce large web apps currently - at present you have to write your own code for quite a lot of the above.
By the time you get to crud admin and plugins, you're at the point where the benefits of the framework start to come with significant additional costs (in maintenance, flexibility, comprehension etc). A pre-built app or plugin gets you up and running quickly but when you start to modify it you really need to understand the entire app/plugin before you can do so efficiently. Often people feel this is as significant a roadblock as simply writing it from scratch in the first place.
Any complex webapp is probably going to outgrow standard admin/scaffolding, and any complex usage is going to require modifications of things like plugins and gems, so while they're nice to have in an ecosystem I don't see them as essential. This is an area where django has more built-in that say rails though, and it'd be interesting to see a Golang framework trying to take the best ideas from all these other popular frameworks.
I would agree if the components were tightly coupled, but Django is very well structured to let you substitute any component. At any rate, it's much better than writing everything yourself outright, and I'm speaking as someone who has launched more than 10 Django-based products.
That said, I really want to try out Go...
Out of curiosity, why do you prefer Mustache to Go templates? They seem extremely similar, with Go templates being slightly more powerful due to easy-to-add template funcs. Both are essentially data-driven though.
Re Mustache versus go templates, I preferred the restrictions and clarity of mustache, because it forces you not to put any code in the view, all you can have are the basic constructs it provides, but it doesn't miss anything major IMHO. Here are the things I needed, which it provides:
* loops
* partials (with the neat {{> partial}} syntax
* nested contexts
* escaping by default
* clear named keys, no '.' prefix, though I guess . would be OK between keys for subkeys (not possible in mustache as yet)
* limited contexts (so that it's obvious what is being called)
The differences are not major, and frankly either is a fine choice, but I actually preferred the limited syntax of mustache, and found the go template setup needlessly complex, in particular when including partials, I didn't spend too long on the decision though so perhaps I just misunderstood...
So add me to the list of people who'd like to see something comparable on Go.
Oh come on, you know 16s was talking about implementations and tendencies of the parent company to engage in malevolent lawsuits trying to shut down alternatives.
Wherein an open source language, mostly developed by Company X, dies out because they stop developing it and the contributors remaining are not as good / interested. Let's not kid ourselves, open source is not magical fairy dust that does work for you. It works based on a set of personal incentives in alignment with the public good, and so sometimes it doesn't.
Same with ISO standards. They don't specify goodness. The Mono replacement for C# is finally getting there, but a few years ago, if the MS C# implementation had died off, would I replace it with Mono? God no.
> We've understood from the initial launch that Go needed to be more than just Google's language. The front page of golang.org has never mentioned Google and carries none of the Google logo or branding, and that is not accidental.
https://plus.google.com/116810148281701144465/posts/ExP5BeXU...
b) Not sure why you've included Microsoft in your list. The C# specification has an ECMA and ISO standard.(ECMA-334 and ISO/IEC 23270:2006)
So yes, just because it's open source doesn't mean much, but it's open source with a very liberal license, which does mean something.
A pure BSD license does not have these restrictions.
Now, in this particular case (for those who can digest legalease): http://golang.org/PATENTS
[0]: https://en.wikipedia.org/wiki/Java_(software_platform)#Free_...
Nothing against Java, now, but it's not a fair comparison to Go. (Disclosure: I was an early Go contributor but no longer use it for day to day work. I have no affiliation with Google.)
[0]: https://en.wikipedia.org/wiki/Java_(software_platform)#Free_...
From Microsoft, open source under the Apache License for all I know. And it's one of the 3 big, supported, here to stay .Net languages, comes with full VS support etc..
Specifically, what was it that convinced you that Go is "fun to write in"? Thats mostly what I care about too.
The lack of header files, clear and simple syntax, minimal language core, and predictable standard library all combine to make it feel very like a compiled Ruby, though obviously there are differences. The main differences coming from a dynamic background are the type system, interfaces, imports and packages (no circular imports), and the lack of dynamic loading - everything is loaded at compile time. Interfaces feel a little like duck typing with checks on whether a type really does quack like a duck at compile time!
If you mean writing a web app, it's not really as mature as other ecosystems in terms of support for this, but would be great for a smaller, minimal web-app, if you mean writing a web server from scratch, go is a great place to start, and even has a good example for you to look at in the built-in server:
Best thing I like about Go is the error handling, its great for defensive programming (which help as I write a lot of service applications).
As a sidenote is there any way of viewing google group posts without logging into google? I'm at work at the moment and my google account keeps on getting logged out as cookies are deleted frequently.
[1] https://groups.google.com/forum/?fromgroups=#!aboutgroup/gol...
Out of the blue 1-2 days ago, a DTD hosted on dl.google.com (http://dl.google.com/gwt/DTD/xhtml.ent) started semi-randomly timing out and hanging Eclipse.
(This was due to the Eclipse UI asking "Is this your XML file?" for every XML file in the project, for every plugin, and one of the plugins, IvyDE, ended up not having fetch-eternal-dtds turned off. What a silly default.)
Hey man, I've been running it for at least week for day-to-day work and it hasn't crashed yet. :-)
I'm quite pleased that most of the bugs reported so far are related to state transition bugs, which is the part of Wingo I'm least happy with.
And this includes using completely untested libraries that implement the entire X client stack (from the wire to the screen) in pure Go. Which amounts to roughly 31,000 lines of code.
N.B. I blame Go (mostly) for this state of affairs.
The perhaps most glaring problem, compared to the world of Erlang where I come from, is the lack of built-in seamless distribution. Many NoSQL databases trades consistency for availability and more machines. You are on your own implementing this.
Also, the lack of a ZooKeeper-like library may be something you will end up implementing. That, or perhaps the basis of the Dynamo paper.
But that is not unique to Go, it may as well apply to Java, Scala, etc...
It provides in-memory and file-backed implementations.