News for hackers. Stuff that matters.
Re:PyTorch: Where we are headed and why it looks a lot like ... by justapassenger on Friday November 26, 2021 @06:27PM (#29355370)
Bad languages like Python, JavaScript, PHP are responsible for powering large part of tech revolution. Ability to write bad code easily is IMO large part of why they’re so popular. Low barrier to entry helps to build huge ecosystem.
Re:PyTorch: Where we are headed and why it looks a lot like ... by edgyquant on Friday November 26, 2021 @07:17PM (#29355767)
I would say that those are not bad languages. People are just elitist and think if your language isn’t strictly typed, functional and gives first year CS students a headache it’s a bad language and “creates spaghetti code.” The only thing wrong with dynamic typing is it’s slower and is harder to debug, but people are able to be way more productive in these languages you call bad.
Re:PyTorch: Where we are headed and why it looks a lot like ... by forrestthewoods on Friday November 26, 2021 @07:50PM (#29355978)
> The only thing wrong with dynamic typing is it’s slower and is harder to debug, but people are able to be way more productive in these languages you call bad.

Not even close to "only thing". Dynamic language is a net loss of productivity once you reach a certain level of scale. Refactoring a codebase with millions of lines of code in a dynamic language is an absolute nightmare.

Opinions vary at what level of scale this happens. My personal experience is that once you hit just a few thousand lines of code that dynamic typing is a drag on productivity.

There's a reason things like TypeScript are increasingly popular.

I don't care what language first year CS students use. I care what languages I'm forced to deal with on a day-to-day basis!

Re:PyTorch: Where we are headed and why it looks a lot like ... by jstx1 on Friday November 26, 2021 @07:58PM (#29356028)
It's not just Python, Julia is dynamically typed too.
Re:PyTorch: Where we are headed and why it looks a lot like ... by ummonk on Friday November 26, 2021 @08:06PM (#29356089)
Indeed, and static type analysis is the single biggest feature I'd like Julia to add first class support for.
Re:PyTorch: Where we are headed and why it looks a lot like ... by fault1 on Friday November 26, 2021 @08:49PM (#29356426)
i agree, this is without a doubt the number one thing that julia needs.

nearly every dynamic language has trended towards this in the last 7-8 years. it's probably had the most profound effect in modern Javascript (typescript) and python. It's incredible how different production javascript and production python are compared to say, 2014 javascript or 2014 python.

JET.jl is a interesting project to do some error analysis through abstract interpretation: https://aviatesk.github.io/JET.jl/dev/jetanalysis/

more so than the goals of JET itself, the abstract interpretation framework it exposes should allow for TypeScript-like gradual typing.

This is important, imho, if Julia is ever to go out of a niche area because most of the rest of the world has already moved on to see the benefit that the improvement in application reliability that static analysis allows.

Re:PyTorch: Where we are headed and why it looks a lot like ... by longemen3000 on Friday November 26, 2021 @10:12PM (#29357000)
JET.jl it's an interesting case indeed. Its being used retroactively in the Julia base code to look for any undesirable dynamic type situations
Re:PyTorch: Where we are headed and why it looks a lot like ... by forrestthewoods on Friday November 26, 2021 @06:43PM (#29355498)
I would claim the tech revolution happened despite those terrible languages rather than because of them. The languages are popular because of inertia, not because they're good.

Python is popular because of the ML revolution. If ML didn't take off neither would Python's popularity. Is ML successful because of Python or despite Python? Well, the world is probably further along with Python than if it merely didn't exist. But if a different language that sucked less existed we would, imho, be further along than we are.

I'm not annoyed Python exists. I'm annoyed that its inertia is so monumental it's inhibiting further progress. We're at a local maximum and the cost to take the next step is really really really high. That's not Python's fault mind you, just the way things work.

Re:PyTorch: Where we are headed and why it looks a lot like ... by hjtkfkfmr on Friday November 26, 2021 @07:42PM (#29355935)
As someone who uses Python since 2004, you got it backwards.

Python was popular before because it's very nice language. People wanted to use it for science to, so they wrote very good scientific libraries for it.

R was very popular for non-neural-network ML some years ago, yet it wasn't picked up for NN, because R kind of sucks for general programming. As the joke goes, the best part of R is that is a language written by statisticians. The worse part of R is that is a language written by statisticians.

Python was growing at accelerated speed year on year well before neural networks.

Re:PyTorch: Where we are headed and why it looks a lot like ... by laichzeit0 on Saturday November 27, 2021 @12:47AM (#29357819)
The runtime of R is it’s biggest downfall. Its single threaded nature kills it. I say this having used future::promise in a Plumber API to get some semblance of concurrency.
Re:PyTorch: Where we are headed and why it looks a lot like ... by dragonwriter on Friday November 26, 2021 @07:49PM (#29355965)
> Python is popular because of the ML revolution.

Python was popular, including for scientific use, before the ML revolution; in fact, the only reason it is associated with the ML revolution in the first place is it's preexisting broad adoption in scientific computing.

Re:PyTorch: Where we are headed and why it looks a lot like ... by edgyquant on Friday November 26, 2021 @07:21PM (#29355794)
No these languages are the drivers of the tech revolution. PHP was widely adopted because it allowed people to rapidly build personal websites and then those people went on to build companies with it. Python is popular in ML because of its syntax being close to pseudo-code and allowing people who aren’t programmers to interact with all the old math libraries you used to have write C and Fortran to use. JavaScript is popular because it made the web more interactive and thus a ton of people who made websites learned it as their first programming language when they were young.

Python and PHP are so big because of the languages themselves and their implementation, Js is a bit different in that regard I’ll admit.

Re:PyTorch: Where we are headed and why it looks a lot like ... by forrestthewoods on Friday November 26, 2021 @07:44PM (#29355946)
It's true that the tech revolution would not have happened if all code had to be written in assembly. And it's true the machine learning revolution would not have happened if all code had to be written in C.

Is Python better than assembly and C/C++ for ML? Absolutely. Is Python good? I don't think so. Other people might use that term, I do not. I think Python is a bad language that would be designed very differently it was built today. And we're stuck with its decisions because the inertia to change them is monumental.

It's not really the language's fault. As an industry we've learned a lot in the past 30 years! It would be a travesty if we hadn't made language design process! Unfortunately we haven't figured out how to effectively apply lessons to encumbered ecosystems. Case in point: the transition from Python 2 to Python 3 was an absolute disaster. And it only made tiny, incremental improvements!

Re:PyTorch: Where we are headed and why it looks a lot like ... by dnautics on Friday November 26, 2021 @06:42PM (#29355488)
Sure, but I get the feeling that the pendulum is swinging from a period where being able to write code easily is relatively devalued to being able to read code easily. Ironically, python itself benefitted from the last swing of that pendulum, as it was widely regarded as an "easier to read" PL than, say C (well, yeah) or perl (well, super yeah) or PHP (super-duper yeah).