klam 0.0.9 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d00808d9148331f3192c0aa4a1df4f32c43cd88c
4
- data.tar.gz: 9662d5e9224d86d0cbee698f035ab2cbbfa841e6
2
+ SHA256:
3
+ metadata.gz: c68a51fe21864540fb096aa07d6ccd9d9b017751be133a4d7b97edfeb1946a89
4
+ data.tar.gz: 73cd634d6d1aa173bed9e31fcb85b7428d7cef65a14763ec781190cc502d9f88
5
5
  SHA512:
6
- metadata.gz: 30d88af8561bd70703de18787c33c36f68cfe49bc1e49efedc76a32222478da06c59bf0dbc8c7060d4b11b3085dd56ea4519d77e905483c7650be6fc15b63397
7
- data.tar.gz: 7a56584c975befb96dc8a3f730173f62f0b3dd974e10dfbc2cc08b024ac746fc13248f52a369ab91074ad2fb552cf0e358b9a3056a8d18470131daf15cdd7842
6
+ metadata.gz: '0191e54483d1ab554d66b3e3772b384f677aef8460b8ad0efd45cacacf5ff114599ac0d9d7e1adbdc8b9a8fe53821f9bfc042dc47006d14d8cafa97d36fe1382'
7
+ data.tar.gz: e4685c2607818aeb6d8427e902e94dd75e21b50ece686e56b41c19ea2aa08883769d74628ff2009d17217ff26226315878e9ecd60ad1e0d29305ac32e2f9fe8e
@@ -1,8 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
- - 2.0.0
5
- - 2.1.0
6
- - 2.1.1
7
- - jruby-1.7.17
8
- - rbx
4
+ - 2.0
5
+ - 2.1
6
+ - 2.2
7
+ - 2.3
8
+ - 2.4
9
+ - 2.5
10
+ - 2.6
11
+ - jruby
@@ -1,6 +1,27 @@
1
1
  Relase History
2
2
  ==============
3
3
 
4
+ v0.1.1 -- May 16, 2019
5
+ ----------------------
6
+ * Re-release
7
+
8
+ v0.1.0 -- May 16, 2019
9
+ ----------------------
10
+ New Features
11
+ ~~~~~~~~~~~~
12
+ * Allow comma in symbols. This is required to support Shen 21.0 and above.
13
+
14
+ Compatibility Updates
15
+ ~~~~~~~~~~~~~~~~~~~~~
16
+ * Use Integer rather than Fixnum.
17
+ * Quiet rspec warnings w.r.t. specs for raised exceptions.
18
+
19
+ v0.0.9 -- March 17, 2015
20
+ ------------------------
21
+ Bug Fixes
22
+ ~~~~~~~~~
23
+ * Fixed compatibility issue with Ruby 1.9.3.
24
+
4
25
  v0.0.8 -- March 15, 2015
5
26
  ------------------------
6
27
  Performance Improvements
@@ -2,7 +2,7 @@ require 'singleton'
2
2
 
3
3
  module Klam
4
4
  class Lexer
