News for hackers. Stuff that matters.
Re:Bruce Eckel announces he's going to write Atomic Python by fineline on Thursday September 03, 2015 @12:47AM (#10163393)
I've admired Bruce's work since Thinking in Java. I've also enjoyed a merry-go-round of languages in my own career. I too was interested in Scala and read Odersky's book - and improved a lot as a programmer because of it, despite not using Scala for any "real" project. I can't say I've ever found Python that compelling. Rust and Go don't do much for me. The 2 languages I'm excited about right now are Elm and Nim.

Nim empowers the programmer to do just about anything, use GC or switch to manual MM, target any computing platform that supports C (i.e. everything), reinvent the language with macros, while packaging it up very elegantly indeed.

Elm promises almost the exact opposite. I mean it's elegant, but it's also limited - purely functional, immutable, no nulls, no unchecked list access. And that's the kind of limitation that addresses the problem that Bruce has with other languages - dealing with all the complexity of how something's working. The promise of Elm is that if your code compiles, it works, leaving you to focus on getting the important stuff right - information flow and business logic - instead of tracking down another silly invalidity that never should have made it to runtime.

They're both young, but I wish Andreas Rumpf (Nim) and Evan Czaplicki (Elm) and their teams all the best in taking on the "big boys" with these plucky languages, and would encourage Bruce Eckel to consider skipping ahead of the curve and writing for these alternatives.

Re:Bruce Eckel announces he's going to write Atomic Python by dom96 on Thursday September 03, 2015 @05:26AM (#10163975)
> Nim empowers the programmer to do just about anything, use GC or switch to manual MM, target any computing platform that supports C (i.e. everything), reinvent the language with macros, while packaging it up very elegantly indeed.

This is a very brilliant way to describe exactly what makes Nim excellent. I hope you don't mind if I quote you on this :)

Re:Bruce Eckel announces he's going to write Atomic Python by fineline on Thursday September 03, 2015 @07:27AM (#10164319)
You're very welcome.
Re:Bruce Eckel announces he's going to write Atomic Python by _pmf_ on Thursday September 03, 2015 @03:54AM (#10163772)
> Rust and Go don't do much for me

Go is useless, but Rust and Nim have much in common (easy integration with native toolchains, stdlib-less bare-bones development for embedded systems); why did you decide that Rust is not for you?

Re:Bruce Eckel announces he's going to write Atomic Python by fineline on Thursday September 03, 2015 @07:25AM (#10164307)
I guess the profusion of pointer types was one thing, and the syntax, while not a showstopper, didn't really "speak" to me the way Nim did. But I cut my teeth on UCSD Pascal (after Apple BASIC), that might have something to do with it...
Re:Bruce Eckel announces he's going to write Atomic Python by kibwen on Thursday September 03, 2015 @12:56PM (#10166030)
I'm curious when you last looked at Rust, because in the past year the built-in ~T and @T pointers were all removed. Nowadays there are just references and raw pointers (and the latter are primarily just for FFI).
Re:Bruce Eckel announces he's going to write Atomic Python by fineline on Thursday September 03, 2015 @07:01PM (#10168000)
It was probably about a year ago. Glad to hear they've simplified the story, I'll take another look.
Re:Bruce Eckel announces he's going to write Atomic Python by robmccoll on Wednesday September 02, 2015 @10:15PM (#10163054)
What is simple and clear about Python? Overloading, decorators, coroutines, dynamic typing, strong reliance on exception handling for control flow, a boatload of basic types, deep class hierarchies, eval, massive standard library, schism between 2 and 3, eggs vs wheels, pip vs setup vs easy install... it's really a pretty complex language with a deep ecosystem.
Re:Bruce Eckel announces he's going to write Atomic Python by jMyles on Wednesday September 02, 2015 @11:22PM (#10163203)
* Overloading: Is this a reference to default values for arguments? Or PEP 3124? If the former, then I think that this is itself a great example of simplicity and clarity in python.

* Decorators: I grant that they're hard on a debugger; I wish that there were a slightly more sane way for the control flow to play out. However, syntactically they're super clear.

* Coroutines: What's the problem here? I prefer Twisted's deferred model, but I have no problem with coroutines.

