EvilZone

Programming and Scripting => Scripting Languages => : lucid January 29, 2014, 04:37:52 AM

: I hate to ask
: lucid January 29, 2014, 04:37:52 AM
Ok, I really REALLY hate to do this, but yes, I am starting a thread asking for recommendations on which scripting language to learn. The debate is between Perl and Python. I've done all sorts of research on pros and cons of both, but I can't really decide. Here's some general info on what I want to do with it:

- Coding servers
- Coding back connect scripts
- Coding GUIs(eventually)
- Pretty much general networking stuff

Now, I have always been avoidant of Python because of a few reasons. One of those reasons is that everyone codes everything in it and all I ever see is Python scripts, and I'm sort of a hipster in that regard. I know that shouldn't matter, but it does. Another reason for avoiding Python is that I want to avoid getting stuck using Python for everything because it's easy, which seems to happen to a lot of people. Yet another is, well, syntactic whitespacing.

Perl, on the other hand, does indeed have some pretty ugly syntax, and sigils are defintely a thing to get used to. I've also jumped between many languages due to some SEVERE language ADD and I'm tired of it. I could be so much farther then I am if it weren't for that. So, one reason I find Python attractive is because it is simple and I want to get to coding useful applications sooner then later. Seems Python would be better then Perl in that regard.

I'm aware that it's mostly a matter of taste considering that they are both scripted languages and can mostly do the same things, but there are certainly differences. For example I hear that Python is better for coding GUIs. I hear Perl is better for *nix tasks. I hear Perl is better for web server-side stuff. I don't know which language would be better for networking related tasks, but I've heard Python would be better for this.

I can already guess that most people here will recommend Python because it is there favorite language and because it is easy to learn, but please try and be objective about this.

Oh and no, I will not appreciate anyone recommending Ruby instead of either of these. I'm having enough trouble with my indecisiveness as it is thank you.
: Re: I hate to ask
: vezzy January 29, 2014, 05:13:47 AM
Try Ruby, if for no other reason, to stand out from the rest of EZ which basically churns out nothing but Python.
: Re: I hate to ask
: Spacecow January 29, 2014, 05:29:00 AM
Try Ruby, if for no other reason, to stand out from the rest of EZ which basically churns out nothing but Python.
Then you can fit in with the cool kids on github who churn out nothing but ruby and node. :P
: Re: I hate to ask
: iTpHo3NiX January 29, 2014, 05:34:00 AM
I'd personally go with python but knowing me I'd get thru the hello world tutorial and be done with it like I did with c++ lmfao
: Re: I hate to ask
: lucid January 29, 2014, 05:37:10 AM
Try Ruby, if for no other reason, to stand out from the rest of EZ which basically churns out nothing but Python.
-_-

I'm definitely going to pick either Perl or Python. Ruby doesn't interest me in the slightest for whatever reason.

Oh and no, I will not appreciate anyone recommending Ruby instead of either of these. I'm having enough trouble with my indecisiveness as it is.
I've seen quite a bit of applications regarding networking use Python. I've also seen quite a lot of back connect scripts and malicious things written in Perl. Perl seems to be used more for malware, which is what I'm really interested in.

EDIT: Ok maybe not malware(I know compiled is better for malware), but various utilities that are used for nothing good like back connect scripts. I've seen botnets and things of that nature as well written in Perl. However I don't see too much of this stuff in Python.

Would love some pro coder's opinions.
: Re: I hate to ask
: RedBullAddicted January 29, 2014, 07:09:17 AM
Hi Lucid :) I would recommend, well I think you know it.. lol. I am by far no expert but as you maybe know I am using nagios at work very excessively and I use a lot of snmp based checks with some custom plugins. The net-snmp implementation of perl and the performance it provides made me write some of it in perl. There are purposes for both languages. Sure I do use python more often because I can write my scripts faster with it. (because I am not really good with perl). It all depends on the task at hand. Its not bad to know a bit about both of the languages :)

Hope that helps at least a bit
: Re: I hate to ask
: Fur January 29, 2014, 08:01:24 AM
1) Learn the basics of both.
2) Use whichever one you're more comfortable with (or both).

That said, I personally use Perl. It's very flexible and powerful, but OOP support is shit (even with Moose it hurts) and isn't as simple as Python. Oh, and CPAN has about 120000 modules, so that's nice too.
: Re: I hate to ask
: lucid January 29, 2014, 08:25:59 AM
Oh, and CPAN has about 120000 modules, so that's nice too.
Indeed.

