Java News/Tech/Discussion/etc. No programming help, no learning Java

0 readers
0 users here now

News, Technical discussions, research papers and assorted things of interest related to the Java programming language NO programming help, NO...

founded 1 year ago
MODERATORS
1
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/Thihup on 2023-11-13 11:34:56.

2
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/labs64-netlicensing on 2023-11-12 07:58:24.


Hey Java devs! As we all know, choosing the right framework can make or break a project. I'm curious to hear about your favorite Java frameworks and the specific reasons behind your choice. Whether it's Spring, Hibernate, or something else entirely, share your experiences and insights. What features or benefits make your preferred framework stand out for you?

3
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/jaccomoc on 2023-11-11 03:18:45.


Announcing the latest version 1.3.0 of Jactl, a scripting language for embedding in real-time Java applications such as Game Engines, Database Engines, Payment Engines, etc.

  • Never blocks the event-loop thread
  • Java/Groovy based syntax (with a touch of Perl)
  • Supports checkpointing execution state to be restored/resumed elsewhere after a failure
  • Open source (Apache Licence 2.0)
  • Secure
  • Easy to extend with application specific functions for use by scripts
  • Compiles to byte code
4
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/adamw1pl on 2023-11-10 15:00:16.

5
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/vips7L on 2023-11-09 21:25:00.

6
1
Clocks (lemmit.online)
submitted 1 year ago by bot@lemmit.online to c/java@lemmit.online
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/ggleblanc2 on 2023-11-09 09:03:53.


One of the first assignments given to Java Swing students is to create a simple clock GUI. I've always been interested in unusual clocks, and I've created four Java Swing clocks that others may find interesting.

Qlocktwo

Signboard Clock

Sliding Clock

World Clock

7
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/_D1van on 2023-11-08 21:48:46.


C# guy here. I'm interested in coding some Java. What are some cool applications for me to check out?

Of example, in C# you have stuff like

  • Blazor Webassembly where one can use C# to write code on the web instead of Javascript.
  • Linq for set based operations in C#
  • Entity Framework which is an ORM
  • Visual Studio and its integration with Azure (nice for deployments)

Those are some of my favorite things about that ecosystem. What are your favorite things about Java?

It could be things about the language itself, but Im more interested in cool libraries and applications in the Java world.

8
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/pavelklecansky on 2023-11-08 08:46:47.


I came across this pretty interesting library on Hacker News that tries to implement LiveView on the JVM. Link to GitHub.

9
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/CrowSufficient on 2023-11-08 15:56:26.

10
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/piotr_minkowski on 2023-11-07 22:28:47.

11
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/bvandermeer on 2023-11-07 18:52:38.


My primary language is Java and I'm looking for a lightweight API development framework. I love the syntax of Boot but could do without the bloat. I'm not building some enterprise solution with scalability and robust security in mind; just a basic API accessing data from some persistent light SQL db like sqlite to be consumed by a React app.

I know at the end of the day I can still use Boot, but I'm in search for something barebones. I'm hearing some buzz around Kotlin and Scala; would they have what I'm looking for? Like akin to FastAPI, or even Flask from Python but Java syntax or syntax-like?

12
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/we_are_mammals on 2023-11-07 03:38:59.


In the intro lecture of MIT 6.172 Performance Engineering, they start off with a naive triple-loop implementation of matrix multiplication in Python, Java and C and then make it progressively faster, going from 6 hours to 0.4 seconds (on an AWS instance):

lecture slide

I'm kind of curious how fast one can make pure Java here (OpenJDK to be exact)? Has anyone tried it? It could be a nice showcase for the Vector API.

13
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/ailef on 2023-11-04 10:09:59.

14
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/BIackMambaTG on 2023-11-03 10:47:55.


I'm looking for a NDArray library in java that has many features similar to numpy. I mostly need element-wise operations, but also matrix manipulations like stack, flatting, concating etc. I need it to have very high performance as I will have thousands of calculations per second. My matrices will be about 500x500 (at average) So far I've tried many pure java libraries like EJML and commons math, but they lack many features. I also tried to use nd4j, but I'm getting a lot of memory leaks and very little support from their community.

Any suggestions? :)

15
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/bowbahdoe on 2023-11-04 19:10:13.


This is a bit of curiosity, a bit of digging for information.

I've seen it said in multiple forums that part of C#'s intrinsic advantages in the game development space are

  • Easy C++ interop

  • Value Types

  • (Obviously) Unity existing

Valhalla and the foreign memory apis should productively chip away at some of that, but does anyone have a good sense of what else is left?

Is it that the swing parts of java.desktop are hard to port? Should there be an effort to move off of the sound and image support in that module?

Is it that binding to platform APIs is/was too hard? Is it just that nobody has had the requisite motivation and funding? (hard to believe given Minecraft) Is there a property of the closed xbox/playstation/etc. ecosystems that makes it difficult?

I'm especially interested if anyone has actually been the one to go down that rabbit hole trying to port a GDX game or similar.

Is there any more fundamental ecosystem work that could help?

16
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/orgad on 2023-11-04 14:08:27.


I'm working on a low latency backend service written in Java.

The service is a batch processing system. Although it does a lot of IOs, it comes also with the cost of high CPU usage (~100%).

If I switched to GraalVM would that lower the CPU usage?

