This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-25
Channels
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.
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.
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
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)
I found the streams in Java very nice to work with via clojure, though. really thankful for that feature
https://pragprog.com/titles/vscajava/cruising-along-with-java/ -- this appeared on my radar a few days ago, but it's not released yet
I really like The Well Grounded Java Developer 2nd edition
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/cfftJust ask for anything emscriptem related, and it'll confidently make an example that's pure wrong
I once asked how to implement a function like popularJSLibrary.commonFunction
and it basically used itself to implement a copy of it...