News for hackers. Stuff that matters.
Re:DigitalOcean droplet console rewritten in Go by nodesocket on Saturday April 26, 2014 @02:40AM (#7650641)
We (https://commando.io) are seriously considering switching to Go for all of our SSH connections. The built in concurrency, bundled with great websocket support, and SSH officially supported as a library (https://godoc.org/code.google.com/p/go.crypto/ssh) all make it a perfect candidate.
Re:DigitalOcean droplet console rewritten in Go by cliveowen on Saturday April 26, 2014 @05:32AM (#7650851)
"Go’s built in net/http package means we are able to do live deploys and keep on-going development invisible to users."

Why is that?

Re:DigitalOcean droplet console rewritten in Go by _ak on Saturday April 26, 2014 @07:45AM (#7651084)
The only thing I can think of: net/http doesn't hide details but instead allows you to supply your own socket from which to accept connections, which in turns makes it possible to implement zero-downtime restarts with the help of packages such as goagain.
Re:DigitalOcean droplet console rewritten in Go by flaie on Saturday April 26, 2014 @10:50AM (#7651534)
Thank you, I've just checked go again, that's really cool. I'm going to use it.
Re:DigitalOcean droplet console rewritten in Go by flaie on Saturday April 26, 2014 @06:50AM (#7650972)
I was asking myself exactly the same thing.
Re:DigitalOcean droplet console rewritten in Go by ecnahc515 on Saturday April 26, 2014 @01:31AM (#7650546)
Wish it was open source...could use a better VNC console for what we do at my work.
Re:DigitalOcean droplet console rewritten in Go by regecks on Saturday April 26, 2014 @04:04AM (#7650746)
I posted on reddit about how you could build this using open-source components: http://www.reddit.com/r/golang/comments/23zjxr/new_super_fas...

tl;dr use noVNC in the frontend and the websocket proxy bit is easy.

Re:DigitalOcean droplet console rewritten in Go by devicenull on Saturday April 26, 2014 @09:39AM (#7651333)
noVNC is pretty wonderful. It's weird they reimplemented it in another language.
Re:DigitalOcean droplet console rewritten in Go by ajkumar25 on Saturday April 26, 2014 @09:21AM (#7651280)
Why is that every large company at-last rewrites their codebase in statically typed language. This makes the newcomers confuse which language one should learn seeing their inspiration change their official language. Is the fate of scripting languages are same in every aspect of programming? Are they really only suitable for rapid prototyping?
Re:DigitalOcean droplet console rewritten in Go by akerl_ on Saturday April 26, 2014 @10:13AM (#7651417)
If there are people out there who are trying to choose a single language to learn, comments like yours should be a wakeup call to them:

Different situations and tasks call for different tools. Excelling in a modern development environment means being able to work with a variety of tools and being able to identify which tasks require which.

Re:DigitalOcean droplet console rewritten in Go by Joeri on Sunday April 27, 2014 @05:48AM (#7654518)
Static typing is an additional contract on the behavior of the code, similar to unit tests but built into the language itself and therefore cheaper to write. The overhead of specifying types slows you down during initial coding, but the code that results is more reliable and easier to read and maintain.

In environments where initial coding speed matters more than long term efficiency dynamic typing is preferable. Prototyping, mvp's, these are things that fit well into a loosely typed language. When that MVP grows into a business however, eventually it becomes benefecial to switch to static typing. Performance of a feature is usually the leverage that makes it happen, but the reduced cost of maintenance is what makes it stick.

So, both choices can be right for the same team at different stages of the product lifecycle.

What is interesting about Scala, go and rust is that they try to reduce the coding cost of static typing as much as possible (compared to Java, c and c++), giving the benefits without costing as much up front.

Re:DigitalOcean droplet console rewritten in Go by gnur on Saturday April 26, 2014 @09:46AM (#7651352)
Because performance matters. And it matters more when trying to scale.
Re:DigitalOcean droplet console rewritten in Go by ajkumar25 on Saturday April 26, 2014 @10:12AM (#7651414)
Then why not write in static typed languages from the very beginning itself?
Re:DigitalOcean droplet console rewritten in Go by huxley on Saturday April 26, 2014 @12:35PM (#7651937)
Performance is only one of many factors in deciding on a language.

Here are some other reasons that occur to me (YMMV):

* A language that is great for performance might not lend itself equally well to experimentation or initial implementation (not saying this is the case for Golang, but in my opinion it probably is for other performance-focused languages like C++).

* You as a developer might have more expertise in a dynamic language.

* The initial development language might have superior OSS libraries which allow you to get to a working application quicker (later you can replace them with your own implementations when you do the rewrite)

* Things change. Golang might have been a terrible choice when Digital Ocean was starting up. Golang is definitely reaching a tipping point as a language, but it might have become a dead-end like many other promising languages and where would you be then?

Re:DigitalOcean droplet console rewritten in Go by ajkumar25 on Sunday April 27, 2014 @09:48AM (#7655022)
Dead-end? You mean like perl?
Re:DigitalOcean droplet console rewritten in Go by uniclaude on Saturday April 26, 2014 @10:17AM (#7651429)
Because a lot of people live under the assumption that statically typed languages will slow them down.
Re:DigitalOcean droplet console rewritten in Go by zimbatm on Saturday April 26, 2014 @10:49AM (#7651528)
Which is true for a certain metric. If you just count in terms of amount of text that needs to be written, scripting languages win (in the prototyping phase).
Re:DigitalOcean droplet console rewritten in Go by uniclaude on Sunday April 27, 2014 @03:47AM (#7654314)
I'm honestly not sure it holds with expressive languages that use type inference, such as haskell.
Re:DigitalOcean droplet console rewritten in Go by reactor on Saturday April 26, 2014 @11:33AM (#7651707)
Scripting languages are really good for fast prototyping which helps in reducing the time to market which is critical for startups. When they go big, usually their codebase also goes bigger. Then they will start looking into maintainability, performance and 'ability to refactor' aspect of codebase. Statically typed language shines here and hence the move.
Re:DigitalOcean droplet console rewritten in Go by WoodenChair on Saturday April 26, 2014 @11:39AM (#7651725)
Are there any recent Go books that HN would recommend? Everything I see is from 2012 but I'd really like something from 2014 simply because I presume as an uninitiate that the platform is moving quickly.
Re:DigitalOcean droplet console rewritten in Go by jshen on Saturday April 26, 2014 @12:16PM (#7651858)
The documentation on the Go site is really good. You don't need much more than that. The early access book from Manning is really good so far (http://www.manning.com/ketelsen/) but it's only a few chapters finished. After that I find myself reading the source for the code in the standard lib which is well written and relatively easy to follow.
Re:DigitalOcean droplet console rewritten in Go by WoodenChair on Saturday April 26, 2014 @02:27PM (#7652304)
Thanks for the link - Go in Action looks like exactly what I was thinking of!
Re:DigitalOcean droplet console rewritten in Go by huntaub on Saturday April 26, 2014 @11:55AM (#7651786)
On the surface, that sounds reasonable. However, the Go platform has been very stable since 2012. Since Go documentation is standardized, learning how to write the language and use a few simple libraries (which a book from 2012 should do) should enable you to work with anything thrown your way.
Re:DigitalOcean droplet console rewritten in Go by kintamanimatt on Saturday April 26, 2014 @05:58AM (#7650884)
What was it formerly written in?
Re:DigitalOcean droplet console rewritten in Go by NateDad on Saturday April 26, 2014 @07:38AM (#7651070)
I'd heard they were a heavy perl shop, but that might have been more backend stuff than frontend stuff.
Re:DigitalOcean droplet console rewritten in Go by kbar13 on Saturday April 26, 2014 @09:14AM (#7651263)
vnc was previously an annoying java applet iirc
Re:DigitalOcean droplet console rewritten in Go by ajkumar25 on Saturday April 26, 2014 @09:44AM (#7651348)
Previously it was written in Perl.
Re:DigitalOcean droplet console rewritten in Go by Edmond on Saturday April 26, 2014 @09:48AM (#7651356)
for anyone who might need a cloud IDE for their DO droplets, I did a short blog post for installing HiveMind(crudzilla.com, I am the dev.):

http://blog.crudzilla.com/2014/04/hivemind-on-digital-ocean-...