Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #56404

Re: microsecond resolution delay and time

From rickman <gnuarm@gmail.com>
Newsgroups comp.lang.forth
Subject Re: microsecond resolution delay and time
Date 2017-03-27 18:10 -0400
Organization A noiseless patient Spider
Message-ID <obc2eh$4i4$1@dont-email.me> (permalink)
References (2 earlier) <d1a2d206-04bc-46f6-a452-6fbcd965c025@googlegroups.com> <ob768r$ju7$2@dont-email.me> <2dbb1c36-4032-4b65-8047-338898f71748@googlegroups.com> <ob7opg$qgj$1@dont-email.me> <e4e50c5a-8691-4281-88a7-97c2b467965e@googlegroups.com>

Show all headers | View raw


On 3/26/2017 8:39 AM, krishna.myneni@ccreweb.org wrote:
> On Sunday, March 26, 2017 at 2:00:50 AM UTC-5, rickman wrote:
>> On 3/25/2017 10:00 PM, krishna.myneni@ccreweb.org wrote:
>>> On Saturday, March 25, 2017 at 8:44:46 PM UTC-5, rickman wrote:
>>>> On 3/25/2017 9:28 PM, krishna.myneni@ccreweb.org wrote:
>>>>> On Saturday, March 25, 2017 at 1:20:38 PM UTC-5, krishna...@ccreweb.org wrote:
>>>>>>
>>>>>> MS    ( u -- )    \ delay for u milliseconds (Standard Forth)
>>>>>> MS@   ( -- u )    \ return elapsed time in milliseconds
>>>>>> MS-D@ ( -- ud )   \ return elapsed time in ms as ud
>>>>>> US    ( u -- )    \ delay for u microseconds
>>>>>> US-D@ ( -- ud )   \ return the time elapsed in microseconds
>>>>>>
>>>>>
>>>>> Actually, I think I prefer MS2@ and US2@ instead of MS-D@ and US-D@. The D@ implies a signed number.
>>>>
>>>> Yes, you don't want to cut your range in half... ;)
>>>>
>>>
>>> The range isn't the point, as I'm sure you're well aware. It's a question of making the name not be misleading about the return type. Of course I'm sure you're aware of this and just couldn't resist a snarky comment.
>>
>> Did you not see the smiley?  Not intended to be snarky, realistic.  My
>> point is how would it ever matter if the return value is signed or
>> unsigned?  As unsigned it rolls over in half a million years.  As signed
>> it rolls over in 292,271.0230453 years to be exact.  Who will ever know???
>>
>> I'm just suggesting that this can be looked at realistically and the
>> signed/unsigned is completely irrelevant.  Call it a signed result and
>> make the name nice and simple.  I find the use of "US-D@" to be more
>> clear and easier to remember.  When I see a D used this way I know it is
>> a double word.  When I see a 2 used like this it can mean other things
>> than the size of the data word.
>
> Ok, if you had made the argument that "D@" is preferable to "2@", then I would have not taken your comment as I did.
>
>>
>> I think I also would have second thoughts about using the US part.  I
>> know it is common practice to use upper case in Forth name notation in
>> documents even though they are case insensitive... whoops, some systems
>> are case sensitive, aren't they?  But since the U is not really a U but
>> rather a short hand for the mu character which is normally done with a
>> lower case 'u', I would notate this name as uS-D@ which is immediately
>> more clear that we are talking about microseconds.  "US" could be any of
>> a number of things.
>>
>
> Agreed. I'm working with a case insensitive system, so us2@ is not distinct from US2@; however, your point is noted that I should document it as us2@ (really, the "s" should be lower case as well).
>
>> BTW, trying to make a point with humor doesn't have to be taken as
>> "snarky".  I suggest you try to see people in a more positive light.
>
> Sometimes it's difficult to tell humor from snark in terse comments, but I'll note your suggestion.

I appreciate your understanding.  Thanks.   I will try harder to not 
sound sarcastic.

-- 

Rick C

Back to comp.lang.forth | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-15 18:06 -0700
  Re: microsecond resolution delay and time hughaguilar96@gmail.com - 2017-03-15 21:48 -0700
    Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-16 07:42 -0700
  Re: microsecond resolution delay and time stephen@mpeforth.com (Stephen Pelc) - 2017-03-16 10:29 +0000
    Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-16 07:57 -0700
      Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-16 08:04 -0700
      Re: microsecond resolution delay and time stephen@mpeforth.com (Stephen Pelc) - 2017-03-16 16:14 +0000
        Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-16 10:00 -0700
      Re: microsecond resolution delay and time Brad Eckert <hwfwguy@gmail.com> - 2017-03-21 11:59 -0700
        Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-25 10:57 -0700
          Re: microsecond resolution delay and time rickman <gnuarm@gmail.com> - 2017-03-25 21:42 -0400
            Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-25 19:08 -0700
              Re: microsecond resolution delay and time rickman <gnuarm@gmail.com> - 2017-03-26 00:09 -0400
                Re: microsecond resolution delay and time Paul Rubin <no.email@nospam.invalid> - 2017-03-25 22:18 -0700
                Re: microsecond resolution delay and time rickman <gnuarm@gmail.com> - 2017-03-26 02:48 -0400
                Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-26 05:21 -0700
              Re: microsecond resolution delay and time hughaguilar96@gmail.com - 2017-03-25 23:12 -0700
                Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-26 05:32 -0700
  Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-25 11:20 -0700
    Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-25 18:28 -0700
      Re: microsecond resolution delay and time rickman <gnuarm@gmail.com> - 2017-03-25 21:44 -0400
        Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-25 19:00 -0700
          Re: microsecond resolution delay and time rickman <gnuarm@gmail.com> - 2017-03-26 03:00 -0400
            Re: microsecond resolution delay and time krishna.myneni@ccreweb.org - 2017-03-26 05:39 -0700
              Re: microsecond resolution delay and time rickman <gnuarm@gmail.com> - 2017-03-27 18:10 -0400

csiph-web