@# 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



Comments:

<0> both blur the distinction between interpretation and compilation
<0> the list goes on
<1> and the winner of the "worst c.l.l nonsense of the day" award is, once again, John Thingstad
<0> oh, both are famous (or infamious) for having no syntax, in the conventional sense
<2> jsnell: back after an absence
<0> IOW, syntax is user-defined (with macros and compile-time words, respectively)
<0> ah, nifty: http://www.cfcl.com/~eryk/weblog/archives/000129.html
<0> that goes into it in a bit more detail
<3> AI_coder: forth is a much more crude and low-level language than CL. Note that "crude" isn't intended to be pejorative. Forth is much more lightweight, etc.
<3> AI_coder: It's also not aimed at symbolic processing.
<4> jsnell: "Why is lisp fast"?
<2> michaelw: that's not all
<2> he's on a roll
<3> AI_coder: in some ways, one could say that Scheme is closer to forth than cl.
<5> rpg: That is currently my problem with forth, I can't handle the arrayless syntax.
<0> rpg: i ***ume the higher-level forths (and derivatives) are included under the "forth" label, in this context



<5> There is no foreach or map construct either due to it's typeless nature.
<1> michaelw: that, and "what's that stock trading application written in Lisp" -> "I don't know what you mean. maybe you're thinking of maxima?"
<4> AI_coder: you could look at factor for that: http://factorcode.org/
<5> michaelw: Thanks, reading through it right now.
<6> (cons + (list 1 2 3)) returns ((+ LIST 1 2 3) 1 2 3); what is going on here?
<6> Er.
<6> Okay, it seems to have side effects.
<7> try '+
<6> Return value is inconsistent.
<7> + is a symbol that refers to your last input
<7> variable
<8> LiamH: shh, you should have just let him figure that out on his own :-)
<6> LiamH: Oh. That explains a lot.
<6> chandler`: :(
<6> Is there a slightly less silly way to sum the contents of a list than: (eval (cons '+ list)) ?
<7> (apply #'+ list)
<6> Or is that not as silly as it looks?
<9> (reduce #'+ list)
<2> Orborde: eval is used only rarely.
<2> if your solution involves eval, there is often a better solution that doesn't.
<6> Xach: OK
<6> Why are closures so great? I'm not quite sure what Lisp is doing with closures that it has over other languages, other than that you can apparently define functions "on the fly" so to speak.
<6> Is it that you can p*** whole functions around as arguments, or am I confabulating closures with something else?
<2> Orborde: it's handy to create functions with bundled state, and it's nice to have a concise way to do it.
<10> there's that, and there's the fact that closures can encapsulate state
<2> Orborde: cl-ppcre is a lisp library for regex matching. it compiles regular expression strings into chains of closures. the source is nice to read.
<2> it is also very fast, faster than perl in many situations.
<6> Okay.
<6> Also, it seems to allow me to overload the builtin functions, yes?
<6> (flet ((+ (a b) (+ (car a) (car b)))) (+ '(1) '(2)))
<2> Orborde: no. that's not legal common lisp.
<11> that's not legit nor example of closure
<2> and it's not a closure.
<10> apart from that...
<6> OK
<6> So what IS it?
<6> And why does clisp let me get away with it?
<2> Orborde: a closure is the combination of a function object and some lexical state.
<11> a closure is a function bundled with the free variables
<6> A lambda expression?
<2> Not necessarily.
<11> with free variables
<11> (let ((a 1)) (lambda () a))
<6> What is a free variable?
<4> Orborde: a slightly more structured way of learning might prove more helpful in the long run
<11> clisp lets you get away with it because it doesn't check for that kind of shenanigans
<11> a free variable is one whose binding is defined outside the current lexical scope
<6> emu: Such as a global variable in C?
<11> global variables are free variables inside of function definitions
<2> Orborde: anyway, closures are not something used to excess in lisp; they're a handy tool to have when they fit the problem, along with many other handy tools. some problems are handily solved with a lot of closures, and for some problems closures are awkward and not so useful.
<6> emu: OK
<2> Orborde: part of learning lisp is when a particular tool is appropriate for the problem at hand.
<11> it's not really something you worry about explicitly
<11> the whole notion of closure simply falls naturally out of lexical scope
<6> Xach: That's pretty much the pattern for learning to do anything technical.
<12> orborde: a free variable is a variable referenced from the function that is outside the scope of the function. Thus the variable has a value before the function is entered. Which also mean that there is state ***ociated with the function.
<11> Lisp has lexical scope. It also has higher-order functions. Closures are the natural result of having thesse semantics.
<2> Orborde: yep. my point is that saying "what's so great about closures?" is not going to yield a lot of answers about the greatness of closures.
<2> i don't think many people would praise a screwdriver, but it's pretty useful when you need to work with screws.
<2> unless their toolbox is designed so that it's really difficult to even think about screwdrivers
<2> but let's beat that horse when we lead it to water to die



<6> Xach: The depth of your analogies exceeds 7.
<12> (let ((counter 0)) (defun get-next-record-number () (incf counter))). get-next-record-number is a closure as it refers to a counter. but counter is not a global variable and it is only accessible through the function.
<13> because when all you have is a hammer, everything looks like you're too much and this is a beat you can't touch
<6> astor: OK
<14> Xach: as my uncle says, "you can lead a whore to culture"
<15> How can I get a list of all cl***es (or their names) that can be found though `find-cl***'? Apart from calling `find-cl***' on every existing symbol, that is.
<12> In a few days I'll be able to return my tax forms using cl+ssl and cl-soap from within emacs.
<11> are you one of those mysterious people who have figured out all the XML rigamarole behind SOAP
<12> emu: probably not :-). But integrating with a live system is a lot easier than just reading the standards.
<16> astor: which country are these tax forms for?
<12> tsuru: norway.
<11> i took one look at those damn soap "types" and thought "oh no, CORBA"
<13> ... if they were UK, you'd eithr ne impressively well organised or several months late
<16> astor: ah...somehow I knew it couldn't be the US, that tech is too modern
<11> the US requires you to do it via some third party companies
<11> it's all shady
<12> emu: actually I'm a "third party". got a dev license and I'm making a system.
<11> cool
<8> Xach: SYM "let's burn that bridge when we cross it"
<11> yea it's not free if you're not super poor or something, dunno how it is by you
<11> so i just send in snailmail forms
<11> i think i tried to determine whether i fell under the requirements to submit a free online return, and it was so confusing i just gave up
<12> emu: In norway it's free to use if you use the online forms.
<12> emu: there's no open soap interface, but it's free to get a dev license which means you can use the soap interface once you're certified.
<12> emu: it makes no sense not to make the online stuff free. they save lots of $
<11> capitalism at work
<6> astor: You live in a country with a competent government.
<2> neilwvd
<17> i dropped the "w" in honor of el presidente, and try to avoid the initials V.D. :)
<12> orborde: bureaucracy is a bit over the top. xsd schema for the tax form is 12.5k lines. and that's only one schema.
<17> anyone here use openmcl?
<14> I used to
<6> astor: At least someone can read it.
<17> i've heard good things about it from time to time, but never actually used it myself
<11> i dunno, reading an xsd schema vs reading the tax manual
<11> i did manage to do the latter, so
<11> it's got one up
<14> neilv: it's not bad. the cocoa/objc bridge is a neat thing. I wish SBCL had one. (there's a CFFI one that isn't quite complete, last I checked)
<2> neilv: i use openmcl sometimes. i like it. gbyers is very nice and accessible.
<14> neilv: but I found SBCL's performance to be much better, especially for math-related stuff.
<17> so clozure.com is good to work with?
<14> i've never worked with them professionally, but gbyers fixes bug faster than most can begin to diagnose them
<17> heh
<14> bugs, that is
<12> emu: when parsed into s-exp by cl-soap the 12.5k xsd file is converted into a 560 line s-exp template. pretty good compression ratio.
<11> hehe
<13> gnngh argh gnngh argh gnngh argh
<11> yes that would definitely help; ****ing brackets
<13> I think soks may actually be more buggy and hard to get to grips with than cliki was
<14> astor: 560 lines * 40 chars per line = 22.5k. I'm not seeing the compression
<12> slyrus 12.5k lines.
<14> ah, never mind
<14> I thought you were comparing bytes to lines
<14> dan_b: does that mean you'll be working on cliki again soon?
<13> slyrus: no plans to
<13> I'm playing with this stuff in an attempt to learn ruby
<13> (a) see what it's like, (b) something trendy to stick on the cv
<11> ruby is weird
<12> dan`b: are you looking for a job?
<13> not actively. but I should be
<18> re
<19> I'm a little bit stuck with MOP and SBCL. I want to create a metacl*** that allows me to add a new parameter to slot. Is there a good tutorial or online source available?
<20> hi, how to find the docuemnt on external-format in stream?
<21> clhs: stream-external-format
<22> http://www.lispworks.com/reference/HyperSpec/Body/f_stm_ex.htm
<21> pebblestone: is that what you were looking for, or something else?
<20> junrue67: yeah, I've read it before. but where can I find the list of all the external file format? I think it might be implementation specific.
<23> kingruedi: http://wiki.alu.org/Metaobject_Protocol
<20> junrue67: I'm using iso-8859-1 in my socket stream in SBCL. but what's the others? can I use iso-8859-1 in every implementation, is there a standard on it?
<20> specbot: thank you for you link
<12> sb-impl::*external-formats*?
<23> minion: tell pebblestone about flexi-streams
<24> pebblestone: have a look at flexi-streams: FLEXI-STREAMS is a library which implements "virtual" bivalent streams that can be layered atop real binary/bivalent streams. http://www.cliki.net/flexi-streams
<20> astor: ah, maybe, i will check it out. i didn't think it was stored in a variable.


Name:

Comments:

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






Return to #lisp
or
Go to some related logs:

ACCESS VIOLATION SUMMARY gnome-panel
#kde
w32codecs debian-amd64
#linux
concact two strings sql
giftoxic ares
ubuntu 1680x1050 how
#suse
cache:gimubFslefIJ:www.quotesdb.info/freenode/gentoo/27Jan2006/1.html libungif.l
#perl



Home  |  disclaimer  |  contact  |  submit quotes