Category:YAMLScript: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 5: Line 5:
{{implementation|Lisp}}
{{implementation|Lisp}}


'''[https://yamlscript.org YAMLScript]''' is a new programming language that uses [https://yaml.org/ YAML] as its syntax. It is a complete, functional, general purpose language, but can also be easily embedded in YAML files to make them dynamic at load time. Most existing YAML files and all JSON files are already valid YAMLScript programs. YAMLScript has a compiler/interpreter CLI program called <code>[https://github.com/yaml/yamlscript/releases ys]</code> and is also available in several programming languages as a binding module to the <code>[https://github.com/yaml/yamlscript/releases libyamlscript.so]</code> shared library:
'''YAMLScript''' a hosted '''Lisp''' like '''Clojure''' (Java/JVM) and '''ClojureScript''' (JavaScript).
Actually it is simply an alternate syntax reader for Clojure and Lingy.
'''Lingy''' is a port of Clojure to various programming languages including Perl.


* [https://clojars.org/org.yamlscript/clj-yamlscript Clojure]
YAMLScript offers all the power of Lisp but with a various syntax features that strive to make it more readable than encoding everything as nested s-expression forms.
* [https://clojars.org/org.yamlscript/yamlscript Java]
* [https://www.npmjs.com/package/@yaml/yamlscript NodeJS]
* [https://metacpan.org/pod/YAMLScript Perl]
* [https://pypi.org/project/yamlscript/ Python]
* [https://raku.land/zef:ingy/YAMLScript Raku]
* [https://rubygems.org/gems/yamlscript Ruby]
* [https://crates.io/crates/yamlscript Rust]


==Installing YAMLScript==
==See Also==


Run this command to install the <code>ys</code> command line YAMLScript runner/loader/compiler program.
* [https://metacpan.org/pod/YAMLScript YAMLScript Doc]

* [https://metacpan.org/pod/Lingy Lingy Doc]
curl -sSL yamlscript.org/install | bash

That will install <code>$HOME/.local/bin/ys</code>. If <code>$HOME/.local/bin</code> is not in your <code>PATH</code>, run:

export PATH=$HOME/.local/bin:$PATH

Test the new installation:

$ ys --help
ys - The YAMLScript (YS) Command Line Tool
Usage: ys [options] [file]
Options:
-r, --run Compile and evaluate a YAMLScript file (default)
-l, --load Output the evaluated YAMLScript value
-e, --eval YSEXPR Evaluate a YAMLScript expression
...

See https://yamlscript.org for more information.

Latest revision as of 15:26, 7 April 2024

Language
YAMLScript
This programming language may be used to instruct a computer to perform a task.
Official website
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using YAMLScript.
YAMLScript is an implementation of Lisp. Other implementations of Lisp.

YAMLScript is a new programming language that uses YAML as its syntax. It is a complete, functional, general purpose language, but can also be easily embedded in YAML files to make them dynamic at load time. Most existing YAML files and all JSON files are already valid YAMLScript programs. YAMLScript has a compiler/interpreter CLI program called ys and is also available in several programming languages as a binding module to the libyamlscript.so shared library:

Installing YAMLScript

Run this command to install the ys command line YAMLScript runner/loader/compiler program.

 curl -sSL yamlscript.org/install | bash

That will install $HOME/.local/bin/ys. If $HOME/.local/bin is not in your PATH, run:

 export PATH=$HOME/.local/bin:$PATH

Test the new installation:

 $ ys --help
 ys - The YAMLScript (YS) Command Line Tool

 Usage: ys [options] [file]

 Options:
   -r, --run                Compile and evaluate a YAMLScript file (default)
   -l, --load               Output the evaluated YAMLScript value
   -e, --eval YSEXPR        Evaluate a YAMLScript expression
 ...

See https://yamlscript.org for more information.

Pages in category "YAMLScript"

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