Re Spelling

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Re Spelling

jim_klessig
Well it is a grey/gray area.



Sent from my U.S. Cellular® Smartphone

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

frankv
Are we talking about colo(u)r now?


On Thu, Mar 8, 2018 at 6:41 AM, jim.klessig <[hidden email]> wrote:
Well it is a grey/gray area.



Sent from my U.S. Cellular® Smartphone

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

Gadgetmind
On 07/03/18 18:13, Frank van der Hulst wrote:
Are we talking about colo(u)r now?


That one *is* fixable in user space and I have done so. I keep musing on getting my colour () module to also address "grey".

Center, sadly, isn't fixed as easily and it's a shame that (say) cylinder can cope with many combinations or r, d, r1, r2, d1, d2 but not centre as well as centre.

Oh, and the other one I'd love to fix is cylinder wanting "h" for height and linear_extrude wanting "height". I have so many 100mm linear_extrudes on my 1st pass.



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

NateTG

> Center, sadly, isn't fixed as easily and it's a shame that (say) cylinder
> can cope with many combinations or r, d, r1, r2, d1, d2 but not centre as
> well as centre.

Seems like you could make a wrapper:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions_and_Modules#Overwriting_built-in_modules



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

Ronaldo
Not in Gadgetmind case:

module cylinder(r, h ,  centre) {
  cylinder(r, h, center=centre) ;

would be a improper recursive module. 

Em 7 de mar de 2018 15:57, "NateTG" <[hidden email]> escreveu:

> Center, sadly, isn't fixed as easily and it's a shame that (say) cylinder
> can cope with many combinations or r, d, r1, r2, d1, d2 but not centre as
> well as centre.

Seems like you could make a wrapper:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions_and_Modules#Overwriting_built-in_modules



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

nophead
Yes that is the problem when overriding built in modules you can't use the original. With cylinder you have to construct it yourself and use polyhedron. Not to mention handling r, r1, r2, d , d1, d2, etc.

On 7 March 2018 at 22:07, Ronaldo Persiano <[hidden email]> wrote:
Not in Gadgetmind case:

module cylinder(r, h ,  centre) {
  cylinder(r, h, center=centre) ;

would be a improper recursive module. 

Em 7 de mar de 2018 15:57, "NateTG" <[hidden email]> escreveu:

> Center, sadly, isn't fixed as easily and it's a shame that (say) cylinder
> can cope with many combinations or r, d, r1, r2, d1, d2 but not centre as
> well as centre.

Seems like you could make a wrapper:

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions_and_Modules#Overwriting_built-in_modules



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

runsun
In reply to this post by Ronaldo
This will solve that problem :) :)

module *cylindre*(r, h ,  centre) {
  cylinder(r, h, center=centre) ;
}


Ronaldo wrote
> module cylinder(r, h ,  centre) {
>   cylinder(r, h, center=centre) ;
> }
>
> would be a improper recursive module.





-----

$  Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText  ( OpenSCAD lexer );&nbsp;$ Tips ;&nbsp;$ Snippets

--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
$ Runsun Pan, PhD
$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); $ Tips; $ Snippets
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

MichaelAtOz
Administrator
In reply to this post by nophead
nophead wrote
> Yes that is the problem when overriding built in modules you can't use the
> original.

Would it be too hard to allow calling the original (or next scope level
down) module? Ala Lisp, Forth etc.



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

NateTG
MichaelAtOz wrote
> nophead wrote
>> Yes that is the problem when overriding built in modules you can't use
>> the
>> original.
>
> Would it be too hard to allow calling the original (or next scope level
> down) module? Ala Lisp, Forth etc.
> ...

Can you do that with nested use<> ?



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

MichaelAtOz
Administrator
NateTG wrote
> Can you do that with nested use<> ?

Why yes you can smart Sir.

===========================================
use <_originals.scad> // has _cube()

module cube(size=[1,1,1],centre=false)
  _cube(size=size,center=centre);

color("red") cube(1, centre=true);
translate([2,0,0]) color("blue") _cube(1);



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

MichaelAtOz
Administrator
_originals.scad is just:

module _cube(size=[1,1,1], center=false)
  cube(size,center);



-----
Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

NateTG
In reply to this post by MichaelAtOz
You could write up a whole library... :

module cube(size=[1,1,1],center=undef,centre=false) {
   if(undef==center) {
      _cube(size,centre);
   } else {
      _cube(size,center);
   }
}



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
rew
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

rew
In reply to this post by Gadgetmind
On Wed, Mar 07, 2018 at 06:30:43PM +0000, Gadgetmind wrote:

