Javascript shell in Spidermonkey ...

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
SiriusCG
Dangerous
Dangerous
Posts: 73
Joined: Sat Mar 27, 2010 12:59 am

Javascript shell in Spidermonkey ...

Post by SiriusCG »

Just curious, but is this shell available in Oolite?

https://developer.mozilla.org/En/Spider ... ript_shell

I've been using the OoDebug Console via Python (I'm using Windows currently), but this looks like a more integrated solution.

Cheers.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6633
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

The JS shell is part of the Spidermonkey distribution and can be built from the sources currently in trunk, but it is not specific to Oolite. Even if built, it will still need to be fed a script that will enable Oolite to communicate with it. Given that the console we currently have works just fine, I don't see why one would want to spend time on it for reasons other than attempting a programming exercise.
User avatar
SiriusCG
Dangerous
Dangerous
Posts: 73
Joined: Sat Mar 27, 2010 12:59 am

Post by SiriusCG »

"Under Mac OS X, the Debug OXP provides a menu with various debugging options and an integrated JavaScript console..."

Again, curious. Why this isn't implemented in the PC or LINUX versions?

I'm on a learning curve with Oolite and I've been discovering aspects of Javascript and Spidermonkey that are, let's say, interesting. The console was one of those items. Currently I'm working with the 1.75.x trunk and there doesn't seem to be an OoDebug console available yet ... :wink:

One thing I'm hoping to learn is how much of the functionality of standard Javascript via Spidermonkey is available in Oolite. I would like to build some fairly sophisticated scripts for a "secret Oolite project" (I don't want to reveal what it is until I'm sure the idea can be implemented) so I'm "poking around" a bit.

At this juncture, from what I've been able to learn from the wiki, user scripts and the source code, I think I should be able to program what I have in mind.

Cheers.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6633
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

SiriusCG wrote:
"Under Mac OS X, the Debug OXP provides a menu with various debugging options and an integrated JavaScript console..."

Again, curious. Why this isn't implemented in the PC or LINUX versions?
If think that this is not implemented because it relies on dependencies other than gnustep-base.
Currently I'm working with the 1.75.x trunk and there doesn't seem to be an OoDebug console available yet ...
The same Debug Console executable that you download from Berlios can also be used for trunk debugging.
One thing I'm hoping to learn is how much of the functionality of standard Javascript via Spidermonkey is available in Oolite.
The entire Spidermonkey library functionality is available. If Spidermonkey supports it, Oolite scripts support it too.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

another_commander wrote:
If think that this is not implemented because it relies on dependencies other than gnustep-base.
To wit: on macs Oolite sports a whole cocoa based menu system, on other systems it doesn't.
another_commander wrote:
The same Debug Console executable that you download from Berlios can also be used for trunk debugging.
To elaborate on that: change the inside of requires.plist so that it includes the trunk version and you're good to go: however, this applies only for windows & linux computers.

On macs - thanks to the extra integration - things are 'a bit' more fragile: older debug.oxps have been known to crash the game itself, and generally speaking a new debug.oxp needs to be created for each new version of Oolite...

Before I forget, the integrated javascript console is functionally identical to the python based javascript console, though I must say it does look prettier on a mac!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
SiriusCG
Dangerous
Dangerous
Posts: 73
Joined: Sat Mar 27, 2010 12:59 am

Post by SiriusCG »

Thanks guys, always helpful!

Cheers!
Post Reply