#lisp - Sat 28 Apr 2007 between 10:08 and 10:28

NY Lost Funds



vyv0|d: Won't it be held in Ankara?
v0|dright.
vyUmm... I have no idea about how to go from 0stanbul to there.
segvtcr: ok, i'm so far behind anyway...
Ulfalizeris it possible to make a case expression compare values using equal (so that something like (case '(foo bar) ('(foo bar) 1)) will work)?
antifuchsUlfalizer: not using CL:CASE, no
you can write your own (that expands to e.g. cond or a jump table based on hashes), though
or try one of the many utility libraries
michaelwor try fare-matcher
Ulfalizerantifuchs: ok, that's probably overkilling it a bit in this case though. is (cond ((equal foo '(bar baz)) ..) ..) a good way to do it using only standard constructs, or can you think of a better way?
for some strange definition of "standard" :P
antifuchsif you don't have many tests, sure.
Ulfalizerok, thanks
AthasGood afternoon.
antifuchsISTR tim bradshaw stored closures in EQUAL hash tables and funcalled them directly; might save you a test or two
splittistAthas: great blog post! (:
Athassplittist: thanks, but you did all the cool work in it.
tcrUlfalizer: search for WITH-HAShED-IDENTITY on c.l.l. via google groups.
Ulfalizer: If you happen to use CLISP, and don't need to be portably, you can also use their EXT:FCASE.
s,portably,portable,
Athasantifuchs: which email-address should I annoy to get commit access for splittist?
antifuchsAthas: admin at common-lisp.net
AthasThanks.
antifuchsbe sure to mention the right user name (hint: not jsplittist) (:
kzarsay if I wanted to search for the substring "bob" inside another string I think the function called search is the right but what would I use if I only cared if "bob" was right at the end of a string?
pjbstring= :start
tcrIf you (defun bwuah () does-not-exist-dumbass! 'foo), and then evaluate (bwuah), FOO will be returned (SBCL); I wonder what happenswith the DOES-NOT-EXIST-DUMBASS!, is it constant folded away? If so, I'm not sure how desired that behaviour is, as it just bit me :/
v0|dkzar: (search "str1" "bigstr1" :from-end t)
pjb(string= "bob" string :start2 (- (length string) (length "bob")))
v0|dtcr: probably compiler would delete that line and never execute it.
pjbtcr: it should signal an error if does-not-exist-dumbass! is not a variable.
Krystofkzar: don't listen to v0|d or pjb; the right answer is mismatch :from-end t
pjbKrystof: any :from-end may be processed from the start and last result returned.
Better use string=.
Krystofno, if your implementation does that on strings, use a different implementation
jsnelltcr: works for me, http://paste.lisp.org/display/40454
pjbKrystof: I don't write in a specific implementation, I write in Common Lisp.
Krystofthen there's nothing in the hyperspec that says that length on a string is O(1)
so in calling LENGTH on your string you've just done the O(n) work that you were trying to avoid
tcrjsnell: Alright, I'm still using 0.9.18.

Page: 2 9 16 23 

IrcArchive

NY Lost Funds