Am I the only one on here that can't stand Python?

Please compose all posts in Emacs.

Moderators: phlip, Moderators General, Prelates

User avatar
kriel
Posts: 922
Joined: Thu Feb 07, 2008 2:58 pm UTC
Location: Somewhere I'm not.
Contact:

Re: Am I the only one on here that can't stand Python?

Postby kriel » Thu Feb 11, 2010 3:09 am UTC

jazzcat wrote:there have been huge apps written with Python
Just because it can be done does not mean it's the best idea.

User avatar
flying sheep
Posts: 63
Joined: Sun Jan 31, 2010 12:35 am UTC

Re: Am I the only one on here that can't stand Python?

Postby flying sheep » Sat Feb 13, 2010 12:45 am UTC

and what brings you to the conclusion it is not? a nicely coded python app is surely not the fastest thing in the world but writing it is.

User avatar
headprogrammingczar
Posts: 3072
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: Am I the only one on here that can't stand Python?

Postby headprogrammingczar » Sat Feb 13, 2010 1:13 am UTC

Funny you should mention speed...
Bittorrent, multiple source control systems, multiple package management systems, a video editor, a map editor for Quake-likes, SAGE, Civ IV, Eve Online, and Battlefield 2 are all at least partially coded in Python.
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

Alexander The 1st
Posts: 44
Joined: Fri Apr 17, 2009 10:47 pm UTC
Contact:

Re: Am I the only one on here that can't stand Python?

Postby Alexander The 1st » Sat Feb 13, 2010 1:24 am UTC

Heh - after looking at that list, I've got to say that Google knows how to pull on the Monty Python theme for naming:

Unladen Swallow. You want to know what it's airborne speed is?
...YOU DIDN'T SEE ANYTHING...

User avatar
flying sheep
Posts: 63
Joined: Sun Jan 31, 2010 12:35 am UTC

Re: Am I the only one on here that can't stand Python?

Postby flying sheep » Sun Feb 14, 2010 2:56 pm UTC

i know and you shouldn’t argue against a python lover like me in favor of python.

let’s face it: there are two drawbacks that come neccessarily with a interpreted language:
  1. interpreting code is slower tan executing binaries
  2. you need an interpreter
that you need modules sometimes is no drawback since binaries need libraries sometimes, too.

sure, python is fast enough for just about anything but real time applications, but that means you should use python to do everything in a real time application except the real time stuff like a 3d engine. i use your arguments, too (civIV et. al), but i mostly clarify that python is used for everything not time-critical (scripting, ai) in these games.

ochuckles
Posts: 8
Joined: Sun Nov 14, 2010 9:24 pm UTC

Re: Am I the only one on here that can't stand Python?

Postby ochuckles » Sun Nov 14, 2010 10:27 pm UTC

Things I believe about Python:
- It is only superficially minimalistic
- In its attempt to please everyone, it forgot to be designed.
- Its syntax is really neat.
- But tabs should not have been allowed.

After using both, I prefer Lua for just about anything I'd do with Python. Lua really just seems more "Pythonic" than Python. Python doesn't even really fit a niche for me...

User avatar
flying sheep
Posts: 63
Joined: Sun Jan 31, 2010 12:35 am UTC

Re: Am I the only one on here that can't stand Python?

Postby flying sheep » Mon Nov 15, 2010 1:59 pm UTC

you are aware of the fact that the tab character (\t) means semantically exactly what indenting in python is for?
it is not my opinion: “\t\ttext” means “‘text’ is two logical levels below the root level”.
the error was to allow arbitrary indentation and tab/space-mixing, which is error-prone.

again: there is nothing to discuss in the tabs/spaces matter: tabs are for logical indentation (one per level), spaces are for visually indenting or separating statements.

User avatar
Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

Re: Am I the only one on here that can't stand Python?

Postby Cosmologicon » Mon Nov 15, 2010 2:20 pm UTC

