freenode/#lisp - IRC Chatlog
Search
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. :)
5:54:39
Nilby
I think the old Lisp companies somehow had a magic mixture of employment coercion and shared goals and belief in the work.
5:58:23
Nilby
White_Flame: Sadly, yes, that's what seemed to make it possible and then pulled the rug out.
6:07:46
pjb
beach: well, in the current paradigm, the way to make qualified and talented people do your bid is by having a lot of money. You can have a lot of money by earning it, eg. starting a web software company like Zip2, selling it, with the money, starting up an online bank like Paypal, selling it, and with the money start up a company to build and sell EV cars, another to build rockets to go to Mars, and another to dig tunnels to run
6:08:32
pjb
beach: an alternative paradigm is proposed by Bernard Frio (quite intersting), but unfortunately, we're far from achieving such a system... (even if, as he argues, we already had half of it).
6:09:47
pjb
beach: https://www.youtube.com/watch?v=o3g-A25BE2w&list=PLysam5vv8eGfHsIU3iQtRgnALGs0fdD1g
6:10:23
pjb
beach: note that this gives you a hint on how to gather work force around your project: don't aim at newbies, but at retired programmers!
6:11:24
beach
They would be amply qualified, and they don't need to spend all day making money to feed the family.
6:20:44
beach
Anyway, my current strategy is to do the implementation work myself, hoping to get to a native executable SICL system not too far in the future. Once that is done, I hope to see more interest in helping out by people who are both qualified and available. I have no idea whether this strategy will work, of course.
6:23:50
Nilby
I'm hoping that there may some kind of convergence in the Lisp community when some of the various projects that people have been working on for years might be able to used a more cohesive whole.
6:25:40
beach
Nilby: That was one of the things I hoped to achieve with the SICL project. I secretly hoped to create high-quality "modules" that would then be adopted by existing Common Lisp implementations. I now think that hope was unfounded.
6:28:04
no-defun-allowed
Looking further in time when we may ask the same questions for CLOSOS (though there is surely a similar pressure for beach's more immediate projects), I am aware that programmers around my age are also often fed up with current compilers, operating systems and so on, but discussing the proposed solutions and projects leads to "knee-jerk" reactions #lisp participants may be familiar with.
6:28:48
Nilby
I'm not sure it's unfounded, it's might just take longer, since implementations necessarily have to be quite conservative.
6:28:59
beach
One thing that has a chance of success though is McCLIM. It is maintained and developed by a bunch of good people. It is quickly becoming the best choice for Common Lisp GUI code, as opposed to FFI solutions.
6:29:15
no-defun-allowed
For the most part, I believe there are people with time, but funding them and encouraging them to act on their complaints are very hard. (Though, of course, not everyone wants to write a compiler or operating system or whatever else, and that's fine too.)
6:30:18
beach
no-defun-allowed: Yes, it is very hard to get the message across to people with a long-term investment in more traditional technology.
6:31:12
no-defun-allowed
Instead what I see is people saying self-deprecating things like "computers were a mistake" and generally just sticking to small changes. The latter would be rational, but both make me sad.