Comment by ok_dad

Comment by ok_dad 13 hours ago

98 replies

Yea, they just posted this a few days ago:

https://www.anthropic.com/engineering/advanced-tool-use

They discussed how running generated code is better for context management in many cases. The AI can generate code to retrieve, process, and filter the data it needs rather than doing it in-context, thus reducing context needs. Furthermore, if you can run the code right next to the server where the data is, it's all that much faster.

I see Bun like a Skynet: if it can run anywhere, the AI can run anywhere.

yellow_lead 13 hours ago

Java can run anywhere too

  • wiz21c 4 hours ago

    Java is owned by Oracle. And you sure don't want to do business with that company. There's a reason why postgresql is slowly eating their cake.

    • OrangeMusic 4 hours ago

      This is FUD. Java has many open source implementations and nobody needs to deal with Oracle.

      • vidarh 3 hours ago

        Even if we postulate that he fear is unwarranted and irrational, the fear is still real, based on Oracles history of lawsuits, and so the explanation still holds.

      • jve 3 hours ago

        Well except Google that got sued for US$8.8 Billion because they decided to use specific API signatures but provide their own implementation...?!

  • Schnitz 7 hours ago

    Anywhere where the correct Java version is installed correctly, important caveat

    • gf000 an hour ago

      You can just supply a minimized runtime for your program, which is the primary way to ship Java programs for quite some time now.

    • jimbob45 6 hours ago

      Java’s cardinal sin was not owning the OS like Microsoft’s C# to force end-users to update the framework. Oracle really didn’t understand what they were sitting on with their Ubuntu competitor Solaris.

      • sander1095 5 hours ago

        This has no longer been the case for C# for 10 years since the release of .NET Core and (now) .NET. The runtime is no longer bundled with the OS.

        This is only true for older .NET Framework applications.

  • wrboyce 11 hours ago

    It’s relevant enough that I feel I can roll out this bash.org classic…

    <Alanna> Saying that Java is nice because it works on all OS's is like saying that anal sex is nice because it works on all genders

    EDIT: someone has (much to my joy) made an archive of bash.org so here is a link[1], but I must say I’m quite jealous of today’s potential 1/10,000[2] who will discover bash.org from my comment!

    [1] https://bash-org-archive.com/?338364

    [2] https://xkcd.com/1053

    • anamexis 10 hours ago

      Perhaps my biggest claim to fame is being #11 on the bash.org top 100.

      • komali2 8 hours ago

        Hah, found it: https://bash-org-archive.com/?207373

        So how did it work back in the day, people would just submit text and it would get upvoted? I always assumed like half of them were just made up.

        • anamexis 7 hours ago

          Yep, exactly that. I recall that the voting was interesting because it was just ranked on absolute number of votes, no time decay or anything, so it would take quite some time for a new contender to accumulate votes to "compete" on the leaderboard. I don't remember if there were even accounts or if anyone could just vote repeatedly, modulo some IP or cookie-based limits.

          As far provenance, I assume a lot of them were made up too, but this one was real.

    • post_below 3 hours ago

      As one of the lucky 1/10000, holy shit that was amazing. Thank you.

      To everyone else: I acknowlege that this post is not adding value but if you were one of the lucky 1/10000 you would understand that I have no choice.

    • centur 11 hours ago

      Not discovered from scratch, but was a big fan when it was alive and kicking. Went there from time to time to get some mood boosters. So was very sad when found that it's gone (original one). Thanks a lot for sharing that bash-org-archive.com exists, what a great fun going down this memory lane.

      • wrboyce 10 hours ago

        I’ve been browsing the archive since I left that comment, they really were the good old days weren’t they. IRC was my introduction to geekdom, and I don’t think it would be unreasonable to say it shaped my life. Here I am 30-ish years later, an old man yelling at clouds — and I wouldn’t change much!

        If anyone ever requested/used an eggdrop(?) bot from #farmbots or #wildbots on quakenet then thanks to you too; that was certainly one of the next steps down the path I took. A (probably very injectable) PHP blog and a bunch of TCL scripts powering bots, man I wish I could review that code now.

    • yellow_lead 11 hours ago

      That's hilarious. My comment is mostly a joke, but also trying to say that "runs everywhere" isn't that impressive anymore.

    • orliesaurus 11 hours ago

      wait - how do you search the quotes??

      • wrboyce 11 hours ago

        I don’t think there is a search function, I got the exact wording from a web search (I think “bash Java anal”, arguably a dangerous search!) and then after submitting I wondered if there is an archive of the quotes.

  • ok_dad 8 hours ago

    I ain’t hot a horse in this race I just put 2 and 2 together to get 4. I’m sure Java is fine but they didn’t buy Java.

  • 827a 12 hours ago

    Java is not for sale.

    • Zambyte 11 hours ago

      Java can be depended on without buying anything.

      • SergeAx 11 hours ago

        Oracle lawyers want you to think so.

      • bossyTeacher 11 hours ago

        Java's price is your time which you will need tons of as Java is highly verbose. The ultimate enterprise language

  • wiseowise 13 hours ago

    Not in the browser, and no – webassembly doesn't count, otherwise you can say the same about Go and others.

    • creata 13 hours ago

      Wasm does count, and you can say the same about Go and others.

      • jazzypants 10 hours ago

        Sure, they run, but they can't touch the DOM or do much that's very interesting without JavaScript.

      • Sammi 12 hours ago

        Js just runs as is. Atwood's Law and all that.

    • fishmicrowaver 12 hours ago

      May I ask, what is this obsession with targeting the browser? I've also noticed a hatred of k8s here, and while I truly understand it, I'd take the complication of managing infrastructure over frontend fads any day.

      • MasterScrat 11 hours ago

        HN has a hatred of K8s? That’s new to me

    • kreijstal 11 hours ago

      java did run in the browser once.... it was embedded directly on the browser there was also nsapi

      you could also run java with js if you are brave enough https://kreijstal.github.io/java-tools/

      • TeaVMFan 9 hours ago

        Java runs in the browser currently, after a transpilation step (same as .ts):

        https://teavm.org/

        • gf000 an hour ago

          Also CheerpJ (with support for Swing UIs even), Closure compiler, and now GraalVM also has an experimental WasmGC target.

  • mythz 9 hours ago

    AI tools value simplicity, fast bootstrapping and iterations, this rules out the JVM which has the worst build system and package repositories I've ever had the displeasure of needing to use. Check in gradle binaries in 2025? Having to wait days for packages to sync? Windows/Linux gradle wrappers for every project? Broken builds and churn after every major upgrade. It's broken beyond repair.

    By contrast `bun install` is about as good as it gets.

    • pjmlp 4 hours ago

      Gradle is something that only Android devs should be using, and because of Google imposes its use. Had not been for Google and Android Gradle plugin, almost no one would care.

      Please give me Java tools over C, C++, JavaScript or Python ones, any day of the week.

      Only .NET and Rust compare equally in quality of DX.

      AI tools value simplicity?!?

      Check in the Python dependency management chaos, what it is the proposal this month, from what AI startup doing Python tools in Rust?

    • DarkNova6 3 hours ago

      Apples and oranges. Maven is leagues beyond npm. Screw Gradle.

      How many mass security incidents have there been with npm just the last few weeks?

    • sfn42 3 hours ago

      It's just too bad bun is based on literally the worst programming language that's in actual use.

      • mythz 2 hours ago

        TypeScript's one of the best, and bun runs it natively.

    • speed_spread 8 hours ago

      By using Gradle you certainly didn't make yourself a favor.

      • JavierFlores09 3 hours ago

        I am unsure why people feel the need to say this about Gradle. If you aren't doing anything fancy, the most you will touch is the repositories and dependencies block of your build script, perhaps add publishing or shadow plugins and configure them accordingly but that has never been simpler than it is now. Gradle breaks when you feel the need to unnecessarily update things like the wrapper version or plugins without considering the implications that has. Wrapper is bundled in so you don't have to try and make a build script work with whatever version you might have installed on your system if you have any, toolchain resolution makes it so you don't even need to install an appropriate JDK version as it does that for you.

        If the build script being a DSL is the issue, they're even experimenting around declarative gradle scripts [0], which is going to be nice for people used to something like maven.

        0: https://declarative.gradle.org/

        • DarkNova6 3 hours ago

          And yet. None of these issues exist in Maven to begin with.

  • throwawaymaths 13 hours ago

    run code anywhere hamstrung by 90s syntax and hidden code indirections

    • groundzeros2015 13 hours ago

      Haven’t checked in on Java in a while?

      • ozim 12 hours ago

        From what I gather everyone is still stuck on Java 8 so no need to check?

      • auxiliarymoose 6 hours ago

        I tried to check in on Java recently but got a NullPointerException when using the AbstractSingletonProxyFactoryBean !

VerifiedReports 7 hours ago

What do you mean by "context" here?

  • manbash 7 hours ago

    Under "Programmatic Tool Calling"

    > The challenge

    > Traditional tool calling creates two fundamental problems as workflows become more complex:

    > Context pollution from intermediate results: When Claude analyzes a 10MB log file for error patterns, the entire file enters its context window, even though Claude only needs a summary of error frequencies. When fetching customer data across multiple tables, every record accumulates in context regardless of relevance. These intermediate results consume massive token budgets and can push important information out of the context window entirely.

    > Inference overhead and manual synthesis: Each tool call requires a full model inference pass. After receiving results, Claude must "eyeball" the data to extract relevant information, reason about how pieces fit together, and decide what to do next—all through natural language processing. A five tool workflow means five inference passes plus Claude parsing each result, comparing values, and synthesizing conclusions. This is both slow and error-prone.

    Basically, instead of Claude trying to, e.g., process data by using inference from its own context, it would offload to some program it specifically writes. Up until today we've seen Claude running user-written programs. This new paradigm allows it the freedom to create a program it finds suitable in order to perform the task, and then run it (within confines of a sandbox) and retrieve the result it needs.