Live data from Hacker News

Python Is Eating the World

zdnet.com

661–670 of 993 posts

Re: Python Is Eating the World

#661

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

"It is a poor workman who blames his tools — the good man gets on with the job, given what he's got, and gets the best answer he can." —Richard W. Hamming[0] I have rarely "chosen" to use Python at work, but it has never failed to get the job done. [0] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2041981/

a programming language designer should be responsible for the mistakes that are made by the programmers using the language. [...]

It's very easy to persuade the customers of your language that everything that goes wrong is their fault and not yours.

- Tony Hoare

Re: Python Is Eating the World

#662

Earlier quoted context omitted.

No, not at all, I'm saying if you had been a C programmer in the 90's you would have some perspective on some of the complaints and comments about python in 2019.

Why are you complaining about C in the 90s? If you'd been using punchcards in the 50s you'd have some perspective on some of the complaints and comments about C in 1990.

Abacus in the 0000's...

Re: Python Is Eating the World

#663
post #546

Earlier quoted context omitted.

> I honestly wouldn't want to have to write this stuff in Python for a simple reason: I don't think I could live without static typing, which is a fantastic tool when you need to manage a large code base written by multiple people over multiple years. I can make a change in some package, do a dry-run compile of every system that uses it, and then see what needs updating. It gives me certain guarantees about data inte…

> Programming in the large without type safety is a fool’s errand. Lol. Right. No big system has ever been built in an untyped or weakly typed language. Well, except just about every bit of software we all use everyday. But it does seem like some small startups can't get by without it.

>No big system has ever been built in an untyped or weakly typed language. Well, except just about every bit of software we all use everyday. But it does seem like some small startups can't get by without it.

Many have built models of the Eiffel tower with toothpicks too, so?

You can still built things with inadequate tools: inadequate != prohibitive. You just have more problems going forward.

Which is exactly the lesson people who write large scale software have found.

What is this "just about every bit of software we all use everyday" that you wrote about as been written in weak types?

Most major software is still written in C/C++ (anything from operating systems, Photoshop, DAWs, NLEs, UNIX userland, MS and Open Office, databases, webservers, AAA games, what have you). One could use just that C/C++ software, and they'd have almost all bases covered.

