August 04, 2016
On Thursday, 4 August 2016 at 12:14:48 UTC, Adam D. Ruppe wrote:
> On Thursday, 4 August 2016 at 10:36:05 UTC, llaine wrote:
>> Any idea how can I call them ?
>
> Just like any other function. Consider this:

I'd like to put this example on the wiki unless you think there is a reason to not do so.
August 04, 2016
On Thursday, 4 August 2016 at 12:14:48 UTC, Adam D. Ruppe wrote:
> On Thursday, 4 August 2016 at 10:36:05 UTC, llaine wrote:
>> Any idea how can I call them ?
>
> Just like any other function. Consider this:
>
[...]
> Compile
[...]
> hi from D, Ruby user!

Thank you a lot!!! I want to use some vibe.d rendering inside Ruby on Rails, this
gives me a god starting point, for my experiments.

Regards mt.

August 04, 2016
On Thursday, 4 August 2016 at 13:14:34 UTC, llaine wrote:
> I saw that your compiling using dmd with all thoses options. Can you explain me what is the benefit of using this ?

I just don't use dub, I don't see the benefit of it, but if it works for you, cool!
August 04, 2016
On Thursday, 4 August 2016 at 14:46:33 UTC, bachmeier wrote:
> I'd like to put this example on the wiki unless you think there is a reason to not do so.

cool. I'll prolly slap it in this week in D soon too (I've been kinda short on material lately!)
August 04, 2016
On Thursday, 4 August 2016 at 17:11:04 UTC, Adam D. Ruppe wrote:
> On Thursday, 4 August 2016 at 14:46:33 UTC, bachmeier wrote:
>> I'd like to put this example on the wiki unless you think there is a reason to not do so.
>
> cool. I'll prolly slap it in this week in D soon too (I've been kinda short on material lately!)

https://wiki.dlang.org/Call_D_from_Ruby_using_FFI

Please edit as desired.
August 05, 2016
On Thursday, 4 August 2016 at 23:35:55 UTC, bachmeier wrote:
> On Thursday, 4 August 2016 at 17:11:04 UTC, Adam D. Ruppe wrote:

Happy that you guys put this on the Wiki !!




August 05, 2016
On Thursday, 4 August 2016 at 13:14:34 UTC, llaine wrote:
> Here is my repo https://github.com/llaine/ruby-dlang

FYI: to!string is kinda slow. If you want to do a fast blank, you should avoid conversions.... actually, I'm surprised it is faster than the native Ruby one at all.
August 06, 2016
A fun project might be to use D's reflection to automatically generate any C binding translators to a nice D interface and the Ruby file to access it.

I did something similar back in the day for PHP and JavaScript... it would be kinda tricky to do it with best efficiency, but getting it to work just conveniently would be fairly easy.
1 2 3
Next ›   Last »