Berkeley CSUA MOTD:Entry 50704
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/25 [General] UID:1000 Activity:popular
5/25    

2008/7/28-8/5 [Computer/SW/Languages/Python, Computer/SW/Languages/Functional, Computer/SW/Languages/OCAML] UID:50704 Activity:nil
7/28    So, I'd like to try playing with a functional language.  Any
        recommendations?
        \_ Haskel.  Why would you start with anything else?
        \_ Haskell if you want a _functional_ language.  Ocaml if you want to
           see what a proper language implementation looks like.  LISP if
           you want old fogies to think you are cool. -- ilyas
        \_ Haskell.  Why would you start with anything else?
           \_ I don't know.  I've heard Erlang has been used more in industry.
              (Isn't Google using it for something?)  I don't really know
              the differences.
              the differences.  Sisal was for scientific computing, which is
              the area I work in.  F# includes OOP (but I'd rather work in
              Linux.)
              \_ Are you learning this to learn or are you learning it to
                 get industry experiance?  If the second I'd say spend your
                 time elsewhere.  Haskell is one of those languages where once
                 you start to understand how to actually use it this light
                 will come on in your brain and suddenly you will never see
                 programming in quite the same light.  Erlang is cool, but
                 has a lot less support library support/people out there
                 messing with it, so actually trying to do anything with
                 it is hard.  OCaml is pretty damn cool as well, but really,
                 if you want to wrap your head around pure functional
                 programming, the language you should start with is Haskell.
                 Oh, and you want this book: http://www.haskell.org/soe
                 \_ Oh, and another thing.  Haskell is also good because it
                    makes it really hard to cheat and do things in a non
                    functional manner.  Its purity is its strength.
                    \_ Ah, that's a good point. -op
                 \_ Well, mostly I would just like to learn about functional
                    programming to learn.  But I generally like languages I
                    learn to be useful for something as well, otherwise I
                    never get to use it.  For example, I like Ruby better than
                    Python, and learned it to learn it.  However, everything at
                    work uses Python, so now I've forgotten most of the Ruby.
                    Thanks for the book ref.
                    \_ Really learning Haskell will make you a much better
                       programmer, even if you never use it for anything.
                       It really forces you to relearn a lot of things in
                       ways you probably never even considered, and once you
                       finish bashing your head against it and it starts
                       making sense you will be a much stronger coder.
2025/05/25 [General] UID:1000 Activity:popular
5/25    

You may also be interested in these entries...
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/4/2-6 [Computer/SW/Languages/C_Cplusplus] UID:49645 Activity:moderate
4/2     Is there an interpreted version of C or C++ that can be used for
        educational purposes? It doesn't have to be full-featured or
        strictly adhere to the standards, but it's painful for students
        to change a variable in a for loop and then wait for a compile
        to see how it changes the result. Something really lightweight
        would encourage them to play around a lot more and learn more in
	...
2007/8/30-9/3 [Computer/Theory] UID:47837 Activity:nil
8/30    what AI is editing the motd?  that's some next level shit.
        \_ Sorry. -- ilyas
        \_ ilyas -> i l y a s -> s l y a i -> Sly AI
           \_ ilya shpitser -> lisp hysteria
	...
2007/3/7-11 [Computer/SW/Editors/Emacs] UID:45897 Activity:moderate
3/7     In emacs 21, is there a way in Emacs-Lisp to detect whether emacs was
        started with the "-r" switch?  In C mode, the syntax colors are
        different when I start emasc with and without "-r".  I want to do the
        same in my elisp code, but I can't find how this is done in cc-mode.el.
        Thanks.  -- yuen
        \- are you sure what you are talking about is being done by the cc*.el
	...
2007/2/9-11 [Computer/SW/Languages/Java, Computer/SW/Languages/JavaScript] UID:45694 Activity:low
2/9     Looking for a Javascript slider bar example. The first example
        on Google is horrible-- initialization code all over the place,
        global variables, method conventions suck, etc. Thanks!
        \_ I don't have an answer for you, but what do you think of this
           article?  http://ajaxworldmagazine.com/read/333329_p.htm
           \_ From the article:
	...
2006/8/11-14 [Computer/SW/Languages/Perl, Computer/SW/Languages/Functional] UID:43974 Activity:low
8/11    How do you find out the max # of file descriptors for a process,
        thread, and entire system?
        \_ Dep on OS. Are the youth today assuming "linux is the standard"?
           That is kinda sad.
           \_ LINUX RUUULES!  W1ND0ZE DR000LEZ!
        \_ while(true) { do(something that uses a fd) if (good rc) counter++; print }
	...
2006/3/17-18 [Computer/SW/Editors/Vi, Computer/SW/Editors/Emacs] UID:42280 Activity:moderate
3/16    I'm looking to troll the motd. What are some good topics guaranteed
        to get results?
        \_ sex!
        \_ Easy.  Anything of interest to more than 1 person that isn't
           resolvable.  Next!
        \_ http://www.trollwars.com  -John
	...
2006/2/21-23 [Computer/SW/Languages/Java] UID:41939 Activity:nil
2/21    What is the best way to get the current method name in Java?  So far
        I have seen 3 approaches:
        1. Create new Exception, grab the first frame off its stack trace.
           Inelegant, requires creating a stack trace (expensive).
           \_ Yeah it sucks.  Yeah it does much more work than you need.
              Yeah it is really fragile and may break when you switch java
	...
