teepee has quit [Remote host closed the connection]
teepee has joined #openscad
_whitelogger has joined #openscad
LordOfBikes has quit [Read error: Connection reset by peer]
mmu_man has joined #openscad
<gbruno>
[github] pca006132 closed issue #6045 (OpenSCAD reproducible hang on Apple Silicon involving calls to removed/renamed functions and variables and out-of-scope variables) https://github.com/openscad/openscad/issues/6045
<pca006132>
I'm thinking if there is a reason for OpenSCAD's evaluator to run in the main thread
<RoyK>
is it possible to conditionally include/use something according to a variable?
ToAruShiroiNeko has quit [Ping timeout: 260 seconds]
<sculptor>
what would be the benefit of that
<sculptor>
just load a file and skip module calls based on that variable
<RoyK>
in a model, if the user of it sets 'hinges = true', I'll include that library
<RoyK>
I do simiar things in perl/python regularly
ToAruShiroiNeko has joined #openscad
<sculptor>
not possible imho
<sculptor>
usage of use is lightweight - till you call a module from it
<sculptor>
so...
<sculptor>
now if you want to use different libs with identical module names, no luck
sculptor_ has joined #openscad
sculptor_ has quit [Changing host]
sculptor_ has joined #openscad
sculptor has quit [Ping timeout: 244 seconds]
bitbasher has joined #openscad
howiemnt1 has quit [Ping timeout: 248 seconds]
howiemnt has joined #openscad
ToAruShiroiNeko has quit [Ping timeout: 248 seconds]
<teepee>
pca006132: I assume the only reason is that nobody jumped on that topic yet. I think the evaluation is currently not thread safe, but running on some other thread than main should not be a bigger issue.
<pca006132>
yeah, I searched about it and cannot find anything regarding this
<pca006132>
perhaps I should open an issue about it
<teepee>
I think there is one with focus on being able to cancel
<teepee>
first one some example I suppose, that book is great
<teepee>
the java example in there can evaluate fibonacci 3 times faster than our c++ implementation ;-)
<pca006132>
it is pretty normal
<pca006132>
I don't think the current architecture considered performance...
<teepee>
yep, I would agree, certainly for the part I did work on :)
<teepee>
for most things other than BOSL it's also usually not the most critical part
<pca006132>
true
<pca006132>
I still think BOSL is a bit crazy, wouldn't expect people to write such complicated beast from openscad
<pca006132>
iirc it can do boolean on its own
<pca006132>
which, from my experience with manifold, is hard to get right
<teepee>
yeah, ideally it should have much more support on the built-in side
<teepee>
oh, yes, certainly. see all the trouble with CGAL even though it tried to use perfect math and all the other libraries
<pca006132>
I remember the last time when I was trying to implement a bytecode evaluator, I was trying to compare the speed with nodejs (jit disabled) and failed
<pca006132>
v8 is really fast even with jit disabled
<pca006132>
iirc mine took 1.5x the time, even with a lot less features
ToAruShiroiNeko has quit [Ping timeout: 252 seconds]
ToAruShiroiNeko has joined #openscad
ToAruShiroiNeko has quit [Remote host closed the connection]
ToAruShiroiNeko has joined #openscad
ToAruShiroiNeko has quit [Read error: Connection reset by peer]
ToAruShiroiNeko has joined #openscad
ToAruShiroiNeko has quit [Read error: Connection reset by peer]
<J25K>
if we are not planning to implementing curves in openSCAD i tend to not follow this discussion.. IIRC some slicer can open STEP and so import curves
LordOfBikes has quit [Read error: Connection reset by peer]
LordOfBikes has joined #openscad
<teepee>
hmm, I've ignored that mostly so far too
<J25K>
I guess having curves is not necessarily helping slicers to create G2/3 and G5 moves - but it could speed up the preview
sculptor_ has quit [Ping timeout: 245 seconds]
<InPhase>
I wasn't going to, but I posted on it. It seems important to note that the proposal aligns well with precisely the way we keep documenting $fs and $fa incorrectly.
<InPhase>
Over and over again. :)
sculptor_ has joined #openscad
sculptor_ has joined #openscad
sculptor_ has quit [Changing host]
sculptor_ is now known as sculptor
snaked has quit [Quit: Leaving]
snaked has joined #openscad
<J25K>
hm isn't $fa just a limiter to prevent too many segments .. so can't get more than 360/$fa (except that it limits to not less than 5 segments)
<J25K>
maybe it make sense to add some "deep insight" page section in the wiki were the complicated truth can be found
<InPhase>
The logic is in utils/calc.cc get_fragments_from_r
<InPhase>
That is after checking $fn and returning $fn but not less than 3 if $fn is greater than 0.
<InPhase>
So there is a minimum. But that minimum is the minimum number of segments specified by either the fa calculation or the fs calculation.
<InPhase>
And then that's given at least 5. And then the ceiling is taken, so that it is always at least hitting the specified resolution for the one which is least constraining of $fa and $fs.
<InPhase>
Which... is not super complicated. But complicated enough that nobody has ever been happy with the plain-language descriptions. :)
<InPhase>
No simple idiomatic phrasing captures it accurately.
mmu_man has joined #openscad
<J25K>
$fn is used ... else $fs (limited by $fa)
<J25K>
was there a reason that $fs and $fa are not variables to set in parameters ?
<J25K>
äh preferences
<J25K>
on the other hand - having such bad values forces people to define them proper in each file - Ü
<InPhase>
Yeah, I have proposed before that we should redefine the defaults. Although this puts an epoch on nearly all the tests.
<InPhase>
Also there will be the handful of expected complaints about how this has ruined everything.
<InPhase>
But it would be a MUCH better first impression for beginners. I think this should come out with Manifold, which can handle this with ease on nearly all existing hardware.
<InPhase>
The current defaults were based around CGAL compute limits in like 2012 or something.
<InPhase>
So I think we should feel liberated to modernize them.
<InPhase>
The tests issue is probably the biggest issue, as it puts an epoch update on all outstanding PRs. But right around a release would probably be the most sane time to do this.
<J25K>
a bit ironic how you can't change something because it changes something too much
califax has quit [Ping timeout: 240 seconds]
califax has joined #openscad
<InPhase>
Eh, I think we can change it. The screams in the distance can be muffled by the champagne corks of progress.
<J25K>
how poetic
teepee_ has joined #openscad
teepee has quit [Remote host closed the connection]
teepee_ is now known as teepee
snaked has quit [Remote host closed the connection]
<teepee>
should be easy to transision, make it a config option and default to the current values
<teepee>
crazy stuff that the font itself renders 2/35 as fraction with a horizontal bar with numbers on top and below
<InPhase>
teepee: Well, actually I think the single most important outcome is probably defaulting to better ones than the current values. I think we face a negative first impression problem from people thinking it doesn't produce quality renders when they just do a quick try.
<InPhase>
It makes it look uncompetitive.
<InPhase>
And WE all know it does much better, so we don't think much about that.
<InPhase>
But someone sitting down for the first time? Those resolution variables are pretty far from awareness.
<teepee>
it's probably possible to detect an empty config for new installations
<InPhase>
Hmm, maybe. Default to new settings for new installs, old settings for existing installs.