Why is python so comfy Jow Forums

Why is python so comfy Jow Forums

Attached: 23423512313254.png (1024x1024, 51K)

Other urls found in this thread:

medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e
python.org/dev/peps/pep-0008/
docs.python.org/3/library/typing.html
docs.python.org/3/tutorial/index.html
twitter.com/NSFWRedditVideo

It doesn't have garbage C syntax

Because you're the kind of retard who says "comfy".

9 instead of 3 in perl, still slower

9 types instead of 3 in perl, still slower

Because you haven't programmed in python enough to hate how retarded it is. This is in addition to its official implementation being done by idiots. I'm not going to list all it's problems here but I'll link some random article I googled that shows a few of its problems. medium.com/@natemurthy/all-the-things-i-hate-about-python-5c5ff5fda95e

Other problems include how slow it is, how making a fast jit compiler for python is next to impossible, proper multithreading is impossible, significant whitespace, every for loop iteration does a try-catch (wtf), and it's slow as shit.

>hurr durr I cant deal with having to know what type my function returns butlet me nest 100 functions inside each other

based jynxposter

So what can you really do with Python?

jus werks

Because you're just writing pseudo-code

3.7 is better for jitting

The day a fast Python gets created with the same libraries is the day every other language dies, shame it won't ever come

Because it gets the job done quickly.

You can put together some garbage code in a matter of minutes and have anything you wanted working.

C "developers" BTFO

>no multiprocessing
>import multiprocessing

>import solution
>solution.justwork()

anything where you have to guess if data were copied or aliased is not comfy

Read the whole thing, hard to take the author seriously when they don't even know the difference between strong/weak typing and static/dynamic typing. Python is string and dynamic, C is strong and static, JS and PHP are weak and dynamic.

Out of all the grievances listed, the only valid one is speed. The rest are non-issues or non-issues once you're not a beginner.

t. Working with Python for 10 years, currently on a 100k line codebase

Because it literally just unironically, LITERALLY just works.

Attached: 1550055360563.jpg (542x543, 77K)

> t. hasnt written a complex multithreadded application

b- b- b- but gentoo uses python, it must be good!

what's the point in strong dynamic types?
it's the worst of both worlds

# ./solution.py
Traceback (most recent call last):
File "solution.py", line 37, in ?
from solution.implementation import implementation
ImportError: No module named solution.implementation
# pip install implementation
Collecting implementation
Could not find a version that satisfies the requirement implementation (from versions: )
No matching distribution found for implementation
# pip install solution-implementation
Collecting solution-implementation
Could not find a version that satisfies the requirement solution-implementation (from versions: )
No matching distribution found for solution-implementation
# pip search implementation
Img2Vec (1.0) - {'An implementation for Img2Vec.'}
kim2014convolutional (0.2.0) - Implementation of kim2014convolutional
yubistack (0.5.5) - YubiStack implementation
Preparable (0.1.2) - a preparable implementation
gql-alchemy (0.0.1) - GraphQL implementation
gecosistema-gfi (0.0.37) - A gfi implementation
multidict (4.5.2) - multidict implementation
OpenPGP (0.2.3) - OpenPGP implementation
artagger (0.1.0.3) - RDRPOSTagger Implementation.
pyconnie (1.0) - An implementation of the ConNIe
starmie (1.0) - A* algorithm implementation
publicsuffixlist (0.6.5) - publicsuffixlist implement
proxy_tools (0.1.0) - Proxy Implementation
deepqn (0.0.2) - A DQN implementation
astar (0.9) - A-* algorithm implementation
pyshaun (0.1.6) - SHAUN implementation
pecok (1.0.2) - Implementation of Pecok
PyVX (0.2.7) - OpenVX implementation
....
....
....

Shoo shoo, shill, shoo!

it just depends. strong dynamic typing ends up with the shit you see in ruby where you never know if you're going to just get an empty string passed through twenty functions instead of an error because of an assumption made somewhere. On the other hand, sometimes for a web application maybe you'd rather not break the whole page for an edge case error if you can retain functionality. But then you have to find ways to unit test and catch errors to fix even though things *look* like they work... I don't know... I think the real problem is duck-typing. Strong dynamic typing is okay but it should be made obvious what is happening. It's a pain in the ass to manually cast everything but maybe there could be a middle ground where the language only allows different types when its absolutely certain that behavior wont change. But then you run into the problem of overloaded method names and how String + String is different than Integer + Integer but they both use the + operator....

>C
>strongly typed

I still don't see any benefits from strong dynamic over weak dynamic
if you have a funciton that changes behaviour in a bad way if it gets an unexpected type that's just bad programming

im not disagreeing. Now that im thinking about this, I think what I'm saying is: strong dynamic typing shouldn't mean you can pass "4" to sqrt() and get 2. But it should mean you can pass BigInt 4 to sqrt() and get the same return as Int 4.

