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

1999/8/17-18 [Computer/SW/Languages/Functional] UID:16331 Activity:moderate
8/17    Having forgotten all my LISP, how do I evaluate multiple LISP
        expresstions if a condition is true?  ie. Something similar to this
        in C: "if (a == 1) { fn1(arg1); fn2(arg2); fn3(arg3) }"
        \_ (if (= a 1)
              (define results (list (fn1 arg1) (fn2 arg2) (fn3 arg3)))
              (define results #f))
           that will give you a list of your results (or just run the
           functions for you [you can trash the list]).  If a is not 1
           then it will give you #f as your results.  Note: This will work,
           but it is not in the normal style of LISP, everything should
           call everything else.
        \_ what flavor of lisp?  in scheme there is (begin <expr> <expr> ...)
           which evaluates all expressions in order for side-effects and
           evaluates to the value of the final expression.
           \_ elisp in emacs19.34.1.  Thx.
        \_ a.)
            (cond
             ((eq a 1)
              (fn1 arg1)
              (fn2 arg2)))
           b.)
            (when (eq a 1)
              (fn1 arg1)
              (fn2 arg2))
           c.)
            (if (eq a 1)
               (block nil
                 (fn1 arg1)
                 (fn2 arg2)))
             -- ilyas
2024/12/25 [General] UID:1000 Activity:popular
12/25   

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
	...