5
- SYMBOL_CHARS = /[-=*\/+_?$!\@~><&%'#`;:{}a-zA-Z0-9.]/
5
+ SYMBOL_CHARS = /[-=*\/+_?$!\@~><&%'#`;:{}a-zA-Z0-9.,]/
6
6
 
7
7
  # Syntax tokens
8
8
  class OpenParen
@@ -18,7 +18,7 @@ module Klam
18
18
  # the integer 3 by the interger 2 must yield 1.5 rather than 1. We'd
19
19
  # like to keep things in integers as much as possible, so we coerce a
20
20
  # to a float only if integer division is not possible.
21
- if a.kind_of?(Fixnum) && b.kind_of?(Fixnum) && a.remainder(b) != 0
21
+ if a.kind_of?(Integer) && b.kind_of?(Integer) && a.remainder(b) != 0
22
22
  a = a.to_f
23
23
  end
24
24
 
@@ -1,3 +1,3 @@
1
1
  module Klam
2
- VERSION = '0.0.9'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -47,9 +47,9 @@ describe Klam::Lexer do
47
47
  end
48
48
 
49
49
  describe 'numbers' do
50
- it 'reads integers as Fixnums' do
50
+ it 'reads integers as Integers' do
51
51
  num = lexer("37").next
52
- expect(num).to be_kind_of(Fixnum)
52
+ expect(num).to be_kind_of(Integer)
53
53
  expect(num).to eq(37)
54
54
  end
55
55
 
@@ -84,7 +84,7 @@ describe Klam::Lexer do
84
84
  it 'treats a trailing decimal followed by EOF as a symbol' do
85
85
  l = lexer('7.')
86
86
  num = l.next
87
- expect(num).to be_kind_of(Fixnum)
87
+ expect(num).to be_kind_of(Integer)
88
88
  expect(num).to eq(7)
89
89
 
90
90
  sym = l.next
@@ -95,7 +95,7 @@ describe Klam::Lexer do
95
95
  it 'treats a trailing decimal followed by non-digit as a symbol' do
96
96
  l = lexer('7.a')
97
97
  num = l.next
98
- expect(num).to be_kind_of(Fixnum)
98
+ expect(num).to be_kind_of(Integer)
99
99
  expect(num).to eq(7)
100
100
 
101
101
  sym = l.next
@@ -9,7 +9,7 @@ describe Klam::Primitives::Arithmetic do
9
9
  end
10
10
 
11
11
  it 'returns an integer when both arguments are integers' do
12
- expect(send(:+, 1, 2)).to be_kind_of(Fixnum)
12
+ expect(send(:+, 1, 2)).to be_kind_of(Integer)
13
13
  end
14
14
 
15
15
  it 'returns a real when either arguments are reals' do
@@ -28,7 +28,7 @@ describe Klam::Primitives::Arithmetic do
28
28
  end
29
29
 
30
30
  it 'returns an integer when both arguments are integers' do
31
- expect(send(:-, 1, 2)).to be_kind_of(Fixnum)
31
+ expect(send(:-, 1, 2)).to be_kind_of(Integer)
32
32
  end
33
33
 
34
34
  it 'returns a real when either arguments are reals' do
@@ -47,7 +47,7 @@ describe Klam::Primitives::Arithmetic do
47
47
  end
48
48
 
49
49
  it 'returns an integer when both arguments are integers' do
50
- expect(send(:*, 1, 2)).to be_kind_of(Fixnum)
50
+ expect(send(:*, 1, 2)).to be_kind_of(Integer)
51
51
  end
52
52
 
53
53
  it 'returns a real when either arguments are reals' do
@@ -66,7 +66,7 @@ describe Klam::Primitives::Arithmetic do
66
66
  end
67
67
 
68
68
  it 'returns an integer when both arguments are integers and there is no remainder' do
69
- expect(send(:/, 6, 2)).to be_kind_of(Fixnum)
69
+ expect(send(:/, 6, 2)).to be_kind_of(Integer)
70
70
  end
71
71
 
72
72
  it 'returns a real otherwise' do
@@ -22,7 +22,7 @@ describe Klam::Primitives::Lists do
22
22
  end
23
23
 
24
24
  it 'raises an exception when applied to the empty list' do
25
- expect { hd(@empty_list) }.to raise_error
25
+ expect { hd(@empty_list) }.to raise_error(NoMethodError)
26
26
  end
27
27
  end
28
28
 
@@ -32,7 +32,7 @@ describe Klam::Primitives::Lists do
32
32
  end
33
33
 
34
34
  it 'raises an exception when applied to the empty list' do
35
- expect { tl(@empty_list) }.to raise_error
35
+ expect { tl(@empty_list) }.to raise_error(NoMethodError)
36
36
  end
37
37
  end
38
38
 
@@ -28,13 +28,13 @@ describe Klam::Primitives::Vectors do
28
28
  it 'raises an error if N is negative' do
29
29
  expect {
30
30
  send(:"address->", @vec, -1, :foo)
31
- }.to raise_error
31
+ }.to raise_error(::Klam::Error)
32
32
  end
33
33
 
34
34
  it 'raises an error if N is >= the size of the V' do
35
35
  expect {
36
36
  send(:"address->", @vec, 3, :foo)
37
- }.to raise_error
37
+ }.to raise_error(::Klam::Error)
38
38
  end
39
39
  end
40
40
 
@@ -57,13 +57,13 @@ describe Klam::Primitives::Vectors do
57
57
  it 'raises an error if N is negative' do
58
58
  expect {
59
59
  send(:"<-address", @vec, -1)
60
- }.to raise_error
60
+ }.to raise_error(::Klam::Error)
61
61
  end
62
62
 
63
63
  it 'raises an error if N is >= the size of the V' do
