fOOrth 0.5.0 → 0.5.1

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: 555eecaccf4bd5f00d4adb2c45d95a229fcc286d
4
- data.tar.gz: 39ab0f4185e63de1958507d4a4bd85f117dd8fef
3
+ metadata.gz: 017935fd5de0aa99dd253192f27aa7b8eed5c44d
4
+ data.tar.gz: bd17a2cc1e29f0a6580d65352a0c777fa3061b8d
5
5
  SHA512:
6
- metadata.gz: cc6b7b66c30d45a9f0aa7717afad8fc2eac30151b9cbaa82bd495bbf98dc3687506f53d3094780f17fbc64c614115666df7d633debc9f7f2bf674f8f1d99020a
7
- data.tar.gz: 897a8d530c9cfe6a81448f90cb45ad2134904048d625075318a2ca49fe92b21b10462ce5abf6835d5451a936decf090c61b2f1a72d3240560dfc69c163fdc4df
6
+ metadata.gz: 29b76d8377052fefcbb828d7d8b3064047d5cff2bc42c26393f422d155473988ccac810920abda799ff36ef55ac9c530e6847c946299a4a2389960bc6d875ed4
7
+ data.tar.gz: 693816d9ee22cc7743bdef76835d5eb072a014bd85edbdbd2f50f01123b3603a8c70670574b452a771aa37fcc48fb3c17d9c750085421890e6f1ffeb5a6b0eb6
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
- # The fOOrth Language gem.
2
-
3
- This file contains the read-me for the fOOrth language gem. The fOOrth
4
- language is an experimental variant of FORTH that attempts to incorporate
5
- object oriented and functional programming concepts.
6
-
7
- As an aside, there can be no doubt that the fOOrth project is an utter waste
8
- of anyone's time, unless one counts the insights gained into the inner
9
- workings of Ruby and meta programming.
1
+ ![fOOrth Project Logo](images/fOOrth_logo.png)
2
+
3
+ The fOOrth language is an experimental variant of FORTH that attempts to
4
+ incorporate object oriented and functional programming concepts. It also
5
+ tries to extrapolate an alternate reality where FORTH was not frozen in the
6
+ past, but continued to grow and develop with the times. Above all this project
7
+ is the result of nearly 30 years of thought on the design of threaded
8
+ compilers and languages with simplified grammars and syntax.
10
9
 
11
10
  ## Usage
12
11
  Adding fOOrth can be as simple as:
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = XfOOrth::VERSION
9
9
  spec.authors = ["Peter Camilleri"]
10
10
  spec.email = "peter.c.camilleri@gmail.com"
11
- spec.homepage = "http://teuthida-technologies.com/"
11
+ spec.homepage = "http://www.foorth.org/"
12
12
  spec.description = "An Object Oriented FORTHesque language gem."
13
13
  spec.summary = "FNF == fOOrth is Not FORTH."
14
14
  spec.license = 'MIT'
Binary file
@@ -29,7 +29,7 @@ module XfOOrth
29
29
  end until token.has_tag?(:end)
30
30
 
31
31
  close_procedure_literal
32
- (result, @buffer = @buffer, save)[0]
32
+ (_, @buffer = @buffer, save)[0]
33
33
  end
34
34
 
35
35
  #Handle the opening of a procedure literal.
@@ -16,7 +16,7 @@ module XfOOrth
16
16
  #Predefine the default implementation of the .init method. This method must
17
17
  #exist at this point in order to proceed further.
18
18
  name = '.init'
19
- sym = SymbolMap.add_entry(name, :foorth_init)
19
+ SymbolMap.add_entry(name, :foorth_init)
20
20
  Object.create_shared_method(name, TosSpec, [], &lambda {|vm| })
21
21
 
22
22
  #Create a virtual machine instance for the main thread. The constructor
@@ -50,10 +50,6 @@ class Object
50
50
  self.class.map_foorth_shared(symbol)
51
51
  end
52
52
 
53
- #The default foorth_init method does nothing.
54
- def foorth_init(_vm)
55
- end
56
-
57
53
  #The \method_missing hook is used to provide meaningful error messages
58
54
  #when problems are encountered.
59
55
  #<br>Parameters:
@@ -47,6 +47,11 @@ module XfOOrth
47
47
  sleep(Float.foorth_coerce(self))
48
48
  })
49
49
 
