yamlscript 0.1.65 → 0.1.66

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d7bf29855335f3bcf402174261766965ed5fe973d8ae146f61309e67b122a62
4
- data.tar.gz: d1823f514603647e7572ba71d7ad43f4f4828a7d9af158ba85fe350a6d85ddbf
3
+ metadata.gz: 4898a2bea185c4fa8ae98c0fdcf7feeeea91c364d8f05f53223a91d0e2220154
4
+ data.tar.gz: e01d3805540211046aa6e7a03a41fdb152e404e33786b8c156a1f863507819ea
5
5
  SHA512:
6
- metadata.gz: a2e6f2ef909d2d2041d1f2e82815d1cb7225ae2c81c92bbbf36df2c74229197dcfc83c8fa94903b5d5c6a2724391f3efb4e4c9571b2db837944d1d8c10ca711d
7
- data.tar.gz: 8e581fa11f646d6f56dbac7cab3f2556e660796318e863226ef880925ad1f56648d3f6d12214d7836a11ff37ca8d86cb082ef3f4af92dfa44c9777076b6690ba
6
+ metadata.gz: 0b0019ed6ceb0d12b9f2944146ed68bec7f4f2cabaff8fc7c51ad0bc764e4254ece1b10d2def1f6880a4852ba4f83e946cee0d63ad4320cbeb0807f1d181d247
7
+ data.tar.gz: 0e100b1565aa7d0697656c00ee4f56d7a5c97f1a71bf3ef3fca598f833574cfcdc04ceb84326481f0466c210d4faa1f96e02c2f43f8d0c030acf267b8e08fbd2
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.66] - 2024-07-11
2
+
3
+ - libyamlscript 0.1.66
4
+
1
5
  ## [0.1.65] - 2024-07-06
2
6
 
3
7
  - libyamlscript 0.1.65
data/ReadMe.md CHANGED
@@ -3,37 +3,52 @@
3
3
  YAMLScript
4
4
  ==========
5
5
 
6
- Program in YAML
6
+ Add Logic to Your YAML Files
7
7
 
8
8
 
9
9
  ## Synopsis
10
10
 
11
+ Load `file.yaml` with YAMLScript:
11
12
  ```yaml
12
- #!/usr/bin/env ys-0
13
+ !yamlscript/v0/
14
+
15
+ =>:
16
+ names =: curl(
17
+ "https://raw.githubusercontent.com/dominictarr/" +
18
+ "random-name/master/first-names.json")
19
+ .json/load()
20
+
21
+ name:: names.rand-nth()
22
+ aka:: names.rand-nth()
23
+ age:: 6 * 7
24
+ color: yellow
25
+ ```
13
26
 
14
- defn main(name='world'):
15
- say: "Hello, $name!"
27
+ and get:
28
+ ```json
29
+ {
30
+ "name": "Anthea",
31
+ "aka": "Patrizia",
32
+ "age": 42,
33
+ "color": "yellow"
34
+ }
16
35
  ```
17
36
 
18
37
 
19
38
  ## Description
20
39
 
21
- YAMLScript is a functional programming language with a stylized YAML syntax.
40
+ [YAMLScript](https://yamlscript.org) is a functional programming language with a
41
+ clean YAML syntax.
22
42
 
23
- YAMLScript can be used for:
43
+ YAMLScript can be used for enhancing ordinary [YAML](https://yaml.org) files
44
+ with functional operations, such as:
24
45
 
25
- * Enhancing ordinary YAML files with functional operations
26
- * Import parts of other YAML files to any node
27
- * String interpolation including function calls
28
- * Data transforms including ones defined by you
29
- * Writing new programs and applications
30
- * Run with `ys file.ys`
31
- * Or compile to binary executable with `ys -C file.ys`
32
- * Writing reusable shared libraries
33
- * High level code instead of C
34
- * Bindable to almost any programming language
46
+ * Import parts of other YAML files to any node
47
+ * String interpolation including function calls
48
+ * Data transforms including ones defined by you
35
49
 
36
- YAMLScript should be a drop-in replacement for your YAML loader!
50
+ This YAMLScript library should be a drop-in replacement for your current YAML
51
+ loader!
37
52
 
38
53
  Most existing YAML files are already valid YAMLScript files.
39
54
  This means that YAMLScript works as a normal YAML loader, but can also evaluate
@@ -53,6 +68,14 @@ CLI binary, `ys`, to run:
53
68
 
54
69
  ```text
55
70
  $ ys --compile file.ys
71
+ (def names
72
+ (_-> (curl (+_ "https://raw.githubusercontent.com/dominictarr/"
73
+ "random-name/master/first-names.json"))
74
+ (list json/load)))
75
+ {"age" (*_ 6 7),
76
+ "aka" (_-> names (list rand-nth)),
77
+ "color" "yellow",
78
+ "name" (_-> names (list rand-nth))}
56
79
  ```
57
80
 
58
81
 
@@ -120,9 +143,11 @@ See https://github.com/yaml/yamlscript?#installing-yamlscript for more info.
120
143
 
121
144
  ## See Also
122
145
 
123
- * [The YAMLScript Web Site](https://yamlscript.org)
124
- * [The YAMLScript Blog](https://yamlscript.org/blog)
125
- * [The YAMLScript Source Code](https://github.com/yaml/yamlscript)
146
+ * [YAMLScript Web Site](https://yamlscript.org)
147
+ * [YAMLScript Blog](https://yamlscript.org/blog)
148
+ * [YAMLScript Source Code](https://github.com/yaml/yamlscript)
149
+ * [YAMLScript Samples](https://github.com/yaml/yamlscript/tree/main/sample)
150
+ * [YAMLScript Programs](https://rosettacode.org/wiki/Category:YAMLScript)
126
151
  * [YAML](https://yaml.org)
127
152
  * [Clojure](https://clojure.org)
128
153
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class YAMLScript
4
- VERSION = "0.1.65"
4
+ VERSION = "0.1.66"
5
5
  end
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.65'
19
+ YAMLSCRIPT_VERSION = '0.1.66'
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.65
4
+ version: 0.1.66
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: 2024-07-06 00:00:00.000000000 Z
12
+ date: 2024-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest