I use python on daily basis for 5 years now. It's a really cool language, but: * Packaging is horrible * Releasing python code is a non-standarised nightmare. Every solution has it's own flaws * Big and complex projects in python are really hard to reason about * Poor support for concurrency (fixed in py3) Don't get me wrong, python is really cool as a proof-of-concept scripting language. But for mature and complex s…
I've been really happy using Pex[1] for releases, but it's not 100% perfect. It definitely feels less painful than other ways of doing things. At one point I used bdist_rpm for all of my projects, and then made sure I had all the dependencies installed (also through RPM, using FPM to create an RPM if it didn't exist). It was a nightmare. 1: https://github.com/pantsbuild/pex
Why People Should Learn Python
181–190 of 329 posts
Re: Why People Should Learn Python
#182Earlier quoted context omitted.
I find chained enumerator / block style code much easier to write and understand than list / dict comprehensions too. It's probably the single biggest thing that I don't like about Python; lambdas are simply too awkward, but lambdas + monadic transformations are probably my primary mental abstractions for writing software these days.
With itertools and functools you should be able to program in that style just fine. You'll likely want to give your lambdas names with a "def", but you should be doing that anyway.
The way my brain works (at this point in my career, 25 years of programming) is just against the Python grain. I think in terms of data flow graphs. Python wants me to think in terms of procedures and loops.
Re: Why People Should Learn Python
#183Earlier quoted context omitted.
The problem with that is that you no longer have reproducible builds. If you checkout a year old commit and built deployment artifacts with it you want the resulting artifact the be the same as when it was created. This is what you get with Bundler and the Gemfile/Gemfile.lock split You put gem 'rails', '~> 4.2.7' in your Gemfile and when you run `bundler install` the exact version of rails you ended up resolving wit…
I version my docker images. Inside the Dockerfile I usually install the latest version (i.e. pip install without specifying version). By single version bump of my image version I can trigger update of everything. If I check out an old commit I can look up docker image version in the source control, download exactly the docker image that was running at that time and start shell in this image. Inside the image I can ru…
Re: Why People Should Learn Python
#184Is it just my feeling or are there languages which are preferred on HN? Indicators for languages which are liked by the HN community: - Positive stories get many upvotes and are instantly at the top of HN - Most comments are positive - Frequent coverage on HN about the language Indicators for languages which are not liked by the HN community: - Rants get many upvotes and are instantly at the top of HN - Most comments…
Lisp *****Re: Why People Should Learn Python
#185Why you shouldn't learn Python: 1. In-consistant syntax. 2. The language uses exceptions to control flow of logic. 3. Divided community, since Python 3+ included breaking changes to the standard. 4. Un-discoverable APIs. You better hope the documentation is bulletproof else the API could change in any which way during runtime. 5. Poor error messages. If an import goes wrong you are not told why, and so on. 6. Ultimat…
Reasons to learn Python: Sklearn, tensorflow, pandas, Sqlalchemy, requests, Beautifulsoup, numpy, scipy, pulp. If you have a language that had equivalent libraries that cover all these domains I'd love to hear it. Until then I can build really cool stuff in Python very easily thanks to the amazing hardwork and generosity of these library creators.
Re: Why People Should Learn Python
#186I use python on daily basis for 5 years now. It's a really cool language, but: * Packaging is horrible * Releasing python code is a non-standarised nightmare. Every solution has it's own flaws * Big and complex projects in python are really hard to reason about * Poor support for concurrency (fixed in py3) Don't get me wrong, python is really cool as a proof-of-concept scripting language. But for mature and complex s…
I've programmed in a few other languages than Python. I'm curious to know which languages you think have an easier time managing mature and complex stuff?
* type annotation + awesome tool for analysing code (dialyzer)
* immutability, list cannot become a dict out of nowhere
* great support for concurrency
* concept of application (OTP) gives out ability to run many loosely coupled apps on one VM. I believe "microservices" is the buzzword that matches the concept.
* distribution by design.
* great monitoring tools
* I could go on... really.
Re: Why People Should Learn Python
#187As the author mentioned Python is good for small stuff. If you are building a huge system where the jobs are spread between a dozen of people things could easily get out of control and you could end up in the dirt.
Do you feel this way due to the dynamically typed nature of the language (and the possibility of having ambiguous interfaces)? I've had pretty good luck with rather large scale python projects, though we've been pretty strict about working within a framework.
Re: Why People Should Learn Python
#188Earlier quoted context omitted.
I find chained enumerator / block style code much easier to write and understand than list / dict comprehensions too. It's probably the single biggest thing that I don't like about Python; lambdas are simply too awkward, but lambdas + monadic transformations are probably my primary mental abstractions for writing software these days.
Could you give an example of that?
products.select { |product| product.type == 'x' }.map(&:price).reduce(:+)
Re: Why People Should Learn Python
#189Earlier quoted context omitted.
At a glance, it looks like all languages are reasonably well loved except PHP and Node.js (shouldn't this just be Javascript? Does having a different standard lib make it a different language?) I think that's due to people having flash backs to terribly written code in both languages. For example, PHP apps pre-2005 rarely if ever used frontend controllers, preferring instead to twine in configuration and helper funct…
With PHP, I'll agree, though with JS I think it's the reverse. At least my personal dislike for the language and the ecosystem grows with every new hot framework, build system, or other weird "must-have" link for the toolchain that Node people seem to create almost daily.
As a hobbyist Node developer (day job is not in Node), I find it hard to talk with other Node developers as there is some build-tool or even full framework that sits on top of Express that I "should" be using but I'm not. But maybe it's just me.
Re: Why People Should Learn Python
#190Earlier quoted context omitted.
Rust should then get 6 stars judging from unparalleled excitement every news about it brings here. Rightfully so in my opinion. By the way, it's "Clojure", not "Closure" and what happened to Scala?
I have actually wondered that myself (Scala). I was so excited about Scala years ago (2006). One of my TAs from college was working on the language as well. It finally looked like an OCaml for the masses. Over time my excitement changed. I assume others may share my thoughts hence the less excitement: * It is on the JVM and there are lots of languages on the JVM competing with Java. * While the fusion OOP + FP fusion…
* It also compiles to Scala.js (it's actually the independent best compile-to-JS language out there in terms of libraries, tooling and IDE support). Support for compiling directly to native is coming around nicely.
* Scala is quite far away from the kitchen sink, and many of the questionable parts have been deprecated and/or removed.
* I have never seen much DSLs while writing Scala. Sure, it's probably quite nice, but I have rarely seen endless DSLs in practice.
* The jar is around 4MB (2.12) and when writing idiomatic Scala (~ not Spring/Servlet) there shouldn't be any kind of reflection or classpath scanning happening.