64
64
  expect {
65
65
  send(:"<-address", @vec, 3)
66
- }.to raise_error
66
+ }.to raise_error(::Klam::Error)
67
67
  end
68
68
  end
69
69
 
metadata CHANGED
@@ -1,93 +1,93 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: klam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Spurrier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2019-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '10.4'
20
- - - ">="
20
+ - - "~>"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '10.4'
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '10.4'
30
- - - ">="
30
+ - - "~>"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '10.4'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rspec
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '3.1'
40
37
  - - ">="
41
38
  - !ruby/object:Gem::Version
42
39
  version: 3.1.0
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '3.1'
43
43
  type: :development
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '3.1'
50
47
  - - ">="
51
48
  - !ruby/object:Gem::Version
52
49
  version: 3.1.0
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '3.1'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: rspec-autotest
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - "~>"
58
- - !ruby/object:Gem::Version
59
- version: '1.0'
60
57
  - - ">="
61
58
  - !ruby/object:Gem::Version
62
59
  version: 1.0.0
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '1.0'
70
67
  - - ">="
71
68
  - !ruby/object:Gem::Version
72
69
  version: 1.0.0
70
+ - - "~>"
71
+ - !ruby/object:Gem::Version
72
+ version: '1.0'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: ZenTest
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - "~>"
77
+ - - ">="
78
78
  - !ruby/object:Gem::Version
79
79
  version: '4.11'
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '4.11'
83
83
  type: :development
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '4.11'
90
- - - ">="
90
+ - - "~>"
91
91
  - !ruby/object:Gem::Version
92
92
  version: '4.11'
93
93
  description: Klam is a Ruby implementation of Kl, the small Lisp on top of which the
@@ -128,7 +128,6 @@ files:
128
128
  - lib/klam/constant.rb
129
129
  - lib/klam/constant_generator.rb
130
130
  - lib/klam/converters.rb
131
- - lib/klam/converters/.list.rb.swp
132
131
  - lib/klam/converters/list.rb
133
132
  - lib/klam/environment.rb
134
133
  - lib/klam/error.rb
@@ -200,39 +199,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
199
  - !ruby/object:Gem::Version
201
200
  version: '0'
202
201
  requirements: []
203
- rubyforge_project:
204
- rubygems_version: 2.4.5
202
+ rubygems_version: 3.0.3
205
203
  signing_key:
206
204
  specification_version: 4
207
205
  summary: Klam is a Ruby implementation of the Kl.
208
- test_files:
209
- - spec/functional/application_spec.rb
210
- - spec/functional/atoms_spec.rb
211
- - spec/functional/extensions/do_spec.rb
212
- - spec/functional/extensions/interop_spec.rb
213
- - spec/functional/primitives/assignments_spec.rb
214
- - spec/functional/primitives/boolean_operations_spec.rb
215
- - spec/functional/primitives/error_handling_spec.rb
216
- - spec/functional/primitives/generic_functions_spec.rb
217
- - spec/functional/tail_call_optimization_spec.rb
218
- - spec/spec_helper.rb
219
- - spec/unit/klam/absvector_spec.rb
220
- - spec/unit/klam/compilation_stages/constantize_constructed_constants_spec.rb
221
- - spec/unit/klam/compilation_stages/convert_lexical_variables_spec.rb
222
- - spec/unit/klam/compilation_stages/convert_self_tail_calls_to_loops_spec.rb
223
- - spec/unit/klam/compilation_stages/curry_abstraction_applications_spec.rb
224
- - spec/unit/klam/compilation_stages/make_abstractions_variadic_spec.rb
225
- - spec/unit/klam/converters/list_spec.rb
226
- - spec/unit/klam/lexer_spec.rb
227
- - spec/unit/klam/primitives/arithmetic_spec.rb
228
- - spec/unit/klam/primitives/boolean_operations_spec.rb
229
- - spec/unit/klam/primitives/error_handling_spec.rb
230
- - spec/unit/klam/primitives/lists_spec.rb
231
- - spec/unit/klam/primitives/strings_spec.rb
232
- - spec/unit/klam/primitives/symbols_spec.rb
233
- - spec/unit/klam/primitives/time_spec.rb
234
- - spec/unit/klam/primitives/vectors_spec.rb
235
- - spec/unit/klam/reader_spec.rb
236
- - spec/unit/klam/template_spec.rb
237
- - spec/unit/klam/variable_spec.rb
238
- - spec/unit/klam/version_spec.rb
206
+ test_files: []