[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

SJWython

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 126
Thread images: 9

File: python-logo.png (23KB, 250x250px) Image search: [Google]
python-logo.png
23KB, 250x250px
So Python literally destroyed itself so that it could be "international".

https://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
>>
>>57657981
It isn't.
>>
Who the fuck cares about this shit language.
>>
>>57657981
>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
>>
>>57657921
let it die, it's filled with pajeets anyways.
>>
>>57657921
>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.
>>
>>57658814
not all VMs are the JVM, you fucking idiot
>>57657921
this is a horrible article and I can't believe you've posted it here unironically.
>>
>>57658656
>>57657981
These. I lost a lot of respect (what little I had to begin with) for Zed Shaw because of this.
>>
>>57658656
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
>>
>>57657921
>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?
>>
>>57658482
Go to bed, Zed.
>>
>>57658512
Is this guy our lord and savior?
>>
>>57658941

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.
>>
>>57659035
its not my argument, its the authors.

care to explain whats wrong with his argument?
>>
>>57659124
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
>>
>>57657921
>It's a "/b-pol/ crossboarder posts about things he doesn't know anything about" episode
Zed Shaw is pajeet tier.
>>
>>57659353
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?
>>
>>57659456
Its about productivity and use of use. And I guess its easy to script stuff with it
>>
>>57659469
Basically this.. It accomplishes small menial tasks quickly and easily and has a bajillion libraries to get shit done.
>>
>>57659124

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.
>>
>>57659456
Create a webserver using C.

create a webserver using python:
python -m SimpleHTTPServer 8000
>>
>>57658512
django devs
biologists
anyone that isn't focused on vidja gaymes?
>>
>>57659507
yeah stuff like parsing html becomes easy to do with the right lib
>>
>>57659511
SimpleHTTPServer may be written in Python but probably calls tons of C functions
>>
>>57659511
So? There's probably a C library out there somewhere that does the same thing.

>>57659569
Also this.
>>
>>57659456
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.
>>
>>57659456
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?
>>
File: YRufGRx.gif (1MB, 636x357px) Image search: [Google]
YRufGRx.gif
1MB, 636x357px
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
>>
File: 1479057345656.jpg (88KB, 1280x720px) Image search: [Google]
1479057345656.jpg
88KB, 1280x720px
>>57659569
>>57659583
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.
>>
>>57659633
Well there is probably a lot of Python functions mapped to C ones. I don't know tho, I'm just assuming
>>
>>57659633
>ignores my valid point that a C library exists and that his point is invalid
>>
>>57659569
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
>>
>>57657921

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.
>>
>>57659736
See? SEE? This guy agrees I shouldn't even try to be a programmer I have my excuse
>>57659698
>>
I can't believe that in the current year there are people who still hate python 3.
>>
>>57659758
May I hate Python in overall?
>>
>>57659736
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.
>>
>>57659765
No. You have to use it. We need to stop systemic discrimination of languages.
>>
>>57659765
Yes you may.
>>
>>57659681
I never said that abstractions were bad, every programming language is built on that.
>>
>>57659766

print v print()
>>
>>57659806
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.
>>
>>57659685
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
>>
File: tumblr_numnqroihY1t0jtguo6_1280.jpg (136KB, 1280x704px) Image search: [Google]
tumblr_numnqroihY1t0jtguo6_1280.jpg
136KB, 1280x704px
>>57659841
>Ruby
>>
>>57659456
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.
>>
>>57659841
kek which threads you bullshit ass well?
>>
>>57659892
> 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.
>>
>>57659902
sure we do, but we don't use it for everything.
>>
>>57659124
>>57658941
You could write a Python 3 VM in Python 2 and the other way around.
>TM
>>
>>57659456
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.
>>
>>57659456
>I've never have to crunch numbers because I am a codemonkey: the post
>>
>>57659629
Basically this. You guys are fucking retarded.
>>
>>57658707

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".
>>
>>57658984

wtf i hate modularity in my modules now?!
>>
>>57659205

Apparently you don't know what sage does.
>>
>>57660295
下げる、この平民どもめ
>>
File: 1443964640515.png (1MB, 912x905px) Image search: [Google]
1443964640515.png
1MB, 912x905px
>His faggot language doesn't have while / else

LMAO
>>
>>57657921

>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.
>>
>>57658994
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
>>
>>57657921
Of fucking course. First language I actually enjoyed and looked forward to learning.
Might just die
>>
>>57660278
butthurt indian detected
>>
>>57659629
hand-written ASM is probably slower than the code produced by the C compiler anyway
>>
>>57659647
There exist a C library that can make a HTTPServer in one line of code like you can in Python?
>>
>>57660522
Fuck your feelings go die faggot
>>
File: SCR_1479978830.png (6KB, 363x46px) Image search: [Google]
SCR_1479978830.png
6KB, 363x46px
this is goooood
>>
>>57659765
No, that would be stupid
>>
>>57660522
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
>>
>>57660687

but that doesnt run python 2 bytecode???
>>
>>57660734
You could implement a Python 2 on a Turing Machine. It's just a lot of useless work.
>>
>>57657981
>>57658656
>>57658930
How to spot the autist
>>
so, in which language should I do my data science now?
>>
>>57657921
>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
>>
>>57660762

>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
>>
>>57658512
/thread
>>
why do people keep recommending his shitty books
>>
How do I read a Python source file, instead of executing it on double-click?
>>
>>57660933
by killing yourself and hoping you will be something smarter than a fly in your next life
>>
>>57660933
$ nano /path/to/yourfile.py
>>
File: 1332655790142.jpg (34KB, 388x387px)
1332655790142.jpg
34KB, 388x387px
>>57661016
>nano
>>
>>57657921
>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.
>>
>>57661119
>Is he a web dev?
Of course.
He was amazed when he learned about even the most basic concepts like FSMs
>>
>>57660762
how to spot a fucking retard
>>
>>57660813
>>57661290
How to sport someone who is severely autistic.
>>
>>57660687
If it's possible then why don't the python devs allow people to use 2.7 syntax with the python 3.6 backend!?!?!?!?
>>
>>57661372
because it's a lot of pointless work?
>>
>>57660548
What exactly does that webserver do? You're not handling any requests so it's a meaningless 'server'.
>>
>>57661442
It serves the files in the current directory
>>
Is Python 3 the systemd of Python?
>>
>SJWython
The SJWs are at Rails
>>
>>57663304
You just haven't been dongled, anon.
>>
File: ackchyually.png (19KB, 200x200px) Image search: [Google]
ackchyually.png
19KB, 200x200px
>>57661690
Python3 is awesome. It's better in every single way - the only people who complain and stay on 2.x are the people that are too lazy to rewrite their jumped modules into something modern and efficient.

Python 2.x = MS-DOS
Python 3 = Windows 10

Get with the time, kids.
>>
>>57661372
3.6 hasn't even been released yet. Maybe you should add more '?' and '!' to your posts
>>
Python is a meme language.

C/LuaJIT is the right choice
>>
>>57661372
The syntax is virtually identical. Is it really that hard to put parentheses around print statements?
>>
>>57663643
>Python 2.x = MS-DOS
>Python 3 = Windows 10

one is a reliably realtime system
one is a botnet
>>
>>57660242

> Not using Julia
>>
>>57663882
>anyone using Julia
maybe in 5-10 years anon
>>
>>57663643
>Python 2.x = MS-DOS
>Python 3 = Windows 10
>Microsoft
wtf? I hate python now.

Maybe somebody should point out to Zed "I don't know what a turing machine is" shaw that determining the a language version by syntax and executing accordingly is a grand way to fuark things up royally and if he wants a good python2 to python3 compiler maybe he should write one himself.
>>
>>57658512
its used frequently in research and in data mining applications. Im sorry indents are hard for you.
>>
>>57660059
Why not try something like F#, scala or ocaml?
>>
>>57660546
>implying that the compiler produced code are as perfect as if were written by some kind of deity

Thou shall not impose your zealotry on your fellow men
>>
>>57658941
you're wrong and retarded
>>
So ok, I got it, the guy is a retard.
Can you recommend me good resources for learning python, please?
>>
>>57664767
SICP
>>
>>57659806
>>57659818

input v raw_input

I can have my wheaties and eat them too
>>
>>57664701
he's right. it's not that it's perfect, it's just that it's more efficient than if it was written by a human
>>
>>57657921
sage
kys
>>
>>57663808
>DOS
>reliable
Wel, why not, it barely has anything to fail.
>>
>>57659456
>I don't value my time!
>>
>>57659456
You can waste 20 hour to make a program run in 0.1s or 5 minutes to make a script that will run in 5s. The choice is yours.
>>
Zed Shaw is a fucking hack. Why do people still give him attention?
>>
>>57664767
https://automatetheboringstuff.com/
Thread posts: 126
Thread images: 9


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.