Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 8th, 2007, 11:03 AM   #1
l2u
Newbie
 
Join Date: Mar 2007
Posts: 24
Rep Power: 0 l2u is on a distinguished road
advanced user output

Hello

I want to allow user to use advanced output feature with my application. In other words I want to have some simple scripting language inside c++ application so that user could call c++ functions from this simple scripting language.

Is there anything similar available?
I know for boost python, but to embed python interpreter in c++ makes binary for about 1mb bigger. I want to keep my exe as smallest as possible.

User should be able to do something like this (for instance):

%c = random(2,5);
%b = "some text";
output = "this is" . %b . "... some random number: " . %c;

And when my c++ aplication would parse this script, it would make the output string:
"this is some text... some random number: 3"

Thanks for help
l2u is offline   Reply With Quote
Old May 8th, 2007, 3:01 PM   #2
Game_Ender
Professional Programmer
 
Game_Ender's Avatar
 
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3 Game_Ender is on a distinguished road
If you want to embed a small scripting language take a look a Lua, Squirrel, or AngelScript. You should be able to accomplish something simple with those languages.
__________________
Robotics @ Maryland AUV Team - Software Lead
Game_Ender is offline   Reply With Quote
Old May 8th, 2007, 4:09 PM   #3
l2u
Newbie
 
Join Date: Mar 2007
Posts: 24
Rep Power: 0 l2u is on a distinguished road
I hope there will be something in boost soon.
l2u is offline   Reply With Quote
Old May 9th, 2007, 1:04 PM   #4
Game_Ender
Professional Programmer
 
Game_Ender's Avatar
 
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3 Game_Ender is on a distinguished road
Boost.Python is great but it is not light weight, don't wait for Boost. All the libraries I listed only require a couple of lines of code to integrate in the way you want. Why don't you give something like Squirrel a try.
__________________
Robotics @ Maryland AUV Team - Software Lead
Game_Ender is offline   Reply With Quote
Old May 9th, 2007, 1:37 PM   #5
Seif
Hobbyist Programmer
 
Seif's Avatar
 
Join Date: Jan 2006
Location: UK
Posts: 215
Rep Power: 3 Seif is on a distinguished road
lua is a good choice imho. sorry to slightly go off course a bit, but would you happen to recommend any good IDE's for lua, Game_Ender ?
Seif is offline   Reply With Quote
Old May 9th, 2007, 8:06 PM   #6
Game_Ender
Professional Programmer
 
Game_Ender's Avatar
 
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3 Game_Ender is on a distinguished road
Can't do that, I have not used any of the light weight alternatives listed above. I have only done some research on them and seen examples of there integration in other projects (Code::Blocks for example). I personally use Boost.Python (its what Python-Ogre uses). I do know that WGE (a C++ and Squirrel game engine) has integrated squirrel debugging.
__________________
Robotics @ Maryland AUV Team - Software Lead
Game_Ender is offline   Reply With Quote
Old May 9th, 2007, 8:16 PM   #7
Seif
Hobbyist Programmer
 
Seif's Avatar
 
Join Date: Jan 2006
Location: UK
Posts: 215
Rep Power: 3 Seif is on a distinguished road
Aye same man. I'm writing an agent based modelling toolset for my final project, and was hoping to create custom states to be codable in lua script.... but alas times against me for that functionality.

still, its something i would like to implement after when i got some more time. I had a bash installing a couple of IDE's but had no joy what so ever.
Seif is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FiveDigit + RandomeNumber Game. TecBrain Java 0 Nov 18th, 2005 2:53 PM
User Input for Number Format ericelysia1 Java 0 Jul 21st, 2005 3:41 PM
Instant Messaging App Help AusTex C 0 Apr 27th, 2005 4:52 PM
Loading and Destroying web user controls into a panel see07 C# 0 Feb 2nd, 2005 12:38 PM
Show web user control hidden see07 C# 1 Feb 2nd, 2005 10:35 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:40 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC