libera/#commonlisp - IRC Chatlog
Search
12:37:09
Shinmera
rain3: It must do two things in order to stay properly portable across systems. The semantics of opening a file and mapping are quite different on windows vs unix.
12:59:33
hayley
Well, for the key objects for which EQUAL and EQL hash tables are equivalent, EQUAL conceptually calls EQL. So EQL might be faster?
13:01:01
didi
So let's go a step further: Should GETHASH be faster for hash tables with test EQL and testing integers than with test EQUAL and testing strings?
13:02:25
hayley
Now it depends on if EQ would work; are the integers fixnums and are EQUAL string keys EQ (possibly by some other interning)?
13:03:52
hayley
If one is true but the other isn't, the true one will be faster. If both are true, they're probably the same. If neither is true, no one knows.
14:57:25
pjb
didi: basically a eql hash-table will use as hash value either the address of the object, or (if a moving gc is used), a unique ID.
14:58:18
pjb
didi: while with an equal hash-table, for objects where that makes a difference, the hash-function will have to process the object value (eg. make an sum of some of the hash of the slots in a vector or list).
15:02:39
pjb
eg. if your keys are numbers, then equal uses eql which tests if the numbers are of same type and = ; but if your keys are string then equal uses (every 'equal str1 str2) to test each character. O(n)… Sometimes you may want to use a hash-table :test eql with strings, but in general you don't, you want the :test equal.
15:11:38
doyougnu
Hi all, does anyone have a reference or link to get started on NixOS? I'm getting errors when looking for foreign libs like libssl.so
15:33:14
doyougnu
I was just seeing if there was anyone else in here that used NixOS. I found some NixOS related posts about it, looks like PACKAGE_CONFIG_PATH needs to refer to where nixos stores binaries
15:35:43
dualinverter[m]
doyougnu: I am pretty new to common-lisp, am not using any packages so far; but this flake file works without problems:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/c755c59039ee186f1a6a9dc98f018ce91ee78e71)
15:37:28
etimmons
doyougnu: Doesn't actually answer your question, but if you don't really need SSL support in hunchentoot you can push :hunchentoot-no-ssl to *features* before loading it
15:37:34
doyougnu
dualinverter[m]: thanks for the input. I'll toy around with some derivations. I suspect i'll have to wrap SLIME in a nix-shell to get it working.
18:05:48
akater[m]
Should (map-into #(0 0 0) #'identity) error? SBCL errors here due to invalid number of arguments but it does not error e.g. on (map-into #(0 0 0) #'identity nil nil).
18:09:48
scymtym
(map-into … … nil nil) does not call the function. (map-into (vector 1 2 3) #'identity '(1) '(2)) signals an error due to wrong number of arguments
18:11:06
scymtym
but i don't think the compiler is supposed to figure that out without calling the function
18:21:46
akater[m]
Elements are set to successive values of (funcall f). That's what should indeed happen.
18:22:12
didi
akater[m]: #'f doesn't accept arguments; #'identity does. The surprise, for me, is that `map-into' applies the function even if there is not sequence.
18:25:32
pjb
akater[m]: there's no point in naming a function with f !!! Use lambda: (map-into (make-list 3) (lambda () (random 3))) #| --> (2 2 2) |#
0:11:54
Yehowshua
pzmq provides binding to the zmq C library. I'm trying to install pzmq with `(ql:quickload "pzmq")`, and ql eventually invokes clang which complains in can't find zmq headers. I know where the zmq header are...
0:13:27
moon-child
you may need to install a 'zmq development libraries' package. This depends on your operating system
0:14:40
moon-child
oh, sorry, you wrote 'I know where teh zmq header are', and I misread that as 'I don't know...'
0:14:43
Yehowshua
lisp calls clang, I want to add an option to lisps's call of clang to piont lisp to where the headers are
0:22:37
Yehowshua
fixed it - on mac apple silicon, hombrew was placing the libs and headers in the wrong place