On Fri, Aug 19, 2022 at 02:11:11PM +0100, Roger Whiteley via Discuss wrote:
But I learnt to touch type in 1984 [honest, it really was 1984, me, a
friend, and about 20 others, on real typewriters].
Ha! Beat you by a few years... I learned to touch-type in 1978/79 or
thereabouts.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
** Delftechpark 11 2628 XJ Delft, 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.
I have never been able to touch type and as I get older (60), I seem to get
more dyslexic and nothing I type comes out as intended, so I keep all my
identifiers short and use underscores and don't type anything more than I
have to. However, that is just personal taste. If I was using somebody
else's code I don't mind what convention they use. Especially if they were
blind. I can't imagine how difficult it would be designing 3D objects
without sight. Hats off to the OP.
On Fri, 19 Aug 2022 at 16:38, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:
On Fri, Aug 19, 2022 at 02:11:11PM +0100, Roger Whiteley via Discuss wrote:
But I learnt to touch type in 1984 [honest, it really was 1984, me, a
friend, and about 20 others, on real typewriters].
Ha! Beat you by a few years... I learned to touch-type in 1978/79 or
thereabouts.
Roger.
--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
** Delftechpark 11 2628 XJ Delft, 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.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
On 8/19/2022 8:36 AM, Rogier Wolff wrote:
Ha! Beat you by a few years... I learned to touch-type in 1978/79 or
thereabouts.
Circa 1974 for me. On a Teletype 33 KSR.
But despite a couple of attempts I have never learned to touch-type
properly. I know where all of the alphabet and most of the
punctuation are, and touch-type them, but I use the wrong fingers. For
instance, I think I almost always use the left shift key.
On 8/19/2022 1:19 PM, Jordan Brown wrote:
Circa 1974 for me. On a Teletype 33 KSR.
But despite a couple of attempts I have never learned to touch-type
properly. I know where all of the alphabet and most of the
punctuation are, and touch-type them, but I use the wrong fingers.
For instance, I think I almost always use the left shift key.
Ha - same here. I'm so glad to hear I'm not the only one.
- Michele
There's a right shift key? Who knew?
On Fri, Aug 19, 2022 at 1:34 PM Michele Denber mdenber@gmx.com wrote:
On 8/19/2022 1:19 PM, Jordan Brown wrote:
Circa 1974 for me. On a Teletype 33 KSR.
But despite a couple of attempts I have never learned to touch-type
properly. I know where all of the alphabet and most of the
punctuation are, and touch-type them, but I use the wrong fingers.
For instance, I think I almost always use the left shift key.
Ha - same here. I'm so glad to hear I'm not the only one.
- Michele
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
On Fri, 2022-08-19 at 14:09 -0500, Father Horton wrote:
There's a right shift key? Who knew?
If I were to lose 8 of my 10 fingers, I would not lose any typing
speed.
I got into the computer business in 1966, but never did learn to touch-
type.
I personally hate tabs.
I think that this discussion overlooks a major formatting question for
OpenSCAD code, though it's one that only arises when doing complicated
functions. The question is, how should conditionals be formatted?
I generally do something like:
x = condition1 ? result1
: condition2 ? result2
: condition3 ? result3
: final result,
But things get more difficult to lay out when the results (or conditions)
are long.
x = condition1 ?
let(
y = something,
z = something_else,
w = f(x,y)
)
result1(y,z,w)
: condition2 ?
etc etc
Another option might be
x = very_long_condition(this,that,the,other)
? result1
: result2,
On Sat, Aug 20, 2022 at 9:26 AM larry lar3ry@sasktel.net wrote:
On Fri, 2022-08-19 at 14:09 -0500, Father Horton wrote:
There's a right shift key? Who knew?
If I were to lose 8 of my 10 fingers, I would not lose any typing
speed.
I got into the computer business in 1966, but never did learn to touch-
type.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
On 8/21/2022 12:49 PM, Adrian Mariano wrote:
I personally hate tabs.
Next question, then: fixed indentation steps, or some kind of variable
scheme?
I think that this discussion overlooks a major formatting question for
OpenSCAD code, though it's one that only arises when doing complicated
functions. The question is, how should conditionals be formatted?
I can't say that I have a mature plan here, but I have some guidelines.
If it's short then one line is OK. "Short" is approximately no more
than a two-term expression in each of the three slots. And if they're
all two-term expressions, it's not short.
If it's not short, then I prefer
x = a
? b
: c;
so that the if-true value and the if-false value are peers, with the ?
or : marking them.
If b is itself a ?: sequence, then parenthesize and indent it, probably:
x = a
? (b
? d
: e
)
: c;
But also consider extracting it out into a separate function.
If c is a ?: sequence, continue at the same level of indentation:
x = a
? b
: c
? d
: e;
I went and grabbed one of mine. It’s pretty close to what you’ve got below.
function _gap_adjustment(si) =
let (
pos = _pos_n(_Pos(si)),
gap = _Gap(si),
headLen = _HeadH(si) + _ClearH(si),
nutLen = _ScrewL(si) - gap + _ClearS(si)
)
(pos <= 0) ? 0 :
(pos == 1) ? headLen :
(pos == 2) ? headLen + gap/2 :
(pos == 3) ? headLen + gap :
(pos == 4) ? headLen + _ScrewL(si):
headLen + gap + nutLen;
-Bob
Tucson AZ
On Aug 21, 2022, at 12:49, Adrian Mariano avm4@cornell.edu wrote:
I personally hate tabs.
I think that this discussion overlooks a major formatting question for OpenSCAD code, though it's one that only arises when doing complicated functions. The question is, how should conditionals be formatted?
I generally do something like:
x = condition1 ? result1
: condition2 ? result2
: condition3 ? result3
: final result,
But things get more difficult to lay out when the results (or conditions) are long.
x = condition1 ?
let(
y = something,
z = something_else,
w = f(x,y)
)
result1(y,z,w)
: condition2 ?
etc etc
Another option might be
x = very_long_condition(this,that,the,other)
? result1
: result2,
On Sat, Aug 20, 2022 at 9:26 AM larry <lar3ry@sasktel.net mailto:lar3ry@sasktel.net> wrote:
On Fri, 2022-08-19 at 14:09 -0500, Father Horton wrote:
There's a right shift key? Who knew?
If I were to lose 8 of my 10 fingers, I would not lose any typing
speed.
I got into the computer business in 1966, but never did learn to touch-
type.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org