This is one of many instances of something being theoretically right for the job in semantic-ville, but being sabotaged because real life overrides theory. Logical indentation and visual indentation are too intertwined in the minds of programmers and the designs of IDEs and text editors. Tabs look identical to n (which varies) spaces on the screen, making it hard to tell at a glance which one you're dealing with. You have things like editors that will directly translate between tabs and spaces for you. It may not be your opinion what tabs mean (or rather what they originally meant), but whether it was right to prefer them by the time python came out and programmers had been preferring spaces to indent for decades, that's pretty subjective.

User avatar
flying sheep
Posts: 63
Joined: Sun Jan 31, 2010 12:35 am UTC

Re: Am I the only one on here that can't stand Python?

Postby flying sheep » Mon Nov 15, 2010 11:12 pm UTC

huh?
i have no editor/ide on any of my systems* which doesn’t look more or less like this:
Image

and i didn’t say it was the wrong decision back then. i say it would an idiotic decision to make now and a not quite foresightful decision back then. and there is no reason not to use the method depicted in the screenshot.

*i don’t count the undeletable notepad on my gaming-windows

User avatar
Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

Re: Am I the only one on here that can't stand Python?

Postby Cosmologicon » Mon Nov 15, 2010 11:37 pm UTC

Good for you, but don't play dumb. If you've ever used the internet, you know you've encountered code that doesn't look like that. What about code on pastebin.com, or wrapped in a pre tag, or in your email inbox, or here on this message board? Since communicating with other programmers is one of the main times that spaces vs tabs is going to be important, I think it's reasonable to keep the web in mind.

User avatar
hotaru
Posts: 1040
Joined: Fri Apr 13, 2007 6:54 pm UTC

Re: Am I the only one on here that can't stand Python?

Postby hotaru » Tue Nov 16, 2010 2:58 am UTC

flying sheep wrote:i have no editor/ide on any of my systems* which doesn’t look more or less like this:
Image

how do you make ed look like that?

Code: Select all

factorial product enumFromTo 1
isPrime n 
factorial (1) `mod== 1

User avatar
flying sheep
Posts: 63
Joined: Sun Jan 31, 2010 12:35 am UTC

Re: Am I the only one on here that can't stand Python?

Postby flying sheep » Tue Nov 16, 2010 5:45 pm UTC

i talk about real text editors not THE STANDARD TEXT EDITOR (i typed this while holding shift and without capslock, this has to be enough.)

also, i’d do this by symlinking “ed” to a script which emails me the user name of the user who wanted to call ed and then logs him/her off. also it would print above image with the note “this is how a real text editor looks like (feel free to change the colors and tab width)” and i would go to the desk of said user and would put the printed page there.

User avatar
Mat
Posts: 414
Joined: Fri Apr 21, 2006 8:19 pm UTC
Location: London

Re: Am I the only one on here that can't stand Python?

Postby Mat » Tue Nov 16, 2010 7:44 pm UTC

Cosmologicon wrote:Good for you, but don't play dumb. If you've ever used the internet, you know you've encountered code that doesn't look like that. What about code on pastebin.com, or wrapped in a pre tag, or in your email inbox, or here on this message board? Since communicating with other programmers is one of the main times that spaces vs tabs is going to be important, I think it's reasonable to keep the web in mind.

If you are copying stuff from the internet, reindent it. If you're working on a project with others, set up your text editor to insert whatever form of indentation everyone else is using when you press tab.

User avatar
hotaru
Posts: 1040
Joined: Fri Apr 13, 2007 6:54 pm UTC

Re: Am I the only one on here that can't stand Python?

Postby hotaru » Wed Nov 17, 2010 6:42 am UTC

flying sheep wrote:also, i’d do this by symlinking “ed” to a script which emails me the user name of the user who wanted to call ed and then logs him/her off. also it would print above image with the note “this is how a real text editor looks like (feel free to change the colors and tab width)” and i would go to the desk of said user and would put the printed page there.

the question was how you did it, not how you would do it:
flying sheep wrote:i have no editor/ide on any of my systems* which doesn’t look more or less like this:


and that wouldn't make ed look like that image anyway.

Code: Select all

factorial product enumFromTo 1
isPrime n 
factorial (1) `mod== 1

