[concurrency-interest] help

Saylor, Robert J Robert.Saylor at bnsf.com
Wed Jan 17 12:13:21 EST 2007


Please remove me from the mailing list. I have tried several times to
unsubscribe using your website.


 -----Original Message-----
From: concurrency-interest-bounces at cs.oswego.edu
[mailto:concurrency-interest-bounces at cs.oswego.edu] On Behalf Of
concurrency-interest-request at cs.oswego.edu
Sent: Wednesday, January 17, 2007 11:00 AM
To: concurrency-interest at cs.oswego.edu
Subject: Concurrency-interest Digest, Vol 24, Issue 9

Send Concurrency-interest mailing list submissions to
	concurrency-interest at altair.cs.oswego.edu

To subscribe or unsubscribe via the World Wide Web, visit
	
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
or, via email, send a message with subject or body 'help' to
	concurrency-interest-request at altair.cs.oswego.edu

You can reach the person managing the list at
	concurrency-interest-owner at altair.cs.oswego.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Concurrency-interest digest..."


Today's Topics:

   1. Re: Small request regarding TimeUnit (Hanson Char)
   2. Re: Small request regarding TimeUnit (Dawid Kurzyniec)
   3. Re: Small request regarding TimeUnit (Kasper Nielsen)
   4. Re: Small request regarding TimeUnit (Dawid Kurzyniec)
   5. Re: Small request regarding TimeUnit (Dhanji R. Prasanna)
   6. Re: Small request regarding TimeUnit (Kasper Nielsen)
   7. Re: Small request regarding TimeUnit (Dhanji R. Prasanna)


----------------------------------------------------------------------

Message: 1
Date: Tue, 16 Jan 2007 09:14:26 -0800
From: "Hanson Char" <hanson.char at gmail.com>
Subject: Re: [concurrency-interest] Small request regarding TimeUnit
To: "Kasper Nielsen" <kasper at kav.dk>
Cc: concurrency-interest at cs.oswego.edu
Message-ID:
	<ca53c8f80701160914r4715d986l52f36d969288bacf at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

If only enum can be subclassed ... :)

Hanson

On 1/15/07, Kasper Nielsen <kasper at kav.dk> wrote:
>
> Hi,
>
> Whenever I use TimeUnit and need to do any reporting in regards to
that.
> I often prefer outputting the actual unit in a short notation, for
> example, ns instead of nanoseconds, ?s instead of microseconds, ...
> I think it would a small but usefull addition (for some) to add some
> kind of
> String getShortForm() method to TimeUnit.
>
> cheers
> Kasper
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20070116/336e4771/attachment-0001.html 

------------------------------

Message: 2
Date: Tue, 16 Jan 2007 12:48:37 -0500
From: Dawid Kurzyniec <dawidk at mathcs.emory.edu>
Subject: Re: [concurrency-interest] Small request regarding TimeUnit
To: Kasper Nielsen <kasper at kav.dk>
Cc: concurrency-interest at cs.oswego.edu
Message-ID: <45AD0FF5.5030905 at mathcs.emory.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Kasper Nielsen wrote:
> Hi,
>
> Whenever I use TimeUnit and need to do any reporting in regards to
that. 
> I often prefer outputting the actual unit in a short notation, for 
> example, ns instead of nanoseconds, ?s instead of microseconds, ...
> I think it would a small but usefull addition (for some) to add some 
> kind of
> String getShortForm() method to TimeUnit.
>   

I think MICROSECONDS might be problematic. Should it print u, or ? ?... 
I guess, depending on the context, people might want to have it either
way.

D




------------------------------

Message: 3
Date: Tue, 16 Jan 2007 21:07:19 +0100
From: Kasper Nielsen <kasper at kav.dk>
Subject: Re: [concurrency-interest] Small request regarding TimeUnit
To: Dawid Kurzyniec <dawidk at mathcs.emory.edu>
Cc: concurrency-interest at cs.oswego.edu
Message-ID: <45AD3077.2020800 at kav.dk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dawid Kurzyniec wrote:
> Kasper Nielsen wrote:
>> Hi,
>>
>> Whenever I use TimeUnit and need to do any reporting in regards to 
>> that. I often prefer outputting the actual unit in a short notation, 
>> for example, ns instead of nanoseconds, ?s instead of microseconds,
...
>> I think it would a small but usefull addition (for some) to add some 
>> kind of
>> String getShortForm() method to TimeUnit.
>>   
>
> I think MICROSECONDS might be problematic. Should it print u, or ? 
> ?... I guess, depending on the context, people might want to have it 
> either way.
>
> D
I would vote for ?, anyway should be a matter of a simple 
.replace('?','u') if people wants u instead

