@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15



Comments:

<0> the book is called lisp, and is written by patrick henry winston and berthold klaus paul horn
<0> once i finish this one i will probably go to pcl
<1> Not bad, but A Gentle Introduction is probably smoother.
<2> plutonas: I haven't looked at it, but I imagine it's ***umes a bit more CS knowledge than you might have.
<1> plutonas: http://www.cs.cmu.edu/~dst/LispBook/
<3> plutonas: I learned CL with touretzky's book when I was in high school. Well written and it explains things very thoroughly.
<4> I'm struggling with getting slime/emacs and sbcl to play along. For example, in debian I installed cl-ppcre and I'm not sure how to make it "seen" in my code; Do I need to add some magic to a ~/.sbclrc? I added (asdf:oos 'asdf:load-op :cl-ppcre) to the top of my file, but when I try compile-and-loading it, I still get unresolved namespaces, etc
<5> The first chapters of Lisp 3rd edition don't ***ume any CS knowledge, they are just a fine introduction to Lisp.
<6> pkhuong, the intro to symbolic computation?
<3> defcon8: yes.
<6> more effective than PCL?
<6> I bought PCL
<2> I learned lisp from the elisp tutorial and reference.
<7> I tried to learn lisp from the eslip tut
<2> defcon8: That intro book is /extremely/ slow going if you know a bit of lisp.
<0> well i have 2nd edition



<3> defcon8: I don't know, PCL came out a couple years after I'd read dst's book. PCL doesn't try to teach you programming, though.
<2> (Touretzkys book, that is.)
<2> (Well, if you know Lisp and programming, at least.)
<6> yeah
<6> that's why I got PAIP and SICP with it
<8> I think SICP should be read before anythign
<6> there are a few things I can't do in sicp such as integration so I'm teaching myself that first
<8> so that you can then read PCL and un-learn everything :-\
<2> Cowmoo: If you've read and understood SICP, there isn't much point in reading dst's book.
<7> is PAIP avaiable online?
<6> no
<2> (I /think/; I've only browsed it.)
<6> fax, I got it really cheap for 32 quid. not too much
<8> rydis: actually I read SICP up to 1/3 into chapter 4 and did all the exercises up to there
<8> and am reading PCL now
<7> im reading the art of prolog, its awesome :D
<7> also CL for AI programming is really cool
<8> but am having to unlearn the functional style of SICP
<3> rydis: dst's got the most awesome metaphor for recursion ever ;)
<7> what is the metaphor?
<3> fax: read the book!
<2> pkhuong: I didn't really need that when learning Lisp, though, since I knew SML and Haskell before starting to learn Lisp in earnest.
<7> sigh :/
<2> fax: It's freely available on-line, so it's not that much trouble.
<7> oooooh
<7> what is the full title?
<2> <URL: http://www.cs.cmu.edu/~dst/LispBook/ >
<7> :D
<7> thank you very much!
<3> rydis: did you go Haskell -> SML -> CL? (i.e. antichronological order)
<2> pkhuong: No.
<3> too bad, it'd have been fun to try and extrapolate.
<9> cowmoo: what's wrong with functional style?
<2> pkhuong: BASIC, 6510 ***embler, Pascal, SML, Ada, 6809 ***embler, sh, ObjectPascal, SQL, Haskell, Lisp, Prolog, Java, in roughly that order. (I might have missed one or two languages.)
<8> therp: nothing, I quite like it...but looks like Common Lisp discourages it? I don't know...I'm still learning
<2> Cowmoo: Functional style is fine, but state is useful, sometimes, and iteration can be more efficient in practice.
<10> rydis, how did 6510 ***embler compare to 6809 ***emeber?
<9> cowmoo: well, most CL compilers are pretty good at cons cell recycling so, as long you are just consing you're fine at CL.. but yes, true CL itself doesn't encourage it..
<2> dmiles: Pretty similar. (6510 as in Commodore 64.)
<10> rydis, i learned the 6809 (trs-80 coco2) on my own then 6502 in school (***uming 6510 was simular to 6502 appl2e) i was so frustrated by the lack of features took for granted on 6809
<10> rydis, but was hopng you'd say the 6510 ****ed compared to 6809 ;)
<2> dmiles: The C64 stuff was when I was 13-14; I never did very much serious stuff. The 6809 stuff was at uni, in courses, so it was a bit more focused.
<2> (Plus, I've repressed most of my childhood, it seems; I don't remember much at all from before I was 17 or so.)
<7> (concatenate 'string "a" (if t (values "b" "c")))
<7> why does this return "ab"
<10> rydis, *nod* 12-14yo as well
<11> T is always true?
<3> fax: it only uses the first value.
<2> fax: Because concatenate only looks at the primary return value.
<7> wh?
<11> ah.
<7> can I do this without concatenate'ing twice?
<3> fax: because multiple values are ignored by default (and default to nil)
<3> fax: apply.
<11> fax: to use secondary values, you must bind them or use multiple-value-* special forms.
<12> or nth-value
<11> apply & multiple-value-list would work
<3> or m-v-call
<7> (apply #'concatenate (append (list 'string "a") (multiple-value-list (if t (values "b" "C")))))
<7> lol :(
<11> m-v-call is even better!



<2> (multiple-value-call 'concatenate 'string "a" (if t (values "b" "c")))
<7> oh wow
<7> that is great
<11> it's like apply for multiple-values (:
<12> (apply #'concatenate 'string "a" (multiple-value-list (if t (values "b" "C"))
<3> antifuchs: one of the hidden gems on CL for me. I discovered it only when I wrote my codewalker :)
<12> if you want to use apply. but m-v-c is better
<11> indeed (:
<7> that is cool
<11> pkhuong: I always think of it last, but it's definitely the coolest thing out there (:
<11> fax: mvc even allows you to use more than one set of multiple values
<2> A SSC would optimize away the m-v-l and turn the apply to m-v-c, so it doesn't need to cons up a list; I /think/ Python does that in some occasions.
<11> (multiple-value-call #'concatenate 'string "a" (values "b" "c") (values "d" "e")) ; returns what you'd expect
<2> (But that's just vague recollections of reading that somewhere. It might have been in a "Wouldn't it be nice if ... ?" context.)
<11> kpreid: yeah, that is a good (and nasty, at the same time!) idea (:
<13> (defun foo (&key (directory nil directoryp) ...) (multiple-value-call #'make-pathname :directory (when directoryp (munge-directory directory))))
<13> er
<3> fax: that code will bomb if the condition evaluates to nil, though. You probably want (if condition (values "a" "b") (values))
<13> (defun foo (&key (directory nil directoryp) ...) (multiple-value-call #'make-pathname (when directoryp (values :directory (munge-directory directory)))))
<14> rydis: I'd be surprised if sbcl did that
<7> pkhuong: ugh would have probably discovered that the hard way otherwise,
<7> thanks
<7> (multiple-value-call 'concatenate 'string "a" (if nil (values "b" "c")))
<7> it deletes unreachable code :/
<11> fax: yes, because the VALUES form is never evaluated
<3> fax: well yes... Why wouldn't it?
<7> well it doesnt bomb
<2> froydnj: It might have been in some very specific context. (IIRC, the discussion was about CMUCL, either in cll, the mailing lists, the documentation, or the internals doc.)
<7> it just gives "A"
<11> also, note that (multiple-value-call #'values (call-next-method) 'additional-value 'more-value) works. wheee.
<3> oh right. nil is also a sequence.
<13> fax: "deleting unreachable code" doesn't mean it's not going to do what you said; it means something will never be executed
<14> antifuchs: fun!
<11> froydnj: yeah!
<2> antifuchs: Ooh. That's a cunning idiom to keep in mind.
<11> fax: what do you think (if NIL something) should do, anyway?
<7> nil
<7> oh I see
<7> (values) is not nil
<7> but concatenate will just skip the nil if its making a string
<13> no, it will 'skip' the nil no matter what kind of sequence it's making
<13> because nil is an empty sequence
<15> http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=230075617970
<0> SurfnKid: are you sure you want this?
<0> lol
<7> no he wants you to buy it
<0> now i got it, thats why he got in here and then directly out
<0> of course i want buy it :P
<0> wont* lol
<11> what, spamming isn't an effective advertising technique?
<11> hmm (:
<0> i would never buy a dell: http://www.google.com/search?q=dell%20explode
<3> antifuchs: lim x->0+ x/0 is still pretty large.
<2> The sad thing is that, apparently, it is. Way higher rate of new customers than from traditional ads or paper spam.
<11> how I wish you two were wrong /-:
<11> good night (:
<7> how do I turn a unicode string into an unsigned-byte 8 string?
<7> coerce?
<16> What is `an unsigned-byte 8 string', and what Lisp system's notion of `Unicode string' are you referring to?
<12> strings aren't made of numbers
<7> well I have a string which has 4 unicode symbols in it
<12> you want an array of numbers? what do you want the numbers to be?
<2> fax: Look at flexi-streams, perhaps.
<7> but I want to get the 12 (or however many) numbers
<17> do many people in here use Parenscript? I'm trying to get a sense of how popular it is
<12> fax: numbers that represent what? UTF-8? UTF-16?
<7> see this for example: ;
<7> I want to take that as input and turn it to #xE2 #x84 #xBB
<7> atm though, it outputs #x8507
<12> fax: outputs to what? how? do you want to change the external-format on your file when you open it?
<7> I would not like to change the external-format of anything
<7> I have an actual string ";" that I want to turn into 3 numbers, basically
<7> I just dont really know what functions I would/could use


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #lisp
or
Go to some related logs:

VolGroup00 clone
solaris ppsd
#mysql
#gimp
#perl
gnome-bittorrent port
#perl
#perl
ubuntu eggdrop configure: error: no acceptable C compiler found in $PATH
#ubuntu



Home  |  disclaimer  |  contact  |  submit quotes