now that I say this, I just tested in both python and ruby and they both do what I'm saying, so maybe I don't know what the fuck I'm talking about

Feel free to elaborate on that

Because you're brainlet ass needs a dumbed down language for cucks instead of haskell

Okay, newbie here. Why do people always say it's bad practice to use regex from web scraping?

Attached: 20181023_234054.jpg (306x227, 49K)

regexp are a way, although html is already a structured XML so it's safer to parse that well known language and navigate through nodes instead of doing huge regexps that are hard to maintain and wayyy more prone to fail on edge cases (e.g. `` different from `< hey>` or ``)

I'm not him, but C is weakly but statically typed. That's why you can do shit like pointer or char arithmetic. Here's an example
#include

int main(){
char c = 'c';
int x = 1;
printf("%c\n",c+x);
}

This prints out d because d is represented in ascii by the number after c. In a language with strong typing this would raise an error, or, if the language was duck-typing, it would likely do something like concatenate 'c' and 1

what exactly is garbage about C syntax?
>inb4 someone declares a function pointer

>you're

because it forces shitty programmers to write semi-readable code by enforcing indentation

>1000 loc
> wtf is happening, this is giving me an error but there is nothing!!!!!!
> 24 hours later : oh this should be indented but I couldn't see because no end statement and no {} .

if it takes you 24 hours to debug a scope error in 1000 loc you deserve to be fired

I forgot an s

Thousands

I wish Pascal was relevant. It's the most comfy language to use.
I miss when Delphi wasnt shit.

yikes
t. delphi dev

Julia looks like it's going in that direction but it will take a few years to get to the libraries that python has.

Back when Java was still new and its poor performance was a big deal, Delphi was a godsend.
But the cool kids don't use Delphi now, and if I want to program something for a hobby I need to use other languages because of the libraries.

Its pretty expensive since you starting a new python interpreter each time.

I'm more concerned with function returning different type of data and that most of the errors will be spotted only at runtine. It's not a problem for one-shot scripts and small program but it get tedious to debug pretty quickly

started to learn it recently and even though JavaScript is unanimously thought to be retarded, Python made me miss the aesthetic of it

Attached: IMG_20190404_081925.jpg (414x414, 26K)

Because you never had to use the garbage that is the multiprocessing library, and the absolute piece of shit that is pickle (and sadly multiprocessing relies on it).

Declare a function taking an int and returning a function pointer to a function taking a double and returning a double.

>REEEEEEEE MUH PERFORMANCE

One of the best package mangers for Gahnoo/Linux.

Attached: 1535283952096.jpg (2101x2804, 3.17M)

C is weakly typed as fuck.
You can literally turn almost anything into almost anything with nothing but a cast, and the compiler won't bat an eye.
Statically typed, yes, strong, no.

Isn't this strong because of %c forcing a character? (new to C)

not him but
double (*func(int x))(double) {}


but I'm using typedefs as they're more readable.

Congratulations, you just pointed out exactly what is garbage about C syntax.

Is isn't, it's syntax is garbage

I'm a math student working in finance, interviewing for a high-frequency trading job.
Job post: "willingness to learn python desirable"
What can I say to improve my chances of getting this job?

What's a programming language with good syntax in your opinion besides the Lisps?

what IDE makes Python looks the best by default?

Attached: fbbb5d22.jpg (921x1024, 124K)

>(((Lisp)))

calling whole language syntax "garbage" over one not-so-widely used feature that has strange syntax is overraction.

C syntax is far more readable than any functional languages' like Lisp.

>C syntax is far more readable than any functional languages' like Lisp.

Attached: 1536034319435.jpg (782x1021, 98K)

Emacs.

you can post anime girls all day, but the truth won't change. typical Lisp bug is forgetting a ( or ) somewhere in 38493 of them.

there is a reason why all modern and popular languages like Java, C#, C++, even JavaScript copied C syntax.

Attached: 1553949352269.jpg (248x274, 37K)

THIS
BUT
UNIRONICALLY

>calling whole language syntax "garbage" over one not-so-widely used feature that has strange syntax is overraction.
Even something as basic as declaring an array of pointers (a widely used feature) is unnecessarily unintuitive. Hell, K&R itself dedicates an entire section to writing a recursive-descent parser to PARSE C DECLARATIONS.
>there is a reason why all modern and popular languages like Java, C#, C++, even JavaScript copied C syntax.
To gain more popularity. But to be specific:
>C++
It's goal is literally to be an extended C, so maintaining compatibility with it is crucial. This is the only language that "borrowed" its syntax for a valid technical reason.
>Java
Born from a response to the insane complexity of C++, the choice of syntax was obvious.
>C#
A clone of Java, the choice of syntax is obvious.
>JavaScript
This is an interesting case. It should have originally be called LiveScript, but marketing ploys got as far as naming it after another popular language to gain yet more popularity.