* Dynamic typing: I mean, if this is a religious issue, then I don't want to offend, but seriously: especially for newcomers, the type system in Python is simple. And clear.

* Exceptions as part of control flow: And why not? Exceptions are a part of ordinary human logic. Why do you regard them as unclear or complex?

* Boatload of basic types: I can do with a few fewer exposures of "low level concepts" in types (ie, int, float, double, decimal), but it's not that bad.

* Deep class hierarchies: I'm not even sure what to say to this. It seems like an objection to OOP generally.

* eval: I think we all agree that eval introduces opacity and complexity, but do you prefer it be removed?

* Massive standard library: Compared to other languages of a similar age, Python does an awfully good job at providing One Obvious Way to use the standard library to do what (and only what) you want.

* schism between 2 and 3: Hear hear.

* Eggs vs wheels: Yeah. Fuck.

* pip vs setup vs easy_install: Yeah we get it. Packaging is a problem.

Overall, I think Python is simple and clear. If I had to pick an objection, none of the ones you raised makes my list. I'll probably go with the syntax for the "type hints" system. And the GIL. And the varying definitions of "is" across implementations.

But all in all, it's pretty darn simple and clear.

Re:Bruce Eckel announces he's going to write Atomic Python by stereosteve on Thursday September 03, 2015 @02:14AM (#10163560)
> * Exceptions as part of control flow: And why not? Exceptions are a part of ordinary human logic. Why do you regard them as unclear or complex?

For any given line it's hard to know if it will raise and if so what type of exceptions.

I do like in Go that if an error can occur there will be a return value for it. Makes you much more aware of when things might go wrong.

With python it seems to be more like "find out at runtime" our "read the docs and source for every function you call"

Re:Bruce Eckel announces he's going to write Atomic Python by oburb on Wednesday September 02, 2015 @11:39PM (#10163239)
Overloading means that + does this: [1,2] + [3,4] == [1,2,3,4] and this: 1 + 2 == 3
Re:Bruce Eckel announces he's going to write Atomic Python by progrn on Thursday September 03, 2015 @12:00AM (#10163278)
What is the problem with that? Number + Number = number list + list = list str + str = str
Re:Bruce Eckel announces he's going to write Atomic Python by vessenes on Thursday September 03, 2015 @01:04AM (#10163421)
It's a bit of cognitive load. It's not clear whether or not [1,2] + [3,4] should equal [1,2,3,4] or [4,6].

Keeping track of that, (oh wait, this is a numpy array, not a python list...) and things like that expand the amount of the language that a programmer must keep in her head at any one time, and are the definition of complexity.

There's no known silver bullet for the complexity / power tradeoff, which is why we get so many cool languages!

Re:Bruce Eckel announces he's going to write Atomic Python by wpietri on Thursday September 03, 2015 @01:17AM (#10163444)
Is there some language where [4,6] is the output? That strikes me as serving some use case that I've never come across. Whereas having two lists and wanting to end up with one list with all the elements is a very common need.
Re:Bruce Eckel announces he's going to write Atomic Python by gknoy on Thursday September 03, 2015 @01:27AM (#10163469)
I believe it would be in Matlab, as [1, 2] + [3, 4] would be considered matrix addition, in which one adds elements in corresponding places. Numpy (as mentioned in the GP) probably does similar.
Re:Bruce Eckel announces he's going to write Atomic Python by wpietri on Thursday September 03, 2015 @02:32AM (#10163598)
Ah, ok, thanks. Right, matrix math is is the use case I was looking for.
Re:Bruce Eckel announces he's going to write Atomic Python by vessenes on Thursday September 03, 2015 @01:48AM (#10163512)
Yes, python.

   In [1]: import numpy as np

   In [2]: a = np.array([1,2])

   In [3]: b = np.array([3,4])

   In [4]: a+b

   Out[4]: array([4, 6])
Re:Bruce Eckel announces he's going to write Atomic Python by bwohlergo on Thursday September 03, 2015 @05:21AM (#10163966)
we are talking about Lists, not arrays from an unrelated library which has to be installed first. what you've done there is simply dishonest

In [1]: a = [1,2]

In [2]: b = [4,5]

