Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C/C++ and Scripting

Options
  • 05-10-2010 5:03pm
    #1
    Registered Users Posts: 3,945 ✭✭✭


    Recently I've been looking into integrating a scripting language into a C/C++ project. It's for a little hobby project I'm currently planning. The aim is to be able to type in or generate some script code and have the program convert this into C++ instructions as quickly as possible.

    The application is digital signal processing based so the performance is really the key. I don't have much experience with this kind of area (scripting) so I was wondering if anybody did and could point me in the right direction.

    I've been thinking about Java and their way of having interpreted code. I think that could be a good solution if I go down the scripting route. It might also allow for optimizations as well (JIT compilation). Sounds difficult though :P

    Any thoughts / opinions?


Comments

  • Registered Users Posts: 1,240 ✭✭✭Iron Hide


    Bloody good idea man, but i reckon its gonna be a fair bit of trial and error! Java is a good base to start at, i'd reckon read up on java and apply it as best you can to your own idea.

    Any idea what scripts your gonna be using?


  • Registered Users Posts: 40,038 ✭✭✭✭Sparks


    You want to read up on SWIG.

    edit: Ah, integrate into, not integrate with, my bad.


  • Registered Users Posts: 1,421 ✭✭✭Steveire


    If you use the Qt library (QtCore and QtScript) you can do JavaScript based scripting with built in facilities.

    http://doc.trolltech.com/latest/scripting.html

    I have used it for several projects myself and it is used in many places in KDE.

    To use Python as the scripting language instead of JavaScript you can use PythonQt.

    http://pythonqt.sourceforge.net/


  • Registered Users Posts: 3,945 ✭✭✭Anima


    Looks good, I'll check it out thanks.

    Still not really sure how I'm going to do it yet. Really just ideas at the minute.


Advertisement