SJWython

So Python literally destroyed itself so that it could be "international".

learnpythonthehardway.org/book/nopython3.html

>Python 3 is not turing complete
Aaaaand stopped reading

>I'd have to read an article by Zed Shaw to argue with OP
ehh, I'll pass

It isn't.

Who the fuck cares about this shit language.

>you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by anyone.

lmao what the fuck. backwards compatibility isn't turing completeness

let it die, it's filled with pajeets anyways.

>Python 3 uses the JVM

Literally cucked by Ellison.

>muh no brackets
>muh bioinformatics
>muh text-scripting

I hated having to learn this language in school.

not all VMs are the JVM, you fucking idiot
this is a horrible article and I can't believe you've posted it here unironically.

These. I lost a lot of respect (what little I had to begin with) for Zed Shaw because of this.

if it is turing complete then it can simulate any other turing machine.

it is saying that the python 3 TM cannot simulate the python 2 TM therefore 3 is not TM

thats literally the definition of turing complete

I dropped python 3, it's shit, and I noticed that modules that I used now were split into more modules wtf fuck off python 3

>Currently you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by anyone.

What the fuck is he even talking about?

I cannot run C code in python2. Therefore, python2... is not turing complete either?

Go to bed, Zed.

Is this guy our lord and savior?

Congratulations, you're retarded.

There are plenty of reasons Python sucks duck but glomming on to buzzwords like this doesn't help your case, you fucking moron.

its not my argument, its the authors.

care to explain whats wrong with his argument?

What's wrong is that he's fucking retarded.

Apparently we can't sage in all fields any more.

Python 2 is depreciated, it's for legacy systems. It's like Cobol, even Fortran has a better future than python 2. Python 3 is where it's at.

