Search
Monday, 16th of April 2018, 16:15:02 UTC
17:28:13
puchacz
hi, in unwind-protect, will cleanup body be executed even if return-from the whole function?
18:08:21
makomo
i would like to use conses as keys into my hashtable but i would like a special equality test for them
18:08:46
makomo
two keys would compare equal if the stuff in the cons itself is EQ/EQL
18:08:55
makomo
i don't want EQ/EQL to be performed on the cons itself
18:09:15
makomo
what are my options? i don't think the standard hash table allows me to do this
18:20:26
cage_
maybe: https://github.com/metawilm/cl-custom-hash-table
18:22:44
makomo
shka_: but that will recursively use EQUAL right?
18:23:02
makomo
but i can guarantee that the car and cdr can be compared using just EQ/EQL
18:24:04
makomo
that's also a good point i guess
18:24:11
makomo
i mean, it certainly won't matter, i'm pretty sure of that
18:24:18
makomo
just wanted to see if there's some other nice way
18:27:33
shka_
makomo: custom-hash-table, if you really want to
18:28:05
shka_
but honestly, it is not really practical
18:28:58
shka_
if you need to use a vector as a key, well, it makes things very different!
18:30:27
shka_
makomo: i mean, your time can be used in better way
18:30:32
makomo
shka_: could you describe the situation with the vector a little more?
18:30:42
makomo
if i had lots of elements or something?
18:31:53
shka_
1193941381096739655 (in sbcl)
18:32:27
makomo
hm well, that's "just" a collision
18:32:31
makomo
stuff like that happens i guess?
18:32:31
sjl
If you want to use vectors as keys based on their contents, you need to use #'equalp, but that will also make strings ignore case
18:33:02
shka_
makomo: sxhash will always return same number for vector
18:33:18
shka_
so let's say you want to hash binary blobs
18:33:33
shka_
and sure, hashtable will work
18:33:39
shka_
because that's just collision
18:33:46
shka_
but i degenerates to O(n)
18:33:58
sjl
sxhash doesn't always return the same number for vectors
18:34:06
sjl
(sxhash "foo") (sxhash "bar")
18:35:10
sjl
SBCL's does seem to do it for non-string vectors, which is odd
18:35:37
shka_
sjl: actually, if you want to be so anal about sxhash, standard allows returning same number for every string as well
18:35:58
shka_
and sbcl does that for non-string vectors
18:36:17
shka_
it won't matter if you use 'eq as comparsion
18:36:28
shka_
but anyway, it is something to remember
18:37:09
shka_
makomo: and if you want to use some sort of objected defined with defclass
18:37:44
shka_
there is plenty of use cases for custom hashtables, but it is not worth to use it if you can simply use equal
18:38:43
makomo
i mean, it would definitely be overkill, but using the chance to explore other options is always nice
19:04:46
puchacz
shka: you said you use lparallel for multithreading, anything else please?
19:40:17
doesthiswork
(OPERATE 'TEST-OP :CFFI-TESTS) don't match lambda list (O C)
19:40:35
doesthiswork
version 0.19.0 of CFFI
19:48:19
Baggers
doesthiswork: a bit quiet here today, maybe due to ELS. If you have time it could be worth reporting this on the mailing list.
22:24:57
comborico1611
What is the company/project with the gecko in lightgreen and blue?
22:32:56
edgar-rft
comborico1611, you mean this one? <https://web.archive.org/web/20060105182921/http://www.normal-null.de/lisp_logo.html>
22:33:42
comborico1611
edgar-rft: Yes! What is this?
22:36:14
edgar-rft
comborico1611, it once was designed by a guy named Manfred Spiller, AFAIK it was never used by any paricular project, it just was a suggestion how a Lisp Logo could look like. There are several copies of that logo on various GitHub etc. repositories.
22:36:50
comborico1611
It is a great logo.
22:40:49
edgar-rft
It's the best Lisp Logo I know of :-) think it first appeared in context of this comp.lang.lisp discussion: <https://groups.google.com/forum/#!topic/comp.lang.lisp/dOS2dMSSTHg>
22:41:25
comborico1611
It's a very regretable it isn't being used far and wide.
22:41:50
pierpa
the professional hand shows through
22:42:36
comborico1611
I am very convinced that logo will be copied and used for something major.
22:42:52
pierpa
the alien logo is cute too
22:43:13
cgay
It was used on my coffee mug.
22:44:02
pierpa
http://lisperati.com/logo.html
22:48:32
comborico1611
I need some help with this. https://hastebin.com/aquzakacat.lisp
22:49:22
comborico1611
I can't understand the error message. I'm just doing this for a quick fun thing. I've been away from Lisp for a month or so.
22:50:15
comborico1611
You'll need to ignore the perl-ish stuff. Just experiementing with readability a bit.
22:51:46
pillton
The (list form) is not within the lexical scope of the (let* ..) form.
22:51:55
pillton
The (list..) form sorry.
22:52:24
comborico1611
So I'm not adhering to the structure of let*?
22:53:04
pillton
comborico1611: http://www.gigamonkeys.com/book/variables.html
22:53:31
comborico1611
Heh. Alright. Yeah, I've been away and it's taken its toll.
22:53:47
comborico1611
Other than that, does it look like i'm on the right track?
22:55:21
pillton
I suggest you read a bit more of the book I linked.
22:56:09
comborico1611
Roger that. Thanks for taking a look at the post!
23:21:21
kukuruznik
Anyone here know about linking C++ files in Emacs? Both the C++ and Emacs IRC channels require this authorization thingy.
23:21:34
kukuruznik
This seems like the next best place to ask about Emacs.
0:18:09
iqubic
kukuruznik: you should really just authorize yourself, as this is not the right channel for that.
3:51:02
asarch
From PCL, chapter 11: "To add an element to the end of a resizable vector, you can use the function VECTOR-PUSH. It adds the element at the current value of the fill pointer and then increments the fill pointer by one, returning the index where the new element was added.", however, can you do something a la C: int a[5]; a[3] = some_value; <- In the sense you can use arbitrary the indexes of the array?
3:58:00
pierpa
a resizable vector is just a vector
3:58:28
pierpa
and to use VECTOR-PUSH, it must have a fill-pointer
4:00:50
asarch
How would you do that with a fixed-size vector?
Tuesday, 17th of April 2018, 4:15:02 UTC