nydp 0.1.13.1 → 0.1.13.2
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 +4 -4
 - data/lib/lisp/core-060-benchmarking.nydp +14 -10
 - data/lib/nydp/pair.rb +0 -5
 - data/lib/nydp/truth.rb +1 -8
 - data/lib/nydp/version.rb +1 -1
 - data/lib/nydp/vm.rb +9 -6
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c7374115cdd9df0c64b65aaf6321b23f5eac50ef
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 9d108fd6697da14be302dec3da20926de83ff6a2
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 46702e5f71b4cb0335773567020bb223839b5f50702583af33d6469fcfda6fe6a130b00d5b69cc9bf40cd344b8fb6a7b1ae628bfb539488dc0060711bef9d0af
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 05028cdc5301c4670c053b95aead31e179784915c35096153e124e3d3d2405392767189dcbb4d15f8960599cc8ef2bbdb23be242bd9d2ff924173e5f66d13a97
         
     | 
| 
         @@ -27,16 +27,20 @@ 
     | 
|
| 
       27 
27 
     | 
    
         
             
            (def bm-3-arg-times-call () (* 23 24 25))
         
     | 
| 
       28 
28 
     | 
    
         
             
            (def bm-4-arg-times-call () (* 23 24 25 26))
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
      
 30 
     | 
    
         
            +
            (def bm-complicated-0 (a b c) (a (+ 1 b) (+ 1 c)))
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            (def bm-complicated ()
         
     | 
| 
      
 33 
     | 
    
         
            +
              (bm-complicated-0 +
         
     | 
| 
      
 34 
     | 
    
         
            +
                                (bm-complicated-0 * 3 (bm-complicated-0 + 3 6))
         
     | 
| 
      
 35 
     | 
    
         
            +
                                (bm-complicated-0 - 10 (bm-complicated-0 - 13 8))))
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
       30 
37 
     | 
    
         
             
            (def rbs (name)
         
     | 
| 
       31 
38 
     | 
    
         
             
              (let summary nil
         
     | 
| 
       32 
     | 
    
         
            -
                 
     | 
| 
       33 
     | 
    
         
            -
                 
     | 
| 
       34 
     | 
    
         
            -
                 
     | 
| 
       35 
     | 
    
         
            -
                 
     | 
| 
       36 
     | 
    
         
            -
                 
     | 
| 
       37 
     | 
    
         
            -
                (push (bm " 
     | 
| 
       38 
     | 
    
         
            -
                (push (bm " 
     | 
| 
       39 
     | 
    
         
            -
                (push (bm "2 arg times"   bm-2-arg-times-call 10 10000) summary)
         
     | 
| 
       40 
     | 
    
         
            -
                (push (bm "3 arg times"   bm-3-arg-times-call 10 10000) summary)
         
     | 
| 
       41 
     | 
    
         
            -
                (push (bm "4 arg times"   bm-4-arg-times-call 10 10000) summary)
         
     | 
| 
      
 39 
     | 
    
         
            +
                (push (bm "pythag     "   bm-pythag          10    10) summary)
         
     | 
| 
      
 40 
     | 
    
         
            +
                (push (bm "recursive  "   bm-complicated     10 20000) summary)
         
     | 
| 
      
 41 
     | 
    
         
            +
                (push (bm "0 arg times"   bm-0-arg-times-call 5 40000) summary)
         
     | 
| 
      
 42 
     | 
    
         
            +
                (push (bm "1 arg times"   bm-1-arg-times-call 5 40000) summary)
         
     | 
| 
      
 43 
     | 
    
         
            +
                (push (bm "2 arg times"   bm-2-arg-times-call 5 40000) summary)
         
     | 
| 
      
 44 
     | 
    
         
            +
                (push (bm "3 arg times"   bm-3-arg-times-call 5 40000) summary)
         
     | 
| 
      
 45 
     | 
    
         
            +
                (push (bm "4 arg times"   bm-4-arg-times-call 5 40000) summary)
         
     | 
| 
       42 
46 
     | 
    
         
             
                (each s summary (p name " " s))))
         
     | 
    
        data/lib/nydp/pair.rb
    CHANGED
    
    
    
        data/lib/nydp/truth.rb
    CHANGED
    
    | 
         @@ -22,14 +22,7 @@ module Nydp 
     | 
|
| 
       22 
22 
     | 
    
         
             
                def inspect     ; "nil"         ; end
         
     | 
| 
       23 
23 
     | 
    
         
             
                def nydp_type   ; :nil          ; end
         
     | 
| 
       24 
24 
     | 
    
         
             
                def to_ruby     ; nil           ; end
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
                def execute vm
         
     | 
| 
       27 
     | 
    
         
            -
                  vm.push_arg self
         
     | 
| 
       28 
     | 
    
         
            -
                end
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                def repush _, contexts
         
     | 
| 
       31 
     | 
    
         
            -
                  contexts.pop
         
     | 
| 
       32 
     | 
    
         
            -
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
                def execute vm  ; vm.push_arg self ; end
         
     | 
| 
       33 
26 
     | 
    
         
             
              end
         
     | 
| 
       34 
27 
     | 
    
         | 
| 
       35 
28 
     | 
    
         
             
              @@nil = Nil.new
         
     | 
    
        data/lib/nydp/version.rb
    CHANGED
    
    
    
        data/lib/nydp/vm.rb
    CHANGED
    
    | 
         @@ -15,13 +15,16 @@ module Nydp 
     | 
|
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
                def thread expr=nil
         
     | 
| 
       17 
17 
     | 
    
         
             
                  instructions.push expr if expr
         
     | 
| 
       18 
     | 
    
         
            -
                  while instructions. 
     | 
| 
      
 18 
     | 
    
         
            +
                  while instructions.first
         
     | 
| 
       19 
19 
     | 
    
         
             
                    begin
         
     | 
| 
       20 
     | 
    
         
            -
                       
     | 
| 
       21 
     | 
    
         
            -
                       
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
                       
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
      
 20 
     | 
    
         
            +
                      thisi = instructions.pop
         
     | 
| 
      
 21 
     | 
    
         
            +
                      if thisi.cdr.is_a? Nydp::Nil
         
     | 
| 
      
 22 
     | 
    
         
            +
                        self.current_context = contexts.pop
         
     | 
| 
      
 23 
     | 
    
         
            +
                      else
         
     | 
| 
      
 24 
     | 
    
         
            +
                        self.current_context = contexts.last
         
     | 
| 
      
 25 
     | 
    
         
            +
                        instructions.push thisi.cdr
         
     | 
| 
      
 26 
     | 
    
         
            +
                      end
         
     | 
| 
      
 27 
     | 
    
         
            +
                      thisi.car.execute(self)
         
     | 
| 
       25 
28 
     | 
    
         
             
                    rescue Exception => e
         
     | 
| 
       26 
29 
     | 
    
         
             
                      handle_error e
         
     | 
| 
       27 
30 
     | 
    
         
             
                    end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: nydp
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1.13. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.13.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Conan Dalton
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-03-17 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |