News for hackers. Stuff that matters.
Re:An opinionated history of programming languages by blandflakes on Saturday October 03, 2020 @05:29PM (#24674803)
I would have thought that at least half of your opinions were unexpected:

Go's design is at the very least controversial and considered poor by a vocal subset of the hackernews and programming community.

Python is decidedly not dying... it's still the dominating game in town for ML and data science. I'm surprised anybody would posit that Python were dying. Perl definitely feels like it should be in Ruby's camp.

Re:An opinionated history of programming languages by bhaak on Saturday October 03, 2020 @05:56PM (#24674975)
> Go's design is at the very least controversial and considered poor by a vocal subset of the hackernews and programming community.

I'm in the camp of the rationales of Go's design being controversial. But the actual design is not bad IMO. For what Go wants to be (a modern C), it is not a bad design. But who wants a modern C? I don't. But if Go were available in the 90s, I would have jumped at the opportunity to write programs in it.

> Python is decidedly not dying... it's still the dominating game in town for ML and data science. I'm surprised anybody would posit that Python were dying. Perl definitely feels like it should be in Ruby's camp.

I didn't say that I would consider Python a dying language. But considering Ruby dying and Perl don't, is very weird. OTOH Ruby and Python aren't gaining any new usecases (but also aren't losing anything rapidly AFAIK) whereas Perl ... has any left besides very legacy code?

Putting Perl and Python into the same group and Ruby in another is certainly an interesting choice.

Re:An opinionated history of programming languages by blandflakes on Saturday October 03, 2020 @06:28PM (#24675146)
> For what Go wants to be (a modern C), it is not a bad design.

Sure and there's this weird thing where Go felt marketed as a C replacement and then Rust existed and it was all "just kidding we meant services" and boy do I think Go is poorly designed for services. It has a lot of characteristics that make it appealing - fast compiler and execution speed, low resource usage... but I don't see how pointers, a half-baked type system and a totally undesigned error system are good design for where Go is currently winning.

> But considering Ruby dying and Perl don't, is very weird.

Agreed for sure, I think Ruby and Perl probably have similar trajectories based on current trends in languages. Python's staying power IMO is really only due to the data science/ML trends and I frankly think it's a pretty poor language and ecosystem if you can get away with using anything else. I think Python WOULD be losing ground if not for its popularity in these very large niches.

Re:An opinionated history of programming languages by kortex on Saturday October 03, 2020 @11:47PM (#24676405)
I want a modern C. I love/hate C. I mostly love Go. It has warts, but the philosophy works _for my brain_.

Python will gain usecases as a meta-language as the ability to automatically wrap lower abstraction libaries improves. I see Julia eating much of Python's lunch, then python abstracting its way over julia, just because it can.

Re:An opinionated history of programming languages by eigenspace on Sunday October 04, 2020 @01:14AM (#24676674)
> Python will gain usecases as a meta-language as the ability to automatically wrap lower abstraction libaries improves. I see Julia eating much of Python's lunch, then python abstracting its way over julia, just because it can.

A big problem for Python as a glue language is interproceedural optimizations. In many important high performance applications, you really need the compiler to be able to make optimizations that cross function barriers, often barriers between user-written and developer-written functions.

e.g. in differential equation solving, you can have a very fast integrator, and your user can have a very fast integrand, but if you don't have a compiler that's able to see and reason about both simultaneously, you're in trouble.

This is why slapping Numba on a differential equation and sticking it in scipy integrators isn't even close to julia DifferentialEquation solvers. This is a very hard problem to solve in an ecosystem where there's so many different siloed compilers used by different Python packages. You'll always end up paying a performance price of the context switch.

In julia, most things are written in pure julia, so the same compiler is seeing the entire program top to bottom. It's very nice.

Furthermore, Julia has much power powerful metaprogramming facilities than Python does. It'll eat Python's lunch on that front too.

Re:An opinionated history of programming languages by Certhas on Sunday October 04, 2020 @02:03AM (#24676833)
I can second this. I once implemented my own sparse matrix multiplication because I needed it in numba. Further, the type of automatic differentiation that is possible now is game changing.

On the other hand Julia is a terribly designed language in some respects. Compare python error messages to Julias. It has all the problems of c++ templates baked in from the start. And latency is a real issue for now. I am always shocked when I drop back to Python for one task or another how responsive it feels.

I think the latter might see a technical solution some time, e.g. by running code in the interpreter and swapping in jotted functions as they become available.

The former it seems might have to wait for Julia 2.0 to start addressing...

Re:An opinionated history of programming languages by eigenspace on Sunday October 04, 2020 @12:20PM (#24680137)
There's actually a lot of work going into making better error messages right now. In 1.6 we're getting better highlighting of them in the REPL to emphasize the parts of the stacktrace that we think are actually relevant to the problem, and there's some discussion about mechanisms to mark functions as 'internal' so that they don't appear in stacktraces unless toggled to do so.
Re:An opinionated history of programming languages by Certhas on Monday October 05, 2020 @03:57AM (#24685543)
That's great to hear! I am sure there is a lot of room for improvement and that would go a long way! But it also seems to me that with the language as it is now, the compiler simply doesn't have enough information to provide good error messages. E.g. there is no way to express the idea that something needs to be iterable to the compiler. Or that you expect an argument to be a function of a certain type. I'd love to be wrong on this though. :)
Re:An opinionated history of programming languages by kortex on Sunday October 04, 2020 @10:31AM (#24679317)
I totally get your point, but that's still below the level of abstraction I'm talking about. Basically it boils down to, python's main trick is metaprogramming. If your interprocess optimization is a bottleneck, then write a framework which lets you put those pieces together under the hood.

> Furthermore, Julia has much power powerful metaprogramming facilities than Python does.

Until someone writes a way to import julia code directly into python/autogenerate it from python. Anyone who says "well then you're not really writing python" is missing the whole point: writing python is all about exactly this sort of tip-of-the-abstraction-iceberg trickery.

Sure, you can call python from Julia as well. So it boils down to "which is the better glue language?" This isn't a competitive thing, it's just literally what Python is meant to do.

https://pyjulia.readthedocs.io/en/latest/usage.html

Re:An opinionated history of programming languages by MrBuddyCasino on Sunday October 04, 2020 @06:37AM (#24677857)
> I want a modern C.

As in, a minimalist language aesthetic or fast low-level non-gc? Golang only has the aesthetics, Zig has both.

Re:An opinionated history of programming languages by socialdemocrat on Sunday October 04, 2020 @04:01AM (#24677215)
Problem is that as Python starts using Julia more and more due to its top notch performance many will eventually question why they even use Python as they will realize Julia is a better language anyway.
Re:An opinionated history of programming languages by listenallyall on Saturday October 03, 2020 @05:53PM (#24674955)
Python is still vital and thriving but I wouldn't be surprised if its market share is declining (slowly). As you say, it's dominant for data science... but recently it and R were the only practical choices... now other languages (Julia, for example) are valid options. The development of alternative Jupyter (formerly IPython) kernels has accelerated adoption of other languages. Similarly, a few years back it seemed like Flask and Django were vastly dominant frameworks for building APIs, now similar frameworks exist in tons of languages. None of this is to imply that Python is anywhere close to dead, but my personal opinion is that "peak Python" is behind us.
Re:An opinionated history of programming languages by blandflakes on Saturday October 03, 2020 @06:30PM (#24675159)
I want this to be true, by the way. As I mention in some other comment, I think Python is rather mediocre as an actual language for building software. Its appeal cannot be denied, but a majority of my peers would really like to use a language that has its tooling shit together.

Python is the only language I've had to deploy that makes me understand why anybody would want to use containers.

Re:An opinionated history of programming languages by meowface on Saturday October 03, 2020 @09:11PM (#24675910)
I love Python, and it's my first and most-used language, but I definitely agree. I want something that takes the best parts of Python, is compatible with most existing Python code, and has a much better tooling ecosystem and better options for static typing.

Spending a bit of time with Rust's tooling, static analysis, and "if it compiles it's pretty likely to work" (at least way more so than with Python) definitely emphasizes a lot of Python's flaws.

Re:An opinionated history of programming languages by kortex on Saturday October 03, 2020 @11:50PM (#24676415)
Have you tried writing python as if types were mandatory? It takes a lot of discipline but it's a totally different beast with strict mypy checking.
Re:An opinionated history of programming languages by meowface on Monday October 05, 2020 @05:28PM (#24692255)
Yes, I've started to more in the past few weeks, and I've enabled stricter Pylance checking in VS Code. It's definitely giving me more Rust-like productivity and reliability improvements.
Re:An opinionated history of programming languages by notacoward on Saturday October 03, 2020 @08:35PM (#24675784)
Maybe we should separate the evolution of languages from the evolution of package/versioning systems. They do tend to go hand in hand, but that has more to do with logistics and organizational issues than any technical necessity.
Re:An opinionated history of programming languages by disgruntledphd2 on Sunday October 04, 2020 @08:06AM (#24678380)
But like R has a great packaing system, and it copied Perl, which is much older than Python. Meanwhile Python has a bunch of incompatible packaging systems which cause so much pain to so many programmers.

Did you know that pip won't even resolve dependencies, and will break your programs silently? I certainly didn't, because Python wasn't my first language and therefore I assumed that the package manager will handle dependencies.

Like seriously, when a language designed by statisticians for statisticians (R) has a better packaging story than everyone's second favourite language, something has gone horribly wrong.

Re:An opinionated history of programming languages by notacoward on Sunday October 04, 2020 @08:46AM (#24678615)
> R has a great packaing system, and it copied Perl

I almost used Perl as an example of Python's inverse - a crappy language wrapped in a good packaging system. For its time CPAN was pretty great. All of the things today that people are likely to hold up as being better drew inspiration from it.

> which is much older than Python

Perl 1987, Python 1989. So yes it's older, but much older?

Re:An opinionated history of programming languages by disgruntledphd2 on Sunday October 04, 2020 @10:09AM (#24679170)
Fair, I realised that the difference wasn't that large after I posted.

I'm just so annoyed by Python's (lack of a) packaging system that it makes me prone to hyperbole. It's been frustrating me at work all week, and I suspect that it will be a low-grade annoyance for me in my career for the next few years, as I'm a Data Scientist and hence need to deal with Python a lot.

Re:An opinionated history of programming languages by int_19h on Monday October 05, 2020 @12:28AM (#24684565)
pip is a packaging system, and it ships out of the box with Python. It may not be the best one around, but there certainly isn't a lack of one.
Re:An opinionated history of programming languages by disgruntledphd2 on Monday October 05, 2020 @04:52AM (#24685819)
Does it ensure that packages in the environment are consistent with one another? If not, I'm not sure what it does that curl won't do.
Re:An opinionated history of programming languages by int_19h on Tuesday October 06, 2020 @04:41PM (#24702117)
curl won't resolve dependencies.