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



Comments:

<0> i've got it (it's on by default and i didn't turn it off)
<1> But anyways if #-sb-unicode we won't be able to read them so...
<2> ok, thanks pjb
<0> all i do is enable :sb-thread
<1> pundai_: it's macroexpand.
<2> pjb, i haven't learnt about packages yet though in the sequence of the book
<2> so i'll just pretend that my defn of with-gensyms is the right one
<3> What kind of signature of the function for set-dispatch-macro-character supposed to have?
<1> pundai_: Yes, unfortunately the implementations are allowed to pollute cl-user with their own extensions...
<3> Is #, valid?
<1> Anything is valid.
<1> The question is whether your implementations already use it.
<1> (and is it useful)
<1> In clisp, #, is used for load-time-value.
<1> See this: list-all-macro-characters http://paste.lisp.org/display/24264
<1> or something similar, it's bound to system::load-eval-reader



<4> I think #, was in CLtL1, but removed in CL.
<4> pjb: <URL: http://www.lispworks.com/documentation/HyperSpec/Issues/iss315_w.htm >
<3> So the second argument to a reader macro function is the numeric prefix?
<3> Ah, I found the documentation on that.
<5> I'm just about to paste to paste.lisp.org, but I saw there is a possibility to choose an IRC channel, but I don't see how in the page...
<6> attila pasted "seems like string< is not working fine in sbcl cvs for unicode" at http://paste.lisp.org/display/24266
<7> nowhereman: There should be a drop-down box for picking a channel.
<0> nowhereman: you can also paste.lisp.org/new/lisp
<1> attila: string< is working perfectly fine and conforming to the standard.
<1> It's defined to use char< and char< is defined as: char< returns true if the characters are monotonically increasing; otherwise, it returns false. If two characters have identical implementation-defined attributes, then their ordering by char< is consistent with the numerical ordering by the predicate < on their codes.
<0> pjb: ok, wrong wording of mine.
<1> the term "lexicographic" in string< page may be misleading. It's computer lexicographic, not literary.
<5> thanks attila_lendvai, I have the dropdown box now
<0> i'm looking for a string< that is correct from the pov of the user
<1> attila_lendvai: you'll have to write it yourself.
<6> nowhereman pasted "function handler for Araneida" at http://paste.lisp.org/display/24268
<1> (or use a FFI to locale functions.
<4> attila: Hmm. What makes you think those are wrong?
<0> but after some toughts i realized that it's probalay even local dependent. another todo in cl-l10n
<3> CL doesn't have decent locale support?
<1> This didn't exist when CL was developed. ;-)
<5> I've tried to write a function handler, which takes a function and just call it to handle request
<3> CL was developed before locales _existed_?
<0> rydis: those are wrong by the hungarian rules
<3> attila_lendvai: You might want to use CFFI or something to get at the libc locale functions.
<3> How efficient is CFFI, anyway?
<5> the problem is, when I give it a symbol, it seems to store the function instead in some way
<1> quotemstr: at least at early times, where the notion wasn't as developed and important as nowadays. And remember that the Common Lisp standard is an AMERICAN one.
<1> ANSI CL
<4> The only one that looks wrong, if "aew" is the ordering is the middle one.
<5> if I modify the function, it stills call the previous version
<0> quotemstr: i'm not sure... but cl-l10n also needs some spellchecker integration, which would be silly to start rewriting
<5> does someone see why?
<3> I keep seeing all kinds of accesses built out of reads and writes to single characters. Does the compiler optimize those?
<0> rydis: that string is fine, the problem is that it returns the same value for all the invocations
<3> nowhereman: Do you still have a reference to the old one?
<8> The Americans came with several copies of the Common Lisp the Language specification put into the format designed for the X3J13 draft standard. Each was about five inches thick. They also had a black notebook containing "strategy". On the second day, **** Gabriel and Patrick Dussud sported "Lisp: Born in the USA" T-shirts. This created a search for counter-slogans (chiefly among the French delegation), of which "FORTRAN: Born in the USA" was probably the b
<5> good question
<5> how do I check that ?
<4> atilla: No, it doesn't. It returns 0 as that is the first character position that is less in the first string than in the second string.
<1> funcall takes a function designator you don't need to test for symbol yourself.
<3> hehe
<5> that's a simplification, good to know
<4> (I don't have a Hungarian locale installed, so I can't easily check out whether or not it does the right thing in such a setting.)
<8> (from http://home.thezone.net/~gharvey/programming.html)
<0> rydis: right. i'm slow and hungry (take care of that single letter :)
<1> (defun string< (a b ...) (position-if (function char<) a b ...))
<1> (map 'vector (function char-code) "aew") --> #(97 101 119 233)
<1> is bigger than any standard character.
<1> (at least in my implementation)
<0> yep, i'm extra slow... :)
<5> gosh! , pjb, with your modification, it works!
<5> I don't understand, though
<5> (which I don't like...)
<0> it's s complex code and i tought it's my bug
<4> attila: That said, it seems that SBCL doesn't respect LANG/LC_COLLATE of a locale.
<0> and i doubt it should
<1> rydis: for string< it is forbiden to respect it. Or else, it would have to use different char-code for different locales!
<0> or at least not directly. there should be an sb-ext:*locale* or somesuch
<1> locale:string<
<3> Can CL strings _contain_ any character?



<1> Yes.
<1> CL strings are vectors of character.
<3> So there's no gain to be had from using a vector instead of a string for an arbitrary piece of data?
<3> pjb: They're identical?
<0> anyway, i leave this for now with a TODO note... thanks for the info
<1> (make-array 5 :element-type 'character :initial-element #\a) --> "aaaaa"
<3> Hrm. Guess so.
<1> (make-array 5 :initial-element #\a) --> #(#\a #\a #\a #\a #\a)
<3> Why would you use make-string instead of make-array?
<8> you can't have 2-dimensional strings
<4> quotemstr: Because it's shorter to write (make-string 5) than (make-array 5 :element-type 'character)?
<8> also, it's the tool that fits.
<1> make-string makes a simple string. with make-array you can make adjustable or with fill-pointer strings.
<3> Ahh, I see.
<1> and in my case, I stress the fact that strings are vectors of character.
<1> Also, you can give :initial-contents with make-array not with make-string.
<3> Can you read-sequence and make-array in one step
<3> ?
<1> Yes, but it's not too useful.
<1> read-sequence returns the last position in the file.
<1> or in the vector I don't remember.
<3> vector.
<1> (let (a) (read-sequence (setf a (make-array 10))))
<3> It just seems wasteful to create a sequence, fill it, then immediately overwrite it.
<3> Ahhhhh.
<1> Well, an implementation could provide a non-standard API to allocate an array without filling it. But filling is cheap, relatively to the rest of the processing.
<4> quotemstr: There is no requirement that something be written to it, unless you specify an initial-element, as far as I know; it usually is filled with something, though.
<3> Ah, I see.
<8> rydis: ...as blocks of data tend to be (:
<3> Filling a megabyte takes a decent amount of time though. :-)
<1> rydis: I don't remember that. I remember: "When no initial-element is given, it's implementation dependant with what it is filled."
<4> antifuchs: I meant that it's usually zeroed in the implementations I use.
<3> What's the difference between character and (unsigned-byte 8)?
<1> "If initial-element is not supplied, the consequences of later reading an uninitialized element of new-array are undefined unless either initial-contents is supplied or displaced-to is non-nil."
<9> rydis: not in lw, for example
<10> nor in Allegro
<1> quotemstr: see: http://www.cliki.net/CloserLookAtCharacters
<8> quotemstr: characters are a character type, ub8 is an integer type
<1> In nowadays implementations, the difference is about 13 bits.
<8> quotemstr: also, filling the megabyte is cheap; displaying it on the repl may not be (:
<8> rydis: I think sbcl, in an act of defiance, doesn't zero the memory (:
<3> Why would characters take more or less room than ub8?
<8> just so you get randomly bitten for your sins (:
<8> quotemstr: unicode characters?
<3> Ahh, I see.
<1> "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
<1> \]^_`abcdefghijklmnopqrstuvwxyz{|}~
<4> antifuchs: I think SBCL usually does; my lazy REPL-experimentation tends toward that conclusion, at least.
<1> Sorry.
<7> quotemaster: Why would characters take more room than a ub8? When you have more than 256 characters...
<8> also, the tag bit... (:
<3> So 1024 characters would take 3k of memory, while 1024 ub8s would take 1024k?
<8> bits (:
<8> depends on the array type, the optimizations an implementation does, ...
<7> quotemstr: ... a whole k per ub8?
<1> Well, in lisp, in addition we have tag bits, and we round to one memory cell, ie. 32 bits anyways.
<3> err, 1k.
<11> antifuchs: untrue, sbcl always zeroes the memory (due to gc-related reasons)
<8> jsnell: shucks!
<1> Perhaps in strings they're packed to 24bits.
<3> jsnell: Otherwise the conservative GC will become confused.
<11> no
<8> jsnell: count my vote in favor of random user-biting (:
<3> jsnell: So that the garbage collector knows to collect if it's over-allocated?
<11> antifuchs: it's something I would actually like to change in the future for unboxed data, yes
<3> So what's the most efficient way to store a chunk of bytes, then, if not a vector of characters?
<11> quotemstr: I have no idea of what you mean, but it's got nothing to do with conservativeness
<9> is today "guess random stuff" day and I didn't get the memo?
<8> har.
<4> I think I recall some timings on cmu-imp, where it was discovered that zeroing the memory on allocation used very little runtime, whereas doing it once allocated took a whole lot longer.
<7> quotemstr: A vector of (unsigned-byte 8)?
<7> (Or (signed-byte 8), if that's what you're looking for.)
<3> nyef: Which are rounded up to machine words?


Name:

Comments:

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






Return to #lisp
or
Go to some related logs:

suse 10.1 glademm
lilnux tar
Partiton magic
phpldapadmin.rpm
how to mount floopy on ubuntu
yum groupinstall XFCE
iptables -A FORWARD -d -p tcp --dport 443 -j DROP
ubuntu+rpppoe
#css
Build-dependencies for vlc could not be satisfied.



Home  |  disclaimer  |  contact  |  submit quotes