Search
Sunday, 11th of March 2018, 9:32:55 UTC
10:11:55
smokeink
https://www.youtube.com/watch?v=FvmTSpJU-Xc Alan Kay - Normal Considered Harmful
11:57:09
cuso4
I am doing one of my physics problems in lisp
11:57:40
cuso4
And I get a floating point overflow error. But I can't seem to find anything online on how to solve it
11:58:25
Bike
do you know what floating point overflow is?
12:00:58
cuso4
https://codeshare.io/2plJ0Y
12:01:05
cuso4
This is what the code looks like
12:01:54
cuso4
It is the e_total function that overflows for values of m>205
12:03:49
Bike
it means there's a floating point number that's too big to represent
12:04:26
Bike
check most-positive-single-float; it's probably around 3e38
12:04:47
Bike
c^4 is about 8e33, so if m_n is larger than ten thousand ish you're out of numbers
12:05:18
Bike
so you should use doubles instead of singles.
12:11:47
Bike
if you deal with really big values, you might have to finesse it to avoid computing that huge intermediate value that you then take the sqrt of, but i don't know how to do that off the top of my head
12:12:06
Bike
well. i guess you can write it as c*sqrt(mc^2+p)
12:14:48
cuso4
Of ccourse you could use some numerical methods too, but my current solution is good enough.
12:39:53
pjb
(expt 206 2) #| --> 42436 |#
17:53:27
akr
Hello, can someone please help me make sense of the "docs" for cl-opengl http://quickdocs.org/cl-opengl/api
17:53:38
akr
I want to create an opengl context on an already existing window
17:54:06
akr
I can get it through clx (bindings for xlib)
17:54:25
akr
but I don't know where to plug it in into cl-opengl
17:56:14
Shinmera
cl-opengl does not handle context or window creation. Those parts are heavily OS specific.
17:56:27
Shinmera
It only deals with the OpenGL API itself.
17:56:54
akr
hmm okay, what should I do then?
17:57:06
Shinmera
See glut, glfw, sdl2, glop, etc. to do that.
17:57:47
akr
aren't bindings to glut part of cl-opencl?
17:58:16
Shinmera
It's part of the project, but not part of the system.
17:58:28
Shinmera
Anyway, glut is /really old/, so I can't recommend using it.
17:58:48
Shinmera
Try cl-glfw3 or something.
18:00:51
Shinmera
glop is a "pure CL" attempt at doing the same, but it's a bit sketchy / underdeveloped in parts.
18:01:17
Shinmera
So depending on how you feel about foreign library dependencies...
18:02:05
akr
do you think I can plug the window obtained from xlib:screen-root directly into glfw:make-context-current?
18:05:02
Shinmera
All of these libraries will do the window creation for you. Is there any reason you want to do it yourself?
18:05:23
akr
like I said, I want to draw to a pre-existing window
18:05:31
akr
to be exact, the X root window
18:05:36
akr
as I want to render a live wallpaper
18:06:47
Shinmera
I suppose as a last resort you could browse the sources of GLFW's X11 implementation and pick the parts you need to creat the context and prepare the window.
18:07:44
akr
I'd guess that cl-glfw3 won't have bindings to the necessary functions
18:08:08
Shinmera
I'd be surprised if glfw3's public API itself does.
18:08:47
akr
nevermind then, thanks anyway
18:09:10
Shinmera
I assume it's typically not exposed because it is a rather low-level, platform specific detail.
18:11:02
Shinmera
On the other hand, this is a good opportunity to write a small library that can be re-used to get a X root GL context. :)
18:11:57
akr
unfortunately, I have no idea how one would go about doing that
18:12:28
Shinmera
Look at the sources of glfw/glop/etc, see what they do, then replicate that in CL.
18:12:43
Shinmera
except switching out window creation with plugging in the handle of the root window.
18:13:36
akr
maybe I'll try that later, gotta go do something else now
18:13:43
akr
in any case, thanks a lot for the info
19:11:53
oleo
at least got it to minimal now
20:28:33
schoppenhauer
hi. i get the error message ; READ error during COMPILE-FILE:; ; Symbol "*ASSEM-INSTRUCTIONS*" not found in the SB-ASSEM package. when trying to load SLIME (version 2.14; quicklisp)
20:31:58
schoppenhauer
ok updating to 2.20 helped
Sunday, 11th of March 2018, 21:32:55 UTC