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

Pages: 1-4041-

Perl vs. Python

Name: Anonymous 2012-07-25 11:56

Which language should I learn first?

Name: Anonymous 2012-07-25 11:59

Out of these two, Python. Perl is a mess.

Name: Anonymous 2012-07-25 12:02

>>2
Why do you say that?

I hate when people say ``x language is shit'' but don't provide any reasons for saying so.

Name: Anonymous 2012-07-25 12:12

>>2
Yeah, but Python doesn't have native regex(?) support. As a result, using regular expressions in Python is slow compared to Perl.

Name: Anonymous 2012-07-25 12:15

>>4
import re

Name: Anonymous 2012-07-25 12:19

>>4
What do you mean by "native regex support"?
Python's standard library has the re module.
Also, there are alternate regular expression modules available.

Name: Anonymous 2012-07-25 13:16

>>6
The re module isn't the same thing. By native support I mean the feature is built into the language. Python doesn't do such a thing.

Name: Anonymous 2012-07-25 13:19

>>6
And if you really want to understand the differences between the Perl and Python implementation, get and read the book "Mastering Regular Expessions" by Jeffery E.F. Friedl.

Name: Anonymous 2012-07-25 13:30

why would anyone learn perl ever

Name: Anonymous 2012-07-25 14:00

>>7
Simplifying the language by moving library-able things into libraries isn't exactly a bad thing. You could have argued about JITing the regexps, but you didn't.

Name: Anonymous 2012-07-25 14:03

javascript. it's the only dynamic language that was actually designed

Name: Anonymous 2012-07-25 14:07

Well, Perl is like !"Ysw¤%UYrW¤&%)

and Python is like hszzzhss hzzzzhzhzzz sshhhzzhhh

I'd choose Python

Name: Anonymous 2012-07-25 14:07

>>10
"guido is a huge fag" =~ /(huge|giant)\s+fag/ was a nice feature of perl

until superior japanese languages stole it from them

Name: Anonymous 2012-07-25 16:04

>>10
I suppose if have less than optimal code is your thing.

Name: Anonymous 2012-07-25 16:07

>>14
Maybe if you choose the wrong set of features to start with. Or if the implementer is called Guido van Rossum, then the former is most likely true too.

Name: Anonymous 2012-07-25 16:11

>>11
javascript. it's the only dynamic language that was actually designed

...in two weeks.

Name: Anonymous 2012-07-25 16:11

Read SICP.

Name: Anonymous 2012-07-25 16:12

>>33
If you change a variable afterwards, that's your fault. Don't do it if you don't want that.

Name: Anonymous 2012-07-25 16:13

>>18
Whoops, mispost. Ignore that.

Name: Anonymous 2012-07-25 16:21

Learn Perl
Then learn Python

Maybe you won't be developing in Perl, but it's damn useful for developing quick "helper" utilities.

Name: Anonymous 2012-07-25 16:22

>>18,19
go back to /b/, please!

Name: Anonymous 2012-07-25 16:24

Friends don't let friends read SICP.

Name: Anonymous 2012-07-25 20:51

>>10
You could JIT the regexes even though they're part of a module.

The module is part of the standard library.

Name: Anonymous 2012-07-25 20:56

>>22
(friends (not
                (let ((friends (read SICP))))))

Name: Anonymous 2012-07-25 22:35

>>24
Disgusting.

Name: Anonymous 2012-07-25 23:29

>>25
Yes, yes you are.

Name: Anonymous 2012-07-26 0:47

>>26
lol u mad

Name: Anonymous 2012-07-26 2:05

just started reading SICP, its pretty sweet...never took Lisp seriously until now.

Not OP btw, just a viewer

ive only ever known OOP, working with lua, Java, and C++ (learning in that order) but of course i am eager to learn more!

Name: Anonymous 2012-07-26 3:20

>>28
OOP in those languages is different from OOP in Lisp (assuming CL, which you should learn after picking up Scheme). I strongly suggest learning how to work with CLOS.

Name: Anonymous 2012-07-26 7:59

>>14
letting efficency of regex implementation be the determining factor for choosing perl over python

Name: Anonymous 2012-07-26 8:03

