libera/#commonlisp - IRC Chatlog
Search
23:34:36
pjb
It would be better to think in terms of classes. (but the details of class hierarchies are also implementation dependent).
23:35:31
pjb
(class-name (class-of 42)) returns fixnum in 4 implementations, and integer in 1. fixnum is NOT a class defined in the CL standard!
23:36:10
pjb
(but it's not against the standard to have a fixnum class as subclass of integer, so those implementation remain conforming).
23:36:23
rotateq
pjb: yeah or the length in bits of a fixnum. on my machine for example: SBCL -> 62, CCL -> 60
23:36:52
pjb
hendursaga: hence again, even if classes are better than types, you should probably forget about them!
23:38:40
rotateq
i got the difference of both like so in my head: DECLARE if it shall stay that type till the end, and CHECK-TYPE to check if it's at that point the type which can also vary later on
23:41:27
rotateq
after all, for prototyping things such too narrow thoughts just stand in productivity's way
23:43:02
rotateq
it's not the "oh now we are going to a for loop, so specify the 'int i;' before" :P
0:14:59
raeda
cuz: on SBCL you can sb-ext:save-lisp-and-die to save an image. You would have to configure Slime to use that image on the next startup though
0:17:27
rotateq
raeda: but iirc it's not doable from inside of slime in emacs, cause of threading issues
3:37:50
FubbiQuantz
Hi, I'm trying to run a script from the command line using sbcl. When I run the script, it says that sbcl cannot find the package quicklisp. Quicklisp works fine when I'm in the repl. I've tried loading quicklisp directly in my script, but that hasn't worked. How can I modify my program or my shell command to get around this problem?
3:42:47
FubbiQuantz
I'm not finding anything when I use search through the logs. Can you suggest some useful search terms?
3:43:42
FubbiQuantz
I'm trying to set up a swank server that will keep running even after I log out.
3:44:27
beach
I looked for -script and found some results. But this is not my domain of expertise, so I may be wrong.
9:41:14
lukego
Hey I find myself wanting versions of the standard math functions (+, -, exp, sqrt, etc) that are specialized for all values being double-floats. So that I could depend on getting machine code doing efficient non-complex double float without worrying about type declarations on variables. did someone already make a wrapper arithmetic library like that?
10:08:14
lukego
pjb: I'm imagining something simpler e.g. just wrapper functions that wrap everything in COERCE or something.
10:13:44
Nilby
lukego: I'm fond of mass function generating macros for that. I've done something like it for standard string and sequence functions. I guess the hard part is making sure they get the fast path in disassemble.
10:16:11
White_Flame
not sure if it's easier to just macro up your local variable declarations, instead of the functions themselves
10:27:43
lukego
okay and maybe some tricks could be played with macrolet e.g. to make (. (+ (* ...) ...)) automagically coerced or something. hm.
10:28:12
Nilby
Yes. I love that kind of thing. And then you can even (loop for op in '(+ - * /) (def.wrapper ,s ...))
10:35:48
lukego
Using MACROLET to shadow + gives a package lock error on COMMON-LISP. That seems a bit harsh?
10:37:29
tfb
lukego: it's what the spec says (well, not package lock, but you're not allowed to do that
10:37:59
hayley
Would (INCF place) expanding to (SETF place (+ place 1)) [as a not-too-close approximation] still work?
10:40:51
tfb
(not related to previous) if *x* is special and has a toplevel binding, what should (progn (let ((*x* 3) (makunbound '*x*))) *x*) do?
11:32:27
Krystof
tfb: I believe it should return the toplevel binding of *x*. I'm not 100% convinced the language about that is airtight in the spec, though