I guess my requirements in the first post could be fulfilled in either language.
: Re: I hate to ask
: Kulverstukas January 29, 2014, 09:03:15 AM
I dunno... just gonna refer you to this post: http://evilzone.org/ebooks/modern-perl/msg73951/#msg73951
: Re: I hate to ask
: Phage January 29, 2014, 09:21:02 AM
I see Python used a lot of server side scripting and network tools (and many other). There's a reason to anything and I believe there's a reason why Python is much more popular than Perl these days. The main one probably being the syntax and the libraries in Python. I will agree though that Perl is more widely used for malecious activity than Python is. My personal believe is that it's like that because Python writes pretty code and is meant for creation and Perl writes ugly code and is meant for destruction :P (personal opinion).

But well, a long way of the road it's all about personal matter. Pick the language you feel best programming in and stay with that. They are pretty similar in what they are used for, even though, afaik, Python is more widely used for server side programming/network programming/management scripts than Perl is.
: Re: I hate to ask
: vezzy January 29, 2014, 05:14:56 PM
Actually, Perl has always been the go to language for server-side, network and system administration and CGI scripting. Python is dominating, but Perl is still deeply ingrained.

The reason I recommended Ruby is because it's kind of a middle ground between Perl, Lisp and Smalltalk. It used to be that hipsters on HN used it, but most of them are now migrating to languages like Go. Ruby is pretty mature by now.
: Re: I hate to ask
: lucid January 29, 2014, 06:02:16 PM
I dunno... just gonna refer you to this post: http://evilzone.org/ebooks/modern-perl/msg73951/#msg73951 (http://evilzone.org/ebooks/modern-perl/msg73951/#msg73951)
I love that. I knew it was only a matter of time before someone posted that. Thanks for the input everyone. I've decided I'm going to try each for a week(even though I've had a tiny bit of experience with both in the past already) and decide that way.

Please though, don't consider this thread to have served it's purpose. I'd still love more input.

EDIT: Where the hell is Deque?
: Re: I hate to ask
: Kulverstukas January 29, 2014, 06:25:00 PM
EDIT: Where the hell is Deque?
She's coding a robotic arm to feed her baby.
: Re: I hate to ask
: flowjob January 29, 2014, 07:29:37 PM
I'd recommend python, as you can use it for a lot of different things pretty well.
Python itself can be used as object-oriented, imperative and functional language, depending on the needs. A small script might be coded in imperative, a large project in object-oriented style.
Well-known things coded in python:
 - Blender, 3D art and animation program
 - Various bittorrent clients
 - Dropbox client
 - Battlefield 2, plugins and a lot of other stuff
 - Civilization IV


Python can be used for pretty much everything you need to do, but as always with things that can do a lot of stuff, it may not be the best at certain things. It isn't really suited to code malware in it for example, for hardware-related and low-level stuff you'll need to write your own module in C wich can be used in python later on.
Also there's almost always a python interpreter on linux or os x.
Also there's an implementation in java called jython, wich allows you to import any java code into your python script. Modules written in C aren't well supported by jython yet though. But as a jre is installed on most windows computers, jython is useful when developing for windows. There isn't really a good way to compile python scripts to native code, so you always depend on an interpreter on the maschine the script is run on.


Finally,it is easy to learn the basics, but a lot of more complexe stuff can be done with some more experience too.

: Re: I hate to ask
: lucid January 29, 2014, 08:19:53 PM
Thanks for your explanation. Will take it into consideration.
The reason I recommended Ruby is because it's kind of a middle ground between Perl, Lisp and Smalltalk. It used to be that hipsters on HN used it, but most of them are now migrating to languages like Go. Ruby is pretty mature by now.
I hadn't realized this thanks.
: Re: I hate to ask
: Deque January 29, 2014, 09:18:58 PM
She's coding a robotic arm to feed her baby.

8)
Na. I read it. I just don't know what to tell you, lucid. I think doesn't matter at all if you go for Python or Perl. I guess in this case it is indeed a good idea to try out both of them for a while and see what feels better for you. Or just use a dice, you know.

(On a sidenote: my professor would say "Both start with P, they are equally bad, as well as every language starting with the letter P." and "These people who invented the P languages didn't attend my course" and he would suggest to learn Haskell ;) )
: Re: I hate to ask
: lucid January 29, 2014, 09:21:02 PM
8)
Na. I read it. I just don't know what to tell you, lucid. I think doesn't matter at all if you go for Python or Perl.
Yeah, I imagine I'm probably over-thinking this way too much.
: Re: I hate to ask
: Deque January 29, 2014, 09:23:42 PM
Yeah, I imagine I'm probably over-thinking this way too much.