>have never used python before or even knew what it was, no programming knowledge at all
>trying to upload some audiobooks to an RSS feed to play on my overcast podcast app
>guy says you need to use python to i install it
>type in what he says to " pip install -r requirements.txt" to get an external library (the txt is in the app's folder)
>invalid syntax
>absolutely no idea what the hell to do

HOW THE FUCK DO YOU USE THIS THING ALL I WANT TO DO IS UPLOAD AN MP3 FILE TO AN RSS FEED

>It's a "/b-pol/ crossboarder posts about things he doesn't know anything about" episode
Zed Shaw is pajeet tier.

You likely need to install Python first before you have pip. It's still unnecessary pain in the ass, you should not need to install any extra dependencies. The programmer should have included it in the installation.

Serious question here:

Why the fuck is anyone unironically writing anything AT ALL in Python? What's the gain? Is C too hard? Do you guys not give the slightest fuck about speed?

Its about productivity and use of use. And I guess its easy to script stuff with it

Basically this.. It accomplishes small menial tasks quickly and easily and has a bajillion libraries to get shit done.

If something can simulate one turing machine, it can simulate any turning machine.

The author is an idiot, and you're an idiot if you've been strung along by his shit for even a 1/2 of a second.

Create a webserver using C.

create a webserver using python:
python -m SimpleHTTPServer 8000

django devs
biologists
anyone that isn't focused on vidja gaymes?

yeah stuff like parsing html becomes easy to do with the right lib

SimpleHTTPServer may be written in Python but probably calls tons of C functions

So? There's probably a C library out there somewhere that does the same thing.

Also this.

In some cases it works just as well and even better than C. Especially the scientific libraries, which is why python is one of the most common languages in the mainframe and super computer world where speed and easy to change code is super important. There are also all sorts of wrapping to C and Fortran and that sort of thing.
No language has better scientific libraries and it is great for stuff like machine learning and data science. It also has tons of frameworks for web development and IoT. Python also parses, manipulate and analyse text very well due to the heavy development from the scientific field there are tons of libraries for these things. Python is easy to read, easy to code in and easy to wrap other languages for specific purposes.

As dumb as Zed is, this thread shows that people here are tying hard to compete.

Why the fuck is anyone unironically writing anything AT ALL in C? What's the gain? Is machine code too hard? Do you guys not give the slightest fuck about speed?

Zed is drumming up sales so a new guitar can be bought this holiday season.

when in fact the python community are a bunch of polite a**holes.

I borrowed a python3 book once and never returned it

Wrong. SimpleHTTPServer is fully written in python. If you think that python itself written in c = calling c functions than you have a better time killing yourselves.

Well there is probably a lot of Python functions mapped to C ones. I don't know tho, I'm just assuming

>ignores my valid point that a C library exists and that his point is invalid

So? You write a lot of C code that calls tons of subroutines written on assembly.

The point of abstractions is to save time. If your time is worth nothing, keep writing C.

The one hour of my time saved writing Python is literally worth more than the cost of throwing enough CPU and RAM at it to make it run as fast as a C version, and usually using Python saves far more than an hour.

>Sort new to programming
What does he mean by running languages with languages? Does he mean like Jython is Python that runs on JVM? Isn't he right that Python 2 should be able to be ran on the Python 3 interpreter?

>I don't want them to believe they suck at programming

Believe it or not it is possible to suck at programming I have never learned any languages despite trying really hard for 5 or 6 hours once so that means I SUCK ASS at programming and should NEVER try again

What a shitstorm

people just can't move on from python 2, still

I've used both python 2 and 3 (and gotten paid for using both of them) and have never really noticed any significant difference between them. Why does this article even make a big deal about "learning python2 instead of learning python3". Any competent programmer should have no trouble picking them up within hours. If you learn python2 you are probably 99% of the way there to learning python3 anyways.

See? SEE? This guy agrees I shouldn't even try to be a programmer I have my excuse

I can't believe that in the current year there are people who still hate python 3.

May I hate Python in overall?

Being able to figure out and understand the 10% difference between Python 2 and 3 is what separates the wheat from the chaff.

Most of the people shitting on 2 or 3 are the failures who don't know what's wrong with their code except that it doesn't run on the other version.

No. You have to use it. We need to stop systemic discrimination of languages.

Yes you may.

I never said that abstractions were bad, every programming language is built on that.

print v print()

That's a trivial difference. 2to3 can handle it automatically.

pseudo motherfucking bitches. fucking use Ruby already. ruby==freedom. python==getting buttfucked for life. fucking shitheads.

>muh yuuuge python community
>muh scripting hax0r blackhatpython
>muh some motherfucker's "why python" critic
>muh lemme join the zed shaw-hating cuck train too

fuck off coder-wannabe kids. all u will ever learn in life is hello world program in BASIC. Install Ruby.

its a computer science topic relating to turing machines. You should be able to write the Python language and everything it contains, in python.

Then python is running python. Or you could code Java in python and run Java in Python

>Ruby

Serious answer here:

While some numerical calculations are slow even if you are using third party modules that incorporate underlying C/fortran routines, there is still python overhead that fucks the time.

You can solve this by using cython, which CAN speed up pure python codes immensely if you properly re-code some of it, but it doesn't help when you use special functions that exist in the third party modules.

Of course at the university there are always arguments """ hurr durr you are using python, it's shit, you should better use matlab/mathematica/c or whatever""", but we quickly go to "why not use pascal or maybe fortran directly, I mean what's stopping us?"

Reason why I use it?
Simplicity
While i can wait on the functions to calculate what I am calculating up to 10× more than if I had written it in C, it's much easier to read/write files/databases, to create rich presentation graphs all in one python file.

Also when you have projects with deadlines, a friend of mine switched to python just because he had it with debugging C code that uses GSL functions.

kek which threads you bullshit ass well?

> but we quickly go to "why not use pascal or maybe fortran directly, I mean what's stopping us?"
oh wow you have power to argue
We literally use Fortran.

sure we do, but we don't use it for everything.

You could write a Python 3 VM in Python 2 and the other way around.
>TM

Sometimes you need code that only runs once and it takes less time to write it and run it than to write the whole thing in pure C and optimizing with floating point hacks and whatnot, for example, if you need to preprocess some data you want to analyze, it's usually faster to write a shitty Python script and not optimize it at all than spend a whole day or two writing a program in C that manages the memory properly.

>I've never have to crunch numbers because I am a codemonkey: the post

Basically this. You guys are fucking retarded.

You wish you had the programming knowledge of those "pajeets".
You have no programming knowledge; wiring Hello Worlds in 20 languages at best.
Your only qualification to comment on this is from seeing other people on g hate on it and now you want to fit in and feel smart for making "witty comments".

wtf i hate modularity in my modules now?!

Apparently you don't know what sage does.

下げる、この平民どもめ

>His faggot language doesn't have while / else

LMAO

>Currently you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by anyone.

Aaah, dat logic...

I cannot run C# programms with a C compiler, therefore C is not turing complete.

That happens when you blindly use buzzwords.

...

But can you run Python2 in the C Virtual Machine?

>python 3 isn't turing complete because it can't run python2 code
I guess C isn't turing complete either since gcc doesn't compile basic

Of fucking course. First language I actually enjoyed and looked forward to learning.
Might just die

butthurt indian detected

hand-written ASM is probably slower than the code produced by the C compiler anyway

There exist a C library that can make a HTTPServer in one line of code like you can in Python?

Fuck your feelings go die faggot

this is goooood

No, that would be stupid

Python 2 is dead already. Python 3 might die. I think you've made the right choice.

Turing machine.
class Tape(object):

blank = " "

def __init__(self,
tape_string = ""):
self.__tape = dict((enumerate(tape_string)))

def __str__(self):
s = ""
min_used_index = min(self.__tape.keys())
max_used_index = max(self.__tape.keys())
for i in range(min_used_index, max_used_index):
s += self.__tape[i]
return s

def __getitem__(self,index):
if index in self.__tape:
return self.__tape[index]
else:
return Tape.blank

def __setitem__(self, pos, char):
self.__tape[pos] = char


class TuringMachine(object):

def __init__(self,
tape = "",
blank = " ",
initial_state = "",
final_states = None,
transition_function = None):
self.__tape = Tape(tape)
self.__head_pos = 0
self.__blank = blank
self.__cur_state = initial_state
if transition_function == None:
self.__transition_function = {}
else:
self.__transition_function = transition_function
if final_states == None:
self.__final_states = set()
else:
self.__final_states = set(final_states)

def get_tape(self):
return str(self.__tape)

def step(self):
char_under_head = self.__tape[self.__head_pos]
x = (self.__cur_state, char_under_head)
if x in self.__transition_function:
y = self.__transition_function[x]
self.__tape[self.__head_pos] = y[1]
if y[2] == "R":
self.__head_pos += 1
elif y[2] == "L":
self.__head_pos -= 1
self.__cur_state = y[0]

def final(self):
if self.__cur_state in self.__final_states:
return True
else:
return False

but that doesnt run python 2 bytecode???

You could implement a Python 2 on a Turing Machine. It's just a lot of useless work.

How to spot the autist

so, in which language should I do my data science now?

>Currently you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by anyone.
>Python 3 is not Turing Complete

OP go die

>It's autistic to disregard the opinion of someone who presents something that is factually wrong, or willfully ignorant so that he may further his own flawed argument

/thread

why do people keep recommending his shitty books

How do I read a Python source file, instead of executing it on double-click?

by killing yourself and hoping you will be something smarter than a fly in your next life

$ nano /path/to/yourfile.py

>nano

>Learn Python the Hard Way by letting this complete fucking retard teach you while spouting technical terms he has zero understanding of
What the fuck is this bullshit. This guy doesn't even understand basic concepts. Is he a web dev?

>You can run Python 2 and 3 together
>Separation of Unicode and byte strings has nothing to do with "international", you can do Unicode perfectly fine with UTF-8 strings.
>hurr durr Turing Machine
>Why doesn't Python debug my type errors for me? It should tell me which variable in my code I started being retarded
>Python 3 has statically typed strings. I don't even know what static typing is, I'm so retarded.
>Oh god please kill me my IQ is negative

I'm not even mad.

>Is he a web dev?
Of course.
He was amazed when he learned about even the most basic concepts like FSMs

how to spot a fucking retard

How to sport someone who is severely autistic.

If it's possible then why don't the python devs allow people to use 2.7 syntax with the python 3.6 backend!?!?!?!?

because it's a lot of pointless work?

What exactly does that webserver do? You're not handling any requests so it's a meaningless 'server'.