yamlscript 0.1.95__tar.gz → 0.1.97__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: yamlscript
3
- Version: 0.1.95
3
+ Version: 0.1.97
4
4
  Summary: Program in YAML — Code is Data
5
5
  Home-page: https://github.com/ingydotnet/yamlscript
6
6
  Author: Ingy döt Net
@@ -17,15 +17,14 @@ names-url =:
17
17
  "https://raw.githubusercontent.com/dominictarr/\
18
18
  random-name/master/first-names.json"
19
19
 
20
- name-list =: &first-names json/load(curl(names-url))
20
+ name-list =: names-url:curl:json/load
21
21
 
22
22
  # Data object with literal keys and generated values:
23
- name:: rand-nth(*first-names)
24
- aka:: name-list.rand-nth()
23
+ name:: iname-list:shuffle:first
24
+ aka:: name-list:rand-nth
25
25
  age:: &num 2 * 3 * 7
26
- color:: &hue qw(red green blue yellow)
27
- .shuffle()
28
- .first()
26
+ color:: &hue
27
+ rand-nth: qw(red green blue yellow)
29
28
  title:: "$(*num) shades of $(*hue)."
30
29
  ```
31
30
 
@@ -74,12 +73,12 @@ CLI binary `ys` to run:
74
73
  $ ys --compile file.ys
75
74
  (let
76
75
  [names-url "https://raw.githubusercontent.com/dominictarr/random-name/master/first-names.json"
77
- name-list (_& 'first-names (json/load (curl names-url)))]
76
+ name-list (json/load (curl names-url))]
78
77
  (%
79
- "name" (rand-nth (_** 'first-names))
78
+ "name" (first (shuffle name-list))
80
79
  "aka" (rand-nth name-list)
81
80
  "age" (_& 'num (mul+ 2 3 7))
82
- "color" (_& 'hue (first (shuffle (qw red green blue yellow))))
81
+ "color" (_& 'hue (rand-nth (qw red green blue yellow)))
83
82
  "title" (str (_** 'num) " shades of " (_** 'hue) ".")))
84
83
  ```
85
84
 
@@ -126,7 +125,7 @@ $ python prog.py
126
125
  You can install this module like any other Python module:
127
126
 
128
127
  ```bash
129
- $ pip install yamlscript
128
+ pip install yamlscript
130
129
  ```
131
130
 
132
131
  but you will need to have a system install of `libyamlscript.so`.
@@ -134,14 +133,14 @@ but you will need to have a system install of `libyamlscript.so`.
134
133
  One simple way to do that is with:
135
134
 
136
135
  ```bash
137
- $ curl https://yamlscript.org/install | bash
136
+ curl https://yamlscript.org/install | bash
138
137
  ```
139
138
 
140
139
  > Note: The above command will install the latest version of the YAMLScript
141
140
  command line utility, `ys`, and the shared library, `libyamlscript.so`, into
142
141
  `~/local/bin` and `~/.local/lib` respectively.
143
142
 
144
- See https://github.com/yaml/yamlscript?#installing-yamlscript for more info.
143
+ See <https://yamlscript.org/doc/install/> for more info.
145
144
 
146
145
  ## See Also
147
146
 
@@ -16,7 +16,7 @@ object that the YAMLScript code evaluates to.
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.95'
19
+ yamlscript_version = '0.1.97'
20
20
 
21
21
  import os, sys
22
22
  import ctypes
@@ -40,7 +40,7 @@ def find_libyamlscript_path():
40
40
  "Unsupported platform '%s' for yamlscript." % sys.platform)
41
41
 
42
42
  # We currently bind to an exact version of libyamlscript.
43
- # eg 'libyamlscript.so.0.1.95'
43
+ # eg 'libyamlscript.so.0.1.97'
44
44
  libyamlscript_name = \
45
45
  "libyamlscript.%s.%s" % (so, yamlscript_version)
46
46
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: yamlscript
3
- Version: 0.1.95
3
+ Version: 0.1.97
4
4
  Summary: Program in YAML — Code is Data
5
5
  Home-page: https://github.com/ingydotnet/yamlscript
6
6
  Author: Ingy döt Net
@@ -1,4 +1,4 @@
1
- version = '0.1.95'
1
+ version = '0.1.97'
2
2
 
3
3
  from setuptools import setup
4
4
  import pathlib
File without changes
File without changes
File without changes