Live data from Hacker News

Ask HN: Why Did Python Win?

news.ycombinator.com

151–160 of 162 posts

Re: Ask HN: Why Did Python Win?

#151
post #115

Earlier quoted context omitted.

My background is philosophy of language. I studied formal/mathematical logic in grad school. I was always embarrassed that I couldn't code, but the computer sciences classes were teaching languages that were inscrutable for someone even with my background, with syntax heavily focused on jargony math and technical concepts like object orientation (likely java at the time). Around 2010, I was talking about this with fr…

The whitespace thing is actually one of python's major flaws. That feature attaches syntactic meaning to non-printing characters. From a human standpoint, there're many examples of silence having some kind of meaning. From an engineering standpoint, that entire methodology is insane. Communication needs to be positive and deliberate. Remember that Apple SSL bug "goto fail"? That was a whitespace bug, because even if…

>Communication needs to be positive and deliberate.

I don't know what you mean by this.

>The whitespace thing is actually one of python's major flaws. That feature attaches syntactic meaning to non-printing characters. From a human standpoint, there're many examples of silence having some kind of meaning. From an engineering standpoint, that entire methodology is insane.

It's not non-printed characters, it's alignment. The period is a parallel for the semicolon in programming, to signal the end of a unit, but the whitespace in python is a parallel to the bullet point, or poetic stanza. Those both parallel to python in the form of atomic statements.

Most people's concern is the hanging indentation. Here, I would argue that we can effectively prove that hanging indentation is vastly more parallel to natural language than braces. Simply search for "handwritten recipes" and you will see that in a natural language assembly exercises -- effectively a real world parallel to programming -- human beings naturally default to hanging indentation when grouping sub-categories of items together.

https://duckduckgo.com/?q=handwritten+recipes&iar=images

Does this parallel to the jargony math you'll find in math books? No. But it trivially flows from human beings in the real world, and there is nothing formally incorrect in the syntax. Thus, we would likely find that layperson would intuitively understand the hanging indentation, where as braces as syntax is jargony, and must be learned.

Re: Ask HN: Why Did Python Win?

#152

Earlier quoted context omitted.

I can't stop thinking about this. WRT Perl specifically, it’s fascinating how the two competitors adopted Unix shell patterns. Python is handicapped to this day by not automagically snarfing up environment variables, etc. But Perl leaned hard into TECO-style gibberish and the meta-syntax that is regular expressions, confronting beginners with arbitrary complexity. It feels like Wall embraced the system administrator…

Guido van Rossum was not an accomplished mathematician. He has a master's Degree in Mathematics and Computer Science, and got a bronze medal in the International Mathematical Olympiad, but the former is because that's where CS was taught, and the latter because he was a smart high school student. As he described it: "But after that first year [of college], it turned out that the real math I wasn’t particularly good a…

Thank you for the correction. I should have said “trained”.

Re: Ask HN: Why Did Python Win?

#153
post #118

Earlier quoted context omitted.

> [conflicts in virtual environments are] most likely our problems, but we aren't the users that python is made for. We're support for those users. Maybe? I mean, if people aren't noticing these issues and you are, how are they relying on your support? > It's winning because its audience is not code specialists, but other kinds of specialists which sometimes need to use code. Their work often has a sort of immediate…

I mean that several professors have learned that I'm useful for resolving packaging related problems and they contact me for help with them. They expect that if they had a job in industry then there would be somebody who they would file a ticket with and then that person would help sort out the tangle. Also, in a previous job, I was responding to tickets of that kind (e.g. "why does installing this version of foo pre…

That makes some sense, except you're mostly describing a division of labor where the people relying on you to fix their environments probably could do it themselves if you weren't around.

I think we agree these are not typical end users.

> Others provide support in other ways. The guy racking and stacking GPUs at a data center somewhere is doing so, at least partially, in support of some specialist wielding python to move data around.

I mean, the farmers help to feed me, too. Where do you draw the line?

