Earlier quoted context omitted.
if you want tail calls in Julia, there is a 3 line macro that gives it to you.
Could you point to it? Thanks
PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
61–70 of 291 posts
Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
#62Earlier quoted context omitted.
Because people in that game value simplicity of use over anything else (performance, safety, maintenance) and Python is a top performer in that KPI while Java is not very good at this (though it is getting better but still)
This is a big part of it. People who are scientists write code that we would think is disgusting and don’t care that much about abstraction outside of mathematical functions. There’s a lot to learn with Java. I helped classmates in my intro to programming class when I went to college, because I already knew how to code, and I have no idea why they picked that language as an introduction language. After weeks people w…
- plenty of scientists write good code; I think the "scientist can't code" meme is harmful.
- most of the people that write PyTorch code aren't necessarily scientists - they're software developers (data scientists, ML engineers, research engineers, whatever title - but their main job is to write code)
> Python was written with people like scientists in mind.
Python had nothing to do with scientists when it started. It was written to be readable and easy to use and it started as a hobby project. It existed for over 15 years until the data science / ML ecosystem started growing around it.
Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
#63Earlier quoted context omitted.
I personally think that leetcode-interview-passers that I have had to work with do poorly with actually useful tasks like, writing organized code, writing tests, documenting, etc.
Probably but those are things they can pick up on the job pretty quick, while it’s a lot harder to teach leet code style problem solving while solving actual business problems.
Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
#64Neither language have proper tail call elimination, which, is absolutely insane to me. Yall really just write procedural code for everything?
Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
#65> Julia says: > A language must compile to efficient code, and we will add restrictions to the language (type stability) to make sure this is possible. > A language must allow post facto extensibility (multiple dispatch), and we will organize the ecosystem around JIT compilation to make this possible. > The combination of these two features gives you a system that has dynamic language level flexibility (because you h…
But you can just write a simple 20 line Python script to do some data mangling, no project with 30 IDE files required.
Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
#66Earlier quoted context omitted.
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.
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…
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 Julia (but not exactly)
#67Earlier quoted context omitted.
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…
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…
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 Julia (but not exactly)
#68Neither language have proper tail call elimination, which, is absolutely insane to me. Yall really just write procedural code for everything?
Real world code rarely uses recursion, and if it does it's the kind that doesn't allow tail call optimization.
Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
#69Earlier quoted context omitted.
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.
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…
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 Julia (but not exactly)
#70Earlier quoted context omitted.
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.
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.
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!