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,19 @@
;; screen copy of the REPL
;; note that the &i variables remember expression evaluation, and may be used in other expressions
EchoLisp - 2.16.2
📗 local-db: db.version: 3
(define ( f s1 s2 s3) (string-append s1 s3 s3 s2))
[0]→ f
(f "Rosetta" "Code" ":")
[1]→ "Rosetta::Code"
(+ 4 8)
[2]→ 12
(* 4 8)
[3]→ 32
(* &2 &3)
[4]→ 384
(f &1 &1 ":")
[5]→ "Rosetta::Code::Rosetta::Code"
;; etc.

View file

@ -0,0 +1,8 @@
' FB 1.05.0 Win64
Dim As String s1, s2, sep
Input "First string "; s1
Input "Second string "; s2
Input "Separator "; sep
Print : Print s1 + sep + sep + s2
Sleep

View file

@ -0,0 +1,43 @@
#!/usr/bin/lasso9
// filename: interactive_demo
define concatenate_with_delimiter(
string1::string,
string2::string,
delimiter::string
) => #string1 + (#delimiter*2) + #string2
define read_input(prompt::string) => {
local(string)
// display prompt
stdout(#prompt)
// the following bits wait until the terminal gives you back a line of input
while(not #string or #string -> size == 0) => {
#string = file_stdin -> readsomebytes(1024, 1000)
}
#string -> replace(bytes('\n'), bytes(''))
return #string -> asstring
}
local(
string1,
string2,
delimiter
)
// get first string
#string1 = read_input('Enter the first string: ')
// get second string
#string2 = read_input('Enter the second string: ')
// get delimiter
#delimiter = read_input('Enter the delimiter: ')
// deliver the result
stdoutnl(concatenate_with_delimiter(#string1, #string2, #delimiter))

View file

@ -0,0 +1,4 @@
> m=new(#script)
> m.scripttext="on conc(a,b,c)"&RETURN&"return a&c&c&b"&RETURN&"end"
> put conc("Rosetta", "Code", ":")
-- "Rosetta::Code"

View file

@ -0,0 +1 @@
oforth --i

View file

@ -0,0 +1,8 @@
: x(a, b, sep) a sep + sep + b + ;
ok
>x("Rosetta", "Code", ":")
ok
>.s
[1] (String) Rosetta::Code
ok
>

View file

@ -0,0 +1,6 @@
> : x dup rot + + + ;
ok
> "Rosetta" "Code" ";" x .s
[1] (String) Rosetta::Code
ok
>

View file

@ -0,0 +1,4 @@
r = "Rosetta"
c = "Code"
s = ":"
see r+s+s+c

View file

@ -0,0 +1,6 @@
$ sidef -i
>>> func f(s1, s2, sep) { s1 + sep*2 + s2 };
f
>>> f('Rosetta', 'Code', ':')
"Rosetta::Code"
>>>

View file

@ -0,0 +1,9 @@
$ java -jar ursa.jar
cygnus/x ursa v0.76 (default, release 1)
[Oracle Corporation JVM 1.8.0_91 on Linux 3.16.0-4-686-pae i386]
> def f (string s1, string s2, string sep)
.. return (+ s1 sep sep s2)
..end
> out (f "Rosetta" "Code" ":") endl console
Rosetta::Code
> _

View file

@ -0,0 +1,9 @@
XLISP 3.3, September 6, 2002 Copyright (c) 1984-2002, by David Betz
[1] (defun f (a b sep)
(string-append a sep sep b))
F
[2] (f "Rosetta" "Code" ":")
"Rosetta::Code"
[3]