Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    35comments
  2. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    13comments
  3. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    12comments
  4. San Francisco Onion Futures Company(onionfutures.com ↗)
    57comments
  5. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    373comments
  6. Typesafe-computer-use drives a Mac toward a goal for 1/50th of a cent per step(github.com/awlevin ↗)
    28comments
  7. Science Is Open Software(jepedersen.dk ↗)
    30comments
  8. SDCC – Small Device C Compiler(sourceforge.net ↗)
    15comments
  9. Cloudflare Quick Tunnels(cloudflare.com ↗)
    275comments
  10. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    6comments
  11. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    1comments
  12. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    27comments
  13. Saving another 100TB of RAM(cloudflare.com ↗)
    66comments
  14. How to Write with an LLM(sockpuppet.org ↗)
    317comments
  15. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    78comments
  16. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    4comments
  17. Veronese's Dogs(publicdomainreview.org ↗)
    discuss
  18. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    96comments
  19. Goroutine Leak Profiles(go.dev ↗)
    2comments
  20. OpenJev(openjev.com ↗)
    257comments
  21. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    88comments
  22. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    67comments
  23. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    12comments
  24. The Farnese letter(simonklee.dk ↗)
    6comments
  25. Minimal Phone 2(minimalcompany.com ↗)
    215comments
  26. Stepfun Step 5 Preview (LLM): On AA Pareto frontier(artificialanalysis.ai ↗)
    1comments
  27. Xcode 27.1 Beta Release Notes(developer.apple.com ↗)
    98comments
  28. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    54comments
  29. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    97comments
  30. Cyclomatic Complexity in C#(ndepend.com ↗)
    18comments

One VM to Rule Them All [pdf]

161 pointsby 13y agolafo.ssw.uni-linz.ac.at
88 comments
13y agoHN ↗

I couldn't gather much additional information from the slides, but do I understand this correctly that this substrate vm is an alternative jvm implementation that is faster and requires less memory? Would it be possible to port the usual jvm projects like Clojure or Scala to this in order to claim the same speed/memory gains as the described ruby implementation?

13y agoHN ↗

The speed / memory gains seem to be because of optimising away the dynamic type overhead.

So Clojure yes but Scala, no.

13y agoHN ↗

Now if the SVM is to have a very fast FFI I think it would have the potential to be awesome. Especially as the SVM seems to be easily embeddable...

13y agoHN ↗

Some seriously impressive numbers. Hope they take this further :)

13y agoHN ↗

I hope this is not yet another project that holds a ton of promises and never end up delivering cause it looks absolutely awesome on paper.

13y agoHN ↗

Definitely an interesting project.

It would be interesting to compare this to parrot[1], which had similar goals.

Javascript and the JVM are currently occupying this niche to a certain degree, although neither were originally designed for this niche.

1: http://www.parrot.org/

13y agoHN ↗

Anyone having an idea why parrot is not more popular?

13y agoHN ↗

Because it's associated with Perl 6 which is commenly believed to be vaporware (yes, even if there have been releases). And because they want to make it so perfect that people can't remember why they used to be excited about it.

13y agoHN ↗

FWIW, the problem with their having been "releases" is that there is no reference release; Larry Wall is uninterested in doing an implementation.

13y agoHN ↗

Because it's associated with Perl 6 which is commenly believed to be vaporware

Or rather just "because it's associated with Perl".

13y agoHN ↗

Because it's not really a good VM.

It's full of good ideas, but also full of cruft and years of technical debt. It doesn't have a JIT compiler, (nearly) no async IO, threading support is pretty new and not battle-tested nor documented very well.

13y agoHN ↗

Actually, that's part of the issue. Most of Parrot's semantics are exactly those of Perl 6 (right down to the opcodes for Boolean testing), and those don't get along well with most languages.

13y agoHN ↗

Rakudo on the JVM does use a JIT compiler. Surprise!

13y agoHN ↗

The fact that Rakudo on the JVM can take advantage of the JIT to optimize simple math in tight loops fails to impress me, but I suppose it's one more half-implemented feature you can tick off the back of the box, so hooray.

13y agoHN ↗

