Ruby and (digitalmars) D in combination via RubyInline?

Hi,

has anybody tried to embed some D [1] code in Ruby via RubyInline [2]?
Or other approaches to combine D and Ruby? As RubyInline supports
compiler plugins, this might be possible to do. And it might be a little
bit more fun than using C… :wink:

Cheers,

Steph.

[1] http://www.digitalmars.com/d/
[2] http://www.zenspider.com/ZSS/Products/RubyInline/

Hi,

[…] Or other approaches to combine D and Ruby? […]

Attached my work on marrying D and Ruby from like a year back.
It works, it’s kind of low level though, there could be better
bindings.

Kashia

On Oct 8, 2007, at 12:41 , Kashia B. wrote:

Hi,

[…] Or other approaches to combine D and Ruby? […]

Attached my work on marrying D and Ruby from like a year back.
It works, it’s kind of low level though, there could be better
bindings.

Correct me if I’m wrong, but that looks like a copy/paste of the
regular ruby headers with appropriate prefix code for D, yes? If so,
and if actually needed for basic functionality, I don’t really want
to wrap this up (and more importantly, maintain it) for inline.

If there is some more maintainable way, I’d be intrigued.

Hi,

Correct me if I’m wrong, but that looks like a copy/paste of the regular
ruby headers with appropriate prefix code for D, yes? If so, and if
actually needed for basic functionality, I don’t really want to wrap
this up (and more importantly, maintain it) for inline.

yes, essentially it is adapting the Ruby headers for D, making the C
symbols/constants accessable to D.

If there is some more maintainable way, I’d be intrigued.

Like I said, it’s kind of low level. There were C parsers to do that
translation automatically, but weren’t very good at it (at least when
I did my wrapper).

A better way would be to build something along the lines of:

or respectively the ruby cocoa stuff.

Have a nice day,

Kashia

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs