I love OCaml, which this virtual machine says it is based upon, but doesn't it have issues with multi-core processors? That is, doesn't it suffer from a limitation due to its garbage collector?
HLVM -- the High-Level Virtual Machine
11–20 of 34 posts
Re: HLVM -- the High-Level Virtual Machine
#12""" The ability to interoperate safely and at a high-level between different languages, from managed C++ to F#, has greatly accelerated development on the Microsoft platform. The resulting libraries, like Windows Presentation Foundation, are already a generation ahead of anything available on any other platform. Linux and Mac OS X do not currently have the luxury of a solid foundation like the CLR. Consequently, they…
Making portable applications isn't a solved problem. There's Java. It's decent, especially with Clojure and other JVM languages, but I find the idea of a more powerful language (like OCaml) not without merits. Clojure has run into a lot of problems due to the JVM, probably the most famous one being the lack of tail call optimization.
Re: HLVM -- the High-Level Virtual Machine
#13I love OCaml, which this virtual machine says it is based upon, but doesn't it have issues with multi-core processors? That is, doesn't it suffer from a limitation due to its garbage collector?
I have no idea, but I've just upvoted you back to 1. If someone knows more / better please post here and explain rather than anonymously downvote, which doesn't explain anything to anyone. [edit: ah, ok, to expand on what 45g said, ocaml is used to build the tools, but anything that targets the HLVM will end up using LLVM for runtime code generation - so it will either compile to assembly, or use a JIT VM. either way…
Re: HLVM -- the High-Level Virtual Machine
#14""" The ability to interoperate safely and at a high-level between different languages, from managed C++ to F#, has greatly accelerated development on the Microsoft platform. The resulting libraries, like Windows Presentation Foundation, are already a generation ahead of anything available on any other platform. Linux and Mac OS X do not currently have the luxury of a solid foundation like the CLR. Consequently, they…
Making portable applications isn't a solved problem. There's Java. It's decent, especially with Clojure and other JVM languages, but I find the idea of a more powerful language (like OCaml) not without merits. Clojure has run into a lot of problems due to the JVM, probably the most famous one being the lack of tail call optimization.
It starts in the interaction model. I like what Apple is doing with this (think iWork on the Mac and iWork on the iPad), and I'd hate to see that go away.
You could argue all you want that the Windows 7 desktop is not that different from the MacOS 10.5+ desktop, not that different from the Web interaction model; you'd have your points and I'd have mine. My main one is that if it feels different, then it is (a bit of a duck-typing mindset, understandably).
And if it is different, then it requires fundamentally different software application, even if the problem domain you're tackling is the same. Some low-level things might be portable, but many won't be; whatever's closer to hardware (audio, storage, search, video, rasterization) is more likely to be reasonably and defensibly portable.
Everything else I want to be specific to the interaction model of a given device, within reason.
Objective-C and OCaml are fairly high-level, but that's not what they are going after here; they are going after the likes of WPF and Cocoa and Cocoa Touch, general-purpose high level libraries of code. And that's exactly what I would not want to ever happen.
Let's not go there. Because it would be terribly silly.
Re: HLVM -- the High-Level Virtual Machine
#15I'm curious: what about the JVM?
I know that I could add options for .jar files to automatically invoke the JVM, but then not all use a Main class, so that's not a guaranteed fix.
Maybe with the new generation of "cool" languages for the JVM we may start to see some change on this front. Oracle may have some interesting ideas as well, as new "owners" of the Java platform...
Re: HLVM -- the High-Level Virtual Machine
#16Interesting exercise, but of little use: this is solving (well, trying to) a political problem with more technology. JVM is already on the table, let's use that.
Re: HLVM -- the High-Level Virtual Machine
#17Re: HLVM -- the High-Level Virtual Machine
#18> If you would like to keep up to date with respect to HLVM development, please subscribe to The OCaml Journal.
And when I go to read the online documentation?
> The design and implementation of this high-performance garbage collected virtual machine is described in detail in the OCaml Journal articles "Building a Virtual Machine with LLVM" from January to March 2009.
If you have to subscribe to a pay journal to learn all about it, chances are very good it isn't going anywhere at all.
Also, as something of a counterpoint to the whole "CLR missing on Linux or Mac OSX"... I've not run into many CLR compatibility issues with Mono at all. Also, they're not just doing the CLR; for example they've added first-class continuations (yes, that's right: call/cc!) to the mono VM; for language implementers that's rather attractive:
Re: HLVM -- the High-Level Virtual Machine
#19I'm curious: what about the JVM?
Kind of like Java in general, the JVM sits in the middle ground. LLVM is a good starting point for building low level languages (although nothing prevents you from writing high level languages in it, you just have write more). The HLVM is supposed to be a good starting point for building high level languages with things like garbage collection, closures, tail call elimination, etc. The JVM isn't the fastest for low l…
The further you move away from the Java typesystem or execution model, the less fun your life will be and the fewer benefits you'll get from the JVM: moving to dynamic typing will cost you a large amount of performance, for example, and you'll have to fight the Java type system a fair amount. I can only imagine what it would mean to do lazy-evaluation in a JVM language.
If it matches what you're trying to do, though, it's really a great platform: the bytecode format is pretty simple and easy to learn, the JVM runs of pretty much any platform you need, and it does a huge amount of optimization for you. If you're doing a statically-typed language and compiling down to Java-like bytecode (as opposed to handling dispatch yourself, as you have to do in a dynamically-typed language), you also basically get debuggers and profilers for free.
It's definitely a little weird, though, that they'd set up the motivation for HLVM as due to the weaknesses of the CLR's cross-platform capabilities, without mentioning the JVM at all, given that the JVM was, in spirit at least, the precursor to the CLR and still the most widely-used higher-level VM and one that works basically everywhere.
Re: HLVM -- the High-Level Virtual Machine
#20Earlier quoted context omitted.
Making portable applications isn't a solved problem. There's Java. It's decent, especially with Clojure and other JVM languages, but I find the idea of a more powerful language (like OCaml) not without merits. Clojure has run into a lot of problems due to the JVM, probably the most famous one being the lack of tail call optimization.
Why do you need HLVM to do this? OCaml already runs on multiple platforms, so all that's needed is some library work. The same is true for Haskell, Standard ML, Lisp, and many other languages. If you want to write languages for multiple platforms HLVM sounds useful. If you want to write portable programs, why not work on improving the libraries available for an existing language?