Library or external programs

Discussion in 'Ruby' started by Michael Gebhart, May 7, 2005.

  1. Hi,

    I wanna write a ruby application. But I also want,
    that other applications can use the functionality of my application too.


    So I had the idea to write a library in C and a binding for ruby. So
    everyone, who wants to use C can use the library and I can use it with
    ruby. If someone wants to use it in perl or python, he can write a binding
    too. So I started writing the library in C. After maybe 1 hour I was tired
    of hacking C. When using ruby for a while, C is very hard. :)

    Now my idea was to use ruby for the functionality and to create some
    scripts, which can be started by other programmers. Like this:

    myprogram --do-something --param1=xy --param2=yz

    This is not as hard as writing a library in C :)

    But the developers now donĀ“t have as much freedom as with a library
    written in C. But on the other hand many languages simply can use the
    programs, without writing a binding first.

    My question now is: What do you think about this? Is it not a good way
    to share functionality? Or is it ok?

    Greetings

    Mike
     
    Michael Gebhart, May 7, 2005
    #1
    1. Advertising

  2. Michael Gebhart

    Friday Guest

    Michael Gebhart wrote:
    > My question now is: What do you think about this? Is it not a good way
    > to share functionality? Or is it ok?
    >
    > Greetings
    >
    > Mike


    You might want to look into the unix way of doing things.

    Unix Power Tools is a pretty good book that help people grok the
    philophophy.

    Pipes, filters, and command-line parameters working together in a very
    elegant manner.

    There's probably a ruby project that helps ruby get used in this manner.
     
    Friday, May 7, 2005
    #2
    1. Advertising

  3. Hi,

    thanks for your answer. I have also found this:

    http://www.approximity.com/rubybuch2/node176.html

    This shows, how to use ruby-code in C. But not sure, if this is the wrong
    direction. Maybe it is very slow. Well the problem ist, that I want, that
    many people have fun and use with my code. That they can reuse it. Maybe
    this is with shellscripts very easy. There is no binding needed. On the
    other hand, it is not very integrated for other developers. The
    possibilities are limited.


    Greetings

    Mike
     
    Michael Gebhart, May 7, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    12
    Views:
    1,650
    Dave Thompson
    Jan 10, 2005
  2. Coca
    Replies:
    7
    Views:
    744
    Aidan Grey
    Aug 24, 2004
  3. Replies:
    18
    Views:
    626
    Dave Thompson
    Jan 10, 2005
  4. lone_eagle
    Replies:
    3
    Views:
    638
    psykeedelik
    May 26, 2009
  5. Casey Hawthorne
    Replies:
    14
    Views:
    449
Loading...

Share This Page