What's happening in Go tip
dominik.honnef.co
dominik.honnef.co
About a month ago I started reading HN, and discovered that I'm irrelevant because I'm still using Scala rather than Clojure.
I ordered a Manning book, but before it even arrived I discovered that I'm irrelevant because I'm learning Clojure rather than Node.js.
So I started a couple of personal projects based on Express. However, before I was completely comfortable with callbacks vs. promises, I discovered last week that I'm irrelevant because I'm working with Node.js rather than Go.
Go has been my favorite of the bunch so far. However, I was just started to learn about goroutines and channels, when I discovered three days ago that I'm irrelevant because I'm using Golang rather than Rust.
I like this board, but it should come with a warning label! I haven't been approaching it with the grain of salt that it requires.
The alternative, to be like me, a stuck-in-the-past old guy who knows how to use only a few tools really well is probably also not optimal.
But the chase-the-next-fad attitude can be just as lethal for your productivity as having no options at all.
However, I notice that languages wash over HN like waves. A few weeks ago there were a glut of back-to-back Clojure posts. Last week it was all-Go-all-the-time, and over the past few days Rust has surged.
This wave pattern is a cultural quirk of HN, rather than serious indicators of what you should be pushing for within your company, or where you should be taking your career long-term.
That said it is not a silver bullet, split brain problems and other nasties remain hard.
I don't think you can rip off the good bits of Erlang without using the Erlang VM and associated plumbing.
The problem is that you end up needing to do 'real world' stuff, and hit something like this:
Very frustrating. But then again, if it were easy it wouldn't make the money that it does. A defensible moat that is made out of hard work is a good thing in many ways.
As these things go lots of money was blown, egos got frayed, potential customers were disappointed and time was wasted.
All in all a huge learning experience but ultimately mostly a harsh lesson in not biting off more than you can chew and how not to run a project. I was involved as a coder rather than in any other capacity but some of the responsibility for the way the project was run surely rubs off on me. For one I should have probably thrown in the towel earlier when I realized in how many dimensions we were deficit.
There wasn't a single point in time where I thought 'this is not the right way' other than right at the beginning, but once involved (originally just to fix 'a few bugs') I felt that I should give it my 200% to make it work.
Over the course of 2 years mountains were moved but alas that wasn't enough, and funds ran out before we reached a version stable enough that we could run our application on it. In some ways we got pretty close, in others we were still miles away from completion (most notably, the network core and the actual app). Precious time was spent optimizing things that did not need optimization and most of the lessons start-ups learn were re-learned, sometimes (very unfortunately) against better judgement.
I've been asked to look at salvaging this team/project/company and am working together with one of the founders to get things back on their feet in some form, so it is a very delicate situation.
Let me talk it over with the rest of the guys involved and see if they are willing to let me write it up, I wouldn't do it without their buy-in. One potential snag here is that there is still some lingering hope we can re-boot this thing on an existing platform side-stepping the bulk of the development and just concentrating on the app portion (which was my initial preference anyway so I don't mind that).
Well, this one is technical in many ways and there really is an interesting angle there when you remove all the other stuff. That's still going to be a very harsh thing to see black-and-white in public rather than with context in private.
The tech part essentially boils down to 'the right tool for the right job' and don't try to fit square pegs in round holes when you're on a deadline.
The list of 'lessons learned' is rather longer than that ;)
Obviously, you have to learn Common Lisp if you're thinking long-term - the one language that people will still be using when all the ones you've named will be history!
That takes the fun out of it. I do think that one can safely bet on scala or go and have fun.
If you have the right architecture you can be as polyglot as you'd like. It's just risky from a maintenance standpoint.
If you've been around long enough, you know that something like Clojure, Go, Scala, Python, or even Ruby aren't adopted until a certain level of acceptance is reached, that being often defined by your industry.
At a start-up, anything might go, but at a Fortune 500 company, you might be stuck on a Java 1.4 project. The "drum banging" on HN is often the initial rumblings, or some other point in the adoption curve.
By the way, you forgot about Dart. :-) The performance advantages seem attractive. Is it gaining any traction? One way I try to find out is by seeing if a lot of people are asking questions on StackOverFlow.
http://stackoverflow.com/tags/dart -- 1386 questions so no traction.
A few others:
http://stackoverflow.com/tags/go - 2697. Not so good.
http://stackoverflow.com/questions/tagged/node.js - 27, 301 Someone's probably asked all the basic questions.
http://stackoverflow.com/questions/tagged/scala - 17,933 A little light?
http://stackoverflow.com/questions/tagged/clojure - 5709 - Really light!
If only a few people ask questions a day, and you get stuck jumping in head first, you might regret that later if you're trying to move fast.
Real world example, ...the guys at Twitter went with RoR and ran into scaling problems. Might be different today because RoR has matured?
I wonder if the guys at FourSquare have some growing pains with Scala? If only the build would compile twice as fast...
Mostly because us developers who are working there know that companies like Twitter, LinkedIn, Foursquare etc. are using it and doing so incredibly successfully. And often frameworks like Play2, Storm, Finagle etc are perfect for our requirements.
scalding, spark, delite and associated big data cutters
Play, lift3, slick
(look at talk topics to see a lot of what's happening, but not everything
No one's asking questions because it's too easy and well documented.
The reason why HN promotes so many different languages and paradigms is because different solutions are better suited for different people and problems. It's not about hopping languages based on the latest bandwagon, it's about people wanting to share their experiences with their new tools.
What's more, just because many of us have got a little exited about Go / node.js / whatever, it doesn't mean that we're turning our back entirely on older technologies (case in point: I've recently made the switch to Go; both for web development and standalone console apps. However I still use shell scripts if I want to bang out some quick sysadmin routines. And I still use Perl CGI if I just need a very quick page thrown together for internal / personal use).
I think it's great to embrace new technologies, but not at the expense of abandoning older technologies when they're a better fit. And I think most people on here are intelligent enough to realise that. So the diversity of languages you see published on HN are the equivalent of the variety of different IDE's or even OS's around - they're not always there to replace each other as they often set out to solve different goals; and nobody is advocating that members of this community should learn and hop to each new language like a Frogger sprite leaps from log to log. Just as you wouldn't be expected to switch IDE's nor OS's every few months.
I'm sticking with Erlang, "Let It Crash" (and handle the crash) is better than "add if(err) after everything and good luck with that"
panic() and recover() does that. It's not exceptions, but it does exactly that.
When I pop it up on github here soon, I'm planning on accompanying it by a blog post that will probably end up being longer than the entire library (including test suite and documentation) discussing all the whats and whys of how much you can and can not bring over of Erlang's approach.
On a language level the support seems to be there, and not radically different from what Erlang offers. The pre-built libraries that make up OTP for Erlang aren't there and you have to build your own, but the underlying structure seems to be there.
Go does not strive to be Erlang, it doesn't even strive to be fault tolerant. Hell, you can deference a null pointer in Go!
What Go is, is an incredibly simplistic language which can be picked up very easily by even mediocre developers. The language looks and feels like an updated and refreshed C.
Whilst Erlang has a much more rich computation model when it comes to using the concurrent actor system, it also comes at a higher price of complexity. I'm an Erlang developer myself and even I wouldn't like to bestow OTP on a complete newbie. Go doesn't have this, the concurrency features are simple, they're not perfect but they work for their intended use-case.
I'm thoroughly enthralled with Erlang as a language but I know that it has some extremely rough edges. You would know what these are yourself and so I won't enumerate them. Go doesn't (yet) have a lot of rough edges as it feels a lot of careful thought and planning has gone into every feature change. Does this mean that you don't have whizzbang features? Yes. Does it reduce the complexity by a huge factor? Yes!
Every enterprise manager's dream!
Edit: VB6 - The only Real VB
That isn't the crazy part. Exceptions are bad, and should not exist. The crazy part is that they don't want to put in useful error handling, so we're stuck with crappy "if (err)" everywhere.
Another thing is, maybe I'm worrying too much but, what if Go becomes more and more complicated that simplicity is not one of its advantages anymore, and people who're new to the language will get scared?
The type system is unsound and lacks power (although the interfaces are mostly nice), there are no generics (except for builtin collections), error handling is hard to compose (except in non-idiomatic ways), no real type inference (although single assignments are easier).
Its simplicity is not composable.
For example, we have:
full := []int{0, 1, 2, 3, 4, 5}
half1 := full[:3] // [0, 1, 2]
half2 := full[3:] // [3, 4, 5]
Now, the capacity of half1 is 6, so it can "grow inside" half2, such that: append(half1, 666) // Now, half2 is [666, 4, 5]
This may happen even when you are not using append, for example you could do: half1 = half1[:5] and get into half2 again.The new syntax solves this problem such that, after defining half1 as full[:3:3], if you try half1[:5] you will get an error (the length cannot be larger than the capacity) and if you use append, a new array will be allocated, leaving the contents of half2 intact in any case.
So, first: "writing your own memory allocator [is] common when dealing with a lot of tiny allocations that shouldn’t slow down the GC".
Second: "Now the user does something stupid: He appends to it. As we’ve seen before, this append will “leak” into memory beyond the length of the slice, and beyond what the memory allocator intended. You just overwrote someone else’s memory!".
Is this what we want to be dealing with in a 2013 language?
I'd rather have full C-like control than such BS edge cases and having to re-implement memory management myself.
https://github.com/mozilla/rust/wiki/Note-development-roadma...
and release notes
https://github.com/mozilla/rust/wiki/Doc-detailed-release-no...