\d) \h* $ /x and
+ $+{BULLS} + $+{COWS} <= 4) {
+ return ($+{BULLS}, $+{COWS});
+ }
+
+ say "Please specify the number of bulls and the number of cows";
+ }
+}
+
+sub score_correct($$$$) {
+ my ($a, $b, $bulls, $cows) = @_;
+
+ # Count the positions at which the digits match:
+ my $exact = () = grep {substr($a, $_, 1) eq substr($b, $_, 1)} 0 .. 3;
+
+ # Cross-match all digits in $a against all digits in $b, using a regex
+ # (specifically, a character class) instead of an explicit loop:
+ my $loose = () = $a =~ /[$b]/g;
+
+ return $bulls == $exact && $cows == $loose - $exact;
+}
+
+do {
+ # Pick a number, display it, get the score, and discard candidates
+ # that don't match the score:
+ my $guess = @candidates[rand @candidates];
+ my ($bulls, $cows) = read_score $guess;
+ @candidates = grep {score_correct $_, $guess, $bulls, $cows} @candidates;
+} while (@candidates > 1);
+
+say(@candidates?
+ "Your secret number is @candidates":
+ "I think you made a mistake with your scoring");
diff --git a/Task/Bulls-and-cows-Player/Perl/bulls-and-cows-player-2.pl b/Task/Bulls-and-cows-Player/Perl/bulls-and-cows-player-2.pl
new file mode 100644
index 0000000000..24f58cf247
--- /dev/null
+++ b/Task/Bulls-and-cows-Player/Perl/bulls-and-cows-player-2.pl
@@ -0,0 +1,11 @@
+msl@64Lucid:~/perl$ ./bulls-and-cows
+My guess: 1869 (from 3024 possibilities)
+1 0
+My guess: 3265 (from 240 possibilities)
+0 2
+My guess: 7853 (from 66 possibilities)
+1 2
+My guess: 7539 (from 7 possibilities)
+0 3
+Your secret number is 1357
+msl@64Lucid:~/perl$
diff --git a/Task/Bulls-and-cows-Player/PicoLisp/bulls-and-cows-player.l b/Task/Bulls-and-cows-Player/PicoLisp/bulls-and-cows-player.l
new file mode 100644
index 0000000000..9cd3ad279d
--- /dev/null
+++ b/Task/Bulls-and-cows-Player/PicoLisp/bulls-and-cows-player.l
@@ -0,0 +1,19 @@
+(load "@lib/simul.l")
+
+(de bullsAndCows ()
+ (let Choices (shuffle (mapcan permute (subsets 4 (range 1 9))))
+ (use (Guess Bulls Cows)
+ (loop
+ (prinl "Guessing " (setq Guess (pop 'Choices)))
+ (prin "How many bulls and cows? ")
+ (setq Bulls (read) Cows (read))
+ (setq Choices
+ (filter
+ '((C)
+ (let B (cnt = Guess C)
+ (and
+ (= Bulls B)
+ (= Cows (- (length (sect Guess C)) B)) ) ) )
+ Choices ) )
+ (NIL Choices "No matching solution")
+ (NIL (cdr Choices) (pack "The answer is " (car Choices))) ) ) ) )
diff --git a/Task/Bulls-and-cows-Player/Prolog/bulls-and-cows-player-1.pro b/Task/Bulls-and-cows-Player/Prolog/bulls-and-cows-player-1.pro
new file mode 100644
index 0000000000..cd7a55deac
--- /dev/null
+++ b/Task/Bulls-and-cows-Player/Prolog/bulls-and-cows-player-1.pro
@@ -0,0 +1,132 @@
+:- module('ia.pl', [tirage/1]).
+:- use_module(library(clpfd)).
+
+% to store the previous guesses and the answers
+:- dynamic guess/2.
+
+% parameters of the engine
+
+% length of the guess
+proposition(4).
+
+% Numbers of digits
+% 0 -> 8
+digits(8).
+
+
+% tirage(-)
+tirage(Ms) :-
+ % are there previous guesses ?
+ ( bagof([P, R], guess(P,R), Propositions)
+ -> tirage(Propositions, Ms)
+ ; % First try
+ tirage_1(Ms)),
+ !.
+
+% tirage_1(-)
+% We choose the first Len numbers
+tirage_1(L):-
+ proposition(Len),
+ Max is Len-1,
+ numlist(0, Max, L).
+
+
+% tirage(+,-)
+tirage(L, Ms) :-
+ proposition(Len),
+ length(Ms, Len),
+
+ digits(Digits),
+
+ % The guess continas only this numbers
+ Ms ins 0..Digits,
+ all_different(Ms),
+
+ % post the constraints
+ maplist(placees(Ms), L),
+
+ % compute a possible solution
+ label(Ms).
+
+% placees(+, +])
+placees(Sol, [Prop, [BP, MP]]) :-
+ V #= 0,
+
+ % compute the numbers of digits in good places
+ compte_bien_placees(Sol, Prop, V, BP1),
+ BP1 #= BP,
+
+ % compute the numbers of digits inbad places
+ compte_mal_placees(Sol, Prop, 0, V, MP1),
+ MP1 #= MP.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% compte_mal_placees(+, +, +, +, -).
+% @arg1 : guess to create
+% @arg2 : guess already used
+% @arg3 : range of the first digit of the previuos arg
+% @arg4 : current counter of the digit in bad places
+% @arg5 : final counter of the digit in bad places
+%
+%
+compte_mal_placees(_, [], _, MP, MP).
+
+compte_mal_placees(Sol, [H | T], N, MPC, MPF) :-
+ compte_une_mal_placee(H, N, Sol, 0, 0, VF),
+ MPC1 #= MPC + VF,
+ N1 is N+1,
+ compte_mal_placees(Sol, T, N1, MPC1, MPF).
+
+
+% Here we check one digit of an already done guess
+% compte_une_mal_placee(+, +, +, +, -).
+% @arg1 : the digit
+% @arg2 : range of this digit
+% @arg3 : guess to create
+% we check each digit of this guess
+% @arg4 : range of the digit of this guess
+% @arg5 : current counter of the digit in bad places
+% @arg6 : final counter of the digit in bad places
+%
+compte_une_mal_placee(_H, _N, [], _, TT, TT).
+
+% digit in the same range, continue
+compte_une_mal_placee(H, NH, [_H1 | T], NH, TTC, TTF) :-
+ NH1 is NH + 1, !,
+ compte_une_mal_placee(H, NH, T, NH1, TTC, TTF).
+
+% same digit in different places
+% increment the counter and continue continue
+compte_une_mal_placee(H, NH, [H1 | T], NH1, TTC, TTF) :-
+ H #= H1,
+ NH \= NH1,
+ NH2 is NH1 + 1,
+ TTC1 #= TTC + 1,
+ compte_une_mal_placee(H, NH, T, NH2, TTC1, TTF).
+
+compte_une_mal_placee(H, NH, [H1 | T], NH1, TTC, TTF) :-
+ H #\= H1,
+ NH2 is NH1 + 1,
+ compte_une_mal_placee(H, NH, T, NH2, TTC, TTF).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% compte_bien_placees(+, +, +, -)
+% @arg1 : guess to create
+% @arg2 : previous guess
+% @arg3 : current counter of the digit in good places
+% @arg4 : final counter of the digit in good places
+%
+%
+compte_bien_placees([], [], MP, MP).
+
+compte_bien_placees([H | T], [H1 | T1], MPC, MPF) :-
+ H #= H1,
+ MPC1 #= MPC + 1,
+ compte_bien_placees(T, T1, MPC1, MPF).
+
+compte_bien_placees([H | T], [H1 | T1], MPC, MPF) :-
+ H #\= H1,
+ compte_bien_placees(T, T1, MPC, MPF).
diff --git a/Task/Bulls-and-cows-Player/Prolog/bulls-and-cows-player-2.pro b/Task/Bulls-and-cows-Player/Prolog/bulls-and-cows-player-2.pro
new file mode 100644
index 0000000000..4c7789bddf
--- /dev/null
+++ b/Task/Bulls-and-cows-Player/Prolog/bulls-and-cows-player-2.pro
@@ -0,0 +1,21 @@
+bulls_and_cows :-
+ retractall('ia.pl':guess(_,_)),
+ retractall(coups(_)),
+ assert(coups(1)),
+
+ repeat,
+ ( tirage(Ms)
+ -> maplist(add_1, Ms, Ms1),
+ atomic_list_concat(Ms1, Guess),
+ retract(coups(Coup)),
+ Coup_1 is Coup + 1,
+ assert(coups(Coup_1)),
+ format('~w My guess ~w~n', [Coup, Guess]),
+ write('Bulls : '), read(Bulls),
+ write('Cows : '), read(Cows), nl,
+ assert('ia.pl':guess(Ms, [Bulls, Cows])),
+ Bulls = 4
+ ; writeln('Sorry, I can''t find a solution !'), true).
+
+add_1(X, Y) :-
+ Y is X + 1.
diff --git a/Task/Bulls-and-cows-Player/Python/bulls-and-cows-player.py b/Task/Bulls-and-cows-Player/Python/bulls-and-cows-player.py
new file mode 100644
index 0000000000..99d20e215a
--- /dev/null
+++ b/Task/Bulls-and-cows-Player/Python/bulls-and-cows-player.py
@@ -0,0 +1,55 @@
+from itertools import permutations
+from random import shuffle
+
+try:
+ raw_input
+except:
+ raw_input = input
+try:
+ from itertools import izip
+except:
+ izip = zip
+
+digits = '123456789'
+size = 4
+
+def parse_score(score):
+ score = score.strip().split(',')
+ return tuple(int(s.strip()) for s in score)
+
+def scorecalc(guess, chosen):
+ bulls = cows = 0
+ for g,c in izip(guess, chosen):
+ if g == c:
+ bulls += 1
+ elif g in chosen:
+ cows += 1
+ return bulls, cows
+
+choices = list(permutations(digits, size))
+shuffle(choices)
+answers = []
+scores = []
+
+print ("Playing Bulls & Cows with %i unique digits\n" % size)
+
+while True:
+ ans = choices[0]
+ answers.append(ans)
+ #print ("(Narrowed to %i possibilities)" % len(choices))
+ score = raw_input("Guess %2i is %*s. Answer (Bulls, cows)? "
+ % (len(answers), size, ''.join(ans)))
+ score = parse_score(score)
+ scores.append(score)
+ #print("Bulls: %i, Cows: %i" % score)
+ found = score == (size, 0)
+ if found:
+ print ("Ye-haw!")
+ break
+ choices = [c for c in choices if scorecalc(c, ans) == score]
+ if not choices:
+ print ("Bad scoring? nothing fits those scores you gave:")
+ print (' ' +
+ '\n '.join("%s -> %s" % (''.join(an),sc)
+ for an,sc in izip(answers, scores)))
+ break
diff --git a/Task/Bulls-and-cows-Player/Ruby/bulls-and-cows-player.rb b/Task/Bulls-and-cows-Player/Ruby/bulls-and-cows-player.rb
new file mode 100644
index 0000000000..eae18d3cfa
--- /dev/null
+++ b/Task/Bulls-and-cows-Player/Ruby/bulls-and-cows-player.rb
@@ -0,0 +1,28 @@
+size = 4
+scores = []
+guesses = []
+puts "Playing Bulls & Cows with #{size} unique digits."
+possible_guesses = ('1'..'9').to_a.permutation(size).to_a.shuffle
+
+while
+ guesses << current_guess = possible_guesses.pop
+ print "Guess #{guesses.size} is #{current_guess.join}. Answer (bulls,cows)? "
+ scores << score = gets.split(',').map(&:to_i)
+
+ # handle win
+ break (puts "Yeah!") if score == [size,0]
+
+ # filter possible guesses
+ possible_guesses.select! do |pos_guess|
+ bulls = pos_guess.zip(current_guess).count{|digit_pair| digit_pair[0] == digit_pair[1]}
+ cows = pos_guess.count{|digit| current_guess.include?( digit )} - bulls
+ [bulls, cows] == score
+ end
+
+ # handle 'no possible guesses left'
+ if possible_guesses.empty? then
+ puts "Error in scoring?"
+ guesses.zip(scores).each{|g, (b, c)| puts "#{g.join} => bulls #{b} cows #{c}"}
+ break
+ end
+end
diff --git a/Task/Bulls-and-cows-Player/Tcl/bulls-and-cows-player.tcl b/Task/Bulls-and-cows-Player/Tcl/bulls-and-cows-player.tcl
new file mode 100644
index 0000000000..40f4fb3cbd
--- /dev/null
+++ b/Task/Bulls-and-cows-Player/Tcl/bulls-and-cows-player.tcl
@@ -0,0 +1,52 @@
+package require struct::list
+package require struct::set
+
+proc scorecalc {guess chosen} {
+ set bulls 0
+ set cows 0
+ foreach g $guess c $chosen {
+ if {$g eq $c} {
+ incr bulls
+ } elseif {$g in $chosen} {
+ incr cows
+ }
+ }
+ return [list $bulls $cows]
+}
+
+# Allow override on command line
+set size [expr {$argc ? int($argv) : 4}]
+
+set choices {}
+struct::list foreachperm p [split 123456789 ""] {
+ struct::set include choices [lrange $p 1 $size]
+}
+set answers {}
+set scores {}
+
+puts "Playing Bulls & Cows with $size unique digits\n"
+fconfigure stdout -buffering none
+while 1 {
+ set ans [lindex $choices [expr {int(rand()*[llength $choices])}]]
+ lappend answers $ans
+ puts -nonewline \
+ "Guess [llength $answers] is [join $ans {}]. Answer (Bulls, cows)? "
+ set score [scan [gets stdin] %d,%d]
+ lappend scores $score
+ if {$score eq {$size 0}} {
+ puts "Ye-haw!"
+ break
+ }
+ foreach c $choices[set choices {}] {
+ if {[scorecalc $c $ans] eq $score} {
+ lappend choices $c
+ }
+ }
+ if {![llength $choices]} {
+ puts "Bad scoring? nothing fits those scores you gave:"
+ foreach a $answers s $scores {
+ puts " [join $a {}] -> ([lindex $s 0], [lindex $s 1])"
+ }
+ break
+ }
+}
diff --git a/Task/Bulls-and-cows/BBC-BASIC/bulls-and-cows.bbc b/Task/Bulls-and-cows/BBC-BASIC/bulls-and-cows.bbc
new file mode 100644
index 0000000000..e67d866837
--- /dev/null
+++ b/Task/Bulls-and-cows/BBC-BASIC/bulls-and-cows.bbc
@@ -0,0 +1,32 @@
+ secret$ = ""
+ REPEAT
+ c$ = CHR$(&30 + RND(9))
+ IF INSTR(secret$, c$) = 0 secret$ += c$
+ UNTIL LEN(secret$) = 4
+
+ PRINT "Guess a four-digit number with no digit used twice."'
+ guesses% = 0
+ REPEAT
+
+ REPEAT
+ INPUT "Enter your guess: " guess$
+ IF LEN(guess$) <> 4 PRINT "Must be a four-digit number"
+ UNTIL LEN(guess$) = 4
+ guesses% += 1
+
+ IF guess$ = secret$ PRINT "You won after "; guesses% " guesses!" : END
+
+ bulls% = 0
+ cows% = 0
+ FOR i% = 1 TO 4
+ c$ = MID$(secret$, i%, 1)
+ IF MID$(guess$, i%, 1) = c$ THEN
+ bulls% += 1
+ ELSE IF INSTR(guess$, c$) THEN
+ cows% += 1
+ ENDIF
+ ENDIF
+ NEXT i%
+ PRINT "You got " ;bulls% " bull(s) and " ;cows% " cow(s)."
+
+ UNTIL FALSE
diff --git a/Task/Bulls-and-cows/Brat/bulls-and-cows.brat b/Task/Bulls-and-cows/Brat/bulls-and-cows.brat
new file mode 100644
index 0000000000..8621de4496
--- /dev/null
+++ b/Task/Bulls-and-cows/Brat/bulls-and-cows.brat
@@ -0,0 +1,39 @@
+secret_length = 4
+
+secret = [1 2 3 4 5 6 7 8 9].shuffle.pop secret_length
+
+score = { guess |
+ cows = 0
+ bulls = 0
+
+ guess.each_with_index { digit, index |
+ true? digit == secret[index]
+ { bulls = bulls + 1 }
+ { true? secret.include?(digit)
+ { cows = cows + 1 }
+ }
+ }
+
+ [cows: cows, bulls: bulls]
+}
+
+won = false
+guesses = 1
+
+p "I have chosen a number with four unique digits from 1 through 9. Can you guess it?"
+
+while { not won }
+ {
+ print "Guess #{guesses}: "
+ guess = g.strip.dice.map { d | d.to_i }
+
+ when { guess == secret } { p "You won in #{guesses} guesses!"; won = true }
+ { guess.include?(0) || guess.include?(null) } { p "Your guess should only include digits 1 through 9." }
+ { guess.length != secret.length } { p "Your guess was not the correct length. The number has exactly #{secret.length} digits." }
+ { guess.unique.length != secret.length } { p "Each digit should only appear once in your guess." }
+ { true } {
+ result = score guess
+ p "Score: #{result[:bulls]} bulls, #{result[:cows]} cows."
+ guesses = guesses + 1
+ }
+ }
diff --git a/Task/Caesar-cipher/BBC-BASIC/caesar-cipher.bbc b/Task/Caesar-cipher/BBC-BASIC/caesar-cipher.bbc
new file mode 100644
index 0000000000..923cbc9602
--- /dev/null
+++ b/Task/Caesar-cipher/BBC-BASIC/caesar-cipher.bbc
@@ -0,0 +1,22 @@
+ plaintext$ = "Pack my box with five dozen liquor jugs"
+ PRINT plaintext$
+
+ key% = RND(25)
+ cyphertext$ = FNcaesar(plaintext$, key%)
+ PRINT cyphertext$
+
+ decyphered$ = FNcaesar(cyphertext$, 26-key%)
+ PRINT decyphered$
+
+ END
+
+ DEF FNcaesar(text$, key%)
+ LOCAL I%, C%
+ FOR I% = 1 TO LEN(text$)
+ C% = ASC(MID$(text$,I%))
+ IF (C% AND &1F) >= 1 AND (C% AND &1F) <= 26 THEN
+ C% = (C% AND &E0) OR (((C% AND &1F) + key% - 1) MOD 26 + 1)
+ MID$(text$, I%, 1) = CHR$(C%)
+ ENDIF
+ NEXT
+ = text$
diff --git a/Task/Calendar/BBC-BASIC/calendar.bbc b/Task/Calendar/BBC-BASIC/calendar.bbc
new file mode 100644
index 0000000000..2da9609ac4
--- /dev/null
+++ b/Task/Calendar/BBC-BASIC/calendar.bbc
@@ -0,0 +1,35 @@
+ INSTALL @lib$+"DATELIB"
+ VDU 23,22,640;570;8,15,16,128
+
+ year% = 1969
+ PRINT TAB(38); year%
+ DIM dom%(2), mjd%(2), dim%(2)
+
+ FOR day% = 1 TO 7
+ days$ += LEFT$(FN_date$(FN_mjd(day%, 1, 1905), "ddd"), 2) + " "
+ NEXT
+
+ FOR month% = 1 TO 10 STEP 3
+ PRINT
+ FOR col% = 0 TO 2
+ mjd%(col%) = FN_mjd(1, month% + col%, year%)
+ month$ = FN_date$(mjd%(col%), "MMMM")
+ PRINT TAB(col%*24 + 16 - LEN(month$)/2) month$;
+ NEXT
+ FOR col% = 0 TO 2
+ PRINT TAB(col%*24 + 6) days$;
+ dim%(col%) = FN_dim(month% + col%, year%)
+ NEXT
+ dom%() = 1
+ col% = 0
+ REPEAT
+ dow% = FN_dow(mjd%(col%))
+ IF dom%(col%)<=dim%(col%) THEN
+ PRINT TAB(col%*24 + dow%*3 + 6); dom%(col%);
+ dom%(col%) += 1
+ mjd%(col%) += 1
+ ENDIF
+ IF dow%=6 OR dom%(col%)>dim%(col%) col% = (col% + 1) MOD 3
+ UNTIL dom%(0)>dim%(0) AND dom%(1)>dim%(1) AND dom%(2)>dim%(2)
+ PRINT
+ NEXT
diff --git a/Task/Check-that-file-exists/BBC-BASIC/check-that-file-exists.bbc b/Task/Check-that-file-exists/BBC-BASIC/check-that-file-exists.bbc
new file mode 100644
index 0000000000..fb59416a7b
--- /dev/null
+++ b/Task/Check-that-file-exists/BBC-BASIC/check-that-file-exists.bbc
@@ -0,0 +1,23 @@
+ test% = OPENIN("input.txt")
+ IF test% THEN
+ CLOSE #test%
+ PRINT "File input.txt exists"
+ ENDIF
+
+ test% = OPENIN("\input.txt")
+ IF test% THEN
+ CLOSE #test%
+ PRINT "File \input.txt exists"
+ ENDIF
+
+ test% = OPENIN("docs\NUL")
+ IF test% THEN
+ CLOSE #test%
+ PRINT "Directory docs exists"
+ ENDIF
+
+ test% = OPENIN("\docs\NUL")
+ IF test% THEN
+ CLOSE #test%
+ PRINT "Directory \docs exists"
+ ENDIF
diff --git a/Task/Check-that-file-exists/Batch-File/check-that-file-exists.bat b/Task/Check-that-file-exists/Batch-File/check-that-file-exists.bat
new file mode 100644
index 0000000000..ce56d77dd2
--- /dev/null
+++ b/Task/Check-that-file-exists/Batch-File/check-that-file-exists.bat
@@ -0,0 +1,4 @@
+if exist input.txt echo The following file called input.txt exists.
+if exist \input.txt echo The following file called \input.txt exists.
+if exist docs echo The following directory called docs exists.
+if exist \docs\ echo The following directory called \docs\ exists.
diff --git a/Task/Checkpoint-synchronization/BBC-BASIC/checkpoint-synchronization.bbc b/Task/Checkpoint-synchronization/BBC-BASIC/checkpoint-synchronization.bbc
new file mode 100644
index 0000000000..58b1306e7f
--- /dev/null
+++ b/Task/Checkpoint-synchronization/BBC-BASIC/checkpoint-synchronization.bbc
@@ -0,0 +1,59 @@
+ INSTALL @lib$+"TIMERLIB"
+ nWorkers% = 3
+ DIM tID%(nWorkers%)
+
+ tID%(1) = FN_ontimer(10, PROCworker1, 1)
+ tID%(2) = FN_ontimer(11, PROCworker2, 1)
+ tID%(3) = FN_ontimer(12, PROCworker3, 1)
+
+ DEF PROCworker1 : PROCtask(1) : ENDPROC
+ DEF PROCworker2 : PROCtask(2) : ENDPROC
+ DEF PROCworker3 : PROCtask(3) : ENDPROC
+
+ ON ERROR PROCcleanup : REPORT : PRINT : END
+ ON CLOSE PROCcleanup : QUIT
+
+ REPEAT
+ WAIT 0
+ UNTIL FALSE
+ END
+
+ DEF PROCtask(worker%)
+ PRIVATE cnt%()
+ DIM cnt%(nWorkers%)
+ CASE cnt%(worker%) OF
+ WHEN 0:
+ cnt%(worker%) = RND(30)
+ PRINT "Worker "; worker% " starting (" ;cnt%(worker%) " ticks)"
+ WHEN -1:
+ OTHERWISE:
+ cnt%(worker%) -= 1
+ IF cnt%(worker%) = 0 THEN
+ PRINT "Worker "; worker% " ready and waiting"
+ cnt%(worker%) = -1
+ PROCcheckpoint
+ cnt%(worker%) = 0
+ ENDIF
+ ENDCASE
+ ENDPROC
+
+ DEF PROCcheckpoint
+ PRIVATE checked%, sync%
+ IF checked% = 0 sync% = FALSE
+ checked% += 1
+ WHILE NOT sync%
+ WAIT 0
+ IF checked% = nWorkers% THEN
+ sync% = TRUE
+ PRINT "--Sync Point--"
+ ENDIF
+ ENDWHILE
+ checked% -= 1
+ ENDPROC
+
+ DEF PROCcleanup
+ LOCAL I%
+ FOR I% = 1 TO nWorkers%
+ PROC_killtimer(tID%(I%))
+ NEXT
+ ENDPROC
diff --git a/Task/Classes/BBC-BASIC/classes.bbc b/Task/Classes/BBC-BASIC/classes.bbc
new file mode 100644
index 0000000000..27546bbe31
--- /dev/null
+++ b/Task/Classes/BBC-BASIC/classes.bbc
@@ -0,0 +1,18 @@
+ INSTALL @lib$+"CLASSLIB"
+
+ REM Declare the class:
+ DIM MyClass{variable, @constructor, _method}
+ DEF MyClass.@constructor MyClass.variable = PI : ENDPROC
+ DEF MyClass._method = MyClass.variable ^ 2
+
+ REM Register the class:
+ PROC_class(MyClass{})
+
+ REM Instantiate the class:
+ PROC_new(myclass{}, MyClass{})
+
+ REM Call the method:
+ PRINT FN(myclass._method)
+
+ REM Discard the instance:
+ PROC_discard(myclass{})
diff --git a/Task/Closest-pair-problem/BBC-BASIC/closest-pair-problem.bbc b/Task/Closest-pair-problem/BBC-BASIC/closest-pair-problem.bbc
new file mode 100644
index 0000000000..b3ac75f765
--- /dev/null
+++ b/Task/Closest-pair-problem/BBC-BASIC/closest-pair-problem.bbc
@@ -0,0 +1,26 @@
+ DIM x(9), y(9)
+
+ FOR I% = 0 TO 9
+ READ x(I%), y(I%)
+ NEXT
+
+ min = 1E30
+ FOR I% = 0 TO 8
+ FOR J% = I%+1 TO 9
+ dsq = (x(I%) - x(J%))^2 + (y(I%) - y(J%))^2
+ IF dsq < min min = dsq : mini% = I% : minj% = J%
+ NEXT
+ NEXT I%
+ PRINT "Closest pair is ";mini% " and ";minj% " at distance "; SQR(min)
+ END
+
+ DATA 0.654682, 0.925557
+ DATA 0.409382, 0.619391
+ DATA 0.891663, 0.888594
+ DATA 0.716629, 0.996200
+ DATA 0.477721, 0.946355
+ DATA 0.925092, 0.818220
+ DATA 0.624291, 0.142924
+ DATA 0.211332, 0.221507
+ DATA 0.293786, 0.691701
+ DATA 0.839186, 0.728260
diff --git a/Task/Collections/BBC-BASIC/collections-1.bbc b/Task/Collections/BBC-BASIC/collections-1.bbc
new file mode 100644
index 0000000000..a41d719f40
--- /dev/null
+++ b/Task/Collections/BBC-BASIC/collections-1.bbc
@@ -0,0 +1,3 @@
+ DIM text$(1)
+ text$(0) = "Hello "
+ text$(1) = "world!"
diff --git a/Task/Collections/BBC-BASIC/collections-2.bbc b/Task/Collections/BBC-BASIC/collections-2.bbc
new file mode 100644
index 0000000000..fd66cdc628
--- /dev/null
+++ b/Task/Collections/BBC-BASIC/collections-2.bbc
@@ -0,0 +1,5 @@
+ DIM collection{(1) name$, year%}
+ collection{(0)}.name$ = "Richard"
+ collection{(0)}.year% = 1952
+ collection{(1)}.name$ = "Sue"
+ collection{(1)}.year% = 1950
diff --git a/Task/Collections/BBC-BASIC/collections-3.bbc b/Task/Collections/BBC-BASIC/collections-3.bbc
new file mode 100644
index 0000000000..5d7f6cdd1b
--- /dev/null
+++ b/Task/Collections/BBC-BASIC/collections-3.bbc
@@ -0,0 +1,24 @@
+ DIM node{name$, year%, link%}
+ list% = 0
+ PROCadd(list%, node{}, "Richard", 1952)
+ PROCadd(list%, node{}, "Sue", 1950)
+ PROClist(list%, node{})
+ END
+
+ DEF PROCadd(RETURN l%, c{}, n$, y%)
+ LOCAL p%
+ DIM p% DIM(c{})-1
+ !(^c{}+4) = p%
+ c.name$ = n$
+ c.year% = y%
+ c.link% = l%
+ l% = p%
+ ENDPROC
+
+ DEF PROClist(l%, c{})
+ WHILE l%
+ !(^c{}+4) = l%
+ PRINT c.name$, c.year%
+ l% = c.link%
+ ENDWHILE
+ ENDPROC
diff --git a/Task/Color-of-a-screen-pixel/BBC-BASIC/color-of-a-screen-pixel.bbc b/Task/Color-of-a-screen-pixel/BBC-BASIC/color-of-a-screen-pixel.bbc
new file mode 100644
index 0000000000..b66f8534df
--- /dev/null
+++ b/Task/Color-of-a-screen-pixel/BBC-BASIC/color-of-a-screen-pixel.bbc
@@ -0,0 +1,2 @@
+ palette_index% = POINT(x%, y%)
+ RGB24b_colour% = TINT(x%, y%)
diff --git a/Task/Comments/BBC-BASIC/comments.bbc b/Task/Comments/BBC-BASIC/comments.bbc
new file mode 100644
index 0000000000..307e32b2c4
--- /dev/null
+++ b/Task/Comments/BBC-BASIC/comments.bbc
@@ -0,0 +1,2 @@
+ REM This is a comment which is ignored by the compiler
+ *| This is a comment which is compiled but ignored at run time
diff --git a/Task/Comments/Batch-File/comments-1.bat b/Task/Comments/Batch-File/comments-1.bat
new file mode 100644
index 0000000000..77af79a259
--- /dev/null
+++ b/Task/Comments/Batch-File/comments-1.bat
@@ -0,0 +1 @@
+rem Single-line comment.
diff --git a/Task/Comments/Batch-File/comments-2.bat b/Task/Comments/Batch-File/comments-2.bat
new file mode 100644
index 0000000000..86f1456b74
--- /dev/null
+++ b/Task/Comments/Batch-File/comments-2.bat
@@ -0,0 +1,2 @@
+:: Another option, though unsupported and known
+:: to fail in some cases. Best avoided.
diff --git a/Task/Comments/Blast/comments.blast b/Task/Comments/Blast/comments.blast
new file mode 100644
index 0000000000..5b8e71fcd6
--- /dev/null
+++ b/Task/Comments/Blast/comments.blast
@@ -0,0 +1 @@
+# A hash symbol at the beginning of a line marks the line as a comment
diff --git a/Task/Comments/Brainf---/comments.bf b/Task/Comments/Brainf---/comments.bf
new file mode 100644
index 0000000000..3ff6063990
--- /dev/null
+++ b/Task/Comments/Brainf---/comments.bf
@@ -0,0 +1 @@
+This is a comment
diff --git a/Task/Comments/Brat/comments.brat b/Task/Comments/Brat/comments.brat
new file mode 100644
index 0000000000..a4ebc602df
--- /dev/null
+++ b/Task/Comments/Brat/comments.brat
@@ -0,0 +1,5 @@
+# Single line comment
+
+#* Multi
+ Line
+ Comment *#
diff --git a/Task/Comments/Brlcad/comments.brlcad b/Task/Comments/Brlcad/comments.brlcad
new file mode 100644
index 0000000000..c2a9822b9e
--- /dev/null
+++ b/Task/Comments/Brlcad/comments.brlcad
@@ -0,0 +1,2 @@
+ # Comments in mget scripts are prefixed with a hash symbol
+ ls # comments may appear at the end of a line
diff --git a/Task/Comments/Burlesque/comments-1.blq b/Task/Comments/Burlesque/comments-1.blq
new file mode 100644
index 0000000000..f89264b91b
--- /dev/null
+++ b/Task/Comments/Burlesque/comments-1.blq
@@ -0,0 +1 @@
+"I'm sort of a comment"vv
diff --git a/Task/Comments/Burlesque/comments-2.blq b/Task/Comments/Burlesque/comments-2.blq
new file mode 100644
index 0000000000..81dc8e0957
--- /dev/null
+++ b/Task/Comments/Burlesque/comments-2.blq
@@ -0,0 +1,3 @@
+"I'm a
+very long comment spanning
+over several lines"vv
diff --git a/Task/Death-Star/Brlcad/death-star.brlcad b/Task/Death-Star/Brlcad/death-star.brlcad
new file mode 100644
index 0000000000..7cb55735f2
--- /dev/null
+++ b/Task/Death-Star/Brlcad/death-star.brlcad
@@ -0,0 +1,26 @@
+# We need a database to hold the objects
+opendb deathstar.g y
+
+# We will be measuring in kilometers
+units km
+
+# Create a sphere of radius 60km centred at the origin
+in sph1.s sph 0 0 0 60
+
+# We will be subtracting an overlapping sphere with a radius of 40km
+# The resultant hole will be smaller than this, because we only
+# only catch the edge
+in sph2.s sph 0 90 0 40
+
+# Create a region named deathstar.r which consists of big minus small sphere
+r deathstar.r u sph1.s - sph2.s
+
+# We will use a plastic material texture with rgb colour 224,224,224
+# with specular lighting value of 0.1 and no inheritance
+mater deathstar.r "plastic sp=0.1" 224 224 224 0
+
+# Clear the wireframe display and draw the deathstar
+B deathstar.r
+
+# We now trigger the raytracer to see our finished product
+rt
diff --git a/Task/Delete-a-file/BBC-BASIC/delete-a-file-1.bbc b/Task/Delete-a-file/BBC-BASIC/delete-a-file-1.bbc
new file mode 100644
index 0000000000..eabc17a1e7
--- /dev/null
+++ b/Task/Delete-a-file/BBC-BASIC/delete-a-file-1.bbc
@@ -0,0 +1,4 @@
+ *DELETE input.txt
+ *DELETE \input.txt
+ *RMDIR docs
+ *RMDIR \docs
diff --git a/Task/Delete-a-file/BBC-BASIC/delete-a-file-2.bbc b/Task/Delete-a-file/BBC-BASIC/delete-a-file-2.bbc
new file mode 100644
index 0000000000..d843cea9e6
--- /dev/null
+++ b/Task/Delete-a-file/BBC-BASIC/delete-a-file-2.bbc
@@ -0,0 +1,2 @@
+ OSCLI "DELETE " + file$
+ OSCLI "RMDIR " + dir$
diff --git a/Task/Delete-a-file/Batch-File/delete-a-file.bat b/Task/Delete-a-file/Batch-File/delete-a-file.bat
new file mode 100644
index 0000000000..e19048a25a
--- /dev/null
+++ b/Task/Delete-a-file/Batch-File/delete-a-file.bat
@@ -0,0 +1,5 @@
+del input.txt
+rd /s /q docs
+
+del \input.txt
+rd /s /q \docs
diff --git a/Task/Detect-division-by-zero/BBC-BASIC/detect-division-by-zero.bbc b/Task/Detect-division-by-zero/BBC-BASIC/detect-division-by-zero.bbc
new file mode 100644
index 0000000000..b4ac40401e
--- /dev/null
+++ b/Task/Detect-division-by-zero/BBC-BASIC/detect-division-by-zero.bbc
@@ -0,0 +1,19 @@
+ PROCdivide(-44, 0)
+ PROCdivide(-44, 5)
+ PROCdivide(0, 5)
+ PROCdivide(5, 0)
+ END
+
+ DEF PROCdivide(numerator, denominator)
+ ON ERROR LOCAL IF FALSE THEN
+ REM 'Try' clause:
+ PRINT numerator / denominator
+ ELSE
+ REM 'Catch' clause:
+ CASE ERR OF
+ WHEN 18: PRINT "Division by zero"
+ WHEN 20: PRINT "Number too big"
+ OTHERWISE RESTORE LOCAL : ERROR ERR, REPORT$
+ ENDCASE
+ ENDIF
+ ENDPROC
diff --git a/Task/Determine-if-a-string-is-numeric/BBC-BASIC/determine-if-a-string-is-numeric.bbc b/Task/Determine-if-a-string-is-numeric/BBC-BASIC/determine-if-a-string-is-numeric.bbc
new file mode 100644
index 0000000000..3f335a7964
--- /dev/null
+++ b/Task/Determine-if-a-string-is-numeric/BBC-BASIC/determine-if-a-string-is-numeric.bbc
@@ -0,0 +1,19 @@
+ REPEAT
+ READ N$
+ IF FN_isanumber(N$) THEN
+ PRINT "'" N$ "' is a number"
+ ELSE
+ PRINT "'" N$ "' is NOT a number"
+ ENDIF
+ UNTIL N$ = "end"
+ END
+
+ DATA "PI", "0123", "-0123", "12.30", "-12.30", "123!", "0"
+ DATA "0.0", ".123", "-.123", "12E3", "12E-3", "12+3", "end"
+
+ DEF FN_isanumber(A$)
+ ON ERROR LOCAL = FALSE
+ IF EVAL("(" + A$ + ")") <> VAL(A$) THEN = FALSE
+ IF VAL(A$) <> 0 THEN = TRUE
+ IF LEFT$(A$,1) = "0" THEN = TRUE
+ = FALSE
diff --git a/Task/Determine-if-a-string-is-numeric/Bracmat/determine-if-a-string-is-numeric-1.bracmat b/Task/Determine-if-a-string-is-numeric/Bracmat/determine-if-a-string-is-numeric-1.bracmat
new file mode 100644
index 0000000000..0edd659211
--- /dev/null
+++ b/Task/Determine-if-a-string-is-numeric/Bracmat/determine-if-a-string-is-numeric-1.bracmat
@@ -0,0 +1,11 @@
+43257349578692:/
+ F
+
+260780243875083/35587980:/
+ S
+
+247/30:~/#
+ F
+
+80000000000:~/#
+ S
diff --git a/Task/Determine-if-a-string-is-numeric/Bracmat/determine-if-a-string-is-numeric-2.bracmat b/Task/Determine-if-a-string-is-numeric/Bracmat/determine-if-a-string-is-numeric-2.bracmat
new file mode 100644
index 0000000000..672283035d
--- /dev/null
+++ b/Task/Determine-if-a-string-is-numeric/Bracmat/determine-if-a-string-is-numeric-2.bracmat
@@ -0,0 +1,29 @@
+@("1.000-4E-10":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ F
+
+@("1.0004E-54328":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ S
+
+@("-464641.0004E-54328":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ S
+
+@("1/2.0004E-10":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ F
+
+@("1357E-10":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ S
+
+@("1357e0":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ S
+
+@("13579":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ S
+
+@("1.246":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ S
+
+@("0.0":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ S
+
+@("0.0000":~/# (|"." (|? 0|`) (|~/#:>0)) (|(E|e) ~/#))
+ S
diff --git a/Task/Determine-if-a-string-is-numeric/Bracmat/determine-if-a-string-is-numeric-3.bracmat b/Task/Determine-if-a-string-is-numeric/Bracmat/determine-if-a-string-is-numeric-3.bracmat
new file mode 100644
index 0000000000..103473b1a4
--- /dev/null
+++ b/Task/Determine-if-a-string-is-numeric/Bracmat/determine-if-a-string-is-numeric-3.bracmat
@@ -0,0 +1,35 @@
+(float2fraction=
+ integerPart decimalPart d1 dn exp sign
+. @( !arg
+ : ~/#?integerPart
+ ( &0:?decimalPart:?d1:?dn
+ | "."
+ [?d1
+ (|? 0|`)
+ ( &0:?decimalPart
+ | ~/#?decimalPart:>0
+ )
+ [?dn
+ )
+ ( &0:?exp
+ | (E|e) ~/#?exp
+ )
+ )
+ & ( !integerPart*(-1:?sign):>0:?integerPart
+ | 1:?sign
+ )
+ & !sign*(!integerPart+!decimalPart*10^(!d1+-1*!dn))*10^!exp
+);
+
+( out$float2fraction$"1.2"
+& out$float2fraction$"1.02"
+& out$float2fraction$"1.01"
+& out$float2fraction$"10.01"
+& out$float2fraction$"10.01e10"
+& out$float2fraction$"10.01e1"
+& out$float2fraction$"10.01e2"
+& out$float2fraction$"10.01e-2"
+& out$float2fraction$"-10.01e-2"
+& out$float2fraction$"-10e-2"
+& out$float2fraction$"0.000"
+);
diff --git a/Task/Determine-if-a-string-is-numeric/Burlesque/determine-if-a-string-is-numeric.blq b/Task/Determine-if-a-string-is-numeric/Burlesque/determine-if-a-string-is-numeric.blq
new file mode 100644
index 0000000000..80912116f2
--- /dev/null
+++ b/Task/Determine-if-a-string-is-numeric/Burlesque/determine-if-a-string-is-numeric.blq
@@ -0,0 +1 @@
+ps^^-]to{"Int""Double"}\/~[\/L[1==?*
diff --git a/Task/Entropy/Burlesque/entropy.blq b/Task/Entropy/Burlesque/entropy.blq
new file mode 100644
index 0000000000..5746359db6
--- /dev/null
+++ b/Task/Entropy/Burlesque/entropy.blq
@@ -0,0 +1,2 @@
+blsq ) "1223334444"F:u[vv^^{1\/?/2\/LG}m[?*++
+1.8464393446710157
diff --git a/Task/FizzBuzz/BBC-BASIC/fizzbuzz.bbc b/Task/FizzBuzz/BBC-BASIC/fizzbuzz.bbc
new file mode 100644
index 0000000000..e2723d4492
--- /dev/null
+++ b/Task/FizzBuzz/BBC-BASIC/fizzbuzz.bbc
@@ -0,0 +1,8 @@
+ FOR number% = 1 TO 100
+ CASE TRUE OF
+ WHEN number% MOD 15 = 0: PRINT "FizzBuzz"
+ WHEN number% MOD 3 = 0: PRINT "Fizz"
+ WHEN number% MOD 5 = 0: PRINT "Buzz"
+ OTHERWISE: PRINT ; number%
+ ENDCASE
+ NEXT number%
diff --git a/Task/FizzBuzz/Batch-File/fizzbuzz-1.bat b/Task/FizzBuzz/Batch-File/fizzbuzz-1.bat
new file mode 100644
index 0000000000..8df0f500ce
--- /dev/null
+++ b/Task/FizzBuzz/Batch-File/fizzbuzz-1.bat
@@ -0,0 +1,24 @@
+@echo off
+for /L %%i in (1,1,100) do call :tester %%i
+goto :eof
+
+:tester
+set /a test = %1 %% 15
+if %test% NEQ 0 goto :NotFizzBuzz
+echo FizzBuzz
+goto :eof
+
+:NotFizzBuzz
+set /a test = %1 %% 5
+if %test% NEQ 0 goto :NotBuzz
+echo Buzz
+goto :eof
+
+:NotBuzz
+set /a test = %1 %% 3
+if %test% NEQ 0 goto :NotFizz
+echo Fizz
+goto :eof
+
+:NotFizz
+echo %1
diff --git a/Task/FizzBuzz/Batch-File/fizzbuzz-2.bat b/Task/FizzBuzz/Batch-File/fizzbuzz-2.bat
new file mode 100644
index 0000000000..f70a3296a4
--- /dev/null
+++ b/Task/FizzBuzz/Batch-File/fizzbuzz-2.bat
@@ -0,0 +1,28 @@
+@echo off
+set n=1
+:loop
+call :tester %n%
+set /a n += 1
+if %n% LSS 101 goto loop
+goto :eof
+
+:tester
+set /a test = %1 %% 15
+if %test% NEQ 0 goto :NotFizzBuzz
+echo FizzBuzz
+goto :eof
+
+:NotFizzBuzz
+set /a test = %1 %% 5
+if %test% NEQ 0 goto :NotBuzz
+echo Buzz
+goto :eof
+
+:NotBuzz
+set /a test = %1 %% 3
+if %test% NEQ 0 goto :NotFizz
+echo Fizz
+goto :eof
+
+:NotFizz
+echo %1
diff --git a/Task/FizzBuzz/Boo/fizzbuzz.boo b/Task/FizzBuzz/Boo/fizzbuzz.boo
new file mode 100644
index 0000000000..f874029e84
--- /dev/null
+++ b/Task/FizzBuzz/Boo/fizzbuzz.boo
@@ -0,0 +1,12 @@
+def fizzbuzz(size):
+ for i in range(1, size):
+ if i%15 == 0:
+ print 'FizzBuzz'
+ elif i%5 == 0:
+ print 'Buzz'
+ elif i%3 == 0:
+ print 'Fizz'
+ else:
+ print i
+
+fizzbuzz(101)
diff --git a/Task/FizzBuzz/Bracmat/fizzbuzz-1.bracmat b/Task/FizzBuzz/Bracmat/fizzbuzz-1.bracmat
new file mode 100644
index 0000000000..263b073f8e
--- /dev/null
+++ b/Task/FizzBuzz/Bracmat/fizzbuzz-1.bracmat
@@ -0,0 +1 @@
+0:?i&whl'(1+!i:<101:?i&out$(mod$(!i.3):0&(mod$(!i.5):0&FizzBuzz|Fizz)|mod$(!i.5):0&Buzz|!i))
diff --git a/Task/FizzBuzz/Bracmat/fizzbuzz-2.bracmat b/Task/FizzBuzz/Bracmat/fizzbuzz-2.bracmat
new file mode 100644
index 0000000000..ba6a30a0f9
--- /dev/null
+++ b/Task/FizzBuzz/Bracmat/fizzbuzz-2.bracmat
@@ -0,0 +1,12 @@
+ 0:?i
+& whl
+ ' ( 1+!i:<101:?i
+ & out
+ $ ( mod$(!i.3):0
+ & ( mod$(!i.5):0&FizzBuzz
+ | Fizz
+ )
+ | mod$(!i.5):0&Buzz
+ | !i
+ )
+ )
diff --git a/Task/FizzBuzz/Brainf---/fizzbuzz.bf b/Task/FizzBuzz/Brainf---/fizzbuzz.bf
new file mode 100644
index 0000000000..55763f5e35
--- /dev/null
+++ b/Task/FizzBuzz/Brainf---/fizzbuzz.bf
@@ -0,0 +1,156 @@
+FizzBuzz
+
+Memory:
+ Zero
+ Zero
+ Counter 1
+ Counter 2
+
+ Zero
+ ASCIIDigit 3
+ ASCIIDigit 2
+ ASCIIDigit 1
+
+ Zero
+ Digit 3
+ Digit 2
+ Digit 1
+
+ CopyPlace
+ Mod 3
+ Mod 5
+ PrintNumber
+
+ TmpFlag
+
+Counters for the loop
+++++++++++[>++++++++++[>+>+<<-]<-]
+
+Number representation in ASCII
+>>>>
+++++++++ ++++++++ ++++++++ ++++++++ ++++++++ ++++++++ [>+>+>+<<<-]
+<<<<
+
+>>
+[
+ Do hundret times:
+
+ Decrement counter
+ ->->
+
+ Increment Number
+ > >>+>
+ > >>+>
+ <<<<
+ <<<<
+
+ Check for Overflow
+ ++++++++++
+ >>> >>>>
+ >++++++++++<
+ [-<<< <<<<->>>> >>> >-<]
+ ++++++++++
+ <<< <<<<
+
+ Restore the digit
+ [->>>> >>>-<<< <<<<]
+ >>>> [-]+ >>>>[<<<< - >>>>[-]]<<<< <<<<
+
+ If there is an overflow
+ >>>>[
+ <<<<
+
+ >>>----------> >>>----------<+<< <<+<<
+
+ Check for Overflow
+ ++++++++++
+ >> >>>>
+ >>++++++++++<<
+ [-<< <<<<->>>> >> >>-<<]
+ ++++++++++
+ << <<<<
+
+ Restore the digit
+ [->>>> >>-<< <<<<]
+ >>>> [-]+ >>>>[<<<< - >>>>[-]]<<<< <<<<
+
+ If there (again) is an overflow
+ >>>>[
+ <<<<
+ >>---------->> >>----------<+< <<<+<
+
+ >>>>
+ [-]
+ ]<<<<
+
+ >>>>
+ [-]
+ ]<<<<
+
+ >>>> >>>>
+
+ Set if to print the number
+ >>>[-]+<<<
+
+ Handle the Mod 3 counter
+ [-]+++
+
+ >>>>[-]+<<<<
+ >+[-<->]+++<
+ [->->>>[-]<<<<]
+ >>>>[
+ <[-]>
+
+ [-]
+ Print "Fizz"
+ ++++++++ ++++++++ ++++++++ ++++++++
+ ++++++++ ++++++++ ++++++++ ++++++++
+ ++++++.
+
+ ++++++++ ++++++++ ++++++++ ++++++++
+ +++.
+
+ ++++++++ ++++++++ +..
+
+ [-]
+ <<<--->>>
+ ]<<<<
+
+ Handle the Mod 5 counter
+ [-]+++++
+
+ >>>>[-]+<<<<
+ >>+[-<<->>]+++++<<
+ [->>->>[-]<<<<]
+ >>>>[
+ <[-]>
+
+ [-]
+ Print "Buzz"
+ ++++++++ ++++++++ ++++++++ ++++++++
+ ++++++++ ++++++++ ++++++++ ++++++++
+ ++.
+
+ ++++++++ ++++++++ ++++++++ ++++++++
+ ++++++++ ++++++++ +++.
+
+ +++++..
+
+ [-]
+ <<----->>
+ ]<<<<
+
+ Check if to print the number (Leading zeros)
+ >>>[
+ <<< <<<< <<<<
+ >.>.>.<<<
+ >>> >>>> >>>>
+ [-]
+ ]<<<
+
+ <<<< <<<<
+
+ Print New Line
+ <<<<[-]++++ ++++ ++++ +.---.[-]>>
+]
+<<
diff --git a/Task/FizzBuzz/Brat/fizzbuzz.brat b/Task/FizzBuzz/Brat/fizzbuzz.brat
new file mode 100644
index 0000000000..0d6cabf5e4
--- /dev/null
+++ b/Task/FizzBuzz/Brat/fizzbuzz.brat
@@ -0,0 +1,11 @@
+1.to 100 { n |
+ true? n % 15 == 0
+ { p "FizzBuzz" }
+ { true? n % 3 == 0
+ { p "Fizz" }
+ { true? n % 5 == 0
+ { p "Buzz" }
+ { p n }
+ }
+ }
+ }
diff --git a/Task/Forest-fire/BASIC256/forest-fire.basic256 b/Task/Forest-fire/BASIC256/forest-fire.basic256
new file mode 100644
index 0000000000..316e7df8c4
--- /dev/null
+++ b/Task/Forest-fire/BASIC256/forest-fire.basic256
@@ -0,0 +1,38 @@
+N = 150 : M = 150 : P = 0.03 : F = 0.00003
+
+dim f(N+2,M+2) # 1 tree, 0 empty, 2 fire
+dim fn(N+2,M+2)
+graphsize N,M
+fastgraphics
+
+for x = 1 to N
+ for y = 1 to M
+ if rand<0.5 then f[x,y] = 1
+ next y
+next x
+
+while True
+ for x = 1 to N
+ for y = 1 to M
+ if not f[x,y] and rand RND(1) THEN
+ new&(x%,y%) = 1
+ GCOL 2
+ PLOT 4*x%,4*y%
+ ENDIF
+ WHEN 1:
+ IF f > RND(1) OR old&(x%-1,y%)=2 OR old&(x%+1,y%)=2 OR \
+ \ old&(x%-1,y%-1)=2 OR old&(x%,y%-1)=2 OR old&(x%+1,y%-1)=2 OR \
+ \ old&(x%-1,y%+1)=2 OR old&(x%,y%+1)=2 OR old&(x%+1,y%+1)=2 THEN
+ new&(x%,y%) = 2
+ GCOL 1
+ PLOT 4*x%,4*y%
+ ENDIF
+ WHEN 2:
+ new&(x%,y%) = 0
+ GCOL 15
+ PLOT 4*x%,4*y%
+ ENDCASE
+ NEXT
+ NEXT x%
+ old&() = new&()
+ UNTIL FALSE
diff --git a/Task/Infinity/BBC-BASIC/infinity.bbc b/Task/Infinity/BBC-BASIC/infinity.bbc
new file mode 100644
index 0000000000..8d78ba71b3
--- /dev/null
+++ b/Task/Infinity/BBC-BASIC/infinity.bbc
@@ -0,0 +1,19 @@
+ *FLOAT 64
+ PRINT FNinfinity
+ END
+
+ DEF FNinfinity
+ LOCAL supported%, maxpos, prev, inct
+ supported% = TRUE
+ ON ERROR LOCAL supported% = FALSE
+ IF supported% THEN = 1/0
+ RESTORE ERROR
+ inct = 1E10
+ REPEAT
+ prev = maxpos
+ inct *= 2
+ ON ERROR LOCAL inct /= 2
+ maxpos += inct
+ RESTORE ERROR
+ UNTIL maxpos = prev
+ = maxpos
diff --git a/Task/Knuth-shuffle/BBC-BASIC/knuth-shuffle-1.bbc b/Task/Knuth-shuffle/BBC-BASIC/knuth-shuffle-1.bbc
new file mode 100644
index 0000000000..73c45c0ca2
--- /dev/null
+++ b/Task/Knuth-shuffle/BBC-BASIC/knuth-shuffle-1.bbc
@@ -0,0 +1,12 @@
+ cards% = 52
+ DIM pack%(cards%)
+ FOR I% = 1 TO cards%
+ pack%(I%) = I%
+ NEXT I%
+ FOR N% = cards% TO 2 STEP -1
+ SWAP pack%(N%),pack%(RND(N%))
+ NEXT N%
+ FOR I% = 1 TO cards%
+ PRINT pack%(I%);
+ NEXT I%
+ PRINT
diff --git a/Task/Knuth-shuffle/BBC-BASIC/knuth-shuffle-2.bbc b/Task/Knuth-shuffle/BBC-BASIC/knuth-shuffle-2.bbc
new file mode 100644
index 0000000000..53957954f7
--- /dev/null
+++ b/Task/Knuth-shuffle/BBC-BASIC/knuth-shuffle-2.bbc
@@ -0,0 +1,44 @@
+seed = 1 /* seed of the random number generator */
+scale = 0
+
+/* Random number from 0 to 32767. */
+define rand() {
+ /* Formula (from POSIX) for random numbers of low quality. */
+ seed = (seed * 1103515245 + 12345) % 4294967296
+ return ((seed / 65536) % 32768)
+}
+
+/* Shuffle the first _count_ elements of shuffle[]. */
+define shuffle(count) {
+ auto b, i, j, t
+
+ i = count
+ while (i > 0) {
+ /* j = random number in [0, i) */
+ b = 32768 % i /* want rand() >= b */
+ while (1) {
+ j = rand()
+ if (j >= b) break
+ }
+ j = j % i
+
+ /* decrement i, swap shuffle[i] and shuffle[j] */
+ t = shuffle[--i]
+ shuffle[i] = shuffle[j]
+ shuffle[j] = t
+ }
+}
+
+/* Test program. */
+define print_array(count) {
+ auto i
+ for (i = 0; i < count - 1; i++) print shuffle[i], ", "
+ print shuffle[i], "\n"
+}
+
+for (i = 0; i < 10; i++) shuffle[i] = 11 * (i + 1)
+"Original array: "; trash = print_array(10)
+
+trash = shuffle(10)
+"Shuffled array: "; trash = print_array(10)
+quit
diff --git a/Task/Knuth-shuffle/Brat/knuth-shuffle.brat b/Task/Knuth-shuffle/Brat/knuth-shuffle.brat
new file mode 100644
index 0000000000..45f4c317f8
--- /dev/null
+++ b/Task/Knuth-shuffle/Brat/knuth-shuffle.brat
@@ -0,0 +1,12 @@
+shuffle = { a |
+ (a.length - 1).to 1 { i |
+ random_index = random(0, i)
+ temp = a[i]
+ a[i] = a[random_index]
+ a[random_index] = temp
+ }
+
+ a
+}
+
+p shuffle [1 2 3 4 5 6 7]
diff --git a/Task/Narcissist/BBC-BASIC/narcissist.bbc b/Task/Narcissist/BBC-BASIC/narcissist.bbc
new file mode 100644
index 0000000000..5360962001
--- /dev/null
+++ b/Task/Narcissist/BBC-BASIC/narcissist.bbc
@@ -0,0 +1 @@
+INPUT a$:PRINT -(a$=$(PAGE+34)+$(PAGE+33)):REM INPUT a$:PRINT -(a$=$(PAGE+34)+$(PAGE+33)):REM
diff --git a/Task/Ordered-words/BBC-BASIC/ordered-words.bbc b/Task/Ordered-words/BBC-BASIC/ordered-words.bbc
new file mode 100644
index 0000000000..b6144c5016
--- /dev/null
+++ b/Task/Ordered-words/BBC-BASIC/ordered-words.bbc
@@ -0,0 +1,19 @@
+ dict% = OPENIN("unixdict.txt")
+ IF dict%=0 ERROR 100, "Failed to open dictionary file"
+
+ max% = 2
+ REPEAT
+ A$ = GET$#dict%
+ IF LENA$ >= max% THEN
+ i% = 0
+ REPEAT i% += 1
+ UNTIL ASCMID$(A$,i%) > ASCMID$(A$,i%+1)
+ IF i% = LENA$ THEN
+ IF i% > max% max% = i% : list$ = ""
+ list$ += A$ + CHR$13 + CHR$10
+ ENDIF
+ ENDIF
+ UNTIL EOF#dict%
+ CLOSE #dict%
+ PRINT list$
+ END
diff --git a/Task/Ordered-words/Bracmat/ordered-words.bracmat b/Task/Ordered-words/Bracmat/ordered-words.bracmat
new file mode 100644
index 0000000000..a4368adea9
--- /dev/null
+++ b/Task/Ordered-words/Bracmat/ordered-words.bracmat
@@ -0,0 +1,25 @@
+ ( orderedWords
+ = bow result longestLength word character
+ . 0:?bow
+ & :?result
+ & 0:?longestLength
+ & @( get$(!arg,STR)
+ : ?
+ ( [!bow %?word \n [?bow ?
+ & @( !word
+ : ( ? %@?character <%@!character ?
+ | ?
+ ( [!longestLength
+ & !word !result:?result
+ | [>!longestLength:[?longestLength
+ & !word:?result
+ |
+ )
+ )
+ )
+ & ~`
+ )
+ )
+ | !result
+ )
+& orderedWords$"unixdict.txt"
diff --git a/Task/Ordered-words/Burlesque/ordered-words.blq b/Task/Ordered-words/Burlesque/ordered-words.blq
new file mode 100644
index 0000000000..ffa0993634
--- /dev/null
+++ b/Task/Ordered-words/Burlesque/ordered-words.blq
@@ -0,0 +1 @@
+ln{so}f[^^{L[}>mL[bx(==)[+(L[)+]f[uN
diff --git a/Task/Pi/BASIC256/pi.basic256 b/Task/Pi/BASIC256/pi.basic256
new file mode 100644
index 0000000000..a2c2e2b3ce
--- /dev/null
+++ b/Task/Pi/BASIC256/pi.basic256
@@ -0,0 +1,59 @@
+cls
+
+n =1000
+len = 10*n \ 4
+needdecimal = true
+dim a(len)
+nines = 0
+predigit = 0 # {First predigit is a 0}
+
+for j = 1 to len
+ a[j-1] = 2 # {Start with 2s}
+next j
+
+for j = 1 to n
+ q = 0
+ for i = len to 1 step -1
+ # {Work backwards}
+ x = 10*a[i-1] + q*i
+ a[i-1] = x % (2*i - 1)
+ q = x \ (2*i - 1)
+ next i
+ a[0] = q % 10
+ q = q \ 10
+ if q = 9 then
+ nines = nines + 1
+ else
+ if q = 10 then
+ d = predigit+1: gosub outputd
+ if nines > 0 then
+ for k = 1 to nines
+ d = 0: gosub outputd
+ next k
+ end if
+ predigit = 0
+ nines = 0
+ else
+ d = predigit: gosub outputd
+ predigit = q
+ if nines <> 0 then
+ for k = 1 to nines
+ d = 9: gosub outputd
+ next k
+ nines = 0
+ end if
+ end if
+ end if
+next j
+print predigit
+end
+
+outputd:
+if needdecimal then
+ if d = 0 then return
+ print d + ".";
+ needdecimal = false
+else
+ print d;
+end if
+return
diff --git a/Task/Pi/BBC-BASIC/pi-1.bbc b/Task/Pi/BBC-BASIC/pi-1.bbc
new file mode 100644
index 0000000000..8fc5fe6c14
--- /dev/null
+++ b/Task/Pi/BBC-BASIC/pi-1.bbc
@@ -0,0 +1,23 @@
+ WIDTH 80
+ M% = (HIMEM-END-1000) / 4
+ DIM B%(M%)
+ FOR I% = 0 TO M% : B%(I%) = 20 : NEXT
+ E% = 0
+ L% = 2
+ FOR C% = M% TO 14 STEP -7
+ D% = 0
+ A% = C%*2-1
+ FOR P% = C% TO 1 STEP -1
+ D% = D%*P% + B%(P%)*&64
+ B%(P%) = D% MOD A%
+ D% DIV= A%
+ A% -= 2
+ NEXT
+ CASE TRUE OF
+ WHEN D% = 99: E% = E% * 100 + D% : L% += 2
+ WHEN C% = M%: PRINT ;(D% DIV 100) / 10; : E% = D% MOD 100
+ OTHERWISE:
+ PRINT RIGHT$(STRING$(L%,"0") + STR$(E% + D% DIV 100),L%);
+ E% = D% MOD 100 : L% = 2
+ ENDCASE
+ NEXT
diff --git a/Task/Pi/BBC-BASIC/pi-2.bbc b/Task/Pi/BBC-BASIC/pi-2.bbc
new file mode 100644
index 0000000000..4bfd050641
--- /dev/null
+++ b/Task/Pi/BBC-BASIC/pi-2.bbc
@@ -0,0 +1,23 @@
+ DIM P% 32
+ [OPT 2 :.pidig mov ebp,eax :.pi1 imul edx,ecx : mov eax,[ebx+ecx*4]
+ imul eax,100 : add eax,edx : cdq : div ebp : mov [ebx+ecx*4],edx
+ mov edx,eax : sub ebp,2 : loop pi1 : mov eax,edx : ret :]
+
+ WIDTH 80
+ M% = (HIMEM-END-1000) / 4
+ DIM B%(M%) : B% = ^B%(0)
+ FOR I% = 0 TO M% : B%(I%) = 20 : NEXT
+ E% = 0
+ L% = 2
+ FOR C% = M% TO 14 STEP -7
+ D% = 0
+ A% = C%*2-1
+ D% = USR(pidig)
+ CASE TRUE OF
+ WHEN D% = 99: E% = E% * 100 + D% : L% += 2
+ WHEN C% = M%: PRINT ;(D% DIV 100) / 10; : E% = D% MOD 100
+ OTHERWISE:
+ PRINT RIGHT$(STRING$(L%,"0") + STR$(E% + D% DIV 100),L%);
+ E% = D% MOD 100 : L% = 2
+ ENDCASE
+ NEXT
diff --git a/Task/Pi/Bracmat/pi.bracmat b/Task/Pi/Bracmat/pi.bracmat
new file mode 100644
index 0000000000..9679749d1a
--- /dev/null
+++ b/Task/Pi/Bracmat/pi.bracmat
@@ -0,0 +1,29 @@
+ ( pi
+ = f,q r t k n l,first
+ . !arg:((=?f),?q,?r,?t,?k,?n,?l)
+ & yes:?first
+ & whl
+ ' ( 4*!q+!r+-1*!t+-1*!n*!t:<0
+ & f$!n
+ & ( !first:yes
+ & f$"."
+ & no:?first
+ |
+ )
+ & "compute and update variables for next cycle"
+ & 10*(!r+-1*!n*!t):?nr
+ & div$(10*(3*!q+!r).!t)+-10*!n:?n
+ & !q*10:?q
+ & !nr:?r
+ | "compute and update variables for next cycle"
+ & (2*!q+!r)*!l:?nr
+ & div$(!q*(7*!k+2)+!r*!l.!t*!l):?nn
+ & !q*!k:?q
+ & !t*!l:?t
+ & !l+2:?l
+ & !k+1:?k
+ & !nn:?n
+ & !nr:?r
+ )
+ )
+& pi$((=.put$!arg),1,0,1,1,3,3)
diff --git a/Task/Quine/BBC-BASIC/quine-1.bbc b/Task/Quine/BBC-BASIC/quine-1.bbc
new file mode 100644
index 0000000000..2a347f4029
--- /dev/null
+++ b/Task/Quine/BBC-BASIC/quine-1.bbc
@@ -0,0 +1 @@
+ PRINT $(PAGE+22)$(PAGE+21):REM PRINT $(PAGE+22)$(PAGE+21):REM
diff --git a/Task/Quine/BBC-BASIC/quine-2.bbc b/Task/Quine/BBC-BASIC/quine-2.bbc
new file mode 100644
index 0000000000..914a4fa333
--- /dev/null
+++ b/Task/Quine/BBC-BASIC/quine-2.bbc
@@ -0,0 +1 @@
+ PRINT $(PAGE+23)$(PAGE+22):REM PRINT $(PAGE+23)$(PAGE+22):REM
diff --git a/Task/Quine/Batch-File/quine-1.bat b/Task/Quine/Batch-File/quine-1.bat
new file mode 100644
index 0000000000..d4ddde9b87
--- /dev/null
+++ b/Task/Quine/Batch-File/quine-1.bat
@@ -0,0 +1 @@
+@type %0
diff --git a/Task/Quine/Batch-File/quine-2.bat b/Task/Quine/Batch-File/quine-2.bat
new file mode 100644
index 0000000000..959c8f05c5
--- /dev/null
+++ b/Task/Quine/Batch-File/quine-2.bat
@@ -0,0 +1 @@
+@type "%~f0"
diff --git a/Task/Quine/Bracmat/quine-1.bracmat b/Task/Quine/Bracmat/quine-1.bracmat
new file mode 100644
index 0000000000..8e3f99af3b
--- /dev/null
+++ b/Task/Quine/Bracmat/quine-1.bracmat
@@ -0,0 +1,2 @@
+(quine=
+.lst$quine);
diff --git a/Task/Quine/Bracmat/quine-2.bracmat b/Task/Quine/Bracmat/quine-2.bracmat
new file mode 100644
index 0000000000..196c7a4767
--- /dev/null
+++ b/Task/Quine/Bracmat/quine-2.bracmat
@@ -0,0 +1 @@
+quine$
diff --git a/Task/Quine/Brainf---/quine.bf b/Task/Quine/Brainf---/quine.bf
new file mode 100644
index 0000000000..cad6151345
--- /dev/null
+++ b/Task/Quine/Brainf---/quine.bf
@@ -0,0 +1,7 @@
+->+>+++>>+>++>+>+++>>+>++>>>+>+>+>++>+>>>>+++>+>>++>+>+++>>++>++>>+>>+>++>++>+>>>>+++>+>>>>++>++>>>>+>>++>+>+++>>>++>>++++++>>+>>++>
++>>>>+++>>+++++>>+>+++>>>++>>++>>+>>++>+>+++>>>++>>+++++++++++++>>+>>++>+>+++>+>+++>>>++>>++++>>+>>++>+>>>>+++>>+++++>>>>++>>>>+>+>+
++>>+++>+>>>>+++>+>>>>+++>+>>>>+++>>++>++>+>+++>+>++>++>>>>>>++>+>+++>>>>>+++>>>++>+>+++>+>+>++>>>>>>++>>>+>>>++>+>>>>+++>+>>>+>>++>+
+>++++++++++++++++++>>>>+>+>>>+>>++>+>+++>>>++>>++++++++>>+>>++>+>>>>+++>>++++++>>>+>++>>+++>+>+>++>+>+++>>>>>+++>>>+>+>>++>+>+++>>>+
++>>++++++++>>+>>++>+>>>>+++>>++++>>+>+++>>>>>>++>+>+++>>+>++>>>>+>+>++>+>>>>+++>>+++>>>+[[->>+<<]<+]+++++[->+++++++++<]>.[+]>>
+[<<+++++++[->+++++++++<]>-.------------------->-[-<.<+>>]<[+]<+>>>]<<<[-[-[-[>>+<++++++[->+++++<]]>++++++++++++++<]>+++<]++++++
+[->+++++++<]>+<<<-[->>>++<<<]>[->>.<<]<<]
diff --git a/Task/Quine/Burlesque/quine.blq b/Task/Quine/Burlesque/quine.blq
new file mode 100644
index 0000000000..8aa00492e7
--- /dev/null
+++ b/Task/Quine/Burlesque/quine.blq
@@ -0,0 +1,2 @@
+blsq ) "I'm a quine."
+"I'm a quine."
diff --git a/Task/Search-a-list/BBC-BASIC/search-a-list.bbc b/Task/Search-a-list/BBC-BASIC/search-a-list.bbc
new file mode 100644
index 0000000000..dc522591a0
--- /dev/null
+++ b/Task/Search-a-list/BBC-BASIC/search-a-list.bbc
@@ -0,0 +1,21 @@
+ DIM haystack$(27)
+ haystack$() = "alpha","bravo","charlie","delta","echo","foxtrot","golf", \
+ \ "hotel","india","juliet","kilo","lima","mike","needle", \
+ \ "november","oscar","papa","quebec","romeo","sierra","tango", \
+ \ "needle","uniform","victor","whisky","x-ray","yankee","zulu"
+
+ needle$ = "needle"
+ maxindex% = DIM(haystack$(), 1)
+
+ FOR index% = 0 TO maxindex%
+ IF needle$ = haystack$(index%) EXIT FOR
+ NEXT
+ IF index% <= maxindex% THEN
+ PRINT "First found at index "; index%
+ FOR last% = maxindex% TO 0 STEP -1
+ IF needle$ = haystack$(last%) EXIT FOR
+ NEXT
+ IF last%<>index% PRINT "Last found at index "; last%
+ ELSE
+ ERROR 100, "Not found"
+ ENDIF
diff --git a/Task/Search-a-list/Burlesque/search-a-list-1.blq b/Task/Search-a-list/Burlesque/search-a-list-1.blq
new file mode 100644
index 0000000000..3a78ecfadb
--- /dev/null
+++ b/Task/Search-a-list/Burlesque/search-a-list-1.blq
@@ -0,0 +1,2 @@
+blsq ) {"Zig" "Zag" "Wally" "Bush" "Ronald" "Bush"}"Bush"Fi
+3
diff --git a/Task/Search-a-list/Burlesque/search-a-list-2.blq b/Task/Search-a-list/Burlesque/search-a-list-2.blq
new file mode 100644
index 0000000000..8ee45e8358
--- /dev/null
+++ b/Task/Search-a-list/Burlesque/search-a-list-2.blq
@@ -0,0 +1,2 @@
+blsq ) {"Zig" "Zag" "Wally" "Bush" "Ronald" "Bush"}{"Bush"==}fI
+{3 5}