Last active
October 6, 2015 17:01
-
-
Save quintesse/30f58483e5d2c4181904 to your computer and use it in GitHub Desktop.
Ceylon Web Runner: JS Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//$webrun_wrapped | |
shared void run() { | |
// An interop demo | |
dynamic { | |
dynamic x = foobar(); | |
dynamic y = \iObject.getOwnPropertyNames(x); | |
print("{"); | |
for (i in y) { | |
print(" " + i + ": '" + x[i] + "',"); | |
} | |
print("}"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foobar() { | |
return { XDG_VTNR: '1', | |
LC_PAPER: 'es_ES.utf8', | |
XDG_SESSION_ID: '2', | |
LC_MONETARY: 'es_ES.utf8', | |
HOSTNAME: 'ceylondev.localdomain', | |
GPG_AGENT_INFO: '/run/user/1000/keyring/gpg:0:1', | |
VTE_VERSION: '3803', | |
XDG_MENU_PREFIX: 'gnome-', | |
SHELL: '/bin/bash', | |
TERM: 'xterm-256color', | |
HISTSIZE: '1000', | |
GJS_DEBUG_OUTPUT: 'stderr', | |
LC_NUMERIC: 'es_ES.utf8', | |
WINDOWID: '33554438', | |
QTDIR: '/usr/lib64/qt-3.3', | |
OLDPWD: '/home/ceylon/ceylon/ceylon-eclipse-workspace', | |
QTINC: '/usr/lib64/qt-3.3/include', | |
GJS_DEBUG_TOPICS: 'JS ERROR;JS LOG', | |
QT_GRAPHICSSYSTEM_CHECKED: '1', | |
USER: 'ceylon', | |
LS_COLORS: 'rs=0:di=38;5;33:ln=38;5;51:mh=00:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;05;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;40:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.m4a=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.oga=38;5;45:*.opus=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:', | |
SSH_AUTH_SOCK: '/run/user/1000/keyring/ssh', | |
USERNAME: 'ceylon', | |
SESSION_MANAGER: 'local/unix:@/tmp/.ICE-unix/1193,unix/unix:/tmp/.ICE-unix/1193', | |
DESKTOP_SESSION: 'gnome', | |
MAIL: '/var/spool/mail/ceylon', | |
PATH: '/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/ceylon/.local/bin:/home/ceylon/bin:/opt/eclipse:/home/ceylon/.local/bin:/home/ceylon/bin:/opt/eclipse', | |
QT_IM_MODULE: 'ibus', | |
PWD: '/home/ceylon/ceylon/ceylon-eclipse-workspace/compiler-test2', | |
XMODIFIERS: '@im=ibus', | |
TERMINAL_TITLE: 'play', | |
LANG: 'en_US.utf8', | |
GDM_LANG: 'en_US.utf8', | |
MODULEPATH: '/etc/scl/modulefiles:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles', | |
LOADEDMODULES: '', | |
LC_MEASUREMENT: 'es_ES.utf8', | |
KDEDIRS: '/usr', | |
GDMSESSION: 'gnome', | |
HISTCONTROL: 'ignoredups', | |
SSH_ASKPASS: '/usr/libexec/openssh/gnome-ssh-askpass', | |
XDG_SEAT: 'seat0', | |
SHLVL: '3', | |
HOME: '/home/ceylon', | |
GNOME_DESKTOP_SESSION_ID: 'this-is-deprecated', | |
LOGNAME: 'ceylon', | |
XDG_SESSION_DESKTOP: 'gnome', | |
QTLIB: '/usr/lib64/qt-3.3/lib', | |
DBUS_SESSION_BUS_ADDRESS: 'unix:abstract=/tmp/dbus-Tw1ovqceBl,guid=fbf505f5ff3fc58482db5a6d55fef11e', | |
MODULESHOME: '/usr/share/Modules', | |
LESSOPEN: '||/usr/bin/lesspipe.sh %s', | |
WINDOWPATH: '1', | |
DISPLAY: ':0', | |
XDG_RUNTIME_DIR: '/run/user/1000', | |
XDG_CURRENT_DESKTOP: 'GNOME', | |
LC_TIME: 'es_ES.utf8', | |
HISTFILE: '/home/ceylon/.bash_history_CeylonTests', | |
XAUTHORITY: '/run/gdm/auth-for-ceylon-rN2v7R/database', | |
'BASH_FUNC_module()': '() { eval `/usr/bin/modulecmd bash $*`\n}', | |
'BASH_FUNC_scl()': '() { local CMD=$1;\n if [ "$CMD" = "load" -o "$CMD" = "unload" ]; then\n eval "module $@";\n else\n /usr/bin/scl "$@";\n fi\n}', | |
_: '/usr/bin/node' }; | |
} | |
function barfoo() { | |
return [1, 2, 3]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Click here to run this code online