Re: [The Java Posse] Groovy love

2012-07-23 Thread Ricky Clarkson
That can't happen with shared mutable objects. On Jul 23, 2012 3:46 PM, "Russel Winder" wrote: > On Mon, 2012-07-23 at 08:25 -0700, Cédric Beust ♔ wrote: > […] > > To be fair, there is nothing running on the JVM today showing that this > is > > wrong. All the alternate solutions fail on one of th

Re: [The Java Posse] Groovy love

2012-07-23 Thread Russel Winder
On Mon, 2012-07-23 at 08:25 -0700, Cédric Beust ♔ wrote: […] > To be fair, there is nothing running on the JVM today showing that this is > wrong. All the alternate solutions fail on one of these criteria while > java.concurrent.util meets them all: A quick general response, I'll try and do a more

Re: [The Java Posse] Equivalent for JSR-275 ?

2012-07-23 Thread Ricky Clarkson
How does that make them not first-class? On Mon, Jul 23, 2012 at 2:27 PM, Simon Ochsenreither < simon.ochsenreit...@googlemail.com> wrote: > > >> ... apart the first class functions? >> > > First-class functions aren't part of Java 8. You need an explicit or > inferable nominal type on the LHS. >

Re: [The Java Posse] Equivalent for JSR-275 ?

2012-07-23 Thread Simon Ochsenreither
> ... apart the first class functions? > First-class functions aren't part of Java 8. You need an explicit or inferable nominal type on the LHS. -- You received this message because you are subscribed to the Google Groups "Java Posse" group. To view this discussion on the web visit https:

Re: [The Java Posse] Equivalent for JSR-275 ?

2012-07-23 Thread Steven Siebert
The JSR was twice rejected for technical reasons, including the use of the javax.measurement namespace. The leader of the JSR (JScience author) considers the JSR dead that last I heard. I use JScience in production, and have built extensions to it's spatial conversions. I find it to be a very go

Re: [The Java Posse] Equivalent for JSR-275 ?

2012-07-23 Thread Fabrizio Giudici
On Mon, 23 Jul 2012 13:30:30 +0200, Jan Goyvaerts wrote: I've been asked to find something for units of measures & conversion. In the early days there was JSR-275 . Which today is rejected. A pity because the implementation has merit. Why has it b

Re: [The Java Posse] Groovy love

2012-07-23 Thread Kevin Wright
On 23 July 2012 17:54, Martijn Verburg wrote: > Hi Kevin > > > But it also demonstrates the performance benefit of avoiding > > locks - which can easily harm performance much more than GC pressure. > This > > is the same reason that the asynchronous model also performs so well, > even > > in th

Re: [The Java Posse] Groovy love

2012-07-23 Thread Martijn Verburg
Hi Kevin > I've worked with, and debugged, code written in several different > concurrency paradigms: > > Data-flow > Asynchronous / Futures / Continuation Passing > Actors > Software-Transactional memory > Shared state with locks & mutexes > Fork-Join > > and my experience mirrors Ricky's, shared

Re: [The Java Posse] Groovy love

2012-07-23 Thread Kevin Wright
I've worked with, and debugged, code written in several different concurrency paradigms: - Data-flow - Asynchronous / Futures / Continuation Passing - Actors - Software-Transactional memory - Shared state with locks & mutexes - Fork-Join and my experience mirrors Ricky's, shared

[The Java Posse] Re: Equivalent for JSR-275 ?

2012-07-23 Thread John May
I'm not sure if it's "equivalent" but JScience provides an implementation of the Units of Measure interfaces. On Monday, July 23, 2012 12:30:30 PM UTC+1, Jan Goyvaerts wrote: > > I've been asked to find something for units of measures &

Re: [The Java Posse] Groovy love

2012-07-23 Thread Ricky Clarkson
"I claim that understanding errors that arise because of multithreaded mutable code is really not that difficult." My experience is entirely the opposite. I found it very difficult to work out what the original programmer intended to happen in what order in code like that, to fix problems without

Re: [The Java Posse] Groovy love

2012-07-23 Thread Cédric Beust ♔
On Mon, Jul 23, 2012 at 3:07 AM, Russel Winder wrote: > java.concurrent.util is showing more and more high-level features as > Doug et al. work them in, but the problem remains that most Java > programmers still think shared-memory multi-threading is the way to code > up parallel algorithms. > T

