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

Pages: 1-

Convince me to keep learning Perl

Name: Anonymous 2011-11-26 23:51

HALP ME! I've been attempting to learn Perl the last few days and I'm starting to have second thoughts. It seems each new thing I come across introduces a new level of confusion. Convince me to tough it out, or not.

Name: Anonymous 2011-11-26 23:57

perl.. lol if you can handle learning perl you'll never make it...

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/video-lectures/

start here, your welcome..

learn CS and start using Java, it sucks ball sacks but it'll teach you about OOP.

Name: Anonymous 2011-11-26 23:59

>>2
s/can/cant

Name: Anonymous 2011-11-26 23:59

>>2
oh and if your not using linux, your doing it wrong.

Name: Anonymous 2011-11-27 0:04

>>2
OP here, I already know Java and OOP concepts. Are you insinuating that Java is harder to learn than Perl? Because Java was a pushover.

Name: Anonymous 2011-11-27 0:09

>>5
Both, Java and Python, are shit. It's hard for a normal man to eat shit, without vomiting.

Name: Anonymous 2011-11-27 0:12

>>6
I was just outside thinking to myself, this guy is either trolling or he thinks Perl == Python. I'm leaning toward the former at this point.

Name: Anonymous 2011-11-27 0:13

/prog/ IS DEAD! WELCOME TO /NEO-PROGGLES/! DISCUSS OOP DESIGN PATTERNS AND THE FREE SOFTWARE MOVEMENT. PLEASE BE NICE AND DON'T TROLL HELP THREADS.

Name: Anonymous 2011-11-27 0:16

>>5
if Java was a push over and you cant handle perl then your either:
A. lying
B. Trolling
C. An idiot (that is lying)
D. lying
E. lying (and faggot)

Name: Anonymous 2011-11-27 0:24

>>9

perl is very useful and can be used to do things quickly once you know it, but it is confusing as fuck to anyone that is just getting used to $$@%{}->s||~///

>>1

Check out the history of perl. It used to be that you couldn't have nested data structures, like arrays of hash tables. This is apparent in how awkward it is to do anything like that in perl. Perl is very nice for scanning through files and throwing stuff into arrays or hash tables, and then maybe doing a simple algorithm on what you generated, and then spitting stuff out. You wouldn't want to try to do too much large scale development on it, but you could, and there are object oriented extensions, but you have to be a bit eccentric to pursue that.

Name: Anonymous 2011-11-27 0:25

>>9
>>8
Why do I even come to this board?

Name: Anonymous 2011-11-27 0:27

>>11
slut

Name: Anonymous 2011-11-27 0:32

>>7
If it ain't Lisp, it's crap.

Name: Anonymous 2011-11-27 1:23

Learn Python ``faggot''

Name: Anonymous 2011-11-27 19:00

Name: Anonymous 2011-11-27 19:31

Seriously, I wouldn't recommend Perl unless you have a concrete reason to learn it. It's an acceptable language for quick text parsing hacks, but there are more versatile and popular languages out there that will serve most people better.

If you're just exploring, some Sehenswürdigkeiten of Perl are the ingrained regular expression support, the special variables and the TMTOWTDI-style control structures, all of which you'll find echoed in e.g. Ruby, and the blessing based object system, and CPAN.
That's for Perl 5 -- Perl 6 contains some more novel concepts and is worth checking out, but they're so experimental it should really be considered a research language.

Name: Anonymous 2011-11-27 22:33

>>2
I watched the video until they said they are going to be programming in Python. Are there online lectures where they use a decent languages?

Name: Anonymous 2011-11-27 22:36

>>17
implying python and java are indecent

Name: Anonymous 2011-11-27 22:39

Indecent exposure of the Anus.class

Name: Anonymous 2011-11-28 0:53

>>14
Python

I am far from an expert at Python, but I have done a couple of semi-serious projects in the language and will try to recall specifically what I didn't like.