This looks interesting, but I am generally worried about something being owned by Oracle. Simple example; I own an Openpandora. I wrote a live coding environment in Java with a very basic, lispy language at it's core. Using any free Java implementation it either; did not start (core dump; suspect; not enough memory to get even the VM up) or ran very (unusable) slow. With the Java 7 closed source ARM version from Oracle; runs fast (just as smooth as on my Macbook) and uses very little memory.

I have the same experience on x86, but because of the abundance of resources it's less noticable.

I don't insist on everything being open source (completely), but base languages/VMs should be. Unless something about this changes, I'm not using anything owned by Oracle again.

13y agoHN ↗

probably oracle has now patents on ecery tiny detail...

13y agoHN ↗

Yes. The first slide basically guaranteed that I will never look into this project.

The risk of touching anything Oracle-related is not worth the potential benefit.

13y agoHN ↗

How very open-minded of you. At least consider the project on it's metrics, not on your distaste for a particular corporation.

13y agoHN ↗

Being under control by Oracle is part of it's merits, and it counts massively negatively for a lot of us.

13y agoHN ↗

On HN perhaps, but not on the big corporations league.

13y agoHN ↗

After hearing how Solaris support when down the drain with Oracle stewardship, I'd say staying away from anything Oracle sounds reasonable. At least if it isn't under something like GPL with a patent grant.

(Yes, the fact that they screwed minor Solaris customers does not translate to them suing over IP -- but then again, they already did the last part to).

Oracle is probably a great company to invest in; they make a lot of money -- but that alone doesn't make them a good stakeholder in your core business. I wouldn't want to partner with McDonalds either.

13y agoHN ↗

This is actually cool, but I'll wait for an open-source, patent-troll-protected, implementation. Oracle can even try the Microsoft solution of promising never to sue you for reimplementing their stuff, but, if I don't trust Microsoft to keep their promises, why would I trust Oracle?

BTW, Am I the only one who noticed the Lord of the Rings theme?

13y agoHN ↗

The problem is that nobody trusts Oracle. Have a look at what happened to Google. Their code didn't even originate from Oracle and they still got sued for made-up, bullshit reasons.

It of course sucks for those who invested their time in hacking the Oracle stack, but I think many people these days outside the Oracle bubble see Oracle as a dead-end.

Most people don't have a war chest full of money to hire the best lawyers like Google to protect them against baseless lawsuits.

Anyway, even from a technical point of view, things like Graal and Truffle are terrible workarounds and I prefer just fixing the things which are broken in the first place. Seeing that this will never happen at Oracle, I'll just work on code were the maintainer/owners are not so openly hostile.

13y agoHN ↗

But you see, this is exactly the wrong kind of conversation. You can't say "nobody trusts Oracle" while Oracle is bigger and more profitable than Google, and while the majority of important software worldwide is built on Oracle technology. Oracle won't pay attention to this kind of statement because it's obviously false. The truth is that most companies do trust Oracle.

What we can and should say is that Oracle is losing the trust of the Silicon Valley startup crows, and that this is a very important population segment. It's like a candidate being elected but gradually losing the young vote – it's a bad sign that Oracle would do well to consider.

13y agoHN ↗

There's a lot that can be said about Oracle's stewardship of Java, what it's like and how it should improve; it's a very important conversation. But the tone of your comment (and some of its child comments) seem to take the discussion in a misinformed direction. I don't know how much of the world's important server-side software is written in Java (or runs on the JVM), but I wouldn't be surprised if it's around 80%. The fact of the matter is that aside from small-to-medium startups' servers, the world's server-side software is mostly Java. Almost all non-embedded, large defense software is Java; almost all banking software is Java; Facebook, Twitter, LinkedIn and Google are mostly Java/JVM shops (when it comes to their infrastructure software).

Saying "I'm not using anything owned by Oracle" is something most serious server-side developers just can't say, because, frankly, there's little choice. If you require high-performance, multi-million-LOC software developed by a large team, you would be quite foolish to choose anything but the JVM. So we should certainly discuss Oracle's behavior, but pretending that we can avoid Oracle software like it was a specific linux distribution is a misrepresentation of reality.

