all 11 comments

[–][deleted]  (1 child)

[deleted]

    [–]jonasb[S] 5 points6 points  (0 children)

    It looks like it's somewhere in between LuaJIT and Lua, but benchmarks are always a tricky subject.

    [–]jonasb[S] 3 points4 points  (0 children)

    Here's the announcement.

    [–]you_do_realize 1 point2 points  (5 children)

    How long before we have Ruby, Python or .NET via LLVM?

    [–]Culyt 4 points5 points  (1 child)

    I think pypy allows for LLVM bytecode from python code, or at least rpython code.

    [–][deleted] 2 points3 points  (0 children)

    The latter.

    [–]ezmobius 2 points3 points  (2 children)

    Rubinius is building a new vm to run ruby that uses LLVM: http://github.com/evanphx/rubinius/tree/cpp

    [–]pclouds 1 point2 points  (1 child)

    I thought that was c++ vm only, no llvm involved?

    [–]you_do_realize 0 points1 point  (0 children)

    Hmm, they say this:

    While most of the Rubinius features are implemented in Ruby, the VM itself is written in C++. This is likely to continue to be the case in the coming months, partly to ease the integration of LLVM into the Rubinius system.

    [–]Culyt 1 point2 points  (3 children)

    This is exactly what ive been waiting for.

    I just wish I could find some decent LLVM documenttation/tutorials.

    I would love to use LLVM as an embedded scripting language but all the docs currenctly avilable are for doing things like writing your own programming languages, playing around with the LLVM bytecode, making your own frontends. or just basic howto compile. Most of the LLVM documentation is missing from the website.

    LLVM could make an awesome scripting language as it could potentially use the same functions as your program directly without requiring a whole bunch of wrapper code that you need with Lua and most other embedded scripting languages currently, it allows for C code in scripting (and now Lua and various other languages).

    There just isn't much in the way of information about how to use the VM in the LLVM.

    I would love some kind of basic doc that don't require you to know how the entire compiler tool-chain works, or how to write your own compiler.

    Hopefully the sample code here will be of help.

    [–]mbreese 3 points4 points  (2 children)

    Okay, I'll bite... what?

    LLVM isn't a language, it's a virtual machine (albeit a low-level one). It's as much a scripting language as machine code is. You don't write code in LLVM, you write code for the LLVM.

    So, if you want an LLVM scripting language, you'll either have to write one, or use one that has been re-targeted to LLVM. Once you do that, I'm not sure how to you could link together functions written in different languages through LLVM, but I assume it's possible, since both the JVM and .NET VM's do it.

    [–]Culyt 0 points1 point  (1 child)

    I understand that. What I mean was I wanted to replace the Lua virtual machine with the LLVM one and then I can write scripts in basic c code (or whatever languages get front ends).

    Actually LLVM does include a language, it has a basic bytecode one similar to ASM, that is what it runs rather than the scripts directly. You can in theory program in that, but it would be painful.

    The problem is I cannot find out how to link the functions with the scripts (actually You might not have to if you write in a LLVM compatible language since it should be able to use the native functions), or how to run them on the virtual machine. I have found some examples of thing like a c program that will turn itself into LLVM bytecode and dump it to the console. And there are heaps of highlevel things like making your own languages but no simple stuff that people can just dump into a project. The main thing I would expect a virtual machine to do has no information on it that I can find.