Earlier quoted context omitted.
> Someone else said this on HN: Python is the second best language in almost every field of computing. It isn't. Frankly, it isn't even top 3 in any "field of computing" depending on how you define "field of computing". What python has going for it is the evangelists who do a great job of spreading the word and of course funding - they have lots of money backing the language. Also, being an interpreted language, it h…
"My hope is that python will serve as a "gateway drug" to other languages like ruby, ML, C/C++, SQL" Your inclusion of SQL in that list really shows you have no idea what you're talking about.
Python has brought computer programming to a vast new audience
261–268 of 268 posts
Re: Python has brought computer programming to a vast new audience
#262Earlier quoted context omitted.
Yea, so is HTML, but if someones list of useful programming languages went C#, HTML, ruby, SQL. You would have to admit too that you would consider that person very inexperianced. It’t like listing a blender in a list of your favorite power tools. It’s not that it’s not useful for what it does, it just doesn’t belong in that particular comparison.
SQL stands for standardized query language.
Re: Python has brought computer programming to a vast new audience
#263Earlier quoted context omitted.
If you'd like to go further along that path, and I'd really recommend trying to learn a lisp. How to Design Programs[0] is good gentle introduction if you're new to the ideas of lisp or functional programming, and SICP[1][2] is the old classic. [0] http://www.ccs.neu.edu/home/matthias/HtDP2e/index.html [1] http://web.mit.edu/alexmv/6.037/sicp.pdf [2] https://www.youtube.com/watch?v=2Op3QLzMgSY&list=PLE18841CAB...
Which one though? I have looked at LISPs, but it's difficult to pick one to invest time in. Because I am so restricted on time I have to stick to languages which are used in the industry (so my fun has real-life ROI), which I think boils down to CL which is often touted as old-fashion and its market seems to shrink slowly, and Clojure which means the JVM and mainly Java libraries and high mem requirements. For pure f…
Re: Python has brought computer programming to a vast new audience
#264Earlier quoted context omitted.
Which one though? I have looked at LISPs, but it's difficult to pick one to invest time in. Because I am so restricted on time I have to stick to languages which are used in the industry (so my fun has real-life ROI), which I think boils down to CL which is often touted as old-fashion and its market seems to shrink slowly, and Clojure which means the JVM and mainly Java libraries and high mem requirements. For pure f…
So, I really like How To Design Programs, because the thing it got across for me is how to appropriately think in a functional way. It walks you through building data structures and full programs in a really nice method. I've now been going through SICP, and nothing has seemed out of place as the notation is almost identical, and the few places that it isn't are not hard to translate.
Re: Python has brought computer programming to a vast new audience
#265For me it's somewhat strange that it is universally presented as a beginner's language. Python would be hugely confusing to me if I didn't keep the underlying C model -- dynamically allocated objects with reference counts -- in mind at all time. Together with a lot of protocol that is largely arbitrary.
When teaching Python to beginners, I struggle with the concept of mutability -- e.g. `sorted(mylist) vs mylist.sort()` without being able to refer to the concepts of memory and references. But it's not a terrible obstacle if you drill in extra adherence to logic and testing and jumping into REPL. After enough trial-and-error with `x is y` `x == y` and `id(x)`, the abstract concept comes through without having to ackn…
Re: Python has brought computer programming to a vast new audience
#266Earlier quoted context omitted.
That code is invalid, because you're using "int(x)" as an assignment target. What would you expect it to do?
sorry: sum(int(x) > 3 for x in iterable)
sum([True, False, False, True, True, False])
But if bools didn't implicitly behaves like ints, but could still be converted to ints, you could do this: sum(int(x > 3) for x in iterable)Re: Python has brought computer programming to a vast new audience
#267The thing I love most about the language is its conciseness, on several levels. It's syntactically concise because of its use of whitespace and indentation instead of curly braces. Expressions are often concise because of things like list slicing and list expressions. It can be linguistically concise, because it is so easy to fiddle with the data model of your classes, to customize their behavior at a deeper level. F…
x = 100
y = [x+i for i in range(2)]
In Python 3 I kept seeing NameError: name 'x' is not defined
However, after working around this problem with fixes like this - x = 100
y = (lambda x=x: [x+i for i in range(2)])()
I have just discovered that the different scope treatment was due to a problem with IPython when using it in embed mode, for example by calling it with the following command: $ python -c "import IPython;IPython.embed()"
It goes away when you call ipython directly $ ipython
I mistakenly attributed this problem to Python 3 for years, I guess I introduced the problem because I had a different way of invoking Python 2 and Python 3 - yeesh.Re: Python has brought computer programming to a vast new audience
#268Earlier quoted context omitted.
So, I really like How To Design Programs, because the thing it got across for me is how to appropriately think in a functional way. It walks you through building data structures and full programs in a really nice method. I've now been going through SICP, and nothing has seemed out of place as the notation is almost identical, and the few places that it isn't are not hard to translate.
My question was more about which program language, which Lisp to choose in 2018?