[Sorry - previous email was sent before it was finished. Trying again ...]

Hi Rick,

I am happy to answer more questions around some data science examples
in the following repo:
https://github.com/paulk-asert/groovy-data-science

You'll see lots of examples there that call out to many Java STEM
libraries some of which in turn use wrapped GPU/C libraries underneath
like openblas, arpack, etc.

Groovy has some defaults which remove certain surprise behavior, e.g.
for Java (but not picking on Java - the same would be true for many
languages):

jshell> Double x = 0.5
x ==> 0.5

jshell> x.equals(1/2)
$2 ==> false

Vs Groovy:

groovy:000> 0.5 == 1/2
===> true

It does this by using BigDecimal (which you can also use, with just a
little more ceremony, with Java).

There might be situations where you don't want to use BigDecimal - it
is more accurate in terms of precision but usually slower - so you are
not forced to use it. You'll just need to be aware of such things if
you want to use Groovy for high-volume scenarios.

The good news is that if you do have high-volume scenarios, there are
many things which can help there. Groovy has excellent support for
immutable data types and parallel libraries like GPars, so there are
some cool ways to solve certain kinds of problems.

Cheers, Paul.

On Sat, Nov 13, 2021 at 8:51 AM Paul King <[email protected]> wrote:
>
> Hi Rick,
>
> I am happy to answer more questions around some data science examples
> in the following repo:
> https://github.com/paulk-asert/groovy-data-science
>
> You'll see lots of examples there that call out to many Java STEM
> libraries some of which in turn use wrapped GPU/C libraries underneath
> like openblas, arpack, etc.
>
> Groovy has some defaults which remove certain surprise behavior, e.g.
> for Java (but not picking on Java - the same would be true for many
> languages):
>
> jshell> Double x = 0.5
> x ==> 0.5
>
> jshell> x.equals(1/2)
> $2 ==> false
>
> Vs Groovy:
>
> On Sat, Nov 13, 2021 at 7:52 AM Rick Van Camp <[email protected]> wrote:
> >
> > Yes!
> >
> > On Fri, Nov 12, 2021 at 4:45 PM Eric MacAdie <[email protected]> wrote:
> >>
> >> A lot of hard-core math libraries are written in C, C++ or Fortran (like 
> >> BLAS, ATLAS and LAPACK).
> >>
> >> So a lot of math programs in a lot of languages (like JVM languages, as 
> >> well as Ruby and Python) off load a lot of the work to these C libraries. 
> >> TensorFlow, NumPy, SciPy, DeepLearning4J, etc all do that. For some of the 
> >> libraries in Java (like TensorFlow or DeepLearning4J) I think you can 
> >> choose to either use Java, a C library, or a library that calls the GPU.
> >>
> >>
> >> = Eric MacAdie
> >>
> >>
> >> On Fri, Nov 12, 2021 at 9:22 PM Rick Van Camp <[email protected]> wrote:
> >>>
> >>> For this reason I suspect Groovy is not a 'quantitative language' if I 
> >>> can use this phrase.
> >>>
> >>> On 2021/11/12 09:14:18 Rick Van Camp wrote:
> >>> > Hello,
> >>> >
> >>> > I joined the list to learn if STEM applications exist for Groovy? I read
> >>> > through several months of archives but did not see much involving 
> >>> > issues I
> >>> > am interested in such as computation, simulations, approximations, etc. 
> >>> > I
> >>> > used Groovy briefly in an image processing application but it was only
> >>> > calling operations which performed the manipulations I am interested in
> >>> > learning if Groovy can perform.
> >>> >
> >>> > Thank you,
> >>> >
> >>> > Rick
> >>> >

Reply via email to