Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.ruby

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 02-07-2010, 09:00 PM
Schala Zeal
Guest
 
Posts: n/a
Default C embed assistance

I was wondering if there was a site with reliable documentation covering
the C embed API? The one on ruby-lang.org is near useless as it was
simply generated without commentary. I could have sworn there was
another site with documentation that explained the stuff and not just
display the declarations. I forgot which site that was and I forgot what
terms I put in Google to find it.
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 02-07-2010, 10:08 PM
Christoph Kappel
Guest
 
Posts: n/a
Default Re: C embed assistance

Schala Zeal wrote:
> I was wondering if there was a site with reliable documentation covering
> the C embed API? The one on ruby-lang.org is near useless as it was
> simply generated without commentary. I could have sworn there was
> another site with documentation that explained the stuff and not just
> display the declarations. I forgot which site that was and I forgot what
> terms I put in Google to find it.


The word 'reliable' is a bit problematic in this case, no docs I found
so far are something I would like to call that. I had a hard time to
figuring the stuff out to embed ruby into my window manager
(http://subtle.subforge.org).

During the time I learned a lot from following urls:

http://www.eqqon.com/index.php/Ruby/....9_C_Extension
http://metaeditor.sourceforge.net/embed/
http://banisterfiend.wordpress.com/

I started to write down common pitfalls with embedding ruby today
(http://subforge.org/blogs) and will also help if you have any questions
I can answer.
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #3 (permalink)  
Old 02-07-2010, 10:53 PM
¼ÖèÉ
Guest
 
Posts: n/a
Default Re: C embed assistance

I think the book Programming Ruby 1.9 from the pragmatic programmers
will help a lot.

And from my own experience, it is important to understand that writing
ruby extensions and embedding ruby interpreter are the same in
reality.

2010/2/8 Christoph Kappel <unexist@dorfelite.net>:
> Schala Zeal wrote:
>> I was wondering if there was a site with reliable documentation covering
>> the C embed API? The one on ruby-lang.org is near useless as it was
>> simply generated without commentary. I could have sworn there was
>> another site with documentation that explained the stuff and not just
>> display the declarations. I forgot which site that was and I forgot what
>> terms I put in Google to find it.

>
> The word 'reliable' is a bit problematic in this case, no docs I found
> so far are something I would like to call that. I had a hard time to
> figuring the stuff out to embed ruby into my window manager
> (http://subtle.subforge.org).
>
> During the time I learned a lot from following urls:
>
> http://www.eqqon.com/index.php/Ruby/....9_C_Extension
> http://metaeditor.sourceforge.net/embed/
> http://banisterfiend.wordpress.com/
>
> I started to write down common pitfalls with embedding ruby today
> (http://subforge.org/blogs) and will also help if you have any questions
> I can answer.
> --
> Posted via http://www.ruby-forum.com/.
>
>


Reply With Quote
  #4 (permalink)  
Old 02-08-2010, 12:03 AM
Schala Zeal
Guest
 
Posts: n/a
Default Re: C embed assistance

è´¾æž* wrote:
> I think the book Programming Ruby 1.9 from the pragmatic programmers
> will help a lot.
>
> And from my own experience, it is important to understand that writing
> ruby extensions and embedding ruby interpreter are the same in
> reality.
>
> 2010/2/8 Christoph Kappel <unexist@dorfelite.net>:


I guessed that much. I mean if a language can be extended by C, C should
be able to use it embedded.
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #5 (permalink)  
Old 02-08-2010, 09:03 AM
Brian Candler
Guest
 
Posts: n/a
Default Re: C embed assistance

Schala Zeal wrote:
> I was wondering if there was a site with reliable documentation covering
> the C embed API? The one on ruby-lang.org is near useless as it was
> simply generated without commentary. I could have sworn there was
> another site with documentation that explained the stuff and not just
> display the declarations. I forgot which site that was and I forgot what
> terms I put in Google to find it.


This one?

http://www.ruby-doc.org/docs/Program.../ext_ruby.html

That's from a very old version of the book (covering ruby 1.6.8) but the
fundamentals are the same. Or you can buy a later version as PDF or dead
tree.

--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #6 (permalink)  
Old 02-08-2010, 09:09 PM
Schala Zeal
Guest
 
Posts: n/a
Default Re: C embed assistance

How so?
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #7 (permalink)  
Old 02-08-2010, 09:38 PM
Tony Arcieri
Guest
 
Posts: n/a
Default Re: C embed assistance

[Note: parts of this message were removed to make it a legal post.]

Unless there's a magic API I'm not aware of, Ruby doesn't have anything like
this. MRI uses globals which can make embedding difficult and will
certainly prevent you from running multiple copies of the same VM within a
single process image.

I know people using an embedded Ruby interpreter, and the general take is:
not fun.

If you really want to use Ruby within your application, I'd suggest starting
a copy of the Ruby interpreter in another process and talking over pipes.

On Sun, Feb 7, 2010 at 3:00 PM, Schala Zeal <schalaalexiazeal@gmail.com>wrote:

> I was wondering if there was a site with reliable documentation covering
> the C embed API? The one on ruby-lang.org is near useless as it was
> simply generated without commentary. I could have sworn there was
> another site with documentation that explained the stuff and not just
> display the declarations. I forgot which site that was and I forgot what
> terms I put in Google to find it.
> --
> Posted via http://www.ruby-forum.com/.
>
>



--
Tony Arcieri
Medioh! A Kudelski Brand

Reply With Quote
  #8 (permalink)  
Old 02-09-2010, 01:59 AM
Schala Zeal
Guest
 
Posts: n/a
Default Re: C embed assistance

You know... I was considering right now about using C# instead of C/C++.
My main target audience use Windows. For Linux/Mac, perhaps Mono, but
I've only used version 1.0 of that for development several years ago and
it was rather slow, compiling and running.

Does anyone have an opinion on this?
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #9 (permalink)  
Old 02-09-2010, 02:08 AM
Seebs
Guest
 
Posts: n/a
Default Re: C embed assistance

On 2010-02-09, Schala Zeal <schalaalexiazeal@gmail.com> wrote:
> You know... I was considering right now about using C# instead of C/C++.
> My main target audience use Windows. For Linux/Mac, perhaps Mono, but
> I've only used version 1.0 of that for development several years ago and
> it was rather slow, compiling and running.
>
> Does anyone have an opinion on this?


I would not consider C# to be portable past Windows, which for me would
be a dealbreaker. (Also, if I had my choice of companies on whose code
base and API to bet my future, it would not be Microsoft. They have too
often said "here is the One True API, code to this and we'll support it
forever" and then killed it a year or two later.)

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
Reply With Quote
  #10 (permalink)  
Old 02-09-2010, 02:17 AM
Tony Arcieri
Guest
 
Posts: n/a
Default Re: C embed assistance

[Note: parts of this message were removed to make it a legal post.]

On Mon, Feb 8, 2010 at 7:59 PM, Schala Zeal <schalaalexiazeal@gmail.com>wrote:

> You know... I was considering right now about using C# instead of C/C++.
> My main target audience use Windows. For Linux/Mac, perhaps Mono, but
> I've only used version 1.0 of that for development several years ago and
> it was rather slow, compiling and running.
>
> Does anyone have an opinion on this?
>


I hear IronRuby's fairly good (i.e. Ruby for .NET), and it would make
integration a hell of a lot easier than trying to integrate MRI into your
C/C++ code.

--
Tony Arcieri
Medioh! A Kudelski Brand

Reply With Quote
  #11 (permalink)  
Old 02-09-2010, 02:21 AM
Schala Zeal
Guest
 
Posts: n/a
Default Re: C embed assistance

Seebs wrote:
> On 2010-02-09, Schala Zeal <schalaalexiazeal@gmail.com> wrote:
>> You know... I was considering right now about using C# instead of C/C++.
>> My main target audience use Windows. For Linux/Mac, perhaps Mono, but
>> I've only used version 1.0 of that for development several years ago and
>> it was rather slow, compiling and running.
>>
>> Does anyone have an opinion on this?

>
> I would not consider C# to be portable past Windows, which for me would
> be a dealbreaker. (Also, if I had my choice of companies on whose code
> base and API to bet my future, it would not be Microsoft. They have too
> often said "here is the One True API, code to this and we'll support it
> forever" and then killed it a year or two later.)
>
> -s


MFC, Win32, and DirectX have been around for a while, no?
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #12 (permalink)  
Old 02-09-2010, 02:26 AM
Schala Zeal
Guest
 
Posts: n/a
Default Re: C embed assistance

Tony Arcieri wrote:
> On Mon, Feb 8, 2010 at 7:59 PM, Schala Zeal
> <schalaalexiazeal@gmail.com>wrote:
>
>> You know... I was considering right now about using C# instead of C/C++.
>> My main target audience use Windows. For Linux/Mac, perhaps Mono, but
>> I've only used version 1.0 of that for development several years ago and
>> it was rather slow, compiling and running.
>>
>> Does anyone have an opinion on this?
>>

>
> I hear IronRuby's fairly good (i.e. Ruby for .NET), and it would make
> integration a hell of a lot easier than trying to integrate MRI into
> your
> C/C++ code.


Nice! Uhm... I used Allegro (http://alleg.sf.net) for my gaming API, and
well... what would be a good choice for .NET? There's likely no DirectX
for Mono, and Allegro's .NET binding is outdated.
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
  #13 (permalink)  
Old 02-09-2010, 04:06 AM
Seebs
Guest
 
Posts: n/a
Default Re: C embed assistance

On 2010-02-09, Schala Zeal <schalaalexiazeal@gmail.com> wrote:
> MFC, Win32, and DirectX have been around for a while, no?


Win32 is old news, it's been .NET for a while. Before that it was OS/2 that
was the next target that all MS-platform developers should be looking at.
And I think there's been more shifts than that, but some are not especially
visible from the outside.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
Reply With Quote
  #14 (permalink)  
Old 02-10-2010, 01:25 PM
Marnen Laibow-Koser
Guest
 
Posts: n/a
Default Re: C embed assistance

Schala Zeal wrote:
> You know... I was considering right now about using C# instead of C/C++.
> My main target audience use Windows. For Linux/Mac, perhaps Mono, but
> I've only used version 1.0 of that for development several years ago and
> it was rather slow, compiling and running.
>
> Does anyone have an opinion on this?


Use something portable. It will make it easier to provide other
versions later. That probably means not C#, unless Mono will work for
what you're doing.

Best,
--Â*
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
--
Posted via http://www.ruby-forum.com/.

Reply With Quote
 
Reply

Popular Tags in the Forum
assistance, embed

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
embed python dynamically naveen Newsgroup comp.lang.python 2 11-26-2009 12:57 AM
Re: getting error "cant find package snack" while trying to embed atcl script in a browser using tcl/tk browser plugin Larry W. Virden Newsgroup comp.lang.tcl 0 08-07-2009 12:42 PM
The nomination of one of the best stores in New Jersey - New JerseyLife Magazine maizipet200@yahoo.cn Newsgroup comp.databases.informix 0 06-04-2009 02:20 AM
Re: Assistance to move array values left. Schwarz, Barry A Newsgroup comp.soft-sys.sas 0 05-30-2006 07:48 PM
Re: Assistance to move array values left. toby dunn Newsgroup comp.soft-sys.sas 0 05-30-2006 01:15 PM



All times are GMT. The time now is 04:29 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.