Live data from Hacker News

Using Java 9 Modularization to Ship Zero-Dependency Native Apps

steveperkins.com

91–100 of 117 posts

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#91
post #59

So, after "optimizations [...] to further reduce the resulting bundle size", a Java command-line "Hello World" is still 21.7 MB. I've found a Node.js version (using node-packer [1]) to be about the same size. However, as mentioned in the article, "Hello World" in Go is an order of magnitude smaller. The article may be right that Java is "the best choice available" for cross-platform GUI apps, but for cross-platform c…

Java and Node need to ship their own virtual machine while native code does not (others mentioned that runtime may be dynamically linked). VM startup time is ludicrously high compared to execution time of "userspace" code in CLI tool, making such rintimes no-go for CLI tools (except for web devs, apparently).

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#92
post #11

While everyone is excited about how this helps desktop app development, this is also going to simplify server deploys. If you've got a full java stack, you won't need to do anything to provision a server.

i think this is a better selling point.

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#93
post #49

Earlier quoted context omitted.

>tears down the barriers to desktop app development Yes, then it replaces them with the barriers to web app development.

Sure, but more companies have the story of needing a web app anyway which requires a specific tech stack. So you can either maintain two tech stacks or you can port your webapp to native. Having a beautiful, easy to develop, and easy to maintain native stack means nothing when you don't have an answer to, "How do we then reuse our code in a browser?".

You don't.

Use the browser for what it was meant for, hyperactive documents.

Everything that matters is on the backend accessed via Web APIs.

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#94
post #90

Earlier quoted context omitted.

Hey! You win the worthless example competition! See the front desk for your prize. How about comparing a full stack, monolith app in Java vs Golang? While you’re at it, don’t just compare binaries. Compare how well it handles concurrency. Compare how well it handles templates. Or how smoothly it handles DB interaction. Then look at all this and compare the population of Golang vs Java devs. Compare how well you can l…

Your message is stupid and aggressive. The author of the blog post himself compares hello-world executable sizes, so what are you complaining about?

Would you please not reply to a bad HN comment by making the thread even worse? The site guidelines explicitly ask you not to do this.

Your account unfortunately stands out in my mind as one which has posted many nasty comments to HN over the years (as well as many good ones), so glass houses and all that. If you would read https://news.ycombinator.com/newsguidelines.html and post only scrupulously respectful comments from now on, we'd appreciate it.

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#95
post #5

> A “Hello World” CLI written in Go compiles to around 2 MB. Nitpick but hello-world in Go : package main func main(){ print("Hello World") } is < 1MB on most computers (900KB on windows). No need to import the "fmt" package.

Hey! You win the worthless example competition! See the front desk for your prize. How about comparing a full stack, monolith app in Java vs Golang? While you’re at it, don’t just compare binaries. Compare how well it handles concurrency. Compare how well it handles templates. Or how smoothly it handles DB interaction. Then look at all this and compare the population of Golang vs Java devs. Compare how well you can l…

This comment breaks the site guidelines. Please don't do flamewar things on HN, even if someone else's comment seems unfair.

https://news.ycombinator.com/newsguidelines.html

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#96
post #36

Earlier quoted context omitted.

True. The JVM is big. I've been meaning to try Golang one of these days, I see it as Java's spiritual successor

I tend to view it more as a regressor. Golang is a conservative retrenchment towards Java pre-1.5 in a lot of ways. (And that may be fine for some use cases; I get the appeal even if I think it's misguided.)

Ok you have Nim,Crystal and / or Rust if you insist. There is actually a reason why Go is gaining momentum.

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#97
post #36

Earlier quoted context omitted.

I tend to view it more as a regressor. Golang is a conservative retrenchment towards Java pre-1.5 in a lot of ways. (And that may be fine for some use cases; I get the appeal even if I think it's misguided.)

Ok you have Nim,Crystal and / or Rust if you insist. There is actually a reason why Go is gaining momentum.

Sure, there certainly is: it looks easy at first blush and scales moderately well. And that's fine, if you understand its drawbacks, and what Go aficionados try hard not to address is that Golang has a severe complexity wall. It is a large reason, along with faddish trendiness, why the Go universe clings so heavily to microservices: because the Golang is structured lends itself to writing messy code that is more easily combated by splitting into different systems rather than just writing modular code that respects encapsulation (in part because its type system is lousy, in part because error handling with deeply nested trees is harder than it needs to be, etc.). That this also creates additional problems--request tracing is an ongoing tire fire--is often elided a little bit, too.

In my experience, Go exhibits human-scaling problems long before even dynamically typed languages and significantly before Java, Kotlin, or the like. And the arguments to deployment are defanged both by Docker and by that it's usually not the developer who picks it who ends up building the CM around it in the first place (that's why they hire people like me, and why I have had to become uncomfortably familiar with Golang, its ecosystem, and the habits of your average Golang developer: because the person running the systems it runs on is inevitably the backstop for when those programs spit the bit).

But in the five-minute-demo-to-make-production-decisions universe, it plays really well.

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#98
post #51
post #23

Earlier quoted context omitted.

Discord is great

Sure, but Discord's web app and their native app are basically equivalent. The native app gives a little more system integration (like global hotkeys and direct access to sound hardware) but fundamentally the Discord app is just a webview. I don't think anyone doubts that a high-quality website wrapped in a webview won't be at least the same quality. The question is whether "web-native" platforms can do more than jus…

[deleted]

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#99
post #82

Earlier quoted context omitted.

Anecdotal problems

Another anecdote; your comment is the only one I've ever noticed that appears to be defending Slack. From an outsider looking in, I'm not sure why it is so popular.

It's popular because technical superiority isn't why people use software.

For example, Spotify eats 100% CPU if I leave it open for 24 hours yet I don't think I've met someone in the last year that doesn't have Spotify running on their computer.

Re: Using Java 9 Modularization to Ship Zero-Dependency Native Apps

#100
TFA reads like GCJ does not exist, a classic lie by omission. Don't become a victim of misinformation!

Compiling to small, native binaries (i.e. JRE not needed) is possible since at least 10 years ago. Let's examine this application as an example: http://sancho-gui.sf.net

    /tmp/sancho-0.9.4-59-linux-gtk$ ls -hs ./sancho
    13M ./sancho

    /tmp/sancho-0.9.4-59-linux-gtk$ du -hs ./lib
    740K ./lib

    /tmp/sancho-0.9.4-59-linux-gtk$ ldd ./sancho
    linux-gate.so.1 (0xf7f71000)
    libm.so.6 => /lib/libm.so.6 (0xf7e30000)
    libpthread.so.0 => /lib/libpthread.so.0 (0xf7e11000)
    librt.so.1 => /lib/librt.so.1 (0xf7e07000)
    libdl.so.2 => /lib/libdl.so.2 (0xf7e02000)
    libc.so.6 => /lib/libc.so.6 (0xf7c29000)
    /lib/ld-linux.so.2 (0xf7f73000)
Post reply on HN