50 comments

  • flossly a day ago ago

    Nice to see Ruby vs Java. Must say that in this context Kotlin deserves a mention: my Kotlin code basically looks+feels like Ruby-with-types. Both Ruby and Kotlin are essentially OO, but with "lots of FP features where it makes sense".

    On the side of the jpackage: I'm currently using GraalVM compile to native for a Kotlin CLI tool. I do the build in a build container so I use an older glib to ensure compatibility on a wide variety of Linuxes, AND because this way no-one needs to install all the GraalVM requirements by hand. The result is a 57MB binary, that start in a blink of the eye. The downside is long compile times (2 minutes for a simple CLI tool that uses AWS SDK). I think I prefer this of jpackage; but I'm not building a GUI tool.

    • pjmlp a day ago ago

      Many of those "lots of FP features where it makes sense". were already present in Smalltalk.

      Especially anything related to lambdas, map, filter and co.

      Something that was lost in most OOP languages that followed suit, until like a decade later.

      • flossly a day ago ago

        > Many of those "lots of FP features where it makes sense". were already present in Smalltalk.

        Good point. And both Java and Ruby borrowed from Smalltalk (according to Wikipedia Kotlin does not, but that is: not directly.

        Sadly Java did not take Smalltalk's FP inspiration (I guess they were strayed by C++'s lead in that regard), and we needed streams and now Kotlin to fix that :)

        Smalltalk's syntax never go really popular though. One could say that was its biggest drawback.

        • giobox a day ago ago

          > Smalltalk's syntax never go really popular though. One could say that was its biggest drawback.

          A lot of Smalltalk-style syntax was absolutely massive for a decade or so you could argue, at least under the guise of the gazillions of iPhone apps that were written in Objective-C. This random blog post probably does a better job than me:

          > https://richardeng.medium.com/apple-has-been-using-smalltalk...

        • lukan a day ago ago

          "Smalltalk's syntax never go really popular though. One could say that was its biggest drawback."

          This would be my guess, I always heard nice things about it and liked many concepts, but the syntax was just plain ugly to me, so I never felt the urge to try it out. I imagine others felt similar.

        • leapingdog a day ago ago

          > Sadly Java did not take Smalltalk's FP inspiration (I guess they were strayed by C++'s lead in that regard)

          You guess correctly. Java was easy for C++ developers to learn which was beneficial for adoption at the time.

  • diegof79 a day ago ago

    This part:

    > What surprised me was that Java supported processing ZIP files and XML from its standard runtime.

    Makes me feel old.

    Java was developed at a time when most people connected to the Internet via dial-up. That meant two things: the runtime is something you download once and has to work offline, and it has to support compressed packages. JAR files are essentially ZIP files with additional metadata stored as files. So yes, that’s why Java has built-in libraries for ZIP files.

    The XML came with the “XML fever” of the 2000s. Java was one of the first languages to include XML support, and many of the XML DOM APIs are very Java-oriented. And, of course, it was included in the standard lib because nobody wanted extra module downloads over a slow connection. (and because XML was evolving at that time, it also meant that you had some issues between the SDK libs and user-provided libs)

    • hedgehog a day ago ago

      You know that, and I know that, but for someone who started working more recently the difference between CORBA and punch cards might be a little blurry because they're both so far back they've never seen either. It's like kids asking how the dinosaurs in LEGO Jurassic world were animated, because they don't move like real toys, and noting how much easier the 1993 live action Jurassic Park filming was because back then they could just film real dinosaurs. Feels weird, but makes sense from their perspective.

      • diegof79 17 hours ago ago

        It's funny that you mention CORBA, because my first contact with Java was through a C++ CORBA service that interfaced with Java (this was around 1999). After that, I worked for many years using Java.

        While many things changed, the world of remote services didn’t change radically: different technologies, same concepts.

      • auvi a day ago ago

        Jurassic Park 1993 introduced UNIX to the mainstream world. Movies of that era showed SGI Sun, Cray or CM computers. All gone. I miss those days.

        • diegof79 17 hours ago ago

          The UNIX scene was funny and probably included because of some marketing arrangement with SGI. I haven’t seen mentions of UNIX in other movies.

          For context: in Jurassic Park, there is a scene where a 12-year-old girl sits in front of an SGI workstation to deactivate some doors (or similar) and says, “I know this! This is UNIX; it’s easy”, and uses a 3D UI to navigate files. At that time, an SGI workstation was very expensive and not something you could learn at home, and UNIX-like OSs weren't as common. The scene was like someone saying “I know this it’s a nuclear reactor, it’s easy”

        • clan a day ago ago

          Too many secrets, indeed!

    • NuclearPM a day ago ago

      I just had to look through XML at work. What an ugly format!

      • chasd00 21 hours ago ago

        There use to be a saying, "XML is like violence, if it's not working just add more!".

        • NuclearPM 20 hours ago ago

          Why use 5000 characters when you could use 9000?

          • tanin 11 hours ago ago

            DOCX or OOXML takes it to another level.

            Instead of making something an attribute, they make it a child element...

  • martinald a day ago ago

    How is it surprising to people that zip and XML are in stdlibs for a programming language?

    Btw, you should have looked at dotnet for this as well. There is a very good library ( DocumentFormat.OpenXml) that can handle all docx/xlsx/pptx files. And dotnet can ship standalone binaries (though AOT probably won't work).

    • pier25 a day ago ago

      Many runtimes/languages rely on third party deps for that. Also plenty of devs think the stdlib should be as lean as possible.

      Personally, I think there should be a balance. The direct consequence of a barebones stdlib is NPM and having to download hundreds of dependencies for a hello world.

      • wky a day ago ago

        Golang has the golang.org/x packages, which avoids too much stdlib bloat while still providing the niceties of “pre-vetted” packages that don’t pull in a massive dependency tree.

        • tanin 11 hours ago ago

          Yeah, I try to avoid 3rd party libraries unless it comes from credible sources/companies or vetted by famous frameworks e.g. Rails uses it.

          Not just for NPM but for Intellij plugin, VSCode extension, and etc.

          If Node has officially pre-vetted libraries, that would be really awesome.

        • pier25 a day ago ago

          yeah I wish Node had something like that

    • rjrjrjrj a day ago ago

      Difficult to square the author's surprise with the later comment "I have my fair share of building a Java desktop application and know jpackage and alike very well"

      You can't get very far in Java development without working with .jar files (which are zip archives).

    • CharlieDigital a day ago ago

      https://github.com/dotnet/Open-XML-SDK

      First party from Microsoft; feels like it would be the way to go.

  • vintagedave a day ago ago

    > MCPB

    It's annoying when acronyms are used without explanation. It's https://github.com/modelcontextprotocol/mcpb , which looks a kind of installation bundle for MCP servers.

    • srcreigh a day ago ago

      Some more info from the link:

      > MCP Bundles (.mcpb) are zip archives containing a local MCP server and a manifest.json that describes the server and its capabilities. The format is spiritually similar to Chrome extensions (.crx) or VS Code extensions (.vsix), enabling end users to install local MCP servers with a single click.

    • wiseowise a day ago ago

      Just scroll down a little bit. They link what MCPB is.

      > Later, I've discovered that Claude Desktop supports MCPB.

    • tanin 11 hours ago ago

      I forgot to provide the link in the tldr at the top. I'll do that. Thank you for the feedback.

  • mike_hearn a day ago ago

    There's Apache POI which is intended for working with Office documents, so directly using XML parsers might not be necessary.

    The MCPB format seems to be able to run external processes, even if there's a Node in the middle. So you could also compile the Java version to a native binary with GraalVM and ship that as an MCPB.

  • tracker1 a day ago ago

    I'm a bit surprised that Go and Rust weren't at least considered. I'd probably have looked into Deno in addition to Bun for the combined TS/JS assembly.

    On the JS/TS side, you also have a few interesting tools to make interacting with XML a bit easier in practice (cheerio, for example). I'm not sure if the purpose in interacting with DOCX and to what extent manipulation is wanted/needed... it's a complex format to say the least, especially with references/embedding.

    I've never been a Java fan, having preferred C# along the way, but I don't think I'd use either for something like this just because of the runtime size, if nothing else.

  • mark_l_watson a day ago ago

    Sometimes I see things that make me reevaluate assumptions I make. I am all in on flexibility using LLMs and agentic coding harnesses: I hate feeling locked down to one platform.

    Then I saw this in the article:

    >> I've discovered that Claude Desktop supports MCPB. The MCPB provides a Node runtime. Therefore, our application would only contain our code. This means the size of the application would be ~1MB.

    I don't know why this is so appealing to me but it is. I currently use Claude Code with a DeepSeek v4 Pro API backend. I will check out if Claude Code itself has MCPB support.

    • jondwillis a day ago ago

      > I will check out if Claude Code itself has MCPB support.

      It doesn’t.

  • exabrial a day ago ago

    Reality has types and identity. Static types just make sense.

    That all being said, the JVM has never broken into local apps, even with JavaFx. I think the thought of installing a JVM, plus then installing an app is no longer a workflow most users will tolerate. Electron has proved though people don't mind downloading a multi-gig app anymore however, so maybe this is no longer an issue.

    • chromanoid a day ago ago

      MCPs and complex CLI tools running locally/native via graalvm might be a great usecase for Java. https://quarkus.io/blog/mcp-server/

    • leapingdog a day ago ago

      I have unknowingly bought commercial desktop software that turned out to be Java + SQLite under the hood. Don't know what they were using for UI.

    • winrid a day ago ago

      jpackage/jlink lets you distribute an exe, dmg, etc, with the JVM packaged inside. I have java desktop apps which are like 50mb.

    • smrtinsert a day ago ago

      Bitwig and Intellij stand out to me

      • exabrial a day ago ago

        Yeah Intellij is incredible, and I believe it's Swing. And Eclipse is ambulatory, but the SWT/OSGI frameworks are fighting yesterday's battles. All of this aside, I yet to find this level of IDE/Debugger in any other language.

        I'll check out Bitwig.

  • mring33621 a day ago ago

    Maybe it's because I don't know anything about how claude plugins work, but I find it odd that there's no actual TS code in the mentioned repo: https://github.com/LegalRabbit-AI/legalrabbit-docx-claude-pl...

    There is a zip file of code in the releases though. I wonder if the LPGL 3.0 license covers that?

    UPDATE: the zip file is just the repo itself. So everything interesting is in the legalrabbit-docx-mcp.exe, contained in the GitHub releases.

    What a tease.

    • tanin 12 hours ago ago

      (The author of the blog here)

      To clarify this: we don't intend to open-source it. There's no source code.

      The only reason we need a github repo is because Claude Code/Cowork requires a plugin to be a github repo, which contains the plugin configuration.

      Moreover, our users are lawyers. They don't have Node/Python runtime i.e. unable to run code. They need a single-file executable.

  • Bengalilol a day ago ago

    I think this project could be a perfect (I may be biased and didn't dig) candidate for Haxe to JS dev : no framework (except a small node server?), strict typing, minimal dependencies (jszip and maybe fast-xml-parser). What could go wrong?

  • jgsteven a day ago ago

    I wonder if cross-compiled Java to JavaScript or WASM would work here.

  • outageroom a day ago ago

    [flagged]

  • HozeKan a day ago ago

    [flagged]

  • dividendflow a day ago ago

    [dead]

  • shevy-java a day ago ago

    > I wrote a lot of Ruby back in 2010s. I felt Ruby was a beautiful language. Unfortunately, I don't feel that anymore.

    Perhaps because he sucks.

    It's easy to write ugly code in any language. You need to think, in order to write good code, in any language. Even then some languages are uglier than others. All my PHP code looks awful in comparison to my ruby code. Even with the same expertise level, the issue remains that PHP is just an uglier language. Similar comparisons can be made for many other languages.

    > The biggest issue is no typing.

    Well ... it's not. But it is pointless to try to explain this people whose brain is too addicted to "mama told me types must go into everything I touch".

    > I worked at Stripe for 4.5 years, so I looked into integrating Sorbet

    There you go! This already tainted his ability to THINK.

    > Forgot .each in node.children.each do |x|. The error showed up as "unexpected nil" at a random place.

    Erm ... how can you forget this while claiming you write a lot of code in ruby?

    By the way, I almost never use the do/end synax. It helps me visually to use {}.

    A side effect is that:

        def foobar(
            i = node.children
          )
          i.each {|element|
            check_for_cats_in_this_container(element)
          }
        end
    
    will also be easier to visually notice missing things such as ".each" or ".map" or anything. Keep the structure simple at all times. And no, forgetting .each a lot - that is a bogus complaint. People using ruby for a little while don't really do such an error. But let's assume it is that way:

        def foobar(
            i = node.children
          )
          i {|element|
            check_for_cats_in_this_container(element)
          }
        end
    
    Well, that visually already looks wrong. What method did you want to run on the variable i here?

    > Forgot .children in node.children[i]. The error showed up as > "unexpected nil" at a random place.

    Mate - use methods. The guy seems to have written only spaghetti code in ruby. Definitely not "4.5 years of writing ruby". Nah.

    Also, "unexpected nil" - first, such an error does not exist, he probably means a nil. Second, why do you not check for nils properly? You don't need types for that. So the issue is you were lazy when writing the code. Understandable, but not a reason to "I need types" as compensation for your own laziness here.

    > Using assert_raises in the test obscured a compilation error.

    What compilation actually? Then again someone who forgets .each, already disqualified here.

    >I used ruby_llm-mcp where the doc mentioned tool.input_schema but the latest version has renamed it to tool.params_schema (issue). It took me a while to figure out since there was no typing hint to help me with it.

    Sounds like a project with awful documentation. This is a problem with many ruby projects. For some reason ruby projects hate documentation, with a few exceptions. I never understood this. To me it seems writing ruby is fun, then nobody wants to write documentation. That's really stupid of those people who do. Please look at rack. This thing has no real documentation that is useful. Same with opal and ruby-wasm. Ruby hates documentation. It's my number #1 complaint too.

    I am fine with those admitting to this problem. Who I can not stand are the "the code is self-explanatory". This always leads me to assume the code is utter garbage. And this indeed is almost always the case so.

    > rubyzip: it has an obscure bug where it produced a corrupted DOCX file. I've encountered this bug with a DOCX file from our customers. I can't share the confidential file to the rubyzip author.

    Or it is a fake story. Is this AI generated text? The guy makes up things on the fly.

    People, please - stop using AI. It will slop zombify your brain.

    • wiseowise a day ago ago

      How do you manage to write completely sane messages in some threads and then come up with the most unhinged shit like this?