AM
Adrian Mariano
Mon, Apr 21, 2025 10:25 PM
Father Horton, if you feel a desperate need for regexps, somebody has
implemented them in userspace OpenSCAD in the String Theory library. (The
BOSL2 developers have not seen the need to go this far.)
https://www.thingiverse.com/thing:526023
On Mon, Apr 21, 2025 at 5:56 PM Father Horton via Discuss <
discuss@lists.openscad.org> wrote:
I’ve wondered before about adding regex capabilities, but it seems to me
it’s not a common use case and not worth the added complexity.
On Mon, Apr 21, 2025 at 4:38 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:
On 4/21/2025 11:32 AM, gene heskett via Discuss wrote:
where I erroneously assumed this to be an editor function, my bad, but
changing that in the language strikes me as not backwards compatible.
Please don't.
The goal of any such feature would be to make it easy for somebody to
ignore whitespace in strings if they choose to.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Father Horton, if you feel a desperate need for regexps, somebody has
implemented them in userspace OpenSCAD in the String Theory library. (The
BOSL2 developers have not seen the need to go this far.)
https://www.thingiverse.com/thing:526023
On Mon, Apr 21, 2025 at 5:56 PM Father Horton via Discuss <
discuss@lists.openscad.org> wrote:
> I’ve wondered before about adding regex capabilities, but it seems to me
> it’s not a common use case and not worth the added complexity.
>
> On Mon, Apr 21, 2025 at 4:38 PM Jordan Brown via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> On 4/21/2025 11:32 AM, gene heskett via Discuss wrote:
>>
>> where I erroneously assumed this to be an editor function, my bad, but
>> changing that in the language strikes me as not backwards compatible.
>> Please don't.
>>
>>
>> The goal of any such feature would be to make it easy for somebody to
>> ignore whitespace in strings *if they choose to*.
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
FH
Father Horton
Mon, Apr 21, 2025 10:41 PM
I've looked at that before, but userspace apps tend to be slower. It's good
to know there's an out if necessary/
On Mon, Apr 21, 2025 at 5:25 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:
Father Horton, if you feel a desperate need for regexps, somebody has
implemented them in userspace OpenSCAD in the String Theory library. (The
BOSL2 developers have not seen the need to go this far.)
https://www.thingiverse.com/thing:526023
On Mon, Apr 21, 2025 at 5:56 PM Father Horton via Discuss <
discuss@lists.openscad.org> wrote:
I’ve wondered before about adding regex capabilities, but it seems to me
it’s not a common use case and not worth the added complexity.
On Mon, Apr 21, 2025 at 4:38 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:
On 4/21/2025 11:32 AM, gene heskett via Discuss wrote:
where I erroneously assumed this to be an editor function, my bad, but
changing that in the language strikes me as not backwards compatible.
Please don't.
The goal of any such feature would be to make it easy for somebody to
ignore whitespace in strings if they choose to.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I've looked at that before, but userspace apps tend to be slower. It's good
to know there's an out if necessary/
On Mon, Apr 21, 2025 at 5:25 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:
> Father Horton, if you feel a desperate need for regexps, somebody has
> implemented them in userspace OpenSCAD in the String Theory library. (The
> BOSL2 developers have not seen the need to go this far.)
>
> https://www.thingiverse.com/thing:526023
>
> On Mon, Apr 21, 2025 at 5:56 PM Father Horton via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> I’ve wondered before about adding regex capabilities, but it seems to me
>> it’s not a common use case and not worth the added complexity.
>>
>> On Mon, Apr 21, 2025 at 4:38 PM Jordan Brown via Discuss <
>> discuss@lists.openscad.org> wrote:
>>
>>> On 4/21/2025 11:32 AM, gene heskett via Discuss wrote:
>>>
>>> where I erroneously assumed this to be an editor function, my bad, but
>>> changing that in the language strikes me as not backwards compatible.
>>> Please don't.
>>>
>>>
>>> The goal of any such feature would be to make it easy for somebody to
>>> ignore whitespace in strings *if they choose to*.
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
AM
Adrian Mariano
Mon, Apr 21, 2025 10:52 PM
You'll note that I didn't say anything about fast regexp capability. But
refer also to my previous remark on how if the run time performance of
string processing in OpenSCAD is an issue then you're probably doing
something wrong.
On Mon, Apr 21, 2025 at 6:42 PM Father Horton via Discuss <
discuss@lists.openscad.org> wrote:
I've looked at that before, but userspace apps tend to be slower. It's
good to know there's an out if necessary/
On Mon, Apr 21, 2025 at 5:25 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:
Father Horton, if you feel a desperate need for regexps, somebody has
implemented them in userspace OpenSCAD in the String Theory library. (The
BOSL2 developers have not seen the need to go this far.)
https://www.thingiverse.com/thing:526023
On Mon, Apr 21, 2025 at 5:56 PM Father Horton via Discuss <
discuss@lists.openscad.org> wrote:
I’ve wondered before about adding regex capabilities, but it seems to me
it’s not a common use case and not worth the added complexity.
On Mon, Apr 21, 2025 at 4:38 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:
On 4/21/2025 11:32 AM, gene heskett via Discuss wrote:
where I erroneously assumed this to be an editor function, my bad, but
changing that in the language strikes me as not backwards compatible.
Please don't.
The goal of any such feature would be to make it easy for somebody to
ignore whitespace in strings if they choose to.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
You'll note that I didn't say anything about *fast* regexp capability. But
refer also to my previous remark on how if the run time performance of
string processing in OpenSCAD is an issue then you're probably doing
something wrong.
On Mon, Apr 21, 2025 at 6:42 PM Father Horton via Discuss <
discuss@lists.openscad.org> wrote:
> I've looked at that before, but userspace apps tend to be slower. It's
> good to know there's an out if necessary/
>
> On Mon, Apr 21, 2025 at 5:25 PM Adrian Mariano via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> Father Horton, if you feel a desperate need for regexps, somebody has
>> implemented them in userspace OpenSCAD in the String Theory library. (The
>> BOSL2 developers have not seen the need to go this far.)
>>
>> https://www.thingiverse.com/thing:526023
>>
>> On Mon, Apr 21, 2025 at 5:56 PM Father Horton via Discuss <
>> discuss@lists.openscad.org> wrote:
>>
>>> I’ve wondered before about adding regex capabilities, but it seems to me
>>> it’s not a common use case and not worth the added complexity.
>>>
>>> On Mon, Apr 21, 2025 at 4:38 PM Jordan Brown via Discuss <
>>> discuss@lists.openscad.org> wrote:
>>>
>>>> On 4/21/2025 11:32 AM, gene heskett via Discuss wrote:
>>>>
>>>> where I erroneously assumed this to be an editor function, my bad, but
>>>> changing that in the language strikes me as not backwards compatible.
>>>> Please don't.
>>>>
>>>>
>>>> The goal of any such feature would be to make it easy for somebody to
>>>> ignore whitespace in strings *if they choose to*.
>>>> _______________________________________________
>>>> OpenSCAD mailing list
>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
FH
Father Horton
Mon, Apr 21, 2025 11:02 PM
You'll note that I didn't say anything about fast regexp capability.
But refer also to my previous remark on how if the run time performance of
string processing in OpenSCAD is an issue then you're probably doing
something wrong.
On Mon, Apr 21, 2025 at 6:42 PM Father Horton via Discuss <
discuss@lists.openscad.org> wrote:
I've looked at that before, but userspace apps tend to be slower. It's
good to know there's an out if necessary/
On Mon, Apr 21, 2025 at 5:25 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:
Father Horton, if you feel a desperate need for regexps, somebody has
implemented them in userspace OpenSCAD in the String Theory library. (The
BOSL2 developers have not seen the need to go this far.)
https://www.thingiverse.com/thing:526023
On Mon, Apr 21, 2025 at 5:56 PM Father Horton via Discuss <
discuss@lists.openscad.org> wrote:
I’ve wondered before about adding regex capabilities, but it seems to
me it’s not a common use case and not worth the added complexity.
On Mon, Apr 21, 2025 at 4:38 PM Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:
On 4/21/2025 11:32 AM, gene heskett via Discuss wrote:
where I erroneously assumed this to be an editor function, my bad, but
changing that in the language strikes me as not backwards compatible.
Please don't.
The goal of any such feature would be to make it easy for somebody to
ignore whitespace in strings if they choose to.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Agreed.
On Mon, Apr 21, 2025 at 5:53 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:
> You'll note that I didn't say anything about *fast* regexp capability.
> But refer also to my previous remark on how if the run time performance of
> string processing in OpenSCAD is an issue then you're probably doing
> something wrong.
>
> On Mon, Apr 21, 2025 at 6:42 PM Father Horton via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> I've looked at that before, but userspace apps tend to be slower. It's
>> good to know there's an out if necessary/
>>
>> On Mon, Apr 21, 2025 at 5:25 PM Adrian Mariano via Discuss <
>> discuss@lists.openscad.org> wrote:
>>
>>> Father Horton, if you feel a desperate need for regexps, somebody has
>>> implemented them in userspace OpenSCAD in the String Theory library. (The
>>> BOSL2 developers have not seen the need to go this far.)
>>>
>>> https://www.thingiverse.com/thing:526023
>>>
>>> On Mon, Apr 21, 2025 at 5:56 PM Father Horton via Discuss <
>>> discuss@lists.openscad.org> wrote:
>>>
>>>> I’ve wondered before about adding regex capabilities, but it seems to
>>>> me it’s not a common use case and not worth the added complexity.
>>>>
>>>> On Mon, Apr 21, 2025 at 4:38 PM Jordan Brown via Discuss <
>>>> discuss@lists.openscad.org> wrote:
>>>>
>>>>> On 4/21/2025 11:32 AM, gene heskett via Discuss wrote:
>>>>>
>>>>> where I erroneously assumed this to be an editor function, my bad, but
>>>>> changing that in the language strikes me as not backwards compatible.
>>>>> Please don't.
>>>>>
>>>>>
>>>>> The goal of any such feature would be to make it easy for somebody to
>>>>> ignore whitespace in strings *if they choose to*.
>>>>> _______________________________________________
>>>>> OpenSCAD mailing list
>>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>>
>>>> _______________________________________________
>>>> OpenSCAD mailing list
>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>>
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email to discuss-leave@lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
>
GH
gene heskett
Mon, Apr 21, 2025 11:08 PM
On 4/21/25 18:22, Adrian Mariano via Discuss wrote:
Gene, I don't think you can consider it a bug that 3 prints as "3" instead
of "3.0". The real bug, if you will, is that there is no way to specify
the desired format. You can easily write code like
echo(str(x, x==round(x) ? ".0":"");
I think, its been a while, that I tried something along that line over a
year ago. it worked for the echo statement but was stripped again if
assigned to a text variable. Or passed as a var. Since it wasn't a
showstopper, I didn't spend any great amount of time on it. Since it was
a note to the future me, and I knew the .0 was being stripped, it wasn't
a problem to anyone but me. The part in question is the pair of half
nuts to fit a hard maple screw, there were two vars that changed with
each screw I made, the exact style of tooth, and an oversize that was
used in each nut to precisely fit each screw, a 2 start buttress thread
I made as big as I could make out of a 2"x2"x23" of hard maple. So the
tooth was "T=58", and the size offset from some value above a minimum
size, as I quit carving the tooth deeper at whatever size got rid of the
last of the flats of the 2x2 stick.
or something like that. For those interested in more powerful number
On 4/21/25 12:46, Jordan Brown via Discuss wrote:
On 4/20/2025 12:19 PM, Adrian Mariano via Discuss wrote:
Gene, it's not about the editor but about the language.
If you're in a situation where you're doing enough string processing
in OpenSCAD that performance matters, I think you've gone down the
wrong path. Just do this in userspace. Or with a library that
provides string processing. I'd rather see effort on new features go
to things that genuinely extend capability.
I'm with you on this. The only string bug I know of is if you feed the
native string handler an even value like 3.0, the .0 is stripped,
leaving only the 3 when that value is embossed on a 3d print. For my
vise screw project, its not a showstopper just a surprise, so I've not
mentioned it till now. If that gets fixed in 2035 I likely won't notice
since I'd then be 100 yo & gone. Long term (50y) diabetic, chest full of
parts I was not born with now. I've done pretty good for a kid with an
8th grade education. That CET after my name is real, I teach EE's stuff
they should have learned in school but their prof didn't understand it
either. Math is not even an also ran, but I can discuss relativity in
terms of real world effects.
Thank you Adrian.
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.
On 4/21/25 18:22, Adrian Mariano via Discuss wrote:
> Gene, I don't think you can consider it a bug that 3 prints as "3" instead
> of "3.0". The real bug, if you will, is that there is no way to specify
> the desired format. You can easily write code like
>
> echo(str(x, x==round(x) ? ".0":"");
I think, its been a while, that I tried something along that line over a
year ago. it worked for the echo statement but was stripped again if
assigned to a text variable. Or passed as a var. Since it wasn't a
showstopper, I didn't spend any great amount of time on it. Since it was
a note to the future me, and I knew the .0 was being stripped, it wasn't
a problem to anyone but me. The part in question is the pair of half
nuts to fit a hard maple screw, there were two vars that changed with
each screw I made, the exact style of tooth, and an oversize that was
used in each nut to precisely fit each screw, a 2 start buttress thread
I made as big as I could make out of a 2"x2"x23" of hard maple. So the
tooth was "T=58", and the size offset from some value above a minimum
size, as I quit carving the tooth deeper at whatever size got rid of the
last of the flats of the 2x2 stick.
>or something like that. For those interested in more powerful number
> conversion to strings, BOSL2 supplies several options:
>
> https://github.com/BelfrySCAD/BOSL2/wiki/strings.scad#section-formatting-numbers-into-strings
>
>
> On Mon, Apr 21, 2025 at 5:57 PM gene heskett via Discuss <
> discuss@lists.openscad.org> wrote:
>
>> On 4/21/25 12:46, Jordan Brown via Discuss wrote:
>>> On 4/20/2025 12:19 PM, Adrian Mariano via Discuss wrote:
>>>> Gene, it's not about the editor but about the language.
>>>>
>>>> If you're in a situation where you're doing enough string processing
>>>> in OpenSCAD that performance matters, I think you've gone down the
>>>> wrong path. Just do this in userspace. Or with a library that
>>>> provides string processing. I'd rather see effort on new features go
>>>> to things that genuinely extend capability.
>> I'm with you on this. The only string bug I know of is if you feed the
>> native string handler an even value like 3.0, the .0 is stripped,
>> leaving only the 3 when that value is embossed on a 3d print. For my
>> vise screw project, its not a showstopper just a surprise, so I've not
>> mentioned it till now. If that gets fixed in 2035 I likely won't notice
>> since I'd then be 100 yo & gone. Long term (50y) diabetic, chest full of
>> parts I was not born with now. I've done pretty good for a kid with an
>> 8th grade education. That CET after my name is real, I teach EE's stuff
>> they should have learned in school but their prof didn't understand it
>> either. Math is not even an also ran, but I can discuss relativity in
>> terms of real world effects.
Thank you Adrian.
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