yamlscript 0.1.91 → 0.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog.md +8 -0
- data/ReadMe.md +27 -34
- data/doc/readme.md +4 -5
- data/lib/yamlscript/version.rb +1 -1
- data/lib/yamlscript.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5876096c5ddfac243f2b723995c1d0670e77ed3725be20401a7b7d4c483034f7
|
4
|
+
data.tar.gz: 67f64f21566516206cb295127d810bf6f668067d4822ee3689080dc1e1ba6e4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 359e50d9677cbd9be0cb1a841d300f192b0dcdb5a36e825b51952f6640b1d4fd6dbc3278a69aa04373bc1a4d4e38a3cab00b740f52cfbaa255d7a524c99d133d
|
7
|
+
data.tar.gz: a967b0cf7ca526158f637c57d1326bcffc27d099d71f3788fcc0341cbae6ae3cfa25d09cb2da6fd2b27877954053ad1f5861016c6bf404c0333a7f1074941e58
|
data/ChangeLog.md
CHANGED
data/ReadMe.md
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
<!-- DO NOT EDIT — THIS FILE WAS GENERATED -->
|
2
2
|
|
3
|
-
YAMLScript
|
4
|
-
|
3
|
+
YS / YAMLScript
|
4
|
+
===============
|
5
5
|
|
6
6
|
Add Logic to Your YAML Files
|
7
7
|
|
8
8
|
|
9
9
|
## Synopsis
|
10
10
|
|
11
|
-
Load `file.yaml` with
|
11
|
+
Load `file.yaml` with YS:
|
12
12
|
```yaml
|
13
|
-
!YS
|
13
|
+
!YS-v0:
|
14
14
|
|
15
15
|
# Get data from external sources:
|
16
16
|
names-url =:
|
@@ -43,33 +43,31 @@ and get:
|
|
43
43
|
|
44
44
|
## Description
|
45
45
|
|
46
|
-
[
|
47
|
-
|
46
|
+
[YS](https://yamlscript.org) is a functional programming language with a clean
|
47
|
+
YAML syntax.
|
48
48
|
|
49
|
-
|
50
|
-
|
49
|
+
YS can be used for enhancing ordinary [YAML](https://yaml.org) files with
|
50
|
+
functional operations, such as:
|
51
51
|
|
52
52
|
* Import (parts of) other YAML files to any node
|
53
53
|
* String interpolation including function calls
|
54
54
|
* Data transforms including ones defined by you
|
55
55
|
|
56
|
-
This
|
57
|
-
loader!
|
56
|
+
This YS library should be a drop-in replacement for your current YAML loader!
|
58
57
|
|
59
|
-
Most existing YAML files are already valid
|
60
|
-
This means that
|
58
|
+
Most existing YAML files are already valid YS files.
|
59
|
+
This means that YS works as a normal YAML loader, but can also evaluate
|
61
60
|
functional expressions if asked to.
|
62
61
|
|
63
|
-
Under the hood,
|
64
|
-
This makes
|
65
|
-
the box.
|
62
|
+
Under the hood, YS code compiles to the Clojure programming language.
|
63
|
+
This makes YS a complete functional programming language right out of the box.
|
66
64
|
|
67
|
-
Even though
|
68
|
-
|
69
|
-
|
70
|
-
|
65
|
+
Even though YS compiles to Clojure, and Clojure compiles to Java, there is no
|
66
|
+
dependency on Java or the JVM.
|
67
|
+
YS is compiled to a native shared library (`libyamlscript.so`) that can be used
|
68
|
+
by any programming language that can load shared libraries.
|
71
69
|
|
72
|
-
To see the Clojure code that
|
70
|
+
To see the Clojure code that YS compiles to, you can use the YS
|
73
71
|
CLI binary `ys` to run:
|
74
72
|
|
75
73
|
```text
|
@@ -85,7 +83,6 @@ $ ys --compile file.ys
|
|
85
83
|
"title" (str (_** 'num) " shades of " (_** 'hue) ".")))
|
86
84
|
```
|
87
85
|
|
88
|
-
|
89
86
|
## Ruby Usage
|
90
87
|
|
91
88
|
File `prog.rb`:
|
@@ -101,14 +98,13 @@ puts data
|
|
101
98
|
File `file.ys`:
|
102
99
|
|
103
100
|
```yaml
|
104
|
-
!
|
101
|
+
!YS-v0:
|
105
102
|
|
106
103
|
name =: "World"
|
107
104
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
baz:: "Hello, $name!"
|
105
|
+
foo: [1, 2, ! inc(41)]
|
106
|
+
bar:: load("other.yaml")
|
107
|
+
baz:: "Hello, $name!"
|
112
108
|
```
|
113
109
|
|
114
110
|
File `other.yaml`:
|
@@ -147,25 +143,22 @@ command line utility, `ys`, and the shared library, `libyamlscript.so`, into
|
|
147
143
|
|
148
144
|
See https://github.com/yaml/yamlscript?#installing-yamlscript for more info.
|
149
145
|
|
150
|
-
|
151
146
|
## See Also
|
152
147
|
|
153
|
-
* [
|
154
|
-
* [
|
155
|
-
* [
|
156
|
-
* [
|
157
|
-
* [
|
148
|
+
* [YS Web Site](https://yamlscript.org)
|
149
|
+
* [YS Blog](https://yamlscript.org/blog)
|
150
|
+
* [YS Source Code](https://github.com/yaml/yamlscript)
|
151
|
+
* [YS Samples](https://github.com/yaml/yamlscript/tree/main/sample)
|
152
|
+
* [YS Programs](https://rosettacode.org/wiki/Category:YAMLScript)
|
158
153
|
* [YAML](https://yaml.org)
|
159
154
|
* [Clojure](https://clojure.org)
|
160
155
|
|
161
156
|
|
162
157
|
## Authors
|
163
158
|
|
164
|
-
|
165
159
|
* [Ingy döt Net](https://github.com/ingydotnet)
|
166
160
|
* [Delon R.Newman](https://github.com/delonnewman)
|
167
161
|
|
168
|
-
|
169
162
|
## License & Copyright
|
170
163
|
|
171
164
|
Copyright 2022-2025 Ingy döt Net <ingy@ingy.net>
|
data/doc/readme.md
CHANGED
@@ -13,14 +13,13 @@ puts data
|
|
13
13
|
File `file.ys`:
|
14
14
|
|
15
15
|
```yaml
|
16
|
-
!
|
16
|
+
!YS-v0:
|
17
17
|
|
18
18
|
name =: "World"
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
baz:: "Hello, $name!"
|
20
|
+
foo: [1, 2, ! inc(41)]
|
21
|
+
bar:: load("other.yaml")
|
22
|
+
baz:: "Hello, $name!"
|
24
23
|
```
|
25
24
|
|
26
25
|
File `other.yaml`:
|
data/lib/yamlscript/version.rb
CHANGED
data/lib/yamlscript.rb
CHANGED
@@ -16,7 +16,7 @@ class YAMLScript
|
|
16
16
|
# This value is automatically updated by 'make bump'.
|
17
17
|
# The version number is used to find the correct shared library file.
|
18
18
|
# We currently only support binding to an exact version of libyamlscript.
|
19
|
-
YAMLSCRIPT_VERSION = '0.1.
|
19
|
+
YAMLSCRIPT_VERSION = '0.1.93'
|
20
20
|
|
21
21
|
# A low-level interface to the native library
|
22
22
|
module LibYAMLScript
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yamlscript
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.93
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ingy döt Net
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-02-
|
12
|
+
date: 2025-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|