Yeah. Use your energy and time to do something productive instead of this. Sometimes you just have to do it. It's not like you are closing the door to every language you didn't decide for. It is not a marriage.
: Re: I hate to ask
: iTpHo3NiX January 29, 2014, 09:29:11 PM
Flip a coin, head=python / tails=perl then just roll with it. You're not liking it, try the other.
: Re: I hate to ask
: lucid January 29, 2014, 09:57:47 PM
Ok. Good advice. Perl for another week. Then Python a week.
: Re: I hate to ask
: Clone February 01, 2014, 10:57:40 PM
perl has a wide range of modules  you can do just about anything.Its syntax is ugly and hard to follow through so you are sure code is "safe", while python its easy plus everybody knows it by now.Anyway its all depends on you
: Re: I hate to ask
: Traitor4000 February 02, 2014, 03:26:48 AM
 :P  Clone, i never realized you could make ugly syntax sound like a good thing!
: Re: I hate to ask
: Clone February 02, 2014, 08:26:31 AM
Kulverstukas said ,"she is coding a robotic arm to feed her baby"....so out of sheer respect and innocent curiosity ,there are girls in this forum ?
: Re: I hate to ask
: Phage February 02, 2014, 09:26:19 AM
Kulverstukas said ,"she is coding a robotic arm to feed her baby"....so out of sheer respect and innocent curiosity ,there are girls in this forum ?

What did you expect? Yes there are female members of this community, it's just not everybody who openly tells about it.
: Re: I hate to ask
: Clone February 02, 2014, 09:42:05 AM
Impressive! ;D ...ignore my surprise but from where i come from its rare
: Re: I hate to ask
: Phage February 02, 2014, 09:45:55 AM
It all depends on what kind of sites you're on and how the environment is.
: Re: I hate to ask
: rasenove February 02, 2014, 10:14:12 AM
@Lucid: Which language are you trying out first?

Impressive! ;D ...ignore my surprise but from where i come from its rare

It's the same almost everywhere. Women don't do much computing because it's emotionless which is true until strong AIs come into play. And that there's no 'creativity' in it, that's where they're wrong. Very few spend enough time with computers to realise the trouth.
Deque (java savvy moma) and Nea(good girl) are the two most active female members we have.
Now back to lucid...
: Re: I hate to ask
: Deque February 02, 2014, 06:07:00 PM
Impressive! ;D ...ignore my surprise but from where i come from its rare

I believe there are more female members in some areas than you know. They just don't tell for good reasons.
I mean look at the reactions if someone tells. It is nasty.

Women don't do much computing because it's emotionless

I do it because it is emotionless.
I tend to have too much of emotions and I feel much better if it is more calm inside of me. It wouldn't be any good for me to have a job that makes my emotions go up and down even more.
I also like that computer science is (mostly) not that fuzzy. You have clear definitions, clear solutions, or no solutions at all, but even that is mostly clear. You have precise languages to describe the world. And after all if you do some work, you get a relatively clear feedback. You will know if it works or not in contrast to doing social work where you never see the people again after you did something to them...
That creativity is in there too, is a great combination. I have preciseness, but also endless possibilities for expression. I just love it.
: Re: I hate to ask
: Clone February 02, 2014, 07:18:50 PM
Its good to know that chicks actually like computers other than facebook and twitter.Looking foward to learning from them  ;D
: Re: I hate to ask
: kenjoe41 February 02, 2014, 07:28:16 PM
You will be suprised what women can achieve if they reson with the brain but not the heart. You will be surprised how huge they buckets of knowledge Deque sits on.
: Re: I hate to ask
: rasenove February 02, 2014, 08:07:13 PM
@ Deque: I wish more women were like you.

Wait Deque is really that good?...am new so am getting to know you fellas better
Yes. You should visit the EZ releases and java sections to see her works.
Now let this thread rest in peace (lucid got his answer anyway)
: Re: I hate to ask
: lucid February 02, 2014, 10:35:57 PM
I'd just like to add(since you all murdered my thread, thanks assholes) that the fact that you people had a conversation that even went on that long about whether or not women are on the forum and the reasons why they are or are not into computers is sad.

</thread>