freenode/#lisp - IRC Chatlog
Search
0:14:09
aeth
jasom: anyway, I think floating point is in general faster because CPUs build in hardware for floating point (but you might need special ASM to access it all)
0:14:15
jasom
At a minimum, my point is that integers are much larger than they were when floating-point won over fixed-point, so reevaluating ones choices might be good. Also, outside of certain scientific calculations the assumptions of floating-point may not fit your data
0:14:57
aeth
if you're doing real time use floats, if you're doing supercomputer simulations use floats.
0:15:19
aeth
Anything where you'd be using Fortran before SBCL became an acceptable Fortran, you probably want floats.
0:16:19
aeth
I've written my share of efficient integer arithmetic, too. It's a bit more painful in CL because CL actually wants correct behavior, so you need to establish your bounds or use unsigned and wrap each arithmetic operation with mod of a power of 2
0:18:04
aeth
I'm sure a compiler that enforced float correctness would make floats equally or more painful, of course. With floats you just get runtime nonsense values or a runtime exception (depending on settings), rather than a compile time possible bignum allocation.
0:20:13
aeth
I have established bounds for certain float functions with random testing, but I think that those bounds are probably best left as just documented rather than enforced.
0:26:55
aeth
Anyway, that's just my 2ยข. On the other hand, if there's anyone who'd waste months implementing efficient fixed point in CL to be used in a handful of functions, it'd probably be me. :-p
0:30:46
oni-on-ion
"optimization: adding 1 to or subtracting 1 from a fixnum variable does not cons." =)
0:38:58
aeth
Hmm, doesn't appear to give correct results for me. I guess I was reading the manual incorrectly.
2:26:50
ealfonso
Why do I get different results with macro vs macrolet? https://pastebin.com/4nu0qsr9
2:28:24
|3b|
ACTION doesn't remember if there is a better way to get that local environment than with a macro or not
2:29:29
|3b|
macro/macrolet accept &environment lambda-list keyword to let you get access to the environment while expanding the macro
2:54:26
ealfonso
actually I'm still stuck... shouldn't the inner macro (defined via macrolet) be expanded before the defclass macro? https://pastebin.com/1U571DZC
2:56:08
Bike
since that's not even in a normal evaluation context, the my-local-slot-macro form will never be evaluated, so it's just a syntax error.