News for hackers. Stuff that matters.
Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by genman on Monday January 01, 2024 @11:16AM (#38832890)
What is with Java hating crybabies here? Your mothers didn't love you enough?

Java is a great language, it is incredibly fast and safe. It has wonderful tooling.

The only downside is that it doesn't have good integration with GPU or CPU parallel processing but it can integrate with other libraries to compensate for it.

Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by nogridbag on Monday January 01, 2024 @12:19PM (#38833409)
My guess is some combination of:

  * Python -> Java jump (e.g. CS1=Python, CS2=Java) is difficult.
  * First real world job in Java in a larger enterprise with lots of older baggage
  * And by a few handful, related to sound technical reasons in their niche area
For me, the jump from Java -> C/C++ in university was hard and I still don't have a good handle on those latter languages. In my first job out of school I was handed a massive C++ library to build an application around with no mentorship and I failed spectacularly. I reacted similarly to the negative Java hate: "Why would anyone use this?"

For me now, as a principal eng, building a greenfield project with Java 17+ now is extremely enjoyable. Interestingly, we've had some HTML/CSS/JS bootcamp devs with no prior coding background succeed in doing Java. And we've had some Python/C university devs struggle. Sample size is too small to be meaningful, I just thought it was interesting.

Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by craigacp on Monday January 01, 2024 @11:34AM (#38833038)
Both GPU support and SIMD CPU support are being worked on in OpenJDK projects, there are talks on them from last year's JVM language summit - https://youtube.com/playlist?list=PLX8CzqL3ArzW90jKUCf4H6xCK...
Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by genman on Monday January 01, 2024 @05:47PM (#38836025)
Thank you. It looks like there is still a lot of work to do.
Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by ShamelessC on Monday January 01, 2024 @11:47AM (#38833126)
> What is with Java hating crybabies here? Your mothers didn't love you enough?

We were forced to use Java and then switched languages and saw the light. Simple as that. Doesn't mean that Java is useless but coders are entitled to have strong opinions when their day-to-day is impacted so heavily by it.

Same reason I allow but don't necessarily approve of Rust, emacs, nix, etc. evangelism. Is it annoying? Sure, but those people all have a basis for their gripes for the most part.

Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by MaxBarraclough on Monday January 01, 2024 @12:44PM (#38833584)
> We were forced to use Java and then switched languages and saw the light.

Other languages will do a better job in various ways, certainly, but in my opinion Java remains a pretty good middle-of-the-road language.

If you want to go deep on high-performance computing, or functional programming, or type-safety, or low-level programming, then Java isn't going to win at any one of these. It's still broadly successful in what it's trying to achieve: a fairly fast, very portable language and virtual machine with various features to help the programmer deal with code-defects and achieve correctness, generally preferencing these (and portability) over performance where necessary. It also generally commits to backward compatibility.

There is no one language to rule them all. It's more a matter of Pareto efficiency.

Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by severino on Monday January 01, 2024 @12:46PM (#38833610)
Who forced you to use Java and why?
Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by belter on Monday January 01, 2024 @01:26PM (#38834012)
What did you see in the light? Don't full a Fermat's Last Theorem on us please...
Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by whalesalad on Monday January 01, 2024 @01:06PM (#38833805)
Java is only fun when leveraged via Clojure.
Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by dang on Monday January 01, 2024 @02:36PM (#38834659)
Can you please not take HN threads into programming language flamewar, or any flamewar? We're trying for the opposite here.

If you wouldn't mind reviewing https://news.ycombinator.com/newsguidelines.html and taking the intended spirit of the site more to heart, we'd be grateful.

Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by genman on Monday January 01, 2024 @04:46PM (#38835620)
Of course. If this was my intent, I would have also replied to the comments. I was just curious about the massive phenomena rapidly appearing under this post.

In addition I'm also frightened if the same anti-Java bias prohibits similarly interesting content to appear on the front page.

Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by dang on Monday January 01, 2024 @06:36PM (#38836350)
HN discusses plenty of interesting Java content and you're certainly welcome to post more!

https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...

https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...

Re:Oracle-samples/sd4j: Stable Diffusion pipeline in Java us... by pvg on Monday January 01, 2024 @05:35PM (#38835949)
These are all fine motivations but they make threads worse not better by starting unrelated meta flamewars, especially when written in a goading tone (crybabies, etc). The way to make crappy threads better is to downvote and flag lame comments and by writing on-topic, nonmeta comments.