Fork me on GitHub
#off-topic
<
2022-12-25
>
simongray15:12:39

Is there such a thing as "Java, the good parts as of 2022" in book form? I would love to brush up on my Java, but the books I can find by googling seem to consider Java 8 modern.

simongray15:12:25

I would like special focus on the functional and/or newer features and additions to the standard library. It shouldn't be an introduction to programming either, I already have Java experience.

Ben Sless15:12:35

As someone without a java background, I was surprised at how good the module javadocs are. Why not read the functional and stream package docs and brows the JEPs? AFAIK there haven't been any groundbreaking changes to java yet, most notable new features are pattern matching and record / value classes

🙏 1
pppaul17:12:53

pattern matching seems like a big deal to me. however, I don't write Java, only read it and I somehow end up dealing with the worst written Java imaginable with almost no feature of the language used (even the old ones)

pppaul17:12:49

I found the streams in Java very nice to work with via clojure, though. really thankful for that feature

orestis08:12:03

https://pragprog.com/titles/vscajava/cruising-along-with-java/ -- this appeared on my radar a few days ago, but it's not released yet

🙏 1
Daniel Craig22:12:25

I really like The Well Grounded Java Developer 2nd edition

Ben Sless04:12:04

97 things every java programmer should know by Sean's friend Kevlin Henny?

Bobbi Towers22:12:25

epic chatgpt fail Although explicitly mentioned in the disclaimer that no language model should relied upon for serious things, it's very easy to forget this. For this reason, I enjoy sharing (and seeing others share) the "misses" much more so than the "hits". This is what was returned when I asked for Clojure implementations of Fourier transforms:

(require '[clojure.core.matrix :as m])

;; Define a function to compute the DFT of a sequence
(defn dft [data]
  (m/dft data))

;; Test the function with a simple sequence
(dft [1 2 3 4])
;; Returns:
;; [[10.0 0.0] [-2.0 2.0] [-2.0 0.0] [-2.0 -2.0]]

;; Define a function to compute the FFT of a sequence
(defn fft [data]
  (m/fft data))

;; Test the function with a simple sequence
(fft [1 2 3 4])
;; Returns:
;; [[10.0 0.0] [-2.0 2.0] [-2.0 0.0] [-2.0 -2.0]]
Sorry... but these functions do not exist in core.matrix... I did, however find a library that uses it: https://github.com/kedean/cfft

mauricio.szabo23:12:22

Just ask for anything emscriptem related, and it'll confidently make an example that's pure wrong

mauricio.szabo23:12:01

I once asked how to implement a function like popularJSLibrary.commonFunction and it basically used itself to implement a copy of it...

🤡 1