> On 07/03/18 18:13, Frank van der Hulst wrote:
> >Are we talking about colo(u)r now?
>
>
> That one *is* fixable in user space and I have done so. I keep
> musing on getting my colour () module to also address "grey".
>
> Center, sadly, isn't fixed as easily and it's a shame that (say)
> cylinder can cope with many combinations or r, d, r1, r2, d1, d2 but
> not centre as well as centre.

When using a computer language, you have to use the syntax and
spelling of that computer language. Openscad absolutely does not
tolerate a missing semicolon.

When I write a C program, I might want to call the main program
"HoofdProgramma (int argc, char **argv)", but the spelling in C
dictates that main is spelled "main" (and not Main or HoofdProgramma).

Now for some of you it may look as if some words are just normal
words, but they are not. To get a cylindrical object you use the
keyword "cylinder". To center said object you use "center". That's
the keyword used in the openscad language.

        Roger.

--
** [hidden email] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

codifies
[chris@xps-void ctest]$ cat foo.c
#include <stdio.h>

void foo(void) {
     printf("foo\n");
}

[chris@xps-void ctest]$ gcc -Dfoo=main foo.c -o foo
[chris@xps-void ctest]$ ./foo
foo



On 08/03/18 08:03, Rogier Wolff wrote:

> On Wed, Mar 07, 2018 at 06:30:43PM +0000, Gadgetmind wrote:
>> On 07/03/18 18:13, Frank van der Hulst wrote:
>>> Are we talking about colo(u)r now?
>>
>> That one *is* fixable in user space and I have done so. I keep
>> musing on getting my colour () module to also address "grey".
>>
>> Center, sadly, isn't fixed as easily and it's a shame that (say)
>> cylinder can cope with many combinations or r, d, r1, r2, d1, d2 but
>> not centre as well as centre.
> When using a computer language, you have to use the syntax and
> spelling of that computer language. Openscad absolutely does not
> tolerate a missing semicolon.
>
> When I write a C program, I might want to call the main program
> "HoofdProgramma (int argc, char **argv)", but the spelling in C
> dictates that main is spelled "main" (and not Main or HoofdProgramma).
>
> Now for some of you it may look as if some words are just normal
> words, but they are not. To get a cylindrical object you use the
> keyword "cylinder". To center said object you use "center". That's
> the keyword used in the openscad language.
>
> Roger.
>


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

cacb
On 2018-03-08 11:43, Chris Camacho wrote:

> [chris@xps-void ctest]$ cat foo.c
> #include <stdio.h>
>
> void foo(void) {
>     printf("foo\n");
> }
>
> [chris@xps-void ctest]$ gcc -Dfoo=main foo.c -o foo
> [chris@xps-void ctest]$ ./foo
> foo

This is a text replacement trick using the preprocessor, not the
language. The compiler (gcc) sees main, not foo.

Carsten Arnholm


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

codifies
how its implemented is irrelevant, in the source code the entry point is foo

similarly if I can do

cube([10,20,30],centre=true);

in the source code centre is centre

I don't really care how its done as long as it doesn't slow things down
and it remains compatible....



On 08/03/18 12:18, [hidden email] wrote:

> On 2018-03-08 11:43, Chris Camacho wrote:
>> [chris@xps-void ctest]$ cat foo.c
>> #include <stdio.h>
>>
>> void foo(void) {
>>     printf("foo\n");
>> }
>>
>> [chris@xps-void ctest]$ gcc -Dfoo=main foo.c -o foo
>> [chris@xps-void ctest]$ ./foo
>> foo
>
> This is a text replacement trick using the preprocessor, not the
> language. The compiler (gcc) sees main, not foo.
>
> Carsten Arnholm
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Re Spelling

MathLover
In reply to this post by jim_klessig
To add a different viewpoint on the conversation, let me tell you how
Autodesk solved in in the command line of AutoCAD. The very first versions
only understood (US) english. The they added multi-language support. Ouch.
All the scripts suddenly stopped working if anything else than US english
was selected as the user interface language. They solved it by prefixing all
existing commands with an underscore. So all the scripts had to be reworked.
So instead of (command "line" pt1 pt2), you had to use (command "_line" pt1
pt2) in lisp, and just "_line" in command line replay scripts (which are
hardly used, but possible).

In short, adding localization (Oxford spelling) will call for "unlocalized"
commands to be used in library code and, frankly, all production code. The
whole Autodesk story learned me that having a defined language is better
than having a language that tries to outsmart the programmer. Consider:

cube([1,1,1], center=true);

and

cube([1,1,1], centre=true); // spelling error!

In which the last case was a mistake, not a language preference. The last
form is not an error and defines a variable to be used within the "cube"
module (that this is a built-in module won't make a difference, I hope). In
fact, I think this is how the precision variables work ($fn, etc).

I would like a firm correction from the compiler, and not some guesswork by
the compiler about what I mean. Compilers talk to the programmer. Let's not
silence them in the name of spelling.




--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org