Recommend a scripting language? (to use with C/++)
- GyroVorbis
- Elysian Shadows Developer
- Posts: 1874
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Mon Mar 22, 2004 4:55 pm
- Location: #%^&*!!!11one Super Sonic
- Has thanked: 81 times
- Been thanked: 64 times
- Contact:
Recommend a scripting language? (to use with C/++)
I'm looking for a scripting language that'll run on the DC and can easily cooperate with C/++. I'm working on Null and I'm interested in using a scripting language for some things that might be tedious in a lower level language.
I'm fluent with Perl, but I haven't been able to find any realistic way to cooperate Perl with C and C++. I've read about libperl++, but I can't find it anywhere online (not even CPAN seems to have it). Every other way I've seen involves a deep knowledge of perl's inner workings and is just plain a pain in the butt.
I've heard good things about lua and ruby. Would anybody recommend either of them? Anybody have any experience with calling perl subroutines and passing data between perl and C++?
Thanks in advance.
I'm fluent with Perl, but I haven't been able to find any realistic way to cooperate Perl with C and C++. I've read about libperl++, but I can't find it anywhere online (not even CPAN seems to have it). Every other way I've seen involves a deep knowledge of perl's inner workings and is just plain a pain in the butt.
I've heard good things about lua and ruby. Would anybody recommend either of them? Anybody have any experience with calling perl subroutines and passing data between perl and C++?
Thanks in advance.
-
- DC Developer
- Posts: 2285
- Joined: Fri Feb 21, 2003 7:37 am
- Location: Chicago, IL
- Has thanked: 0
- Been thanked: 1 time
- Contact:
I've already ported a JavaScript engine to DC that I'm using to do all the GUI in the upcoming NesterDC SE. It's a port of KJS, the JavaScript engine from Konquerer. Of course, I haven't yet released it yet. I plan on making an official release shortly after NesterDC SE and it'll be called DreamScript.
It's actually quite functional right now and not slow like I thought it would be. If you really need it now, I could give you what I have. It's easy to expose function, objects, and classes to the script. I've already implemented image, sprite, music, file system, and font classes.
If you're interested, let me know.
It's actually quite functional right now and not slow like I thought it would be. If you really need it now, I could give you what I have. It's easy to expose function, objects, and classes to the script. I've already implemented image, sprite, music, file system, and font classes.
If you're interested, let me know.
- BlueCrab
- The Crabby Overlord
- Posts: 5666
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Lua works wonderfully. I use it for a lot of stuff (like the actual game logic and such) in ljsdcdev Demo 7 (ljsdcdev Engine 0.9.0).
I would, however, recommend that if you're gonna use lua, upgrade the version in KOS to 5.0.x, its included with ljsdcdev Engine 0.9.0, if you don't wanna figure out how to get it to compile for you. Lua's also easy to integrate in with C++ code, especially with tools like tolua++ and such.
I would, however, recommend that if you're gonna use lua, upgrade the version in KOS to 5.0.x, its included with ljsdcdev Engine 0.9.0, if you don't wanna figure out how to get it to compile for you. Lua's also easy to integrate in with C++ code, especially with tools like tolua++ and such.
-
- DC Developer
- Posts: 80
- Joined: Wed Oct 17, 2001 7:44 pm
- Location: Sweden
- Has thanked: 0
- Been thanked: 1 time
I suggest AngelScript. The interopability with C++ is fantastic. You do not have to write any wrapper-functions and you can register object methods, variables and everything directly.
-
- DC Developer
- Posts: 2285
- Joined: Fri Feb 21, 2003 7:37 am
- Location: Chicago, IL
- Has thanked: 0
- Been thanked: 1 time
- Contact:
I never heard of that. Looks like it's well thought out though. I wonder how the speed is compared to KJS. I'm guessing it's faster.quarn wrote:I suggest AngelScript. The interopability with C++ is fantastic. You do not have to write any wrapper-functions and you can register object methods, variables and everything directly.
- chronofurb
- DCEmu Freak
- Posts: 79
- Joined: Wed Jan 07, 2004 11:33 pm
- Location: Earth
- Has thanked: 0
- Been thanked: 0
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
I have a BASIC interpreter, but it's a pain to actually get it to do anything useful, and it's not that easy to integrate into something else (I had to build my entire thing around the BASIC interpreter), so I'm not recommending that. Then again, it was never intended as a scripting language, so I suppose I can forgive it for that.
I'd have to recommend Lua, Ruby or Angelscript. They all make pretty good scripting languages. Just try them out, and see which one(s) you like. Personally, I quite like Ruby, although I've not actually used it as a scripting language yet.
I wonder if Mozilla's JavaScript interpreter (SpiderMonkey would be portable to the DC? It's not as well designed as KJS, and likely isn't as easy to build stuff on top of, but it's a hell of a lot faster, and apparently is written in plain C. I don't know how it fares for memory usage though.
I'd have to recommend Lua, Ruby or Angelscript. They all make pretty good scripting languages. Just try them out, and see which one(s) you like. Personally, I quite like Ruby, although I've not actually used it as a scripting language yet.
Probably. KJS is definitely not known for it's speed. It's used in the web browser I'm using (Konqueror), and it definitely slows down a lot on pages that use a lot of JavaScript.I wonder how the speed is compared to KJS. I'm guessing it's faster.
I wonder if Mozilla's JavaScript interpreter (SpiderMonkey would be portable to the DC? It's not as well designed as KJS, and likely isn't as easy to build stuff on top of, but it's a hell of a lot faster, and apparently is written in plain C. I don't know how it fares for memory usage though.
- GyroVorbis
- Elysian Shadows Developer
- Posts: 1874
- Joined: Mon Mar 22, 2004 4:55 pm
- Location: #%^&*!!!11one Super Sonic
- Has thanked: 81 times
- Been thanked: 64 times
- Contact:
Yeah, I think I'll try several out over the summer (just a few more weeks!) and use my personal preference.
I'd like something that I can stick with, and I just don't have time to experiment with them now. Final exams are coming up so I won't even have time to do anything. But then after that is summer break so... yeah.
I'd like something that I can stick with, and I just don't have time to experiment with them now. Final exams are coming up so I won't even have time to do anything. But then after that is summer break so... yeah.
- chronofurb
- DCEmu Freak
- Posts: 79
- Joined: Wed Jan 07, 2004 11:33 pm
- Location: Earth
- Has thanked: 0
- Been thanked: 0