>typical Lisp bug is forgetting a ( or ) somewhere in 38493 of them.
Balancing parenthesis is such a basic problem that it's not even worth discussing, not to mention that every compiler can easily detect it.
Definitely beats the hell out of having segfaults as a typical bug.

If expense is your problem, there is a threading module.

That threading module can only use a single processor. Therefore it is not true multithreading. Since it uses a maximum of one (1) processor.

Is the opposite of comfy, also this

White space sensitive programing languages are a fucking abomination. I would take semicolons any day over white space bullshit. Especially when you're working with other people and they fuck up your project because of tab characters vs space characters.

Well, I learned something new today. Jesus fucking christ, python.

>No PEP8
>No typehints
No merge.

Give me the summary of those.

The best programming languages have a clear and concise vision of what they want to accomplish and allow code to be written narrowly within this vision. Examples include Haskell and its pure functional nature and Go for its simple C style imperative nature. Python, like C++, is a language which has no vision and attempts to do everything, and it does everything poorly. It's shit for OOP, it's shit for functional programming, it's shit for speed, concurrency, typing, exceptions. Devs try to use decorators to reproduce the fugly bullshit that is Java annotations. You have all this weird __self__ __init__ bullshit that has no good reason for existing. It is absolutely horrible for writing web applications, mostly due to the concurrency failures. Everything about python is just so disgusting and hacked together. The ONLY thing it does right is basic use for stats/ML and even that is fucked up with the disgusting bullshit that is python notebooks. It also doesn't count because when you call C++ from python you aren't really using python at all.

Based programmer not falling for the python meme.
What are your preferred programming languages?

>Haskell
>good

>python.org/dev/peps/pep-0008/
>docs.python.org/3/library/typing.html
tl;dr Use a common coding style (a linter is your friend) and annotate the types (mypy).

It's a different type of 'good'. Yes writing Haskell makes you an autistic failed academic, but as you write it you run up more against the conceptual difficulty of the language. With 'shit' languages like JS, PHP, and Python your reaction is less 'why is this so unnecessarily complicated, I don't need goddamn monads', and more 'how in the fuck could they fuck up the most basic part of the language, why the fuck can I add a string to a float and get a string'

Wrong, you're just way too biased by being in your codemonkey niche. Fact of the matter is that Python is by far the most popular scripting language within the scientific/engineering world at large (which also makes it the best, save maybe for Julia), and it goes WELL beyond just "stats/ML". No engineer in academia is ever going to start developping an open-source tool/package using shit like fucking Haskell.

Its because even if the html is valid which sometimes its not but still displays fine things like:


botnet();
...


Python has a html parser (so does ever other language) but its not going to easy to use for someone who doesn't understand.
Check out beautifulsoup its a python extension that will make it easier and quicker.

>although html is already a structured XML
That's so wrong, stop trolling.

I don't know what comfy Jow Forums is, but I do know how to properly use punctuation. How punctuation is relevant will be left as an exercise for OP.

Attached: lets_eat_grandma_wall_art.jpg (400x400, 28K)

Vim

because it's convenient to not have to do the type conversion and you're using a high level, dynamic typed language anyway. the world of functional programming is not exempt from dynamic typed stupidity (see erlang)

>whitespace

Because f2py exists, so I can just use my comfy (and fast!) FORTRAN subroutines in python

Yeah, it's sure comfy to have significant whitespace! Garbage syntax. Ruby got it right but that language is slow as shit, rooting for Crystal to get somewhere now.

oh, so it's the bad type of good?
what a fucking retarded post

you can read it as int8_t and int32_t. %c just shows printf how to represent the number.

My favorite language for the last few years has been Julia. I use it for almost everything except plotting and stats stuff (I use R for that) and ML stuff (Python sigh). Second is probably Elixir, which I've been using to build my "blog" website. It's been super fun coding in Elixir since it has m:n multithreading (as in it can run n threads while using m processors), macros, and lots of other things. It basically transpiles to the Erlang VM's code, so it has all the things Erlang has plus a nicer syntax and macros. Julia is also supposed to get m:n multithreading in the near future. I used to like OCaml a lot but I haven't gotten a chance to use it (or Reason) anytime recently. Haskell, I used to like too but its lazy-ness annoys me way too much.

That's like saying JS is a great language because webdevs can't not use it. That has very little to do with whether a language is good or not.

Install beautifulsoup, never look back

Read through the official python tutorial:
docs.python.org/3/tutorial/index.html

and say something like "it looked interesting and I'm excited about learning more". Also if you don't know much about HFT, "Flash Boys" by Michael Lewis is a pretty entertaining read.

It is the easiest language and if you dont build anything that has to scale it is literally braindead. hence retards think importing a module and using basic functions (or rather following the documentation) makes them a real programmer.

Well I mean not like performance doesn't matter, but there are degrees in hell, a minor dip in performance doesn't justify using som obscure hipster programming language.

>retards think (...) makes them a real programmer.
I'm a sysadmin and python gets shit done. I'm not a programmer and i don't care.