Berkeley CSUA MOTD:Entry 15206
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/12/25 [General] UID:1000 Activity:popular
12/25   

1999/1/11 [Computer/SW/Languages/Perl] UID:15206 Activity:very high
1/11    Is there any reason Perl couldn't/shouldn't replace scheme & java
        as the languages of choice for 61x?  Yes, it can be damn ugly, but
        the iteration/recursion difference is a lot clearer, the CPAN
        provides many excellent examples of abstraction & component use,
        and it's a lot easier to get perl to work on home computers (unix, mac,
        or winblows) than scm/Dr. Scheme.  Everything scheme & java can do
        perl can too.  (Well, java does win at threads for now, but that's
        not taught in the 61-series is it?)
        \_ does Perl support closures and upward funargs? -nick
           \_ It has both static & dynamic scoping, and you can close over
              statically-scoped vars.
        \_ Perl is kinda messy.  It also assumes you have a brain and know
           something about systems as well.  There's lots of niggly little
           historical things in PERL that a freshy wouldn't get.  Scheme,
           although useless in the RW is much cleaner (as taught in freshy
           courses) and there's already tons of experience at Cal teaching
           it the right way.  I love PERL, but I don't think it's a good
           choice for a first language.  Java?  Which Java?  heh.
        \_ Perl can be learned the wrong way, and is much easier to cheat
           solutions that do the "task", but in the wrong way.
        \_ basically, if the 61 series is a place people can get excited
           about programming and get tools they can use to actually create
           useful programs themselves, perl is a good choice.  If it's a
           weeder series, where you're trying to knock out people who aren't
           really interested by making them use a crappy language with
           no practical purpose and no redeeming features, scheme is a good
           choice.  In a typically Berkeley manner, the department has
           decided to go for the latter option. -tom
           \_ um, scheme is not being used with those goals in mind at all.
              scheme is used b/c that's what the book that bh likes uses,
              and b/c it's a nice simple elegant language that is easy for
              first-time programmers to work with.  it may not be practical,
              but it certainly has redeeming features.  see response below.
           \_ Y3AH, D00D!!!1!  1 AGR33 W1TH T0M 100,000,000%%!!!!1!!!
              P3RL 1Z __S0__ MUCH M0R3 K-RAD THAN SCH3M3!!!1!  B3S1D3S, 1F
              TH3Y ALS0 TAUGHT P33PUL H0W 2 PLAY N3TTR3K AND DR1NK D13T
              C0K3 1N TH3 61 S3R13Z, P33PUL C0ULD QU1T SCH00L AND MAK3 L0TZ
              UV M0N3Y BY B3CUM1NG 1NSTANT SYSADM1NZ!!!1!!!
                \_ gee what an intelligent comment.  -tom
                   \_ did that look like it was meant to be an intelligent
                      comment to you?
       \_ The 61-series is designed so that someone can come in knowing
           nothing about computers (but hopefully knowing at least
           "induction" which is the math version of recursion) and as they
           work their way through the series the levels of abstraction
           choices of syntax to use.  Probably not the best choice for a
           gradually go away and you end up in assembly. Remember, the goal
           is not to learn an interesting language, it is to learn *about*
           computer languages, about how we use computers. In languages like
           Perl, a lot of other "junk" gets in the way of doing that. Also,
           the Abelson & Sussman text really is a good text. Chances are if
           it used Perl, Berkeley would be using Perl.
        \_ Scheme is pretty much a pure functional language.  It's a
           good environment to learn about how to structure programs,
           break problems into components, etc.  It also has a rigid,
           well-defined syntax.  Perl is powerful, but not only are
           there 100+ ways to get any task done, there are several
           choices of syntax to use.
           \_ and most of them disgusting.
                                     Probably not the best choice for a
           first course in functional programming.
        \_ "In English Composition 61, we force everyone to write in iambic
           pentameter, because the rigid, well-defined syntax makes people
           broaden their vocabulary and appreciate Shakespeare more."  What
           a crock of shit.  No amount of time spent working around the
           klunkiness of a language is more valuable than time spent actually
           solving problems through programming.  The fact that there are
           lots of ways to get stuff done in Perl is a *good* thing, if
           what you want to teach is how to get stuff done.  You're fooling
           yourself if you think the 61 series is supposed to do anything but
           weed out English majors (as English 61, above, would be designed
           to weed out CS majors).  -tom
             \_ when i took cs61a i found it to be a very good introduction
                to the concepts of programming (for a person who had never
                done any before that class except a couple of lines of basic
                in some lame hs computer tools class), and also friendly and
                not intimidating. it didn't seem like a weeder course at all.
                i'm sure the class itself has much more of a weeder feel now,
                since cs is so overloaded, but i still think that scheme is a
                nice language within which to teach the basic concepts.  if
                61a had used perl i probably would have freaked.  -lila
           \_ And since we all know English and CS are the same
              thing....
           \_ this reminds me that I switched from an english major to CS
              because of 60a (SICP w/ Wilensky).. --karlcz
2024/12/25 [General] UID:1000 Activity:popular
12/25   

