cheap_random 0.9.3 → 0.9.4
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.
- data/.gitignore +6 -0
- data/README.md +4 -4
- data/cheap_random.gemspec +8 -3
- data/lib/cheap_random/version.rb +1 -1
- metadata +23 -20
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -11,11 +11,11 @@ Simple and powerful: The **CheapRandom algorithm** is fast, fast enough to be pr
|
|
11
11
|
|
12
12
|
Version
|
13
13
|
-------
|
14
|
-
v0.9.
|
14
|
+
v0.9.4 with comprehensive tests, developed using ruby 1.9.3 and rspec 2.10.0 is the same as v0.9.1 (gem v0.9.2) aside from the addition of the **examples2** directory (for gem v0.9.3) and the **examples3** directory (for MS Windows).
|
15
15
|
|
16
16
|
Installation
|
17
17
|
------------
|
18
|
-
Get the v0.9.
|
18
|
+
Get the v0.9.4 gem or clone the repository. Create a directory called **random** in the repository root. Use **examples/make\_seed.rb** to make a **the.seed** file - (a 256 byte permutation file) from arbitrary data using the **CheapRandom default seed**.
|
19
19
|
|
20
20
|
Usage and documentation
|
21
21
|
-----------------------
|
@@ -85,11 +85,11 @@ There are a number of intriguing possible uses for the **CheapRandom algorithm**
|
|
85
85
|
|
86
86
|
Additional Examples - C code and In Place File Processing
|
87
87
|
---------------------------------------------------------
|
88
|
-
The **examples2** directory contains examples related to **example2/cr.c** These examples are designed to be on the PATH and require the use of a C compiler.
|
88
|
+
The **examples2** directory contains examples related to **example2/cr.c** These examples are designed to be on the PATH and require the use of a C compiler. The **examples3** directory contains examples suitable for use on Microsoft Windows.
|
89
89
|
|
90
90
|
cr.c Cheap Random Filter and Friends
|
91
91
|
------------------------------------
|
92
|
-
**gcc -Wall cr.c -o cr** creates the **cr** cheap random filter. Running **cr h** writes out some help text. **cr <somefile
|
92
|
+
**gcc -Wall cr.c -o cr** creates the **cr** cheap random filter. Running **cr h** writes out some help text. **cr <somefile to stdout** and **cr u <somefile.random to stdout** are the most basic use of **cr**. **the.seed** is hard coded into **cr**. To see how, use **chex\_pipe.rb <the.seed** and compare the console output to the definition of SEED in **cr.c**. **the.seed** was generated by running the bash script **make_seed pet\_cat.png**
|
93
93
|
|
94
94
|
|
95
95
|
crf.rb Cheap Random File, In Place File Processing
|
data/cheap_random.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'cheap_random'
|
3
|
-
s.version = '0.9.
|
4
|
-
s.date = '2012-
|
3
|
+
s.version = '0.9.4'
|
4
|
+
s.date = '2012-07-12'
|
5
5
|
s.summary = 'pseudo random number generation from arbitrary data'
|
6
6
|
s.description = <<-EOT
|
7
7
|
**CheapRandom** is a set of tools for pseudo random number generation from arbitrary data. The properties of the **CheapRandom seed** make convenient random number generation possible -- useful for easily repeatable software testing. The **CheapRandom algorithm** is information conserving and generally appears to produce lower chi-squared statistics than **Kernel::rand** i.e. it appears to be more random. The **CheapRandom algorithm**, an original work by Bardi Einarsson, has been in use for 6 years.
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
|
10
10
|
s.authors = ['Bardi Einarsson']
|
11
11
|
s.email = ['bardi_e@hotmail.com']
|
12
|
-
s.homepage = '
|
12
|
+
s.homepage = 'http://cheaprandom.publishpath.com'
|
13
13
|
s.required_ruby_version = '>= 1.9.2'
|
14
14
|
s.add_development_dependency('rspec', '~> 2.2')
|
15
15
|
s.files = %w(
|
@@ -30,6 +30,11 @@ examples2/make_seed
|
|
30
30
|
examples2/pet_cat.png
|
31
31
|
examples2/rpb.c
|
32
32
|
examples2/the.seed
|
33
|
+
examples3/cr.c
|
34
|
+
examples3/crx.bat
|
35
|
+
examples3/crxs.bat
|
36
|
+
examples3/make_seed.bat
|
37
|
+
examples3/rpb.c
|
33
38
|
lib/cheap_big_file.rb
|
34
39
|
lib/cheap_bits.rb
|
35
40
|
lib/cheap_byte_count.rb
|
data/lib/cheap_random/version.rb
CHANGED
metadata
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cheap_random
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
version: 0.9.4
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Bardi Einarsson
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
17
18
|
requirements:
|
18
19
|
- - ~>
|
19
20
|
- !ruby/object:Gem::Version
|
20
21
|
version: '2.2'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
25
|
none: false
|
22
|
-
requirement: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '2.2'
|
27
|
-
none: false
|
28
|
-
prerelease: false
|
29
|
-
type: :development
|
30
30
|
description: ! ' **CheapRandom** is a set of tools for pseudo random number generation
|
31
31
|
from arbitrary data. The properties of the **CheapRandom seed** make convenient
|
32
32
|
random number generation possible -- useful for easily repeatable software testing.
|
@@ -35,7 +35,7 @@ description: ! ' **CheapRandom** is a set of tools for pseudo random number g
|
|
35
35
|
more random. The **CheapRandom algorithm**, an original work by Bardi Einarsson,
|
36
36
|
has been in use for 6 years.
|
37
37
|
|
38
|
-
|
38
|
+
'
|
39
39
|
email:
|
40
40
|
- bardi_e@hotmail.com
|
41
41
|
executables: []
|
@@ -59,6 +59,11 @@ files:
|
|
59
59
|
- examples2/pet_cat.png
|
60
60
|
- examples2/rpb.c
|
61
61
|
- examples2/the.seed
|
62
|
+
- examples3/cr.c
|
63
|
+
- examples3/crx.bat
|
64
|
+
- examples3/crxs.bat
|
65
|
+
- examples3/make_seed.bat
|
66
|
+
- examples3/rpb.c
|
62
67
|
- lib/cheap_big_file.rb
|
63
68
|
- lib/cheap_bits.rb
|
64
69
|
- lib/cheap_byte_count.rb
|
@@ -71,30 +76,28 @@ files:
|
|
71
76
|
- spec/cheap_bits_spec.rb
|
72
77
|
- spec/cheap_random_spec.rb
|
73
78
|
- spec/using_cheap_bits_cheap_random_spec.rb
|
74
|
-
homepage:
|
79
|
+
homepage: http://cheaprandom.publishpath.com
|
75
80
|
licenses: []
|
76
|
-
post_install_message:
|
81
|
+
post_install_message:
|
77
82
|
rdoc_options: []
|
78
83
|
require_paths:
|
79
84
|
- lib
|
80
85
|
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
81
87
|
requirements:
|
82
88
|
- - ! '>='
|
83
89
|
- !ruby/object:Gem::Version
|
84
90
|
version: 1.9.2
|
85
|
-
none: false
|
86
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
none: false
|
87
93
|
requirements:
|
88
94
|
- - ! '>='
|
89
95
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
91
|
-
MA==
|
92
|
-
none: false
|
96
|
+
version: '0'
|
93
97
|
requirements: []
|
94
|
-
rubyforge_project:
|
95
|
-
rubygems_version: 1.8.
|
96
|
-
signing_key:
|
98
|
+
rubyforge_project:
|
99
|
+
rubygems_version: 1.8.23
|
100
|
+
signing_key:
|
97
101
|
specification_version: 3
|
98
102
|
summary: pseudo random number generation from arbitrary data
|
99
103
|
test_files: []
|
100
|
-
...
|