- Everything you write will be open source. No FASLs, DLLs or EXEs. Developer may want to have control over the level of access to prevent exposure of internal implementation, as it may contain proprietary code or because strict interface/implementation decomposition is required. Python third-party library licensing is overly complex. Licenses like MIT allow you to create derived works as long as you maintain attrubution; GNU GPL, or other 'viral' licenses don't allow derived works without inheriting the same license. To inherit the benefits of an open source culture you also inherit the complexities of the licensing hell.
- Installation mentality, Python has inherited the idea that libraries should be installed, so it infact is designed to work inside unix package management, which basically contains a fair amount of baggage (library version issues) and reduced portability. Of course it must be possible to package libraries with your application, but its not conventional and can be hard to deploy as a desktop app due to cross platform issues, language version, etc. Open Source projects generally don't care about Windows, most open source developers use Linux because "Windows sucks".
- Probably the biggest practical problem with Python is that there's no well-defined API that doesn't change. This make life easier for Guido and tough on everybody else. That's the real cause of Python's "version hell".
- Global Interpreter Lock (GIL) is a significant barrier to concurrency. Due to signaling with a CPU-bound thread, it can cause a slowdown even on single processor. Reason for employing GIL in Python is to easy the integration of C/C++ libraries. Additionally, CPython interpreter code is not thread-safe, so the only way other threads can do useful work is if they are in some C/C++ routine, which must be thread-safe.
- Python (like most other scripting languages) does not require variables to be declared, as (let (x 123) ...) in Lisp or int x = 123 in C/C++. This means that Python can't even detect a trivial typo - it will produce a program, which will continue working for hours until it reaches the typo - THEN go boom and you lost all unsaved data. Local and global scopes are unintuitive. Having variables leak after a for-loop can definitely be confusing. Worse, binding of loop indices can be very confusing; e.g. "for a in list: result.append(lambda: fcn(a))" probably won't do what you think it would. Why nonlocal/global/auto-local scope nonsense?
- Python has a faulty package system. Type time.sleep=4 instead of time.sleep(4) and you just destroyed the system-wide sleep function with a trivial typo. Now consider accidentally assigning some method to time.sleep, and you won't even get a runtime error - just very hard to trace behavior. And sleep is only one example, it's just as easy to override ANYTHING.
- Crippled support for functional programming. Python's lambda is limited to a single expression and doesn't allow conditionals. Python makes a distinction between expressions and statements, and does not automatically return the last expressions, thus crippling lambdas even more. Assignments are not expressions. Most useful high-order functions were deprecated in Python 3.0 and have to be imported from functools. No continuations or even tail call optimization: "I don't like reading code that was written by someone trying to use tail recursion." --Guido
- Python's syntax, based on SETL language and mathematical Set Theory, is non-uniform, hard to understand and parse, compared to simpler languages, like Lisp, Smalltalk, Nial and Factor. Instead of usual "fold" and "map" functions, Python uses "set comprehension" syntax, which has overhelmingly large collection of underlying linguistic and notational conventions, each with it's own variable binding semantics. Using CLI and automatically generating Python code is hard due to the so called "off-side" indentation rule (aka Forced Indentation of Code), also taken from a math-intensive Haskell language. This, in effect, makes Python look like an overengineered toy for math geeks. Good luck discerning [f(z) for y in x for z in gen(y) if pred(z)] from [f(z) if pred(z) for z in gen(y) for y in x]
- Python hides logical connectives in a pile of other symbols: try seeing "and" in  "if y > 0 or new_width > width and new_height > height or x < 0".
- Python indulges messy horizontal code (> 80 chars per line), where in Lisp one would use "let" to break computaion into manageable pieces. Get used to stuff like self.convertId([(name, uidutil.getId(obj)) for name, obj in container.items() if IContainer.isInstance(obj)])
- Quite quirky: triple-quoted strings seem like a syntax-decision from a David Lynch movie, and double-underscores, like __init__, seem appropriate in C, but not in a language that provides list comprehensions. There are better ways to mark certain features as internal or special than just calling it __feature__. self everywhere can make you feel like OO was bolted on, even though it wasn't.
- Python has too many confusing non-orthogonal features: references can't be used as hash keys; expressions in default arguments are calculated when the function is defined, not when it’s called. Why have both dictionaries and objects? Why have both types and duck-typing? Why is there ":" in the syntax if it almost always has a newline after it? The Python language reference devotes a whole sub-chapter to "Emulating container types", "Emulating callable Objects", "Emulating numeric types", "Emulating sequences" etc. -- only because arrays, sequences etc. are "special" in Python. Subtle data types (list and tuple, bytes and bytearray) will make you wonder "Do I need the mutable type here?", while Clojure and Haskell manage to do with only immutable data.
- Python's GC uses naive reference counting, which is slow and doesn't handle circular references, meaning you have to expect subtle memory leaks and can't easily use arbitrary graphs as your data. In effect Python complicates even simple tasks, like keeping directory tree with symlinks.
- Patterns and anti-patterns are signs of deficiencies inherent in the language.  In Python, concatenating strings in a loop is considered an anti-pattern merely because the popular implementation is incapable of producing good code in such a case. The intractability or impossibility of static analysis in Python makes such optimizations difficult or impossible.
- Problems with arithmetic: no Numerical Tower (nor even rational/complex numbers), meaning 1/2 would produce 0, instead of 0.5, leading to subtle and dangerous errors.
- Poor UTF support and unicode string handling is somewhat awkward.
- No outstanding feature, that makes the language, like the brevity of APL or macros of Lisp. Python doesn’t really give us anything that wasn’t there long ago in Lisp and Smalltalk.

