News for hackers. Stuff that matters.
Re:Go 1.7 is released by ufmace on Monday August 15, 2016 @09:14PM (#12294827)
I suggest giving Ruby a try too. I find it great for both web dev and local automation scripts. You can do pretty much anything you can do in bash but with clearer and shorter code. I've been writing all my non-trivial automation code in Ruby for years.

Rails is just a popular web framework for Ruby, there's a lot more the language can do.

Re:Go 1.7 is released by woah on Monday August 15, 2016 @10:02PM (#12295024)
It's annoying to have to install the ruby interpreter onto everything. Go feels a lot like a scripting language, but produces binaries.
Re:Go 1.7 is released by cookiecaper on Tuesday August 16, 2016 @02:27AM (#12295872)
This is a hurdle, but IMO it's not too annoying if you already have rights to install packages. Just automate interpreter installation in bash if it's not already there. Way too much time and money is invested in fighting the esoteric crannies of Bourne shell when the logic would be much clearer in Ruby or Python.

Ansible's moment in the sun is fading now that Docker came onto the scene, but that was a glorious moment. It's still very useful for anyone with long-running, non-removable machines. Ansible requires Python and allows a great deal of behavior to be defined in simple YAML instructions.

Re:Go 1.7 is released by vetinari on Tuesday August 16, 2016 @06:31AM (#12296514)
You might have the right to install packages, but that may not solve your problem, that the application may require different version than available in the repo.

The classical case is Ruby + Rails + Passenger + CentOS. While there is SCL with any Ruby and Rails version you might want, that does not mean, that the Passenger package will work with it :(.

Re:Go 1.7 is released by cookiecaper on Tuesday August 16, 2016 @11:20AM (#12298018)
Yeah, if you can install packages, then you can run the RVM installation script and install the right version of Ruby. In fact, you don't even need admin privileges if you use RVM.
Re:Go 1.7 is released by vetinari on Tuesday August 16, 2016 @11:43AM (#12298173)
That will get you off package system for the entire stack and now the maintenance of the whole circus is up to you. Which is exactly what I'm trying to get away from.
Re:Go 1.7 is released by cookiecaper on Tuesday August 16, 2016 @09:18PM (#12301859)
I do dislike individual language package managers and ecosystems for this reason, but I think it's gotta be accepted at this point. Practically every language has their own package repo and versioning apparatus now. Ruby has RVM, Node.js has NVM, Python has PyPi/venv, etc. Most projects expect their users to deploy with these and include things like Gemfiles to define dependencies. That usually means if you insist on using the upstream packages provided by the distribution, you're going to have to install them manually and have a bunch of extra headaches to worry about anyway (to be honest, most custom applications are really difficult to get running using only distro-packaged Ruby or Python libs).
Re:Go 1.7 is released by vetinari on Wednesday August 17, 2016 @11:21AM (#12305350)
The individual language package managers are very nice for development, as you may have any package version you want, and also for non-linux users, where there may be no native package management at all. For operations, however, they suck mightly (that's terminus technicus).

I quite like the SCL [1]. It solves the problem, that you might need different version of node/python/ruby/rails/php/whatever, than is packaged with the OS release of your choice. It has the software nicely packaged and maintained. Now getting third party packages to work with that, that's the problem. Passenger rpm [2] requires system-provided ruby, not just any ruby... I will survive that that App X wants Gem Y installed by rubygem. I won't like it, but it is workable and makes maintenance/updates slightly more difficutlt. But I will not put unpackaged module into Apache config.

[1] https://www.softwarecollections.org/

[2] https://www.phusionpassenger.com/library/install/apache/inst...

Re:Go 1.7 is released by binki89 on Tuesday August 16, 2016 @01:30PM (#12299027)
Maybe try Crystal (https://crystal-lang.org/) then. It has many of the benefits of Go and a Ruby-like syntax. It feels even more like a scripting language than Go because of awesome type inference, uses a similar model as Go for concurrency, and even has proper generics ;-)
Re:Go 1.7 is released by amorphid on Tuesday August 16, 2016 @12:30AM (#12295545)
Agreed. I recently transitioned from Rails development to devops, and there's no Ruby on any system by default. My Bash got better fast!

Fortunately Elixir/Erlang releases include all the executables you'll need. They aren't quite as slick as Go binaries, which all live in one file, but it's still pretty cool.

Re:Go 1.7 is released by Spiritus on Tuesday August 16, 2016 @06:38AM (#12296539)
Then Python is a good alternative, it's basically already installed everywhere.
Re:Go 1.7 is released by Longhanks on Tuesday August 16, 2016 @07:14AM (#12296652)
'Everywhere' being most Linux distributions, an outdated version (2.7) on OS X, no version at all on Windows.
Re:Go 1.7 is released by voidlogic on Tuesday August 16, 2016 @08:33PM (#12301698)
Go and Python are not even close to being in the same league for performance in a majority of cases.

1: https://www.techempower.com/benchmarks/#section=data-r12&hw=...

2: https://benchmarksgame.alioth.debian.org/u64q/compare.php?la...

Re:Go 1.7 is released by hota_mazi on Tuesday August 16, 2016 @12:35AM (#12295564)
> I suggest giving Ruby a try too.

If you like Go, I don't see much reason to try Ruby except intellectual curiosity. Ruby is clearly a language on its way out and it is not just a lot slower than Go, it's also dynamically typed.

Re:Go 1.7 is released by jsmith0295 on Tuesday August 16, 2016 @06:30AM (#12296510)
Why is it 'clearly' on its way out? IMO Rails is still the best web framework around, and the last release has really put it ahead of its closest competition.
Re:Go 1.7 is released by vhost- on Tuesday August 16, 2016 @12:08PM (#12298374)
I can't speak to this. I'm a Go and Python programmer. I learned Go in about ~8 hours and have been very productive with it over the past 2 years.

I've been struggling at work to learn and use Rails for the better part of a year. I constantly have to grab someone and have them help me. Either I'm an idiot, or Rails has a bigger learning curve than people make it out to have because I've never experienced this in all my 10 years of programming professionally.

Re:Go 1.7 is released by artursapek on Tuesday August 16, 2016 @10:07AM (#12297539)
Ruby is too forgiving, has multiple syntaxes for the same thing, and lets people do really obscure shit in a large codebase (monkey patching, hidden imports, etc). In short: it enables developer laziness.

I've found Ruby code the hardest to debug over the years. Also, I think the web development community is waking up to the value of type safety.

I will use Ruby for the occasional script because I like its backtick syntax for invoking other commands, but that's it.

Re:Go 1.7 is released by pjmlp on Tuesday August 16, 2016 @06:57AM (#12296589)
Re:Go 1.7 is released by jsmith0295 on Tuesday August 16, 2016 @09:41AM (#12297406)
I wasn't making a statement about performance. That has very little to do with most web development.
Re:Go 1.7 is released by pjmlp on Tuesday August 16, 2016 @09:43AM (#12297414)
On my little part of the world, performance always plays a role in web development.

It is even described in many of the project contracts.

Re:Go 1.7 is released by nathany on Tuesday August 16, 2016 @03:37PM (#12300012)
Until you have users. :-P

For one example, check this comparison: https://dockyard.com/blog/2016/08/09/phoenix-channels-vs-rai...

Re:Go 1.7 is released by jsmith0295 on Tuesday August 16, 2016 @06:35AM (#12296524)
I'd second this. Rails is still probably the fastest way to get an MVP off the ground, and most of the time it's more than fast enough. You can get UX on par with a well done SPA almost entirely using server code with Turbolinks 5 + Action Cable, too.
Re:Go 1.7 is released by kowdermeister on Tuesday August 16, 2016 @09:19AM (#12297268)
The fastest way to get an MVP off the ground is to use the tools you know best. It doesn't have to be Rails :)
Re:Go 1.7 is released by jsmith0295 on Tuesday August 16, 2016 @11:14AM (#12297981)
Yes, this is also usually true. But if you don't know tools that are particularly well suited for the job, or you just don't like them and are looking for something else to try, I would put Rails at the top of the list for productivity. (For most use cases)
Re:Go 1.7 is released by nathany on Tuesday August 16, 2016 @03:35PM (#12299995)
The only problem is that you need to maintain and enhance that MVP for the next several years -- unless it's just a hackathon.

I've spent way too much of my life trying to optimize Ruby performance and memory usage, switching from one web server to the next, then fixing threading issues in dependencies, and so on. It's not fun. All that upfront productivity is lost in the end.

Quite happy to spend more time upfront investing in a reliable end-product.

Re:Go 1.7 is released by proyb2 on Tuesday August 16, 2016 @06:03AM (#12296434)
Agreed on popularity but Kickstarter is slow and memory is still expensive. Shorter code isn't always a good idea when most Rail and Ruby developers can't tell between APIs.

Swift is by far being the best all-rounder language and between the fastest and slowest.