Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Python.....

Name: Anonymous 2010-07-30 16:38

So today I learnt Python (well the syntax and semantics) and I loved the simplicity it give the user...etc

But anyway, since it's an interpreted language and all how does it compare in terms of system resources and such with other languages such as C/C++ and JAVA.

I see an awful lot of python implemented utilities but I'm not sure if it's because of it's simplicity or something else.

Thanks!

Name: Anonymous 2010-07-30 16:45

So today I learnt Python (well the syntax and semantics)
This is not how you learn a language.

Name: Anonymous 2010-07-30 16:59

>>2

I don't need any advise on that. Having moderate experience with Pascal, JAVA, C and C++ I already know OOp quite well and quite a lot (still not enough tough) of Functional programming.

However I appreciate your concern/advise and hope I didn't come off as a rude person.

Please can anyone address my simple questions namely:

Is python resource intensive compared to C/C++ and JAVA?

Is it used so often just because of it's simplicities?

If not, why is it used so often?

Name: Anonymous 2010-07-30 17:02

>>3
Because you break two lines at the end of all your sentences.

Name: Anonymous 2010-07-30 17:03

>>4
They're paragraphs. Single-sentence paragraphs. Jesus Christ.

Name: Anonymous 2010-07-30 17:09

>>5
I'm no Christian, but I can tell you:



Python is Slow as it is The Forced Indentation of Structured English



It is used so often because pretty much anyone can write code in it.

Name: Anonymous 2010-07-30 17:23

It is used so often because pretty much anyone can write code in it.
Just like PHP and BASIC.

Name: Anonymous 2010-07-30 17:26

>>4

It's easier on the eyes and facilitates reading. And besides they are different paragraphs so....

I thought I was doing you a favor.

>>6
slow

Say a snippet of code is implemented very similarly on Python and JAVA, and this code is to run in the background of an OS. Will JAVA be faster despite the JVM? 

anyone can write code in it.

Well I can understand. Can anyone else confirm this please?

Name: Anonymous 2010-07-30 17:32

>>8
You're doing nobody any favours. It's jarring.
Background tasks don't run any faster, regardless of language. Java is pretty fast regardless, as it's JIT compiled. Why do you care about speed anyway?
Also, I can confirm that.

Name: Anonymous 2010-07-30 17:36

>>9

>speed anyway?

I'm just trying to evaluate Python.

Name: Anonymous 2010-07-30 17:37

EVALUATE MY ANUS

Name: Anonymous 2010-07-30 17:38

>>10
Then evaluate it. Write a program in Python and its equivalent in C, compare. Why the fuck are you bothering us with a worthless thread?

Name: Anonymous 2010-07-30 17:40

>>10
You shouldn't bother caring about execution speeds until you've learnt the language proper and are seriously considering writing realtime/time-critical/whatever programs in it (Hint: don't).
But if you really care, you'd probably do well completely disregarding the data at http://shootout.alioth.debian.org/.

Name: Anonymous 2010-07-30 17:42

eval(python)

Name: Anonymous 2010-07-30 17:57

>>13

Thanks! Appreciate the useful site!

Name: Anonymous 2010-07-30 17:58

>>15
Well, appreciate this:
http://stackoverflow.com/

Name: Anonymous 2010-07-30 17:59

if you put two lines after every statement in python

youre program will be twice as slow

because the interpreter has to interpret

twice as many statements

Name: Anonymous 2010-07-31 0:25

>>18
that's why languages with semicolons are faster. because the compiler/interpretter can remove the newlines and execute it all as one line.

Name: Anonymous 2010-07-31 0:30

>>18
But Python can do that too.

def Y(a): _ = lambda b: a(lambda c: b(b)(c)); return _(_)

Name: Anonymous 2010-07-31 16:05

>>19
But it'll break the semicolons in new logical lines, then interpret it. Therefore, slow!

Name: Anonymous 2010-07-31 20:28

I don't understand the complaints of any programming languages speed.

Come on, It's not like it takes 5 hours to compile a python program. I have never seen a compiler take more then a minute.

Name: Anonymous 2010-07-31 20:29

>>21

than

Name: Anonymous 2010-07-31 21:15

>>21
compile a python program
Well, you've certainly convinced me you know what you're talking about.

Name: Anonymous 2010-07-31 21:19

>>23
Heh, you've convinced me that you don't.

Name: Anonymous 2010-07-31 21:22

>>24
Too bad reality gets in the way of your attempt at counter-condescension.

Name: >>24 2010-07-31 21:34

>>25
I invite you to type man python, press return then type /compile and press return once more. You can deal with reality on your own time.

Note, I am not >>21.

Name: Anonymous 2010-07-31 21:51

>>26
Figures you were going to make a pedantic point about bytecode. Protip: nobody shares your definitions.

Name: Anonymous 2010-07-31 21:52

COMPILE MY ANUS INTO BYTE CODE

Name: Anonymous 2010-07-31 22:09

>>28
That could prove difficult.

Name: Anonymous 2010-07-31 22:10

>>27
Protip
Polekat Kebabs

Name: Anonymous 2010-07-31 22:38

>>27
I think that particular sense is what >>21 was referring to. It's not like the bytecode is just JIT'd then discarded, and it's common to hear people speak of compiling python in this sense.

"The sky isn't blue." "What? It's blue every day." "I'm not up during the day, pedant."

Yeah, sure buddy.

Name: Anonymous 2010-07-31 23:17

Python has no simultaneous multi-threading.

Name: Anonymous 2010-07-31 23:32

>>31
Since >>21 is also talking about compilers taking a minute, chances that he was talking about bytecode compilation are approximately zero.

Name: Anonymous 2010-08-01 0:31

>>32
Only CPython has the GIL restriction and apparently that's going away.

Meanwhile take a look at Stackless Python, it's awesome.

Name: Anonymous 2010-08-01 2:33

>>23
It's a perfectly legitimate practice to create frozen binaries using Python. Although I doubt >>21 is making particularly large programs.

Name: Anonymous 2010-08-01 4:23

>>34
Cpython defines what python is and is not, therefore it is fair to say that the GIL restriction is part of the language.

Name: Anonymous 2010-08-01 6:43

>>36
No.  CPython is just the reference implementation.

Name: Anonymous 2010-08-01 11:04

>>34
The Unladen Swallow project, which was to attempt to remove the GIL yet again, has given up on that prospect for now.

IronPython isn't bad if you don't mind .NET. It's incredibly fast.

Name: Anonymous 2010-08-03 17:06

>>17
*You'r

Name: Anonymous 2010-11-28 16:49

Name: Anonymous 2011-02-03 6:16

Name: Anonymous 2013-01-19 20:58

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Don't change these.
Name: Email:
Entire Thread Thread List