I learned that the JIT has the advantage of having more information at runtime and its compilation can result more performant code than AOT compiling. If so, can GraalVM even come in handy here? (I don't care about startup time)

Of course, I could just try it but it would require a not-so-easy refactoring as I'm using some library that doesn't behave well with GraalVM. Thta's why I'm asking here if it is even worth the shot.

Thanks!

17
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/cyrilou242 on 2023-11-03 16:27:07.


Years after jshell first release, interactive programming, notebook style development and data viz is still not Java's forte.

The Jupyter notebook way has its con and IMHO does not really integrate well with the java development flow and tools. Recently there's been many new interesting approaches to the notebook paradigm with systems like Observable and Clerk.

Here is my attempt to build a reactive notebook system for java: jnotebook

Specifically I try to address the following problems:

  1. notebook editors are less helpful than IDE editors

--> jnotebook interprets JShell files and renders them as notebook. You can use the IDE of your choice to edit the files. Code completion and all IDE nice things stay available. Version control is straightforward. 2. out-of-order execution causes reproducibility issues

--> jNotebook always evaluates from top to bottom. jnotebook

builds a dependency graph of Java statements and only recomputes the needed changes to keep the feedback loop fast. 3. the Java ecosystem does not provide a great experience for visualization and document formatting

--> cells outputs are interpreted as html. This gives access to great javascript visualization libraries and standard html for formatting. Helpers are made available for this.

If you find this interesting, I'd love to get your feedbacks.

18
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/nicolaiparlog on 2023-11-02 13:57:52.

19
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/nicolaiparlog on 2023-11-02 13:57:13.

20
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/dekc_bu on 2023-11-01 20:28:34.


If compared to something else?

Hi all, hope this doesn't go too much against the rules.

If you worked with other languages and using Java, what do you think is missing?

I worked worked with NodeJS (both javascript and typescript) for 6 years before moving without any regrets to Java 3 years ago.

What I miss is how easy is to create a simple project, simply run npm init or yarn init and Bob's your uncle.

Not using Rust professionally, just small programs to try it out and it's easy as well to start a project, just cargo new hello_world --bin

I read plenty books about Java and sometimes I want to follow along by writing the code, experiment with it, install some dependencies and try again and again, yet I'm still confused on how to create a simple Maven project.

Found this one , which source and target are set to Java 7... cool I can update them. Running mvn install looks good, try java -jar name.jar

no main manifest attribute, in target/app.jar

And same goes for information you get for a dependency ,

compare this eventbridge client on npm

and this on maven

One has tons of information about it with a link to the repository, the other just how to add it to your project.

As for the Java language I honestly have nothing that I miss from [java|type]script, well maybe how easy is to write asynchronous code.

I know Java is trying to be more friendly by removing some ceremonies, void main(), but feels like its ecosystem isn't evolving that much.

Feel free to tell me your opinions, as well as RTFM!

21
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/bowbahdoe on 2023-11-01 23:36:01.


Meaning the actual repository where people upload code, not the build tools themselves (though presumably they would be different too in some ways).

If you could start your own package repository today with Java as it is now but you were able to practically ignore all existing code, what would you do differently.

Stuff like

  • What metadata you store / require
  • What kind of artifacts you'd allow
  • Would you still use G:A:V?
  • Would you enforce versioning, merge all the javadocs, build all projects from source, use JMODs, ... etc

Or, would you change absolutely nothing.

22
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/danielaveryj on 2023-10-30 17:38:39.


I've been working on a "successor" to Reactive Streams, built from scratch on top of blocking push and pull methods.

It started as a fun personal challenge to try translating some Reactive operators to plain blocking code, in anticipation of virtual threads. I was very curious about the possibility that virtual threads could supplant reactive programming, so I kept experimenting and building out an API. Anyways, I thought some people out there might be interested.

23
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/darenkster on 2023-10-30 12:22:15.


JDK 21 introduced String Templates with JEP430.

I was wondering what you could do with it and came up with a proof of concept for processors as a façade for SLF4J.

In a class LOG I created the processors as static fields for each log level. These can be statically imported and called like this:

import static de.darenkster.stringtemplates2slf4j.loggers.LOG.*;
...
var test = "log";
var ex = new Exception();
INFO."This is a info \{test}";
ERROR."This is a error \{test} \{ex}";
WARN."This is a debug \{test}";
TRACE."This is a debug \{test}";

This would result in the following log output:

10:33:44.899 [main] INFO de.darenkster.stringtemplates2slf4j.Main -- This is a info log
10:33:44.907 [main] ERROR de.darenkster.stringtemplates2slf4j.Main -- This is a error log java.lang.Exception
java.lang.Exception: null
  at de.darenkster.stringtemplates2slf4j.Main.main(Main.java:9)
10:33:44.909 [main] DEBUG de.darenkster.stringtemplates2slf4j.Main -- This is a debug log
10:33:44.910 [main] WARN de.darenkster.stringtemplates2slf4j.Main -- This is a warn log

The calling class is determined via the StackWalker API and depending on whether the String Templates contains an exception the corresponding log method with the throwable parameter ist called. Here's the link to the GitHUb Repo if you want to check it out:

Let me know what you think of it :)

24
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/Sketusky on 2023-10-29 08:08:16.


Hi, I would like to ask you about technology trends for Spring projects. Which technology gains in popularity and is warmly welcome by companies? I browsed through job offers and I saw that Java 17 with Kotlin knowledge is a big plus. Do you have any observations?

25
 
 
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/java by /u/Hakky54 on 2023-10-24 17:14:10.

view more: next ›