Berkeley CSUA MOTD:Entry 13234
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/11/23 [General] UID:1000 Activity:popular
11/23   

2004/4/16-17 [Computer/SW/Languages/Functional] UID:13234 Activity:high
4/16    So, here's a question.  I'm learning Python, and it seems to me that it
        includes a lot of the power of Scheme or Lips, with out the wierdness.
        Would Python make a better introduction to CS language than Scheme?
        \_ Dunno, why don't you just ask Ping, he taught a 61A style course
           in python at Cal.  He claims it was good.  I still haven't yet
           found a good dollar Return on Investment for the time I spent
           using scheme.  ping's URL : http://zesty.ca/bc/info.html -pst
           \_ We had a similar thread on this involving sysadmins.  If you
              want ROI on your time, get out of CS and leave it to people who
              want to be doing it.  Go do banking or something. -- ilyas
              \_ you seem to be forgetting all about systems. systems people
                 probably almost never use scheme per se, though granted,
                 competent ones probably make use of concepts/techniques from
                 the functional languages.
                 \_ Did you actually read what my objection was?  At any rate,
                    plenty of 'systems' people use functional languages, if
                    not necessarily scheme itself. -- ilyas
           using scheme. - pst
        \_ Read Norvig's essay on python.  Languages which don't understand
           lisp are forced to reimplement it, badly.  I find python a lot
           less intuitive than either lisp or scheme.  YMMV. -- ilyas
           \_ Link?  All I could find was Python for Lisp Programmers.
              \_ That's the one.  It compares python to lisp in various ways.
           \_ Link?  All I could find was Python for Lisp Programmers.
                   -- ilyas
           \_ Agreed.  What's so weird about Scheme?  There are almost no
              syntax rules in Scheme; the language is very self-consistent and
              uniform.  Python seems to have a lot of extra, unnecessary
              syntactical baggage that doesn't improve language
              expressiveness.  I also can't understand why Python has such
              crippled lambdas.  As for the original question about it being
              a better intro language than Scheme, until Abelson and Sussman
              rewrite SICP to use Python, I'd say no.
              \_ Well, yes SICP would be the problem.  But imagine we're
                 in fairy land where SICP is available for EVERY lanugage...
                 in fairy land where SICP is available for EVERY lanugage...
                 \_ python sicp: http://www.ibiblio.org/obp/thinkCSpy - pst
        \_ There's nothing really "weird" about Lisp. I don't understand why
           people think Lisp is any "weirder" than Prolog, Eiffel, Modula-2
           or any other language. Just because it's not an ALGOG derived
           language doesn't mean it's more or less difficult to learn.
           -- williamc
           \_ Ok, I like prolog, and use it frequently, but even I admit it's
              'weird.'  It has a whole different programming paradigm all to
              itself. -- ilyas
              \_ I haven't used it much, but it seems to be a very or perversely
                 specialized kind of FP.
                 \_ Prolog is not functional programming, although you can sort
                    of think of it that way if you squint and don't look too
                    hard.  Prolog programs are statements which are true, and
                    prolog flow of control is a proof search.  I found I
                    couldn't really grasp prolog by just pretending it's scheme
                    without parens, you really need to think about statements
                    and proofs to program prolog well. -- ilyas
                    \_ You can write in FP so that all your functions return
                       boolean and the only operator you use is AND with early
                       termination.  And then adjust the eval loop so it takes
                       falsehood as failure rather than falsehood.
                       \_ ... and you still wouldn't get prolog.  You would
                          need OR, and cuts, and superlogical features of
                          prolog like setof.  And you would need to implement
                          the non-local prolog failure (which to do properly
                          requires non-trivial messing around with exceptions
                          or continuations).  Like I said, you could sort of
                          do it, but you wouldn't be a very good prolog
                          programmer.  Doing prolog properly in FP would just
                          entail implementing a prolog interpreter.
                          Look at
                 \_ python sicp: http://www.ibiblio.org/obp/thinkCSpy - pst
                    couldn't really grasp prolog by just pretending it's scheme
                    without parens, you really need to think about statements
        \_ There's nothing really "weird" about Lisp. I don't understand why
           people think Lisp is any "weirder" than Prolog, Eiffel, Modula-2
           or any other language. Just because it's not an ALGOG derived language
           doesn't mean it's more or less difficult to learn. -- williamc
                          requires non-trivial messing around with exceptions
              stuctures is pretty odd.  As Norvig points out "Python seems to be
              easier to read than Lisp for someone with no experience in
                    and proofs to program prolog well. -- ilyas
                          http://www.bushong.net/david/comparisons/powerset.html
                          or continuations).  Like I said, you could sort of
                          do it, but you wouldn't be a very good prolog
                          programmer. -- ilyas
           \_ Oh, I don't know, the whole pair/cons/list way of building data-
                          and think about why the prolog is algorithmically so
                          different from the others. -- ilyas
           \_ Oh, I don't know, the whole pair/cons/list way of building data-
              either language."
              \_ I can agree with that. Lisp's parentheses explosion is not
                 as easy for me to read anyway. Personally I found Ruby to be
                 very easy and elegant, although the block-passing syntax
                 can get a bit odd. It has very easy-to-use classes
           \_ Ruby is closer to smalltalk than Python.
           \_ Oh, I don't know, the whole pair/cons/list way of building data-
              stuctures is pretty odd.  As Norvig points out "Python seems to be
              easier to read than Lisp for someone with no experience in
              either language."
                 and objects too, unlike scheme. Python's a bit messier but
                 has the same stuff (Python's "len()" bothers me.)
              stuctures is pretty odd.  As Norvig points out "Python seems to
              be easier to read than Lisp for someone with no experience in
              either language."
              \_ I can agree with that. Lisp's parentheses explosion is not
                 as easy for me to read anyway. Personally I found Ruby to be
                 very easy and elegant, although the block-passing syntax
                 can get a bit odd. It has very easy-to-use classes
                 and objects too, unlike scheme. Python's a bit messier but
                 has the same stuff (Python's "len()" bothers me.)
                 \_ And processing lists (which is actually very intuitive
                    for anybody who has taken introductory set theory) is
                    somehow stranger than processing
                    while (<>) { if ( $_ ~=/foo/) { s/bar/baz/}}? I don't know
                    but it took me about 30 minutes to learn scheme, whereas
                    it took me a solid week to just learn the basics of C,
                    and another month to do something useful with it.
                    \_ are you replying to the right person? I mentioned Ruby,
                       not Perl or C.
        \_ Personally, I think Smalltalk, which Python is closely based on,
           is better than both Lisp or Python. Lisp has a lot of great things
           but the problem is that there is no syntax to the language. The
           human has to be the compiler (and, when debugging, the decompiler).
           Dylan on the other hand...
           \_ Ruby is closer to smalltalk than Python.
2024/11/23 [General] UID:1000 Activity:popular
11/23   

You may also be interested in these entries...
2011/4/16-7/13 [Computer/SW/Languages/Python] UID:54086 Activity:nil
4/16    Whoa, I just heard that MIT discontinued 6.001 (classic scheme)
        to 6.01. In fact, 6.00, 6.01 and 6.02 all use Python. What the
        hell? What has the world become? It's a sad sad day. SICP forever!
        \_ old story, they've ditched that shitty book and lang for a while.
        \_ I used to think scheme was cool, then I saw Ka Ping Yee's
           "Beautiful Code" class aka 61a in python, and converted.
	...
2010/1/12-29 [Computer/SW/Apps/Media] UID:53627 Activity:kinda low
1/12    How do I get a job NOT related to internet DNS social network cloud
        twitter GOOG EC2 amazon API ???
        \_ A CS job not related to API?
        \_ Chip design, or maybe software that does chip design. What is
           your major? How about game developer?
        \_ DNS? DNS? What era ado you live in? I agree that social network
	...
2009/7/21-24 [Computer/SW/Languages/Java] UID:53168 Activity:moderate
7/20    For those who care btw, it looks like eclipse is now A Standard Tool
        at UCB ugrad cs, probably replaced emacs.  Furthermore, people get
        angry at seeing Makefiles, (since eclispe takes care of that).  I
        guess it's just a sign of the times.
        \_ The more people at my work use eclipse the less the code is
           managable in emacs.  I'm not sure which application's fault
	...
2009/4/24-28 [Computer/SW/Languages/Functional] UID:52902 Activity:nil
4/23    what book is this?
        "I'm reading this horrible horrible book about a programmer
         from silicon valley that gets magically
         transported into some world where magic is real
         and uses computer programming skillz to become the world's
         greatest sorceror … in book 1 of the series
	...
2008/12/17-2009/1/2 [Computer/SW/Languages/Functional] UID:52267 Activity:nil
12/17   wtf is happening to the dollar?
        http://quotes.ino.com/chart/?s=NYBOT_dx
        \_ People are finally taking Bernanke seriously when he says he
           is going to print as many dollars as he has to, to reinflate
           the dollar.
           is going to print as many dollars as he has to, to kill deflation.
	...
2008/12/18-2009/1/2 [Computer/SW/OS/Linux, Computer/SW/OS/Windows] UID:52273 Activity:nil
12/18   Are any of you using any kind of scheme involving, e.g., running
        multiple copies of web browsers in virtual machines so that the
        copy you use for random web browsing is isolated from the copy you
        use for financial transactions? What other sorts of schemes like
        this are people using that aren't a total PITA? P.S. I am talking
        mainly about Windows; on Unixes you could always run stuff under
	...
Cache (5514 bytes)
zesty.ca/bc/info.html
Short Description This course will introduce you to the Python programming language from a design point of view , with an emphasis on practical ways to use Python to make your computer more useful to you. Youll learn about string processing, object-oriented programming, e-mail handling, and Web site scripting, while getting experience with good programming practices like code review, testing, debugging, and refactoring. Python is an interpreted, object-oriented programming language that runs on just about any popular operating system. It has very clear syntax, provides useful high-level built-in types, and comes with a large and capable standard library. It is often compared to other languages such as Perl, Tcl, Scheme, or Java. You should have done some kind of programming before taking this course. We wont spend time explaining what it means to program a computer, though well quickly go over basic programming ideas as part of introducing how things are done in Python. If youve taken a programming course before, the course probably taught Scheme if youre lucky, or Java, or C, or C if youre not so lucky. But do you ever write programs to save yourself time and effort, to get your computer to help you get things done? If you already write programs for yourself or, say, a website, you might find that Python works better for some purposes. If you dont program for yourself, maybe thats because its too much trouble to write programs, or to set up the language tools on your computer. Python will be a refreshing change: its one of the easiest languages to use, to read, and to learn, and yet it gives you a lot of power. I hope this course will give you a new level of control over your computer and open up a range of possibilities for you to use it in new and productive ways. If youve never written a program before, this course might not be for you. However, if youre technically inclined, keen, and willing to do some exploration on your own, talk to me about taking the course. I personally think Python is the best choice of a first language for most people who want to learn how to program. Writing a Python program is one of the quickest ways to get your computer to do something for you. The syntax is simple, which makes it much easier to read and write than many other languages. Ten lines of Python can often do more than 30 lines of Java or 100 lines of C. Scheme might be able to express more in ten lines than Python can, though most people would find Python easier to read than Scheme. Python comes with a library of useful tools to take care of many common tasks, like downloading files or handling e-mail. Lots of people use Python, even though it isnt marketed as heavily as Java or as widely known as Perl. Python is used extensively in many places , including Google, Yahoo, Infoseek, NASA, tons of startups, industry research labs, and national research labs like LANL and LLNL. Ive been using Python for a while now, and gotten to be friends with some of the nice Python folks . Please feel free to write to me with any questions you have about the course. Enrollment There are two sections, one for lower division and one for upper division, but theyre the same course. In order to enroll, you must fill out the online survey and you must attend the first class . Prerequisites You should have done some sort of programming before. If you havent, but youre really keen, have a technical mind , and an appetite for tinkering , talk to me about taking the course. If you arent already comfortable with using a text editor any editor is fine or installing software on your computer, then this course probably isnt for you. You will need to have a computer, or access to a computer account on campus the OCF provides free computer accounts for Berkeley students. We wont require any special tools beyond Python and a text editor. Course Goals Python is good for writing programs for yourself , and for other people . By the end of the course: You should be able to make your computer more useful to you, by automating simple tasks with Python programs. You should be comfortable having other people look at your code, and comfortable looking at code written by others. Meetings Well meet weekly on Wednesdays from 4pm to 6pm in 320 Soda Hall. I really want to encourage you to get used to looking at code, so well spend the first part of each class reviewing and discussing everyones work, and then the second part of the class teaching new material. I realize it may sound a little scary to have everyone looking at your work. Dont let that frighten you: I want you to get used to the idea because thats what happens in real life, and come to be proud of what you write. Each assignment will be due at 6 pm on the Monday after it is assigned so that there is time to have them graded before the next class. All of the work you do will be posted on this web site for other students to look at. The idea is that youll have all weekend to do the assignment, Ill get them and post them on Monday, Ill grade them on Tuesday, and youll have a day if you want to look at everyones work before class on Wednesday. There will also be a final project, which should result in a program that you can go on using after this course is over. Ill suggest some topics for final projects, but theyre only ideas; I will be looking for project proposals from you by the eighth week of class March 12. Grading Every assignment will get two grades : one for correctness, and one for readability.
Cache (92 bytes)
www.ibiblio.org/obp/thinkCSpy -> www.ibiblio.org/obp/thinkCSpy/
Downey , Jeffrey Elkner and Chris Meyers Printed copies now available from Green Tea Press .
Cache (323 bytes)
www.bushong.net/david/comparisons/powerset.html
Programming Comparisons: Power Set Programming Comparisons: Power Set Problem: give the smallest possible complete subroutine/function/method definition in a language of your choice which, when called with a list, array, whatever, returns the power set of that list. It may be in any order, but must not contain duplicates.