JB
Jordan Brown
Mon, Nov 24, 2025 6:22 PM
On 11/24/2025 5:11 AM, Michael Marx (spintel) via Discuss wrote:
It is actually a "technical issue".
To be able to 'readily' support the use of the command line parameter
'-D var=val'.
The implementation of which is available to anyone who wishes to read
the code.
So If anyone wants to change it, get coding...
At this point it's not changeable.
x = 1;
if (x == 1) {
x = 2;
}
echo(x);
yields 1. That's the definition of the language.
larry writes:
by detecting (at least) the simple "a=a+1", by
detecting it, and showing it as an error along with a pointer to a page
that explains the whole thing.
The first part, the warning... I can't immediately think of any case
that that's illegal, that won't yield a warning. (Special cases for
include<> and -D excepted.)
The second part, the link to the page that explains it, yes.
But note that there are reassign-like cases, that really create new
instances, that are totally legal and, again, are now part of the
definition of the language.
x = 1;
if (x == 1) {
x = x + 1;
echo(x);
}
echo(x);
yields 2 and then 1, and that's the definition of the language and can't
be changed without breaking compatibility.
Maybe we need a compatibility break. Maybe somebody should fork off an
OpenSCAD 2, that has more "traditional" variable semantics. And maybe
enough people will adopt it that it can replace Original OpenSCAD. But
I wouldn't bet on it succeeding.
On 11/24/2025 5:11 AM, Michael Marx (spintel) via Discuss wrote:
>
> It is actually a "technical issue".
>
> To be able to 'readily' support the use of the command line parameter
> '-D var=val'.
> The implementation of which is available to anyone who wishes to read
> the code.
>
> So If anyone wants to change it, get coding...
>
At this point it's not changeable.
x = 1;
if (x == 1) {
x = 2;
}
echo(x);
yields 1. That's the definition of the language.
larry writes:
> by detecting (at least) the simple "a=a+1", by
> detecting it, and showing it as an error along with a pointer to a page
> that explains the whole thing.
The first part, the warning... I can't immediately think of any case
that that's illegal, that *won't* yield a warning. (Special cases for
include<> and -D excepted.)
The second part, the link to the page that explains it, yes.
But note that there are reassign-like cases, that really create new
instances, that are totally legal and, again, are now part of the
definition of the language.
x = 1;
if (x == 1) {
x = x + 1;
echo(x);
}
echo(x);
yields 2 and then 1, and that's the definition of the language and can't
be changed without breaking compatibility.
Maybe we need a compatibility break. Maybe somebody should fork off an
OpenSCAD 2, that has more "traditional" variable semantics. And maybe
enough people will adopt it that it can replace Original OpenSCAD. But
I wouldn't bet on it succeeding.
GH
gene heskett
Mon, Nov 24, 2025 6:35 PM
On 11/24/25 11:07, Jeff Ross via Discuss wrote:
On 11/23/25 22:27, gene heskett via Discuss wrote:
Chuckle... Or its about time I paid some dues by contributing back. So
how about making a set of 3 wrenches that make a 30 minute job of
swapping out a bathroom vanity faucet. 1 to fit the over valve
handles to
give you a decent grip on the shutoff valves under the vanity, & 2 more
to fit the compression nuts to disconnect the flex hoses & the big nuts
that hold the faucet into the back ledge of the vanity's sink. The
latter
2 long enough to put the other end at a reachable distance below the
sink to give you working room to spin them with an irwin version of a
channel lock plier.
I did that with commercial tooling about 25 years ago when I was younger
and more flexible, took about 5 hours, spilled some blood & a lot of
muttering. Now I'm 91 and had to replace that faucet again. I designed
the wrenches in OpenSCAD and printed them in PETG the day before
and did the actual change out in about 35 minutes this time. I don't
consider me an expert. But these were handier than bottled beer to me.
Be my guest and squirrel this away for the next time you have to act
like a plumber. This is about $300 cheaper than calling a plumber.
Cheers, Gene Heskett, CET.
Thanks, Gene! These are amazing and exactly the sort of thing I
wanted to be able to do when I got into 3D printing in the first place.
Jeff Ross
Thanks Jeff. It does show how I approach 3d printing too. making
printer parts from lighter plastic or carbon fiber, increasing the speed
of the printer because the flying weight is reduced. But I go farther by
swapping the usual steppers for XY motions for closed loop
stepper/servo's running on 3x the voltage, many more times accurate than
regular steppers while running much colder. I have an Ender 5 Plus that
layer shifted Y at 25mm/sec speed 4 years ago. now runs at 220mm/sec,
doesn't even have input shaping but still engraves size info on the
sides of the half nuts for a woodworkers vice I make the screws for out
of hard maple.
Its currently on the disabled list from failures of the opto-isolaters
in the Hanpose CL42 drivers. but I think I've found the problem. The
6N137's used for step & dir isolation have a 3 second at 200C solder
temp max, and they are hot air soldered, which probably damages them.
Ran most of a year then they all failed. So I've got the chips AND some
sockets, so I can put new ones in w/o ever subjecting them to soldering
heat.
But I'm diabetic, with deteriorating eyesight so I should get a huge but
low power 7" glass yet today. Tracking says its out for delivery. Then
the "fun" begins. I did things like this for a living most of my life
but have been coasting for 22 years since I retired so at 91, I'm a bit
rusty. But still a CET. A test the usual EE can't pass. I do things
just to see if I can.
My backup server that can backup 5 machines here, draws 14 watts idling,
peaks at 18 watts running a 5 machine backup in under 30 minutes. Has
11.4Tb of raid6 to play in, runs on a bananapi-m5. Just brought it
online about 2 weeks ago. Its amazing how fast these pi clones can be.
Cheers, Gene Heskett, CET.
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Don't poison our oceans, interdict drugs at the src.
On 11/24/25 11:07, Jeff Ross via Discuss wrote:
>
> On 11/23/25 22:27, gene heskett via Discuss wrote:
>> Chuckle... Or its about time I paid some dues by contributing back. So
>> how about making a set of 3 wrenches that make a 30 minute job of
>> swapping out a bathroom vanity faucet. 1 to fit the over valve
>> handles to
>> give you a decent grip on the shutoff valves under the vanity, & 2 more
>> to fit the compression nuts to disconnect the flex hoses & the big nuts
>> that hold the faucet into the back ledge of the vanity's sink. The
>> latter
>> 2 long enough to put the other end at a reachable distance below the
>> sink to give you working room to spin them with an irwin version of a
>> channel lock plier.
>>
>> I did that with commercial tooling about 25 years ago when I was younger
>> and more flexible, took about 5 hours, spilled some blood & a lot of
>> muttering. Now I'm 91 and had to replace that faucet again. I designed
>> the wrenches in OpenSCAD and printed them in PETG the day before
>> and did the actual change out in about 35 minutes this time. I don't
>> consider me an expert. But these were handier than bottled beer to me.
>>
>> Be my guest and squirrel this away for the next time you have to act
>> like a plumber. This is about $300 cheaper than calling a plumber.
>>
>> Cheers, Gene Heskett, CET.
>>
> Thanks, Gene! These are amazing and exactly the sort of thing I
> wanted to be able to do when I got into 3D printing in the first place.
>
> Jeff Ross
Thanks Jeff. It does show how I approach 3d printing too. making
printer parts from lighter plastic or carbon fiber, increasing the speed
of the printer because the flying weight is reduced. But I go farther by
swapping the usual steppers for XY motions for closed loop
stepper/servo's running on 3x the voltage, many more times accurate than
regular steppers while running much colder. I have an Ender 5 Plus that
layer shifted Y at 25mm/sec speed 4 years ago. now runs at 220mm/sec,
doesn't even have input shaping but still engraves size info on the
sides of the half nuts for a woodworkers vice I make the screws for out
of hard maple.
Its currently on the disabled list from failures of the opto-isolaters
in the Hanpose CL42 drivers. but I think I've found the problem. The
6N137's used for step & dir isolation have a 3 second at 200C solder
temp max, and they are hot air soldered, which probably damages them.
Ran most of a year then they all failed. So I've got the chips AND some
sockets, so I can put new ones in w/o ever subjecting them to soldering
heat.
But I'm diabetic, with deteriorating eyesight so I should get a huge but
low power 7" glass yet today. Tracking says its out for delivery. Then
the "fun" begins. I did things like this for a living most of my life
but have been coasting for 22 years since I retired so at 91, I'm a bit
rusty. But still a CET. A test the usual EE can't pass. I do things
just to see if I can.
My backup server that can backup 5 machines here, draws 14 watts idling,
peaks at 18 watts running a 5 machine backup in under 30 minutes. Has
11.4Tb of raid6 to play in, runs on a bananapi-m5. Just brought it
online about 2 weeks ago. Its amazing how fast these pi clones can be.
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Don't poison our oceans, interdict drugs at the src.
WF
William F. Adams
Mon, Nov 24, 2025 6:47 PM
The thing is, folks who want "real"/mutable variables can just use Python in OpenSCAD --- so I hope we don't have any sort of break or fork or major change.
<insert Latin story about fasces>
Hopefully, we can manage with just improved documentation (though I doubt I can assist w/ that beyond misunderstanding what has been written and asking questions which suggest improvements so as to get things through my thick head).
William
The thing is, folks who want "real"/mutable variables can just use Python in OpenSCAD --- so I hope we don't have any sort of break or fork or major change.
<insert Latin story about fasces>
Hopefully, we can manage with just improved documentation (though I doubt I can assist w/ that beyond misunderstanding what has been written and asking questions which suggest improvements so as to get things through my thick head).
William
L
larry
Mon, Nov 24, 2025 7:18 PM
On Mon, 2025-11-24 at 10:22 -0800, Jordan Brown via Discuss wrote:
by detecting (at least) the simple "a=a+1", by
detecting it, and showing it as an error along with a pointer to a
page that explains the whole thing.
The first part, the warning... I can't immediately think of any case
that that's illegal, that won't yield a warning. (Special cases
for include<> and -D excepted.)
The second part, the link to the page that explains it, yes.
But note that there are reassign-like cases, that really create new
instances, that are totally legal and, again, are now part of the
definition of the language.
x = 1;
if (x == 1) {
x = x + 1;
echo(x);
}
echo(x);
yields 2 and then 1, and that's the definition of the language and
can't be changed without breaking compatibility.
Ahh... never thought of that.
On Mon, 2025-11-24 at 10:22 -0800, Jordan Brown via Discuss wrote:
> larry writes:
> > by detecting (at least) the simple "a=a+1", by
> > detecting it, and showing it as an error along with a pointer to a
> > page that explains the whole thing.
> The first part, the warning... I can't immediately think of any case
> that that's illegal, that *won't* yield a warning. (Special cases
> for include<> and -D excepted.)
> The second part, the link to the page that explains it, yes.
> But note that there are reassign-like cases, that really create new
> instances, that are totally legal and, again, are now part of the
> definition of the language.
> > x = 1;
> > if (x == 1) {
> > x = x + 1;
> > echo(x);
> > }
> > echo(x);
> yields 2 and then 1, and that's the definition of the language and
> can't be changed without breaking compatibility.
Ahh... never thought of that.
L
larry
Mon, Nov 24, 2025 8:02 PM
On Mon, 2025-11-24 at 13:18 -0600, larry via Discuss wrote:
On Mon, 2025-11-24 at 10:22 -0800, Jordan Brown via Discuss wrote:
by detecting (at least) the simple "a=a+1", by
detecting it, and showing it as an error along with a pointer to a
page that explains the whole thing.
The first part, the warning... I can't immediately think of any case
that that's illegal, that won't yield a warning. (Special cases
for include<> and -D excepted.)
The second part, the link to the page that explains it, yes.
But note that there are reassign-like cases, that really create new
instances, that are totally legal and, again, are now part of the
definition of the language.
x = 1;
if (x == 1) {
x = x + 1;
echo(x);
}
echo(x);
yields 2 and then 1, and that's the definition of the language and
can't be changed without breaking compatibility.
Ahh... never thought of that.
Hmm... thinking further... how about a flag in preferences that will
enable or disable the jump to an explanatory page, and after the first
jump, disable the next one?
Perhaps a 3 choice flag. Enable once, Disable, and Enable?
On Mon, 2025-11-24 at 13:18 -0600, larry via Discuss wrote:
> On Mon, 2025-11-24 at 10:22 -0800, Jordan Brown via Discuss wrote:
> > larry writes:
> > > by detecting (at least) the simple "a=a+1", by
> > > detecting it, and showing it as an error along with a pointer to a
> > > page that explains the whole thing.
> > The first part, the warning... I can't immediately think of any case
> > that that's illegal, that *won't* yield a warning. (Special cases
> > for include<> and -D excepted.)
> > The second part, the link to the page that explains it, yes.
> > But note that there are reassign-like cases, that really create new
> > instances, that are totally legal and, again, are now part of the
> > definition of the language.
> > > x = 1;
> > > if (x == 1) {
> > > x = x + 1;
> > > echo(x);
> > > }
> > > echo(x);
> > yields 2 and then 1, and that's the definition of the language and
> > can't be changed without breaking compatibility.
>
> Ahh... never thought of that.
Hmm... thinking further... how about a flag in preferences that will
enable or disable the jump to an explanatory page, and after the first
jump, disable the next one?
Perhaps a 3 choice flag. Enable once, Disable, and Enable?
RW
Rogier Wolff
Tue, Nov 25, 2025 10:39 AM
On Mon, Nov 24, 2025 at 02:02:00PM -0600, larry via Discuss wrote:
Hmm... thinking further... how about a flag in preferences that will
enable or disable the jump to an explanatory page, and after the first
jump, disable the next one?
Perhaps a 3 choice flag. Enable once, Disable, and Enable?
The issue is that "x = x+1;" is totally valid openscad, and openscad
cannot know that you're thinking of something else than what the
language definition implies;
x = 0;
for (i=[0:1:10]) {
translate ([x,0,0]) cylinder (d=3, h=10);
x = x + 10;
}
is 100% valid openscad, but happens to do precisely NOT what
might have been intended here.
consider:
x=0;
circle (10);
if (1) { x = x + 10; translate ([x,10]) circle (8);}
if (1) { x = x - 10; translate ([x,10]) circle (8);}
(I need the "if (1)" because otherwise the curly braces don't
create a new context...??? )
This seems a bit silly if the x only appears inside a simple translate
statement, but with more complex stuff it might make sense to do things
this way.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
On Mon, Nov 24, 2025 at 02:02:00PM -0600, larry via Discuss wrote:
> Hmm... thinking further... how about a flag in preferences that will
> enable or disable the jump to an explanatory page, and after the first
> jump, disable the next one?
>
> Perhaps a 3 choice flag. Enable once, Disable, and Enable?
The issue is that "x = x+1;" is totally valid openscad, and openscad
cannot know that you're thinking of something else than what the
language definition implies;
x = 0;
for (i=[0:1:10]) {
translate ([x,0,0]) cylinder (d=3, h=10);
x = x + 10;
}
is 100% valid openscad, but happens to do precisely NOT what
might have been intended here.
consider:
x=0;
circle (10);
if (1) { x = x + 10; translate ([x,10]) circle (8);}
if (1) { x = x - 10; translate ([x,10]) circle (8);}
(I need the "if (1)" because otherwise the curly braces don't
create a new context...??? )
This seems a bit silly if the x only appears inside a simple translate
statement, but with more complex stuff it might make sense to do things
this way.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Verl. Spiegelmakerstraat 37 2645 LZ Delfgauw, The Netherlands.
** KVK: 27239233 **
f equals m times a. When your f is steady, and your m is going down
your a** is going up. -- Chris Hadfield about flying up the space shuttle.
** 'a' for accelleration.
JB
Jordan Brown
Tue, Nov 25, 2025 6:58 PM
On 11/25/2025 2:39 AM, Rogier Wolff via Discuss wrote:
x = 0;
for (i=[0:1:10]) {
translate ([x,0,0]) cylinder (d=3, h=10);
x = x + 10;
}
is 100% valid openscad, but happens to do precisely NOT what
might have been intended here.
(I need the "if (1)" because otherwise the curly braces don't
create a new context...??? )
*Anonymous scopes* are not considered scopes
No, I don't know why. As best I can tell, anonymous scopes are almost
useless; their only value is that they can be collapsed in the editor.
On 11/25/2025 2:39 AM, Rogier Wolff via Discuss wrote:
> x = 0;
> for (i=[0:1:10]) {
> translate ([x,0,0]) cylinder (d=3, h=10);
> x = x + 10;
> }
>
> is 100% valid openscad, but happens to do precisely NOT what
> might have been intended here.
Yes, exactly.
> (I need the "if (1)" because otherwise the curly braces don't
> create a new context...??? )
Correct:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Scope_of_variables
>
> *Anonymous scopes* are not considered scopes
>
No, I don't know why. As best I can tell, anonymous scopes are almost
useless; their only value is that they can be collapsed in the editor.
L
larry
Tue, Nov 25, 2025 8:08 PM
On Tue, 2025-11-25 at 11:39 +0100, Rogier Wolff via Discuss wrote:
On Mon, Nov 24, 2025 at 02:02:00PM -0600, larry via Discuss wrote:
Hmm... thinking further... how about a flag in preferences that will
enable or disable the jump to an explanatory page, and after the first
jump, disable the next one?
Perhaps a 3 choice flag. Enable once, Disable, and Enable?
The issue is that "x = x+1;" is totally valid openscad, and openscad
cannot know that you're thinking of something else than what the
language definition implies;
Understood, which is why I thought that if a newbie used something like
that, it would be pointed out and the newbie would be educated. This
would be (possibly) at the cost of a very minor inconvenience to
someone who already knew about it, and once that happened, if the
Disable flag were to be set as part of the education, would never
happen again
x = 0;
for (i=[0:1:10]) {
translate ([x,0,0]) cylinder (d=3, h=10);
x = x + 10;
}
is 100% valid openscad, but happens to do precisely NOT what
might have been intended here.
consider:
x=0;
circle (10);
if (1) { x = x + 10; translate ([x,10]) circle (8);}
if (1) { x = x - 10; translate ([x,10]) circle (8);}
(I need the "if (1)" because otherwise the curly braces don't
create a new context...??? )
This seems a bit silly if the x only appears inside a simple translate
statement, but with more complex stuff it might make sense to do things
this way.
I have wanted what Jordan calls 'anonymous scopes' several times, and
had to work around that by using union(), which is the only case I
remember. I don't think they are harmful, and if they can be used for
ANY reason, I think they would be worthwhile having.
On Tue, 2025-11-25 at 11:39 +0100, Rogier Wolff via Discuss wrote:
> On Mon, Nov 24, 2025 at 02:02:00PM -0600, larry via Discuss wrote:
> > Hmm... thinking further... how about a flag in preferences that will
> > enable or disable the jump to an explanatory page, and after the first
> > jump, disable the next one?
> >
> > Perhaps a 3 choice flag. Enable once, Disable, and Enable?
>
> The issue is that "x = x+1;" is totally valid openscad, and openscad
> cannot know that you're thinking of something else than what the
> language definition implies;
Understood, which is why I thought that if a newbie used something like
that, it would be pointed out and the newbie would be educated. This
would be (possibly) at the cost of a very minor inconvenience to
someone who already knew about it, and once that happened, if the
Disable flag were to be set as part of the education, would never
happen again
> x = 0;
> for (i=[0:1:10]) {
> translate ([x,0,0]) cylinder (d=3, h=10);
> x = x + 10;
> }
>
> is 100% valid openscad, but happens to do precisely NOT what
> might have been intended here.
>
> consider:
>
> x=0;
> circle (10);
> if (1) { x = x + 10; translate ([x,10]) circle (8);}
> if (1) { x = x - 10; translate ([x,10]) circle (8);}
>
>
> (I need the "if (1)" because otherwise the curly braces don't
> create a new context...??? )
> This seems a bit silly if the x only appears inside a simple translate
> statement, but with more complex stuff it might make sense to do things
> this way.
I have wanted what Jordan calls 'anonymous scopes' several times, and
had to work around that by using union(), which is the only case I
remember. I don't think they are harmful, and if they can be used for
ANY reason, I think they would be worthwhile having.
JB
Jordan Brown
Tue, Nov 25, 2025 10:09 PM
On 11/25/2025 12:08 PM, larry via Discuss wrote:
I have wanted what Jordan calls 'anonymous scopes' several times, and
had to work around that by using union(), which is the only case I
remember. I don't think they are harmful, and if they can be used for
ANY reason, I think they would be worthwhile having.
I started to change the behavior of such "naked" braces, because I
couldn't see any reason why they were different from not being there at
all. Somebody pointed out that they still enabled collapsing that
block, which shot down my "no practical compatibility impact" argument.
On 11/25/2025 12:08 PM, larry via Discuss wrote:
> I have wanted what Jordan calls 'anonymous scopes' several times, and
> had to work around that by using union(), which is the only case I
> remember. I don't think they are harmful, and if they can be used for
> ANY reason, I think they would be worthwhile having.
I started to change the behavior of such "naked" braces, because I
couldn't see any reason why they were different from not being there at
all. Somebody pointed out that they still enabled collapsing that
block, which shot down my "no practical compatibility impact" argument.
FH
Father Horton
Tue, Nov 25, 2025 11:00 PM
I think the lack of anonymous scopes violates the Principle of Least
Surprise unnecessarily for people used to other languages, but given
that this would be a breaking change, it's probably best left as it is.
On Tue, Nov 25, 2025 at 4:10 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:
On 11/25/2025 12:08 PM, larry via Discuss wrote:
I have wanted what Jordan calls 'anonymous scopes' several times, and
had to work around that by using union(), which is the only case I
remember. I don't think they are harmful, and if they can be used for
ANY reason, I think they would be worthwhile having.
I started to change the behavior of such "naked" braces, because I
couldn't see any reason why they were different from not being there at
all. Somebody pointed out that they still enabled collapsing that block,
which shot down my "no practical compatibility impact" argument.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I think the lack of anonymous scopes violates the Principle of Least
Surprise unnecessarily for people used to other languages, but given
that this would be a breaking change, it's probably best left as it is.
On Tue, Nov 25, 2025 at 4:10 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:
> On 11/25/2025 12:08 PM, larry via Discuss wrote:
>
> I have wanted what Jordan calls 'anonymous scopes' several times, and
> had to work around that by using union(), which is the only case I
> remember. I don't think they are harmful, and if they can be used for
> ANY reason, I think they would be worthwhile having.
>
>
> I started to change the behavior of such "naked" braces, because I
> couldn't see any reason why they were different from not being there at
> all. Somebody pointed out that they still enabled collapsing that block,
> which shot down my "no practical compatibility impact" argument.
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org