13y agoHN ↗

Meaning the world is in corporate hands,sad enough.

13y agoHN ↗

The world is in corporate hands, but Oracle and the JVM are far from being the worst of it. At least all Oracle wants is your money, unlike a younger kind of mega-corporations that will give you services free of charge only to hold your most secret information – e-mail, photos, current location, documents and more. Oracle can be infuriating, but it's not scary because it can be easily understood. What companies like Google want, well that's far scarier. It's also a completely different discussion. :)

13y agoHN ↗

True, true, and to hell with it I even like the JVM. I just don't differentiate google or facebook from oracle, they're equally "corporatish" for me :)

13y agoHN ↗

Oracles flagship product can be replaced by Postgres? No?

ps. Why compare with top 3 american internet giants, what's the point?

13y agoHN ↗

You are correct that the JVM is ubiquitous in server software but not nearly as much as you assume and there has been a shift away from it in recent years for reasons having nothing to do with Oracle etc. I've been designing high-performance server engines since the 1990s and have watched the architectures and tool chains evolve.

Five years ago most new server engine development was done on the JVM. Since then there has been a shift toward new development being done in C++ such that the vast majority of new server engines I know about are being developed in C++ (mostly C++11) across a diverse range of companies. The reasons are practical and reflect the evolution of hardware.

The short version is that on current hardware C++ is much more efficient, both in terms of throughput per core and can achieve integer factor improvements in absolute performance relative to the JVM. Most of the differences are boil down to two things. First, server performance tends to be bound by memory performance and the JVM is quite a bit worse than what is easily achievable in C++. Second, an optimal high-performance server engine design in C++ is difficult to express within the JVM so basic design of the engine kernel tends to be less efficient as well.

In large-scale systems, that starts to add up in terms of power and hardware consumption and companies are more sensitive to this than they used to be. C++ currently offers significantly better characteristics and using less hardware to do it.

13y agoHN ↗

I thought I knew most of what is hot and fresh on the software development front, but I've never heard of any "server engines." Mind explaining what it is? Virtualization containers perhaps?

13y agoHN ↗

A "server engine" (usually called a kernel actually) is like a userspace operating system kernel that is purpose-built for a class of server workloads and attempts to optimally manage system resources for that workload. The server application is built on top of that kernel. When people refer to e.g. "database kernels", this is what they are referring to. It reimplements the operating system resource management services through the OS APIs.

Writing an excellent server kernel requires a high level of technical ability and quite a bit of low-level code since you have to reimplement most of the operating system resource management services most developers take for granted. Few pieces of open source server software are built on userspace kernels and the ones that do like PostgreSQL are (currently) only partial kernels that still rely on the OS to do significant things a full kernel would reimplement. A properly designed database kernel, for example, is at least 100k LoC of low-level C/C++ and that is before you actually write the server application that sits on top of it. I've designed and written kernels for both database engines and network engines, it is not trivial.

So why would you want to go through all this effort instead of writing to the standard POSIX APIs directly? Because performance and scalability. For example, a well-designed disk buffer and scheduler for a database kernel can easily triple the I/O throughput possible with a highly tuned POSIX implementation. A lot of locking and blocking, both explicit and implicit in the OS, become unnecessary. Certain kinds of distributed system problems become easier to solve because you can adaptively schedule data flows at a fine-grained level. One of the reasons Oracle and DB2 scale so well and get such high throughput is that they are built on highly optimized userspace kernels.

Virtualization actually degrades the performance of high-performance server systems in part because the hypervisor acts as a primitive operating system underneath the operating system the server kernel can see. This does not impact non-kernel based servers as much.

13y agoHN ↗

so are you saying that running Oracle in a VM will kill its performance? By what factor would you expect?

13y agoHN ↗

I think the key point you are missing is developer productivity.

Every potential performance gain C++ might have is completely negated by having to touch that complete clusterfuck of a language.

13y agoHN ↗

In the really large server-side systems we're talking about here (banks, defense, etc.) both developer productivity and maximum speed rank way, way below other factors, such as having long-lived processes.

13y agoHN ↗

