freenode/#lisp - IRC Chatlog
Search
11:04:58
Shinmera
Does anyone have a collection of implementation-dependent tests to determine whether a symbol denotes a type? I know how to test for conditions, structures, and standard-objects, but not types otherwise.
11:50:47
Bike
that's difficult. implementations can vary which types are also classes, and how they do type macroexpansion, and so on
12:00:13
Shinmera
I need it in order to determine whether a type-definition should be emitted in my documentation system.
12:00:35
Shinmera
Bike: Right. I don't even need to type expand though, just to know whether a symbol names a type at all.
12:01:44
Bike
it sounds like you only need to know about user deftypes, in which case typexpand would do it
12:01:53
beach
It sounds like it would be a very useful library to have. And it would include TYPE-EXPAND.
12:02:34
Bike
https://github.com/Bike/introspect-environment/blob/master/ccl.lisp#L82 all internal symbols and shit too
12:03:53
Shinmera
pierpa: subtypep is a much more complex operation than simply testing whether a type exists.
12:09:28
Bike
it doesn't mention any errors, it just says the arguments are type specifiers, which means using non type specifiers is UB, rather than defined to be an error
14:26:57
k-stz
puchacz: if you check out the sbcl source, the exit-code is just a slot in a "process defstruct", which is nil on initilazation. The code also looks easy to understand at first glance
18:11:30
Fare
for compressing logs, I use xz -9 in a subprocess, which also reduces the GC pressure.
18:15:49
puchacz
how is it supposed to work anyway? if I put it in dot file in cl-user, will it apply to everything?
18:17:22
Fare
puchacz: the way it works is you put (declaim (optimize (speed 3))) in every file where you want that setting.
18:17:58
Fare
OR you use an around-compile handler in ASDF to (proclaim '(optimize (speed 3))) around the compilation of your files.
18:26:12
|3b|
ACTION would first try just deleting .fasl cache, declaim speed or whatever, and load the system and see if it actually gets noticeably faster before doing complicated things to make it permanent
18:27:04
puchacz
|3b| fasl deleted, but where to put (declaim (optimize (speed 3)) if it is supposed to be in every file?
18:29:27
puchacz
sounds like I want (eval-when (:execute :compile-toplevel :load-toplevel) (proclaim '(optimize (speed 3))))
18:32:11
puchacz
so if I (declaim (optimize (speed 3))) in .lispworks in cl-user package, will it just work globally "unless shadowed" somewhere?
18:33:19
pjb
If you're crazy, you mean do: (declaim (optimize (speed 3) (space 3) (debug 0) (safety 0)))
18:33:45
puchacz
pjb: I want to see how fast lispworks can go. by default 32 bit linux lispworks is much slower than 64 bit linux sbcl.
18:35:12
pjb
It is, but for code, smaller code means fewer memory accesses, and therefore more speed.
18:36:45
pjb
smaller code = simplier code = bigger data. If you optimize for smaller data you may need to use bigger code…
18:37:27
|3b|
ACTION notes that salza2 (used by zip) already has some OPTIMIZE SPEED declarations, so global setting might not help it much
18:46:30
puchacz
doing a lot of HTML processing. maybe I "broke" lispworks by replacing standard functions by unicode functions