Live data from Hacker News

PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

dev-discuss.pytorch.org

51–60 of 291 posts

Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

#51

The more I use Python the more I hate it. It’s genuinely a bad language, with a stellar ecosystem. Ironically, the most valuable parts of the ecosystem are often written in C (NumPy). It’d be interesting to see how much of the Python ecosystem is actually necessary to move PyTorch to a better language. I’m afraid we’re stuck with Python for the next 20 years. That makes me very, very sad.

Python is not a bad language, programming languages do not have to be unreadable or have a steep learning curve to be good. The problem with python is that it’s implementation is slow and offers a ton of hang ups that you have to know the language in and out to even know they’re there. There’s a post here about once a year that details some of the funnier things.

Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

#52
post #47

Earlier quoted context omitted.

You can't dismiss the fact that hiring python is hard. You think you're getting a good programmer, because they know all the leetcode tricks, but that person turns out to be a dud.

Isn't that true for any language? Why are you hiring for language skills rather than problem solving aptitude and conceptual fundamentals?

> Why are you hiring for language skills rather than problem solving aptitude and conceptual fundamentals?

All I'm saying is that signal to noise for the common tests you give for 'problem solving aptitude and conceptual fundamentals', is much lower when you are hiring for a python position. You think you're hiring for those things, but you're actually hiring for leetcode-optimizers.

I mean, I'm not trying to do hire like that, and I think I have an interview that tries to test that effectively, but I have had to deal with the downstream effects of people who are doing hiring like this, and that has been a real problem for me.

Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

#53

The more I use Python the more I hate it. It’s genuinely a bad language, with a stellar ecosystem. Ironically, the most valuable parts of the ecosystem are often written in C (NumPy). It’d be interesting to see how much of the Python ecosystem is actually necessary to move PyTorch to a better language. I’m afraid we’re stuck with Python for the next 20 years. That makes me very, very sad.

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.

Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

#54
post #2

What stage of Julia denial is this?

I like what Julia is doing but I just dislike the syntax. It seems to resemble ruby, whose syntax I also think is ugly, which to me resembles a modern form of basic.

Hmmm... this seems to be an odd first impression.

There is the use of @ (but to signal macros), but otherwise, the syntax is much closer to a cross between Python and matlab except nicer for doing math.

I tried writing a few programs in Julia and got sucked in by how effective it is. The real surprise is that just a few weeks in instead of pulling up R to do a quick calculation my fingers decided they wanted Julia.

Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

#55

Earlier quoted context omitted.

You can't dismiss the fact that hiring python is hard. You think you're getting a good programmer, because they know all the leetcode tricks, but that person turns out to be a dud.

Can you elaborate? If someone can pump out leet code I would assume they would be a half decent programmer and it would just take some time for them to be as productive as you wanted. Then again I’m mostly self taught and never done leet code and I still manage to be a good programmer according to those I’ve worked with

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.

Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

#56

Neither language have proper tail call elimination, which, is absolutely insane to me. Yall really just write procedural code for everything?

I've never seen recursive looping over a thing get turned into efficient SIMD code in any language. Starting with loops has no good reason to be better able to achieve that but for practical compilers it makes a huge difference. Julia code might also uses a lot of in place operations which would be hard for a compiler to infer as safe.

This is why I find it so annoying that CS programs seem to worship functional programming (at least MY program did!).

No, I AM going to write procedural code, and it WILL be faster than your "high IQ" 1 line recursive solution. Also funny to see how little recursion gets used in CUDA/Pytorch/GPU programming - which is what we are seeing to be more and more important over time.

Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

#57
post #40

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

Here is one:

https://github.com/TakekazuKATO/TailRec.jl

It works by inspecting the code and rewriting a function to turn tail calls into loops.

The interesting bit is that it was very easy to write because of the strong macros in Julia.

Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

#58

Earlier 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…

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 Julia (but not exactly)

#59
post #15

> 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…

Java falls apart on the point about post factor extensibility.

See this talk for examples: https://www.youtube.com/watch?v=kc9HwsxE1OY

Re: PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)

#60

Earlier quoted context omitted.

Can you elaborate? If someone can pump out leet code I would assume they would be a half decent programmer and it would just take some time for them to be as productive as you wanted. Then again I’m mostly self taught and never done leet code and I still manage to be a good programmer according to those I’ve worked with

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.
Post reply on HN