Category:Kabap

From Rosetta Code
Language
Kabap
This programming language may be used to instruct a computer to perform a task.
Official website
Execution method: Interpreted or compiled
Garbage collected: No
Parameter passing methods: By value
Type safety: Unsafe
Type strength: Weak
Type compatibility: Duck
Type expression: Implicit
Type checking: Dynamic
Typing: Untyped
Lang tag(s): kabap, kabaptokens
See Also:
Listed below are all of the tasks on Rosetta Code which have been solved using Kabap.

The Kabap programming language is a multi-platform ultra-lightweight solution for developers to expose safe & easy user scripting capabilities within their projects. The aim of the project is provide a language which is easy for users to learn and is quick for developers to implement. Its target niche is the gap between when a solution is too complex to be represented in a graphical user interface and it is too dangerous to permit the direct execution of user-supplied code (through reflection or eval() or some other means).

Typical use cases are the user must supply a complex custom shipping calculation that is too hard to express as a UI but without permitting the user to edit PHP files; or the user needs to be able to visually control the elements of an app but that control is limited to only specific views so reflection cannot be used.

Kabap scripts (.kabap files) are interpreted during parsing in to a tokenised portable pseudo-bytebode executable format (.kat files). This format can also be saved and loaded directly to remove the expensive overhead of the parsing process. The tokenised format has 3 possible levels of optimisation for speed, from small optimisations like stripping comments and debug symbols, to large optimisations like full minification and removal of unused code.

Kabap implementations exist for Java (native JVM, Android and AWS Lambda), PHP and ECMAScript (JavaScript, Node.js). This deliberately targets common backend systems, apps, browsers and web servers. Because Kabap scripts are fully portable between platforms the same code can be run locally, on the server or in the cloud (or any combination thereof).

By default a Kabap instance is a fully sandboxed and secure minimal computing environment where the only things the user has access to are those the developer has chosen to expose to them. If further access is needed the language can be dynamically expanded with the inclusion of Kabap Extensions. Each platform has the default Standard Extensions available (File and Net, to provide local file access and remote network connectivity respectively). Platforms may also provide specific extensions (Kabap for Android provides a Toast extension for example).

The primary benefits of Kabap are:

  • Cross-platform (Write Once, Run Anywhere)
  • Easy for users to learn the language
  • Possible for developers to implement in under 5 minutes
  • Secure sandboxed environment by default
  • Standard Extensions to provide additional functionality (File and Net)
  • Easy for developers to create their own extensions for specific use cases
  • Simple clean code which is well documented
  • Implementations are around only 1500 lines of code
  • Large cross-platform unit test suite to verify all implementations
  • Fully open source development


Although Kabap is a relatively new language, it has been tested and proofed for the last year in a critical production environment.

Useful Kabap links:

Pages in category "Kabap"

The following 4 pages are in this category, out of 4 total.