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
import org.lwjgl._ | |
import org.lwjgl.glfw._ | |
import org.lwjgl.opengl._ | |
import org.lwjgl.glfw.Callbacks._ | |
import org.lwjgl.glfw.GLFW._ | |
import org.lwjgl.opengl.GL11._ | |
import org.lwjgl.system.MemoryUtil._ | |
object Main { |
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
class Main { | |
static function main() { | |
Sdl.init(Sdl.INIT_EVERYTHING); | |
var win = Sdl.createWindow("Hello", 100, 100, 800, 600, Sdl.WINDOW_OPENGL); | |
var ren = Sdl.createRenderer(win, -1, Sdl.RENDERER_ACCELERATED); | |
var bmp = Sdl.loadBMP("test.bmp"); | |
var tex = Sdl.createTextureFromSurface(ren, bmp); | |
Sdl.freeSurface(bmp); | |
for (i in 0...3) { |
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
class Metric { | |
static function main() { | |
var coinRadius:Millimeters = 12; | |
var myHeight:Centimeters = 180; | |
var raceLength:Meters = 200; | |
var commuteDistance:Kilometers = 23; | |
diff( coinRadius, myHeight ); // 1.788 meters | |
diff( raceLength, commuteDistance ); // 22800 meters | |
sum( commuteDistance, coinRadius ); // 23000.012 meters |
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
#!bash | |
# | |
# bash/zsh completion support for neko/nekotools/nekoml/nekoc. | |
# | |
# This is free and unencumbered software released into the public domain. | |
# | |
# Anyone is free to copy, modify, publish, use, compile, sell, or | |
# distribute this software, either in source code form or as a compiled | |
# binary, for any purpose, commercial or non-commercial, and by any | |
# means. |
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
#!bash | |
# | |
# Haxelib bash completion (3.2.0-rc.3) | |
# | |
__haxelib_commands() { | |
echo "install upgrade update remove list set search info user config path version help submit register local dev git setup newrepo deleterepo selfupdate convertxml run proxy" | |
} | |
_haxelib_complete(){ |
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
#!bash | |
# | |
# Haxe bash completion | |
# | |
__haxe_commands() { | |
echo "-cp -js -swf -as3 -neko -php -cpp -cs -java -python -xml -main -lib -D -v -debug -dce -swf-version -swf-header -swf-lib -swf-lib-extern -java-lib -net-lib -net-std -c-arg -x -resource -prompt -cmd --flash-strict --no-traces --gen-hx-classes --next --each --display --no-output --times --no-inline --no-opt --php-front --php-lib --php-prefix --remap --interp --macro --eval --wait --connect --cwd -version --help-defines --help-metas -help --help" | |
} | |
_haxe_complete() { |
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
package flash; | |
#if !flash_no_alchemy extern #end class Memory { | |
#if flash_no_alchemy | |
private static var mem:flash.utils.ByteArray = prepareInitialByteArray(); | |
private static function prepareInitialByteArray ():flash.utils.ByteArray { | |
var b = new flash.utils.ByteArray(); | |
b.endian = flash.utils.Endian.LITTLE_ENDIAN; |