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: 272 seconds]
TheCoffeMaker_ has quit [Ping timeout: 260 seconds]
TylerTork has joined #openscad
<TylerTork> Has anyone been using the "Print a Thing" service from within OpenSCAD (F8 key)? It's giving me an error message "ERROR: Error transferring https://print.openscad.org/api/v1/part-upload/?source=openscad - server replied: Internal Server Error"
TheCoffeMaker has joined #openscad
<gbruno> [github] kintel pushed 2 modifications (Slightly modify test to avoid rounding) https://github.com/openscad/openscad/commit/9a88f9db69078bb53ba44689d2dcb5db0f368afd
<gbruno> [github] kintel synchronize pull request #5076 (Use Manifold's Slice() and Project() to implement projection()) https://github.com/openscad/openscad/pull/5076
kintel has joined #openscad
LordOfBikes has quit [Ping timeout: 255 seconds]
<gbruno> [github] kintel closed pull request #5066 (chore(python): migrate to f-string) https://github.com/openscad/openscad/pull/5066
<gbruno> [github] kintel pushed 3 modifications (chore(python): migrate to f-string (#5066)) https://github.com/openscad/openscad/commit/7e7e04a832cb1a9a7f960fc56240f6c2258d14a5
LordOfBikes has joined #openscad
qeed has quit [Quit: qeed]
qeed has joined #openscad
<kintel> JordanBrown I'll take a look at that PR again
<kintel> Could you bring your PR in sync with master so we can all run the same code?
<JordanBrown> sure
<gbruno> [github] kintel edited pull request #5077 (Bugfix: Color scheme changes didn't affect rendered polysets) https://github.com/openscad/openscad/pull/5077
<gbruno> [github] kintel closed pull request #5077 (Bugfix: Color scheme changes didn't affect rendered polysets) https://github.com/openscad/openscad/pull/5077
<gbruno> [github] kintel pushed 1 modifications (Bugfix: Color scheme changes didn't affect rendered polysets (#5077)) https://github.com/openscad/openscad/commit/b5bb93da2854ce25aef538a967be45917474b0a2
<JordanBrown> I had forgotten that I had backed out the support for hex constants, because they are in theory a backward compatibility problem: OpenSCAD allows variables that start with digits.
<InPhase> Maybe check hex constants in the symbol table, and otherwise, a constant?
<InPhase> And maybe also we should deprecate variables that look like hex constants...
TylerTork has quit [Ping timeout: 250 seconds]
<JordanBrown> I'd be in favor of calling that simply a bug, but I happen to know that our favorite person-who-relies-on-bugs relies on it.
<InPhase> lol
<JordanBrown> Correction: I'd be in favor of calling it a bug that those start-with-digit names are allowed.
<JordanBrown> I know that he uses start-with-digit names.
<JordanBrown> I don't know that he uses names that start with 0x.
<InPhase> I'd also favor deprecating them all, but we could special case 0x as deprecated for less disruption.
<InPhase> Maybe 0b too.
<InPhase> I guess we have no use for 0o?
<InPhase> If you're doing bitwise operators though, 0b is reasonable.
<JordanBrown> updated, built, smoke tested, pushed.
<gbruno> [github] jordanbrown0 synchronize pull request #4833 (Bitwise operators. Fixes #3345.) https://github.com/openscad/openscad/pull/4833
<JordanBrown> I think the better answer for the perceived need is some kind of set support.
<JordanBrown> That's tantalizingly close to a special case of objects, but I haven't tried to actually fit it in.
<gbruno> [github] kintel ready_for_review pull request #5076 (Use Manifold's Slice() and Project() to implement projection()) https://github.com/openscad/openscad/pull/5076
<kintel> I agree that killing support for symbols starting with a number would be a good thing.
<kintel> I wonder how hard it would be to establish some sort of compatibility mode or planned future deprecation to allow stragglers to update their code within some set time frame
<kintel> But could be that we'd need some messy heuristics to detect hex/bin literals in the intermi
<kintel> 2/2 Test #37: echotest_bitwise-operators .......***Failed
<kintel> JordanBrown do all tests pass for you?
J24k73 has joined #openscad
J24k82 has quit [Ping timeout: 250 seconds]
<JordanBrown> Haven't checked in a long time.
<JordanBrown> I think they all passed when I did the work months ago.
<JordanBrown> I think a compatibility mode would look like having the lexer rule that recognizes hex constants (or binary constants) alternatively do the same thing that the symbol rule does.
<JordanBrown> Those two tests pass for me on Windows.
pca006132 has quit [Remote host closed the connection]
<kintel> Huh, on my machine, (-1 | 0) evaluates to zero?
<JordanBrown> evaluates to 4G for me.
<JordanBrown> building on my Linux VM, but that will take a while.
<JordanBrown> I would have to go look at the standards for the rules for casts from double to unsigned int.
<JordanBrown> But the arithmetic is not complicated. Look for operator| in src/core/Value.cc.
<JordanBrown> You might try (-1 & 1) and other variations involving negative numbers.
<kintel> Oh
<kintel> naked cast from double to int
<kintel> That's probably UB in C+
<kintel> *C++
<JordanBrown> Could easily be. Have I mentioned that I'm a C++ newbie?
<kintel> uint32_t a = (uint32_t)-1.0;
<JordanBrown> My C career could easily have a grandchild, but C++ not so much.
<kintel> -> this gives me a ~random result for each run
<JordanBrown> random?!?!
<kintel> int main(int argc, char *argv[]) {
<kintel> uint32_t a = (uint32_t)-1.0;
<kintel> }
<kintel> std::cout << a << std::endl;
<kintel> 4 consecutive runs: 50370832 973072 39721232 2693392
<kintel> I guess undefined behavior includes different behavior per execution if the compiler really wants to : /
<kintel> I guess go back and see how JavaScript does it ;)
<JordanBrown> what #include do I need to make that compile?
<kintel> #include <iostream>
<kintel> This is on clang on Apple Silicon btw., which isn't tested on our CI
<JordanBrown> I'm reliably getting 0.
<JordanBrown> which is pretty wrong too.
<JordanBrown> That is, on the little test program.
<kintel> I get 0 on a raspberry pi too (the only Linux box I had booted)
<JordanBrown> but (-1|0) gets 4G on my Linux system.
<JordanBrown> That is, in OpenSCAD.
<kintel> Undefined can mean anything..
<kintel> The spec says "If the value cannot fit into the destination type, the behavior is undefined"
<kintel> I'm sure there is a neat trick, like double -> int -> uint, but check some JavaScript implementation as they likely do it in an optimal fashion
<kintel> I'll make another try at getting an M1 machine provisioned on GiyHub CI
<JordanBrown> If I add a cast to (int) in the middle, the little test program yields 4G.
<JordanBrown> (That's GCC on MINGW/MSYS2 on Windows.)
<JordanBrown> But hmm. Cast to int in theory will fail for values 2G to 4G.
<JordanBrown> Probably cast to (a) apply limits (b) cast to int64_t (c) cast to uint32_t.
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<JordanBrown> I changed to what might be a more robust conversion from double to int. See toUint32 and toInt32 in Value.cc.
<gbruno> [github] jordanbrown0 synchronize pull request #4833 (Bitwise operators. Fixes #3345.) https://github.com/openscad/openscad/pull/4833
<JordanBrown> But one of the tests fails because -1.4 converts to FFFFFFFE.
<JordanBrown> Not sure what to do about that.
<JordanBrown> But really I need to work on prepping for a trip tomorrow, so it will be a while before I can look at this again.
<JordanBrown> Still, you might grab that and check that on your system you get the right answer for (-1|0).
pca006132 has joined #openscad
peepsalot has quit [Ping timeout: 252 seconds]
guso78k has joined #openscad
J24k73 has quit [Quit: Client closed]
J24k73 has joined #openscad
guso78k has quit [Quit: Client closed]
peepsalot has joined #openscad
rawgreaze_ has joined #openscad
rawgreaze has quit [Ping timeout: 268 seconds]
rawgreaze_ is now known as rawgreaze
cart_ has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
peeps[work] has joined #openscad
peepsalot has quit [Ping timeout: 268 seconds]
qeed_ has joined #openscad
qeed has quit [Ping timeout: 256 seconds]
arebil has joined #openscad
arebil has quit [Ping timeout: 256 seconds]
arebil has joined #openscad
mmu_man has joined #openscad
deathonater has joined #openscad
Smeef has quit [Ping timeout: 252 seconds]
arebil has quit [Ping timeout: 268 seconds]
J24k73 has quit [Quit: Client closed]
J24k73 has joined #openscad
sinned6915 has quit [Quit: Ping timeout (120 seconds)]
sinned6915 has joined #openscad
arebil has joined #openscad
misterfish has joined #openscad
J24k73 has quit [Quit: Client closed]
J24k73 has joined #openscad
mmu_man has quit [Ping timeout: 256 seconds]
mmu_man has joined #openscad
misterfish has quit [Ping timeout: 255 seconds]
misterfish has joined #openscad
kintel has joined #openscad
J24k73 has quit [Quit: Client closed]
J24k73 has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Non-BEAST has quit [Quit: Screw you guys, im going home!]
Non-ICE has joined #openscad
snaked has quit [Remote host closed the connection]
califax has quit [Remote host closed the connection]
califax has joined #openscad
deathonater has quit [Quit: (╯°□°)╯︵ ┻━━┻]
Smeef has joined #openscad
misterfish has quit [Ping timeout: 272 seconds]
mmu_man has quit [Ping timeout: 255 seconds]
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 264 seconds]
mmu_man has joined #openscad
misterfish has joined #openscad
misterfish has quit [Ping timeout: 256 seconds]
misterfish has joined #openscad
hyvoid has quit [Quit: WeeChat 4.2.1]
hyvoid has joined #openscad
mmu_man has quit [Ping timeout: 256 seconds]
mmu_man has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
J24k73 has quit [Quit: Client closed]
J24k73 has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
misterfish has quit [Ping timeout: 255 seconds]
cart_ has quit [Ping timeout: 264 seconds]
J24k73 has quit [Quit: Client closed]
J24k73 has joined #openscad
teepee_ has joined #openscad
J24k73 has quit [Quit: Client closed]
J24k73 has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee