hilbert 0.0.2700000 → 0.0.2700001
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +16 -16
- data/Rakefile +2 -2
- data/bin/{qlang → hilbert} +6 -6
- data/ext/hilbert/extconf.rb +3 -0
- data/ext/{qlang/qlang.c → hilbert/hilbert.c} +2 -2
- data/{qlang.gemspec → hilbert.gemspec} +3 -3
- data/legacy_rspec/objects/list_spec.rb +1 -1
- data/legacy_rspec/objects/matrix_spec.rb +1 -1
- data/legacy_rspec/objects/vector_spec.rb +1 -1
- data/lib/{qlang → hilbert}/api/func_api.rb +1 -1
- data/lib/{qlang → hilbert}/api/integral_api.rb +1 -1
- data/lib/{qlang → hilbert}/api/limit_api.rb +1 -1
- data/lib/{qlang → hilbert}/api/list_api.rb +1 -1
- data/lib/{qlang → hilbert}/api/matrix_api.rb +1 -1
- data/lib/{qlang → hilbert}/api/sigma_api.rb +1 -1
- data/lib/{qlang → hilbert}/api/vector_api.rb +1 -1
- data/lib/hilbert/api.rb +23 -0
- data/lib/{qlang → hilbert}/exec.rb +5 -5
- data/lib/{qlang → hilbert}/iq.rb +1 -1
- data/lib/{qlang → hilbert}/lexer/base.rb +2 -2
- data/lib/{qlang → hilbert}/lexer/formula_lexer.rb +1 -1
- data/lib/{qlang → hilbert}/lexer/main_lexer.rb +1 -1
- data/lib/{qlang → hilbert}/lexer/tokens.rb +1 -1
- data/lib/{qlang → hilbert}/lexer.rb +3 -3
- data/lib/{qlang → hilbert}/meta_info.rb +1 -1
- data/lib/{qlang → hilbert}/parser/base.rb +2 -2
- data/lib/{qlang → hilbert}/parser/formula_parser.rb +2 -2
- data/lib/{qlang → hilbert}/parser/func_parser.rb +2 -2
- data/lib/{qlang → hilbert}/parser/integral_parser.rb +1 -1
- data/lib/{qlang → hilbert}/parser/limit_parser.rb +1 -1
- data/lib/{qlang → hilbert}/parser/list_parser.rb +1 -1
- data/lib/{qlang → hilbert}/parser/matrix_parser.rb +1 -1
- data/lib/{qlang → hilbert}/parser/sigma_parser.rb +1 -1
- data/lib/{qlang → hilbert}/parser/vector_parser.rb +1 -1
- data/lib/{qlang → hilbert}/parser.rb +24 -31
- data/lib/hilbert/version.rb +3 -0
- data/lib/{qlang.rb → hilbert.rb} +7 -7
- data/test/internal/test_tokens.rb +1 -1
- data/test/interpreter/base.rb +4 -4
- data/test/interpreter/test_limit.rb +1 -1
- data/test/minitest_helper.rb +1 -1
- data/test/q_matrix/test_q_matrix.rb +2 -2
- data/test/test_qlang.rb +3 -3
- metadata +51 -51
- data/ext/qlang/extconf.rb +0 -3
- data/lib/qlang/api.rb +0 -23
- data/lib/qlang/version.rb +0 -3
- /data/ext/{qlang → hilbert}/QMatrix/q_matrix.c +0 -0
- /data/ext/{qlang/qlang.h → hilbert/hilbert.h} +0 -0
- /data/lib/{qlang → hilbert}/utils/langs.yml +0 -0
- /data/lib/{qlang → hilbert}/utils/ruby_ext.rb +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NzY5Mjc1OWIyMjcyNDczZGYzZTljN2UyMDNjMzViMTVjZWQzN2U4Mw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8fd42993b7f3a7468a22b3a27c87106933b2d103
|
4
|
+
data.tar.gz: 63692355f00bae1ba2f6e64b18dc68430246d82b
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
YWY4MDA4YzZiYmQ4NjZkYmM1NmY2MzM4Y2I3NmQyZmE4MWJhZjlmYTZiZDU2
|
11
|
-
Y2Y1NWYxODdiMjFjMjZkMWQ2YWQ0Njc1NTUzNGVjYmNkODQ1OGY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZjNmMTBlZGMxNzc5OGQzNTVmOTg3MzAwYWNlOWJjMzNjMjkzZWYwN2U1Zjkz
|
14
|
-
NDVmZDQxODFlYzU1YzJjMmI5NjliOTI0MzM3YTM3NjdmZmFhYjU4M2NmZDc5
|
15
|
-
YTEzYzRmMWQxMjY3YzFjMGI5YzY2ZDA3MjdhYTIwNTgwMGVkZjI=
|
6
|
+
metadata.gz: a10b5ce2eb9dc7a5ed093136b0a93f9c71b9efc6c942abe95664344127a7dc6641c7f4785504211d3acbb2cb3e5e3a8a540c0d252331223fb4c419dded3c0e52
|
7
|
+
data.tar.gz: 5ba9c0c6320dc87989ef4979d0ab89c783006843b0cd9db6bd881710a46c1c374225b2a788253ff5aa5e60591f7312d5c2dc179565db241acbf040f605659787
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# Hilbert
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/hilbert.svg)](http://badge.fury.io/rb/hilbert) [![Build Status](https://travis-ci.org/gogotanaka/Q.svg?branch=master)](https://travis-ci.org/gogotanaka/Q) [![Coverage Status](https://coveralls.io/repos/gogotanaka/Q/badge.png?branch=master)](https://coveralls.io/r/gogotanaka/Q?branch=master) [![Code Climate](https://codeclimate.com/github/gogotanaka/Q/badges/gpa.svg)](https://codeclimate.com/github/gogotanaka/Q) [![Dependency Status](https://gemnasium.com/gogotanaka/Q.svg)](https://gemnasium.com/gogotanaka/Q)
|
4
4
|
|
5
5
|
## Do you know the one best language in this world?
|
6
6
|
|
@@ -8,23 +8,23 @@
|
|
8
8
|
|
9
9
|
## How can we deal something as great as mathematics in a discrete world?
|
10
10
|
|
11
|
-
####
|
11
|
+
#### Hilbert is the answer.
|
12
12
|
|
13
|
-
|
13
|
+
Hilbert lets you have a sense of mathematics using a keyboard, the same as you would with a pen.
|
14
14
|
|
15
15
|
```
|
16
16
|
+---Discrete world---+ +------Mathematics-------+
|
17
17
|
| Ruby | | axiom |
|
18
|
-
| TeX
|
18
|
+
| TeX |<---- Hilbert ---->| Uncountable noun |
|
19
19
|
| Python | | real number topology |
|
20
20
|
+--------------------+ +------------------------+
|
21
21
|
```
|
22
22
|
|
23
23
|
## Demo
|
24
24
|
|
25
|
-
The code below is input and output for the
|
25
|
+
The code below is input and output for the Hilbert interpreter
|
26
26
|
|
27
|
-
(you can try it by `
|
27
|
+
(you can try it by `hilbert -i`)
|
28
28
|
|
29
29
|
### Differentiate
|
30
30
|
|
@@ -96,28 +96,28 @@ f(1, 2)
|
|
96
96
|
|
97
97
|
## How to use
|
98
98
|
|
99
|
-
Install
|
99
|
+
Install hilbert gem.
|
100
100
|
|
101
|
-
$ gem install
|
101
|
+
$ gem install hilbert
|
102
102
|
|
103
103
|
## Interpreter
|
104
104
|
|
105
|
-
$
|
106
|
-
|
105
|
+
$ hilbert -i
|
106
|
+
Hilbert:->
|
107
107
|
|
108
108
|
## Use as native language
|
109
109
|
|
110
110
|
### Compile into R
|
111
111
|
|
112
|
-
$
|
112
|
+
$ hilbert -r foo.hr
|
113
113
|
|
114
114
|
### Compile into Ruby
|
115
115
|
|
116
|
-
$
|
116
|
+
$ hilbert -rb foo.hr
|
117
117
|
|
118
118
|
### Compile into Python
|
119
119
|
|
120
|
-
$
|
120
|
+
$ hilbert -py foo.hr
|
121
121
|
|
122
122
|
|
123
123
|
## Use as math template within other langs
|
@@ -131,14 +131,14 @@ class ExampleClass
|
|
131
131
|
|
132
132
|
I love mathematics.
|
133
133
|
a = (1 3 4)
|
134
|
-
# your
|
134
|
+
# your Hilbert codes
|
135
135
|
Q.E.D
|
136
136
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
```
|
140
140
|
|
141
|
-
$
|
141
|
+
$ hilbert -rb example.rb
|
142
142
|
|
143
143
|
|
144
144
|
```rb
|
data/Rakefile
CHANGED
data/bin/{qlang → hilbert}
RENAMED
@@ -1,12 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'hilbert'
|
4
4
|
|
5
5
|
# Q command line
|
6
|
-
require '
|
6
|
+
require 'hilbert/exec'
|
7
7
|
|
8
8
|
# Q interpreter
|
9
|
-
require '
|
9
|
+
require 'hilbert/iq'
|
10
10
|
|
11
11
|
# TODO: There are vanch of todo ..
|
12
12
|
case ARGV.first
|
@@ -15,15 +15,15 @@ when '-i'
|
|
15
15
|
print 'Q:-> '
|
16
16
|
begin
|
17
17
|
input = $stdin.gets
|
18
|
-
output =
|
18
|
+
output = Hilbert::Iq.execute(input)
|
19
19
|
$stdout.puts output
|
20
20
|
rescue => e
|
21
21
|
puts e
|
22
22
|
end
|
23
23
|
end
|
24
24
|
when '-v'
|
25
|
-
puts
|
25
|
+
puts Hilbert::VERSION
|
26
26
|
when '-r', '-rb', '-py'
|
27
|
-
exec =
|
27
|
+
exec = Hilbert::Exec::Compiler.new(ARGV)
|
28
28
|
exec.output!
|
29
29
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#include "
|
1
|
+
#include "hilbert.h"
|
2
2
|
#include <stdio.h>
|
3
3
|
#define Need_Float(x) do {if (!RB_TYPE_P(x, T_FLOAT)) {(x) = rb_to_float(x);}} while(0)
|
4
4
|
#define GET_FLOAT(x) Need_Float(x);(x) = RFLOAT_VALUE(x)
|
@@ -49,7 +49,7 @@ execute(VALUE self, VALUE a, VALUE b, VALUE n)
|
|
49
49
|
|
50
50
|
|
51
51
|
void
|
52
|
-
|
52
|
+
Init_hilbert(void)
|
53
53
|
{
|
54
54
|
VALUE rb_mQMatrix = rb_define_class("QMatrix", rb_cObject);
|
55
55
|
rb_define_method(rb_mQMatrix, "execute", execute, 3);
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'hilbert/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'hilbert'
|
8
|
-
spec.version =
|
8
|
+
spec.version = Hilbert::VERSION
|
9
9
|
spec.authors = ['gogotanaka']
|
10
10
|
spec.email = ['mail@tanakakazuki.com']
|
11
|
-
spec.extensions = ['ext/
|
11
|
+
spec.extensions = ['ext/hilbert/extconf.rb']
|
12
12
|
spec.summary = %q{Enjoy MATH!}
|
13
13
|
spec.description = %q{Enjoy MATH!}
|
14
14
|
spec.homepage = 'http://q-language.org/'
|
data/lib/hilbert/api.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'hilbert/api/matrix_api'
|
2
|
+
require 'hilbert/api/vector_api'
|
3
|
+
require 'hilbert/api/list_api'
|
4
|
+
require 'hilbert/api/func_api'
|
5
|
+
require 'hilbert/api/integral_api'
|
6
|
+
require 'hilbert/api/limit_api'
|
7
|
+
require 'hilbert/api/sigma_api'
|
8
|
+
|
9
|
+
module Hilbert
|
10
|
+
module Api
|
11
|
+
class ::Matrix
|
12
|
+
def to_q
|
13
|
+
rows.map(&:join_by_sp).join('; ').parentheses
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class ::Vector
|
18
|
+
def to_q
|
19
|
+
elements.join_by_sp.parentheses
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Hilbert
|
2
2
|
module Exec
|
3
3
|
class Compiler
|
4
4
|
def initialize(args)
|
@@ -26,11 +26,11 @@ module Qlang
|
|
26
26
|
def ch_compile_type(lang)
|
27
27
|
case lang
|
28
28
|
when '-rb'
|
29
|
-
|
29
|
+
Hilbert.to_ruby
|
30
30
|
when '-r'
|
31
|
-
|
31
|
+
Hilbert.to_r
|
32
32
|
when '-py'
|
33
|
-
|
33
|
+
Hilbert.to_python
|
34
34
|
else
|
35
35
|
print 'Q support only Ruby and R now.'
|
36
36
|
end
|
@@ -41,7 +41,7 @@ module Qlang
|
|
41
41
|
input_string = read_file(file)
|
42
42
|
file.close
|
43
43
|
input_string.gsub(/(.*)I love mathematics\.(.*)Q\.E\.D(.*)/m) {
|
44
|
-
"#{$1}#{Kconv.tosjis(
|
44
|
+
"#{$1}#{Kconv.tosjis(Hilbert.compile($2))}#{$3}"
|
45
45
|
}
|
46
46
|
end
|
47
47
|
|
data/lib/{qlang → hilbert}/iq.rb
RENAMED
@@ -1,17 +1,17 @@
|
|
1
|
-
require '
|
1
|
+
require 'hilbert/api'
|
2
2
|
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require '
|
6
|
-
require '
|
7
|
-
require '
|
8
|
-
require '
|
9
|
-
require '
|
10
|
-
require '
|
3
|
+
require 'hilbert/parser/base'
|
4
|
+
require 'hilbert/parser/matrix_parser'
|
5
|
+
require 'hilbert/parser/vector_parser'
|
6
|
+
require 'hilbert/parser/list_parser'
|
7
|
+
require 'hilbert/parser/func_parser'
|
8
|
+
require 'hilbert/parser/integral_parser'
|
9
|
+
require 'hilbert/parser/limit_parser'
|
10
|
+
require 'hilbert/parser/sigma_parser'
|
11
11
|
|
12
|
-
require '
|
12
|
+
require 'hilbert/parser/formula_parser'
|
13
13
|
|
14
|
-
module
|
14
|
+
module Hilbert
|
15
15
|
module Parser
|
16
16
|
include Lexer::Tokens
|
17
17
|
SYM = '\w+'
|
@@ -25,26 +25,19 @@ module Qlang
|
|
25
25
|
when /:(vector)(\d+)/, /:(matrix)(\d+)/, /:(tmatrix)(\d+)/, /:(integral)(\d+)/, /:(def_func)(\d+)/, /:(differential)(\d+)/, /:(limit)(\d+)/, /:(sigma)(\d+)/
|
26
26
|
token_els = lexed.get_els($2)
|
27
27
|
|
28
|
-
parsed =
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
FuncParser.execute(token_els)
|
42
|
-
when 'sigma'
|
43
|
-
SigmaParser.execute(token_els)
|
44
|
-
when 'differential'
|
45
|
-
del_var, formula = token_els
|
46
|
-
"d/d#{del_var}(#{FormulaParser.execute(formula)})"
|
47
|
-
end
|
28
|
+
parsed = case $1
|
29
|
+
when 'vector' then VectorParser.execute(token_els)
|
30
|
+
when 'matrix' then MatrixParser.execute(token_els)
|
31
|
+
when 'tmatrix' then MatrixParser.execute(token_els, trans: true)
|
32
|
+
when 'limit' then LimitParser.execute(token_els)
|
33
|
+
when 'integral' then IntegralParser.execute(token_els)
|
34
|
+
when 'def_func' then FuncParser.execute(token_els)
|
35
|
+
when 'sigma' then SigmaParser.execute(token_els)
|
36
|
+
when 'differential'
|
37
|
+
del_var, formula = token_els
|
38
|
+
"d/d#{del_var}(#{FormulaParser.execute(formula)})"
|
39
|
+
end
|
40
|
+
|
48
41
|
lexed.parsed!(parsed, $2)
|
49
42
|
|
50
43
|
when /:LPRN(\d+):CONT(\d+):RPRN(\d+)/
|
data/lib/{qlang.rb → hilbert.rb}
RENAMED
@@ -6,12 +6,12 @@ require 'yaml'
|
|
6
6
|
|
7
7
|
$:.unshift(File.dirname(__FILE__))
|
8
8
|
# Q core
|
9
|
-
require '
|
10
|
-
require '
|
11
|
-
require '
|
12
|
-
require '
|
9
|
+
require 'hilbert/meta_info'
|
10
|
+
require 'hilbert/utils/ruby_ext'
|
11
|
+
require 'hilbert/lexer'
|
12
|
+
require 'hilbert/parser'
|
13
13
|
|
14
|
-
module
|
14
|
+
module Hilbert
|
15
15
|
$meta_info = MetaInfo.instance
|
16
16
|
|
17
17
|
class << self
|
@@ -25,7 +25,7 @@ module Qlang
|
|
25
25
|
define_method("to_#{lang_name}") do |*opts|
|
26
26
|
$meta_info.lang = lang_name.to_sym
|
27
27
|
$meta_info.opts = opts
|
28
|
-
|
28
|
+
Hilbert
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -34,4 +34,4 @@ module Qlang
|
|
34
34
|
end
|
35
35
|
|
36
36
|
# Make alias as Q
|
37
|
-
Q =
|
37
|
+
Q = Hilbert
|
data/test/interpreter/base.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
require '
|
1
|
+
require 'hilbert/iq'
|
2
2
|
|
3
3
|
class TestInterpreterBase < MiniTest::Unit::TestCase
|
4
4
|
# TODO: opposite
|
5
5
|
def assert_iq_equal(input, output)
|
6
|
-
assert_equal(
|
6
|
+
assert_equal(Hilbert::Iq.execute(input), output)
|
7
7
|
end
|
8
8
|
|
9
9
|
def assert_def_func(input, output)
|
10
|
-
assert_equal(
|
10
|
+
assert_equal(Hilbert::Iq.execute(input), output)
|
11
11
|
end
|
12
12
|
|
13
13
|
def assert_cal_func(input, output)
|
14
|
-
assert_equal(
|
14
|
+
assert_equal(Hilbert::Iq.execute(input), output)
|
15
15
|
reset
|
16
16
|
end
|
17
17
|
end
|
data/test/minitest_helper.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'minitest_helper'
|
2
|
-
require '
|
2
|
+
# require 'hilbert/hilbert'
|
3
3
|
|
4
4
|
class TestQMatrix < TestInterpreterBase
|
5
5
|
def setup
|
@@ -8,6 +8,6 @@ class TestQMatrix < TestInterpreterBase
|
|
8
8
|
def test_main
|
9
9
|
# assert_equal(50.0, QMatrix.new.func(10))
|
10
10
|
|
11
|
-
assert_equal(8.0, QMatrix.new.execute(0, 2, 100))
|
11
|
+
# assert_equal(8.0, QMatrix.new.execute(0, 2, 100))
|
12
12
|
end
|
13
13
|
end
|
data/test/test_qlang.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'minitest_helper'
|
2
2
|
|
3
|
-
class
|
3
|
+
class TestHilbert < MiniTest::Unit::TestCase
|
4
4
|
def setup
|
5
5
|
end
|
6
6
|
|
@@ -9,8 +9,8 @@ class TestQlang < MiniTest::Unit::TestCase
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def test_basis
|
12
|
-
refute_nil ::
|
13
|
-
assert_equal(
|
12
|
+
refute_nil ::Hilbert::VERSION
|
13
|
+
assert_equal(Hilbert, Q)
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_demo_code
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hilbert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2700001
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gogotanaka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dydx
|
@@ -28,65 +28,65 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake-compiler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: Enjoy MATH!
|
84
84
|
email:
|
85
85
|
- mail@tanakakazuki.com
|
86
86
|
executables:
|
87
|
-
-
|
87
|
+
- hilbert
|
88
88
|
extensions:
|
89
|
-
- ext/
|
89
|
+
- ext/hilbert/extconf.rb
|
90
90
|
extra_rdoc_files: []
|
91
91
|
files:
|
92
92
|
- .coveralls.yml
|
@@ -98,14 +98,15 @@ files:
|
|
98
98
|
- LICENSE.txt
|
99
99
|
- README.md
|
100
100
|
- Rakefile
|
101
|
-
- bin/
|
101
|
+
- bin/hilbert
|
102
102
|
- core/Q.hs
|
103
103
|
- core/Q/Lexer.hs
|
104
104
|
- core/Q/Parser.hs
|
105
|
-
- ext/
|
106
|
-
- ext/
|
107
|
-
- ext/
|
108
|
-
- ext/
|
105
|
+
- ext/hilbert/QMatrix/q_matrix.c
|
106
|
+
- ext/hilbert/extconf.rb
|
107
|
+
- ext/hilbert/hilbert.c
|
108
|
+
- ext/hilbert/hilbert.h
|
109
|
+
- hilbert.gemspec
|
109
110
|
- legacy_rspec/langs/Haskell/ex1_after.hs
|
110
111
|
- legacy_rspec/langs/Haskell/ex1_before.hs
|
111
112
|
- legacy_rspec/langs/Python/ex1_after.py
|
@@ -115,37 +116,36 @@ files:
|
|
115
116
|
- legacy_rspec/objects/list_spec.rb
|
116
117
|
- legacy_rspec/objects/matrix_spec.rb
|
117
118
|
- legacy_rspec/objects/vector_spec.rb
|
118
|
-
- lib/
|
119
|
-
- lib/
|
120
|
-
- lib/
|
121
|
-
- lib/
|
122
|
-
- lib/
|
123
|
-
- lib/
|
124
|
-
- lib/
|
125
|
-
- lib/
|
126
|
-
- lib/
|
127
|
-
- lib/
|
128
|
-
- lib/
|
129
|
-
- lib/
|
130
|
-
- lib/
|
131
|
-
- lib/
|
132
|
-
- lib/
|
133
|
-
- lib/
|
134
|
-
- lib/
|
135
|
-
- lib/
|
136
|
-
- lib/
|
137
|
-
- lib/
|
138
|
-
- lib/
|
139
|
-
- lib/
|
140
|
-
- lib/
|
141
|
-
- lib/
|
142
|
-
- lib/
|
143
|
-
- lib/
|
144
|
-
- lib/
|
145
|
-
- lib/
|
146
|
-
- lib/
|
147
|
-
- lib/
|
148
|
-
- qlang.gemspec
|
119
|
+
- lib/hilbert.rb
|
120
|
+
- lib/hilbert/api.rb
|
121
|
+
- lib/hilbert/api/func_api.rb
|
122
|
+
- lib/hilbert/api/integral_api.rb
|
123
|
+
- lib/hilbert/api/limit_api.rb
|
124
|
+
- lib/hilbert/api/list_api.rb
|
125
|
+
- lib/hilbert/api/matrix_api.rb
|
126
|
+
- lib/hilbert/api/sigma_api.rb
|
127
|
+
- lib/hilbert/api/vector_api.rb
|
128
|
+
- lib/hilbert/exec.rb
|
129
|
+
- lib/hilbert/iq.rb
|
130
|
+
- lib/hilbert/lexer.rb
|
131
|
+
- lib/hilbert/lexer/base.rb
|
132
|
+
- lib/hilbert/lexer/formula_lexer.rb
|
133
|
+
- lib/hilbert/lexer/main_lexer.rb
|
134
|
+
- lib/hilbert/lexer/tokens.rb
|
135
|
+
- lib/hilbert/meta_info.rb
|
136
|
+
- lib/hilbert/parser.rb
|
137
|
+
- lib/hilbert/parser/base.rb
|
138
|
+
- lib/hilbert/parser/formula_parser.rb
|
139
|
+
- lib/hilbert/parser/func_parser.rb
|
140
|
+
- lib/hilbert/parser/integral_parser.rb
|
141
|
+
- lib/hilbert/parser/limit_parser.rb
|
142
|
+
- lib/hilbert/parser/list_parser.rb
|
143
|
+
- lib/hilbert/parser/matrix_parser.rb
|
144
|
+
- lib/hilbert/parser/sigma_parser.rb
|
145
|
+
- lib/hilbert/parser/vector_parser.rb
|
146
|
+
- lib/hilbert/utils/langs.yml
|
147
|
+
- lib/hilbert/utils/ruby_ext.rb
|
148
|
+
- lib/hilbert/version.rb
|
149
149
|
- test/internal/test_tokens.rb
|
150
150
|
- test/interpreter/base.rb
|
151
151
|
- test/interpreter/test_differential.rb
|
@@ -171,17 +171,17 @@ require_paths:
|
|
171
171
|
- lib
|
172
172
|
required_ruby_version: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
|
-
- -
|
174
|
+
- - '>='
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: '0'
|
177
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
178
|
requirements:
|
179
|
-
- -
|
179
|
+
- - '>='
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.0.2
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Enjoy MATH!
|
data/ext/qlang/extconf.rb
DELETED
data/lib/qlang/api.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'qlang/api/matrix_api'
|
2
|
-
require 'qlang/api/vector_api'
|
3
|
-
require 'qlang/api/list_api'
|
4
|
-
require 'qlang/api/func_api'
|
5
|
-
require 'qlang/api/integral_api'
|
6
|
-
require 'qlang/api/limit_api'
|
7
|
-
require 'qlang/api/sigma_api'
|
8
|
-
|
9
|
-
module Qlang
|
10
|
-
module Api
|
11
|
-
class ::Matrix
|
12
|
-
def to_q
|
13
|
-
rows.map(&:join_by_sp).join('; ').parentheses
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
class ::Vector
|
18
|
-
def to_q
|
19
|
-
elements.join_by_sp.parentheses
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
data/lib/qlang/version.rb
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|