You may also be interested in these entries...
2008/3/4-7 [Computer/Networking, Computer/SW/Languages/Perl] UID:49324 Activity:moderate
3/4     Does anybody have some code or know of a program that will take a
        network/mask and return the list of address in that CIDR block?
        e.g. "iplist 10.10.10.0/24" and return 10.10.10.0 ... 10.10.10.255
        [I have a way to do this, but it involves distributing a large
        amount of code, which is kind of a hassle. Looking for something
        lightweight and either standard or easdy to rpm/port/yum install.]
	...
2007/9/10 [Computer/SW/Languages/Perl] UID:47986 Activity:low
9/10    Hi.  I'm running a package based linux distro.  Should
        I install perl CPAN modules through the provided packages,
        or through sudo cpan> install modulename etc ?
        Opinions?
        \_ Depends on the package system you're using, you may have to
           deal with both.  I had an experience where I installed via
	...
2007/8/7-13 [Computer/SW/Languages/Perl, Computer/SW/Unix] UID:47555 Activity:nil
8/7     I'm trying to figure out whether it's possible for get wget to
        authenticate to a web page protected by a login form ('post'
        method to send username/pass, and cookies.)  Cookies don't seem
        to be the problem, with --save-cookies and --keep-session-cookies
        but getting the username/password submitted isn't doing it.  On
        this particular page, getting to a link, let's say 'example.aspx',
	...
2006/6/29-7/3 [Computer/SW/Languages/Perl] UID:43527 Activity:nil
6/29    Visual Programming in Perl:
        http://search.cpan.org/dist/Acme-EyeDrops/lib/Acme/EyeDrops.pm
	...
2005/9/2-3 [Computer/SW/Languages/Perl] UID:39466 Activity:nil
9/2     Hey motd I used to have perl w/DBI 1.42 & DBD 2.9003. After
        upgrading Perl, DBI 1.48, & DBD 3.0002_1 I'm seeing something
        really weird. The following used to work:
        $dbh=$DBI->prepare("INSERT INTO data VALUES(\?)");
        for ($i=0; $i<10; $i++) {
          if (!$dbh->execute($i)) {
	...
2005/8/31 [Computer/SW/Languages/Perl] UID:39376 Activity:nil
8/31    Looking for an XML parser for Perl, preferably one that
        doesn't require installation (something already built in).
        If it's not already built in, I prefer something that doesn't
        require C compilation, and that I can just stick the *.pm
        to use. I'm looking for portability, not performance. Thanks.
        \_ What's wrong with using CPAN?
	...
2004/4/10-12 [Computer/SW/Languages/Perl] UID:13128 Activity:nil
4/10    In perl, how do I get time precise to the milisecond? The CPAN module
        requires recompilation and root access to install it, I'm looking for
        something more portable. Thanks!
        \_ If you need to know the time, there's no portable way to do it
           without modules.  However, if you just want a sub-second delay,
           you can do it with select -- for example, select "", "", "", 0.1;
	...
2004/4/12 [Computer/SW/Languages/Perl] UID:13154 Activity:nil
4/12    What's a good perl module (cpan) that strips off all the html
        tags and javascript crap? And perhaps be smart enough to strip
        off menus and ads? Thanks.
        \_ lynx -dump <pagename>
        \_ s/<[^>]*>//g
	...
2004/3/29-30 [Computer/SW/OS/FreeBSD, Computer/SW/OS/OsX] UID:12920 Activity:high
3/29    I'm installing binaries for both OsX and Linux and I'd like all the
        users to have /usr/bin/<files> to be accessible. I thought about
        /usr/bin/<files> for generic stuff (like scripts) and
        /usr/bin/<platform>/<files> for platform specific things.
        What is the correct approach to this?
        \_ there are obviously several ways to do this, and "correct" is mostly
	...
2004/3/30 [Computer/SW/OS/FreeBSD, Computer/SW/OS/OsX] UID:29888 Activity:high
3/29      I'm installing binaries for both OsX and Linux and I'd like all the
          users to have /usr/bin/<files> to be accessible. I thought about
          /usr/bin/<files> for generic stuff (like scripts) and
          /usr/bin/<platform>/<files> for platform specific things.
          What is the correct approach to this?
        \_ there are obviously several ways to do this, and "correct" is mostly
	...
2003/8/29-2004/2/14 [Computer/SW/Languages/Perl, Computer/SW/Unix] UID:12252 Activity:nil
2/13    Does perl have a "diff" facility? I have something that requires a
        lot of diff but file I/O using unix diff would be too slow. Thanks.
        \_ Text::Diff?  Really.  You could search cpan for this sort of thing.
	...
2003/9/9 [Computer/SW/Languages/Perl] UID:10121 Activity:high
9/8     Any recommendations for a text-based Yahoo instant messanger app
        for linux that logs.
        \_ Yahoo::Messenger
           \_ what do you mean, there isn't a CPAN module by that name.
              \_ Sorry, Net::YahooMessenger, but really, you could have
                 tried searching.
	...