Name: Anonymous 2011-11-28 1:25

>>20
god I love this copypasta

Name: Anonymous 2011-11-28 2:19

>>20

this fuels my python hate.

I'm satisfied.

Name: Anonymous 2011-11-28 3:38

Perl 5, Python and Java are shit.

Name: Anonymous 2011-11-28 5:21

>>21
It's just a shitty tl;dr wall of text. It doesn't have any qualities of a good copypasta.

Name: Anonymous 2011-11-28 5:30

>>23
Perl 5, Python 3 and Java are shit.
FTFY.

Name: Anonymous 2011-11-28 5:55

>>24
Not our fault if you don't have the sufficient attention span to enjoy quality kopipe, autist.

Name: Anonymous 2011-11-28 6:25

>>25
All that good stuff they took out? Those things were considered misfeatures by GvR. Have a nice day!

Name: Anonymous 2011-11-28 9:23

>>1
Don't try to UNDERSTAND Perl5. It is impossible,

Instead, learn to do specific tasks in perl.

Is still a language worth of learning if you work on Unix machines.

Name: Anonymous 2011-11-28 9:38

>>28
Is still a language worth of learning if you work on Unix machines.
What perl can do that awk can't do better?

Name: Anonymous 2011-11-28 9:41

>>29
awk does not have CPAN.

Name: Mentifex 2011-11-28 9:49

Name: Anonymous 2011-11-28 11:33

>>5
I have been using Perl (and other languages) for years but Java is an incomprehensible mess to me.

Name: Anonymous 2011-11-28 14:24

perl will make you a master of scoping and is very easy to learn

Name: Anonymous 2011-11-28 16:10

>>30
So already a point in awk's favor, then.

Name: Anonymous 2011-11-28 23:38

>>32

Perl always leaves her room a mess. If she can remember which card board box covered in papers, mangas, and cereal crumbs contains her kingdom of hearts action figures, she doesn't need to organize them. When Perl cosplays, she just throws together some things from her closet and heads out. Her costumes come out great after only a couple minutes of work, but she never reuses them.

Java always spends her time inside, constantly cleaning her house. No matter how her AnimeFigureBinFactoryCabinetFactory is aligned, she can't stop rearranging it. When papers are laid out on her desk, she constantly scans through all of them, looking to see if any are currently in use, or referenced from other papers that are in use. Papers that are not in use and not referenced by papers in use are placed into the garbage can. She waits until the garbage can is full to take it out to the side of the house. Java enjoys cosplay, and tries to make a great costume every year. She works 16 hours a day on her costumes, and starts a month in advance, but she has never finished on time, as she constantly rearranges and designs her DressButtonFactory to interface with her DressWithButtonsable, which then affect her StockingsList, which cause changes in Shoe that must be made in FootHolderable. She is also distracted by her constant rescanning of the papers on her desk. Java has never been to an cosplaying convention, and likely never will.

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