Java's not a clusterfuck? I'll take the clusterfuck that's not controlled by a creepy asshole who thinks the NSA is essential and says stupid shit like "Who's ever heard of government misusing information?"

13y agoHN ↗

I agree with you, but as I can choose the software I create and with what I'm not very interested in working with Oracle stuff.

I worked with Java since 0.1 in the enterprise world for over 10 years and with Clojure & Scala I would continue with it, but I don't trust Oracle to do the right thing in releasing source at the same pace or at all for some critical perf/scaling features and I tend to think thats wrong.

How does OpenJDK handle serverside compared to the Oracle binaries these days?

13y agoHN ↗

I don't know how common it is in the industry, but it's a damn fine piece of software. It's also under Oracle's control, though.

13y agoHN ↗

Yes, but it's GPL right? So if it's a really fine piece of software, it can be forked (not arguing if that would be good or not).

Edit: and indeed it would be nice to know if a company like Google etc uses OpenJDK or the Oracle one.

13y agoHN ↗

I think Google already had a lot fun with Oracle while not using their code.

If you fork, be prepared for a patent-infringement lawsuit as soon as you earn some money with it.

I'm pretty sure most companies have realized that staying the hell away from Oracle isn't a stupid move.

13y agoHN ↗

Yeah, but couldn't that happen with other open source products as well? Serious question, not sure if that happened or not.

13y agoHN ↗

Anybody can sue for anything. Google won that lawsuit.

13y agoHN ↗

Actually, most companies that aren't Google (finance, government, military, enterprise) realized that simply sticking with Oracle is even a better move. I don't know if you know this, but Oracle is making more money (profit) than Google (Oracle is also a much larger company than Google). They wouldn't be doing that if people were staying away from them. Lawsuit aside, even Google itself (and Facebook, and Twitter) runs most/much of its software on Oracle technology, so I guess they're doing something right. It's just that HN is skewed in favor of smaller-scale software. When you're in the major league, Java is often the only smart option.

13y agoHN ↗

you would be quite foolish to choose anything but the JVM.

Do you have technical reasons for saying that, or only political ones?

13y agoHN ↗

This is amazing.

First because it means we can have _fast_ versions of existing languages.

Second because we can interact with the _huge_ amount of JVM libraries (this is a very big deal).

Third because SubstrateVM seem to be enabling the things I really like about Go: low memory footprint, fast startup time, and easy deployment (give me a binary that does everything I need).

They just need to make sure native interop is easy (both C and C++), and we have a winner!

13y agoHN ↗

Neat. However, I had a hard time quieting my Algebra teacher's memory from tut-tutting the example's lack of the other quadratic root.

13y agoHN ↗

And the formula given has at least two bugs, I think. They give it as

     -b + (Math.sqrt(b**2 - 4*a*c)) / 2*a

Shouldn't it be

    (-b + (Math.sqrt(b**2 - 4*a*c))) / (2*a)

(still ignoring the other root, of course).

13y agoHN ↗

Even wierder, the tree in their presentation seems to represent:

     -b + (Math.sqrt(b**2 - 4*a*c)) / (2*a)

Which is neither the formula we'd expect nor the formula they show.

13y agoHN ↗

Apologies for my maths - I think I simplified the serialised expression to reduce space on the slide or something like that, and broke it in the process.

13y agoHN ↗

I understand you're an insider, so can you please explain what is the actual breakthrough compared to the previous attempts to make a faster Ruby?

And how your approch fares compared to the state of art JIT implementations? Can your solution produce a faster Lua than LuaJIT, for example? Why starting with Ruby for which you implement 40%? And what have you used from JRuby?

13y agoHN ↗

There are several techniques working together here. The Truffle system allows the running program to gradually become statically typed over time (slide 9), where as JRuby has to go through a generic IRubyObject type for almost everything. Also, where JRuby has to continually check that methods have not been redefined, we never check and instead we go in and stop the running machine code when a method is redefined (slide 34).

The advantage of running on the Substrate VM is that, unlike JRuby, our startup time is about the same as MRI (slide 19).

There are several languages using this system, both by us (JS, Ruby) by academic partners (Python, R) and others (Smalltalk is one I know of). This talk just used Ruby as an example.