User avatar
enk
Posts: 754
Joined: Mon Sep 10, 2007 12:20 am UTC
Location: Aalborg, Denmark
Contact:

Re: Am I the only one on here that can't stand Python?

Postby enk » Thu Nov 18, 2010 10:15 am UTC

hotaru wrote:
OOPMan wrote:VIM code folds just fine, thanks.

vim also takes about 3 seconds to start on my 400MHz linux machine. and once it's started, if you press the down arrow, it takes about two seconds for the cursor to actually move down.


Which just shows how irrelevant it is to refer to a computer by clock frequency.
phlip wrote:Ha HA! Recycled emacs jokes.

User avatar
HarvesteR
Posts: 65
Joined: Mon May 10, 2010 1:13 pm UTC

Re: Am I the only one on here that can't stand Python?

Postby HarvesteR » Tue Dec 07, 2010 7:44 pm UTC

I kinda like Python, but I reckon it's syntax could have been better...

the whitespace blocks are one thing I would gladly do without... brackets don't necessarily make for dirty code reading, and since most languages use them they've become quite natural to read through.

The thing that bother me the most though, is the lack of explicitly-defined data types (let's not get into the soft-typed vs hard-typed vs dynamic-typed discussion debacle).
A language with explicitly defined types is, IMO, much easier to read and code in... even more if you're working with code from other people. The code becomes much more self-explanatory (no pun intended).

To me, the best language to code in is ActionScript3. Platform debilities aside, the language itself is very elegant, thoroughly consistent, and has a very good event model that is always coherent.

There are, however, things that you can do in Python that are really useful... Trouble is that you become used to it and start to wish every other language had those features too...

Cheers
The next sentence is the truth. - The previous sentence is a lie.

User avatar
Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

Re: Am I the only one on here that can't stand Python?

Postby Cosmologicon » Tue Dec 07, 2010 8:01 pm UTC

I can see the appeal of typing, but I'll be damned if I have to remember the syntax to declare (just pulling an example from one of my Python scripts), a list of 3-tuples, each which contains a 1-tuple containing a string, a second 1-tuple containing a string, and a 2-tuple containing 2 datetimes. I get a bit template-happy in C++ to avoid having to write out things like this, even if I know good and well what type of object the container is going to have in it.

User avatar
HarvesteR
Posts: 65
Joined: Mon May 10, 2010 1:13 pm UTC

Re: Am I the only one on here that can't stand Python?

Postby HarvesteR » Tue Dec 07, 2010 8:18 pm UTC

Cosmologicon wrote:I can see the appeal of typing, but I'll be damned if I have to remember the syntax to declare (just pulling an example from one of my Python scripts), a list of 3-tuples, each which contains a 1-tuple containing a string, a second 1-tuple containing a string, and a 2-tuple containing 2 datetimes. I get a bit template-happy in C++ to avoid having to write out things like this, even if I know good and well what type of object the container is going to have in it.


I would settle for just declaring var something:Tuple; ...like an Array object in AS3 ;)
(I love AS3 and hate Flash... does that make me a bad person?)

Cheers
The next sentence is the truth. - The previous sentence is a lie.

User avatar
Meteorswarm
Posts: 979
Joined: Sun Dec 27, 2009 12:28 am UTC
Location: Ithaca, NY

Re: Am I the only one on here that can't stand Python?

Postby Meteorswarm » Wed Dec 08, 2010 11:00 pm UTC

Cosmologicon wrote:I can see the appeal of typing, but I'll be damned if I have to remember the syntax to declare (just pulling an example from one of my Python scripts), a list of 3-tuples, each which contains a 1-tuple containing a string, a second 1-tuple containing a string, and a 2-tuple containing 2 datetimes. I get a bit template-happy in C++ to avoid having to write out things like this, even if I know good and well what type of object the container is going to have in it.


