@# 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> kotrin: no problemo
<0> might anyone happen to know if there's an XML-parsing CL system beside what's in CL-XML, maybe one being defined with a DOM kind of object model to it? even one supporting namespaces. (I know, I can go through what's at the CLiki, to see what's available, but I thought it might serve to save some time if I'd ask, here, firstly)
<1> gimbal: look for closure xml (cxml)
<0> jamesjb: will do; thank you
<0> fwiw, cxml looks like what I'm looking for; 's great to learn of the the cffi projects, too - something portable and with functionality similiar to some contrib systems systems on SBCL, woo
<2> (cough)
<3> morning
<0> not going otmake a habit out of the nick-shifts, just having some fun, for a moment
<0> mvilleneuve: 'morn
<4> what is the long form of backquote macro ?
<4> i want to generate some backquoted stuff with a macro
<5> there is no long form.
<0> ignas: you can stack backquotes, like ``form
<4> duh
<4> even with quoting it's still not that easy apparently :/



<4> i want to generate an output that looks like : "(some-function `(,a ,b foo bar))"
<4> but if i am using backquote like this: `(some-function foo bar ...)
<4> how do i add "escaped" commas backquotes inside of a backquote ?
<4> without losing the ability to evaluate some symbols by using an unsecaped comma
<0> (let ((a 1) (b 2)) `(some-function ,`(,a ,b foo bar))) => (SOME-FUNCTION (1 2 FOO BAR))
<0> fwiw
<6> for now, i can handle nested constructions like ` , ` , ` , but my brain goes on strike at ` `
<0> also works, w/o the addl backquote : (let ((a 1) (b 2)) (list 'some-function `(,a ,b foo bar)))
<4> gimbal: what if "foo bar" bit should be generated by a function ?
<4> or code
<4> that's the place i am stuck ...
<7> gimbal: you may need a construct like ,',a
<0> ignas: (let ((a 1) (b 2)) (list 'some-function `(,a ,b ,@(function-to-make-values ...)))) ; might work to the effect ?
<0> function-to-return-list would be a better name for it, though, heh
<8> ignas: it's not rare to have things like `',foo ,@',foo :)
<8> ignas: the good thing is that you only have to make it work once and then you can forget it until the next bug/extension
<4> gimbal: your function returns (some-function (a b c something something)) not (some-function `(a b c something something))
<0> doh
<6> i wonder what goes through people's minds when looking at a nested ` , ` , ` , ... do they think to themselves, i'm templating, now i'm evaluating, now i'm templating, now i'm evaluating ...
<4> rr--, no it goes like i am templating, now i am outputing a backquote, err, how do i go back to evaluating ?
<8> ignas: with a ,
<9> ignas pasted "The real example" at http://paste.lisp.org/display/23866
<0> (let ((a 1) (b 2)) `(some-function ,``(,',a ,',b foo bar))) => (SOME-FUNCTION '(1 2 FOO BAR)) ; a backquote becomes a quote there, or am I way off ?
<4> attila_lendvai: no not really `(foo `,(+ 1 1)) outputs (FOO (+ 1 1)) not (foo `2)
<8> ignas: you need two , to reach the 'top-level' so that it's evaled
<0> (let ((a 1) (b 2)) `(some-function (eval `,`(,',a ,',b foo bar)))) ; ?
<8> of wrap the whole thing in an eval, but that will eval foo and the + at the same level which is not what you want
<4> attila_lendvai: ok now it's (foo 2) but i kind of need (foo `2)
<8> ignas: you can control the evaluation on the different level with the usual '
<4> back to plan B use (list) in the output of the macro
<4> attila_lendvai: so how would you output (foo `(2)) from a macro ?
<4> 2 being the result of a (+ 1 1)
<8> ignas: like `(foo `',(+ 1 1)) although it prints funny in sbcl
<10> `(foo `,',(+ 1 1))
<8> heh, because i was wrong... :)
<4> it's not exactly (foo `(2))
<8> `(foo `,'(,(+ 1 1)))
<4> wow
<4> respect :D
<11> you would not output (foo `(2))
<11> you might output (foo '(2))
<11> which is `(foo ',(+ 1 1)) and a lot easier than you're trying to make it
<4> Xophe: i will need something more like (foo `(2 ,a ,b 4))
<4> anyway now i think that just outputing (list ) is better in such case
<4> (foo (list 2 a b 4))
<8> ignas: go to the deepest comma and start going 'up', when you are crossing a comma stuff to the right will be eval'd (for each coma p***ing). quote as shown, when multiple evaling is bad (i.e. the value is not an atom and you don't want it to be evaled many times)
<4> i wrongly ***umed that doing it with backquotes is easier
<8> needs time, but then it's not that bad. i've spent a day writing a complex macro used inside a macro to generate the macro output (two levels of `` magic) but since then i can figure it out with a few tries
<8> and it actually has a line like this: (declare (ignorable ,@',ignorables))
<12> is there any 'portable' threading library that people would recommend? I'm getting uncomfortable doing stuff in an sbcl-specific way
<7> the MP stuff that cmucl, clim, etc use might be considered vaguely portable.
<13> good morning
<7> but I by no means endorse it :)
<8> Ogedei: you may check http://common-lisp.net/project/bordeaux-threads/
<12> Zhivago: does it exists as a separate package, or is it part of CLIM?
<12> attila_lendvai: looking
<8> although it's using generics, which is strange for a threading lib, but it may be just me and my saste
<8> s/saste/taste
<9> ignas annotated #23866 with "the code that does the job" at http://paste.lisp.org/display/23866#1
<14> I wonder if there is any easy way to get rid of the console window on sbcl/win32?



<14> Hard way is ok too, it gets a bit annoying with gui apps...
<4> tomppa: is sbcl/win32 stable enough to do GUI or for that matter any other serious programming ?
<14> No idea really, so far it has worked for me
<4> tomppa: i'd try the stupid windows way - hide the window with some windows API calls
<4> it should be the easiest way i think
<14> yes, I thought about that. I guess it's the simplest way
<4> not sure what it would take to do a real windows application (without stdin stout) might be a tiny winy bit tricky
<9> attila annotated #23866 with "ignas, this should do the same" at http://paste.lisp.org/display/23866#2
<0> tomppa: honestly, this might be useless advice, I've not used an msft platform for some time, but as I recall from w98, this trivial thing, maybe you've already known of it: under a right-click menu on a shortcut that would be used for launching an app (e.g. something under cygwin), under a dialogue that was available via that right-click menu -- like "shortcut properties" or something -- there might be something that might serve
<0> to prevent the display of the console you mention?
<0> if that's to the making of a wild goose chase, begging your pardon
<4> attila_lendvai: you forgot to paste the code itself i think ...
<8> ignas: nope, seems like i misunderstood your problem... :)
<14> gimbal: thanks, I'll check that
<9> attila annotated #23866 with "the real thing this time" at http://paste.lisp.org/display/23866#3
<9> attila annotated #23866 with "ignas, a bit simplified" at http://paste.lisp.org/display/23866#4
<4> i don't know, both of them are getting me errors in the place i am trying to use the macro
<6> (DEFMACRO foo (... &key (x defaultform)
<6> seems defaultform /is/ evaluated at macroexpansion time ... didn't expect that
<0> anyone might have worked with an available, open-source, cl systems benchmarking system? (I've checked the cliki on benchmarking, am looking at a node in the CMU AI repository atm - http://www-cgi.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/bench/0.html - recognizing that there are two systems, there, either of which could be brought up to speed for SBCL, potentially & if necessary. curious if there might be somethi
<0> g already available, if anyone would know)
<0> fwiw, it would be some benchamrking done in comparison of GNU LibC linux sendfile() file-fd-to-socket-fd writing, versus memory-to-socket-fd writing
<15> you're aware of cl-bench?
<15> it's basically that, plus a few
<15> sbcl.boinkor.net/bench/ is running that
<0> antifuchs: I was not aware of it; thank you for mentioning; danke
<6> ...unlike the argumentform in the macro call (foo :x argumentform)
<6> so, argumentforms in a macro call are not evaluated, but keyword parameter defaultforms are
<0> nice graphs there at the boinkor URL; imo, the quality of those graphs may rival those produced of mrtg
<6> do the x-axis calibrations in mrtg also overwrite the x-axis label
<8> rr--: yep, and this is useful when dealing with them. you just need to quote something if you need it so
<8> rr--: and also intuitive if you think of the forms in the macro body are also executed, and keyword defaulting is like a (unless foo (setf foo default)) in the body
<8> s/executed/eval'd/
<6> good thing i noticed that, otherwise probably would get bitten by that sometime in future
<6> 'intuition' is relative to your frame of reference ... obviously, my brain was in the 'other' frame :)
<4> were there any technical reasons for not including readable hashtable representation in common-lisp ?
<4> if i will write one for myself, what are the issues i should be aware of ?
<6> depends on whether readable means can be read by human or by lisp reader?
<4> lisp reader
<4> like lists :)
<16> No applicable type method for READER-FUNCTION when call width type specifier OBJECT
<16> reader-function is sb-pcl right
<16> is it possible this error is caused by my sbcl 0.9.14 -> 0.9.15
<16> migration
<6> proper restoration of the object graph (for some value of 'proper')?
<4> not sure i understand
<4> it just seems strange that i can write a lisp readable list, array, n-dimensional array, but not hashtable
<4> though i know that most decisions of what to include in the spec were driven by "reasons"
<4> so i probably don't know something
<17> ignas: try to preserve print-read-consistency, so that a hash-table constructed by your readmacro is similar to one printed by your corresponding print-function
<17> "similar" as in http://www.lispworks.com/documentation/HyperSpec/Body/03_bdbb.htm
<4> now that i look closer i can see that hash-tables not just store the data, there are some internal variables like test, rehash-size etc.
<18> Xach: mwhahaahah. joelr: "Last but not least, I'll try to avoid forward-looking statements"
<12> what is the best way of inserting an element into a sorted list? first pushing and then calling sort? or is there a more suitable standard function? (or maybe should I write it myself?)
<19> Do a manual merge sort
<19> Which is quite trivial if you have only one insert
<12> yes, but also so common that I though maybe i was overlooking a standard function
<7> ogedei: constructively or destructively?
<6> hmmm cmucl 19b cannot load fasl-files produced by 19a
<6> wait, there is a restart that says load anyway
<6> so i guess it can
<20> Binary compatibility is for lesser languages.
<21> Hello #lisp
<22> If you try to find the location of a function currently being profiled (by M-. in SLIME or the various functions in the :sb-introspect package) in SBCL, you get the location of `profile-encapsulation-lambdas' in the :sb-profile package. Is this on purpose?
<4> Athas: well it is the "real" location of the function being executed
<4> all the functions a getting wrapped
<22> ignas: yeah, but it's not very useful to the user. :)
<4> Athas: well, treating profiler wrapped functions in a special way for every implementation might be difficult
<22> ignas: I thought of fixing it in SBCL itself, so `sb-introspect::function-debug-info' would fetch the location of the "real" function, not the profiler wrapper.
<22> Would such a patch be accepted?
<4> duno, ask sbcl developers
<20> If not, I'd suggest forking SBCL.
<20> Then apply Xach's anti-style-warning changes and quickly pull the SBCL user community away.
<20> In five years time, SBCL will die the CMUCL death with Xophe as the only active committer.


Name:

Comments:

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






Return to #lisp
or
Go to some related logs:

#xorg
Bad local forwarding specification ipv6
#ai
quiznos manual
#php
kernal-headers ubuntu
#linux
debian bootsplash 2.6.15.6
error Generic Error+ubuntu+ssh+copy
gnurdux slashdot



Home  |  disclaimer  |  contact  |  submit quotes