We used the parser from JRuby.

13y agoHN ↗

How is this related to the JVM? I understand there's the compilation/type-information-flow part, and the exposing the JVM's internals part. How does it all fit together?

13y agoHN ↗

I fail to see the difference between this and LLVM. Oh yes LLVM is BSD license!

13y agoHN ↗

LLVM isn't focused on JIT compilation or GC. Obviously you can implement both using LLVM, and I think there is still a rudimentary JIT built in, but if your language wants to support cross-platform binary distribution, runtime optimization or world-class GC, you will have a lot more work ahead of you with LLVM.

13y agoHN ↗

So what is the Substrate VM? The main presentation appears to be about Truffle, a language-implementation framework, which looks neat by itself.

The "Substrate VM Execution Model" slide talks about Ahead Of Time Compilation, which makes it sound like it might actually be the LLVM-based Substrate VM: http://vmkit.llvm.org. Alternatively, could it be a version of Maxine?

AOT as an option certainly sounds interesting...

13y agoHN ↗

Graal is Maxime's successor.

Oracle is planning eventually to replace the C++ based JIT with Graal in some version following 8.

13y agoHN ↗

No ByteCode in between, sounds a lot like v8, and incidentally that guy works on V8 previously.

13y agoHN ↗

The SVM here is unrelated to the LLVM project. The SVM allows you to take a Java program (with some restrictions) and turn it into single static binary that is the JVM, libraries and the program all compiled and optimised together. So you can compile our Ruby implementation and get a ruby binary just like MRI - no JVM needed at runtime. Then startup time is about the same as MRI.

13y agoHN ↗

Which representation is used to produce the static binary? Is it a native binary? What is the backend? Gcc, LLVM?

13y agoHN ↗

It's just a Java program that writes bytes to a file in the object format and machine code of whatever system you're targeting. It doesn't use any other assembler or compiler apart from Graal (which is also in Java).

13y agoHN ↗

For those looking for alternatives to an Oracle implementation of this concept there is http://www.ffconsultancy.com/ocaml/hlvm/ Which uses LLVM underneath.

Caveat: I've not used HLVM or looked at its implementation, but the scope seems very similar.

13y agoHN ↗

First Time there is any public numbers on Topaz, the RPython / PyPy implementation of Ruby.

Note: Only Two benchmarks presented in the Paper, and as with any benchmarks take it with a grain of x.

If it wasn't for JVM Truffle, Topaz is the fastest implementation of Ruby. And by a large margin. Assuming Ruby 2.0 was 5x faster then Ruby 1.8, Topaz is 8-10x faster then Ruby 2.0!

And Truffle is about 1.5-2.5x faster then Topaz.

Now i want to know would there be a better faster FFI for SVM.

And how far are we from seeing release of SVM?

13y agoHN ↗

Huh? Where is there any benchmark of Topaz in the paper? All there is involving Topaz is the percentage of RubySpec passed — nothing about performance!

13y agoHN ↗

um......Its right there in the performance chart?

13y agoHN ↗

How the hell did I miss that when I looked at that before? Ignore me.

13y agoHN ↗

LOL, i cant wait to see all these coming, Topaz Ruby 2.1 Rubinius 2.0 And this Ruby with SVM

13y agoHN ↗

Looks interesting. Is this anything more than an internal research project?

From the second slide: "The following is intended to provide some insight into a line of research in Oracle Labs."

13y agoHN ↗

Looks interesting -- too bad it's controlled by a creepy asshole who thinks the NSA is essential and says stupid shit like "Who's ever heard of government misusing information?"

13y agoHN ↗

If only it wasn't oracle. . .

Then i'd actually read this powerpoint!

But in all seriousness if this becomes like LLVM and well developed it could be extremely helpful. .

However, i'm sure Oracle would find an awesome way to make it "oracle enterprise trademarked" and make it into some silly product that aggravates more people than even java which might be impressive!

13y agoHN ↗

I thought the Ruby VM already did invalidate() on things rather than checking, and that was a common practice on dynamic languages (doesn't the Objective-C runtime do this also?). I am really excited for this but agree that it is bittersweet the project is owned by Oracle.