Python - My take



  • I love it!

    The End!



  • Do you prefer Python 2, Python 3, Jython, or Iron Python?

    No matter your answer, someone will be along shortly to tell you why you're wrong!


  • Banned

    Is bestiality banned on this forum? Because I know a few relevant videos.



  • @gąska The thread s taking a very wrong turn.


  • Discourse touched me in a no-no place

    @stillwater said in Python - My take:

    The thread s taking a very wrong turn.

    It started from a bad position of doing unspeakable things with a snake. What did you expect?



  • For small hacks I like it. The fuzzy warm feels are pretty soon replaced when building something substantial.



  • @nagesh I kind of like it but I really wish it had real threading.



  • I'm sorry but I just can't deal with the absence of static typing. It is nice to read and all that but yeah fuck if I use python for anything serious.



  • @magus Python 1.0 was the only good version. It all went downhill from there.



  • @magus said in Python - My take:

    Do you prefer Python 2, Python 3, Jython, or Iron Python?

    No matter your answer, someone will be along shortly to tell you why you're wrong!

    I like 3, but I am better off with 2.

    said google app engine



  • @blakeyrat said in Python - My take:

    @nagesh I kind of like it but I really wish it had real threading.

    You mean like your clothes?




  • Java Dev

    @gąska said in Python - My take:

    Is bestiality banned on this forum?

    NSFW material is only allowed to be posted in the NSFW thread.


  • Discourse touched me in a no-no place

    @blakeyrat said in Python - My take:

    I really wish it had real threading

    I wish it had threading that wasn't done by a fucking moron. And which is now so deeply grafted into things that making it unfucked will break a lot of code. Seriously, everything you say that's bad about Open Source (and which I usually disagree with you about, FWIW) is entirely true about Python's threading. It's the only language I know of where it is possible to speed up threads massively by running a busylooping thread in parallel. That's seriously fucked.

    Python: a language that's OK until you write threads, classes or packages, when all hell breaks loose as the crazy aunt peeks its ugly head over the parapet and starts throwing balloons filled with bat vomit at you.



  • @dkf said in Python - My take:

    That's seriously fucked.

    What's even more fucked is that this language without real threading and with extremely weak typing was picked by data scientists as their hot shit language. For... reasons?

    I can't actually think of a worse language for data science.


  • Discourse touched me in a no-no place

    @blakeyrat said in Python - My take:

    I can't actually think of a worse language for data science.

    It's got a few very good libraries that are written by people who actually know what they're doing (those libraries are largely written in something else, probably C or C++), but the language itself is a disaster for anything non-trivial.



  • @blakeyrat said in Python - My take:

    What's even more fucked is that this language without real threading and with extremely weak typing was picked by data scientists as their hot shit language. For... reasons?

    That's actually quite easy to explain, I think. Off the top of my head, I can think of two reasons:

    • It's (comparatively) super-easy to interface with native code from Python, so you have a nice scripting language to interact with native code optimized for performance.
    • It's a great language for interactive scripting and the final scripts are usually quite short and readable.

    I can't actually think of a worse language for data science.

    What would you choose instead? Please don't say R or I'll have to bang my head against a wall.


  • BINNED

    @dkf I'm probably a fucking idiot, but to this day I haven't figured out how to properly write a long running script in Python without it just murdering the CPU.

    Again, that's probably just me, but I suspect that the type of idiocy you're talking about is not helping, either.



  • @dkf Imagine of those libraries were .net assemblies and researchers could use any damned language they wanted.



  • @stillwater said in Python - My take:

    I'm sorry but I just can't deal with the absence of static typing. It is nice to read and all that but yeah fuck if I use python for anything serious.

    At least it has some PHP-like optional typing now… Somewhat, at least. (The default interpreter does not enforce the annotations, but you can run a type checker on your code in CI builds.)



  • @dfdub said in Python - My take:

    It's (comparatively) super-easy to interface with native code from Python, so you have a nice scripting language to interact with native code optimized for performance.

    That's true of literally every interpreted language I know of. (Except perhaps Ruby; I haven't used it enough.)

    @dfdub said in Python - My take:

    It's a great language for interactive scripting and the final scripts are usually quite short and readable.

    That's great, but if you're doing data science wouldn't "it fucking runs the code fast" be more important than "quite short"? And I mean sure languages like C# are quite verbose, it's never going to win one of those "shortest code" competitions, but that really helps with understanding when you come back to it 6 months later.

    @dfdub said in Python - My take:

    What would you choose instead? Please don't say R or I'll have to bang my head against a wall.

    .NET or Java would be excellent choices. Both run fast. Both have real threading. Both have multiple languages that can interface with their libraries. Both are cross platform. Both allow calling into C DLLs. Some distributed systems like Apache PIG already are backed by Java.



  • @dfdub I'll say it: R

    ...

    How's your head? 🙂



  • @blakeyrat said in Python - My take:

    @dfdub said in Python - My take:

    It's a great language for interactive scripting and the final scripts are usually quite short and readable.

    That's great, but if you're doing data science wouldn't "it fucking runs the code fast" be more important than "quite short"?

    Depends on which code we're talking about. The actual data processing and parallelization is rarely implemented in Python; it's just the interface.

    @dfdub said in Python - My take:

    What would you choose instead? Please don't say R or I'll have to bang my head against a wall.

    .NET or Java would be excellent choices. Both run fast. Both have real threading. Both have multiple languages that can interface with their libraries. Both are cross platform. Both allow calling into C DLLs.

    From what I've heard about JNI, it's neither easy nor fast. I've never used it myself, but my colleagues who did mentioned that function calls through JNI have quite a lot of overhead.

    It's not about the ability to interface with C code (of course that's possible in almost any language!), it's about how easy and fast it is to call into C code and access native objects via the scripting language. You can teach yourself all you need to know about Cython in two hours.



  • @hannibalrex PM me your address and I'll send you the medical bill.



  • @hannibalrex said in Python - My take:

    I'll say it: R

    Ah, yes. R. The bane of my stats class in college. Where we weren't really expected to understand statistics, but just use R to solve the problems, and yet the professor wouldn't teach us how to use R.

    I seem to be sitting in a giant pile of my own vomit now.


  • area_pol

    @blakeyrat I do machine learning and one thing I notice is that my code changes faster than my data.
    It takes several minutes to load and preprocess the data.
    Then I try 30 different algorithms/visualizations for it in an interactive environment: edit code, see result, edit again, ....

    While this is probably possible on JVM or CLR, it is not the usual way of working with Java or C#, and that may be one of the reasons why they were not used.

    (By the way, I love the idea of JVM or CLR and sharing libraries between languages, I wish Java applets were fiexed instead of being replaced with JavaScript)



  • @mott555 I do imagine most people's distaste for R has to do with it being "taught" side by side with statistics.

    Statistics isn't most people's favorite subject (and many students who could care less about mathematics in general are often forced to take a statistics class), and doing both R and statistics at the same time often ends up with people understanding neither. It's like "hey here's two things you don't get. How about we do both simultaneously?".

    I feel like you'd have a similar problem if your average statistics course used Python.



  • @dfdub said in Python - My take:

    From what I've heard about JNI, it's neither easy nor fast. I've never used it myself, but my colleagues who did mentioned that function calls through JNI have quite a lot of overhead.

    Well I've never used it either, but pinvoke in .NET is damned close to native speed.



  • @blakeyrat
    I suspect that .NET will become more popular in general now that other operating systems than Windows are officially supported. But that'd be a historical reason for why .NET isn't popular - compute clusters almost always run some kind of UNIX-like system.

    And the JVM might also become more popular for such tasks once GraalVM is mature and you can compile arbitrary JVM languages to native code. That wouldn't be very interactive, though - and as @Adynathos said, interactivity is important.



  • @adynathos said in Python - My take:

    While this is probably possible on JVM or CLR, it is not the usual way of working with Java or C#, and that may be one of the reasons why they were not used.

    C# Interactive has been in since VS2015... And F# interactive from the start of the language.



  • @dfdub said in Python - My take:

    I suspect that .NET will become more popular in general now that other operating systems than Windows are officially supported.

    Mono's been around forever. The .NET spec has been open source forever. I honestly am mystified when I see this all over the place-- why do so many people think that only just now it's been cross-platform?

    @dfdub said in Python - My take:

    And the JVM might also become more popular for such tasks once GraalVM is mature and you can compile arbitrary JVM languages to native code. That wouldn't be very interactive, though - and as @Adynathos said, interactivity is important.

    I can't speak for the JVM, but .NET has been designed for that since day one.



  • @magus said in Python - My take:

    @adynathos said in Python - My take:

    While this is probably possible on JVM or CLR, it is not the usual way of working with Java or C#, and that may be one of the reasons why they were not used.

    C# Interactive has been in since VS2015... And F# interactive from the start of the language.

    C# become interactive? How how how when where?



  • @dkf said in Python - My take:

    @stillwater said in Python - My take:

    The thread s taking a very wrong turn.

    It started from a bad position of doing unspeakable things with a snake. What did you expect?

    is that story from Bibel?



  • @nagesh
    0_1528915199798_89779e13-5683-4f36-8afc-54dafa774f52-image.png

    VS2015 or so, like I said. It's a REPL.



  • @stillwater said in Python - My take:

    I'm sorry but I just can't deal with the absence of static typing. It is nice to read and all that but yeah fuck if I use python for anything serious.

    are you not using var keyword in java? var is best invention of java and stolen by c#



  • I really think it's just all about rapid development.

    Want to loop over a list? for x in y. what does that work for? everything. want to do a simple operation on a list? [x+2 for x in y]. Lazy eval of same? (x+2 for x in y). the same but more functional? map(lambda x: x+2,y). The same but across multiple processes? mp.imap(lambda x: x+2,y). The only language I'm aware of where parallelization is easier might be Julia, where it's just @parallel . Julia can parallelize to multiple physical machines using goddamn hostnames, though, so julia is kind of special.

    I think it says a lot about Python that 'numpy' is regarded as too long to type, for instance.

    The GIL has a couple of backhanded benefits. One of which is it obviously discourages people from doing heavy lifting in python, which helps prevent people from doing heavy lifting in python. Because, you know, don't do that.

    Someone will invent a limited transpiler from Python to something that compiles to LLVM and then we'll all be rich.



  • @magus I am afraid it does not behave the same way as a python hyperactive shell.



  • @aygeeplus My get-rich scheme is better. Send me $100.00 to find out.

    Also US Dollars only. ONe person sent me zimbabwe dollars to find out. he has not heard from me again.



  • @aygeeplus said in Python - My take:

    The GIL has a couple of backhanded benefits. One of which is it obviously discourages people from doing heavy lifting in python, which helps prevent people from doing heavy lifting in python. Because, you know, don't do that.

    This is truly demented reasoning and I love it.

    "The language has crappy threading, but that's ok because it's a sign to users that they should pick another, better, language to do their actual work in"

    Who can't get behind that logic.



  • @nagesh Anything called a 'hyperactive shell' can only be bad, and I don't want to use software that acts like it.



  • @blakeyrat I think the idea is, you do simple user-level scripts in Python, and nothing else. Which sounds fine.



  • @magus said in Python - My take:

    @blakeyrat I think the idea is, you do simple user-level scripts in Python, and nothing else. Which sounds fine.

    Yes. That is why google app engine is a big flop in the cloud world. Though, when I said, "I love python", I was speaking of the simplicity of the language and its ease of use and setup.


  • Banned

    @nagesh said in Python - My take:

    @stillwater said in Python - My take:

    I'm sorry but I just can't deal with the absence of static typing. It is nice to read and all that but yeah fuck if I use python for anything serious.

    are you not using var keyword in java? var is best invention of java and stolen by c#

    It's still static typing. Your var won't suddenly become another type, and when trying to use it as such, it won't even compile.



  • @blakeyrat said in Python - My take:

    This is truly demented reasoning and I love it.

    ¯\(ツ)/¯ it prevents bad software from being written. ...partially.

    Is it a silver bullet for computer problems? no. Do you need a 'real' language sometimes? Yes. Should you use a 'real' language? not if you can avoid it.


  • Banned

    @aygeeplus said in Python - My take:

    The GIL has a couple of backhanded benefits. One of which is it obviously discourages people from doing heavy lifting in python, which helps prevent people from doing heavy lifting in python. Because, you know, don't do that.

    That's the worst argument for anything I've ever heard. "This thing is absolutely broken in this language, but it's a good thing because it discourages people from doing something that would be perfectly fine if not for the fact it's absolutely broken in this language."


  • Banned

    @magus said in Python - My take:

    @nagesh Anything called a 'hyperactive shell' can only be bad, and I don't want to use software that acts like it.

    Except it's not actually called that. @nagesh just made it up.


  • Banned

    @aygeeplus said in Python - My take:

    Is it a silver bullet for computer problems? no. Do you need a 'real' language sometimes? Yes. Should you use a 'real' language? not if you can avoid it.

    If the language is good for both performance-critical code and short scripts alike, why wouldn't I want to use it everywhere?



  • @gąska A very good question. If you know of one please let me know?



  • @gąska How does it compare to C# Interactive? I use the latter quite a lot.



  • @magus Fascinating. I really need to move on from Visual Studio 2008.


Log in to reply