Difference between revisions of "LavishScript"

From Lavish Software Wiki
Jump to navigation Jump to search
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Overview  ==
 
== Overview  ==
LavishScript is a fully-featured scripting engine.  Its goal is to be an easy to learn (very few syntactical rules, as few operators as possible, and so on) command-based language.  It is [http://searchwebservices.techtarget.com/sDefinition/0,290660,sid26_gci212681,00.html object-oriented] and [http://whatis.techtarget.com/definition/0,,sid9_gci213058,00.html strongly typed].
+
LavishScript is a command shell and fully-featured scripting engine.  Its goal is to be an easy to learn (very few syntactical rules, as few operators as possible, and so on) command-based language.  It is [http://searchwebservices.techtarget.com/sDefinition/0,290660,sid26_gci212681,00.html object-oriented] and [http://whatis.techtarget.com/definition/0,,sid9_gci213058,00.html strongly typed].  It is designed to be embedded, and interfaces directly with native system data.
  
LavishScript is designed with the idea that most scripting languages munge too many extra rules and operators to do different things.  We believe that simplicity is key.  Not necessarily simplicity in the range of available functionality, but simplicity in the structure of the language itself.  The complete [[LavishScript:Syntax|syntax for commands and data sequences]] is defined [[LavishScript:Syntax|here]].  [[LavishScript:Script Syntax|Script structure]] is also quite simple, and is defined [[LavishScript:Script Syntax|here]].
+
LavishScript is designed with the idea that most scripting languages munge too many extra rules and operators to do different things.  We believe that simplicity is key.  Not necessarily simplicity in the range of available functionality, but simplicity in the structure of the language itself.  The complete [[LavishScript:Command_Syntax|syntax for commands]] is defined [[LavishScript:Command_Syntax|here]].  [[LavishScript:Language_and_Engine_Overview|Script structure]] is also quite simple, and is defined [[LavishScript:Language_and_Engine_Overview|here]].
  
 
LavishScript is generally designed with non-programmers in mind (though logical thinking helps...).  LavishScript isn't meant to be a replacement for other general-purpose languages, it is simply meant to be easy to use.  If a "real" programming language is what you're looking for, maybe you should be using one instead of a scripting language, right?  Most simple tasks can be completed with minimal research, but of course developing scripts will require some learning.
 
LavishScript is generally designed with non-programmers in mind (though logical thinking helps...).  LavishScript isn't meant to be a replacement for other general-purpose languages, it is simply meant to be easy to use.  If a "real" programming language is what you're looking for, maybe you should be using one instead of a scripting language, right?  Most simple tasks can be completed with minimal research, but of course developing scripts will require some learning.
Line 8: Line 8:
 
LavishScript allows any number of persistent scripts simultaneously, each of which are given a time slice per "pulse".  Pulse timing is defined by the application (such as Fury or Inner Space), so each pulse may be defined as once per frame in a game (as in frames per second), or may simply be as soon as possible after the previous pulse, or can be distributed evenly at specific intervals.  The priority level, dictating how much of a time slice is given per pulse, for a script may be set using the [[Command:Turbo|Turbo command]].
 
LavishScript allows any number of persistent scripts simultaneously, each of which are given a time slice per "pulse".  Pulse timing is defined by the application (such as Fury or Inner Space), so each pulse may be defined as once per frame in a game (as in frames per second), or may simply be as soon as possible after the previous pulse, or can be distributed evenly at specific intervals.  The priority level, dictating how much of a time slice is given per pulse, for a script may be set using the [[Command:Turbo|Turbo command]].
  
Internally, LavishScript uses C++ objects to perform the scripting duties.  By design, every command takes the same form as a standard C console application (i.e. <tt>int main(int argc, char *argv[])</tt>), as does every built-in variable (called Top-Level Objects) to a lesser extent.  This means that developing a LavishScript module is just as painless as developing a console app.
+
=== Geek Notes ===
 +
* LavishScript is interpreted, object-oriented, strongly typed, reflective, imperative, and dynamic
 +
* LavishScript has a pre-emptive scheduler to process scripts, and additionally supports atomic functions, which execute to completion without being scheduled.  The scheduler runs scripts during explicitly stated times (such as when a game redraws its display)
 +
* LavishScript can access internal (e.g. script-defined variables and objects) and external data (e.g. game state information) via the same object system
 +
* References to objects exist only within explicitly defined data sequences, thus allowing external objects to be lost gracefully while a script is waiting for a timeslice (e.g. a character in a game may disappear before the next timeslice, and this will not cause synchronization problems)
 +
* Multiple-use expressions (such as data sequences to be evaluated each frame for display on a user interface) can be pre-parsed to improve performance
 +
* Internally, LavishScript uses C++ objects to perform the scripting duties.  By design, every command takes the same form as a standard C console application (i.e. <tt>int main(int argc, char *argv[])</tt>), as does every built-in variable (called Top-Level Objects) to a lesser extent.  This means that developing a LavishScript module is just as painless as developing a console app
  
== Basics ==
+
== Getting Started ==
 +
* [https://github.com/LavishSoftware/LERN LavishScript Example Repository Node (LERN)] is a great resource full of tutorials to help LavishScript beginners.
 +
* The [https://github.com/LavishSoftware/LS1-Platform-Specifications LS1 Platform Specifications] is kept up-to-date and include LavishScript API references for [https://github.com/LavishSoftware/LS1-Platform-Specifications/blob/master/Reference/IS-Uplink.md Inner Space Uplink], [https://github.com/LavishSoftware/LS1-Platform-Specifications/blob/master/Reference/IS-Session.md Inner Space Sessions], [https://github.com/LavishSoftware/LS1-Platform-Specifications/blob/master/Reference/JMB-Uplink.md Joe Multiboxer Uplink] and [https://github.com/LavishSoftware/LS1-Platform-Specifications/blob/master/Reference/JMB-Session.md Joe Multiboxer Sessions].
 +
 
 +
=== Using LavishScript consoles ===
 +
* [[LavishScript:Command Syntax|Command Syntax]]
 +
* [[LavishScript:Installing and Running Scripts|Installing and Running Scripts]]
 +
* [[LavishScript:Installing and Loading Modules|Installing and Loading Modules]]
 +
* Using "[[LavishScript:Data Sequences|Data Sequences]]"
 +
 
 +
=== Developing in LavishScript ===
 +
* [[LavishScript:Language and Engine Overview|Language and Engine Overview]]
 +
** [[LavishScript:Language and Engine Overview#Preprocessor|Preprocessor]]
 +
** [[LavishScript:Language and Engine Overview#Comments|Comments]]
 +
** [[LavishScript:Language and Engine Overview#Keywords|Keywords]]
 +
** [[LavishScript:Language and Engine Overview#Functions|Functions]]
 +
** [[LavishScript:Language and Engine Overview#Control Structures|Control Structures]]
 +
** [[LavishScript:Language and Engine Overview#Variables|Variables]]
 +
** [[LavishScript:Mathematical_Formulae|Math operators]]
 +
* [[LavishScript:Commands|Commands]]
 +
* [[LavishScript:Object Types|Object Types]]
 +
** [[LavishScript:Data_Sequences|Object Operations]] (Data Sequences)
 +
*** [[LavishScript:Data_Sequences#Methods|Methods]]
 +
*** [[LavishScript:Data_Sequences#Members|Members]]
 +
*** [[LavishScript:Data_Sequences#Indices|Indices]]
 +
*** [[LavishScript:Data_Sequences#Type-casting|Type-casting]]
 +
*** Reduction (To Text)
 +
** [[LavishScript:Object_Types#Built-in_Object_Types|Built-in Object Types]]
 +
*** [[LavishScript:Object_Types#Containers and iteration|Containers]]
 +
** [[LavishScript:Script-Defined_Object_Types|Script-Defined_Object_Types]]
 +
** [[LavishScript:Object References and Persistence|Object References and Persistence]]
 +
* Objects
 +
** [[LavishScript:Top-Level_Objects|Built-in Objects]]
 +
** Variables
 +
* [[LavishScript:Functions|Functions]]
 +
** [[LavishScript:Atoms|Atomic Functions (atoms)]]
 +
* [[LavishScript:Events|Events]]
 +
* [[LavishScript:Object Queries|Object Queries]]
 +
* [[LavishScript:MetaScripts|MetaScripts]]
 +
* [[LavishScript:Triggers|Triggers]]
 +
* [[LavishScript:Tasks|Tasks]]
 +
* [[LavishScript:Command Queue|Command Queue]]
 +
 
 +
=== Developing Modules ===
 +
* LavishScript Module Development Kit
 +
 
 +
Download here: http://www.lavishsoft.com/downloads.php
 +
 
 +
== Older information ==
 
; LavishScript encompasses these basic parts
 
; LavishScript encompasses these basic parts
 
* [[LavishScript:Taking Actions|Taking Actions]]
 
* [[LavishScript:Taking Actions|Taking Actions]]
Line 16: Line 70:
 
** Object Methods
 
** Object Methods
 
* [[LavishScript:Data Sequences|Reading and Writing Data]]
 
* [[LavishScript:Data Sequences|Reading and Writing Data]]
** [[LavishScript:Data Types|Data Types]]
+
** [[LavishScript:Object Types|Object Types]] (also known as data types)
 
** [[LavishScript:Top-Level Objects|Top-Level Objects]]
 
** [[LavishScript:Top-Level Objects|Top-Level Objects]]
 
** [[LavishScript:Variables|Variables]]
 
** [[LavishScript:Variables|Variables]]
Line 24: Line 78:
 
** [[LavishScript:Script Syntax|Script Syntax]]
 
** [[LavishScript:Script Syntax|Script Syntax]]
 
* [[LavishScript:Atoms|Atoms]]
 
* [[LavishScript:Atoms|Atoms]]
 +
* [[LavishScript:Events|Events]]
 
* [[LavishScript:File System|File System]]
 
* [[LavishScript:File System|File System]]
 
* [[LavishScript:Modules|Modules]]
 
* [[LavishScript:Modules|Modules]]
  
=== Development ===
+
=== Extending LavishScript ===
 
* [[LavishScript:LSModule System|LSModule System]]
 
* [[LavishScript:LSModule System|LSModule System]]
 +
* [[LavishScript:Modules|Modules]]
 
* [[LavishScript:Developing Commands|Developing Commands]]
 
* [[LavishScript:Developing Commands|Developing Commands]]
* [[LavishScript:Developing Data Types|Developing Data Types]]
+
* [[LavishScript:Developing Data Types|Developing Object Types]]
 
* [[LavishScript:Developing Top-Level Objects|Developing Top-Level Objects]]
 
* [[LavishScript:Developing Top-Level Objects|Developing Top-Level Objects]]
 
* [[LavishScript:Discussing|Discussing LavishScript]]
 
* [[LavishScript:Discussing|Discussing LavishScript]]
 +
 
== See Also ==
 
== See Also ==
 
* [[Inner Space]]
 
* [[Inner Space]]
 
* [[LavishGUI]]
 
* [[LavishGUI]]
 
* [[LavishScript:Release Notes|LavishScript Release Notes]]
 
* [[LavishScript:Release Notes|LavishScript Release Notes]]
 +
* [[LavishScript:Modules|Modules]]
  
 
[[Category:LavishScript]]
 
[[Category:LavishScript]]

Latest revision as of 16:10, 21 September 2022

Overview

LavishScript is a command shell and fully-featured scripting engine. Its goal is to be an easy to learn (very few syntactical rules, as few operators as possible, and so on) command-based language. It is object-oriented and strongly typed. It is designed to be embedded, and interfaces directly with native system data.

LavishScript is designed with the idea that most scripting languages munge too many extra rules and operators to do different things. We believe that simplicity is key. Not necessarily simplicity in the range of available functionality, but simplicity in the structure of the language itself. The complete syntax for commands is defined here. Script structure is also quite simple, and is defined here.

LavishScript is generally designed with non-programmers in mind (though logical thinking helps...). LavishScript isn't meant to be a replacement for other general-purpose languages, it is simply meant to be easy to use. If a "real" programming language is what you're looking for, maybe you should be using one instead of a scripting language, right? Most simple tasks can be completed with minimal research, but of course developing scripts will require some learning.

LavishScript allows any number of persistent scripts simultaneously, each of which are given a time slice per "pulse". Pulse timing is defined by the application (such as Fury or Inner Space), so each pulse may be defined as once per frame in a game (as in frames per second), or may simply be as soon as possible after the previous pulse, or can be distributed evenly at specific intervals. The priority level, dictating how much of a time slice is given per pulse, for a script may be set using the Turbo command.

Geek Notes

  • LavishScript is interpreted, object-oriented, strongly typed, reflective, imperative, and dynamic
  • LavishScript has a pre-emptive scheduler to process scripts, and additionally supports atomic functions, which execute to completion without being scheduled. The scheduler runs scripts during explicitly stated times (such as when a game redraws its display)
  • LavishScript can access internal (e.g. script-defined variables and objects) and external data (e.g. game state information) via the same object system
  • References to objects exist only within explicitly defined data sequences, thus allowing external objects to be lost gracefully while a script is waiting for a timeslice (e.g. a character in a game may disappear before the next timeslice, and this will not cause synchronization problems)
  • Multiple-use expressions (such as data sequences to be evaluated each frame for display on a user interface) can be pre-parsed to improve performance
  • Internally, LavishScript uses C++ objects to perform the scripting duties. By design, every command takes the same form as a standard C console application (i.e. int main(int argc, char *argv[])), as does every built-in variable (called Top-Level Objects) to a lesser extent. This means that developing a LavishScript module is just as painless as developing a console app

Getting Started

Using LavishScript consoles

Developing in LavishScript

Developing Modules

  • LavishScript Module Development Kit

Download here: http://www.lavishsoft.com/downloads.php

Older information

LavishScript encompasses these basic parts

Extending LavishScript

See Also