>>30
Anyway, CL-PCRE has more efficient regaxum than Perl.

Name: Anonymous 2012-07-26 8:16

>>23
Indeed.

Name: Anonymous 2012-07-26 10:53

CHECK 'EM DUBZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

Name: Anonymous 2012-07-26 18:46

>>33
Consider them checked.

Name: Anonymous 2012-07-26 18:57

Why not both?

Name: Anonymous 2012-07-26 19:58

>>35
or neither?

>>33
sweet dubs!

Name: Anonymous 2012-07-27 22:45

In doubt, sort alphabetically

Name: Anonymous 2012-07-28 13:53

I have many issues with stripping as a profession and strip clubs as sexual spaces. To be frank, they disgust me (note, not strippers themselves, but strip clubs and the institutional inequalities that allow stripping to exist as a profitable career). I don’t frequent them. I request that Carlos does not (and he complies). Nothing about being a stripper is empowering, and arguments of that nature are shallow, misplaced and poorly thought out. In my experience however, cardio striptease is exactly the opposite. Thus far I’ve found it, empowering, and an interesting way to explore one’s sexuality through dance and movement in a safe space.

Name: Anonymous 2012-07-28 19:24

Perl. Just because Python community is just a bunch of circlejerking assholes, and on the concept level both languages are essentialy the same thing.

Except that lexical scoping in Perl is not fundamentally broken

Name: Anonymous 2012-07-28 19:37

>>39
pretty much this

Name: Anonymous 2012-07-28 20:15

Better go with brainfuck then.
Sorry Mr. Wall, it's cleaner than Perl.

Name: Anonymous 2012-07-28 21:01

>>41
If you think that Perl is not clean enough you are doing it wrong.

Name: Anonymous 2012-07-28 21:29

Why not use Ruby instead?

Name: Anonymous 2012-07-28 21:31

>>43
Yeah, I've been thinking this the entire thread.

Name: Anonymous 2012-07-28 21:33

>>44
SLOW AS FUCK

Name: Anonymous 2012-07-28 21:36

Name: Anonymous 2012-07-28 21:57

>>42
I write pretty clean Perl. My coworkers find it readable and easy to understand (once they get past the initial ``ew, Perl''). Though if I haven't touched the language in a few months I get bitten by really dumb multiple assignment gotchas.

I would never trust a stranger to write good Perl.

Name: Anonymous 2012-07-29 0:04

>>46
>Ruby used: 105x memory
gc is shit

Name: Anonymous 2012-07-29 0:36

>>48
yeah because cherry picked extreme values that don't match any of the rest of the data in a set are the best values to make decisions on.

Name: Anonymous 2012-07-29 2:55

>>48
Too bad Ruby is [b][u][i]SLOW AS FUCK[/b][/u][/i].

Name: >>50 2012-07-29 2:56

I'll proceed to commit sudoku now.

Name: Anonymous 2012-07-30 1:28

While I strongly prefer to stuff a Python dildo (vs a Perl semi-firm turd) into my anus, I cannot ignore the fact that Python's version of using syntax as indentation is utterly retarded (unlike Haskell which will complain if you indent it wrong) because it is seemingly designed to facilitate errors, you can mess up a control structure accidentally and only notice it because of a strange bug.

Name: Anonymous 2012-07-30 1:46

>>52
Nah it just goes in line with the Python philosophy: compile-time checks? What are those?

Name: Anonymous 2012-07-30 12:08

>>53
No, this is not the case.  Python syntax is designed for these errors.  E. g.  you have
while 1:
    a()
    b()
    c = len_(dicks)
d(anii)
e = f(g)
[code]
and all of sudden your program starts acting weird.  You look at Git commits one by one, do git bisect, pull a few hairs, tell the other guys, read commits again, until you find that [code]d(anii)
should actually be inside the while loop and someone accidentally pressed a tab in the wrong place and never noticed.  Both versions are valid, but only one does what you want it to do.

I have considered ending each syntactic block with a pass, which will also help python-mode to always indent properly.  This is simply a non-problem in C-derived languages, other than javashit with its marvelous
blah();
blah();
return // Ha! Ha! I am returning an object!
Object()

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