News for hackers. Stuff that matters.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by kjksf on Thursday March 14, 2019 @01:40AM (#19386762)
And yet Go pretty much ate the lunch of C# and Java when it comes to backends and devops, despite the fact that both had a decade of head start and generics and large dev teams behind them.

I like C# and Java, certainly much more than C++, but Go hit that sweet spot of little ceremony (try to write a single file Java or C# program), performance, deployability (again, try to deploy a Java or C# program as an Ubuntu service on a low-end 512 MB Digital Ocean host or provide a Java or C# cmd-line program to a Mac user) and programmer productivity.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by mrath on Thursday March 14, 2019 @04:24AM (#19387366)
>And yet Go pretty much ate the lunch of C# and Java when it comes to backends and devops, despite the fact that both had a decade of head start and generics and large dev teams behind them.

This is simply not true. Go is nowhere near that even when only new Greenfield projects are considered. I see many of the start-ups using it but most new projects are still in Java or c#. But go has captured the Dev ops tools area quite a bit.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by petersellers on Thursday March 14, 2019 @02:46AM (#19386984)
>Go pretty much ate the lunch of C# and Java when it comes to backends and devops

Are you saying that Go is significantly more popular than Java for backend, server-side development? I'd like to see a citation on that, because pretty much any statistic I've read has said otherwise. If you are saying it's significantly more performant, then I'd like to see evidence for that too.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by ilovecaching on Thursday March 14, 2019 @03:14AM (#19387097)
Benchmarking is error prone, and so are language statistics. Certainly Go has had a meteoric rise and much of the big innovations are happening in Go (Kubernetes, Docker, Prometheus, Terraform).

Go is simple, easy to install, and the benifits of a compiled language are huge. I can apply all of my systems knowledge to understand how my app is performing. The JVM is a career in of itself, and locks you into an ecosystem that is very proprietary and frankly full of lame enterprise salesmen and big business fogies. Go is fun. It’s branding is fun, it’s community is passionate, and a lot of big names are on the tin that speaks to a lot of us who love and grew up on Unix.

I mean, do you want to support Oracle and Larry’s bid to buy more islands or ken and rob?

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by blub on Thursday March 14, 2019 @05:21AM (#19387617)
Compared to passionate comunities, fun and evil CEO arguments, benchmarking and language statistics are not error prone.

You're not really arguing in good faith. This reads more like a parody.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by igouy on Thursday March 14, 2019 @10:13AM (#19389354)
> Benchmarking is error prone, and so are language statistics.

… and so is just saying stuff :-)

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by caseymarquis on Thursday March 14, 2019 @02:57AM (#19387026)
I'm running C# on hobby Heroku dynos right now, which are 512MB. I think dotnet core has changed the landscape a bit for C# web services. I made a library which allows me to start a new dotnet project with a vuejs frontend on Heroku within a couple of minutes. I'm really hoping dotnet core continues to see more adoption.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by tybit on Thursday March 14, 2019 @03:48AM (#19387235)
Yep .net core runs comfortably in a minimum 128mb aws lambda. It’s not ultra lean, but there aren’t many use cases I can think of where that matters.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by geezerjay on Thursday March 14, 2019 @02:46AM (#19386981)
> And yet Go pretty much ate the lunch of C# and Java when it comes to backends and devops, despite the fact that both had a decade of head start and generics and large dev teams behind them.

C# was a windows-only show until very recently with the introduction of.NET Core, and ASP.NET Core is gaining in popularity very fast.

IMHO Go's current adoption rate has more to do with politics and Google's aura than anything else, really.

And I really don't see your assertion on Go eating Java's lunch. Sometimes Java appears to be the only game in town wrt backend development, with Python appearing in second place.

> try to deploy a Java or C# program as an Ubuntu service on a low-end 512 MB Digital Ocean host

I have no idea how a generi C# or Java program fares with so little resources, but I've deployed ASP.NET Core and Spring apps on Hetzner's smallest VMs (2GB) without any problem. I had to google digital ocean's micro VMs to check if such a thing really existed, and I have to say that the price difference (Hetzner's 2GB VM for 3€/month Vs Digital Ocean's 512MB VM for $2.50/month) hardly justifies the trouble.

So unless you're compelled to save about $0.50/month on hosting, I hardly see the point of your example.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by tsimionescu on Thursday March 14, 2019 @03:36AM (#19387179)
Go's big advantage over other memory managed languages is the very low overhead of its runtime - a hello world Go app is probably less than 5MB on disk with all dependencies, and takes up less than 5 MB of RAM. This is absolutely wonderful if you want an architecture of many independent containerized apps, especially with something like Kubernetes or Docker Swarm. Compared to that, the smallest Java container on the classic Docker repos is about 90MB in size and takes up a few tens of MB RAM.

Apparently there is a new Java project [1] floating around that is promising a way to use Java exactly in this use case, but I haven't played around with it.

[1]: https://quarkus.io/

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by apta on Thursday March 14, 2019 @10:25AM (#19389479)
http://august.nagro.us/small-java.html

You can run an empty Spring Boot service in 15MB of RAM or so.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by pyrale on Thursday March 14, 2019 @02:43PM (#19392166)
How many mbs for a hello world in forth ?
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by tsimionescu on Thursday March 14, 2019 @07:26PM (#19394942)
Hey, I said 'over other memory managed languages'! I really wouldn't compare it to one of the tiniest languages this side of asm. I also think Forth would be a harder sell in a corporation than Go. Or C++. Or ASM, probably.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by apta on Thursday March 14, 2019 @10:24AM (#19389470)
> try to deploy a Java or C# program as an Ubuntu service on a low-end 512 MB Digital Ocean host

Others have already pointed out doing this with .NET, and yes, it's also possible in Java land. I have done this, even running a Spring Boot service which is generally considered more heavy weight than other frameworks like Dropwizard. A plain Spring Boot service runs in about 15-20MB RAM if I recall. And now with the GC improvements in Java 11+, it's even better.

http://august.nagro.us/small-java.html

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by tigershark on Thursday March 14, 2019 @07:28AM (#19388247)
You can write csx files since 2015 probably, so it has been really easy for the last 4 years. In F# we are speaking of more than a decade, before go even existed. On the JVM you could have used groovy for even longer than that. For the rest of the points I guess that you never heard about .Net core. And I’m quite curious about the reason that you are unable to install the JRE on Linux, that is something that has been possible for at least two decades and with much, much less RAM than 512MB.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by vorg on Thursday March 14, 2019 @05:46PM (#19394124)
On the JVM, Beanshell has been around since the late 1990's so that's also over 2 decades. In fact, Apache Groovy was pretty much a clone of Beanshell, but with closures added, in its day.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by adrianN on Thursday March 14, 2019 @01:53AM (#19386806)
Well yeah, Google uses Go, so clearly it must be the best technology out there! Why would a hip startup use crusty old enterprise technology like Java?
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by apta on Thursday March 14, 2019 @12:11PM (#19390585)
Ironically enough, the vast majority of Google's critical services are in Java and C++. I don't work there, but what's golang used for other than some few services here and there?
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by ilovecaching on Thursday March 14, 2019 @02:42AM (#19386963)
People have a lot of valid concerns about using a technology owned by Oracle, and the 2000s ended up leaving a bad taste in people’s mouths from the amount of enterprise shilling that went into Java. Now Java is showing it’s age and cross compiling is no longer the problem it once was.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by dig1 on Thursday March 14, 2019 @04:53AM (#19387508)
People are not educated enough and should start living in 2019, not 2010. Java (trademark) is owned by Oracle, but implementation is open source, backed by big names.

> Now Java is showing it’s age and cross compiling is no longer the problem it once was.

I see numerous flaws in this sentence. How Java is showing it's age, language wise, comparing to eg. Go? It is fully OO, has generics and recent versions with advanced functional stuff are making Java pretty modern language on (almost) Scala level.

Regarding cross compiling, it is still the problem. If Go gives you 3-4 platforms out of the box, you can't say cross compiling is solved problem; try to work with MIPS or slightly less popular embedded platforms.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by simonask on Thursday March 14, 2019 @07:01AM (#19388099)
Some people would argue that being "fully OO" is indeed a sign of age at this point. :-)
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by apta on Thursday March 14, 2019 @10:26AM (#19389497)
Which would be ignorant, everything has its place. In any case, https://www.youtube.com/watch?v=HSk5fdKbd3o
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by geezerjay on Thursday March 14, 2019 @02:51AM (#19387003)
None of your arguments were objective or technical, and you've missed the fact that the Java is by far the standard in backend development and more importantly is taught in universities.

Honestly, the only ads I see for Go developers are for blockchain projects, which suggest buzzword-driven development.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by ilovecaching on Thursday March 14, 2019 @03:32AM (#19387168)
There are no objective arguments when it comes to programming languages. If people like Brendan Gregg say that benchmarking is difficult and error prone, we don’t stand a chance.

What we do know is that Kubernetes, Docker, Terrafofm, Prometheus, Caddy, et al. have taken off in part because Go is easily accesible and can scale. Go has risen metorically to the top just like Java did, and there are lots of really huge deployments of Go out there. The JVM will always have certain limitations and require it’s users to specialize in JVM tuning and architecture. Many users are also hesitant to support a company like Oracle, and the enterprise shilling that comes with the Java ecosystem.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by blub on Thursday March 14, 2019 @05:57AM (#19387769)
Things that are difficult and error prone are often worthwhile. Probably why Brendan Gregg has built a career in performance engineering, instead of giving up and say, complaining on HN how hard life is.

And in fact performance itself is a very objective criteria. Either a piece of software is fast enough or it isn't. This doesn't refer only to percieved performance, but also hard performance indicators established in the requirements of a project. Sw dev 101 really.

Furthermore, languages and their implementations can be assigned to different performance personalities, from very fast (e.g C) to slow (e.g. Ruby). Go doesn't belong in the very fast bucket, it's one level below, hanging out with Java, C# and others.

The arguments regarding Oracle are frankly worthless, but if you want to go there, at least Oracle admit they're evil and restrict their evilness to price gouging on their products. They don't pretend to be some force of good while surveilling billions of people through devices, apps and web platforms like Google does.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by pjmlp on Thursday March 14, 2019 @07:24AM (#19388224)
Kubernetes was prototyped in Java, it only got rewritten in Go, because another team took over.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by cuddlecake on Thursday March 14, 2019 @04:51AM (#19387498)
I think Java is taught in University and has become the Backend development standard because of historic reasons, not because of its technical qualities.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by geezerjay on Thursday March 14, 2019 @05:19AM (#19387606)
That's not true at all, and misses the whole collection of technical reasons Java became one of most successful anf popular platforms in history, and why it's still being adopted for other applications and platforms, including those controlled by Go's main proponent: Google.

It might be trendy or fashionable to poopoo on Java, but that criticism isn't driven by technical arguments.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by cuddlecake on Thursday March 14, 2019 @02:33PM (#19392040)
Well, there are plenty of other languages that are just as capable as Java, they just came later.

I just feel like I've been lied to in University. Java was presented as the silver bullet in University. "It runs anywhere and models the real world". "In Java, you can't compare apples and oranges!". Turns out you can, if someone implements an AppleOrangeComparator. Great.

I'm just venting at this point, don't mind me.

Re:The ups and downs of porting 50k lines of C++ to Go (2015) by ilovecaching on Thursday March 14, 2019 @03:11PM (#19392481)
Most of use learned C++, Java, or Python in school, that doesn't mean it's right or that it has to be a permanent fixture in your life.
Re:The ups and downs of porting 50k lines of C++ to Go (2015) by pjmlp on Thursday March 14, 2019 @07:20AM (#19388202)
Only in Silicon Valley and startups hoping to get acquired by Google.