In [3]: print(a+b)

Out [1, 2, 4, 5]

Re:Bruce Eckel announces he's going to write Atomic Python by Animats on Thursday September 03, 2015 @03:37AM (#10163732)
Is there some language where [4,6] is the output?

Yes. Python:

    >>> x = numpy.array([1,2])
    >>> y = numpy.array([3,4])
    >>> x + y
    array([4, 6])
For extra fun:

    >>> x + [3,4]
    array([4, 6])
    >>> [1,2] + y
    array([4, 6])
but, of course:

    >>> [1,2] + [3,4]
    [1, 2, 3, 4]
Re:Bruce Eckel announces he's going to write Atomic Python by topogios on Thursday September 03, 2015 @01:37AM (#10163490)
In R:

> a <- array(c(1,2))

> b <- array(c(3,4))

> a + b

[1] 4 6

> class(a + b)

[1] "array"

Re:Bruce Eckel announces he's going to write Atomic Python by yawaramin on Thursday September 03, 2015 @12:06AM (#10163292)
I think you just made GP's point for him.
Re:Bruce Eckel announces he's going to write Atomic Python by yawaramin on Thursday September 03, 2015 @12:08AM (#10163294)
Python's syntax is simple and clear. But that's about it.

If you put the syntax on top of well-thought-out semantics, you get something like Nim ( http://nim-lang.org/ ).

Re:Bruce Eckel announces he's going to write Atomic Python by chipsy on Thursday September 03, 2015 @04:19AM (#10163827)
I've used Nim, for a period of a few months. I didn't feel it was semantically that clean, just extremely terse. It has an enormous number of features. Some make good advertisement but are not implemented in a comprehensible, well-documented way(e.g. "parallel"). I was able to trigger a compiler regression the first time I used Nim because my first code, as one might expect given the large featureset, strayed from the idiomatic path. Plus the community had developed a careless attitude towards each other where any nastiness got a pass. I saw several flame wars go down in that IRC, bitter arguments that my friends looked at and shook their heads at. One said, "somebody should have been banned long before it got there."

I do have one good thing to say about it, though: it made systems type stuff fun. It has a featureset of "gradual affordance" that lets you implement something now and optimize later. That part is admirable, and most like Python. The next time I feel inclined I'll be looking at D, though - it's a more mature ecosystem, in several respects.

Re:Bruce Eckel announces he's going to write Atomic Python by pbowyer on Thursday September 03, 2015 @04:50PM (#10167455)
> Plus the community had developed a careless attitude towards each other where any nastiness got a pass. I saw several flame wars go down in that IRC, bitter arguments that my friends looked at and shook their heads at. One said, "somebody should have been banned long before it got there."

Thank you, it's good to be warned. My main reason for liking Python was that the community was so friendly; having used other languages where you say anything and get shot down it's a deciding factor for future choices.

Re:Bruce Eckel announces he's going to write Atomic Python by olau on Thursday September 03, 2015 @02:27AM (#10163592)
Of course there are blunders in Python. It's an old language by now. But a great deal of what makes Python really easy to use is that a lot of thought has gone in to getting many of the essential details right.

For instance, take comparison operators - by having < and == work across all the built-in types (including sequences), it's really easy to compare and sort stuff. Which is essential to writing terse and efficient algorithms.

Re:Bruce Eckel announces he's going to write Atomic Python by asgard1024 on Thursday September 03, 2015 @01:55AM (#10163528)
> What is simple and clear about Python? .. it's really a pretty complex language with a deep ecosystem

Here's a helpful video from Feynman that kinda explains it: https://www.youtube.com/watch?v=YaUlqXRPMmY

Python language (ditto Perl, Ruby..) uses Babylonian approach, while the languages with more fundamental building blocks (like say Scheme, Haskell..) are more like Greek approach.

So Python it is not simpler as a language per se, but it is simpler to mold onto the problem. At least that's my explanation why people (myself included) like to use it, despite well understanding there are more elegant (mathematically) languages out there.

Re:Bruce Eckel announces he's going to write Atomic Python by falcolas on Wednesday September 02, 2015 @11:27PM (#10163213)
You really could make such a list about every language out there. I think Pythons simplicity is as much about the code written by the community as it is the language itself. How many other languages have as broadly revered third party libraries as sqlalchemy or requests?
Re:Bruce Eckel announces he's going to write Atomic Python by brudgers on Wednesday September 02, 2015 @10:22PM (#10163074)
The offside rule. Just like futbol's.
Re:Bruce Eckel announces he's going to write Atomic Python by mikeash on Wednesday September 02, 2015 @10:40PM (#10163119)
From the title, I assumed this was going to be yet another attempt at making Python multithreaded. Apparently that's way off. What's the significance of "Atomic" in the title?
Re:Bruce Eckel announces he's going to write Atomic Python by lnanek2 on Wednesday September 02, 2015 @11:09PM (#10163175)
It took me some research to figure out too. I've read Bruce's free books, but never even heard of Atomic Scala. Following the link in the article it's apparently a paid book that only has some free sample portion about the Scala language. So I guess he's going to write a book about Python now. Really obtuse blog post, honestly.
Re:Bruce Eckel announces he's going to write Atomic Python by yawaramin on Thursday September 03, 2015 @12:09AM (#10163299)
Small chapters that cover a small amount of content each so that you feel like you're making progress through the book with a series of easy wins. The theory is you're more likely to keep going that way.
Re:Bruce Eckel announces he's going to write Atomic Python by mikeash on Thursday September 03, 2015 @09:18AM (#10164726)
Thanks! That makes a lot of sense.
Re:Bruce Eckel announces he's going to write Atomic Python by gaius on Thursday September 03, 2015 @02:26AM (#10163591)
Ditto; I thought this was going to be about STM. Also someone who has not looked at C++ since 98 is doing themselves a disservice; C++14 is a radically different thing.
Re:Bruce Eckel announces he's going to write Atomic Python by dkarapetyan on Thursday September 03, 2015 @03:46AM (#10163752)
I don't really understand why people think Python is a simple language. It's not. It draws too many distinctions that shouldn't exist. Functions, decorators, descriptors, classes, meta-classes, generators, iterators, properties, static methods, class methods, multiple inheritance, and probably a few more things I'm forgetting.

Ruby on the other hand is simple. There are objects and there are messages, that's it.

Re:Bruce Eckel announces he's going to write Atomic Python by _pmf_ on Thursday September 03, 2015 @03:57AM (#10163779)
I agree. Python is much more complex that Java (even Java 8), and as an additional twist, everything bites you at runtime.
Re:Bruce Eckel announces he's going to write Atomic Python by criddell on Wednesday September 02, 2015 @10:44PM (#10163127)
The most interesting thing in this article was his mention of Elm: elm-lang.org

I'd never heard of it before but it looks pretty cool.

Re:Bruce Eckel announces he's going to write Atomic Python by wpietri on Thursday September 03, 2015 @01:19AM (#10163446)
How do folks with Scala experience react to his thoughts on Scala and its cliffs? I've only built some modest stuff in it and I've certainly felt that way, but I put that down to inexperience. But if he's done 2 years of work in Scala and has written a book on it, it sounds like experience won't help me as much as I hoped.
Re:Bruce Eckel announces he's going to write Atomic Python by bjwbell on Thursday September 03, 2015 @01:42AM (#10163501)
Going by Paul Phillips's (largest contributor to the scala compiler) YouTube rant, https://m.youtube.com/?#/watch?v=4jh94gowim0, nobody ever gets over the cliffs.

His rant is great, for more than just scala.

Re:Bruce Eckel announces he's going to write Atomic Python by wpietri on Thursday September 03, 2015 @02:21AM (#10163581)
Wow. Just starting to watch, but my first thought is: thank goodness he got to give this talk when he did; otherwise he might have exploded.

The link that works for me on a desktop browser: https://www.youtube.com/watch?v=4jh94gowim0

Re:Bruce Eckel announces he's going to write Atomic Python by wpietri on Thursday September 03, 2015 @02:27AM (#10163594)
And here are the slides: http://www.slideshare.net/extempore/a-scala-corrections-libr...

Wow, this is a brutal talk.

Re:Bruce Eckel announces he's going to write Atomic Python by insulanian on Thursday September 03, 2015 @02:36AM (#10163607)
I remember I couldn't finish watching that video, not because of the content, but due to the way he was presenting it. It was just too disturbing to watch... Don't do that guys...
Re:Bruce Eckel announces he's going to write Atomic Python by wpietri on Thursday September 03, 2015 @10:32AM (#10165135)
Yeah, his emotions were so intense for him that it was hard to watch. I definitely get it; if you're going to spend 80-hour weeks for 5 years on something mainly because you like it, you have to be pretty intense. But it's a double-edged sword; now his grief and loss and sense of betrayal are very intense too. It was very raw.

In case others are curious as to content: For me the major takeaway was that the person who has written more core Scala code than anybody thinks that the collections and probably the whole language is irredeemably fucked. He had example after example where if you do a reasonable action in 2 different ways, you get 2 different results, and that it was impossible to know why without an incredibly deep understanding of the implementation details.

This makes me sad, as I really like a fair bit of what Scala does. But the video makes a persuasive case that Odersky, et al, bit off more than could be chewed, throwing in too many interesting ideas without really thinking through what happens when those ideas intersect and combine.

Re:Bruce Eckel announces he's going to write Atomic Python by BogusIKnow on Thursday September 03, 2015 @01:11AM (#10163433)
Following Bruce the last 15 years or so.

He hypes a language and makes money.

He bashes that language and makes money.

He hypes a language and makes money.

...

Re:Bruce Eckel announces he's going to write Atomic Python by fsloth on Thursday September 03, 2015 @02:54AM (#10163643)
Sounds like an evolution of the general community view of a new language :)

