7

Ok so one of the advantages of Java is that it has a huge ecosystem of libraries.
Then why is there no fucking decent graph library?! I just need to display this planar graph. I'm so fucking close to learning c++ and using boost to layout the graph.
I'm seriously stuck with this since like a week.

FUUUUUCK

Comments
  • 4
    Java is horrible for everything UI-based.

    Switch to Java EE and build a web app if that's not too much of a hassle for your project and you'll be able to use some JavaScript based graph APIs on your web application.

    You would have a Java backend and a HTML/CSS/JavaScript frontend with that approach.
  • 2
    I had to create a speciel kind of chart for a java application, it took me weeks to find a good library. In the end i used a hack AND changed the code of the library. It is my biggest sin up to today.
  • 0
    JNI to a decent C++ library.
    And then you can shoot yourself because JNI is so fucking annoying.
  • 1
    @frickerg I don't think java ee is an option since this is "only" a project for university. Besides I don't think the other team members would be very happy about redoing the ui in HTML, CSS and JS.
  • 0
    @RememberMe I thought about just using stdin/out because it's not a lot of data I would need to transfer. The graph would only have around 20 nodes and since it's planar not a lot of edges. But I tried briefly to modify a sample cpp program and it wouldn't compile anymore when I replaced the number 5 with an integer variable. And I have no clue why. The last time I used cpp was 3 years ago in school and we didn't really do much.
  • 0
    @Lythenas if it's such a tiny graph then why not just write your own mini-library? Do you need any fancy algorithm?
  • 0
    @YouAreAPIRate I found one app/library that does actually exactly what I want. The problem is it's like 10 years old (it used a variable called enum which isn't allowed in Java anymore) and it's not very well documented. At first I thought I could just reimplement the whole library but I need around 6 classes from that library and they have a couple thousand lines of code each... So that's not an option.

    Unfortunately this is not just a relatively simple ui chart. You need pretty complicated algorithms to layout a graph planar.
  • 0
    @RememberMe unfortunately creating a planar drawing of a graph is not that easy. From the research papers I've read it can be done fast but they all use data structures that I have never heard of. PQ-Trees and other. So I doubt that is an option.
  • 0
    @Lythenas Ah, I see. Then piping the output from a C++/Python program to your Java program seems to be the best way, to me. No FFI, no hassle.
  • 0
    @frickerg

    and then install babel.

    and about 30 CLIs.

    And webpack.

    And this webpack replacement.

    And this replacement for the webpack replacement.

    Did you forget to minify? Did you grab it correctly? Did you GULP it? Slurp it? Suck it?

    And after it all, "why are you doing it xyz?"

    "The proper way was abc all along."

    Just write a fucking graph library guy.

    Sometimes you have to get your hands dirty.
Add Comment