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,3 @@
ClrHome
Text(0,0,"Goodbye, world!")
Pause 5000

View file

@ -0,0 +1 @@
msgbox Goodbye, World!

View file

@ -0,0 +1 @@
(alert "Good bye, world!")

View file

@ -0,0 +1,16 @@
'FreeBASIC Hello-fb0.bas May 2015
Screen 0 'open text window
Print "Hello world"
Print "Enter any key to go the graphics screen"
sleep
screen 18 'Screen 18 Resolution 640x480 with at least 256 colors
locate 10,10
Print "Hello world!"
locate 20,10
Print "Enter any key to exit"
sleep
End

View file

@ -0,0 +1,17 @@
native javax.swing.{SwingUtilities, JPanel, JLabel, JFrame}
native java.awt.Font
def createAndShowGUI( msg ) =
f = JFrame()
f.setTitle( msg )
f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE )
p = JPanel()
l = JLabel( msg )
l.setFont( Font.decode(Font.SERIF + ' 150') )
p.add( l )
f.add( p )
f.pack()
f.setResizable( false )
f.setVisible( true )
SwingUtilities.invokeLater( createAndShowGUI.runnable('Goodbye, World!') )

View file

@ -0,0 +1 @@
MSGBOX("Goodbye, World!");

View file

@ -0,0 +1,3 @@
RECT();
TEXTOUT_P("Goodbye, World!", GROBW_P(G0)/4, GROBH_P(G0)/4, 7);
WAIT(-1);

View file

@ -0,0 +1,2 @@
PROCEDURE Main()
RETURN wapi_MessageBox(,"Goodbye, World!","")

View file

@ -0,0 +1,3 @@
gui {
Goodbye, World!
}

View file

@ -0,0 +1,6 @@
link graphics
procedure main()
WOpen("size=100,20") | stop("No window")
WWrites("Goodbye, World!")
WDone()
end

View file

@ -0,0 +1,21 @@
import gui
$include "guih.icn"
class WindowApp : Dialog ()
# -- automatically called when the dialog is created
method component_setup ()
# add 'hello world' label
label := Label("label=Hello world","pos=0,0")
add (label)
# make sure we respond to close event
connect(self, "dispose", CLOSE_BUTTON_EVENT)
end
end
# create and show the window
procedure main ()
w := WindowApp ()
w.show_modal ()
end

View file

@ -0,0 +1 @@
sys_process('/usr/bin/osascript', (: '-e', 'display dialog "Goodbye, World!"'))->wait

View file

@ -0,0 +1 @@
_player.alert("Goodbye, World!")

View file

@ -0,0 +1,15 @@
-- create a field
m = new(#field)
m.rect = rect(0,0,320,240)
m.alignment = "center"
m.fontsize = 24
m.fontStyle = "bold"
m.text = "Goodbye, World!"
-- create sprite, assign field
_movie.puppetSprite(1, TRUE)
sprite(1).member = m
sprite(1).loc = point(0,105)
-- force immediate update
_movie.updateStage()

View file

@ -0,0 +1 @@
answer "Goodbye, World!"

View file

@ -0,0 +1 @@
answer warning "Goodbye, World!" with "Goodbye, World!" titled "Goodbye, World!"

View file

@ -0,0 +1,7 @@
gl_window("graphical hello world", 800, 600)
gl_setfontname("data/fonts/Droid_Sans/DroidSans.ttf")
gl_setfontsize(30)
while gl_frame():
gl_clear([ 0.0, 0.0, 0.0, 1.0 ])
gl_text("Goodbye, World!")

View file

@ -0,0 +1,4 @@
import dialogs, gtk2
gtk2.nim_init()
info(nil, "Hello World")

View file

@ -0,0 +1,5 @@
import iup
discard iup.open(nil, nil)
message("Hello", "Hello World")
close()

View file

@ -0,0 +1,4 @@
include pGUI.e
IupOpen("demo/pGUI/")
IupMessage("Bye","Goodbye, World!")
IupClose()

View file

@ -0,0 +1,8 @@
Load "guilib.ring"
New qApp {
new qWidget() {
setwindowtitle("Hello World")
show()
}
exec()
}

View file

@ -0,0 +1,18 @@
01100000000001110000000000000000
10000000000001010000000000000000
10011101110111011101010111000000
10010101010101010101010101000000
10010101010101010101010111000000
10011101110111011100110100000010
10000000000000000000010011000010
10011000000000000000100000000100
01101000000000000001000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00100100100000000010000100100000
00100100100000000010000100100000
00100100101110111010011100100000
00100100101010100010010100100000
00100100101010100010010100000000
00100100101110100011011100100000
00011011000000000000000000000000

View file

@ -0,0 +1,7 @@
var tk = require('Tk');
var main = %s'MainWindow'.new;
main.Button(
'-text' => 'Goodbye, World!',
'-command' => 'exit',
).pack;
tk.MainLoop;

View file

@ -0,0 +1,12 @@
var gtk2 = require('Gtk2') -> init;
var window = %s'Gtk2::Window'.new;
var label = %s'Gtk2::Label'.new('Goodbye, World!');
window.set_title('Goodbye, World!');
window.signal_connect(destroy => func(*_){ gtk2.main_quit });
window.add(label);
window.show_all;
gtk2.main;

View file

@ -0,0 +1,5 @@
import Cocoa
let alert = NSAlert()
alert.messageText = "Goodbye, World!"
alert.runModal()

View file

@ -0,0 +1,5 @@
* Version 1:
MESSAGEBOX("Goodbye, World!")
* Version 2:
? "Goodbye, World!"

View file

@ -0,0 +1,35 @@
# Convert a JSON object to a string suitable for use as a CSS style value
# e.g: "font-size: 40px; text-align: center;" (without the quotation marks)
def to_s:
reduce to_entries[] as $pair (""; . + "\($pair.key): \($pair.value); ");
# Defaults: 100%, 100%
def svg(width; height):
"<svg width='\(width // "100%")' height='\(height // "100%")'
xmlns='http://www.w3.org/2000/svg'>";
# Defaults:
# id: "linearGradient"
# color1: rgb(0,0,0)
# color2: rgb(255,255,255)
def linearGradient(id; color1; color2):
"<defs>
<linearGradient id='\(id//"linearGradient")' x1='0%' y1='0%' x2='100%' y2='0%'>
<stop offset='0%' style='stop-color:\(color1//"rgb(0,0,0)");stop-opacity:1' />
<stop offset='100%' style='stop-color:\(color2//"rgb(255,255,255)");stop-opacity:1' />
</linearGradient>
</defs>";
# input: the text string
# "style" should be a JSON object (see for example the default ($dstyle));
# the style actually used is (default + style), i.e. whatever is specified in "style" wins.
# Defaults:
# x: 0
# y: 0
def text(x; y; style):
. as $in
| {"font-size": "40px", "text-align": "center", "text-anchor": "left", "fill": "black"} as $dstyle
| (($dstyle + style) | to_s) as $style
| "<text x='\(x//0)' y='\(y//0)' style='\($style)'>
\(.)",
"</text>";

View file

@ -0,0 +1,7 @@
def task:
svg(null;null), # use the defaults
linearGradient("gradient"; "rgb(255,255,0)"; "rgb(255,0,0)"), # define "gradient"
("Goodbye, World!" | text(10; 50; {"fill": "url(#gradient)"})), # notice how the default for "fill" is overridden
"</svg>";
task