- Kasper



------------------------------

Message: 4
Date: Tue, 16 Jan 2007 17:07:52 -0500
From: Dawid Kurzyniec <dawidk at mathcs.emory.edu>
Subject: Re: [concurrency-interest] Small request regarding TimeUnit
To: Kasper Nielsen <kasper at kav.dk>
Cc: concurrency-interest at cs.oswego.edu
Message-ID: <45AD4CB8.60908 at mathcs.emory.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Kasper Nielsen wrote:
> Dawid Kurzyniec wrote:
>   
>> Kasper Nielsen wrote:
>>     
>>> Hi,
>>>
>>> Whenever I use TimeUnit and need to do any reporting in regards to 
>>> that. I often prefer outputting the actual unit in a short notation,

>>> for example, ns instead of nanoseconds, ?s instead of microseconds,
...
>>> I think it would a small but usefull addition (for some) to add some

>>> kind of
>>> String getShortForm() method to TimeUnit.
>>>   
>>>       
>> I think MICROSECONDS might be problematic. Should it print u, or ? 
>> ?... I guess, depending on the context, people might want to have it 
>> either way.
>>
>> D
>>     
> I would vote for ?, anyway should be a matter of a simple 
> .replace('?','u') if people wants u instead
>   

Actually, there is more questions. hours vs hrs, min vs mins vs m, etc. 
Personally, I think that this belongs to presentation layer, and should 
not be mixed with the concurrency API. Especially that the following is 
simple and efficient (version for the 1.4 backport):

private static ORDINAL_NSEC = TimeUnit.NANOSECONDS.ordinal();
private static ORDINAL_USEC = TimeUnit.MICROSECONDS.ordinal();
...

public static String unit2string(TimeUnit unit) {
   switch (unit.ordinal()) {
      case ORDINAL_NSEC: return "ns";
      case ORDINAL_USEC: return "us";
      ...
   }
}

Regards,
Dawid




------------------------------

Message: 5
Date: Wed, 17 Jan 2007 09:55:38 +1000
From: "Dhanji R. Prasanna" <dhanji at gmail.com>
Subject: Re: [concurrency-interest] Small request regarding TimeUnit
To: "Dawid Kurzyniec" <dawidk at mathcs.emory.edu>
Cc: concurrency-interest at cs.oswego.edu
Message-ID:
	<aa067ea10701161555k7788061aw4f722fbd67469e50 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On 1/17/07, Dawid Kurzyniec <dawidk at mathcs.emory.edu> wrote:
>
> Kasper Nielsen wrote:
> > Dawid Kurzyniec wrote:
> >
> >> Kasper Nielsen wrote:
> >>
> >>> Hi,
> >>>
> >>> Whenever I use TimeUnit and need to do any reporting in regards to
> >>> that. I often prefer outputting the actual unit in a short
notation,
> >>> for example, ns instead of nanoseconds, ?s instead of
microseconds,
> ...
> >>> I think it would a small but usefull addition (for some) to add
some
> >>> kind of
> >>> String getShortForm() method to TimeUnit.
> >>>
>
> Actually, there is more questions. hours vs hrs, min vs mins vs m,
etc.
> Personally, I think that this belongs to presentation layer, and
should
> not be mixed with the concurrency API.


Yea I agree strongly. Also isnt a lot of this locale-specific? what is
the
point of resolving SECONDS to a string "seconds" when it might be
"sekunden"
or something else that is desired by the client code? I am not sure what
the
semantics of short-hand notation are, but I would guess they are
similar.
Some organizations like to write "secs" as shorthand for seconds, some
use
"s", others, capital "S"

The conversion is best done with a class provided by the
presentation/client
code layer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20070117/eb4189cd/attachment-0001.html 

------------------------------

