Skip to content

Instantly share code, notes, and snippets.

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) {
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 {
yajl/Yajl.ooc:170:23 [ERROR] No such function Pointer.getType()
if(arr get(i) getType() == ValueType MAP && !arr get(i) complete) {
^^^^^^^
[FAIL]

Author: Wander Nauta Created: 2010-05-17 Type: Feature

Abstract date and time handling in ooc

  • Introduction
  • Motivation
  • Rationale
Somedir: Hash
Somedir dirname: Hash
asdfasdf
import os/Terminal
import math
ProgressBar: class {
value: UInt = 0
maxval: UInt = 100
barwidth: UInt = 80
text := "Please wait..."
--- 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/";
// Example wakefile
all: func (rockflags: ArrayList<String>) {
rock("entrypoint.ooc", rockflags)
}
docs: func () {
sh("markdown blahblah")
}
// 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()) {