Live data from Hacker News

Python Is Eating the World

zdnet.com

351–360 of 993 posts

Re: Python Is Eating the World

#351

Earlier quoted context omitted.

That doesn’t even work in all situations. What if the system requires development packages? What if it’s a different OS or architecture? Packaging is a nightmare.

What if you are on Linux and your binary requires a slightly newer version of glibc for some reason etc. Static, portable binaries on Linux are hard.

They aren't too bad IMO. However, you need to set up a build environment/VM with your choice of your earliest-supported Linux+glibc. Build on old, run on new works well.

Linux backwards-compatibility is pretty good, in that a static binary should run just fine on newer systems. I've had far worse experiences with OpenBSD, where a build on an older version of the OS would never seem to run on a newer system.

Re: Python Is Eating the World

#352
post #290

Earlier quoted context omitted.

If you put in as much time as you have learning Python, then the answer is probably yes.

Probably yes What does it mean? Have you done it in any of those language? Have you seen it done in any of those languages?

> What does it mean? Have you done it in any of those language?

I did. I'm doing a image processing recently and use OCaml for prototyping. I've tried python (I've used it a lot for that long time ago), I've failed, it felt to awkward. I've described my experience here [1]

If you have no experience whatsoever with ML family [2], and doing all the stuff in python, you'll most likely be much more productive with python of course.

But I find ML-like languages way more pleasant, and I'm far more productive with libraries like owl [3], which are more fundamental and don't have fancy stuff, and ML, rather than with python and fancy lib like numpy/scipy.

Also Julia could be a good choice hitting a sweet spot between fancy libraries and fancy language.

[1] https://news.ycombinator.com/item?id=20457505

[2] https://en.wikipedia.org/wiki/ML_(programming_language)

[3] https://ocaml.xyz/

Re: Python Is Eating the World

#353

Earlier quoted context omitted.

> honestly I think "don't use exceptions for control flow" is more of a convention that a "truth" In absolute terms or when coding on paper, perhaps. But in the real world and if performance even remotely matters, it’s as close to a universal rule all languages end up embracing or turning into creaking hulks of slow code given how exceptions work in practice at the level of cpu execution units. C#/IL/.NET embraced ex…

The Ocaml exception implementation is comparatively very performant, and so its exceptions are routinely used for control flow.

Interestingly .Net has very performant exception handling as well. Not sure if something changed internally with Core, but using exceptions in place of return error codes was incredibly common within the .Net ecosystem.

Re: Python Is Eating the World

#354
post #294

Earlier quoted context omitted.

Over-sensitive individuals are hard to please and often unhappy. That's more of a personality flaw than a flaw with the current state of software engineering. If there's one thing wrong with our profession is a lack of ethics and accreditation - we're essentially letting random people build critical infrastructure and utilities. We don't have a tooling problem, in fact we have too many tools. I see so many people (es…

Oversensitive? Is the contractor who chooses a Dewalt or Ridgid over a Ryobi for daily work "caring about irrelevant stuff"? A drill is a drill right? Why is it different for us in software?

Maybe. (and I thought festool was the new hotness? I thought that at least rigid and ryobi had been devaluing their brand by selling cheap junk under their brand? But I'm solidly in the 'prosumer' and not 'real contractor' end of the market, so not an expert or even close observer, really.)

But I think the point OP was making is that contractors have a licensing and training program, and if you hire someone to put a roof on your house, they either have to go through that process or work under someone who went through that process. I mean, choosing the right tool is a small part of that, but someone in the chain of command is gonna have words with you if you bring your Xcelite screwdriver and try to use it on the roofing job.

That's not true almost anywhere in software, and that probably makes a big difference.

(I mean, not being educated myself, i personally have mixed feelings about licensure. But it's a good discussion to have, and I think that there should be something like the PE for software engineers (and there was, in texas, but it will be discontinued this year. )

Re: Python Is Eating the World

#355
post #219

Earlier quoted context omitted.

Probably a kind of premature optimization on my part, but this is why I chose Golang over Python as my primary language. Maybe one day Python will have its own compiler without having to drop into writing C, who knows? For know I think the features of Go are just more attractive than those of Python.

Python has a compiler without dropping into C (cython).. but it's mostly used these days for glue code between c and Python, or for small bits of code that need extra optimization. There is also Rpython and pypy

I do most of my programming in Cython these days, mainly maths/graphics-related, but all kinds of stuff. It's great for that! I do the intensive calculation parts with typed C variables, structs, arrays, at C speeds, while doing the once-only stuff like loading and saving images in pure Python. I guess it's weird floating between C and Python from line to line in a program, but I like it a lot. (Not having to type semicolons and curly braces anywhere is no small benefit also.)

Re: Python Is Eating the World

#356
post #294

Reading this got me thinking and I wonder if other people feel like me about this, so I'm going to share it. This is not serious, but not entirely unserious... I try to be a good sport about it, but every time I write python I want to quit software engineering. It makes me angry how little it values my time. It does little for my soured disposition that folks then vehemently lecture me about the hours saved by future…

Over-sensitive individuals are hard to please and often unhappy. That's more of a personality flaw than a flaw with the current state of software engineering. If there's one thing wrong with our profession is a lack of ethics and accreditation - we're essentially letting random people build critical infrastructure and utilities. We don't have a tooling problem, in fact we have too many tools. I see so many people (es…

>If there's one thing wrong with our profession is a lack of ethics and accreditation - we're essentially letting random people build critical infrastructure and utilities.

https://ncees.org/ncees-discontinuing-pe-software-engineerin...

There was a license for a professional software engineer; they're discontinuing it, apparently due to lack of demand.

If folks wanted to get a "software people taking the FE" study group together, I'd join up.

Re: Python Is Eating the World

#357
post #329

Earlier quoted context omitted.

It's unclear to me how a person can be productive if the language doesn't value correctness.

There are plenty of real world situations where neither the requirements nor the prerequisites value correctness, but getting an 80% or even 99% correct set of results while flagging the unhandled cases is very valuable. Python as a structured upgrade to Excel.

I'd say the most immediate value/payoff of correctness is ensuring your own code is consistent with what you think it does rather than correct wrt to some sort of external specification.

Re: Python Is Eating the World

#358

Earlier quoted context omitted.

I'd also add that while perhaps a bit on the pessimistic side, I tend to view the 80 char rule / limit not as an ancient hardware limitation of monitors, but as a limitation of our eyes and visual processing circuitry. There is a reason why newspapers and well laid-out websites don't have 300 char width lines. Those are physically harder to read, whether we want to admit it or not, as our eyes lose track of the flow…

Why not take this reasoning one step further and have Hacker news impose an 80 character line wrap limit? If you've ever had to deal with this in an email client, you can quickly see that 80 is undershooting it in the modern era.

Funny. I preferentially read HN on my phone which has probably what looks like around a 80 char limit. It makes it really comfortable to read.

Re: Python Is Eating the World

#359

Reading this got me thinking and I wonder if other people feel like me about this, so I'm going to share it. This is not serious, but not entirely unserious... I try to be a good sport about it, but every time I write python I want to quit software engineering. It makes me angry how little it values my time. It does little for my soured disposition that folks then vehemently lecture me about the hours saved by future…

> and that infernal pep-8 linter insisting 80 characters is a sensible standard in 2019 I don't know why 80 characters is a problem. I don't use the linter but I enforce this rule religiously with a couple of exceptions (long strings comes to mind). It forces me to think heavily about the structure of the code I'm writing. If I'm nesting so deeply, something has gone wrong. If I've got a ton of chained methods or rea…

It's also awesome if you have to do code reviews on a laptop or don't have a massive screen available.

That said, we usually just go with autoformatting via black, which is 120 by default. No more hassle manually formatting code to be pep8-compliant. Just have black run as a commit hook, which is super easy via pre-commit [0]. And you can run the pre-commit checks during CI to catch situations where somebody forgot to install the hooks or discovered `--no-verify`.

Can't really imagine developing Python without Black any more.

[0] https://pre-commit.com/

Re: Python Is Eating the World

#360
post #227

Two things I don't like about Python: 1: No seperator sign like ";", so you cannot express everything you want in one line. Oneliners are often so useful that I don't want to live without them. 2: By default, it caches the bytecode on disk. This is slow and spills those files into the filesystem. I prefer PHP in this regard, which caches the bytecode in memory.

Python has semicolons.

But they do work the same as a newline. So you cannot do everything you want in one line.
Post reply on HN