Live data from Hacker News

Ask HN: Ruby or Python for 2018?

news.ycombinator.com

11–20 of 39 posts

Re: Ask HN: Ruby or Python for 2018?

#12

Have you looked at Elixir / Phoenix? http://phoenixframework.org/ It has some Rails roots, so you might like it.

Elixir and Phoenix are amazing. I use them any chance I get. The problem now is that the ecosystem is still in early stages. You're gonna end up writing some more libraries whereas in an ecosystem like Ruby there are gonna be plenty of gems handling the typical things like Api wrappers.

Re: Ask HN: Ruby or Python for 2018?

#14
i have a simple suggestion, you should learn both, we live in a polyglot world now, you need to be able to learn multiple languages and to do so quickly. i started with php then moved to python/tornado/sqlalchemy, ror, ruby/sinatra/activerecord, nodejs/expressjs, and lately golang/gorilla mux/database/sql. just start with one, suggest ror, i’m sure you’ll have multiple projects in the future. ruby was built for web app development, django’s a bolt on for python that then added web functionality. dont worry about the community issues, ror has enough great libraries out there that you could put together a pretty slick website quickly. a side note, if you need to use some scientific packages, python might be better supported like numpy etc. fyi ruby language is much nicer than python imho (insert flame war). dont dwell on this decision too long, either should be able to get you what you want which is a slick website, get a move on it

Re: Ask HN: Ruby or Python for 2018?

#15
> Rails is awesome but people hate Ruby

Is this sentiment common? It might be just my personal echo chamber but I've often heard the opposite stance, i.e. people saying they hate Rails because of all the "magic" but at the same time they like Ruby as a language because of its flexibility.

Re: Ask HN: Ruby or Python for 2018?

#16
post #15

> Rails is awesome but people hate Ruby Is this sentiment common? It might be just my personal echo chamber but I've often heard the opposite stance, i.e. people saying they hate Rails because of all the "magic" but at the same time they like Ruby as a language because of its flexibility.

The Ruby job market outside of Rails is tiny, unfortunately. Most folks never bothered to look. DevOps and InfoSec folks tend to know better -- Chef, Puppet, Capistrano, Vagrant, Logstash, Metasploit, Homebrew, Sass... all written in Ruby)

All of my ETL pipelines are built in Ruby and I wouldn't have it another way. From a development, support and deployment persective, Jekyll is hands-down the best "web framework" I've ever worked with. If you need to build websites that don't need sessions/accounts, there isn't a better tool. NGINX's SSI module fills in some (tiny) gaps.

Ruby's a great language with a healthy set of tools. It's just not popular among people making CRUD apps right now.

To most folks though, unless they're already Ruby developers (AND not a Rails shop), Ruby and Rails might as well be the same thing.

Re: Ask HN: Ruby or Python for 2018?

#17
I love Ruby, but Python is super simple to learn. I haven't spent enough time with Python to do anything super cool with it, but it does seem to be more consistent in terms of the code you will read.

I also think that once you learn Python, a lot of other languages' syntax (such as Go and C# for me) becomes more approachable.

Re: Ask HN: Ruby or Python for 2018?

#18
Python

Django, a highly competitive web framework. With great extensions like Django REST Framework. Assets with django-webpack-loader. So on. It may not be as good as Laravel or Rails, but they're all really active.

But the thing that makes Python best is the web framework is where it begins, not where it ends:

Want text analysis? NLTK or spaCy

Data? Pandas, numpy, pytables

Want more analysis? scikit-learn, tensorflow, theano.

Solid language standards? PEP8 and PEP257 makes most python code you see in open source very conformant

Test framework? pytest. And its plugins. tox for testing against a matrix of python versions/settings (kinda like Travis).

Handling environments + packages easily? pipenv

Multiple python versions? pyenv

Editor integration? Jedi + python-mode for VIM, VSCode, Atom, Python

Images / Graphics? pillow

Super-powered REPL? ptpython

Deployment? Fabric, Ansible, Saltstack

Documentation? Sphinx, Docutils

Want C/C++ integration/performance? pybind11, cython, CFFI, swig

Mobile dev? kivy (though I wouldn't say it's the best yet, when I tried it, setup was easier than react-native)

And that's just scratching the surface. Python has high quality, permissively-licensed libraries, with solid documentation. A lot of the plugins I mentioned above for handling data use C-level speedups. Of these, tensorflow, and Theano can use GPU speedups.

Rails is fantastic. I like guard and the asset pipeline. But I just learned to use GNU Make's "$ make -j task1 task2" and django-webpack-loader. I also hear good things about Laravel in PHP.

Re: Ask HN: Ruby or Python for 2018?

#19
post #15

> Rails is awesome but people hate Ruby Is this sentiment common? It might be just my personal echo chamber but I've often heard the opposite stance, i.e. people saying they hate Rails because of all the "magic" but at the same time they like Ruby as a language because of its flexibility.

The Ruby job market outside of Rails is tiny, unfortunately. Most folks never bothered to look. DevOps and InfoSec folks tend to know better -- Chef, Puppet, Capistrano, Vagrant, Logstash, Metasploit, Homebrew, Sass... all written in Ruby) All of my ETL pipelines are built in Ruby and I wouldn't have it another way. From a development, support and deployment persective, Jekyll is hands-down the best "web framework" I…

we use Sinatra and sequel for a few apps and it's great (and puma to run it all)

we have switched to python for our FaaS but only because of lack of Ruby support from AWS lambda.

Post reply on HN