Re: Ask HN: Why Did Python Win?

#154

1. Python was designed by testing syntax with novice users to see what they could adopt easily.[1] > 90% of current Python users weren’t born when it was created. They all had to learn, and Python is the easiest language to learn because Guido and his teammates, unlike $LANGUAGE_DESIGN_GOD, approach the problem as experimental scientists rather than auteurs. 2. Python is conceptually compact, dominated by hash tables…

Can you elaborate on Ruby explicitly ignoring the community centric design process?

Ruby’s syntax is pretty accessible and powerful and Matz was explicit about having developer happiness as a design goal.

Re: Ask HN: Why Did Python Win?

#155
post #140
post #134

Earlier quoted context omitted.

Every programmer worth their salt must learn to use power tools, and also train to work beyond the beginner-intermediate levels, that has now become the permanent situation in our line of work. Nobody should be spending a day writing Python to do work that can be done using a vim macro in like 5 mins. Or spend a year doing in Python what can be done in a week in Perl. >> $\=$/;for(@ARGV){open F,$_;while( ){print if/$…

I have used perl oneliners on and off for 20 years and because I don't need them every day I have to look up stuff every time. Not sure your time-saving thing really works, especially if 99% of problems you have are not solved by a perl oneliner.

>>Not sure your time-saving thing really works, especially if 99% of problems you have are not solved by a perl oneliner.

That's because if you don't have a paradigm of thought, you are not likely to reach for a tool that works there.

Most of the times, I have seen Java programmers watch in total awe that their pet weekly project, that took 40+ hours to accomplish, was basically a vim macro that they could have done in like 3 - 5 mins.

That was my whole point I made, when I said, when a Java dev says they have like 10 years of experience, thats barely a Junior perl dev.

I'm guessing most Python/Java programmers would find it impossible to work in project which doesn't involve a database, XML, or json. Those languages are not designed to work with a data or a compute paradigm outside of these formats.

Re: Ask HN: Why Did Python Win?

#156
post #145
post #134

Earlier quoted context omitted.

Every programmer worth their salt must learn to use power tools, and also train to work beyond the beginner-intermediate levels, that has now become the permanent situation in our line of work. Nobody should be spending a day writing Python to do work that can be done using a vim macro in like 5 mins. Or spend a year doing in Python what can be done in a week in Perl. >> $\=$/;for(@ARGV){open F,$_;while( ){print if/$…

This might be the stupidest comment I've ever read on HN. There's not a single case where using Perl is the right call. As others have joked it's a "write only"language. The garbage you write in Perl is illegible to everyone else and will be illegible to yourself once you move on to the next project and have to come back and debug your old Perl in 18months+. You think you're being clever with your Perl one liners and…

>>As others have joked it's a "write only"language.

The pet project you write to replace that Perl one liner is also write only once project. The only difference is you waste years of your life doing what we do in minutes.

There is nothing to boast about wasting your life doing things that don't even have to be done.

Re: Ask HN: Why Did Python Win?

#157
post #107

Earlier quoted context omitted.

I forgot two, er, three: 9. Python got lucky that its inevitable screwups (Python3) didn’t quite kill it. 10. Swift and Kotlin both define programming as serving the compiler (specifically LLVM) rather than serving the coder’s problem . (I haven’t discussed Rust so far since it isn’t attempting to compete with 98% of Python use cases, but if you squint you can see it as going one step further than Swift and Kotlin an…

Rust isn't so much "competing" as it is "complimentary" to python. This is very much how python was billed originally as a scripting language for "C" in it's early days. The slow parts of your python program can be rewritten in rust or C, your choice. So refreshing.

To me, this was one of the greatest strengths of early Python: humility.

It didn't try to be everything (high performing, compile-time static typing) to everyone (novice, intermediate, expert, academic).

It instead made it easy to solve critical needs (e.g. highest performance hot code) by interoperating with an existing solution that did them well.

Re: Ask HN: Why Did Python Win?

#158
post #115

Earlier quoted context omitted.

My background is philosophy of language. I studied formal/mathematical logic in grad school. I was always embarrassed that I couldn't code, but the computer sciences classes were teaching languages that were inscrutable for someone even with my background, with syntax heavily focused on jargony math and technical concepts like object orientation (likely java at the time). Around 2010, I was talking about this with fr…

The whitespace thing is actually one of python's major flaws. That feature attaches syntactic meaning to non-printing characters. From a human standpoint, there're many examples of silence having some kind of meaning. From an engineering standpoint, that entire methodology is insane. Communication needs to be positive and deliberate. Remember that Apple SSL bug "goto fail"? That was a whitespace bug, because even if…

There's functionally little difference between spaces being non-printable characters, unless there are examples of text editors that do not render offset empty space when they're used.

Spaces vs tabs, sure, that's an argument.

But it doesn't seem reasonable to argue that {something that is visible in a text editor} is different than any other kind of character.

It's not like Python was using the bell ASCII or somesuch.

Re: Ask HN: Why Did Python Win?

#159

Earlier quoted context omitted.

Guido van Rossum was not an accomplished mathematician. He has a master's Degree in Mathematics and Computer Science, and got a bronze medal in the International Mathematical Olympiad, but the former is because that's where CS was taught, and the latter because he was a smart high school student. As he described it: "But after that first year [of college], it turned out that the real math I wasn’t particularly good a…

Thank you for the correction. I should have said “trained”.

I believe that "trained" is also not the correct characterization.

He got his degree in CS at a time when CS at the University of Amsterdam was part of the math department. He also took CS classes at Vrije Universiteit, under an arrangement where students could attend courses at either school.

He didn't study group or graph theory and was not interested in mathematics. Instead, he took computer classes:

> the programming classes I got at University of Amsterdam in the math department, were a pretty haphazard collection of topics that didn’t interest me. I mean, sometimes the topics interested me. I mean I remember one semester we were all learning ALGOL 68. And the teacher was super excited, but other times, it was like numerical programming, calculating what the error is after a certain set of matrix operations. And I was not interested in anything involving floating-point numbers, basically. But Tanenbaum, or his group [at Vrije Universiteit], taught topics like operating systems, databases, networks, and languages, I believe. Yeah, Tanenbaum himself did a class where he taught like seven non-mainstream programming languages. And that was all I just soaked that up.

The math department had to "customize" his degree "a little bit for [his] situation."

There is no indication of being a trained mathematician, neither as someone trained to do mathematical research, nor trained to apply mathematics to other problems.

I have an undergrad degree in math, having taken the course for both pure and applied tracks, and even when I was fresh out of college I wouldn't say I was trained to be a mathematician.

Re: Ask HN: Why Did Python Win?

#160
From the perspective on somebody who lived it:

- the first and MAIN reason is excellent windows support. Nobody wants to say this, but it was the first unix friendly community for a good scriting language to not shit on windows users.

- batteries included is frawn uppon today, but it was a BIG deal back then

- python had the best c integration system after lua and got the Numric lib because if that. It became numpy.

- it was dynamically typed, but strongly typed. No ===.

- optional parenthesis for ruby and symbols from perls were a repellant to many C and java users.

- the error messages were better than the competition.

- lisp shell without lisp

- docstrings and help()

- the packaging ecosystem that everybody craps on today was actually the best at the time. Ruby's was AWFUL at the time.

- one of the first scripting language with good namespace. Ruby could have been that but killef it with monkey patching for years.

- python found ground outside of the web unlike php, js and ruby very early

- python devs were willing to work with os devs to improve integration, and so linux and mac got system tools written in python

- django and twisted were amazing at the time. The dev server without apache was a killer feature

- google advertised they used python for the search engine and youtube. Then HN successes like reddit znd dropbox. It became so famous.

It was not inevitable at all. Just a collection of random stuff.

Post reply on HN