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
ccox has quit [Ping timeout: 248 seconds]
mmu_man has quit [Ping timeout: 252 seconds]
raboof has quit [Server closed connection]
raboof has joined #openscad
califax has quit [Remote host closed the connection]
cart_man has quit [Quit: Konversation terminated!]
califax has joined #openscad
ccox has joined #openscad
sertsa has joined #openscad
sculptor2 has joined #openscad
sculptor has quit [Ping timeout: 245 seconds]
J25K63 has joined #openscad
<gbruno> [github] coryrc opened issue #6129 (Syntax highlighting for special-named functions and modules is wrong) https://github.com/openscad/openscad/issues/6129
sculptor__ has joined #openscad
J25K has quit [Ping timeout: 250 seconds]
sculptor2 has quit [Ping timeout: 248 seconds]
JoelJoel is now known as Joel
jbd has quit [Ping timeout: 244 seconds]
sculptor2 has joined #openscad
sculptor__ has quit [Ping timeout: 260 seconds]
sculptor2 has quit [Read error: Connection reset by peer]
sculptor2 has joined #openscad
Guest30 has joined #openscad
Guest30 has quit [Client Quit]
sculptor2 has quit [Ping timeout: 256 seconds]
Non-ICE has quit [Ping timeout: 256 seconds]
Non-ICE has joined #openscad
sertsa has quit [Quit: sertsa]
<gbruno> [github] jordanbrown0 edited issue #6116 (Nested differences and unions of coincident shapes causes negative volume to appear positive) https://github.com/openscad/openscad/issues/6116
Chancer has joined #openscad
Chancer has quit [Client Quit]
hyperair has quit [Remote host closed the connection]
hyperair has joined #openscad
Grumpy has joined #openscad
Grumpy has quit [Client Quit]
MichaelMMulligan has joined #openscad
Chancer has joined #openscad
Chancer has quit [Changing host]
Chancer has joined #openscad
Chancer has quit [Client Quit]
Chancer has joined #openscad
MichaelMMulligan has quit [Quit: Client closed]
Chancer has quit [Quit: Chancer]
Chancer has joined #openscad
Chancer has joined #openscad
Chancer has quit [Changing host]
mmu_man has joined #openscad
manzhiluo has joined #openscad
manzhiluo has quit [Quit: Client closed]
oldlaptop has quit [Server closed connection]
oldlaptop has joined #openscad
mmu_man has quit [Ping timeout: 256 seconds]
Chancer has quit [Ping timeout: 248 seconds]
mmu_man has joined #openscad
Chancer has joined #openscad
mmu_man has quit [Ping timeout: 256 seconds]
Chancer has quit [Quit: Chancer]
J25K63 has quit [Quit: Client closed]
J25K63 has joined #openscad
howiemnt1 has joined #openscad
howiemnt has quit [Ping timeout: 256 seconds]
snaked has quit [Quit: Leaving]
jbd has joined #openscad
howiemnt1 has quit [Ping timeout: 256 seconds]
howiemnt has joined #openscad
sculptor has joined #openscad
hyperair has quit [Remote host closed the connection]
hyperair has joined #openscad
TheAssass1n has joined #openscad
TheAssassin has quit [Ping timeout: 272 seconds]
joseph_ has quit [Server closed connection]
joseph_ has joined #openscad
Chancer has joined #openscad
Ckat has quit [Server closed connection]
Ckat has joined #openscad
mmu_man has joined #openscad
tcurdt has quit [Server closed connection]
tcurdt has joined #openscad
Chancer has quit [Quit: Chancer]
Adrianh has joined #openscad
<Adrianh> Hi all.  Was wondering if there was any thought to allowing functions to be passed without having to generate an intermediate lambda.
<Adrianh> Seems to be wasteful.
<Adrianh> And generally annoying. 😉
<Adrianh> Esp if you are just making a pass through lambda.
Adrianh62 has joined #openscad
Adrianh has quit [Ping timeout: 250 seconds]
<Adrianh62> Hmmmm. Got kicked.  Still Adrianh.
<Adrianh62> Also, seems I can do this:
<Adrianh62> ```
<Adrianh62> function test_true(arr, data, i) = !!arr[i];
<Adrianh62> function find(arr, data=undef, fn=function (arr, data, i) test_true(arr, data, i), i=0) =
<Adrianh62>   i < len(arr)
<Adrianh62>   ? fn(arr, data, i)
<Adrianh62>     ? i
<Adrianh62>     : find(arr, data, fn, i+1)
<Adrianh62>   : undef;
<Adrianh62> echo("Test find:", find([0,0,[],3,0])); // result 3 ([] is falsy)
<Adrianh62> ```
<Adrianh62> But can't do this:
<Adrianh62> ```
<Adrianh62> function test_true(arr, data, i) = !!arr[i];
<Adrianh62> function any(arr, data=undef, fn=function (arr, data, i) test_true(arr, data, i), i=0) =
<Adrianh62>   i < len(arr)
<Adrianh62>     ? fn(arr, data, i) || any(arr, fn, data, i+1) // WARNING: Ignoring unknown function 'fn'
<Adrianh62> Even tried:
<Adrianh62> ```
<Adrianh62> function any(arr, data=undef, fn=function (arr, data, i) test_true(arr, data, i), i=0) =
<Adrianh62>   i < len(arr)
<Adrianh62>     ? fn(arr, data, i) // WARNING: Ignoring unknown function 'fn'
<Adrianh62>       ? true
<Adrianh62>       : any(arr, fn, data, i+1)
<Adrianh62>     : false;
<Adrianh62> ```
<Adrianh62> Which is basically the same as find() but still didn't work.
J25K63 has quit [Quit: Client closed]
J25K63 has joined #openscad
<Adrianh62> Oh, my goof. I forgot that I changed the parameter order in the sig.  Works now.  Anyway, is there a reason for having to put in an intermediate lambda to hoist the function name into the variable namespace?  Why are function names and variable names in different namespaces?
<Adrianh62> If it really is necessary, could we have a helper that automagically do the hoisting for us?
<Adrianh62> So many ppl here but no one knows anything?
Adrianh62 has quit [Ping timeout: 250 seconds]
<gbruno> [github] github-actions[bot] assigned issue #522 (Namespace) https://github.com/openscad/openscad/issues/522
<gbruno> [github] t-paul pushed 1 modifications (Update README.md) https://github.com/openscad/openscad.github.com/commit/8267578908df22d95bf386d84bfeb3e69b020709
teepee_ has joined #openscad
<gbruno> [github] adrianVmariano opened issue #6130 (minkowski render problem: slow and bogus error message) https://github.com/openscad/openscad/issues/6130
teepee has quit [Ping timeout: 272 seconds]
teepee_ is now known as teepee
Adrianh has joined #openscad
Smeef has joined #openscad
Adrianh is now known as AdrianH
Ckat has quit [Ping timeout: 258 seconds]
Ckat has joined #openscad
hyperair has quit [Ping timeout: 258 seconds]
jbd has quit [Ping timeout: 258 seconds]
oldlaptop has quit [Ping timeout: 258 seconds]
jbd has joined #openscad
oldlaptop has joined #openscad
hyperair has joined #openscad
JordanBrown has joined #openscad
<JordanBrown> test
<JordanBrown> AdrianH: Why are function names and variable names in different namespaces? The original answer doesn't really matter; the answer now is "because they are, and changing it would break existing programs".
<JordanBrown> It isn't possible to write an OpenSCAD-language helper that will automatically "hoist", because there's no way to pass around an arbitrary list of parameters.
<JordanBrown> But you could always define the function using a lambda in the first place, "test_true = function () ...;"
AdrianH has quit [Quit: Client closed]
JordanBrown has quit [Quit: Leaving]
rogeliodh has quit [Server closed connection]