freenode/#lisp - IRC Chatlog
Search
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
5:11:46
jackdaniel
jmercouris: the reason is because the goal of this proof of concept wasn't to have reload-less page - I didn't need javascript yet
5:12:08
jackdaniel
mfiano: there are no dependencies outside of cl the world (except for hand-written css file)
5:12:54
jackdaniel
the final thing will have three types of frame handlers: static (get/post), ajax-based for one-way updates, and a dynamic one with websockets
5:22:12
beach
alandipert: But you work for a private company. Usually, in that world you can convince someone to invest money if the idea is a good one, and then you can hire someone to do it. No?
5:26:57
beach
alandipert: That's one problem I have with academia. What is considered a good idea, and thus subject to funding, is a complicated set of considerations like nation-wide or union-wide "strategies", and (above all) fads.
5:26:59
alandipert
well, i'm freelance currently and so have clients with disparate needs, so for my longer term and more conceptual bets, i'm the investor
5:29:12
beach
I think I have another problem with my ideas. It might be possible at this point to start some crowdfunding effort for my projects, but I don't know how to find people who are both available and qualified.
5:29:35
alandipert
yes, i have enough friends and family in academia to be acutely aware of how difficult it can be to inhabit
5:29:55
moon-child
beach: I don't think industry is worse than academia in that respect. I daresay industry usually involves a more perverse (if consistent) set of incentives
5:30:42
alandipert
i find industry incomparable to academic, but i've personally spent little time in academia, and understand there are many variables
5:30:44
beach
I would have to gather enough funding to convince a qualified person to quit the current dayjob, and that is very unlikely to happen.
5:30:59
moon-child
beach: err, I meant to say, I don't think industry is better than academia in that respect
5:32:48
moon-child
(although, I don't have personal experience with academia. So I may be mistaken. Grass is greener and all that)
5:33:49
beach
I have worked both in industry and academia, though mostly in academia. But you may be right, my memory of industry may no longer be accurate.
5:35:19
beach
1. I have 10 months to retirement. 2. My dayjob allows me to work full time on my projects already.
5:36:48
beach
That is unfortunately not an option. French law makes it impossible to continue after this date.
5:39:40
alandipert
regarding the scarcity of qualified help, you might consider how to market the project to those outside of the lisp community (although i understand at least with regard to paper abstracts, you're averse to that, and for good reasons)
5:40:44
beach
What would be the advantage? It would require some significant training to get those people to be of any use, no?
5:42:41
alandipert
well, there are vastly more programmers outside lisp than inside. and i posit good/experienced outside people usually learn lisp quickly once interested, and can have enough experience to appreciate its advantages in a way that neophytes cannot
5:50:29
Nilby
I think it's hard to get availible and highly qualified Lisp programmers to do what you want without the coercion of employment. I think there's quite a numer who live in post-scarcity and are available, but would need a mighty big carrot.
5:51:08
beach
alandipert: I am not averse to that. I just have no idea how to make such a thing happen.
5:52:00
beach
Nilby: I suspect that even with employment, it would be hard to get them to do what I want. :)