The rest is e.g. Electron based software and online services. For the latter, most of the major ones (e.g. Gmail, Apple's iCloud services, Microsofts, online banks, online reservations, etc, etc) are not written in "weakly typed languages", only the client is.

And those that were initially written in a weakly typed language, e.g. Twitter with Ruby on Rails, others with Python, etc, have rewritten critical services (or entirely) to statically typed languages (e.g. Twitter went for Java/Scale, others for Go, etc).

And even for the client, most shops are now turning to Typescript (and FB to Flow) because they've found weakly typing is not good enough for large scale. So?

Re: Python Is Eating the World

#664
post #580
post #546

Earlier quoted context omitted.

> I honestly wouldn't want to have to write this stuff in Python for a simple reason: I don't think I could live without static typing, which is a fantastic tool when you need to manage a large code base written by multiple people over multiple years. I can make a change in some package, do a dry-run compile of every system that uses it, and then see what needs updating. It gives me certain guarantees about data inte…

> Programming in the large without type safety is a fool’s errand. Programming in the large without tests is a fool's errand. Type systems don't guarantee correctness.

You've got it backwards.

(Sound) Type systems guarantee correctness for the invariants encoded as types. If it compiles, you know it doesn't have any type related errors at all. With more evolved type systems even your program's logic (or large parts of it) is guaranteed.

Tests just allow you to test random invariants about your program. If it compiles and your add() method works when passed 2, 2 and gives 4, it still might not work for 5, 5... (contrived example: imagine it with much more complex functions, though even a simple e.g. "one line" time conversion can have similar issues).

Re: Python Is Eating the World

#665
post #642
post #587

Earlier quoted context omitted.

What does all this have to do with Fortran, terminals, or weaving your own core memory? Python's competitors are Lisp, OCaml, Swift, C# etc. I prefer at least Lisp and OCaml.

Python's actual competitors are Ruby, Perl, R, Shell, Visual Basic, Javascript, PHP, and Matlab. Nobody's going to bother out OCaml or Lisp for web development, data science, or OS scripting where Python is most often used.

Well, Facebook is trying to make OCaml happen for web development (ReasonML). Not sure if they're succeeding, though.

Re: Python Is Eating the World

#666
post #659

Earlier quoted context omitted.

Somewhere, I can hear John Siracusa saying, 'curl piped into a shell? No thanks.'

Yes, funny, but seriously, where's the threat model where you've analyzed the risks of installing code from GitHub over HTTPS and found it to be less secure?

To be clear, either of these methods can have problems, it's not unique to curl and your shell of choice. Some of the better open source projects will say up front that if you are concerned about this kind of thing, feel free to read the installer script and decide for yourself if everything's kosher.

Re: Python Is Eating the World

#667

Earlier quoted context omitted.

I'm thinking of generic in the sense of monadcomprehensions, sorry. > That's an implementation detail of CPython. I don't see how it's important for a language user either. Jython uses Java objects. PyPy uses RPython. This strengthens my point though? > Please don't spread FUD. This is that culture thing I'm talking about.

I'm not really sure what your point is in criticizing "farming" to C. > This is that culture thing I'm talking about. You made a false claim. You referred to Python iteration as not generic, when what you really meant is that Python lacks first class monad support. If you want a monadic programming model, you're not going to be a happy camper in the Python world. But I doubt that comes as a surprise.

> You made a false claim. You referred to Python iteration as not generic, when what you really meant is that Python lacks first class monad support.

Are you really that lacking in self-awareness that you responded to someone annoyed about programming culture by going full "debate with logic, facts and reason" mode?

Re: Python Is Eating the World

#668

Earlier quoted context omitted.

Not trying to defend Python, but it's not hard to make it work like JS without virtualenv: pip install -r requirements.txt --target=python_modules Then to run: PYTHONPATH=python_modules python myscript.py This will keep all the dependencies in the local "python_modules" directory. I've used this on a custom SaaS platform, and it worked quite well.

Thanks for that! I am tired of messing with conda, virtualenv, etc. and since I use simple Makefiles to build and run most of my code, I can easily stick with the standard latest stable version Python installation when using your trick. EDIT: a question: when I have to use Python, I like to break up my code into small libraries and make wheel files for my own use. How do you handle your own libraries? Do you have one…

> How do you handle your own libraries? Do you have one special local directory that you build wheel files to and then reference that library in your requirements.txt files?

We didn't build wheels. We had a centralized git host (Gitlab, but any of them works) with all our libraries, and just added the git url (git+https://...) to the requirements.txt

Re: Python Is Eating the World

#669

Earlier quoted context omitted.

Don't forget COBOL

A hundred thousand years from now, when the Terran Empire's Dyson Swarms are ubiquitous throughout the Orion Arm, the relativistic generation-ships of the Andromeda Colonization Fleet have set out on their multi-million-year journey across the intergalactic deeps, and the World Computers housing the Great Intelligences serve the daily needs of quadrillions of citizens, there will still be job ads for COBOL programmer…

And they'd still bitch about how everything else still runs on Javascript.

Re: Python Is Eating the World

#670

According to people who work with a lot of programmes teaching coding, the reason python is so appealing to new coders is the syntax. Particularly the lack of braces, the indents, the nice keywords, that make reading code much easier to a newcomer. Having taught both python and JavaScript, I can tell you that the former is far far less confusing to newcomers than the latter. Imagine explaining the problem with equali…

> Particularly the lack of braces Since most of my professional experience is with C like syntax languages, I don't get how the lack of braces is an advantages, quite the opposite in my limited experience with Python. Braces define scope unequivocally, they are easy to visually parse and don't care whether you are using tabs or spaces or even if you, loud gasp, mix them. Furthermore, you can copy and paste, say for l…

> Braces define scope unequivocally

So does whitespace, otherwise Python wouldn’t work as a programming language

> they are easy to visually parse

only if you indent properly

> Furthermore, you can copy and paste, say for loop from a method to another method and it will work. In Python you might have to faff about with spaces (I'm sure there must be IDEs that solve this problem but it was no fun on vim or even notepad++)

Shift+V

}

Hit . as often as needed

Too difficult?

Not to mention you will run into exactly the same problem when copy pasting C unless you like randomly indented code

Post reply on HN