h8 0.2.4 → 0.2.5

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
  SHA1:
3
- metadata.gz: 1e90a453ef96b159c6f46f18aecba61e16ea2b07
4
- data.tar.gz: e05c0a54f4f227c08e01838185af5e34e05d89c5
3
+ metadata.gz: d638cb92726ca7b7e5cf94306a606c428b7aa7d1
4
+ data.tar.gz: be70554d03f25f31871996b9db620554ff3e24e9
5
5
  SHA512:
6
- metadata.gz: 05ecdbcb556e6d9f0855a27a744a352715c2b38c1ae4c14067c7fc3d41c197bb3f51c9c8085980a44e3019d9f27a71077636cedf34ffc304aab2e8550ed6c6a0
7
- data.tar.gz: d03e1d13fc4d5f4518c7506504108379c45adfebafbf6b5455c0926d72d257abb3009845109098464bf39d388d17107ba8255a63b94db33379c31fe9660a25a8
6
+ metadata.gz: a31f32aa2c9c13a557908cba8153a2da1d4b3389f234d28ecc56883642df838669b07fab2fcad0f55cd7d5210f244bea2629134f27099e42a58d913970fe2044
7
+ data.tar.gz: 08ae8c723f45d2a3382edeac01e06c124c1bde60d2ae9bfb53032578fd21611e2620b9502a62b78a26d351d22132a6f66d670fdc8c74a96ddf4477a063cb4779
data/.gitignore CHANGED
@@ -27,4 +27,5 @@ mkmf.log
27
27
  .ruby-version
28
28
  .*swp
29
29
  .*swo
30
-
30
+ **/node_modules
31
+ test.js
data/README.md CHANGED
@@ -10,15 +10,15 @@ in 8-core you can create 8 H8::Contexts and run them truly in parallel.
10
10
 
11
11
  This gem was intended to replace therubyracer for many reasons:
12
12
 
13
- * therubyracer has critical bugs that are not fixed for a long time, under load it produces
14
- numerous frequent crashes.
13
+ * therubyracer had critical bugs (that was hte reason for this) that are not fixed for a long time,
14
+ under load it produces numerous frequent random crashes.
15
15
 
16
- * therubyracer still uses antique version of V8, H8 uses the latest 3.31 branch, which, for example,
17
- has the generators support.
16
+ * therubyracer still uses antique version of V8, H8 uses the latest 3.31 branch, which has manu
17
+ improvements, harmony support and so on.
18
18
 
19
- * H8 is designed to provide very tight and effective integration of two allocation systems and
20
- object models, passing the same objects between different systems wrapping and unwrapping them
21
- rather than copying and changing
19
+ * H8 is designed to provide tight and integration of two allocation systems and object models,
20
+ passing the same objects between different systems wrapping and unwrapping them rather than copying
21
+ and changing them.
22
22
 
23
23
  * We hope that by the cost non significant changes we will provide faster execution. And might v8
24
24
  modern branch will help us with it ;)
@@ -48,12 +48,12 @@ in separate threads.
48
48
 
49
49
  Due to v8 and ruby MRI limitations, only one ruby thread can access any given H8::Context (e.g.
50
50
  execute javascript code in it), and, as usual, all ruby threads are locked by a single mitex (gvl).
51
- Still, having multiple H8::Context in different ruby threads let you run java/coffee scripts in
52
- parallel - what you can not have with pure MRI ruby!
51
+ Still, having multiple H8::Context in different ruby threads let you run many java/coffee scripts in
52
+ parallel with a single ruby thread - what you can not have with pure MRI ruby.
53
53
 
54
54
  ## Main difference from therubyracer/features not ready
55
55
 
56
- - labmda/proc passed as var to the context **does not receives first (this) argument
56
+ - lambda/proc passed as var to the context **does not receives first (this) argument
57
57
  automatically!**
58
58
 
59
59
  E.g. rubyracer code
@@ -43,6 +43,18 @@ class Solver
43
43
  res.push ( (if x==0 then ' .' else pad(x,3)) for x in @desk[r]).join('')
44
44
  res.join "\n"
45
45
 
46
- return (n, left) ->
47
- new Solver(n, left).toString()
46
+ timing = (name, cb) ->
47
+ start = new Date().getTime()
48
+ res = cb()
49
+ console.log("#{name}: #{(new Date().getTime() - start)/1000}")
50
+ res
51
+
52
+ result = timing 'KN h8', ->
53
+ new Solver(7, 3).toString()
54
+ console.log result
55
+
56
+
57
+
58
+ # return (n, left) ->
59
+ # new Solver(n, left).toString()
48
60
 
@@ -68,3 +68,4 @@ if res1 != res2
68
68
  puts "Coffee:\n#{res2}"
69
69
  end
70
70
 
71
+ puts res1
data/hybrid8.gemspec CHANGED
@@ -34,7 +34,7 @@ spec = Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency "rake-compiler"
35
35
  spec.add_development_dependency "rspec", '~> 3.1'
36
36
 
37
- spec.add_dependency 'pargser'
37
+ spec.add_dependency 'pargser', '>= 0.1.2'
38
38
  end
39
39
 
40
40
  Gem::PackageTask.new(spec) do |pkg|
data/lib/h8/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module H8
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: h8
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - sergeych
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-08 00:00:00.000000000 Z
11
+ date: 2015-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 0.1.2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 0.1.2
83
83
  description: |2
84
84
  Synergy of ruby and javascript code, almost completely integrates both languages, their
85
85
  garbage collection models, object models and so on. Effective for tight ruby-javascript