Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
haglin
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
haglin
2mo ago
I work on OpenJDK, so I may be biased, but I’ve also found that JFR works really well with LLMs. $ java -XX:StartFlightRecording:maxsize=10M,filename=dump.jfr -jar app.jar $ jfr view all-views dump.jfr > report.txt $ jfr print
2.
▲
by
haglin
11mo ago
I find inheritance works best when you model things that don't exist in reality, but only as software concepts, for example, an AbstractList, Buffer or GUI component.
3.
▲
by
haglin
1y ago
It would be in the "Files changed" section on GitHub, not in the git history. If you don't want to see the context, you can turn it off.
4.
▲
by
haglin
1y ago
Splitting up a PR is a lot of work, especially if you want each commit to compile, but it would be great if you could categorize changes using 5–10 colors and then have checkboxes that you can toggle to hide code corresponding to a color. W
5.
▲
by
haglin
1y ago
Yeah, Windows 2000 was probably the best operating system Microsoft ever produced. It had no crashes, a snappy/intuitive/sleek user interface, and DirectX support for games. I am currently running Mac OS X because I never liked Wi
6.
▲
by
haglin
1y ago
Since JDK 11 (released in 2018). "Launch Single-File Source-Code Programs" https://openjdk.org/jeps/330
7.
▲
by
haglin
2y ago
JFR only samples running Java methods. I would guess at least some of the bottlenecks are in hardware, the operating system or in native code (including the JVM) in this case.
8.
▲
by
haglin
3y ago
"Left unquestioned, assumptions and expectations could have caused us to miss one of the most impactful changes we’ve made to our operational defaults in a decade"
9.
▲
by
haglin
3y ago
> the only knock you can put on Java for reliability is null-safety FWIW, nullity control has been added to the Valhalla project, so it might be fixed going forward. https://youtu.be/Ma0NtbG0mHY?feature=shared&t=1076
10.
▲
by
haglin
3y ago
Two years it too short. The reason I now use gmail and not hotmail is because Microsoft did a similar thing 20 years ago. When I lost my hotmail account, I thought I might as well use gmail from now on. Reason I didn't log into my hotm
11.
▲
by
haglin
3y ago
An alternative to avoid safepoints (only samples executing threads) var r = new RecordingStream(); r.enable("jdk.ExecutionSample").withStackTrace().withPeriod(Duration.ofMillis(1)); r.onEvent("jdk.ExecutionSampl
12.
▲
by
haglin
4y ago
There are multiple ways to represent an optional value, for example: 1) an empty list/array 2) throw an exception if the return value is missing. 3) -1 Optional can be used as a better alternative in all these cases. It's not just
13.
▲
by
haglin
5y ago
Hotspot has sub-millisecond GC pause times. "But as long as your system isn’t heavily over-provisioned, you can expect to see average GC pause times of around 0.05ms (50µs) and max pause times of around 0.5ms (500µs)." https:
14.
▲
by
haglin
6y ago
And in JDK 16, ZGC has concurrent thread-stack processing, which typically reduces GC pauses below 1 ms https://openjdk.java.net/jeps/376 https://youtu.be/88E86quLmQA?t=1525
15.
▲
by
haglin
6y ago
The JDK comes with a powerful memory leak tool. $ java -XX:StartFlightRecording:settings=profile MyApp $ jcmd MyApp JFR.dump paths-to-gc-root=true filename=dump.jfr $ jfr print --events OldObjectSample --stack-depth 64 dump.jfr The tool wil
16.
▲
by
haglin
7y ago
In JDK 14, Flight Recorder events will be available for monitoring. try (var rs = new RecordingStream()) { rs.onEvent("jdk.GCPhasePause", event -> { System.out.println(event.getDuration()); }); }
17.
▲
JEP 349: JFR Event Streaming Targeted (Java)
(openjdk.java.net)
2 points
by
haglin
7y ago
|
1 comments
18.
▲
by
haglin
7y ago
New IO.
19.
▲
by
haglin
7y ago
I haven't tried serverless, but shouldn't that be Java's cup of tea? The JVM can load code dynamically and adapt the runtime to the work load. Maybe there is a framework missing, so those that provide serverless starts a new
20.
▲
by
haglin
7y ago
For arbitrage that must happen really fast, FPGAs is the way to go, and for complex code that needs to be rewritten often and quickly, Java is probably a better fit than C++.
21.
▲
by
haglin
7y ago
If you want to sell software or services to the government you need to be 508 compliant https://www.section508.gov/sell
22.
▲
by
haglin
7y ago
JDK 11 comes with a new HttpClient. Might be useful and fun to learn. https://docs.oracle.com/en/java/javase/11/docs/api/java.net....
23.
▲
by
haglin
8y ago
With ZGC[1], value types[2] and Panama[3], Java will be great platform for gaming and 3D graphics. Write once and it will work on Linux, Windows and Mac OS X. [1] https://openjdk.java.net/projects/zgc/ [2] https:
24.
▲
by
haglin
8y ago
Data Classes for Java https://cr.openjdk.java.net/~briangoetz/amber/datum.html
25.
▲
by
haglin
8y ago
I like to see simplified loops in Java. For example, traverse two collections/arrays of the same size simultaneously. for (var f : fathers, var m : mothers) { families.add(new Family(f, m)); }
26.
▲
by
haglin
8y ago
It depends on how you use it. You can create a design ticket where you describe the larger overall picture (city planning) and then as you implement it, add enhancements (neighbourhoods and sewers) as subtasks. If something breaks when you
27.
▲
by
haglin
8y ago
I agree that the Android APIs are not good. Have you looked at JDK itself?
28.
▲
by
haglin
8y ago
If you are running JDK 9 or later, you can use jshell: jshell> "Hello World!" $1 ==> "Hello World!" https://openjdk.java.net/jeps/222
29.
▲
by
haglin
8y ago
Can you elaborate? I don't understand what you mean. Oracle contributes patches to OpenJDK, for instance lambda support. Do you want less of that? Are the commits made by Oracle employees especially bad? It's not like you need to
30.
▲
by
haglin
8y ago
Curious, what change within Oracle do you want to see? Java is still free, so it can't be that.
More ›