Open Source C/C++ Truffle languages available?

Gerard Krol gerard at gerardkrol.nl
Fri Aug 5 20:48:07 UTC 2016


Hi Manuel,

Thanks for the link. I'm trying to get away with just disallowing the
unsafe stuff, but if I find I need to add support I'll certainly see what I
can learn from Sulong!

Regards,

Gerard

On Thu, Aug 4, 2016 at 11:10 PM, Manuel Rigger <manuel.rigger at chello.at>
wrote:

> Hi Gerard,
>
> the Cover project sounds great!
>
> We are also implementing a memory safe version of Sulong. The ideas for
> this version are described in the following paper:
> http://ssw.jku.at/General/Staff/ManuelRigger/ECOOP16-DS.pdf. Maybe you
> can apply some of the ideas from the paper to Cover, or give us feedback.
>
> - Manuel
>
> On 07/24/2016 05:07 PM, Chris Seaton wrote:
>
>> That sounds like a great project!
>>
>> I think everything that would have been useful to you from TruffleC will
>> have been re-implemented in Sulong. For example how to use our high
>> performance native function interface, how to mix managed/native memory,
>> and so on.
>>
>> TruffleC did have some interesting work to support ASTs that included
>> constructs like ‘goto’. We can explain how that works to you if you need
>> that later on.
>>
>> Chris
>>
>> On 24 Jul 2016, at 15:53, Gerard Krol <gerard at gerardkrol.nl> wrote:
>>>
>>> Hello Chris,
>>>
>>> Thanks for your quick response. I'm interested in building a C++ like
>>> language using Truffle, that would support a "sensible" subset of C++. It
>>> would use garbage collection and provide memory safety though, as well as
>>> other things that in my opinion are missing from C++. The language is
>>> called "Cover" (for now).
>>>
>>> I'm basing Cover on SimpleLanguage, and am currently using the Eclipse
>>> CDT
>>> C++ parser. Currently it is in the "hello world + loops" phase. If you
>>> want
>>> to follow along take a look at https://github.com/gerard-/cover .
>>>
>>> Regards,
>>>
>>> Gerard
>>>
>>>
>>> On Sun, Jul 24, 2016 at 3:19 PM, Chris Seaton <chris.seaton at oracle.com>
>>> wrote:
>>>
>>> Hello Gerard,
>>>>
>>>> The old C implementation was called TruffleC. It interpreted the C
>>>> language AST. Sulong interprets the LLVM IR instead. That’s not really a
>>>> huge difference in practice. LLVM IR is a bit like a linearised version
>>>> of
>>>> the AST and doesn’t include much lowering or optimisation. TruffleC uses
>>>> the same clever hacks as Sulong.
>>>>
>>>> JRuby's C extensions (which are still at an early stage) used to use
>>>> TruffleC, but they now use Sulong.
>>>>
>>>> TruffleC isn’t open source, and there aren’t any plans that I’m aware of
>>>> to open source it. Sulong is open source already. If you were happy with
>>>> the TruffleC approach there’s not any reason that I know of that would
>>>> mean
>>>> Sulong wouldn’t also be appropriate, so I see TruffleC as deprecated by
>>>> Sulong which is why there isn’t a great demand to open source it.
>>>>
>>>> Chris
>>>>
>>>> On 24 Jul 2016, at 09:12, Gerard Krol <gerard at gerardkrol.nl> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I've recently learned about Tuffle/Graal. It seems great technology.
>>>>>
>>>>> I'm interested in running C++ code on the JVM, without resorting to the
>>>>> (admittedly clever) Sulong hack. I've seen some presentations and read
>>>>>
>>>> some
>>>>
>>>>> papers about a C implementation, but that one doesn't seem to be open
>>>>> source. The same goes for the C extensions for JRuby. Is that correct?
>>>>>
>>>>> If so, what are the reasons for not open sourcing it? Any plans to do
>>>>> so
>>>>>
>>>> in
>>>>
>>>>> the future?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Gerard
>>>>>
>>>>
>>>>
>>
>


More information about the graal-dev mailing list