teepee changed the topic of #openscad to: OpenSCAD - The Programmers Solid 3D CAD Modeller | This channel is logged! | Website: http://www.openscad.org/ | FAQ: https://goo.gl/pcT7y3 | Request features / report bugs: https://goo.gl/lj0JRI | Tutorial: https://bit.ly/37P6z0B | Books: https://bit.ly/3xlLcQq | FOSDEM 2020: https://bit.ly/35xZGy6 | Logs: https://bit.ly/32MfbH5
mmu_man has quit [Ping timeout: 264 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 252 seconds]
teepee_ is now known as teepee
peepsalot has joined #openscad
kintel has joined #openscad
<kintel> teepee Which platform did it fail on?
<teepee> linux
<teepee> -- The C compiler identification is Clang 16.0.6
<kintel> thx, I should have tested more against the glew path..
<kintel> Hopefully it will be in the past soon :)
<teepee> with the wide range of compilers and systems, it's probably impossible to always cover everything
<teepee> I also have to do a deeper dive on OBS, it's quite red currently
<teepee> I mainly was wondering if there's maybe a better way than just casting
<teepee> but then, for screen width/height it would be pretty surprising to have a bad effect :)
<gbruno> [github] kintel pushed 1 modifications (EGL fix: static_cast when needed) https://github.com/openscad/openscad/commit/ad047b3cb1563090b18ec021ae3d078609789721
<gbruno> [github] kintel opened pull request #4765 (EGL fix: static_cast when needed) https://github.com/openscad/openscad/pull/4765
<kintel> I'm casting in the new EGL component too, so this just keeps things consistent
<kintel> In OpenGL code there is so much casting going on anyway..
<kintel> I was thinking we could just set up the N most common (or uncommon) distros and round-robin build one of them every day, using uni-get-dependencies
LordOfBikes has quit [Ping timeout: 264 seconds]
<kintel> In terms of GLAD, yes, we default to using whatever OpenCSG uses, but we can force OpenSCAD to always use GLAD with -DUSE_GLAD=ON
<teepee> for the local build I forced opencsg-1.6.0 and EGL works nicely in a ssh session
<kintel> I expect us to be able to default to GLAD soon, but I'd like to see the new OpenCSG spread a bit first in case something breaks
<kintel> Yeah, -DUSE_BUILTIN_OPENCSG=1 is a good way of testing it
J23k has quit [Quit: Client closed]
J23k has joined #openscad
J23k53 has joined #openscad
LordOfBikes has joined #openscad
J23k has quit [Ping timeout: 245 seconds]
<gbruno> [github] kintel pushed 2 modifications (EGL fix: static_cast when needed) https://github.com/openscad/openscad/commit/d4e7431c39360bf0bbb24c9adc538c88bd8e3eb7
<gbruno> [github] kintel synchronize pull request #4765 (EGL fix: static_cast when needed) https://github.com/openscad/openscad/pull/4765
<gbruno> [github] kintel pushed 1 modifications (EGL fix: static_cast when needed) https://github.com/openscad/openscad/commit/e0bbf49307b92414b04a13c86eacc27ddc825bca
<gbruno> [github] kintel synchronize pull request #4765 (EGL fix: static_cast when needed) https://github.com/openscad/openscad/pull/4765
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gbruno> [github] kintel pushed 1 modifications (EGL fix: static_cast when needed (#4765)) https://github.com/openscad/openscad/commit/f41aefc37c7e1232ef0d0aea17022771b18be49b
<gbruno> [github] kintel closed pull request #4765 (EGL fix: static_cast when needed) https://github.com/openscad/openscad/pull/4765
be7b5 has joined #openscad
be7b5 has quit [Client Quit]
qeed__ has joined #openscad
qeed_ has quit [Ping timeout: 260 seconds]
qeed__ has quit [Quit: qeed__]
qeed has joined #openscad
misterfish has joined #openscad
ali12341 has quit [Remote host closed the connection]
ali1234 has joined #openscad
killjoy has quit [Ping timeout: 240 seconds]
killjoy has joined #openscad
killjoy has quit [Changing host]
killjoy has joined #openscad
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
misterfish has quit [Ping timeout: 272 seconds]
<J23k53> did anyone know if using Pythagoras is more efficient than solving something with sin and atan? .. so are sqrt and ^2 faster or the sin / cos / tan
teepee_ has joined #openscad
teepee has quit [Ping timeout: 252 seconds]
teepee_ is now known as teepee
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
misterfish has joined #openscad
J23k88 has joined #openscad
J23k53 has quit [Ping timeout: 245 seconds]
<peepsalot> J23k88: i mostly wouldn't worry much about micro-optimizations like that. but from some profiling I've done, openscad function calls in general are relatively expensive with the way things are currently written (the act of searching for the context of the function definition, which may be overridden at any scope level)
<peepsalot> so whichever one gets away with fewer function calls might be somewhat faster if you're doing a ton of them. best to just measure the difference yourself, but I would guess that its mostly in the noise except for the most strenuous(and likely contrived) circumstances
<J23k88> ok thanks.   so  using sqrt(3)/2 or  sin(60)  shouldn't matter.
<J23k88> or is this  2 to 1 funct. call ?
<peepsalot> operators are not functions
<peepsalot> some of that function lookup cost could be mitigated with some clever caching or such deep in the openscad source. i've had some ideas for improving that for a while now, but hadn't gotten around to it
<peepsalot> but if you are doing a ton of the same calculation of a constant like that, i would suggest caching the result in a variable
<J23k88> but isn't   2^2  the same as pow(2,2) ?   (the first should be an operator the second a function or? )
<peepsalot> same result, different mechanism of lookup (there is no "lookup" of operator, it is instant as soon as it is parsed, because they can't be overridden by user code)
<J23k88> then ((s/2)^2+h^2)/(2*h); should be better than s/(2*sin(atan( s/2/h )*2 ) )  .. thanks a lot!
<peepsalot> J23k88: do you have specific code that is actually in need of optimization (is noticeably slow)?
<J23k88> no, i just try to use the best way in case that is used to calculate thousand points for a polyhedron
<J23k88> i found that calculating polyhedra is much slower than using a polygon and linear_extrusion (or rotate_extrusion)
<peepsalot> "best way" is to write understandable code rather than clever code. a year from now you may want to look back at some code you wrote and not have to wonder or struggle to remember what you were thinking
<J23k88> yes  very important lesson .. and i am still learning to write more comments to not only what i have done, but more about the why.
<J23k88> but it is not easy to know what information one will be missing some month later.
misterfish has quit [Ping timeout: 260 seconds]
<peepsalot> Also see: Kernighan's Law - Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
<J23k88> I'll try to remember that.   I just had someone sending in a PR and first i thought "yes that makes sense" but then i found out that i used a 2nd module to do something more that wasn't obvious (and not documented).
hyvoid has joined #openscad
lastrodamo has joined #openscad
hyvoid has quit [Remote host closed the connection]
hyperair has quit [Remote host closed the connection]
hyvoid has joined #openscad
hyvoid has quit [Ping timeout: 255 seconds]
hyvoid has joined #openscad
fling has quit [Remote host closed the connection]
fling has joined #openscad
hyvoid has quit [Ping timeout: 255 seconds]
hyvoid has joined #openscad
misterfish has joined #openscad
hyvoid has quit [Ping timeout: 252 seconds]
mmu_man has quit [Ping timeout: 252 seconds]
hyvoid has joined #openscad
cart_ has joined #openscad
Lagopus has quit [Ping timeout: 245 seconds]
Lagopus has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 252 seconds]
teepee_ is now known as teepee
mmu_man has joined #openscad
Guest51 has joined #openscad
Guest51 has quit [Client Quit]
J23k88 has quit [Quit: Client closed]
misterfish has quit [Ping timeout: 252 seconds]
J23k88 has joined #openscad
mmu_man has quit [Read error: Connection reset by peer]
mmu_man has joined #openscad
cart_ has quit [Ping timeout: 240 seconds]
cart_ has joined #openscad
othx has quit [Remote host closed the connection]
othx has joined #openscad
cart_ has quit [Ping timeout: 240 seconds]
lastrodamo has quit [Quit: Leaving]
qeed_ has joined #openscad
qeed has quit [Ping timeout: 272 seconds]
marcus has quit [Remote host closed the connection]
marcus has joined #openscad