Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -0,0 +1,7 @@
1
while /= -- dup dup:
!. dup
++
drop

View file

@ -0,0 +1,4 @@
i = zero(BigInt) # or i = big(0)
while true
println(i += 1)
end

View file

@ -0,0 +1,23 @@
implement CountToInfinity;
include "sys.m"; sys: Sys;
include "draw.m";
include "ipints.m"; ipints: IPints;
IPint: import ipints;
CountToInfinity: module {
init: fn(nil: ref Draw->Context, nil: list of string);
};
init(nil: ref Draw->Context, nil: list of string)
{
sys = load Sys Sys->PATH;
ipints = load IPints IPints->PATH;
i := IPint.inttoip(0);
one := IPint.inttoip(1);
for(;;) {
sys->print("%s\n", i.iptostr(10));
i = i.add(one);
}
}

View file

@ -0,0 +1,13 @@
extern mod extra;
use extra::bigint::BigUint;
use std::num::One;
fn main() {
let one: BigUint = One::one();
let mut i: BigUint = One::one();
loop {
println!("{:s}", i.to_str());
i = i + one;
}
}