This is why I enjoy languages with type inference, but that's a whole 'nother thing entirely.
The same as the old Meteorswarm, now with fewer posts!

User avatar
flying sheep
Posts: 63
Joined: Sun Jan 31, 2010 12:35 am UTC

Re: Am I the only one on here that can't stand Python?

Postby flying sheep » Fri Dec 10, 2010 3:23 am UTC

yeah, type inference is really great.
for the case he gave us, a list of classes would fit better than a list oftuples containing strings.

User avatar
Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

Re: Am I the only one on here that can't stand Python?

Postby Cosmologicon » Fri Dec 10, 2010 5:30 am UTC

Well half the point of tuples is to act as anonymous class instances that you don't want to bother giving a whole specification for.

User avatar
BlueNight
Posts: 270
Joined: Sat Aug 18, 2007 3:59 am UTC
Location: Albuquerque
Contact:

Re: Am I the only one on here that can't stand Python?

Postby BlueNight » Thu Dec 16, 2010 8:38 pm UTC

OOPMan wrote:Seriously, you won't get Python until you've written a small, concise tool in it to perform some troublesome task that you can't be bothered to write in some bloated piece of crap like Java.


I'm an ace in DOS batch. When my last job required me to manually reverse the numbering of files named FILE0000, FILE0001, FILE0002, etc., last-page-first, to compile a simple PDF in correct page order, I wrote a two-hundred line batch file in Edit, because Notepad doesn't have insert/overwrite toggle.

This would have been decent, but my implementation left the files numbered FILE9999, FILE9998, etc., and the boss said customers who wanted single-page files in first-page-first order didn't like that. So, over a weekend, I used QBASIC's extensive help pages to write a QBASIC program that output five hundred batch files of varying sizes, along with a master batch file that called them using IF EXIST FILE9700.* THEN CALL REVERSE9700.BAT

The resulting batch files take up 25Mb of space, are still being used by my former fellow employees, and are integrated into the right-click context menus. They are both the entirety of my career in industrial programming, and my silliest code ever.

I bet Python could do it in five lines or less.
---------
BlueNight

User avatar
mrbaggins
Posts: 1611
Joined: Tue Jan 15, 2008 3:23 am UTC
Location: Wagga, Australia

Re: Am I the only one on here that can't stand Python?

Postby mrbaggins » Fri Dec 17, 2010 9:07 am UTC

Most languages could.
Why is it that 4chan is either infinitely awesome, infinitely bad, or "lolwut", but never any intermediary level?

jwwells
Posts: 180
Joined: Thu Sep 21, 2006 4:47 am UTC

Re: Am I the only one on here that can't stand Python?

Postby jwwells » Tue Dec 21, 2010 4:15 am UTC

Biologist input:

When I was seven or so, I liked to mess around on an Apple-][+ with Applesoft BASIC. My seven-year-old self liked BASIC. My inner seven-year-old LOVES Python.

Python captures that "you can screw around in this interpreter all you want!" feeling. It's intoxicating.

That said, on another level, I can't stand it, because it's a false promise! It gives this illusion that programming is automatic and doesn't require a plan.

Argh I feel so split on this.

xtjacob
Posts: 0
Joined: Wed Jan 19, 2011 12:42 am UTC

Re: Am I the only one on here that can't stand Python?

Postby xtjacob » Wed Jan 19, 2011 12:44 am UTC

Did you know Eve Online's back-end server cluster runs on python?

"EVE Online
Python enabled us to create EVE Online, a massive multiplayer game, in record time. The EVE Online server cluster runs over 50,000 simultaneous players in a shared space simulation, most of which is created in Python. The flexibilities of Python have enabled us to quickly improve the game experience based on player feedback" said Hilmar Veigar Petursson of CCP Games."

http://www.python.org/about/quotes/


Return to “Religious Wars”

Who is online

Users browsing this forum: No registered users and 6 guests