Live data from Hacker News

The Origins of Python

inference-review.com

61–70 of 73 posts

Re: The Origins of Python

#61
post #41
post #40

Earlier quoted context omitted.

I disagree, pick an interpreted language that doesn’t need compilers or other complicated setup. Python, javascript, something where there’s little friction to getting started, and which has a REPL. Pick a language that a friend or colleague can help you with, this is probably an even bigger advantage, if possible.

My first language was C++ (a very C-like flavor of it) and I really appreciated it later on. A compiler isn't complicated setup (in fact in many cases it's easier than managing Python/JS dependencies). I really believe in giving people who are learning more credit that they can actually learn instead of trying to dumb things down for them. And I don't mean that JavaScript or Python are dumbed down, I think they're fi…

Learning is driven by motivation. Motivation is diminished by unnecessary difficulty. Thus, learning via languages that are easier on the uptake will lead to better results.

Memory management and type safety can easily be learned later on... the core essence of programming doesn't involve either of those. It's about defining and composing abstractions, which is language agnostic.

Re: The Origins of Python

#62
post #50

Earlier quoted context omitted.

There was a good ‘Programming Languages’ MOOC on Coursera from University of Washington. It used 3 languages in this order: Standard ML, Racket and Ruby.

Did make a lot of newcomers go insane on the irc channel we used to chat. I think a HtDP based course with a scheme is still the best to learn to "program"

I already have over 4 years of professional software engineering experience (mostly backend web development). Before that I've been coding as a hobby for like 8 years. I'm pretty good with C, python, and PHP, though I'm familiar with plenty of other languages. I also know a little bit of Haskell.

For a person like me, is HTDP worth it? I had started with it previously but I found it a little boring. But I know the book is well regarded so I'm wondering if I should take another shot at it.

Or should I go straight to SICP?

Re: The Origins of Python

#63
> When an object is only partially visible, the human visual system extrapolates from the shape of the visible part to form an expectation of what is occluded.

Yes, for example if I see this:

  blah () {
    whatever
    whatever
I know that it is not complete; something is occluded. At the very least, a closing brace:

  }
Here, I do not know:

  def blah(x):
     foo
     bar
that could easily be the whole thing, or it could be the first three lines of five thousand.

Re: The Origins of Python

#64

I feel Python changes and have changed too much to be a good introduction language anymore. It is not possible for a from zero beginner to read ordinary Python code with decorators, generators or what not and understand it. Way too many concepts. It is being choose by intertia at this point and have been ruined for the original target user by former target users who are now professional programmers using it at work.

> It is not possible for a from zero beginner to read ordinary Python code with decorators, generators or what not and understand it. Having taught beginners both python and other languages, I’d say it’s significantly easier to teach decorators than it is to teach higher order functions normally. Because in python the students have already seen, used and understood what the cache decorator does before we even touch t…

Generators have a few footguns even for seasoned developers, calling len(mygen) or mygen[4] works, but after that it's empty when trying to iterate it. Particularly problematic is when someone adds a log of the generator content, exhausting it before before it is used. All this leads to people shotgunning mygen=list(mygen) on everything, without understanding what really happens.

How one could solve this i don't really know, generators are such useful concept that you can't really remove them either, and you still want them to be compatible everywhere other lists and iterables are. Even with type hints, it's not exactly obvious when you type the code whether a certain variable is a generator or a concrete list, both of them mostly adhere to the same protocol.

Re: The Origins of Python

#65
post #60

Ruby and Go both adopted extensively from Python, but both rejected the process described in OP of designing a language by iterative experimentation to determine how coders would experience design choices. Instead, each relied on the judgment of a handful of experienced insiders. "*I* know which parts of Python are good and which suck; no need to run my ideas by a few dozen coders before committing to them." Perhaps…

A decade or so ago there was an idea that "patterns" (Gang of Four) needed to exist because the underlying language (Java, etc) was limited in it's power or expressiveness. Go is opinionated, and much of that has hurt the language -- with the go loop semantics coming to mind. Instead of realizing their mistake early and fixing it back in 2009ish, they doubled down on it. Here in 2022, they finally opened it back up f…

Gang of Four book predates Java and has zero lines of code about it, since the language did not exist.

All the examples are about Smalltalk and C++.

Re: The Origins of Python

#66
post #62

Earlier quoted context omitted.

Did make a lot of newcomers go insane on the irc channel we used to chat. I think a HtDP based course with a scheme is still the best to learn to "program"

I already have over 4 years of professional software engineering experience (mostly backend web development). Before that I've been coding as a hobby for like 8 years. I'm pretty good with C, python, and PHP, though I'm familiar with plenty of other languages. I also know a little bit of Haskell. For a person like me, is HTDP worth it? I had started with it previously but I found it a little boring. But I know the bo…

Oh no, HtDP is, in a way, for absolute beginners[0]. SICP has way more sophisticated topics, I think you'll learn more with it. One thing though, lots of exercises on real numbers (it was for Electrical Engineers at the time), some like it, some don't.

Or you may try moocs (if they're still available): EPFL functional programming in scala (by M.Odersky) is great. University of Washington Programming Languages (by D. Grossman).

There's also Brown University CS173 (related to Grossman) https://cs.brown.edu/courses/cs173/

Hope you'll find something fun in this

[0] It's value to me is that it doesn't bind to a paradigm, but innocently make people structure data and destructure it logically in a way that leads to obvious functions. It teaches pre-think rather than write-in-$language-then-suffer. Also being based on scheme opens your eyes to a very simple language (closures and lists).

Re: The Origins of Python

#67

> When an object is only partially visible, the human visual system extrapolates from the shape of the visible part to form an expectation of what is occluded. Yes, for example if I see this: blah () { whatever whatever I know that it is not complete; something is occluded. At the very least, a closing brace: } Here, I do not know: def blah(x): foo bar that could easily be the whole thing, or it could be the first th…

Sorry, what's "occluded" in this example?

The } is occluded, so you don't know if it's the whole thing or 3 lines of 5000. Similarly whatever outdented thing comes next is occluded.

Is there a perceivable difference between these?

Re: The Origins of Python

#68
post #31

What are other good options for intro programming languages if not python?

I think the best intro to computers is assembly language. My actual intro was Fortran for a few months, then IBM 1401 assembler for the next 4 years, as the limitations of fortran were obliterated when writing assembler. Assembler gets you to appreciate -- in your 'bones' -- what a computer really is, and how it really works. You can then see how so-called higher-level languages work after understand their foundation…

Remember: downvoting is for showing that the comment is not following HR rules. One doesn't downvote because one disagrees to a well-presented truthful argument.

No, in that case, one replies: and begins a discussion.

As usual, I stand by my comments, as they are my lived life experience. And, I believe they are quite accurate, and otherwise a thoughtful answer to the OPs question.

Nobody asked, for example WHY was I writing assembly language for 4 years; but I'll tell anyway: I wrote a compiler for a Python-like language called "Simpletran". It pre-dates Python by several decades, but many of the original ideas in the early Pythons are there.

Re: The Origins of Python

#70

> When an object is only partially visible, the human visual system extrapolates from the shape of the visible part to form an expectation of what is occluded. Yes, for example if I see this: blah () { whatever whatever I know that it is not complete; something is occluded. At the very least, a closing brace: } Here, I do not know: def blah(x): foo bar that could easily be the whole thing, or it could be the first th…

Sorry, what's "occluded" in this example? The } is occluded, so you don't know if it's the whole thing or 3 lines of 5000. Similarly whatever outdented thing comes next is occluded. Is there a perceivable difference between these?

We know it's not the whole thing because the closing } is missing.
Post reply on HN