Message: 6
Date: Wed, 17 Jan 2007 10:10:26 +0100
From: Kasper Nielsen <kasper at kav.dk>
Subject: Re: [concurrency-interest] Small request regarding TimeUnit
To: Dawid Kurzyniec <dawidk at mathcs.emory.edu>
Cc: concurrency-interest at cs.oswego.edu
Message-ID: <45ADE802.7050009 at kav.dk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dawid Kurzyniec wrote:
> Kasper Nielsen wrote:
>> Dawid Kurzyniec wrote:
>>  
>>> Kasper Nielsen wrote:
>>>    
>>>> Hi,
>>>>
>>>> Whenever I use TimeUnit and need to do any reporting in regards to 
>>>> that. I often prefer outputting the actual unit in a short 
>>>> notation, for example, ns instead of nanoseconds, ?s instead of 
>>>> microseconds, ...
>>>> I think it would a small but usefull addition (for some) to add 
>>>> some kind of
>>>> String getShortForm() method to TimeUnit.
>>>>         
>>> I think MICROSECONDS might be problematic. Should it print u, or ? 
>>> ?... I guess, depending on the context, people might want to have it

>>> either way.
>>>
>>> D
>>>     
>> I would vote for ?, anyway should be a matter of a simple 
>> .replace('?','u') if people wants u instead
>>   
>
> Actually, there is more questions. hours vs hrs, min vs mins vs m,
etc. 

Dawid, all the different units in TimeUnit have a well established 
symbols within the SI system.
ns = nanoseconds
?s = microseconds
ms = milliseconds
s = seconds
min = minutes
h = hours
d = days

Take a look at http://physics.nist.gov/cuu/Units/prefixes.html and 
http://physics.nist.gov/cuu/Units/outside.html

- Kasper



------------------------------

Message: 7
Date: Wed, 17 Jan 2007 19:55:31 +1000
From: "Dhanji R. Prasanna" <dhanji at gmail.com>
Subject: Re: [concurrency-interest] Small request regarding TimeUnit
To: "Kasper Nielsen" <kasper at kav.dk>
Cc: concurrency-interest at cs.oswego.edu,	Dawid Kurzyniec
	<dawidk at mathcs.emory.edu>
Message-ID:
	<aa067ea10701170155u7e7c770g113279ab0ac6b56 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

I was not aware that java was standardized on SI?

in fact there is a whole jsr devoted to expression and calculation of
units:
http://jcp.org/en/jsr/detail?id=275

Even this JSR supports non-SI systems. It seems presumptuous to bind
service
code to a presentation paradigm based on SI if there is an effort to
standardize (and abstract) the expression of units.

On 1/17/07, Kasper Nielsen <kasper at kav.dk> wrote:
>
> Dawid Kurzyniec wrote:
> > Kasper Nielsen wrote:
> >> Dawid Kurzyniec wrote:
> >>
> >>> Kasper Nielsen wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> Whenever I use TimeUnit and need to do any reporting in regards
to
> >>>> that. I often prefer outputting the actual unit in a short
> >>>> notation, for example, ns instead of nanoseconds, ?s instead of
> >>>> microseconds, ...
> >>>> I think it would a small but usefull addition (for some) to add
> >>>> some kind of
> >>>> String getShortForm() method to TimeUnit.
> >>>>
> >>> I think MICROSECONDS might be problematic. Should it print u, or ?
> >>> ?... I guess, depending on the context, people might want to have
it
> >>> either way.
> >>>
> >>> D
> >>>
> >> I would vote for ?, anyway should be a matter of a simple
> >> .replace('?','u') if people wants u instead
> >>
> >
> > Actually, there is more questions. hours vs hrs, min vs mins vs m,
etc.
>
> Dawid, all the different units in TimeUnit have a well established
> symbols within the SI system.
> ns = nanoseconds
> ?s = microseconds
> ms = milliseconds
> s = seconds
> min = minutes
> h = hours
> d = days
>
> Take a look at http://physics.nist.gov/cuu/Units/prefixes.html and
> http://physics.nist.gov/cuu/Units/outside.html
>
> - Kasper
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20070117/72e786e5/attachment-0001.html 

------------------------------

_______________________________________________
Concurrency-interest mailing list
Concurrency-interest at altair.cs.oswego.edu
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest


End of Concurrency-interest Digest, Vol 24, Issue 9
***************************************************





More information about the Concurrency-interest mailing list