freenode/#lisp - IRC Chatlog
Search
17:11:26
_death
I think at one point I looked at launching a qemu instance and communicating with it using zeromq
17:13:26
Nilby
That's much more sensible, but I have some dumb obsession with idea that I want 100% lisp code above the kernel.
17:49:23
Bike
ah, i suppose. "treated like a literal object at runtime" is a bit vague. i think it's mainly just emphasizing that the form is only evaluated once.
17:50:42
Bike
ltv is one of those things that didn't really make any sense to me until i implemented it
17:51:54
Bike
the really involved part is all the cycle detection and ordering of load time evaluations
17:52:09
Bike
it's kind of a lot of work for the compiler writer but programmers don't usually think about it
17:54:36
pjb
There's still ordering freedom left to the compiler. the order of the l-t-v forms is not specified IIRC.
18:01:44
_death
Bike: after thinking about it more, it's not just that it's evaluated once, but also that the object is returned as-is, not, say, copied (according to some definition of copied)
20:52:49
mfiano
Posted in #sbcl also, but does anyone know of a workaround to the compiler notes on SBCL for this simple function? I've been trying everything I can think of: https://gist.github.com/mfiano/66c0c1897c190e68438d405f604ddb20
21:02:47
mfiano
_death: I'm trying to rasterize a 3D cuboid volume to see which cubed grid cells it touches. Here is the real code https://gist.github.com/mfiano/eba07f48c2285a47fa0685713a1f2495
21:04:12
mfiano
Those #'map's are there because min1/max1 will be inputs to the function later on, and are required to be (simple-array single-float (3))
21:11:44
mfiano
Yes, the actual domain doesn't matter...just has to be small enough for the result to be fixnumable
21:12:35
mfiano
So is it the case that the 2-arity floor is just missing a transform, or is there a better reason it didn't work?
21:17:06
mfiano
It seems if I assert with (assert (< #.(float (expt -10f0 9) 1f0) x #.(float (expt 10f0 18) 1f0))) your version works. Curious why such the unsymmetrical domain
21:19:39
_death
well, (truly-the (unsigned-byte 32) (floor (the (single-float 0.0 65535.0) x) cell-size)) in the second gist (after fixing malformed syntax) seems to give no note
21:25:18
mfiano
(lambda (x) (declare ((u:f32 #.(expt -2f0 19) #.(expt 2f0 61)) x)) (floor (floor x) cell-size))
21:32:22
mfiano
Yeah i'm not sure what SBCL is doing. Should be 24 bits of precision and 128 bits of range
21:36:37
jmercouris
jackdaniel: why are there constant page loads in your demo? why not utilize ajax?
21:44:31
Krystof
I think SBCL is not being very smart about the fact that it includes 0, but you should probably exclude 0 if you can
21:45:09
Krystof
(declare (type (single-float (-1.0) (1.0)) x) (type (and (integer (0)) (unsigned-byte 8)) y)
21:46:53
scymtym
seems like a good time to plug https://github.com/scymtym/sbcl-ir-visualizer again. it shows derived types of intermediate results among other things
21:49:44
scymtym
jmercouris: both. you can type in a lambda expression and investigate how SBCL processes it under different optimization policies
21:49:46
jmercouris
It is a cool project, don't get me wrong, just wondering what intent you had when developing it
21:50:23
phoe
I'd place $5 that the intent was introspection into the SBCL compilation and IR generation process
21:53:05
scymtym
phoe is right since he described what the program does and i made it do that intentionally. but i'm not sure where this discussion is supposed to go
21:55:53
Krystof
or you can (trace :encapsulate nil sb-c::floor-derive-type-optimizer sb-c::floor-quotient-bound) to find what's not giving you the right answer
21:56:10
Krystof
SBCL is a bit conservative about its lower bound to floor in the presence of floating point arithmetic
5:03:39
beach
Same here. I am working on implementing my idea for a register-allocation algorithm. And, as usual, I got the abstractions wrong the first few times, so more work than the idea should have generated.
5:04:41
beach
So far, I have had more ideas per time unit than I have time to implement, so there is a fairly large backlog.
5:10:47
alandipert
ah i know what you mean. i'm perpetually in the same boat with my various (and less impressive) projects