Author Topic: Sexpy time, very nice!  (Read 6050 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Sexpy time, very nice!
:p

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Sexpy time, very nice!
couldn't you just call a script-eval with tostring(x)?

im really not even sure how to get a sexp to return a value or if you can stick that value into a variable, but this line of script would read a num variable and store it to a string variable:
mn.SEXPVariables[stringvarname] = tostring(mn.SEXPVariables[numvarname])

im not sure that would fit in the limited space of a script-eval
« Last Edit: March 16, 2011, 06:30:56 am by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Sexpy time, very nice!
Number 2 would be my long-term preference as well, but using LISP instead of Lua.  The entire sexp language is basically LISP anyway.  (That's why they're called "s-exps" in the first place.)  It would take considerably less work than a sexp-to-lua compiler, because not only do you not have to translate the language, you wouldn't even have to re-implement any of the APIs.

But our current scripting is via LUA, right? So wouldn't it make it more accessible to scripting if there was a working SEXP-to-LUA vs. a re-write to LISP, or am I missing something?
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Sexpy time, very nice!
There already is a working SEXP-to-LUA interface; it's called eval-sexp.  You can bridge between one system and the other.

What I'm talking about is a re-implementation of the current system.  The entire sexp language is LISP, with some FS-specific extensions.  If we changed the code to use a real actual factual LISP interpreter instead of our ad hoc, informally-specified, bug-ridden, slow implementation, the sexp system would suddenly become an order of magnitude more powerful, while retaining exactly the same syntax and complete reverse-compatible functionality.