Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,7 @@
While getKey(0)
End
0→I
Repeat getKey(0)
Disp I▶Dec,i
I++
EndIf I=0

View file

@ -0,0 +1,4 @@
for(1 => int i; i < Math.INT_MAX; i ++)
{
<<< i >>>;
}

View file

@ -0,0 +1,3 @@
start: ADD one
JMP start
one: 1

View file

@ -0,0 +1,22 @@
[ Integer sequence
================
A program for the EDSAC
Displays integers 1,2,3...
in binary form in the first
word of storage tank 2
until stopped
Works with Initial Orders 2 ]
T56K [ set load point ]
GK [ set base address ]
A3@ [ increment accumulator ]
U64F [ copy accumulator to 64 ]
E@ [ jump to base address ]
P0D [ constant: 1 ]
EZPF [ begin at load point ]

View file

@ -0,0 +1,7 @@
.............
A%=0
LOOP
A%=A%+1
PRINT(A%;)
END LOOP
.............

View file

@ -0,0 +1,2 @@
(lib 'bigint) ;; arbitrary length integers
(for ((n (in-naturals))) (writeln n))

View file

@ -0,0 +1,14 @@
' FB 1.05.0 Win64
' FB does not natively support arbitrarily large integers though support can be added
' by using an external library such as GMP. For now we will just use an unsigned long integer.
Print "Press Ctrl + C to stop the program at any time"
Dim i As Long = 1
Do
Print i
i += 1
Loop Until i = 0 ' will wrap back to 0 when it reaches 4,294,967,296
Sleep

View file

@ -0,0 +1 @@
for i <- 1.. do println( i )

View file

@ -0,0 +1 @@
fun main(n: int): [n]int = iota n

View file

@ -0,0 +1,6 @@
local(number = 1)
while(#number > 0) => {^
#number++
' '
//#number > 100 ? #number = -2 // uncomment this row if you want to halt the run after proving concept
^}

View file

@ -0,0 +1,5 @@
i = 1
repeat while i>0
put i
i = i+1
end repeat

View file

@ -0,0 +1,2 @@
put the maxInteger
-- 2147483647

View file

@ -0,0 +1,4 @@
put the maxInteger+1
-- -2147483648
put the maxInteger+2
-- -2147483647

View file

@ -0,0 +1,17 @@
the floatPrecision = 0 -- forces floats to be printed without fractional digits
put float(the maxInteger)+1
-- 2147483648
-- max. whole value that can be stored as 8-byte-float precisely
maxFloat = power(2,53) -- 9007199254740992.0
i = 1.0
repeat while i<=maxFloat
put i
i = i+1
end repeat
-- 1
-- 2
-- 3
-- ...

View file

@ -0,0 +1,4 @@
var i:int64 = 0
while true:
inc i
echo i

View file

@ -0,0 +1,6 @@
import bigints
var i = 0.initBigInt
while true:
i += 1
echo i

View file

@ -0,0 +1 @@
: integers 1 while( true ) [ dup . 1+ ] ;

View file

@ -0,0 +1,5 @@
integer i = 0
while 1 do
?i
i += 1
end while

View file

@ -0,0 +1,5 @@
atom a = 0
while 1 do
?a
a += 1
end while

View file

@ -0,0 +1,6 @@
include bigatom.e
bigatom b = ba_new(0)
while 1 do
ba_printf(1,"%B\n",b)
b = ba_add(b,1)
end while

View file

@ -0,0 +1,17 @@
size = 10
for n = 1 to size
see n + nl
next
see nl
for n in [1:size]
see n + nl
next
see nl
i = n
while n <= size
see n + nl
n = n + 1
end

View file

@ -0,0 +1,3 @@
01000000000000010000000000000000 0. Sub. 2 acc -= -1
01000000000000000000000000000000 1. 2 to CI goto -1 + 1
11111111111111111111111111111111 2. -1

View file

@ -0,0 +1 @@
{|i| say i } * Math.inf;

View file

@ -0,0 +1,4 @@
var i = 0
while true {
println(i++)
}

View file

@ -0,0 +1,11 @@
#
# integer sequence
#
# declare an int and loop until it overflows
decl int i
set i 1
while true
out i endl console
inc i
end while

View file

@ -0,0 +1,2 @@
def iota: ., (. + 1 | iota);
0 | iota

View file

@ -0,0 +1 @@
0 | while(true;. + 1)

View file

@ -0,0 +1 @@
0 | recurse(. + 1)