50
+ #Put the current thread to sleep for the specified number of seconds.
51
+ Float.create_shared_method('.sleep', TosSpec, [], &lambda {|vm|
52
+ sleep(self)
53
+ })
54
+
50
55
  #Wait for a thread to finish.
51
56
  #[a_thread] .join []
52
57
  Thread.create_shared_method('.join', TosSpec, [], &lambda {|vm|
@@ -3,5 +3,5 @@
3
3
  #* version.rb - The version string for fOOrth.
4
4
  module XfOOrth
5
5
  #The version string for fOOrth.
6
- VERSION = "0.5.0"
6
+ VERSION = "0.5.1"
7
7
  end
@@ -27,12 +27,14 @@ Rake::TestTask.new do |t|
27
27
  #List out all the test files.
28
28
  t.test_files = FileList['tests/**/*.rb']
29
29
  t.verbose = false
30
+ #t.warning = false
30
31
  end
31
32
 
32
33
  #Run the fOOrth integration test suite.
33
34
  Rake::TestTask.new(:integration) do |t|
34
35
  #List out all the test files.
35
36
  t.test_files = FileList['integration/*.rb']
37
+ t.warning = false
36
38
  end
37
39
 
38
40
  desc "Run a scan for smelly code!"
@@ -36,7 +36,7 @@ class CoreTester < Minitest::Test
36
36
 
37
37
  XfOOrth::SymbolMap.add_entry("a_test_one", :a_test_one)
38
38
 
39
- spec = Object.create_shared_method("a_test_one", XfOOrth::TosSpec, []) {|vm| vm.push(9671111) }
39
+ spec = Object.create_shared_method("a_test_one", XfOOrth::TosSpec, []) {|lvm| lvm.push(9671111) }
40
40
 
41
41
  obj.a_test_one(vm)
42
42
 
@@ -56,8 +56,8 @@ class CoreTester < Minitest::Test
56
56
 
57
57
  XfOOrth::SymbolMap.add_entry("a_test_two", :a_test_two)
58
58
 
59
- spec = obj.create_exclusive_method("a_test_two", XfOOrth::TosSpec, []) do |vm|
60
- vm.push(9686668)
59
+ spec = obj.create_exclusive_method("a_test_two", XfOOrth::TosSpec, []) do |lvm|
60
+ lvm.push(9686668)
61
61
  end
62
62
 
63
63
  obj.a_test_two(vm)
@@ -108,11 +108,11 @@ class CoreTester < Minitest::Test
108
108
  assert_equal(XfOOrth::XfOOrth_MyClass, $FOORTH_GLOBALS[symbol].new_class)
109
109
 
110
110
  assert_raises(XfOOrth::XfOOrthError) do
111
- no_class = Object.create_foorth_subclass('No Class')
111
+ Object.create_foorth_subclass('No Class')
112
112
  end
113
113
 
114
114
  assert_raises(XfOOrth::XfOOrthError) do
115
- copy_class = Object.create_foorth_subclass('MyClass')
115
+ Object.create_foorth_subclass('MyClass')
116
116
  end
117
117
  end
118
118
 
@@ -126,11 +126,11 @@ class CoreTester < Minitest::Test
126
126
  assert_equal(String, $FOORTH_GLOBALS[symbol].new_class)
127
127
 
128
128
  assert_raises(XfOOrth::XfOOrthError) do
129
- bad_class = Object.create_foorth_subclass('My Class')
129
+ Object.create_foorth_subclass('My Class')
130
130
  end
131
131
 
132
132
  assert_raises(XfOOrth::XfOOrthError) do
133
- bad_class = Module.create_foorth_proxy('Mod ule')
133
+ Module.create_foorth_proxy('Mod ule')
134
134
  end
135
135
 
136
136
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fOOrth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Camilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-06 00:00:00.000000000 Z
11
+ date: 2016-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -193,6 +193,7 @@ files:
193
193
  - demo.rb
194
194
  - fOOrth.gemspec
195
195
  - fOOrth.reek
196
+ - images/fOOrth_logo.png
196
197
  - integration/README.md
197
198
  - integration/_FILE_test.foorth
198
199
  - integration/array_lib_tests.rb
@@ -338,7 +339,7 @@ files:
338
339
  - tests/monkey_patch/rational_test.rb
339
340
  - tests/monkey_patch/string_test.rb
340
341
  - tests/symbol_map_tests.rb
341
- homepage: http://teuthida-technologies.com/
342
+ homepage: http://www.foorth.org/
342
343
  licenses:
343
344
  - MIT
344
345
  metadata: {}