[The Java Posse] Equivalent for JSR-275 ?

2012-07-23 Thread Jan Goyvaerts
I've been asked to find something for units of measures & conversion. In the early days there was JSR-275 . Which today is rejected. A pity because the implementation has merit. Is there an equivalent for this or does everybody cooks his own library ? :-)

Re: [The Java Posse] Groovy love

2012-07-23 Thread Kevin Wright
On 23 July 2012 11:07, Russel Winder wrote: > On Sun, 2012-07-22 at 16:41 -0700, Cédric Beust ♔ wrote: > […] > > As for the concurrency library... seriously? java.concurrent.util is not > > just very powerful, it's very well designed and it's running tens of > > thousands of high volume web sites

Re: [The Java Posse] Groovy love

2012-07-23 Thread Russel Winder
On Sun, 2012-07-22 at 16:41 -0700, Cédric Beust ♔ wrote: […] > As for the concurrency library... seriously? java.concurrent.util is not > just very powerful, it's very well designed and it's running tens of > thousands of high volume web sites today. No other library can claim to > come close to th

Re: [The Java Posse] Groovy love

2012-07-23 Thread Russel Winder
On Mon, 2012-07-23 at 06:34 -0300, Ricky Clarkson wrote: > Sure, I generally do stick with static languages. Groovy was promoted as a > step up from Java, though, which until that line of code is rejected, it > clearly isn't. A step sideways, perhaps. Early (i.e. late 2003, early 2004) Groovy ma

Re: [The Java Posse] Groovy love

2012-07-23 Thread Russel Winder
On Sun, 2012-07-22 at 23:06 +0100, Kevin Wright wrote: > The story sounds familiar except for the part about Dick of course, because > I experienced it with a different language :) > > A much better "plain old" object type, improved collections, and a decent > concurrency library will go a long wa

Re: [The Java Posse] Groovy love

2012-07-23 Thread Ricky Clarkson
Whoops, you added the static typing info while I was replying.. Can that @TypeChecked be added at the class level? Within a typechecked class can you still use all/most of the Groovy features or is it basically Java within there? I might grab a copy and play around, thanks for at least the infor

Re: [The Java Posse] Groovy love

2012-07-23 Thread Ricky Clarkson
Sure, I generally do stick with static languages. Groovy was promoted as a step up from Java, though, which until that line of code is rejected, it clearly isn't. A step sideways, perhaps. Isn't Groovy adding static typing now? Will that line be rejected thereafter? Java's lack of type inferen

Re: [The Java Posse] Groovy love

2012-07-23 Thread Russel Winder
On Sun, 2012-07-22 at 16:41 -0300, Ricky Clarkson wrote: > Let me know when int i = "hello"; is rejected by the compiler and I'll look > again. On the other hand, Groovy has taken a foray into static typing: import groovy.transform.TypeChecked @TypeChecked def f ( ) { int i = 'Hello' } leads

Re: [The Java Posse] Groovy love

2012-07-23 Thread Russel Winder
On Sun, 2012-07-22 at 16:41 -0300, Ricky Clarkson wrote: > Let me know when int i = "hello"; is rejected by the compiler and I'll look > again. Clearly you are a static typing sort of person, so stick with static typed languages. Dynamically typed languages do not obey the same typing rules as sta

Re: [The Java Posse] Tail Call Recursion?

2012-07-23 Thread Kevin Wright
blast! You're quite right of course. This is clearly a wake-up call that it's been far too long since I last did any Haskell coding :) On Monday, 23 July 2012, Cédric Beust ♔ wrote: > > On Sun, Jul 22, 2012 at 3:31 PM, Kevin Wright > 'kev.lee.wri...@gmail.com');> > > wrote: > >> This is why S

Re: [The Java Posse] Tail Call Recursion?

2012-07-23 Thread Kevin Wright
This is a straw-man argument. Yes, it's true that a linked list isn't inherently parallelisable, and yes it's not the the structure I'd choose if I wanted to use as many cores as possible when sorting a single list, or converting it to uppercase, etc. etc. As a counterpoint, many fork-join approa