Author:  Wander Nauta (wandernauta)
Created: 2010-05-10
Type:    Feature
Status:  Draft
Licence: This ORC is released under the Creative Commons Attribution-Share Alike 3.0 License
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import structs/ArrayList | |
| import os/Time | |
| "For vs Each: on the bench \n" println() | |
| /* Prepare a thousand-item List */ | |
| l := ArrayList<Int> new() | |
| for (i in 0..300000) { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import os/Time | |
| include time | |
| /* Functions (don't use these) */ | |
| strftime: extern func(dest: String*, maxsize: SizeT, format: String*, tm: TMStruct*) -> SizeT | |
| /* Classes (use these) */ | |
| CalendarTime: cover from TMStruct { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | yajl/Yajl.ooc:170:23 [ERROR] No such function Pointer.getType() | |
| if(arr get(i) getType() == ValueType MAP && !arr get(i) complete) { | |
| ^^^^^^^ | |
| [FAIL] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Somedir: Hash | |
| Somedir dirname: Hash | |
| asdfasdf | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import os/Terminal | |
| import math | |
| ProgressBar: class { | |
| value: UInt = 0 | |
| maxval: UInt = 100 | |
| barwidth: UInt = 80 | |
| text := "Please wait..." | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | --- oldindex.php 2010-06-08 17:16:40.090431965 +0200 | |
| +++ index.php 2010-06-08 17:16:43.902432724 +0200 | |
| @@ -1,6 +1,4 @@ | |
| <?php | |
| -sleep(1); | |
| - | |
| // Some settings | |
| $tmp = "/tmp/"; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Example wakefile | |
| all: func (rockflags: ArrayList<String>) { | |
| rock("entrypoint.ooc", rockflags) | |
| } | |
| docs: func () { | |
| sh("markdown blahblah") | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Example (test?) code for try.ooc's reference PHP implementation | |
| import os/Terminal | |
| str := "RAINBOW FEVER" | |
| Terminal setAttr(Attr bright) | |
| rb: func() { | |
| for (c in 0..str length()) { | 
OlderNewer