If we take the systems design view that new languages rise as solutions to existing problems, initially they are greeted as making thing X easier. But, since they work differently in places than previous language, they expose new emergent dynamics of software development, some of which will be pathological.

Once the strengths of the language are understood, improving on the usage of that language is then based on understanding the systemic pathologies that language induces and how to work around them.

Re:Bruce Eckel announces he's going to write Atomic Python by insulanian on Thursday September 03, 2015 @01:39AM (#10163494)
He should have take a look at F# or OCaml. After reading his post it felt like that would be the best fit for his description of the language.
Re:Bruce Eckel announces he's going to write Atomic Python by stretchwithme on Wednesday September 02, 2015 @11:12PM (#10163180)
Always found his writing pretty accessible.
Re:Bruce Eckel announces he's going to write Atomic Python by alblue on Thursday September 03, 2015 @03:19AM (#10163697)
Suggest adding "book" to the end of the HN subject, to clarify what he is writing
Re:Bruce Eckel announces he's going to write Atomic Python by harry8 on Wednesday September 02, 2015 @09:52PM (#10162989)
I find this guy pretty arrogant and a bit of a grand-stander, but maybe I get the wrong impression. He did have a good idea once, namely to release his textbooks free in the internet before that became fashionable. That is still a good idea today. The textbooks are not the best of breed by a long stretch but we shouldn't diminish the fact that he released them.

If you think you can do it, do it, release it. Bask in the glory.

Prediction: he can't. But good luck anyway.

Re:Bruce Eckel announces he's going to write Atomic Python by kevin_thibedeau on Wednesday September 02, 2015 @10:15PM (#10163053)
I really enjoyed his first C++ book. The only one I've seen that assumes proficiency in C and dives into the new stuff immediately. Bruce is a good writer but I think the ship has sailed on writing new Python books that can stand out from the crowd. Atomic Rust would be more commercially viable.
Re:Bruce Eckel announces he's going to write Atomic Python by speedkills on Wednesday September 02, 2015 @10:22PM (#10163072)
I thought he did a good job with atomic Scala and recommended it to a friend who wanted to see if programming might be for him. It did a really nice job of walking you through the language without assuming prior knowledge.
Re:Bruce Eckel announces he's going to write Atomic Python by Shorel on Thursday September 03, 2015 @09:07AM (#10164662)
He only plans to write yet another book, not to fix the GIL issue, or something like that.

Yes, the 'Atomic' in the title was confusing at first, having read none of this books with the 'Atomic' moniker. In fact, his C++ books are short and to the point.

I don't see anything far fetched about his goals.