2005/12/11-14 [Computer/SW/Editors/Emacs, Computer/SW/WWW/Browsers] UID:40964 Activity:kinda low
12/11   Since the SSH change, I've been getting the following error
        message in Outlook Express:  "The certificate's CN name does not
        match the passed value".  How can I get rid of this message?  I'm
        guessing it has to do with the certificate I'm using.  I got it from:
        <DEAD>soda.csua.berkeley.edu:995<DEAD>  It's called "localhost".  Do I
        need to use a new POP server?  Right now I'm using
	...
2005/7/15-18 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Java] UID:38653 Activity:moderate
7/15    Is it possible through JNI to write a function which takes a float[]
        array and through the magic of c casts it to an int array and then
        returns the int array to Java, not modifying the actual data?
        If not, is there a good Java way to do the C equivalent of:
        int* i = (int*) f; ?
        Don't ask whether I really need to be doing this because there is a
	...
2005/6/21-23 [Computer/SW/Languages/Perl] UID:38230 Activity:high
6/21    My math and/or perl fu is weak. Is there a way to get integer
        multiplication in Perl the way it's done in C? i.e. limiting
        to 32 bits. Like 1588635697 * 1117695901 = 1166976269 in C.
        \_ Can't you just multiply and then mask all but the last 32 bits?
           \_ I don't think so; that's not the same as mult overflow.
              > perl -e 'print (1588635697 * 1117695901)'
	...
2004/9/9-10 [Computer/SW/Languages/OCAML, Computer/SW/Languages/Perl] UID:33448 Activity:high
9/9     Why are there so much politics on the motd? Isn't this the
        CSUA? Doesn't the C stands for something computer??
        \_ Its stands for Computer Stuff and Unrelated Arguing
           \_ Golf clap.
              \_ I didn't know there even was such a thing as a golf ho,
                 and you're telling me they've got their own VD's?
	...
2004/7/1-2 [Computer/SW/Unix] UID:31106 Activity:insanely high
7/1     Using sed, how do I do the following?  I want to replace the
        first line containing a particular pattern with the 2nd line
        containing said pattern.  For example, if "line" is the pattern,
        then I want
                this is the 1st line
                this is the 2nd
	...
2004/6/25-26 [Computer/SW/Languages/Java] UID:31013 Activity:insanely high
6/25    What percent of security holes would be solved by banning strcpy()
        in favor of strncpy()?
        \_ probably not much, since they're all coming to be php bugs these
           days.
        \_ Or using Java instead of C (no buffer overrun)?
                \_ It is not always possible to use java. I have customers
	...
2004/5/21-22 [Computer/SW/Compilers] UID:30345 Activity:very high
5/21    I was not a CS major and never took the compiler class.  What is
        a good book to help me write a compiler?  And what about interpreter?
        Do they basically involve the same issues except code generation and
        optimization?
        \_ Use the book by Robert Mak, called "Writing Interpreters and
           Compilers in C++." It's a practical, hands-on "lab" type book which
	...
2004/5/20-21 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/OCAML] UID:30334 Activity:insanely high
5/20    I have seen some ocaml comments on the motd.  What about Haskell?
        Is it better/worse/about the same?  I know it is supposed to "pure"
        but don't know what this translates to in reality.
        \_ Haskell is the only language I want to know something about, yet
           know almost nothing about.  I know it's not speedy, unlike ocaml,
           but has lots of clean ideas, and you can write really short code in
	...
2004/5/11-12 [Computer/SW/Languages/OCAML, Computer/SW/Languages/Functional] UID:30169 Activity:very high
5/11    To FP activists on the motd, if currying is such a great idea, why
        it's not implemented symmetrically in say Caml?  It seems more
        natural to treat the arguments of a function more symmetrically.
        \_ If by 'symmetric' you mean that if, for example, I have a function
           f of two arguments a and b, I should be able to curry on either
           a or b, then Ocaml does this using labeled arguments.  Caml does
	...
2004/4/30-5/1 [Computer/SW/Compilers, Computer/SW/Languages/C_Cplusplus] UID:13508 Activity:moderate
4/30    Quick C++ question. In Meyer's More Effective C++, Item 22, he has
        a snippet of code like this:
        template<class T>
        const T operator+(const T& lhs, const T& rhs)
        {
          return T(lhs) += rhs;
	...
2004/3/3-5 [Computer/SW/Languages/Functional] UID:12505 Activity:nil
3/3     I feel like messing with Scheme. I forgot all my CS61A. Do we have
        a scheme program here, and how do I run it?
        \_ type 'scm'
           \_ thanks.
        \_ if you want to dabble in common lisp, you can download an
           evaluation version at http://www.franz.com
	...
Cache (836 bytes)
www.haskell.org/soe -> www.haskell.org/soe/
Rather than using the conventional mathematical examples commonly found in other programming language textbooks, the author draws examples from multimedia applications, including graphics, animation, and computer music, thus rewarding the reader with working programs for inherently more interesting applications. Aimed at both beginning and advanced programmers, this tutorial begins with a gentle introduction to functional programming and moves rapidly on to more advanced topics. An underlying theme is the design and implementation of domain specific languages, using three examples: FAL (a Functional Animation Language), IRL (an Imperative Robot Language), and MDL (a Music Description Language). Details about programming in Haskell are presented in boxes throughout the text so they can be easily referred to and found quickly.